@colijnit/product 1.9.3 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/app/components/image-carousel/image-carousel.component.d.ts +4 -4
  2. package/app/components/product-additional-description/product-additional-description.component.d.ts +3 -3
  3. package/app/components/product-additional-info/product-additional-info.component.d.ts +3 -3
  4. package/app/components/product-addtocart/product-addtocart.component.d.ts +6 -4
  5. package/app/components/product-delivery/product-delivery.component.d.ts +2 -2
  6. package/app/components/product-description/product-description.component.d.ts +1 -1
  7. package/app/components/product-documents/product-documents.component.d.ts +1 -1
  8. package/app/components/product-info/product-info.component.d.ts +1 -1
  9. package/app/components/product-info-tabs/product-info-tabs.component.d.ts +3 -3
  10. package/app/components/product-page/product-page.component.d.ts +8 -7
  11. package/app/components/product-properties/product-properties.component.d.ts +1 -1
  12. package/app/components/product-related/product-related.component.d.ts +4 -4
  13. package/app/components/product-stock/product-stock.component.d.ts +2 -2
  14. package/app/ione-product.component.d.ts +8 -8
  15. package/app/ione-product.module.d.ts +2 -2
  16. package/app/model/article-quantity.model.d.ts +1 -1
  17. package/app/product-version.d.ts +6 -0
  18. package/app/service/product-connector-adapter.service.d.ts +27 -0
  19. package/app/service/product-connector.service.d.ts +32 -0
  20. package/app/service/{app-event.service.d.ts → product-event.service.d.ts} +5 -5
  21. package/app/service/product-initializer.service.d.ts +6 -0
  22. package/app/service/product-module.service.d.ts +9 -0
  23. package/app/service/{settings.service.d.ts → product-settings.service.d.ts} +1 -1
  24. package/app/style/product-globals.scss +12 -10
  25. package/bundles/colijnit-product.umd.js +340 -261
  26. package/bundles/colijnit-product.umd.js.map +1 -1
  27. package/bundles/colijnit-product.umd.min.js +2 -2
  28. package/bundles/colijnit-product.umd.min.js.map +1 -1
  29. package/colijnit-product.d.ts +6 -6
  30. package/colijnit-product.metadata.json +1 -1
  31. package/esm2015/app/components/image-carousel/image-carousel.component.js +10 -8
  32. package/esm2015/app/components/product-additional-description/product-additional-description.component.js +3 -3
  33. package/esm2015/app/components/product-additional-info/product-additional-info.component.js +3 -3
  34. package/esm2015/app/components/product-addtocart/product-addtocart.component.js +18 -28
  35. package/esm2015/app/components/product-delivery/product-delivery.component.js +4 -4
  36. package/esm2015/app/components/product-description/product-description.component.js +1 -1
  37. package/esm2015/app/components/product-documents/product-documents.component.js +1 -1
  38. package/esm2015/app/components/product-info/product-info.component.js +1 -1
  39. package/esm2015/app/components/product-info-tabs/product-info-tabs.component.js +3 -3
  40. package/esm2015/app/components/product-page/product-page.component.js +13 -10
  41. package/esm2015/app/components/product-price/product-price.component.js +1 -1
  42. package/esm2015/app/components/product-properties/product-properties.component.js +1 -1
  43. package/esm2015/app/components/product-related/product-related.component.js +10 -6
  44. package/esm2015/app/components/product-stock/product-stock.component.js +3 -3
  45. package/esm2015/app/ione-product.component.js +9 -8
  46. package/esm2015/app/ione-product.module.js +9 -9
  47. package/esm2015/app/model/article-quantity.model.js +1 -1
  48. package/esm2015/app/product-version.js +10 -0
  49. package/esm2015/app/service/dictionary.service.js +2 -2
  50. package/esm2015/app/service/product-connector-adapter.service.js +128 -0
  51. package/esm2015/app/service/product-connector.service.js +108 -0
  52. package/esm2015/app/service/product-event.service.js +41 -0
  53. package/esm2015/app/service/product-initializer.service.js +26 -0
  54. package/esm2015/app/service/product-module.service.js +39 -0
  55. package/esm2015/app/service/product-settings.service.js +142 -0
  56. package/esm2015/colijnit-product.js +7 -7
  57. package/esm2015/public_api.js +2 -1
  58. package/esm5/app/components/image-carousel/image-carousel.component.js +10 -8
  59. package/esm5/app/components/product-additional-description/product-additional-description.component.js +3 -3
  60. package/esm5/app/components/product-additional-info/product-additional-info.component.js +3 -3
  61. package/esm5/app/components/product-addtocart/product-addtocart.component.js +20 -35
  62. package/esm5/app/components/product-delivery/product-delivery.component.js +4 -4
  63. package/esm5/app/components/product-description/product-description.component.js +1 -1
  64. package/esm5/app/components/product-documents/product-documents.component.js +1 -1
  65. package/esm5/app/components/product-info/product-info.component.js +1 -1
  66. package/esm5/app/components/product-info-tabs/product-info-tabs.component.js +3 -3
  67. package/esm5/app/components/product-page/product-page.component.js +13 -10
  68. package/esm5/app/components/product-price/product-price.component.js +1 -1
  69. package/esm5/app/components/product-properties/product-properties.component.js +1 -1
  70. package/esm5/app/components/product-related/product-related.component.js +10 -6
  71. package/esm5/app/components/product-stock/product-stock.component.js +3 -3
  72. package/esm5/app/ione-product.component.js +9 -8
  73. package/esm5/app/ione-product.module.js +9 -9
  74. package/esm5/app/model/article-quantity.model.js +1 -1
  75. package/esm5/app/product-version.js +12 -0
  76. package/esm5/app/service/dictionary.service.js +2 -2
  77. package/esm5/app/service/product-connector-adapter.service.js +197 -0
  78. package/esm5/app/service/product-connector.service.js +128 -0
  79. package/esm5/app/service/product-event.service.js +42 -0
  80. package/esm5/app/service/product-initializer.service.js +29 -0
  81. package/esm5/app/service/product-module.service.js +50 -0
  82. package/esm5/app/service/product-settings.service.js +165 -0
  83. package/esm5/colijnit-product.js +7 -7
  84. package/esm5/public_api.js +2 -1
  85. package/fesm2015/colijnit-product.js +227 -204
  86. package/fesm2015/colijnit-product.js.map +1 -1
  87. package/fesm5/colijnit-product.js +337 -253
  88. package/fesm5/colijnit-product.js.map +1 -1
  89. package/package.json +7 -5
  90. package/public_api.d.ts +1 -0
  91. package/app/service/app-initializer.service.d.ts +0 -6
  92. package/app/service/i-one-connector-adapter.service.d.ts +0 -27
  93. package/app/service/i-one-controller.service.d.ts +0 -37
  94. package/app/service/module.service.d.ts +0 -9
  95. package/app/utils/string-utils.d.ts +0 -21
  96. package/esm2015/app/service/app-event.service.js +0 -41
  97. package/esm2015/app/service/app-initializer.service.js +0 -26
  98. package/esm2015/app/service/i-one-connector-adapter.service.js +0 -58
  99. package/esm2015/app/service/i-one-controller.service.js +0 -117
  100. package/esm2015/app/service/module.service.js +0 -39
  101. package/esm2015/app/service/settings.service.js +0 -136
  102. package/esm2015/app/utils/string-utils.js +0 -51
  103. package/esm5/app/service/app-event.service.js +0 -42
  104. package/esm5/app/service/app-initializer.service.js +0 -29
  105. package/esm5/app/service/i-one-connector-adapter.service.js +0 -61
  106. package/esm5/app/service/i-one-controller.service.js +0 -131
  107. package/esm5/app/service/module.service.js +0 -50
  108. package/esm5/app/service/settings.service.js +0 -159
  109. package/esm5/app/utils/string-utils.js +0 -59
