@colijnit/product 12.0.3 → 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/bundles/colijnit-product.umd.js +69 -19
- 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 +4 -3
- 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/assets/dictionary/text.properties.js +3 -1
- package/fesm2015/colijnit-product.js +55 -16
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +2 -2
|
@@ -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>;
|
|
@@ -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",
|
|
@@ -1179,6 +1200,9 @@
|
|
|
1179
1200
|
});
|
|
1180
1201
|
});
|
|
1181
1202
|
};
|
|
1203
|
+
ProductConnectorService.prototype.getArtStockStatus = function (goodId) {
|
|
1204
|
+
return this._adapterService.getArtStockStatus(goodId);
|
|
1205
|
+
};
|
|
1182
1206
|
ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
|
|
1183
1207
|
return this._adapterService.getDeliveryDate2(goodId);
|
|
1184
1208
|
};
|
|
@@ -1258,6 +1282,8 @@
|
|
|
1258
1282
|
// this.sku = '1000234793';
|
|
1259
1283
|
// this.sku = '1066';
|
|
1260
1284
|
// this.sku = '104';
|
|
1285
|
+
// this.sku = "70000107";
|
|
1286
|
+
// this.sku = "grover";
|
|
1261
1287
|
this._dictionary = _dictionary;
|
|
1262
1288
|
this._jsonUtils = _jsonUtils;
|
|
1263
1289
|
this._ione = _ione;
|
|
@@ -1274,7 +1300,6 @@
|
|
|
1274
1300
|
this.openStockEvent = new i0.EventEmitter();
|
|
1275
1301
|
this.settingsLoaded = false;
|
|
1276
1302
|
this._subs = [];
|
|
1277
|
-
// this.sku = "70000107";
|
|
1278
1303
|
this._subs.push(
|
|
1279
1304
|
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
1280
1305
|
this._appEventService.onAddToCart.subscribe(function (json) {
|
|
@@ -1304,7 +1329,7 @@
|
|
|
1304
1329
|
return __awaiter(this, void 0, void 0, function () {
|
|
1305
1330
|
return __generator(this, function (_a) {
|
|
1306
1331
|
switch (_a.label) {
|
|
1307
|
-
case 0: return [4 /*yield*/, this._settingsService.initializeSettings(this._settings
|
|
1332
|
+
case 0: return [4 /*yield*/, this._settingsService.initializeSettings(this._settings === undefined)];
|
|
1308
1333
|
case 1:
|
|
1309
1334
|
_a.sent();
|
|
1310
1335
|
if (this._settings) {
|
|
@@ -1691,7 +1716,7 @@
|
|
|
1691
1716
|
ProductPageComponent.decorators = [
|
|
1692
1717
|
{ type: i0.Component, args: [{
|
|
1693
1718
|
selector: 'app-product-page',
|
|
1694
|
-
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",
|
|
1695
1720
|
animations: [
|
|
1696
1721
|
animations.trigger('toggleFullScreen', [
|
|
1697
1722
|
animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -2513,29 +2538,51 @@
|
|
|
2513
2538
|
this._iconCache = _iconCache;
|
|
2514
2539
|
this.icon = IconEnum;
|
|
2515
2540
|
this.openStockEvent = new i0.EventEmitter();
|
|
2541
|
+
this.inStock = false;
|
|
2516
2542
|
this.iconData = this._iconCache.getIcon(this.icon.Warehouse);
|
|
2517
2543
|
}
|
|
2518
|
-
Object.defineProperty(ProductStockComponent.prototype, "
|
|
2544
|
+
Object.defineProperty(ProductStockComponent.prototype, "goodId", {
|
|
2545
|
+
get: function () {
|
|
2546
|
+
return this._goodId;
|
|
2547
|
+
},
|
|
2519
2548
|
set: function (value) {
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
}
|
|
2549
|
+
this._goodId = value;
|
|
2550
|
+
this._getStockStatus();
|
|
2523
2551
|
},
|
|
2524
2552
|
enumerable: false,
|
|
2525
2553
|
configurable: true
|
|
2526
2554
|
});
|
|
2527
|
-
ProductStockComponent.prototype.ngOnInit = function () {
|
|
2528
|
-
};
|
|
2529
2555
|
ProductStockComponent.prototype.openStock = function () {
|
|
2530
2556
|
this.openStockEvent.emit();
|
|
2531
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
|
+
};
|
|
2532
2579
|
return ProductStockComponent;
|
|
2533
2580
|
}());
|
|
2534
2581
|
ProductStockComponent.decorators = [
|
|
2535
2582
|
{ type: i0.Component, args: [{
|
|
2536
2583
|
selector: 'app-product-stock',
|
|
2537
|
-
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
|
|
2538
|
-
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"]
|
|
2539
2586
|
},] }
|
|
2540
2587
|
];
|
|
2541
2588
|
ProductStockComponent.ctorParameters = function () { return [
|
|
@@ -2543,7 +2590,7 @@
|
|
|
2543
2590
|
{ type: IconCacheService }
|
|
2544
2591
|
]; };
|
|
2545
2592
|
ProductStockComponent.propDecorators = {
|
|
2546
|
-
|
|
2593
|
+
goodId: [{ type: i0.Input }],
|
|
2547
2594
|
openStockEvent: [{ type: i0.Output }]
|
|
2548
2595
|
};
|
|
2549
2596
|
|
|
@@ -3095,7 +3142,7 @@
|
|
|
3095
3142
|
IoneProductModule.decorators = [
|
|
3096
3143
|
{ type: i0.NgModule, args: [{
|
|
3097
3144
|
imports: [
|
|
3098
|
-
|
|
3145
|
+
// BrowserAnimationsModule,
|
|
3099
3146
|
common.CommonModule,
|
|
3100
3147
|
ProductPageModule
|
|
3101
3148
|
],
|
|
@@ -3107,6 +3154,9 @@
|
|
|
3107
3154
|
],
|
|
3108
3155
|
bootstrap: [
|
|
3109
3156
|
IoneProductComponent
|
|
3157
|
+
],
|
|
3158
|
+
providers: [
|
|
3159
|
+
ProductSettingsService
|
|
3110
3160
|
]
|
|
3111
3161
|
},] }
|
|
3112
3162
|
];
|