@colijnit/product 1.9.4 → 2.9.0

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.
Files changed (66) hide show
  1. package/app/components/product-additional-info/product-additional-info.component.d.ts +4 -3
  2. package/app/components/product-external-source/product-external-source.component.d.ts +30 -0
  3. package/app/components/product-external-source/product-external-source.module.d.ts +2 -0
  4. package/app/components/product-page/product-page.component.d.ts +4 -0
  5. package/app/components/product-page/product-page.module.d.ts +2 -0
  6. package/app/ione-product.component.d.ts +1 -3
  7. package/app/model/{settings.d.ts → productSettings.d.ts} +3 -2
  8. package/app/pipe/pipe.module.d.ts +2 -0
  9. package/app/service/product-connector-adapter.service.d.ts +8 -2
  10. package/app/service/product-connector.service.d.ts +10 -5
  11. package/app/service/product-settings.service.d.ts +3 -3
  12. package/bundles/colijnit-product.umd.js +1472 -1253
  13. package/bundles/colijnit-product.umd.js.map +1 -1
  14. package/bundles/colijnit-product.umd.min.js +2 -2
  15. package/bundles/colijnit-product.umd.min.js.map +1 -1
  16. package/colijnit-product.d.ts +29 -28
  17. package/colijnit-product.metadata.json +1 -1
  18. package/esm2015/app/components/product-additional-info/product-additional-info.component.js +23 -16
  19. package/esm2015/app/components/product-addtocart/product-addtocart.component.js +2 -2
  20. package/esm2015/app/components/product-delivery/product-delivery.component.js +1 -2
  21. package/esm2015/app/components/product-external-source/product-external-source.component.js +123 -0
  22. package/esm2015/app/components/product-external-source/product-external-source.module.js +23 -0
  23. package/esm2015/app/components/product-page/product-page.component.js +45 -15
  24. package/esm2015/app/components/product-page/product-page.module.js +66 -0
  25. package/esm2015/app/ione-product.component.js +41 -19
  26. package/esm2015/app/ione-product.module.js +8 -61
  27. package/esm2015/app/model/productSettings.js +16 -0
  28. package/esm2015/app/pipe/pipe.module.js +20 -0
  29. package/esm2015/app/product-version.js +3 -3
  30. package/esm2015/app/service/dictionary.service.js +1 -1
  31. package/esm2015/app/service/product-connector-adapter.service.js +35 -10
  32. package/esm2015/app/service/product-connector.service.js +33 -35
  33. package/esm2015/app/service/product-event.service.js +2 -6
  34. package/esm2015/app/service/product-settings.service.js +17 -76
  35. package/esm2015/colijnit-product.js +30 -29
  36. package/esm2015/public_api.js +3 -1
  37. package/esm5/app/components/product-additional-info/product-additional-info.component.js +43 -24
  38. package/esm5/app/components/product-addtocart/product-addtocart.component.js +2 -2
  39. package/esm5/app/components/product-delivery/product-delivery.component.js +1 -2
  40. package/esm5/app/components/product-external-source/product-external-source.component.js +126 -0
  41. package/esm5/app/components/product-external-source/product-external-source.module.js +26 -0
  42. package/esm5/app/components/product-page/product-page.component.js +49 -15
  43. package/esm5/app/components/product-page/product-page.module.js +69 -0
  44. package/esm5/app/ione-product.component.js +50 -20
  45. package/esm5/app/ione-product.module.js +8 -61
  46. package/esm5/app/model/productSettings.js +18 -0
  47. package/esm5/app/pipe/pipe.module.js +23 -0
  48. package/esm5/app/product-version.js +3 -3
  49. package/esm5/app/service/dictionary.service.js +1 -1
  50. package/esm5/app/service/product-connector-adapter.service.js +62 -11
  51. package/esm5/app/service/product-connector.service.js +65 -52
  52. package/esm5/app/service/product-event.service.js +2 -6
  53. package/esm5/app/service/product-settings.service.js +18 -76
  54. package/esm5/colijnit-product.js +30 -29
  55. package/esm5/public_api.js +3 -1
  56. package/fesm2015/colijnit-product.js +1194 -1043
  57. package/fesm2015/colijnit-product.js.map +1 -1
  58. package/fesm5/colijnit-product.js +1444 -1226
  59. package/fesm5/colijnit-product.js.map +1 -1
  60. package/package.json +5 -4
  61. package/public_api.d.ts +2 -0
  62. package/app/service/product-module.service.d.ts +0 -9
  63. package/esm2015/app/model/settings.js +0 -15
  64. package/esm2015/app/service/product-module.service.js +0 -39
  65. package/esm5/app/model/settings.js +0 -17
  66. package/esm5/app/service/product-module.service.js +0 -50
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@colijnit/corecomponents'), require('@colijnit/mainapi/build/model/co-document'), require('rxjs'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/articleapi/build/model/super-article'), require('@colijnit/articleapi/build/articles'), require('@colijnit/ioneconnector/build/factory/business-object-factory'), require('@colijnit/articleapi/build/model/delivery-prognosis'), require('@colijnit/articleapi/build/model/document-content'), require('@angular/common/http'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@angular/platform-browser'), require('@angular/animations'), require('@colijnit/articleapi/build/model/configurator-statistics-environment'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/product', ['exports', '@angular/core', '@colijnit/corecomponents', '@colijnit/mainapi/build/model/co-document', 'rxjs', '@colijnit/ioneconnector/build/model/options', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/articleapi/build/model/super-article', '@colijnit/articleapi/build/articles', '@colijnit/ioneconnector/build/factory/business-object-factory', '@colijnit/articleapi/build/model/delivery-prognosis', '@colijnit/articleapi/build/model/document-content', '@angular/common/http', '@colijnit/ioneconnector/build/utils/string-utils', '@angular/platform-browser', '@angular/animations', '@colijnit/articleapi/build/model/configurator-statistics-environment', '@angular/common'], factory) :
4
- (global = global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.product = {}), global.ng.core, global.corecomponents, global.coDocument, global.rxjs, global.options, global.articleFullObject, global.superArticle, global.articles, global.businessObjectFactory, global.deliveryPrognosis, global.documentContent, global.ng.common.http, global.stringUtils, global.ng.platformBrowser, global.ng.animations, global.configuratorStatisticsEnvironment, global.ng.common));
5
- }(this, (function (exports, core, corecomponents, coDocument, rxjs, options, articleFullObject, superArticle, articles, businessObjectFactory, deliveryPrognosis, documentContent, http, stringUtils, platformBrowser, animations, configuratorStatisticsEnvironment, common) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/articleapi/build/model/super-article'), require('@colijnit/articleapi/build/articles'), require('@colijnit/articleapi/build/model/delivery-prognosis'), require('@colijnit/articleapi/build/model/document-content'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/transactionapi/build/transaction'), require('@colijnit/mainapi'), require('@angular/common/http'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@angular/common'), require('@angular/platform-browser'), require('@angular/animations'), require('@colijnit/mainapi/build/model/co-document'), require('@colijnit/corecomponents'), require('@colijnit/articleapi/build/model/configurator-statistics-environment')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/product', ['exports', '@angular/core', 'rxjs', '@colijnit/ioneconnector/build/model/options', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/articleapi/build/model/super-article', '@colijnit/articleapi/build/articles', '@colijnit/articleapi/build/model/delivery-prognosis', '@colijnit/articleapi/build/model/document-content', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/transactionapi/build/transaction', '@colijnit/mainapi', '@angular/common/http', '@colijnit/ioneconnector/build/utils/string-utils', '@angular/common', '@angular/platform-browser', '@angular/animations', '@colijnit/mainapi/build/model/co-document', '@colijnit/corecomponents', '@colijnit/articleapi/build/model/configurator-statistics-environment'], factory) :
4
+ (global = global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.product = {}), global.ng.core, global.rxjs, global.options, global.articleFullObject, global.superArticle, global.articles, global.deliveryPrognosis, global.documentContent, global.businessObjectFactory, global.transaction, global.mainapi, global.ng.common.http, global.stringUtils, global.ng.common, global.ng.platformBrowser, global.ng.animations, global.coDocument, global.corecomponents, global.configuratorStatisticsEnvironment));
5
+ }(this, (function (exports, core, rxjs, options, articleFullObject, superArticle, articles, deliveryPrognosis, documentContent, businessObjectFactory, transaction, mainapi, http, stringUtils, common, platformBrowser, animations, coDocument, corecomponents, configuratorStatisticsEnvironment) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -228,28 +228,94 @@
228
228
  function Version() {
229
229
  this.name = "@colijnit/product";
230
230
  this.description = "Product detail page project for iOne";
231
- this.symVer = "1.9.4";
232
- this.publishDate = "20-4-2023 15:19:25";
231
+ this.symVer = "2.9.0";
232
+ this.publishDate = "7-9-2023 15:18:44";
233
233
  }
234
234
  return Version;
235
235
  }());
236
236
 
237
- var ProductDescriptionComponent = /** @class */ (function () {
238
- function ProductDescriptionComponent() {
237
+ var JsonUtilsService = /** @class */ (function () {
238
+ function JsonUtilsService() {
239
239
  }
240
- ProductDescriptionComponent.prototype.ngOnInit = function () {
240
+ JsonUtilsService.prototype.readJsonFile = function (filePath) {
241
+ return __awaiter(this, void 0, void 0, function () {
242
+ var response, e_1;
243
+ return __generator(this, function (_a) {
244
+ switch (_a.label) {
245
+ case 0:
246
+ _a.trys.push([0, 2, , 3]);
247
+ return [4 /*yield*/, fetch(filePath)];
248
+ case 1:
249
+ response = _a.sent();
250
+ if (!response.ok) {
251
+ return [2 /*return*/, null];
252
+ }
253
+ else {
254
+ return [2 /*return*/, response.json()];
255
+ }
256
+ return [3 /*break*/, 3];
257
+ case 2:
258
+ e_1 = _a.sent();
259
+ console.error('Error getting file:', e_1.message);
260
+ return [2 /*return*/, ''];
261
+ case 3: return [2 /*return*/];
262
+ }
263
+ });
264
+ });
241
265
  };
242
- __decorate([
243
- core.Input()
244
- ], ProductDescriptionComponent.prototype, "article", void 0);
245
- ProductDescriptionComponent = __decorate([
246
- core.Component({
247
- selector: 'app-product-description',
248
- template: "<div class=\"pd-title-wrapper\">\n <span class=\"pd-description\" [textContent]=\"article?.descriptionRetail\" *ngIf=\"article?.descriptionRetail\"></span>\n <span class=\"pd-sku\" [textContent]=\"article?.articleNr\" *ngIf=\"article?.articleNr\"></span>\n</div>\n",
249
- styles: [":host{display:block}.pd-title-wrapper{margin:20px 0 0}.pd-description{color:#22313c;font-size:25px;font-weight:700;width:100%;display:block}.pd-sku{color:#5b6875;font-size:16px}@media screen and (max-width:650px){.pd-description{font-size:21px}.pd-sku{font-size:13px}}"]
266
+ JsonUtilsService.ɵprov = core.ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
267
+ JsonUtilsService = __decorate([
268
+ core.Injectable({
269
+ providedIn: 'root'
250
270
  })
251
- ], ProductDescriptionComponent);
252
- return ProductDescriptionComponent;
271
+ ], JsonUtilsService);
272
+ return JsonUtilsService;
273
+ }());
274
+
275
+ var SettingsOptions = /** @class */ (function () {
276
+ function SettingsOptions() {
277
+ this.showStockStatus = false;
278
+ this.showZoomButton = false;
279
+ this.showTagFilter = false;
280
+ this.showAsConfigured = false;
281
+ this.inlineAnswers = false;
282
+ this.showArButton = false;
283
+ this.arEnabled = false;
284
+ this.vrEnabled = false;
285
+ }
286
+ return SettingsOptions;
287
+ }());
288
+
289
+ var RenderModes;
290
+ (function (RenderModes) {
291
+ RenderModes["RenderRoom"] = "render_room";
292
+ RenderModes["RenderShop"] = "render_shop";
293
+ RenderModes["RenderIone"] = "render_ione";
294
+ })(RenderModes || (RenderModes = {}));
295
+
296
+ var RenderParameters = /** @class */ (function () {
297
+ function RenderParameters() {
298
+ this.host = "";
299
+ this.port = 0;
300
+ this.secure = false;
301
+ this.renderMode = RenderModes.RenderShop;
302
+ }
303
+ return RenderParameters;
304
+ }());
305
+
306
+ var ProductSettings = /** @class */ (function () {
307
+ function ProductSettings() {
308
+ this.session = undefined;
309
+ this.useGroups = true;
310
+ this.useRenders = false;
311
+ this.useLoginEncryption = true;
312
+ this.createWebOrder = true;
313
+ this.useMatch = false;
314
+ this.currencySymbol = '€';
315
+ this.options = new SettingsOptions();
316
+ this.renderParameters = new RenderParameters();
317
+ }
318
+ return ProductSettings;
253
319
  }());
254
320
 
255
321
  // Sole responsibility is simply to wrap around a colijn.Connector to create a stable inner interface to the library in a 1:1 method way.
@@ -263,14 +329,46 @@
263
329
  this.articleConnector.showLoader.unsubscribe();
264
330
  };
265
331
  ProductConnectorAdapterService.prototype.initConnector = function (options) {
266
- var _this = this;
267
- this.articleConnector = new articles.Articles(options);
268
- options.session = this.articleConnector.session;
269
- this.articleConnector.showLoader.subscribe(function (value) { return _this.showLoader.next(value); });
332
+ return __awaiter(this, void 0, void 0, function () {
333
+ var _this = this;
334
+ return __generator(this, function (_a) {
335
+ switch (_a.label) {
336
+ case 0:
337
+ this.articleConnector = new articles.Articles(options);
338
+ return [4 /*yield*/, this.articleConnector.connect()];
339
+ case 1:
340
+ _a.sent();
341
+ this.transactionConnector = new transaction.Transaction(options);
342
+ this.articleConnector.showLoader.subscribe(function (value) { return _this.showLoader.next(value); });
343
+ return [2 /*return*/];
344
+ }
345
+ });
346
+ });
270
347
  };
271
348
  ProductConnectorAdapterService.prototype.setInstance = function (instanceId) {
272
349
  // this.articleConnector.setInstanceToConfigure(instanceId, false);
273
350
  };
351
+ ProductConnectorAdapterService.prototype.getProductBundleSettings = function (url, upId) {
352
+ return __awaiter(this, void 0, void 0, function () {
353
+ var tempSettings, tempMainConnector, response;
354
+ return __generator(this, function (_a) {
355
+ switch (_a.label) {
356
+ case 0:
357
+ tempSettings = new ProductSettings();
358
+ tempSettings.url = url;
359
+ tempSettings.schema = upId.toString();
360
+ tempMainConnector = new mainapi.MainApi(tempSettings);
361
+ return [4 /*yield*/, tempMainConnector.getPublicParams(upId)];
362
+ case 1:
363
+ response = _a.sent();
364
+ if (response) {
365
+ return [2 /*return*/, response.productSettings];
366
+ }
367
+ return [2 /*return*/, ""];
368
+ }
369
+ });
370
+ });
371
+ };
274
372
  ProductConnectorAdapterService.prototype.getDeliveryPrognosis = function (goodId, branchNr) {
275
373
  return __awaiter(this, void 0, void 0, function () {
276
374
  var deliveryPrognosis;
@@ -429,51 +527,30 @@
429
527
  });
430
528
  });
431
529
  };
432
- ProductConnectorAdapterService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductConnectorAdapterService_Factory() { return new ProductConnectorAdapterService(); }, token: ProductConnectorAdapterService, providedIn: "root" });
433
- ProductConnectorAdapterService = __decorate([
434
- core.Injectable({
435
- providedIn: 'root'
436
- })
437
- ], ProductConnectorAdapterService);
438
- return ProductConnectorAdapterService;
439
- }());
440
-
441
- var JsonUtilsService = /** @class */ (function () {
442
- function JsonUtilsService() {
443
- }
444
- JsonUtilsService.prototype.readJsonFile = function (filePath) {
530
+ ProductConnectorAdapterService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
445
531
  return __awaiter(this, void 0, void 0, function () {
446
- var response, e_1;
447
532
  return __generator(this, function (_a) {
448
533
  switch (_a.label) {
449
- case 0:
450
- _a.trys.push([0, 2, , 3]);
451
- return [4 /*yield*/, fetch(filePath)];
452
- case 1:
453
- response = _a.sent();
454
- if (!response.ok) {
455
- return [2 /*return*/, null];
456
- }
457
- else {
458
- return [2 /*return*/, response.json()];
459
- }
460
- return [3 /*break*/, 3];
461
- case 2:
462
- e_1 = _a.sent();
463
- console.error('Error getting file:', e_1.message);
464
- return [2 /*return*/, ''];
465
- case 3: return [2 /*return*/];
534
+ case 0: return [4 /*yield*/, this.transactionConnector.addWebSessionTransactionLine(sku, quantity)];
535
+ case 1: return [2 /*return*/, _a.sent()];
466
536
  }
467
537
  });
468
538
  });
469
539
  };
470
- JsonUtilsService.ɵprov = core.ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
471
- JsonUtilsService = __decorate([
472
- core.Injectable({
473
- providedIn: 'root'
474
- })
475
- ], JsonUtilsService);
476
- return JsonUtilsService;
540
+ ProductConnectorAdapterService.prototype.getWebTransaction = function () {
541
+ return __awaiter(this, void 0, void 0, function () {
542
+ return __generator(this, function (_a) {
543
+ switch (_a.label) {
544
+ case 0: return [4 /*yield*/, this.transactionConnector.getWebSessionSalesOrder()];
545
+ case 1: return [2 /*return*/, _a.sent()];
546
+ }
547
+ });
548
+ });
549
+ };
550
+ ProductConnectorAdapterService = __decorate([
551
+ core.Injectable()
552
+ ], ProductConnectorAdapterService);
553
+ return ProductConnectorAdapterService;
477
554
  }());
478
555
 
479
556
  var LanguageCode;
@@ -634,51 +711,6 @@
634
711
  return DictionaryService;
635
712
  }());
636
713
 