@@ -1,16 +1,32 @@
1
1
  import { __decorate, __awaiter } from 'tslib';
2
2
  import { Input, Component, ɵɵdefineInjectable, Injectable, ɵɵinject, Output, Directive, ChangeDetectorRef, ViewChild, ElementRef, HostListener, HostBinding, Renderer2, SecurityContext, Pipe, EventEmitter, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA, APP_INITIALIZER } from '@angular/core';
3
3
  import { ButtonModule, IconModule, NumberPickerModule, InputTextModule, FilesUploadModule, LoaderModule, ScrollContainerModule, TileModule, LevelIndicatorModule, PriceDisplayPipeModule, ArticleTileModule } from '@colijnit/corecomponents';
4
- import { CoDocument } from '@colijnit//ioneconnector/build/model/co-document';
5
- import { Options } from '@colijnit//ioneconnector/build/model/options';
4
+ import { CoDocument } from '@colijnit/mainapi/build/model/co-document';
6
5
  import { Subject, BehaviorSubject } from 'rxjs';
7
- import { Connector } from '@colijnit//ioneconnector';
6
+ import { Options } from '@colijnit/ioneconnector/build/model/options';
7
+ import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
8
+ import { SuperArticle } from '@colijnit/articleapi/build/model/super-article';
9
+ import { Articles } from '@colijnit/articleapi/build/articles';
10
+ import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/factory/business-object-factory';
11
+ import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
12
+ import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
8
13
  import { HttpClient } from '@angular/common/http';
9
- import { ConfiguratorStatisticsEnvironment } from '@colijnit/ioneconnector/build/model/configurator-statistics-environment';
14
+ import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
10
15
  import { DomSanitizer } from '@angular/platform-browser';
11
16
  import { trigger, state, style, transition, animate } from '@angular/animations';
17
+ import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
12
18
  import { CommonModule } from '@angular/common';
13
19
 
