@colijnit/product 1.9.3 → 1.9.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/image-carousel/image-carousel.component.d.ts +4 -4
- package/app/components/product-additional-description/product-additional-description.component.d.ts +3 -3
- package/app/components/product-additional-info/product-additional-info.component.d.ts +3 -3
- package/app/components/product-addtocart/product-addtocart.component.d.ts +6 -4
- package/app/components/product-delivery/product-delivery.component.d.ts +2 -2
- package/app/components/product-description/product-description.component.d.ts +1 -1
- package/app/components/product-documents/product-documents.component.d.ts +1 -1
- package/app/components/product-info/product-info.component.d.ts +1 -1
- package/app/components/product-info-tabs/product-info-tabs.component.d.ts +3 -3
- package/app/components/product-page/product-page.component.d.ts +8 -7
- package/app/components/product-properties/product-properties.component.d.ts +1 -1
- package/app/components/product-related/product-related.component.d.ts +4 -4
- package/app/components/product-stock/product-stock.component.d.ts +2 -2
- package/app/ione-product.component.d.ts +8 -8
- package/app/ione-product.module.d.ts +2 -2
- package/app/model/article-quantity.model.d.ts +1 -1
- package/app/product-version.d.ts +6 -0
- package/app/service/product-connector-adapter.service.d.ts +27 -0
- package/app/service/product-connector.service.d.ts +32 -0
- package/app/service/{app-event.service.d.ts → product-event.service.d.ts} +5 -5
- package/app/service/product-initializer.service.d.ts +6 -0
- package/app/service/product-module.service.d.ts +9 -0
- package/app/service/{settings.service.d.ts → product-settings.service.d.ts} +1 -1
- package/app/style/product-globals.scss +12 -10
- package/bundles/colijnit-product.umd.js +348 -264
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/bundles/colijnit-product.umd.min.js +2 -2
- package/bundles/colijnit-product.umd.min.js.map +1 -1
- package/colijnit-product.d.ts +6 -6
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/image-carousel/image-carousel.component.js +10 -8
- package/esm2015/app/components/product-additional-description/product-additional-description.component.js +3 -3
- package/esm2015/app/components/product-additional-info/product-additional-info.component.js +3 -3
- package/esm2015/app/components/product-addtocart/product-addtocart.component.js +18 -28
- package/esm2015/app/components/product-delivery/product-delivery.component.js +4 -4
- package/esm2015/app/components/product-description/product-description.component.js +1 -1
- package/esm2015/app/components/product-documents/product-documents.component.js +1 -1
- package/esm2015/app/components/product-info/product-info.component.js +1 -1
- package/esm2015/app/components/product-info-tabs/product-info-tabs.component.js +3 -3
- package/esm2015/app/components/product-page/product-page.component.js +13 -10
- package/esm2015/app/components/product-price/product-price.component.js +1 -1
- package/esm2015/app/components/product-properties/product-properties.component.js +1 -1
- package/esm2015/app/components/product-related/product-related.component.js +10 -6
- package/esm2015/app/components/product-stock/product-stock.component.js +3 -3
- package/esm2015/app/ione-product.component.js +12 -8
- package/esm2015/app/ione-product.module.js +9 -9
- package/esm2015/app/model/article-quantity.model.js +1 -1
- package/esm2015/app/product-version.js +10 -0
- package/esm2015/app/service/dictionary.service.js +2 -2
- package/esm2015/app/service/product-connector-adapter.service.js +128 -0
- package/esm2015/app/service/product-connector.service.js +108 -0
- package/esm2015/app/service/product-event.service.js +41 -0
- package/esm2015/app/service/product-initializer.service.js +26 -0
- package/esm2015/app/service/product-module.service.js +39 -0
- package/esm2015/app/service/product-settings.service.js +144 -0
- package/esm2015/colijnit-product.js +7 -7
- package/esm2015/public_api.js +2 -1
- package/esm5/app/components/image-carousel/image-carousel.component.js +10 -8
- package/esm5/app/components/product-additional-description/product-additional-description.component.js +3 -3
- package/esm5/app/components/product-additional-info/product-additional-info.component.js +3 -3
- package/esm5/app/components/product-addtocart/product-addtocart.component.js +20 -35
- package/esm5/app/components/product-delivery/product-delivery.component.js +4 -4
- package/esm5/app/components/product-description/product-description.component.js +1 -1
- package/esm5/app/components/product-documents/product-documents.component.js +1 -1
- package/esm5/app/components/product-info/product-info.component.js +1 -1
- package/esm5/app/components/product-info-tabs/product-info-tabs.component.js +3 -3
- package/esm5/app/components/product-page/product-page.component.js +13 -10
- package/esm5/app/components/product-price/product-price.component.js +1 -1
- package/esm5/app/components/product-properties/product-properties.component.js +1 -1
- package/esm5/app/components/product-related/product-related.component.js +10 -6
- package/esm5/app/components/product-stock/product-stock.component.js +3 -3
- package/esm5/app/ione-product.component.js +12 -8
- package/esm5/app/ione-product.module.js +9 -9
- package/esm5/app/model/article-quantity.model.js +1 -1
- package/esm5/app/product-version.js +12 -0
- package/esm5/app/service/dictionary.service.js +2 -2
- package/esm5/app/service/product-connector-adapter.service.js +197 -0
- package/esm5/app/service/product-connector.service.js +128 -0
- package/esm5/app/service/product-event.service.js +42 -0
- package/esm5/app/service/product-initializer.service.js +29 -0
- package/esm5/app/service/product-module.service.js +50 -0
- package/esm5/app/service/product-settings.service.js +167 -0
- package/esm5/colijnit-product.js +7 -7
- package/esm5/public_api.js +2 -1
- package/fesm2015/colijnit-product.js +235 -207
- package/fesm2015/colijnit-product.js.map +1 -1
- package/fesm5/colijnit-product.js +345 -256
- package/fesm5/colijnit-product.js.map +1 -1
- package/package.json +7 -5
- package/public_api.d.ts +1 -0
- package/app/service/app-initializer.service.d.ts +0 -6
- package/app/service/i-one-connector-adapter.service.d.ts +0 -27
- package/app/service/i-one-controller.service.d.ts +0 -37
- package/app/service/module.service.d.ts +0 -9
- package/app/utils/string-utils.d.ts +0 -21
- package/esm2015/app/service/app-event.service.js +0 -41
- package/esm2015/app/service/app-initializer.service.js +0 -26
- package/esm2015/app/service/i-one-connector-adapter.service.js +0 -58
- package/esm2015/app/service/i-one-controller.service.js +0 -117
- package/esm2015/app/service/module.service.js +0 -39
- package/esm2015/app/service/settings.service.js +0 -136
- package/esm2015/app/utils/string-utils.js +0 -51
- package/esm5/app/service/app-event.service.js +0 -42
- package/esm5/app/service/app-initializer.service.js +0 -29
- package/esm5/app/service/i-one-connector-adapter.service.js +0 -61
- package/esm5/app/service/i-one-controller.service.js +0 -131
- package/esm5/app/service/module.service.js +0 -50
- package/esm5/app/service/settings.service.js +0 -159
- package/esm5/app/utils/string-utils.js +0 -59
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import { __decorate, __awaiter } from 'tslib';
|
|
2
2
|
import { Input, Component, ɵɵdefineInjectable, Injectable, ɵɵinject, Output, Directive, ChangeDetectorRef, ViewChild, ElementRef, HostListener, HostBinding, Renderer2, SecurityContext, Pipe, EventEmitter, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import { ButtonModule, IconModule, NumberPickerModule, InputTextModule, FilesUploadModule, LoaderModule, ScrollContainerModule, TileModule, LevelIndicatorModule, PriceDisplayPipeModule, ArticleTileModule } from '@colijnit/corecomponents';
|
|
4
|
-
import { CoDocument } from '@colijnit
|
|
5
|
-
import { Options } from '@colijnit//ioneconnector/build/model/options';
|
|
4
|
+
import { CoDocument } from '@colijnit/mainapi/build/model/co-document';
|
|
6
5
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
7
|
-
import {
|
|
6
|
+
import { Options } from '@colijnit/ioneconnector/build/model/options';
|
|
7
|
+
import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
|
|
8
|
+
import { SuperArticle } from '@colijnit/articleapi/build/model/super-article';
|
|
9
|
+
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
10
|
+
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
11
|
+
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
12
|
+
import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
|
|
8
13
|
import { HttpClient } from '@angular/common/http';
|
|
9
|
-
import {
|
|
14
|
+
import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
|
|
10
15
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
11
16
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
17
|
+
import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
|
|
12
18
|
import { CommonModule } from '@angular/common';
|
|
13
19
|
|
|
20
|
+
// this file is dynamically created, do not change this
|
|
21
|
+
class Version {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.name = "@colijnit/product";
|
|
24
|
+
this.description = "Product detail page project for iOne";
|
|
25
|
+
this.symVer = "1.9.5";
|
|
26
|
+
this.publishDate = "21-6-2023 11:47:53";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
14
30
|
let ProductDescriptionComponent = class ProductDescriptionComponent {
|
|
15
31
|
constructor() { }
|
|
16
32
|
ngOnInit() {
|
|
@@ -29,55 +45,120 @@ ProductDescriptionComponent = __decorate([
|
|
|
29
45
|
|
|
30
46
|
// Sole responsibility is simply to wrap around a colijn.Connector to create a stable inner interface to the library in a 1:1 method way.
|
|
31
47
|
// Only to be used by the IOneControllerService.
|
|
32
|
-
let
|
|
48
|
+
let ProductConnectorAdapterService = class ProductConnectorAdapterService {
|
|
33
49
|
constructor() {
|
|
34
50
|
this.showLoader = new Subject();
|
|
51
|
+
this._boFactory = new BusinessObjectFactory();
|
|
35
52
|
}
|
|
36
53
|
ngOnDestroy() {
|
|
37
|
-
this.
|
|
54
|
+
this.articleConnector.showLoader.unsubscribe();
|
|
38
55
|
}
|
|
39
56
|
initConnector(options) {
|
|
40
|
-
this.
|
|
41
|
-
options.session = this.
|
|
42
|
-
this.
|
|
57
|
+
this.articleConnector = new Articles(options);
|
|
58
|
+
options.session = this.articleConnector.session;
|
|
59
|
+
this.articleConnector.showLoader.subscribe(value => this.showLoader.next(value));
|
|
43
60
|
}
|
|
44
61
|
setInstance(instanceId) {
|
|
45
|
-
this.
|
|
46
|
-
}
|
|
47
|
-
getDeliveryPrognosis(goodId) {
|
|
48
|
-
return this.connector.getDeliveryPrognosisForArticle(goodId);
|
|
62
|
+
// this.articleConnector.setInstanceToConfigure(instanceId, false);
|
|
49
63
|
}
|
|
50
|
-
|
|
51
|
-
return this
|
|
64
|
+
getDeliveryPrognosis(goodId, branchNr) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const deliveryPrognosis = yield this.getSelectorDeliveryDate();
|
|
67
|
+
if (!deliveryPrognosis || !deliveryPrognosis.returnValue) {
|
|
68
|
+
return this.getDeliveryDate2(goodId);
|
|
69
|
+
}
|
|
70
|
+
return deliveryPrognosis;
|
|
71
|
+
});
|
|
52
72
|
}
|
|
53
|
-
|
|
54
|
-
return this
|
|
73
|
+
getSelectorDeliveryDate() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const response = yield this.articleConnector.getSelectorDeliveryDate();
|
|
76
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
77
|
+
return this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
55
83
|
}
|
|
56
|
-
|
|
57
|
-
return this
|
|
84
|
+
getDeliveryDate2(goodId) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const response = yield this.articleConnector.getDeliveryDate2(goodId);
|
|
87
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
88
|
+
return this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
58
94
|
}
|
|
59
95
|
getJsonConfiguredArticles(configuratorStatistics) {
|
|
60
|
-
return this
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const response = yield this.articleConnector.getJsonConfiguredArticles(configuratorStatistics);
|
|
98
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
99
|
+
return response.resultObject;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return '';
|
|
103
|
+
}
|
|
104
|
+
});
|
|
61
105
|
}
|
|
62
|
-
getJsonArticleFlatTree(goodId) {
|
|
63
|
-
return this
|
|
106
|
+
getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId, configuratorStatistics) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
return this.articleConnector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
|
|
109
|
+
});
|
|
64
110
|
}
|
|
65
|
-
|
|
66
|
-
return this
|
|
111
|
+
getGoodIdFromArticleNr(sku) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const response = yield this.articleConnector.getGoodIdFromArticleNr(sku);
|
|
114
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
115
|
+
return response.resultObject;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
67
121
|
}
|
|
68
|
-
|
|
69
|
-
return this
|
|
122
|
+
getArticleFullObject(goodId) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const response = yield this.articleConnector.getArticleFullObject(goodId);
|
|
125
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
126
|
+
return this._boFactory.makeWithRawBackendData(ArticleFullObject, response.resultObject);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
getSuperArticle(id, branch) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const response = yield this.articleConnector.getSuperArticleQuickSel(id, branch);
|
|
136
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
137
|
+
return this._boFactory.makeWithRawBackendData(SuperArticle, response.resultObject);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
70
143
|
}
|
|
71
144
|
getDocumentContent(docId, thumbnail = true) {
|
|
72
|
-
return this
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const response = yield this.articleConnector.getDocumentContent(docId, thumbnail);
|
|
147
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
148
|
+
return this._boFactory.makeWithRawBackendData(DocumentContent, response.resultObject);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
73
154
|
}
|
|
74
155
|
};
|
|
75
|
-
|
|
76
|
-
|
|
156
|
+
ProductConnectorAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorAdapterService_Factory() { return new ProductConnectorAdapterService(); }, token: ProductConnectorAdapterService, providedIn: "root" });
|
|
157
|
+
ProductConnectorAdapterService = __decorate([
|
|
77
158
|
Injectable({
|
|
78
159
|
providedIn: 'root'
|
|
79
160
|
})
|
|
80
|
-
],
|
|
161
|
+
], ProductConnectorAdapterService);
|
|
81
162
|
|
|
82
163
|
let JsonUtilsService = class JsonUtilsService {
|
|
83
164
|
readJsonFile(filePath) {
|
|
@@ -113,57 +194,6 @@ var LanguageCode;
|
|
|
113
194
|
LanguageCode["French"] = "fr-FR";
|
|
114
195
|
})(LanguageCode || (LanguageCode = {}));
|
|
115
196
|
|
|
116
|
-
class StringUtils {
|
|
117
|
-
/**
|
|
118
|
-
* Returns a new string where given placeholder in given source string are replaced by given replacement texts.
|
|
119
|
-
*
|
|
120
|
-
* Example usage:
|
|
121
|
-
*
|
|
122
|
-
* source = "ABCDABCD"
|
|
123
|
-
* placeholder = "BC"
|
|
124
|
-
* replacementTexts = "Z", "Z" (REST arguments)
|
|
125
|
-
* OUTPUT = "AZDAZD"
|
|
126
|
-
*
|
|
127
|
-
* @param {string} source
|
|
128
|
-
* @param {string} placeholder
|
|
129
|
-
* @param {string} replacementTexts If only one is given, this function replaces all placeholders with that single replacementText.
|
|
130
|
-
* If more are given, placeholders without a corresponding replacementText will remain their original placeholder characters.
|
|
131
|
-
*/
|
|
132
|
-
static ReplaceOccurrencesIn(source, placeholder, ...replacementTexts) {
|
|
133
|
-
// parameter guards
|
|
134
|
-
if (!(source)) {
|
|
135
|
-
return undefined;
|
|
136
|
-
}
|
|
137
|
-
if (!placeholder || replacementTexts.length === 0) {
|
|
138
|
-
return source;
|
|
139
|
-
}
|
|
140
|
-
let outString = source;
|
|
141
|
-
// one replacementText means replace for all
|
|
142
|
-
if (replacementTexts.length === 1) {
|
|
143
|
-
// "g" is the g flag to replace globally
|
|
144
|
-
outString = outString.replace(new RegExp(this._escapeRegExp(placeholder), "g"), replacementTexts[0]);
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
// replace occurence i by replacementTexts[i], one at a time in loop (there might be a faster way..)
|
|
148
|
-
for (let i = 0, len = replacementTexts.length; i < len; i++) {
|
|
149
|
-
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return outString;
|
|
153
|
-
}
|
|
154
|
-
static IsString(str) {
|
|
155
|
-
return typeof str === 'string';
|
|
156
|
-
}
|
|
157
|
-
// Returns whether given str is a string and has a length > 0.
|
|
158
|
-
static IsStringWithLength(str) {
|
|
159
|
-
return str && StringUtils.IsString(str) && str.length > 0;
|
|
160
|
-
}
|
|
161
|
-
// Returns given string, escaped for use as string literal in regular expressions.
|
|
162
|
-
static _escapeRegExp(str) {
|
|
163
|
-
return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
197
|
class Dictionary {
|
|
168
198
|
constructor() {
|
|
169
199
|
this.strings = {
|
|
@@ -355,7 +385,7 @@ class Settings {
|
|
|
355
385
|
}
|
|
356
386
|
}
|
|
357
387
|
|
|
358
|
-
let
|
|
388
|
+
let ProductSettingsService = class ProductSettingsService {
|
|
359
389
|
constructor(_jsonUtilsService, _dictionaryService) {
|
|
360
390
|
this._jsonUtilsService = _jsonUtilsService;
|
|
361
391
|
this._dictionaryService = _dictionaryService;
|
|
@@ -372,9 +402,11 @@ let SettingsService = class SettingsService {
|
|
|
372
402
|
// see if there's a json file for application settings
|
|
373
403
|
if (typeof settings === 'undefined') {
|
|
374
404
|
const jsonSettings = yield this._jsonUtilsService.readJsonFile('product-settings.json');
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
405
|
+
if (jsonSettings) {
|
|
406
|
+
this.settings = Object.assign(new Settings(), jsonSettings);
|
|
407
|
+
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
408
|
+
this.settingsFinished();
|
|
409
|
+
}
|
|
378
410
|
}
|
|
379
411
|
else {
|
|
380
412
|
this.settings = Object.assign(new Settings(), settings);
|
|
@@ -475,28 +507,28 @@ let SettingsService = class SettingsService {
|
|
|
475
507
|
});
|
|
476
508
|
}
|
|
477
509
|
};
|
|
478
|
-
|
|
510
|
+
ProductSettingsService.ctorParameters = () => [
|
|
479
511
|
{ type: JsonUtilsService },
|
|
480
512
|
{ type: DictionaryService }
|
|
481
513
|
];
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
514
|
+
ProductSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(ɵɵinject(JsonUtilsService), ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
|
|
515
|
+
ProductSettingsService = __decorate([
|
|
516
|
+
Injectable({
|
|
517
|
+
providedIn: 'root'
|
|
518
|
+
})
|
|
519
|
+
], ProductSettingsService);
|
|
485
520
|
|
|
486
521
|
// Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
|
|
487
|
-
let
|
|
522
|
+
let ProductConnectorService = class ProductConnectorService {
|
|
488
523
|
constructor(connector, _settingsService) {
|
|
489
524
|
this.connector = connector;
|
|
490
525
|
this._settingsService = _settingsService;
|
|
491
526
|
this.controllerInitialized = new BehaviorSubject(false);
|
|
492
527
|
this._initializing = false;
|
|
493
528
|
this._initialized = false;
|
|
494
|
-
this.
|
|
529
|
+
this.connectorOptions = new Options();
|
|
495
530
|
this.subs = [];
|
|
496
531
|
}
|
|
497
|
-
get article() {
|
|
498
|
-
return this._article;
|
|
499
|
-
}
|
|
500
532
|
get shouldShowLoader() {
|
|
501
533
|
return this._shouldShowLoader;
|
|
502
534
|
}
|
|
@@ -514,18 +546,20 @@ let IOneControllerService = class IOneControllerService {
|
|
|
514
546
|
if (!settings) {
|
|
515
547
|
throw Error('Settings are not defined!');
|
|
516
548
|
}
|
|
517
|
-
this.
|
|
518
|
-
this.
|
|
519
|
-
this.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
525
|
-
this.
|
|
526
|
-
this.
|
|
527
|
-
this.
|
|
528
|
-
this.
|
|
549
|
+
this.connectorOptions.url = settings.url;
|
|
550
|
+
this.connectorOptions.schema = settings.schema;
|
|
551
|
+
this.connectorOptions.version = settings.version;
|
|
552
|
+
this.connectorOptions.branch = settings.branch;
|
|
553
|
+
this.connectorOptions.username = settings.username;
|
|
554
|
+
this.connectorOptions.password = settings.password;
|
|
555
|
+
this.connectorOptions.session = settings.session;
|
|
556
|
+
this.connectorOptions.currencyId = settings.currency;
|
|
557
|
+
this.connectorOptions.useGroups = settings.useGroups;
|
|
558
|
+
this.connectorOptions.useRenders = settings.useRenders;
|
|
559
|
+
this.connectorOptions.useLoginEncryption = settings.useEncryption;
|
|
560
|
+
this.connectorOptions.languageCode = settings.languageCode;
|
|
561
|
+
this.connector.initConnector(this.connectorOptions);
|
|
562
|
+
this._settingsService.settings.session = this.connectorOptions.session;
|
|
529
563
|
this.controllerInitialized.next(true);
|
|
530
564
|
this._initialized = true;
|
|
531
565
|
this._initializing = false;
|
|
@@ -538,8 +572,14 @@ let IOneControllerService = class IOneControllerService {
|
|
|
538
572
|
setInstance(instanceId) {
|
|
539
573
|
this.connector.setInstance(instanceId);
|
|
540
574
|
}
|
|
541
|
-
getFullArticle(
|
|
542
|
-
return this
|
|
575
|
+
getFullArticle(sku) {
|
|
576
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
577
|
+
const goodId = yield this.connector.getGoodIdFromArticleNr(sku);
|
|
578
|
+
if (goodId) {
|
|
579
|
+
return this.connector.getArticleFullObject(goodId);
|
|
580
|
+
}
|
|
581
|
+
return null;
|
|
582
|
+
});
|
|
543
583
|
}
|
|
544
584
|
getDocumentContent(docId, thumbnail = true) {
|
|
545
585
|
return this.connector.getDocumentContent(docId, thumbnail);
|
|
@@ -547,49 +587,36 @@ let IOneControllerService = class IOneControllerService {
|
|
|
547
587
|
getDeliveryPrognosis(goodId) {
|
|
548
588
|
return this.connector.getDeliveryPrognosis(goodId);
|
|
549
589
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
getTurnoverGroupImages() {
|
|
555
|
-
return this.connector.getTurnoverGroupImages();
|
|
590
|
+
getSelectorDeliveryDate() {
|
|
591
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
592
|
+
return this.connector.getSelectorDeliveryDate();
|
|
593
|
+
});
|
|
556
594
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
return this.connector.getSuperArticleImages();
|
|
595
|
+
getDeliveryDate2(goodId) {
|
|
596
|
+
return this.connector.getDeliveryDate2(goodId);
|
|
560
597
|
}
|
|
561
598
|
getSuperArticle(id) {
|
|
562
599
|
return this.connector.getSuperArticle(id);
|
|
563
600
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
configuratorStatistics.userType = 'iOneProductPage';
|
|
567
|
-
configuratorStatistics.transactionType = 'Sales';
|
|
568
|
-
configuratorStatistics.actionDomain = 'bundle';
|
|
569
|
-
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
570
|
-
configuratorStatistics.webHost = window.location.host;
|
|
571
|
-
configuratorStatistics.bundleHost = window.location.host;
|
|
572
|
-
return this.connector.getJsonConfiguredArticles(configuratorStatistics);
|
|
573
|
-
}
|
|
574
|
-
getJsonArticleFlatTree(goodId) {
|
|
575
|
-
return this.connector.getJsonArticleFlatTree(goodId);
|
|
601
|
+
getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId, configuratorStatistics) {
|
|
602
|
+
return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
|
|
576
603
|
}
|
|
577
604
|
onShowLoaderChange(showLoader) {
|
|
578
605
|
this._shouldShowLoader = showLoader;
|
|
579
606
|
}
|
|
580
607
|
};
|
|
581
|
-
|
|
582
|
-
{ type:
|
|
583
|
-
{ type:
|
|
608
|
+
ProductConnectorService.ctorParameters = () => [
|
|
609
|
+
{ type: ProductConnectorAdapterService },
|
|
610
|
+
{ type: ProductSettingsService }
|
|
584
611
|
];
|
|
585
|
-
|
|
586
|
-
|
|
612
|
+
ProductConnectorService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(ɵɵinject(ProductConnectorAdapterService), ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
|
|
613
|
+
ProductConnectorService = __decorate([
|
|
587
614
|
Injectable({
|
|
588
615
|
providedIn: 'root'
|
|
589
616
|
})
|
|
590
|
-
],
|
|
617
|
+
], ProductConnectorService);
|
|
591
618
|
|
|
592
|
-
let
|
|
619
|
+
let ProductEventService = class ProductEventService {
|
|
593
620
|
constructor() {
|
|
594
621
|
this.onAddToCart = new Subject();
|
|
595
622
|
this.onAlternativeClick = new Subject();
|
|
@@ -605,25 +632,25 @@ let AppEventService = class AppEventService {
|
|
|
605
632
|
this.onUpdateProductInfoTab = new Subject();
|
|
606
633
|
}
|
|
607
634
|
};
|
|
608
|
-
|
|
635
|
+
ProductEventService.ɵprov = ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
|
|
609
636
|
__decorate([
|
|
610
637
|
Output()
|
|
611
|
-
],
|
|
638
|
+
], ProductEventService.prototype, "onAddToCart", void 0);
|
|
612
639
|
__decorate([
|
|
613
640
|
Output()
|
|
614
|
-
],
|
|
641
|
+
], ProductEventService.prototype, "onAlternativeClick", void 0);
|
|
615
642
|
__decorate([
|
|
616
643
|
Output()
|
|
617
|
-
],
|
|
644
|
+
], ProductEventService.prototype, "onAddToQuote", void 0);
|
|
618
645
|
__decorate([
|
|
619
646
|
Output()
|
|
620
|
-
],
|
|
621
|
-
|
|
647
|
+
], ProductEventService.prototype, "onForceRenderImage", void 0);
|
|
648
|
+
ProductEventService = __decorate([
|
|
622
649
|
Directive(),
|
|
623
650
|
Injectable({
|
|
624
651
|
providedIn: 'root'
|
|
625
652
|
})
|
|
626
|
-
],
|
|
653
|
+
], ProductEventService);
|
|
627
654
|
|
|
628
655
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. **/
|
|
629
656
|
var IconEnum;
|
|
@@ -788,8 +815,10 @@ let ImageCarouselComponent = class ImageCarouselComponent {
|
|
|
788
815
|
if (this._images) {
|
|
789
816
|
this._images.forEach((i) => {
|
|
790
817
|
if (!i.documentBody && !i.filePath) {
|
|
791
|
-
this._ione.getDocumentContent(i.documentId, false).then((
|
|
792
|
-
|
|
818
|
+
this._ione.getDocumentContent(i.documentId, false).then((content) => {
|
|
819
|
+
if (content) {
|
|
820
|
+
i.documentBody = content.documentContent;
|
|
821
|
+
}
|
|
793
822
|
});
|
|
794
823
|
}
|
|
795
824
|
});
|
|
@@ -809,8 +838,8 @@ let ImageCarouselComponent = class ImageCarouselComponent {
|
|
|
809
838
|
}
|
|
810
839
|
};
|
|
811
840
|
ImageCarouselComponent.ctorParameters = () => [
|
|
812
|
-
{ type:
|
|
813
|
-
{ type:
|
|
841
|
+
{ type: ProductConnectorService },
|
|
842
|
+
{ type: ProductEventService },
|
|
814
843
|
{ type: ChangeDetectorRef },
|
|
815
844
|
{ type: DomSanitizer },
|
|
816
845
|
{ type: IconCacheService }
|
|
@@ -874,12 +903,15 @@ let ProductPageComponent = class ProductPageComponent {
|
|
|
874
903
|
this.show3D = false;
|
|
875
904
|
this.configuring = false;
|
|
876
905
|
this.fullscreenAnimationEnd = false;
|
|
906
|
+
this.settingsLoaded = false;
|
|
877
907
|
this._fullScreen = false;
|
|
878
908
|
this._subs = [];
|
|
879
909
|
this._subs.push(this.appEventService.onForceRenderImage.subscribe((x) => {
|
|
880
910
|
if (this.selections.nativeElement) {
|
|
881
911
|
this.selections.nativeElement.forceRenderImage();
|
|
882
912
|
}
|
|
913
|
+
}), this.settingsService.settingsLoaded.subscribe((loaded) => {
|
|
914
|
+
this.settingsLoaded = loaded;
|
|
883
915
|
}));
|
|
884
916
|
}
|
|
885
917
|
set sku(value) {
|
|
@@ -958,11 +990,11 @@ let ProductPageComponent = class ProductPageComponent {
|
|
|
958
990
|
if (this.configurable) {
|
|
959
991
|
this.currentView = SelectorType.TwoD;
|
|
960
992
|
}
|
|
961
|
-
this.threeD = this.article.
|
|
993
|
+
this.threeD = this.article.is3D;
|
|
962
994
|
this.selectorType = this.article.selectorTypeCustomer;
|
|
963
995
|
this._ione.getDeliveryPrognosis(this.article.goodId).then((stockInfo) => {
|
|
964
996
|
const stockAndDelivery = stockInfo;
|
|
965
|
-
this.stockAndDelivery = new StockAndDelivery(stockAndDelivery.
|
|
997
|
+
this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
|
|
966
998
|
this._changeDetector.detectChanges();
|
|
967
999
|
});
|
|
968
1000
|
this._changeDetector.detectChanges();
|
|
@@ -973,12 +1005,12 @@ let ProductPageComponent = class ProductPageComponent {
|
|
|
973
1005
|
}
|
|
974
1006
|
};
|
|
975
1007
|
ProductPageComponent.ctorParameters = () => [
|
|
976
|
-
{ type:
|
|
1008
|
+
{ type: ProductConnectorService },
|
|
977
1009
|
{ type: Renderer2 },
|
|
978
1010
|
{ type: ChangeDetectorRef },
|
|
979
1011
|
{ type: IconCacheService },
|
|
980
|
-
{ type:
|
|
981
|
-
{ type:
|
|
1012
|
+
{ type: ProductSettingsService },
|
|
1013
|
+
{ type: ProductEventService }
|
|
982
1014
|
];
|
|
983
1015
|
__decorate([
|
|
984
1016
|
ViewChild('configurator', { read: ElementRef })
|
|
@@ -995,7 +1027,7 @@ __decorate([
|
|
|
995
1027
|
ProductPageComponent = __decorate([
|
|
996
1028
|
Component({
|
|
997
1029
|
selector: 'app-product-page',
|
|
998
|
-
template: "<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 <threed-configurator #configurator class=\"threed-configurator\"\r\n
|
|
1030
|
+
template: "<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]=\"settingsService.settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"1\" [label]=\"'RELATED_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"4\" [isSmallModus]=\"false\" [label]=\"'ALTERNATIVE_PRODUCTS' | localize\"></app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
999
1031
|
animations: [
|
|
1000
1032
|
trigger('toggleFullScreen', [
|
|
1001
1033
|
state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1090,14 +1122,18 @@ let ProductRelatedComponent = class ProductRelatedComponent {
|
|
|
1090
1122
|
_loadImages() {
|
|
1091
1123
|
this._articles.forEach((a) => {
|
|
1092
1124
|
if (!a.image.documentBody) {
|
|
1093
|
-
this._iOne.getDocumentContent(a.image.documentId).then(
|
|
1125
|
+
this._iOne.getDocumentContent(a.image.documentId).then((content) => {
|
|
1126
|
+
if (content) {
|
|
1127
|
+
a.image.documentBody = content.documentContent;
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1094
1130
|
}
|
|
1095
1131
|
});
|
|
1096
1132
|
}
|
|
1097
1133
|
};
|
|
1098
1134
|
ProductRelatedComponent.ctorParameters = () => [
|
|
1099
|
-
{ type:
|
|
1100
|
-
{ type:
|
|
1135
|
+
{ type: ProductConnectorService },
|
|
1136
|
+
{ type: ProductEventService }
|
|
1101
1137
|
];
|
|
1102
1138
|
__decorate([
|
|
1103
1139
|
Input()
|
|
@@ -1172,7 +1208,7 @@ ProductInfoComponent = __decorate([
|
|
|
1172
1208
|
})
|
|
1173
1209
|
], ProductInfoComponent);
|
|
1174
1210
|
|
|
1175
|
-
let
|
|
1211
|
+
let ProductModuleService = class ProductModuleService {
|
|
1176
1212
|
constructor(_iOneConnectorService) {
|
|
1177
1213
|
this._iOneConnectorService = _iOneConnectorService;
|
|
1178
1214
|
this._superArticles = new Map();
|
|
@@ -1195,15 +1231,15 @@ let ModuleService = class ModuleService {
|
|
|
1195
1231
|
});
|
|
1196
1232
|
}
|
|
1197
1233
|
};
|
|
1198
|
-
|
|
1199
|
-
{ type:
|
|
1234
|
+
ProductModuleService.ctorParameters = () => [
|
|
1235
|
+
{ type: ProductConnectorService }
|
|
1200
1236
|
];
|
|
1201
|
-
|
|
1202
|
-
|
|
1237
|
+
ProductModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
|
|
1238
|
+
ProductModuleService = __decorate([
|
|
1203
1239
|
Injectable({
|
|
1204
1240
|
providedIn: 'root'
|
|
1205
1241
|
})
|
|
1206
|
-
],
|
|
1242
|
+
], ProductModuleService);
|
|
1207
1243
|
|
|
1208
1244
|
class BitUtils {
|
|
1209
1245
|
static IsShortDescription(bit) {
|
|
@@ -1299,7 +1335,7 @@ let ProductAdditionalInfoComponent = class ProductAdditionalInfoComponent {
|
|
|
1299
1335
|
};
|
|
1300
1336
|
ProductAdditionalInfoComponent.ctorParameters = () => [
|
|
1301
1337
|
{ type: DomSanitizer },
|
|
1302
|
-
{ type:
|
|
1338
|
+
{ type: ProductModuleService },
|
|
1303
1339
|
{ type: ChangeDetectorRef }
|
|
1304
1340
|
];
|
|
1305
1341
|
__decorate([
|
|
@@ -1415,7 +1451,7 @@ let ProductDeliveryComponent = class ProductDeliveryComponent {
|
|
|
1415
1451
|
};
|
|
1416
1452
|
ProductDeliveryComponent.ctorParameters = () => [
|
|
1417
1453
|
{ type: LocalizePipe },
|
|
1418
|
-
{ type:
|
|
1454
|
+
{ type: ProductConnectorService },
|
|
1419
1455
|
{ type: IconCacheService }
|
|
1420
1456
|
];
|
|
1421
1457
|
__decorate([
|
|
@@ -1424,7 +1460,7 @@ __decorate([
|
|
|
1424
1460
|
ProductDeliveryComponent = __decorate([
|
|
1425
1461
|
Component({
|
|
1426
1462
|
selector: 'app-product-delivery',
|
|
1427
|
-
template: "<!--<app-header [label]=\"'DELIVERY_TIME_PERIOD' | localize\"></app-header>-->\n<div class=\"product-delivery-wrapper\">\n <co-icon class=\"delivery-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-delivery-fields\">\n <div class=\"pp-default-label\" [textContent]=\"'DELIVERY_TIME_PERIOD' | localize\"></div>\n <div class=\"pp-default-description\" [textContent]=\"deliveryDescription\"></div>\n </div>\n</div>\n",
|
|
1463
|
+
template: "<!--<app-header [label]=\"'DELIVERY_TIME_PERIOD' | localize\"></app-header>-->\n<div class=\"product-delivery-wrapper\">\n <co-icon class=\"delivery-icon\" [iconData]=\"iconData\"></co-icon>\n <div class=\"product-delivery-fields\">\n <div class=\"pp-default-label\" [textContent]=\"'DELIVERY_TIME_PERIOD' | localize\"></div>\n <div class=\"pp-default-description\" [textContent]=\"deliveryDescription | date:'dd MMMM yyyy'\"></div>\n </div>\n</div>\n",
|
|
1428
1464
|
providers: [LocalizePipe],
|
|
1429
1465
|
styles: [":host{display:block}.product-delivery-wrapper{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #f6f5f4;padding:20px 15px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:40px;height:37px}.product-delivery-wrapper .product-delivery-fields{display:flex;flex-direction:column}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:14px;margin:0}@media screen and (max-width:400px){.product-delivery-wrapper{padding:15px 0 15px 10px}.product-delivery-wrapper .delivery-icon{margin:0 15px 0 0;width:32px;height:28px}.product-delivery-wrapper .product-delivery-fields .pp-default-label{font-size:13px}}"]
|
|
1430
1466
|
})
|
|
@@ -1446,7 +1482,7 @@ let ProductStockComponent = class ProductStockComponent {
|
|
|
1446
1482
|
}
|
|
1447
1483
|
};
|
|
1448
1484
|
ProductStockComponent.ctorParameters = () => [
|
|
1449
|
-
{ type:
|
|
1485
|
+
{ type: ProductConnectorService },
|
|
1450
1486
|
{ type: IconCacheService }
|
|
1451
1487
|
];
|
|
1452
1488
|
__decorate([
|
|
@@ -1558,10 +1594,11 @@ ProductPriceComponent = __decorate([
|
|
|
1558
1594
|
], ProductPriceComponent);
|
|
1559
1595
|
|
|
1560
1596
|
let ProductAddtocartComponent = class ProductAddtocartComponent {
|
|
1561
|
-
constructor(iconCache, _ioneControllerService, _appEventService) {
|
|
1597
|
+
constructor(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
1562
1598
|
this.iconCache = iconCache;
|
|
1563
1599
|
this._ioneControllerService = _ioneControllerService;
|
|
1564
1600
|
this._appEventService = _appEventService;
|
|
1601
|
+
this._settingsService = _settingsService;
|
|
1565
1602
|
this.icon = IconEnum;
|
|
1566
1603
|
this.configurable = false;
|
|
1567
1604
|
this.configuring = false;
|
|
@@ -1595,35 +1632,22 @@ let ProductAddtocartComponent = class ProductAddtocartComponent {
|
|
|
1595
1632
|
}
|
|
1596
1633
|
_getJSONFromArticleObject(article) {
|
|
1597
1634
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
returnObject.selectorData = selectorDataObject;
|
|
1607
|
-
const articleFlatTreeJson = yield this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId);
|
|
1608
|
-
if (articleFlatTreeJson) {
|
|
1609
|
-
returnObject.articleTree = JSON.parse(articleFlatTreeJson);
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
else { // treat as simple article
|
|
1613
|
-
returnObject.goodId = article.article.goodId;
|
|
1614
|
-
const articleFlatTreeJson = yield this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId);
|
|
1615
|
-
if (articleFlatTreeJson) {
|
|
1616
|
-
returnObject.articleTree = JSON.parse(articleFlatTreeJson);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
return JSON.stringify(returnObject);
|
|
1635
|
+
const configuratorStatistics = new ConfiguratorStatisticsEnvironment();
|
|
1636
|
+
configuratorStatistics.userType = 'iOneProductPage';
|
|
1637
|
+
configuratorStatistics.transactionType = 'Sales';
|
|
1638
|
+
configuratorStatistics.actionDomain = 'bundle';
|
|
1639
|
+
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
1640
|
+
configuratorStatistics.webHost = window.location.host;
|
|
1641
|
+
configuratorStatistics.bundleHost = window.location.host;
|
|
1642
|
+
return yield this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, undefined, configuratorStatistics);
|
|
1620
1643
|
});
|
|
1621
1644
|
}
|
|
1622
1645
|
};
|
|
1623
1646
|
ProductAddtocartComponent.ctorParameters = () => [
|
|
1624
1647
|
{ type: IconCacheService },
|
|
1625
|
-
{ type:
|
|
1626
|
-
{ type:
|
|
1648
|
+
{ type: ProductConnectorService },
|
|
1649
|
+
{ type: ProductEventService },
|
|
1650
|
+
{ type: ProductSettingsService }
|
|
1627
1651
|
];
|
|
1628
1652
|
__decorate([
|
|
1629
1653
|
ViewChild('addtocartbutton', { read: ElementRef })
|
|
@@ -1715,6 +1739,10 @@ let IoneProductComponent = class IoneProductComponent {
|
|
|
1715
1739
|
// this.sku = 'CF-39904ANT';
|
|
1716
1740
|
// this.sku = 'CF-22346001';
|
|
1717
1741
|
// this.sku = '104';
|
|
1742
|
+
// this.sku = '1000561986';
|
|
1743
|
+
// this.sku = '1000234793';
|
|
1744
|
+
// this.sku = '1066';
|
|
1745
|
+
// this.sku = '104';
|
|
1718
1746
|
this._dictionary = _dictionary;
|
|
1719
1747
|
this._jsonUtils = _jsonUtils;
|
|
1720
1748
|
this._ione = _ione;
|
|
@@ -1780,10 +1808,10 @@ let IoneProductComponent = class IoneProductComponent {
|
|
|
1780
1808
|
IoneProductComponent.ctorParameters = () => [
|
|
1781
1809
|
{ type: DictionaryService },
|
|
1782
1810
|
{ type: JsonUtilsService },
|
|
1783
|
-
{ type:
|
|
1811
|
+
{ type: ProductConnectorService },
|
|
1784
1812
|
{ type: ChangeDetectorRef },
|
|
1785
|
-
{ type:
|
|
1786
|
-
{ type:
|
|
1813
|
+
{ type: ProductEventService },
|
|
1814
|
+
{ type: ProductSettingsService }
|
|
1787
1815
|
];
|
|
1788
1816
|
__decorate([
|
|
1789
1817
|
Input()
|
|
@@ -1856,7 +1884,7 @@ let ProductAdditionalDescriptionComponent = class ProductAdditionalDescriptionCo
|
|
|
1856
1884
|
}
|
|
1857
1885
|
};
|
|
1858
1886
|
ProductAdditionalDescriptionComponent.ctorParameters = () => [
|
|
1859
|
-
{ type:
|
|
1887
|
+
{ type: ProductEventService }
|
|
1860
1888
|
];
|
|
1861
1889
|
__decorate([
|
|
1862
1890
|
Input()
|
|
@@ -1913,7 +1941,7 @@ let ProductInfoTabsComponent = class ProductInfoTabsComponent {
|
|
|
1913
1941
|
}
|
|
1914
1942
|
};
|
|
1915
1943
|
ProductInfoTabsComponent.ctorParameters = () => [
|
|
1916
|
-
{ type:
|
|
1944
|
+
{ type: ProductEventService }
|
|
1917
1945
|
];
|
|
1918
1946
|
__decorate([
|
|
1919
1947
|
ViewChild('tabContent')
|
|
@@ -1929,7 +1957,7 @@ ProductInfoTabsComponent = __decorate([
|
|
|
1929
1957
|
})
|
|
1930
1958
|
], ProductInfoTabsComponent);
|
|
1931
1959
|
|
|
1932
|
-
let
|
|
1960
|
+
let ProductInitializerService = class ProductInitializerService {
|
|
1933
1961
|
constructor(_settingsService) {
|
|
1934
1962
|
this._settingsService = _settingsService;
|
|
1935
1963
|
}
|
|
@@ -1939,15 +1967,15 @@ let AppInitializerService = class AppInitializerService {
|
|
|
1939
1967
|
});
|
|
1940
1968
|
}
|
|
1941
1969
|
};
|
|
1942
|
-
|
|
1943
|
-
{ type:
|
|
1970
|
+
ProductInitializerService.ctorParameters = () => [
|
|
1971
|
+
{ type: ProductSettingsService }
|
|
1944
1972
|
];
|
|
1945
|
-
|
|
1946
|
-
|
|
1973
|
+
ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
|
|
1974
|
+
ProductInitializerService = __decorate([
|
|
1947
1975
|
Injectable({
|
|
1948
1976
|
providedIn: 'root',
|
|
1949
1977
|
})
|
|
1950
|
-
],
|
|
1978
|
+
], ProductInitializerService);
|
|
1951
1979
|
|
|
1952
1980
|
function initializeApp(context) {
|
|
1953
1981
|
const x = () => context.initializeApp();
|
|
@@ -1998,14 +2026,14 @@ IoneProductModule = __decorate([
|
|
|
1998
2026
|
IoneProductComponent
|
|
1999
2027
|
],
|
|
2000
2028
|
providers: [
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2029
|
+
ProductSettingsService,
|
|
2030
|
+
ProductConnectorService,
|
|
2031
|
+
ProductConnectorAdapterService,
|
|
2004
2032
|
IconCacheService,
|
|
2005
2033
|
{
|
|
2006
2034
|
provide: APP_INITIALIZER,
|
|
2007
2035
|
useFactory: initializeApp,
|
|
2008
|
-
deps: [
|
|
2036
|
+
deps: [ProductInitializerService],
|
|
2009
2037
|
multi: true
|
|
2010
2038
|
}
|
|
2011
2039
|
],
|
|
@@ -2020,5 +2048,5 @@ IoneProductModule = __decorate([
|
|
|
2020
2048
|
* Generated bundle index. Do not edit.
|
|
2021
2049
|
*/
|
|
2022
2050
|
|
|
2023
|
-
export { IoneProductModule, initializeApp, IoneProductComponent as ɵa, DictionaryService as ɵb, ProductAdditionalDescriptionComponent as ɵba,
|
|
2051
|
+
export { IoneProductModule, Version, initializeApp, IoneProductComponent as ɵa, DictionaryService as ɵb, ProductAdditionalDescriptionComponent as ɵba, ProductInitializerService as ɵbb, JsonUtilsService as ɵc, ProductConnectorService as ɵd, ProductConnectorAdapterService as ɵe, ProductSettingsService as ɵf, ProductEventService as ɵg, ProductPageComponent as ɵh, IconCacheService as ɵi, ImageCarouselComponent as ɵj, ProductDescriptionComponent as ɵk, ProductDocumentsComponent as ɵl, ProductRelatedComponent as ɵm, HeaderComponent as ɵn, ProductInfoComponent as ɵo, ProductAdditionalInfoComponent as ɵp, ProductModuleService as ɵq, ProductPropertiesComponent as ɵr, ProductDeliveryComponent as ɵs, LocalizePipe as ɵt, ProductStockComponent as ɵu, ProductSymbolsComponent as ɵv, ProductPriceComponent as ɵw, ProductAddtocartComponent as ɵx, ProductInfoTabsComponent as ɵy, ProductSelectorTypeComponent as ɵz };
|
|
2024
2052
|
//# sourceMappingURL=colijnit-product.js.map
|