637
- var SettingsOptions = /** @class */ (function () {
638
- function SettingsOptions() {
639
- this.showStockStatus = false;
640
- this.showZoomButton = false;
641
- this.showTagFilter = false;
642
- this.showAsConfigured = false;
643
- this.inlineAnswers = false;
644
- this.showArButton = false;
645
- this.arEnabled = false;
646
- this.vrEnabled = false;
647
- }
648
- return SettingsOptions;
649
- }());
650
-
651
- var RenderModes;
652
- (function (RenderModes) {
653
- RenderModes["RenderRoom"] = "render_room";
654
- RenderModes["RenderShop"] = "render_shop";
655
- RenderModes["RenderIone"] = "render_ione";
656
- })(RenderModes || (RenderModes = {}));
657
-
658
- var RenderParameters = /** @class */ (function () {
659
- function RenderParameters() {
660
- this.host = "";
661
- this.port = 0;
662
- this.secure = false;
663
- this.renderMode = RenderModes.RenderShop;
664
- }
665
- return RenderParameters;
666
- }());
667
-
668
- var Settings = /** @class */ (function () {
669
- function Settings() {
670
- this.session = undefined;
671
- this.useGroups = true;
672
- this.useRenders = false;
673
- this.useEncryption = true;
674
- this.useMatch = false;
675
- this.currencySymbol = '€';
676
- this.options = new SettingsOptions();
677
- this.renderParameters = new RenderParameters();
678
- }
679
- return Settings;
680
- }());
681
-
682
714
  var ProductSettingsService = /** @class */ (function () {
683
715
  function ProductSettingsService(_jsonUtilsService, _dictionaryService) {
684
716
  this._jsonUtilsService = _jsonUtilsService;
@@ -705,12 +737,14 @@
705
737
  return [4 /*yield*/, this._jsonUtilsService.readJsonFile('product-settings.json')];
706
738
  case 1:
707
739
  jsonSettings = _a.sent();
708
- this.settings = Object.assign(new Settings(), jsonSettings);
709
- this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
710
- this.settingsFinished();
740
+ if (jsonSettings) {
741
+ this.settings = Object.assign(new ProductSettings(), jsonSettings);
742
+ this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
743
+ this.settingsFinished();
744
+ }
711
745
  return [3 /*break*/, 3];
712
746
  case 2:
713
- this.settings = Object.assign(new Settings(), settings);
747
+ this.settings = Object.assign(new ProductSettings(), settings);
714
748
  this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
715
749
  this.settingsFinished();
716
750
  _a.label = 3;
@@ -721,52 +755,19 @@
721
755
  };
722
756
  ProductSettingsService.prototype.createSettingsFromObject = function (obj) {
723
757
  return __awaiter(this, void 0, void 0, function () {
758
+ var ownOptions, ownRenderParameters;
724
759
  return __generator(this, function (_a) {
725
760
  if (!this.settings) {
726
- this.settings = new Settings();
727
- }
728
- if (obj.hasOwnProperty('url')) {
729
- this.settings.url = obj['url'];
730
- this._dictionaryService.rootUrl = this.settings.url.replace('/ajaxservice', '');
731
- }
732
- if (obj.hasOwnProperty('schema')) {
733
- this.settings.schema = obj['schema'];
734
- }
735
- if (obj.hasOwnProperty('version')) {
736
- this.settings.version = obj['version'];
737
- }
738
- if (obj.hasOwnProperty('branch')) {
739
- this.settings.branch = obj['branch'];
740
- }
741
- if (obj.hasOwnProperty('currency')) {
742
- this.settings.currency = obj['currency'];
761
+ this.settings = new ProductSettings();
743
762
  }
744
- if (obj.hasOwnProperty('client')) {
745
- this.settings.client = obj['client'];
763
+ ownOptions = Object.assign({}, this.settings.options);
764
+ ownRenderParameters = Object.assign({}, this.settings.renderParameters);
765
+ this.settings = Object.assign({}, this.settings, obj);
766
+ if (obj.renderParameters) {
767
+ this.settings.renderParameters = Object.assign({}, ownRenderParameters, obj.renderParameters);
746
768
  }
747
- if (obj.hasOwnProperty('languageCode')) {
748
- this.settings.languageCode = obj['languageCode'];
749
- }
750
- if (obj.hasOwnProperty('username')) {
751
- this.settings.username = obj['username'];
752
- }
753
- if (obj.hasOwnProperty('password')) {
754
- this.settings.password = obj['password'];
755
- }
756
- if (obj.hasOwnProperty('timeoutInMs')) {
757
- this.settings.timeoutInMs = obj['timeoutInMs'];
758
- }
759
- if (obj.hasOwnProperty('session')) {
760
- this.settings.session = obj['session'];
761
- }
762
- if (obj.hasOwnProperty('useGroups')) {
763
- this.settings.useGroups = obj['useGroups'];
764
- }
765
- if (obj.hasOwnProperty('useEncryption')) {
766
- this.settings.useEncryption = obj['useEncryption'];
767
- }
768
- if (obj.hasOwnProperty('useMatch')) {
769
- this.settings.useMatch = obj['useMatch'];
769
+ if (obj.options) {
770
+ this.settings.options = Object.assign({}, ownOptions, obj.options);
770
771
  }
771
772
  if (obj.hasOwnProperty('assetPath')) {
772
773
  this.settings.assetPath = obj['assetPath'];
@@ -781,27 +782,6 @@
781
782
  this.settings.threeDAssetPath += '/';
782
783
  }
783
784
  }
784
- if (obj.hasOwnProperty('currencySymbol')) {
785
- this.settings.currencySymbol = obj['currencySymbol'];
786
- }
787
- if (obj.hasOwnProperty('gtm')) {
788
- this.settings.gtm = obj['gtm'];
789
- }
790
- if (obj.hasOwnProperty('assetIndex')) {
791
- this.settings.assetIndex = obj['assetIndex'];
792
- }
793
- if (obj.hasOwnProperty('lightPresetsIndex')) {
794
- this.settings.lightPresetsIndex = obj['lightPresetsIndex'];
795
- }
796
- if (obj.hasOwnProperty('additionalTranslationFile')) {
797
- this.settings.additionalTranslationFile = obj['additionalTranslationFile'];
798
- }
799
- if (obj.hasOwnProperty('options')) {
800
- this.settings.options = obj['options'];
801
- }
802
- if (obj.hasOwnProperty('renderParameters')) {
803
- this.settings.renderParameters = obj['renderParameters'];
804
- }
805
785
  this.settingsFinished();
806
786
  return [2 /*return*/];
807
787
  });
@@ -824,19 +804,16 @@
824
804
  { type: JsonUtilsService },
825
805
  { type: DictionaryService }
826
806
  ]; };
827
- ProductSettingsService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(core.ɵɵinject(JsonUtilsService), core.ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
828
807
  ProductSettingsService = __decorate([
829
- core.Injectable({
830
- providedIn: 'root'
831
- })
808
+ core.Injectable()
832
809
  ], ProductSettingsService);
833
810
  return ProductSettingsService;
834
811
  }());
835
812
 
836
813
  // Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
837
814
  var ProductConnectorService = /** @class */ (function () {
838
- function ProductConnectorService(connector, _settingsService) {
839
- this.connector = connector;
815
+ function ProductConnectorService(_adapterService, _settingsService) {
816
+ this._adapterService = _adapterService;
840
817
  this._settingsService = _settingsService;
841
818
  this.controllerInitialized = new rxjs.BehaviorSubject(false);
842
819
  this._initializing = false;
@@ -854,57 +831,61 @@
854
831
  ProductConnectorService.prototype.ngOnDestroy = function () {
855
832
  this.subs.forEach(function (sub) { return sub.unsubscribe(); });
856
833
  };
857
- ProductConnectorService.prototype.initDefaultDevelopTestConnection = function () {
834
+ ProductConnectorService.prototype.initConnection = function () {
858
835
  return __awaiter(this, void 0, void 0, function () {
859
- var settings;
836
+ var settings, e_1;
860
837
  return __generator(this, function (_a) {
861
- if (this._initialized || this._initializing) {
862
- return [2 /*return*/];
863
- }
864
- this._initializing = true;
865
- try {
866
- settings = this._settingsService.settings;
867
- if (!settings) {
868
- throw Error('Settings are not defined!');
869
- }
870
- this.connectorOptions.url = settings.url;
871
- this.connectorOptions.schema = settings.schema;
872
- this.connectorOptions.version = settings.version;
873
- this.connectorOptions.branch = settings.branch;
874
- this.connectorOptions.username = settings.username;
875
- this.connectorOptions.password = settings.password;
876
- this.connectorOptions.session = settings.session;
877
- this.connectorOptions.currencyId = settings.currency;
878
- this.connectorOptions.useGroups = settings.useGroups;
879
- this.connectorOptions.useRenders = settings.useRenders;
880
- this.connectorOptions.useLoginEncryption = settings.useEncryption;
881
- this.connectorOptions.languageCode = settings.languageCode;
882
- this.connector.initConnector(this.connectorOptions);
883
- this._settingsService.settings.session = this.connectorOptions.session;
884
- this.controllerInitialized.next(true);
885
- this._initialized = true;
886
- this._initializing = false;
887
- }
888
- catch (e) {
889
- this._initializing = false;
838
+ switch (_a.label) {
839
+ case 0:
840
+ if (this._initialized || this._initializing) {
841
+ return [2 /*return*/];
842
+ }
843
+ this._initializing = true;
844
+ _a.label = 1;
845
+ case 1:
846
+ _a.trys.push([1, 3, , 4]);
847
+ settings = this._settingsService.settings;
848
+ if (!settings) {
849
+ throw Error('Settings are not defined!');
850
+ }
851
+ this.connectorOptions = Object.assign(new options.Options(), settings);
852
+ return [4 /*yield*/, this._adapterService.initConnector(this.connectorOptions)];
853
+ case 2:
854
+ _a.sent();
855
+ this.controllerInitialized.next(true);
856
+ this._initialized = true;
857
+ this._initializing = false;
858
+ return [3 /*break*/, 4];
859
+ case 3:
860
+ e_1 = _a.sent();
861
+ this._initializing = false;
862
+ return [3 /*break*/, 4];
863
+ case 4: return [2 /*return*/];
890
864
  }
891
- return [2 /*return*/];
865
+ });
866
+ });
867
+ };
868
+ ProductConnectorService.prototype.getProductBundleSettings = function (url, upId) {
869
+ return __awaiter(this, void 0, void 0, function () {
870
+ return __generator(this, function (_a) {
871
+ return [2 /*return*/, this._adapterService.getProductBundleSettings(url, upId)];
892
872
  });
893
873
  });
894
874
  };
895
875
  ProductConnectorService.prototype.setInstance = function (instanceId) {
896
- this.connector.setInstance(instanceId);
876
+ this._instanceId = instanceId;
877
+ this._adapterService.setInstance(instanceId);
897
878
  };
898
879
  ProductConnectorService.prototype.getFullArticle = function (sku) {
899
880
  return __awaiter(this, void 0, void 0, function () {
900
881
  var goodId;
901
882
  return __generator(this, function (_a) {
902
883
  switch (_a.label) {
903
- case 0: return [4 /*yield*/, this.connector.getGoodIdFromArticleNr(sku)];
884
+ case 0: return [4 /*yield*/, this._adapterService.getGoodIdFromArticleNr(sku)];
904
885
  case 1:
905
886
  goodId = _a.sent();
906
887
  if (goodId) {
907
- return [2 /*return*/, this.connector.getArticleFullObject(goodId)];
888
+ return [2 /*return*/, this._adapterService.getArticleFullObject(goodId)];
908
889
  }
909
890
  return [2 /*return*/, null];
910
891
  }
@@ -913,27 +894,42 @@
913
894
  };
914
895
  ProductConnectorService.prototype.getDocumentContent = function (docId, thumbnail) {
915
896
  if (thumbnail === void 0) { thumbnail = true; }
916
- return this.connector.getDocumentContent(docId, thumbnail);
897
+ return this._adapterService.getDocumentContent(docId, thumbnail);
917
898
  };
918
899
  ProductConnectorService.prototype.getDeliveryPrognosis = function (goodId) {
919
- return this.connector.getDeliveryPrognosis(goodId);
900
+ return this._adapterService.getDeliveryPrognosis(goodId);
920
901
  };
921
902
  ProductConnectorService.prototype.getSelectorDeliveryDate = function () {
922
903
  return __awaiter(this, void 0, void 0, function () {
923
904
  return __generator(this, function (_a) {
924
- return [2 /*return*/, this.connector.getSelectorDeliveryDate()];
905
+ return [2 /*return*/, this._adapterService.getSelectorDeliveryDate()];
925
906
  });
926
907
  });
927
908
  };
928
909
  ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
929
- return this.connector.getDeliveryDate2(goodId);
910
+ return this._adapterService.getDeliveryDate2(goodId);
930
911
  };
931
912
  ProductConnectorService.prototype.getSuperArticle = function (id) {
932
- return this.connector.getSuperArticle(id);
913
+ return this._adapterService.getSuperArticle(id);
933
914
  };
934
- ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
915
+ ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, configuratorStatistics) {
935
916
  if (showLoader === void 0) { showLoader = true; }
936
- return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
917
+ return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, this._instanceId, configuratorStatistics);
918
+ };
919
+ ProductConnectorService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
920
+ return __awaiter(this, void 0, void 0, function () {
921
+ return __generator(this, function (_a) {
922
+ switch (_a.label) {
923
+ case 0: return [4 /*yield*/, this._adapterService.addWebSessionTransactionLine(sku, quantity)];
924
+ case 1: return [2 /*return*/, _a.sent()];
925
+ }
926
+ });
927
+ });
928
+ };
929
+ ProductConnectorService.prototype.getWebTransaction = function () {
930
+ this._adapterService.getWebTransaction().then(function (response) {
931
+ console.log(response);
932
+ });
937
933
  };
938
934
  ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
939
935
  this._shouldShowLoader = showLoader;
@@ -942,11 +938,8 @@
942
938
  { type: ProductConnectorAdapterService },
943
939
  { type: ProductSettingsService }
944
940
  ]; };
945
- ProductConnectorService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(core.ɵɵinject(ProductConnectorAdapterService), core.ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
946
941
  ProductConnectorService = __decorate([
947
- core.Injectable({
948
- providedIn: 'root'
949
- })
942
+ core.Injectable()
950
943
  ], ProductConnectorService);
951
944
  return ProductConnectorService;
952
945
  }());
@@ -966,7 +959,6 @@
966
959
  this.onArticleInfoReceived = new rxjs.Subject();
967
960
  this.onUpdateProductInfoTab = new rxjs.Subject();
968
961
  }
969
- ProductEventService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
970
962
  __decorate([
971
963
  core.Output()
972
964
  ], ProductEventService.prototype, "onAddToCart", void 0);
@@ -981,13 +973,320 @@
981
973
  ], ProductEventService.prototype, "onForceRenderImage", void 0);
982
974
  ProductEventService = __decorate([
983
975
  core.Directive(),
984
- core.Injectable({
985
- providedIn: 'root'
986
- })
976
+ core.Injectable()
987
977
  ], ProductEventService);
988
978
  return ProductEventService;
989
979
  }());
990
980
 
981
+ var IoneProductComponent = /** @class */ (function () {
982
+ function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
983
+ // this.sku = 'CF-HILL';
984
+ // this.sku = 'CF-ALMADA';
985
+ // this.sku = 'CF-39904ANT';
986
+ // this.sku = 'CF-22346001';
987
+ // this.sku = '104';
988
+ // this.sku = '1000561986';
989
+ // this.sku = '1000567768';
990
+ // this.sku = '1000234793';
991
+ // this.sku = '1066';
992
+ // this.sku = '104';
993
+ var _this = this;
994
+ this._dictionary = _dictionary;
995
+ this._jsonUtils = _jsonUtils;
996
+ this._ione = _ione;
997
+ this._changeDetector = _changeDetector;
998
+ this._appEventService = _appEventService;
999
+ this._settingsService = _settingsService;
1000
+ this.onAddToCart = new core.EventEmitter();
1001
+ this.forceRenderImage = new core.EventEmitter();
1002
+ this.onAlternativeClick = new core.EventEmitter();
1003
+ this.onArticleInfoReceived = new core.EventEmitter();
1004
+ this.onArticleReceived = new core.EventEmitter();
1005
+ this.onSelectionsReceived = new core.EventEmitter();
1006
+ this.onAddToQuote = new core.EventEmitter();
1007
+ this._subs = [];
1008
+ // this.sku = "70000107";
1009
+ this._subs.push(
1010
+ // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
1011
+ this._appEventService.onAddToCart.subscribe(function (json) {
1012
+ _this._handleAddToCart(json);
1013
+ }), this._appEventService.onAddToQuote.subscribe(function (json) { return _this.onAddToQuote.emit(json); }), this._appEventService.onAlternativeClick.subscribe(function (article) { return _this.onAlternativeClick.emit(article); }), this._appEventService.onArticleInfoReceived.subscribe(function (info) { return _this._handleAnswerInfoReceived(info); }), this._appEventService.onArticleReceived.subscribe(function (article) { return _this.onArticleReceived.emit(article); }), this._appEventService.onSelectionsReceived.subscribe(function (selections) { return _this.onSelectionsReceived.emit(selections); }));
1014
+ }
1015
+ Object.defineProperty(IoneProductComponent.prototype, "settings", {
1016
+ get: function () {
1017
+ return this._settings;
1018
+ },
1019
+ set: function (value) {
1020
+ if (value) {
1021
+ var settings = void 0;
1022
+ if (typeof value === 'string') {
1023
+ settings = JSON.parse(value);
1024
+ }
1025
+ else {
1026
+ settings = value;
1027
+ }
1028
+ this._settingsService.createSettingsFromObject(settings);
1029
+ // this._initConnection(settings);
1030
+ }
1031
+ },
1032
+ enumerable: true,
1033
+ configurable: true
1034
+ });
1035
+ IoneProductComponent.prototype.ngOnChanges = function (changes) {
1036
+ this._changeDetector.detectChanges();
1037
+ };
1038
+ IoneProductComponent.prototype.ngOnDestroy = function () {
1039
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
1040
+ };
1041
+ IoneProductComponent.prototype._handleAnswerInfoReceived = function (info) {
1042
+ this.onArticleInfoReceived.next(info);
1043
+ };
1044
+ IoneProductComponent.prototype._handleAddToCart = function (json) {
1045
+ return __awaiter(this, void 0, void 0, function () {
1046
+ var articleTreeData, i, good, subArticle;
1047
+ return __generator(this, function (_a) {
1048
+ switch (_a.label) {
1049
+ case 0:
1050
+ if (!this._settingsService.settings.createWebOrder) return [3 /*break*/, 7];
1051
+ if (!json) return [3 /*break*/, 7];
1052
+ articleTreeData = JSON.parse(json);
1053
+ if (!(articleTreeData.articleTree && articleTreeData.articleTree.article)) return [3 /*break*/, 7];
1054
+ if (!(articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
1055
+ articleTreeData.articleTree.compositeGoods.length > 0 && articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles))) return [3 /*break*/, 5];
1056
+ i = 0;
1057
+ _a.label = 1;
1058
+ case 1:
1059
+ if (!(i < articleTreeData.articleTree.compositeGoods.length - 1)) return [3 /*break*/, 4];
1060
+ good = articleTreeData.articleTree.compositeGoods[i];
1061
+ subArticle = articleTreeData.articleTree.subArticles[i];
1062
+ return [4 /*yield*/, this._ione.addWebSessionTransactionLine(subArticle.articleNumber, good.quantity)];
1063
+ case 2:
1064
+ _a.sent();
1065
+ _a.label = 3;
1066
+ case 3:
1067
+ i++;
1068
+ return [3 /*break*/, 1];
1069
+ case 4: return [3 /*break*/, 7];
1070
+ case 5: return [4 /*yield*/, this._ione.addWebSessionTransactionLine(articleTreeData.articleTree.article.articleNumber, 1)];
1071
+ case 6:
1072
+ _a.sent();
1073
+ _a.label = 7;
1074
+ case 7:
1075
+ this.onAddToCart.emit(json);
1076
+ return [2 /*return*/];
1077
+ }
1078
+ });
1079
+ });
1080
+ };
1081
+ IoneProductComponent.ctorParameters = function () { return [
1082
+ { type: DictionaryService },
1083
+ { type: JsonUtilsService },
1084
+ { type: ProductConnectorService },
1085
+ { type: core.ChangeDetectorRef },
1086
+ { type: ProductEventService },
1087
+ { type: ProductSettingsService }
1088
+ ]; };
1089
+ __decorate([
1090
+ core.Input()
1091
+ ], IoneProductComponent.prototype, "sku", void 0);
1092
+ __decorate([
1093
+ core.Input()
1094
+ ], IoneProductComponent.prototype, "settings", null);
1095
+ __decorate([
1096
+ core.Output()
1097
+ ], IoneProductComponent.prototype, "onAddToCart", void 0);
1098
+ __decorate([
1099
+ core.Output()
1100
+ ], IoneProductComponent.prototype, "forceRenderImage", void 0);
1101
+ __decorate([
1102
+ core.Output()
1103
+ ], IoneProductComponent.prototype, "onAlternativeClick", void 0);
1104
+ __decorate([
1105
+ core.Output()
1106
+ ], IoneProductComponent.prototype, "onArticleInfoReceived", void 0);
1107
+ __decorate([
1108
+ core.Output()
1109
+ ], IoneProductComponent.prototype, "onArticleReceived", void 0);
1110
+ __decorate([
1111
+ core.Output()
1112
+ ], IoneProductComponent.prototype, "onSelectionsReceived", void 0);
1113
+ __decorate([
1114
+ core.Output()
1115
+ ], IoneProductComponent.prototype, "onAddToQuote", void 0);
1116
+ IoneProductComponent = __decorate([
1117
+ core.Component({
1118
+ selector: 'app-ione-product',
1119
+ template: "\n <app-product-page [sku]=\"sku\"\n ></app-product-page>\n ",
1120
+ providers: [
1121
+ ProductEventService,
1122
+ ProductSettingsService,
1123
+ ProductConnectorAdapterService,
1124
+ ProductConnectorService
1125
+ ],
1126
+ encapsulation: core.ViewEncapsulation.Emulated,
1127
+ styles: [""]
1128
+ })
1129
+ ], IoneProductComponent);
1130
+ return IoneProductComponent;
1131
+ }());
1132
+
1133
+ var ProductInitializerService = /** @class */ (function () {
1134
+ function ProductInitializerService(_settingsService) {
1135
+ this._settingsService = _settingsService;
1136
+ }
1137
+ ProductInitializerService.prototype.initializeApp = function () {
1138
+ return __awaiter(this, void 0, void 0, function () {
1139
+ return __generator(this, function (_a) {
1140
+ return [2 /*return*/, this._settingsService.initializeSettings()];
1141
+ });
1142
+ });
1143
+ };
1144
+ ProductInitializerService.ctorParameters = function () { return [
1145
+ { type: ProductSettingsService }
1146
+ ]; };
1147
+ ProductInitializerService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(core.ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
1148
+ ProductInitializerService = __decorate([
1149
+ core.Injectable({
1150
+ providedIn: 'root',
1151
+ })
1152
+ ], ProductInitializerService);
1153
+ return ProductInitializerService;
1154
+ }());
1155
+
1156
+ var ProductExternalSourceComponent = /** @class */ (function () {
1157
+ function ProductExternalSourceComponent(_sanitizer, _productConnectorService, _appEventService) {
1158
+ this._sanitizer = _sanitizer;
1159
+ this._productConnectorService = _productConnectorService;
1160
+ this._appEventService = _appEventService;
1161
+ this.addToCart = new core.EventEmitter();
1162
+ this.addToQuote = new core.EventEmitter();
1163
+ this.alternativeClick = new core.EventEmitter();
1164
+ this.showProduct = false;
1165
+ this.loaded = false;
1166
+ this.externalSettings = {};
1167
+ this._subs = [];
1168
+ }
1169
+ Object.defineProperty(ProductExternalSourceComponent.prototype, "externalSource", {
1170
+ get: function () {
1171
+ return this._externalSource;
1172
+ },
1173
+ set: function (value) {
1174
+ this._externalSource = value;
1175
+ this.loaded = false;
1176
+ this._prepareExternalSource();
1177
+ },
1178
+ enumerable: true,
1179
+ configurable: true
1180
+ });
1181
+ ProductExternalSourceComponent.prototype.showClass = function () {
1182
+ return true;
1183
+ };
1184
+ ProductExternalSourceComponent.prototype.ngOnInit = function () {
1185
+ var _this = this;
1186
+ this._subs.push(this._appEventService.onAddToCart.subscribe(function (json) { return _this.addToCart.next(json); }), this._appEventService.onAddToQuote.subscribe(function (json) { return _this.addToQuote.next(json); }), this._appEventService.onAlternativeClick.subscribe(function (article) { return _this.alternativeClick.next(article); }));
1187
+ };
1188
+ ProductExternalSourceComponent.prototype.ngOnDestroy = function () {
1189
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
1190
+ };
1191
+ ProductExternalSourceComponent.prototype._prepareExternalSource = function () {
1192
+ return __awaiter(this, void 0, void 0, function () {
1193
+ var bundleSettings;
1194
+ return __generator(this, function (_a) {
1195
+ switch (_a.label) {
1196
+ case 0:
1197
+ if (!this._externalSource) {
1198
+ return [2 /*return*/];
1199
+ }
1200
+ this.externalUrl = undefined;
1201
+ this.externalSettings = {};
1202
+ if (!(this.externalSource.type === 'CATF')) return [3 /*break*/, 2];
1203
+ return [4 /*yield*/, this._productConnectorService.getProductBundleSettings(this.externalSource.url, parseInt(this.externalSource.schema, 0))];
1204
+ case 1:
1205
+ bundleSettings = _a.sent();
1206
+ this.externalSettings = JSON.parse(bundleSettings);
1207
+ if (this.options) {
1208
+ this.externalSettings.options = this.options;
1209
+ }
1210
+ // this.externalSettings.assetPath = "https://cdn1.colijn-it.nl/content43";
1211
+ // this.externalSettings.threeDAssetPath = "https://cdn1.colijn-it.nl/content43";
1212
+ if (this.externalSource.username && this.externalSource.password) {
1213
+ this.externalSettings.useLoginEncryption = true;
1214
+ this.externalSettings.username = this.externalSource.username;
1215
+ this.externalSettings.password = this.externalSource.password;
1216
+ }
1217
+ // finally show the catalog
1218
+ this.showProduct = true;
1219
+ return [3 /*break*/, 3];
1220
+ case 2:
1221
+ this.externalUrl = this.externalSource.url;
1222
+ this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
1223
+ this.showProduct = false;
1224
+ _a.label = 3;
1225
+ case 3:
1226
+ this.loaded = true;
1227
+ return [2 /*return*/];
1228
+ }
1229
+ });
1230
+ });
1231
+ };
1232
+ ProductExternalSourceComponent.ctorParameters = function () { return [
1233
+ { type: platformBrowser.DomSanitizer },
1234
+ { type: ProductConnectorService },
1235
+ { type: ProductEventService }
1236
+ ]; };
1237
+ __decorate([
1238
+ core.Input()
1239
+ ], ProductExternalSourceComponent.prototype, "sku", void 0);
1240
+ __decorate([
1241
+ core.Input()
1242
+ ], ProductExternalSourceComponent.prototype, "externalSource", null);
1243
+ __decorate([
1244
+ core.Input()
1245
+ ], ProductExternalSourceComponent.prototype, "options", void 0);
1246
+ __decorate([
1247
+ core.Output()
1248
+ ], ProductExternalSourceComponent.prototype, "addToCart", void 0);
1249
+ __decorate([
1250
+ core.Output()
1251
+ ], ProductExternalSourceComponent.prototype, "addToQuote", void 0);
1252
+ __decorate([
1253
+ core.Output()
1254
+ ], ProductExternalSourceComponent.prototype, "alternativeClick", void 0);
1255
+ __decorate([
1256
+ core.HostBinding('class.co-product-external-source')
1257
+ ], ProductExternalSourceComponent.prototype, "showClass", null);
1258
+ ProductExternalSourceComponent = __decorate([
1259
+ core.Component({
1260
+ selector: 'co-product-external-source',
1261
+ template: "\n <ng-container *ngIf=\"loaded\">\n <ng-container *ngIf=\"showProduct\">\n <app-product-page\n [sku]=\"sku\"\n [settings]=\"externalSettings\"\n ></app-product-page>\n </ng-container>\n <ng-container *ngIf=\"!showProduct\">\n <iframe width=\"100%\" height=\"100%\" [src]=\"safeUrl\" frameborder=\"0\" allowfullscreen></iframe>\n </ng-container>\n </ng-container>\n ",
1262
+ providers: [
1263
+ ProductEventService,
1264
+ ProductSettingsService,
1265
+ ProductConnectorAdapterService,
1266
+ ProductConnectorService
1267
+ ],
1268
+ encapsulation: core.ViewEncapsulation.None
1269
+ })
1270
+ ], ProductExternalSourceComponent);
1271
+ return ProductExternalSourceComponent;
1272
+ }());
1273
+
1274
+ var StockAndDelivery = /** @class */ (function () {
1275
+ function StockAndDelivery(stock, deliveryDescription) {
1276
+ this.stock = 0;
1277
+ this.stock = stock;
1278
+ this.deliveryDescription = deliveryDescription;
1279
+ }
1280
+ return StockAndDelivery;
1281
+ }());
1282
+
1283
+ var SelectorType;
1284
+ (function (SelectorType) {
1285
+ SelectorType["TwoD"] = "2D";
1286
+ SelectorType["ThreeD"] = "3D";
1287
+ SelectorType["Omni"] = "Omni";
1288
+ })(SelectorType || (SelectorType = {}));
1289
+
991
1290
  /** AUTO GENERATED FILE. DO NOT CHANGE.. **/
992
1291
  var IconEnum;
993
1292
  (function (IconEnum) {
@@ -1065,224 +1364,64 @@
1065
1364
  return IconCacheService;
1066
1365
  }());
1067
1366
 
1068
- var ImageCarouselComponent = /** @class */ (function () {
1069
- function ImageCarouselComponent(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
1367
+ var ProductPageComponent = /** @class */ (function () {
1368
+ function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
1070
1369
  var _this = this;
1071
1370
  this._ione = _ione;
1072
- this._appEventService = _appEventService;
1371
+ this._renderer = _renderer;
1073
1372
  this._changeDetector = _changeDetector;
1074
- this._domSanitizer = _domSanitizer;
1075
1373
  this.iconCache = iconCache;
1076
- this.icons = IconEnum;
1077
- this.showLoader = false;
1078
- this.showRefresh = false;
1079
- this.resizing = false;
1080
- this._currentIndex = 0;
1081
- this._images = [];
1374
+ this.settingsService = settingsService;
1375
+ this.appEventService = appEventService;
1376
+ this.icon = IconEnum;
1377
+ this.configurable = false;
1378
+ this.threeD = false;
1379
+ this.show2D = true;
1380
+ this.show3D = false;
1381
+ this.configuring = false;
1382
+ this.fullscreenAnimationEnd = false;
1383
+ this.settingsLoaded = false;
1384
+ this._fullScreen = false;
1082
1385
  this._subs = [];
1083
- this._subs.push(this._appEventService.onRenderStarted.subscribe(function () {
1084
- _this.showLoader = true;
1085
- }), this._appEventService.onDraftRenderImageReceived.subscribe(function (url) {
1086
- if (_this._images[0] instanceof coDocument.CoDocument) {
1087
- _this._images.unshift(url);
1088
- }
1089
- else {
1090
- _this._images[0] = url;
1386
+ this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
1387
+ if (_this.selections.nativeElement) {
1388
+ _this.selections.nativeElement.forceRenderImage();
1091
1389
  }
1092
- _this.showLoader = false;
1390
+ }), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._ione.controllerInitialized.subscribe(function (initialized) {
1391
+ _this.settingsLoaded = initialized;
1093
1392
  }));
1094
1393
  }
1095
- Object.defineProperty(ImageCarouselComponent.prototype, "images", {
1394
+ Object.defineProperty(ProductPageComponent.prototype, "sku", {
1096
1395
  get: function () {
1097
- return this._images;
1396
+ return this._sku;
1098
1397
  },
1099
1398
  set: function (value) {
1100
- if (value && value.length > 0) {
1101
- this._images = value;
1102
- this._loadImages();
1103
- this._changeDetector.detectChanges();
1399
+ if (value) {
1400
+ if (this.configuring) {
1401
+ this.show3D = false;
1402
+ this.fullScreen = false;
1403
+ this.configuring = false;
1404
+ this._changeDetector.detectChanges();
1405
+ }
1406
+ this._sku = value;
1407
+ this._getArticle();
1104
1408
  }
1105
1409
  },
1106
1410
  enumerable: true,
1107
1411
  configurable: true
1108
1412
  });
1109
- ImageCarouselComponent.prototype.handleWindowResize = function () {
1110
- var _this = this;
1111
- this.resizing = true;
1112
- this._scrollCarouselToIndex();
1113
- clearTimeout(this._resizeTimer);
1114
- this._resizeTimer = setTimeout(function () {
1115
- _this.resizing = false;
1116
- }, 200);
1117
- };
1118
- ImageCarouselComponent.prototype.gotoNextSlide = function () {
1119
- this.currentIndex++;
1120
- };
1121
- ImageCarouselComponent.prototype.gotoPrevSlide = function () {
1122
- this.currentIndex--;
1123
- };
1124
- ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
1125
- return this.currentIndex === index;
1126
- };
1127
- Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
1128
- get: function () {
1129
- return this._currentIndex;
1130
- },
1131
- set: function (value) {
1132
- this._currentIndex = value;
1133
- this._scrollCarouselToIndex();
1134
- },
1135
- enumerable: true,
1136
- configurable: true
1137
- });
1138
- ImageCarouselComponent.prototype.ngOnInit = function () {
1139
- };
1140
- ImageCarouselComponent.prototype.ngOnDestroy = function () {
1141
- this.carousel = undefined;
1142
- this._subs.forEach(function (s) { return s.unsubscribe(); });
1143
- };
1144
- ImageCarouselComponent.prototype.handleThumbClick = function (index) {
1145
- this.currentIndex = index;
1146
- };
1147
- ImageCarouselComponent.prototype.onForceRenderImage = function () {
1148
- this._appEventService.onForceRenderImage.next();
1149
- };
1150
- ImageCarouselComponent.prototype.getImageSrc = function (image) {
1151
- var source = '';
1152
- if (image instanceof coDocument.CoDocument) {
1153
- if (image.filePath) {
1154
- source = image.filePath;
1155
- }
1156
- else {
1157
- source = image.documentBodyAsDataUri;
1158
- }
1159
- }
1160
- else if (image.detail !== undefined) {
1161
- source = image.detail;
1162
- }
1163
- return this._domSanitizer.bypassSecurityTrustUrl(source);
1164
- };
1165
- ImageCarouselComponent.prototype._loadImages = function () {
1166
- var _this = this;
1167
- if (this._images) {
1168
- this._images.forEach(function (i) {
1169
- if (!i.documentBody && !i.filePath) {
1170
- _this._ione.getDocumentContent(i.documentId, false).then(function (content) {
1171
- if (content) {
1172
- i.documentBody = content.documentContent;
1173
- }
1174
- });
1175
- }
1176
- });
1177
- }
1178
- };
1179
- ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
1180
- if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
1181
- var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
1182
- if (this.carousel && this.carousel.nativeElement) {
1183
- this.carousel.nativeElement.scrollLeft = movePx;
1184
- // this.carousel.nativeElement.scrollTo({
1185
- // left: movePx,
1186
- // behavior: 'smooth'
1187
- // });
1188
- }
1189
- }
1190
- };
1191
- ImageCarouselComponent.ctorParameters = function () { return [
1192
- { type: ProductConnectorService },
1193
- { type: ProductEventService },
1194
- { type: core.ChangeDetectorRef },
1195
- { type: platformBrowser.DomSanitizer },
1196
- { type: IconCacheService }
1197
- ]; };
1198
- __decorate([
1199
- core.ViewChild('carousel', { read: core.ElementRef })
1200
- ], ImageCarouselComponent.prototype, "carousel", void 0);
1201
- __decorate([
1202
- core.Input()
1203
- ], ImageCarouselComponent.prototype, "showRefresh", void 0);
1204
- __decorate([
1205
- core.Input()
1206
- ], ImageCarouselComponent.prototype, "images", null);
1207
- __decorate([
1208
- core.HostListener('window:resize')
1209
- ], ImageCarouselComponent.prototype, "handleWindowResize", null);
1210
- __decorate([
1211
- core.HostListener('swipeleft')
1212
- ], ImageCarouselComponent.prototype, "gotoNextSlide", null);
1213
- __decorate([
1214
- core.HostListener('swiperight')
1215
- ], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
1216
- __decorate([
1217
- core.HostBinding('class.resizing')
1218
- ], ImageCarouselComponent.prototype, "resizing", void 0);
1219
- ImageCarouselComponent = __decorate([
1220
- core.Component({
1221
- selector: 'app-image-carousel',
1222
- template: "<div id=\"product_page_carousel\">\n <div id=\"product_page_carousel_items\">\n <co-loader [isShown]=\"showLoader\"></co-loader>\n <div #carousel class=\"inner-carousel\">\n <!-- This has been taken out of the for loop to prevent flashing images when updating. -->\n <div *ngIf=\"images[0]\" class=\"carousel-item\" [id]=\"'slide-0'\" [class.active]=\"isCurrentIndex(0)\">\n <img [src]=\"getImageSrc(images[0])\">\n </div>\n <div *ngFor=\"let image of images.slice(1); let index = index\" class=\"carousel-item\" [id]=\"'slide-' + (index + 1)\" [class.active]=\"isCurrentIndex((index + 1))\">\n <img [src]=\"getImageSrc(image)\">\n </div>\n <div class=\"carousel-scroller-layer\" *ngIf=\"images && images.length > 1\">\n <div class=\"carousel-item-scroller prev\" (click)=\"gotoPrevSlide()\" *ngIf=\"currentIndex > 0\"></div>\n <div class=\"carousel-item-scroller next\" (click)=\"gotoNextSlide()\" *ngIf=\"currentIndex < images.length - 1\"></div>\n </div>\n </div>\n <co-icon class=\"selector-type-icon refresh-button\" [iconData]=\"iconCache.getIcon(icons.Refresh)\" (click)=\"onForceRenderImage()\" [class.loading]=\"showLoader\" *ngIf=\"showRefresh\"></co-icon>\n </div>\n\n <div id=\"product_page_carousel_thumbs\">\n <co-scroll-container class=\"scroll-container\" *ngIf=\"images && images.length > 1\">\n <div *ngFor=\"let image of images; let index = index\" class=\"carousel-thumb\" [class.active]=\"index === currentIndex\">\n <img [src]=\"getImageSrc(image)\" (click)=\"handleThumbClick(index)\"/>\n </div>\n </co-scroll-container>\n </div>\n</div>\n",
1223
- styles: [":host{max-height:540px;height:100%;position:relative}:host:not(.resizing) .inner-carousel{scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}#product_page_carousel{position:relative}#product_page_carousel .refresh-button{position:absolute;bottom:10px;right:10px;background:#fff}#product_page_carousel .refresh-button.loading{-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}#product_page_carousel .refresh-button:hover{box-shadow:none;background:#74b77f;transition:.2s ease-in-out}#product_page_carousel .refresh-button:hover ::ng-deep svg path{fill:#fff!important}#product_page_carousel #product_page_carousel_items{position:relative;margin-bottom:10px}#product_page_carousel #product_page_carousel_items ::ng-deep co-loader{position:absolute}#product_page_carousel .inner-carousel{display:flex;flex-direction:row;align-items:center;overflow:hidden;max-height:500px;border:1px solid #efefef}#product_page_carousel .carousel-item{max-height:500px;width:100%;display:flex;flex-shrink:0;flex-grow:0}#product_page_carousel .carousel-item img{width:100%;height:auto;-o-object-fit:contain;object-fit:contain}#product_page_carousel .carousel-scroller-layer{height:100%;width:100%;position:absolute;pointer-events:none;top:0;left:0}#product_page_carousel #product_page_carousel_thumbs{display:flex;justify-content:flex-start;height:80px;margin-left:auto;margin-right:auto}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container{padding:0 22px}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container .content-wrapper{padding:0}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb{opacity:1;cursor:pointer;transition:.2s;padding:4px;border:1px solid #f6f5f4}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb.active,#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:hover{border-color:#22313c}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:not(:last-child){margin-right:10px}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb img{height:68px}@media screen and (max-width:650px){#product_page_carousel_thumbs{height:57px!important}#product_page_carousel_thumbs .carousel-thumb img{height:50px!important}}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]
1224
- })
1225
- ], ImageCarouselComponent);
1226
- return ImageCarouselComponent;
1227
- }());
1228
-
1229
- var StockAndDelivery = /** @class */ (function () {
1230
- function StockAndDelivery(stock, deliveryDescription) {
1231
- this.stock = 0;
1232
- this.stock = stock;
1233
- this.deliveryDescription = deliveryDescription;
1234
- }
1235
- return StockAndDelivery;
1236
- }());
1237
-
1238
- var SelectorType;
1239
- (function (SelectorType) {
1240
- SelectorType["TwoD"] = "2D";
1241
- SelectorType["ThreeD"] = "3D";
1242
- SelectorType["Omni"] = "Omni";
1243
- })(SelectorType || (SelectorType = {}));
1244
-
1245
- var ProductPageComponent = /** @class */ (function () {
1246
- function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
1247
- var _this = this;
1248
- this._ione = _ione;
1249
- this._renderer = _renderer;
1250
- this._changeDetector = _changeDetector;
1251
- this.iconCache = iconCache;
1252
- this.settingsService = settingsService;
1253
- this.appEventService = appEventService;
1254
- this.icon = IconEnum;
1255
- this.configurable = false;
1256
- this.threeD = false;
1257
- this.show2D = true;
1258
- this.show3D = false;
1259
- this.configuring = false;
1260
- this.fullscreenAnimationEnd = false;
1261
- this.settingsLoaded = false;
1262
- this._fullScreen = false;
1263
- this._subs = [];
1264
- this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
1265
- if (_this.selections.nativeElement) {
1266
- _this.selections.nativeElement.forceRenderImage();
1267
- }
1268
- }), this.settingsService.settingsLoaded.subscribe(function (loaded) {
1269
- _this.settingsLoaded = loaded;
1270
- }));
1271
- }
1272
- Object.defineProperty(ProductPageComponent.prototype, "sku", {
1413
+ Object.defineProperty(ProductPageComponent.prototype, "settings", {
1273
1414
  get: function () {
1274
- return this._sku;
1415
+ return this._settings;
1275
1416
  },
1276
1417
  set: function (value) {
1277
1418
  if (value) {
1278
- if (this.configuring) {
1279
- this.show3D = false;
1280
- this.fullScreen = false;
1281
- this.configuring = false;
1282
- this._changeDetector.detectChanges();
1419
+ if (typeof value === 'string') {
1420
+ this._settings = JSON.parse(value);
1421
+ }
1422
+ else {
1423
+ this._settings = value;
1283
1424
  }
1284
- this._sku = value;
1285
- this._getArticle();
1286
1425
  }
1287
1426
  },
1288
1427
  enumerable: true,
@@ -1324,6 +1463,13 @@
1324
1463
  configurable: true
1325
1464
  });
1326
1465
  ProductPageComponent.prototype.ngOnInit = function () {
1466
+ if (this._settings) {
1467
+ this.settingsService.settings = undefined;
1468
+ this.settingsService.createSettingsFromObject(this._settings);
1469
+ }
1470
+ else {
1471
+ this._settings = this.settingsService.settings;
1472
+ }
1327
1473
  };
1328
1474
  ProductPageComponent.prototype.ngAfterViewInit = function () {
1329
1475
  };
@@ -1348,6 +1494,11 @@
1348
1494
  ProductPageComponent.prototype.showFullScreen = function () {
1349
1495
  this.fullScreen = !this.fullScreen;
1350
1496
  };
1497
+ ProductPageComponent.prototype._handleSettingsLoaded = function (loaded) {
1498
+ if (loaded) {
1499
+ this._ione.initConnection();
1500
+ }
1501
+ };
1351
1502
  ProductPageComponent.prototype._getArticle = function () {
1352
1503
  return __awaiter(this, void 0, void 0, function () {
1353
1504
  var _this = this;
@@ -1361,18 +1512,20 @@
1361
1512
  if (init) {
1362
1513
  this._ione.getFullArticle(this._sku).then(function (article) {
1363
1514
  _this.article = article;
1364
- _this.configurable = _this.article.goodType === 'B';
1365
- if (_this.configurable) {
1366
- _this.currentView = SelectorType.TwoD;
1367
- }
1368
- _this.threeD = _this.article.is3D;
1369
- _this.selectorType = _this.article.selectorTypeCustomer;
1370
- _this._ione.getDeliveryPrognosis(_this.article.goodId).then(function (stockInfo) {
1371
- var stockAndDelivery = stockInfo;
1372
- _this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
1515
+ if (_this.article) {
1516
+ _this.configurable = _this.article.goodType === 'B';
1517
+ if (_this.configurable) {
1518
+ _this.currentView = SelectorType.TwoD;
1519
+ }
1520
+ _this.threeD = _this.article.is3D;
1521
+ _this.selectorType = _this.article.selectorTypeCustomer;
1522
+ _this._ione.getDeliveryPrognosis(_this.article.goodId).then(function (stockInfo) {
1523
+ var stockAndDelivery = stockInfo;
1524
+ _this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
1525
+ _this._changeDetector.detectChanges();
1526
+ });
1373
1527
  _this._changeDetector.detectChanges();
1374
- });
1375
- _this._changeDetector.detectChanges();
1528
+ }
1376
1529
  });
1377
1530
  }
1378
1531
  return [2 /*return*/];
@@ -1402,10 +1555,13 @@
1402
1555
  __decorate([
1403
1556
  core.Input()
1404
1557
  ], ProductPageComponent.prototype, "sku", null);
1558
+ __decorate([
1559
+ core.Input()
1560
+ ], ProductPageComponent.prototype, "settings", null);
1405
1561
  ProductPageComponent = __decorate([
1406
1562
  core.Component({
1407
1563
  selector: 'app-product-page',
1408
- template: "<div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n <app-image-carousel [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\" [images]=\"article?.images\" [showRefresh]=\"configurable && threeD\"></app-image-carousel>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-configurator #configurator class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n ></threed-configurator>\r\n </ng-container>\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\" [class.show-selections]=\"configuring\" [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settingsService.settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"1\" [label]=\"'RELATED_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"4\" [isSmallModus]=\"false\" [label]=\"'ALTERNATIVE_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
1564
+ template: "<ng-container *ngIf=\"settingsLoaded\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n <app-image-carousel [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\" [images]=\"article?.images\" [showRefresh]=\"configurable && threeD\"></app-image-carousel>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-configurator #configurator class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n ></threed-configurator>\r\n </ng-container>\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\" [class.show-selections]=\"configuring\" [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"1\" [label]=\"'RELATED_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"4\" [isSmallModus]=\"false\" [label]=\"'ALTERNATIVE_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n",
1409
1565
  animations: [
1410
1566
  animations.trigger('toggleFullScreen', [
1411
1567
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
@@ -1444,203 +1600,231 @@
1444
1600
  return ProductPageComponent;
1445
1601
  }());
1446
1602
 
1447
- var ProductDocumentsComponent = /** @class */ (function () {
1448
- function ProductDocumentsComponent(iconCache) {
1449
- this.iconCache = iconCache;
1450
- this.icon = IconEnum;
1451
- this.showLabel = false;
1452
- this.documents = [];
1603
+ var ProductSelectorTypeComponent = /** @class */ (function () {
1604
+ function ProductSelectorTypeComponent(_iconCache, _changeDetector) {
1605
+ this._iconCache = _iconCache;
1606
+ this._changeDetector = _changeDetector;
1607
+ this.type = SelectorType;
1608
+ this.icons = IconEnum;
1609
+ this.onIconClick = new core.EventEmitter();
1610
+ this.currentTypeChange = new core.EventEmitter();
1611
+ this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
1612
+ this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
1453
1613
  }
1454
- ProductDocumentsComponent.ctorParameters = function () { return [
1455
- { type: IconCacheService }
1614
+ ProductSelectorTypeComponent.prototype.ngOnInit = function () {
1615
+ };
1616
+ ProductSelectorTypeComponent.prototype.handleIconClick = function (type) {
1617
+ this.currentType = type;
1618
+ this.currentTypeChange.next(this.currentType);
1619
+ this.onIconClick.next(this.currentType);
1620
+ this._changeDetector.detectChanges();
1621
+ };
1622
+ ProductSelectorTypeComponent.ctorParameters = function () { return [
1623
+ { type: IconCacheService },
1624
+ { type: core.ChangeDetectorRef }
1456
1625
  ]; };
1457
1626
  __decorate([
1458
1627
  core.Input()
1459
- ], ProductDocumentsComponent.prototype, "showLabel", void 0);
1628
+ ], ProductSelectorTypeComponent.prototype, "show2D", void 0);
1460
1629
  __decorate([
1461
1630
  core.Input()
1462
- ], ProductDocumentsComponent.prototype, "documents", void 0);
1463
- ProductDocumentsComponent = __decorate([
1631
+ ], ProductSelectorTypeComponent.prototype, "show3D", void 0);
1632
+ __decorate([
1633
+ core.Input()
1634
+ ], ProductSelectorTypeComponent.prototype, "currentType", void 0);
1635
+ __decorate([
1636
+ core.Output()
1637
+ ], ProductSelectorTypeComponent.prototype, "onIconClick", void 0);
1638
+ __decorate([
1639
+ core.Output()
1640
+ ], ProductSelectorTypeComponent.prototype, "currentTypeChange", void 0);
1641
+ ProductSelectorTypeComponent = __decorate([
1464
1642
  core.Component({
1465
- selector: 'app-product-documents',
1466
- template: "<app-header *ngIf=\"showLabel\" [label]=\"'DOCUMENTS' | localize\" [amount]=\"documents?.length\"></app-header>\n<div *ngIf=\"documents && documents.length > 0\">\n <co-files-upload [documents]=\"documents\" [canAdd]=\"false\" readonly></co-files-upload>\n</div>\n",
1467
- styles: [":host{display:block}::ng-deep co-files-upload{flex-direction:column!important;width:100%}::ng-deep co-file-upload{margin:0!important;border-bottom:1px solid #f6f5f4}::ng-deep co-file-upload:first-child{border-top:1px solid #f6f5f4}::ng-deep co-files-upload .files-upload-wrapper{flex-direction:column!important;width:100%}::ng-deep co-file-upload co-tile{max-width:100%!important;width:100%;position:relative}::ng-deep co-file-upload co-tile:hover{box-shadow:none!important}::ng-deep co-file-upload co-tile:hover .tile-extra-bottom{background-color:#f6f5f4!important}::ng-deep co-file-upload co-tile .tile-wrapper{position:absolute!important;left:0;top:0;width:100%;height:100%;z-index:2;opacity:0;box-sizing:border-box}::ng-deep co-file-upload co-tile .tile-wrapper .image{position:absolute!important;left:0;top:0;width:100%!important;height:100%!important;cursor:pointer}::ng-deep co-file-upload co-tile .tile-extra-bottom{outline:0!important;border:none!important;background:url(../../../assets/icons/download.svg) left 6px center/36px auto no-repeat!important;line-height:20px;padding:20px 20px 20px 60px!important;margin:0!important}::ng-deep co-file-upload co-tile .tile-extra-bottom .main{padding:0!important}"]
1643
+ selector: 'app-product-selector-type',
1644
+ template: "<div *ngIf=\"show2D || show3D\" class=\"show-in\" [textContent]=\"'SHOW_IN' | localize\"></div>\n<co-icon *ngIf=\"show2D\" class=\"selector-type-icon\"\n [class.active]=\"currentType === type.TwoD\"\n [iconData]=\"twoDIcon\"\n (click)=\"handleIconClick(type.TwoD)\"\n></co-icon>\n<co-icon *ngIf=\"show3D\" class=\"selector-type-icon\"\n [class.active]=\"currentType === type.ThreeD\"\n [iconData]=\"threeDIcon\"\n (click)=\"handleIconClick(type.ThreeD)\"\n></co-icon>\n",
1645
+ styles: [":host{display:flex;flex-direction:row;align-items:center}:host .show-in{display:none}:host>:not(:last-child){margin-right:10px}::ng-deep co-icon.selector-type-icon{box-shadow:inset 0 0 0 1px #22313c;border-radius:50%;background:0 0;height:34px;width:34px;cursor:pointer}::ng-deep co-icon.selector-type-icon.active{box-shadow:none;background:#74b77f;transition:.2s ease-in-out}::ng-deep co-icon.selector-type-icon.active [fill]{fill:#fff}"]
1468
1646
  })
1469
- ], ProductDocumentsComponent);
1470
- return ProductDocumentsComponent;
1647
+ ], ProductSelectorTypeComponent);
1648
+ return ProductSelectorTypeComponent;
1471
1649
  }());
1472
1650
 
1473
- var ProductRelatedComponent = /** @class */ (function () {
1474
- function ProductRelatedComponent(_iOne, _appEventService) {
1475
- this._iOne = _iOne;
1476
- this._appEventService = _appEventService;
1477
- this.isSmallModus = true;
1478
- this._articles = [];
1651
+ var ImageCarouselComponent = /** @class */ (function () {
1652
+ function ImageCarouselComponent(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
1653
+ var _this = this;
1654
+ this._ione = _ione;
1655
+ this._appEventService = _appEventService;
1656
+ this._changeDetector = _changeDetector;
1657
+ this._domSanitizer = _domSanitizer;
1658
+ this.iconCache = iconCache;
1659
+ this.icons = IconEnum;
1660
+ this.showLoader = false;
1661
+ this.showRefresh = false;
1662
+ this.resizing = false;
1663
+ this._currentIndex = 0;
1664
+ this._images = [];
1665
+ this._subs = [];
1666
+ this._subs.push(this._appEventService.onRenderStarted.subscribe(function () {
1667
+ _this.showLoader = true;
1668
+ }), this._appEventService.onDraftRenderImageReceived.subscribe(function (url) {
1669
+ if (_this._images[0] instanceof coDocument.CoDocument) {
1670
+ _this._images.unshift(url);
1671
+ }
1672
+ else {
1673
+ _this._images[0] = url;
1674
+ }
1675
+ _this.showLoader = false;
1676
+ }));
1479
1677
  }
1480
- Object.defineProperty(ProductRelatedComponent.prototype, "articles", {
1678
+ Object.defineProperty(ImageCarouselComponent.prototype, "images", {
1481
1679
  get: function () {
1482
- return this._articles;
1680
+ return this._images;
1483
1681
  },
1484
1682
  set: function (value) {
1485
- var _this = this;
1486
- if (value) {
1487
- if (this.refType && this.refType !== undefined) {
1488
- if (value.length > 0) {
1489
- value.forEach(function (x) {
1490
- if (x.refType === _this.refType) {
1491
- _this._articles.push(x);
1492
- }
1493
- });
1494
- }
1495
- }
1496
- else {
1497
- this._articles = value;
1498
- }
1683
+ if (value && value.length > 0) {
1684
+ this._images = value;
1499
1685
  this._loadImages();
1686
+ this._changeDetector.detectChanges();
1500
1687
  }
1501
1688
  },
1502
1689
  enumerable: true,
1503
1690
  configurable: true
1504
1691
  });
1505
- ProductRelatedComponent.prototype.handleContentClick = function (article) {
1506
- this._appEventService.onAlternativeClick.next(article);
1692
+ ImageCarouselComponent.prototype.handleWindowResize = function () {
1693
+ var _this = this;
1694
+ this.resizing = true;
1695
+ this._scrollCarouselToIndex();
1696
+ clearTimeout(this._resizeTimer);
1697
+ this._resizeTimer = setTimeout(function () {
1698
+ _this.resizing = false;
1699
+ }, 200);
1507
1700
  };
1508
- ProductRelatedComponent.prototype._loadImages = function () {
1701
+ ImageCarouselComponent.prototype.gotoNextSlide = function () {
1702
+ this.currentIndex++;
1703
+ };
1704
+ ImageCarouselComponent.prototype.gotoPrevSlide = function () {
1705
+ this.currentIndex--;
1706
+ };
1707
+ ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
1708
+ return this.currentIndex === index;
1709
+ };
1710
+ Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
1711
+ get: function () {
1712
+ return this._currentIndex;
1713
+ },
1714
+ set: function (value) {
1715
+ this._currentIndex = value;
1716
+ this._scrollCarouselToIndex();
1717
+ },
1718
+ enumerable: true,
1719
+ configurable: true
1720
+ });
1721
+ ImageCarouselComponent.prototype.ngOnInit = function () {
1722
+ };
1723
+ ImageCarouselComponent.prototype.ngOnDestroy = function () {
1724
+ this.carousel = undefined;
1725
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
1726
+ };
1727
+ ImageCarouselComponent.prototype.handleThumbClick = function (index) {
1728
+ this.currentIndex = index;
1729
+ };
1730
+ ImageCarouselComponent.prototype.onForceRenderImage = function () {
1731
+ this._appEventService.onForceRenderImage.next();
1732
+ };
1733
+ ImageCarouselComponent.prototype.getImageSrc = function (image) {
1734
+ var source = '';
1735
+ if (image instanceof coDocument.CoDocument) {
1736
+ if (image.filePath) {
1737
+ source = image.filePath;
1738
+ }
1739
+ else {
1740
+ source = image.documentBodyAsDataUri;
1741
+ }
1742
+ }
1743
+ else if (image.detail !== undefined) {
1744
+ source = image.detail;
1745
+ }
1746
+ return this._domSanitizer.bypassSecurityTrustUrl(source);
1747
+ };
1748
+ ImageCarouselComponent.prototype._loadImages = function () {
1509
1749
  var _this = this;
1510
- this._articles.forEach(function (a) {
1511
- if (!a.image.documentBody) {
1512
- _this._iOne.getDocumentContent(a.image.documentId).then(function (content) {
1513
- if (content) {
1514
- a.image.documentBody = content.documentContent;
1515
- }
1516
- });
1750
+ if (this._images) {
1751
+ this._images.forEach(function (i) {
1752
+ if (!i.documentBody && !i.filePath) {
1753
+ _this._ione.getDocumentContent(i.documentId, false).then(function (content) {
1754
+ if (content) {
1755
+ i.documentBody = content.documentContent;
1756
+ }
1757
+ });
1758
+ }
1759
+ });
1760
+ }
1761
+ };
1762
+ ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
1763
+ if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
1764
+ var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
1765
+ if (this.carousel && this.carousel.nativeElement) {
1766
+ this.carousel.nativeElement.scrollLeft = movePx;
1767
+ // this.carousel.nativeElement.scrollTo({
1768
+ // left: movePx,
1769
+ // behavior: 'smooth'
1770
+ // });
1517
1771
  }
1518
- });
1772
+ }
1519
1773
  };
1520
- ProductRelatedComponent.ctorParameters = function () { return [
1774
+ ImageCarouselComponent.ctorParameters = function () { return [
1521
1775
  { type: ProductConnectorService },
1522
- { type: ProductEventService }
1776
+ { type: ProductEventService },
1777
+ { type: core.ChangeDetectorRef },
1778
+ { type: platformBrowser.DomSanitizer },
1779
+ { type: IconCacheService }
1523
1780
  ]; };
1524
1781
  __decorate([
1525
- core.Input()
1526
- ], ProductRelatedComponent.prototype, "refType", void 0);
1782
+ core.ViewChild('carousel', { read: core.ElementRef })
1783
+ ], ImageCarouselComponent.prototype, "carousel", void 0);
1527
1784
  __decorate([
1528
1785
  core.Input()
1529
- ], ProductRelatedComponent.prototype, "label", void 0);
1786
+ ], ImageCarouselComponent.prototype, "showRefresh", void 0);
1530
1787
  __decorate([
1531
1788
  core.Input()
1532
- ], ProductRelatedComponent.prototype, "isSmallModus", void 0);
1789
+ ], ImageCarouselComponent.prototype, "images", null);
1533
1790
  __decorate([
1534
- core.Input()
1535
- ], ProductRelatedComponent.prototype, "articles", null);
1536
- ProductRelatedComponent = __decorate([
1537
- core.Component({
1538
- selector: 'app-product-related',
1539
- template: "<div *ngIf=\"articles && articles.length > 0\">\n <app-header [label]=\"label\" [amount]=\"articles?.length\" *ngIf=\"label\"></app-header>\n <co-scroll-container>\n <div class=\"article-wrapper\" *ngFor=\"let article of articles\">\n <co-article-tile\n [imageData]=\"article.image.documentBodyAsDataUri\"\n [description]=\"article.description\"\n [price]=\"article.price\"\n [level]=\"article.stockStatus\"\n [isSmallModus]=\"isSmallModus\"\n [hasConfigureButton]=\"article.goodType === 'B'\"\n (contentClick)=\"handleContentClick(article)\"\n ></co-article-tile>\n </div>\n </co-scroll-container>\n</div>\n",
1540
- styles: [":host{display:block}.article-wrapper{display:flex;flex-direction:row}.article-wrapper ::ng-deep co-tile.small{min-width:189px;max-width:189px;height:100%}.article-wrapper ::ng-deep co-tile.small:hover{box-shadow:none;cursor:pointer}.article-wrapper ::ng-deep co-tile.small:hover .tile-bottom .left-buttons{margin:0!important}.article-wrapper ::ng-deep co-tile.small .tile-wrapper{outline:0!important;padding-bottom:0;overflow:hidden}.article-wrapper ::ng-deep co-tile.small .tile-wrapper div.image{height:100px}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons{position:absolute;top:0;right:0;margin:0 -32px 0 0;align-items:flex-end;transition:.2s ease-in-out}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons ::ng-deep co-button.card-button.mini{width:30px;height:30px;transform:none;border-radius:4px;margin:0 0 5px}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons ::ng-deep co-button.card-button.mini ::ng-deep co-icon{width:30px;height:30px}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom{outline:0!important;background:0 0!important}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom .price{color:#74b77f;margin:5px 0 0;font-weight:400;font-size:12px}"]
1541
- })
1542
- ], ProductRelatedComponent);
1543
- return ProductRelatedComponent;
1544
- }());
1545
-
1546
- var HeaderComponent = /** @class */ (function () {
1547
- function HeaderComponent() {
1548
- }
1549
- HeaderComponent.prototype.ngOnInit = function () {
1550
- };
1791
+ core.HostListener('window:resize')
1792
+ ], ImageCarouselComponent.prototype, "handleWindowResize", null);
1551
1793
  __decorate([
1552
- core.Input()
1553
- ], HeaderComponent.prototype, "label", void 0);
1794
+ core.HostListener('swipeleft')
1795
+ ], ImageCarouselComponent.prototype, "gotoNextSlide", null);
1554
1796
  __decorate([
1555
- core.Input()
1556
- ], HeaderComponent.prototype, "amount", void 0);
1557
- HeaderComponent = __decorate([
1797
+ core.HostListener('swiperight')
1798
+ ], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
1799
+ __decorate([
1800
+ core.HostBinding('class.resizing')
1801
+ ], ImageCarouselComponent.prototype, "resizing", void 0);
1802
+ ImageCarouselComponent = __decorate([
1558
1803
  core.Component({
1559
- selector: 'app-header',
1560
- template: "<ng-container *ngIf=\"label\">\n <div class=\"header-wrapper\">\n <h3 [textContent]=\"label\"></h3>\n <span *ngIf=\"amount\" class=\"amount\" [textContent]=\"'(' + amount + ')'\"></span>\n </div>\n</ng-container>\n",
1561
- styles: [".header-wrapper{display:flex;flex-direction:row;align-items:center}.header-wrapper .amount{margin-left:5px}"]
1804
+ selector: 'app-image-carousel',
1805
+ template: "<div id=\"product_page_carousel\">\n <div id=\"product_page_carousel_items\">\n <co-loader [isShown]=\"showLoader\"></co-loader>\n <div #carousel class=\"inner-carousel\">\n <!-- This has been taken out of the for loop to prevent flashing images when updating. -->\n <div *ngIf=\"images[0]\" class=\"carousel-item\" [id]=\"'slide-0'\" [class.active]=\"isCurrentIndex(0)\">\n <img [src]=\"getImageSrc(images[0])\">\n </div>\n <div *ngFor=\"let image of images.slice(1); let index = index\" class=\"carousel-item\" [id]=\"'slide-' + (index + 1)\" [class.active]=\"isCurrentIndex((index + 1))\">\n <img [src]=\"getImageSrc(image)\">\n </div>\n <div class=\"carousel-scroller-layer\" *ngIf=\"images && images.length > 1\">\n <div class=\"carousel-item-scroller prev\" (click)=\"gotoPrevSlide()\" *ngIf=\"currentIndex > 0\"></div>\n <div class=\"carousel-item-scroller next\" (click)=\"gotoNextSlide()\" *ngIf=\"currentIndex < images.length - 1\"></div>\n </div>\n </div>\n <co-icon class=\"selector-type-icon refresh-button\" [iconData]=\"iconCache.getIcon(icons.Refresh)\" (click)=\"onForceRenderImage()\" [class.loading]=\"showLoader\" *ngIf=\"showRefresh\"></co-icon>\n </div>\n\n <div id=\"product_page_carousel_thumbs\">\n <co-scroll-container class=\"scroll-container\" *ngIf=\"images && images.length > 1\">\n <div *ngFor=\"let image of images; let index = index\" class=\"carousel-thumb\" [class.active]=\"index === currentIndex\">\n <img [src]=\"getImageSrc(image)\" (click)=\"handleThumbClick(index)\"/>\n </div>\n </co-scroll-container>\n </div>\n</div>\n",
1806
+ styles: [":host{max-height:540px;height:100%;position:relative}:host:not(.resizing) .inner-carousel{scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}#product_page_carousel{position:relative}#product_page_carousel .refresh-button{position:absolute;bottom:10px;right:10px;background:#fff}#product_page_carousel .refresh-button.loading{-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}#product_page_carousel .refresh-button:hover{box-shadow:none;background:#74b77f;transition:.2s ease-in-out}#product_page_carousel .refresh-button:hover ::ng-deep svg path{fill:#fff!important}#product_page_carousel #product_page_carousel_items{position:relative;margin-bottom:10px}#product_page_carousel #product_page_carousel_items ::ng-deep co-loader{position:absolute}#product_page_carousel .inner-carousel{display:flex;flex-direction:row;align-items:center;overflow:hidden;max-height:500px;border:1px solid #efefef}#product_page_carousel .carousel-item{max-height:500px;width:100%;display:flex;flex-shrink:0;flex-grow:0}#product_page_carousel .carousel-item img{width:100%;height:auto;-o-object-fit:contain;object-fit:contain}#product_page_carousel .carousel-scroller-layer{height:100%;width:100%;position:absolute;pointer-events:none;top:0;left:0}#product_page_carousel #product_page_carousel_thumbs{display:flex;justify-content:flex-start;height:80px;margin-left:auto;margin-right:auto}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container{padding:0 22px}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container .content-wrapper{padding:0}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb{opacity:1;cursor:pointer;transition:.2s;padding:4px;border:1px solid #f6f5f4}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb.active,#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:hover{border-color:#22313c}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:not(:last-child){margin-right:10px}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb img{height:68px}@media screen and (max-width:650px){#product_page_carousel_thumbs{height:57px!important}#product_page_carousel_thumbs .carousel-thumb img{height:50px!important}}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]
1562
1807
  })
1563
- ], HeaderComponent);
1564
- return HeaderComponent;
1808
+ ], ImageCarouselComponent);
1809
+ return ImageCarouselComponent;
1565
1810
  }());
1566
1811
 
1567
- var TabType;
1568
- (function (TabType) {
1569
- TabType["Additional"] = "additional";
1570
- TabType["Properties"] = "properties";
1571
- })(TabType || (TabType = {}));
1572
- var ProductInfoComponent = /** @class */ (function () {
1573
- function ProductInfoComponent() {
1574
- this.tabType = TabType;
1575
- this.currentTab = TabType.Additional;
1812
+ var ProductDescriptionComponent = /** @class */ (function () {
1813
+ function ProductDescriptionComponent() {
1576
1814
  }
1577
- ProductInfoComponent.prototype.ngOnInit = function () {
1578
- };
1579
- ProductInfoComponent.prototype.switchTab = function (tab) {
1580
- this.currentTab = tab;
1815
+ ProductDescriptionComponent.prototype.ngOnInit = function () {
1581
1816
  };
1582
1817
  __decorate([
1583
1818
  core.Input()
1584
- ], ProductInfoComponent.prototype, "article", void 0);
1585
- ProductInfoComponent = __decorate([
1819
+ ], ProductDescriptionComponent.prototype, "article", void 0);
1820
+ ProductDescriptionComponent = __decorate([
1586
1821
  core.Component({
1587
- selector: 'app-product-info',
1588
- template: "<div>\n <div class=\"info-wrapper\">\n <div class=\"info-navigation\">\n <span [textContent]=\"'ADDITIONAL_DATA' | localize\" class=\"navigator\" [class.selected]=\"currentTab === tabType.Additional\" (mouseup)=\"switchTab(tabType.Additional)\"></span>\n <span [textContent]=\"'PROPERTIES' | localize\" class=\"navigator\" [class.selected]=\"currentTab === tabType.Properties\" (mouseup)=\"switchTab(tabType.Properties)\"></span>\n </div>\n <ng-container [ngSwitch]=\"currentTab\" class=\"content\">\n <div *ngSwitchCase=\"tabType.Additional\" @showContent>\n <app-product-additional-info\n [article]=\"article\"\n ></app-product-additional-info>\n </div>\n <div *ngSwitchCase=\"tabType.Properties\" @showContent>\n <app-product-properties [article]=\"article\"></app-product-properties>\n </div>\n </ng-container>\n </div>\n</div>\n",
1589
- animations: [
1590
- animations.trigger('showContent', [
1591
- animations.state('void', animations.style({ 'opacity': '0' })),
1592
- animations.state('*', animations.style({ 'opacity': '1' })),
1593
- animations.transition('void => *', animations.animate('200ms 100ms ease-in-out')),
1594
- ])
1595
- ],
1596
- styles: [".info-navigation{margin:30px 0}.info-navigation .navigator:not(:last-child){margin-right:30px}.navigator{font-size:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.navigator.selected{color:#2b60a7}"]
1597
- })
1598
- ], ProductInfoComponent);
1599
- return ProductInfoComponent;
1600
- }());
1601
-
1602
- var ProductModuleService = /** @class */ (function () {
1603
- function ProductModuleService(_iOneConnectorService) {
1604
- this._iOneConnectorService = _iOneConnectorService;
1605
- this._superArticles = new Map();
1606
- }
1607
- ProductModuleService.prototype.getArticle = function (id) {
1608
- return __awaiter(this, void 0, void 0, function () {
1609
- return __generator(this, function (_a) {
1610
- switch (_a.label) {
1611
- case 0: return [4 /*yield*/, this._getArticle(id)];
1612
- case 1: return [2 /*return*/, _a.sent()];
1613
- }
1614
- });
1615
- });
1616
- };
1617
- ProductModuleService.prototype._getArticle = function (id) {
1618
- return __awaiter(this, void 0, void 0, function () {
1619
- var mainArticle;
1620
- return __generator(this, function (_a) {
1621
- switch (_a.label) {
1622
- case 0:
1623
- if (!this._superArticles.has(id)) return [3 /*break*/, 1];
1624
- return [2 /*return*/, this._superArticles.get(id)];
1625
- case 1: return [4 /*yield*/, this._iOneConnectorService.getSuperArticle(id)];
1626
- case 2:
1627
- mainArticle = _a.sent();
1628
- this._superArticles.set(id, mainArticle);
1629
- return [2 /*return*/, mainArticle];
1630
- }
1631
- });
1632
- });
1633
- };
1634
- ProductModuleService.ctorParameters = function () { return [
1635
- { type: ProductConnectorService }
1636
- ]; };
1637
- ProductModuleService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(core.ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
1638
- ProductModuleService = __decorate([
1639
- core.Injectable({
1640
- providedIn: 'root'
1822
+ selector: 'app-product-description',
1823
+ template: "<div class=\"pd-title-wrapper\">\n <span class=\"pd-description\" [textContent]=\"article?.descriptionRetail\" *ngIf=\"article?.descriptionRetail\"></span>\n <span class=\"pd-sku\" [textContent]=\"article?.articleNr\" *ngIf=\"article?.articleNr\"></span>\n</div>\n",
1824
+ styles: [":host{display:block}.pd-title-wrapper{margin:20px 0 0}.pd-description{color:#22313c;font-size:25px;font-weight:700;width:100%;display:block}.pd-sku{color:#5b6875;font-size:16px}@media screen and (max-width:650px){.pd-description{font-size:21px}.pd-sku{font-size:13px}}"]
1641
1825
  })
1642
- ], ProductModuleService);
1643
- return ProductModuleService;
1826
+ ], ProductDescriptionComponent);
1827
+ return ProductDescriptionComponent;
1644
1828
  }());
1645
1829
 
1646
1830
  var BitUtils = /** @class */ (function () {
@@ -1664,416 +1848,151 @@
1664
1848
  return BitUtils;
1665
1849
  }());
1666
1850
 
1667
- var ProductAdditionalInfoComponent = /** @class */ (function () {
1668
- function ProductAdditionalInfoComponent(_sanitizer, _moduleService, _changeDetector) {
1669
- this._sanitizer = _sanitizer;
1670
- this._moduleService = _moduleService;
1671
- this._changeDetector = _changeDetector;
1672
- this.showLabel = false;
1673
- this.textParts = [];
1851
+ var ProductAdditionalDescriptionComponent = /** @class */ (function () {
1852
+ function ProductAdditionalDescriptionComponent(_appEventService) {
1853
+ this._appEventService = _appEventService;
1674
1854
  }
1675
- Object.defineProperty(ProductAdditionalInfoComponent.prototype, "article", {
1855
+ Object.defineProperty(ProductAdditionalDescriptionComponent.prototype, "article", {
1676
1856
  get: function () {
1677
1857
  return this._article;
1678
1858
  },
1679
1859
  set: function (value) {
1680
- var _this = this;
1681
- if (value) {
1682
- this._article = value;
1683
- this._buildInfo().then(function () {
1684
- _this._changeDetector.detectChanges();
1685
- });
1860
+ this._article = value;
1861
+ if (this._article) {
1862
+ this.description = this.article.additionalDescription;
1863
+ this._prepareDescription();
1686
1864
  }
1687
1865
  },
1688
1866
  enumerable: true,
1689
1867
  configurable: true
1690
1868
  });
1691
- ProductAdditionalInfoComponent.prototype.ngOnInit = function () {
1692
- };
1693
- ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
1694
- var _this = this;
1695
- return new Promise(function (resolve, reject) {
1696
- var texts = [];
1697
- if (_this.article.superArticleNr) {
1698
- _this._moduleService.getArticle(_this.article.superArticleNr).then(function (mainArticle) {
1699
- mainArticle.texts.forEach(function (txt) {
1700
- if (BitUtils.IsFullDescription(txt.publication)) {
1701
- var safeTxt = _this._sanitizer.sanitize(core.SecurityContext.HTML, txt.text);
1702
- texts.push(safeTxt);
1703
- }
1704
- });
1705
- resolve(texts);
1706
- }).catch(function () {
1707
- resolve([]);
1708
- });
1709
- }
1710
- else {
1711
- resolve(texts);
1712
- }
1713
- });
1869
+ ProductAdditionalDescriptionComponent.prototype.ngOnInit = function () {
1714
1870
  };
1715
- ProductAdditionalInfoComponent.prototype._prepareArticleTexts = function () {
1716
- return __awaiter(this, void 0, void 0, function () {
1717
- var texts;
1718
- var _a;
1719
- var _this = this;
1720
- return __generator(this, function (_b) {
1721
- switch (_b.label) {
1722
- case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
1723
- case 1:
1724
- texts = _b.sent();
1725
- if (texts.length > 0) {
1726
- (_a = this.textParts).push.apply(_a, __spread(texts));
1727
- }
1728
- if (this.article.texts) {
1729
- this.article.texts.forEach(function (txt) {
1730
- if (BitUtils.IsFullDescription(txt.publication)) {
1731
- var safeTxt = _this._sanitizer.sanitize(core.SecurityContext.HTML, txt.text);
1732
- _this.textParts.push(safeTxt);
1733
- }
1734
- });
1735
- }
1736
- return [2 /*return*/];
1737
- }
1738
- });
1739
- });
1871
+ ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
1872
+ this._appEventService.onUpdateProductInfoTab.next(0);
1740
1873
  };
1741
- ProductAdditionalInfoComponent.prototype._buildInfo = function () {
1742
- return __awaiter(this, void 0, void 0, function () {
1743
- return __generator(this, function (_a) {
1744
- switch (_a.label) {
1745
- case 0:
1746
- this.textParts.length = 0;
1747
- return [4 /*yield*/, this._prepareArticleTexts()];
1748
- case 1:
1749
- _a.sent();
1750
- if (this.textParts.length === 0) {
1751
- if (this.article.additionalDescription) {
1752
- this.textParts.push(this.article.additionalDescription);
1753
- }
1754
- else if (this.article.description) {
1755
- this.textParts.push(this.article.description);
1756
- }
1757
- }
1758
- return [2 /*return*/];
1874
+ ProductAdditionalDescriptionComponent.prototype._prepareDescription = function () {
1875
+ var _this = this;
1876
+ this.description = '';
1877
+ if (this.article.texts && this.article.texts.length > 0) {
1878
+ this.article.texts.forEach(function (txt) {
1879
+ if (BitUtils.IsShortDescription(txt.publication)) {
1880
+ _this.description += txt.text;
1759
1881
  }
1760
1882
  });
1761
- });
1883
+ this.description = this.description.replace(/<[^>]*>?/gm, '');
1884
+ if (this.description.length > 250) {
1885
+ this.description = this.description.substr(0, 250) + ' [..]';
1886
+ }
1887
+ }
1762
1888
  };
1763
- ProductAdditionalInfoComponent.ctorParameters = function () { return [
1764
- { type: platformBrowser.DomSanitizer },
1765
- { type: ProductModuleService },
1766
- { type: core.ChangeDetectorRef }
1889
+ ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
1890
+ { type: ProductEventService }
1767
1891
  ]; };
1768
1892
  __decorate([
1769
1893
  core.Input()
1770
- ], ProductAdditionalInfoComponent.prototype, "article", null);
1771
- __decorate([
1772
- core.Input()
1773
- ], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
1774
- ProductAdditionalInfoComponent = __decorate([
1894
+ ], ProductAdditionalDescriptionComponent.prototype, "article", null);
1895
+ ProductAdditionalDescriptionComponent = __decorate([
1775
1896
  core.Component({
1776
- selector: 'app-product-additional-info',
1777
- template: "<h3 *ngIf=\"showLabel\" [textContent]=\"'ADDITIONAL_DATA' | localize\"></h3>\n<ng-container *ngIf=\"textParts && textParts.length > 0\">\n <div class=\"additional-info-parts\" *ngFor=\"let text of textParts\" [innerHTML]=\"text\"></div>\n</ng-container>\n",
1778
- styles: [":host{display:block}:host .additional-info-parts{margin-bottom:20px;line-height:190%;color:#22313c;font-size:13px}:host ::ng-deep p{line-height:190%;margin:15px 0}:host ::ng-deep font{font-family:iOneMontserrat}:host .additional-info-parts>:first-child{margin-top:0}:host .additional-info-parts>:last-child{margin-bottom:0}"]
1897
+ selector: 'app-product-additional-description',
1898
+ template: "<ng-container *ngIf=\"description !== ''\">\n <div class=\"pd-additional-description\">\n <p [innerHTML]=\"description\"></p>\n <button class=\"pd-read-more-btn\" [textContent]=\"'READ_MORE' | localize\" (click)=\"onReadMore()\"></button>\n </div>\n</ng-container>\n",
1899
+ styles: [":host{display:block;padding-top:0!important}:host :focus{outline:0!important}:host .pd-additional-description{line-height:190%;color:#22313c;font-size:13px}:host .pd-read-more-btn{color:#2b60a7;border:none;background:0 0;cursor:pointer;text-decoration:underline;font-family:iOneMontserrat}:host .pd-read-more-btn:hover{color:#74b77f}@media screen and (max-width:650px){:host .pd-additional-description{font-size:12px}}"]
1779
1900
  })
1780
- ], ProductAdditionalInfoComponent);
1781
- return ProductAdditionalInfoComponent;
1901
+ ], ProductAdditionalDescriptionComponent);
1902
+ return ProductAdditionalDescriptionComponent;
1782
1903
  }());
1783
1904
 
1784
- var propertyMap = new Map([
1785
- ['articleNr', 'ARTICLE_NUMBER'],
1786
- ['catExtra', 'CATEGORY'],
1787
- ['catType', 'CATEGORY_TYPE'],
1788
- ['description', 'DESCRIPTION'],
1789
- ['material', 'MATERIAL'],
1790
- ['title', 'TITLE'],
1791
- ['turnOverGroup', 'TURNOVERGROUP'],
1792
- ['height', 'HEIGHT'],
1793
- ['width', 'WIDTH']
1794
- ]);
1795
- var ProductPropertiesComponent = /** @class */ (function () {
1796
- function ProductPropertiesComponent() {
1797
- this.showLabel = false;
1798
- this.properties = [];
1905
+ var ProductPriceComponent = /** @class */ (function () {
1906
+ function ProductPriceComponent(_changeDetector) {
1907
+ this._changeDetector = _changeDetector;
1908
+ this.showFromPrice = false;
1909
+ this._configurable = false;
1799
1910
  }
1800
- Object.defineProperty(ProductPropertiesComponent.prototype, "article", {
1911
+ Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
1801
1912
  get: function () {
1802
- return this._article;
1913
+ return this._pricing;
1803
1914
  },
1804
1915
  set: function (value) {
1805
- this._article = value;
1806
- this._prepareProperties();
1916
+ this._pricing = value;
1917
+ this._setPrices();
1807
1918
  },
1808
1919
  enumerable: true,
1809
1920
  configurable: true
1810
1921
  });
1811
- ProductPropertiesComponent.prototype.ngOnInit = function () {
1922
+ Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
1923
+ set: function (value) {
1924
+ this._configurable = value;
1925
+ this._setPrices();
1926
+ },
1927
+ enumerable: true,
1928
+ configurable: true
1929
+ });
1930
+ ProductPriceComponent.prototype.ngOnInit = function () {
1812
1931
  };
1813
- ProductPropertiesComponent.prototype._prepareProperties = function () {
1814
- var _this = this;
1815
- this.properties.length = 0;
1816
- if (!this._article) {
1817
- return;
1818
- }
1819
- propertyMap.forEach(function (value, key) {
1820
- if (_this.article.hasOwnProperty(key)) {
1821
- _this.properties.push({ key: value, value: _this.article[key] });
1932
+ ProductPriceComponent.prototype._setPrices = function () {
1933
+ if (this._pricing) {
1934
+ this.valutaSign = this._getSign(this._pricing.retailCurrency);
1935
+ if (this._configurable) {
1936
+ this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
1937
+ this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
1938
+ this.toPrice = undefined;
1822
1939
  }
1823
- });
1940
+ else {
1941
+ this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
1942
+ this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
1943
+ this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
1944
+ this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
1945
+ }
1946
+ this._changeDetector.detectChanges();
1947
+ }
1948
+ };
1949
+ ProductPriceComponent.prototype._getSign = function (currency) {
1950
+ switch (currency) {
1951
+ case 'EUR':
1952
+ return '€';
1953
+ default:
1954
+ return '€';
1955
+ }
1824
1956
  };
1957
+ ProductPriceComponent.ctorParameters = function () { return [
1958
+ { type: core.ChangeDetectorRef }
1959
+ ]; };
1825
1960
  __decorate([
1826
1961
  core.Input()
1827
- ], ProductPropertiesComponent.prototype, "article", null);
1962
+ ], ProductPriceComponent.prototype, "pricing", null);
1828
1963
  __decorate([
1829
1964
  core.Input()
1830
- ], ProductPropertiesComponent.prototype, "showLabel", void 0);
1831
- ProductPropertiesComponent = __decorate([
1965
+ ], ProductPriceComponent.prototype, "configurable", null);
1966
+ ProductPriceComponent = __decorate([
1832
1967
  core.Component({
1833
- selector: 'app-product-properties',
1834
- template: "<div class=\"article-properties-wrapper\">\n <h3 *ngIf=\"showLabel\" [textContent]=\"'PROPERTIES' | localize\"></h3>\n <ng-container *ngFor=\"let property of properties\">\n <div class=\"article-property\">\n <div class=\"article-property-key\" [textContent]=\"property.key | localize\"></div>\n <div class=\"article-property-value\" [textContent]=\"property.value\"></div>\n </div>\n </ng-container>\n</div>\n",
1835
- styles: [":host{display:block}.article-properties-wrapper{display:flex;flex-direction:column}.article-property{display:flex;flex-direction:row;border-bottom:1px solid #f6f5f4;padding:11px 0;font-size:13px}.article-property:first-child{border-top:1px solid #f6f5f4}.article-property-key{flex-basis:200px;flex-shrink:0;color:#5b6875}@media screen and (max-width:450px){.article-property-key{flex-basis:130px}}"]
1836
- })
1837
- ], ProductPropertiesComponent);
1838
- return ProductPropertiesComponent;
1839
- }());
1840
-
1841
- var LocalizePipe = /** @class */ (function () {
1842
- function LocalizePipe(_dictionaryService) {
1843
- this._dictionaryService = _dictionaryService;
1844
- }
1845
- LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
1846
- var _a;
1847
- if (upperCaseFirst === void 0) { upperCaseFirst = true; }
1848
- if (replace === void 0) { replace = []; }
1849
- if (!value) {
1850
- return '';
1851
- }
1852
- replace = replace ? replace : [];
1853
- if (!Array.isArray(replace)) {
1854
- replace = [replace];
1855
- }
1856
- return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
1857
- };
1858
- LocalizePipe.ctorParameters = function () { return [
1859
- { type: DictionaryService }
1860
- ]; };
1861
- LocalizePipe = __decorate([
1862
- core.Pipe({
1863
- name: 'localize'
1968
+ selector: 'app-product-price',
1969
+ template: "<div *ngIf=\"toPrice\">\n <div class=\"price-wrapper\" *ngIf=\"fromPrice > toPrice\">\n <div class=\"from-price-label\" [textContent]=\"fromLabel | localize\"></div>\n <div class=\"from-price\" [textContent]=\"fromPrice | priceDisplay\"></div>\n </div>\n <div class=\"price-wrapper\">\n <div class=\"to-price-label\" [textContent]=\"toLabel | localize\"></div>\n <div class=\"to-price\" [textContent]=\"toPrice | priceDisplay\"></div>\n </div>\n</div>\n",
1970
+ styles: [":host{display:flex;flex-direction:column}.price-wrapper{width:100%;font-size:15px;margin:0 0 5px;display:inline-block}.price-wrapper:last-child{margin:0}.from-price-label,.to-price-label{color:#5b6875;display:none}.from-price{font-size:16px;font-weight:700;text-decoration:line-through;color:#5b6875}.to-price{font-size:25px;font-weight:700;color:#74b77f}@media screen and (max-width:650px){.from-price{font-size:13px}.to-price{font-size:21px}}"]
1864
1971
  })
1865
- // A pipe for localizing string values in view templates.
1866
- ], LocalizePipe);
1867
- return LocalizePipe;
1972
+ ], ProductPriceComponent);
1973
+ return ProductPriceComponent;
1868
1974
  }());
1869
1975
 
1870
- var ProductDeliveryComponent = /** @class */ (function () {
1871
- function ProductDeliveryComponent(_localizePipe, _iOne, _iconCache) {
1872
- this._localizePipe = _localizePipe;
1873
- this._iOne = _iOne;
1874
- this._iconCache = _iconCache;
1976
+ var ProductAddtocartComponent = /** @class */ (function () {
1977
+ function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
1978
+ this.iconCache = iconCache;
1979
+ this._ioneControllerService = _ioneControllerService;
1980
+ this._appEventService = _appEventService;
1981
+ this._settingsService = _settingsService;
1875
1982
  this.icon = IconEnum;
1876
- this.iconData = this._iconCache.getIcon(this.icon.Truck);
1983
+ this.configurable = false;
1984
+ this.configuring = false;
1985
+ this.fullscreen = false;
1986
+ this.startConfiguration = new core.EventEmitter();
1987
+ this.addToCartClick = new core.EventEmitter();
1988
+ this.addToQuoteClick = new core.EventEmitter();
1989
+ this.showQuoteButton = false;
1990
+ this._quantity = 1;
1877
1991
  }
1878
- Object.defineProperty(ProductDeliveryComponent.prototype, "stockAndDelivery", {
1879
- set: function (value) {
1880
- if (value) {
1881
- this.deliveryDescription = value.deliveryDescription;
1882
- if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
1883
- this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
1884
- }
1885
- }
1886
- },
1887
- enumerable: true,
1888
- configurable: true
1889
- });
1890
- ProductDeliveryComponent.prototype.ngOnInit = function () {
1891
- };
1892
- ProductDeliveryComponent.ctorParameters = function () { return [
1893
- { type: LocalizePipe },
1894
- { type: ProductConnectorService },
1895
- { type: IconCacheService }
1896
- ]; };
1897
- __decorate([
1898
- core.Input()
1899
- ], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
1900
- ProductDeliveryComponent = __decorate([
1901
- core.Component({
1902
- selector: 'app-product-delivery',
1903
- template: "<!--<app-header [label]=\"'DELIVERY_TIME_PERIOD' | localize\"></app-header>-->\n<div class=\"product-delivery-wrapper\">\n <co-icon class=\"delivery-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-delivery-fields\">\n <div class=\"pp-default-label\" [textContent]=\"'DELIVERY_TIME_PERIOD' | localize\"></div>\n <div class=\"pp-default-description\" [textContent]=\"deliveryDescription | date:'dd MMMM yyyy'\"></div>\n </div>\n</div>\n",
1904
- providers: [LocalizePipe],
1905
- styles: [":host{display:block}.product-delivery-wrapper{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #f6f5f4;padding:20px 15px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:40px;height:37px}.product-delivery-wrapper .product-delivery-fields{display:flex;flex-direction:column}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:14px;margin:0}@media screen and (max-width:400px){.product-delivery-wrapper{padding:15px 0 15px 10px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:32px;height:28px}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:13px}}"]
1906
- })
1907
- ], ProductDeliveryComponent);
1908
- return ProductDeliveryComponent;
1909
- }());
1910
-
1911
- var ProductStockComponent = /** @class */ (function () {
1912
- function ProductStockComponent(_iOne, _iconCache) {
1913
- this._iOne = _iOne;
1914
- this._iconCache = _iconCache;
1915
- this.icon = IconEnum;
1916
- this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
1917
- }
1918
- Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
1919
- set: function (value) {
1920
- if (value) {
1921
- this.numberInStock = value.stock;
1922
- }
1923
- },
1924
- enumerable: true,
1925
- configurable: true
1926
- });
1927
- ProductStockComponent.prototype.ngOnInit = function () {
1928
- };
1929
- ProductStockComponent.ctorParameters = function () { return [
1930
- { type: ProductConnectorService },
1931
- { type: IconCacheService }
1932
- ]; };
1933
- __decorate([
1934
- core.Input()
1935
- ], ProductStockComponent.prototype, "stockAndDelivery", null);
1936
- ProductStockComponent = __decorate([
1937
- core.Component({
1938
- selector: 'app-product-stock',
1939
- template: "<!--<app-header [label]=\"'STOCK' | localize\"></app-header>-->\n<!--<co-level-indicator [model]=\"'medium'\"></co-level-indicator>-->\n<div class=\"product-stock-wrapper\">\n <co-icon class=\"stock-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-stock-fields\">\n <div class=\"pp-default-label in-stock\" [textContent]=\"'PRODUCT_IN_STOCK' | localize\" *ngIf=\"numberInStock > 0\"></div>\n <div class=\"pp-default-label not-in-stock\" [textContent]=\"'PRODUCT_NOT_IN_STOCK' | localize\" *ngIf=\"!(numberInStock > 0)\"></div>\n </div>\n</div>\n",
1940
- styles: [":host{display:block}.product-stock-wrapper{display:flex;flex-direction:row;align-items:center;border-top:1px solid #f6f5f4;border-bottom:1px solid #f6f5f4;padding:20px 15px}.product-stock-wrapper .stock-icon{margin:0 15px 0 0;width:40px;height:37px}.product-stock-wrapper .product-stock-fields{display:flex;flex-direction:row}.product-stock-wrapper .product-stock-fields .pp-default-label{font-size:14px;margin:0}.product-stock-wrapper .product-stock-fields .pp-default-label:after{content:\"\";width:10px;height:10px;border-radius:10px;background:#74b77f;display:inline-block;margin:0 0 0 15px}.product-stock-wrapper .product-stock-fields .pp-default-label.not-in-stock:after{background:#f15152}@media screen and (max-width:400px){.product-stock-wrapper{padding:15px 0 15px 10px}.product-stock-wrapper .stock-icon{margin:0 15px 0 0;width:32px;height:28px}.product-stock-wrapper .product-stock-fields .pp-default-label{font-size:13px}}"]
1941
- })
1942
- ], ProductStockComponent);
1943
- return ProductStockComponent;
1944
- }());
1945
-
1946
- var ProductSymbolsComponent = /** @class */ (function () {
1947
- function ProductSymbolsComponent() {
1948
- this.symbolStrings = [];
1949
- }
1950
- Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
1951
- get: function () {
1952
- return this._symbols;
1953
- },
1954
- set: function (value) {
1955
- this._symbols = value;
1956
- if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
1957
- this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
1958
- }
1959
- if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
1960
- for (var i = 0; i < this._symbols['symbolString'].length; i++) {
1961
- this.symbolStrings.push(this._symbols['symbolString'][i]);
1962
- }
1963
- }
1964
- },
1965
- enumerable: true,
1966
- configurable: true
1967
- });
1968
- ProductSymbolsComponent.prototype.ngOnInit = function () {
1969
- };
1970
- __decorate([
1971
- core.Input()
1972
- ], ProductSymbolsComponent.prototype, "symbols", null);
1973
- __decorate([
1974
- core.HostBinding('class')
1975
- ], ProductSymbolsComponent.prototype, "_className", void 0);
1976
- ProductSymbolsComponent = __decorate([
1977
- core.Component({
1978
- selector: 'app-product-symbols',
1979
- template: "<div *ngIf=\"symbols && symbols.length > 0\">\n <app-header [label]=\"'SYMBOLS' | localize\" [amount]=\"symbols?.length\"></app-header>\n <co-scroll-container>\n <co-tile small noImagePlaceholder *ngFor=\"let symbol of symbolStrings\">\n <ng-container tile-over-image>\n <div class=\"symbol\" [textContent]=\"symbol\"></div>\n </ng-container>\n <ng-container tile-extra-bottom-content>\n <div class=\"symbol-name\" [textContent]=\"'Wat moet hier?'\"></div>\n </ng-container>\n </co-tile>\n </co-scroll-container>\n</div>\n",
1980
- styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
1981
- })
1982
- ], ProductSymbolsComponent);
1983
- return ProductSymbolsComponent;
1984
- }());
1985
-
1986
- var ProductPriceComponent = /** @class */ (function () {
1987
- function ProductPriceComponent(_changeDetector) {
1988
- this._changeDetector = _changeDetector;
1989
- this.showFromPrice = false;
1990
- this._configurable = false;
1991
- }
1992
- Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
1993
- get: function () {
1994
- return this._pricing;
1995
- },
1996
- set: function (value) {
1997
- this._pricing = value;
1998
- this._setPrices();
1999
- },
2000
- enumerable: true,
2001
- configurable: true
2002
- });
2003
- Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
2004
- set: function (value) {
2005
- this._configurable = value;
2006
- this._setPrices();
2007
- },
2008
- enumerable: true,
2009
- configurable: true
2010
- });
2011
- ProductPriceComponent.prototype.ngOnInit = function () {
2012
- };
2013
- ProductPriceComponent.prototype._setPrices = function () {
2014
- if (this._pricing) {
2015
- this.valutaSign = this._getSign(this._pricing.retailCurrency);
2016
- if (this._configurable) {
2017
- this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
2018
- this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
2019
- this.toPrice = undefined;
2020
- }
2021
- else {
2022
- this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
2023
- this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
2024
- this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
2025
- this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
2026
- }
2027
- this._changeDetector.detectChanges();
2028
- }
2029
- };
2030
- ProductPriceComponent.prototype._getSign = function (currency) {
2031
- switch (currency) {
2032
- case 'EUR':
2033
- return '€';
2034
- default:
2035
- return '€';
2036
- }
2037
- };
2038
- ProductPriceComponent.ctorParameters = function () { return [
2039
- { type: core.ChangeDetectorRef }
2040
- ]; };
2041
- __decorate([
2042
- core.Input()
2043
- ], ProductPriceComponent.prototype, "pricing", null);
2044
- __decorate([
2045
- core.Input()
2046
- ], ProductPriceComponent.prototype, "configurable", null);
2047
- ProductPriceComponent = __decorate([
2048
- core.Component({
2049
- selector: 'app-product-price',
2050
- template: "<div *ngIf=\"toPrice\">\n <div class=\"price-wrapper\" *ngIf=\"fromPrice > toPrice\">\n <div class=\"from-price-label\" [textContent]=\"fromLabel | localize\"></div>\n <div class=\"from-price\" [textContent]=\"fromPrice | priceDisplay\"></div>\n </div>\n <div class=\"price-wrapper\">\n <div class=\"to-price-label\" [textContent]=\"toLabel | localize\"></div>\n <div class=\"to-price\" [textContent]=\"toPrice | priceDisplay\"></div>\n </div>\n</div>\n",
2051
- styles: [":host{display:flex;flex-direction:column}.price-wrapper{width:100%;font-size:15px;margin:0 0 5px;display:inline-block}.price-wrapper:last-child{margin:0}.from-price-label,.to-price-label{color:#5b6875;display:none}.from-price{font-size:16px;font-weight:700;text-decoration:line-through;color:#5b6875}.to-price{font-size:25px;font-weight:700;color:#74b77f}@media screen and (max-width:650px){.from-price{font-size:13px}.to-price{font-size:21px}}"]
2052
- })
2053
- ], ProductPriceComponent);
2054
- return ProductPriceComponent;
2055
- }());
2056
-
2057
- var ProductAddtocartComponent = /** @class */ (function () {
2058
- function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
2059
- this.iconCache = iconCache;
2060
- this._ioneControllerService = _ioneControllerService;
2061
- this._appEventService = _appEventService;
2062
- this._settingsService = _settingsService;
2063
- this.icon = IconEnum;
2064
- this.configurable = false;
2065
- this.configuring = false;
2066
- this.fullscreen = false;
2067
- this.startConfiguration = new core.EventEmitter();
2068
- this.addToCartClick = new core.EventEmitter();
2069
- this.addToQuoteClick = new core.EventEmitter();
2070
- this.showQuoteButton = false;
2071
- this._quantity = 1;
2072
- }
2073
- Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
2074
- get: function () {
2075
- return this._quantity;
2076
- },
1992
+ Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
1993
+ get: function () {
1994
+ return this._quantity;
1995
+ },
2077
1996
  set: function (value) {
2078
1997
  this._quantity = Math.max(1, value);
2079
1998
  },
@@ -2128,7 +2047,7 @@
2128
2047
  configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
2129
2048
  configuratorStatistics.webHost = window.location.host;
2130
2049
  configuratorStatistics.bundleHost = window.location.host;
2131
- return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, undefined, configuratorStatistics)];
2050
+ return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, configuratorStatistics)];
2132
2051
  case 1: return [2 /*return*/, _a.sent()];
2133
2052
  }
2134
2053
  });
@@ -2178,374 +2097,671 @@
2178
2097
  return ProductAddtocartComponent;
2179
2098
  }());
2180
2099
 
2181
- var ProductSelectorTypeComponent = /** @class */ (function () {
2182
- function ProductSelectorTypeComponent(_iconCache, _changeDetector) {
2183
- this._iconCache = _iconCache;
2184
- this._changeDetector = _changeDetector;
2185
- this.type = SelectorType;
2186
- this.icons = IconEnum;
2187
- this.onIconClick = new core.EventEmitter();
2188
- this.currentTypeChange = new core.EventEmitter();
2189
- this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
2190
- this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
2100
+ var ProductRelatedComponent = /** @class */ (function () {
2101
+ function ProductRelatedComponent(_iOne, _appEventService) {
2102
+ this._iOne = _iOne;
2103
+ this._appEventService = _appEventService;
2104
+ this.isSmallModus = true;
2105
+ this._articles = [];
2191
2106
  }
2192
- ProductSelectorTypeComponent.prototype.ngOnInit = function () {
2193
- };
2194
- ProductSelectorTypeComponent.prototype.handleIconClick = function (type) {
2195
- this.currentType = type;
2196
- this.currentTypeChange.next(this.currentType);
2197
- this.onIconClick.next(this.currentType);
2198
- this._changeDetector.detectChanges();
2107
+ Object.defineProperty(ProductRelatedComponent.prototype, "articles", {
2108
+ get: function () {
2109
+ return this._articles;
2110
+ },
2111
+ set: function (value) {
2112
+ var _this = this;
2113
+ if (value) {
2114
+ if (this.refType && this.refType !== undefined) {
2115
+ if (value.length > 0) {
2116
+ value.forEach(function (x) {
2117
+ if (x.refType === _this.refType) {
2118
+ _this._articles.push(x);
2119
+ }
2120
+ });
2121
+ }
2122
+ }
2123
+ else {
2124
+ this._articles = value;
2125
+ }
2126
+ this._loadImages();
2127
+ }
2128
+ },
2129
+ enumerable: true,
2130
+ configurable: true
2131
+ });
2132
+ ProductRelatedComponent.prototype.handleContentClick = function (article) {
2133
+ this._appEventService.onAlternativeClick.next(article);
2199
2134
  };
2200
- ProductSelectorTypeComponent.ctorParameters = function () { return [
2201
- { type: IconCacheService },
2202
- { type: core.ChangeDetectorRef }
2203
- ]; };
2204
- __decorate([
2205
- core.Input()
2206
- ], ProductSelectorTypeComponent.prototype, "show2D", void 0);
2207
- __decorate([
2208
- core.Input()
2209
- ], ProductSelectorTypeComponent.prototype, "show3D", void 0);
2135
+ ProductRelatedComponent.prototype._loadImages = function () {
2136
+ var _this = this;
2137
+ this._articles.forEach(function (a) {
2138
+ if (!a.image.documentBody) {
2139
+ _this._iOne.getDocumentContent(a.image.documentId).then(function (content) {
2140
+ if (content) {
2141
+ a.image.documentBody = content.documentContent;
2142
+ }
2143
+ });
2144
+ }
2145
+ });
2146
+ };
2147
+ ProductRelatedComponent.ctorParameters = function () { return [
2148
+ { type: ProductConnectorService },
2149
+ { type: ProductEventService }
2150
+ ]; };
2210
2151
  __decorate([
2211
2152
  core.Input()
2212
- ], ProductSelectorTypeComponent.prototype, "currentType", void 0);
2153
+ ], ProductRelatedComponent.prototype, "refType", void 0);
2213
2154
  __decorate([
2214
- core.Output()
2215
- ], ProductSelectorTypeComponent.prototype, "onIconClick", void 0);
2155
+ core.Input()
2156
+ ], ProductRelatedComponent.prototype, "label", void 0);
2216
2157
  __decorate([
2217
- core.Output()
2218
- ], ProductSelectorTypeComponent.prototype, "currentTypeChange", void 0);
2219
- ProductSelectorTypeComponent = __decorate([
2158
+ core.Input()
2159
+ ], ProductRelatedComponent.prototype, "isSmallModus", void 0);
2160
+ __decorate([
2161
+ core.Input()
2162
+ ], ProductRelatedComponent.prototype, "articles", null);
2163
+ ProductRelatedComponent = __decorate([
2220
2164
  core.Component({
2221
- selector: 'app-product-selector-type',
2222
- template: "<div *ngIf=\"show2D || show3D\" class=\"show-in\" [textContent]=\"'SHOW_IN' | localize\"></div>\n<co-icon *ngIf=\"show2D\" class=\"selector-type-icon\"\n [class.active]=\"currentType === type.TwoD\"\n [iconData]=\"twoDIcon\"\n (click)=\"handleIconClick(type.TwoD)\"\n></co-icon>\n<co-icon *ngIf=\"show3D\" class=\"selector-type-icon\"\n [class.active]=\"currentType === type.ThreeD\"\n [iconData]=\"threeDIcon\"\n (click)=\"handleIconClick(type.ThreeD)\"\n></co-icon>\n",
2223
- styles: [":host{display:flex;flex-direction:row;align-items:center}:host .show-in{display:none}:host>:not(:last-child){margin-right:10px}::ng-deep co-icon.selector-type-icon{box-shadow:inset 0 0 0 1px #22313c;border-radius:50%;background:0 0;height:34px;width:34px;cursor:pointer}::ng-deep co-icon.selector-type-icon.active{box-shadow:none;background:#74b77f;transition:.2s ease-in-out}::ng-deep co-icon.selector-type-icon.active [fill]{fill:#fff}"]
2165
+ selector: 'app-product-related',
2166
+ template: "<div *ngIf=\"articles && articles.length > 0\">\n <app-header [label]=\"label\" [amount]=\"articles?.length\" *ngIf=\"label\"></app-header>\n <co-scroll-container>\n <div class=\"article-wrapper\" *ngFor=\"let article of articles\">\n <co-article-tile\n [imageData]=\"article.image.documentBodyAsDataUri\"\n [description]=\"article.description\"\n [price]=\"article.price\"\n [level]=\"article.stockStatus\"\n [isSmallModus]=\"isSmallModus\"\n [hasConfigureButton]=\"article.goodType === 'B'\"\n (contentClick)=\"handleContentClick(article)\"\n ></co-article-tile>\n </div>\n </co-scroll-container>\n</div>\n",
2167
+ styles: [":host{display:block}.article-wrapper{display:flex;flex-direction:row}.article-wrapper ::ng-deep co-tile.small{min-width:189px;max-width:189px;height:100%}.article-wrapper ::ng-deep co-tile.small:hover{box-shadow:none;cursor:pointer}.article-wrapper ::ng-deep co-tile.small:hover .tile-bottom .left-buttons{margin:0!important}.article-wrapper ::ng-deep co-tile.small .tile-wrapper{outline:0!important;padding-bottom:0;overflow:hidden}.article-wrapper ::ng-deep co-tile.small .tile-wrapper div.image{height:100px}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons{position:absolute;top:0;right:0;margin:0 -32px 0 0;align-items:flex-end;transition:.2s ease-in-out}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons ::ng-deep co-button.card-button.mini{width:30px;height:30px;transform:none;border-radius:4px;margin:0 0 5px}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-bottom .left-buttons ::ng-deep co-button.card-button.mini ::ng-deep co-icon{width:30px;height:30px}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom{outline:0!important;background:0 0!important}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom .price{color:#74b77f;margin:5px 0 0;font-weight:400;font-size:12px}"]
2224
2168
  })
2225
- ], ProductSelectorTypeComponent);
2226
- return ProductSelectorTypeComponent;
2169
+ ], ProductRelatedComponent);
2170
+ return ProductRelatedComponent;
2227
2171
  }());
2228
2172
 
2229
- var IoneProductComponent = /** @class */ (function () {
2230
- function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
2231
- // this.sku = 'CF-HILL';
2232
- // this.sku = 'CF-ALMADA';
2233
- // this.sku = 'CF-39904ANT';
2234
- // this.sku = 'CF-22346001';
2235
- // this.sku = '104';
2236
- // this.sku = '1000561986';
2237
- var _this = this;
2238
- this._dictionary = _dictionary;
2239
- this._jsonUtils = _jsonUtils;
2240
- this._ione = _ione;
2241
- this._changeDetector = _changeDetector;
2242
- this._appEventService = _appEventService;
2243
- this._settingsService = _settingsService;
2244
- this.onAddToCart = new core.EventEmitter();
2245
- this.forceRenderImage = new core.EventEmitter();
2246
- this.onAlternativeClick = new core.EventEmitter();
2247
- this.onArticleInfoReceived = new core.EventEmitter();
2248
- this.onArticleReceived = new core.EventEmitter();
2249
- this.onSelectionsReceived = new core.EventEmitter();
2250
- this.onAddToQuote = new core.EventEmitter();
2251
- this.upAndLoaded = false;
2252
- this._subs = [];
2253
- this._subs.push(this._settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }),
2254
- // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
2255
- this._appEventService.onAddToCart.subscribe(function (json) { return _this.onAddToCart.emit(json); }), this._appEventService.onAddToQuote.subscribe(function (json) { return _this.onAddToQuote.emit(json); }), this._appEventService.onAlternativeClick.subscribe(function (article) { return _this.onAlternativeClick.emit(article); }), this._appEventService.onArticleInfoReceived.subscribe(function (info) { return _this._handleAnswerInfoReceived(info); }), this._appEventService.onArticleReceived.subscribe(function (article) { return _this.onArticleReceived.emit(article); }), this._appEventService.onSelectionsReceived.subscribe(function (selections) { return _this.onSelectionsReceived.emit(selections); }));
2173
+ var ProductStockComponent = /** @class */ (function () {
2174
+ function ProductStockComponent(_iOne, _iconCache) {
2175
+ this._iOne = _iOne;
2176
+ this._iconCache = _iconCache;
2177
+ this.icon = IconEnum;
2178
+ this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
2256
2179
  }
2257
- Object.defineProperty(IoneProductComponent.prototype, "settings", {
2258
- get: function () {
2259
- return this._settings;
2180
+ Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
2181
+ set: function (value) {
2182
+ if (value) {
2183
+ this.numberInStock = value.stock;
2184
+ }
2260
2185
  },
2186
+ enumerable: true,
2187
+ configurable: true
2188
+ });
2189
+ ProductStockComponent.prototype.ngOnInit = function () {
2190
+ };
2191
+ ProductStockComponent.ctorParameters = function () { return [
2192
+ { type: ProductConnectorService },
2193
+ { type: IconCacheService }
2194
+ ]; };
2195
+ __decorate([
2196
+ core.Input()
2197
+ ], ProductStockComponent.prototype, "stockAndDelivery", null);
2198
+ ProductStockComponent = __decorate([
2199
+ core.Component({
2200
+ selector: 'app-product-stock',
2201
+ template: "<!--<app-header [label]=\"'STOCK' | localize\"></app-header>-->\n<!--<co-level-indicator [model]=\"'medium'\"></co-level-indicator>-->\n<div class=\"product-stock-wrapper\">\n <co-icon class=\"stock-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-stock-fields\">\n <div class=\"pp-default-label in-stock\" [textContent]=\"'PRODUCT_IN_STOCK' | localize\" *ngIf=\"numberInStock > 0\"></div>\n <div class=\"pp-default-label not-in-stock\" [textContent]=\"'PRODUCT_NOT_IN_STOCK' | localize\" *ngIf=\"!(numberInStock > 0)\"></div>\n </div>\n</div>\n",
2202
+ styles: [":host{display:block}.product-stock-wrapper{display:flex;flex-direction:row;align-items:center;border-top:1px solid #f6f5f4;border-bottom:1px solid #f6f5f4;padding:20px 15px}.product-stock-wrapper .stock-icon{margin:0 15px 0 0;width:40px;height:37px}.product-stock-wrapper .product-stock-fields{display:flex;flex-direction:row}.product-stock-wrapper .product-stock-fields .pp-default-label{font-size:14px;margin:0}.product-stock-wrapper .product-stock-fields .pp-default-label:after{content:\"\";width:10px;height:10px;border-radius:10px;background:#74b77f;display:inline-block;margin:0 0 0 15px}.product-stock-wrapper .product-stock-fields .pp-default-label.not-in-stock:after{background:#f15152}@media screen and (max-width:400px){.product-stock-wrapper{padding:15px 0 15px 10px}.product-stock-wrapper .stock-icon{margin:0 15px 0 0;width:32px;height:28px}.product-stock-wrapper .product-stock-fields .pp-default-label{font-size:13px}}"]
2203
+ })
2204
+ ], ProductStockComponent);
2205
+ return ProductStockComponent;
2206
+ }());
2207
+
2208
+ var LocalizePipe = /** @class */ (function () {
2209
+ function LocalizePipe(_dictionaryService) {
2210
+ this._dictionaryService = _dictionaryService;
2211
+ }
2212
+ LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
2213
+ var _a;
2214
+ if (upperCaseFirst === void 0) { upperCaseFirst = true; }
2215
+ if (replace === void 0) { replace = []; }
2216
+ if (!value) {
2217
+ return '';
2218
+ }
2219
+ replace = replace ? replace : [];
2220
+ if (!Array.isArray(replace)) {
2221
+ replace = [replace];
2222
+ }
2223
+ return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
2224
+ };
2225
+ LocalizePipe.ctorParameters = function () { return [
2226
+ { type: DictionaryService }
2227
+ ]; };
2228
+ LocalizePipe = __decorate([
2229
+ core.Pipe({
2230
+ name: 'localize'
2231
+ })
2232
+ // A pipe for localizing string values in view templates.
2233
+ ], LocalizePipe);
2234
+ return LocalizePipe;
2235
+ }());
2236
+
2237
+ var ProductDeliveryComponent = /** @class */ (function () {
2238
+ function ProductDeliveryComponent(_localizePipe, _iOne, _iconCache) {
2239
+ this._localizePipe = _localizePipe;
2240
+ this._iOne = _iOne;
2241
+ this._iconCache = _iconCache;
2242
+ this.icon = IconEnum;
2243
+ this.iconData = this._iconCache.getIcon(this.icon.Truck);
2244
+ }
2245
+ Object.defineProperty(ProductDeliveryComponent.prototype, "stockAndDelivery", {
2261
2246
  set: function (value) {
2262
2247
  if (value) {
2263
- var settings = void 0;
2264
- if (typeof value === 'string') {
2265
- settings = JSON.parse(value);
2266
- }
2267
- else {
2268
- settings = value;
2248
+ this.deliveryDescription = value.deliveryDescription;
2249
+ if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
2250
+ this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
2269
2251
  }
2270
- this._settingsService.createSettingsFromObject(settings);
2271
- // this._initConnection(settings);
2272
2252
  }
2273
2253
  },
2274
2254
  enumerable: true,
2275
2255
  configurable: true
2276
2256
  });
2277
- IoneProductComponent.prototype.ngOnChanges = function (changes) {
2278
- this._changeDetector.detectChanges();
2257
+ ProductDeliveryComponent.prototype.ngOnInit = function () {
2279
2258
  };
2280
- IoneProductComponent.prototype.ngOnDestroy = function () {
2259
+ ProductDeliveryComponent.ctorParameters = function () { return [
2260
+ { type: LocalizePipe },
2261
+ { type: ProductConnectorService },
2262
+ { type: IconCacheService }
2263
+ ]; };
2264
+ __decorate([
2265
+ core.Input()
2266
+ ], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
2267
+ ProductDeliveryComponent = __decorate([
2268
+ core.Component({
2269
+ selector: 'app-product-delivery',
2270
+ template: "<!--<app-header [label]=\"'DELIVERY_TIME_PERIOD' | localize\"></app-header>-->\n<div class=\"product-delivery-wrapper\">\n <co-icon class=\"delivery-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-delivery-fields\">\n <div class=\"pp-default-label\" [textContent]=\"'DELIVERY_TIME_PERIOD' | localize\"></div>\n <div class=\"pp-default-description\" [textContent]=\"deliveryDescription | date:'dd MMMM yyyy'\"></div>\n </div>\n</div>\n",
2271
+ styles: [":host{display:block}.product-delivery-wrapper{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #f6f5f4;padding:20px 15px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:40px;height:37px}.product-delivery-wrapper .product-delivery-fields{display:flex;flex-direction:column}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:14px;margin:0}@media screen and (max-width:400px){.product-delivery-wrapper{padding:15px 0 15px 10px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:32px;height:28px}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:13px}}"]
2272
+ })
2273
+ ], ProductDeliveryComponent);
2274
+ return ProductDeliveryComponent;
2275
+ }());
2276
+
2277
+ var ProductInfoTabsComponent = /** @class */ (function () {
2278
+ function ProductInfoTabsComponent(_appEventService) {
2279
+ var _this = this;
2280
+ this._appEventService = _appEventService;
2281
+ this.activeTabHeight = 0;
2282
+ this.tabs = [];
2283
+ this._subs = [];
2284
+ this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
2285
+ _this.updateTab(index);
2286
+ _this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
2287
+ }));
2288
+ }
2289
+ Object.defineProperty(ProductInfoTabsComponent.prototype, "article", {
2290
+ set: function (value) {
2291
+ if (value) {
2292
+ this.articleObject = value;
2293
+ this._setupTabs();
2294
+ this.updateTab(0);
2295
+ }
2296
+ },
2297
+ enumerable: true,
2298
+ configurable: true
2299
+ });
2300
+ ProductInfoTabsComponent.prototype.ngOnDestroy = function () {
2281
2301
  this._subs.forEach(function (s) { return s.unsubscribe(); });
2282
2302
  };
2283
- IoneProductComponent.prototype._handleSettingsLoaded = function (loaded) {
2284
- if (loaded) {
2285
- this.upAndLoaded = true;
2286
- this._initConnection();
2287
- }
2303
+ ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
2304
+ this.activeTab = tabIndex;
2305
+ this.updateHeight(tabIndex);
2288
2306
  };
2289
- IoneProductComponent.prototype._handleAnswerInfoReceived = function (info) {
2290
- this.onArticleInfoReceived.next(info);
2307
+ ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
2308
+ if (this.tabContent.nativeElement.children.length > 0) {
2309
+ if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
2310
+ this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
2311
+ }
2312
+ }
2291
2313
  };
2292
- // we need to prepare the settings before we can use it for the 3d configurator bundle
2293
- IoneProductComponent.prototype._initConnection = function () {
2294
- return __awaiter(this, void 0, void 0, function () {
2295
- var _this = this;
2296
- return __generator(this, function (_a) {
2297
- this._ione.initDefaultDevelopTestConnection();
2298
- // settingsToUse.session = this._ione.connector.connector.session;
2299
- setTimeout(function () {
2300
- _this._changeDetector.detectChanges();
2301
- });
2302
- return [2 /*return*/];
2303
- });
2304
- });
2314
+ ProductInfoTabsComponent.prototype._setupTabs = function () {
2315
+ this.tabs.push({ title: 'DESCRIPTION' });
2316
+ this.tabs.push({ title: 'FEATURES' });
2317
+ if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
2318
+ this.tabs.push({ title: 'DOWNLOADS' });
2319
+ }
2320
+ if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
2321
+ this.tabs.push({ title: 'SYMBOLS' });
2322
+ }
2305
2323
  };
2306
- IoneProductComponent.ctorParameters = function () { return [
2307
- { type: DictionaryService },
2308
- { type: JsonUtilsService },
2309
- { type: ProductConnectorService },
2310
- { type: core.ChangeDetectorRef },
2311
- { type: ProductEventService },
2312
- { type: ProductSettingsService }
2324
+ ProductInfoTabsComponent.ctorParameters = function () { return [
2325
+ { type: ProductEventService }
2313
2326
  ]; };
2314
2327
  __decorate([
2315
- core.Input()
2316
- ], IoneProductComponent.prototype, "sku", void 0);
2328
+ core.ViewChild('tabContent')
2329
+ ], ProductInfoTabsComponent.prototype, "tabContent", void 0);
2317
2330
  __decorate([
2318
2331
  core.Input()
2319
- ], IoneProductComponent.prototype, "settings", null);
2332
+ ], ProductInfoTabsComponent.prototype, "article", null);
2333
+ ProductInfoTabsComponent = __decorate([
2334
+ core.Component({
2335
+ selector: 'app-product-info-tabs',
2336
+ template: "<div class=\"tab-container\">\r\n <div class=\"tab-header\">\r\n <button *ngFor=\"let tab of tabs; let i = index\" class=\"tab-header-button\" [class.active]=\"activeTab === i\" [textContent]=\"tab.title | localize\" (click)=\"updateTab(i)\"></button>\r\n </div>\r\n <div class=\"tab-content\" #tabContent [style.height.px]=\"(activeTabHeight > 0 ? activeTabHeight : '')\">\r\n <div class=\"tab-content-item\" *ngFor=\"let tab of tabs; let i = index\" [class.active]=\"activeTab === i\">\r\n <ng-container *ngIf=\"i === 0\">\r\n <app-product-additional-info class=\"\" [article]=\"articleObject\" [showLabel]=\"false\"></app-product-additional-info>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 1\">\r\n <app-product-properties class=\"\" [article]=\"articleObject\" [showLabel]=\"false\"></app-product-properties>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 2\">\r\n <app-product-documents [showLabel]=\"false\" class=\"\" *ngIf=\"articleObject?.documents && articleObject?.documents.length > 0\" [documents]=\"articleObject?.documents\"></app-product-documents>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 3\">\r\n <app-product-symbols class=\"\" *ngIf=\"articleObject?.symbols && articleObject?.symbols.length > 0\" [symbols]=\"articleObject?.symbols\"></app-product-symbols>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n",
2337
+ styles: [":focus{outline:0}:host .tab-header{border-bottom:3px solid #f6f5f4;margin:0 0 30px}:host .tab-header .tab-header-button{background:0 0;border:none;border-bottom:3px solid transparent;line-height:20px;padding:15px 20px;cursor:pointer;font-family:iOneMontserrat;color:#22313c;font-weight:700;margin:0 0 -3px;opacity:.5}:host .tab-header .tab-header-button:hover{opacity:1}:host .tab-header .tab-header-button.active{opacity:1;border-color:#74b77f}:host .tab-content{padding:0 20px 30px;margin:0 0 20px;border-bottom:2px solid #f6f5f4;transition:.2s ease-in-out;position:relative}:host .tab-content .tab-content-item{opacity:0;position:absolute;left:0;top:0;visibility:hidden;width:100%}:host .tab-content .tab-content-item.active{opacity:1;visibility:visible;position:static}@media screen and (max-width:650px){:host .tab-content{padding:0 10px 15px}}@media screen and (max-width:450px){:host .tab-header{display:flex}:host .tab-header .tab-header-button{width:100%;padding:10px;font-size:11px}}"]
2338
+ })
2339
+ ], ProductInfoTabsComponent);
2340
+ return ProductInfoTabsComponent;
2341
+ }());
2342
+
2343
+ var PipeModule = /** @class */ (function () {
2344
+ function PipeModule() {
2345
+ }
2346
+ PipeModule = __decorate([
2347
+ core.NgModule({
2348
+ exports: [
2349
+ LocalizePipe
2350
+ ],
2351
+ declarations: [
2352
+ LocalizePipe
2353
+ ],
2354
+ providers: [
2355
+ LocalizePipe
2356
+ ]
2357
+ })
2358
+ ], PipeModule);
2359
+ return PipeModule;
2360
+ }());
2361
+
2362
+ var ProductDocumentsComponent = /** @class */ (function () {
2363
+ function ProductDocumentsComponent(iconCache) {
2364
+ this.iconCache = iconCache;
2365
+ this.icon = IconEnum;
2366
+ this.showLabel = false;
2367
+ this.documents = [];
2368
+ }
2369
+ ProductDocumentsComponent.ctorParameters = function () { return [
2370
+ { type: IconCacheService }
2371
+ ]; };
2320
2372
  __decorate([
2321
- core.Output()
2322
- ], IoneProductComponent.prototype, "onAddToCart", void 0);
2373
+ core.Input()
2374
+ ], ProductDocumentsComponent.prototype, "showLabel", void 0);
2323
2375
  __decorate([
2324
- core.Output()
2325
- ], IoneProductComponent.prototype, "forceRenderImage", void 0);
2376
+ core.Input()
2377
+ ], ProductDocumentsComponent.prototype, "documents", void 0);
2378
+ ProductDocumentsComponent = __decorate([
2379
+ core.Component({
2380
+ selector: 'app-product-documents',
2381
+ template: "<app-header *ngIf=\"showLabel\" [label]=\"'DOCUMENTS' | localize\" [amount]=\"documents?.length\"></app-header>\n<div *ngIf=\"documents && documents.length > 0\">\n <co-files-upload [documents]=\"documents\" [canAdd]=\"false\" readonly></co-files-upload>\n</div>\n",
2382
+ styles: [":host{display:block}::ng-deep co-files-upload{flex-direction:column!important;width:100%}::ng-deep co-file-upload{margin:0!important;border-bottom:1px solid #f6f5f4}::ng-deep co-file-upload:first-child{border-top:1px solid #f6f5f4}::ng-deep co-files-upload .files-upload-wrapper{flex-direction:column!important;width:100%}::ng-deep co-file-upload co-tile{max-width:100%!important;width:100%;position:relative}::ng-deep co-file-upload co-tile:hover{box-shadow:none!important}::ng-deep co-file-upload co-tile:hover .tile-extra-bottom{background-color:#f6f5f4!important}::ng-deep co-file-upload co-tile .tile-wrapper{position:absolute!important;left:0;top:0;width:100%;height:100%;z-index:2;opacity:0;box-sizing:border-box}::ng-deep co-file-upload co-tile .tile-wrapper .image{position:absolute!important;left:0;top:0;width:100%!important;height:100%!important;cursor:pointer}::ng-deep co-file-upload co-tile .tile-extra-bottom{outline:0!important;border:none!important;background:url(../../../assets/icons/download.svg) left 6px center/36px auto no-repeat!important;line-height:20px;padding:20px 20px 20px 60px!important;margin:0!important}::ng-deep co-file-upload co-tile .tile-extra-bottom .main{padding:0!important}"]
2383
+ })
2384
+ ], ProductDocumentsComponent);
2385
+ return ProductDocumentsComponent;
2386
+ }());
2387
+
2388
+ var HeaderComponent = /** @class */ (function () {
2389
+ function HeaderComponent() {
2390
+ }
2391
+ HeaderComponent.prototype.ngOnInit = function () {
2392
+ };
2326
2393
  __decorate([
2327
- core.Output()
2328
- ], IoneProductComponent.prototype, "onAlternativeClick", void 0);
2394
+ core.Input()
2395
+ ], HeaderComponent.prototype, "label", void 0);
2329
2396
  __decorate([
2330
- core.Output()
2331
- ], IoneProductComponent.prototype, "onArticleInfoReceived", void 0);
2397
+ core.Input()
2398
+ ], HeaderComponent.prototype, "amount", void 0);
2399
+ HeaderComponent = __decorate([
2400
+ core.Component({
2401
+ selector: 'app-header',
2402
+ template: "<ng-container *ngIf=\"label\">\n <div class=\"header-wrapper\">\n <h3 [textContent]=\"label\"></h3>\n <span *ngIf=\"amount\" class=\"amount\" [textContent]=\"'(' + amount + ')'\"></span>\n </div>\n</ng-container>\n",
2403
+ styles: [".header-wrapper{display:flex;flex-direction:row;align-items:center}.header-wrapper .amount{margin-left:5px}"]
2404
+ })
2405
+ ], HeaderComponent);
2406
+ return HeaderComponent;
2407
+ }());
2408
+
2409
+ var TabType;
2410
+ (function (TabType) {
2411
+ TabType["Additional"] = "additional";
2412
+ TabType["Properties"] = "properties";
2413
+ })(TabType || (TabType = {}));
2414
+ var ProductInfoComponent = /** @class */ (function () {
2415
+ function ProductInfoComponent() {
2416
+ this.tabType = TabType;
2417
+ this.currentTab = TabType.Additional;
2418
+ }
2419
+ ProductInfoComponent.prototype.ngOnInit = function () {
2420
+ };
2421
+ ProductInfoComponent.prototype.switchTab = function (tab) {
2422
+ this.currentTab = tab;
2423
+ };
2332
2424
  __decorate([
2333
- core.Output()
2334
- ], IoneProductComponent.prototype, "onArticleReceived", void 0);
2425
+ core.Input()
2426
+ ], ProductInfoComponent.prototype, "article", void 0);
2427
+ ProductInfoComponent = __decorate([
2428
+ core.Component({
2429
+ selector: 'app-product-info',
2430
+ template: "<div>\n <div class=\"info-wrapper\">\n <div class=\"info-navigation\">\n <span [textContent]=\"'ADDITIONAL_DATA' | localize\" class=\"navigator\" [class.selected]=\"currentTab === tabType.Additional\" (mouseup)=\"switchTab(tabType.Additional)\"></span>\n <span [textContent]=\"'PROPERTIES' | localize\" class=\"navigator\" [class.selected]=\"currentTab === tabType.Properties\" (mouseup)=\"switchTab(tabType.Properties)\"></span>\n </div>\n <ng-container [ngSwitch]=\"currentTab\" class=\"content\">\n <div *ngSwitchCase=\"tabType.Additional\" @showContent>\n <app-product-additional-info\n [article]=\"article\"\n ></app-product-additional-info>\n </div>\n <div *ngSwitchCase=\"tabType.Properties\" @showContent>\n <app-product-properties [article]=\"article\"></app-product-properties>\n </div>\n </ng-container>\n </div>\n</div>\n",
2431
+ animations: [
2432
+ animations.trigger('showContent', [
2433
+ animations.state('void', animations.style({ 'opacity': '0' })),
2434
+ animations.state('*', animations.style({ 'opacity': '1' })),
2435
+ animations.transition('void => *', animations.animate('200ms 100ms ease-in-out')),
2436
+ ])
2437
+ ],
2438
+ styles: [".info-navigation{margin:30px 0}.info-navigation .navigator:not(:last-child){margin-right:30px}.navigator{font-size:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.navigator.selected{color:#2b60a7}"]
2439
+ })
2440
+ ], ProductInfoComponent);
2441
+ return ProductInfoComponent;
2442
+ }());
2443
+
2444
+ var ProductAdditionalInfoComponent = /** @class */ (function () {
2445
+ function ProductAdditionalInfoComponent(_sanitizer, _connectorService, _changeDetector) {
2446
+ this._sanitizer = _sanitizer;
2447
+ this._connectorService = _connectorService;
2448
+ this._changeDetector = _changeDetector;
2449
+ this.showLabel = false;
2450
+ this.textParts = [];
2451
+ this._superArticles = new Map();
2452
+ }
2453
+ Object.defineProperty(ProductAdditionalInfoComponent.prototype, "article", {
2454
+ get: function () {
2455
+ return this._article;
2456
+ },
2457
+ set: function (value) {
2458
+ var _this = this;
2459
+ if (value) {
2460
+ this._article = value;
2461
+ this._buildInfo().then(function () {
2462
+ _this._changeDetector.detectChanges();
2463
+ });
2464
+ }
2465
+ },
2466
+ enumerable: true,
2467
+ configurable: true
2468
+ });
2469
+ ProductAdditionalInfoComponent.prototype.ngOnInit = function () {
2470
+ };
2471
+ ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
2472
+ return __awaiter(this, void 0, void 0, function () {
2473
+ var _this = this;
2474
+ return __generator(this, function (_a) {
2475
+ return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
2476
+ var texts, mainArticle;
2477
+ var _this = this;
2478
+ return __generator(this, function (_a) {
2479
+ switch (_a.label) {
2480
+ case 0:
2481
+ texts = [];
2482
+ if (!this.article.superArticleNr) return [3 /*break*/, 4];
2483
+ mainArticle = void 0;
2484
+ if (!this._superArticles.has(this.article.superArticleNr)) return [3 /*break*/, 1];
2485
+ mainArticle = this._superArticles.get(this.article.superArticleNr);
2486
+ return [3 /*break*/, 3];
2487
+ case 1: return [4 /*yield*/, this._connectorService.getSuperArticle(this.article.superArticleNr)];
2488
+ case 2:
2489
+ mainArticle = _a.sent();
2490
+ this._superArticles.set(this.article.superArticleNr, mainArticle);
2491
+ _a.label = 3;
2492
+ case 3:
2493
+ mainArticle.texts.forEach(function (txt) {
2494
+ if (BitUtils.IsFullDescription(txt.publication)) {
2495
+ var safeTxt = _this._sanitizer.sanitize(core.SecurityContext.HTML, txt.text);
2496
+ texts.push(safeTxt);
2497
+ }
2498
+ });
2499
+ resolve(texts);
2500
+ return [3 /*break*/, 5];
2501
+ case 4:
2502
+ resolve(texts);
2503
+ _a.label = 5;
2504
+ case 5: return [2 /*return*/];
2505
+ }
2506
+ });
2507
+ }); })];
2508
+ });
2509
+ });
2510
+ };
2511
+ ProductAdditionalInfoComponent.prototype._prepareArticleTexts = function () {
2512
+ return __awaiter(this, void 0, void 0, function () {
2513
+ var texts;
2514
+ var _a;
2515
+ var _this = this;
2516
+ return __generator(this, function (_b) {
2517
+ switch (_b.label) {
2518
+ case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
2519
+ case 1:
2520
+ texts = _b.sent();
2521
+ if (texts.length > 0) {
2522
+ (_a = this.textParts).push.apply(_a, __spread(texts));
2523
+ }
2524
+ if (this.article.texts) {
2525
+ this.article.texts.forEach(function (txt) {
2526
+ if (BitUtils.IsFullDescription(txt.publication)) {
2527
+ var safeTxt = _this._sanitizer.sanitize(core.SecurityContext.HTML, txt.text);
2528
+ _this.textParts.push(safeTxt);
2529
+ }
2530
+ });
2531
+ }
2532
+ return [2 /*return*/];
2533
+ }
2534
+ });
2535
+ });
2536
+ };
2537
+ ProductAdditionalInfoComponent.prototype._buildInfo = function () {
2538
+ return __awaiter(this, void 0, void 0, function () {
2539
+ return __generator(this, function (_a) {
2540
+ switch (_a.label) {
2541
+ case 0:
2542
+ this.textParts.length = 0;
2543
+ return [4 /*yield*/, this._prepareArticleTexts()];
2544
+ case 1:
2545
+ _a.sent();
2546
+ if (this.textParts.length === 0) {
2547
+ if (this.article.additionalDescription) {
2548
+ this.textParts.push(this.article.additionalDescription);
2549
+ }
2550
+ else if (this.article.description) {
2551
+ this.textParts.push(this.article.description);
2552
+ }
2553
+ }
2554
+ return [2 /*return*/];
2555
+ }
2556
+ });
2557
+ });
2558
+ };
2559
+ ProductAdditionalInfoComponent.ctorParameters = function () { return [
2560
+ { type: platformBrowser.DomSanitizer },
2561
+ { type: ProductConnectorService },
2562
+ { type: core.ChangeDetectorRef }
2563
+ ]; };
2335
2564
  __decorate([
2336
- core.Output()
2337
- ], IoneProductComponent.prototype, "onSelectionsReceived", void 0);
2565
+ core.Input()
2566
+ ], ProductAdditionalInfoComponent.prototype, "article", null);
2338
2567
  __decorate([
2339
- core.Output()
2340
- ], IoneProductComponent.prototype, "onAddToQuote", void 0);
2341
- IoneProductComponent = __decorate([
2568
+ core.Input()
2569
+ ], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
2570
+ ProductAdditionalInfoComponent = __decorate([
2342
2571
  core.Component({
2343
- selector: 'app-ione-product',
2344
- template: "<app-product-page *ngIf=\"upAndLoaded\" [sku]=\"sku\"\n></app-product-page>\n",
2345
- encapsulation: core.ViewEncapsulation.Emulated,
2346
- styles: [""]
2572
+ selector: 'app-product-additional-info',
2573
+ template: "<h3 *ngIf=\"showLabel\" [textContent]=\"'ADDITIONAL_DATA' | localize\"></h3>\n<ng-container *ngIf=\"textParts && textParts.length > 0\">\n <div class=\"additional-info-parts\" *ngFor=\"let text of textParts\" [innerHTML]=\"text\"></div>\n</ng-container>\n",
2574
+ styles: [":host{display:block}:host .additional-info-parts{margin-bottom:20px;line-height:190%;color:#22313c;font-size:13px}:host ::ng-deep p{line-height:190%;margin:15px 0}:host ::ng-deep font{font-family:iOneMontserrat}:host .additional-info-parts>:first-child{margin-top:0}:host .additional-info-parts>:last-child{margin-bottom:0}"]
2347
2575
  })
2348
- ], IoneProductComponent);
2349
- return IoneProductComponent;
2576
+ ], ProductAdditionalInfoComponent);
2577
+ return ProductAdditionalInfoComponent;
2350
2578
  }());
