@colijnit/product 2.9.1 → 12.0.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 (138) hide show
  1. package/app/components/core/header/header.module.d.ts +2 -0
  2. package/app/components/image-carousel/image-carousel.module.d.ts +2 -0
  3. package/app/components/product-additional-description/product-additional-description.module.d.ts +2 -0
  4. package/app/components/product-additional-info/product-additional-info.module.d.ts +2 -0
  5. package/app/components/product-addtocart/product-addtocart.module.d.ts +2 -0
  6. package/app/components/product-delivery/product-delivery.module.d.ts +2 -0
  7. package/app/components/product-description/product-description.module.d.ts +2 -0
  8. package/app/components/product-documents/product-document.module.d.ts +2 -0
  9. package/app/components/product-info-tabs/product-info-tabs.module.d.ts +2 -0
  10. package/app/components/product-page/product-page.component.d.ts +3 -1
  11. package/app/components/product-price/product-price.module.d.ts +2 -0
  12. package/app/components/product-properties/product-properties.module.d.ts +2 -0
  13. package/app/components/product-related/product-related.module.d.ts +2 -0
  14. package/app/components/product-selector-type/product-selector-type.module.d.ts +2 -0
  15. package/app/components/product-stock/product-stock.component.d.ts +3 -1
  16. package/app/components/product-stock/product-stock.module.d.ts +2 -0
  17. package/app/components/product-symbols/product-symbols.module.d.ts +2 -0
  18. package/app/ione-product.component.d.ts +2 -0
  19. package/bundles/colijnit-product.umd.js +1431 -959
  20. package/bundles/colijnit-product.umd.js.map +1 -1
  21. package/colijnit-product.d.ts +40 -27
  22. package/colijnit-product.metadata.json +1 -1
  23. package/esm2015/app/components/core/header/header.component.js +21 -17
  24. package/esm2015/app/components/core/header/header.module.js +19 -0
  25. package/esm2015/app/components/image-carousel/image-carousel.component.js +51 -35
  26. package/esm2015/app/components/image-carousel/image-carousel.module.js +23 -0
  27. package/esm2015/app/components/product-additional-description/product-additional-description.component.js +20 -15
  28. package/esm2015/app/components/product-additional-description/product-additional-description.module.js +21 -0
  29. package/esm2015/app/components/product-additional-info/product-additional-info.component.js +22 -20
  30. package/esm2015/app/components/product-additional-info/product-additional-info.module.js +21 -0
  31. package/esm2015/app/components/product-addtocart/product-addtocart.component.js +43 -40
  32. package/esm2015/app/components/product-addtocart/product-addtocart.module.js +24 -0
  33. package/esm2015/app/components/product-delivery/product-delivery.component.js +22 -15
  34. package/esm2015/app/components/product-delivery/product-delivery.module.js +23 -0
  35. package/esm2015/app/components/product-description/product-description.component.js +18 -14
  36. package/esm2015/app/components/product-description/product-description.module.js +19 -0
  37. package/esm2015/app/components/product-documents/product-document.module.js +25 -0
  38. package/esm2015/app/components/product-documents/product-documents.component.js +19 -18
  39. package/esm2015/app/components/product-external-source/product-external-source.component.js +32 -45
  40. package/esm2015/app/components/product-external-source/product-external-source.module.js +17 -19
  41. package/esm2015/app/components/product-info-tabs/product-info-tabs.component.js +36 -18
  42. package/esm2015/app/components/product-info-tabs/product-info-tabs.module.js +29 -0
  43. package/esm2015/app/components/product-page/product-page.component.js +56 -60
  44. package/esm2015/app/components/product-page/product-page.module.js +40 -62
  45. package/esm2015/app/components/product-price/product-price.component.js +26 -19
  46. package/esm2015/app/components/product-price/product-price.module.js +23 -0
  47. package/esm2015/app/components/product-properties/product-properties.component.js +24 -17
  48. package/esm2015/app/components/product-properties/product-properties.module.js +21 -0
  49. package/esm2015/app/components/product-related/product-related.component.js +33 -24
  50. package/esm2015/app/components/product-related/product-related.module.js +24 -0
  51. package/esm2015/app/components/product-selector-type/product-selector-type.component.js +32 -28
  52. package/esm2015/app/components/product-selector-type/product-selector-type.module.js +23 -0
  53. package/esm2015/app/components/product-stock/product-stock.component.js +29 -16
  54. package/esm2015/app/components/product-stock/product-stock.module.js +23 -0
  55. package/esm2015/app/components/product-symbols/product-symbols.component.js +28 -17
  56. package/esm2015/app/components/product-symbols/product-symbols.module.js +26 -0
  57. package/esm2015/app/enum/icon.enum.js +1 -1
  58. package/esm2015/app/enum/language-code.enum.js +1 -1
  59. package/esm2015/app/enum/selector-type.enum.js +1 -1
  60. package/esm2015/app/ione-product.component.js +39 -51
  61. package/esm2015/app/ione-product.module.js +21 -27
  62. package/esm2015/app/model/article-quantity.model.js +1 -1
  63. package/esm2015/app/model/icon.js +1 -1
  64. package/esm2015/app/model/productSettings.js +1 -1
  65. package/esm2015/app/model/render-modes.js +1 -1
  66. package/esm2015/app/model/render-parameters.js +1 -1
  67. package/esm2015/app/model/settings-options.js +1 -1
  68. package/esm2015/app/model/stock-and-delivery.js +1 -1
  69. package/esm2015/app/pipe/localize.pipe.js +8 -12
  70. package/esm2015/app/pipe/pipe.module.js +16 -18
  71. package/esm2015/app/product-version.js +3 -3
  72. package/esm2015/app/service/dictionary.service.js +10 -11
  73. package/esm2015/app/service/icon-cache.service.js +10 -12
  74. package/esm2015/app/service/product-connector-adapter.service.js +8 -8
  75. package/esm2015/app/service/product-connector.service.js +7 -8
  76. package/esm2015/app/service/product-event.service.js +12 -20
  77. package/esm2015/app/service/product-settings.service.js +7 -8
  78. package/esm2015/app/utils/bit-utils.js +1 -1
  79. package/esm2015/app/utils/json-utils.service.js +9 -10
  80. package/esm2015/assets/dictionary/text.properties.js +1 -1
  81. package/esm2015/colijnit-product.js +41 -28
  82. package/esm2015/public_api.js +2 -1
  83. package/fesm2015/colijnit-product.js +1053 -722
  84. package/fesm2015/colijnit-product.js.map +1 -1
  85. package/package.json +15 -18
  86. package/public_api.d.ts +1 -0
  87. package/app/components/product-info/product-info.component.d.ts +0 -14
  88. package/bundles/colijnit-product.umd.min.js +0 -16
  89. package/bundles/colijnit-product.umd.min.js.map +0 -1
  90. package/esm2015/app/components/product-info/product-info.component.js +0 -38
  91. package/esm5/app/components/core/header/header.component.js +0 -24
  92. package/esm5/app/components/image-carousel/image-carousel.component.js +0 -170
  93. package/esm5/app/components/product-additional-description/product-additional-description.component.js +0 -59
  94. package/esm5/app/components/product-additional-info/product-additional-info.component.js +0 -142
  95. package/esm5/app/components/product-addtocart/product-addtocart.component.js +0 -133
  96. package/esm5/app/components/product-delivery/product-delivery.component.js +0 -47
  97. package/esm5/app/components/product-description/product-description.component.js +0 -21
  98. package/esm5/app/components/product-documents/product-documents.component.js +0 -31
  99. package/esm5/app/components/product-external-source/product-external-source.component.js +0 -126
  100. package/esm5/app/components/product-external-source/product-external-source.module.js +0 -26
  101. package/esm5/app/components/product-info/product-info.component.js +0 -39
  102. package/esm5/app/components/product-info-tabs/product-info-tabs.component.js +0 -70
  103. package/esm5/app/components/product-page/product-page.component.js +0 -247
  104. package/esm5/app/components/product-page/product-page.module.js +0 -69
  105. package/esm5/app/components/product-price/product-price.component.js +0 -74
  106. package/esm5/app/components/product-properties/product-properties.component.js +0 -60
  107. package/esm5/app/components/product-related/product-related.component.js +0 -78
  108. package/esm5/app/components/product-selector-type/product-selector-type.component.js +0 -54
  109. package/esm5/app/components/product-stock/product-stock.component.js +0 -41
  110. package/esm5/app/components/product-symbols/product-symbols.component.js +0 -43
  111. package/esm5/app/enum/icon.enum.js +0 -19
  112. package/esm5/app/enum/language-code.enum.js +0 -8
  113. package/esm5/app/enum/selector-type.enum.js +0 -7
  114. package/esm5/app/ione-product.component.js +0 -194
  115. package/esm5/app/ione-product.module.js +0 -35
  116. package/esm5/app/model/article-quantity.model.js +0 -7
  117. package/esm5/app/model/icon.js +0 -18
  118. package/esm5/app/model/productSettings.js +0 -18
  119. package/esm5/app/model/render-modes.js +0 -7
  120. package/esm5/app/model/render-parameters.js +0 -12
  121. package/esm5/app/model/settings-options.js +0 -15
  122. package/esm5/app/model/stock-and-delivery.js +0 -10
  123. package/esm5/app/pipe/localize.pipe.js +0 -33
  124. package/esm5/app/pipe/pipe.module.js +0 -23
  125. package/esm5/app/product-version.js +0 -12
  126. package/esm5/app/service/dictionary.service.js +0 -95
  127. package/esm5/app/service/icon-cache.service.js +0 -47
  128. package/esm5/app/service/product-connector-adapter.service.js +0 -248
  129. package/esm5/app/service/product-connector.service.js +0 -141
  130. package/esm5/app/service/product-event.service.js +0 -38
  131. package/esm5/app/service/product-settings.service.js +0 -107
  132. package/esm5/app/utils/bit-utils.js +0 -22
  133. package/esm5/app/utils/json-utils.service.js +0 -42
  134. package/esm5/assets/dictionary/text.properties.js +0 -67
  135. package/esm5/colijnit-product.js +0 -33
  136. package/esm5/public_api.js +0 -5
  137. package/fesm5/colijnit-product.js +0 -2581
  138. package/fesm5/colijnit-product.js.map +0 -1
