@colijnit/product 1.9.4 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -3
- 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 +1472 -1253
- 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 +29 -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 +41 -19
- package/esm2015/app/ione-product.module.js +8 -61
- 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 +35 -10
- 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 +17 -76
- package/esm2015/colijnit-product.js +30 -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 +50 -20
- package/esm5/app/ione-product.module.js +8 -61
- 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 +62 -11
- 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 +18 -76
- package/esm5/colijnit-product.js +30 -29
- package/esm5/public_api.js +3 -1
- package/fesm2015/colijnit-product.js +1194 -1043
- package/fesm2015/colijnit-product.js.map +1 -1
- package/fesm5/colijnit-product.js +1444 -1226
- package/fesm5/colijnit-product.js.map +1 -1
- package/package.json +5 -4
- package/public_api.d.ts +2 -0
- package/app/service/product-module.service.d.ts +0 -9
- package/esm2015/app/model/settings.js +0 -15
- package/esm2015/app/service/product-module.service.js +0 -39
- package/esm5/app/model/settings.js +0 -17
- package/esm5/app/service/product-module.service.js +0 -50
|
@@ -1,49 +1,117 @@
|
|
|
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, APP_INITIALIZER } 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';
|
|
8
6
|
import { SuperArticle } from '@colijnit/articleapi/build/model/super-article';
|
|
9
7
|
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
10
|
-
import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/factory/business-object-factory';
|
|
11
8
|
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
12
9
|
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
10
|
+
import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
|
|
11
|
+
import { Transaction } from '@colijnit/transactionapi/build/transaction';
|
|
12
|
+
import { MainApi } from '@colijnit/mainapi';
|
|
13
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.0";
|
|
28
|
+
this.publishDate = "7-9-2023 15:18:44";
|
|
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;
|
|
@@ -499,12 +533,14 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
499
533
|
return [4 /*yield*/, this._jsonUtilsService.readJsonFile('product-settings.json')];
|
|
500
534
|
case 1:
|
|
501
535
|
jsonSettings = _a.sent();
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
536
|
+
if (jsonSettings) {
|
|
537
|
+
this.settings = Object.assign(new ProductSettings(), jsonSettings);
|
|
538
|
+
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
539
|
+
this.settingsFinished();
|
|
540
|
+
}
|
|
505
541
|
return [3 /*break*/, 3];
|
|
506
542
|
case 2:
|
|
507
|
-
this.settings = Object.assign(new
|
|
543
|
+
this.settings = Object.assign(new ProductSettings(), settings);
|
|
508
544
|
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
509
545
|
this.settingsFinished();
|
|
510
546
|
_a.label = 3;
|
|
@@ -515,52 +551,19 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
515
551
|
};
|
|
516
552
|
ProductSettingsService.prototype.createSettingsFromObject = function (obj) {
|
|
517
553
|
return __awaiter(this, void 0, void 0, function () {
|
|
554
|
+
var ownOptions, ownRenderParameters;
|
|
518
555
|
return __generator(this, function (_a) {
|
|
519
556
|
if (!this.settings) {
|
|
520
|
-
this.settings = new
|
|
521
|
-
}
|
|
522
|
-
if (obj.hasOwnProperty('url')) {
|
|
523
|
-
this.settings.url = obj['url'];
|
|
524
|
-
this._dictionaryService.rootUrl = this.settings.url.replace('/ajaxservice', '');
|
|
557
|
+
this.settings = new ProductSettings();
|
|
525
558
|
}
|
|
526
|
-
|
|
527
|
-
|
|
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);
|
|
528
564
|
}
|
|
529
|
-
if (obj.
|
|
530
|
-
this.settings.
|
|
531
|
-
}
|
|
532
|
-
if (obj.hasOwnProperty('branch')) {
|
|
533
|
-
this.settings.branch = obj['branch'];
|
|
534
|
-
}
|
|
535
|
-
if (obj.hasOwnProperty('currency')) {
|
|
536
|
-
this.settings.currency = obj['currency'];
|
|
537
|
-
}
|
|
538
|
-
if (obj.hasOwnProperty('client')) {
|
|
539
|
-
this.settings.client = obj['client'];
|
|
540
|
-
}
|
|
541
|
-
if (obj.hasOwnProperty('languageCode')) {
|
|
542
|
-
this.settings.languageCode = obj['languageCode'];
|
|
543
|
-
}
|
|
544
|
-
if (obj.hasOwnProperty('username')) {
|
|
545
|
-
this.settings.username = obj['username'];
|
|
546
|
-
}
|
|
547
|
-
if (obj.hasOwnProperty('password')) {
|
|
548
|
-
this.settings.password = obj['password'];
|
|
549
|
-
}
|
|
550
|
-
if (obj.hasOwnProperty('timeoutInMs')) {
|
|
551
|
-
this.settings.timeoutInMs = obj['timeoutInMs'];
|
|
552
|
-
}
|
|
553
|
-
if (obj.hasOwnProperty('session')) {
|
|
554
|
-
this.settings.session = obj['session'];
|
|
555
|
-
}
|
|
556
|
-
if (obj.hasOwnProperty('useGroups')) {
|
|
557
|
-
this.settings.useGroups = obj['useGroups'];
|
|
558
|
-
}
|
|
559
|
-
if (obj.hasOwnProperty('useEncryption')) {
|
|
560
|
-
this.settings.useEncryption = obj['useEncryption'];
|
|
561
|
-
}
|
|
562
|
-
if (obj.hasOwnProperty('useMatch')) {
|
|
563
|
-
this.settings.useMatch = obj['useMatch'];
|
|
565
|
+
if (obj.options) {
|
|
566
|
+
this.settings.options = Object.assign({}, ownOptions, obj.options);
|
|
564
567
|
}
|
|
565
568
|
if (obj.hasOwnProperty('assetPath')) {
|
|
566
569
|
this.settings.assetPath = obj['assetPath'];
|
|
@@ -575,27 +578,6 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
575
578
|
this.settings.threeDAssetPath += '/';
|
|
576
579
|
}
|
|
577
580
|
}
|
|
578
|
-
if (obj.hasOwnProperty('currencySymbol')) {
|
|
579
|
-
this.settings.currencySymbol = obj['currencySymbol'];
|
|
580
|
-
}
|
|
581
|
-
if (obj.hasOwnProperty('gtm')) {
|
|
582
|
-
this.settings.gtm = obj['gtm'];
|
|
583
|
-
}
|
|
584
|
-
if (obj.hasOwnProperty('assetIndex')) {
|
|
585
|
-
this.settings.assetIndex = obj['assetIndex'];
|
|
586
|
-
}
|
|
587
|
-
if (obj.hasOwnProperty('lightPresetsIndex')) {
|
|
588
|
-
this.settings.lightPresetsIndex = obj['lightPresetsIndex'];
|
|
589
|
-
}
|
|
590
|
-
if (obj.hasOwnProperty('additionalTranslationFile')) {
|
|
591
|
-
this.settings.additionalTranslationFile = obj['additionalTranslationFile'];
|
|
592
|
-
}
|
|
593
|
-
if (obj.hasOwnProperty('options')) {
|
|
594
|
-
this.settings.options = obj['options'];
|
|
595
|
-
}
|
|
596
|
-
if (obj.hasOwnProperty('renderParameters')) {
|
|
597
|
-
this.settings.renderParameters = obj['renderParameters'];
|
|
598
|
-
}
|
|
599
581
|
this.settingsFinished();
|
|
600
582
|
return [2 /*return*/];
|
|
601
583
|
});
|
|
@@ -618,19 +600,16 @@ var ProductSettingsService = /** @class */ (function () {
|
|
|
618
600
|
{ type: JsonUtilsService },
|
|
619
601
|
{ type: DictionaryService }
|
|
620
602
|
]; };
|
|
621
|
-
ProductSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(ɵɵinject(JsonUtilsService), ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
|
|
622
603
|
ProductSettingsService = __decorate([
|
|
623
|
-
Injectable(
|
|
624
|
-
providedIn: 'root'
|
|
625
|
-
})
|
|
604
|
+
Injectable()
|
|
626
605
|
], ProductSettingsService);
|
|
627
606
|
return ProductSettingsService;
|
|
628
607
|
}());
|
|
629
608
|
|
|
630
609
|
// Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
|
|
631
610
|
var ProductConnectorService = /** @class */ (function () {
|
|
632
|
-
function ProductConnectorService(
|
|
633
|
-
this.
|
|
611
|
+
function ProductConnectorService(_adapterService, _settingsService) {
|
|
612
|
+
this._adapterService = _adapterService;
|
|
634
613
|
this._settingsService = _settingsService;
|
|
635
614
|
this.controllerInitialized = new BehaviorSubject(false);
|
|
636
615
|
this._initializing = false;
|
|
@@ -648,57 +627,61 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
648
627
|
ProductConnectorService.prototype.ngOnDestroy = function () {
|
|
649
628
|
this.subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
650
629
|
};
|
|
651
|
-
ProductConnectorService.prototype.
|
|
630
|
+
ProductConnectorService.prototype.initConnection = function () {
|
|
652
631
|
return __awaiter(this, void 0, void 0, function () {
|
|
653
|
-
var settings;
|
|
632
|
+
var settings, e_1;
|
|
654
633
|
return __generator(this, function (_a) {
|
|
655
|
-
|
|
656
|
-
|
|
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
|
-
catch (e) {
|
|
683
|
-
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*/];
|
|
684
660
|
}
|
|
685
|
-
|
|
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)];
|
|
686
668
|
});
|
|
687
669
|
});
|
|
688
670
|
};
|
|
689
671
|
ProductConnectorService.prototype.setInstance = function (instanceId) {
|
|
690
|
-
this.
|
|
672
|
+
this._instanceId = instanceId;
|
|
673
|
+
this._adapterService.setInstance(instanceId);
|
|
691
674
|
};
|
|
692
675
|
ProductConnectorService.prototype.getFullArticle = function (sku) {
|
|
693
676
|
return __awaiter(this, void 0, void 0, function () {
|
|
694
677
|
var goodId;
|
|
695
678
|
return __generator(this, function (_a) {
|
|
696
679
|
switch (_a.label) {
|
|
697
|
-
case 0: return [4 /*yield*/, this.
|
|
680
|
+
case 0: return [4 /*yield*/, this._adapterService.getGoodIdFromArticleNr(sku)];
|
|
698
681
|
case 1:
|
|
699
682
|
goodId = _a.sent();
|
|
700
683
|
if (goodId) {
|
|
701
|
-
return [2 /*return*/, this.
|
|
684
|
+
return [2 /*return*/, this._adapterService.getArticleFullObject(goodId)];
|
|
702
685
|
}
|
|
703
686
|
return [2 /*return*/, null];
|
|
704
687
|
}
|
|
@@ -707,27 +690,42 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
707
690
|
};
|
|
708
691
|
ProductConnectorService.prototype.getDocumentContent = function (docId, thumbnail) {
|
|
709
692
|
if (thumbnail === void 0) { thumbnail = true; }
|
|
710
|
-
return this.
|
|
693
|
+
return this._adapterService.getDocumentContent(docId, thumbnail);
|
|
711
694
|
};
|
|
712
695
|
ProductConnectorService.prototype.getDeliveryPrognosis = function (goodId) {
|
|
713
|
-
return this.
|
|
696
|
+
return this._adapterService.getDeliveryPrognosis(goodId);
|
|
714
697
|
};
|
|
715
698
|
ProductConnectorService.prototype.getSelectorDeliveryDate = function () {
|
|
716
699
|
return __awaiter(this, void 0, void 0, function () {
|
|
717
700
|
return __generator(this, function (_a) {
|
|
718
|
-
return [2 /*return*/, this.
|
|
701
|
+
return [2 /*return*/, this._adapterService.getSelectorDeliveryDate()];
|
|
719
702
|
});
|
|
720
703
|
});
|
|
721
704
|
};
|
|
722
705
|
ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
|
|
723
|
-
return this.
|
|
706
|
+
return this._adapterService.getDeliveryDate2(goodId);
|
|
724
707
|
};
|
|
725
708
|
ProductConnectorService.prototype.getSuperArticle = function (id) {
|
|
726
|
-
return this.
|
|
709
|
+
return this._adapterService.getSuperArticle(id);
|
|
727
710
|
};
|
|
728
|
-
ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader,
|
|
711
|
+
ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, configuratorStatistics) {
|
|
729
712
|
if (showLoader === void 0) { showLoader = true; }
|
|
730
|
-
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
|
+
});
|
|
731
729
|
};
|
|
732
730
|
ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
|
|
733
731
|
this._shouldShowLoader = showLoader;
|
|
@@ -736,11 +734,8 @@ var ProductConnectorService = /** @class */ (function () {
|
|
|
736
734
|
{ type: ProductConnectorAdapterService },
|
|
737
735
|
{ type: ProductSettingsService }
|
|
738
736
|
]; };
|
|
739
|
-
ProductConnectorService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(ɵɵinject(ProductConnectorAdapterService), ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
|
|
740
737
|
ProductConnectorService = __decorate([
|
|
741
|
-
Injectable(
|
|
742
|
-
providedIn: 'root'
|
|
743
|
-
})
|
|
738
|
+
Injectable()
|
|
744
739
|
], ProductConnectorService);
|
|
745
740
|
return ProductConnectorService;
|
|
746
741
|
}());
|
|
@@ -760,7 +755,6 @@ var ProductEventService = /** @class */ (function () {
|
|
|
760
755
|
this.onArticleInfoReceived = new Subject();
|
|
761
756
|
this.onUpdateProductInfoTab = new Subject();
|
|
762
757
|
}
|
|
763
|
-
ProductEventService.ɵprov = ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
|
|
764
758
|
__decorate([
|
|
765
759
|
Output()
|
|
766
760
|
], ProductEventService.prototype, "onAddToCart", void 0);
|
|
@@ -775,13 +769,320 @@ var ProductEventService = /** @class */ (function () {
|
|
|
775
769
|
], ProductEventService.prototype, "onForceRenderImage", void 0);
|
|
776
770
|
ProductEventService = __decorate([
|
|
777
771
|
Directive(),
|
|
778
|
-
Injectable(
|
|
779
|
-
providedIn: 'root'
|
|
780
|
-
})
|
|
772
|
+
Injectable()
|
|
781
773
|
], ProductEventService);
|
|
782
774
|
return ProductEventService;
|
|
783
775
|
}());
|
|
784
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._subs = [];
|
|
804
|
+
// this.sku = "70000107";
|
|
805
|
+
this._subs.push(
|
|
806
|
+
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
807
|
+
this._appEventService.onAddToCart.subscribe(function (json) {
|
|
808
|
+
_this._handleAddToCart(json);
|
|
809
|
+
}), 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); }));
|
|
810
|
+
}
|
|
811
|
+
Object.defineProperty(IoneProductComponent.prototype, "settings", {
|
|
812
|
+
get: function () {
|
|
813
|
+
return this._settings;
|
|
814
|
+
},
|
|
815
|
+
set: function (value) {
|
|
816
|
+
if (value) {
|
|
817
|
+
var settings = void 0;
|
|
818
|
+
if (typeof value === 'string') {
|
|
819
|
+
settings = JSON.parse(value);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
settings = value;
|
|
823
|
+
}
|
|
824
|
+
this._settingsService.createSettingsFromObject(settings);
|
|
825
|
+
// this._initConnection(settings);
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
enumerable: true,
|
|
829
|
+
configurable: true
|
|
830
|
+
});
|
|
831
|
+
IoneProductComponent.prototype.ngOnChanges = function (changes) {
|
|
832
|
+
this._changeDetector.detectChanges();
|
|
833
|
+
};
|
|
834
|
+
IoneProductComponent.prototype.ngOnDestroy = function () {
|
|
835
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
836
|
+
};
|
|
837
|
+
IoneProductComponent.prototype._handleAnswerInfoReceived = function (info) {
|
|
838
|
+
this.onArticleInfoReceived.next(info);
|
|
839
|
+
};
|
|
840
|
+
IoneProductComponent.prototype._handleAddToCart = function (json) {
|
|
841
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
842
|
+
var articleTreeData, i, good, subArticle;
|
|
843
|
+
return __generator(this, function (_a) {
|
|
844
|
+
switch (_a.label) {
|
|
845
|
+
case 0:
|
|
846
|
+
if (!this._settingsService.settings.createWebOrder) return [3 /*break*/, 7];
|
|
847
|
+
if (!json) return [3 /*break*/, 7];
|
|
848
|
+
articleTreeData = JSON.parse(json);
|
|
849
|
+
if (!(articleTreeData.articleTree && articleTreeData.articleTree.article)) return [3 /*break*/, 7];
|
|
850
|
+
if (!(articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
|
|
851
|
+
articleTreeData.articleTree.compositeGoods.length > 0 && articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles))) return [3 /*break*/, 5];
|
|
852
|
+
i = 0;
|
|
853
|
+
_a.label = 1;
|
|
854
|
+
case 1:
|
|
855
|
+
if (!(i < articleTreeData.articleTree.compositeGoods.length - 1)) return [3 /*break*/, 4];
|
|
856
|
+
good = articleTreeData.articleTree.compositeGoods[i];
|
|
857
|
+
subArticle = articleTreeData.articleTree.subArticles[i];
|
|
858
|
+
return [4 /*yield*/, this._ione.addWebSessionTransactionLine(subArticle.articleNumber, good.quantity)];
|
|
859
|
+
case 2:
|
|
860
|
+
_a.sent();
|
|
861
|
+
_a.label = 3;
|
|
862
|
+
case 3:
|
|
863
|
+
i++;
|
|
864
|
+
return [3 /*break*/, 1];
|
|
865
|
+
case 4: return [3 /*break*/, 7];
|
|
866
|
+
case 5: return [4 /*yield*/, this._ione.addWebSessionTransactionLine(articleTreeData.articleTree.article.articleNumber, 1)];
|
|
867
|
+
case 6:
|
|
868
|
+
_a.sent();
|
|
869
|
+
_a.label = 7;
|
|
870
|
+
case 7:
|
|
871
|
+
this.onAddToCart.emit(json);
|
|
872
|
+
return [2 /*return*/];
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
});
|
|
876
|
+
};
|
|
877
|
+
IoneProductComponent.ctorParameters = function () { return [
|
|
878
|
+
{ type: DictionaryService },
|
|
879
|
+
{ type: JsonUtilsService },
|
|
880
|
+
{ type: ProductConnectorService },
|
|
881
|
+
{ type: ChangeDetectorRef },
|
|
882
|
+
{ type: ProductEventService },
|
|
883
|
+
{ type: ProductSettingsService }
|
|
884
|
+
]; };
|
|
885
|
+
__decorate([
|
|
886
|
+
Input()
|
|
887
|
+
], IoneProductComponent.prototype, "sku", void 0);
|
|
888
|
+
__decorate([
|
|
889
|
+
Input()
|
|
890
|
+
], IoneProductComponent.prototype, "settings", null);
|
|
891
|
+
__decorate([
|
|
892
|
+
Output()
|
|
893
|
+
], IoneProductComponent.prototype, "onAddToCart", void 0);
|
|
894
|
+
__decorate([
|
|
895
|
+
Output()
|
|
896
|
+
], IoneProductComponent.prototype, "forceRenderImage", void 0);
|
|
897
|
+
__decorate([
|
|
898
|
+
Output()
|
|
899
|
+
], IoneProductComponent.prototype, "onAlternativeClick", void 0);
|
|
900
|
+
__decorate([
|
|
901
|
+
Output()
|
|
902
|
+
], IoneProductComponent.prototype, "onArticleInfoReceived", void 0);
|
|
903
|
+
__decorate([
|
|
904
|
+
Output()
|
|
905
|
+
], IoneProductComponent.prototype, "onArticleReceived", void 0);
|
|
906
|
+
__decorate([
|
|
907
|
+
Output()
|
|
908
|
+
], IoneProductComponent.prototype, "onSelectionsReceived", void 0);
|
|
909
|
+
__decorate([
|
|
910
|
+
Output()
|
|
911
|
+
], IoneProductComponent.prototype, "onAddToQuote", void 0);
|
|
912
|
+
IoneProductComponent = __decorate([
|
|
913
|
+
Component({
|
|
914
|
+
selector: 'app-ione-product',
|
|
915
|
+
template: "\n <app-product-page [sku]=\"sku\"\n ></app-product-page>\n ",
|
|
916
|
+
providers: [
|
|
917
|
+
ProductEventService,
|
|
918
|
+
ProductSettingsService,
|
|
919
|
+
ProductConnectorAdapterService,
|
|
920
|
+
ProductConnectorService
|
|
921
|
+
],
|
|
922
|
+
encapsulation: ViewEncapsulation.Emulated,
|
|
923
|
+
styles: [""]
|
|
924
|
+
})
|
|
925
|
+
], IoneProductComponent);
|
|
926
|
+
return IoneProductComponent;
|
|
927
|
+
}());
|
|
928
|
+
|
|
929
|
+
var ProductInitializerService = /** @class */ (function () {
|
|
930
|
+
function ProductInitializerService(_settingsService) {
|
|
931
|
+
this._settingsService = _settingsService;
|
|
932
|
+
}
|
|
933
|
+
ProductInitializerService.prototype.initializeApp = function () {
|
|
934
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
935
|
+
return __generator(this, function (_a) {
|
|
936
|
+
return [2 /*return*/, this._settingsService.initializeSettings()];
|
|
937
|
+
});
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
ProductInitializerService.ctorParameters = function () { return [
|
|
941
|
+
{ type: ProductSettingsService }
|
|
942
|
+
]; };
|
|
943
|
+
ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
|
|
944
|
+
ProductInitializerService = __decorate([
|
|
945
|
+
Injectable({
|
|
946
|
+
providedIn: 'root',
|
|
947
|
+
})
|
|
948
|
+
], ProductInitializerService);
|
|
949
|
+
return ProductInitializerService;
|
|
950
|
+
}());
|
|
951
|
+
|
|
952
|
+
var ProductExternalSourceComponent = /** @class */ (function () {
|
|
953
|
+
function ProductExternalSourceComponent(_sanitizer, _productConnectorService, _appEventService) {
|
|
954
|
+
this._sanitizer = _sanitizer;
|
|
955
|
+
this._productConnectorService = _productConnectorService;
|
|
956
|
+
this._appEventService = _appEventService;
|
|
957
|
+
this.addToCart = new EventEmitter();
|
|
958
|
+
this.addToQuote = new EventEmitter();
|
|
959
|
+
this.alternativeClick = new EventEmitter();
|
|
960
|
+
this.showProduct = false;
|
|
961
|
+
this.loaded = false;
|
|
962
|
+
this.externalSettings = {};
|
|
963
|
+
this._subs = [];
|
|
964
|
+
}
|
|
965
|
+
Object.defineProperty(ProductExternalSourceComponent.prototype, "externalSource", {
|
|
966
|
+
get: function () {
|
|
967
|
+
return this._externalSource;
|
|
968
|
+
},
|
|
969
|
+
set: function (value) {
|
|
970
|
+
this._externalSource = value;
|
|
971
|
+
this.loaded = false;
|
|
972
|
+
this._prepareExternalSource();
|
|
973
|
+
},
|
|
974
|
+
enumerable: true,
|
|
975
|
+
configurable: true
|
|
976
|
+
});
|
|
977
|
+
ProductExternalSourceComponent.prototype.showClass = function () {
|
|
978
|
+
return true;
|
|
979
|
+
};
|
|
980
|
+
ProductExternalSourceComponent.prototype.ngOnInit = function () {
|
|
981
|
+
var _this = this;
|
|
982
|
+
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); }));
|
|
983
|
+
};
|
|
984
|
+
ProductExternalSourceComponent.prototype.ngOnDestroy = function () {
|
|
985
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
986
|
+
};
|
|
987
|
+
ProductExternalSourceComponent.prototype._prepareExternalSource = function () {
|
|
988
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
989
|
+
var bundleSettings;
|
|
990
|
+
return __generator(this, function (_a) {
|
|
991
|
+
switch (_a.label) {
|
|
992
|
+
case 0:
|
|
993
|
+
if (!this._externalSource) {
|
|
994
|
+
return [2 /*return*/];
|
|
995
|
+
}
|
|
996
|
+
this.externalUrl = undefined;
|
|
997
|
+
this.externalSettings = {};
|
|
998
|
+
if (!(this.externalSource.type === 'CATF')) return [3 /*break*/, 2];
|
|
999
|
+
return [4 /*yield*/, this._productConnectorService.getProductBundleSettings(this.externalSource.url, parseInt(this.externalSource.schema, 0))];
|
|
1000
|
+
case 1:
|
|
1001
|
+
bundleSettings = _a.sent();
|
|
1002
|
+
this.externalSettings = JSON.parse(bundleSettings);
|
|
1003
|
+
if (this.options) {
|
|
1004
|
+
this.externalSettings.options = this.options;
|
|
1005
|
+
}
|
|
1006
|
+
// this.externalSettings.assetPath = "https://cdn1.colijn-it.nl/content43";
|
|
1007
|
+
// this.externalSettings.threeDAssetPath = "https://cdn1.colijn-it.nl/content43";
|
|
1008
|
+
if (this.externalSource.username && this.externalSource.password) {
|
|
1009
|
+
this.externalSettings.useLoginEncryption = true;
|
|
1010
|
+
this.externalSettings.username = this.externalSource.username;
|
|
1011
|
+
this.externalSettings.password = this.externalSource.password;
|
|
1012
|
+
}
|
|
1013
|
+
// finally show the catalog
|
|
1014
|
+
this.showProduct = true;
|
|
1015
|
+
return [3 /*break*/, 3];
|
|
1016
|
+
case 2:
|
|
1017
|
+
this.externalUrl = this.externalSource.url;
|
|
1018
|
+
this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
|
|
1019
|
+
this.showProduct = false;
|
|
1020
|
+
_a.label = 3;
|
|
1021
|
+
case 3:
|
|
1022
|
+
this.loaded = true;
|
|
1023
|
+
return [2 /*return*/];
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
});
|
|
1027
|
+
};
|
|
1028
|
+
ProductExternalSourceComponent.ctorParameters = function () { return [
|
|
1029
|
+
{ type: DomSanitizer },
|
|
1030
|
+
{ type: ProductConnectorService },
|
|
1031
|
+
{ type: ProductEventService }
|
|
1032
|
+
]; };
|
|
1033
|
+
__decorate([
|
|
1034
|
+
Input()
|
|
1035
|
+
], ProductExternalSourceComponent.prototype, "sku", void 0);
|
|
1036
|
+
__decorate([
|
|
1037
|
+
Input()
|
|
1038
|
+
], ProductExternalSourceComponent.prototype, "externalSource", null);
|
|
1039
|
+
__decorate([
|
|
1040
|
+
Input()
|
|
1041
|
+
], ProductExternalSourceComponent.prototype, "options", void 0);
|
|
1042
|
+
__decorate([
|
|
1043
|
+
Output()
|
|
1044
|
+
], ProductExternalSourceComponent.prototype, "addToCart", void 0);
|
|
1045
|
+
__decorate([
|
|
1046
|
+
Output()
|
|
1047
|
+
], ProductExternalSourceComponent.prototype, "addToQuote", void 0);
|
|
1048
|
+
__decorate([
|
|
1049
|
+
Output()
|
|
1050
|
+
], ProductExternalSourceComponent.prototype, "alternativeClick", void 0);
|
|
1051
|
+
__decorate([
|
|
1052
|
+
HostBinding('class.co-product-external-source')
|
|
1053
|
+
], ProductExternalSourceComponent.prototype, "showClass", null);
|
|
1054
|
+
ProductExternalSourceComponent = __decorate([
|
|
1055
|
+
Component({
|
|
1056
|
+
selector: 'co-product-external-source',
|
|
1057
|
+
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 ",
|
|
1058
|
+
providers: [
|
|
1059
|
+
ProductEventService,
|
|
1060
|
+
ProductSettingsService,
|
|
1061
|
+
ProductConnectorAdapterService,
|
|
1062
|
+
ProductConnectorService
|
|
1063
|
+
],
|
|
1064
|
+
encapsulation: ViewEncapsulation.None
|
|
1065
|
+
})
|
|
1066
|
+
], ProductExternalSourceComponent);
|
|
1067
|
+
return ProductExternalSourceComponent;
|
|
1068
|
+
}());
|
|
1069
|
+
|
|
1070
|
+
var StockAndDelivery = /** @class */ (function () {
|
|
1071
|
+
function StockAndDelivery(stock, deliveryDescription) {
|
|
1072
|
+
this.stock = 0;
|
|
1073
|
+
this.stock = stock;
|
|
1074
|
+
this.deliveryDescription = deliveryDescription;
|
|
1075
|
+
}
|
|
1076
|
+
return StockAndDelivery;
|
|
1077
|
+
}());
|
|
1078
|
+
|
|
1079
|
+
var SelectorType;
|
|
1080
|
+
(function (SelectorType) {
|
|
1081
|
+
SelectorType["TwoD"] = "2D";
|
|
1082
|
+
SelectorType["ThreeD"] = "3D";
|
|
1083
|
+
SelectorType["Omni"] = "Omni";
|
|
1084
|
+
})(SelectorType || (SelectorType = {}));
|
|
1085
|
+
|
|
785
1086
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. **/
|
|
786
1087
|
var IconEnum;
|
|
787
1088
|
(function (IconEnum) {
|
|
@@ -859,208 +1160,31 @@ var IconCacheService = /** @class */ (function () {
|
|
|
859
1160
|
return IconCacheService;
|
|
860
1161
|
}());
|
|
861
1162
|
|
|
862
|
-
var
|
|
863
|
-
function
|
|
1163
|
+
var ProductPageComponent = /** @class */ (function () {
|
|
1164
|
+
function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
|
|
864
1165
|
var _this = this;
|
|
865
1166
|
this._ione = _ione;
|
|
866
|
-
this.
|
|
1167
|
+
this._renderer = _renderer;
|
|
867
1168
|
this._changeDetector = _changeDetector;
|
|
868
|
-
this._domSanitizer = _domSanitizer;
|
|
869
1169
|
this.iconCache = iconCache;
|
|
870
|
-
this.
|
|
871
|
-
this.
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
1170
|
+
this.settingsService = settingsService;
|
|
1171
|
+
this.appEventService = appEventService;
|
|
1172
|
+
this.icon = IconEnum;
|
|
1173
|
+
this.configurable = false;
|
|
1174
|
+
this.threeD = false;
|
|
1175
|
+
this.show2D = true;
|
|
1176
|
+
this.show3D = false;
|
|
1177
|
+
this.configuring = false;
|
|
1178
|
+
this.fullscreenAnimationEnd = false;
|
|
1179
|
+
this.settingsLoaded = false;
|
|
1180
|
+
this._fullScreen = false;
|
|
876
1181
|
this._subs = [];
|
|
877
|
-
this._subs.push(this.
|
|
878
|
-
_this.
|
|
879
|
-
|
|
880
|
-
if (_this._images[0] instanceof CoDocument) {
|
|
881
|
-
_this._images.unshift(url);
|
|
882
|
-
}
|
|
883
|
-
else {
|
|
884
|
-
_this._images[0] = url;
|
|
1182
|
+
this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
|
|
1183
|
+
if (_this.selections.nativeElement) {
|
|
1184
|
+
_this.selections.nativeElement.forceRenderImage();
|
|
885
1185
|
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
}
|
|
889
|
-
Object.defineProperty(ImageCarouselComponent.prototype, "images", {
|
|
890
|
-
get: function () {
|
|
891
|
-
return this._images;
|
|
892
|
-
},
|
|
893
|
-
set: function (value) {
|
|
894
|
-
if (value && value.length > 0) {
|
|
895
|
-
this._images = value;
|
|
896
|
-
this._loadImages();
|
|
897
|
-
this._changeDetector.detectChanges();
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
enumerable: true,
|
|
901
|
-
configurable: true
|
|
902
|
-
});
|
|
903
|
-
ImageCarouselComponent.prototype.handleWindowResize = function () {
|
|
904
|
-
var _this = this;
|
|
905
|
-
this.resizing = true;
|
|
906
|
-
this._scrollCarouselToIndex();
|
|
907
|
-
clearTimeout(this._resizeTimer);
|
|
908
|
-
this._resizeTimer = setTimeout(function () {
|
|
909
|
-
_this.resizing = false;
|
|
910
|
-
}, 200);
|
|
911
|
-
};
|
|
912
|
-
ImageCarouselComponent.prototype.gotoNextSlide = function () {
|
|
913
|
-
this.currentIndex++;
|
|
914
|
-
};
|
|
915
|
-
ImageCarouselComponent.prototype.gotoPrevSlide = function () {
|
|
916
|
-
this.currentIndex--;
|
|
917
|
-
};
|
|
918
|
-
ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
|
|
919
|
-
return this.currentIndex === index;
|
|
920
|
-
};
|
|
921
|
-
Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
|
|
922
|
-
get: function () {
|
|
923
|
-
return this._currentIndex;
|
|
924
|
-
},
|
|
925
|
-
set: function (value) {
|
|
926
|
-
this._currentIndex = value;
|
|
927
|
-
this._scrollCarouselToIndex();
|
|
928
|
-
},
|
|
929
|
-
enumerable: true,
|
|
930
|
-
configurable: true
|
|
931
|
-
});
|
|
932
|
-
ImageCarouselComponent.prototype.ngOnInit = function () {
|
|
933
|
-
};
|
|
934
|
-
ImageCarouselComponent.prototype.ngOnDestroy = function () {
|
|
935
|
-
this.carousel = undefined;
|
|
936
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
937
|
-
};
|
|
938
|
-
ImageCarouselComponent.prototype.handleThumbClick = function (index) {
|
|
939
|
-
this.currentIndex = index;
|
|
940
|
-
};
|
|
941
|
-
ImageCarouselComponent.prototype.onForceRenderImage = function () {
|
|
942
|
-
this._appEventService.onForceRenderImage.next();
|
|
943
|
-
};
|
|
944
|
-
ImageCarouselComponent.prototype.getImageSrc = function (image) {
|
|
945
|
-
var source = '';
|
|
946
|
-
if (image instanceof CoDocument) {
|
|
947
|
-
if (image.filePath) {
|
|
948
|
-
source = image.filePath;
|
|
949
|
-
}
|
|
950
|
-
else {
|
|
951
|
-
source = image.documentBodyAsDataUri;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
else if (image.detail !== undefined) {
|
|
955
|
-
source = image.detail;
|
|
956
|
-
}
|
|
957
|
-
return this._domSanitizer.bypassSecurityTrustUrl(source);
|
|
958
|
-
};
|
|
959
|
-
ImageCarouselComponent.prototype._loadImages = function () {
|
|
960
|
-
var _this = this;
|
|
961
|
-
if (this._images) {
|
|
962
|
-
this._images.forEach(function (i) {
|
|
963
|
-
if (!i.documentBody && !i.filePath) {
|
|
964
|
-
_this._ione.getDocumentContent(i.documentId, false).then(function (content) {
|
|
965
|
-
if (content) {
|
|
966
|
-
i.documentBody = content.documentContent;
|
|
967
|
-
}
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
};
|
|
973
|
-
ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
|
|
974
|
-
if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
|
|
975
|
-
var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
|
|
976
|
-
if (this.carousel && this.carousel.nativeElement) {
|
|
977
|
-
this.carousel.nativeElement.scrollLeft = movePx;
|
|
978
|
-
// this.carousel.nativeElement.scrollTo({
|
|
979
|
-
// left: movePx,
|
|
980
|
-
// behavior: 'smooth'
|
|
981
|
-
// });
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
};
|
|
985
|
-
ImageCarouselComponent.ctorParameters = function () { return [
|
|
986
|
-
{ type: ProductConnectorService },
|
|
987
|
-
{ type: ProductEventService },
|
|
988
|
-
{ type: ChangeDetectorRef },
|
|
989
|
-
{ type: DomSanitizer },
|
|
990
|
-
{ type: IconCacheService }
|
|
991
|
-
]; };
|
|
992
|
-
__decorate([
|
|
993
|
-
ViewChild('carousel', { read: ElementRef })
|
|
994
|
-
], ImageCarouselComponent.prototype, "carousel", void 0);
|
|
995
|
-
__decorate([
|
|
996
|
-
Input()
|
|
997
|
-
], ImageCarouselComponent.prototype, "showRefresh", void 0);
|
|
998
|
-
__decorate([
|
|
999
|
-
Input()
|
|
1000
|
-
], ImageCarouselComponent.prototype, "images", null);
|
|
1001
|
-
__decorate([
|
|
1002
|
-
HostListener('window:resize')
|
|
1003
|
-
], ImageCarouselComponent.prototype, "handleWindowResize", null);
|
|
1004
|
-
__decorate([
|
|
1005
|
-
HostListener('swipeleft')
|
|
1006
|
-
], ImageCarouselComponent.prototype, "gotoNextSlide", null);
|
|
1007
|
-
__decorate([
|
|
1008
|
-
HostListener('swiperight')
|
|
1009
|
-
], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
|
|
1010
|
-
__decorate([
|
|
1011
|
-
HostBinding('class.resizing')
|
|
1012
|
-
], ImageCarouselComponent.prototype, "resizing", void 0);
|
|
1013
|
-
ImageCarouselComponent = __decorate([
|
|
1014
|
-
Component({
|
|
1015
|
-
selector: 'app-image-carousel',
|
|
1016
|
-
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",
|
|
1017
|
-
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)}}"]
|
|
1018
|
-
})
|
|
1019
|
-
], ImageCarouselComponent);
|
|
1020
|
-
return ImageCarouselComponent;
|
|
1021
|
-
}());
|
|
1022
|
-
|
|
1023
|
-
var StockAndDelivery = /** @class */ (function () {
|
|
1024
|
-
function StockAndDelivery(stock, deliveryDescription) {
|
|
1025
|
-
this.stock = 0;
|
|
1026
|
-
this.stock = stock;
|
|
1027
|
-
this.deliveryDescription = deliveryDescription;
|
|
1028
|
-
}
|
|
1029
|
-
return StockAndDelivery;
|
|
1030
|
-
}());
|
|
1031
|
-
|
|
1032
|
-
var SelectorType;
|
|
1033
|
-
(function (SelectorType) {
|
|
1034
|
-
SelectorType["TwoD"] = "2D";
|
|
1035
|
-
SelectorType["ThreeD"] = "3D";
|
|
1036
|
-
SelectorType["Omni"] = "Omni";
|
|
1037
|
-
})(SelectorType || (SelectorType = {}));
|
|
1038
|
-
|
|
1039
|
-
var ProductPageComponent = /** @class */ (function () {
|
|
1040
|
-
function ProductPageComponent(_ione, _renderer, _changeDetector, iconCache, settingsService, appEventService) {
|
|
1041
|
-
var _this = this;
|
|
1042
|
-
this._ione = _ione;
|
|
1043
|
-
this._renderer = _renderer;
|
|
1044
|
-
this._changeDetector = _changeDetector;
|
|
1045
|
-
this.iconCache = iconCache;
|
|
1046
|
-
this.settingsService = settingsService;
|
|
1047
|
-
this.appEventService = appEventService;
|
|
1048
|
-
this.icon = IconEnum;
|
|
1049
|
-
this.configurable = false;
|
|
1050
|
-
this.threeD = false;
|
|
1051
|
-
this.show2D = true;
|
|
1052
|
-
this.show3D = false;
|
|
1053
|
-
this.configuring = false;
|
|
1054
|
-
this.fullscreenAnimationEnd = false;
|
|
1055
|
-
this.settingsLoaded = false;
|
|
1056
|
-
this._fullScreen = false;
|
|
1057
|
-
this._subs = [];
|
|
1058
|
-
this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
|
|
1059
|
-
if (_this.selections.nativeElement) {
|
|
1060
|
-
_this.selections.nativeElement.forceRenderImage();
|
|
1061
|
-
}
|
|
1062
|
-
}), this.settingsService.settingsLoaded.subscribe(function (loaded) {
|
|
1063
|
-
_this.settingsLoaded = loaded;
|
|
1186
|
+
}), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._ione.controllerInitialized.subscribe(function (initialized) {
|
|
1187
|
+
_this.settingsLoaded = initialized;
|
|
1064
1188
|
}));
|
|
1065
1189
|
}
|
|
1066
1190
|
Object.defineProperty(ProductPageComponent.prototype, "sku", {
|
|
@@ -1082,6 +1206,23 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1082
1206
|
enumerable: true,
|
|
1083
1207
|
configurable: true
|
|
1084
1208
|
});
|
|
1209
|
+
Object.defineProperty(ProductPageComponent.prototype, "settings", {
|
|
1210
|
+
get: function () {
|
|
1211
|
+
return this._settings;
|
|
1212
|
+
},
|
|
1213
|
+
set: function (value) {
|
|
1214
|
+
if (value) {
|
|
1215
|
+
if (typeof value === 'string') {
|
|
1216
|
+
this._settings = JSON.parse(value);
|
|
1217
|
+
}
|
|
1218
|
+
else {
|
|
1219
|
+
this._settings = value;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
enumerable: true,
|
|
1224
|
+
configurable: true
|
|
1225
|
+
});
|
|
1085
1226
|
Object.defineProperty(ProductPageComponent.prototype, "fullScreen", {
|
|
1086
1227
|
get: function () {
|
|
1087
1228
|
return this._fullScreen;
|
|
@@ -1118,6 +1259,13 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1118
1259
|
configurable: true
|
|
1119
1260
|
});
|
|
1120
1261
|
ProductPageComponent.prototype.ngOnInit = function () {
|
|
1262
|
+
if (this._settings) {
|
|
1263
|
+
this.settingsService.settings = undefined;
|
|
1264
|
+
this.settingsService.createSettingsFromObject(this._settings);
|
|
1265
|
+
}
|
|
1266
|
+
else {
|
|
1267
|
+
this._settings = this.settingsService.settings;
|
|
1268
|
+
}
|
|
1121
1269
|
};
|
|
1122
1270
|
ProductPageComponent.prototype.ngAfterViewInit = function () {
|
|
1123
1271
|
};
|
|
@@ -1142,6 +1290,11 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1142
1290
|
ProductPageComponent.prototype.showFullScreen = function () {
|
|
1143
1291
|
this.fullScreen = !this.fullScreen;
|
|
1144
1292
|
};
|
|
1293
|
+
ProductPageComponent.prototype._handleSettingsLoaded = function (loaded) {
|
|
1294
|
+
if (loaded) {
|
|
1295
|
+
this._ione.initConnection();
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1145
1298
|
ProductPageComponent.prototype._getArticle = function () {
|
|
1146
1299
|
return __awaiter(this, void 0, void 0, function () {
|
|
1147
1300
|
var _this = this;
|
|
@@ -1155,18 +1308,20 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1155
1308
|
if (init) {
|
|
1156
1309
|
this._ione.getFullArticle(this._sku).then(function (article) {
|
|
1157
1310
|
_this.article = article;
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
_this.
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1311
|
+
if (_this.article) {
|
|
1312
|
+
_this.configurable = _this.article.goodType === 'B';
|
|
1313
|
+
if (_this.configurable) {
|
|
1314
|
+
_this.currentView = SelectorType.TwoD;
|
|
1315
|
+
}
|
|
1316
|
+
_this.threeD = _this.article.is3D;
|
|
1317
|
+
_this.selectorType = _this.article.selectorTypeCustomer;
|
|
1318
|
+
_this._ione.getDeliveryPrognosis(_this.article.goodId).then(function (stockInfo) {
|
|
1319
|
+
var stockAndDelivery = stockInfo;
|
|
1320
|
+
_this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
|
|
1321
|
+
_this._changeDetector.detectChanges();
|
|
1322
|
+
});
|
|
1167
1323
|
_this._changeDetector.detectChanges();
|
|
1168
|
-
}
|
|
1169
|
-
_this._changeDetector.detectChanges();
|
|
1324
|
+
}
|
|
1170
1325
|
});
|
|
1171
1326
|
}
|
|
1172
1327
|
return [2 /*return*/];
|
|
@@ -1196,10 +1351,13 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1196
1351
|
__decorate([
|
|
1197
1352
|
Input()
|
|
1198
1353
|
], ProductPageComponent.prototype, "sku", null);
|
|
1354
|
+
__decorate([
|
|
1355
|
+
Input()
|
|
1356
|
+
], ProductPageComponent.prototype, "settings", null);
|
|
1199
1357
|
ProductPageComponent = __decorate([
|
|
1200
1358
|
Component({
|
|
1201
1359
|
selector: 'app-product-page',
|
|
1202
|
-
template: "<div class=\"page-wrapper\">\r\n
|
|
1360
|
+
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",
|
|
1203
1361
|
animations: [
|
|
1204
1362
|
trigger('toggleFullScreen', [
|
|
1205
1363
|
state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1238,203 +1396,231 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1238
1396
|
return ProductPageComponent;
|
|
1239
1397
|
}());
|
|
1240
1398
|
|
|
1241
|
-
var
|
|
1242
|
-
function
|
|
1243
|
-
this.
|
|
1244
|
-
this.
|
|
1245
|
-
this.
|
|
1246
|
-
this.
|
|
1399
|
+
var ProductSelectorTypeComponent = /** @class */ (function () {
|
|
1400
|
+
function ProductSelectorTypeComponent(_iconCache, _changeDetector) {
|
|
1401
|
+
this._iconCache = _iconCache;
|
|
1402
|
+
this._changeDetector = _changeDetector;
|
|
1403
|
+
this.type = SelectorType;
|
|
1404
|
+
this.icons = IconEnum;
|
|
1405
|
+
this.onIconClick = new EventEmitter();
|
|
1406
|
+
this.currentTypeChange = new EventEmitter();
|
|
1407
|
+
this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
|
|
1408
|
+
this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
|
|
1247
1409
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1410
|
+
ProductSelectorTypeComponent.prototype.ngOnInit = function () {
|
|
1411
|
+
};
|
|
1412
|
+
ProductSelectorTypeComponent.prototype.handleIconClick = function (type) {
|
|
1413
|
+
this.currentType = type;
|
|
1414
|
+
this.currentTypeChange.next(this.currentType);
|
|
1415
|
+
this.onIconClick.next(this.currentType);
|
|
1416
|
+
this._changeDetector.detectChanges();
|
|
1417
|
+
};
|
|
1418
|
+
ProductSelectorTypeComponent.ctorParameters = function () { return [
|
|
1419
|
+
{ type: IconCacheService },
|
|
1420
|
+
{ type: ChangeDetectorRef }
|
|
1250
1421
|
]; };
|
|
1251
1422
|
__decorate([
|
|
1252
1423
|
Input()
|
|
1253
|
-
],
|
|
1424
|
+
], ProductSelectorTypeComponent.prototype, "show2D", void 0);
|
|
1254
1425
|
__decorate([
|
|
1255
1426
|
Input()
|
|
1256
|
-
],
|
|
1257
|
-
|
|
1427
|
+
], ProductSelectorTypeComponent.prototype, "show3D", void 0);
|
|
1428
|
+
__decorate([
|
|
1429
|
+
Input()
|
|
1430
|
+
], ProductSelectorTypeComponent.prototype, "currentType", void 0);
|
|
1431
|
+
__decorate([
|
|
1432
|
+
Output()
|
|
1433
|
+
], ProductSelectorTypeComponent.prototype, "onIconClick", void 0);
|
|
1434
|
+
__decorate([
|
|
1435
|
+
Output()
|
|
1436
|
+
], ProductSelectorTypeComponent.prototype, "currentTypeChange", void 0);
|
|
1437
|
+
ProductSelectorTypeComponent = __decorate([
|
|
1258
1438
|
Component({
|
|
1259
|
-
selector: 'app-product-
|
|
1260
|
-
template: "<
|
|
1261
|
-
styles: [":host{display:
|
|
1439
|
+
selector: 'app-product-selector-type',
|
|
1440
|
+
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",
|
|
1441
|
+
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}"]
|
|
1262
1442
|
})
|
|
1263
|
-
],
|
|
1264
|
-
return
|
|
1443
|
+
], ProductSelectorTypeComponent);
|
|
1444
|
+
return ProductSelectorTypeComponent;
|
|
1265
1445
|
}());
|
|
1266
1446
|
|
|
1267
|
-
var
|
|
1268
|
-
function
|
|
1269
|
-
|
|
1447
|
+
var ImageCarouselComponent = /** @class */ (function () {
|
|
1448
|
+
function ImageCarouselComponent(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
|
|
1449
|
+
var _this = this;
|
|
1450
|
+
this._ione = _ione;
|
|
1270
1451
|
this._appEventService = _appEventService;
|
|
1271
|
-
this.
|
|
1272
|
-
this.
|
|
1452
|
+
this._changeDetector = _changeDetector;
|
|
1453
|
+
this._domSanitizer = _domSanitizer;
|
|
1454
|
+
this.iconCache = iconCache;
|
|
1455
|
+
this.icons = IconEnum;
|
|
1456
|
+
this.showLoader = false;
|
|
1457
|
+
this.showRefresh = false;
|
|
1458
|
+
this.resizing = false;
|
|
1459
|
+
this._currentIndex = 0;
|
|
1460
|
+
this._images = [];
|
|
1461
|
+
this._subs = [];
|
|
1462
|
+
this._subs.push(this._appEventService.onRenderStarted.subscribe(function () {
|
|
1463
|
+
_this.showLoader = true;
|
|
1464
|
+
}), this._appEventService.onDraftRenderImageReceived.subscribe(function (url) {
|
|
1465
|
+
if (_this._images[0] instanceof CoDocument) {
|
|
1466
|
+
_this._images.unshift(url);
|
|
1467
|
+
}
|
|
1468
|
+
else {
|
|
1469
|
+
_this._images[0] = url;
|
|
1470
|
+
}
|
|
1471
|
+
_this.showLoader = false;
|
|
1472
|
+
}));
|
|
1273
1473
|
}
|
|
1274
|
-
Object.defineProperty(
|
|
1474
|
+
Object.defineProperty(ImageCarouselComponent.prototype, "images", {
|
|
1275
1475
|
get: function () {
|
|
1276
|
-
return this.
|
|
1476
|
+
return this._images;
|
|
1277
1477
|
},
|
|
1278
1478
|
set: function (value) {
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
if (this.refType && this.refType !== undefined) {
|
|
1282
|
-
if (value.length > 0) {
|
|
1283
|
-
value.forEach(function (x) {
|
|
1284
|
-
if (x.refType === _this.refType) {
|
|
1285
|
-
_this._articles.push(x);
|
|
1286
|
-
}
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
else {
|
|
1291
|
-
this._articles = value;
|
|
1292
|
-
}
|
|
1479
|
+
if (value && value.length > 0) {
|
|
1480
|
+
this._images = value;
|
|
1293
1481
|
this._loadImages();
|
|
1482
|
+
this._changeDetector.detectChanges();
|
|
1294
1483
|
}
|
|
1295
1484
|
},
|
|
1296
1485
|
enumerable: true,
|
|
1297
1486
|
configurable: true
|
|
1298
1487
|
});
|
|
1299
|
-
|
|
1300
|
-
this
|
|
1488
|
+
ImageCarouselComponent.prototype.handleWindowResize = function () {
|
|
1489
|
+
var _this = this;
|
|
1490
|
+
this.resizing = true;
|
|
1491
|
+
this._scrollCarouselToIndex();
|
|
1492
|
+
clearTimeout(this._resizeTimer);
|
|
1493
|
+
this._resizeTimer = setTimeout(function () {
|
|
1494
|
+
_this.resizing = false;
|
|
1495
|
+
}, 200);
|
|
1301
1496
|
};
|
|
1302
|
-
|
|
1497
|
+
ImageCarouselComponent.prototype.gotoNextSlide = function () {
|
|
1498
|
+
this.currentIndex++;
|
|
1499
|
+
};
|
|
1500
|
+
ImageCarouselComponent.prototype.gotoPrevSlide = function () {
|
|
1501
|
+
this.currentIndex--;
|
|
1502
|
+
};
|
|
1503
|
+
ImageCarouselComponent.prototype.isCurrentIndex = function (index) {
|
|
1504
|
+
return this.currentIndex === index;
|
|
1505
|
+
};
|
|
1506
|
+
Object.defineProperty(ImageCarouselComponent.prototype, "currentIndex", {
|
|
1507
|
+
get: function () {
|
|
1508
|
+
return this._currentIndex;
|
|
1509
|
+
},
|
|
1510
|
+
set: function (value) {
|
|
1511
|
+
this._currentIndex = value;
|
|
1512
|
+
this._scrollCarouselToIndex();
|
|
1513
|
+
},
|
|
1514
|
+
enumerable: true,
|
|
1515
|
+
configurable: true
|
|
1516
|
+
});
|
|
1517
|
+
ImageCarouselComponent.prototype.ngOnInit = function () {
|
|
1518
|
+
};
|
|
1519
|
+
ImageCarouselComponent.prototype.ngOnDestroy = function () {
|
|
1520
|
+
this.carousel = undefined;
|
|
1521
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
1522
|
+
};
|
|
1523
|
+
ImageCarouselComponent.prototype.handleThumbClick = function (index) {
|
|
1524
|
+
this.currentIndex = index;
|
|
1525
|
+
};
|
|
1526
|
+
ImageCarouselComponent.prototype.onForceRenderImage = function () {
|
|
1527
|
+
this._appEventService.onForceRenderImage.next();
|
|
1528
|
+
};
|
|
1529
|
+
ImageCarouselComponent.prototype.getImageSrc = function (image) {
|
|
1530
|
+
var source = '';
|
|
1531
|
+
if (image instanceof CoDocument) {
|
|
1532
|
+
if (image.filePath) {
|
|
1533
|
+
source = image.filePath;
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
source = image.documentBodyAsDataUri;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
else if (image.detail !== undefined) {
|
|
1540
|
+
source = image.detail;
|
|
1541
|
+
}
|
|
1542
|
+
return this._domSanitizer.bypassSecurityTrustUrl(source);
|
|
1543
|
+
};
|
|
1544
|
+
ImageCarouselComponent.prototype._loadImages = function () {
|
|
1303
1545
|
var _this = this;
|
|
1304
|
-
this.
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1546
|
+
if (this._images) {
|
|
1547
|
+
this._images.forEach(function (i) {
|
|
1548
|
+
if (!i.documentBody && !i.filePath) {
|
|
1549
|
+
_this._ione.getDocumentContent(i.documentId, false).then(function (content) {
|
|
1550
|
+
if (content) {
|
|
1551
|
+
i.documentBody = content.documentContent;
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
|
|
1559
|
+
if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
|
|
1560
|
+
var movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
|
|
1561
|
+
if (this.carousel && this.carousel.nativeElement) {
|
|
1562
|
+
this.carousel.nativeElement.scrollLeft = movePx;
|
|
1563
|
+
// this.carousel.nativeElement.scrollTo({
|
|
1564
|
+
// left: movePx,
|
|
1565
|
+
// behavior: 'smooth'
|
|
1566
|
+
// });
|
|
1311
1567
|
}
|
|
1312
|
-
}
|
|
1568
|
+
}
|
|
1313
1569
|
};
|
|
1314
|
-
|
|
1570
|
+
ImageCarouselComponent.ctorParameters = function () { return [
|
|
1315
1571
|
{ type: ProductConnectorService },
|
|
1316
|
-
{ type: ProductEventService }
|
|
1572
|
+
{ type: ProductEventService },
|
|
1573
|
+
{ type: ChangeDetectorRef },
|
|
1574
|
+
{ type: DomSanitizer },
|
|
1575
|
+
{ type: IconCacheService }
|
|
1317
1576
|
]; };
|
|
1318
1577
|
__decorate([
|
|
1319
|
-
|
|
1320
|
-
],
|
|
1578
|
+
ViewChild('carousel', { read: ElementRef })
|
|
1579
|
+
], ImageCarouselComponent.prototype, "carousel", void 0);
|
|
1321
1580
|
__decorate([
|
|
1322
1581
|
Input()
|
|
1323
|
-
],
|
|
1582
|
+
], ImageCarouselComponent.prototype, "showRefresh", void 0);
|
|
1324
1583
|
__decorate([
|
|
1325
1584
|
Input()
|
|
1326
|
-
],
|
|
1585
|
+
], ImageCarouselComponent.prototype, "images", null);
|
|
1327
1586
|
__decorate([
|
|
1328
|
-
|
|
1329
|
-
],
|
|
1330
|
-
ProductRelatedComponent = __decorate([
|
|
1331
|
-
Component({
|
|
1332
|
-
selector: 'app-product-related',
|
|
1333
|
-
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",
|
|
1334
|
-
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}"]
|
|
1335
|
-
})
|
|
1336
|
-
], ProductRelatedComponent);
|
|
1337
|
-
return ProductRelatedComponent;
|
|
1338
|
-
}());
|
|
1339
|
-
|
|
1340
|
-
var HeaderComponent = /** @class */ (function () {
|
|
1341
|
-
function HeaderComponent() {
|
|
1342
|
-
}
|
|
1343
|
-
HeaderComponent.prototype.ngOnInit = function () {
|
|
1344
|
-
};
|
|
1587
|
+
HostListener('window:resize')
|
|
1588
|
+
], ImageCarouselComponent.prototype, "handleWindowResize", null);
|
|
1345
1589
|
__decorate([
|
|
1346
|
-
|
|
1347
|
-
],
|
|
1590
|
+
HostListener('swipeleft')
|
|
1591
|
+
], ImageCarouselComponent.prototype, "gotoNextSlide", null);
|
|
1348
1592
|
__decorate([
|
|
1349
|
-
|
|
1350
|
-
],
|
|
1351
|
-
|
|
1593
|
+
HostListener('swiperight')
|
|
1594
|
+
], ImageCarouselComponent.prototype, "gotoPrevSlide", null);
|
|
1595
|
+
__decorate([
|
|
1596
|
+
HostBinding('class.resizing')
|
|
1597
|
+
], ImageCarouselComponent.prototype, "resizing", void 0);
|
|
1598
|
+
ImageCarouselComponent = __decorate([
|
|
1352
1599
|
Component({
|
|
1353
|
-
selector: 'app-
|
|
1354
|
-
template: "<
|
|
1355
|
-
styles: [".
|
|
1600
|
+
selector: 'app-image-carousel',
|
|
1601
|
+
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",
|
|
1602
|
+
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)}}"]
|
|
1356
1603
|
})
|
|
1357
|
-
],
|
|
1358
|
-
return
|
|
1604
|
+
], ImageCarouselComponent);
|
|
1605
|
+
return ImageCarouselComponent;
|
|
1359
1606
|
}());
|
|
1360
1607
|
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1363
|
-
TabType["Additional"] = "additional";
|
|
1364
|
-
TabType["Properties"] = "properties";
|
|
1365
|
-
})(TabType || (TabType = {}));
|
|
1366
|
-
var ProductInfoComponent = /** @class */ (function () {
|
|
1367
|
-
function ProductInfoComponent() {
|
|
1368
|
-
this.tabType = TabType;
|
|
1369
|
-
this.currentTab = TabType.Additional;
|
|
1608
|
+
var ProductDescriptionComponent = /** @class */ (function () {
|
|
1609
|
+
function ProductDescriptionComponent() {
|
|
1370
1610
|
}
|
|
1371
|
-
|
|
1372
|
-
};
|
|
1373
|
-
ProductInfoComponent.prototype.switchTab = function (tab) {
|
|
1374
|
-
this.currentTab = tab;
|
|
1611
|
+
ProductDescriptionComponent.prototype.ngOnInit = function () {
|
|
1375
1612
|
};
|
|
1376
1613
|
__decorate([
|
|
1377
1614
|
Input()
|
|
1378
|
-
],
|
|
1379
|
-
|
|
1615
|
+
], ProductDescriptionComponent.prototype, "article", void 0);
|
|
1616
|
+
ProductDescriptionComponent = __decorate([
|
|
1380
1617
|
Component({
|
|
1381
|
-
selector: 'app-product-
|
|
1382
|
-
template: "<div
|
|
1383
|
-
|
|
1384
|
-
trigger('showContent', [
|
|
1385
|
-
state('void', style({ 'opacity': '0' })),
|
|
1386
|
-
state('*', style({ 'opacity': '1' })),
|
|
1387
|
-
transition('void => *', animate('200ms 100ms ease-in-out')),
|
|
1388
|
-
])
|
|
1389
|
-
],
|
|
1390
|
-
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}"]
|
|
1391
|
-
})
|
|
1392
|
-
], ProductInfoComponent);
|
|
1393
|
-
return ProductInfoComponent;
|
|
1394
|
-
}());
|
|
1395
|
-
|
|
1396
|
-
var ProductModuleService = /** @class */ (function () {
|
|
1397
|
-
function ProductModuleService(_iOneConnectorService) {
|
|
1398
|
-
this._iOneConnectorService = _iOneConnectorService;
|
|
1399
|
-
this._superArticles = new Map();
|
|
1400
|
-
}
|
|
1401
|
-
ProductModuleService.prototype.getArticle = function (id) {
|
|
1402
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1403
|
-
return __generator(this, function (_a) {
|
|
1404
|
-
switch (_a.label) {
|
|
1405
|
-
case 0: return [4 /*yield*/, this._getArticle(id)];
|
|
1406
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
1407
|
-
}
|
|
1408
|
-
});
|
|
1409
|
-
});
|
|
1410
|
-
};
|
|
1411
|
-
ProductModuleService.prototype._getArticle = function (id) {
|
|
1412
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1413
|
-
var mainArticle;
|
|
1414
|
-
return __generator(this, function (_a) {
|
|
1415
|
-
switch (_a.label) {
|
|
1416
|
-
case 0:
|
|
1417
|
-
if (!this._superArticles.has(id)) return [3 /*break*/, 1];
|
|
1418
|
-
return [2 /*return*/, this._superArticles.get(id)];
|
|
1419
|
-
case 1: return [4 /*yield*/, this._iOneConnectorService.getSuperArticle(id)];
|
|
1420
|
-
case 2:
|
|
1421
|
-
mainArticle = _a.sent();
|
|
1422
|
-
this._superArticles.set(id, mainArticle);
|
|
1423
|
-
return [2 /*return*/, mainArticle];
|
|
1424
|
-
}
|
|
1425
|
-
});
|
|
1426
|
-
});
|
|
1427
|
-
};
|
|
1428
|
-
ProductModuleService.ctorParameters = function () { return [
|
|
1429
|
-
{ type: ProductConnectorService }
|
|
1430
|
-
]; };
|
|
1431
|
-
ProductModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
|
|
1432
|
-
ProductModuleService = __decorate([
|
|
1433
|
-
Injectable({
|
|
1434
|
-
providedIn: 'root'
|
|
1618
|
+
selector: 'app-product-description',
|
|
1619
|
+
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",
|
|
1620
|
+
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}}"]
|
|
1435
1621
|
})
|
|
1436
|
-
],
|
|
1437
|
-
return
|
|
1622
|
+
], ProductDescriptionComponent);
|
|
1623
|
+
return ProductDescriptionComponent;
|
|
1438
1624
|
}());
|
|
1439
1625
|
|
|
1440
1626
|
var BitUtils = /** @class */ (function () {
|
|
@@ -1458,416 +1644,151 @@ var BitUtils = /** @class */ (function () {
|
|
|
1458
1644
|
return BitUtils;
|
|
1459
1645
|
}());
|
|
1460
1646
|
|
|
1461
|
-
var
|
|
1462
|
-
function
|
|
1463
|
-
this.
|
|
1464
|
-
this._moduleService = _moduleService;
|
|
1465
|
-
this._changeDetector = _changeDetector;
|
|
1466
|
-
this.showLabel = false;
|
|
1467
|
-
this.textParts = [];
|
|
1647
|
+
var ProductAdditionalDescriptionComponent = /** @class */ (function () {
|
|
1648
|
+
function ProductAdditionalDescriptionComponent(_appEventService) {
|
|
1649
|
+
this._appEventService = _appEventService;
|
|
1468
1650
|
}
|
|
1469
|
-
Object.defineProperty(
|
|
1651
|
+
Object.defineProperty(ProductAdditionalDescriptionComponent.prototype, "article", {
|
|
1470
1652
|
get: function () {
|
|
1471
1653
|
return this._article;
|
|
1472
1654
|
},
|
|
1473
1655
|
set: function (value) {
|
|
1474
|
-
|
|
1475
|
-
if (
|
|
1476
|
-
this.
|
|
1477
|
-
this.
|
|
1478
|
-
_this._changeDetector.detectChanges();
|
|
1479
|
-
});
|
|
1656
|
+
this._article = value;
|
|
1657
|
+
if (this._article) {
|
|
1658
|
+
this.description = this.article.additionalDescription;
|
|
1659
|
+
this._prepareDescription();
|
|
1480
1660
|
}
|
|
1481
1661
|
},
|
|
1482
1662
|
enumerable: true,
|
|
1483
1663
|
configurable: true
|
|
1484
1664
|
});
|
|
1485
|
-
|
|
1486
|
-
};
|
|
1487
|
-
ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
|
|
1488
|
-
var _this = this;
|
|
1489
|
-
return new Promise(function (resolve, reject) {
|
|
1490
|
-
var texts = [];
|
|
1491
|
-
if (_this.article.superArticleNr) {
|
|
1492
|
-
_this._moduleService.getArticle(_this.article.superArticleNr).then(function (mainArticle) {
|
|
1493
|
-
mainArticle.texts.forEach(function (txt) {
|
|
1494
|
-
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
1495
|
-
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
1496
|
-
texts.push(safeTxt);
|
|
1497
|
-
}
|
|
1498
|
-
});
|
|
1499
|
-
resolve(texts);
|
|
1500
|
-
}).catch(function () {
|
|
1501
|
-
resolve([]);
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
else {
|
|
1505
|
-
resolve(texts);
|
|
1506
|
-
}
|
|
1507
|
-
});
|
|
1665
|
+
ProductAdditionalDescriptionComponent.prototype.ngOnInit = function () {
|
|
1508
1666
|
};
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
var texts;
|
|
1512
|
-
var _a;
|
|
1513
|
-
var _this = this;
|
|
1514
|
-
return __generator(this, function (_b) {
|
|
1515
|
-
switch (_b.label) {
|
|
1516
|
-
case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
|
|
1517
|
-
case 1:
|
|
1518
|
-
texts = _b.sent();
|
|
1519
|
-
if (texts.length > 0) {
|
|
1520
|
-
(_a = this.textParts).push.apply(_a, __spread(texts));
|
|
1521
|
-
}
|
|
1522
|
-
if (this.article.texts) {
|
|
1523
|
-
this.article.texts.forEach(function (txt) {
|
|
1524
|
-
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
1525
|
-
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
1526
|
-
_this.textParts.push(safeTxt);
|
|
1527
|
-
}
|
|
1528
|
-
});
|
|
1529
|
-
}
|
|
1530
|
-
return [2 /*return*/];
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
});
|
|
1667
|
+
ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
|
|
1668
|
+
this._appEventService.onUpdateProductInfoTab.next(0);
|
|
1534
1669
|
};
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
case 1:
|
|
1543
|
-
_a.sent();
|
|
1544
|
-
if (this.textParts.length === 0) {
|
|
1545
|
-
if (this.article.additionalDescription) {
|
|
1546
|
-
this.textParts.push(this.article.additionalDescription);
|
|
1547
|
-
}
|
|
1548
|
-
else if (this.article.description) {
|
|
1549
|
-
this.textParts.push(this.article.description);
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
return [2 /*return*/];
|
|
1670
|
+
ProductAdditionalDescriptionComponent.prototype._prepareDescription = function () {
|
|
1671
|
+
var _this = this;
|
|
1672
|
+
this.description = '';
|
|
1673
|
+
if (this.article.texts && this.article.texts.length > 0) {
|
|
1674
|
+
this.article.texts.forEach(function (txt) {
|
|
1675
|
+
if (BitUtils.IsShortDescription(txt.publication)) {
|
|
1676
|
+
_this.description += txt.text;
|
|
1553
1677
|
}
|
|
1554
1678
|
});
|
|
1555
|
-
|
|
1679
|
+
this.description = this.description.replace(/<[^>]*>?/gm, '');
|
|
1680
|
+
if (this.description.length > 250) {
|
|
1681
|
+
this.description = this.description.substr(0, 250) + ' [..]';
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1556
1684
|
};
|
|
1557
|
-
|
|
1558
|
-
{ type:
|
|
1559
|
-
{ type: ProductModuleService },
|
|
1560
|
-
{ type: ChangeDetectorRef }
|
|
1685
|
+
ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
|
|
1686
|
+
{ type: ProductEventService }
|
|
1561
1687
|
]; };
|
|
1562
1688
|
__decorate([
|
|
1563
1689
|
Input()
|
|
1564
|
-
],
|
|
1565
|
-
__decorate([
|
|
1566
|
-
Input()
|
|
1567
|
-
], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
|
|
1568
|
-
ProductAdditionalInfoComponent = __decorate([
|
|
1690
|
+
], ProductAdditionalDescriptionComponent.prototype, "article", null);
|
|
1691
|
+
ProductAdditionalDescriptionComponent = __decorate([
|
|
1569
1692
|
Component({
|
|
1570
|
-
selector: 'app-product-additional-
|
|
1571
|
-
template: "<
|
|
1572
|
-
styles: [":host{display:block}:host .additional-
|
|
1693
|
+
selector: 'app-product-additional-description',
|
|
1694
|
+
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",
|
|
1695
|
+
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}}"]
|
|
1573
1696
|
})
|
|
1574
|
-
],
|
|
1575
|
-
return
|
|
1697
|
+
], ProductAdditionalDescriptionComponent);
|
|
1698
|
+
return ProductAdditionalDescriptionComponent;
|
|
1576
1699
|
}());
|
|
1577
1700
|
|
|
1578
|
-
var
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
['material', 'MATERIAL'],
|
|
1584
|
-
['title', 'TITLE'],
|
|
1585
|
-
['turnOverGroup', 'TURNOVERGROUP'],
|
|
1586
|
-
['height', 'HEIGHT'],
|
|
1587
|
-
['width', 'WIDTH']
|
|
1588
|
-
]);
|
|
1589
|
-
var ProductPropertiesComponent = /** @class */ (function () {
|
|
1590
|
-
function ProductPropertiesComponent() {
|
|
1591
|
-
this.showLabel = false;
|
|
1592
|
-
this.properties = [];
|
|
1701
|
+
var ProductPriceComponent = /** @class */ (function () {
|
|
1702
|
+
function ProductPriceComponent(_changeDetector) {
|
|
1703
|
+
this._changeDetector = _changeDetector;
|
|
1704
|
+
this.showFromPrice = false;
|
|
1705
|
+
this._configurable = false;
|
|
1593
1706
|
}
|
|
1594
|
-
Object.defineProperty(
|
|
1707
|
+
Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
|
|
1595
1708
|
get: function () {
|
|
1596
|
-
return this.
|
|
1709
|
+
return this._pricing;
|
|
1597
1710
|
},
|
|
1598
1711
|
set: function (value) {
|
|
1599
|
-
this.
|
|
1600
|
-
this.
|
|
1712
|
+
this._pricing = value;
|
|
1713
|
+
this._setPrices();
|
|
1601
1714
|
},
|
|
1602
1715
|
enumerable: true,
|
|
1603
1716
|
configurable: true
|
|
1604
1717
|
});
|
|
1605
|
-
|
|
1718
|
+
Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
|
|
1719
|
+
set: function (value) {
|
|
1720
|
+
this._configurable = value;
|
|
1721
|
+
this._setPrices();
|
|
1722
|
+
},
|
|
1723
|
+
enumerable: true,
|
|
1724
|
+
configurable: true
|
|
1725
|
+
});
|
|
1726
|
+
ProductPriceComponent.prototype.ngOnInit = function () {
|
|
1606
1727
|
};
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
if (_this.article.hasOwnProperty(key)) {
|
|
1615
|
-
_this.properties.push({ key: value, value: _this.article[key] });
|
|
1728
|
+
ProductPriceComponent.prototype._setPrices = function () {
|
|
1729
|
+
if (this._pricing) {
|
|
1730
|
+
this.valutaSign = this._getSign(this._pricing.retailCurrency);
|
|
1731
|
+
if (this._configurable) {
|
|
1732
|
+
this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
|
|
1733
|
+
this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
|
|
1734
|
+
this.toPrice = undefined;
|
|
1616
1735
|
}
|
|
1617
|
-
|
|
1736
|
+
else {
|
|
1737
|
+
this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
|
|
1738
|
+
this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
|
|
1739
|
+
this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
|
|
1740
|
+
this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
|
|
1741
|
+
}
|
|
1742
|
+
this._changeDetector.detectChanges();
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
ProductPriceComponent.prototype._getSign = function (currency) {
|
|
1746
|
+
switch (currency) {
|
|
1747
|
+
case 'EUR':
|
|
1748
|
+
return '€';
|
|
1749
|
+
default:
|
|
1750
|
+
return '€';
|
|
1751
|
+
}
|
|
1618
1752
|
};
|
|
1753
|
+
ProductPriceComponent.ctorParameters = function () { return [
|
|
1754
|
+
{ type: ChangeDetectorRef }
|
|
1755
|
+
]; };
|
|
1619
1756
|
__decorate([
|
|
1620
1757
|
Input()
|
|
1621
|
-
],
|
|
1758
|
+
], ProductPriceComponent.prototype, "pricing", null);
|
|
1622
1759
|
__decorate([
|
|
1623
1760
|
Input()
|
|
1624
|
-
],
|
|
1625
|
-
|
|
1761
|
+
], ProductPriceComponent.prototype, "configurable", null);
|
|
1762
|
+
ProductPriceComponent = __decorate([
|
|
1626
1763
|
Component({
|
|
1627
|
-
selector: 'app-product-
|
|
1628
|
-
template: "<div
|
|
1629
|
-
styles: [":host{display:
|
|
1630
|
-
})
|
|
1631
|
-
], ProductPropertiesComponent);
|
|
1632
|
-
return ProductPropertiesComponent;
|
|
1633
|
-
}());
|
|
1634
|
-
|
|
1635
|
-
var LocalizePipe = /** @class */ (function () {
|
|
1636
|
-
function LocalizePipe(_dictionaryService) {
|
|
1637
|
-
this._dictionaryService = _dictionaryService;
|
|
1638
|
-
}
|
|
1639
|
-
LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
|
|
1640
|
-
var _a;
|
|
1641
|
-
if (upperCaseFirst === void 0) { upperCaseFirst = true; }
|
|
1642
|
-
if (replace === void 0) { replace = []; }
|
|
1643
|
-
if (!value) {
|
|
1644
|
-
return '';
|
|
1645
|
-
}
|
|
1646
|
-
replace = replace ? replace : [];
|
|
1647
|
-
if (!Array.isArray(replace)) {
|
|
1648
|
-
replace = [replace];
|
|
1649
|
-
}
|
|
1650
|
-
return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
|
|
1651
|
-
};
|
|
1652
|
-
LocalizePipe.ctorParameters = function () { return [
|
|
1653
|
-
{ type: DictionaryService }
|
|
1654
|
-
]; };
|
|
1655
|
-
LocalizePipe = __decorate([
|
|
1656
|
-
Pipe({
|
|
1657
|
-
name: 'localize'
|
|
1764
|
+
selector: 'app-product-price',
|
|
1765
|
+
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",
|
|
1766
|
+
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}}"]
|
|
1658
1767
|
})
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
return LocalizePipe;
|
|
1768
|
+
], ProductPriceComponent);
|
|
1769
|
+
return ProductPriceComponent;
|
|
1662
1770
|
}());
|
|
1663
1771
|
|
|
1664
|
-
var
|
|
1665
|
-
function
|
|
1666
|
-
this.
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1772
|
+
var ProductAddtocartComponent = /** @class */ (function () {
|
|
1773
|
+
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
1774
|
+
this.iconCache = iconCache;
|
|
1775
|
+
this._ioneControllerService = _ioneControllerService;
|
|
1776
|
+
this._appEventService = _appEventService;
|
|
1777
|
+
this._settingsService = _settingsService;
|
|
1669
1778
|
this.icon = IconEnum;
|
|
1670
|
-
this.
|
|
1779
|
+
this.configurable = false;
|
|
1780
|
+
this.configuring = false;
|
|
1781
|
+
this.fullscreen = false;
|
|
1782
|
+
this.startConfiguration = new EventEmitter();
|
|
1783
|
+
this.addToCartClick = new EventEmitter();
|
|
1784
|
+
this.addToQuoteClick = new EventEmitter();
|
|
1785
|
+
this.showQuoteButton = false;
|
|
1786
|
+
this._quantity = 1;
|
|
1671
1787
|
}
|
|
1672
|
-
Object.defineProperty(
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
|
|
1677
|
-
this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
},
|
|
1681
|
-
enumerable: true,
|
|
1682
|
-
configurable: true
|
|
1683
|
-
});
|
|
1684
|
-
ProductDeliveryComponent.prototype.ngOnInit = function () {
|
|
1685
|
-
};
|
|
1686
|
-
ProductDeliveryComponent.ctorParameters = function () { return [
|
|
1687
|
-
{ type: LocalizePipe },
|
|
1688
|
-
{ type: ProductConnectorService },
|
|
1689
|
-
{ type: IconCacheService }
|
|
1690
|
-
]; };
|
|
1691
|
-
__decorate([
|
|
1692
|
-
Input()
|
|
1693
|
-
], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
|
|
1694
|
-
ProductDeliveryComponent = __decorate([
|
|
1695
|
-
Component({
|
|
1696
|
-
selector: 'app-product-delivery',
|
|
1697
|
-
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",
|
|
1698
|
-
providers: [LocalizePipe],
|
|
1699
|
-
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}}"]
|
|
1700
|
-
})
|
|
1701
|
-
], ProductDeliveryComponent);
|
|
1702
|
-
return ProductDeliveryComponent;
|
|
1703
|
-
}());
|
|
1704
|
-
|
|
1705
|
-
var ProductStockComponent = /** @class */ (function () {
|
|
1706
|
-
function ProductStockComponent(_iOne, _iconCache) {
|
|
1707
|
-
this._iOne = _iOne;
|
|
1708
|
-
this._iconCache = _iconCache;
|
|
1709
|
-
this.icon = IconEnum;
|
|
1710
|
-
this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
|
|
1711
|
-
}
|
|
1712
|
-
Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
|
|
1713
|
-
set: function (value) {
|
|
1714
|
-
if (value) {
|
|
1715
|
-
this.numberInStock = value.stock;
|
|
1716
|
-
}
|
|
1717
|
-
},
|
|
1718
|
-
enumerable: true,
|
|
1719
|
-
configurable: true
|
|
1720
|
-
});
|
|
1721
|
-
ProductStockComponent.prototype.ngOnInit = function () {
|
|
1722
|
-
};
|
|
1723
|
-
ProductStockComponent.ctorParameters = function () { return [
|
|
1724
|
-
{ type: ProductConnectorService },
|
|
1725
|
-
{ type: IconCacheService }
|
|
1726
|
-
]; };
|
|
1727
|
-
__decorate([
|
|
1728
|
-
Input()
|
|
1729
|
-
], ProductStockComponent.prototype, "stockAndDelivery", null);
|
|
1730
|
-
ProductStockComponent = __decorate([
|
|
1731
|
-
Component({
|
|
1732
|
-
selector: 'app-product-stock',
|
|
1733
|
-
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",
|
|
1734
|
-
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}}"]
|
|
1735
|
-
})
|
|
1736
|
-
], ProductStockComponent);
|
|
1737
|
-
return ProductStockComponent;
|
|
1738
|
-
}());
|
|
1739
|
-
|
|
1740
|
-
var ProductSymbolsComponent = /** @class */ (function () {
|
|
1741
|
-
function ProductSymbolsComponent() {
|
|
1742
|
-
this.symbolStrings = [];
|
|
1743
|
-
}
|
|
1744
|
-
Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
|
|
1745
|
-
get: function () {
|
|
1746
|
-
return this._symbols;
|
|
1747
|
-
},
|
|
1748
|
-
set: function (value) {
|
|
1749
|
-
this._symbols = value;
|
|
1750
|
-
if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
|
|
1751
|
-
this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
|
|
1752
|
-
}
|
|
1753
|
-
if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
|
|
1754
|
-
for (var i = 0; i < this._symbols['symbolString'].length; i++) {
|
|
1755
|
-
this.symbolStrings.push(this._symbols['symbolString'][i]);
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
},
|
|
1759
|
-
enumerable: true,
|
|
1760
|
-
configurable: true
|
|
1761
|
-
});
|
|
1762
|
-
ProductSymbolsComponent.prototype.ngOnInit = function () {
|
|
1763
|
-
};
|
|
1764
|
-
__decorate([
|
|
1765
|
-
Input()
|
|
1766
|
-
], ProductSymbolsComponent.prototype, "symbols", null);
|
|
1767
|
-
__decorate([
|
|
1768
|
-
HostBinding('class')
|
|
1769
|
-
], ProductSymbolsComponent.prototype, "_className", void 0);
|
|
1770
|
-
ProductSymbolsComponent = __decorate([
|
|
1771
|
-
Component({
|
|
1772
|
-
selector: 'app-product-symbols',
|
|
1773
|
-
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",
|
|
1774
|
-
styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
|
|
1775
|
-
})
|
|
1776
|
-
], ProductSymbolsComponent);
|
|
1777
|
-
return ProductSymbolsComponent;
|
|
1778
|
-
}());
|
|
1779
|
-
|
|
1780
|
-
var ProductPriceComponent = /** @class */ (function () {
|
|
1781
|
-
function ProductPriceComponent(_changeDetector) {
|
|
1782
|
-
this._changeDetector = _changeDetector;
|
|
1783
|
-
this.showFromPrice = false;
|
|
1784
|
-
this._configurable = false;
|
|
1785
|
-
}
|
|
1786
|
-
Object.defineProperty(ProductPriceComponent.prototype, "pricing", {
|
|
1787
|
-
get: function () {
|
|
1788
|
-
return this._pricing;
|
|
1789
|
-
},
|
|
1790
|
-
set: function (value) {
|
|
1791
|
-
this._pricing = value;
|
|
1792
|
-
this._setPrices();
|
|
1793
|
-
},
|
|
1794
|
-
enumerable: true,
|
|
1795
|
-
configurable: true
|
|
1796
|
-
});
|
|
1797
|
-
Object.defineProperty(ProductPriceComponent.prototype, "configurable", {
|
|
1798
|
-
set: function (value) {
|
|
1799
|
-
this._configurable = value;
|
|
1800
|
-
this._setPrices();
|
|
1801
|
-
},
|
|
1802
|
-
enumerable: true,
|
|
1803
|
-
configurable: true
|
|
1804
|
-
});
|
|
1805
|
-
ProductPriceComponent.prototype.ngOnInit = function () {
|
|
1806
|
-
};
|
|
1807
|
-
ProductPriceComponent.prototype._setPrices = function () {
|
|
1808
|
-
if (this._pricing) {
|
|
1809
|
-
this.valutaSign = this._getSign(this._pricing.retailCurrency);
|
|
1810
|
-
if (this._configurable) {
|
|
1811
|
-
this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
|
|
1812
|
-
this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
|
|
1813
|
-
this.toPrice = undefined;
|
|
1814
|
-
}
|
|
1815
|
-
else {
|
|
1816
|
-
this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
|
|
1817
|
-
this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
|
|
1818
|
-
this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
|
|
1819
|
-
this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
|
|
1820
|
-
}
|
|
1821
|
-
this._changeDetector.detectChanges();
|
|
1822
|
-
}
|
|
1823
|
-
};
|
|
1824
|
-
ProductPriceComponent.prototype._getSign = function (currency) {
|
|
1825
|
-
switch (currency) {
|
|
1826
|
-
case 'EUR':
|
|
1827
|
-
return '€';
|
|
1828
|
-
default:
|
|
1829
|
-
return '€';
|
|
1830
|
-
}
|
|
1831
|
-
};
|
|
1832
|
-
ProductPriceComponent.ctorParameters = function () { return [
|
|
1833
|
-
{ type: ChangeDetectorRef }
|
|
1834
|
-
]; };
|
|
1835
|
-
__decorate([
|
|
1836
|
-
Input()
|
|
1837
|
-
], ProductPriceComponent.prototype, "pricing", null);
|
|
1838
|
-
__decorate([
|
|
1839
|
-
Input()
|
|
1840
|
-
], ProductPriceComponent.prototype, "configurable", null);
|
|
1841
|
-
ProductPriceComponent = __decorate([
|
|
1842
|
-
Component({
|
|
1843
|
-
selector: 'app-product-price',
|
|
1844
|
-
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",
|
|
1845
|
-
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}}"]
|
|
1846
|
-
})
|
|
1847
|
-
], ProductPriceComponent);
|
|
1848
|
-
return ProductPriceComponent;
|
|
1849
|
-
}());
|
|
1850
|
-
|
|
1851
|
-
var ProductAddtocartComponent = /** @class */ (function () {
|
|
1852
|
-
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
1853
|
-
this.iconCache = iconCache;
|
|
1854
|
-
this._ioneControllerService = _ioneControllerService;
|
|
1855
|
-
this._appEventService = _appEventService;
|
|
1856
|
-
this._settingsService = _settingsService;
|
|
1857
|
-
this.icon = IconEnum;
|
|
1858
|
-
this.configurable = false;
|
|
1859
|
-
this.configuring = false;
|
|
1860
|
-
this.fullscreen = false;
|
|
1861
|
-
this.startConfiguration = new EventEmitter();
|
|
1862
|
-
this.addToCartClick = new EventEmitter();
|
|
1863
|
-
this.addToQuoteClick = new EventEmitter();
|
|
1864
|
-
this.showQuoteButton = false;
|
|
1865
|
-
this._quantity = 1;
|
|
1866
|
-
}
|
|
1867
|
-
Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
|
|
1868
|
-
get: function () {
|
|
1869
|
-
return this._quantity;
|
|
1870
|
-
},
|
|
1788
|
+
Object.defineProperty(ProductAddtocartComponent.prototype, "quantity", {
|
|
1789
|
+
get: function () {
|
|
1790
|
+
return this._quantity;
|
|
1791
|
+
},
|
|
1871
1792
|
set: function (value) {
|
|
1872
1793
|
this._quantity = Math.max(1, value);
|
|
1873
1794
|
},
|
|
@@ -1922,7 +1843,7 @@ var ProductAddtocartComponent = /** @class */ (function () {
|
|
|
1922
1843
|
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
1923
1844
|
configuratorStatistics.webHost = window.location.host;
|
|
1924
1845
|
configuratorStatistics.bundleHost = window.location.host;
|
|
1925
|
-
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true,
|
|
1846
|
+
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, configuratorStatistics)];
|
|
1926
1847
|
case 1: return [2 /*return*/, _a.sent()];
|
|
1927
1848
|
}
|
|
1928
1849
|
});
|
|
@@ -1972,374 +1893,671 @@ var ProductAddtocartComponent = /** @class */ (function () {
|
|
|
1972
1893
|
return ProductAddtocartComponent;
|
|
1973
1894
|
}());
|
|
1974
1895
|
|
|
1975
|
-
var
|
|
1976
|
-
function
|
|
1977
|
-
this.
|
|
1978
|
-
this.
|
|
1979
|
-
this.
|
|
1980
|
-
this.
|
|
1981
|
-
this.onIconClick = new EventEmitter();
|
|
1982
|
-
this.currentTypeChange = new EventEmitter();
|
|
1983
|
-
this.twoDIcon = this._iconCache.getIcon(this.icons.TwoD);
|
|
1984
|
-
this.threeDIcon = this._iconCache.getIcon(this.icons.ThreeD);
|
|
1896
|
+
var ProductRelatedComponent = /** @class */ (function () {
|
|
1897
|
+
function ProductRelatedComponent(_iOne, _appEventService) {
|
|
1898
|
+
this._iOne = _iOne;
|
|
1899
|
+
this._appEventService = _appEventService;
|
|
1900
|
+
this.isSmallModus = true;
|
|
1901
|
+
this._articles = [];
|
|
1985
1902
|
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1903
|
+
Object.defineProperty(ProductRelatedComponent.prototype, "articles", {
|
|
1904
|
+
get: function () {
|
|
1905
|
+
return this._articles;
|
|
1906
|
+
},
|
|
1907
|
+
set: function (value) {
|
|
1908
|
+
var _this = this;
|
|
1909
|
+
if (value) {
|
|
1910
|
+
if (this.refType && this.refType !== undefined) {
|
|
1911
|
+
if (value.length > 0) {
|
|
1912
|
+
value.forEach(function (x) {
|
|
1913
|
+
if (x.refType === _this.refType) {
|
|
1914
|
+
_this._articles.push(x);
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
else {
|
|
1920
|
+
this._articles = value;
|
|
1921
|
+
}
|
|
1922
|
+
this._loadImages();
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
enumerable: true,
|
|
1926
|
+
configurable: true
|
|
1927
|
+
});
|
|
1928
|
+
ProductRelatedComponent.prototype.handleContentClick = function (article) {
|
|
1929
|
+
this._appEventService.onAlternativeClick.next(article);
|
|
1993
1930
|
};
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
1931
|
+
ProductRelatedComponent.prototype._loadImages = function () {
|
|
1932
|
+
var _this = this;
|
|
1933
|
+
this._articles.forEach(function (a) {
|
|
1934
|
+
if (!a.image.documentBody) {
|
|
1935
|
+
_this._iOne.getDocumentContent(a.image.documentId).then(function (content) {
|
|
1936
|
+
if (content) {
|
|
1937
|
+
a.image.documentBody = content.documentContent;
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1942
|
+
};
|
|
1943
|
+
ProductRelatedComponent.ctorParameters = function () { return [
|
|
1944
|
+
{ type: ProductConnectorService },
|
|
1945
|
+
{ type: ProductEventService }
|
|
1946
|
+
]; };
|
|
2004
1947
|
__decorate([
|
|
2005
1948
|
Input()
|
|
2006
|
-
],
|
|
1949
|
+
], ProductRelatedComponent.prototype, "refType", void 0);
|
|
2007
1950
|
__decorate([
|
|
2008
|
-
|
|
2009
|
-
],
|
|
1951
|
+
Input()
|
|
1952
|
+
], ProductRelatedComponent.prototype, "label", void 0);
|
|
2010
1953
|
__decorate([
|
|
2011
|
-
|
|
2012
|
-
],
|
|
2013
|
-
|
|
1954
|
+
Input()
|
|
1955
|
+
], ProductRelatedComponent.prototype, "isSmallModus", void 0);
|
|
1956
|
+
__decorate([
|
|
1957
|
+
Input()
|
|
1958
|
+
], ProductRelatedComponent.prototype, "articles", null);
|
|
1959
|
+
ProductRelatedComponent = __decorate([
|
|
2014
1960
|
Component({
|
|
2015
|
-
selector: 'app-product-
|
|
2016
|
-
template: "<div *ngIf=\"
|
|
2017
|
-
styles: [":host{display:flex;flex-direction:row;
|
|
1961
|
+
selector: 'app-product-related',
|
|
1962
|
+
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",
|
|
1963
|
+
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}"]
|
|
2018
1964
|
})
|
|
2019
|
-
],
|
|
2020
|
-
return
|
|
1965
|
+
], ProductRelatedComponent);
|
|
1966
|
+
return ProductRelatedComponent;
|
|
2021
1967
|
}());
|
|
2022
1968
|
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
// this.sku = '104';
|
|
2030
|
-
// this.sku = '1000561986';
|
|
2031
|
-
var _this = this;
|
|
2032
|
-
this._dictionary = _dictionary;
|
|
2033
|
-
this._jsonUtils = _jsonUtils;
|
|
2034
|
-
this._ione = _ione;
|
|
2035
|
-
this._changeDetector = _changeDetector;
|
|
2036
|
-
this._appEventService = _appEventService;
|
|
2037
|
-
this._settingsService = _settingsService;
|
|
2038
|
-
this.onAddToCart = new EventEmitter();
|
|
2039
|
-
this.forceRenderImage = new EventEmitter();
|
|
2040
|
-
this.onAlternativeClick = new EventEmitter();
|
|
2041
|
-
this.onArticleInfoReceived = new EventEmitter();
|
|
2042
|
-
this.onArticleReceived = new EventEmitter();
|
|
2043
|
-
this.onSelectionsReceived = new EventEmitter();
|
|
2044
|
-
this.onAddToQuote = new EventEmitter();
|
|
2045
|
-
this.upAndLoaded = false;
|
|
2046
|
-
this._subs = [];
|
|
2047
|
-
this._subs.push(this._settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }),
|
|
2048
|
-
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
2049
|
-
this._appEventService.onAddToCart.subscribe(function (json) { return _this.onAddToCart.emit(json); }), this._appEventService.onAddToQuote.subscribe(function (json) { return _this.onAddToQuote.emit(json); }), this._appEventService.onAlternativeClick.subscribe(function (article) { return _this.onAlternativeClick.emit(article); }), this._appEventService.onArticleInfoReceived.subscribe(function (info) { return _this._handleAnswerInfoReceived(info); }), this._appEventService.onArticleReceived.subscribe(function (article) { return _this.onArticleReceived.emit(article); }), this._appEventService.onSelectionsReceived.subscribe(function (selections) { return _this.onSelectionsReceived.emit(selections); }));
|
|
1969
|
+
var ProductStockComponent = /** @class */ (function () {
|
|
1970
|
+
function ProductStockComponent(_iOne, _iconCache) {
|
|
1971
|
+
this._iOne = _iOne;
|
|
1972
|
+
this._iconCache = _iconCache;
|
|
1973
|
+
this.icon = IconEnum;
|
|
1974
|
+
this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
|
|
2050
1975
|
}
|
|
2051
|
-
Object.defineProperty(
|
|
2052
|
-
|
|
2053
|
-
|
|
1976
|
+
Object.defineProperty(ProductStockComponent.prototype, "stockAndDelivery", {
|
|
1977
|
+
set: function (value) {
|
|
1978
|
+
if (value) {
|
|
1979
|
+
this.numberInStock = value.stock;
|
|
1980
|
+
}
|
|
2054
1981
|
},
|
|
1982
|
+
enumerable: true,
|
|
1983
|
+
configurable: true
|
|
1984
|
+
});
|
|
1985
|
+
ProductStockComponent.prototype.ngOnInit = function () {
|
|
1986
|
+
};
|
|
1987
|
+
ProductStockComponent.ctorParameters = function () { return [
|
|
1988
|
+
{ type: ProductConnectorService },
|
|
1989
|
+
{ type: IconCacheService }
|
|
1990
|
+
]; };
|
|
1991
|
+
__decorate([
|
|
1992
|
+
Input()
|
|
1993
|
+
], ProductStockComponent.prototype, "stockAndDelivery", null);
|
|
1994
|
+
ProductStockComponent = __decorate([
|
|
1995
|
+
Component({
|
|
1996
|
+
selector: 'app-product-stock',
|
|
1997
|
+
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",
|
|
1998
|
+
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}}"]
|
|
1999
|
+
})
|
|
2000
|
+
], ProductStockComponent);
|
|
2001
|
+
return ProductStockComponent;
|
|
2002
|
+
}());
|
|
2003
|
+
|
|
2004
|
+
var LocalizePipe = /** @class */ (function () {
|
|
2005
|
+
function LocalizePipe(_dictionaryService) {
|
|
2006
|
+
this._dictionaryService = _dictionaryService;
|
|
2007
|
+
}
|
|
2008
|
+
LocalizePipe.prototype.transform = function (value, upperCaseFirst, replace) {
|
|
2009
|
+
var _a;
|
|
2010
|
+
if (upperCaseFirst === void 0) { upperCaseFirst = true; }
|
|
2011
|
+
if (replace === void 0) { replace = []; }
|
|
2012
|
+
if (!value) {
|
|
2013
|
+
return '';
|
|
2014
|
+
}
|
|
2015
|
+
replace = replace ? replace : [];
|
|
2016
|
+
if (!Array.isArray(replace)) {
|
|
2017
|
+
replace = [replace];
|
|
2018
|
+
}
|
|
2019
|
+
return (_a = this._dictionaryService).get.apply(_a, __spread([value, upperCaseFirst], replace));
|
|
2020
|
+
};
|
|
2021
|
+
LocalizePipe.ctorParameters = function () { return [
|
|
2022
|
+
{ type: DictionaryService }
|
|
2023
|
+
]; };
|
|
2024
|
+
LocalizePipe = __decorate([
|
|
2025
|
+
Pipe({
|
|
2026
|
+
name: 'localize'
|
|
2027
|
+
})
|
|
2028
|
+
// A pipe for localizing string values in view templates.
|
|
2029
|
+
], LocalizePipe);
|
|
2030
|
+
return LocalizePipe;
|
|
2031
|
+
}());
|
|
2032
|
+
|
|
2033
|
+
var ProductDeliveryComponent = /** @class */ (function () {
|
|
2034
|
+
function ProductDeliveryComponent(_localizePipe, _iOne, _iconCache) {
|
|
2035
|
+
this._localizePipe = _localizePipe;
|
|
2036
|
+
this._iOne = _iOne;
|
|
2037
|
+
this._iconCache = _iconCache;
|
|
2038
|
+
this.icon = IconEnum;
|
|
2039
|
+
this.iconData = this._iconCache.getIcon(this.icon.Truck);
|
|
2040
|
+
}
|
|
2041
|
+
Object.defineProperty(ProductDeliveryComponent.prototype, "stockAndDelivery", {
|
|
2055
2042
|
set: function (value) {
|
|
2056
2043
|
if (value) {
|
|
2057
|
-
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2060
|
-
}
|
|
2061
|
-
else {
|
|
2062
|
-
settings = value;
|
|
2044
|
+
this.deliveryDescription = value.deliveryDescription;
|
|
2045
|
+
if (this.deliveryDescription.length > 0 && this.deliveryDescription[0] === ' ') {
|
|
2046
|
+
this.deliveryDescription = this._localizePipe.transform('ASK_FOR_INFORMATION');
|
|
2063
2047
|
}
|
|
2064
|
-
this._settingsService.createSettingsFromObject(settings);
|
|
2065
|
-
// this._initConnection(settings);
|
|
2066
2048
|
}
|
|
2067
2049
|
},
|
|
2068
2050
|
enumerable: true,
|
|
2069
2051
|
configurable: true
|
|
2070
2052
|
});
|
|
2071
|
-
|
|
2072
|
-
this._changeDetector.detectChanges();
|
|
2053
|
+
ProductDeliveryComponent.prototype.ngOnInit = function () {
|
|
2073
2054
|
};
|
|
2074
|
-
|
|
2055
|
+
ProductDeliveryComponent.ctorParameters = function () { return [
|
|
2056
|
+
{ type: LocalizePipe },
|
|
2057
|
+
{ type: ProductConnectorService },
|
|
2058
|
+
{ type: IconCacheService }
|
|
2059
|
+
]; };
|
|
2060
|
+
__decorate([
|
|
2061
|
+
Input()
|
|
2062
|
+
], ProductDeliveryComponent.prototype, "stockAndDelivery", null);
|
|
2063
|
+
ProductDeliveryComponent = __decorate([
|
|
2064
|
+
Component({
|
|
2065
|
+
selector: 'app-product-delivery',
|
|
2066
|
+
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",
|
|
2067
|
+
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}}"]
|
|
2068
|
+
})
|
|
2069
|
+
], ProductDeliveryComponent);
|
|
2070
|
+
return ProductDeliveryComponent;
|
|
2071
|
+
}());
|
|
2072
|
+
|
|
2073
|
+
var ProductInfoTabsComponent = /** @class */ (function () {
|
|
2074
|
+
function ProductInfoTabsComponent(_appEventService) {
|
|
2075
|
+
var _this = this;
|
|
2076
|
+
this._appEventService = _appEventService;
|
|
2077
|
+
this.activeTabHeight = 0;
|
|
2078
|
+
this.tabs = [];
|
|
2079
|
+
this._subs = [];
|
|
2080
|
+
this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
|
|
2081
|
+
_this.updateTab(index);
|
|
2082
|
+
_this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
2083
|
+
}));
|
|
2084
|
+
}
|
|
2085
|
+
Object.defineProperty(ProductInfoTabsComponent.prototype, "article", {
|
|
2086
|
+
set: function (value) {
|
|
2087
|
+
if (value) {
|
|
2088
|
+
this.articleObject = value;
|
|
2089
|
+
this._setupTabs();
|
|
2090
|
+
this.updateTab(0);
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
enumerable: true,
|
|
2094
|
+
configurable: true
|
|
2095
|
+
});
|
|
2096
|
+
ProductInfoTabsComponent.prototype.ngOnDestroy = function () {
|
|
2075
2097
|
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
2076
2098
|
};
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
this._initConnection();
|
|
2081
|
-
}
|
|
2099
|
+
ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
|
|
2100
|
+
this.activeTab = tabIndex;
|
|
2101
|
+
this.updateHeight(tabIndex);
|
|
2082
2102
|
};
|
|
2083
|
-
|
|
2084
|
-
this.
|
|
2103
|
+
ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
|
|
2104
|
+
if (this.tabContent.nativeElement.children.length > 0) {
|
|
2105
|
+
if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
|
|
2106
|
+
this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2085
2109
|
};
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
});
|
|
2096
|
-
return [2 /*return*/];
|
|
2097
|
-
});
|
|
2098
|
-
});
|
|
2110
|
+
ProductInfoTabsComponent.prototype._setupTabs = function () {
|
|
2111
|
+
this.tabs.push({ title: 'DESCRIPTION' });
|
|
2112
|
+
this.tabs.push({ title: 'FEATURES' });
|
|
2113
|
+
if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
|
|
2114
|
+
this.tabs.push({ title: 'DOWNLOADS' });
|
|
2115
|
+
}
|
|
2116
|
+
if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
|
|
2117
|
+
this.tabs.push({ title: 'SYMBOLS' });
|
|
2118
|
+
}
|
|
2099
2119
|
};
|
|
2100
|
-
|
|
2101
|
-
{ type:
|
|
2102
|
-
{ type: JsonUtilsService },
|
|
2103
|
-
{ type: ProductConnectorService },
|
|
2104
|
-
{ type: ChangeDetectorRef },
|
|
2105
|
-
{ type: ProductEventService },
|
|
2106
|
-
{ type: ProductSettingsService }
|
|
2120
|
+
ProductInfoTabsComponent.ctorParameters = function () { return [
|
|
2121
|
+
{ type: ProductEventService }
|
|
2107
2122
|
]; };
|
|
2108
2123
|
__decorate([
|
|
2109
|
-
|
|
2110
|
-
],
|
|
2124
|
+
ViewChild('tabContent')
|
|
2125
|
+
], ProductInfoTabsComponent.prototype, "tabContent", void 0);
|
|
2111
2126
|
__decorate([
|
|
2112
2127
|
Input()
|
|
2113
|
-
],
|
|
2128
|
+
], ProductInfoTabsComponent.prototype, "article", null);
|
|
2129
|
+
ProductInfoTabsComponent = __decorate([
|
|
2130
|
+
Component({
|
|
2131
|
+
selector: 'app-product-info-tabs',
|
|
2132
|
+
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",
|
|
2133
|
+
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}}"]
|
|
2134
|
+
})
|
|
2135
|
+
], ProductInfoTabsComponent);
|
|
2136
|
+
return ProductInfoTabsComponent;
|
|
2137
|
+
}());
|
|
2138
|
+
|
|
2139
|
+
var PipeModule = /** @class */ (function () {
|
|
2140
|
+
function PipeModule() {
|
|
2141
|
+
}
|
|
2142
|
+
PipeModule = __decorate([
|
|
2143
|
+
NgModule({
|
|
2144
|
+
exports: [
|
|
2145
|
+
LocalizePipe
|
|
2146
|
+
],
|
|
2147
|
+
declarations: [
|
|
2148
|
+
LocalizePipe
|
|
2149
|
+
],
|
|
2150
|
+
providers: [
|
|
2151
|
+
LocalizePipe
|
|
2152
|
+
]
|
|
2153
|
+
})
|
|
2154
|
+
], PipeModule);
|
|
2155
|
+
return PipeModule;
|
|
2156
|
+
}());
|
|
2157
|
+
|
|
2158
|
+
var ProductDocumentsComponent = /** @class */ (function () {
|
|
2159
|
+
function ProductDocumentsComponent(iconCache) {
|
|
2160
|
+
this.iconCache = iconCache;
|
|
2161
|
+
this.icon = IconEnum;
|
|
2162
|
+
this.showLabel = false;
|
|
2163
|
+
this.documents = [];
|
|
2164
|
+
}
|
|
2165
|
+
ProductDocumentsComponent.ctorParameters = function () { return [
|
|
2166
|
+
{ type: IconCacheService }
|
|
2167
|
+
]; };
|
|
2114
2168
|
__decorate([
|
|
2115
|
-
|
|
2116
|
-
],
|
|
2169
|
+
Input()
|
|
2170
|
+
], ProductDocumentsComponent.prototype, "showLabel", void 0);
|
|
2117
2171
|
__decorate([
|
|
2118
|
-
|
|
2119
|
-
],
|
|
2172
|
+
Input()
|
|
2173
|
+
], ProductDocumentsComponent.prototype, "documents", void 0);
|
|
2174
|
+
ProductDocumentsComponent = __decorate([
|
|
2175
|
+
Component({
|
|
2176
|
+
selector: 'app-product-documents',
|
|
2177
|
+
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",
|
|
2178
|
+
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}"]
|
|
2179
|
+
})
|
|
2180
|
+
], ProductDocumentsComponent);
|
|
2181
|
+
return ProductDocumentsComponent;
|
|
2182
|
+
}());
|
|
2183
|
+
|
|
2184
|
+
var HeaderComponent = /** @class */ (function () {
|
|
2185
|
+
function HeaderComponent() {
|
|
2186
|
+
}
|
|
2187
|
+
HeaderComponent.prototype.ngOnInit = function () {
|
|
2188
|
+
};
|
|
2120
2189
|
__decorate([
|
|
2121
|
-
|
|
2122
|
-
],
|
|
2190
|
+
Input()
|
|
2191
|
+
], HeaderComponent.prototype, "label", void 0);
|
|
2123
2192
|
__decorate([
|
|
2124
|
-
|
|
2125
|
-
],
|
|
2193
|
+
Input()
|
|
2194
|
+
], HeaderComponent.prototype, "amount", void 0);
|
|
2195
|
+
HeaderComponent = __decorate([
|
|
2196
|
+
Component({
|
|
2197
|
+
selector: 'app-header',
|
|
2198
|
+
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",
|
|
2199
|
+
styles: [".header-wrapper{display:flex;flex-direction:row;align-items:center}.header-wrapper .amount{margin-left:5px}"]
|
|
2200
|
+
})
|
|
2201
|
+
], HeaderComponent);
|
|
2202
|
+
return HeaderComponent;
|
|
2203
|
+
}());
|
|
2204
|
+
|
|
2205
|
+
var TabType;
|
|
2206
|
+
(function (TabType) {
|
|
2207
|
+
TabType["Additional"] = "additional";
|
|
2208
|
+
TabType["Properties"] = "properties";
|
|
2209
|
+
})(TabType || (TabType = {}));
|
|
2210
|
+
var ProductInfoComponent = /** @class */ (function () {
|
|
2211
|
+
function ProductInfoComponent() {
|
|
2212
|
+
this.tabType = TabType;
|
|
2213
|
+
this.currentTab = TabType.Additional;
|
|
2214
|
+
}
|
|
2215
|
+
ProductInfoComponent.prototype.ngOnInit = function () {
|
|
2216
|
+
};
|
|
2217
|
+
ProductInfoComponent.prototype.switchTab = function (tab) {
|
|
2218
|
+
this.currentTab = tab;
|
|
2219
|
+
};
|
|
2126
2220
|
__decorate([
|
|
2127
|
-
|
|
2128
|
-
],
|
|
2221
|
+
Input()
|
|
2222
|
+
], ProductInfoComponent.prototype, "article", void 0);
|
|
2223
|
+
ProductInfoComponent = __decorate([
|
|
2224
|
+
Component({
|
|
2225
|
+
selector: 'app-product-info',
|
|
2226
|
+
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",
|
|
2227
|
+
animations: [
|
|
2228
|
+
trigger('showContent', [
|
|
2229
|
+
state('void', style({ 'opacity': '0' })),
|
|
2230
|
+
state('*', style({ 'opacity': '1' })),
|
|
2231
|
+
transition('void => *', animate('200ms 100ms ease-in-out')),
|
|
2232
|
+
])
|
|
2233
|
+
],
|
|
2234
|
+
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}"]
|
|
2235
|
+
})
|
|
2236
|
+
], ProductInfoComponent);
|
|
2237
|
+
return ProductInfoComponent;
|
|
2238
|
+
}());
|
|
2239
|
+
|
|
2240
|
+
var ProductAdditionalInfoComponent = /** @class */ (function () {
|
|
2241
|
+
function ProductAdditionalInfoComponent(_sanitizer, _connectorService, _changeDetector) {
|
|
2242
|
+
this._sanitizer = _sanitizer;
|
|
2243
|
+
this._connectorService = _connectorService;
|
|
2244
|
+
this._changeDetector = _changeDetector;
|
|
2245
|
+
this.showLabel = false;
|
|
2246
|
+
this.textParts = [];
|
|
2247
|
+
this._superArticles = new Map();
|
|
2248
|
+
}
|
|
2249
|
+
Object.defineProperty(ProductAdditionalInfoComponent.prototype, "article", {
|
|
2250
|
+
get: function () {
|
|
2251
|
+
return this._article;
|
|
2252
|
+
},
|
|
2253
|
+
set: function (value) {
|
|
2254
|
+
var _this = this;
|
|
2255
|
+
if (value) {
|
|
2256
|
+
this._article = value;
|
|
2257
|
+
this._buildInfo().then(function () {
|
|
2258
|
+
_this._changeDetector.detectChanges();
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2262
|
+
enumerable: true,
|
|
2263
|
+
configurable: true
|
|
2264
|
+
});
|
|
2265
|
+
ProductAdditionalInfoComponent.prototype.ngOnInit = function () {
|
|
2266
|
+
};
|
|
2267
|
+
ProductAdditionalInfoComponent.prototype._getTextsSuperArticle = function () {
|
|
2268
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2269
|
+
var _this = this;
|
|
2270
|
+
return __generator(this, function (_a) {
|
|
2271
|
+
return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
2272
|
+
var texts, mainArticle;
|
|
2273
|
+
var _this = this;
|
|
2274
|
+
return __generator(this, function (_a) {
|
|
2275
|
+
switch (_a.label) {
|
|
2276
|
+
case 0:
|
|
2277
|
+
texts = [];
|
|
2278
|
+
if (!this.article.superArticleNr) return [3 /*break*/, 4];
|
|
2279
|
+
mainArticle = void 0;
|
|
2280
|
+
if (!this._superArticles.has(this.article.superArticleNr)) return [3 /*break*/, 1];
|
|
2281
|
+
mainArticle = this._superArticles.get(this.article.superArticleNr);
|
|
2282
|
+
return [3 /*break*/, 3];
|
|
2283
|
+
case 1: return [4 /*yield*/, this._connectorService.getSuperArticle(this.article.superArticleNr)];
|
|
2284
|
+
case 2:
|
|
2285
|
+
mainArticle = _a.sent();
|
|
2286
|
+
this._superArticles.set(this.article.superArticleNr, mainArticle);
|
|
2287
|
+
_a.label = 3;
|
|
2288
|
+
case 3:
|
|
2289
|
+
mainArticle.texts.forEach(function (txt) {
|
|
2290
|
+
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
2291
|
+
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
2292
|
+
texts.push(safeTxt);
|
|
2293
|
+
}
|
|
2294
|
+
});
|
|
2295
|
+
resolve(texts);
|
|
2296
|
+
return [3 /*break*/, 5];
|
|
2297
|
+
case 4:
|
|
2298
|
+
resolve(texts);
|
|
2299
|
+
_a.label = 5;
|
|
2300
|
+
case 5: return [2 /*return*/];
|
|
2301
|
+
}
|
|
2302
|
+
});
|
|
2303
|
+
}); })];
|
|
2304
|
+
});
|
|
2305
|
+
});
|
|
2306
|
+
};
|
|
2307
|
+
ProductAdditionalInfoComponent.prototype._prepareArticleTexts = function () {
|
|
2308
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2309
|
+
var texts;
|
|
2310
|
+
var _a;
|
|
2311
|
+
var _this = this;
|
|
2312
|
+
return __generator(this, function (_b) {
|
|
2313
|
+
switch (_b.label) {
|
|
2314
|
+
case 0: return [4 /*yield*/, this._getTextsSuperArticle()];
|
|
2315
|
+
case 1:
|
|
2316
|
+
texts = _b.sent();
|
|
2317
|
+
if (texts.length > 0) {
|
|
2318
|
+
(_a = this.textParts).push.apply(_a, __spread(texts));
|
|
2319
|
+
}
|
|
2320
|
+
if (this.article.texts) {
|
|
2321
|
+
this.article.texts.forEach(function (txt) {
|
|
2322
|
+
if (BitUtils.IsFullDescription(txt.publication)) {
|
|
2323
|
+
var safeTxt = _this._sanitizer.sanitize(SecurityContext.HTML, txt.text);
|
|
2324
|
+
_this.textParts.push(safeTxt);
|
|
2325
|
+
}
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
return [2 /*return*/];
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
});
|
|
2332
|
+
};
|
|
2333
|
+
ProductAdditionalInfoComponent.prototype._buildInfo = function () {
|
|
2334
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2335
|
+
return __generator(this, function (_a) {
|
|
2336
|
+
switch (_a.label) {
|
|
2337
|
+
case 0:
|
|
2338
|
+
this.textParts.length = 0;
|
|
2339
|
+
return [4 /*yield*/, this._prepareArticleTexts()];
|
|
2340
|
+
case 1:
|
|
2341
|
+
_a.sent();
|
|
2342
|
+
if (this.textParts.length === 0) {
|
|
2343
|
+
if (this.article.additionalDescription) {
|
|
2344
|
+
this.textParts.push(this.article.additionalDescription);
|
|
2345
|
+
}
|
|
2346
|
+
else if (this.article.description) {
|
|
2347
|
+
this.textParts.push(this.article.description);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
return [2 /*return*/];
|
|
2351
|
+
}
|
|
2352
|
+
});
|
|
2353
|
+
});
|
|
2354
|
+
};
|
|
2355
|
+
ProductAdditionalInfoComponent.ctorParameters = function () { return [
|
|
2356
|
+
{ type: DomSanitizer },
|
|
2357
|
+
{ type: ProductConnectorService },
|
|
2358
|
+
{ type: ChangeDetectorRef }
|
|
2359
|
+
]; };
|
|
2129
2360
|
__decorate([
|
|
2130
|
-
|
|
2131
|
-
],
|
|
2361
|
+
Input()
|
|
2362
|
+
], ProductAdditionalInfoComponent.prototype, "article", null);
|
|
2132
2363
|
__decorate([
|
|
2133
|
-
|
|
2134
|
-
],
|
|
2135
|
-
|
|
2364
|
+
Input()
|
|
2365
|
+
], ProductAdditionalInfoComponent.prototype, "showLabel", void 0);
|
|
2366
|
+
ProductAdditionalInfoComponent = __decorate([
|
|
2136
2367
|
Component({
|
|
2137
|
-
selector: 'app-
|
|
2138
|
-
template: "<
|
|
2139
|
-
|
|
2140
|
-
styles: [""]
|
|
2368
|
+
selector: 'app-product-additional-info',
|
|
2369
|
+
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",
|
|
2370
|
+
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}"]
|
|
2141
2371
|
})
|
|
2142
|
-
],
|
|
2143
|
-
return
|
|
2372
|
+
], ProductAdditionalInfoComponent);
|
|
2373
|
+
return ProductAdditionalInfoComponent;
|
|
2144
2374
|
}());
|
|
2145
2375
|
|
|
2146
|
-
var
|
|
2147
|
-
|
|
2148
|
-
|
|
2376
|
+
var propertyMap = new Map([
|
|
2377
|
+
['articleNr', 'ARTICLE_NUMBER'],
|
|
2378
|
+
['catExtra', 'CATEGORY'],
|
|
2379
|
+
['catType', 'CATEGORY_TYPE'],
|
|
2380
|
+
['description', 'DESCRIPTION'],
|
|
2381
|
+
['material', 'MATERIAL'],
|
|
2382
|
+
['title', 'TITLE'],
|
|
2383
|
+
['turnOverGroup', 'TURNOVERGROUP'],
|
|
2384
|
+
['height', 'HEIGHT'],
|
|
2385
|
+
['width', 'WIDTH']
|
|
2386
|
+
]);
|
|
2387
|
+
var ProductPropertiesComponent = /** @class */ (function () {
|
|
2388
|
+
function ProductPropertiesComponent() {
|
|
2389
|
+
this.showLabel = false;
|
|
2390
|
+
this.properties = [];
|
|
2149
2391
|
}
|
|
2150
|
-
Object.defineProperty(
|
|
2392
|
+
Object.defineProperty(ProductPropertiesComponent.prototype, "article", {
|
|
2151
2393
|
get: function () {
|
|
2152
2394
|
return this._article;
|
|
2153
2395
|
},
|
|
2154
2396
|
set: function (value) {
|
|
2155
2397
|
this._article = value;
|
|
2156
|
-
|
|
2157
|
-
this.description = this.article.additionalDescription;
|
|
2158
|
-
this._prepareDescription();
|
|
2159
|
-
}
|
|
2398
|
+
this._prepareProperties();
|
|
2160
2399
|
},
|
|
2161
2400
|
enumerable: true,
|
|
2162
2401
|
configurable: true
|
|
2163
2402
|
});
|
|
2164
|
-
|
|
2165
|
-
};
|
|
2166
|
-
ProductAdditionalDescriptionComponent.prototype.onReadMore = function () {
|
|
2167
|
-
this._appEventService.onUpdateProductInfoTab.next(0);
|
|
2403
|
+
ProductPropertiesComponent.prototype.ngOnInit = function () {
|
|
2168
2404
|
};
|
|
2169
|
-
|
|
2405
|
+
ProductPropertiesComponent.prototype._prepareProperties = function () {
|
|
2170
2406
|
var _this = this;
|
|
2171
|
-
this.
|
|
2172
|
-
if (this.
|
|
2173
|
-
|
|
2174
|
-
if (BitUtils.IsShortDescription(txt.publication)) {
|
|
2175
|
-
_this.description += txt.text;
|
|
2176
|
-
}
|
|
2177
|
-
});
|
|
2178
|
-
this.description = this.description.replace(/<[^>]*>?/gm, '');
|
|
2179
|
-
if (this.description.length > 250) {
|
|
2180
|
-
this.description = this.description.substr(0, 250) + ' [..]';
|
|
2181
|
-
}
|
|
2407
|
+
this.properties.length = 0;
|
|
2408
|
+
if (!this._article) {
|
|
2409
|
+
return;
|
|
2182
2410
|
}
|
|
2411
|
+
propertyMap.forEach(function (value, key) {
|
|
2412
|
+
if (_this.article.hasOwnProperty(key)) {
|
|
2413
|
+
_this.properties.push({ key: value, value: _this.article[key] });
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2183
2416
|
};
|
|
2184
|
-
ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
|
|
2185
|
-
{ type: ProductEventService }
|
|
2186
|
-
]; };
|
|
2187
2417
|
__decorate([
|
|
2188
2418
|
Input()
|
|
2189
|
-
],
|
|
2190
|
-
|
|
2419
|
+
], ProductPropertiesComponent.prototype, "article", null);
|
|
2420
|
+
__decorate([
|
|
2421
|
+
Input()
|
|
2422
|
+
], ProductPropertiesComponent.prototype, "showLabel", void 0);
|
|
2423
|
+
ProductPropertiesComponent = __decorate([
|
|
2191
2424
|
Component({
|
|
2192
|
-
selector: 'app-product-
|
|
2193
|
-
template: "<
|
|
2194
|
-
styles: [":host{display:block
|
|
2425
|
+
selector: 'app-product-properties',
|
|
2426
|
+
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",
|
|
2427
|
+
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}}"]
|
|
2195
2428
|
})
|
|
2196
|
-
],
|
|
2197
|
-
return
|
|
2429
|
+
], ProductPropertiesComponent);
|
|
2430
|
+
return ProductPropertiesComponent;
|
|
2198
2431
|
}());
|
|
2199
2432
|
|
|
2200
|
-
var
|
|
2201
|
-
function
|
|
2202
|
-
|
|
2203
|
-
this._appEventService = _appEventService;
|
|
2204
|
-
this.activeTabHeight = 0;
|
|
2205
|
-
this.tabs = [];
|
|
2206
|
-
this._subs = [];
|
|
2207
|
-
this._subs.push(this._appEventService.onUpdateProductInfoTab.subscribe(function (index) {
|
|
2208
|
-
_this.updateTab(index);
|
|
2209
|
-
_this.tabContent.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
2210
|
-
}));
|
|
2433
|
+
var ProductSymbolsComponent = /** @class */ (function () {
|
|
2434
|
+
function ProductSymbolsComponent() {
|
|
2435
|
+
this.symbolStrings = [];
|
|
2211
2436
|
}
|
|
2212
|
-
Object.defineProperty(
|
|
2437
|
+
Object.defineProperty(ProductSymbolsComponent.prototype, "symbols", {
|
|
2438
|
+
get: function () {
|
|
2439
|
+
return this._symbols;
|
|
2440
|
+
},
|
|
2213
2441
|
set: function (value) {
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
this.
|
|
2217
|
-
|
|
2442
|
+
this._symbols = value;
|
|
2443
|
+
if (this._symbols && this._symbols.hasOwnProperty('fontCode')) {
|
|
2444
|
+
this._className = this._symbols['fontCode'] === 'VLOER' ? 'floor' : (this._className === 'WAS' ? 'ginetex' : '');
|
|
2445
|
+
}
|
|
2446
|
+
if (this._symbols && this._symbols.hasOwnProperty('symbolString')) {
|
|
2447
|
+
for (var i = 0; i < this._symbols['symbolString'].length; i++) {
|
|
2448
|
+
this.symbolStrings.push(this._symbols['symbolString'][i]);
|
|
2449
|
+
}
|
|
2218
2450
|
}
|
|
2219
2451
|
},
|
|
2220
2452
|
enumerable: true,
|
|
2221
2453
|
configurable: true
|
|
2222
2454
|
});
|
|
2223
|
-
|
|
2224
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
2225
|
-
};
|
|
2226
|
-
ProductInfoTabsComponent.prototype.updateTab = function (tabIndex) {
|
|
2227
|
-
this.activeTab = tabIndex;
|
|
2228
|
-
this.updateHeight(tabIndex);
|
|
2229
|
-
};
|
|
2230
|
-
ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
|
|
2231
|
-
if (this.tabContent.nativeElement.children.length > 0) {
|
|
2232
|
-
if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
|
|
2233
|
-
this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
};
|
|
2237
|
-
ProductInfoTabsComponent.prototype._setupTabs = function () {
|
|
2238
|
-
this.tabs.push({ title: 'DESCRIPTION' });
|
|
2239
|
-
this.tabs.push({ title: 'FEATURES' });
|
|
2240
|
-
if (this.articleObject.documents !== undefined && this.articleObject.documents.length > 0) {
|
|
2241
|
-
this.tabs.push({ title: 'DOWNLOADS' });
|
|
2242
|
-
}
|
|
2243
|
-
if (this.articleObject.symbols !== undefined && this.articleObject.symbols.length > 0) {
|
|
2244
|
-
this.tabs.push({ title: 'SYMBOLS' });
|
|
2245
|
-
}
|
|
2455
|
+
ProductSymbolsComponent.prototype.ngOnInit = function () {
|
|
2246
2456
|
};
|
|
2247
|
-
ProductInfoTabsComponent.ctorParameters = function () { return [
|
|
2248
|
-
{ type: ProductEventService }
|
|
2249
|
-
]; };
|
|
2250
|
-
__decorate([
|
|
2251
|
-
ViewChild('tabContent')
|
|
2252
|
-
], ProductInfoTabsComponent.prototype, "tabContent", void 0);
|
|
2253
2457
|
__decorate([
|
|
2254
2458
|
Input()
|
|
2255
|
-
],
|
|
2256
|
-
|
|
2459
|
+
], ProductSymbolsComponent.prototype, "symbols", null);
|
|
2460
|
+
__decorate([
|
|
2461
|
+
HostBinding('class')
|
|
2462
|
+
], ProductSymbolsComponent.prototype, "_className", void 0);
|
|
2463
|
+
ProductSymbolsComponent = __decorate([
|
|
2257
2464
|
Component({
|
|
2258
|
-
selector: 'app-product-
|
|
2259
|
-
template: "<div
|
|
2260
|
-
styles: [":
|
|
2261
|
-
})
|
|
2262
|
-
], ProductInfoTabsComponent);
|
|
2263
|
-
return ProductInfoTabsComponent;
|
|
2264
|
-
}());
|
|
2265
|
-
|
|
2266
|
-
var ProductInitializerService = /** @class */ (function () {
|
|
2267
|
-
function ProductInitializerService(_settingsService) {
|
|
2268
|
-
this._settingsService = _settingsService;
|
|
2269
|
-
}
|
|
2270
|
-
ProductInitializerService.prototype.initializeApp = function () {
|
|
2271
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2272
|
-
return __generator(this, function (_a) {
|
|
2273
|
-
return [2 /*return*/, this._settingsService.initializeSettings()];
|
|
2274
|
-
});
|
|
2275
|
-
});
|
|
2276
|
-
};
|
|
2277
|
-
ProductInitializerService.ctorParameters = function () { return [
|
|
2278
|
-
{ type: ProductSettingsService }
|
|
2279
|
-
]; };
|
|
2280
|
-
ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
|
|
2281
|
-
ProductInitializerService = __decorate([
|
|
2282
|
-
Injectable({
|
|
2283
|
-
providedIn: 'root',
|
|
2465
|
+
selector: 'app-product-symbols',
|
|
2466
|
+
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",
|
|
2467
|
+
styles: [":host{display:block}:host.floor .symbol{font-family:iOneFloorsymbols}:host.ginetex .symbol{font-family:iOneGinetexsymbols}.symbol{font-size:100px}"]
|
|
2284
2468
|
})
|
|
2285
|
-
],
|
|
2286
|
-
return
|
|
2469
|
+
], ProductSymbolsComponent);
|
|
2470
|
+
return ProductSymbolsComponent;
|
|
2287
2471
|
}());
|
|
2288
2472
|
|
|
2289
|
-
function
|
|
2290
|
-
|
|
2291
|
-
return x;
|
|
2292
|
-
}
|
|
2293
|
-
var IoneProductModule = /** @class */ (function () {
|
|
2294
|
-
function IoneProductModule() {
|
|
2473
|
+
var ProductPageModule = /** @class */ (function () {
|
|
2474
|
+
function ProductPageModule() {
|
|
2295
2475
|
}
|
|
2296
|
-
|
|
2476
|
+
ProductPageModule = __decorate([
|
|
2297
2477
|
NgModule({
|
|
2298
2478
|
imports: [
|
|
2299
|
-
// BrowserAnimationsModule,
|
|
2300
2479
|
CommonModule,
|
|
2301
|
-
ButtonModule,
|
|
2302
2480
|
IconModule,
|
|
2481
|
+
LoaderModule,
|
|
2482
|
+
PipeModule,
|
|
2303
2483
|
NumberPickerModule,
|
|
2484
|
+
ButtonModule,
|
|
2485
|
+
PriceDisplayPipeModule,
|
|
2304
2486
|
InputTextModule,
|
|
2305
2487
|
FilesUploadModule,
|
|
2306
|
-
LoaderModule,
|
|
2307
2488
|
ScrollContainerModule,
|
|
2308
2489
|
TileModule,
|
|
2309
2490
|
LevelIndicatorModule,
|
|
2310
|
-
|
|
2311
|
-
ArticleTileModule
|
|
2491
|
+
ArticleTileModule,
|
|
2312
2492
|
],
|
|
2313
2493
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2314
2494
|
declarations: [
|
|
2315
|
-
IoneProductComponent,
|
|
2316
2495
|
ProductPageComponent,
|
|
2496
|
+
ProductSelectorTypeComponent,
|
|
2317
2497
|
ImageCarouselComponent,
|
|
2318
2498
|
ProductDescriptionComponent,
|
|
2319
|
-
|
|
2499
|
+
ProductAdditionalDescriptionComponent,
|
|
2500
|
+
ProductPriceComponent,
|
|
2501
|
+
ProductAddtocartComponent,
|
|
2320
2502
|
ProductRelatedComponent,
|
|
2503
|
+
ProductStockComponent,
|
|
2504
|
+
ProductDeliveryComponent,
|
|
2505
|
+
ProductInfoTabsComponent,
|
|
2506
|
+
ProductDocumentsComponent,
|
|
2321
2507
|
HeaderComponent,
|
|
2322
2508
|
ProductInfoComponent,
|
|
2323
2509
|
ProductAdditionalInfoComponent,
|
|
2324
2510
|
ProductPropertiesComponent,
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2511
|
+
ProductSymbolsComponent
|
|
2512
|
+
],
|
|
2513
|
+
exports: [ProductPageComponent]
|
|
2514
|
+
})
|
|
2515
|
+
], ProductPageModule);
|
|
2516
|
+
return ProductPageModule;
|
|
2517
|
+
}());
|
|
2518
|
+
|
|
2519
|
+
var ProductExternalSourceModule = /** @class */ (function () {
|
|
2520
|
+
function ProductExternalSourceModule() {
|
|
2521
|
+
}
|
|
2522
|
+
ProductExternalSourceModule = __decorate([
|
|
2523
|
+
NgModule({
|
|
2524
|
+
imports: [
|
|
2525
|
+
CommonModule,
|
|
2526
|
+
ProductPageModule
|
|
2527
|
+
],
|
|
2528
|
+
declarations: [
|
|
2529
|
+
ProductExternalSourceComponent
|
|
2530
|
+
],
|
|
2531
|
+
exports: [
|
|
2532
|
+
ProductExternalSourceComponent
|
|
2533
|
+
]
|
|
2534
|
+
})
|
|
2535
|
+
], ProductExternalSourceModule);
|
|
2536
|
+
return ProductExternalSourceModule;
|
|
2537
|
+
}());
|
|
2538
|
+
|
|
2539
|
+
function initializeApp(context) {
|
|
2540
|
+
var x = function () { return context.initializeApp(); };
|
|
2541
|
+
return x;
|
|
2542
|
+
}
|
|
2543
|
+
var IoneProductModule = /** @class */ (function () {
|
|
2544
|
+
function IoneProductModule() {
|
|
2545
|
+
}
|
|
2546
|
+
IoneProductModule = __decorate([
|
|
2547
|
+
NgModule({
|
|
2548
|
+
imports: [
|
|
2549
|
+
// BrowserAnimationsModule,
|
|
2550
|
+
CommonModule,
|
|
2551
|
+
ProductExternalSourceModule,
|
|
2552
|
+
ProductPageModule
|
|
2553
|
+
],
|
|
2554
|
+
declarations: [
|
|
2555
|
+
IoneProductComponent
|
|
2334
2556
|
],
|
|
2335
2557
|
entryComponents: [
|
|
2336
2558
|
IoneProductComponent
|
|
2337
2559
|
],
|
|
2338
2560
|
providers: [
|
|
2339
|
-
ProductSettingsService,
|
|
2340
|
-
ProductConnectorService,
|
|
2341
|
-
ProductConnectorAdapterService,
|
|
2342
|
-
IconCacheService,
|
|
2343
2561
|
{
|
|
2344
2562
|
provide: APP_INITIALIZER,
|
|
2345
2563
|
useFactory: initializeApp,
|
|
@@ -2360,5 +2578,5 @@ var IoneProductModule = /** @class */ (function () {
|
|
|
2360
2578
|
* Generated bundle index. Do not edit.
|
|
2361
2579
|
*/
|
|
2362
2580
|
|
|
2363
|
-
export { IoneProductModule, Version, initializeApp,
|
|
2581
|
+
export { IoneProductModule, ProductExternalSourceComponent, ProductExternalSourceModule, Version, initializeApp, ProductPageModule as ɵa, PipeModule as ɵb, ProductSymbolsComponent as ɵba, IoneProductComponent as ɵbb, ProductInitializerService as ɵbc, 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 };
|
|
2364
2582
|
//# sourceMappingURL=colijnit-product.js.map
|