2351
2579
 
2352
- var ProductAdditionalDescriptionComponent = /** @class */ (function () {
2353
- function ProductAdditionalDescriptionComponent(_appEventService) {
2354
- this._appEventService = _appEventService;
2580
+ var propertyMap = new Map([
2581
+ ['articleNr', 'ARTICLE_NUMBER'],
2582
+ ['catExtra', 'CATEGORY'],
2583
+ ['catType', 'CATEGORY_TYPE'],
2584
+ ['description', 'DESCRIPTION'],
2585
+ ['material', 'MATERIAL'],
2586
+ ['title', 'TITLE'],
2587
+ ['turnOverGroup', 'TURNOVERGROUP'],
2588
+ ['height', 'HEIGHT'],
2589
+ ['width', 'WIDTH']
2590
+ ]);
2591
+ var ProductPropertiesComponent = /** @class */ (function () {
2592
+ function ProductPropertiesComponent() {
2593
+ this.showLabel = false;
2594
+ this.properties = [];
2355
2595
  }
2356
- Object.defineProperty(ProductAdditionalDescriptionComponent.prototype, "article", {
2596
+ Object.defineProperty(ProductPropertiesComponent.prototype, "article", {
2357
2597
  get: function () {
2358
2598
  return this._article;
2359
2599
  },
2360
2600
  set: function (value) {
2361
2601
  this._article = value;
2362
- if (this._article) {
2363
- this.description = this.article.additionalDescription;
2364
- this._prepareDescription();
2365
- }
2602
+ this._prepareProperties();
2366
2603
  },
2367
2604
  enumerable: true,
2368
2605
  configurable: true
2369
2606
  });
2370
- ProductAdditionalDescriptionComponent.prototype.ngOnInit = function () {
2371
- };
2372
- ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
2373
- this._appEventService.onUpdateProductInfoTab.next(0);
2607
+ ProductPropertiesComponent.prototype.ngOnInit = function () {
2374
2608
  };
2375
- ProductAdditionalDescriptionComponent.prototype._prepareDescription = function () {
2609
+ ProductPropertiesComponent.prototype._prepareProperties = function () {
2376
2610
  var _this = this;
2377
- this.description = '';
2378
- if (this.article.texts && this.article.texts.length > 0) {
2379
- this.article.texts.forEach(function (txt) {
2380
- if (BitUtils.IsShortDescription(txt.publication)) {
2381
- _this.description += txt.text;
2382
- }
2383
- });
2384
- this.description = this.description.replace(/<[^>]*>?/gm, '');
2385
- if (this.description.length > 250) {
2386
- this.description = this.description.substr(0, 250) + ' [..]';
2387
- }
2611
+ this.properties.length = 0;
2612
+ if (!this._article) {
2613
+ return;
2388
2614
  }
2615
+ propertyMap.forEach(function (value, key) {
2616
+ if (_this.article.hasOwnProperty(key)) {
2617
+ _this.properties.push({ key: value, value: _this.article[key] });
2618
+ }
2619
+ });
2389
2620
  };
2390
- ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
2391
- { type: ProductEventService }
2392
- ]; };
2393
2621
  __decorate([
2394
2622
  core.Input()
2395
- ], ProductAdditionalDescriptionComponent.prototype, "article", null);
2396
- ProductAdditionalDescriptionComponent = __decorate([
2623
+ ], ProductPropertiesComponent.prototype, "article", null);
2624
+ __decorate([
2625
+ core.Input()
2626
+ ], ProductPropertiesComponent.prototype, "showLabel", void 0);
2627
+ ProductPropertiesComponent = __decorate([
2397
2628
  core.Component({
2398
- selector: 'app-product-additional-description',
2399
- template: "<ng-container *ngIf=\"description !== ''\">\n <div class=\"pd-additional-description\">\n <p [innerHTML]=\"description\"></p>\n <button class=\"pd-read-more-btn\" [textContent]=\"'READ_MORE' | localize\" (click)=\"onReadMore()\"></button>\n </div>\n</ng-container>\n",
2400
- styles: [":host{display:block;padding-top:0!important}:host :focus{outline:0!important}:host .pd-additional-description{line-height:190%;color:#22313c;font-size:13px}:host .pd-read-more-btn{color:#2b60a7;border:none;background:0 0;cursor:pointer;text-decoration:underline;font-family:iOneMontserrat}:host .pd-read-more-btn:hover{color:#74b77f}@media screen and (max-width:650px){:host .pd-additional-description{font-size:12px}}"]
2629
+ selector: 'app-product-properties',
2630
+ template: "<div class=\"article-properties-wrapper\">\n <h3 *ngIf=\"showLabel\" [textContent]=\"'PROPERTIES' | localize\"></h3>\n <ng-container *ngFor=\"let property of properties\">\n <div class=\"article-property\">\n <div class=\"article-property-key\" [textContent]=\"property.key | localize\"></div>\n <div class=\"article-property-value\" [textContent]=\"property.value\"></div>\n </div>\n </ng-container>\n</div>\n",
2631
+ styles: [":host{display:block}.article-properties-wrapper{display:flex;flex-direction:column}.article-property{display:flex;flex-direction:row;border-bottom:1px solid #f6f5f4;padding:11px 0;font-size:13px}.article-property:first-child{border-top:1px solid #f6f5f4}.article-property-key{flex-basis:200px;flex-shrink:0;color:#5b6875}@media screen and (max-width:450px){.article-property-key{flex-basis:130px}}"]
2401
2632
  })
2402
- ], ProductAdditionalDescriptionComponent);
2403
- return ProductAdditionalDescriptionComponent;
2633
+ ], ProductPropertiesComponent);
2634
+ return ProductPropertiesComponent;
2404
2635
  }());
2405
2636
 
2406
- var ProductInfoTabsComponent = /** @class */ (function () {
2407
- function ProductInfoTabsComponent(_appEventService) {
2408
- var _this = this;
2409
- this._appEventService = _appEventService;
2410
- this.activeTabHeight = 0;
2411
- this.tabs = [];
2412
- this._subs = [];
2413
- this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
2414
- _this.updateTab(index);
2415
- _this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
2416
- }));
2637
+ var ProductSymbolsComponent = /** @class */ (function () {
2638
+ function ProductSymbolsComponent() {
2639
+ this.symbolStrings = [];
2417
2640
  }
2418
- Object.defineProperty(ProductInfoTabsComponent.prototype, "article", {
2641
+ Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
2642
+ get: function () {
2643
+ return this._symbols;
2644
+ },
2419
2645
  set: function (value) {
2420
- if (value) {
2421
- this.articleObject = value;
2422
- this._setupTabs();
2423
- this.updateTab(0);
2646
+ this._symbols = value;
2647
+ if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
2648
+ this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
2649
+ }
2650
+ if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
2651
+ for (var i = 0; i < this._symbols['symbolString'].length; i++) {
2652
+ this.symbolStrings.push(this._symbols['symbolString'][i]);
2653
+ }
2424
2654
  }
2425
2655
  },
2426
2656
  enumerable: true,
2427
2657
  configurable: true
2428
2658
  });
2429
- ProductInfoTabsComponent.prototype.ngOnDestroy = function () {
2430
- this._subs.forEach(function (s) { return s.unsubscribe(); });
2431
- };
2432
- ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
2433
- this.activeTab = tabIndex;
2434
- this.updateHeight(tabIndex);
2435
- };
2436
- ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
2437
- if (this.tabContent.nativeElement.children.length > 0) {
2438
- if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
2439
- this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
2440
- }
2441
- }
2442
- };
2443
- ProductInfoTabsComponent.prototype._setupTabs = function () {
2444
- this.tabs.push({ title: 'DESCRIPTION' });
2445
- this.tabs.push({ title: 'FEATURES' });
2446
- if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
2447
- this.tabs.push({ title: 'DOWNLOADS' });
2448
- }
2449
- if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
2450
- this.tabs.push({ title: 'SYMBOLS' });
2451
- }
2659
+ ProductSymbolsComponent.prototype.ngOnInit = function () {
2452
2660
  };
