@colijnit/product 257.1.10 → 257.1.12
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/bundle/service/local-storage.service.d.ts +14 -0
- package/app/components/product-addtocart/product-addtocart.component.d.ts +1 -4
- package/app/ione-product.component.d.ts +6 -1
- package/app/service/product-connector-adapter.service.d.ts +0 -1
- package/app/service/product-connector.service.d.ts +0 -1
- package/bundles/colijnit-product.umd.js +108 -65
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product-257.1.12.tgz +0 -0
- package/colijnit-product.d.ts +1 -0
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/bundle/service/local-storage.service.js +37 -0
- package/esm2015/app/components/product-addtocart/product-addtocart.component.js +6 -24
- package/esm2015/app/components/product-page/product-page.component.js +3 -3
- package/esm2015/app/ione-product.component.js +35 -4
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/app/service/product-connector-adapter.service.js +1 -9
- package/esm2015/app/service/product-connector.service.js +1 -4
- package/esm2015/colijnit-product.js +2 -1
- package/fesm2015/colijnit-product.js +78 -41
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +1 -1
- package/colijnit-product-257.1.9.tgz +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class RootStorageObject {
|
|
2
|
+
id: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class LocalStorageService {
|
|
5
|
+
readonly storage: Storage;
|
|
6
|
+
protected _appRoot: string;
|
|
7
|
+
protected _storageObj: RootStorageObject;
|
|
8
|
+
constructor();
|
|
9
|
+
save(): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
set id(id: string);
|
|
12
|
+
get id(): string;
|
|
13
|
+
protected _initLocalStorageObj(): void;
|
|
14
|
+
}
|
|
@@ -6,13 +6,11 @@ import { ProductEventService } from '../../service/product-event.service';
|
|
|
6
6
|
import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
|
|
7
7
|
import { ProductSettingsService } from '../../service/product-settings.service';
|
|
8
8
|
import { ExternalSource } from '@colijnit/articleapi/build/model/external-source.bo';
|
|
9
|
-
import { ProductConnectorAdapterService } from '../../service/product-connector-adapter.service';
|
|
10
9
|
export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
|
|
11
10
|
iconCache: IconCacheService;
|
|
12
11
|
private _ioneControllerService;
|
|
13
12
|
private _appEventService;
|
|
14
13
|
private _settingsService;
|
|
15
|
-
private _productConnectorAdapterService;
|
|
16
14
|
readonly icon: typeof IconEnum;
|
|
17
15
|
addToCartButton: ElementRef;
|
|
18
16
|
article: ArticleFullObject;
|
|
@@ -31,11 +29,10 @@ export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
|
|
|
31
29
|
showRelatedPopup: EventEmitter<boolean>;
|
|
32
30
|
showQuoteButton: boolean;
|
|
33
31
|
private _quantity;
|
|
34
|
-
constructor(iconCache: IconCacheService, _ioneControllerService: ProductConnectorService, _appEventService: ProductEventService, _settingsService: ProductSettingsService
|
|
32
|
+
constructor(iconCache: IconCacheService, _ioneControllerService: ProductConnectorService, _appEventService: ProductEventService, _settingsService: ProductSettingsService);
|
|
35
33
|
ngOnInit(): void;
|
|
36
34
|
ngOnDestroy(): void;
|
|
37
35
|
handleAddToCartClick(quantity: number): Promise<void>;
|
|
38
36
|
handleAddToQuoteClick(quantity: number): Promise<void>;
|
|
39
37
|
private _getJSONFromArticleObject;
|
|
40
|
-
private _getGeneratedArtDirectly;
|
|
41
38
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ProductConnectorService } from './service/product-connector.service';
|
|
2
3
|
import { ProductEventService } from './service/product-event.service';
|
|
3
4
|
import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list-object';
|
|
4
5
|
import { ProductSettingsService } from './service/product-settings.service';
|
|
5
6
|
import { Selection } from '@colijnit/articleapi/build/model/selection';
|
|
6
7
|
import { ArticleQuickSel } from '@colijnit/articleapi/build/model/article-quick-sel';
|
|
7
8
|
import { ArticleListObjectExtended } from '@colijnit/articleapi/build/model/article-list-object-extended.bo';
|
|
9
|
+
import { LocalStorageService } from "./bundle/service/local-storage.service";
|
|
8
10
|
export declare class IoneProductComponent implements OnInit, OnDestroy {
|
|
9
11
|
private _appEventService;
|
|
10
12
|
private _settingsService;
|
|
13
|
+
private _productConnectorService;
|
|
14
|
+
private _localStorageService;
|
|
11
15
|
sku: string;
|
|
12
16
|
isReturn: boolean;
|
|
13
17
|
showRelatedProductsPopup: boolean;
|
|
14
18
|
set settings(value: any);
|
|
15
19
|
get settings(): any;
|
|
16
20
|
handleAddArticleInternally: boolean;
|
|
21
|
+
handleAddToCartInternally: boolean;
|
|
17
22
|
onAddToCart: EventEmitter<{
|
|
18
23
|
article: string | ArticleListObjectExtended;
|
|
19
24
|
quantity: number;
|
|
@@ -30,7 +35,7 @@ export declare class IoneProductComponent implements OnInit, OnDestroy {
|
|
|
30
35
|
showHD: boolean;
|
|
31
36
|
private _settings;
|
|
32
37
|
private _subs;
|
|
33
|
-
constructor(_appEventService: ProductEventService, _settingsService: ProductSettingsService);
|
|
38
|
+
constructor(_appEventService: ProductEventService, _settingsService: ProductSettingsService, _productConnectorService: ProductConnectorService, _localStorageService: LocalStorageService);
|
|
34
39
|
ngOnInit(): Promise<void>;
|
|
35
40
|
ngOnDestroy(): void;
|
|
36
41
|
private _handleAnswerInfoReceived;
|
|
@@ -29,7 +29,6 @@ export declare class ProductConnectorAdapterService implements OnDestroy {
|
|
|
29
29
|
getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
|
|
30
30
|
getJsonConfiguredArticles(configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
31
31
|
getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, externalSource?: boolean, showLoader?: boolean, instanceId?: any, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
32
|
-
getGeneratedArtDirectly(goodId: number, showLoader: boolean): Promise<number>;
|
|
33
32
|
getGoodIdFromArticleNr(sku: string): Promise<number>;
|
|
34
33
|
getArticleFullObject(goodId: number, showLoader?: boolean): Promise<ArticleFullObject>;
|
|
35
34
|
getSuperArticle(id: string, branch?: string): Promise<SuperArticle>;
|
|
@@ -33,7 +33,6 @@ export declare class ProductConnectorService implements OnDestroy {
|
|
|
33
33
|
getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
|
|
34
34
|
getSuperArticle(id: string): Promise<SuperArticle>;
|
|
35
35
|
getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, externalSource?: boolean, showLoader?: boolean, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
36
|
-
getGeneratedArtDirectly(goodId: number, showLoader?: boolean): Promise<number>;
|
|
37
36
|
addWebSessionTransactionLine(transactionUuid: string, sku: string, quantity: number): Promise<string>;
|
|
38
37
|
onShowLoaderChange(showLoader: boolean): void;
|
|
39
38
|
}
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
function Version() {
|
|
32
32
|
this.name = "@colijnit/product";
|
|
33
33
|
this.description = "Product detail page project for iOne";
|
|
34
|
-
this.symVer = "257.1.
|
|
35
|
-
this.publishDate = "
|
|
34
|
+
this.symVer = "257.1.12";
|
|
35
|
+
this.publishDate = "9-7-2025 14:29:11";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -748,17 +748,6 @@
|
|
|
748
748
|
});
|
|
749
749
|
});
|
|
750
750
|
};
|
|
751
|
-
ProductConnectorAdapterService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
|
|
752
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
753
|
-
var _this = this;
|
|
754
|
-
return __generator(this, function (_a) {
|
|
755
|
-
return [2 /*return*/, this.articleConnector.getGeneratedArtDirectly(goodId, showLoader).catch(function (messages) {
|
|
756
|
-
_this._eventService.errorMessage.next(messages);
|
|
757
|
-
return null;
|
|
758
|
-
})];
|
|
759
|
-
});
|
|
760
|
-
});
|
|
761
|
-
};
|
|
762
751
|
ProductConnectorAdapterService.prototype.getGoodIdFromArticleNr = function (sku) {
|
|
763
752
|
return __awaiter(this, void 0, void 0, function () {
|
|
764
753
|
var response;
|
|
@@ -1313,10 +1302,6 @@
|
|
|
1313
1302
|
if (showLoader === void 0) { showLoader = true; }
|
|
1314
1303
|
return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, externalSource, showLoader, this._instanceId, configuratorStatistics);
|
|
1315
1304
|
};
|
|
1316
|
-
ProductConnectorService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
|
|
1317
|
-
if (showLoader === void 0) { showLoader = true; }
|
|
1318
|
-
return this._adapterService.getGeneratedArtDirectly(goodId, showLoader);
|
|
1319
|
-
};
|
|
1320
1305
|
ProductConnectorService.prototype.addWebSessionTransactionLine = function (transactionUuid, sku, quantity) {
|
|
1321
1306
|
return __awaiter(this, void 0, void 0, function () {
|
|
1322
1307
|
return __generator(this, function (_a) {
|
|
@@ -1340,8 +1325,51 @@
|
|
|
1340
1325
|
{ type: ProductSettingsService }
|
|
1341
1326
|
]; };
|
|
1342
1327
|
|
|
1328
|
+
var RootStorageObject = /** @class */ (function () {
|
|
1329
|
+
function RootStorageObject() {
|
|
1330
|
+
}
|
|
1331
|
+
return RootStorageObject;
|
|
1332
|
+
}());
|
|
1333
|
+
var LocalStorageService = /** @class */ (function () {
|
|
1334
|
+
function LocalStorageService() {
|
|
1335
|
+
this.storage = localStorage;
|
|
1336
|
+
this._appRoot = "web-order";
|
|
1337
|
+
this._storageObj = new RootStorageObject();
|
|
1338
|
+
this._initLocalStorageObj();
|
|
1339
|
+
}
|
|
1340
|
+
LocalStorageService.prototype.save = function () {
|
|
1341
|
+
this.storage.setItem(this._appRoot, JSON.stringify(this._storageObj));
|
|
1342
|
+
};
|
|
1343
|
+
LocalStorageService.prototype.clear = function () {
|
|
1344
|
+
this.storage.clear();
|
|
1345
|
+
};
|
|
1346
|
+
Object.defineProperty(LocalStorageService.prototype, "id", {
|
|
1347
|
+
get: function () {
|
|
1348
|
+
return this._storageObj ? this._storageObj.id : "";
|
|
1349
|
+
},
|
|
1350
|
+
set: function (id) {
|
|
1351
|
+
this._storageObj.id = id;
|
|
1352
|
+
this.save();
|
|
1353
|
+
},
|
|
1354
|
+
enumerable: false,
|
|
1355
|
+
configurable: true
|
|
1356
|
+
});
|
|
1357
|
+
LocalStorageService.prototype._initLocalStorageObj = function () {
|
|
1358
|
+
this._storageObj = JSON.parse(this.storage.getItem(this._appRoot)) || this._storageObj;
|
|
1359
|
+
this.save();
|
|
1360
|
+
};
|
|
1361
|
+
return LocalStorageService;
|
|
1362
|
+
}());
|
|
1363
|
+
LocalStorageService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LocalStorageService_Factory() { return new LocalStorageService(); }, token: LocalStorageService, providedIn: "root" });
|
|
1364
|
+
LocalStorageService.decorators = [
|
|
1365
|
+
{ type: i0.Injectable, args: [{
|
|
1366
|
+
providedIn: 'root'
|
|
1367
|
+
},] }
|
|
1368
|
+
];
|
|
1369
|
+
LocalStorageService.ctorParameters = function () { return []; };
|
|
1370
|
+
|
|
1343
1371
|
var IoneProductComponent = /** @class */ (function () {
|
|
1344
|
-
function IoneProductComponent(_appEventService, _settingsService) {
|
|
1372
|
+
function IoneProductComponent(_appEventService, _settingsService, _productConnectorService, _localStorageService) {
|
|
1345
1373
|
var _this = this;
|
|
1346
1374
|
// this.sku = 'CF-HILL';
|
|
1347
1375
|
// this.sku = 'CF-ALMADA';
|
|
@@ -1357,7 +1385,10 @@
|
|
|
1357
1385
|
// this.sku = "grover";
|
|
1358
1386
|
this._appEventService = _appEventService;
|
|
1359
1387
|
this._settingsService = _settingsService;
|
|
1388
|
+
this._productConnectorService = _productConnectorService;
|
|
1389
|
+
this._localStorageService = _localStorageService;
|
|
1360
1390
|
this.handleAddArticleInternally = true;
|
|
1391
|
+
this.handleAddToCartInternally = false;
|
|
1361
1392
|
this.onAddToCart = new i0.EventEmitter();
|
|
1362
1393
|
this.forceRenderImage = new i0.EventEmitter();
|
|
1363
1394
|
this.onAlternativeClick = new i0.EventEmitter();
|
|
@@ -1419,9 +1450,41 @@
|
|
|
1419
1450
|
};
|
|
1420
1451
|
IoneProductComponent.prototype._handleAddToCart = function (data) {
|
|
1421
1452
|
return __awaiter(this, void 0, void 0, function () {
|
|
1453
|
+
var article, transactionId, transactionId;
|
|
1422
1454
|
return __generator(this, function (_a) {
|
|
1423
|
-
|
|
1424
|
-
|
|
1455
|
+
switch (_a.label) {
|
|
1456
|
+
case 0:
|
|
1457
|
+
if (!this.handleAddToCartInternally) return [3 /*break*/, 7];
|
|
1458
|
+
if (!(data && data.article)) return [3 /*break*/, 6];
|
|
1459
|
+
if (!(typeof data.article === 'string')) return [3 /*break*/, 3];
|
|
1460
|
+
article = JSON.parse(data.article);
|
|
1461
|
+
if (!(article.selectorData && article.selectorData.compositions)) return [3 /*break*/, 2];
|
|
1462
|
+
return [4 /*yield*/, this._productConnectorService.addWebSessionTransactionLine(this._localStorageService.id, article.selectorData.compositions[0].compositionArticleNo, data.quantity)];
|
|
1463
|
+
case 1:
|
|
1464
|
+
transactionId = _a.sent();
|
|
1465
|
+
if (transactionId) {
|
|
1466
|
+
this._localStorageService.id = transactionId;
|
|
1467
|
+
}
|
|
1468
|
+
_a.label = 2;
|
|
1469
|
+
case 2: return [3 /*break*/, 5];
|
|
1470
|
+
case 3:
|
|
1471
|
+
if (!data.article.hasOwnProperty('articleNr')) return [3 /*break*/, 5];
|
|
1472
|
+
return [4 /*yield*/, this._productConnectorService.addWebSessionTransactionLine(this._localStorageService.id, data.article['articleNr'], data.quantity)];
|
|
1473
|
+
case 4:
|
|
1474
|
+
transactionId = _a.sent();
|
|
1475
|
+
if (transactionId) {
|
|
1476
|
+
this._localStorageService.id = transactionId;
|
|
1477
|
+
}
|
|
1478
|
+
_a.label = 5;
|
|
1479
|
+
case 5:
|
|
1480
|
+
this.onAddToCart.next(data);
|
|
1481
|
+
_a.label = 6;
|
|
1482
|
+
case 6: return [3 /*break*/, 8];
|
|
1483
|
+
case 7:
|
|
1484
|
+
this.onAddToCart.emit(data);
|
|
1485
|
+
_a.label = 8;
|
|
1486
|
+
case 8: return [2 /*return*/];
|
|
1487
|
+
}
|
|
1425
1488
|
});
|
|
1426
1489
|
});
|
|
1427
1490
|
};
|
|
@@ -1446,7 +1509,9 @@
|
|
|
1446
1509
|
];
|
|
1447
1510
|
IoneProductComponent.ctorParameters = function () { return [
|
|
1448
1511
|
{ type: ProductEventService },
|
|
1449
|
-
{ type: ProductSettingsService }
|
|
1512
|
+
{ type: ProductSettingsService },
|
|
1513
|
+
{ type: ProductConnectorService },
|
|
1514
|
+
{ type: LocalStorageService }
|
|
1450
1515
|
]; };
|
|
1451
1516
|
IoneProductComponent.propDecorators = {
|
|
1452
1517
|
sku: [{ type: i0.Input }],
|
|
@@ -1454,6 +1519,7 @@
|
|
|
1454
1519
|
showRelatedProductsPopup: [{ type: i0.Input }],
|
|
1455
1520
|
settings: [{ type: i0.Input }],
|
|
1456
1521
|
handleAddArticleInternally: [{ type: i0.Input }],
|
|
1522
|
+
handleAddToCartInternally: [{ type: i0.Input }],
|
|
1457
1523
|
onAddToCart: [{ type: i0.Output }],
|
|
1458
1524
|
forceRenderImage: [{ type: i0.Output }],
|
|
1459
1525
|
onAlternativeClick: [{ type: i0.Output }],
|
|
@@ -1725,7 +1791,7 @@
|
|
|
1725
1791
|
this._ione.getFullArticle(this._sku).then(function (article) {
|
|
1726
1792
|
_this.article = article;
|
|
1727
1793
|
if (_this.article) {
|
|
1728
|
-
_this.configurable =
|
|
1794
|
+
_this.configurable = _this.article.goodType === 'B';
|
|
1729
1795
|
if (_this.configurable) {
|
|
1730
1796
|
_this.showAddToCart = false;
|
|
1731
1797
|
_this.currentView = SelectorType.TwoD;
|
|
@@ -1763,7 +1829,7 @@
|
|
|
1763
1829
|
ProductPageComponent.decorators = [
|
|
1764
1830
|
{ type: i0.Component, args: [{
|
|
1765
1831
|
selector: 'app-product-page',
|
|
1766
|
-
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
|
|
1832
|
+
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 (onAnswersAvailable)=\"appEventService.onAnswersAvailable.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 [createFrozenArticle]=\"createFrozenArticle\"\r\n [configuring]=\"configuring\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n (showRelatedPopup)=\"handlePopUpChange($event)\"\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 [showAddToCart]=\"showAddToCart\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\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 [externalSource]=\"externalSource\"\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\" [goodId]=\"article?.goodId\" (openStockEvent)=\"openStock()\"></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\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n [label]=\"'RELATED_PRODUCTS' | localize\">\r\n </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\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"4\"\r\n [isSmallModus]=\"false\"\r\n [label]=\"'ALTERNATIVE_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"showRelatedProductsPopup\">\r\n <co-product-dialog\r\n [mainArticle]=\"article\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n (closeRelatedPopup)=\"handlePopUpChange($event)\"\r\n >\r\n </co-product-dialog>\r\n\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\r\n\r\n </div>\r\n</ng-container>\r\n",
|
|
1767
1833
|
animations: [
|
|
1768
1834
|
animations.trigger('toggleFullScreen', [
|
|
1769
1835
|
animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -2402,12 +2468,11 @@
|
|
|
2402
2468
|
];
|
|
2403
2469
|
|
|
2404
2470
|
var ProductAddtocartComponent = /** @class */ (function () {
|
|
2405
|
-
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService
|
|
2471
|
+
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
2406
2472
|
this.iconCache = iconCache;
|
|
2407
2473
|
this._ioneControllerService = _ioneControllerService;
|
|
2408
2474
|
this._appEventService = _appEventService;
|
|
2409
2475
|
this._settingsService = _settingsService;
|
|
2410
|
-
this._productConnectorAdapterService = _productConnectorAdapterService;
|
|
2411
2476
|
this.icon = IconEnum;
|
|
2412
2477
|
this.createFrozenArticle = true;
|
|
2413
2478
|
this.configurable = false;
|
|
@@ -2449,52 +2514,40 @@
|
|
|
2449
2514
|
};
|
|
2450
2515
|
ProductAddtocartComponent.prototype.handleAddToCartClick = function (quantity) {
|
|
2451
2516
|
return __awaiter(this, void 0, void 0, function () {
|
|
2452
|
-
var article,
|
|
2517
|
+
var article, article, article;
|
|
2453
2518
|
return __generator(this, function (_a) {
|
|
2454
2519
|
switch (_a.label) {
|
|
2455
2520
|
case 0:
|
|
2456
|
-
if (!this.createFrozenArticle) return [3 /*break*/,
|
|
2457
|
-
if (!(this.article.goodType === 'B')) return [3 /*break*/,
|
|
2458
|
-
if (!this.article.isConfigurable) return [3 /*break*/, 2];
|
|
2521
|
+
if (!this.createFrozenArticle) return [3 /*break*/, 7];
|
|
2522
|
+
if (!(this.article.goodType === 'B')) return [3 /*break*/, 2];
|
|
2459
2523
|
return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
|
|
2460
2524
|
case 1:
|
|
2461
2525
|
article = _a.sent();
|
|
2462
2526
|
if (article) {
|
|
2463
2527
|
this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
|
|
2464
2528
|
}
|
|
2465
|
-
return [3 /*break*/,
|
|
2466
|
-
case 2:
|
|
2467
|
-
case 3:
|
|
2468
|
-
generatedGoodId = _a.sent();
|
|
2469
|
-
if (!generatedGoodId) return [3 /*break*/, 5];
|
|
2470
|
-
return [4 /*yield*/, this._productConnectorAdapterService.getArticleFullObject(generatedGoodId, true)];
|
|
2471
|
-
case 4:
|
|
2472
|
-
articleFull = _a.sent();
|
|
2473
|
-
article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(articleFull);
|
|
2474
|
-
this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
|
|
2475
|
-
_a.label = 5;
|
|
2476
|
-
case 5: return [3 /*break*/, 10];
|
|
2477
|
-
case 6:
|
|
2529
|
+
return [3 /*break*/, 6];
|
|
2530
|
+
case 2:
|
|
2478
2531
|
article = void 0;
|
|
2479
|
-
if (!!!this.externalSource) return [3 /*break*/,
|
|
2532
|
+
if (!!!this.externalSource) return [3 /*break*/, 4];
|
|
2480
2533
|
return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
|
|
2481
|
-
case
|
|
2534
|
+
case 3:
|
|
2482
2535
|
article = _a.sent();
|
|
2483
|
-
return [3 /*break*/,
|
|
2484
|
-
case
|
|
2536
|
+
return [3 /*break*/, 5];
|
|
2537
|
+
case 4:
|
|
2485
2538
|
article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
|
|
2486
|
-
_a.label =
|
|
2487
|
-
case
|
|
2539
|
+
_a.label = 5;
|
|
2540
|
+
case 5:
|
|
2488
2541
|
if (article) {
|
|
2489
2542
|
this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
|
|
2490
2543
|
}
|
|
2491
|
-
_a.label =
|
|
2492
|
-
case
|
|
2493
|
-
case
|
|
2544
|
+
_a.label = 6;
|
|
2545
|
+
case 6: return [3 /*break*/, 8];
|
|
2546
|
+
case 7:
|
|
2494
2547
|
article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
|
|
2495
2548
|
this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
|
|
2496
|
-
_a.label =
|
|
2497
|
-
case
|
|
2549
|
+
_a.label = 8;
|
|
2550
|
+
case 8: return [2 /*return*/];
|
|
2498
2551
|
}
|
|
2499
2552
|
});
|
|
2500
2553
|
});
|
|
@@ -2533,16 +2586,6 @@
|
|
|
2533
2586
|
});
|
|
2534
2587
|
});
|
|
2535
2588
|
};
|
|
2536
|
-
ProductAddtocartComponent.prototype._getGeneratedArtDirectly = function (goodId) {
|
|
2537
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2538
|
-
return __generator(this, function (_a) {
|
|
2539
|
-
switch (_a.label) {
|
|
2540
|
-
case 0: return [4 /*yield*/, this._ioneControllerService.getGeneratedArtDirectly(goodId, true)];
|
|
2541
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
2542
|
-
}
|
|
2543
|
-
});
|
|
2544
|
-
});
|
|
2545
|
-
};
|
|
2546
2589
|
return ProductAddtocartComponent;
|
|
2547
2590
|
}());
|
|
2548
2591
|
ProductAddtocartComponent.decorators = [
|
|
@@ -2556,8 +2599,7 @@
|
|
|
2556
2599
|
{ type: IconCacheService },
|
|
2557
2600
|
{ type: ProductConnectorService },
|
|
2558
2601
|
{ type: ProductEventService },
|
|
2559
|
-
{ type: ProductSettingsService }
|
|
2560
|
-
{ type: ProductConnectorAdapterService }
|
|
2602
|
+
{ type: ProductSettingsService }
|
|
2561
2603
|
]; };
|
|
2562
2604
|
ProductAddtocartComponent.propDecorators = {
|
|
2563
2605
|
addToCartButton: [{ type: i0.ViewChild, args: ['addtocartbutton', { read: i0.ElementRef },] }],
|
|
@@ -3952,6 +3994,7 @@
|
|
|
3952
3994
|
exports["ɵbn"] = ProductHdModule;
|
|
3953
3995
|
exports["ɵbo"] = ProductHdComponent;
|
|
3954
3996
|
exports["ɵbp"] = ProductScriptLoaderService;
|
|
3997
|
+
exports["ɵbq"] = LocalStorageService;
|
|
3955
3998
|
exports["ɵc"] = PipeModule;
|
|
3956
3999
|
exports["ɵd"] = LocalizePipe;
|
|
3957
4000
|
exports["ɵe"] = DictionaryService;
|