20
+ // this file is dynamically created, do not change this
21
+ class Version {
22
+ constructor() {
23
+ this.name = "@colijnit/product";
24
+ this.description = "Product detail page project for iOne";
25
+ this.symVer = "1.9.4";
26
+ this.publishDate = "20-4-2023 15:19:25";
27
+ }
28
+ }
29
+
14
30
  let ProductDescriptionComponent = class ProductDescriptionComponent {
15
31
  constructor() { }
16
32
  ngOnInit() {
@@ -29,55 +45,120 @@ ProductDescriptionComponent = __decorate([
29
45
 
30
46
  // 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.
31
47
  // Only to be used by the IOneControllerService.
32
- let IOneConnectorAdapterService = class IOneConnectorAdapterService {
48
+ let ProductConnectorAdapterService = class ProductConnectorAdapterService {
33
49
  constructor() {
34
50
  this.showLoader = new Subject();
51
+ this._boFactory = new BusinessObjectFactory();
35
52
  }
36
53
  ngOnDestroy() {
37
- this.connector.showLoader.unsubscribe();
54
+ this.articleConnector.showLoader.unsubscribe();
38
55
  }
39
56
  initConnector(options) {
40
- this.connector = new Connector(options);
41
- options.session = this.connector.session;
42
- this.connector.showLoader.subscribe(value => this.showLoader.next(value));
57
+ this.articleConnector = new Articles(options);
58
+ options.session = this.articleConnector.session;
59
+ this.articleConnector.showLoader.subscribe(value => this.showLoader.next(value));
43
60
  }
44
61
  setInstance(instanceId) {
45
- this.connector.setInstanceToConfigure(instanceId, false);
46
- }
47
- getDeliveryPrognosis(goodId) {
48
- return this.connector.getDeliveryPrognosisForArticle(goodId);
62
+ // this.articleConnector.setInstanceToConfigure(instanceId, false);
49
63
  }
50
- getArticleGroupImages() {
51
- return this.connector.getArticleGroupImages();
64
+ getDeliveryPrognosis(goodId, branchNr) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const deliveryPrognosis = yield this.getSelectorDeliveryDate();
67
+ if (!deliveryPrognosis || !deliveryPrognosis.returnValue) {
68
+ return this.getDeliveryDate2(goodId);
69
+ }
70
+ return deliveryPrognosis;
71
+ });
52
72
  }
53
- getTurnoverGroupImages() {
54
- return this.connector.getTurnoverGroupImages();
73
+ getSelectorDeliveryDate() {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const response = yield this.articleConnector.getSelectorDeliveryDate();
76
+ if (response && response.validationResult && response.validationResult.success) {
77
+ return this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject);
78
+ }
79
+ else {
80
+ return null;
81
+ }
82
+ });
55
83
  }
56
- getSuperArticleImages() {
57
- return this.connector.getSuperArticleImages();
84
+ getDeliveryDate2(goodId) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const response = yield this.articleConnector.getDeliveryDate2(goodId);
87
+ if (response && response.validationResult && response.validationResult.success) {
88
+ return this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject);
89
+ }
90
+ else {
91
+ return null;
92
+ }
93
+ });
58
94
  }
59
95
  getJsonConfiguredArticles(configuratorStatistics) {
60
- return this.connector.getJsonConfiguredArticles(configuratorStatistics);
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const response = yield this.articleConnector.getJsonConfiguredArticles(configuratorStatistics);
98
+ if (response && response.validationResult && response.validationResult.success) {
99
+ return response.resultObject;
100
+ }
101
+ else {
102
+ return '';
103
+ }
104
+ });
61
105
  }
62
- getJsonArticleFlatTree(goodId) {
63
- return this.connector.getJsonArticleFlatTree(goodId);
106
+ getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId, configuratorStatistics) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ return this.articleConnector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
109
+ });
64
110
  }
65
- getFullArticle(skuOrId) {
66
- return this.connector.getFullArticle(skuOrId);
111
+ getGoodIdFromArticleNr(sku) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const response = yield this.articleConnector.getGoodIdFromArticleNr(sku);
114
+ if (response && response.validationResult && response.validationResult.success) {
115
+ return response.resultObject;
116
+ }
117
+ else {
118
+ return null;
119
+ }
120
+ });
67
121
  }
68
- getSuperArticle(id) {
69
- return this.connector.getSuperArticle(id);
122
+ getArticleFullObject(goodId) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ const response = yield this.articleConnector.getArticleFullObject(goodId);
125
+ if (response && response.validationResult && response.validationResult.success) {
126
+ return this._boFactory.makeWithRawBackendData(ArticleFullObject, response.resultObject);
127
+ }
128
+ else {
129
+ return null;
130
+ }
131
+ });
132
+ }
133
+ getSuperArticle(id, branch) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ const response = yield this.articleConnector.getSuperArticleQuickSel(id, branch);
136
+ if (response && response.validationResult && response.validationResult.success) {
137
+ return this._boFactory.makeWithRawBackendData(SuperArticle, response.resultObject);
138
+ }
139
+ else {
140
+ return null;
141
+ }
142
+ });
70
143
  }
71
144
  getDocumentContent(docId, thumbnail = true) {
72
- return this.connector.getDocumentContent(docId, thumbnail);
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const response = yield this.articleConnector.getDocumentContent(docId, thumbnail);
147
+ if (response && response.validationResult && response.validationResult.success) {
148
+ return this._boFactory.makeWithRawBackendData(DocumentContent, response.resultObject);
149
+ }
150
+ else {
151
+ return null;
152
+ }
153
+ });
73
154
  }
74
155
  };
75
- IOneConnectorAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function IOneConnectorAdapterService_Factory() { return new IOneConnectorAdapterService(); }, token: IOneConnectorAdapterService, providedIn: "root" });
76
- IOneConnectorAdapterService = __decorate([
156
+ ProductConnectorAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorAdapterService_Factory() { return new ProductConnectorAdapterService(); }, token: ProductConnectorAdapterService, providedIn: "root" });
157
+ ProductConnectorAdapterService = __decorate([
77
158
  Injectable({
78
159
  providedIn: 'root'
79
160
  })
80
- ], IOneConnectorAdapterService);
161
+ ], ProductConnectorAdapterService);
81
162
 
82
163
  let JsonUtilsService = class JsonUtilsService {
83
164
  readJsonFile(filePath) {
@@ -113,57 +194,6 @@ var LanguageCode;
113
194
  LanguageCode["French"] = "fr-FR";
114
195
  })(LanguageCode || (LanguageCode = {}));
115
196
 