2453
- ProductInfoTabsComponent.ctorParameters = function () { return [
2454
- { type: ProductEventService }
2455
- ]; };
2456
- __decorate([
2457
- core.ViewChild('tabContent')
2458
- ], ProductInfoTabsComponent.prototype, "tabContent", void 0);
2459
2661
  __decorate([
2460
2662
  core.Input()
2461
- ], ProductInfoTabsComponent.prototype, "article", null);
2462
- ProductInfoTabsComponent = __decorate([
2663
+ ], ProductSymbolsComponent.prototype, "symbols", null);
2664
+ __decorate([
2665
+ core.HostBinding('class')
2666
+ ], ProductSymbolsComponent.prototype, "_className", void 0);
2667
+ ProductSymbolsComponent = __decorate([
2463
2668
  core.Component({
2464
- selector: 'app-product-info-tabs',
2465
- template: "<div class=\"tab-container\">\r\n <div class=\"tab-header\">\r\n <button *ngFor=\"let tab of tabs; let i = index\" class=\"tab-header-button\" [class.active]=\"activeTab === i\" [textContent]=\"tab.title | localize\" (click)=\"updateTab(i)\"></button>\r\n </div>\r\n <div class=\"tab-content\" #tabContent [style.height.px]=\"(activeTabHeight > 0 ? activeTabHeight : '')\">\r\n <div class=\"tab-content-item\" *ngFor=\"let tab of tabs; let i = index\" [class.active]=\"activeTab === i\">\r\n <ng-container *ngIf=\"i === 0\">\r\n <app-product-additional-info class=\"\" [article]=\"articleObject\" [showLabel]=\"false\"></app-product-additional-info>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 1\">\r\n <app-product-properties class=\"\" [article]=\"articleObject\" [showLabel]=\"false\"></app-product-properties>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 2\">\r\n <app-product-documents [showLabel]=\"false\" class=\"\" *ngIf=\"articleObject?.documents && articleObject?.documents.length > 0\" [documents]=\"articleObject?.documents\"></app-product-documents>\r\n </ng-container>\r\n <ng-container *ngIf=\"i === 3\">\r\n <app-product-symbols class=\"\" *ngIf=\"articleObject?.symbols && articleObject?.symbols.length > 0\" [symbols]=\"articleObject?.symbols\"></app-product-symbols>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n",
2466
- styles: [":focus{outline:0}:host .tab-header{border-bottom:3px solid #f6f5f4;margin:0 0 30px}:host .tab-header .tab-header-button{background:0 0;border:none;border-bottom:3px solid transparent;line-height:20px;padding:15px 20px;cursor:pointer;font-family:iOneMontserrat;color:#22313c;font-weight:700;margin:0 0 -3px;opacity:.5}:host .tab-header .tab-header-button:hover{opacity:1}:host .tab-header .tab-header-button.active{opacity:1;border-color:#74b77f}:host .tab-content{padding:0 20px 30px;margin:0 0 20px;border-bottom:2px solid #f6f5f4;transition:.2s ease-in-out;position:relative}:host .tab-content .tab-content-item{opacity:0;position:absolute;left:0;top:0;visibility:hidden;width:100%}:host .tab-content .tab-content-item.active{opacity:1;visibility:visible;position:static}@media screen and (max-width:650px){:host .tab-content{padding:0 10px 15px}}@media screen and (max-width:450px){:host .tab-header{display:flex}:host .tab-header .tab-header-button{width:100%;padding:10px;font-size:11px}}"]
2467
- })
2468
- ], ProductInfoTabsComponent);
2469
- return ProductInfoTabsComponent;
2470
- }());
2471
-
2472
- var ProductInitializerService = /** @class */ (function () {
2473
- function ProductInitializerService(_settingsService) {
2474
- this._settingsService = _settingsService;
2475
- }
2476
- ProductInitializerService.prototype.initializeApp = function () {
2477
- return __awaiter(this, void 0, void 0, function () {
2478
- return __generator(this, function (_a) {
2479
- return [2 /*return*/, this._settingsService.initializeSettings()];
2480
- });
2481
- });
2482
- };
2483
- ProductInitializerService.ctorParameters = function () { return [
2484
- { type: ProductSettingsService }
2485
- ]; };
2486
- ProductInitializerService.ɵprov = core.ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(core.ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
2487
- ProductInitializerService = __decorate([
2488
- core.Injectable({
2489
- providedIn: 'root',
2669
+ selector: 'app-product-symbols',
2670
+ template: "<div *ngIf=\"symbols && symbols.length > 0\">\n <app-header [label]=\"'SYMBOLS' | localize\" [amount]=\"symbols?.length\"></app-header>\n <co-scroll-container>\n <co-tile small noImagePlaceholder *ngFor=\"let symbol of symbolStrings\">\n <ng-container tile-over-image>\n <div class=\"symbol\" [textContent]=\"symbol\"></div>\n </ng-container>\n <ng-container tile-extra-bottom-content>\n <div class=\"symbol-name\" [textContent]=\"'Wat moet hier?'\"></div>\n </ng-container>\n </co-tile>\n </co-scroll-container>\n</div>\n",
2671
+ styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
2490
2672
  })
2491
- ], ProductInitializerService);
2492
- return ProductInitializerService;
2673
+ ], ProductSymbolsComponent);
2674
+ return ProductSymbolsComponent;
2493
2675
  }());
