@colijnit/product 1.9.3 → 1.9.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/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 +340 -261
- 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 +9 -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 +142 -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 +9 -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 +165 -0
- package/esm5/colijnit-product.js +7 -7
- package/esm5/public_api.js +2 -1
- package/fesm2015/colijnit-product.js +227 -204
- package/fesm2015/colijnit-product.js.map +1 -1
- package/fesm5/colijnit-product.js +337 -253
- 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,33 @@
|
|
|
1
1
|
import { __decorate, __awaiter, __generator, __spread } 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 { BusinessObjectFactory } from '@colijnit/ioneconnector/build/factory/business-object-factory';
|
|
11
|
+
import { DeliveryPrognosis } from '@colijnit/articleapi/build/model/delivery-prognosis';
|
|
12
|
+
import { DocumentContent } from '@colijnit/articleapi/build/model/document-content';
|
|
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
|
+
var Version = /** @class */ (function () {
|
|
22
|
+
function Version() {
|
|
23
|
+
this.name = "@colijnit/product";
|
|
24
|
+
this.description = "Product detail page project for iOne";
|
|
25
|
+
this.symVer = "1.9.4";
|
|
26
|
+
this.publishDate = "20-4-2023 15:19:25";
|
|
27
|
+
}
|
|
28
|
+
return Version;
|
|
29
|
+
}());
|
|
30
|
+
|
|
14
31
|
var ProductDescriptionComponent = /** @class */ (function () {
|
|
15
32
|
function ProductDescriptionComponent() {
|
|
16
33
|
}
|
|
@@ -31,57 +48,188 @@ var ProductDescriptionComponent = /** @class */ (function () {
|
|
|
31
48
|
|
|
32
49
|
// 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.
|
|
33
50
|
// Only to be used by the IOneControllerService.
|
|
34
|
-
var
|
|
35
|
-
function
|
|
51
|
+
var ProductConnectorAdapterService = /** @class */ (function () {
|
|
52
|
+
function ProductConnectorAdapterService() {
|
|
36
53
|
this.showLoader = new Subject();
|
|
54
|
+
this._boFactory = new BusinessObjectFactory();
|
|
37
55
|
}
|
|
38
|
-
|
|
39
|
-
this.
|
|
56
|
+
ProductConnectorAdapterService.prototype.ngOnDestroy = function () {
|
|
57
|
+
this.articleConnector.showLoader.unsubscribe();
|
|
40
58
|
};
|
|
41
|
-
|
|
59
|
+
ProductConnectorAdapterService.prototype.initConnector = function (options) {
|
|
42
60
|
var _this = this;
|
|
43
|
-
this.
|
|
44
|
-
options.session = this.
|
|
45
|
-
this.
|
|
61
|
+
this.articleConnector = new Articles(options);
|
|
62
|
+
options.session = this.articleConnector.session;
|
|
63
|
+
this.articleConnector.showLoader.subscribe(function (value) { return _this.showLoader.next(value); });
|
|
46
64
|
};
|
|
47
|
-
|
|
48
|
-
this.
|
|
65
|
+
ProductConnectorAdapterService.prototype.setInstance = function (instanceId) {
|
|
66
|
+
// this.articleConnector.setInstanceToConfigure(instanceId, false);
|
|
49
67
|
};
|
|
50
|
-
|
|
51
|
-
return this
|
|
68
|
+
ProductConnectorAdapterService.prototype.getDeliveryPrognosis = function (goodId, branchNr) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var deliveryPrognosis;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0: return [4 /*yield*/, this.getSelectorDeliveryDate()];
|
|
74
|
+
case 1:
|
|
75
|
+
deliveryPrognosis = _a.sent();
|
|
76
|
+
if (!deliveryPrognosis || !deliveryPrognosis.returnValue) {
|
|
77
|
+
return [2 /*return*/, this.getDeliveryDate2(goodId)];
|
|
78
|
+
}
|
|
79
|
+
return [2 /*return*/, deliveryPrognosis];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
52
83
|
};
|
|
53
|
-
|
|
54
|
-
return this
|
|
84
|
+
ProductConnectorAdapterService.prototype.getSelectorDeliveryDate = function () {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
+
var response;
|
|
87
|
+
return __generator(this, function (_a) {
|
|
88
|
+
switch (_a.label) {
|
|
89
|
+
case 0: return [4 /*yield*/, this.articleConnector.getSelectorDeliveryDate()];
|
|
90
|
+
case 1:
|
|
91
|
+
response = _a.sent();
|
|
92
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
93
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject)];
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return [2 /*return*/, null];
|
|
97
|
+
}
|
|
98
|
+
return [2 /*return*/];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
55
102
|
};
|
|
56
|
-
|
|
57
|
-
return this
|
|
103
|
+
ProductConnectorAdapterService.prototype.getDeliveryDate2 = function (goodId) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
+
var response;
|
|
106
|
+
return __generator(this, function (_a) {
|
|
107
|
+
switch (_a.label) {
|
|
108
|
+
case 0: return [4 /*yield*/, this.articleConnector.getDeliveryDate2(goodId)];
|
|
109
|
+
case 1:
|
|
110
|
+
response = _a.sent();
|
|
111
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
112
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(DeliveryPrognosis, response.resultObject)];
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
return [2 /*return*/, null];
|
|
116
|
+
}
|
|
117
|
+
return [2 /*return*/];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
});
|
|
58
121
|
};
|
|
59
|
-
|
|
60
|
-
return this
|
|
122
|
+
ProductConnectorAdapterService.prototype.getJsonConfiguredArticles = function (configuratorStatistics) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
+
var response;
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
127
|
+
case 0: return [4 /*yield*/, this.articleConnector.getJsonConfiguredArticles(configuratorStatistics)];
|
|
128
|
+
case 1:
|
|
129
|
+
response = _a.sent();
|
|
130
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
131
|
+
return [2 /*return*/, response.resultObject];
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
return [2 /*return*/, ''];
|
|
135
|
+
}
|
|
136
|
+
return [2 /*return*/];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
61
140
|
};
|
|
62
|
-
|
|
63
|
-
|
|
141
|
+
ProductConnectorAdapterService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
|
|
142
|
+
if (showLoader === void 0) { showLoader = true; }
|
|
143
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
return [2 /*return*/, this.articleConnector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics)];
|
|
146
|
+
});
|
|
147
|
+
});
|
|
64
148
|
};
|
|
65
|
-
|
|
66
|
-
return this
|
|
149
|
+
ProductConnectorAdapterService.prototype.getGoodIdFromArticleNr = function (sku) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
+
var response;
|
|
152
|
+
return __generator(this, function (_a) {
|
|
153
|
+
switch (_a.label) {
|
|
154
|
+
case 0: return [4 /*yield*/, this.articleConnector.getGoodIdFromArticleNr(sku)];
|
|
155
|
+
case 1:
|
|
156
|
+
response = _a.sent();
|
|
157
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
158
|
+
return [2 /*return*/, response.resultObject];
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
return [2 /*return*/, null];
|
|
162
|
+
}
|
|
163
|
+
return [2 /*return*/];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
});
|
|
67
167
|
};
|
|
68
|
-
|
|
69
|
-
return this
|
|
168
|
+
ProductConnectorAdapterService.prototype.getArticleFullObject = function (goodId) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
+
var response;
|
|
171
|
+
return __generator(this, function (_a) {
|
|
172
|
+
switch (_a.label) {
|
|
173
|
+
case 0: return [4 /*yield*/, this.articleConnector.getArticleFullObject(goodId)];
|
|
174
|
+
case 1:
|
|
175
|
+
response = _a.sent();
|
|
176
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
177
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(ArticleFullObject, response.resultObject)];
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
return [2 /*return*/, null];
|
|
181
|
+
}
|
|
182
|
+
return [2 /*return*/];
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
70
186
|
};
|
|
71
|
-
|
|
72
|
-
return this
|
|
187
|
+
ProductConnectorAdapterService.prototype.getSuperArticle = function (id, branch) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
189
|
+
var response;
|
|
190
|
+
return __generator(this, function (_a) {
|
|
191
|
+
switch (_a.label) {
|
|
192
|
+
case 0: return [4 /*yield*/, this.articleConnector.getSuperArticleQuickSel(id, branch)];
|
|
193
|
+
case 1:
|
|
194
|
+
response = _a.sent();
|
|
195
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
196
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(SuperArticle, response.resultObject)];
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
return [2 /*return*/, null];
|
|
200
|
+
}
|
|
201
|
+
return [2 /*return*/];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
73
205
|
};
|
|
74
|
-
|
|
206
|
+
ProductConnectorAdapterService.prototype.getDocumentContent = function (docId, thumbnail) {
|
|
75
207
|
if (thumbnail === void 0) { thumbnail = true; }
|
|
76
|
-
return this
|
|
208
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
+
var response;
|
|
210
|
+
return __generator(this, function (_a) {
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0: return [4 /*yield*/, this.articleConnector.getDocumentContent(docId, thumbnail)];
|
|
213
|
+
case 1:
|
|
214
|
+
response = _a.sent();
|
|
215
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
216
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(DocumentContent, response.resultObject)];
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
return [2 /*return*/, null];
|
|
220
|
+
}
|
|
221
|
+
return [2 /*return*/];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
});
|
|
77
225
|
};
|
|
78
|
-
|
|
79
|
-
|
|
226
|
+
ProductConnectorAdapterService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorAdapterService_Factory() { return new ProductConnectorAdapterService(); }, token: ProductConnectorAdapterService, providedIn: "root" });
|
|
227
|
+
ProductConnectorAdapterService = __decorate([
|
|
80
228
|
Injectable({
|
|
81
229
|
providedIn: 'root'
|
|
82
230
|
})
|
|
83
|
-
],
|
|
84
|
-
return
|
|
231
|
+
], ProductConnectorAdapterService);
|
|
232
|
+
return ProductConnectorAdapterService;
|
|
85
233
|
}());
|
|
86
234
|
|
|
87
235
|
var JsonUtilsService = /** @class */ (function () {
|
|
@@ -130,64 +278,6 @@ var LanguageCode;
|
|
|
130
278
|
LanguageCode["French"] = "fr-FR";
|
|
131
279
|
})(LanguageCode || (LanguageCode = {}));
|
|
132
280
|
|
|
133
|
-
var StringUtils = /** @class */ (function () {
|
|
134
|
-
function StringUtils() {
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Returns a new string where given placeholder in given source string are replaced by given replacement texts.
|
|
138
|
-
*
|
|
139
|
-
* Example usage:
|
|
140
|
-
*
|
|
141
|
-
* source = "ABCDABCD"
|
|
142
|
-
* placeholder = "BC"
|
|
143
|
-
* replacementTexts = "Z", "Z" (REST arguments)
|
|
144
|
-
* OUTPUT = "AZDAZD"
|
|
145
|
-
*
|
|
146
|
-
* @param {string} source
|
|
147
|
-
* @param {string} placeholder
|
|
148
|
-
* @param {string} replacementTexts If only one is given, this function replaces all placeholders with that single replacementText.
|
|
149
|
-
* If more are given, placeholders without a corresponding replacementText will remain their original placeholder characters.
|
|
150
|
-
*/
|
|
151
|
-
StringUtils.ReplaceOccurrencesIn = function (source, placeholder) {
|
|
152
|
-
var replacementTexts = [];
|
|
153
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
154
|
-
replacementTexts[_i - 2] = arguments[_i];
|
|
155
|
-
}
|
|
156
|
-
// parameter guards
|
|
157
|
-
if (!(source)) {
|
|
158
|
-
return undefined;
|
|
159
|
-
}
|
|
160
|
-
if (!placeholder || replacementTexts.length === 0) {
|
|
161
|
-
return source;
|
|
162
|
-
}
|
|
163
|
-
var outString = source;
|
|
164
|
-
// one replacementText means replace for all
|
|
165
|
-
if (replacementTexts.length === 1) {
|
|
166
|
-
// "g" is the g flag to replace globally
|
|
167
|
-
outString = outString.replace(new RegExp(this._escapeRegExp(placeholder), "g"), replacementTexts[0]);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
// replace occurence i by replacementTexts[i], one at a time in loop (there might be a faster way..)
|
|
171
|
-
for (var i = 0, len = replacementTexts.length; i < len; i++) {
|
|
172
|
-
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return outString;
|
|
176
|
-
};
|
|
177
|
-
StringUtils.IsString = function (str) {
|
|
178
|
-
return typeof str === 'string';
|
|
179
|
-
};
|
|
180
|
-
// Returns whether given str is a string and has a length > 0.
|
|
181
|
-
StringUtils.IsStringWithLength = function (str) {
|
|
182
|
-
return str && StringUtils.IsString(str) && str.length > 0;
|
|
183
|
-
};
|
|
184
|
-
// Returns given string, escaped for use as string literal in regular expressions.
|
|
185
|
-
StringUtils._escapeRegExp = function (str) {
|
|
186
|
-
return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
|
|
187
|
-
};
|
|
188
|
-
return StringUtils;
|
|
189
|
-
}());
|
|
190
|
-
|
|
191
281
|
var Dictionary = /** @class */ (function () {
|
|
192
282
|
function Dictionary() {
|
|
193
283
|
this.strings = {
|
|
@@ -383,13 +473,13 @@ var Settings = /** @class */ (function () {
|
|
|
383
473
|
return Settings;
|
|
384
474
|
}());
|
|
385
475
|
|
|
386
|
-
var
|
|
387
|
-
function
|
|
476
|
+
var ProductSettingsService = /** @class */ (function () {
|
|
477
|
+
function ProductSettingsService(_jsonUtilsService, _dictionaryService) {
|
|
388
478
|
this._jsonUtilsService = _jsonUtilsService;
|
|
389
479
|
this._dictionaryService = _dictionaryService;
|
|
390
480
|
this.settingsLoaded = new BehaviorSubject(false);
|
|
391
481
|
}
|
|
392
|
-
Object.defineProperty(
|
|
482
|
+
Object.defineProperty(ProductSettingsService.prototype, "settings", {
|
|
393
483
|
get: function () {
|
|
394
484
|
return this._settings;
|
|
395
485
|
},
|
|
@@ -399,7 +489,7 @@ var SettingsService = /** @class */ (function () {
|
|
|
399
489
|
enumerable: true,
|
|
400
490
|
configurable: true
|
|
401
491
|
});
|
|
402
|
-
|
|
492
|
+
ProductSettingsService.prototype.initializeSettings = function () {
|
|
403
493
|
return __awaiter(this, void 0, void 0, function () {
|
|
404
494
|
var jsonSettings;
|
|
405
495
|
return __generator(this, function (_a) {
|
|
@@ -423,7 +513,7 @@ var SettingsService = /** @class */ (function () {
|
|
|
423
513
|
});
|
|
424
514
|
});
|
|
425
515
|
};
|
|
426
|
-
|
|
516
|
+
ProductSettingsService.prototype.createSettingsFromObject = function (obj) {
|
|
427
517
|
return __awaiter(this, void 0, void 0, function () {
|
|
428
518
|
return __generator(this, function (_a) {
|
|
429
519
|
if (!this.settings) {
|
|
@@ -511,7 +601,7 @@ var SettingsService = /** @class */ (function () {
|
|
|
511
601
|
});
|
|
512
602
|
});
|
|
513
603
|
};
|
|
514
|
-
|
|
604
|
+
ProductSettingsService.prototype.settingsFinished = function () {
|
|
515
605
|
return __awaiter(this, void 0, void 0, function () {
|
|
516
606
|
return __generator(this, function (_a) {
|
|
517
607
|
switch (_a.label) {
|
|
@@ -524,45 +614,41 @@ var SettingsService = /** @class */ (function () {
|
|
|
524
614
|
});
|
|
525
615
|
});
|
|
526
616
|
};
|
|
527
|
-
|
|
617
|
+
ProductSettingsService.ctorParameters = function () { return [
|
|
528
618
|
{ type: JsonUtilsService },
|
|
529
619
|
{ type: DictionaryService }
|
|
530
620
|
]; };
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
621
|
+
ProductSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function ProductSettingsService_Factory() { return new ProductSettingsService(ɵɵinject(JsonUtilsService), ɵɵinject(DictionaryService)); }, token: ProductSettingsService, providedIn: "root" });
|
|
622
|
+
ProductSettingsService = __decorate([
|
|
623
|
+
Injectable({
|
|
624
|
+
providedIn: 'root'
|
|
625
|
+
})
|
|
626
|
+
], ProductSettingsService);
|
|
627
|
+
return ProductSettingsService;
|
|
535
628
|
}());
|
|
536
629
|
|
|
537
630
|
// Holds all iONE backend related state and methods for a running HomeDecorator. To be used anywhere internally.
|
|
538
|
-
var
|
|
539
|
-
function
|
|
631
|
+
var ProductConnectorService = /** @class */ (function () {
|
|
632
|
+
function ProductConnectorService(connector, _settingsService) {
|
|
540
633
|
this.connector = connector;
|
|
541
634
|
this._settingsService = _settingsService;
|
|
542
635
|
this.controllerInitialized = new BehaviorSubject(false);
|
|
543
636
|
this._initializing = false;
|
|
544
637
|
this._initialized = false;
|
|
545
|
-
this.
|
|
638
|
+
this.connectorOptions = new Options();
|
|
546
639
|
this.subs = [];
|
|
547
640
|
}
|
|
548
|
-
Object.defineProperty(
|
|
549
|
-
get: function () {
|
|
550
|
-
return this._article;
|
|
551
|
-
},
|
|
552
|
-
enumerable: true,
|
|
553
|
-
configurable: true
|
|
554
|
-
});
|
|
555
|
-
Object.defineProperty(IOneControllerService.prototype, "shouldShowLoader", {
|
|
641
|
+
Object.defineProperty(ProductConnectorService.prototype, "shouldShowLoader", {
|
|
556
642
|
get: function () {
|
|
557
643
|
return this._shouldShowLoader;
|
|
558
644
|
},
|
|
559
645
|
enumerable: true,
|
|
560
646
|
configurable: true
|
|
561
647
|
});
|
|
562
|
-
|
|
648
|
+
ProductConnectorService.prototype.ngOnDestroy = function () {
|
|
563
649
|
this.subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
564
650
|
};
|
|
565
|
-
|
|
651
|
+
ProductConnectorService.prototype.initDefaultDevelopTestConnection = function () {
|
|
566
652
|
return __awaiter(this, void 0, void 0, function () {
|
|
567
653
|
var settings;
|
|
568
654
|
return __generator(this, function (_a) {
|
|
@@ -575,18 +661,20 @@ var IOneControllerService = /** @class */ (function () {
|
|
|
575
661
|
if (!settings) {
|
|
576
662
|
throw Error('Settings are not defined!');
|
|
577
663
|
}
|
|
578
|
-
this.
|
|
579
|
-
this.
|
|
580
|
-
this.
|
|
581
|
-
this.
|
|
582
|
-
this.
|
|
583
|
-
this.
|
|
584
|
-
this.
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
664
|
+
this.connectorOptions.url = settings.url;
|
|
665
|
+
this.connectorOptions.schema = settings.schema;
|
|
666
|
+
this.connectorOptions.version = settings.version;
|
|
667
|
+
this.connectorOptions.branch = settings.branch;
|
|
668
|
+
this.connectorOptions.username = settings.username;
|
|
669
|
+
this.connectorOptions.password = settings.password;
|
|
670
|
+
this.connectorOptions.session = settings.session;
|
|
671
|
+
this.connectorOptions.currencyId = settings.currency;
|
|
672
|
+
this.connectorOptions.useGroups = settings.useGroups;
|
|
673
|
+
this.connectorOptions.useRenders = settings.useRenders;
|
|
674
|
+
this.connectorOptions.useLoginEncryption = settings.useEncryption;
|
|
675
|
+
this.connectorOptions.languageCode = settings.languageCode;
|
|
676
|
+
this.connector.initConnector(this.connectorOptions);
|
|
677
|
+
this._settingsService.settings.session = this.connectorOptions.session;
|
|
590
678
|
this.controllerInitialized.next(true);
|
|
591
679
|
this._initialized = true;
|
|
592
680
|
this._initializing = false;
|
|
@@ -598,64 +686,67 @@ var IOneControllerService = /** @class */ (function () {
|
|
|
598
686
|
});
|
|
599
687
|
});
|
|
600
688
|
};
|
|
601
|
-
|
|
689
|
+
ProductConnectorService.prototype.setInstance = function (instanceId) {
|
|
602
690
|
this.connector.setInstance(instanceId);
|
|
603
691
|
};
|
|
604
|
-
|
|
605
|
-
return this
|
|
692
|
+
ProductConnectorService.prototype.getFullArticle = function (sku) {
|
|
693
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
694
|
+
var goodId;
|
|
695
|
+
return __generator(this, function (_a) {
|
|
696
|
+
switch (_a.label) {
|
|
697
|
+
case 0: return [4 /*yield*/, this.connector.getGoodIdFromArticleNr(sku)];
|
|
698
|
+
case 1:
|
|
699
|
+
goodId = _a.sent();
|
|
700
|
+
if (goodId) {
|
|
701
|
+
return [2 /*return*/, this.connector.getArticleFullObject(goodId)];
|
|
702
|
+
}
|
|
703
|
+
return [2 /*return*/, null];
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
});
|
|
606
707
|
};
|
|
607
|
-
|
|
708
|
+
ProductConnectorService.prototype.getDocumentContent = function (docId, thumbnail) {
|
|
608
709
|
if (thumbnail === void 0) { thumbnail = true; }
|
|
609
710
|
return this.connector.getDocumentContent(docId, thumbnail);
|
|
610
711
|
};
|
|
611
|
-
|
|
712
|
+
ProductConnectorService.prototype.getDeliveryPrognosis = function (goodId) {
|
|
612
713
|
return this.connector.getDeliveryPrognosis(goodId);
|
|
613
714
|
};
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
715
|
+
ProductConnectorService.prototype.getSelectorDeliveryDate = function () {
|
|
716
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
717
|
+
return __generator(this, function (_a) {
|
|
718
|
+
return [2 /*return*/, this.connector.getSelectorDeliveryDate()];
|
|
719
|
+
});
|
|
720
|
+
});
|
|
620
721
|
};
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
return this.connector.getSuperArticleImages();
|
|
722
|
+
ProductConnectorService.prototype.getDeliveryDate2 = function (goodId) {
|
|
723
|
+
return this.connector.getDeliveryDate2(goodId);
|
|
624
724
|
};
|
|
625
|
-
|
|
725
|
+
ProductConnectorService.prototype.getSuperArticle = function (id) {
|
|
626
726
|
return this.connector.getSuperArticle(id);
|
|
627
727
|
};
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
configuratorStatistics.transactionType = 'Sales';
|
|
632
|
-
configuratorStatistics.actionDomain = 'bundle';
|
|
633
|
-
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
634
|
-
configuratorStatistics.webHost = window.location.host;
|
|
635
|
-
configuratorStatistics.bundleHost = window.location.host;
|
|
636
|
-
return this.connector.getJsonConfiguredArticles(configuratorStatistics);
|
|
637
|
-
};
|
|
638
|
-
IOneControllerService.prototype.getJsonArticleFlatTree = function (goodId) {
|
|
639
|
-
return this.connector.getJsonArticleFlatTree(goodId);
|
|
728
|
+
ProductConnectorService.prototype.getJsonArticleFlatTree = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
|
|
729
|
+
if (showLoader === void 0) { showLoader = true; }
|
|
730
|
+
return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
|
|
640
731
|
};
|
|
641
|
-
|
|
732
|
+
ProductConnectorService.prototype.onShowLoaderChange = function (showLoader) {
|
|
642
733
|
this._shouldShowLoader = showLoader;
|
|
643
734
|
};
|
|
644
|
-
|
|
645
|
-
{ type:
|
|
646
|
-
{ type:
|
|
735
|
+
ProductConnectorService.ctorParameters = function () { return [
|
|
736
|
+
{ type: ProductConnectorAdapterService },
|
|
737
|
+
{ type: ProductSettingsService }
|
|
647
738
|
]; };
|
|
648
|
-
|
|
649
|
-
|
|
739
|
+
ProductConnectorService.ɵprov = ɵɵdefineInjectable({ factory: function ProductConnectorService_Factory() { return new ProductConnectorService(ɵɵinject(ProductConnectorAdapterService), ɵɵinject(ProductSettingsService)); }, token: ProductConnectorService, providedIn: "root" });
|
|
740
|
+
ProductConnectorService = __decorate([
|
|
650
741
|
Injectable({
|
|
651
742
|
providedIn: 'root'
|
|
652
743
|
})
|
|
653
|
-
],
|
|
654
|
-
return
|
|
744
|
+
], ProductConnectorService);
|
|
745
|
+
return ProductConnectorService;
|
|
655
746
|
}());
|
|
656
747
|
|
|
657
|
-
var
|
|
658
|
-
function
|
|
748
|
+
var ProductEventService = /** @class */ (function () {
|
|
749
|
+
function ProductEventService() {
|
|
659
750
|
this.onAddToCart = new Subject();
|
|
660
751
|
this.onAlternativeClick = new Subject();
|
|
661
752
|
this.onAddToQuote = new Subject();
|
|
@@ -669,26 +760,26 @@ var AppEventService = /** @class */ (function () {
|
|
|
669
760
|
this.onArticleInfoReceived = new Subject();
|
|
670
761
|
this.onUpdateProductInfoTab = new Subject();
|
|
671
762
|
}
|
|
672
|
-
|
|
763
|
+
ProductEventService.ɵprov = ɵɵdefineInjectable({ factory: function ProductEventService_Factory() { return new ProductEventService(); }, token: ProductEventService, providedIn: "root" });
|
|
673
764
|
__decorate([
|
|
674
765
|
Output()
|
|
675
|
-
],
|
|
766
|
+
], ProductEventService.prototype, "onAddToCart", void 0);
|
|
676
767
|
__decorate([
|
|
677
768
|
Output()
|
|
678
|
-
],
|
|
769
|
+
], ProductEventService.prototype, "onAlternativeClick", void 0);
|
|
679
770
|
__decorate([
|
|
680
771
|
Output()
|
|
681
|
-
],
|
|
772
|
+
], ProductEventService.prototype, "onAddToQuote", void 0);
|
|
682
773
|
__decorate([
|
|
683
774
|
Output()
|
|
684
|
-
],
|
|
685
|
-
|
|
775
|
+
], ProductEventService.prototype, "onForceRenderImage", void 0);
|
|
776
|
+
ProductEventService = __decorate([
|
|
686
777
|
Directive(),
|
|
687
778
|
Injectable({
|
|
688
779
|
providedIn: 'root'
|
|
689
780
|
})
|
|
690
|
-
],
|
|
691
|
-
return
|
|
781
|
+
], ProductEventService);
|
|
782
|
+
return ProductEventService;
|
|
692
783
|
}());
|
|
693
784
|
|
|
694
785
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. **/
|
|
@@ -870,8 +961,10 @@ var ImageCarouselComponent = /** @class */ (function () {
|
|
|
870
961
|
if (this._images) {
|
|
871
962
|
this._images.forEach(function (i) {
|
|
872
963
|
if (!i.documentBody && !i.filePath) {
|
|
873
|
-
_this._ione.getDocumentContent(i.documentId, false).then(function (
|
|
874
|
-
|
|
964
|
+
_this._ione.getDocumentContent(i.documentId, false).then(function (content) {
|
|
965
|
+
if (content) {
|
|
966
|
+
i.documentBody = content.documentContent;
|
|
967
|
+
}
|
|
875
968
|
});
|
|
876
969
|
}
|
|
877
970
|
});
|
|
@@ -890,8 +983,8 @@ var ImageCarouselComponent = /** @class */ (function () {
|
|
|
890
983
|
}
|
|
891
984
|
};
|
|
892
985
|
ImageCarouselComponent.ctorParameters = function () { return [
|
|
893
|
-
{ type:
|
|
894
|
-
{ type:
|
|
986
|
+
{ type: ProductConnectorService },
|
|
987
|
+
{ type: ProductEventService },
|
|
895
988
|
{ type: ChangeDetectorRef },
|
|
896
989
|
{ type: DomSanitizer },
|
|
897
990
|
{ type: IconCacheService }
|
|
@@ -959,12 +1052,15 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
959
1052
|
this.show3D = false;
|
|
960
1053
|
this.configuring = false;
|
|
961
1054
|
this.fullscreenAnimationEnd = false;
|
|
1055
|
+
this.settingsLoaded = false;
|
|
962
1056
|
this._fullScreen = false;
|
|
963
1057
|
this._subs = [];
|
|
964
1058
|
this._subs.push(this.appEventService.onForceRenderImage.subscribe(function (x) {
|
|
965
1059
|
if (_this.selections.nativeElement) {
|
|
966
1060
|
_this.selections.nativeElement.forceRenderImage();
|
|
967
1061
|
}
|
|
1062
|
+
}), this.settingsService.settingsLoaded.subscribe(function (loaded) {
|
|
1063
|
+
_this.settingsLoaded = loaded;
|
|
968
1064
|
}));
|
|
969
1065
|
}
|
|
970
1066
|
Object.defineProperty(ProductPageComponent.prototype, "sku", {
|
|
@@ -1063,11 +1159,11 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1063
1159
|
if (_this.configurable) {
|
|
1064
1160
|
_this.currentView = SelectorType.TwoD;
|
|
1065
1161
|
}
|
|
1066
|
-
_this.threeD = _this.article.
|
|
1162
|
+
_this.threeD = _this.article.is3D;
|
|
1067
1163
|
_this.selectorType = _this.article.selectorTypeCustomer;
|
|
1068
1164
|
_this._ione.getDeliveryPrognosis(_this.article.goodId).then(function (stockInfo) {
|
|
1069
1165
|
var stockAndDelivery = stockInfo;
|
|
1070
|
-
_this.stockAndDelivery = new StockAndDelivery(stockAndDelivery.
|
|
1166
|
+
_this.stockAndDelivery = new StockAndDelivery(0, stockAndDelivery.returnValue ? stockAndDelivery.returnValue : ' ');
|
|
1071
1167
|
_this._changeDetector.detectChanges();
|
|
1072
1168
|
});
|
|
1073
1169
|
_this._changeDetector.detectChanges();
|
|
@@ -1081,12 +1177,12 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1081
1177
|
});
|
|
1082
1178
|
};
|
|
1083
1179
|
ProductPageComponent.ctorParameters = function () { return [
|
|
1084
|
-
{ type:
|
|
1180
|
+
{ type: ProductConnectorService },
|
|
1085
1181
|
{ type: Renderer2 },
|
|
1086
1182
|
{ type: ChangeDetectorRef },
|
|
1087
1183
|
{ type: IconCacheService },
|
|
1088
|
-
{ type:
|
|
1089
|
-
{ type:
|
|
1184
|
+
{ type: ProductSettingsService },
|
|
1185
|
+
{ type: ProductEventService }
|
|
1090
1186
|
]; };
|
|
1091
1187
|
__decorate([
|
|
1092
1188
|
ViewChild('configurator', { read: ElementRef })
|
|
@@ -1103,7 +1199,7 @@ var ProductPageComponent = /** @class */ (function () {
|
|
|
1103
1199
|
ProductPageComponent = __decorate([
|
|
1104
1200
|
Component({
|
|
1105
1201
|
selector: 'app-product-page',
|
|
1106
|
-
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
|
|
1202
|
+
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",
|
|
1107
1203
|
animations: [
|
|
1108
1204
|
trigger('toggleFullScreen', [
|
|
1109
1205
|
state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1207,13 +1303,17 @@ var ProductRelatedComponent = /** @class */ (function () {
|
|
|
1207
1303
|
var _this = this;
|
|
1208
1304
|
this._articles.forEach(function (a) {
|
|
1209
1305
|
if (!a.image.documentBody) {
|
|
1210
|
-
_this._iOne.getDocumentContent(a.image.documentId).then(function (
|
|
1306
|
+
_this._iOne.getDocumentContent(a.image.documentId).then(function (content) {
|
|
1307
|
+
if (content) {
|
|
1308
|
+
a.image.documentBody = content.documentContent;
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1211
1311
|
}
|
|
1212
1312
|
});
|
|
1213
1313
|
};
|
|
1214
1314
|
ProductRelatedComponent.ctorParameters = function () { return [
|
|
1215
|
-
{ type:
|
|
1216
|
-
{ type:
|
|
1315
|
+
{ type: ProductConnectorService },
|
|
1316
|
+
{ type: ProductEventService }
|
|
1217
1317
|
]; };
|
|
1218
1318
|
__decorate([
|
|
1219
1319
|
Input()
|
|
@@ -1293,12 +1393,12 @@ var ProductInfoComponent = /** @class */ (function () {
|
|
|
1293
1393
|
return ProductInfoComponent;
|
|
1294
1394
|
}());
|
|
1295
1395
|
|
|
1296
|
-
var
|
|
1297
|
-
function
|
|
1396
|
+
var ProductModuleService = /** @class */ (function () {
|
|
1397
|
+
function ProductModuleService(_iOneConnectorService) {
|
|
1298
1398
|
this._iOneConnectorService = _iOneConnectorService;
|
|
1299
1399
|
this._superArticles = new Map();
|
|
1300
1400
|
}
|
|
1301
|
-
|
|
1401
|
+
ProductModuleService.prototype.getArticle = function (id) {
|
|
1302
1402
|
return __awaiter(this, void 0, void 0, function () {
|
|
1303
1403
|
return __generator(this, function (_a) {
|
|
1304
1404
|
switch (_a.label) {
|
|
@@ -1308,7 +1408,7 @@ var ModuleService = /** @class */ (function () {
|
|
|
1308
1408
|
});
|
|
1309
1409
|
});
|
|
1310
1410
|
};
|
|
1311
|
-
|
|
1411
|
+
ProductModuleService.prototype._getArticle = function (id) {
|
|
1312
1412
|
return __awaiter(this, void 0, void 0, function () {
|
|
1313
1413
|
var mainArticle;
|
|
1314
1414
|
return __generator(this, function (_a) {
|
|
@@ -1325,16 +1425,16 @@ var ModuleService = /** @class */ (function () {
|
|
|
1325
1425
|
});
|
|
1326
1426
|
});
|
|
1327
1427
|
};
|
|
1328
|
-
|
|
1329
|
-
{ type:
|
|
1428
|
+
ProductModuleService.ctorParameters = function () { return [
|
|
1429
|
+
{ type: ProductConnectorService }
|
|
1330
1430
|
]; };
|
|
1331
|
-
|
|
1332
|
-
|
|
1431
|
+
ProductModuleService.ɵprov = ɵɵdefineInjectable({ factory: function ProductModuleService_Factory() { return new ProductModuleService(ɵɵinject(ProductConnectorService)); }, token: ProductModuleService, providedIn: "root" });
|
|
1432
|
+
ProductModuleService = __decorate([
|
|
1333
1433
|
Injectable({
|
|
1334
1434
|
providedIn: 'root'
|
|
1335
1435
|
})
|
|
1336
|
-
],
|
|
1337
|
-
return
|
|
1436
|
+
], ProductModuleService);
|
|
1437
|
+
return ProductModuleService;
|
|
1338
1438
|
}());
|
|
1339
1439
|
|
|
1340
1440
|
var BitUtils = /** @class */ (function () {
|
|
@@ -1456,7 +1556,7 @@ var ProductAdditionalInfoComponent = /** @class */ (function () {
|
|
|
1456
1556
|
};
|
|
1457
1557
|
ProductAdditionalInfoComponent.ctorParameters = function () { return [
|
|
1458
1558
|
{ type: DomSanitizer },
|
|
1459
|
-
{ type:
|
|
1559
|
+
{ type: ProductModuleService },
|
|
1460
1560
|
{ type: ChangeDetectorRef }
|
|
1461
1561
|
]; };
|
|
1462
1562
|
__decorate([
|
|
@@ -1585,7 +1685,7 @@ var ProductDeliveryComponent = /** @class */ (function () {
|
|
|
1585
1685
|
};
|
|
1586
1686
|
ProductDeliveryComponent.ctorParameters = function () { return [
|
|
1587
1687
|
{ type: LocalizePipe },
|
|
1588
|
-
{ type:
|
|
1688
|
+
{ type: ProductConnectorService },
|
|
1589
1689
|
{ type: IconCacheService }
|
|
1590
1690
|
]; };
|
|
1591
1691
|
__decorate([
|
|
@@ -1594,7 +1694,7 @@ var ProductDeliveryComponent = /** @class */ (function () {
|
|
|
1594
1694
|
ProductDeliveryComponent = __decorate([
|
|
1595
1695
|
Component({
|
|
1596
1696
|
selector: 'app-product-delivery',
|
|
1597
|
-
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",
|
|
1697
|
+
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",
|
|
1598
1698
|
providers: [LocalizePipe],
|
|
1599
1699
|
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}}"]
|
|
1600
1700
|
})
|
|
@@ -1621,7 +1721,7 @@ var ProductStockComponent = /** @class */ (function () {
|
|
|
1621
1721
|
ProductStockComponent.prototype.ngOnInit = function () {
|
|
1622
1722
|
};
|
|
1623
1723
|
ProductStockComponent.ctorParameters = function () { return [
|
|
1624
|
-
{ type:
|
|
1724
|
+
{ type: ProductConnectorService },
|
|
1625
1725
|
{ type: IconCacheService }
|
|
1626
1726
|
]; };
|
|
1627
1727
|
__decorate([
|
|
@@ -1749,10 +1849,11 @@ var ProductPriceComponent = /** @class */ (function () {
|
|
|
1749
1849
|
}());
|
|
1750
1850
|
|
|
1751
1851
|
var ProductAddtocartComponent = /** @class */ (function () {
|
|
1752
|
-
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService) {
|
|
1852
|
+
function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
|
|
1753
1853
|
this.iconCache = iconCache;
|
|
1754
1854
|
this._ioneControllerService = _ioneControllerService;
|
|
1755
1855
|
this._appEventService = _appEventService;
|
|
1856
|
+
this._settingsService = _settingsService;
|
|
1756
1857
|
this.icon = IconEnum;
|
|
1757
1858
|
this.configurable = false;
|
|
1758
1859
|
this.configuring = false;
|
|
@@ -1810,46 +1911,28 @@ var ProductAddtocartComponent = /** @class */ (function () {
|
|
|
1810
1911
|
};
|
|
1811
1912
|
ProductAddtocartComponent.prototype._getJSONFromArticleObject = function (article) {
|
|
1812
1913
|
return __awaiter(this, void 0, void 0, function () {
|
|
1813
|
-
var
|
|
1914
|
+
var configuratorStatistics;
|
|
1814
1915
|
return __generator(this, function (_a) {
|
|
1815
1916
|
switch (_a.label) {
|
|
1816
1917
|
case 0:
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
returnObject.goodId = selectorDataObject.hasOwnProperty('compositionGoodId') ? selectorDataObject['compositionGoodId'] : selectorDataObject['goodId'];
|
|
1827
|
-
returnObject.selectorData = selectorDataObject;
|
|
1828
|
-
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId)];
|
|
1829
|
-
case 2:
|
|
1830
|
-
articleFlatTreeJson = _a.sent();
|
|
1831
|
-
if (articleFlatTreeJson) {
|
|
1832
|
-
returnObject.articleTree = JSON.parse(articleFlatTreeJson);
|
|
1833
|
-
}
|
|
1834
|
-
return [3 /*break*/, 5];
|
|
1835
|
-
case 3:
|
|
1836
|
-
returnObject.goodId = article.article.goodId;
|
|
1837
|
-
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(returnObject.goodId)];
|
|
1838
|
-
case 4:
|
|
1839
|
-
articleFlatTreeJson = _a.sent();
|
|
1840
|
-
if (articleFlatTreeJson) {
|
|
1841
|
-
returnObject.articleTree = JSON.parse(articleFlatTreeJson);
|
|
1842
|
-
}
|
|
1843
|
-
_a.label = 5;
|
|
1844
|
-
case 5: return [2 /*return*/, JSON.stringify(returnObject)];
|
|
1918
|
+
configuratorStatistics = new ConfiguratorStatisticsEnvironment();
|
|
1919
|
+
configuratorStatistics.userType = 'iOneProductPage';
|
|
1920
|
+
configuratorStatistics.transactionType = 'Sales';
|
|
1921
|
+
configuratorStatistics.actionDomain = 'bundle';
|
|
1922
|
+
configuratorStatistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
|
|
1923
|
+
configuratorStatistics.webHost = window.location.host;
|
|
1924
|
+
configuratorStatistics.bundleHost = window.location.host;
|
|
1925
|
+
return [4 /*yield*/, this._ioneControllerService.getJsonArticleFlatTree(article.article.goodId, article.article.goodType, article.quantity, true, undefined, configuratorStatistics)];
|
|
1926
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
1845
1927
|
}
|
|
1846
1928
|
});
|
|
1847
1929
|
});
|
|
1848
1930
|
};
|
|
1849
1931
|
ProductAddtocartComponent.ctorParameters = function () { return [
|
|
1850
1932
|
{ type: IconCacheService },
|
|
1851
|
-
{ type:
|
|
1852
|
-
{ type:
|
|
1933
|
+
{ type: ProductConnectorService },
|
|
1934
|
+
{ type: ProductEventService },
|
|
1935
|
+
{ type: ProductSettingsService }
|
|
1853
1936
|
]; };
|
|
1854
1937
|
__decorate([
|
|
1855
1938
|
ViewChild('addtocartbutton', { read: ElementRef })
|
|
@@ -1944,6 +2027,7 @@ var IoneProductComponent = /** @class */ (function () {
|
|
|
1944
2027
|
// this.sku = 'CF-39904ANT';
|
|
1945
2028
|
// this.sku = 'CF-22346001';
|
|
1946
2029
|
// this.sku = '104';
|
|
2030
|
+
// this.sku = '1000561986';
|
|
1947
2031
|
var _this = this;
|
|
1948
2032
|
this._dictionary = _dictionary;
|
|
1949
2033
|
this._jsonUtils = _jsonUtils;
|
|
@@ -2016,10 +2100,10 @@ var IoneProductComponent = /** @class */ (function () {
|
|
|
2016
2100
|
IoneProductComponent.ctorParameters = function () { return [
|
|
2017
2101
|
{ type: DictionaryService },
|
|
2018
2102
|
{ type: JsonUtilsService },
|
|
2019
|
-
{ type:
|
|
2103
|
+
{ type: ProductConnectorService },
|
|
2020
2104
|
{ type: ChangeDetectorRef },
|
|
2021
|
-
{ type:
|
|
2022
|
-
{ type:
|
|
2105
|
+
{ type: ProductEventService },
|
|
2106
|
+
{ type: ProductSettingsService }
|
|
2023
2107
|
]; };
|
|
2024
2108
|
__decorate([
|
|
2025
2109
|
Input()
|
|
@@ -2098,7 +2182,7 @@ var ProductAdditionalDescriptionComponent = /** @class */ (function () {
|
|
|
2098
2182
|
}
|
|
2099
2183
|
};
|
|
2100
2184
|
ProductAdditionalDescriptionComponent.ctorParameters = function () { return [
|
|
2101
|
-
{ type:
|
|
2185
|
+
{ type: ProductEventService }
|
|
2102
2186
|
]; };
|
|
2103
2187
|
__decorate([
|
|
2104
2188
|
Input()
|
|
@@ -2161,7 +2245,7 @@ var ProductInfoTabsComponent = /** @class */ (function () {
|
|
|
2161
2245
|
}
|
|
2162
2246
|
};
|
|
2163
2247
|
ProductInfoTabsComponent.ctorParameters = function () { return [
|
|
2164
|
-
{ type:
|
|
2248
|
+
{ type: ProductEventService }
|
|
2165
2249
|
]; };
|
|
2166
2250
|
__decorate([
|
|
2167
2251
|
ViewChild('tabContent')
|
|
@@ -2179,27 +2263,27 @@ var ProductInfoTabsComponent = /** @class */ (function () {
|
|
|
2179
2263
|
return ProductInfoTabsComponent;
|
|
2180
2264
|
}());
|
|
2181
2265
|
|
|
2182
|
-
var
|
|
2183
|
-
function
|
|
2266
|
+
var ProductInitializerService = /** @class */ (function () {
|
|
2267
|
+
function ProductInitializerService(_settingsService) {
|
|
2184
2268
|
this._settingsService = _settingsService;
|
|
2185
2269
|
}
|
|
2186
|
-
|
|
2270
|
+
ProductInitializerService.prototype.initializeApp = function () {
|
|
2187
2271
|
return __awaiter(this, void 0, void 0, function () {
|
|
2188
2272
|
return __generator(this, function (_a) {
|
|
2189
2273
|
return [2 /*return*/, this._settingsService.initializeSettings()];
|
|
2190
2274
|
});
|
|
2191
2275
|
});
|
|
2192
2276
|
};
|
|
2193
|
-
|
|
2194
|
-
{ type:
|
|
2277
|
+
ProductInitializerService.ctorParameters = function () { return [
|
|
2278
|
+
{ type: ProductSettingsService }
|
|
2195
2279
|
]; };
|
|
2196
|
-
|
|
2197
|
-
|
|
2280
|
+
ProductInitializerService.ɵprov = ɵɵdefineInjectable({ factory: function ProductInitializerService_Factory() { return new ProductInitializerService(ɵɵinject(ProductSettingsService)); }, token: ProductInitializerService, providedIn: "root" });
|
|
2281
|
+
ProductInitializerService = __decorate([
|
|
2198
2282
|
Injectable({
|
|
2199
2283
|
providedIn: 'root',
|
|
2200
2284
|
})
|
|
2201
|
-
],
|
|
2202
|
-
return
|
|
2285
|
+
], ProductInitializerService);
|
|
2286
|
+
return ProductInitializerService;
|
|
2203
2287
|
}());
|
|
2204
2288
|
|
|
2205
2289
|
function initializeApp(context) {
|
|
@@ -2252,14 +2336,14 @@ var IoneProductModule = /** @class */ (function () {
|
|
|
2252
2336
|
IoneProductComponent
|
|
2253
2337
|
],
|
|
2254
2338
|
providers: [
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2339
|
+
ProductSettingsService,
|
|
2340
|
+
ProductConnectorService,
|
|
2341
|
+
ProductConnectorAdapterService,
|
|
2258
2342
|
IconCacheService,
|
|
2259
2343
|
{
|
|
2260
2344
|
provide: APP_INITIALIZER,
|
|
2261
2345
|
useFactory: initializeApp,
|
|
2262
|
-
deps: [
|
|
2346
|
+
deps: [ProductInitializerService],
|
|
2263
2347
|
multi: true
|
|
2264
2348
|
}
|
|
2265
2349
|
],
|
|
@@ -2276,5 +2360,5 @@ var IoneProductModule = /** @class */ (function () {
|
|
|
2276
2360
|
* Generated bundle index. Do not edit.
|
|
2277
2361
|
*/
|
|
2278
2362
|
|
|
2279
|
-
export { IoneProductModule, initializeApp, IoneProductComponent as ɵa, DictionaryService as ɵb, ProductAdditionalDescriptionComponent as ɵba,
|
|
2363
|
+
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 };
|
|
2280
2364
|
//# sourceMappingURL=colijnit-product.js.map
|