@colijnit/product 12.0.2 → 12.0.4
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-stock/product-stock.component.d.ts +9 -7
- package/app/service/product-connector-adapter.service.d.ts +1 -0
- package/app/service/product-connector.service.d.ts +1 -0
- package/app/service/product-settings.service.d.ts +1 -1
- package/bundles/colijnit-product.umd.js +92 -38
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/product-page/product-page.component.js +2 -2
- package/esm2015/app/components/product-stock/product-stock.component.js +30 -10
- package/esm2015/app/ione-product.component.js +19 -19
- package/esm2015/app/ione-product.module.js +7 -3
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/app/service/product-connector-adapter.service.js +12 -1
- package/esm2015/app/service/product-connector.service.js +4 -1
- package/esm2015/app/service/product-settings.service.js +8 -4
- package/esm2015/assets/dictionary/text.properties.js +3 -1
- package/fesm2015/colijnit-product.js +77 -35
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +6 -3
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { EventEmitter
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { SafeHtml } from '@angular/platform-browser';
|
|
3
3
|
import { ProductConnectorService } from '../../service/product-connector.service';
|
|
4
4
|
import { IconCacheService } from '../../service/icon-cache.service';
|
|
5
5
|
import { IconEnum } from '../../enum/icon.enum';
|
|
6
|
-
|
|
7
|
-
export declare class ProductStockComponent implements OnInit {
|
|
6
|
+
export declare class ProductStockComponent {
|
|
8
7
|
private _iOne;
|
|
9
8
|
private _iconCache;
|
|
10
9
|
readonly icon: typeof IconEnum;
|
|
11
|
-
set
|
|
12
|
-
|
|
13
|
-
iconData: SafeHtml;
|
|
10
|
+
set goodId(value: number);
|
|
11
|
+
get goodId(): number;
|
|
14
12
|
openStockEvent: EventEmitter<void>;
|
|
13
|
+
inStock: boolean;
|
|
14
|
+
stockLabel: string;
|
|
15
|
+
iconData: SafeHtml;
|
|
16
|
+
private _goodId;
|
|
15
17
|
constructor(_iOne: ProductConnectorService, _iconCache: IconCacheService);
|
|
16
|
-
ngOnInit(): void;
|
|
17
18
|
openStock(): void;
|
|
19
|
+
private _getStockStatus;
|
|
18
20
|
}
|
|
@@ -21,6 +21,7 @@ export declare class ProductConnectorAdapterService implements OnDestroy {
|
|
|
21
21
|
getProductBundleSettings(url: string, upId: number): Promise<string>;
|
|
22
22
|
getDeliveryPrognosis(goodId: number, branchNr?: string): Promise<any>;
|
|
23
23
|
getSelectorDeliveryDate(): Promise<DeliveryPrognosis>;
|
|
24
|
+
getArtStockStatus(goodId: number): Promise<number>;
|
|
24
25
|
getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
|
|
25
26
|
getJsonConfiguredArticles(configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
26
27
|
getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, showLoader?: boolean, instanceId?: any, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
@@ -28,6 +28,7 @@ export declare class ProductConnectorService implements OnDestroy {
|
|
|
28
28
|
getDocumentContent(docId: number, thumbnail?: boolean): Promise<DocumentContent>;
|
|
29
29
|
getDeliveryPrognosis(goodId: number): Promise<DeliveryPrognosis>;
|
|
30
30
|
getSelectorDeliveryDate(): Promise<DeliveryPrognosis>;
|
|
31
|
+
getArtStockStatus(goodId: number): Promise<number>;
|
|
31
32
|
getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
|
|
32
33
|
getSuperArticle(id: string): Promise<SuperArticle>;
|
|
33
34
|
getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, showLoader?: boolean, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
|
|
@@ -10,7 +10,7 @@ export declare class ProductSettingsService {
|
|
|
10
10
|
settingsLoaded: BehaviorSubject<boolean>;
|
|
11
11
|
private _settings;
|
|
12
12
|
constructor(_jsonUtilsService: JsonUtilsService, _dictionaryService: DictionaryService);
|
|
13
|
-
initializeSettings(): Promise<void>;
|
|
13
|
+
initializeSettings(finish?: boolean): Promise<void>;
|
|
14
14
|
createSettingsFromObject(obj: any): Promise<void>;
|
|
15
15
|
settingsFinished(): Promise<void>;
|
|
16
16
|
}
|
|
@@ -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/
|
|
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/
|
|
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.
|
|
5
|
-
})(this, (function (exports, i0, rxjs, options, articleFullObject, superArticle, articles, deliveryPrognosis, documentContent, businessObjectFactory, transaction, mainapi, i1, stringUtils, common, animations
|
|
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';
|
|
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.4";
|
|
35
|
+
this.publishDate = "16-10-2023 12:31:14";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -671,6 +671,25 @@
|
|
|
671
671
|
});
|
|
672
672
|
});
|
|
673
673
|
};
|
|
674
|
+
ProductConnectorAdapterService.prototype.getArtStockStatus = function (goodId) {
|
|
675
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
676
|
+
var response;
|
|
677
|
+
return __generator(this, function (_a) {
|
|
678
|
+
switch (_a.label) {
|
|
679
|
+
case 0: return [4 /*yield*/, this.articleConnector.getArtStockStatus(goodId)];
|
|
680
|
+
case 1:
|
|
681
|
+
response = _a.sent();
|
|
682
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
683
|
+
return [2 /*return*/, response.resultObject];
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
return [2 /*return*/, null];
|
|
687
|
+
}
|
|
688
|
+
return [2 /*return*/];
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
};
|
|
674
693
|
ProductConnectorAdapterService.prototype.getDeliveryDate2 = function (goodId) {
|
|
675
694
|
return __awaiter(this, void 0, void 0, function () {
|
|
676
695
|
var response;
|
|
@@ -847,6 +866,7 @@
|
|
|
847
866
|
"HEIGHT": "Hoogte",
|
|
848
867
|
"MATERIAL": "Materiaal",
|
|
849
868
|
"PRODUCT_IN_STOCK": "Op voorraad",
|
|
869
|
+
"PRODUCT_LIMITED_STOCK": "Beperkt op voorraad",
|
|
850
870
|
"PRODUCT_NOT_IN_STOCK": "Niet op voorraad",
|
|
851
871
|
"PROPERTIES": "Eigenschappen",
|
|
852
872
|
"QUOTATION": "Quotatie",
|
|
@@ -876,6 +896,7 @@
|
|
|
876
896
|
"HEIGHT": "Höhe",
|
|
877
897
|
"MATERIAL": "Material",
|
|
878
898
|
"PRODUCT_IN_STOCK": "Auf lager",
|
|
899
|
+
"PRODUCT_LIMITED_STOCK": "Begrentzt auf lager",
|
|
879
900
|
"PRODUCT_NOT_IN_STOCK": "Nicht auf lager",
|
|
880
901
|
"PROPERTIES": "Eigenschaften",
|
|
881
902
|
"QUOTATION": "Angebot",
|
|
@@ -995,7 +1016,8 @@
|
|
|
995
1016
|
enumerable: false,
|
|
996
1017
|
configurable: true
|
|
997
1018
|
});
|
|
998
|
-
ProductSettingsService.prototype.initializeSettings = function () {
|
|
1019
|
+
ProductSettingsService.prototype.initializeSettings = function (finish) {
|
|
1020
|
+
if (finish === void 0) { finish = true; }
|
|
999
1021
|
return __awaiter(this, void 0, void 0, function () {
|
|
1000
1022
|
var jsonSettings;
|
|
1001
1023
|
return __generator(this, function (_a) {
|
|
@@ -1008,13 +1030,17 @@
|
|
|
1008
1030
|
if (jsonSettings) {
|
|
1009
1031
|
this.settings = Object.assign(new ProductSettings(), jsonSettings);
|
|
1010
1032
|
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
1011
|
-
|
|
1033
|
+
if (finish) {
|
|
1034
|
+
this.settingsFinished();
|
|
1035
|
+
}
|
|
1012
1036
|
}
|
|
1013
1037
|
return [3 /*break*/, 3];
|
|
1014
1038
|
case 2:
|
|
1015
1039
|
this.settings = Object.assign(new ProductSettings(), settings);
|
|
1016
1040
|
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
1017
|
-
|
|
1041
|
+
if (finish) {
|
|
1042
|
+
this.settingsFinished();
|
|
1043
|
+
}
|
|
1018
1044
|
_a.label = 3;
|
|
1019
1045
|
case 3: return [2 /*return*/];
|
|
1020
1046
|
}
|
|
@@ -1174,6 +1200,9 @@
|
|
|
1174
1200
|
});
|
|
1175
1201
|
});
|
|
1176
1202
|
};
|
|
1203
|
+
ProductConnectorService.prototype.getArtStockStatus = function (goodId) {
|
|
1204
|
+
return this._adapterService.getArtStockStatus(goodId);
|
|
1205
|
+
};
|
|
1177
1206
|
ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
|
|
1178
1207
|
return this._adapterService.getDeliveryDate2(goodId);
|
|
1179
1208
|
};
|
|
@@ -1243,6 +1272,18 @@
|
|
|
1243
1272
|
var IoneProductComponent = /** @class */ (function () {
|
|
1244
1273
|
function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
|
|
1245
1274
|
var _this = this;
|
|
1275
|
+
// this.sku = 'CF-HILL';
|
|
1276
|
+
// this.sku = 'CF-ALMADA';
|
|
1277
|
+
// this.sku = 'CF-39904ANT';
|
|
1278
|
+
// this.sku = 'CF-22346001';
|
|
1279
|
+
// this.sku = '104';
|
|
1280
|
+
// this.sku = '1000561986';
|
|
1281
|
+
// this.sku = '1000567768';
|
|
1282
|
+
// this.sku = '1000234793';
|
|
1283
|
+
// this.sku = '1066';
|
|
1284
|
+
// this.sku = '104';
|
|
1285
|
+
// this.sku = "70000107";
|
|
1286
|
+
// this.sku = "grover";
|
|
1246
1287
|
this._dictionary = _dictionary;
|
|
1247
1288
|
this._jsonUtils = _jsonUtils;
|
|
1248
1289
|
this._ione = _ione;
|
|
@@ -1259,17 +1300,6 @@
|
|
|
1259
1300
|
this.openStockEvent = new i0.EventEmitter();
|
|
1260
1301
|
this.settingsLoaded = false;
|
|
1261
1302
|
this._subs = [];
|
|
1262
|
-
// this.sku = 'CF-HILL';
|
|
1263
|
-
// this.sku = 'CF-ALMADA';
|
|
1264
|
-
// this.sku = 'CF-39904ANT';
|
|
1265
|
-
// this.sku = 'CF-22346001';
|
|
1266
|
-
// this.sku = '104';
|
|
1267
|
-
// this.sku = '1000561986';
|
|
1268
|
-
// this.sku = '1000567768';
|
|
1269
|
-
this.sku = '1000234793';
|
|
1270
|
-
// this.sku = '1066';
|
|
1271
|
-
// this.sku = '104';
|
|
1272
|
-
// this.sku = "70000107";
|
|
1273
1303
|
this._subs.push(
|
|
1274
1304
|
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
1275
1305
|
this._appEventService.onAddToCart.subscribe(function (json) {
|
|
@@ -1284,15 +1314,12 @@
|
|
|
1284
1314
|
},
|
|
1285
1315
|
set: function (value) {
|
|
1286
1316
|
if (value) {
|
|
1287
|
-
var settings = void 0;
|
|
1288
1317
|
if (typeof value === 'string') {
|
|
1289
|
-
|
|
1318
|
+
this._settings = JSON.parse(value);
|
|
1290
1319
|
}
|
|
1291
1320
|
else {
|
|
1292
|
-
|
|
1321
|
+
this._settings = value;
|
|
1293
1322
|
}
|
|
1294
|
-
this._settingsService.createSettingsFromObject(settings);
|
|
1295
|
-
// this._initConnection(settings);
|
|
1296
1323
|
}
|
|
1297
1324
|
},
|
|
1298
1325
|
enumerable: false,
|
|
@@ -1302,9 +1329,12 @@
|
|
|
1302
1329
|
return __awaiter(this, void 0, void 0, function () {
|
|
1303
1330
|
return __generator(this, function (_a) {
|
|
1304
1331
|
switch (_a.label) {
|
|
1305
|
-
case 0: return [4 /*yield*/, this._settingsService.initializeSettings()];
|
|
1332
|
+
case 0: return [4 /*yield*/, this._settingsService.initializeSettings(this._settings === undefined)];
|
|
1306
1333
|
case 1:
|
|
1307
1334
|
_a.sent();
|
|
1335
|
+
if (this._settings) {
|
|
1336
|
+
this._settingsService.createSettingsFromObject(this._settings);
|
|
1337
|
+
}
|
|
1308
1338
|
return [2 /*return*/];
|
|
1309
1339
|
}
|
|
1310
1340
|
});
|
|
@@ -1385,7 +1415,6 @@
|
|
|
1385
1415
|
template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n (openStockEvent)=\"openStock()\" [sku]=\"sku\"\n ></app-product-page>\n ",
|
|
1386
1416
|
providers: [
|
|
1387
1417
|
ProductEventService,
|
|
1388
|
-
ProductSettingsService,
|
|
1389
1418
|
ProductConnectorAdapterService,
|
|
1390
1419
|
ProductConnectorService
|
|
1391
1420
|
],
|
|
@@ -1687,7 +1716,7 @@
|
|
|
1687
1716
|
ProductPageComponent.decorators = [
|
|
1688
1717
|
{ type: i0.Component, args: [{
|
|
1689
1718
|
selector: 'app-product-page',
|
|
1690
|
-
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\" (openStockEvent)=\"openStock()\"
|
|
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",
|
|
1691
1720
|
animations: [
|
|
1692
1721
|
animations.trigger('toggleFullScreen', [
|
|
1693
1722
|
animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -2509,29 +2538,51 @@
|
|
|
2509
2538
|
this._iconCache = _iconCache;
|
|
2510
2539
|
this.icon = IconEnum;
|
|
2511
2540
|
this.openStockEvent = new i0.EventEmitter();
|
|
2541
|
+
this.inStock = false;
|
|
2512
2542
|
this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
|
|
2513
2543
|
}
|
|
2514
|
-
Object.defineProperty(ProductStockComponent.prototype, "
|
|
2544
|
+
Object.defineProperty(ProductStockComponent.prototype, "goodId", {
|
|
2545
|
+
get: function () {
|
|
2546
|
+
return this._goodId;
|
|
2547
|
+
},
|
|
2515
2548
|
set: function (value) {
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
}
|
|
2549
|
+
this._goodId = value;
|
|
2550
|
+
this._getStockStatus();
|
|
2519
2551
|
},
|
|
2520
2552
|
enumerable: false,
|
|
2521
2553
|
configurable: true
|
|
2522
2554
|
});
|
|
2523
|
-
ProductStockComponent.prototype.ngOnInit = function () {
|
|
2524
|
-
};
|
|
2525
2555
|
ProductStockComponent.prototype.openStock = function () {
|
|
2526
2556
|
this.openStockEvent.emit();
|
|
2527
2557
|
};
|
|
2558
|
+
ProductStockComponent.prototype._getStockStatus = function () {
|
|
2559
|
+
var _this = this;
|
|
2560
|
+
if (this.goodId) {
|
|
2561
|
+
this._iOne.getArtStockStatus(this.goodId).then(function (result) {
|
|
2562
|
+
switch (result) {
|
|
2563
|
+
case 1: // niet op voorraad
|
|
2564
|
+
_this.stockLabel = 'PRODUCT_LIMITED_STOCK';
|
|
2565
|
+
_this.inStock = true;
|
|
2566
|
+
break;
|
|
2567
|
+
case 2:
|
|
2568
|
+
_this.stockLabel = 'PRODUCT_IN_STOCK';
|
|
2569
|
+
_this.inStock = true;
|
|
2570
|
+
break;
|
|
2571
|
+
default:
|
|
2572
|
+
_this.stockLabel = 'PRODUCT_NOT_IN_STOCK';
|
|
2573
|
+
_this.inStock = false;
|
|
2574
|
+
break;
|
|
2575
|
+
}
|
|
2576
|
+
});
|
|
2577
|
+
}
|
|
2578
|
+
};
|
|
2528
2579
|
return ProductStockComponent;
|
|
2529
2580
|
}());
|
|
2530
2581
|
ProductStockComponent.decorators = [
|
|
2531
2582
|
{ type: i0.Component, args: [{
|
|
2532
2583
|
selector: 'app-product-stock',
|
|
2533
|
-
template: "\n <!--<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\" (click)=\"openStock()\">\n <div class=\"pp-default-label
|
|
2534
|
-
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;cursor:pointer}.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;color:#2b60a7;text-decoration:underline}.product-stock-wrapper .product-stock-fields .pp-default-label:after{content:\"\";width:10px;height:10px;border-radius:10px;background:#
|
|
2584
|
+
template: "\n <!--<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\" (click)=\"openStock()\">\n <div class=\"pp-default-label\" [class.in-stock]=\"inStock\" [textContent]=\"stockLabel | localize\"></div>\n </div>\n </div>\n ",
|
|
2585
|
+
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;cursor:pointer}.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;color:#2b60a7;text-decoration:underline}.product-stock-wrapper .product-stock-fields .pp-default-label:after{content:\"\";width:10px;height:10px;border-radius:10px;background:#f15152;display:inline-block;margin:0 0 0 15px}.product-stock-wrapper .product-stock-fields .pp-default-label.in-stock:after{background:#74B77F}@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}}\n"]
|
|
2535
2586
|
},] }
|
|
2536
2587
|
];
|
|
2537
2588
|
ProductStockComponent.ctorParameters = function () { return [
|
|
@@ -2539,7 +2590,7 @@
|
|
|
2539
2590
|
{ type: IconCacheService }
|
|
2540
2591
|
]; };
|
|
2541
2592
|
ProductStockComponent.propDecorators = {
|
|
2542
|
-
|
|
2593
|
+
goodId: [{ type: i0.Input }],
|
|
2543
2594
|
openStockEvent: [{ type: i0.Output }]
|
|
2544
2595
|
};
|
|
2545
2596
|
|
|
@@ -3091,7 +3142,7 @@
|
|
|
3091
3142
|
IoneProductModule.decorators = [
|
|
3092
3143
|
{ type: i0.NgModule, args: [{
|
|
3093
3144
|
imports: [
|
|
3094
|
-
|
|
3145
|
+
// BrowserAnimationsModule,
|
|
3095
3146
|
common.CommonModule,
|
|
3096
3147
|
ProductPageModule
|
|
3097
3148
|
],
|
|
@@ -3103,6 +3154,9 @@
|
|
|
3103
3154
|
],
|
|
3104
3155
|
bootstrap: [
|
|
3105
3156
|
IoneProductComponent
|
|
3157
|
+
],
|
|
3158
|
+
providers: [
|
|
3159
|
+
ProductSettingsService
|
|
3106
3160
|
]
|
|
3107
3161
|
},] }
|
|
3108
3162
|
];
|