2494
2676
 
2495
- function initializeApp(context) {
2496
- var x = function () { return context.initializeApp(); };
2497
- return x;
2498
- }
2499
- var IoneProductModule = /** @class */ (function () {
2500
- function IoneProductModule() {
2677
+ var ProductPageModule = /** @class */ (function () {
2678
+ function ProductPageModule() {
2501
2679
  }
2502
- IoneProductModule = __decorate([
2680
+ ProductPageModule = __decorate([
2503
2681
  core.NgModule({
2504
2682
  imports: [
2505
- // BrowserAnimationsModule,
2506
2683
  common.CommonModule,
2507
- corecomponents.ButtonModule,
2508
2684
  corecomponents.IconModule,
2685
+ corecomponents.LoaderModule,
2686
+ PipeModule,
2509
2687
  corecomponents.NumberPickerModule,
2688
+ corecomponents.ButtonModule,
2689
+ corecomponents.PriceDisplayPipeModule,
2510
2690
  corecomponents.InputTextModule,
2511
2691
  corecomponents.FilesUploadModule,
2512
- corecomponents.LoaderModule,
2513
2692
  corecomponents.ScrollContainerModule,
2514
2693
  corecomponents.TileModule,
2515
2694
  corecomponents.LevelIndicatorModule,
2516
- corecomponents.PriceDisplayPipeModule,
2517
- corecomponents.ArticleTileModule
2695
+ corecomponents.ArticleTileModule,
2518
2696
  ],
2519
2697
  schemas: [core.CUSTOM_ELEMENTS_SCHEMA],
2520
2698
  declarations: [
2521
- IoneProductComponent,
2522
2699
  ProductPageComponent,
2700
+ ProductSelectorTypeComponent,
2523
2701
  ImageCarouselComponent,
2524
2702
  ProductDescriptionComponent,
2525
- ProductDocumentsComponent,
2703
+ ProductAdditionalDescriptionComponent,
2704
+ ProductPriceComponent,
2705
+ ProductAddtocartComponent,
2526
2706
  ProductRelatedComponent,
2707
+ ProductStockComponent,
2708
+ ProductDeliveryComponent,
2709
+ ProductInfoTabsComponent,
2710
+ ProductDocumentsComponent,
2527
2711
  HeaderComponent,
2528
2712
  ProductInfoComponent,
2529
2713
  ProductAdditionalInfoComponent,
2530
2714
  ProductPropertiesComponent,
2531
- ProductDeliveryComponent,
2532
- ProductStockComponent,
2533
- ProductSymbolsComponent,
2534
- ProductPriceComponent,
2535
- ProductAddtocartComponent,
2536
- ProductInfoTabsComponent,
2537
- LocalizePipe,
2538
- ProductSelectorTypeComponent,
2539
- ProductAdditionalDescriptionComponent
2715
+ ProductSymbolsComponent
2716
+ ],
2717
+ exports: [ProductPageComponent]
2718
+ })
2719
+ ], ProductPageModule);
2720
+ return ProductPageModule;
2721
+ }());
2722
+
2723
+ var ProductExternalSourceModule = /** @class */ (function () {
2724
+ function ProductExternalSourceModule() {
2725
+ }
2726
+ ProductExternalSourceModule = __decorate([
2727
+ core.NgModule({
2728
+ imports: [
2729
+ common.CommonModule,
2730
+ ProductPageModule
2731
+ ],
2732
+ declarations: [
2733
+ ProductExternalSourceComponent
2734
+ ],
2735
+ exports: [
2736
+ ProductExternalSourceComponent
2737
+ ]
2738
+ })
2739
+ ], ProductExternalSourceModule);
2740
+ return ProductExternalSourceModule;
2741
+ }());
2742
+
2743
+ function initializeApp(context) {
2744
+ var x = function () { return context.initializeApp(); };
2745
+ return x;
2746
+ }
2747
+ var IoneProductModule = /** @class */ (function () {
2748
+ function IoneProductModule() {
2749
+ }
2750
+ IoneProductModule = __decorate([
2751
+ core.NgModule({
2752
+ imports: [
2753
+ // BrowserAnimationsModule,
2754
+ common.CommonModule,
2755
+ ProductExternalSourceModule,
2756
+ ProductPageModule
2757
+ ],
2758
+ declarations: [
2759
+ IoneProductComponent
2540
2760
  ],
2541
2761
  entryComponents: [
2542
2762
  IoneProductComponent
2543
2763
  ],
2544
2764
  providers: [
2545
- ProductSettingsService,
2546
- ProductConnectorService,
2547
- ProductConnectorAdapterService,
2548
- IconCacheService,
2549
2765
  {
2550
2766
  provide: core.APP_INITIALIZER,
2551
2767
  useFactory: initializeApp,
@@ -2563,36 +2779,39 @@
2563
2779
  }());
2564
2780
 
2565
2781
  exports.IoneProductModule = IoneProductModule;
2782
+ exports.ProductExternalSourceComponent = ProductExternalSourceComponent;
2783
+ exports.ProductExternalSourceModule = ProductExternalSourceModule;
2566
2784
  exports.Version = Version;
2567
2785
  exports.initializeApp = initializeApp;
2568
- exports.ɵa = IoneProductComponent;
2569
- exports.ɵb = DictionaryService;
2570
- exports.ɵba = ProductAdditionalDescriptionComponent;
2571
- exports.ɵbb = ProductInitializerService;
2572
- exports.ɵc = JsonUtilsService;
2573
- exports.ɵd = ProductConnectorService;
2574
- exports.ɵe = ProductConnectorAdapterService;
2575
- exports.ɵf = ProductSettingsService;
2576
- exports.ɵg = ProductEventService;
2577
- exports.ɵh = ProductPageComponent;
2578
- exports.ɵi = IconCacheService;
2579
- exports.ɵj = ImageCarouselComponent;
2580
- exports.ɵk = ProductDescriptionComponent;
2581
- exports.ɵl = ProductDocumentsComponent;
2582
- exports.ɵm = ProductRelatedComponent;
2583
- exports.ɵn = HeaderComponent;
2584
- exports.ɵo = ProductInfoComponent;
2585
- exports.ɵp = ProductAdditionalInfoComponent;
2586
- exports.ɵq = ProductModuleService;
2587
- exports.ɵr = ProductPropertiesComponent;
2588
- exports.ɵs = ProductDeliveryComponent;
2589
- exports.ɵt = LocalizePipe;
2590
- exports.ɵu = ProductStockComponent;
2591
- exports.ɵv = ProductSymbolsComponent;
2592
- exports.ɵw = ProductPriceComponent;
2593
- exports.ɵx = ProductAddtocartComponent;
2594
- exports.ɵy = ProductInfoTabsComponent;
2595
- exports.ɵz = ProductSelectorTypeComponent;
2786
+ exports.ɵa = ProductPageModule;
2787
+ exports.ɵb = PipeModule;
2788
+ exports.ɵba = ProductSymbolsComponent;
2789
+ exports.ɵbb = IoneProductComponent;
2790
+ exports.ɵbc = ProductInitializerService;
2791
+ exports.ɵc = LocalizePipe;
2792
+ exports.ɵd = DictionaryService;
2793
+ exports.ɵe = JsonUtilsService;
2794
+ exports.ɵf = ProductPageComponent;
2795
+ exports.ɵg = ProductConnectorService;
2796
+ exports.ɵh = ProductConnectorAdapterService;
2797
+ exports.ɵi = ProductSettingsService;
2798
+ exports.ɵj = IconCacheService;
2799
+ exports.ɵk = ProductEventService;
2800
+ exports.ɵl = ProductSelectorTypeComponent;
2801
+ exports.ɵm = ImageCarouselComponent;
2802
+ exports.ɵn = ProductDescriptionComponent;
2803
+ exports.ɵo = ProductAdditionalDescriptionComponent;
2804
+ exports.ɵp = ProductPriceComponent;
2805
+ exports.ɵq = ProductAddtocartComponent;
2806
+ exports.ɵr = ProductRelatedComponent;
2807
+ exports.ɵs = ProductStockComponent;
2808
+ exports.ɵt = ProductDeliveryComponent;
2809
+ exports.ɵu = ProductInfoTabsComponent;
2810
+ exports.ɵv = ProductDocumentsComponent;
2811
+ exports.ɵw = HeaderComponent;
2812
+ exports.ɵx = ProductInfoComponent;
2813
+ exports.ɵy = ProductAdditionalInfoComponent;
2814
+ exports.ɵz = ProductPropertiesComponent;
2596
2815
 
2597
2816
  Object.defineProperty(exports, '__esModule', { value: true });
2598
2817