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