@colijnit/product 12.0.4 → 12.0.5
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-addtocart/product-addtocart.component.d.ts +1 -0
- package/app/components/product-external-source/product-external-source.component.d.ts +5 -1
- package/app/components/product-page/product-page.component.d.ts +1 -0
- package/app/ione-product.component.d.ts +6 -1
- package/app/service/product-connector-adapter.service.d.ts +3 -3
- package/app/service/product-connector.service.d.ts +3 -3
- package/app/service/product-event.service.d.ts +5 -1
- package/bundles/colijnit-product.umd.js +51 -90
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/product-addtocart/product-addtocart.component.js +10 -2
- package/esm2015/app/components/product-external-source/product-external-source.component.js +1 -1
- package/esm2015/app/components/product-page/product-page.component.js +4 -2
- package/esm2015/app/ione-product.component.js +8 -34
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/app/service/product-connector-adapter.service.js +15 -8
- package/esm2015/app/service/product-connector.service.js +6 -8
- package/esm2015/app/service/product-event.service.js +1 -1
- package/fesm2015/colijnit-product.js +40 -50
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
|
|
|
13
13
|
readonly icon: typeof IconEnum;
|
|
14
14
|
addToCartButton: ElementRef;
|
|
15
15
|
article: ArticleFullObject;
|
|
16
|
+
createFrozenArticle: boolean;
|
|
16
17
|
configurable: boolean;
|
|
17
18
|
configuring: boolean;
|
|
18
19
|
fullscreen: boolean;
|
|
@@ -4,6 +4,7 @@ import { ExternalSource } from '@colijnit/articleapi/build/model/external-source
|
|
|
4
4
|
import { ProductConnectorService } from '../../service/product-connector.service';
|
|
5
5
|
import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list-object';
|
|
6
6
|
import { ProductEventService } from '../../service/product-event.service';
|
|
7
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
7
8
|
export declare class ProductExternalSourceComponent implements OnInit, OnDestroy {
|
|
8
9
|
private _sanitizer;
|
|
9
10
|
private _productConnectorService;
|
|
@@ -12,7 +13,10 @@ export declare class ProductExternalSourceComponent implements OnInit, OnDestroy
|
|
|
12
13
|
set externalSource(value: ExternalSource);
|
|
13
14
|
get externalSource(): ExternalSource;
|
|
14
15
|
options: {};
|
|
15
|
-
addToCart: EventEmitter<
|
|
16
|
+
addToCart: EventEmitter<{
|
|
17
|
+
article: string | ArticleExtended;
|
|
18
|
+
quantity: number;
|
|
19
|
+
}>;
|
|
16
20
|
addToQuote: EventEmitter<string>;
|
|
17
21
|
alternativeClick: EventEmitter<ArticleListObject>;
|
|
18
22
|
showClass(): boolean;
|
|
@@ -21,6 +21,7 @@ export declare class ProductPageComponent implements OnInit, OnDestroy, AfterVie
|
|
|
21
21
|
set sku(value: string);
|
|
22
22
|
get sku(): string;
|
|
23
23
|
set settings(value: any);
|
|
24
|
+
createFrozenArticle: boolean;
|
|
24
25
|
openStockEvent: EventEmitter<void>;
|
|
25
26
|
get settings(): any;
|
|
26
27
|
set fullScreen(value: boolean);
|
|
@@ -7,6 +7,7 @@ import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list
|
|
|
7
7
|
import { ProductSettingsService } from './service/product-settings.service';
|
|
8
8
|
import { Selection } from '@colijnit/articleapi/build/model/selection';
|
|
9
9
|
import { ArticleQuickSel } from '@colijnit/articleapi/build/model/article-quick-sel';
|
|
10
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
10
11
|
export declare class IoneProductComponent implements OnInit, OnChanges, OnDestroy {
|
|
11
12
|
private _dictionary;
|
|
12
13
|
private _jsonUtils;
|
|
@@ -17,7 +18,11 @@ export declare class IoneProductComponent implements OnInit, OnChanges, OnDestro
|
|
|
17
18
|
sku: string;
|
|
18
19
|
set settings(value: any);
|
|
19
20
|
get settings(): any;
|
|
20
|
-
|
|
21
|
+
handleAddArticleInternally: boolean;
|
|
22
|
+
onAddToCart: EventEmitter<{
|
|
23
|
+
article: string | ArticleExtended;
|
|
24
|
+
quantity: number;
|
|
25
|
+
}>;
|
|
21
26
|
forceRenderImage: EventEmitter<void>;
|
|
22
27
|
onAlternativeClick: EventEmitter<ArticleListObject>;
|
|
23
28
|
onArticleInfoReceived: EventEmitter<string>;
|
|
@@ -5,10 +5,10 @@ import { SuperArticle } from '@colijnit/articleapi/build/model/super-article';
|
|
|
5
5
|
import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
|
|
6
6
|
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
7
7
|
import { Options } from '@colijnit/ioneconnector/build/model/options';
|
|
8
|
-
import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
|
|
9
8
|
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
10
9
|
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
11
10
|
import { Transaction } from '@colijnit/transactionapi/build/transaction';
|
|
11
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
12
12
|
export declare class ProductConnectorAdapterService implements OnDestroy {
|
|
13
13
|
readonly showLoader: Subject<boolean>;
|
|
14
14
|
articleConnector?: Articles;
|
|
@@ -19,6 +19,7 @@ export declare class ProductConnectorAdapterService implements OnDestroy {
|
|
|
19
19
|
initConnector(options: Options): Promise<void>;
|
|
20
20
|
setInstance(instanceId: string): void;
|
|
21
21
|
getProductBundleSettings(url: string, upId: number): Promise<string>;
|
|
22
|
+
convertArticleFullObjectToArticleExtended(article: ArticleFullObject): ArticleExtended;
|
|
22
23
|
getDeliveryPrognosis(goodId: number, branchNr?: string): Promise<any>;
|
|
23
24
|
getSelectorDeliveryDate(): Promise<DeliveryPrognosis>;
|
|
24
25
|
getArtStockStatus(goodId: number): Promise<number>;
|
|
@@ -29,6 +30,5 @@ export declare class ProductConnectorAdapterService implements OnDestroy {
|
|
|
29
30
|
getArticleFullObject(goodId: number): Promise<ArticleFullObject>;
|
|
30
31
|
getSuperArticle(id: string, branch?: string): Promise<SuperArticle>;
|
|
31
32
|
getDocumentContent(docId: number, thumbnail?: boolean): Promise<DocumentContent>;
|
|
32
|
-
addWebSessionTransactionLine(sku: string, quantity: number): Promise<
|
|
33
|
-
getWebTransaction(): Promise<DataServiceResponseData>;
|
|
33
|
+
addWebSessionTransactionLine(transactionUuid: string, sku: string, quantity: number): Promise<string>;
|
|
34
34
|
}
|
|
@@ -7,7 +7,7 @@ import { ProductSettingsService } from './product-settings.service';
|
|
|
7
7
|
import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
|
|
8
8
|
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
9
9
|
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
10
|
-
import {
|
|
10
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
11
11
|
export declare class ProductConnectorService implements OnDestroy {
|
|
12
12
|
private _adapterService;
|
|
13
13
|
private _settingsService;
|
|
@@ -24,6 +24,7 @@ export declare class ProductConnectorService implements OnDestroy {
|
|
|
24
24
|
initConnection(): Promise<void>;
|
|
25
25
|
getProductBundleSettings(url: string, upId: number): Promise<string>;
|
|
26
26
|
setInstance(instanceId: string): void;
|
|
27
|
+
convertArticleFullObjectToArticleExtended(article: ArticleFullObject): ArticleExtended;
|
|
27
28
|
getFullArticle(sku: string): Promise<ArticleFullObject>;
|
|
28
29
|
getDocumentContent(docId: number, thumbnail?: boolean): Promise<DocumentContent>;
|
|
29
30
|
getDeliveryPrognosis(goodId: number): Promise<DeliveryPrognosis>;
|
|
@@ -32,7 +33,6 @@ export declare class ProductConnectorService implements OnDestroy {
|
|
|
32
33
|
getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
|
|
33
34
|
getSuperArticle(id: string): Promise<SuperArticle>;
|
|
34
35
|
getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, showLoader?: boolean, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
35
|
-
addWebSessionTransactionLine(sku: string, quantity: number): Promise<
|
|
36
|
-
getWebTransaction(): void;
|
|
36
|
+
addWebSessionTransactionLine(transactionUuid: string, sku: string, quantity: number): Promise<string>;
|
|
37
37
|
onShowLoaderChange(showLoader: boolean): void;
|
|
38
38
|
}
|
|
@@ -2,8 +2,12 @@ import { Subject } from 'rxjs';
|
|
|
2
2
|
import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list-object';
|
|
3
3
|
import { Selection } from '@colijnit/articleapi/build/model/selection';
|
|
4
4
|
import { ArticleQuickSel } from '@colijnit/articleapi/build/model/article-quick-sel';
|
|
5
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
5
6
|
export declare class ProductEventService {
|
|
6
|
-
onAddToCart: Subject<
|
|
7
|
+
onAddToCart: Subject<{
|
|
8
|
+
article: string | ArticleExtended;
|
|
9
|
+
quantity: number;
|
|
10
|
+
}>;
|
|
7
11
|
onAlternativeClick: Subject<ArticleListObject>;
|
|
8
12
|
onAddToQuote: Subject<string>;
|
|
9
13
|
onForceRenderImage: Subject<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
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/animations'), require('@angular/platform-browser'), require('@colijnit/corecomponents'), require('@colijnit/mainapi/build/model/co-document'), 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/animations', '@angular/platform-browser', '@colijnit/corecomponents', '@colijnit/mainapi/build/model/co-document', '@colijnit/articleapi/build/model/configurator-statistics-environment'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : 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.animations, global.ng.platformBrowser, global.corecomponents, global.coDocument, global.configuratorStatisticsEnvironment));
|
|
5
|
-
})(this, (function (exports, i0, rxjs, options, articleFullObject, superArticle, articles, deliveryPrognosis, documentContent, businessObjectFactory, transaction, mainapi, i1, stringUtils, common, animations, i1$1, corecomponents, coDocument, configuratorStatisticsEnvironment) { 'use strict';
|
|
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('@colijnit/transactionapi/build/model/transaction-info-response.bo'), require('@colijnit/articleapi/build/model/article-extended.bo'), require('@angular/common/http'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@angular/common'), require('@angular/animations'), require('@angular/platform-browser'), require('@colijnit/corecomponents'), require('@colijnit/mainapi/build/model/co-document'), 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', '@colijnit/transactionapi/build/model/transaction-info-response.bo', '@colijnit/articleapi/build/model/article-extended.bo', '@angular/common/http', '@colijnit/ioneconnector/build/utils/string-utils', '@angular/common', '@angular/animations', '@angular/platform-browser', '@colijnit/corecomponents', '@colijnit/mainapi/build/model/co-document', '@colijnit/articleapi/build/model/configurator-statistics-environment'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : 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.transactionInfoResponse_bo, global.articleExtended_bo, global.ng.common.http, global.stringUtils, global.ng.common, global.ng.animations, global.ng.platformBrowser, global.corecomponents, global.coDocument, global.configuratorStatisticsEnvironment));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, options, articleFullObject, superArticle, articles, deliveryPrognosis, documentContent, businessObjectFactory, transaction, mainapi, transactionInfoResponse_bo, articleExtended_bo, i1, stringUtils, common, animations, i1$1, corecomponents, coDocument, configuratorStatisticsEnvironment) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -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 = "12.0.
|
|
35
|
-
this.publishDate = "
|
|
34
|
+
this.symVer = "12.0.5";
|
|
35
|
+
this.publishDate = "30-11-2023 11:58:33";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -636,6 +636,11 @@
|
|
|
636
636
|
});
|
|
637
637
|
});
|
|
638
638
|
};
|
|
639
|
+
ProductConnectorAdapterService.prototype.convertArticleFullObjectToArticleExtended = function (article) {
|
|
640
|
+
if (article) {
|
|
641
|
+
return this._boFactory.makeWithRawBackendData(articleExtended_bo.ArticleExtended, article);
|
|
642
|
+
}
|
|
643
|
+
};
|
|
639
644
|
ProductConnectorAdapterService.prototype.getDeliveryPrognosis = function (goodId, branchNr) {
|
|
640
645
|
return __awaiter(this, void 0, void 0, function () {
|
|
641
646
|
var deliveryPrognosis;
|
|
@@ -813,22 +818,19 @@
|
|
|
813
818
|
});
|
|
814
819
|
});
|
|
815
820
|
};
|
|
816
|
-
ProductConnectorAdapterService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
|
|
817
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
818
|
-
return __generator(this, function (_a) {
|
|
819
|
-
switch (_a.label) {
|
|
820
|
-
case 0: return [4 /*yield*/, this.transactionConnector.addWebSessionTransactionLine(sku, quantity)];
|
|
821
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
});
|
|
825
|
-
};
|
|
826
|
-
ProductConnectorAdapterService.prototype.getWebTransaction = function () {
|
|
821
|
+
ProductConnectorAdapterService.prototype.addWebSessionTransactionLine = function (transactionUuid, sku, quantity) {
|
|
827
822
|
return __awaiter(this, void 0, void 0, function () {
|
|
823
|
+
var response, infoResponse;
|
|
828
824
|
return __generator(this, function (_a) {
|
|
829
825
|
switch (_a.label) {
|
|
830
|
-
case 0: return [4 /*yield*/, this.transactionConnector.
|
|
831
|
-
case 1:
|
|
826
|
+
case 0: return [4 /*yield*/, this.transactionConnector.addWebSessionTransactionLine(transactionUuid, sku, quantity)];
|
|
827
|
+
case 1:
|
|
828
|
+
response = _a.sent();
|
|
829
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
830
|
+
infoResponse = this._boFactory.makeWithRawBackendData(transactionInfoResponse_bo.TransactionInfoResponse, response.resultObject);
|
|
831
|
+
return [2 /*return*/, infoResponse.transactionInfo.uuid];
|
|
832
|
+
}
|
|
833
|
+
return [2 /*return*/, ""];
|
|
832
834
|
}
|
|
833
835
|
});
|
|
834
836
|
});
|
|
@@ -1170,6 +1172,9 @@
|
|
|
1170
1172
|
this._instanceId = instanceId;
|
|
1171
1173
|
this._adapterService.setInstance(instanceId);
|
|
1172
1174
|
};
|
|
1175
|
+
ProductConnectorService.prototype.convertArticleFullObjectToArticleExtended = function (article) {
|
|
1176
|
+
return this._adapterService.convertArticleFullObjectToArticleExtended(article);
|
|
1177
|
+
};
|
|
1173
1178
|
ProductConnectorService.prototype.getFullArticle = function (sku) {
|
|
1174
1179
|
return __awaiter(this, void 0, void 0, function () {
|
|
1175
1180
|
var goodId;
|
|
@@ -1213,21 +1218,16 @@
|
|
|
1213
1218
|
if (showLoader === void 0) { showLoader = true; }
|
|
1214
1219
|
return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, this._instanceId, configuratorStatistics);
|
|
1215
1220
|
};
|
|
1216
|
-
ProductConnectorService.prototype.addWebSessionTransactionLine = function (sku, quantity) {
|
|
1221
|
+
ProductConnectorService.prototype.addWebSessionTransactionLine = function (transactionUuid, sku, quantity) {
|
|
1217
1222
|
return __awaiter(this, void 0, void 0, function () {
|
|
1218
1223
|
return __generator(this, function (_a) {
|
|
1219
1224
|
switch (_a.label) {
|
|
1220
|
-
case 0: return [4 /*yield*/, this._adapterService.addWebSessionTransactionLine(sku, quantity)];
|
|
1225
|
+
case 0: return [4 /*yield*/, this._adapterService.addWebSessionTransactionLine(transactionUuid, sku, quantity)];
|
|
1221
1226
|
case 1: return [2 /*return*/, _a.sent()];
|
|
1222
1227
|
}
|
|
1223
1228
|
});
|
|
1224
1229
|
});
|
|
1225
1230
|
};
|
|
1226
|
-
ProductConnectorService.prototype.getWebTransaction = function () {
|
|
1227
|
-
this._adapterService.getWebTransaction().then(function (response) {
|
|
1228
|
-
console.log(response);
|
|
1229
|
-
});
|
|
1230
|
-
};
|
|
1231
1231
|
ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
|
|
1232
1232
|
this._shouldShowLoader = showLoader;
|
|
1233
1233
|
};
|
|
@@ -1290,6 +1290,7 @@
|
|
|
1290
1290
|
this._changeDetector = _changeDetector;
|
|
1291
1291
|
this._appEventService = _appEventService;
|
|
1292
1292
|
this._settingsService = _settingsService;
|
|
1293
|
+
this.handleAddArticleInternally = true;
|
|
1293
1294
|
this.onAddToCart = new i0.EventEmitter();
|
|
1294
1295
|
this.forceRenderImage = new i0.EventEmitter();
|
|
1295
1296
|
this.onAlternativeClick = new i0.EventEmitter();
|
|
@@ -1302,8 +1303,8 @@
|
|
|
1302
1303
|
this._subs = [];
|
|
1303
1304
|
this._subs.push(
|
|
1304
1305
|
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
1305
|
-
this._appEventService.onAddToCart.subscribe(function (
|
|
1306
|
-
_this._handleAddToCart(
|
|
1306
|
+
this._appEventService.onAddToCart.subscribe(function (data) {
|
|
1307
|
+
_this._handleAddToCart(data);
|
|
1307
1308
|
}), 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) {
|
|
1308
1309
|
_this.settingsLoaded = loaded;
|
|
1309
1310
|
}));
|
|
@@ -1349,58 +1350,11 @@
|
|
|
1349
1350
|
IoneProductComponent.prototype._handleAnswerInfoReceived = function (info) {
|
|
1350
1351
|
this.onArticleInfoReceived.next(info);
|
|
1351
1352
|
};
|
|
1352
|
-
IoneProductComponent.prototype._handleAddToCart = function (
|
|
1353
|
+
IoneProductComponent.prototype._handleAddToCart = function (data) {
|
|
1353
1354
|
return __awaiter(this, void 0, void 0, function () {
|
|
1354
|
-
var articleTreeData, compositeGoods, _loop_1, this_1, i;
|
|
1355
1355
|
return __generator(this, function (_a) {
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
if (!this._settingsService.settings.createWebOrder) return [3 /*break*/, 7];
|
|
1359
|
-
if (!json) return [3 /*break*/, 7];
|
|
1360
|
-
articleTreeData = JSON.parse(json);
|
|
1361
|
-
if (!(articleTreeData.articleTree && articleTreeData.articleTree.article)) return [3 /*break*/, 7];
|
|
1362
|
-
if (!(articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
|
|
1363
|
-
articleTreeData.articleTree.compositeGoods.length > 0 &&
|
|
1364
|
-
articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles))) return [3 /*break*/, 5];
|
|
1365
|
-
compositeGoods = articleTreeData.articleTree.compositeGoods;
|
|
1366
|
-
compositeGoods.sort(function (a, b) { return a.versionNumber < b.versionNumber ? -1 : 1; });
|
|
1367
|
-
_loop_1 = function (i) {
|
|
1368
|
-
var good, subArticle;
|
|
1369
|
-
return __generator(this, function (_b) {
|
|
1370
|
-
switch (_b.label) {
|
|
1371
|
-
case 0:
|
|
1372
|
-
good = compositeGoods[i];
|
|
1373
|
-
subArticle = articleTreeData.articleTree.subArticles.find(function (s) { return s.goodId === good.memberGoodId; });
|
|
1374
|
-
if (!subArticle) return [3 /*break*/, 2];
|
|
1375
|
-
return [4 /*yield*/, this_1._ione.addWebSessionTransactionLine(subArticle.articleNumber, good.quantity)];
|
|
1376
|
-
case 1:
|
|
1377
|
-
_b.sent();
|
|
1378
|
-
_b.label = 2;
|
|
1379
|
-
case 2: return [2 /*return*/];
|
|
1380
|
-
}
|
|
1381
|
-
});
|
|
1382
|
-
};
|
|
1383
|
-
this_1 = this;
|
|
1384
|
-
i = 0;
|
|
1385
|
-
_a.label = 1;
|
|
1386
|
-
case 1:
|
|
1387
|
-
if (!(i < compositeGoods.length)) return [3 /*break*/, 4];
|
|
1388
|
-
return [5 /*yield**/, _loop_1(i)];
|
|
1389
|
-
case 2:
|
|
1390
|
-
_a.sent();
|
|
1391
|
-
_a.label = 3;
|
|
1392
|
-
case 3:
|
|
1393
|
-
i++;
|
|
1394
|
-
return [3 /*break*/, 1];
|
|
1395
|
-
case 4: return [3 /*break*/, 7];
|
|
1396
|
-
case 5: return [4 /*yield*/, this._ione.addWebSessionTransactionLine(articleTreeData.articleTree.article.articleNumber, 1)];
|
|
1397
|
-
case 6:
|
|
1398
|
-
_a.sent();
|
|
1399
|
-
_a.label = 7;
|
|
1400
|
-
case 7:
|
|
1401
|
-
this.onAddToCart.emit(json);
|
|
1402
|
-
return [2 /*return*/];
|
|
1403
|
-
}
|
|
1356
|
+
this.onAddToCart.emit(data);
|
|
1357
|
+
return [2 /*return*/];
|
|
1404
1358
|
});
|
|
1405
1359
|
});
|
|
1406
1360
|
};
|
|
@@ -1412,12 +1366,7 @@
|
|
|
1412
1366
|
IoneProductComponent.decorators = [
|
|
1413
1367
|
{ type: i0.Component, args: [{
|
|
1414
1368
|
selector: 'app-ione-product',
|
|
1415
|
-
template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n (openStockEvent)=\"openStock()\" [sku]=\"sku\"\n ></app-product-page>\n ",
|
|
1416
|
-
providers: [
|
|
1417
|
-
ProductEventService,
|
|
1418
|
-
ProductConnectorAdapterService,
|
|
1419
|
-
ProductConnectorService
|
|
1420
|
-
],
|
|
1369
|
+
template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n [createFrozenArticle]=\"handleAddArticleInternally\"\n (openStockEvent)=\"openStock()\" [sku]=\"sku\"\n ></app-product-page>\n ",
|
|
1421
1370
|
encapsulation: i0.ViewEncapsulation.Emulated,
|
|
1422
1371
|
styles: [""]
|
|
1423
1372
|
},] }
|
|
@@ -1433,6 +1382,7 @@
|
|
|
1433
1382
|
IoneProductComponent.propDecorators = {
|
|
1434
1383
|
sku: [{ type: i0.Input }],
|
|
1435
1384
|
settings: [{ type: i0.Input }],
|
|
1385
|
+
handleAddArticleInternally: [{ type: i0.Input }],
|
|
1436
1386
|
onAddToCart: [{ type: i0.Output }],
|
|
1437
1387
|
forceRenderImage: [{ type: i0.Output }],
|
|
1438
1388
|
onAlternativeClick: [{ type: i0.Output }],
|
|
@@ -1546,6 +1496,7 @@
|
|
|
1546
1496
|
this.settingsService = settingsService;
|
|
1547
1497
|
this.appEventService = appEventService;
|
|
1548
1498
|
this.icon = IconEnum;
|
|
1499
|
+
this.createFrozenArticle = true;
|
|
1549
1500
|
this.openStockEvent = new i0.EventEmitter();
|
|
1550
1501
|
this.configurable = false;
|
|
1551
1502
|
this.threeD = false;
|
|
@@ -1716,7 +1667,7 @@
|
|
|
1716
1667
|
ProductPageComponent.decorators = [
|
|
1717
1668
|
{ type: i0.Component, args: [{
|
|
1718
1669
|
selector: 'app-product-page',
|
|
1719
|
-
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\" [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 *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",
|
|
1670
|
+
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 [createFrozenArticle]=\"createFrozenArticle\"\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\" [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 *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",
|
|
1720
1671
|
animations: [
|
|
1721
1672
|
animations.trigger('toggleFullScreen', [
|
|
1722
1673
|
animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1766,6 +1717,7 @@
|
|
|
1766
1717
|
fullscreenbutton: [{ type: i0.ViewChild, args: ['fullscreenbutton', { read: i0.ElementRef },] }],
|
|
1767
1718
|
sku: [{ type: i0.Input }],
|
|
1768
1719
|
settings: [{ type: i0.Input }],
|
|
1720
|
+
createFrozenArticle: [{ type: i0.Input }],
|
|
1769
1721
|
openStockEvent: [{ type: i0.Output }]
|
|
1770
1722
|
};
|
|
1771
1723
|
|
|
@@ -2282,6 +2234,7 @@
|
|
|
2282
2234
|
this._appEventService = _appEventService;
|
|
2283
2235
|
this._settingsService = _settingsService;
|
|
2284
2236
|
this.icon = IconEnum;
|
|
2237
|
+
this.createFrozenArticle = true;
|
|
2285
2238
|
this.configurable = false;
|
|
2286
2239
|
this.configuring = false;
|
|
2287
2240
|
this.fullscreen = false;
|
|
@@ -2308,15 +2261,22 @@
|
|
|
2308
2261
|
};
|
|
2309
2262
|
ProductAddtocartComponent.prototype.handleAddToCartClick = function (quantity) {
|
|
2310
2263
|
return __awaiter(this, void 0, void 0, function () {
|
|
2311
|
-
var _a, _b;
|
|
2312
|
-
return __generator(this, function (
|
|
2313
|
-
switch (
|
|
2264
|
+
var _a, _b, _c, article;
|
|
2265
|
+
return __generator(this, function (_d) {
|
|
2266
|
+
switch (_d.label) {
|
|
2314
2267
|
case 0:
|
|
2268
|
+
if (!this.createFrozenArticle) return [3 /*break*/, 2];
|
|
2315
2269
|
_b = (_a = this._appEventService.onAddToCart).next;
|
|
2270
|
+
_c = {};
|
|
2316
2271
|
return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
|
|
2317
2272
|
case 1:
|
|
2318
|
-
_b.apply(_a, [_c.sent()]);
|
|
2319
|
-
return [
|
|
2273
|
+
_b.apply(_a, [(_c.article = _d.sent(), _c.quantity = quantity, _c)]);
|
|
2274
|
+
return [3 /*break*/, 3];
|
|
2275
|
+
case 2:
|
|
2276
|
+
article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
|
|
2277
|
+
this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
|
|
2278
|
+
_d.label = 3;
|
|
2279
|
+
case 3: return [2 /*return*/];
|
|
2320
2280
|
}
|
|
2321
2281
|
});
|
|
2322
2282
|
});
|
|
@@ -2373,6 +2333,7 @@
|
|
|
2373
2333
|
ProductAddtocartComponent.propDecorators = {
|
|
2374
2334
|
addToCartButton: [{ type: i0.ViewChild, args: ['addtocartbutton', { read: i0.ElementRef },] }],
|
|
2375
2335
|
article: [{ type: i0.Input }],
|
|
2336
|
+
createFrozenArticle: [{ type: i0.Input }],
|
|
2376
2337
|
configurable: [{ type: i0.Input }],
|
|
2377
2338
|
configuring: [{ type: i0.Input }],
|
|
2378
2339
|
fullscreen: [{ type: i0.HostBinding, args: ['class.full-screen',] }, { type: i0.Input }],
|