@colijnit/product 1.9.5 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/product-additional-info/product-additional-info.component.d.ts +4 -3
- package/app/components/product-external-source/product-external-source.component.d.ts +30 -0
- package/app/components/product-external-source/product-external-source.module.d.ts +2 -0
- package/app/components/product-page/product-page.component.d.ts +4 -0
- package/app/components/product-page/product-page.module.d.ts +2 -0
- package/app/ione-product.component.d.ts +5 -5
- package/app/ione-product.module.d.ts +0 -2
- package/app/model/{settings.d.ts → productSettings.d.ts} +3 -2
- package/app/pipe/pipe.module.d.ts +2 -0
- package/app/service/product-connector-adapter.service.d.ts +8 -2
- package/app/service/product-connector.service.d.ts +10 -5
- package/app/service/product-settings.service.d.ts +3 -3
- package/bundles/colijnit-product.umd.js +1469 -1258
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/bundles/colijnit-product.umd.min.js +2 -2
- package/bundles/colijnit-product.umd.min.js.map +1 -1
- package/colijnit-product.d.ts +28 -28
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/product-additional-info/product-additional-info.component.js +23 -16
- package/esm2015/app/components/product-addtocart/product-addtocart.component.js +2 -2
- package/esm2015/app/components/product-delivery/product-delivery.component.js +1 -2
- package/esm2015/app/components/product-external-source/product-external-source.component.js +123 -0
- package/esm2015/app/components/product-external-source/product-external-source.module.js +23 -0
- package/esm2015/app/components/product-page/product-page.component.js +45 -15
- package/esm2015/app/components/product-page/product-page.module.js +66 -0
- package/esm2015/app/ione-product.component.js +53 -20
- package/esm2015/app/ione-product.module.js +9 -74
- package/esm2015/app/model/productSettings.js +16 -0
- package/esm2015/app/pipe/pipe.module.js +20 -0
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/app/service/dictionary.service.js +1 -1
- package/esm2015/app/service/product-connector-adapter.service.js +34 -9
- package/esm2015/app/service/product-connector.service.js +33 -35
- package/esm2015/app/service/product-event.service.js +2 -6
- package/esm2015/app/service/product-settings.service.js +13 -74
- package/esm2015/colijnit-product.js +29 -29
- package/esm2015/public_api.js +3 -1
- package/esm5/app/components/product-additional-info/product-additional-info.component.js +43 -24
- package/esm5/app/components/product-addtocart/product-addtocart.component.js +2 -2
- package/esm5/app/components/product-delivery/product-delivery.component.js +1 -2
- package/esm5/app/components/product-external-source/product-external-source.component.js +126 -0
- package/esm5/app/components/product-external-source/product-external-source.module.js +26 -0
- package/esm5/app/components/product-page/product-page.component.js +49 -15
- package/esm5/app/components/product-page/product-page.module.js +69 -0
- package/esm5/app/ione-product.component.js +81 -21
- package/esm5/app/ione-product.module.js +9 -74
- package/esm5/app/model/productSettings.js +18 -0
- package/esm5/app/pipe/pipe.module.js +23 -0
- package/esm5/app/product-version.js +3 -3
- package/esm5/app/service/dictionary.service.js +1 -1
- package/esm5/app/service/product-connector-adapter.service.js +61 -10
- package/esm5/app/service/product-connector.service.js +65 -52
- package/esm5/app/service/product-event.service.js +2 -6
- package/esm5/app/service/product-settings.service.js +14 -74
- package/esm5/colijnit-product.js +29 -29
- package/esm5/public_api.js +3 -1
- package/fesm2015/colijnit-product.js +1185 -1056
- package/fesm2015/colijnit-product.js.map +1 -1
- package/fesm5/colijnit-product.js +1442 -1230
- package/fesm5/colijnit-product.js.map +1 -1
- package/package.json +5 -4
- package/public_api.d.ts +2 -0
- package/app/service/product-initializer.service.d.ts +0 -6
- package/app/service/product-module.service.d.ts +0 -9
- package/esm2015/app/model/settings.js +0 -15
- package/esm2015/app/service/product-initializer.service.js +0 -26
- package/esm2015/app/service/product-module.service.js +0 -39
- package/esm5/app/model/settings.js +0 -17
- package/esm5/app/service/product-initializer.service.js +0 -29
- package/esm5/app/service/product-module.service.js +0 -50
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonModule, IconModule, NumberPickerModule, InputTextModule, FilesUploadModule, LoaderModule, ScrollContainerModule, TileModule, LevelIndicatorModule, PriceDisplayPipeModule, ArticleTileModule } from '@colijnit/corecomponents';
|
|
4
|
-
import { CoDocument } from '@colijnit/mainapi/build/model/co-document';
|
|
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';
|
|
5
3
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
6
4
|
import { Options } from '@colijnit/ioneconnector/build/model/options';
|
|
7
5
|
import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
|
|
@@ -10,40 +8,110 @@ import { Articles } from '@colijnit/articleapi/build/articles';
|
|
|
10
8
|
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
11
9
|
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
12
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
13
|
import { HttpClient } from '@angular/common/http';
|
|
14
14
|
import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
|
|
15
|
+
import { CommonModule } from '@angular/common';
|
|
15
16
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
16
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';
|
|
17
20
|
import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
|
|
18
|
-
import { CommonModule } from '@angular/common';
|
|
19
21
|
|
|
20
22
|
// this file is dynamically created, do not change this
|
|
21
23
|
var Version = /** @class */ (function () {
|
|
22
24
|
function Version() {
|
|
23
25
|
this.name = "@colijnit/product";
|
|
24
26
|
this.description = "Product detail page project for iOne";
|
|
25
|
-
this.symVer = "
|
|
26
|
-
this.publishDate = "
|
|
27
|
+
this.symVer = "2.9.1";
|
|
28
|
+
this.publishDate = "14-9-2023 16:32:35";
|
|
27
29
|
}
|
|
28
30
|
return Version;
|
|
29
31
|
}());
|
|
30
32
|
|
|
31
|
-
var
|
|
32
|
-
function
|
|
33
|
+
var JsonUtilsService = /** @class */ (function () {
|
|
34
|
+
function JsonUtilsService() {
|
|
33
35
|
}
|
|
34
|
-
|
|
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
|
+
});
|
|
35
61
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Component({
|
|
41
|
-
selector: 'app-product-description',
|
|
42
|
-
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",
|
|
43
|
-
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}}"]
|
|
62
|
+
JsonUtilsService.ɵprov = ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
|
|
63
|
+
JsonUtilsService = __decorate([
|
|
64
|
+
Injectable({
|
|
65
|
+
providedIn: 'root'
|
|
44
66
|
})
|
|
45
|
-
],
|
|
46
|
-
return
|
|
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;
|
|
47
115
|
}());
|
|
48
116
|
|
|
49
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.
|
|
@@ -57,14 +125,46 @@ var ProductConnectorAdapterService = /** @class */ (function () {
|
|
|
57
125
|
this.articleConnector.showLoader.unsubscribe();
|
|
58
126
|
};
|
|
59
127
|
ProductConnectorAdapterService.prototype.initConnector = function (options) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
+
});
|
|
64
143
|
};
|
|
65
144
|
ProductConnectorAdapterService.prototype.setInstance = function (instanceId) {
|
|
66
145
|
// this.articleConnector.setInstanceToConfigure(instanceId, false);
|
|
67
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
|
+
};
|
|
68
168
|
ProductConnectorAdapterService.prototype.getDeliveryPrognosis = function (goodId, branchNr) {
|
|
69
169
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
170
|
var deliveryPrognosis;
|
|
@@ -223,51 +323,30 @@ var ProductConnectorAdapterService = /** @class */ (function () {
|
|
|
223
323
|
});
|
|
224
324
|
});
|
|
225
325
|
};
|
|
226
|
-
ProductConnectorAdapterService
|
|
227
|
-
ProductConnectorAdapterService = __decorate([
|
|
228
|
-
Injectable({
|
|
229
|
-
providedIn: 'root'
|
|
230
|
-
})
|
|
231
|
-
], ProductConnectorAdapterService);
|
|
232
|
-
return ProductConnectorAdapterService;
|
|
233
|
-
}());
|
|
234
|
-
|
|
235
|
-
var JsonUtilsService = /** @class */ (function () {
|
|
236
|
-
function JsonUtilsService() {
|
|
237
|
-
}
|
|
238
|
-
JsonUtilsService.prototype.readJsonFile = function (filePath) {
|
|
326
|
+
ProductConnectorAdapterService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
|
|
239
327
|
return __awaiter(this, void 0, void 0, function () {
|
|
240
|
-
var response, e_1;
|
|
241
328
|
return __generator(this, function (_a) {
|
|
242
329
|
switch (_a.label) {
|
|
243
|
-
case 0:
|
|
244
|
-
|
|
245
|
-
return [4 /*yield*/, fetch(filePath)];
|
|
246
|
-
case 1:
|
|
247
|
-
response = _a.sent();
|
|
248
|
-
if (!response.ok) {
|
|
249
|
-
return [2 /*return*/, null];
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
return [2 /*return*/, response.json()];
|
|
253
|
-
}
|
|
254
|
-
return [3 /*break*/, 3];
|
|
255
|
-
case 2:
|
|
256
|
-
e_1 = _a.sent();
|
|
257
|
-
console.error('Error getting file:', e_1.message);
|
|
258
|
-
return [2 /*return*/, ''];
|
|
259
|
-
case 3: return [2 /*return*/];
|
|
330
|
+
case 0: return [4 /*yield*/, this.transactionConnector.addWebSessionTransactionLine(sku, quantity)];
|
|
331
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
260
332
|
}
|
|
261
333
|
});
|
|
262
334
|
});
|
|
263
335
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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;
|
|
271
350
|
}());
|
|
272
351
|
|
|
273
352
|
var LanguageCode;
|
|
@@ -428,51 +507,6 @@ var DictionaryService = /** @class */ (function () {
|
|
|
428
507
|
return DictionaryService;
|
|
429
508
|
}());
|
|
430
509
|
|
|
431
|
-
var SettingsOptions = /** @class */ (function () {
|
|
432
|
-
function SettingsOptions() {
|
|
433
|
-
this.showStockStatus = false;
|
|
434
|
-
this.showZoomButton = false;
|
|
435
|
-
this.showTagFilter = false;
|
|
436
|
-
this.showAsConfigured = false;
|
|
437
|
-
this.inlineAnswers = false;
|
|
438
|
-
this.showArButton = false;
|
|
439
|
-
this.arEnabled = false;
|
|
440
|
-
this.vrEnabled = false;
|
|
441
|
-
}
|
|
442
|
-
return SettingsOptions;
|
|
443
|
-
}());
|
|
444
|
-
|
|
445
|
-
var RenderModes;
|
|
446
|
-
(function (RenderModes) {
|
|
447
|
-
RenderModes["RenderRoom"] = "render_room";
|
|
448
|
-
RenderModes["RenderShop"] = "render_shop";
|
|
449
|
-
RenderModes["RenderIone"] = "render_ione";
|
|
450
|
-
})(RenderModes || (RenderModes = {}));
|
|
451
|
-
|
|
452
|
-
var RenderParameters = /** @class */ (function () {
|
|
453
|
-
function RenderParameters() {
|
|
454
|
-
this.host = "";
|
|
455
|
-
this.port = 0;
|
|
456
|
-
this.secure = false;
|
|
457
|
-
this.renderMode = RenderModes.RenderShop;
|
|
458
|
-
}
|
|
459
|
-
return RenderParameters;
|
|
460
|
-
}());
|
|
461
|
-
|
|
462
|
-
var Settings = /** @class */ (function () {
|
|
463
|
-
function Settings() {
|
|
464
|
-
this.session = undefined;
|
|
465
|
-
this.useGroups = true;
|
|
466
|
-
this.useRenders = false;
|
|
467
|
-
this.useEncryption = true;
|
|
468
|
-
this.useMatch = false;
|
|
469
|
-
this.currencySymbol = '€';
|
|
470
|
-
this.options = new SettingsOptions();
|
|
471
|
-
this.renderParameters = new RenderParameters();
|
|
472
|
-
}
|
|
473
|
-
return Settings;
|
|
474
|
-
}());
|
|
475
|
-
|
|
476
510
|
var ProductSettingsService = /** @class */ (function () {
|
|
477
511
|
function ProductSettingsService(_jsonUtilsService, _dictionaryService) {
|
|
478
512
|
this._jsonUtilsService = _jsonUtilsService;
|
|
@@ -500,13 +534,13 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
500
534
|
case 1:
|
|
501
535
|
jsonSettings = _a.sent();
|
|
502
536
|
if (jsonSettings) {
|
|
503
|
-
this.settings = Object.assign(new
|
|
537
|
+
this.settings = Object.assign(new ProductSettings(), jsonSettings);
|
|
504
538
|
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
505
539
|
this.settingsFinished();
|
|
506
540
|
}
|
|
507
541
|
return [3 /*break*/, 3];
|
|
508
542
|
case 2:
|
|
509
|
-
this.settings = Object.assign(new
|
|
543
|
+
this.settings = Object.assign(new ProductSettings(), settings);
|
|
510
544
|
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
511
545
|
this.settingsFinished();
|
|
512
546
|
_a.label = 3;
|
|
@@ -517,52 +551,19 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
517
551
|
};
|
|
518
552
|
ProductSettingsService.prototype.createSettingsFromObject = function (obj) {
|
|
519
553
|
return __awaiter(this, void 0, void 0, function () {
|
|
554
|
+
var ownOptions, ownRenderParameters;
|
|
520
555
|
return __generator(this, function (_a) {
|
|
521
556
|
if (!this.settings) {
|
|
522
|
-
this.settings = new
|
|
523
|
-
}
|
|
524
|
-
if (obj.hasOwnProperty('url')) {
|
|
525
|
-
this.settings.url = obj['url'];
|
|
526
|
-
this._dictionaryService.rootUrl = this.settings.url.replace('/ajaxservice', '');
|
|
527
|
-
}
|
|
528
|
-
if (obj.hasOwnProperty('schema')) {
|
|
529
|
-
this.settings.schema = obj['schema'];
|
|
530
|
-
}
|
|
531
|
-
if (obj.hasOwnProperty('version')) {
|
|
532
|
-
this.settings.version = obj['version'];
|
|
533
|
-
}
|
|
534
|
-
if (obj.hasOwnProperty('branch')) {
|
|
535
|
-
this.settings.branch = obj['branch'];
|
|
557
|
+
this.settings = new ProductSettings();
|
|
536
558
|
}
|
|
537
|
-
|
|
538
|
-
|
|
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);
|
|
539
564
|
}
|
|
540
|
-
if (obj.
|
|
541
|
-
this.settings.
|
|
542
|
-
}
|
|
543
|
-
if (obj.hasOwnProperty('languageCode')) {
|
|
544
|
-
this.settings.languageCode = obj['languageCode'];
|
|
545
|
-
}
|
|
546
|
-
if (obj.hasOwnProperty('username')) {
|
|
547
|
-
this.settings.username = obj['username'];
|
|
548
|
-
}
|
|
549
|
-
if (obj.hasOwnProperty('password')) {
|
|
550
|
-
this.settings.password = obj['password'];
|
|
551
|
-
}
|
|
552
|
-
if (obj.hasOwnProperty('timeoutInMs')) {
|
|
553
|
-
this.settings.timeoutInMs = obj['timeoutInMs'];
|
|
554
|
-
}
|
|
555
|
-
if (obj.hasOwnProperty('session')) {
|
|
556
|
-
this.settings.session = obj['session'];
|
|
557
|
-
}
|
|
558
|
-
if (obj.hasOwnProperty('useGroups')) {
|
|
559
|
-
this.settings.useGroups = obj['useGroups'];
|
|
560
|
-
}
|
|
561
|
-
if (obj.hasOwnProperty('useEncryption')) {
|
|
562
|
-
this.settings.useEncryption = obj['useEncryption'];
|
|
563
|
-
}
|
|
564
|
-
if (obj.hasOwnProperty('useMatch')) {
|
|
565
|
-
this.settings.useMatch = obj['useMatch'];
|
|
565
|
+
if (obj.options) {
|
|
566
|
+
this.settings.options = Object.assign({}, ownOptions, obj.options);
|
|
566
567
|
}
|
|
567
568
|
if (obj.hasOwnProperty('assetPath')) {
|
|
568
569
|
this.settings.assetPath = obj['assetPath'];
|
|
@@ -577,27 +578,6 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
577
578
|
this.settings.threeDAssetPath += '/';
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
|
-
if (obj.hasOwnProperty('currencySymbol')) {
|
|
581
|
-
this.settings.currencySymbol = obj['currencySymbol'];
|
|
582
|
-
}
|
|
583
|
-
if (obj.hasOwnProperty('gtm')) {
|
|
584
|
-
this.settings.gtm = obj['gtm'];
|
|
585
|
-
}
|
|
586
|
-
if (obj.hasOwnProperty('assetIndex')) {
|
|
587
|
-
this.settings.assetIndex = obj['assetIndex'];
|
|
588
|
-
}
|
|
589
|
-
if (obj.hasOwnProperty('lightPresetsIndex')) {
|
|
590
|
-
this.settings.lightPresetsIndex = obj['lightPresetsIndex'];
|
|
591
|
-
}
|
|
592
|
-
if (obj.hasOwnProperty('additionalTranslationFile')) {
|
|
593
|
-
this.settings.additionalTranslationFile = obj['additionalTranslationFile'];
|
|
594
|
-
}
|
|
595
|
-
if (obj.hasOwnProperty('options')) {
|
|
596
|
-
this.settings.options = obj['options'];
|
|
597
|
-
}
|
|
598
|
-
if (obj.hasOwnProperty('renderParameters')) {
|
|
599
|
-
this.settings.renderParameters = obj['renderParameters'];
|
|
600
|
-
}
|
|
601
581
|
this.settingsFinished();
|
|
602
582
|
return [2 /*return*/];
|
|
603
583
|
});
|
|
@@ -620,19 +600,16 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
620
600
|
{ type: JsonUtilsService },
|
|
621
601
|
{ type: DictionaryService }
|
|
622
602
|
]; };
|
|
623
|
-
ProductSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(ɵɵinject(JsonUtilsService), ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
|
|
624
603
|
ProductSettingsService = __decorate([
|
|
625
|
-
Injectable(
|
|
626
|
-
providedIn: 'root'
|
|
627
|
-
})
|
|
604
|
+
Injectable()
|
|
628
605
|
], ProductSettingsService);
|
|
629
606
|
return ProductSettingsService;
|
|
630
607
|
}());
|
|
631
608
|
|
|
632
609
|
// Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
|
|
633
610
|
var ProductConnectorService = /** @class */ (function () {
|
|
634
|
-
function ProductConnectorService(
|
|
635
|
-
this.
|
|
611
|
+
function ProductConnectorService(_adapterService, _settingsService) {
|
|
612
|
+
this._adapterService = _adapterService;
|
|
636
613
|
this._settingsService = _settingsService;
|
|
637
614
|
this.controllerInitialized = new BehaviorSubject(false);
|
|
638
615
|
this._initializing = false;
|
|
@@ -650,57 +627,61 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
650
627
|
ProductConnectorService.prototype.ngOnDestroy = function () {
|
|
651
628
|
this.subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
652
629
|
};
|
|
653
|
-
ProductConnectorService.prototype.
|
|
630
|
+
ProductConnectorService.prototype.initConnection = function () {
|
|
654
631
|
return __awaiter(this, void 0, void 0, function () {
|
|
655
|
-
var settings;
|
|
632
|
+
var settings, e_1;
|
|
656
633
|
return __generator(this, function (_a) {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
catch (e) {
|
|
685
|
-
this._initializing = false;
|
|
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*/];
|
|
686
660
|
}
|
|
687
|
-
|
|
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)];
|
|
688
668
|
});
|
|
689
669
|
});
|
|
690
670
|
};
|
|
691
671
|
ProductConnectorService.prototype.setInstance = function (instanceId) {
|
|
692
|
-
this.
|
|
672
|
+
this._instanceId = instanceId;
|
|
673
|
+
this._adapterService.setInstance(instanceId);
|
|
693
674
|
};
|
|
694
675
|
ProductConnectorService.prototype.getFullArticle = function (sku) {
|
|
695
676
|
return __awaiter(this, void 0, void 0, function () {
|
|
696
677
|
var goodId;
|
|
697
678
|
return __generator(this, function (_a) {
|
|
698
679
|
switch (_a.label) {
|
|
699
|
-
case 0: return [4 /*yield*/, this.
|
|
680
|
+
case 0: return [4 /*yield*/, this._adapterService.getGoodIdFromArticleNr(sku)];
|
|
700
681
|
case 1:
|
|
701
682
|
goodId = _a.sent();
|
|
702
683
|
if (goodId) {
|
|
703
|
-
return [2 /*return*/, this.
|
|
684
|
+
return [2 /*return*/, this._adapterService.getArticleFullObject(goodId)];
|
|
704
685
|
}
|
|
705
686
|
return [2 /*return*/, null];
|
|
706
687
|
}
|
|
@@ -709,27 +690,42 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
709
690
|
};
|
|
710
691
|
ProductConnectorService.prototype.getDocumentContent = function (docId, thumbnail) {
|
|
711
692
|
if (thumbnail === void 0) { thumbnail = true; }
|
|
712
|
-
return this.
|
|
693
|
+
return this._adapterService.getDocumentContent(docId, thumbnail);
|
|
713
694
|
};
|
|
714
695
|
ProductConnectorService.prototype.getDeliveryPrognosis = function (goodId) {
|
|
715
|
-
return this.
|
|
696
|
+
return this._adapterService.getDeliveryPrognosis(goodId);
|
|
716
697
|
};
|
|
717
698
|
ProductConnectorService.prototype.getSelectorDeliveryDate = function () {
|
|
718
699
|
return __awaiter(this, void 0, void 0, function () {
|
|
719
700
|
return __generator(this, function (_a) {
|
|
720
|
-
return [2 /*return*/, this.
|
|
701
|
+
return [2 /*return*/, this._adapterService.getSelectorDeliveryDate()];
|
|
721
702
|
});
|
|
722
703
|
});
|
|
723
704
|
};
|
|
724
705
|
ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
|
|
725
|
-
return this.
|
|
706
|
+
return this._adapterService.getDeliveryDate2(goodId);
|
|
726
707
|
};
|
|
727
708
|
ProductConnectorService.prototype.getSuperArticle = function (id) {
|
|
728
|
-
return this.
|
|
709
|
+
return this._adapterService.getSuperArticle(id);
|
|
729
710
|
};
|
|
730
|
-
ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader,
|
|
711
|
+
ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, configuratorStatistics) {
|
|
731
712
|
if (showLoader === void 0) { showLoader = true; }
|
|
732
|
-
return this.
|
|
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
|
+
});
|
|
733
729
|
};
|
|
734
730
|
ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
|
|
735
731
|
this._shouldShowLoader = showLoader;
|
|
@@ -738,11 +734,8 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
738
734
|
{ type: ProductConnectorAdapterService },
|
|
739
735
|
{ type: ProductSettingsService }
|
|
740
736
|
]; };
|
|
741
|
-
ProductConnectorService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(ɵɵinject(ProductConnectorAdapterService), ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
|
|
742
737
|
ProductConnectorService = __decorate([
|
|
743
|
-
Injectable(
|
|
744
|
-
providedIn: 'root'
|
|
745
|
-
})
|
|
738
|
+
Injectable()
|
|
746
739
|
], ProductConnectorService);
|
|
747
740
|
return ProductConnectorService;
|
|
748
741
|
}());
|
|
@@ -762,7 +755,6 @@ var ProductEventService = /** @class */ (function () {
|
|
|
762
755
|
this.onArticleInfoReceived = new Subject();
|
|
763
756
|
this.onUpdateProductInfoTab = new Subject();
|
|
764
757
|
}
|
|
765
|
-
ProductEventService.ɵprov = ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
|
|
766
758
|
__decorate([
|
|
767
759
|
Output()
|
|
768
760
|
], ProductEventService.prototype, "onAddToCart", void 0);
|
|
@@ -777,13 +769,330 @@ var ProductEventService = /** @class */ (function () {
|
|
|
777
769
|
], ProductEventService.prototype, "onForceRenderImage", void 0);
|
|
778
770
|
ProductEventService = __decorate([
|
|
779
771
|
Directive(),
|
|
780
|
-
Injectable(
|
|
781
|
-
providedIn: 'root'
|
|
782
|
-
})
|
|
772
|
+
Injectable()
|
|
783
773
|
], ProductEventService);
|
|
784
774
|
return ProductEventService;
|
|
785
775
|
}());
|
|
786
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
|
+
|
|
787
1096
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. **/
|
|
788
1097
|
var IconEnum;
|
|
789
1098
|
(function (IconEnum) {
|
|
@@ -861,213 +1170,36 @@ var IconCacheService = /** @class */ (function () {
|
|
|
861
1170
|
return IconCacheService;
|
|
862
1171
|
}());
|
|
863
1172
|
|
|
864
|
-
var
|
|
865
|
-
function
|
|
1173
|
+
var ProductPageComponent = /** @class */ (function () {
|
|
1174
|
+
function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
|
|
866
1175
|
var _this = this;
|
|
867
1176
|
this._ione = _ione;
|
|
868
|
-
this.
|
|
1177
|
+
this._renderer = _renderer;
|
|
869
1178
|
this._changeDetector = _changeDetector;
|
|
870
|
-
this._domSanitizer = _domSanitizer;
|
|
871
1179
|
this.iconCache = iconCache;
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
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;
|
|
878
1191
|
this._subs = [];
|
|
879
|
-
this._subs.push(this.
|
|
880
|
-
_this.
|
|
881
|
-
|
|
882
|
-
if (_this._images[0] instanceof CoDocument) {
|
|
883
|
-
_this._images.unshift(url);
|
|
884
|
-
}
|
|
885
|
-
else {
|
|
886
|
-
_this._images[0] = url;
|
|
1192
|
+
this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
|
|
1193
|
+
if (_this.selections.nativeElement) {
|
|
1194
|
+
_this.selections.nativeElement.forceRenderImage();
|
|
887
1195
|
}
|
|
888
|
-
|
|
1196
|
+
}), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._ione.controllerInitialized.subscribe(function (initialized) {
|
|
1197
|
+
_this.settingsLoaded = initialized;
|
|
889
1198
|
}));
|
|
890
1199
|
}
|
|
891
|
-
Object.defineProperty(
|
|
1200
|
+
Object.defineProperty(ProductPageComponent.prototype, "sku", {
|
|
892
1201
|
get: function () {
|
|
893
|
-
return this.
|
|
894
|
-
},
|
|
895
|
-
set: function (value) {
|
|
896
|
-
if (value && value.length > 0) {
|
|
897
|
-
this._images = value;
|
|
898
|
-
this._loadImages();
|
|
899
|
-
this._changeDetector.detectChanges();
|
|
900
|
-
}
|
|
901
|
-
},
|
|
902
|
-
enumerable: true,
|
|
903
|
-
configurable: true
|
|
904
|
-
});
|
|
905
|
-
ImageCarouselComponent.prototype.handleWindowResize = function () {
|
|
906
|
-
var _this = this;
|
|
907
|
-
this.resizing = true;
|
|
908
|
-
this._scrollCarouselToIndex();
|
|
909
|
-
clearTimeout(this._resizeTimer);
|
|
910
|
-
this._resizeTimer = setTimeout(function () {
|
|
911
|
-
_this.resizing = false;
|
|
912
|
-
}, 200);
|
|
913
|
-
};
|
|
914
|
-
ImageCarouselComponent.prototype.gotoNextSlide = function () {
|
|
915
|
-
this.currentIndex++;
|
|
916
|
-
};
|
|
917
|
-
ImageCarouselComponent.prototype.gotoPrevSlide = function () {
|
|
918
|
-
this.currentIndex--;
|
|
919
|
-
};
|
|
920
|
-
ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
|
|
921
|
-
return this.currentIndex === index;
|
|
922
|
-
};
|
|
923
|
-
Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
|
|
924
|
-
get: function () {
|
|
925
|
-
return this._currentIndex;
|
|
926
|
-
},
|
|
927
|
-
set: function (value) {
|
|
928
|
-
this._currentIndex = value;
|
|
929
|
-
this._scrollCarouselToIndex();
|
|
930
|
-
},
|
|
931
|
-
enumerable: true,
|
|
932
|
-
configurable: true
|
|
933
|
-
});
|
|
934
|
-
ImageCarouselComponent.prototype.ngOnInit = function () {
|
|
935
|
-
};
|
|
936
|
-
ImageCarouselComponent.prototype.ngOnDestroy = function () {
|
|
937
|
-
this.carousel = undefined;
|
|
938
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
939
|
-
};
|
|
940
|
-
ImageCarouselComponent.prototype.handleThumbClick = function (index) {
|
|
941
|
-
this.currentIndex = index;
|
|
942
|
-
};
|
|
943
|
-
ImageCarouselComponent.prototype.onForceRenderImage = function () {
|
|
944
|
-
this._appEventService.onForceRenderImage.next();
|
|
945
|
-
};
|
|
946
|
-
ImageCarouselComponent.prototype.getImageSrc = function (image) {
|
|
947
|
-
var source = '';
|
|
948
|
-
if (image instanceof CoDocument) {
|
|
949
|
-
if (image.filePath) {
|
|
950
|
-
source = image.filePath;
|
|
951
|
-
}
|
|
952
|
-
else {
|
|
953
|
-
source = image.documentBodyAsDataUri;
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
else if (image.detail !== undefined) {
|
|
957
|
-
source = image.detail;
|
|
958
|
-
}
|
|
959
|
-
return this._domSanitizer.bypassSecurityTrustUrl(source);
|
|
960
|
-
};
|
|
961
|
-
ImageCarouselComponent.prototype._loadImages = function () {
|
|
962
|
-
var _this = this;
|
|
963
|
-
if (this._images) {
|
|
964
|
-
this._images.forEach(function (i) {
|
|
965
|
-
if (!i.documentBody && !i.filePath) {
|
|
966
|
-
_this._ione.getDocumentContent(i.documentId, false).then(function (content) {
|
|
967
|
-
if (content) {
|
|
968
|
-
i.documentBody = content.documentContent;
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
|
-
ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
|
|
976
|
-
if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
|
|
977
|
-
var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
|
|
978
|
-
if (this.carousel && this.carousel.nativeElement) {
|
|
979
|
-
this.carousel.nativeElement.scrollLeft = movePx;
|
|
980
|
-
// this.carousel.nativeElement.scrollTo({
|
|
981
|
-
// left: movePx,
|
|
982
|
-
// behavior: 'smooth'
|
|
983
|
-
// });
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
};
|
|
987
|
-
ImageCarouselComponent.ctorParameters = function () { return [
|
|
988
|
-
{ type: ProductConnectorService },
|
|
989
|
-
{ type: ProductEventService },
|
|
990
|
-
{ type: ChangeDetectorRef },
|
|
991
|
-
{ type: DomSanitizer },
|
|
992
|
-
{ type: IconCacheService }
|
|
993
|
-
]; };
|
|
994
|
-
__decorate([
|
|
995
|
-
ViewChild('carousel', { read: ElementRef })
|
|
996
|
-
], ImageCarouselComponent.prototype, "carousel", void 0);
|
|
997
|
-
__decorate([
|
|
998
|
-
Input()
|
|
999
|
-
], ImageCarouselComponent.prototype, "showRefresh", void 0);
|
|
1000
|
-
__decorate([
|
|
1001
|
-
Input()
|
|
1002
|
-
], ImageCarouselComponent.prototype, "images", null);
|
|
1003
|
-
__decorate([
|
|
1004
|
-
HostListener('window:resize')
|
|
1005
|
-
], ImageCarouselComponent.prototype, "handleWindowResize", null);
|
|
1006
|
-
__decorate([
|
|
1007
|
-
HostListener('swipeleft')
|
|
1008
|
-
], ImageCarouselComponent.prototype, "gotoNextSlide", null);
|
|
1009
|
-
__decorate([
|
|
1010
|
-
HostListener('swiperight')
|
|
1011
|
-
], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
|
|
1012
|
-
__decorate([
|
|
1013
|
-
HostBinding('class.resizing')
|
|
1014
|
-
], ImageCarouselComponent.prototype, "resizing", void 0);
|
|
1015
|
-
ImageCarouselComponent = __decorate([
|
|
1016
|
-
Component({
|
|
1017
|
-
selector: 'app-image-carousel',
|
|
1018
|
-
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",
|
|
1019
|
-
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)}}"]
|
|
1020
|
-
})
|
|
1021
|
-
], ImageCarouselComponent);
|
|
1022
|
-
return ImageCarouselComponent;
|
|
1023
|
-
}());
|
|
1024
|
-
|
|
1025
|
-
var StockAndDelivery = /** @class */ (function () {
|
|
1026
|
-
function StockAndDelivery(stock, deliveryDescription) {
|
|
1027
|
-
this.stock = 0;
|
|
1028
|
-
this.stock = stock;
|
|
1029
|
-
this.deliveryDescription = deliveryDescription;
|
|
1030
|
-
}
|
|
1031
|
-
return StockAndDelivery;
|
|
1032
|
-
}());
|
|
1033
|
-
|
|
1034
|
-
var SelectorType;
|
|
1035
|
-
(function (SelectorType) {
|
|
1036
|
-
SelectorType["TwoD"] = "2D";
|
|
1037
|
-
SelectorType["ThreeD"] = "3D";
|
|
1038
|
-
SelectorType["Omni"] = "Omni";
|
|
1039
|
-
})(SelectorType || (SelectorType = {}));
|
|
1040
|
-
|
|
1041
|
-
var ProductPageComponent = /** @class */ (function () {
|
|
1042
|
-
function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
|
|
1043
|
-
var _this = this;
|
|
1044
|
-
this._ione = _ione;
|
|
1045
|
-
this._renderer = _renderer;
|
|
1046
|
-
this._changeDetector = _changeDetector;
|
|
1047
|
-
this.iconCache = iconCache;
|
|
1048
|
-
this.settingsService = settingsService;
|
|
1049
|
-
this.appEventService = appEventService;
|
|
1050
|
-
this.icon = IconEnum;
|
|
1051
|
-
this.configurable = false;
|
|
1052
|
-
this.threeD = false;
|
|
1053
|
-
this.show2D = true;
|
|
1054
|
-
this.show3D = false;
|
|
1055
|
-
this.configuring = false;
|
|
1056
|
-
this.fullscreenAnimationEnd = false;
|
|
1057
|
-
this.settingsLoaded = false;
|
|
1058
|
-
this._fullScreen = false;
|
|
1059
|
-
this._subs = [];
|
|
1060
|
-
this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
|
|
1061
|
-
if (_this.selections.nativeElement) {
|
|
1062
|
-
_this.selections.nativeElement.forceRenderImage();
|
|
1063
|
-
}
|
|
1064
|
-
}), this.settingsService.settingsLoaded.subscribe(function (loaded) {
|
|
1065
|
-
_this.settingsLoaded = loaded;
|
|
1066
|
-
}));
|
|
1067
|
-
}
|
|
1068
|
-
Object.defineProperty(ProductPageComponent.prototype, "sku", {
|
|
1069
|
-
get: function () {
|
|
1070
|
-
return this._sku;
|
|
1202
|
+
return this._sku;
|
|
1071
1203
|
},
|
|
1072
1204
|
set: function (value) {
|
|
1073
1205
|
if (value) {
|
|
@@ -1084,6 +1216,23 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1084
1216
|
enumerable: true,
|
|
1085
1217
|
configurable: true
|
|
1086
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
|
+
});
|
|
1087
1236
|
Object.defineProperty(ProductPageComponent.prototype, "fullScreen", {
|
|
1088
1237
|
get: function () {
|
|
1089
1238
|
return this._fullScreen;
|
|
@@ -1120,6 +1269,13 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1120
1269
|
configurable: true
|
|
1121
1270
|
});
|
|
1122
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
|
+
}
|
|
1123
1279
|
};
|
|
1124
1280
|
ProductPageComponent.prototype.ngAfterViewInit = function () {
|
|
1125
1281
|
};
|
|
@@ -1144,6 +1300,11 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1144
1300
|
ProductPageComponent.prototype.showFullScreen = function () {
|
|
1145
1301
|
this.fullScreen = !this.fullScreen;
|
|
1146
1302
|
};
|
|
1303
|
+
ProductPageComponent.prototype._handleSettingsLoaded = function (loaded) {
|
|
1304
|
+
if (loaded) {
|
|
1305
|
+
this._ione.initConnection();
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1147
1308
|
ProductPageComponent.prototype._getArticle = function () {
|
|
1148
1309
|
return __awaiter(this, void 0, void 0, function () {
|
|
1149
1310
|
var _this = this;
|
|
@@ -1157,18 +1318,20 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1157
1318
|
if (init) {
|
|
1158
1319
|
this._ione.getFullArticle(this._sku).then(function (article) {
|
|
1159
1320
|
_this.article = article;
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
_this.
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
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
|
+
});
|
|
1169
1333
|
_this._changeDetector.detectChanges();
|
|
1170
|
-
}
|
|
1171
|
-
_this._changeDetector.detectChanges();
|
|
1334
|
+
}
|
|
1172
1335
|
});
|
|
1173
1336
|
}
|
|
1174
1337
|
return [2 /*return*/];
|
|
@@ -1198,10 +1361,13 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1198
1361
|
__decorate([
|
|
1199
1362
|
Input()
|
|
1200
1363
|
], ProductPageComponent.prototype, "sku", null);
|
|
1364
|
+
__decorate([
|
|
1365
|
+
Input()
|
|
1366
|
+
], ProductPageComponent.prototype, "settings", null);
|
|
1201
1367
|
ProductPageComponent = __decorate([
|
|
1202
1368
|
Component({
|
|
1203
1369
|
selector: 'app-product-page',
|
|
1204
|
-
template: "<div class=\"page-wrapper\">\r\n
|
|
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",
|
|
1205
1371
|
animations: [
|
|
1206
1372
|
trigger('toggleFullScreen', [
|
|
1207
1373
|
state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1240,203 +1406,231 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1240
1406
|
return ProductPageComponent;
|
|
1241
1407
|
}());
|
|
1242
1408
|
|
|
1243
|
-
var
|
|
1244
|
-
function
|
|
1245
|
-
this.
|
|
1246
|
-
this.
|
|
1247
|
-
this.
|
|
1248
|
-
this.
|
|
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);
|
|
1249
1419
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
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 }
|
|
1252
1431
|
]; };
|
|
1253
1432
|
__decorate([
|
|
1254
1433
|
Input()
|
|
1255
|
-
],
|
|
1434
|
+
], ProductSelectorTypeComponent.prototype, "show2D", void 0);
|
|
1256
1435
|
__decorate([
|
|
1257
1436
|
Input()
|
|
1258
|
-
],
|
|
1259
|
-
|
|
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([
|
|
1260
1448
|
Component({
|
|
1261
|
-
selector: 'app-product-
|
|
1262
|
-
template: "<
|
|
1263
|
-
styles: [":host{display:
|
|
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}"]
|
|
1264
1452
|
})
|
|
1265
|
-
],
|
|
1266
|
-
return
|
|
1453
|
+
], ProductSelectorTypeComponent);
|
|
1454
|
+
return ProductSelectorTypeComponent;
|
|
1267
1455
|
}());
|
|
1268
1456
|
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1271
|
-
|
|
1457
|
+
var ImageCarouselComponent = /** @class */ (function () {
|
|
1458
|
+
function ImageCarouselComponent(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
|
|
1459
|
+
var _this = this;
|
|
1460
|
+
this._ione = _ione;
|
|
1272
1461
|
this._appEventService = _appEventService;
|
|
1273
|
-
this.
|
|
1274
|
-
this.
|
|
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
|
+
}));
|
|
1275
1483
|
}
|
|
1276
|
-
Object.defineProperty(
|
|
1484
|
+
Object.defineProperty(ImageCarouselComponent.prototype, "images", {
|
|
1277
1485
|
get: function () {
|
|
1278
|
-
return this.
|
|
1486
|
+
return this._images;
|
|
1279
1487
|
},
|
|
1280
1488
|
set: function (value) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
if (this.refType && this.refType !== undefined) {
|
|
1284
|
-
if (value.length > 0) {
|
|
1285
|
-
value.forEach(function (x) {
|
|
1286
|
-
if (x.refType === _this.refType) {
|
|
1287
|
-
_this._articles.push(x);
|
|
1288
|
-
}
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
else {
|
|
1293
|
-
this._articles = value;
|
|
1294
|
-
}
|
|
1489
|
+
if (value && value.length > 0) {
|
|
1490
|
+
this._images = value;
|
|
1295
1491
|
this._loadImages();
|
|
1492
|
+
this._changeDetector.detectChanges();
|
|
1296
1493
|
}
|
|
1297
1494
|
},
|
|
1298
1495
|
enumerable: true,
|
|
1299
1496
|
configurable: true
|
|
1300
1497
|
});
|
|
1301
|
-
|
|
1302
|
-
this
|
|
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);
|
|
1303
1506
|
};
|
|
1304
|
-
|
|
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 () {
|
|
1305
1555
|
var _this = this;
|
|
1306
|
-
this.
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
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
|
+
// });
|
|
1313
1577
|
}
|
|
1314
|
-
}
|
|
1578
|
+
}
|
|
1315
1579
|
};
|
|
1316
|
-
|
|
1580
|
+
ImageCarouselComponent.ctorParameters = function () { return [
|
|
1317
1581
|
{ type: ProductConnectorService },
|
|
1318
|
-
{ type: ProductEventService }
|
|
1582
|
+
{ type: ProductEventService },
|
|
1583
|
+
{ type: ChangeDetectorRef },
|
|
1584
|
+
{ type: DomSanitizer },
|
|
1585
|
+
{ type: IconCacheService }
|
|
1319
1586
|
]; };
|
|
1320
1587
|
__decorate([
|
|
1321
|
-
|
|
1322
|
-
],
|
|
1588
|
+
ViewChild('carousel', { read: ElementRef })
|
|
1589
|
+
], ImageCarouselComponent.prototype, "carousel", void 0);
|
|
1323
1590
|
__decorate([
|
|
1324
1591
|
Input()
|
|
1325
|
-
],
|
|
1592
|
+
], ImageCarouselComponent.prototype, "showRefresh", void 0);
|
|
1326
1593
|
__decorate([
|
|
1327
1594
|
Input()
|
|
1328
|
-
],
|
|
1595
|
+
], ImageCarouselComponent.prototype, "images", null);
|
|
1329
1596
|
__decorate([
|
|
1330
|
-
|
|
1331
|
-
],
|
|
1332
|
-
ProductRelatedComponent = __decorate([
|
|
1333
|
-
Component({
|
|
1334
|
-
selector: 'app-product-related',
|
|
1335
|
-
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",
|
|
1336
|
-
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}"]
|
|
1337
|
-
})
|
|
1338
|
-
], ProductRelatedComponent);
|
|
1339
|
-
return ProductRelatedComponent;
|
|
1340
|
-
}());
|
|
1341
|
-
|
|
1342
|
-
var HeaderComponent = /** @class */ (function () {
|
|
1343
|
-
function HeaderComponent() {
|
|
1344
|
-
}
|
|
1345
|
-
HeaderComponent.prototype.ngOnInit = function () {
|
|
1346
|
-
};
|
|
1597
|
+
HostListener('window:resize')
|
|
1598
|
+
], ImageCarouselComponent.prototype, "handleWindowResize", null);
|
|
1347
1599
|
__decorate([
|
|
1348
|
-
|
|
1349
|
-
],
|
|
1600
|
+
HostListener('swipeleft')
|
|
1601
|
+
], ImageCarouselComponent.prototype, "gotoNextSlide", null);
|
|
1350
1602
|
__decorate([
|
|
1351
|
-
|
|
1352
|
-
],
|
|
1353
|
-
|
|
1603
|
+
HostListener('swiperight')
|
|
1604
|
+
], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
|
|
1605
|
+
__decorate([
|
|
1606
|
+
HostBinding('class.resizing')
|
|
1607
|
+
], ImageCarouselComponent.prototype, "resizing", void 0);
|
|
1608
|
+
ImageCarouselComponent = __decorate([
|
|
1354
1609
|
Component({
|
|
1355
|
-
selector: 'app-
|
|
1356
|
-
template: "<
|
|
1357
|
-
styles: [".
|
|
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)}}"]
|
|
1358
1613
|
})
|
|
1359
|
-
],
|
|
1360
|
-
return
|
|
1614
|
+
], ImageCarouselComponent);
|
|
1615
|
+
return ImageCarouselComponent;
|
|
1361
1616
|
}());
|
|
1362
1617
|
|
|
1363
|
-
var
|
|
1364
|
-
|
|
1365
|
-
TabType["Additional"] = "additional";
|
|
1366
|
-
TabType["Properties"] = "properties";
|
|
1367
|
-
})(TabType || (TabType = {}));
|
|
1368
|
-
var ProductInfoComponent = /** @class */ (function () {
|
|
1369
|
-
function ProductInfoComponent() {
|
|
1370
|
-
this.tabType = TabType;
|
|
1371
|
-
this.currentTab = TabType.Additional;
|
|
1618
|
+
var ProductDescriptionComponent = /** @class */ (function () {
|
|
1619
|
+
function ProductDescriptionComponent() {
|
|
1372
1620
|
}
|
|
1373
|
-
|
|
1374
|
-
};
|
|
1375
|
-
ProductInfoComponent.prototype.switchTab = function (tab) {
|
|
1376
|
-
this.currentTab = tab;
|
|
1621
|
+
ProductDescriptionComponent.prototype.ngOnInit = function () {
|
|
1377
1622
|
};
|
|
1378
1623
|
__decorate([
|
|
1379
1624
|
Input()
|
|
1380
|
-
],
|
|
1381
|
-
|
|
1625
|
+
], ProductDescriptionComponent.prototype, "article", void 0);
|
|
1626
|
+
ProductDescriptionComponent = __decorate([
|
|
1382
1627
|
Component({
|
|
1383
|
-
selector: 'app-product-
|
|
1384
|
-
template: "<div
|
|
1385
|
-
|
|
1386
|
-
trigger('showContent', [
|
|
1387
|
-
state('void', style({ 'opacity': '0' })),
|
|
1388
|
-
state('*', style({ 'opacity': '1' })),
|
|
1389
|
-
transition('void => *', animate('200ms 100ms ease-in-out')),
|
|
1390
|
-
])
|
|
1391
|
-
],
|
|
1392
|
-
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}"]
|
|
1393
|
-
})
|
|
1394
|
-
], ProductInfoComponent);
|
|
1395
|
-
return ProductInfoComponent;
|
|
1396
|
-
}());
|
|
1397
|
-
|
|
1398
|
-
var ProductModuleService = /** @class */ (function () {
|
|
1399
|
-
function ProductModuleService(_iOneConnectorService) {
|
|
1400
|
-
this._iOneConnectorService = _iOneConnectorService;
|
|
1401
|
-
this._superArticles = new Map();
|
|
1402
|
-
}
|
|
1403
|
-
ProductModuleService.prototype.getArticle = function (id) {
|
|
1404
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1405
|
-
return __generator(this, function (_a) {
|
|
1406
|
-
switch (_a.label) {
|
|
1407
|
-
case 0: return [4 /*yield*/, this._getArticle(id)];
|
|
1408
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
1409
|
-
}
|
|
1410
|
-
});
|
|
1411
|
-
});
|
|
1412
|
-
};
|
|
1413
|
-
ProductModuleService.prototype._getArticle = function (id) {
|
|
1414
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1415
|
-
var mainArticle;
|
|
1416
|
-
return __generator(this, function (_a) {
|
|
1417
|
-
switch (_a.label) {
|
|
1418
|
-
case 0:
|
|
1419
|
-
if (!this._superArticles.has(id)) return [3 /*break*/, 1];
|
|
1420
|
-
return [2 /*return*/, this._superArticles.get(id)];
|
|
1421
|
-
case 1: return [4 /*yield*/, this._iOneConnectorService.getSuperArticle(id)];
|
|
1422
|
-
case 2:
|
|
1423
|
-
mainArticle = _a.sent();
|
|
1424
|
-
this._superArticles.set(id, mainArticle);
|
|
1425
|
-
return [2 /*return*/, mainArticle];
|
|
1426
|
-
}
|
|
1427
|
-
});
|
|
1428
|
-
});
|
|
1429
|
-
};
|
|
1430
|
-
ProductModuleService.ctorParameters = function () { return [
|
|
1431
|
-
{ type: ProductConnectorService }
|
|
1432
|
-
]; };
|
|
1433
|
-
ProductModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
|
|
1434
|
-
ProductModuleService = __decorate([
|
|
1435
|
-
Injectable({
|
|
1436
|
-
providedIn: 'root'
|
|
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}}"]
|
|
1437
1631
|
})
|
|
1438
|
-
],
|
|
1439
|
-
return
|
|
1632
|
+
], ProductDescriptionComponent);
|
|
1633
|
+
return ProductDescriptionComponent;
|
|
1440
1634
|
}());
|
|
1441
1635
|
|
|
1442
1636
|
var BitUtils = /** @class */ (function () {
|
|
@@ -1460,416 +1654,151 @@ var BitUtils = /** @class */ (function () {
|
|
|
1460
1654
|
return BitUtils;
|
|
1461
1655
|
}());
|
|
1462
1656
|
|
|
1463
|
-
var
|
|
1464
|
-
function
|
|
1465
|
-
this.
|
|
1466
|
-
this._moduleService = _moduleService;
|
|
1467
|
-
this._changeDetector = _changeDetector;
|
|
1468
|
-
this.showLabel = false;
|
|
1469
|
-
this.textParts = [];
|
|
1657
|
+
var ProductAdditionalDescriptionComponent = /** @class */ (function () {
|
|
1658
|
+
function ProductAdditionalDescriptionComponent(_appEventService) {
|
|
1659
|
+
this._appEventService = _appEventService;
|
|
1470
1660
|
}
|
|
1471
|
-
Object.defineProperty(
|
|
1661
|
+
Object.defineProperty(ProductAdditionalDescriptionComponent.prototype, "article", {
|
|
1472
1662
|
get: function () {
|
|
1473
1663
|
return this._article;
|
|
1474
1664
|
},
|
|
1475
1665
|
set: function (value) {
|
|
1476
|
-
|
|
1477
|
-
if (
|
|
1478
|
-
this.
|
|
1479
|
-
this.
|
|
1480
|
-
_this._changeDetector.detectChanges();
|
|
1481
|
-
});
|
|
1666
|
+
this._article = value;
|
|
1667
|
+
if (this._article) {
|
|
1668
|
+
this.description = this.article.additionalDescription;
|
|
1669
|
+
this._prepareDescription();
|
|
1482
1670
|
}
|
|
1483
1671
|
},
|
|
1484
1672
|
enumerable: true,
|
|
1485
1673
|
configurable: true
|
|
1486
1674
|
});
|
|
1487
|
-
|
|
1488
|
-
};
|
|
1489
|
-
ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
|
|
1490
|
-
var _this = this;
|
|
1491
|
-
return new Promise(function (resolve, reject) {
|
|
1492
|
-
var texts = [];
|
|
1493
|
-
if (_this.article.superArticleNr) {
|
|
1494
|
-
_this._moduleService.getArticle(_this.article.superArticleNr).then(function (mainArticle) {
|
|
1495
|
-
mainArticle.texts.forEach(function (txt) {
|
|
1496
|
-
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
1497
|
-
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
1498
|
-
texts.push(safeTxt);
|
|
1499
|
-
}
|
|
1500
|
-
});
|
|
1501
|
-
resolve(texts);
|
|
1502
|
-
}).catch(function () {
|
|
1503
|
-
resolve([]);
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
else {
|
|
1507
|
-
resolve(texts);
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
1675
|
+
ProductAdditionalDescriptionComponent.prototype.ngOnInit = function () {
|
|
1510
1676
|
};
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
var texts;
|
|
1514
|
-
var _a;
|
|
1515
|
-
var _this = this;
|
|
1516
|
-
return __generator(this, function (_b) {
|
|
1517
|
-
switch (_b.label) {
|
|
1518
|
-
case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
|
|
1519
|
-
case 1:
|
|
1520
|
-
texts = _b.sent();
|
|
1521
|
-
if (texts.length > 0) {
|
|
1522
|
-
(_a = this.textParts).push.apply(_a, __spread(texts));
|
|
1523
|
-
}
|
|
1524
|
-
if (this.article.texts) {
|
|
1525
|
-
this.article.texts.forEach(function (txt) {
|
|
1526
|
-
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
1527
|
-
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
1528
|
-
_this.textParts.push(safeTxt);
|
|
1529
|
-
}
|
|
1530
|
-
});
|
|
1531
|
-
}
|
|
1532
|
-
return [2 /*return*/];
|
|
1533
|
-
}
|
|
1534
|
-
});
|
|
1535
|
-
});
|
|
1677
|
+
ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
|
|
1678
|
+
this._appEventService.onUpdateProductInfoTab.next(0);
|
|
1536
1679
|
};
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
case 1:
|
|
1545
|
-
_a.sent();
|
|
1546
|
-
if (this.textParts.length === 0) {
|
|
1547
|
-
if (this.article.additionalDescription) {
|
|
1548
|
-
this.textParts.push(this.article.additionalDescription);
|
|
1549
|
-
}
|
|
1550
|
-
else if (this.article.description) {
|
|
1551
|
-
this.textParts.push(this.article.description);
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
return [2 /*return*/];
|
|
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;
|
|
1555
1687
|
}
|
|
1556
1688
|
});
|
|
1557
|
-
|
|
1689
|
+
this.description = this.description.replace(/<[^>]*>?/gm, '');
|
|
1690
|
+
if (this.description.length > 250) {
|
|
1691
|
+
this.description = this.description.substr(0, 250) + ' [..]';
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1558
1694
|
};
|
|
1559
|
-
|
|
1560
|
-
{ type:
|
|
1561
|
-
{ type: ProductModuleService },
|
|
1562
|
-
{ type: ChangeDetectorRef }
|
|
1695
|
+
ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
|
|
1696
|
+
{ type: ProductEventService }
|
|
1563
1697
|
]; };
|
|
1564
1698
|
__decorate([
|
|
1565
1699
|
Input()
|
|
1566
|
-
],
|
|
1567
|
-
__decorate([
|
|
1568
|
-
Input()
|
|
1569
|
-
], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
|
|
1570
|
-
ProductAdditionalInfoComponent = __decorate([
|
|
1700
|
+
], ProductAdditionalDescriptionComponent.prototype, "article", null);
|
|
1701
|
+
ProductAdditionalDescriptionComponent = __decorate([
|
|
1571
1702
|
Component({
|
|
1572
|
-
selector: 'app-product-additional-
|
|
1573
|
-
template: "<
|
|
1574
|
-
styles: [":host{display:block}:host .additional-
|
|
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}}"]
|
|
1575
1706
|
})
|
|
1576
|
-
],
|
|
1577
|
-
return
|
|
1707
|
+
], ProductAdditionalDescriptionComponent);
|
|
1708
|
+
return ProductAdditionalDescriptionComponent;
|
|
1578
1709
|
}());
|
|
1579
1710
|
|
|
1580
|
-
var
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
['material', 'MATERIAL'],
|
|
1586
|
-
['title', 'TITLE'],
|
|
1587
|
-
['turnOverGroup', 'TURNOVERGROUP'],
|
|
1588
|
-
['height', 'HEIGHT'],
|
|
1589
|
-
['width', 'WIDTH']
|
|
1590
|
-
]);
|
|
1591
|
-
var ProductPropertiesComponent = /** @class */ (function () {
|
|
1592
|
-
function ProductPropertiesComponent() {
|
|
1593
|
-
this.showLabel = false;
|
|
1594
|
-
this.properties = [];
|
|
1711
|
+
var ProductPriceComponent = /** @class */ (function () {
|
|
1712
|
+
function ProductPriceComponent(_changeDetector) {
|
|
1713
|
+
this._changeDetector = _changeDetector;
|
|
1714
|
+
this.showFromPrice = false;
|
|
1715
|
+
this._configurable = false;
|
|
1595
1716
|
}
|
|
1596
|
-
Object.defineProperty(
|
|
1717
|
+
Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
|
|
1597
1718
|
get: function () {
|
|
1598
|
-
return this.
|
|
1719
|
+
return this._pricing;
|
|
1599
1720
|
},
|
|
1600
1721
|
set: function (value) {
|
|
1601
|
-
this.
|
|
1602
|
-
this.
|
|
1722
|
+
this._pricing = value;
|
|
1723
|
+
this._setPrices();
|
|
1603
1724
|
},
|
|
1604
1725
|
enumerable: true,
|
|
1605
1726
|
configurable: true
|
|
1606
1727
|
});
|
|
1607
|
-
|
|
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 () {
|
|
1608
1737
|
};
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
if (_this.article.hasOwnProperty(key)) {
|
|
1617
|
-
_this.properties.push({ key: value, value: _this.article[key] });
|
|
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;
|
|
1618
1745
|
}
|
|
1619
|
-
|
|
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
|
+
}
|
|
1620
1762
|
};
|
|
1763
|
+
ProductPriceComponent.ctorParameters = function () { return [
|
|
1764
|
+
{ type: ChangeDetectorRef }
|
|
1765
|
+
]; };
|
|
1621
1766
|
__decorate([
|
|
1622
1767
|
Input()
|
|
1623
|
-
],
|
|
1768
|
+
], ProductPriceComponent.prototype, "pricing", null);
|
|
1624
1769
|
__decorate([
|
|
1625
1770
|
Input()
|
|
1626
|
-
],
|
|
1627
|
-
|
|
1771
|
+
], ProductPriceComponent.prototype, "configurable", null);
|
|
1772
|
+
ProductPriceComponent = __decorate([
|
|
1628
1773
|
Component({
|
|
1629
|
-
selector: 'app-product-
|
|
1630
|
-
template: "<div
|
|
1631
|
-
styles: [":host{display:
|
|
1632
|
-
})
|
|
1633
|
-
], ProductPropertiesComponent);
|
|
1634
|
-
return ProductPropertiesComponent;
|
|
1635
|
-
}());
|
|
1636
|
-
|
|
1637
|
-
var LocalizePipe = /** @class */ (function () {
|
|
1638
|
-
function LocalizePipe(_dictionaryService) {
|
|
1639
|
-
this._dictionaryService = _dictionaryService;
|
|
1640
|
-
}
|
|
1641
|
-
LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
|
|
1642
|
-
var _a;
|
|
1643
|
-
if (upperCaseFirst === void 0) { upperCaseFirst = true; }
|
|
1644
|
-
if (replace === void 0) { replace = []; }
|
|
1645
|
-
if (!value) {
|
|
1646
|
-
return '';
|
|
1647
|
-
}
|
|
1648
|
-
replace = replace ? replace : [];
|
|
1649
|
-
if (!Array.isArray(replace)) {
|
|
1650
|
-
replace = [replace];
|
|
1651
|
-
}
|
|
1652
|
-
return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
|
|
1653
|
-
};
|
|
1654
|
-
LocalizePipe.ctorParameters = function () { return [
|
|
1655
|
-
{ type: DictionaryService }
|
|
1656
|
-
]; };
|
|
1657
|
-
LocalizePipe = __decorate([
|
|
1658
|
-
Pipe({
|
|
1659
|
-
name: 'localize'
|
|
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}}"]
|
|
1660
1777
|
})
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
return LocalizePipe;
|
|
1778
|
+
], ProductPriceComponent);
|
|
1779
|
+
return ProductPriceComponent;
|
|
1664
1780
|
}());
|
|
1665
1781
|
|
|
1666
|
-
var
|
|
1667
|
-
function
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
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;
|
|
1671
1788
|
this.icon = IconEnum;
|
|
1672
|
-
this.
|
|
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;
|
|
1673
1797
|
}
|
|
1674
|
-
Object.defineProperty(
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
|
|
1679
|
-
this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
},
|
|
1683
|
-
enumerable: true,
|
|
1684
|
-
configurable: true
|
|
1685
|
-
});
|
|
1686
|
-
ProductDeliveryComponent.prototype.ngOnInit = function () {
|
|
1687
|
-
};
|
|
1688
|
-
ProductDeliveryComponent.ctorParameters = function () { return [
|
|
1689
|
-
{ type: LocalizePipe },
|
|
1690
|
-
{ type: ProductConnectorService },
|
|
1691
|
-
{ type: IconCacheService }
|
|
1692
|
-
]; };
|
|
1693
|
-
__decorate([
|
|
1694
|
-
Input()
|
|
1695
|
-
], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
|
|
1696
|
-
ProductDeliveryComponent = __decorate([
|
|
1697
|
-
Component({
|
|
1698
|
-
selector: 'app-product-delivery',
|
|
1699
|
-
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",
|
|
1700
|
-
providers: [LocalizePipe],
|
|
1701
|
-
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}}"]
|
|
1702
|
-
})
|
|
1703
|
-
], ProductDeliveryComponent);
|
|
1704
|
-
return ProductDeliveryComponent;
|
|
1705
|
-
}());
|
|
1706
|
-
|
|
1707
|
-
var ProductStockComponent = /** @class */ (function () {
|
|
1708
|
-
function ProductStockComponent(_iOne, _iconCache) {
|
|
1709
|
-
this._iOne = _iOne;
|
|
1710
|
-
this._iconCache = _iconCache;
|
|
1711
|
-
this.icon = IconEnum;
|
|
1712
|
-
this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
|
|
1713
|
-
}
|
|
1714
|
-
Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
|
|
1715
|
-
set: function (value) {
|
|
1716
|
-
if (value) {
|
|
1717
|
-
this.numberInStock = value.stock;
|
|
1718
|
-
}
|
|
1719
|
-
},
|
|
1720
|
-
enumerable: true,
|
|
1721
|
-
configurable: true
|
|
1722
|
-
});
|
|
1723
|
-
ProductStockComponent.prototype.ngOnInit = function () {
|
|
1724
|
-
};
|
|
1725
|
-
ProductStockComponent.ctorParameters = function () { return [
|
|
1726
|
-
{ type: ProductConnectorService },
|
|
1727
|
-
{ type: IconCacheService }
|
|
1728
|
-
]; };
|
|
1729
|
-
__decorate([
|
|
1730
|
-
Input()
|
|
1731
|
-
], ProductStockComponent.prototype, "stockAndDelivery", null);
|
|
1732
|
-
ProductStockComponent = __decorate([
|
|
1733
|
-
Component({
|
|
1734
|
-
selector: 'app-product-stock',
|
|
1735
|
-
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",
|
|
1736
|
-
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}}"]
|
|
1737
|
-
})
|
|
1738
|
-
], ProductStockComponent);
|
|
1739
|
-
return ProductStockComponent;
|
|
1740
|
-
}());
|
|
1741
|
-
|
|
1742
|
-
var ProductSymbolsComponent = /** @class */ (function () {
|
|
1743
|
-
function ProductSymbolsComponent() {
|
|
1744
|
-
this.symbolStrings = [];
|
|
1745
|
-
}
|
|
1746
|
-
Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
|
|
1747
|
-
get: function () {
|
|
1748
|
-
return this._symbols;
|
|
1749
|
-
},
|
|
1750
|
-
set: function (value) {
|
|
1751
|
-
this._symbols = value;
|
|
1752
|
-
if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
|
|
1753
|
-
this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
|
|
1754
|
-
}
|
|
1755
|
-
if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
|
|
1756
|
-
for (var i = 0; i < this._symbols['symbolString'].length; i++) {
|
|
1757
|
-
this.symbolStrings.push(this._symbols['symbolString'][i]);
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
},
|
|
1761
|
-
enumerable: true,
|
|
1762
|
-
configurable: true
|
|
1763
|
-
});
|
|
1764
|
-
ProductSymbolsComponent.prototype.ngOnInit = function () {
|
|
1765
|
-
};
|
|
1766
|
-
__decorate([
|
|
1767
|
-
Input()
|
|
1768
|
-
], ProductSymbolsComponent.prototype, "symbols", null);
|
|
1769
|
-
__decorate([
|
|
1770
|
-
HostBinding('class')
|
|
1771
|
-
], ProductSymbolsComponent.prototype, "_className", void 0);
|
|
1772
|
-
ProductSymbolsComponent = __decorate([
|
|
1773
|
-
Component({
|
|
1774
|
-
selector: 'app-product-symbols',
|
|
1775
|
-
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",
|
|
1776
|
-
styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
|
|
1777
|
-
})
|
|
1778
|
-
], ProductSymbolsComponent);
|
|
1779
|
-
return ProductSymbolsComponent;
|
|
1780
|
-
}());
|
|
1781
|
-
|
|
1782
|
-
var ProductPriceComponent = /** @class */ (function () {
|
|
1783
|
-
function ProductPriceComponent(_changeDetector) {
|
|
1784
|
-
this._changeDetector = _changeDetector;
|
|
1785
|
-
this.showFromPrice = false;
|
|
1786
|
-
this._configurable = false;
|
|
1787
|
-
}
|
|
1788
|
-
Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
|
|
1789
|
-
get: function () {
|
|
1790
|
-
return this._pricing;
|
|
1791
|
-
},
|
|
1792
|
-
set: function (value) {
|
|
1793
|
-
this._pricing = value;
|
|
1794
|
-
this._setPrices();
|
|
1795
|
-
},
|
|
1796
|
-
enumerable: true,
|
|
1797
|
-
configurable: true
|
|
1798
|
-
});
|
|
1799
|
-
Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
|
|
1800
|
-
set: function (value) {
|
|
1801
|
-
this._configurable = value;
|
|
1802
|
-
this._setPrices();
|
|
1803
|
-
},
|
|
1804
|
-
enumerable: true,
|
|
1805
|
-
configurable: true
|
|
1806
|
-
});
|
|
1807
|
-
ProductPriceComponent.prototype.ngOnInit = function () {
|
|
1808
|
-
};
|
|
1809
|
-
ProductPriceComponent.prototype._setPrices = function () {
|
|
1810
|
-
if (this._pricing) {
|
|
1811
|
-
this.valutaSign = this._getSign(this._pricing.retailCurrency);
|
|
1812
|
-
if (this._configurable) {
|
|
1813
|
-
this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
|
|
1814
|
-
this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
|
|
1815
|
-
this.toPrice = undefined;
|
|
1816
|
-
}
|
|
1817
|
-
else {
|
|
1818
|
-
this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
|
|
1819
|
-
this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
|
|
1820
|
-
this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
|
|
1821
|
-
this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
|
|
1822
|
-
}
|
|
1823
|
-
this._changeDetector.detectChanges();
|
|
1824
|
-
}
|
|
1825
|
-
};
|
|
1826
|
-
ProductPriceComponent.prototype._getSign = function (currency) {
|
|
1827
|
-
switch (currency) {
|
|
1828
|
-
case 'EUR':
|
|
1829
|
-
return '€';
|
|
1830
|
-
default:
|
|
1831
|
-
return '€';
|
|
1832
|
-
}
|
|
1833
|
-
};
|
|
1834
|
-
ProductPriceComponent.ctorParameters = function () { return [
|
|
1835
|
-
{ type: ChangeDetectorRef }
|
|
1836
|
-
]; };
|
|
1837
|
-
__decorate([
|
|
1838
|
-
Input()
|
|
1839
|
-
], ProductPriceComponent.prototype, "pricing", null);
|
|
1840
|
-
__decorate([
|
|
1841
|
-
Input()
|
|
1842
|
-
], ProductPriceComponent.prototype, "configurable", null);
|
|
1843
|
-
ProductPriceComponent = __decorate([
|
|
1844
|
-
Component({
|
|
1845
|
-
selector: 'app-product-price',
|
|
1846
|
-
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",
|
|
1847
|
-
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}}"]
|
|
1848
|
-
})
|
|
1849
|
-
], ProductPriceComponent);
|
|
1850
|
-
return ProductPriceComponent;
|
|
1851
|
-
}());
|
|
1852
|
-
|
|
1853
|
-
var ProductAddtocartComponent = /** @class */ (function () {
|
|
1854
|
-
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
1855
|
-
this.iconCache = iconCache;
|
|
1856
|
-
this._ioneControllerService = _ioneControllerService;
|
|
1857
|
-
this._appEventService = _appEventService;
|
|
1858
|
-
this._settingsService = _settingsService;
|
|
1859
|
-
this.icon = IconEnum;
|
|
1860
|
-
this.configurable = false;
|
|
1861
|
-
this.configuring = false;
|
|
1862
|
-
this.fullscreen = false;
|
|
1863
|
-
this.startConfiguration = new EventEmitter();
|
|
1864
|
-
this.addToCartClick = new EventEmitter();
|
|
1865
|
-
this.addToQuoteClick = new EventEmitter();
|
|
1866
|
-
this.showQuoteButton = false;
|
|
1867
|
-
this._quantity = 1;
|
|
1868
|
-
}
|
|
1869
|
-
Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
|
|
1870
|
-
get: function () {
|
|
1871
|
-
return this._quantity;
|
|
1872
|
-
},
|
|
1798
|
+
Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
|
|
1799
|
+
get: function () {
|
|
1800
|
+
return this._quantity;
|
|
1801
|
+
},
|
|
1873
1802
|
set: function (value) {
|
|
1874
1803
|
this._quantity = Math.max(1, value);
|
|
1875
1804
|
},
|
|
@@ -1924,7 +1853,7 @@ var ProductAddtocartComponent = /** @class */ (function () {
|
|
|
1924
1853
|
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
1925
1854
|
configuratorStatistics.webHost = window.location.host;
|
|
1926
1855
|
configuratorStatistics.bundleHost = window.location.host;
|
|
1927
|
-
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true,
|
|
1856
|
+
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, configuratorStatistics)];
|
|
1928
1857
|
case 1: return [2 /*return*/, _a.sent()];
|
|
1929
1858
|
}
|
|
1930
1859
|
});
|
|
@@ -1974,384 +1903,667 @@ var ProductAddtocartComponent = /** @class */ (function () {
|
|
|
1974
1903
|
return ProductAddtocartComponent;
|
|
1975
1904
|
}());
|
|
1976
1905
|
|
|
1977
|
-
var
|
|
1978
|
-
function
|
|
1979
|
-
this.
|
|
1980
|
-
this.
|
|
1981
|
-
this.
|
|
1982
|
-
this.
|
|
1983
|
-
this.onIconClick = new EventEmitter();
|
|
1984
|
-
this.currentTypeChange = new EventEmitter();
|
|
1985
|
-
this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
|
|
1986
|
-
this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
|
|
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 = [];
|
|
1987
1912
|
}
|
|
1988
|
-
|
|
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);
|
|
1989
1940
|
};
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
this.
|
|
1993
|
-
|
|
1994
|
-
|
|
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
|
+
});
|
|
1995
1952
|
};
|
|
1996
|
-
|
|
1997
|
-
{ type:
|
|
1998
|
-
{ type:
|
|
1953
|
+
ProductRelatedComponent.ctorParameters = function () { return [
|
|
1954
|
+
{ type: ProductConnectorService },
|
|
1955
|
+
{ type: ProductEventService }
|
|
1999
1956
|
]; };
|
|
2000
1957
|
__decorate([
|
|
2001
1958
|
Input()
|
|
2002
|
-
],
|
|
1959
|
+
], ProductRelatedComponent.prototype, "refType", void 0);
|
|
2003
1960
|
__decorate([
|
|
2004
1961
|
Input()
|
|
2005
|
-
],
|
|
1962
|
+
], ProductRelatedComponent.prototype, "label", void 0);
|
|
2006
1963
|
__decorate([
|
|
2007
1964
|
Input()
|
|
2008
|
-
],
|
|
1965
|
+
], ProductRelatedComponent.prototype, "isSmallModus", void 0);
|
|
2009
1966
|
__decorate([
|
|
2010
|
-
|
|
2011
|
-
],
|
|
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
|
+
]; };
|
|
2012
2001
|
__decorate([
|
|
2013
|
-
|
|
2014
|
-
],
|
|
2015
|
-
|
|
2002
|
+
Input()
|
|
2003
|
+
], ProductStockComponent.prototype, "stockAndDelivery", null);
|
|
2004
|
+
ProductStockComponent = __decorate([
|
|
2016
2005
|
Component({
|
|
2017
|
-
selector: 'app-product-
|
|
2018
|
-
template: "
|
|
2019
|
-
styles: [":host{display:flex;flex-direction:row;align-items:center
|
|
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}}"]
|
|
2020
2009
|
})
|
|
2021
|
-
],
|
|
2022
|
-
return
|
|
2010
|
+
], ProductStockComponent);
|
|
2011
|
+
return ProductStockComponent;
|
|
2023
2012
|
}());
|
|
2024
2013
|
|
|
2025
|
-
var
|
|
2026
|
-
function
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
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) {
|
|
2036
2085
|
var _this = this;
|
|
2037
|
-
this._dictionary = _dictionary;
|
|
2038
|
-
this._jsonUtils = _jsonUtils;
|
|
2039
|
-
this._ione = _ione;
|
|
2040
|
-
this._changeDetector = _changeDetector;
|
|
2041
2086
|
this._appEventService = _appEventService;
|
|
2042
|
-
this.
|
|
2043
|
-
this.
|
|
2044
|
-
this.forceRenderImage = new EventEmitter();
|
|
2045
|
-
this.onAlternativeClick = new EventEmitter();
|
|
2046
|
-
this.onArticleInfoReceived = new EventEmitter();
|
|
2047
|
-
this.onArticleReceived = new EventEmitter();
|
|
2048
|
-
this.onSelectionsReceived = new EventEmitter();
|
|
2049
|
-
this.onAddToQuote = new EventEmitter();
|
|
2050
|
-
this.upAndLoaded = false;
|
|
2087
|
+
this.activeTabHeight = 0;
|
|
2088
|
+
this.tabs = [];
|
|
2051
2089
|
this._subs = [];
|
|
2052
|
-
this._subs.push(this.
|
|
2053
|
-
|
|
2054
|
-
|
|
2090
|
+
this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
|
|
2091
|
+
_this.updateTab(index);
|
|
2092
|
+
_this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
2093
|
+
}));
|
|
2055
2094
|
}
|
|
2056
|
-
Object.defineProperty(
|
|
2057
|
-
get: function () {
|
|
2058
|
-
return this._settings;
|
|
2059
|
-
},
|
|
2095
|
+
Object.defineProperty(ProductInfoTabsComponent.prototype, "article", {
|
|
2060
2096
|
set: function (value) {
|
|
2061
2097
|
if (value) {
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
}
|
|
2066
|
-
else {
|
|
2067
|
-
settings = value;
|
|
2068
|
-
}
|
|
2069
|
-
this._settingsService.createSettingsFromObject(settings);
|
|
2070
|
-
// this._initConnection(settings);
|
|
2098
|
+
this.articleObject = value;
|
|
2099
|
+
this._setupTabs();
|
|
2100
|
+
this.updateTab(0);
|
|
2071
2101
|
}
|
|
2072
2102
|
},
|
|
2073
2103
|
enumerable: true,
|
|
2074
2104
|
configurable: true
|
|
2075
2105
|
});
|
|
2076
|
-
|
|
2077
|
-
this._changeDetector.detectChanges();
|
|
2078
|
-
};
|
|
2079
|
-
IoneProductComponent.prototype.ngOnDestroy = function () {
|
|
2106
|
+
ProductInfoTabsComponent.prototype.ngOnDestroy = function () {
|
|
2080
2107
|
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
2081
2108
|
};
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
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
|
+
}
|
|
2086
2118
|
}
|
|
2087
2119
|
};
|
|
2088
|
-
|
|
2089
|
-
this.
|
|
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
|
+
}
|
|
2090
2129
|
};
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
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) {
|
|
2094
2264
|
var _this = this;
|
|
2095
|
-
|
|
2096
|
-
this.
|
|
2097
|
-
|
|
2098
|
-
setTimeout(function () {
|
|
2265
|
+
if (value) {
|
|
2266
|
+
this._article = value;
|
|
2267
|
+
this._buildInfo().then(function () {
|
|
2099
2268
|
_this._changeDetector.detectChanges();
|
|
2100
2269
|
});
|
|
2101
|
-
|
|
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
|
+
}); })];
|
|
2102
2314
|
});
|
|
2103
2315
|
});
|
|
2104
2316
|
};
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
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 }
|
|
2112
2369
|
]; };
|
|
2113
2370
|
__decorate([
|
|
2114
2371
|
Input()
|
|
2115
|
-
],
|
|
2372
|
+
], ProductAdditionalInfoComponent.prototype, "article", null);
|
|
2116
2373
|
__decorate([
|
|
2117
2374
|
Input()
|
|
2118
|
-
],
|
|
2119
|
-
__decorate([
|
|
2120
|
-
Output()
|
|
2121
|
-
], IoneProductComponent.prototype, "onAddToCart", void 0);
|
|
2122
|
-
__decorate([
|
|
2123
|
-
Output()
|
|
2124
|
-
], IoneProductComponent.prototype, "forceRenderImage", void 0);
|
|
2125
|
-
__decorate([
|
|
2126
|
-
Output()
|
|
2127
|
-
], IoneProductComponent.prototype, "onAlternativeClick", void 0);
|
|
2128
|
-
__decorate([
|
|
2129
|
-
Output()
|
|
2130
|
-
], IoneProductComponent.prototype, "onArticleInfoReceived", void 0);
|
|
2131
|
-
__decorate([
|
|
2132
|
-
Output()
|
|
2133
|
-
], IoneProductComponent.prototype, "onArticleReceived", void 0);
|
|
2134
|
-
__decorate([
|
|
2135
|
-
Output()
|
|
2136
|
-
], IoneProductComponent.prototype, "onSelectionsReceived", void 0);
|
|
2137
|
-
__decorate([
|
|
2138
|
-
Output()
|
|
2139
|
-
], IoneProductComponent.prototype, "onAddToQuote", void 0);
|
|
2140
|
-
IoneProductComponent = __decorate([
|
|
2375
|
+
], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
|
|
2376
|
+
ProductAdditionalInfoComponent = __decorate([
|
|
2141
2377
|
Component({
|
|
2142
|
-
selector: 'app-
|
|
2143
|
-
template: "<
|
|
2144
|
-
|
|
2145
|
-
styles: [""]
|
|
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}"]
|
|
2146
2381
|
})
|
|
2147
|
-
],
|
|
2148
|
-
return
|
|
2382
|
+
], ProductAdditionalInfoComponent);
|
|
2383
|
+
return ProductAdditionalInfoComponent;
|
|
2149
2384
|
}());
|
|
2150
2385
|
|
|
2151
|
-
var
|
|
2152
|
-
|
|
2153
|
-
|
|
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 = [];
|
|
2154
2401
|
}
|
|
2155
|
-
Object.defineProperty(
|
|
2402
|
+
Object.defineProperty(ProductPropertiesComponent.prototype, "article", {
|
|
2156
2403
|
get: function () {
|
|
2157
2404
|
return this._article;
|
|
2158
2405
|
},
|
|
2159
2406
|
set: function (value) {
|
|
2160
2407
|
this._article = value;
|
|
2161
|
-
|
|
2162
|
-
this.description = this.article.additionalDescription;
|
|
2163
|
-
this._prepareDescription();
|
|
2164
|
-
}
|
|
2408
|
+
this._prepareProperties();
|
|
2165
2409
|
},
|
|
2166
2410
|
enumerable: true,
|
|
2167
2411
|
configurable: true
|
|
2168
2412
|
});
|
|
2169
|
-
|
|
2170
|
-
};
|
|
2171
|
-
ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
|
|
2172
|
-
this._appEventService.onUpdateProductInfoTab.next(0);
|
|
2413
|
+
ProductPropertiesComponent.prototype.ngOnInit = function () {
|
|
2173
2414
|
};
|
|
2174
|
-
|
|
2415
|
+
ProductPropertiesComponent.prototype._prepareProperties = function () {
|
|
2175
2416
|
var _this = this;
|
|
2176
|
-
this.
|
|
2177
|
-
if (this.
|
|
2178
|
-
|
|
2179
|
-
if (BitUtils.IsShortDescription(txt.publication)) {
|
|
2180
|
-
_this.description += txt.text;
|
|
2181
|
-
}
|
|
2182
|
-
});
|
|
2183
|
-
this.description = this.description.replace(/<[^>]*>?/gm, '');
|
|
2184
|
-
if (this.description.length > 250) {
|
|
2185
|
-
this.description = this.description.substr(0, 250) + ' [..]';
|
|
2186
|
-
}
|
|
2417
|
+
this.properties.length = 0;
|
|
2418
|
+
if (!this._article) {
|
|
2419
|
+
return;
|
|
2187
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
|
+
});
|
|
2188
2426
|
};
|
|
2189
|
-
ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
|
|
2190
|
-
{ type: ProductEventService }
|
|
2191
|
-
]; };
|
|
2192
2427
|
__decorate([
|
|
2193
2428
|
Input()
|
|
2194
|
-
],
|
|
2195
|
-
|
|
2429
|
+
], ProductPropertiesComponent.prototype, "article", null);
|
|
2430
|
+
__decorate([
|
|
2431
|
+
Input()
|
|
2432
|
+
], ProductPropertiesComponent.prototype, "showLabel", void 0);
|
|
2433
|
+
ProductPropertiesComponent = __decorate([
|
|
2196
2434
|
Component({
|
|
2197
|
-
selector: 'app-product-
|
|
2198
|
-
template: "<
|
|
2199
|
-
styles: [":host{display:block
|
|
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}}"]
|
|
2200
2438
|
})
|
|
2201
|
-
],
|
|
2202
|
-
return
|
|
2439
|
+
], ProductPropertiesComponent);
|
|
2440
|
+
return ProductPropertiesComponent;
|
|
2203
2441
|
}());
|
|
2204
2442
|
|
|
2205
|
-
var
|
|
2206
|
-
function
|
|
2207
|
-
|
|
2208
|
-
this._appEventService = _appEventService;
|
|
2209
|
-
this.activeTabHeight = 0;
|
|
2210
|
-
this.tabs = [];
|
|
2211
|
-
this._subs = [];
|
|
2212
|
-
this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
|
|
2213
|
-
_this.updateTab(index);
|
|
2214
|
-
_this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
2215
|
-
}));
|
|
2443
|
+
var ProductSymbolsComponent = /** @class */ (function () {
|
|
2444
|
+
function ProductSymbolsComponent() {
|
|
2445
|
+
this.symbolStrings = [];
|
|
2216
2446
|
}
|
|
2217
|
-
Object.defineProperty(
|
|
2447
|
+
Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
|
|
2448
|
+
get: function () {
|
|
2449
|
+
return this._symbols;
|
|
2450
|
+
},
|
|
2218
2451
|
set: function (value) {
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
this.
|
|
2222
|
-
|
|
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
|
+
}
|
|
2223
2460
|
}
|
|
2224
2461
|
},
|
|
2225
2462
|
enumerable: true,
|
|
2226
2463
|
configurable: true
|
|
2227
2464
|
});
|
|
2228
|
-
|
|
2229
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
2230
|
-
};
|
|
2231
|
-
ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
|
|
2232
|
-
this.activeTab = tabIndex;
|
|
2233
|
-
this.updateHeight(tabIndex);
|
|
2234
|
-
};
|
|
2235
|
-
ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
|
|
2236
|
-
if (this.tabContent.nativeElement.children.length > 0) {
|
|
2237
|
-
if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
|
|
2238
|
-
this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
};
|
|
2242
|
-
ProductInfoTabsComponent.prototype._setupTabs = function () {
|
|
2243
|
-
this.tabs.push({ title: 'DESCRIPTION' });
|
|
2244
|
-
this.tabs.push({ title: 'FEATURES' });
|
|
2245
|
-
if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
|
|
2246
|
-
this.tabs.push({ title: 'DOWNLOADS' });
|
|
2247
|
-
}
|
|
2248
|
-
if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
|
|
2249
|
-
this.tabs.push({ title: 'SYMBOLS' });
|
|
2250
|
-
}
|
|
2465
|
+
ProductSymbolsComponent.prototype.ngOnInit = function () {
|
|
2251
2466
|
};
|
|
2252
|
-
ProductInfoTabsComponent.ctorParameters = function () { return [
|
|
2253
|
-
{ type: ProductEventService }
|
|
2254
|
-
]; };
|
|
2255
|
-
__decorate([
|
|
2256
|
-
ViewChild('tabContent')
|
|
2257
|
-
], ProductInfoTabsComponent.prototype, "tabContent", void 0);
|
|
2258
2467
|
__decorate([
|
|
2259
2468
|
Input()
|
|
2260
|
-
],
|
|
2261
|
-
|
|
2469
|
+
], ProductSymbolsComponent.prototype, "symbols", null);
|
|
2470
|
+
__decorate([
|
|
2471
|
+
HostBinding('class')
|
|
2472
|
+
], ProductSymbolsComponent.prototype, "_className", void 0);
|
|
2473
|
+
ProductSymbolsComponent = __decorate([
|
|
2262
2474
|
Component({
|
|
2263
|
-
selector: 'app-product-
|
|
2264
|
-
template: "<div
|
|
2265
|
-
styles: [":
|
|
2266
|
-
})
|
|
2267
|
-
], ProductInfoTabsComponent);
|
|
2268
|
-
return ProductInfoTabsComponent;
|
|
2269
|
-
}());
|
|
2270
|
-
|
|
2271
|
-
var ProductInitializerService = /** @class */ (function () {
|
|
2272
|
-
function ProductInitializerService(_settingsService) {
|
|
2273
|
-
this._settingsService = _settingsService;
|
|
2274
|
-
}
|
|
2275
|
-
ProductInitializerService.prototype.initializeApp = function () {
|
|
2276
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2277
|
-
return __generator(this, function (_a) {
|
|
2278
|
-
return [2 /*return*/, this._settingsService.initializeSettings()];
|
|
2279
|
-
});
|
|
2280
|
-
});
|
|
2281
|
-
};
|
|
2282
|
-
ProductInitializerService.ctorParameters = function () { return [
|
|
2283
|
-
{ type: ProductSettingsService }
|
|
2284
|
-
]; };
|
|
2285
|
-
ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
|
|
2286
|
-
ProductInitializerService = __decorate([
|
|
2287
|
-
Injectable({
|
|
2288
|
-
providedIn: 'root',
|
|
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}"]
|
|
2289
2478
|
})
|
|
2290
|
-
],
|
|
2291
|
-
return
|
|
2479
|
+
], ProductSymbolsComponent);
|
|
2480
|
+
return ProductSymbolsComponent;
|
|
2292
2481
|
}());
|
|
2293
2482
|
|
|
2294
|
-
function
|
|
2295
|
-
|
|
2296
|
-
return x;
|
|
2297
|
-
}
|
|
2298
|
-
var IoneProductModule = /** @class */ (function () {
|
|
2299
|
-
function IoneProductModule() {
|
|
2483
|
+
var ProductPageModule = /** @class */ (function () {
|
|
2484
|
+
function ProductPageModule() {
|
|
2300
2485
|
}
|
|
2301
|
-
|
|
2486
|
+
ProductPageModule = __decorate([
|
|
2302
2487
|
NgModule({
|
|
2303
2488
|
imports: [
|
|
2304
|
-
// BrowserAnimationsModule,
|
|
2305
2489
|
CommonModule,
|
|
2306
|
-
ButtonModule,
|
|
2307
2490
|
IconModule,
|
|
2491
|
+
LoaderModule,
|
|
2492
|
+
PipeModule,
|
|
2308
2493
|
NumberPickerModule,
|
|
2494
|
+
ButtonModule,
|
|
2495
|
+
PriceDisplayPipeModule,
|
|
2309
2496
|
InputTextModule,
|
|
2310
2497
|
FilesUploadModule,
|
|
2311
|
-
LoaderModule,
|
|
2312
2498
|
ScrollContainerModule,
|
|
2313
2499
|
TileModule,
|
|
2314
2500
|
LevelIndicatorModule,
|
|
2315
|
-
|
|
2316
|
-
ArticleTileModule
|
|
2501
|
+
ArticleTileModule,
|
|
2317
2502
|
],
|
|
2318
2503
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2319
2504
|
declarations: [
|
|
2320
|
-
IoneProductComponent,
|
|
2321
2505
|
ProductPageComponent,
|
|
2506
|
+
ProductSelectorTypeComponent,
|
|
2322
2507
|
ImageCarouselComponent,
|
|
2323
2508
|
ProductDescriptionComponent,
|
|
2324
|
-
|
|
2509
|
+
ProductAdditionalDescriptionComponent,
|
|
2510
|
+
ProductPriceComponent,
|
|
2511
|
+
ProductAddtocartComponent,
|
|
2325
2512
|
ProductRelatedComponent,
|
|
2513
|
+
ProductStockComponent,
|
|
2514
|
+
ProductDeliveryComponent,
|
|
2515
|
+
ProductInfoTabsComponent,
|
|
2516
|
+
ProductDocumentsComponent,
|
|
2326
2517
|
HeaderComponent,
|
|
2327
2518
|
ProductInfoComponent,
|
|
2328
2519
|
ProductAdditionalInfoComponent,
|
|
2329
2520
|
ProductPropertiesComponent,
|
|
2330
|
-
|
|
2331
|
-
ProductStockComponent,
|
|
2332
|
-
ProductSymbolsComponent,
|
|
2333
|
-
ProductPriceComponent,
|
|
2334
|
-
ProductAddtocartComponent,
|
|
2335
|
-
ProductInfoTabsComponent,
|
|
2336
|
-
LocalizePipe,
|
|
2337
|
-
ProductSelectorTypeComponent,
|
|
2338
|
-
ProductAdditionalDescriptionComponent
|
|
2521
|
+
ProductSymbolsComponent
|
|
2339
2522
|
],
|
|
2340
|
-
|
|
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: [
|
|
2341
2561
|
IoneProductComponent
|
|
2342
2562
|
],
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
ProductConnectorService,
|
|
2346
|
-
ProductConnectorAdapterService,
|
|
2347
|
-
IconCacheService,
|
|
2348
|
-
{
|
|
2349
|
-
provide: APP_INITIALIZER,
|
|
2350
|
-
useFactory: initializeApp,
|
|
2351
|
-
deps: [ProductInitializerService],
|
|
2352
|
-
multi: true
|
|
2353
|
-
}
|
|
2563
|
+
entryComponents: [
|
|
2564
|
+
IoneProductComponent
|
|
2354
2565
|
],
|
|
2566
|
+
providers: [],
|
|
2355
2567
|
exports: [IoneProductComponent],
|
|
2356
2568
|
bootstrap: [
|
|
2357
2569
|
IoneProductComponent
|
|
@@ -2365,5 +2577,5 @@ var IoneProductModule = /** @class */ (function () {
|
|
|
2365
2577
|
* Generated bundle index. Do not edit.
|
|
2366
2578
|
*/
|
|
2367
2579
|
|
|
2368
|
-
export { IoneProductModule,
|
|
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 };
|
|
2369
2581
|
//# sourceMappingURL=colijnit-product.js.map
|