116
- class StringUtils {
117
- /**
118
- * Returns a new string where given placeholder in given source string are replaced by given replacement texts.
119
- *
120
- * Example usage:
121
- *
122
- * source = "ABCDABCD"
123
- * placeholder = "BC"
124
- * replacementTexts = "Z", "Z" (REST arguments)
125
- * OUTPUT = "AZDAZD"
126
- *
127
- * @param {string} source
128
- * @param {string} placeholder
129
- * @param {string} replacementTexts If only one is given, this function replaces all placeholders with that single replacementText.
130
- * If more are given, placeholders without a corresponding replacementText will remain their original placeholder characters.
131
- */
132
- static ReplaceOccurrencesIn(source, placeholder, ...replacementTexts) {
133
- // parameter guards
134
- if (!(source)) {
135
- return undefined;
136
- }
137
- if (!placeholder || replacementTexts.length === 0) {
138
- return source;
139
- }
140
- let outString = source;
141
- // one replacementText means replace for all
142
- if (replacementTexts.length === 1) {
143
- // "g" is the g flag to replace globally
144
- outString = outString.replace(new RegExp(this._escapeRegExp(placeholder), "g"), replacementTexts[0]);
145
- }
146
- else {
147
- // replace occurence i by replacementTexts[i], one at a time in loop (there might be a faster way..)
148
- for (let i = 0, len = replacementTexts.length; i < len; i++) {
149
- outString = outString.replace(placeholder, replacementTexts[i]);
150
- }
151
- }
152
- return outString;
153
- }
154
- static IsString(str) {
155
- return typeof str === 'string';
156
- }
157
- // Returns whether given str is a string and has a length > 0.
158
- static IsStringWithLength(str) {
159
- return str && StringUtils.IsString(str) && str.length > 0;
160
- }
161
- // Returns given string, escaped for use as string literal in regular expressions.
162
- static _escapeRegExp(str) {
163
- return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
164
- }
165
- }
166
-
167
197
  class Dictionary {
168
198
  constructor() {
169
199
  this.strings = {
@@ -355,7 +385,7 @@ class Settings {
355
385
  }
356
386
  }
357
387
 
358
- let SettingsService = class SettingsService {
388
+ let ProductSettingsService = class ProductSettingsService {
359
389
  constructor(_jsonUtilsService, _dictionaryService) {
360
390
  this._jsonUtilsService = _jsonUtilsService;
361
391
  this._dictionaryService = _dictionaryService;
@@ -475,28 +505,28 @@ let SettingsService = class SettingsService {
475
505
  });
476
506
  }
477
507
  };
478
- SettingsService.ctorParameters = () => [
508
+ ProductSettingsService.ctorParameters = () => [
479
509
  { type: JsonUtilsService },
480
510
  { type: DictionaryService }
481
511
  ];
482
- SettingsService = __decorate([
483
- Injectable()
484
- ], SettingsService);
512
+ ProductSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(ɵɵinject(JsonUtilsService), ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
513
+ ProductSettingsService = __decorate([
514
+ Injectable({
515
+ providedIn: 'root'
516
+ })
517
+ ], ProductSettingsService);
485
518
 
486
519
  // Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
487
- let IOneControllerService = class IOneControllerService {
520
+ let ProductConnectorService = class ProductConnectorService {
488
521
  constructor(connector, _settingsService) {
489
522
  this.connector = connector;
490
523
  this._settingsService = _settingsService;
491
524
  this.controllerInitialized = new BehaviorSubject(false);
492
525
  this._initializing = false;
493
526
  this._initialized = false;
494
- this.defaultDevTestOptions = new Options();
527
+ this.connectorOptions = new Options();
495
528
  this.subs = [];
496
529
  }
497
- get article() {
498
- return this._article;
499
- }
500
530
  get shouldShowLoader() {
501
531
  return this._shouldShowLoader;
502
532
  }
@@ -514,18 +544,20 @@ let IOneControllerService = class IOneControllerService {
514
544
  if (!settings) {
515
545
  throw Error('Settings are not defined!');
516
546
  }
517
- this.defaultDevTestOptions.url = settings.url;
518
- this.defaultDevTestOptions.schema = settings.schema;
519
- this.defaultDevTestOptions.version = settings.version;
520
- this.defaultDevTestOptions.branch = settings.branch;
521
- this.defaultDevTestOptions.username = settings.username;
522
- this.defaultDevTestOptions.password = settings.password;
523
- this.defaultDevTestOptions.currencyId = settings.currency;
524
- this.defaultDevTestOptions.useGroups = settings.useGroups;
525
- this.defaultDevTestOptions.useRenders = settings.useRenders;
526
- this.defaultDevTestOptions.useLoginEncryption = settings.useEncryption;
527
- this.connector.initConnector(this.defaultDevTestOptions);
528
- this._settingsService.settings.session = this.defaultDevTestOptions.session;
547
+ this.connectorOptions.url = settings.url;
548
+ this.connectorOptions.schema = settings.schema;
549
+ this.connectorOptions.version = settings.version;
550
+ this.connectorOptions.branch = settings.branch;
551
+ this.connectorOptions.username = settings.username;
552
+ this.connectorOptions.password = settings.password;
553
+ this.connectorOptions.session = settings.session;
554
+ this.connectorOptions.currencyId = settings.currency;
555
+ this.connectorOptions.useGroups = settings.useGroups;
556
+ this.connectorOptions.useRenders = settings.useRenders;
557
+ this.connectorOptions.useLoginEncryption = settings.useEncryption;
558
+ this.connectorOptions.languageCode = settings.languageCode;
559
+ this.connector.initConnector(this.connectorOptions);
560
+ this._settingsService.settings.session = this.connectorOptions.session;
529
561
  this.controllerInitialized.next(true);
530
562
  this._initialized = true;
531
563
  this._initializing = false;
@@ -538,8 +570,14 @@ let IOneControllerService = class IOneControllerService {
538
570
  setInstance(instanceId) {
539
571
  this.connector.setInstance(instanceId);
540
572
  }
541
- getFullArticle(skuOrId) {
542
- return this.connector.getFullArticle(skuOrId);
573
+ getFullArticle(sku) {
574
+ return __awaiter(this, void 0, void 0, function* () {
575
+ const goodId = yield this.connector.getGoodIdFromArticleNr(sku);
576
+ if (goodId) {
577
+ return this.connector.getArticleFullObject(goodId);
578
+ }
579
+ return null;
580
+ });
543
581
  }
544
582
  getDocumentContent(docId, thumbnail = true) {
545
583
  return this.connector.getDocumentContent(docId, thumbnail);
@@ -547,49 +585,36 @@ let IOneControllerService = class IOneControllerService {
547
585
  getDeliveryPrognosis(goodId) {
548
586
  return this.connector.getDeliveryPrognosis(goodId);
549
587
  }
550
- // will be called in future
551
- getArticleGroupImages() {
552
- return this.connector.getArticleGroupImages();
553
- }
554
- getTurnoverGroupImages() {
555
- return this.connector.getTurnoverGroupImages();
588
+ getSelectorDeliveryDate() {
589
+ return __awaiter(this, void 0, void 0, function* () {
590
+ return this.connector.getSelectorDeliveryDate();
591
+ });
556
592
  }
557
- // will be called in future
558
- getSuperArticleImages() {
559
- return this.connector.getSuperArticleImages();
593
+ getDeliveryDate2(goodId) {
594
+ return this.connector.getDeliveryDate2(goodId);
560
595
  }
561
596
  getSuperArticle(id) {
562
597
  return this.connector.getSuperArticle(id);
563
598
  }
564
- getJsonConfiguredArticles() {
565
- const configuratorStatistics = new ConfiguratorStatisticsEnvironment();
566
- configuratorStatistics.userType = 'iOneProductPage';
567
- configuratorStatistics.transactionType = 'Sales';
568
- configuratorStatistics.actionDomain = 'bundle';
569
- configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
570
- configuratorStatistics.webHost = window.location.host;
571
- configuratorStatistics.bundleHost = window.location.host;
572
- return this.connector.getJsonConfiguredArticles(configuratorStatistics);
573
- }
574
- getJsonArticleFlatTree(goodId) {
575
- return this.connector.getJsonArticleFlatTree(goodId);
599
+ getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId, configuratorStatistics) {
600
+ return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
576
601
  }
577
602
  onShowLoaderChange(showLoader) {
578
603
  this._shouldShowLoader = showLoader;
579
604
  }
580
605
  };
581
- IOneControllerService.ctorParameters = () => [
582
- { type: IOneConnectorAdapterService },
583
- { type: SettingsService }
606
+ ProductConnectorService.ctorParameters = () => [
607
+ { type: ProductConnectorAdapterService },
608
+ { type: ProductSettingsService }
584
609
  ];
585
- IOneControllerService.ɵprov = ɵɵdefineInjectable({ factory: function IOneControllerService_Factory() { return new IOneControllerService(ɵɵinject(IOneConnectorAdapterService), ɵɵinject(SettingsService)); }, token: IOneControllerService, providedIn: "root" });
586
- IOneControllerService = __decorate([
610
+ ProductConnectorService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(ɵɵinject(ProductConnectorAdapterService), ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
611
+ ProductConnectorService = __decorate([
587
612
  Injectable({
588
613
  providedIn: 'root'
589
614
  })
590
- ], IOneControllerService);
615
+ ], ProductConnectorService);
591
616
 
592
- let AppEventService = class AppEventService {
617
+ let ProductEventService = class ProductEventService {
593
618
  constructor() {
594
619
  this.onAddToCart = new Subject();
595
620
  this.onAlternativeClick = new Subject();
@@ -605,25 +630,25 @@ let AppEventService = class AppEventService {
605
630
  this.onUpdateProductInfoTab = new Subject();
606
631
  }
607
632
  };
608
- AppEventService.ɵprov = ɵɵdefineInjectable({ factory: function AppEventService_Factory() { return new AppEventService(); }, token: AppEventService, providedIn: "root" });
633
+ ProductEventService.ɵprov = ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
609
634
  __decorate([
610
635
  Output()
611
- ], AppEventService.prototype, "onAddToCart", void 0);
636
+ ], ProductEventService.prototype, "onAddToCart", void 0);
612
637
  __decorate([
613
638
  Output()
614
- ], AppEventService.prototype, "onAlternativeClick", void 0);
639
+ ], ProductEventService.prototype, "onAlternativeClick", void 0);
615
640
  __decorate([
616
641
  Output()
617
- ], AppEventService.prototype, "onAddToQuote", void 0);
642
+ ], ProductEventService.prototype, "onAddToQuote", void 0);
618
643
  __decorate([
619
644
  Output()
620
- ], AppEventService.prototype, "onForceRenderImage", void 0);
621
- AppEventService = __decorate([
645
+ ], ProductEventService.prototype, "onForceRenderImage", void 0);
646
+ ProductEventService = __decorate([
622
647
  Directive(),
623
648
  Injectable({
624
649
  providedIn: 'root'
625
650
  })
626
- ], AppEventService);
651
+ ], ProductEventService);
627
652
 
628
653
  /** AUTO GENERATED FILE. DO NOT CHANGE.. **/
629
654
  var IconEnum;
@@ -788,8 +813,10 @@ let ImageCarouselComponent = class ImageCarouselComponent {
788
813
  if (this._images) {
789
814
  this._images.forEach((i) => {
790
815
  if (!i.documentBody && !i.filePath) {
791
- this._ione.getDocumentContent(i.documentId, false).then((body) => {
792
- i.documentBody = body;
816
+ this._ione.getDocumentContent(i.documentId, false).then((content) => {
817
+ if (content) {
818
+ i.documentBody = content.documentContent;
819
+ }
793
820
  });
794
821
  }
795
822
  });
@@ -809,8 +836,8 @@ let ImageCarouselComponent = class ImageCarouselComponent {
809
836
  }
810
837
  };
811
838
  ImageCarouselComponent.ctorParameters = () => [
812
- { type: IOneControllerService },
813
- { type: AppEventService },
839
+ { type: ProductConnectorService },
840
+ { type: ProductEventService },
814
841
  { type: ChangeDetectorRef },
815
842
  { type: DomSanitizer },
816
843
  { type: IconCacheService }
@@ -874,12 +901,15 @@ let ProductPageComponent = class ProductPageComponent {
874
901
  this.show3D = false;
875
902
  this.configuring = false;
876
903
  this.fullscreenAnimationEnd = false;
904
+ this.settingsLoaded = false;
877
905
  this._fullScreen = false;
878
906
  this._subs = [];
879
907
  this._subs.push(this.appEventService.onForceRenderImage.subscribe((x) => {
880
908
  if (this.selections.nativeElement) {
881
909
  this.selections.nativeElement.forceRenderImage();
882
910
  }
911
+ }), this.settingsService.settingsLoaded.subscribe((loaded) => {
912
+ this.settingsLoaded = loaded;
883
913
  }));
884
914
  }
885
915
  set sku(value) {
@@ -958,11 +988,11 @@ let ProductPageComponent = class ProductPageComponent {
958
988
  if (this.configurable) {
959
989
  this.currentView = SelectorType.TwoD;
960
990
  }
961
- this.threeD = this.article.homeBrandId !== undefined && this.article.homeBrandId !== null;
991
+ this.threeD = this.article.is3D;
962
992
  this.selectorType = this.article.selectorTypeCustomer;
963
993
  this._ione.getDeliveryPrognosis(this.article.goodId).then((stockInfo) => {
964
994
  const stockAndDelivery = stockInfo;
965
- this.stockAndDelivery = new StockAndDelivery(stockAndDelivery.stock, stockAndDelivery.deliveryDescription);
995
+ this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
966
996
  this._changeDetector.detectChanges();
967
997
  });
968
998
  this._changeDetector.detectChanges();
@@ -973,12 +1003,12 @@ let ProductPageComponent = class ProductPageComponent {
973
1003
  }
974
1004
  };
975
1005
  ProductPageComponent.ctorParameters = () => [
976
- { type: IOneControllerService },
1006
+ { type: ProductConnectorService },
977
1007
  { type: Renderer2 },
978
1008
  { type: ChangeDetectorRef },
979
1009
  { type: IconCacheService },
980
- { type: SettingsService },
981
- { type: AppEventService }
1010
+ { type: ProductSettingsService },
1011
+ { type: ProductEventService }
982
1012
  ];
983
1013
  __decorate([
984
1014
  ViewChild('configurator', { read: ElementRef })
@@ -995,7 +1025,7 @@ __decorate([
995
1025
  ProductPageComponent = __decorate([
996
1026
  Component({
997
1027
  selector: 'app-product-page',
998
- 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 <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 <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 <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 </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",
1028
+ 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",
999
1029
  animations: [
1000
1030
  trigger('toggleFullScreen', [
1001
1031
  state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
@@ -1090,14 +1120,18 @@ let ProductRelatedComponent = class ProductRelatedComponent {
1090
1120
  _loadImages() {
1091
1121
  this._articles.forEach((a) => {
1092
1122
  if (!a.image.documentBody) {
1093
- this._iOne.getDocumentContent(a.image.documentId).then(d => a.image.documentBody = d);
1123
+ this._iOne.getDocumentContent(a.image.documentId).then((content) => {
1124
+ if (content) {
1125
+ a.image.documentBody = content.documentContent;
1126
+ }
1127
+ });
1094
1128
  }
1095
1129
  });
1096
1130
  }
1097
1131
  };
1098
1132
  ProductRelatedComponent.ctorParameters = () => [
1099
- { type: IOneControllerService },
1100
- { type: AppEventService }
1133
+ { type: ProductConnectorService },
1134
+ { type: ProductEventService }
1101
1135
  ];
1102
1136
  __decorate([
1103
1137
  Input()
@@ -1172,7 +1206,7 @@ ProductInfoComponent = __decorate([
1172
1206
  })
1173
1207
  ], ProductInfoComponent);
1174
1208
 
1175
- let ModuleService = class ModuleService {
1209
+ let ProductModuleService = class ProductModuleService {
1176
1210
  constructor(_iOneConnectorService) {
1177
1211
  this._iOneConnectorService = _iOneConnectorService;
1178
1212
  this._superArticles = new Map();
@@ -1195,15 +1229,15 @@ let ModuleService = class ModuleService {
1195
1229
  });
1196
1230
  }
1197
1231
  };
1198
- ModuleService.ctorParameters = () => [
1199
- { type: IOneControllerService }
1232
+ ProductModuleService.ctorParameters = () => [
1233
+ { type: ProductConnectorService }
1200
1234
  ];
1201
- ModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ModuleService_Factory() { return new ModuleService(ɵɵinject(IOneControllerService)); }, token: ModuleService, providedIn: "root" });
1202
- ModuleService = __decorate([
1235
+ ProductModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
1236
+ ProductModuleService = __decorate([
1203
1237
  Injectable({
1204
1238
  providedIn: 'root'
1205
1239
  })
1206
- ], ModuleService);
1240
+ ], ProductModuleService);
1207
1241
 
1208
1242
  class BitUtils {
1209
1243
  static IsShortDescription(bit) {
@@ -1299,7 +1333,7 @@ let ProductAdditionalInfoComponent = class ProductAdditionalInfoComponent {
1299
1333
  };
1300
1334
  ProductAdditionalInfoComponent.ctorParameters = () => [
1301
1335
  { type: DomSanitizer },
1302
- { type: ModuleService },
1336
+ { type: ProductModuleService },
1303
1337
  { type: ChangeDetectorRef }
1304
1338
  ];
1305
1339
  __decorate([
@@ -1415,7 +1449,7 @@ let ProductDeliveryComponent = class ProductDeliveryComponent {
1415
1449
  };
1416
1450
  ProductDeliveryComponent.ctorParameters = () => [
1417
1451
  { type: LocalizePipe },
1418
- { type: IOneControllerService },
1452
+ { type: ProductConnectorService },
1419
1453
  { type: IconCacheService }
1420
1454
  ];
1421
1455
  __decorate([
@@ -1424,7 +1458,7 @@ __decorate([
1424
1458
  ProductDeliveryComponent = __decorate([
1425
1459
  Component({
1426
1460
  selector: 'app-product-delivery',
1427
- 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\"></div>\n </div>\n</div>\n",
1461
+ 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",
1428
1462
  providers: [LocalizePipe],
1429
1463
  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}}"]
1430
1464
  })
@@ -1446,7 +1480,7 @@ let ProductStockComponent = class ProductStockComponent {
1446
1480
  }
1447
1481
  };
1448
1482
  ProductStockComponent.ctorParameters = () => [
1449
- { type: IOneControllerService },
1483
+ { type: ProductConnectorService },
1450
1484
  { type: IconCacheService }
1451
1485
  ];
1452
1486
  __decorate([
@@ -1558,10 +1592,11 @@ ProductPriceComponent = __decorate([
1558
1592
  ], ProductPriceComponent);
1559
1593
 
1560
1594
  let ProductAddtocartComponent = class ProductAddtocartComponent {
1561
- constructor(iconCache, _ioneControllerService, _appEventService) {
1595
+ constructor(iconCache, _ioneControllerService, _appEventService, _settingsService) {
1562
1596
  this.iconCache = iconCache;
1563
1597
  this._ioneControllerService = _ioneControllerService;
1564
1598
  this._appEventService = _appEventService;
1599
+ this._settingsService = _settingsService;
1565
1600
  this.icon = IconEnum;
1566
1601
  this.configurable = false;
1567
1602
  this.configuring = false;
@@ -1595,35 +1630,22 @@ let ProductAddtocartComponent = class ProductAddtocartComponent {
1595
1630
  }
1596
1631
  _getJSONFromArticleObject(article) {
1597
1632
  return __awaiter(this, void 0, void 0, function* () {
1598
- const returnObject = { goodId: 0, baseGoodId: 0, selectorData: {}, quantity: 0, articleTree: {} };
1599
- returnObject.baseGoodId = article.article.goodId;
1600
- returnObject.selectorData = {};
1601
- returnObject.quantity = article.quantity;
1602
- if (article.article.goodType === 'B') {
1603
- const selectorDataJson = yield this._ioneControllerService.getJsonConfiguredArticles();
1604
- const selectorDataObject = JSON.parse(selectorDataJson);
1605
- returnObject.goodId = selectorDataObject.hasOwnProperty('compositionGoodId') ? selectorDataObject['compositionGoodId'] : selectorDataObject['goodId'];
1606
- returnObject.selectorData = selectorDataObject;
1607
- const articleFlatTreeJson = yield this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId);
1608
- if (articleFlatTreeJson) {
1609
- returnObject.articleTree = JSON.parse(articleFlatTreeJson);
1610
- }
1611
- }
1612
- else { // treat as simple article
1613
- returnObject.goodId = article.article.goodId;
1614
- const articleFlatTreeJson = yield this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId);
1615
- if (articleFlatTreeJson) {
1616
- returnObject.articleTree = JSON.parse(articleFlatTreeJson);
1617
- }
1618
- }
1619
- return JSON.stringify(returnObject);
1633
+ const configuratorStatistics = new ConfiguratorStatisticsEnvironment();
1634
+ configuratorStatistics.userType = 'iOneProductPage';
1635
+ configuratorStatistics.transactionType = 'Sales';
1636
+ configuratorStatistics.actionDomain = 'bundle';
1637
+ configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
1638
+ configuratorStatistics.webHost = window.location.host;
1639
+ configuratorStatistics.bundleHost = window.location.host;
1640
+ return yield this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, undefined, configuratorStatistics);
1620
1641
  });
1621
1642
  }
1622
1643
  };
1623
1644
  ProductAddtocartComponent.ctorParameters = () => [
1624
1645
  { type: IconCacheService },
1625
- { type: IOneControllerService },
1626
- { type: AppEventService }
1646
+ { type: ProductConnectorService },
1647
+ { type: ProductEventService },
1648
+ { type: ProductSettingsService }
1627
1649
  ];
1628
1650
  __decorate([
1629
1651
  ViewChild('addtocartbutton', { read: ElementRef })
@@ -1715,6 +1737,7 @@ let IoneProductComponent = class IoneProductComponent {
1715
1737
  // this.sku = 'CF-39904ANT';
1716
1738
  // this.sku = 'CF-22346001';
1717
1739
  // this.sku = '104';
1740
+ // this.sku = '1000561986';
1718
1741
  this._dictionary = _dictionary;
1719
1742
  this._jsonUtils = _jsonUtils;
1720
1743
  this._ione = _ione;
@@ -1780,10 +1803,10 @@ let IoneProductComponent = class IoneProductComponent {
1780
1803
  IoneProductComponent.ctorParameters = () => [
1781
1804
  { type: DictionaryService },
1782
1805
  { type: JsonUtilsService },
1783
- { type: IOneControllerService },
1806
+ { type: ProductConnectorService },
1784
1807
  { type: ChangeDetectorRef },
1785
- { type: AppEventService },
1786
- { type: SettingsService }
1808
+ { type: ProductEventService },
1809
+ { type: ProductSettingsService }
1787
1810
  ];
1788
1811
  __decorate([
1789
1812
  Input()
@@ -1856,7 +1879,7 @@ let ProductAdditionalDescriptionComponent = class ProductAdditionalDescriptionCo
1856
1879
  }
1857
1880
  };
1858
1881
  ProductAdditionalDescriptionComponent.ctorParameters = () => [
1859
- { type: AppEventService }
1882
+ { type: ProductEventService }
1860
1883
  ];
1861
1884
  __decorate([
1862
1885
  Input()
@@ -1913,7 +1936,7 @@ let ProductInfoTabsComponent = class ProductInfoTabsComponent {
1913
1936
  }
1914
1937
  };
1915
1938
  ProductInfoTabsComponent.ctorParameters = () => [
1916
- { type: AppEventService }
1939
+ { type: ProductEventService }
1917
1940
  ];
1918
1941
  __decorate([
1919
1942
  ViewChild('tabContent')
@@ -1929,7 +1952,7 @@ ProductInfoTabsComponent = __decorate([
1929
1952
  })
1930
1953
  ], ProductInfoTabsComponent);
1931
1954
 
1932
- let AppInitializerService = class AppInitializerService {
1955
+ let ProductInitializerService = class ProductInitializerService {
1933
1956
  constructor(_settingsService) {
1934
1957
  this._settingsService = _settingsService;
1935
1958
  }
@@ -1939,15 +1962,15 @@ let AppInitializerService = class AppInitializerService {
1939
1962
  });
1940
1963
  }
1941
1964
  };
1942
- AppInitializerService.ctorParameters = () => [
1943
- { type: SettingsService }
1965
+ ProductInitializerService.ctorParameters = () => [
1966
+ { type: ProductSettingsService }
1944
1967
  ];
1945
- AppInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function AppInitializerService_Factory() { return new AppInitializerService(ɵɵinject(SettingsService)); }, token: AppInitializerService, providedIn: "root" });
1946
- AppInitializerService = __decorate([
1968
+ ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
1969
+ ProductInitializerService = __decorate([
1947
1970
  Injectable({
1948
1971
  providedIn: 'root',
1949
1972
  })
1950
- ], AppInitializerService);
1973
+ ], ProductInitializerService);
1951
1974
 
1952
1975
  function initializeApp(context) {
1953
1976
  const x = () => context.initializeApp();
@@ -1998,14 +2021,14 @@ IoneProductModule = __decorate([
1998
2021
  IoneProductComponent
1999
2022
  ],
2000
2023
  providers: [
2001
- SettingsService,
2002
- IOneControllerService,
2003
- IOneConnectorAdapterService,
2024
+ ProductSettingsService,
2025
+ ProductConnectorService,
2026
+ ProductConnectorAdapterService,
2004
2027
  IconCacheService,
2005
2028
  {
2006
2029
  provide: APP_INITIALIZER,
2007
2030
  useFactory: initializeApp,
2008
- deps: [AppInitializerService],
2031
+ deps: [ProductInitializerService],
2009
2032
  multi: true
2010
2033
  }
2011
2034
  ],
@@ -2020,5 +2043,5 @@ IoneProductModule = __decorate([
2020
2043
  * Generated bundle index. Do not edit.
2021
2044
  */
2022
2045
 
2023
- export { IoneProductModule, initializeApp, IoneProductComponent as ɵa, DictionaryService as ɵb, ProductAdditionalDescriptionComponent as ɵba, AppInitializerService as ɵbb, JsonUtilsService as ɵc, IOneControllerService as ɵd, IOneConnectorAdapterService as ɵe, SettingsService as ɵf, AppEventService as ɵg, ProductPageComponent as ɵh, IconCacheService as ɵi, ImageCarouselComponent as ɵj, ProductDescriptionComponent as ɵk, ProductDocumentsComponent as ɵl, ProductRelatedComponent as ɵm, HeaderComponent as ɵn, ProductInfoComponent as ɵo, ProductAdditionalInfoComponent as ɵp, ModuleService as ɵq, ProductPropertiesComponent as ɵr, ProductDeliveryComponent as ɵs, LocalizePipe as ɵt, ProductStockComponent as ɵu, ProductSymbolsComponent as ɵv, ProductPriceComponent as ɵw, ProductAddtocartComponent as ɵx, ProductInfoTabsComponent as ɵy, ProductSelectorTypeComponent as ɵz };
2046
+ export { IoneProductModule, Version, initializeApp, IoneProductComponent as ɵa, DictionaryService as ɵb, ProductAdditionalDescriptionComponent as ɵba, ProductInitializerService as ɵbb, JsonUtilsService as ɵc, ProductConnectorService as ɵd, ProductConnectorAdapterService as ɵe, ProductSettingsService as ɵf, ProductEventService as ɵg, ProductPageComponent as ɵh, IconCacheService as ɵi, ImageCarouselComponent as ɵj, ProductDescriptionComponent as ɵk, ProductDocumentsComponent as ɵl, ProductRelatedComponent as ɵm, HeaderComponent as ɵn, ProductInfoComponent as ɵo, ProductAdditionalInfoComponent as ɵp, ProductModuleService as ɵq, ProductPropertiesComponent as ɵr, ProductDeliveryComponent as ɵs, LocalizePipe as ɵt, ProductStockComponent as ɵu, ProductSymbolsComponent as ɵv, ProductPriceComponent as ɵw, ProductAddtocartComponent as ɵx, ProductInfoTabsComponent as ɵy, ProductSelectorTypeComponent as ɵz };
2024
2047
  //# sourceMappingURL=colijnit-product.js.map