@@ -1,2581 +0,0 @@
1
- import { __awaiter, __generator, __decorate, __spread } from 'tslib';
2
- import { ɵɵdefineInjectable, Injectable, ɵɵinject, Output, Directive, EventEmitter, ChangeDetectorRef, Input, Component, ViewEncapsulation, HostBinding, Renderer2, ViewChild, ElementRef, HostListener, Pipe, NgModule, SecurityContext, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import { Subject, BehaviorSubject } from 'rxjs';
4
- import { Options } from '@colijnit/ioneconnector/build/model/options';
5
- import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
6
- import { SuperArticle } from '@colijnit/articleapi/build/model/super-article';
7
- import { Articles } from '@colijnit/articleapi/build/articles';
8
- import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
9
- import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
10
- import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
11
- import { Transaction } from '@colijnit/transactionapi/build/transaction';
12
- import { MainApi } from '@colijnit/mainapi';
13
- import { HttpClient } from '@angular/common/http';
14
- import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
15
- import { CommonModule } from '@angular/common';
16
- import { DomSanitizer } from '@angular/platform-browser';
17
- import { trigger, state, style, transition, animate } from '@angular/animations';
18
- import { CoDocument } from '@colijnit/mainapi/build/model/co-document';
19
- import { IconModule, LoaderModule, NumberPickerModule, ButtonModule, PriceDisplayPipeModule, InputTextModule, FilesUploadModule, ScrollContainerModule, TileModule, LevelIndicatorModule, ArticleTileModule } from '@colijnit/corecomponents';
20
- import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
21
-
22
- // this file is dynamically created, do not change this
23
- var Version = /** @class */ (function () {
24
- function Version() {
25
- this.name = "@colijnit/product";
26
- this.description = "Product detail page project for iOne";
27
- this.symVer = "2.9.1";
28
- this.publishDate = "14-9-2023 16:32:35";
29
- }
30
- return Version;
31
- }());
32
-
33
- var JsonUtilsService = /** @class */ (function () {
34
- function JsonUtilsService() {
35
- }
36
- JsonUtilsService.prototype.readJsonFile = function (filePath) {
37
- return __awaiter(this, void 0, void 0, function () {
38
- var response, e_1;
39
- return __generator(this, function (_a) {
40
- switch (_a.label) {
41
- case 0:
42
- _a.trys.push([0, 2, , 3]);
43
- return [4 /*yield*/, fetch(filePath)];
44
- case 1:
45
- response = _a.sent();
46
- if (!response.ok) {
47
- return [2 /*return*/, null];
48
- }
49
- else {
50
- return [2 /*return*/, response.json()];
51
- }
52
- return [3 /*break*/, 3];
53
- case 2:
54
- e_1 = _a.sent();
55
- console.error('Error getting file:', e_1.message);
56
- return [2 /*return*/, ''];
57
- case 3: return [2 /*return*/];
58
- }
59
- });
60
- });
61
- };
62
- JsonUtilsService.ɵprov = ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
63
- JsonUtilsService = __decorate([
64
- Injectable({
65
- providedIn: 'root'
66
- })
67
- ], JsonUtilsService);
68
- return JsonUtilsService;
69
- }());
70
-
71
- var SettingsOptions = /** @class */ (function () {
72
- function SettingsOptions() {
73
- this.showStockStatus = false;
74
- this.showZoomButton = false;
75
- this.showTagFilter = false;
76
- this.showAsConfigured = false;
77
- this.inlineAnswers = false;
78
- this.showArButton = false;
79
- this.arEnabled = false;
80
- this.vrEnabled = false;
81
- }
82
- return SettingsOptions;
83
- }());
84
-
85
- var RenderModes;
86
- (function (RenderModes) {
87
- RenderModes["RenderRoom"] = "render_room";
88
- RenderModes["RenderShop"] = "render_shop";
89
- RenderModes["RenderIone"] = "render_ione";
90
- })(RenderModes || (RenderModes = {}));
91
-
92
- var RenderParameters = /** @class */ (function () {
93
- function RenderParameters() {
94
- this.host = "";
95
- this.port = 0;
96
- this.secure = false;
97
- this.renderMode = RenderModes.RenderShop;
98
- }
99
- return RenderParameters;
100
- }());
101
-
102
- var ProductSettings = /** @class */ (function () {
103
- function ProductSettings() {
104
- this.session = undefined;
105
- this.useGroups = true;
106
- this.useRenders = false;
107
- this.useLoginEncryption = true;
108
- this.createWebOrder = true;
109
- this.useMatch = false;
110
- this.currencySymbol = '€';
111
- this.options = new SettingsOptions();
112
- this.renderParameters = new RenderParameters();
113
- }
114
- return ProductSettings;
115
- }());
116
-
117
- // 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.
118
- // Only to be used by the IOneControllerService.
119
- var ProductConnectorAdapterService = /** @class */ (function () {
120
- function ProductConnectorAdapterService() {
121
- this.showLoader = new Subject();
122
- this._boFactory = new BusinessObjectFactory();
123
- }
124
- ProductConnectorAdapterService.prototype.ngOnDestroy = function () {
125
- this.articleConnector.showLoader.unsubscribe();
126
- };
127
- ProductConnectorAdapterService.prototype.initConnector = function (options) {
128
- return __awaiter(this, void 0, void 0, function () {
129
- var _this = this;
130
- return __generator(this, function (_a) {
131
- switch (_a.label) {
132
- case 0:
133
- this.articleConnector = new Articles(options);
134
- return [4 /*yield*/, this.articleConnector.connect()];
135
- case 1:
136
- _a.sent();
137
- this.transactionConnector = new Transaction(options);
138
- this.articleConnector.showLoader.subscribe(function (value) { return _this.showLoader.next(value); });
139
- return [2 /*return*/];
140
- }
141
- });
142
- });
143
- };
144
- ProductConnectorAdapterService.prototype.setInstance = function (instanceId) {
145
- // this.articleConnector.setInstanceToConfigure(instanceId, false);
146
- };
147
- ProductConnectorAdapterService.prototype.getProductBundleSettings = function (url, upId) {
148
- return __awaiter(this, void 0, void 0, function () {
149
- var tempSettings, tempMainConnector, response;
150
- return __generator(this, function (_a) {
151
- switch (_a.label) {
152
- case 0:
153
- tempSettings = new ProductSettings();
154
- tempSettings.url = url;
155
- tempSettings.schema = upId.toString();
156
- tempMainConnector = new MainApi(tempSettings);
157
- return [4 /*yield*/, tempMainConnector.getPublicParams(upId)];
158
- case 1:
159
- response = _a.sent();
160
- if (response) {
161
- return [2 /*return*/, response.productSettings];
162
- }
163
- return [2 /*return*/, ""];
164
- }
165
- });
166
- });
167
- };
168
- ProductConnectorAdapterService.prototype.getDeliveryPrognosis = function (goodId, branchNr) {
169
- return __awaiter(this, void 0, void 0, function () {
170
- var deliveryPrognosis;
171
- return __generator(this, function (_a) {
172
- switch (_a.label) {
173
- case 0: return [4 /*yield*/, this.getSelectorDeliveryDate()];
174
- case 1:
175
- deliveryPrognosis = _a.sent();
176
- if (!deliveryPrognosis || !deliveryPrognosis.returnValue) {
177
- return [2 /*return*/, this.getDeliveryDate2(goodId)];
178
- }
179
- return [2 /*return*/, deliveryPrognosis];
180
- }
181
- });
182
- });
183
- };
184
- ProductConnectorAdapterService.prototype.getSelectorDeliveryDate = function () {
185
- return __awaiter(this, void 0, void 0, function () {
186
- var response;
187
- return __generator(this, function (_a) {
188
- switch (_a.label) {
189
- case 0: return [4 /*yield*/, this.articleConnector.getSelectorDeliveryDate()];
190
- case 1:
191
- response = _a.sent();
192
- if (response && response.validationResult && response.validationResult.success) {
193
- return [2 /*return*/, this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject)];
194
- }
195
- else {
196
- return [2 /*return*/, null];
197
- }
198
- return [2 /*return*/];
199
- }
200
- });
201
- });
202
- };
203
- ProductConnectorAdapterService.prototype.getDeliveryDate2 = function (goodId) {
204
- return __awaiter(this, void 0, void 0, function () {
205
- var response;
206
- return __generator(this, function (_a) {
207
- switch (_a.label) {
208
- case 0: return [4 /*yield*/, this.articleConnector.getDeliveryDate2(goodId)];
209
- case 1:
210
- response = _a.sent();
211
- if (response && response.validationResult && response.validationResult.success) {
212
- return [2 /*return*/, this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject)];
213
- }
214
- else {
215
- return [2 /*return*/, null];
216
- }
217
- return [2 /*return*/];
218
- }
219
- });
220
- });
221
- };
222
- ProductConnectorAdapterService.prototype.getJsonConfiguredArticles = function (configuratorStatistics) {
223
- return __awaiter(this, void 0, void 0, function () {
224
- var response;
225
- return __generator(this, function (_a) {
226
- switch (_a.label) {
227
- case 0: return [4 /*yield*/, this.articleConnector.getJsonConfiguredArticles(configuratorStatistics)];
228
- case 1:
229
- response = _a.sent();
230
- if (response && response.validationResult && response.validationResult.success) {
231
- return [2 /*return*/, response.resultObject];
232
- }
233
- else {
234
- return [2 /*return*/, ''];
235
- }
236
- return [2 /*return*/];
237
- }
238
- });
239
- });
240
- };
241
- ProductConnectorAdapterService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
242
- if (showLoader === void 0) { showLoader = true; }
243
- return __awaiter(this, void 0, void 0, function () {
244
- return __generator(this, function (_a) {
245
- return [2 /*return*/, this.articleConnector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics)];
246
- });
247
- });
248
- };
249
- ProductConnectorAdapterService.prototype.getGoodIdFromArticleNr = function (sku) {
250
- return __awaiter(this, void 0, void 0, function () {
251
- var response;
252
- return __generator(this, function (_a) {
253
- switch (_a.label) {
254
- case 0: return [4 /*yield*/, this.articleConnector.getGoodIdFromArticleNr(sku)];
255
- case 1:
256
- response = _a.sent();
257
- if (response && response.validationResult && response.validationResult.success) {
258
- return [2 /*return*/, response.resultObject];
259
- }
260
- else {
261
- return [2 /*return*/, null];
262
- }
263
- return [2 /*return*/];
264
- }
265
- });
266
- });
267
- };
268
- ProductConnectorAdapterService.prototype.getArticleFullObject = function (goodId) {
269
- return __awaiter(this, void 0, void 0, function () {
270
- var response;
271
- return __generator(this, function (_a) {
272
- switch (_a.label) {
273
- case 0: return [4 /*yield*/, this.articleConnector.getArticleFullObject(goodId)];
274
- case 1:
275
- response = _a.sent();
276
- if (response && response.validationResult && response.validationResult.success) {
277
- return [2 /*return*/, this._boFactory.makeWithRawBackendData(ArticleFullObject, response.resultObject)];
278
- }
279
- else {
280
- return [2 /*return*/, null];
281
- }
282
- return [2 /*return*/];
283
- }
284
- });
285
- });
286
- };
287
- ProductConnectorAdapterService.prototype.getSuperArticle = function (id, branch) {
288
- return __awaiter(this, void 0, void 0, function () {
289
- var response;
290
- return __generator(this, function (_a) {
291
- switch (_a.label) {
292
- case 0: return [4 /*yield*/, this.articleConnector.getSuperArticleQuickSel(id, branch)];
293
- case 1:
294
- response = _a.sent();
295
- if (response && response.validationResult && response.validationResult.success) {
296
- return [2 /*return*/, this._boFactory.makeWithRawBackendData(SuperArticle, response.resultObject)];
297
- }
298
- else {
299
- return [2 /*return*/, null];
300
- }
301
- return [2 /*return*/];
302
- }
303
- });
304
- });
305
- };
306
- ProductConnectorAdapterService.prototype.getDocumentContent = function (docId, thumbnail) {
307
- if (thumbnail === void 0) { thumbnail = true; }
308
- return __awaiter(this, void 0, void 0, function () {
309
- var response;
310
- return __generator(this, function (_a) {
311
- switch (_a.label) {
312
- case 0: return [4 /*yield*/, this.articleConnector.getDocumentContent(docId, thumbnail)];
313
- case 1:
314
- response = _a.sent();
315
- if (response && response.validationResult && response.validationResult.success) {
316
- return [2 /*return*/, this._boFactory.makeWithRawBackendData(DocumentContent, response.resultObject)];
317
- }
318
- else {
319
- return [2 /*return*/, null];
320
- }
321
- return [2 /*return*/];
322
- }
323
- });
324
- });
325
- };
326
- ProductConnectorAdapterService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
327
- return __awaiter(this, void 0, void 0, function () {
328
- return __generator(this, function (_a) {
329
- switch (_a.label) {
330
- case 0: return [4 /*yield*/, this.transactionConnector.addWebSessionTransactionLine(sku, quantity)];
331
- case 1: return [2 /*return*/, _a.sent()];
332
- }
333
- });
334
- });
335
- };
336
- ProductConnectorAdapterService.prototype.getWebTransaction = function () {
337
- return __awaiter(this, void 0, void 0, function () {
338
- return __generator(this, function (_a) {
339
- switch (_a.label) {
340
- case 0: return [4 /*yield*/, this.transactionConnector.getWebSessionSalesOrder()];
341
- case 1: return [2 /*return*/, _a.sent()];
342
- }
343
- });
344
- });
345
- };
346
- ProductConnectorAdapterService = __decorate([
347
- Injectable()
348
- ], ProductConnectorAdapterService);
349
- return ProductConnectorAdapterService;
350
- }());
351
-
352
- var LanguageCode;
353
- (function (LanguageCode) {
354
- LanguageCode["Dutch"] = "nl-NL";
355
- LanguageCode["English"] = "en-GB";
356
- LanguageCode["German"] = "de-DE";
357
- LanguageCode["French"] = "fr-FR";
358
- })(LanguageCode || (LanguageCode = {}));
359
-
360
- var Dictionary = /** @class */ (function () {
361
- function Dictionary() {
362
- this.strings = {
363
- "nl": {
364
- "ADDITIONAL_DATA": "Extra informatie",
365
- "ALTERNATIVE_PRODUCTS": "Alternatieve producten",
366
- "ARTICLE_NUMBER": "Artikel nummer",
367
- "CATEGORY": "Categorie",
368
- "CATEGORY_TYPE": "Categorie type",
369
- "CONFIGURE": "Configureren",
370
- "DELIVERY_TIME_PERIOD": "Levertijd",
371
- "DESCRIPTION": "Omschrijving",
372
- "DOCUMENTS": "Documenten",
373
- "DOWNLOADS": "Downloads",
374
- "FEATURES": "Kenmerken",
375
- "HEIGHT": "Hoogte",
376
- "MATERIAL": "Materiaal",
377
- "PRODUCT_IN_STOCK": "Op voorraad",
378
- "PRODUCT_NOT_IN_STOCK": "Niet op voorraad",
379
- "PROPERTIES": "Eigenschappen",
380
- "QUOTATION": "Quotatie",
381
- "READ_MORE": "Lees meer",
382
- "RELATED_PRODUCTS": "Gerelateerde producten",
383
- "SHOPPING_CART_IN": "In winkelwagen",
384
- "SHOW_IN": "Laat zien",
385
- "STOCK": "Voorraad",
386
- "SYMBOLS": "Symbolen",
387
- "TITLE": "Titel",
388
- "TURNOVERGROUP": "Omzetgroep",
389
- "VARIANTS": "Varianten",
390
- "WIDTH": "Breedte"
391
- },
392
- "de": {
393
- "ADDITIONAL_DATA": "Extra informatie",
394
- "ALTERNATIVE_PRODUCTS": "Alternative Produkte",
395
- "ARTICLE_NUMBER": "Artikelnummer",
396
- "CATEGORY": "Kategorie",
397
- "CATEGORY_TYPE": "Kategorietype",
398
- "CONFIGURE": "Konfigurieren",
399
- "DELIVERY_TIME_PERIOD": "Lieferzeit",
400
- "DESCRIPTION": "Beschreibung",
401
- "DOCUMENTS": "Dateien",
402
- "DOWNLOADS": "Downloads",
403
- "FEATURES": "Eigenschaften",
404
- "HEIGHT": "Höhe",
405
- "MATERIAL": "Material",
406
- "PRODUCT_IN_STOCK": "Auf lager",
407
- "PRODUCT_NOT_IN_STOCK": "Nicht auf lager",
408
- "PROPERTIES": "Eigenschaften",
409
- "QUOTATION": "Angebot",
410
- "READ_MORE": "Lesen Sie mehr",
411
- "RELATED_PRODUCTS": "Verwandte Produkte",
412
- "SHOPPING_CART_IN": "Im Einkaufswagen",
413
- "SHOW_IN": "Zeigen",
414
- "STOCK": "Vorrat",
415
- "SYMBOLS": "Symbole",
416
- "TITLE": "Titulatur",
417
- "TURNOVERGROUP": "Umsatzgruppe",
418
- "VARIANTS": "Varianten",
419
- "WIDTH": "Breite"
420
- }
421
- };
422
- }
423
- return Dictionary;
424
- }());
425
-
426
- // The localization service, providing peers with text translation functionality.
427
- var DictionaryService = /** @class */ (function () {
428
- function DictionaryService(_http, _jsonUtils) {
429
- this._http = _http;
430
- this._jsonUtils = _jsonUtils;
431
- this.dictionaryUrl = 'js/browser/res/dictionary/';
432
- // private _dictionaryPromise: Map<LanguageCode, Promise<{ [key: string]: string }>> = new Map<LanguageCode, Promise<{ [key: string]: string }>>();
433
- this._dictionaries = new Map();
434
- // Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
435
- this._placeholder = '|~';
436
- }
437
- Object.defineProperty(DictionaryService.prototype, "language", {
438
- get: function () {
439
- return this._language;
440
- },
441
- enumerable: true,
442
- configurable: true
443
- });
444
- Object.defineProperty(DictionaryService.prototype, "rootUrl", {
445
- set: function (value) {
446
- this._rootUrl = value;
447
- this._dictBasePath = this._rootUrl + '/' + this.dictionaryUrl;
448
- },
449
- enumerable: true,
450
- configurable: true
451
- });
452
- // Loads the dictionary for given language in memory.
453
- DictionaryService.prototype.setDictionary = function (language) {
454
- return __awaiter(this, void 0, void 0, function () {
455
- var dictionary;
456
- return __generator(this, function (_a) {
457
- this._language = language || LanguageCode.Dutch;
458
- if (!this._dictionaries.has(this._language)) {
459
- dictionary = new Dictionary();
460
- if (dictionary.strings[this._language.substr(0, 2).toLowerCase()] !== undefined) {
461
- this._dictionaries.set(this._language, dictionary.strings[this._language.substr(0, 2).toLowerCase()]);
462
- }
463
- }
464
- return [2 /*return*/];
465
- });
466
- });
467
- };
468
- /**
469
- * Returns the localized text for the given dictionary key.
470
- * @param {string} key
471
- * @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
472
- * @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
473
- * @returns {string} The translated text for given dictionary key
474
- */
475
- DictionaryService.prototype.get = function (key, upperCaseFirst) {
476
- if (upperCaseFirst === void 0) { upperCaseFirst = true; }
477
- var replacementTexts = [];
478
- for (var _i = 2; _i < arguments.length; _i++) {
479
- replacementTexts[_i - 2] = arguments[_i];
480
- }
481
- if (!StringUtils.IsStringWithLength(key)) {
482
- return key || '';
483
- }
484
- var text = this._dictionaries.get(this.language)[key];
485
- text = StringUtils.IsStringWithLength(text) ? text : key;
486
- if (upperCaseFirst) {
487
- text = text.charAt(0).toUpperCase() + text.slice(1);
488
- }
489
- else {
490
- text = text.charAt(0).toLowerCase() + text.slice(1);
491
- }
492
- if (replacementTexts.length > 0) {
493
- text = StringUtils.ReplaceOccurrencesIn.apply(StringUtils, __spread([text, this._placeholder], replacementTexts));
494
- }
495
- return text;
496
- };
497
- DictionaryService.ctorParameters = function () { return [
498
- { type: HttpClient },
499
- { type: JsonUtilsService }
500
- ]; };
501
- DictionaryService.ɵprov = ɵɵdefineInjectable({ factory: function DictionaryService_Factory() { return new DictionaryService(ɵɵinject(HttpClient), ɵɵinject(JsonUtilsService)); }, token: DictionaryService, providedIn: "root" });
502
- DictionaryService = __decorate([
503
- Injectable({
504
- providedIn: 'root'
505
- })
506
- ], DictionaryService);
507
- return DictionaryService;
508
- }());
509
-
510
- var ProductSettingsService = /** @class */ (function () {
511
- function ProductSettingsService(_jsonUtilsService, _dictionaryService) {
512
- this._jsonUtilsService = _jsonUtilsService;
513
- this._dictionaryService = _dictionaryService;
514
- this.settingsLoaded = new BehaviorSubject(false);
515
- }
516
- Object.defineProperty(ProductSettingsService.prototype, "settings", {
517
- get: function () {
518
- return this._settings;
519
- },
520
- set: function (value) {
521
- this._settings = value;
522
- },
523
- enumerable: true,
524
- configurable: true
525
- });
526
- ProductSettingsService.prototype.initializeSettings = function () {
527
- return __awaiter(this, void 0, void 0, function () {
528
- var jsonSettings;
529
- return __generator(this, function (_a) {
530
- switch (_a.label) {
531
- case 0:
532
- if (!(typeof settings === 'undefined')) return [3 /*break*/, 2];
533
- return [4 /*yield*/, this._jsonUtilsService.readJsonFile('product-settings.json')];
534
- case 1:
535
- jsonSettings = _a.sent();
536
- if (jsonSettings) {
537
- this.settings = Object.assign(new ProductSettings(), jsonSettings);
538
- this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
539
- this.settingsFinished();
540
- }
541
- return [3 /*break*/, 3];
542
- case 2:
543
- this.settings = Object.assign(new ProductSettings(), settings);
544
- this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
545
- this.settingsFinished();
546
- _a.label = 3;
547
- case 3: return [2 /*return*/];
548
- }
549
- });
550
- });
551
- };
552
- ProductSettingsService.prototype.createSettingsFromObject = function (obj) {
553
- return __awaiter(this, void 0, void 0, function () {
554
- var ownOptions, ownRenderParameters;
555
- return __generator(this, function (_a) {
556
- if (!this.settings) {
557
- this.settings = new ProductSettings();
558
- }
559
- ownOptions = Object.assign({}, this.settings.options);
560
- ownRenderParameters = Object.assign({}, this.settings.renderParameters);
561
- this.settings = Object.assign({}, this.settings, obj);
562
- if (obj.renderParameters) {
563
- this.settings.renderParameters = Object.assign({}, ownRenderParameters, obj.renderParameters);
564
- }
565
- if (obj.options) {
566
- this.settings.options = Object.assign({}, ownOptions, obj.options);
567
- }
568
- if (obj.hasOwnProperty('assetPath')) {
569
- this.settings.assetPath = obj['assetPath'];
570
- if (this.settings.assetPath[this.settings.assetPath.length - 1] !== '/') {
571
- this.settings.assetPath += '/';
572
- }
573
- this.settings.threeDAssetPath = this.settings.assetPath;
574
- }
575
- if (obj.hasOwnProperty('threeDAssetPath')) {
576
- this.settings.threeDAssetPath = obj['threeDAssetPath'];
577
- if (this.settings.threeDAssetPath[this.settings.threeDAssetPath.length - 1] !== '/') {
578
- this.settings.threeDAssetPath += '/';
579
- }
580
- }
581
- this.settingsFinished();
582
- return [2 /*return*/];
583
- });
584
- });
585
- };
586
- ProductSettingsService.prototype.settingsFinished = function () {
587
- return __awaiter(this, void 0, void 0, function () {
588
- return __generator(this, function (_a) {
589
- switch (_a.label) {
590
- case 0: return [4 /*yield*/, this._dictionaryService.setDictionary(this.settings.languageCode)];
591
- case 1:
592
- _a.sent();
593
- this.settingsLoaded.next(true);
594
- return [2 /*return*/];
595
- }
596
- });
597
- });
598
- };
599
- ProductSettingsService.ctorParameters = function () { return [
600
- { type: JsonUtilsService },
601
- { type: DictionaryService }
602
- ]; };
603
- ProductSettingsService = __decorate([
604
- Injectable()
605
- ], ProductSettingsService);
606
- return ProductSettingsService;
607
- }());
608
-
609
- // Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
610
- var ProductConnectorService = /** @class */ (function () {
611
- function ProductConnectorService(_adapterService, _settingsService) {
612
- this._adapterService = _adapterService;
613
- this._settingsService = _settingsService;
614
- this.controllerInitialized = new BehaviorSubject(false);
615
- this._initializing = false;
616
- this._initialized = false;
617
- this.connectorOptions = new Options();
618
- this.subs = [];
619
- }
620
- Object.defineProperty(ProductConnectorService.prototype, "shouldShowLoader", {
621
- get: function () {
622
- return this._shouldShowLoader;
623
- },
624
- enumerable: true,
625
- configurable: true
626
- });
627
- ProductConnectorService.prototype.ngOnDestroy = function () {
628
- this.subs.forEach(function (sub) { return sub.unsubscribe(); });
629
- };
630
- ProductConnectorService.prototype.initConnection = function () {
631
- return __awaiter(this, void 0, void 0, function () {
632
- var settings, e_1;
633
- return __generator(this, function (_a) {
634
- switch (_a.label) {
635
- case 0:
636
- if (this._initialized || this._initializing) {
637
- return [2 /*return*/];
638
- }
639
- this._initializing = true;
640
- _a.label = 1;
641
- case 1:
642
- _a.trys.push([1, 3, , 4]);
643
- settings = this._settingsService.settings;
644
- if (!settings) {
645
- throw Error('Settings are not defined!');
646
- }
647
- this.connectorOptions = Object.assign(new Options(), settings);
648
- return [4 /*yield*/, this._adapterService.initConnector(this.connectorOptions)];
649
- case 2:
650
- _a.sent();
651
- this.controllerInitialized.next(true);
652
- this._initialized = true;
653
- this._initializing = false;
654
- return [3 /*break*/, 4];
655
- case 3:
656
- e_1 = _a.sent();
657
- this._initializing = false;
658
- return [3 /*break*/, 4];
659
- case 4: return [2 /*return*/];
660
- }
661
- });
662
- });
663
- };
664
- ProductConnectorService.prototype.getProductBundleSettings = function (url, upId) {
665
- return __awaiter(this, void 0, void 0, function () {
666
- return __generator(this, function (_a) {
667
- return [2 /*return*/, this._adapterService.getProductBundleSettings(url, upId)];
668
- });
669
- });
670
- };
671
- ProductConnectorService.prototype.setInstance = function (instanceId) {
672
- this._instanceId = instanceId;
673
- this._adapterService.setInstance(instanceId);
674
- };
675
- ProductConnectorService.prototype.getFullArticle = function (sku) {
676
- return __awaiter(this, void 0, void 0, function () {
677
- var goodId;
678
- return __generator(this, function (_a) {
679
- switch (_a.label) {
680
- case 0: return [4 /*yield*/, this._adapterService.getGoodIdFromArticleNr(sku)];
681
- case 1:
682
- goodId = _a.sent();
683
- if (goodId) {
684
- return [2 /*return*/, this._adapterService.getArticleFullObject(goodId)];
685
- }
686
- return [2 /*return*/, null];
687
- }
688
- });
689
- });
690
- };
691
- ProductConnectorService.prototype.getDocumentContent = function (docId, thumbnail) {
692
- if (thumbnail === void 0) { thumbnail = true; }
693
- return this._adapterService.getDocumentContent(docId, thumbnail);
694
- };
695
- ProductConnectorService.prototype.getDeliveryPrognosis = function (goodId) {
696
- return this._adapterService.getDeliveryPrognosis(goodId);
697
- };
698
- ProductConnectorService.prototype.getSelectorDeliveryDate = function () {
699
- return __awaiter(this, void 0, void 0, function () {
700
- return __generator(this, function (_a) {
701
- return [2 /*return*/, this._adapterService.getSelectorDeliveryDate()];
702
- });
703
- });
704
- };
705
- ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
706
- return this._adapterService.getDeliveryDate2(goodId);
707
- };
708
- ProductConnectorService.prototype.getSuperArticle = function (id) {
709
- return this._adapterService.getSuperArticle(id);
710
- };
711
- ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, configuratorStatistics) {
712
- if (showLoader === void 0) { showLoader = true; }
713
- return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, this._instanceId, configuratorStatistics);
714
- };
715
- ProductConnectorService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
716
- return __awaiter(this, void 0, void 0, function () {
717
- return __generator(this, function (_a) {
718
- switch (_a.label) {
719
- case 0: return [4 /*yield*/, this._adapterService.addWebSessionTransactionLine(sku, quantity)];
720
- case 1: return [2 /*return*/, _a.sent()];
721
- }
722
- });
723
- });
724
- };
725
- ProductConnectorService.prototype.getWebTransaction = function () {
726
- this._adapterService.getWebTransaction().then(function (response) {
727
- console.log(response);
728
- });
729
- };
730
- ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
731
- this._shouldShowLoader = showLoader;
732
- };
733
- ProductConnectorService.ctorParameters = function () { return [
734
- { type: ProductConnectorAdapterService },
735
- { type: ProductSettingsService }
736
- ]; };
737
- ProductConnectorService = __decorate([
738
- Injectable()
739
- ], ProductConnectorService);
740
- return ProductConnectorService;
741
- }());
742
-
743
- var ProductEventService = /** @class */ (function () {
744
- function ProductEventService() {
745
- this.onAddToCart = new Subject();
746
- this.onAlternativeClick = new Subject();
747
- this.onAddToQuote = new Subject();
748
- this.onForceRenderImage = new Subject();
749
- this.onArticleReceived = new Subject();
750
- this.onSelectionsReceived = new Subject();
751
- this.onImageReceived = new Subject();
752
- this.onRenderStarted = new Subject();
753
- this.onRenderImageReceived = new Subject();
754
- this.onDraftRenderImageReceived = new Subject();
755
- this.onArticleInfoReceived = new Subject();
756
- this.onUpdateProductInfoTab = new Subject();
757
- }
758
- __decorate([
759
- Output()
760
- ], ProductEventService.prototype, "onAddToCart", void 0);
761
- __decorate([
762
- Output()
763
- ], ProductEventService.prototype, "onAlternativeClick", void 0);
764
- __decorate([
765
- Output()
766
- ], ProductEventService.prototype, "onAddToQuote", void 0);
767
- __decorate([
768
- Output()
769
- ], ProductEventService.prototype, "onForceRenderImage", void 0);
770
- ProductEventService = __decorate([
771
- Directive(),
772
- Injectable()
773
- ], ProductEventService);
774
- return ProductEventService;
775
- }());
776
-
777
- var IoneProductComponent = /** @class */ (function () {
778
- function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
779
- // this.sku = 'CF-HILL';
780
- // this.sku = 'CF-ALMADA';
781
- // this.sku = 'CF-39904ANT';
782
- // this.sku = 'CF-22346001';
783
- // this.sku = '104';
784
- // this.sku = '1000561986';
785
- // this.sku = '1000567768';
786
- // this.sku = '1000234793';
787
- // this.sku = '1066';
788
- // this.sku = '104';
789
- var _this = this;
790
- this._dictionary = _dictionary;
791
- this._jsonUtils = _jsonUtils;
792
- this._ione = _ione;
793
- this._changeDetector = _changeDetector;
794
- this._appEventService = _appEventService;
795
- this._settingsService = _settingsService;
796
- this.onAddToCart = new EventEmitter();
797
- this.forceRenderImage = new EventEmitter();
798
- this.onAlternativeClick = new EventEmitter();
799
- this.onArticleInfoReceived = new EventEmitter();
800
- this.onArticleReceived = new EventEmitter();
801
- this.onSelectionsReceived = new EventEmitter();
802
- this.onAddToQuote = new EventEmitter();
803
- this.settingsLoaded = false;
804
- this._subs = [];
805
- // this.sku = "70000107";
806
- this._subs.push(
807
- // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
808
- this._appEventService.onAddToCart.subscribe(function (json) {
809
- _this._handleAddToCart(json);
810
- }), 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); }), this._settingsService.settingsLoaded.subscribe(function (loaded) {
811
- _this.settingsLoaded = loaded;
812
- }));
813
- }
814
- Object.defineProperty(IoneProductComponent.prototype, "settings", {
815
- get: function () {
816
- return this._settings;
817
- },
818
- set: function (value) {
819
- if (value) {
820
- var settings = void 0;
821
- if (typeof value === 'string') {
822
- settings = JSON.parse(value);
823
- }
824
- else {
825
- settings = value;
826
- }
827
- this._settingsService.createSettingsFromObject(settings);
828
- // this._initConnection(settings);
829
- }
830
- },
831
- enumerable: true,
832
- configurable: true
833
- });
834
- IoneProductComponent.prototype.ngOnInit = function () {
835
- return __awaiter(this, void 0, void 0, function () {
836
- return __generator(this, function (_a) {
837
- switch (_a.label) {
838
- case 0: return [4 /*yield*/, this._settingsService.initializeSettings()];
839
- case 1:
840
- _a.sent();
841
- return [2 /*return*/];
842
- }
843
- });
844
- });
845
- };
846
- IoneProductComponent.prototype.ngOnChanges = function (changes) {
847
- this._changeDetector.detectChanges();
848
- };
849
- IoneProductComponent.prototype.ngOnDestroy = function () {
850
- this._subs.forEach(function (s) { return s.unsubscribe(); });
851
- };
852
- IoneProductComponent.prototype._handleAnswerInfoReceived = function (info) {
853
- this.onArticleInfoReceived.next(info);
854
- };
855
- IoneProductComponent.prototype._handleAddToCart = function (json) {
856
- return __awaiter(this, void 0, void 0, function () {
857
- var articleTreeData, compositeGoods, _loop_1, this_1, i;
858
- return __generator(this, function (_a) {
859
- switch (_a.label) {
860
- case 0:
861
- if (!this._settingsService.settings.createWebOrder) return [3 /*break*/, 7];
862
- if (!json) return [3 /*break*/, 7];
863
- articleTreeData = JSON.parse(json);
864
- if (!(articleTreeData.articleTree && articleTreeData.articleTree.article)) return [3 /*break*/, 7];
865
- if (!(articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
866
- articleTreeData.articleTree.compositeGoods.length > 0 &&
867
- articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles))) return [3 /*break*/, 5];
868
- compositeGoods = articleTreeData.articleTree.compositeGoods;
869
- compositeGoods.sort(function (a, b) { return a.versionNumber < b.versionNumber ? -1 : 1; });
870
- _loop_1 = function (i) {
871
- var good, subArticle;
872
- return __generator(this, function (_a) {
873
- switch (_a.label) {
874
- case 0:
875
- good = compositeGoods[i];
876
- subArticle = articleTreeData.articleTree.subArticles.find(function (s) { return s.goodId === good.memberGoodId; });
877
- if (!subArticle) return [3 /*break*/, 2];
878
- return [4 /*yield*/, this_1._ione.addWebSessionTransactionLine(subArticle.articleNumber, good.quantity)];
879
- case 1:
880
- _a.sent();
881
- _a.label = 2;
882
- case 2: return [2 /*return*/];
883
- }
884
- });
885
- };
886
- this_1 = this;
887
- i = 0;
888
- _a.label = 1;
889
- case 1:
890
- if (!(i < compositeGoods.length)) return [3 /*break*/, 4];
891
- return [5 /*yield**/, _loop_1(i)];
892
- case 2:
893
- _a.sent();
894
- _a.label = 3;
895
- case 3:
896
- i++;
897
- return [3 /*break*/, 1];
898
- case 4: return [3 /*break*/, 7];
899
- case 5: return [4 /*yield*/, this._ione.addWebSessionTransactionLine(articleTreeData.articleTree.article.articleNumber, 1)];
900
- case 6:
901
- _a.sent();
902
- _a.label = 7;
903
- case 7:
904
- this.onAddToCart.emit(json);
905
- return [2 /*return*/];
906
- }
907
- });
908
- });
909
- };
910
- IoneProductComponent.ctorParameters = function () { return [
911
- { type: DictionaryService },
912
- { type: JsonUtilsService },
913
- { type: ProductConnectorService },
914
- { type: ChangeDetectorRef },
915
- { type: ProductEventService },
916
- { type: ProductSettingsService }
917
- ]; };
918
- __decorate([
919
- Input()
920
- ], IoneProductComponent.prototype, "sku", void 0);
921
- __decorate([
922
- Input()
923
- ], IoneProductComponent.prototype, "settings", null);
924
- __decorate([
925
- Output()
926
- ], IoneProductComponent.prototype, "onAddToCart", void 0);
927
- __decorate([
928
- Output()
929
- ], IoneProductComponent.prototype, "forceRenderImage", void 0);
930
- __decorate([
931
- Output()
932
- ], IoneProductComponent.prototype, "onAlternativeClick", void 0);
933
- __decorate([
934
- Output()
935
- ], IoneProductComponent.prototype, "onArticleInfoReceived", void 0);
936
- __decorate([
937
- Output()
938
- ], IoneProductComponent.prototype, "onArticleReceived", void 0);
939
- __decorate([
940
- Output()
941
- ], IoneProductComponent.prototype, "onSelectionsReceived", void 0);
942
- __decorate([
943
- Output()
944
- ], IoneProductComponent.prototype, "onAddToQuote", void 0);
945
- IoneProductComponent = __decorate([
946
- Component({
947
- selector: 'app-ione-product',
948
- template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n [sku]=\"sku\"\n ></app-product-page>\n ",
949
- providers: [
950
- ProductEventService,
951
- ProductSettingsService,
952
- ProductConnectorAdapterService,
953
- ProductConnectorService
954
- ],
955
- encapsulation: ViewEncapsulation.Emulated,
956
- styles: [""]
957
- })
958
- ], IoneProductComponent);
959
- return IoneProductComponent;
960
- }());
961
-
962
- var ProductExternalSourceComponent = /** @class */ (function () {
963
- function ProductExternalSourceComponent(_sanitizer, _productConnectorService, _appEventService) {
964
- this._sanitizer = _sanitizer;
965
- this._productConnectorService = _productConnectorService;
966
- this._appEventService = _appEventService;
967
- this.addToCart = new EventEmitter();
968
- this.addToQuote = new EventEmitter();
969
- this.alternativeClick = new EventEmitter();
970
- this.showProduct = false;
971
- this.loaded = false;
972
- this.externalSettings = {};
973
- this._subs = [];
974
- }
975
- Object.defineProperty(ProductExternalSourceComponent.prototype, "externalSource", {
976
- get: function () {
977
- return this._externalSource;
978
- },
979
- set: function (value) {
980
- this._externalSource = value;
981
- this.loaded = false;
982
- this._prepareExternalSource();
983
- },
984
- enumerable: true,
985
- configurable: true
986
- });
987
- ProductExternalSourceComponent.prototype.showClass = function () {
988
- return true;
989
- };
990
- ProductExternalSourceComponent.prototype.ngOnInit = function () {
991
- var _this = this;
992
- 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); }));
993
- };
994
- ProductExternalSourceComponent.prototype.ngOnDestroy = function () {
995
- this._subs.forEach(function (s) { return s.unsubscribe(); });
996
- };
997
- ProductExternalSourceComponent.prototype._prepareExternalSource = function () {
998
- return __awaiter(this, void 0, void 0, function () {
999
- var bundleSettings;
1000
- return __generator(this, function (_a) {
1001
- switch (_a.label) {
1002
- case 0:
1003
- if (!this._externalSource) {
1004
- return [2 /*return*/];
1005
- }
1006
- this.externalUrl = undefined;
1007
- this.externalSettings = {};
1008
- if (!(this.externalSource.type === 'CATF')) return [3 /*break*/, 2];
1009
- return [4 /*yield*/, this._productConnectorService.getProductBundleSettings(this.externalSource.url, parseInt(this.externalSource.schema, 0))];
1010
- case 1:
1011
- bundleSettings = _a.sent();
1012
- this.externalSettings = JSON.parse(bundleSettings);
1013
- if (this.options) {
1014
- this.externalSettings.options = this.options;
1015
- }
1016
- // this.externalSettings.assetPath = "https://cdn1.colijn-it.nl/content43";
1017
- // this.externalSettings.threeDAssetPath = "https://cdn1.colijn-it.nl/content43";
1018
- if (this.externalSource.username && this.externalSource.password) {
1019
- this.externalSettings.useLoginEncryption = true;
1020
- this.externalSettings.username = this.externalSource.username;
1021
- this.externalSettings.password = this.externalSource.password;
1022
- }
1023
- // finally show the catalog
1024
- this.showProduct = true;
1025
- return [3 /*break*/, 3];
1026
- case 2:
1027
- this.externalUrl = this.externalSource.url;
1028
- this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
1029
- this.showProduct = false;
1030
- _a.label = 3;
1031
- case 3:
1032
- this.loaded = true;
1033
- return [2 /*return*/];
1034
- }
1035
- });
1036
- });
1037
- };
1038
- ProductExternalSourceComponent.ctorParameters = function () { return [
1039
- { type: DomSanitizer },
1040
- { type: ProductConnectorService },
1041
- { type: ProductEventService }
1042
- ]; };
1043
- __decorate([
1044
- Input()
1045
- ], ProductExternalSourceComponent.prototype, "sku", void 0);
1046
- __decorate([
1047
- Input()
1048
- ], ProductExternalSourceComponent.prototype, "externalSource", null);
1049
- __decorate([
1050
- Input()
1051
- ], ProductExternalSourceComponent.prototype, "options", void 0);
1052
- __decorate([
1053
- Output()
1054
- ], ProductExternalSourceComponent.prototype, "addToCart", void 0);
1055
- __decorate([
1056
- Output()
1057
- ], ProductExternalSourceComponent.prototype, "addToQuote", void 0);
1058
- __decorate([
1059
- Output()
1060
- ], ProductExternalSourceComponent.prototype, "alternativeClick", void 0);
1061
- __decorate([
1062
- HostBinding('class.co-product-external-source')
1063
- ], ProductExternalSourceComponent.prototype, "showClass", null);
1064
- ProductExternalSourceComponent = __decorate([
1065
- Component({
1066
- selector: 'co-product-external-source',
1067
- 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 ",
1068
- providers: [
1069
- ProductEventService,
1070
- ProductSettingsService,
1071
- ProductConnectorAdapterService,
1072
- ProductConnectorService
1073
- ],
1074
- encapsulation: ViewEncapsulation.None
1075
- })
1076
- ], ProductExternalSourceComponent);
1077
- return ProductExternalSourceComponent;
1078
- }());
1079
-
1080
- var StockAndDelivery = /** @class */ (function () {
1081
- function StockAndDelivery(stock, deliveryDescription) {
1082
- this.stock = 0;
1083
- this.stock = stock;
1084
- this.deliveryDescription = deliveryDescription;
1085
- }
1086
- return StockAndDelivery;
1087
- }());
1088
-
1089
- var SelectorType;
1090
- (function (SelectorType) {
1091
- SelectorType["TwoD"] = "2D";
1092
- SelectorType["ThreeD"] = "3D";
1093
- SelectorType["Omni"] = "Omni";
1094
- })(SelectorType || (SelectorType = {}));
1095
-
1096
- /** AUTO GENERATED FILE. DO NOT CHANGE.. **/
1097
- var IconEnum;
1098
- (function (IconEnum) {
1099
- IconEnum["AddToCartDrop"] = "add_to_cart_drop";
1100
- IconEnum["DeliveryTruck"] = "delivery_truck";
1101
- IconEnum["Download"] = "download";
1102
- IconEnum["FullScreen"] = "full_screen";
1103
- IconEnum["Location"] = "location";
1104
- IconEnum["Logo"] = "logo";
1105
- IconEnum["MagicWand"] = "magic_wand";
1106
- IconEnum["NormalScreen"] = "normal_screen";
1107
- IconEnum["Quote"] = "quote";
1108
- IconEnum["Refresh"] = "refresh";
1109
- IconEnum["ThreeD"] = "three_d";
1110
- IconEnum["Truck"] = "truck";
1111
- IconEnum["TwoD"] = "two_d";
1112
- IconEnum["Warehouse"] = "warehouse";
1113
- })(IconEnum || (IconEnum = {}));
1114
-
1115
- /** AUTO GENERATED FILE. DO NOT CHANGE.. **/
1116
- var IconSvg = {
1117
- "add_to_cart_drop": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M16.58,34.84a1.8,1.8,0,1,0,1.8,1.8A1.79,1.79,0,0,0,16.58,34.84Z\" fill=\"#484f60\"/><path d=\"M31.49,34.84a1.8,1.8,0,1,0,1.8,1.8A1.79,1.79,0,0,0,31.49,34.84Z\" fill=\"#484f60\"/><path d=\"M35.6,17.9l-1.51.18L31.88,20.3l1.31-.17a.88.88,0,0,1,1,1.08L32.35,29.5a1.52,1.52,0,0,1-1.44,1.2H16.51a1.75,1.75,0,0,1-1.57-1.17l-2.31-5.6a1,1,0,0,1,.85-1.29l4.43-.56-1.86-1.86-5.13.61a1,1,0,0,0-.87,1.28l3.34,9.44A1.73,1.73,0,0,0,15,32.72H32.64a1.51,1.51,0,0,0,1.43-1.2L36.6,19A.89.89,0,0,0,35.6,17.9Z\" fill=\"#484f60\"/><path d=\"M39,17a1.87,1.87,0,0,0-1.36,1.46l-.42,2.89c-.1.67.31,1,.9.7a2.75,2.75,0,0,0,1.33-1.7L40,18A.73.73,0,0,0,39,17Z\" fill=\"#484f60\"/><polygon points=\"24 25.35 32.04 17.3 27.04 17.3 27.04 10 20.95 10 20.95 17.3 15.96 17.3 24 25.35\" fill=\"#484f60\"/></svg>",
1118
- "delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,45A20,20,0,1,1,45,25,20,20,0,0,1,25,45ZM25,6.29A18.71,18.71,0,1,0,43.71,25,18.73,18.73,0,0,0,25,6.29Z\" fill=\"#484f60\"/><path d=\"M21.86,24.09a7.14,7.14,0,0,1,.72-3.24,6.94,6.94,0,0,1,1.18-1.66H13v10.1h8.51a3.25,3.25,0,0,1,3.27-3.07A3.33,3.33,0,0,1,27,27V25.75H21.9Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M21.65,30.47h-.48a3.51,3.51,0,0,1,1.13,2.19h1.57a3.22,3.22,0,0,1-1.41-.83A3.13,3.13,0,0,1,21.65,30.47Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M34.63,21.89H28.87c-.3.25-.5.43-.63.56v8H28a3.19,3.19,0,0,1-.82,1.37,3.3,3.3,0,0,1-1.41.82H29a3.53,3.53,0,0,1,7,0h1V27.1Zm-.2,5.38H30.8a.47.47,0,0,1-.46-.46V23.36a.46.46,0,0,1,.46-.46h2.1a.45.45,0,0,1,.42.27l1.53,3.45A.46.46,0,0,1,34.43,27.27Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M16.42,30.47a3.51,3.51,0,0,0-1.13,2.19H14.6l-1.6-1V30.47Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M30,33.08a2.53,2.53,0,1,0,2.53-2.53A2.52,2.52,0,0,0,30,33.08Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M16.27,33.08a2.53,2.53,0,1,0,2.53-2.53A2.52,2.52,0,0,0,16.27,33.08Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M22.45,17.27h-3.2a4.29,4.29,0,0,1,1.61-3.49,6.45,6.45,0,0,1,4.31-1.38,6.79,6.79,0,0,1,2.92.57A4.72,4.72,0,0,1,30,14.62a4,4,0,0,1,.72,2.26,3.74,3.74,0,0,1-.23,1.27,5.31,5.31,0,0,1-.73,1.29,12,12,0,0,1-1.4,1.29A8.74,8.74,0,0,0,27.06,22a3.17,3.17,0,0,0-.46.94,7.56,7.56,0,0,0-.23,1.65h-3.3v-.49a6,6,0,0,1,.59-2.68,6.8,6.8,0,0,1,1.94-2.25,9.44,9.44,0,0,0,1.56-1.41,1.5,1.5,0,0,0,.27-.9,1.47,1.47,0,0,0-.65-1.19A2.9,2.9,0,0,0,25,15.14a2.77,2.77,0,0,0-1.84.6A1.91,1.91,0,0,0,22.45,17.27Z\" fill=\"#484f60\"/><path d=\"M24.78,27.42a2.06,2.06,0,0,1,1.51.61,2,2,0,0,1,.63,1.47A2,2,0,0,1,26.3,31a2.08,2.08,0,0,1-1.5.62A2,2,0,0,1,23.31,31a2.08,2.08,0,0,1,0-2.95A2,2,0,0,1,24.78,27.42Z\" fill=\"#484f60\"/></svg>",
1119
- "download": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" version=\"1.1\" sodipodi:docname=\"download.svg\" inkscape:version=\"0.92.4 (5da689c313, 2019-01-14)\"><metadata ><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor=\"#ffffff\" bordercolor=\"#666666\" borderopacity=\"1\" objecttolerance=\"10\" gridtolerance=\"10\" guidetolerance=\"10\" inkscape:pageopacity=\"0\" inkscape:pageshadow=\"2\" inkscape:window-width=\"1920\" inkscape:window-height=\"1017\" showgr inkscape:zoom=\"6.675088\" inkscape:cx=\"-14.056273\" inkscape:cy=\"29.806579\" inkscape:window-x=\"-8\" inkscape:window-y=\"-8\" inkscape:window-maximized=\"1\" inkscape:current-layer=\"svg8\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 498.966,339.946 c -7.197,0 -13.034,5.837 -13.034,13.034 v 49.804 c 0,28.747 -23.388,52.135 -52.135,52.135 H 78.203 c -28.747,0 -52.135,-23.388 -52.135,-52.135 V 352.98 c 0,-7.197 -5.835,-13.034 -13.034,-13.034 C 5.835,339.946 0,345.782 0,352.98 v 49.804 c 0,43.121 35.082,78.203 78.203,78.203 h 355.594 c 43.121,0 78.203,-35.082 78.203,-78.203 V 352.98 c 0,-7.198 -5.835,-13.034 -13.034,-13.034 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"M 419.833,391.3 H 92.167 c -7.197,0 -13.034,5.837 -13.034,13.034 0,7.197 5.835,13.034 13.034,13.034 h 327.665 c 7.199,0 13.034,-5.835 13.034,-13.034 0,-7.197 -5.835,-13.034 -13.033,-13.034 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 387.919,207.93 c -4.795,-5.367 -13.034,-5.834 -18.404,-1.038 L 269.033,296.657 V 44.048 c 0,-7.197 -5.835,-13.034 -13.034,-13.034 -7.197,0 -13.034,5.835 -13.034,13.034 V 296.657 L 142.483,206.893 c -5.367,-4.796 -13.607,-4.328 -18.404,1.038 -4.794,5.369 -4.331,13.609 1.037,18.404 l 109.174,97.527 c 6.187,5.529 13.946,8.292 21.708,8.292 7.759,0 15.519,-2.763 21.708,-8.289 l 109.174,-97.53 c 5.37,-4.798 5.834,-13.038 1.039,-18.405 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05555739,0,0,0.05555739,10.739964,11.357401)\" style=\"fill:#484f60;fill-opacity:1\" /></svg>",
1120
- "full_screen": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,38.17H12v-26H38ZM13.24,36.93H36.76V13.4H13.24Z\" fill=\"#484f60\"/><polygon points=\"17.35 32.81 17.35 26.75 19.46 28.86 28.69 19.63 26.59 17.52 32.65 17.52 32.65 23.58 30.54 21.47 21.31 30.71 23.41 32.81 17.35 32.81\" fill=\"#484f60\"/></svg>",
1121
- "location": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,12.67A8.33,8.33,0,0,0,16.67,21c0,4.6,8.33,16.67,8.33,16.67S33.33,25.6,33.33,21A8.33,8.33,0,0,0,25,12.67Zm0,10.41A2.08,2.08,0,1,1,27.08,21,2.08,2.08,0,0,1,25,23.08Z\" fill=\"#484f60\"/></svg>",
1122
- "logo": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"21.19\" width=\"2.04\" height=\"6.32\" fill=\"#484f60\"/><path d=\"M18.66,29.24a3.84,3.84,0,0,1-2.85-1.19,4.19,4.19,0,0,1,0-5.77,4,4,0,0,1,5.71,0,4.19,4.19,0,0,1,0,5.77A3.85,3.85,0,0,1,18.66,29.24Zm0-6.16a1.79,1.79,0,0,0-1.38.58,2.12,2.12,0,0,0-.57,1.51,2,2,0,0,0,.57,1.49,1.94,1.94,0,0,0,2.76,0,2.08,2.08,0,0,0,.56-1.5,2.15,2.15,0,0,0-.56-1.51A1.76,1.76,0,0,0,18.67,23.08Z\" fill=\"#484f60\"/><polygon points=\"31.05 29.18 27.33 25.02 27.33 29.14 25.29 29.14 25.29 21.15 26.57 21.15 30.29 25.33 30.29 21.19 32.33 21.19 32.33 29.18 31.05 29.18\" fill=\"#484f60\"/><polygon points=\"35.34 29.14 35.34 21.19 39.9 21.19 39.9 23.17 37.38 23.17 37.38 23.9 39.66 23.9 39.66 25.87 37.38 25.87 37.38 27.14 40 27.14 40 29.14 35.34 29.14\" fill=\"#484f60\"/></svg>",
1123
- "magic_wand": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><title>magic_wand</title><g style=\"isolation:isolate\"><path d=\"M20.45,10.71a.28.28,0,0,1,.49-.19l1.4,1.25a.93.93,0,0,0,.83.23L25,11.62a.29.29,0,0,1,.34.41l-.76,1.71a.93.93,0,0,0,0,.86l.93,1.62c.12.26,0,.45-.29.45l-1.86-.2a1,1,0,0,0-.81.32l-1.26,1.38a.28.28,0,0,1-.5-.14l-.39-1.83a1,1,0,0,0-.55-.67l-1.71-.77a.28.28,0,0,1,0-.52l1.62-.94a1,1,0,0,0,.48-.73Z\" fill=\"#484f60\"/><g style=\"mix-blend-mode:lighten\"><path d=\"M23.3,16.21a1,1,0,0,0-.8.31l-1,1.13a.29.29,0,0,1-.51-.14L20.66,16a1,1,0,0,0-.55-.68l-1.39-.62a.28.28,0,0,1,0-.52L20,13.45a1,1,0,0,0,.48-.73l.16-1.5a.29.29,0,0,1,.49-.2l1.13,1a.93.93,0,0,0,.83.23L24.58,12a.29.29,0,0,1,.34.41l-.62,1.38a.91.91,0,0,0,.05.86l.75,1.32a.29.29,0,0,1-.29.44Z\" fill=\"#484f60\"/></g><path d=\"M33.57,36.76a.53.53,0,0,1,0,.72l-2.37,2.18a.48.48,0,0,1-.7,0L18,25.34a.51.51,0,0,1,0-.71l2.36-2.19a.49.49,0,0,1,.7,0Z\" fill=\"#484f60\"/><path d=\"M18.6,19.94a.51.51,0,0,1,0,.71L16.2,22.84a.48.48,0,0,1-.7,0l-2.76-3.13a.51.51,0,0,1,0-.71l2.37-2.19a.48.48,0,0,1,.7,0Z\" fill=\"#484f60\"/><path d=\"M30.67,10.55a.29.29,0,0,1,.47.24v1.12a1,1,0,0,0,.4.77l.9.66a.29.29,0,0,1-.08.52l-1.07.35a1,1,0,0,0-.61.61l-.35,1.06a.28.28,0,0,1-.51.09l-.67-.91a1,1,0,0,0-.77-.4H27.27a.29.29,0,0,1-.25-.47l.66-.9a.93.93,0,0,0,.14-.85l-.35-1.07a.29.29,0,0,1,.38-.38l1.07.35a1,1,0,0,0,.85-.13Z\" fill=\"#484f60\"/><g style=\"mix-blend-mode:lighten\"><path d=\"M29.25,14.88a1,1,0,0,0-.77-.4h-.86a.29.29,0,0,1-.24-.47l.5-.69a.93.93,0,0,0,.14-.85l-.26-.82c-.07-.27.1-.44.37-.37l.82.26a1,1,0,0,0,.85-.13l.69-.51a.29.29,0,0,1,.47.25V12a.94.94,0,0,0,.39.76l.7.51a.29.29,0,0,1-.09.52l-.81.26a1,1,0,0,0-.62.61l-.26.82a.29.29,0,0,1-.52.08Z\" fill=\"#484f60\"/></g><path d=\"M37,15.81a.29.29,0,0,1,.32.43l-.13.26a.91.91,0,0,0,0,.85l.15.26A.29.29,0,0,1,37,18l-.29,0a.93.93,0,0,0-.81.27l-.2.21a.28.28,0,0,1-.5-.16l0-.29a1,1,0,0,0-.52-.69l-.27-.13a.28.28,0,0,1,0-.52l.26-.13a.93.93,0,0,0,.5-.71l0-.29a.29.29,0,0,1,.5-.17l.21.21a.92.92,0,0,0,.82.26Z\" fill=\"#484f60\"/><g style=\"mix-blend-mode:lighten\"><path d=\"M35.25,18a1,1,0,0,0-.52-.7l-.12-.05a.28.28,0,0,1,0-.52l.12-.06a1,1,0,0,0,.51-.7V15.8a.29.29,0,0,1,.5-.18l.09.1a.92.92,0,0,0,.82.26l.13,0a.29.29,0,0,1,.32.42L37,16.5a.91.91,0,0,0,0,.85l.07.12a.29.29,0,0,1-.31.43l-.13,0a1,1,0,0,0-.82.28l-.09.1a.28.28,0,0,1-.5-.16Z\" fill=\"#484f60\"/></g></g></svg>",
1124
- "normal_screen": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,38.17H12v-26H38ZM13.24,36.93H36.76V13.4H13.24Z\" fill=\"#484f60\"/><polygon points=\"22.18 29.83 24.29 31.93 24.29 25.87 18.23 25.87 20.34 27.98 16.43 31.89 18.28 33.73 22.18 29.83\" fill=\"#484f60\"/><polygon points=\"33.57 18.44 31.73 16.6 27.82 20.51 25.71 18.4 25.71 24.46 31.77 24.46 29.66 22.35 33.57 18.44\" fill=\"#484f60\"/></svg>",
1125
- "quote": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M14.5,31.51V12a.5.5,0,0,1,.5-.5H35a.5.5,0,0,1,.5.5V38a.5.5,0,0,1-.5.5H21.27V40H35a2,2,0,0,0,2-2V12a2,2,0,0,0-2-2H15a2,2,0,0,0-2,2V31.51Z\" fill=\"#484f60\"/><path d=\"M21.27,40V33.56c0-1.78-.27-2.05-2.05-2.05H13Z\" fill=\"#484f60\"/><rect x=\"17.5\" y=\"18.5\" width=\"6\" height=\"4\" fill=\"#484f60\"/><rect x=\"25.5\" y=\"21.5\" width=\"7\" height=\"1\" fill=\"#484f60\"/><rect x=\"25.5\" y=\"18.5\" width=\"7\" height=\"1\" fill=\"#484f60\"/><rect x=\"26.5\" y=\"25.5\" width=\"6\" height=\"4\" transform=\"translate(59 55) rotate(-180)\" fill=\"#484f60\"/><rect x=\"17.5\" y=\"28.5\" width=\"7\" height=\"1\" fill=\"#484f60\"/><rect x=\"17.5\" y=\"25.5\" width=\"7\" height=\"1\" fill=\"#484f60\"/><rect x=\"17.5\" y=\"14.5\" width=\"6\" height=\"1\" fill=\"#484f60\"/><rect x=\"26.5\" y=\"34.5\" width=\"6\" height=\"1\" fill=\"#484f60\"/></svg>",
1126
- "refresh": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" version=\"1.1\" sodipodi:docname=\"refresh.svg\" inkscape:version=\"0.92.4 (5da689c313, 2019-01-14)\"><metadata ><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor=\"#ffffff\" bordercolor=\"#666666\" borderopacity=\"1\" objecttolerance=\"10\" gridtolerance=\"10\" guidetolerance=\"10\" inkscape:pageopacity=\"0\" inkscape:pageshadow=\"2\" inkscape:window-width=\"1920\" inkscape:window-height=\"1017\" showgr inkscape:zoom=\"9.44\" inkscape:cx=\"13.990693\" inkscape:cy=\"13.961336\" inkscape:window-x=\"-8\" inkscape:window-y=\"-8\" inkscape:window-maximized=\"1\" inkscape:current-layer=\"svg6\" /><g transform=\"matrix(0.05356365,0,0,0.05356365,11.44076,11.82465)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"M 414.32892,173.53368 397.86852,58.29997 c -1.3534,-9.447409 -12.96516,-13.373353 -19.75699,-6.581524 l -23.97472,23.97472 C 323.3074,57.095569 288.30682,47.308258 252.3168,47.308258 c -108.23157,0 -195.126154,84.711612 -197.8314,192.852392 -0.147446,5.91103 4.149441,10.98085 9.992183,11.82206 l 46.516107,6.64982 c 6.93462,1.01194 13.38577,-4.43269 13.28954,-11.68548 -0.9646,-71.37163 56.68057,-129.79595 128.03357,-129.79595 17.27835,0 34.3526,3.51232 50.13165,10.23043 l -23.11022,23.11022 c -6.74915,6.74915 -2.91866,18.3966 6.58152,19.75699 l 115.23371,16.4604 c 7.59269,1.14465 14.26423,-5.4586 13.17546,-13.17546 z\" style=\"fill:#484f60;fill-opacity:1;stroke-width:0.77603161\" /></g></g><path inkscape:connector-curvature=\"0\" d=\"m 35.105827,24.725982 -2.489742,-0.355606 c -0.321647,-0.04073 -0.711797,0.234897 -0.711797,0.671018 0,3.781814 -3.076753,6.858567 -6.858567,6.858567 -0.920628,0 -1.830946,-0.186303 -2.673013,-0.542533 l 1.198298,-1.198297 c 0.361507,-0.361507 0.156331,-0.985389 -0.352533,-1.058254 l -6.172336,-0.882302 c -0.405403,-0.05792 -0.764422,0.289765 -0.705726,0.705725 l 0.881637,6.172381 c 0.07258,0.506577 0.694003,0.71545 1.058254,0.352527 l 1.315225,-1.314599 c 1.643397,0.987012 3.516951,1.506391 5.450194,1.506391 5.769264,0 10.423029,-4.514936 10.595325,-10.27871 0.0091,-0.317237 -0.221012,-0.591248 -0.535219,-0.636308 z\" style=\"fill:#484f60;fill-opacity:1;stroke-width:0.04156709\" /></svg>",
1127
- "three_d": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M16.08,30.77a4.85,4.85,0,0,1-3-.8,4,4,0,0,0-2.49-.15,6.21,6.21,0,0,0,2.53,1.09,12.84,12.84,0,0,0,2.93-.14\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M14.27,19.68A4.71,4.71,0,0,0,11,20.78l2,.14c.31,0,1.2-.69,1.55-.81a3.88,3.88,0,0,1,1.65-.24l-1.94-.19\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M21.64,28.79a4.13,4.13,0,0,0-3.1-4c.89-.7,1.77-1.09,2.26-2.21a5.12,5.12,0,0,0,.35-1.9c-.13-3.24-2.64-3.73-5.29-4.15a4,4,0,0,1,3.44,3.7,4.61,4.61,0,0,1-.83,3.12,9.7,9.7,0,0,1-1.82,1.43,4.3,4.3,0,0,1,3.17,4.34,4.9,4.9,0,0,1-4.21,5c2.09-.34,4.37-.64,5.46-2.69a5,5,0,0,0,.57-2.58\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M28.44,18.88l.38-.07.48-.06.57,0h.75l.36,0,.35.05c-.2,0-.42-.08-1.57-.25l-.36-.05-.37,0h-.77l-.59,0-.49.07a3.08,3.08,0,0,0-.39.07l-.3.07V31.38H27l.13,0h1.63l.21,0h.2l.2,0h.05l1.55-.24h0l-.34.05-.33,0H29.12l-.36,0-.33,0a1.15,1.15,0,0,1-.28-.06V19Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M40,24.34a9,9,0,0,0-3-7.1,11.06,11.06,0,0,0-4.47-1.86c4.38,1.13,6.23,5.31,6.13,9.54-.12,4.5-2.27,8.55-6.86,9.66,2.59-.63,5-1.41,6.52-3.78A12,12,0,0,0,40,24.34\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M35.38,16.71A7.32,7.32,0,0,1,36.74,18a7.82,7.82,0,0,1,1,1.73,10.32,10.32,0,0,1,.68,2.16,13.86,13.86,0,0,1,.23,2.59,15,15,0,0,1-.25,2.78,11.39,11.39,0,0,1-.68,2.31,9.34,9.34,0,0,1-1,1.85,8.23,8.23,0,0,1-1.28,1.4,7.76,7.76,0,0,1-1.7,1.07,9.07,9.07,0,0,1-2,.69,13.36,13.36,0,0,1-2.26.33,18.25,18.25,0,0,1-2.45,0c-.5,0-1-.08-1.39-.12l-1.17-.14c-.36,0-.68-.11-1-.16l-.77-.15V15.86c.34-.09.71-.18,1.09-.26s.81-.15,1.24-.21.88-.12,1.34-.17.95-.1,1.44-.13a20.57,20.57,0,0,1,2.33,0,12,12,0,0,1,2,.24,8.24,8.24,0,0,1,1.72.55A7.1,7.1,0,0,1,35.38,16.71ZM27.92,31.53a6.53,6.53,0,0,0,2.46-.32A4.81,4.81,0,0,0,32.32,30a5.82,5.82,0,0,0,1.27-2.18A10.11,10.11,0,0,0,34,24.67a8.65,8.65,0,0,0-.42-2.85,4.94,4.94,0,0,0-1.18-2,4.45,4.45,0,0,0-1.83-1.11,6.55,6.55,0,0,0-2.35-.28l-.59,0-.49.07a3.08,3.08,0,0,0-.39.07l-.3.07V31.38a2.11,2.11,0,0,0,.29.06l.34,0,.37,0,.36,0h.07\" fill=\"#484f60\"/><path d=\"M14.57,16.47a5.49,5.49,0,0,1,2,.22,3.89,3.89,0,0,1,1.49.84A3.66,3.66,0,0,1,19,18.89a4.29,4.29,0,0,1,.33,1.7,5.29,5.29,0,0,1-.17,1.34,4.29,4.29,0,0,1-.5,1.16,4.17,4.17,0,0,1-.84.94,4.88,4.88,0,0,1-1.16.69v.05a3.7,3.7,0,0,1,1.22.5,4,4,0,0,1,1,.92,4.61,4.61,0,0,1,.69,1.3,5.24,5.24,0,0,1,.25,1.62,5.36,5.36,0,0,1-.42,2.15,4.44,4.44,0,0,1-1.2,1.64,4.84,4.84,0,0,1-1.86,1,6.78,6.78,0,0,1-2.39.23,7.69,7.69,0,0,1-2.36-.52,6.89,6.89,0,0,1-.9-.42,4.36,4.36,0,0,1-.69-.47l.62-2.9a4.12,4.12,0,0,0,.53.34,6.21,6.21,0,0,0,.73.36,5.69,5.69,0,0,0,.88.31,5.19,5.19,0,0,0,1,.15,3.11,3.11,0,0,0,1.1-.13,2,2,0,0,0,.8-.45,1.93,1.93,0,0,0,.49-.71,2.35,2.35,0,0,0,.17-.89A2.48,2.48,0,0,0,16,27.67a2.23,2.23,0,0,0-.63-.79,2.9,2.9,0,0,0-.89-.46,3.5,3.5,0,0,0-1-.15H12.2V23.44l1.23,0a3.44,3.44,0,0,0,.83-.11,2.83,2.83,0,0,0,.79-.36,2,2,0,0,0,.6-.62,2,2,0,0,0,.23-.94,1.8,1.8,0,0,0-.13-.71,1.36,1.36,0,0,0-.38-.56,1.58,1.58,0,0,0-.64-.35,2.79,2.79,0,0,0-.9-.1,4.07,4.07,0,0,0-.84.13c-.27.08-.53.18-.78.28a6.56,6.56,0,0,0-1.17.7L10.42,18a5,5,0,0,1,.72-.51,7.82,7.82,0,0,1,2.12-.82A8,8,0,0,1,14.57,16.47Z\" fill=\"#484f60\"/></svg>",
1128
- "truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" version=\"1.1\" sodipodi:docname=\"truck.svg\" inkscape:version=\"0.92.4 (5da689c313, 2019-01-14)\"><metadata ><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor=\"#ffffff\" bordercolor=\"#666666\" borderopacity=\"1\" objecttolerance=\"10\" gridtolerance=\"10\" guidetolerance=\"10\" inkscape:pageopacity=\"0\" inkscape:pageshadow=\"2\" inkscape:window-width=\"1920\" inkscape:window-height=\"1017\" showgr inkscape:zoom=\"9.44\" inkscape:cx=\"31.555563\" inkscape:cy=\"21.585628\" inkscape:window-x=\"-8\" inkscape:window-y=\"-8\" inkscape:window-maximized=\"1\" inkscape:current-layer=\"svg8\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06827145,0,0,0.06827064,7.670918,5.1378096)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 119.467,337.067 c -28.237,0 -51.2,22.963 -51.2,51.2 0,28.237 22.963,51.2 51.2,51.2 28.237,0 51.2,-22.963 51.2,-51.2 0,-28.237 -22.964,-51.2 -51.2,-51.2 z m 0,85.333 c -18.825,0 -34.133,-15.309 -34.133,-34.133 0,-18.825 15.309,-34.133 34.133,-34.133 18.824,0 34.133,15.309 34.133,34.133 0,18.824 -15.309,34.133 -34.133,34.133 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 409.6,337.067 c -28.237,0 -51.2,22.963 -51.2,51.2 0,28.237 22.963,51.2 51.2,51.2 28.237,0 51.2,-22.963 51.2,-51.2 0,-28.237 -22.963,-51.2 -51.2,-51.2 z m 0,85.333 c -18.825,0 -34.133,-15.309 -34.133,-34.133 0,-18.825 15.309,-34.133 34.133,-34.133 18.825,0 34.133,15.309 34.133,34.133 0,18.824 -15.308,34.133 -34.133,34.133 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 510.643,289.784 -76.8,-119.467 c -1.57,-2.441 -4.275,-3.917 -7.177,-3.917 H 332.8 c -4.719,0 -8.533,3.823 -8.533,8.533 v 213.333 c 0,4.719 3.814,8.533 8.533,8.533 h 34.133 v -17.067 h -25.6 V 183.467 h 80.674 l 72.926,113.442 v 82.825 H 452.266 V 396.8 h 51.2 c 4.719,0 8.533,-3.814 8.533,-8.533 V 294.4 c 10e-4,-1.63 -0.468,-3.243 -1.356,-4.616 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"M 375.467,277.333 V 217.6 h 68.267 v -17.067 h -76.8 c -4.719,0 -8.533,3.823 -8.533,8.533 v 76.8 c 0,4.719 3.814,8.533 8.533,8.533 h 128 V 277.332 H 375.467 Z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"M 332.8,106.667 H 8.533 C 3.823,106.667 0,110.49 0,115.2 v 273.067 c 0,4.719 3.823,8.533 8.533,8.533 H 76.8 V 379.733 H 17.067 v -256 h 307.2 v 256 H 162.133 V 396.8 H 332.8 c 4.719,0 8.533,-3.814 8.533,-8.533 V 115.2 c 0,-4.71 -3.814,-8.533 -8.533,-8.533 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"8.533\" y=\"345.60001\" width=\"51.200001\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"179.2\" y=\"345.60001\" width=\"145.067\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"469.33301\" y=\"345.60001\" width=\"34.132999\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"34.132999\" y=\"140.8\" width=\"298.66699\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"110.933\" y=\"379.733\" width=\"17.066999\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"401.06699\" y=\"379.733\" width=\"17.066999\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.06813214,0,0,0.06813214,7.6,6.2856989)\" style=\"fill:#484f60;fill-opacity:1\" /></svg>",
1129
- "two_d": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M22.41,33.89H11V31c.87-.76,1.75-1.56,2.62-2.41S15.2,27,15.73,26.39A11.84,11.84,0,0,0,17.4,24a4.45,4.45,0,0,0,.5-2,2.52,2.52,0,0,0-.64-1.85,2.47,2.47,0,0,0-1.84-.65,4.57,4.57,0,0,0-1.89.45,8.17,8.17,0,0,0-1.84,1.14h-.31V17.2a10.26,10.26,0,0,1,2-.73,10.46,10.46,0,0,1,2.71-.36,5.79,5.79,0,0,1,4.16,1.37,5.15,5.15,0,0,1,1.44,3.9,7.37,7.37,0,0,1-.69,3.14A12.94,12.94,0,0,1,19,27.59c-.6.66-1.19,1.26-1.79,1.81s-1,.93-1.28,1.15h6.53Z\" fill=\"#484f60\"/><path d=\"M38.14,20.79a7.49,7.49,0,0,0-2.37-3,6.52,6.52,0,0,0-2.17-1,11.93,11.93,0,0,0-3.06-.35H25.26V33.89h5.13a13.25,13.25,0,0,0,3-.3,6.61,6.61,0,0,0,2.33-1.08,7.71,7.71,0,0,0,2.34-3A9.9,9.9,0,0,0,39,25.19,10.47,10.47,0,0,0,38.14,20.79Zm-3.49,7.27a4,4,0,0,1-1.51,1.88,3.77,3.77,0,0,1-1.22.54,10.07,10.07,0,0,1-2,.14H29V19.7H30a9.8,9.8,0,0,1,1.81.13,3.75,3.75,0,0,1,1.18.46,4.07,4.07,0,0,1,1.65,1.92,7.4,7.4,0,0,1,.52,2.94A7.92,7.92,0,0,1,34.65,28.06Z\" fill=\"#484f60\"/></svg>",
1130
- "warehouse": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" version=\"1.1\" sodipodi:docname=\"warehouse.svg\" inkscape:version=\"0.92.4 (5da689c313, 2019-01-14)\"><metadata ><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor=\"#ffffff\" bordercolor=\"#666666\" borderopacity=\"1\" objecttolerance=\"10\" gridtolerance=\"10\" guidetolerance=\"10\" inkscape:pageopacity=\"0\" inkscape:pageshadow=\"2\" inkscape:window-width=\"1920\" inkscape:window-height=\"1017\" showgr inkscape:zoom=\"6.675088\" inkscape:cx=\"9.6569985\" inkscape:cy=\"12.384637\" inkscape:window-x=\"-8\" inkscape:window-y=\"-8\" inkscape:window-maximized=\"1\" inkscape:current-layer=\"svg8\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"M 507.785,146.242 260.318,1.175 c -2.603,-1.519 -5.803,-1.57 -8.439,-0.111 L 4.412,137.598 C 1.69,139.091 0,141.958 0,145.064 v 358.4 c 0,4.719 3.823,8.533 8.533,8.533 H 51.2 c 4.71,0 8.533,-3.814 8.533,-8.533 V 204.798 h 392.533 v 298.667 c 0,4.719 3.814,8.533 8.533,8.533 h 42.667 c 4.719,0 8.533,-3.814 8.533,-8.533 V 153.598 c 10e-4,-3.03 -1.603,-5.829 -4.214,-7.356 z m -12.852,348.689 h -25.6 V 196.264 c 0,-4.71 -3.814,-8.533 -8.533,-8.533 H 51.2 c -4.71,0 -8.533,3.823 -8.533,8.533 v 298.667 h -25.6 V 150.099 L 255.872,18.344 494.933,158.487 Z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 426.667,392.531 h -102.4 c -4.719,0 -8.533,3.814 -8.533,8.533 v 102.4 c 0,4.719 3.814,8.533 8.533,8.533 h 102.4 c 4.719,0 8.533,-3.814 8.533,-8.533 v -102.4 c 0,-4.719 -3.814,-8.533 -8.533,-8.533 z m -8.534,102.4 H 332.8 v -85.333 h 85.333 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 384,401.064 v 25.6 h -17.067 v -25.6 h -17.067 v 34.133 c 0,4.719 3.814,8.533 8.533,8.533 h 34.133 c 4.719,0 8.533,-3.814 8.533,-8.533 v -34.133 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 324.267,392.531 h -102.4 c -4.71,0 -8.533,3.814 -8.533,8.533 v 102.4 c 0,4.719 3.823,8.533 8.533,8.533 h 102.4 c 4.719,0 8.533,-3.814 8.533,-8.533 v -102.4 c 0,-4.719 -3.814,-8.533 -8.533,-8.533 z m -8.534,102.4 H 230.4 v -85.333 h 85.333 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 281.6,401.064 v 25.6 h -17.067 v -25.6 h -17.067 v 34.133 c 0,4.719 3.823,8.533 8.533,8.533 h 34.133 c 4.719,0 8.533,-3.814 8.533,-8.533 v -34.133 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 426.667,290.131 h -102.4 c -4.719,0 -8.533,3.814 -8.533,8.533 v 102.4 c 0,4.719 3.814,8.533 8.533,8.533 h 102.4 c 4.719,0 8.533,-3.814 8.533,-8.533 v -102.4 c 0,-4.719 -3.814,-8.533 -8.533,-8.533 z m -8.534,102.4 H 332.8 v -85.333 h 85.333 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 384,298.664 v 25.6 h -17.067 v -25.6 h -17.067 v 34.133 c 0,4.719 3.814,8.533 8.533,8.533 h 34.133 c 4.719,0 8.533,-3.814 8.533,-8.533 v -34.133 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"51.200001\" y=\"255.998\" width=\"409.60001\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><rect x=\"51.200001\" y=\"221.864\" width=\"409.60001\" height=\"17.066999\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\"><g style=\"fill:#484f60;fill-opacity:1\"><path inkscape:connector-curvature=\"0\" d=\"m 298.667,119.464 h -85.333 c -4.71,0 -8.533,3.823 -8.533,8.533 v 34.133 c 0,4.71 3.823,8.533 8.533,8.533 h 85.333 c 4.719,0 8.533,-3.823 8.533,-8.533 v -34.133 c 0,-4.71 -3.814,-8.533 -8.533,-8.533 z m -8.534,34.134 h -68.267 v -17.067 h 68.267 z\" style=\"fill:#484f60;fill-opacity:1\" /></g></g><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /><g transform=\"matrix(0.05570714,0,0,0.05570648,10.763,10.859394)\" style=\"fill:#484f60;fill-opacity:1\" /></svg>"
1131
- };
1132
-
1133
- var IconCacheService = /** @class */ (function () {
1134
- function IconCacheService(_sanitizer) {
1135
- this._sanitizer = _sanitizer;
1136
- this._iconCache = {};
1137
- this._allIcons = IconSvg;
1138
- this.setIconCache();
1139
- }
1140
- Object.defineProperty(IconCacheService.prototype, "iconCache", {
1141
- /**
1142
- * All the icons as a large JSON object, from the all-icons.json file.
1143
- * The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
1144
- */
1145
- get: function () {
1146
- return this._iconCache;
1147
- },
1148
- enumerable: true,
1149
- configurable: true
1150
- });
1151
- IconCacheService.prototype.getIcon = function (iconName) {
1152
- return this._iconCache[iconName.toLowerCase()];
1153
- };
1154
- IconCacheService.prototype.setIconCache = function () {
1155
- for (var key in this._allIcons) {
1156
- if (this._allIcons.hasOwnProperty(key)) {
1157
- this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(this._allIcons[key]);
1158
- }
1159
- }
1160
- };
1161
- IconCacheService.ctorParameters = function () { return [
1162
- { type: DomSanitizer }
1163
- ]; };
1164
- IconCacheService.ɵprov = ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(ɵɵinject(DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
1165
- IconCacheService = __decorate([
1166
- Injectable({
1167
- providedIn: 'root'
1168
- })
1169
- ], IconCacheService);
1170
- return IconCacheService;
1171
- }());
1172
-
1173
- var ProductPageComponent = /** @class */ (function () {
1174
- function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
1175
- var _this = this;
1176
- this._ione = _ione;
1177
- this._renderer = _renderer;
1178
- this._changeDetector = _changeDetector;
1179
- this.iconCache = iconCache;
1180
- this.settingsService = settingsService;
1181
- this.appEventService = appEventService;
1182
- this.icon = IconEnum;
1183
- this.configurable = false;
1184
- this.threeD = false;
1185
- this.show2D = true;
1186
- this.show3D = false;
1187
- this.configuring = false;
1188
- this.fullscreenAnimationEnd = false;
1189
- this.settingsLoaded = false;
1190
- this._fullScreen = false;
1191
- this._subs = [];
1192
- this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
1193
- if (_this.selections.nativeElement) {
1194
- _this.selections.nativeElement.forceRenderImage();
1195
- }
1196
- }), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._ione.controllerInitialized.subscribe(function (initialized) {
1197
- _this.settingsLoaded = initialized;
1198
- }));
1199
- }
1200
- Object.defineProperty(ProductPageComponent.prototype, "sku", {
1201
- get: function () {
1202
- return this._sku;
1203
- },
1204
- set: function (value) {
1205
- if (value) {
1206
- if (this.configuring) {
1207
- this.show3D = false;
1208
- this.fullScreen = false;
1209
- this.configuring = false;
1210
- this._changeDetector.detectChanges();
1211
- }
1212
- this._sku = value;
1213
- this._getArticle();
1214
- }
1215
- },
1216
- enumerable: true,
1217
- configurable: true
1218
- });
1219
- Object.defineProperty(ProductPageComponent.prototype, "settings", {
1220
- get: function () {
1221
- return this._settings;
1222
- },
1223
- set: function (value) {
1224
- if (value) {
1225
- if (typeof value === 'string') {
1226
- this._settings = JSON.parse(value);
1227
- }
1228
- else {
1229
- this._settings = value;
1230
- }
1231
- }
1232
- },
1233
- enumerable: true,
1234
- configurable: true
1235
- });
1236
- Object.defineProperty(ProductPageComponent.prototype, "fullScreen", {
1237
- get: function () {
1238
- return this._fullScreen;
1239
- },
1240
- set: function (value) {
1241
- this._fullScreen = value;
1242
- this.fullscreenAnimationEnd = true;
1243
- this._changeDetector.detectChanges();
1244
- // setTimeout(() => {
1245
- // this.fullscreenAnimationEnd = true;
1246
- // }, 400)
1247
- },
1248
- enumerable: true,
1249
- configurable: true
1250
- });
1251
- Object.defineProperty(ProductPageComponent.prototype, "fullScreenIcon", {
1252
- get: function () {
1253
- return this.fullScreen ? this.icon.NormalScreen : this.icon.FullScreen;
1254
- },
1255
- enumerable: true,
1256
- configurable: true
1257
- });
1258
- Object.defineProperty(ProductPageComponent.prototype, "currentView", {
1259
- get: function () {
1260
- return this._currentView;
1261
- },
1262
- set: function (value) {
1263
- this._currentView = value;
1264
- this.show2D = this._currentView === SelectorType.TwoD;
1265
- this.show3D = this._currentView === SelectorType.ThreeD;
1266
- this._changeDetector.detectChanges();
1267
- },
1268
- enumerable: true,
1269
- configurable: true
1270
- });
1271
- ProductPageComponent.prototype.ngOnInit = function () {
1272
- if (this._settings) {
1273
- this.settingsService.settings = undefined;
1274
- this.settingsService.createSettingsFromObject(this._settings);
1275
- }
1276
- else {
1277
- this._settings = this.settingsService.settings;
1278
- }
1279
- };
1280
- ProductPageComponent.prototype.ngAfterViewInit = function () {
1281
- };
1282
- ProductPageComponent.prototype.ngOnDestroy = function () {
1283
- this._subs.forEach(function (s) { return s.unsubscribe(); });
1284
- if (this._initializedSub) {
1285
- this._initializedSub.unsubscribe();
1286
- }
1287
- this.configurator = undefined;
1288
- this.selections = undefined;
1289
- this.fullscreenbutton = undefined;
1290
- };
1291
- ProductPageComponent.prototype.setInstance = function (event) {
1292
- if (event.detail) {
1293
- this._ione.setInstance(event.detail);
1294
- }
1295
- };
1296
- ProductPageComponent.prototype.handleStartConfiguration = function () {
1297
- this.configuring = true;
1298
- this._changeDetector.detectChanges();
1299
- };
1300
- ProductPageComponent.prototype.showFullScreen = function () {
1301
- this.fullScreen = !this.fullScreen;
1302
- };
1303
- ProductPageComponent.prototype._handleSettingsLoaded = function (loaded) {
1304
- if (loaded) {
1305
- this._ione.initConnection();
1306
- }
1307
- };
1308
- ProductPageComponent.prototype._getArticle = function () {
1309
- return __awaiter(this, void 0, void 0, function () {
1310
- var _this = this;
1311
- return __generator(this, function (_a) {
1312
- if (this._initializedSub) {
1313
- this._initializedSub.unsubscribe();
1314
- }
1315
- this._initializedSub = this._ione.controllerInitialized.subscribe(function (init) { return __awaiter(_this, void 0, void 0, function () {
1316
- var _this = this;
1317
- return __generator(this, function (_a) {
1318
- if (init) {
1319
- this._ione.getFullArticle(this._sku).then(function (article) {
1320
- _this.article = article;
1321
- if (_this.article) {
1322
- _this.configurable = _this.article.goodType === 'B';
1323
- if (_this.configurable) {
1324
- _this.currentView = SelectorType.TwoD;
1325
- }
1326
- _this.threeD = _this.article.is3D;
1327
- _this.selectorType = _this.article.selectorTypeCustomer;
1328
- _this._ione.getDeliveryPrognosis(_this.article.goodId).then(function (stockInfo) {
1329
- var stockAndDelivery = stockInfo;
1330
- _this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
1331
- _this._changeDetector.detectChanges();
1332
- });
1333
- _this._changeDetector.detectChanges();
1334
- }
1335
- });
1336
- }
1337
- return [2 /*return*/];
1338
- });
1339
- }); });
1340
- return [2 /*return*/];
1341
- });
1342
- });
1343
- };
1344
- ProductPageComponent.ctorParameters = function () { return [
1345
- { type: ProductConnectorService },
1346
- { type: Renderer2 },
1347
- { type: ChangeDetectorRef },
1348
- { type: IconCacheService },
1349
- { type: ProductSettingsService },
1350
- { type: ProductEventService }
1351
- ]; };
1352
- __decorate([
1353
- ViewChild('configurator', { read: ElementRef })
1354
- ], ProductPageComponent.prototype, "configurator", void 0);
1355
- __decorate([
1356
- ViewChild('selections', { read: ElementRef })
1357
- ], ProductPageComponent.prototype, "selections", void 0);
1358
- __decorate([
1359
- ViewChild('fullscreenbutton', { read: ElementRef })
1360
- ], ProductPageComponent.prototype, "fullscreenbutton", void 0);
1361
- __decorate([
1362
- Input()
1363
- ], ProductPageComponent.prototype, "sku", null);
1364
- __decorate([
1365
- Input()
1366
- ], ProductPageComponent.prototype, "settings", null);
1367
- ProductPageComponent = __decorate([
1368
- Component({
1369
- selector: 'app-product-page',
1370
- 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",
1371
- animations: [
1372
- trigger('toggleFullScreen', [
1373
- state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
1374
- state('halfscreen', style({ 'position': '*', 'top': '*', 'left': '*', 'width': '*', 'height': '*' })),
1375
- transition('halfscreen <=> fullscreen', animate('200ms ease-in-out')),
1376
- ]),
1377
- trigger('toggleTopLeft', [
1378
- state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0' })),
1379
- state('halfscreen', style({ 'position': 'absolute', 'top': '*', 'left': '*' })),
1380
- transition('halfscreen <=> fullscreen', animate('200ms ease-in-out')),
1381
- ]),
1382
- trigger('toggleTopRight', [
1383
- state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'right': '0' })),
1384
- state('halfscreen', style({ 'position': '*', 'top': '*', 'right': '*' })),
1385
- transition('halfscreen <=> fullscreen', animate('200ms ease-in-out')),
1386
- ]),
1387
- trigger('toggleFullScreenRight', [
1388
- state('fullscreen', style({ 'position': 'fixed', 'width': '400px', 'top': '0', 'right': '0' })),
1389
- state('halfscreen', style({ 'position': '*', 'width': '*', 'top': '*', 'right': '*' })),
1390
- transition('halfscreen <=> fullscreen', animate('200ms ease-in-out')),
1391
- ]),
1392
- trigger('toggleVisibilityByState', [
1393
- state('hide', style({ 'opacity': '0', 'display': 'none' })),
1394
- state('show', style({ 'display': 'block', 'opacity': '1' })),
1395
- transition('hide <=> show', animate('200ms 100ms ease-in-out')),
1396
- ]),
1397
- trigger('toggleVisibility', [
1398
- state('void', style({ 'opacity': '0' })),
1399
- state('*', style({ 'opacity': '1' })),
1400
- transition('void => *', animate('200ms ease-in-out')),
1401
- ])
1402
- ],
1403
- styles: [".page-wrapper{font-family:iOneMontserrat;font-size:12px;display:flex;flex-direction:column;max-width:1400px;padding:0 15px;margin:0 auto}.page-wrapper-content{display:flex;flex-direction:row;margin:40px 0}.page-wrapper-content.no-top-margin,.page-wrapper-content:first-child{margin-top:0}.page-wrapper-left{display:flex;width:55%;flex-direction:column}.page-wrapper-right{display:flex;width:45%;flex-direction:column}.page-wrapper-full{display:flex;width:100%;flex-direction:column}.page-wrapper-66{display:flex;width:60%;flex-direction:column}.page-wrapper-33{display:flex;width:40%;flex-direction:column}.threed-selections{display:none}.threed-selections.show-selections{display:block}.threed-selections ::ng-deep .rp-lite-selector .rp-answers-slideout ::ng-deep co-slideout{width:480px;z-index:3}.product-action-buttons{position:relative}.product-action-buttons.full-screen{z-index:10}.product-image-container{grid-column:1/7;grid-row:1/6;position:relative}.product-page-block-selector-type{width:auto;position:absolute;top:10px;right:10px;z-index:2}.product-page-block-image{box-sizing:border-box;width:100%;z-index:1;position:relative}.product-page-block-image .threed-configurator{border:1px solid #efefef}.product-page-block-image .threed-configurator .layer .viewer canvas{height:100%;width:100%}.product-page-block-image .threed-configurator ::ng-deep .rp-element-toolbar{top:30px}.product-page-block-image app-image-carousel.show-animated,.product-page-block-image threed-configurator.show-animated{opacity:1;z-index:0;transition:.2s ease-in-out}.product-page-block-image .fullscreen-button{cursor:pointer;height:50px;width:50px;position:absolute;left:30px;z-index:100;top:30px}.product-page-block-image.full{grid-column:1/11;grid-row:2/span 10;z-index:3}.product-page-block-description{grid-column:7/12;grid-row:1/1}.product-page-block-additional,.product-page-block-additional-description{width:100%}.product-page-block-price{grid-column:1/3;grid-row:2/2;align-self:center}.product-page-block-price.full{grid-column:1/5}.product-page-block-addtocart{grid-column:3/5;grid-row:2/2;align-self:center;padding-top:30px!important}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button:hover div.rippler{background:#f6f5f4}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button ::ng-deep co-icon{position:relative;z-index:2}.product-page-block-addtocart ::ng-deep co-button.cart-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-button.cart-button:hover{background:#74b77f}.addtocart-reserved{grid-column:1/3;grid-row:3/3}.product-page-block-stock{grid-column:1/3;grid-row:4/4}.product-page-block-delivery{grid-column:3/5;grid-row:4/4}::ng-deep co-scroll-container{overflow:hidden;position:relative}::ng-deep co-scroll-container .content-wrapper{padding:0}::ng-deep co-scroll-container .scroll-layer{left:0;top:0}::ng-deep co-scroll-container .scroll-layer .scroller{width:34px;height:34px;border-radius:36px;background:#fff;cursor:pointer;box-shadow:0 0 5px 0 rgba(0,0,0,.2)}::ng-deep co-scroll-container .scroll-layer .scroller:hover{background:#f6f5f4}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll{left:5px}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll:before{border-width:0 3px 3px 0;padding:4px;margin-left:13px;margin-top:11px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll{right:5px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll:after{border-width:0 3px 3px 0;padding:4px;margin-left:9px;margin-top:11px}.product-page-block-variants{margin:20px 0 0}.product-page-block-variants ::ng-deep app-product-related>div{display:flex;gap:15px;align-items:center;border-top:1px solid #f6f5f4;padding:5px 0 7px 15px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep app-header h3{font-size:14px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container{width:320px;max-width:100%;padding:0 16px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller{width:26px;height:26px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll{left:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll:before{border-width:0 2px 2px 0;margin-left:9px;margin-top:9px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll{right:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll:after{border-width:0 2px 2px 0;margin-left:6px;margin-top:9px}.product-page-block-variants ::ng-deep co-tile.small{min-width:50px!important;max-width:50px!important;border:1px solid #f6f5f4;margin:0 10px 0 0;border-radius:4px}.product-page-block-variants ::ng-deep co-tile.small:hover{border-color:#22313c}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper{padding:0}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-top{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image{height:40px!important;padding:5px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper .no-image{width:40px;height:40px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper span{display:none!important}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-bottom{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-extra-bottom{display:none}.product-page-block-alternatives ::ng-deep .article-wrapper{margin:0 20px 0 0}.product-page-block-alternatives ::ng-deep .article-wrapper:last-child{margin:0}.product-page-block-alternatives ::ng-deep co-tile{cursor:pointer;transition:.14s ease-out;border:1px solid transparent;border-bottom-color:#f6f5f4;padding:15px 10px 0;width:319px;max-width:none;min-width:0;box-sizing:border-box}.product-page-block-alternatives ::ng-deep co-tile:hover{box-shadow:none;border-color:#f6f5f4}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper div.image co-image{transform:scale(1.05)}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper .tile-bottom{margin:0}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-extra-bottom .main .description{text-decoration:underline}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper{padding:0;position:relative;outline:0;overflow:hidden}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-top{position:absolute;left:0;top:0;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image{position:relative;padding:1px;display:flex;align-items:center;justify-content:center;overflow:hidden;max-width:250px;margin:0 auto;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image:after{content:\"\";padding:100% 0 0;float:left;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image co-image{position:absolute;left:0;top:0;overflow:hidden;width:100%;height:100%;-o-object-fit:contain;object-fit:contain;z-index:-1;transition:.2s}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image .no-image-wrapper{position:absolute;display:flex;left:50%;top:50%;margin:-48px 0 0 -54px;flex-direction:column;align-items:center;opacity:.25}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom{position:absolute;right:0;bottom:0;margin:0 -40px 0 0;transition:.2s;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button{margin:0 0 5px!important;width:36px;height:36px;border:1px solid #22313c;cursor:pointer;border-radius:4px;padding:0!important;font-size:0}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button co-icon{width:32px;height:32px;margin:0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom{outline:0;padding:15px 0;background:0 0!important;min-height:60px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main{padding:0 10px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .description{font-size:15px;font-weight:700;margin:0 0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .price{font-size:16px;margin:15px 0 0;font-weight:700;color:#2b60a7}.product-page-block-additional-information{grid-column:1/6;grid-row:4/4}.product-page-block-properties{grid-column:7/10;grid-row:3/3}.product-page-block-related-articles{grid-column:2/6;grid-row:4/4}.product-page-block-alternative-articles{grid-column:6/10;grid-row:4/4}.product-page-block-documents{grid-column:2/6;grid-row:5/5}.product-page-block-symbols{grid-column:6/10;grid-row:5/5}@media screen and (max-width:950px){.default-padding{padding-top:20px;padding-bottom:20px}.m-padding{padding-top:15px;padding-bottom:15px}.s-padding{padding-top:5px;padding-bottom:5px}.page-wrapper{max-width:650px}.page-wrapper .page-wrapper-content{flex-direction:column;margin:30px 0}.page-wrapper .page-wrapper-content .page-wrapper-left,.page-wrapper .page-wrapper-content .page-wrapper-right{width:100%}.product-page-block-alternatives ::ng-deep co-tile{width:284px!important}}@media screen and (max-width:650px){[class*=-padding]{padding-left:0!important;padding-right:0!important}.product-page-block-addtocart ::ng-deep co-number-picker co-button{height:38px!important}.product-page-block-addtocart ::ng-deep co-number-picker co-input-text{height:38px!important;width:36px!important}.product-page-block-addtocart ::ng-deep co-button.cart-button{height:40px;font-size:13px}}"]
1404
- })
1405
- ], ProductPageComponent);
1406
- return ProductPageComponent;
1407
- }());
1408
-
1409
- var ProductSelectorTypeComponent = /** @class */ (function () {
1410
- function ProductSelectorTypeComponent(_iconCache, _changeDetector) {
1411
- this._iconCache = _iconCache;
1412
- this._changeDetector = _changeDetector;
1413
- this.type = SelectorType;
1414
- this.icons = IconEnum;
1415
- this.onIconClick = new EventEmitter();
1416
- this.currentTypeChange = new EventEmitter();
1417
- this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
1418
- this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
1419
- }
1420
- ProductSelectorTypeComponent.prototype.ngOnInit = function () {
1421
- };
1422
- ProductSelectorTypeComponent.prototype.handleIconClick = function (type) {
1423
- this.currentType = type;
1424
- this.currentTypeChange.next(this.currentType);
1425
- this.onIconClick.next(this.currentType);
1426
- this._changeDetector.detectChanges();
1427
- };
1428
- ProductSelectorTypeComponent.ctorParameters = function () { return [
1429
- { type: IconCacheService },
1430
- { type: ChangeDetectorRef }
1431
- ]; };
1432
- __decorate([
1433
- Input()
1434
- ], ProductSelectorTypeComponent.prototype, "show2D", void 0);
1435
- __decorate([
1436
- Input()
1437
- ], ProductSelectorTypeComponent.prototype, "show3D", void 0);
1438
- __decorate([
1439
- Input()
1440
- ], ProductSelectorTypeComponent.prototype, "currentType", void 0);
1441
- __decorate([
1442
- Output()
1443
- ], ProductSelectorTypeComponent.prototype, "onIconClick", void 0);
1444
- __decorate([
1445
- Output()
1446
- ], ProductSelectorTypeComponent.prototype, "currentTypeChange", void 0);
1447
- ProductSelectorTypeComponent = __decorate([
1448
- Component({
1449
- selector: 'app-product-selector-type',
1450
- 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",
1451
- 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}"]
1452
- })
1453
- ], ProductSelectorTypeComponent);
1454
- return ProductSelectorTypeComponent;
1455
- }());
1456
-
1457
- var ImageCarouselComponent = /** @class */ (function () {
1458
- function ImageCarouselComponent(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
1459
- var _this = this;
1460
- this._ione = _ione;
1461
- this._appEventService = _appEventService;
1462
- this._changeDetector = _changeDetector;
1463
- this._domSanitizer = _domSanitizer;
1464
- this.iconCache = iconCache;
1465
- this.icons = IconEnum;
1466
- this.showLoader = false;
1467
- this.showRefresh = false;
1468
- this.resizing = false;
1469
- this._currentIndex = 0;
1470
- this._images = [];
1471
- this._subs = [];
1472
- this._subs.push(this._appEventService.onRenderStarted.subscribe(function () {
1473
- _this.showLoader = true;
1474
- }), this._appEventService.onDraftRenderImageReceived.subscribe(function (url) {
1475
- if (_this._images[0] instanceof CoDocument) {
1476
- _this._images.unshift(url);
1477
- }
1478
- else {
1479
- _this._images[0] = url;
1480
- }
1481
- _this.showLoader = false;
1482
- }));
1483
- }
1484
- Object.defineProperty(ImageCarouselComponent.prototype, "images", {
1485
- get: function () {
1486
- return this._images;
1487
- },
1488
- set: function (value) {
1489
- if (value && value.length > 0) {
1490
- this._images = value;
1491
- this._loadImages();
1492
- this._changeDetector.detectChanges();
1493
- }
1494
- },
1495
- enumerable: true,
1496
- configurable: true
1497
- });
1498
- ImageCarouselComponent.prototype.handleWindowResize = function () {
1499
- var _this = this;
1500
- this.resizing = true;
1501
- this._scrollCarouselToIndex();
1502
- clearTimeout(this._resizeTimer);
1503
- this._resizeTimer = setTimeout(function () {
1504
- _this.resizing = false;
1505
- }, 200);
1506
- };
1507
- ImageCarouselComponent.prototype.gotoNextSlide = function () {
1508
- this.currentIndex++;
1509
- };
1510
- ImageCarouselComponent.prototype.gotoPrevSlide = function () {
1511
- this.currentIndex--;
1512
- };
1513
- ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
1514
- return this.currentIndex === index;
1515
- };
1516
- Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
1517
- get: function () {
1518
- return this._currentIndex;
1519
- },
1520
- set: function (value) {
1521
- this._currentIndex = value;
1522
- this._scrollCarouselToIndex();
1523
- },
1524
- enumerable: true,
1525
- configurable: true
1526
- });
1527
- ImageCarouselComponent.prototype.ngOnInit = function () {
1528
- };
1529
- ImageCarouselComponent.prototype.ngOnDestroy = function () {
1530
- this.carousel = undefined;
1531
- this._subs.forEach(function (s) { return s.unsubscribe(); });
1532
- };
1533
- ImageCarouselComponent.prototype.handleThumbClick = function (index) {
1534
- this.currentIndex = index;
1535
- };
1536
- ImageCarouselComponent.prototype.onForceRenderImage = function () {
1537
- this._appEventService.onForceRenderImage.next();
1538
- };
1539
- ImageCarouselComponent.prototype.getImageSrc = function (image) {
1540
- var source = '';
1541
- if (image instanceof CoDocument) {
1542
- if (image.filePath) {
1543
- source = image.filePath;
1544
- }
1545
- else {
1546
- source = image.documentBodyAsDataUri;
1547
- }
1548
- }
1549
- else if (image.detail !== undefined) {
1550
- source = image.detail;
1551
- }
1552
- return this._domSanitizer.bypassSecurityTrustUrl(source);
1553
- };
1554
- ImageCarouselComponent.prototype._loadImages = function () {
1555
- var _this = this;
1556
- if (this._images) {
1557
- this._images.forEach(function (i) {
1558
- if (!i.documentBody && !i.filePath) {
1559
- _this._ione.getDocumentContent(i.documentId, false).then(function (content) {
1560
- if (content) {
1561
- i.documentBody = content.documentContent;
1562
- }
1563
- });
1564
- }
1565
- });
1566
- }
1567
- };
1568
- ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
1569
- if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
1570
- var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
1571
- if (this.carousel && this.carousel.nativeElement) {
1572
- this.carousel.nativeElement.scrollLeft = movePx;
1573
- // this.carousel.nativeElement.scrollTo({
1574
- // left: movePx,
1575
- // behavior: 'smooth'
1576
- // });
1577
- }
1578
- }
1579
- };
1580
- ImageCarouselComponent.ctorParameters = function () { return [
1581
- { type: ProductConnectorService },
1582
- { type: ProductEventService },
1583
- { type: ChangeDetectorRef },
1584
- { type: DomSanitizer },
1585
- { type: IconCacheService }
1586
- ]; };
1587
- __decorate([
1588
- ViewChild('carousel', { read: ElementRef })
1589
- ], ImageCarouselComponent.prototype, "carousel", void 0);
1590
- __decorate([
1591
- Input()
1592
- ], ImageCarouselComponent.prototype, "showRefresh", void 0);
1593
- __decorate([
1594
- Input()
1595
- ], ImageCarouselComponent.prototype, "images", null);
1596
- __decorate([
1597
- HostListener('window:resize')
1598
- ], ImageCarouselComponent.prototype, "handleWindowResize", null);
1599
- __decorate([
1600
- HostListener('swipeleft')
1601
- ], ImageCarouselComponent.prototype, "gotoNextSlide", null);
1602
- __decorate([
1603
- HostListener('swiperight')
1604
- ], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
1605
- __decorate([
1606
- HostBinding('class.resizing')
1607
- ], ImageCarouselComponent.prototype, "resizing", void 0);
1608
- ImageCarouselComponent = __decorate([
1609
- Component({
1610
- selector: 'app-image-carousel',
1611
- 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",
1612
- 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)}}"]
1613
- })
1614
- ], ImageCarouselComponent);
1615
- return ImageCarouselComponent;
1616
- }());
1617
-
1618
- var ProductDescriptionComponent = /** @class */ (function () {
1619
- function ProductDescriptionComponent() {
1620
- }
1621
- ProductDescriptionComponent.prototype.ngOnInit = function () {
1622
- };
1623
- __decorate([
1624
- Input()
1625
- ], ProductDescriptionComponent.prototype, "article", void 0);
1626
- ProductDescriptionComponent = __decorate([
1627
- Component({
1628
- selector: 'app-product-description',
1629
- 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",
1630
- 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}}"]
1631
- })
1632
- ], ProductDescriptionComponent);
1633
- return ProductDescriptionComponent;
1634
- }());
1635
-
1636
- var BitUtils = /** @class */ (function () {
1637
- function BitUtils() {
1638
- }
1639
- BitUtils.IsShortDescription = function (bit) {
1640
- return (1 & bit) > 0;
1641
- };
1642
- BitUtils.IsFullDescription = function (bit) {
1643
- return (2 & bit) > 0;
1644
- };
1645
- BitUtils.IsMetaTitle = function (bit) {
1646
- return (4 & bit) > 0;
1647
- };
1648
- BitUtils.IsMetaDescription = function (bit) {
1649
- return (8 & bit) > 0;
1650
- };
1651
- BitUtils.IsMetaKeys = function (bit) {
1652
- return (16 & bit) > 0;
1653
- };
1654
- return BitUtils;
1655
- }());
1656
-
1657
- var ProductAdditionalDescriptionComponent = /** @class */ (function () {
1658
- function ProductAdditionalDescriptionComponent(_appEventService) {
1659
- this._appEventService = _appEventService;
1660
- }
1661
- Object.defineProperty(ProductAdditionalDescriptionComponent.prototype, "article", {
1662
- get: function () {
1663
- return this._article;
1664
- },
1665
- set: function (value) {
1666
- this._article = value;
1667
- if (this._article) {
1668
- this.description = this.article.additionalDescription;
1669
- this._prepareDescription();
1670
- }
1671
- },
1672
- enumerable: true,
1673
- configurable: true
1674
- });
1675
- ProductAdditionalDescriptionComponent.prototype.ngOnInit = function () {
1676
- };
1677
- ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
1678
- this._appEventService.onUpdateProductInfoTab.next(0);
1679
- };
1680
- ProductAdditionalDescriptionComponent.prototype._prepareDescription = function () {
1681
- var _this = this;
1682
- this.description = '';
1683
- if (this.article.texts && this.article.texts.length > 0) {
1684
- this.article.texts.forEach(function (txt) {
1685
- if (BitUtils.IsShortDescription(txt.publication)) {
1686
- _this.description += txt.text;
1687
- }
1688
- });
1689
- this.description = this.description.replace(/<[^>]*>?/gm, '');
1690
- if (this.description.length > 250) {
1691
- this.description = this.description.substr(0, 250) + ' [..]';
1692
- }
1693
- }
1694
- };
1695
- ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
1696
- { type: ProductEventService }
1697
- ]; };
1698
- __decorate([
1699
- Input()
1700
- ], ProductAdditionalDescriptionComponent.prototype, "article", null);
1701
- ProductAdditionalDescriptionComponent = __decorate([
1702
- Component({
1703
- selector: 'app-product-additional-description',
1704
- 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",
1705
- 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}}"]
1706
- })
1707
- ], ProductAdditionalDescriptionComponent);
1708
- return ProductAdditionalDescriptionComponent;
1709
- }());
1710
-
1711
- var ProductPriceComponent = /** @class */ (function () {
1712
- function ProductPriceComponent(_changeDetector) {
1713
- this._changeDetector = _changeDetector;
1714
- this.showFromPrice = false;
1715
- this._configurable = false;
1716
- }
1717
- Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
1718
- get: function () {
1719
- return this._pricing;
1720
- },
1721
- set: function (value) {
1722
- this._pricing = value;
1723
- this._setPrices();
1724
- },
1725
- enumerable: true,
1726
- configurable: true
1727
- });
1728
- Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
1729
- set: function (value) {
1730
- this._configurable = value;
1731
- this._setPrices();
1732
- },
1733
- enumerable: true,
1734
- configurable: true
1735
- });
1736
- ProductPriceComponent.prototype.ngOnInit = function () {
1737
- };
1738
- ProductPriceComponent.prototype._setPrices = function () {
1739
- if (this._pricing) {
1740
- this.valutaSign = this._getSign(this._pricing.retailCurrency);
1741
- if (this._configurable) {
1742
- this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
1743
- this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
1744
- this.toPrice = undefined;
1745
- }
1746
- else {
1747
- this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
1748
- this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
1749
- this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
1750
- this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
1751
- }
1752
- this._changeDetector.detectChanges();
1753
- }
1754
- };
1755
- ProductPriceComponent.prototype._getSign = function (currency) {
1756
- switch (currency) {
1757
- case 'EUR':
1758
- return '€';
1759
- default:
1760
- return '€';
1761
- }
1762
- };
1763
- ProductPriceComponent.ctorParameters = function () { return [
1764
- { type: ChangeDetectorRef }
1765
- ]; };
1766
- __decorate([
1767
- Input()
1768
- ], ProductPriceComponent.prototype, "pricing", null);
1769
- __decorate([
1770
- Input()
1771
- ], ProductPriceComponent.prototype, "configurable", null);
1772
- ProductPriceComponent = __decorate([
1773
- Component({
1774
- selector: 'app-product-price',
1775
- 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",
1776
- 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}}"]
1777
- })
1778
- ], ProductPriceComponent);
1779
- return ProductPriceComponent;
1780
- }());
1781
-
1782
- var ProductAddtocartComponent = /** @class */ (function () {
1783
- function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
1784
- this.iconCache = iconCache;
1785
- this._ioneControllerService = _ioneControllerService;
1786
- this._appEventService = _appEventService;
1787
- this._settingsService = _settingsService;
1788
- this.icon = IconEnum;
1789
- this.configurable = false;
1790
- this.configuring = false;
1791
- this.fullscreen = false;
1792
- this.startConfiguration = new EventEmitter();
1793
- this.addToCartClick = new EventEmitter();
1794
- this.addToQuoteClick = new EventEmitter();
1795
- this.showQuoteButton = false;
1796
- this._quantity = 1;
1797
- }
1798
- Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
1799
- get: function () {
1800
- return this._quantity;
1801
- },
1802
- set: function (value) {
1803
- this._quantity = Math.max(1, value);
1804
- },
1805
- enumerable: true,
1806
- configurable: true
1807
- });
1808
- ProductAddtocartComponent.prototype.ngOnInit = function () {
1809
- };
1810
- ProductAddtocartComponent.prototype.ngOnDestroy = function () {
1811
- this.addToCartButton = undefined;
1812
- };
1813
- ProductAddtocartComponent.prototype.handleAddToCartClick = function (quantity) {
1814
- return __awaiter(this, void 0, void 0, function () {
1815
- var _a, _b;
1816
- return __generator(this, function (_c) {
1817
- switch (_c.label) {
1818
- case 0:
1819
- _b = (_a = this._appEventService.onAddToCart).next;
1820
- return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
1821
- case 1:
1822
- _b.apply(_a, [_c.sent()]);
1823
- return [2 /*return*/];
1824
- }
1825
- });
1826
- });
1827
- };
1828
- ProductAddtocartComponent.prototype.handleAddToQuoteClick = function (quantity) {
1829
- return __awaiter(this, void 0, void 0, function () {
1830
- var _a, _b;
1831
- return __generator(this, function (_c) {
1832
- switch (_c.label) {
1833
- case 0:
1834
- _b = (_a = this._appEventService.onAddToQuote).next;
1835
- return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
1836
- case 1:
1837
- _b.apply(_a, [_c.sent()]);
1838
- return [2 /*return*/];
1839
- }
1840
- });
1841
- });
1842
- };
1843
- ProductAddtocartComponent.prototype._getJSONFromArticleObject = function (article) {
1844
- return __awaiter(this, void 0, void 0, function () {
1845
- var configuratorStatistics;
1846
- return __generator(this, function (_a) {
1847
- switch (_a.label) {
1848
- case 0:
1849
- configuratorStatistics = new ConfiguratorStatisticsEnvironment();
1850
- configuratorStatistics.userType = 'iOneProductPage';
1851
- configuratorStatistics.transactionType = 'Sales';
1852
- configuratorStatistics.actionDomain = 'bundle';
1853
- configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
1854
- configuratorStatistics.webHost = window.location.host;
1855
- configuratorStatistics.bundleHost = window.location.host;
1856
- return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, configuratorStatistics)];
1857
- case 1: return [2 /*return*/, _a.sent()];
1858
- }
1859
- });
1860
- });
1861
- };
1862
- ProductAddtocartComponent.ctorParameters = function () { return [
1863
- { type: IconCacheService },
1864
- { type: ProductConnectorService },
1865
- { type: ProductEventService },
1866
- { type: ProductSettingsService }
1867
- ]; };
1868
- __decorate([
1869
- ViewChild('addtocartbutton', { read: ElementRef })
1870
- ], ProductAddtocartComponent.prototype, "addToCartButton", void 0);
1871
- __decorate([
1872
- Input()
1873
- ], ProductAddtocartComponent.prototype, "article", void 0);
1874
- __decorate([
1875
- Input()
1876
- ], ProductAddtocartComponent.prototype, "configurable", void 0);
1877
- __decorate([
1878
- Input()
1879
- ], ProductAddtocartComponent.prototype, "configuring", void 0);
1880
- __decorate([
1881
- HostBinding('class.full-screen'),
1882
- Input()
1883
- ], ProductAddtocartComponent.prototype, "fullscreen", void 0);
1884
- __decorate([
1885
- Input()
1886
- ], ProductAddtocartComponent.prototype, "quantity", null);
1887
- __decorate([
1888
- Output()
1889
- ], ProductAddtocartComponent.prototype, "startConfiguration", void 0);
1890
- __decorate([
1891
- Output()
1892
- ], ProductAddtocartComponent.prototype, "addToCartClick", void 0);
1893
- __decorate([
1894
- Output()
1895
- ], ProductAddtocartComponent.prototype, "addToQuoteClick", void 0);
1896
- ProductAddtocartComponent = __decorate([
1897
- Component({
1898
- selector: 'app-product-addtocart',
1899
- template: "<div class=\"atc-wrapper\">\n <co-number-picker *ngIf=\"!configurable && !configuring\" class=\"quantity-select\" [(model)]=\"quantity\" [min]=\"1\" horizontal></co-number-picker>\n <div class=\"button-wrapper\">\n <co-button class=\"configure-button\" *ngIf=\"configurable\"\n [iconData]=\"iconCache.getIcon(icon.MagicWand)\"\n [label]=\"'CONFIGURE' | localize\"\n (onClick)=\"startConfiguration.emit()\"\n ></co-button>\n <co-button #addtocartbutton class=\"cart-button\" *ngIf=\"!configurable\"\n [iconData]=\"iconCache.getIcon(icon.AddToCartDrop)\"\n [label]=\"'SHOPPING_CART_IN' | localize\"\n (onClick)=\"handleAddToCartClick(quantity)\"\n ></co-button>\n <co-button class=\"cart-button quote\" *ngIf=\"!configurable && showQuoteButton\"\n [iconData]=\"iconCache.getIcon(icon.Quote)\"\n [label]=\"'QUOTATION' | localize\"\n (onClick)=\"handleAddToQuoteClick(quantity)\"\n ></co-button>\n </div>\n</div>\n",
1900
- styles: [":host{display:flex;flex-direction:column}:host :not(:last-child){margin-bottom:5px}:host .atc-wrapper{display:flex;flex-direction:row;align-items:baseline}:host .atc-wrapper .quantity-select{margin-right:5px}:host.full-screen .cart-button{position:fixed;right:20px;bottom:20px;z-index:3}::ng-deep co-number-picker{max-width:100px;border:2px solid #f6f5f4;border-radius:5px}::ng-deep co-number-picker ::ng-deep co-input-text{height:50px!important;border:none!important;width:50px!important}::ng-deep co-number-picker ::ng-deep co-input-text:after{display:none}::ng-deep co-number-picker ::ng-deep co-input-text.focused{box-shadow:none!important;border:none!important;background:0 0!important}::ng-deep co-number-picker ::ng-deep co-input-text .clear-icon{display:none}::ng-deep co-number-picker ::ng-deep co-input-text input{width:100%;text-align:center}::ng-deep co-number-picker ::ng-deep co-button{justify-content:center;padding:0!important;margin:0!important;height:50px!important;background-color:transparent!important}::ng-deep co-number-picker ::ng-deep co-button ::ng-deep co-icon [fill]{fill:#22313c!important}.button-wrapper ::ng-deep co-button{height:50px;max-width:300px;justify-content:center;font-size:15px;border-radius:5px!important;cursor:pointer;padding:0 20px!important}.button-wrapper ::ng-deep co-button:hover{background:#74b77f}::ng-deep co-button.cart-button{border-radius:5px}::ng-deep co-button.cart-button.quote{background:#7292b6}"]
1901
- })
1902
- ], ProductAddtocartComponent);
1903
- return ProductAddtocartComponent;
1904
- }());
1905
-
1906
- var ProductRelatedComponent = /** @class */ (function () {
1907
- function ProductRelatedComponent(_iOne, _appEventService) {
1908
- this._iOne = _iOne;
1909
- this._appEventService = _appEventService;
1910
- this.isSmallModus = true;
1911
- this._articles = [];
1912
- }
1913
- Object.defineProperty(ProductRelatedComponent.prototype, "articles", {
1914
- get: function () {
1915
- return this._articles;
1916
- },
1917
- set: function (value) {
1918
- var _this = this;
1919
- if (value) {
1920
- if (this.refType && this.refType !== undefined) {
1921
- if (value.length > 0) {
1922
- value.forEach(function (x) {
1923
- if (x.refType === _this.refType) {
1924
- _this._articles.push(x);
1925
- }
1926
- });
1927
- }
1928
- }
1929
- else {
1930
- this._articles = value;
1931
- }
1932
- this._loadImages();
1933
- }
1934
- },
1935
- enumerable: true,
1936
- configurable: true
1937
- });
1938
- ProductRelatedComponent.prototype.handleContentClick = function (article) {
1939
- this._appEventService.onAlternativeClick.next(article);
1940
- };
1941
- ProductRelatedComponent.prototype._loadImages = function () {
1942
- var _this = this;
1943
- this._articles.forEach(function (a) {
1944
- if (!a.image.documentBody) {
1945
- _this._iOne.getDocumentContent(a.image.documentId).then(function (content) {
1946
- if (content) {
1947
- a.image.documentBody = content.documentContent;
1948
- }
1949
- });
1950
- }
1951
- });
1952
- };
1953
- ProductRelatedComponent.ctorParameters = function () { return [
1954
- { type: ProductConnectorService },
1955
- { type: ProductEventService }
1956
- ]; };
1957
- __decorate([
1958
- Input()
1959
- ], ProductRelatedComponent.prototype, "refType", void 0);
1960
- __decorate([
1961
- Input()
1962
- ], ProductRelatedComponent.prototype, "label", void 0);
1963
- __decorate([
1964
- Input()
1965
- ], ProductRelatedComponent.prototype, "isSmallModus", void 0);
1966
- __decorate([
1967
- Input()
1968
- ], ProductRelatedComponent.prototype, "articles", null);
1969
- ProductRelatedComponent = __decorate([
1970
- Component({
1971
- selector: 'app-product-related',
1972
- 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",
1973
- 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}"]
1974
- })
1975
- ], ProductRelatedComponent);
1976
- return ProductRelatedComponent;
1977
- }());
1978
-
1979
- var ProductStockComponent = /** @class */ (function () {
1980
- function ProductStockComponent(_iOne, _iconCache) {
1981
- this._iOne = _iOne;
1982
- this._iconCache = _iconCache;
1983
- this.icon = IconEnum;
1984
- this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
1985
- }
1986
- Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
1987
- set: function (value) {
1988
- if (value) {
1989
- this.numberInStock = value.stock;
1990
- }
1991
- },
1992
- enumerable: true,
1993
- configurable: true
1994
- });
1995
- ProductStockComponent.prototype.ngOnInit = function () {
1996
- };
1997
- ProductStockComponent.ctorParameters = function () { return [
1998
- { type: ProductConnectorService },
1999
- { type: IconCacheService }
2000
- ]; };
2001
- __decorate([
2002
- Input()
2003
- ], ProductStockComponent.prototype, "stockAndDelivery", null);
2004
- ProductStockComponent = __decorate([
2005
- Component({
2006
- selector: 'app-product-stock',
2007
- 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",
2008
- 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}}"]
2009
- })
2010
- ], ProductStockComponent);
2011
- return ProductStockComponent;
2012
- }());
2013
-
2014
- var LocalizePipe = /** @class */ (function () {
2015
- function LocalizePipe(_dictionaryService) {
2016
- this._dictionaryService = _dictionaryService;
2017
- }
2018
- LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
2019
- var _a;
2020
- if (upperCaseFirst === void 0) { upperCaseFirst = true; }
2021
- if (replace === void 0) { replace = []; }
2022
- if (!value) {
2023
- return '';
2024
- }
2025
- replace = replace ? replace : [];
2026
- if (!Array.isArray(replace)) {
2027
- replace = [replace];
2028
- }
2029
- return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
2030
- };
2031
- LocalizePipe.ctorParameters = function () { return [
2032
- { type: DictionaryService }
2033
- ]; };
2034
- LocalizePipe = __decorate([
2035
- Pipe({
2036
- name: 'localize'
2037
- })
2038
- // A pipe for localizing string values in view templates.
2039
- ], LocalizePipe);
2040
- return LocalizePipe;
2041
- }());
2042
-
2043
- var ProductDeliveryComponent = /** @class */ (function () {
2044
- function ProductDeliveryComponent(_localizePipe, _iOne, _iconCache) {
2045
- this._localizePipe = _localizePipe;
2046
- this._iOne = _iOne;
2047
- this._iconCache = _iconCache;
2048
- this.icon = IconEnum;
2049
- this.iconData = this._iconCache.getIcon(this.icon.Truck);
2050
- }
2051
- Object.defineProperty(ProductDeliveryComponent.prototype, "stockAndDelivery", {
2052
- set: function (value) {
2053
- if (value) {
2054
- this.deliveryDescription = value.deliveryDescription;
2055
- if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
2056
- this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
2057
- }
2058
- }
2059
- },
2060
- enumerable: true,
2061
- configurable: true
2062
- });
2063
- ProductDeliveryComponent.prototype.ngOnInit = function () {
2064
- };
2065
- ProductDeliveryComponent.ctorParameters = function () { return [
2066
- { type: LocalizePipe },
2067
- { type: ProductConnectorService },
2068
- { type: IconCacheService }
2069
- ]; };
2070
- __decorate([
2071
- Input()
2072
- ], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
2073
- ProductDeliveryComponent = __decorate([
2074
- Component({
2075
- selector: 'app-product-delivery',
2076
- 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",
2077
- 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}}"]
2078
- })
2079
- ], ProductDeliveryComponent);
2080
- return ProductDeliveryComponent;
2081
- }());
2082
-
2083
- var ProductInfoTabsComponent = /** @class */ (function () {
2084
- function ProductInfoTabsComponent(_appEventService) {
2085
- var _this = this;
2086
- this._appEventService = _appEventService;
2087
- this.activeTabHeight = 0;
2088
- this.tabs = [];
2089
- this._subs = [];
2090
- this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
2091
- _this.updateTab(index);
2092
- _this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
2093
- }));
2094
- }
2095
- Object.defineProperty(ProductInfoTabsComponent.prototype, "article", {
2096
- set: function (value) {
2097
- if (value) {
2098
- this.articleObject = value;
2099
- this._setupTabs();
2100
- this.updateTab(0);
2101
- }
2102
- },
2103
- enumerable: true,
2104
- configurable: true
2105
- });
2106
- ProductInfoTabsComponent.prototype.ngOnDestroy = function () {
2107
- this._subs.forEach(function (s) { return s.unsubscribe(); });
2108
- };
2109
- ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
2110
- this.activeTab = tabIndex;
2111
- this.updateHeight(tabIndex);
2112
- };
2113
- ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
2114
- if (this.tabContent.nativeElement.children.length > 0) {
2115
- if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
2116
- this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
2117
- }
2118
- }
2119
- };
2120
- ProductInfoTabsComponent.prototype._setupTabs = function () {
2121
- this.tabs.push({ title: 'DESCRIPTION' });
2122
- this.tabs.push({ title: 'FEATURES' });
2123
- if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
2124
- this.tabs.push({ title: 'DOWNLOADS' });
2125
- }
2126
- if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
2127
- this.tabs.push({ title: 'SYMBOLS' });
2128
- }
2129
- };
2130
- ProductInfoTabsComponent.ctorParameters = function () { return [
2131
- { type: ProductEventService }
2132
- ]; };
2133
- __decorate([
2134
- ViewChild('tabContent')
2135
- ], ProductInfoTabsComponent.prototype, "tabContent", void 0);
2136
- __decorate([
2137
- Input()
2138
- ], ProductInfoTabsComponent.prototype, "article", null);
2139
- ProductInfoTabsComponent = __decorate([
2140
- Component({
2141
- selector: 'app-product-info-tabs',
2142
- 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",
2143
- 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}}"]
2144
- })
2145
- ], ProductInfoTabsComponent);
2146
- return ProductInfoTabsComponent;
2147
- }());
2148
-
2149
- var PipeModule = /** @class */ (function () {
2150
- function PipeModule() {
2151
- }
2152
- PipeModule = __decorate([
2153
- NgModule({
2154
- exports: [
2155
- LocalizePipe
2156
- ],
2157
- declarations: [
2158
- LocalizePipe
2159
- ],
2160
- providers: [
2161
- LocalizePipe
2162
- ]
2163
- })
2164
- ], PipeModule);
2165
- return PipeModule;
2166
- }());
2167
-
2168
- var ProductDocumentsComponent = /** @class */ (function () {
2169
- function ProductDocumentsComponent(iconCache) {
2170
- this.iconCache = iconCache;
2171
- this.icon = IconEnum;
2172
- this.showLabel = false;
2173
- this.documents = [];
2174
- }
2175
- ProductDocumentsComponent.ctorParameters = function () { return [
2176
- { type: IconCacheService }
2177
- ]; };
2178
- __decorate([
2179
- Input()
2180
- ], ProductDocumentsComponent.prototype, "showLabel", void 0);
2181
- __decorate([
2182
- Input()
2183
- ], ProductDocumentsComponent.prototype, "documents", void 0);
2184
- ProductDocumentsComponent = __decorate([
2185
- Component({
2186
- selector: 'app-product-documents',
2187
- 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",
2188
- 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}"]
2189
- })
2190
- ], ProductDocumentsComponent);
2191
- return ProductDocumentsComponent;
2192
- }());
2193
-
2194
- var HeaderComponent = /** @class */ (function () {
2195
- function HeaderComponent() {
2196
- }
2197
- HeaderComponent.prototype.ngOnInit = function () {
2198
- };
2199
- __decorate([
2200
- Input()
2201
- ], HeaderComponent.prototype, "label", void 0);
2202
- __decorate([
2203
- Input()
2204
- ], HeaderComponent.prototype, "amount", void 0);
2205
- HeaderComponent = __decorate([
2206
- Component({
2207
- selector: 'app-header',
2208
- 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",
2209
- styles: [".header-wrapper{display:flex;flex-direction:row;align-items:center}.header-wrapper .amount{margin-left:5px}"]
2210
- })
2211
- ], HeaderComponent);
2212
- return HeaderComponent;
2213
- }());
2214
-
2215
- var TabType;
2216
- (function (TabType) {
2217
- TabType["Additional"] = "additional";
2218
- TabType["Properties"] = "properties";
2219
- })(TabType || (TabType = {}));
2220
- var ProductInfoComponent = /** @class */ (function () {
2221
- function ProductInfoComponent() {
2222
- this.tabType = TabType;
2223
- this.currentTab = TabType.Additional;
2224
- }
2225
- ProductInfoComponent.prototype.ngOnInit = function () {
2226
- };
2227
- ProductInfoComponent.prototype.switchTab = function (tab) {
2228
- this.currentTab = tab;
2229
- };
2230
- __decorate([
2231
- Input()
2232
- ], ProductInfoComponent.prototype, "article", void 0);
2233
- ProductInfoComponent = __decorate([
2234
- Component({
2235
- selector: 'app-product-info',
2236
- 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",
2237
- animations: [
2238
- trigger('showContent', [
2239
- state('void', style({ 'opacity': '0' })),
2240
- state('*', style({ 'opacity': '1' })),
2241
- transition('void => *', animate('200ms 100ms ease-in-out')),
2242
- ])
2243
- ],
2244
- 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}"]
2245
- })
2246
- ], ProductInfoComponent);
2247
- return ProductInfoComponent;
2248
- }());
2249
-
2250
- var ProductAdditionalInfoComponent = /** @class */ (function () {
2251
- function ProductAdditionalInfoComponent(_sanitizer, _connectorService, _changeDetector) {
2252
- this._sanitizer = _sanitizer;
2253
- this._connectorService = _connectorService;
2254
- this._changeDetector = _changeDetector;
2255
- this.showLabel = false;
2256
- this.textParts = [];
2257
- this._superArticles = new Map();
2258
- }
2259
- Object.defineProperty(ProductAdditionalInfoComponent.prototype, "article", {
2260
- get: function () {
2261
- return this._article;
2262
- },
2263
- set: function (value) {
2264
- var _this = this;
2265
- if (value) {
2266
- this._article = value;
2267
- this._buildInfo().then(function () {
2268
- _this._changeDetector.detectChanges();
2269
- });
2270
- }
2271
- },
2272
- enumerable: true,
2273
- configurable: true
2274
- });
2275
- ProductAdditionalInfoComponent.prototype.ngOnInit = function () {
2276
- };
2277
- ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
2278
- return __awaiter(this, void 0, void 0, function () {
2279
- var _this = this;
2280
- return __generator(this, function (_a) {
2281
- return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
2282
- var texts, mainArticle;
2283
- var _this = this;
2284
- return __generator(this, function (_a) {
2285
- switch (_a.label) {
2286
- case 0:
2287
- texts = [];
2288
- if (!this.article.superArticleNr) return [3 /*break*/, 4];
2289
- mainArticle = void 0;
2290
- if (!this._superArticles.has(this.article.superArticleNr)) return [3 /*break*/, 1];
2291
- mainArticle = this._superArticles.get(this.article.superArticleNr);
2292
- return [3 /*break*/, 3];
2293
- case 1: return [4 /*yield*/, this._connectorService.getSuperArticle(this.article.superArticleNr)];
2294
- case 2:
2295
- mainArticle = _a.sent();
2296
- this._superArticles.set(this.article.superArticleNr, mainArticle);
2297
- _a.label = 3;
2298
- case 3:
2299
- mainArticle.texts.forEach(function (txt) {
2300
- if (BitUtils.IsFullDescription(txt.publication)) {
2301
- var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
2302
- texts.push(safeTxt);
2303
- }
2304
- });
2305
- resolve(texts);
2306
- return [3 /*break*/, 5];
2307
- case 4:
2308
- resolve(texts);
2309
- _a.label = 5;
2310
- case 5: return [2 /*return*/];
2311
- }
2312
- });
2313
- }); })];
2314
- });
2315
- });
2316
- };
2317
- ProductAdditionalInfoComponent.prototype._prepareArticleTexts = function () {
2318
- return __awaiter(this, void 0, void 0, function () {
2319
- var texts;
2320
- var _a;
2321
- var _this = this;
2322
- return __generator(this, function (_b) {
2323
- switch (_b.label) {
2324
- case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
2325
- case 1:
2326
- texts = _b.sent();
2327
- if (texts.length > 0) {
2328
- (_a = this.textParts).push.apply(_a, __spread(texts));
2329
- }
2330
- if (this.article.texts) {
2331
- this.article.texts.forEach(function (txt) {
2332
- if (BitUtils.IsFullDescription(txt.publication)) {
2333
- var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
2334
- _this.textParts.push(safeTxt);
2335
- }
2336
- });
2337
- }
2338
- return [2 /*return*/];
2339
- }
2340
- });
2341
- });
2342
- };
2343
- ProductAdditionalInfoComponent.prototype._buildInfo = function () {
2344
- return __awaiter(this, void 0, void 0, function () {
2345
- return __generator(this, function (_a) {
2346
- switch (_a.label) {
2347
- case 0:
2348
- this.textParts.length = 0;
2349
- return [4 /*yield*/, this._prepareArticleTexts()];
2350
- case 1:
2351
- _a.sent();
2352
- if (this.textParts.length === 0) {
2353
- if (this.article.additionalDescription) {
2354
- this.textParts.push(this.article.additionalDescription);
2355
- }
2356
- else if (this.article.description) {
2357
- this.textParts.push(this.article.description);
2358
- }
2359
- }
2360
- return [2 /*return*/];
2361
- }
2362
- });
2363
- });
2364
- };
2365
- ProductAdditionalInfoComponent.ctorParameters = function () { return [
2366
- { type: DomSanitizer },
2367
- { type: ProductConnectorService },
2368
- { type: ChangeDetectorRef }
2369
- ]; };
2370
- __decorate([
2371
- Input()
2372
- ], ProductAdditionalInfoComponent.prototype, "article", null);
2373
- __decorate([
2374
- Input()
2375
- ], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
2376
- ProductAdditionalInfoComponent = __decorate([
2377
- Component({
2378
- selector: 'app-product-additional-info',
2379
- 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",
2380
- 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}"]
2381
- })
2382
- ], ProductAdditionalInfoComponent);
2383
- return ProductAdditionalInfoComponent;
2384
- }());
2385
-
2386
- var propertyMap = new Map([
2387
- ['articleNr', 'ARTICLE_NUMBER'],
2388
- ['catExtra', 'CATEGORY'],
2389
- ['catType', 'CATEGORY_TYPE'],
2390
- ['description', 'DESCRIPTION'],
2391
- ['material', 'MATERIAL'],
2392
- ['title', 'TITLE'],
2393
- ['turnOverGroup', 'TURNOVERGROUP'],
2394
- ['height', 'HEIGHT'],
2395
- ['width', 'WIDTH']
2396
- ]);
2397
- var ProductPropertiesComponent = /** @class */ (function () {
2398
- function ProductPropertiesComponent() {
2399
- this.showLabel = false;
2400
- this.properties = [];
2401
- }
2402
- Object.defineProperty(ProductPropertiesComponent.prototype, "article", {
2403
- get: function () {
2404
- return this._article;
2405
- },
2406
- set: function (value) {
2407
- this._article = value;
2408
- this._prepareProperties();
2409
- },
2410
- enumerable: true,
2411
- configurable: true
2412
- });
2413
- ProductPropertiesComponent.prototype.ngOnInit = function () {
2414
- };
2415
- ProductPropertiesComponent.prototype._prepareProperties = function () {
2416
- var _this = this;
2417
- this.properties.length = 0;
2418
- if (!this._article) {
2419
- return;
2420
- }
2421
- propertyMap.forEach(function (value, key) {
2422
- if (_this.article.hasOwnProperty(key)) {
2423
- _this.properties.push({ key: value, value: _this.article[key] });
2424
- }
2425
- });
2426
- };
2427
- __decorate([
2428
- Input()
2429
- ], ProductPropertiesComponent.prototype, "article", null);
2430
- __decorate([
2431
- Input()
2432
- ], ProductPropertiesComponent.prototype, "showLabel", void 0);
2433
- ProductPropertiesComponent = __decorate([
2434
- Component({
2435
- selector: 'app-product-properties',
2436
- 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",
2437
- 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}}"]
2438
- })
2439
- ], ProductPropertiesComponent);
2440
- return ProductPropertiesComponent;
2441
- }());
2442
-
2443
- var ProductSymbolsComponent = /** @class */ (function () {
2444
- function ProductSymbolsComponent() {
2445
- this.symbolStrings = [];
2446
- }
2447
- Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
2448
- get: function () {
2449
- return this._symbols;
2450
- },
2451
- set: function (value) {
2452
- this._symbols = value;
2453
- if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
2454
- this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
2455
- }
2456
- if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
2457
- for (var i = 0; i < this._symbols['symbolString'].length; i++) {
2458
- this.symbolStrings.push(this._symbols['symbolString'][i]);
2459
- }
2460
- }
2461
- },
2462
- enumerable: true,
2463
- configurable: true
2464
- });
2465
- ProductSymbolsComponent.prototype.ngOnInit = function () {
2466
- };
2467
- __decorate([
2468
- Input()
2469
- ], ProductSymbolsComponent.prototype, "symbols", null);
2470
- __decorate([
2471
- HostBinding('class')
2472
- ], ProductSymbolsComponent.prototype, "_className", void 0);
2473
- ProductSymbolsComponent = __decorate([
2474
- Component({
2475
- selector: 'app-product-symbols',
2476
- 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",
2477
- styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
2478
- })
2479
- ], ProductSymbolsComponent);
2480
- return ProductSymbolsComponent;
2481
- }());
2482
-
2483
- var ProductPageModule = /** @class */ (function () {
2484
- function ProductPageModule() {
2485
- }
2486
- ProductPageModule = __decorate([
2487
- NgModule({
2488
- imports: [
2489
- CommonModule,
2490
- IconModule,
2491
- LoaderModule,
2492
- PipeModule,
2493
- NumberPickerModule,
2494
- ButtonModule,
2495
- PriceDisplayPipeModule,
2496
- InputTextModule,
2497
- FilesUploadModule,
2498
- ScrollContainerModule,
2499
- TileModule,
2500
- LevelIndicatorModule,
2501
- ArticleTileModule,
2502
- ],
2503
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
2504
- declarations: [
2505
- ProductPageComponent,
2506
- ProductSelectorTypeComponent,
2507
- ImageCarouselComponent,
2508
- ProductDescriptionComponent,
2509
- ProductAdditionalDescriptionComponent,
2510
- ProductPriceComponent,
2511
- ProductAddtocartComponent,
2512
- ProductRelatedComponent,
2513
- ProductStockComponent,
2514
- ProductDeliveryComponent,
2515
- ProductInfoTabsComponent,
2516
- ProductDocumentsComponent,
2517
- HeaderComponent,
2518
- ProductInfoComponent,
2519
- ProductAdditionalInfoComponent,
2520
- ProductPropertiesComponent,
2521
- ProductSymbolsComponent
2522
- ],
2523
- exports: [ProductPageComponent]
2524
- })
2525
- ], ProductPageModule);
2526
- return ProductPageModule;
2527
- }());
2528
-
2529
- var ProductExternalSourceModule = /** @class */ (function () {
2530
- function ProductExternalSourceModule() {
2531
- }
2532
- ProductExternalSourceModule = __decorate([
2533
- NgModule({
2534
- imports: [
2535
- CommonModule,
2536
- ProductPageModule
2537
- ],
2538
- declarations: [
2539
- ProductExternalSourceComponent
2540
- ],
2541
- exports: [
2542
- ProductExternalSourceComponent
2543
- ]
2544
- })
2545
- ], ProductExternalSourceModule);
2546
- return ProductExternalSourceModule;
2547
- }());
2548
-
2549
- var IoneProductModule = /** @class */ (function () {
2550
- function IoneProductModule() {
2551
- }
2552
- IoneProductModule = __decorate([
2553
- NgModule({
2554
- imports: [
2555
- // BrowserAnimationsModule,
2556
- CommonModule,
2557
- ProductExternalSourceModule,
2558
- ProductPageModule
2559
- ],
2560
- declarations: [
2561
- IoneProductComponent
2562
- ],
2563
- entryComponents: [
2564
- IoneProductComponent
2565
- ],
2566
- providers: [],
2567
- exports: [IoneProductComponent],
2568
- bootstrap: [
2569
- IoneProductComponent
2570
- ]
2571
- })
2572
- ], IoneProductModule);
2573
- return IoneProductModule;
2574
- }());
2575
-
2576
- /**
2577
- * Generated bundle index. Do not edit.
2578
- */
2579
-
2580
- export { IoneProductModule, ProductExternalSourceComponent, ProductExternalSourceModule, Version, ProductPageModule as ɵa, PipeModule as ɵb, ProductSymbolsComponent as ɵba, IoneProductComponent as ɵbb, LocalizePipe as ɵc, DictionaryService as ɵd, JsonUtilsService as ɵe, ProductPageComponent as ɵf, ProductConnectorService as ɵg, ProductConnectorAdapterService as ɵh, ProductSettingsService as ɵi, IconCacheService as ɵj, ProductEventService as ɵk, ProductSelectorTypeComponent as ɵl, ImageCarouselComponent as ɵm, ProductDescriptionComponent as ɵn, ProductAdditionalDescriptionComponent as ɵo, ProductPriceComponent as ɵp, ProductAddtocartComponent as ɵq, ProductRelatedComponent as ɵr, ProductStockComponent as ɵs, ProductDeliveryComponent as ɵt, ProductInfoTabsComponent as ɵu, ProductDocumentsComponent as ɵv, HeaderComponent as ɵw, ProductInfoComponent as ɵx, ProductAdditionalInfoComponent as ɵy, ProductPropertiesComponent as ɵz };
2581
- //# sourceMappingURL=colijnit-product.js.map