@colijnit/configurator 1.0.21 → 1.0.22
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/builder.d.ts +53 -0
- package/app/components/answers/answer/answer.component.d.ts +11 -0
- package/app/components/answers/answers.component.d.ts +8 -0
- package/app/components/answers/answers.module.d.ts +2 -0
- package/app/components/selections/selections.component.d.ts +22 -0
- package/app/components/selections/selections.module.d.ts +2 -0
- package/app/components/shared/loader/loader.component.d.ts +2 -0
- package/app/components/shared/shared.module.d.ts +2 -0
- package/app/directives/visibility-observer-master.directive.d.ts +9 -0
- package/app/directives/visibility-observer.directive.d.ts +13 -0
- package/app/services/configurator.service.d.ts +22 -0
- package/app/services/image-cache.service.d.ts +10 -0
- package/app/services/locator.service.d.ts +4 -0
- package/bundles/colijnit-configurator.umd.js +2745 -0
- package/bundles/colijnit-configurator.umd.js.map +1 -0
- package/bundles/colijnit-configurator.umd.min.js +17 -0
- package/bundles/colijnit-configurator.umd.min.js.map +1 -0
- package/colijnit-configurator.d.ts +10 -0
- package/colijnit-configurator.metadata.json +1 -0
- package/esm2015/app/builder.js +477 -0
- package/esm2015/app/components/answers/answer/answer.component.js +69 -0
- package/esm2015/app/components/answers/answers.component.js +43 -0
- package/esm2015/app/components/answers/answers.module.js +29 -0
- package/esm2015/app/components/selections/selections.component.js +134 -0
- package/esm2015/app/components/selections/selections.module.js +23 -0
- package/esm2015/app/components/shared/loader/loader.component.js +24 -0
- package/esm2015/app/components/shared/shared.module.js +21 -0
- package/esm2015/app/directives/visibility-observer-master.directive.js +51 -0
- package/esm2015/app/directives/visibility-observer.directive.js +57 -0
- package/esm2015/app/services/configurator.service.js +94 -0
- package/esm2015/app/services/image-cache.service.js +66 -0
- package/esm2015/app/services/locator.service.js +10 -0
- package/esm2015/colijnit-configurator.js +11 -0
- package/esm2015/helper/variation-helper.js +216 -0
- package/esm2015/model/material.js +11 -0
- package/esm2015/model/variation-settings.js +6 -0
- package/esm2015/model/variation.js +3 -0
- package/esm2015/public_api.js +7 -0
- package/esm2015/utils/asset.utils.js +74 -0
- package/esm2015/utils/file.utils.js +139 -0
- package/esm2015/utils/image.utils.js +52 -0
- package/esm2015/utils/object.utils.js +49 -0
- package/esm2015/utils/scene-utils.js +94 -0
- package/esm2015/utils/threed.utils.js +222 -0
- package/esm2015/utils/variation-utils.js +224 -0
- package/esm5/app/builder.js +591 -0
- package/esm5/app/components/answers/answer/answer.component.js +64 -0
- package/esm5/app/components/answers/answers.component.js +27 -0
- package/esm5/app/components/answers/answers.module.js +32 -0
- package/esm5/app/components/selections/selections.component.js +104 -0
- package/esm5/app/components/selections/selections.module.js +26 -0
- package/esm5/app/components/shared/loader/loader.component.js +16 -0
- package/esm5/app/components/shared/shared.module.js +24 -0
- package/esm5/app/directives/visibility-observer-master.directive.js +64 -0
- package/esm5/app/directives/visibility-observer.directive.js +59 -0
- package/esm5/app/services/configurator.service.js +160 -0
- package/esm5/app/services/image-cache.service.js +69 -0
- package/esm5/app/services/locator.service.js +13 -0
- package/esm5/colijnit-configurator.js +11 -0
- package/esm5/helper/variation-helper.js +268 -0
- package/esm5/model/material.js +13 -0
- package/esm5/model/variation-settings.js +8 -0
- package/esm5/model/variation.js +7 -0
- package/esm5/public_api.js +7 -0
- package/esm5/utils/asset.utils.js +106 -0
- package/esm5/utils/file.utils.js +151 -0
- package/esm5/utils/image.utils.js +56 -0
- package/esm5/utils/object.utils.js +56 -0
- package/esm5/utils/scene-utils.js +98 -0
- package/esm5/utils/threed.utils.js +279 -0
- package/esm5/utils/variation-utils.js +327 -0
- package/fesm2015/colijnit-configurator.js +2109 -0
- package/fesm2015/colijnit-configurator.js.map +1 -0
- package/fesm5/colijnit-configurator.js +2527 -0
- package/fesm5/colijnit-configurator.js.map +1 -0
- package/helper/variation-helper.d.ts +14 -0
- package/model/material.d.ts +17 -0
- package/model/variation-settings.d.ts +14 -0
- package/model/variation.d.ts +10 -0
- package/package.json +12 -45
- package/{src/public_api.ts → public_api.d.ts} +6 -6
- package/utils/asset.utils.d.ts +13 -0
- package/utils/file.utils.d.ts +27 -0
- package/utils/image.utils.d.ts +8 -0
- package/utils/object.utils.d.ts +7 -0
- package/utils/scene-utils.d.ts +7 -0
- package/utils/threed.utils.d.ts +16 -0
- package/utils/variation-utils.d.ts +12 -0
- package/.idea/Configurator.iml +0 -12
- package/.idea/codeStyles/Project.xml +0 -21
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/angular.json +0 -193
- package/configurator.iml +0 -11
- package/dist/configurator/index.html +0 -14
- package/dist/configurator/main-es2015.js +0 -3129
- package/dist/configurator/main-es2015.js.map +0 -1
- package/dist/configurator/main-es5.js +0 -5482
- package/dist/configurator/main-es5.js.map +0 -1
- package/dist/configurator/polyfills-es2015.js +0 -4520
- package/dist/configurator/polyfills-es2015.js.map +0 -1
- package/dist/configurator/polyfills-es5.js +0 -18375
- package/dist/configurator/polyfills-es5.js.map +0 -1
- package/dist/configurator/runtime-es2015.js +0 -155
- package/dist/configurator/runtime-es2015.js.map +0 -1
- package/dist/configurator/runtime-es5.js +0 -155
- package/dist/configurator/runtime-es5.js.map +0 -1
- package/dist/configurator/styles-es2015.js +0 -450
- package/dist/configurator/styles-es2015.js.map +0 -1
- package/dist/configurator/styles-es5.js +0 -432
- package/dist/configurator/styles-es5.js.map +0 -1
- package/dist/configurator/vendor-es2015.js +0 -155551
- package/dist/configurator/vendor-es2015.js.map +0 -1
- package/dist/configurator/vendor-es5.js +0 -183588
- package/dist/configurator/vendor-es5.js.map +0 -1
- package/ng-package.json +0 -9
- package/src/app/app.component.ts +0 -222
- package/src/app/app.module.ts +0 -34
- package/src/app/builder.ts +0 -480
- package/src/app/components/answers/answer/answer.component.ts +0 -61
- package/src/app/components/answers/answers.component.ts +0 -41
- package/src/app/components/answers/answers.module.ts +0 -26
- package/src/app/components/selections/selections.component.ts +0 -131
- package/src/app/components/selections/selections.module.ts +0 -20
- package/src/app/components/shared/loader/loader.component.scss +0 -33
- package/src/app/components/shared/loader/loader.component.ts +0 -20
- package/src/app/components/shared/shared.module.ts +0 -16
- package/src/app/directives/visibility-observer-master.directive.ts +0 -71
- package/src/app/directives/visibility-observer.directive.ts +0 -74
- package/src/app/services/configurator.service.ts +0 -86
- package/src/app/services/image-cache.service.ts +0 -56
- package/src/app/services/locator.service.ts +0 -6
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -8
- package/src/helper/variation-helper.ts +0 -220
- package/src/index.html +0 -14
- package/src/main.ts +0 -11
- package/src/model/material.ts +0 -22
- package/src/model/variation-settings.ts +0 -14
- package/src/model/variation.ts +0 -11
- package/src/polyfills.ts +0 -73
- package/src/style/shared.scss +0 -173
- package/src/style/styles.scss +0 -45
- package/src/tsconfig.app.json +0 -16
- package/src/tsconfig.spec.json +0 -19
- package/src/utils/asset.utils.ts +0 -88
- package/src/utils/file.utils.ts +0 -156
- package/src/utils/file.utils.unit.test.ts +0 -8
- package/src/utils/image.utils.ts +0 -54
- package/src/utils/object.utils.ts +0 -52
- package/src/utils/scene-utils.ts +0 -119
- package/src/utils/threed.utils.ts +0 -219
- package/src/utils/variation-utils.ts +0 -216
- package/tsconfig.json +0 -23
- package/tslint.json +0 -132
|
@@ -1,3129 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
|
|
2
|
-
|
|
3
|
-
/***/ "./src/$$_lazy_route_resource lazy recursive":
|
|
4
|
-
/*!**********************************************************!*\
|
|
5
|
-
!*** ./src/$$_lazy_route_resource lazy namespace object ***!
|
|
6
|
-
\**********************************************************/
|
|
7
|
-
/*! no static exports found */
|
|
8
|
-
/***/ (function(module, exports) {
|
|
9
|
-
|
|
10
|
-
function webpackEmptyAsyncContext(req) {
|
|
11
|
-
// Here Promise.resolve().then() is used instead of new Promise() to prevent
|
|
12
|
-
// uncaught exception popping up in devtools
|
|
13
|
-
return Promise.resolve().then(function() {
|
|
14
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
15
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
16
|
-
throw e;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
webpackEmptyAsyncContext.keys = function() { return []; };
|
|
20
|
-
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
|
21
|
-
module.exports = webpackEmptyAsyncContext;
|
|
22
|
-
webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
|
|
23
|
-
|
|
24
|
-
/***/ }),
|
|
25
|
-
|
|
26
|
-
/***/ "./src/app/app.component.ts":
|
|
27
|
-
/*!**********************************!*\
|
|
28
|
-
!*** ./src/app/app.component.ts ***!
|
|
29
|
-
\**********************************/
|
|
30
|
-
/*! no static exports found */
|
|
31
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
32
|
-
|
|
33
|
-
"use strict";
|
|
34
|
-
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
37
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
38
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
39
|
-
const OrbitControls_1 = __webpack_require__(/*! three/examples/jsm/controls/OrbitControls */ "./node_modules/three/examples/jsm/controls/OrbitControls.js");
|
|
40
|
-
const builder_1 = __webpack_require__(/*! ./builder */ "./src/app/builder.ts");
|
|
41
|
-
const axios_1 = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
|
|
42
|
-
const GLTFLoader_1 = __webpack_require__(/*! three/examples/jsm/loaders/GLTFLoader */ "./node_modules/three/examples/jsm/loaders/GLTFLoader.js");
|
|
43
|
-
const configurator_service_1 = __webpack_require__(/*! ./services/configurator.service */ "./src/app/services/configurator.service.ts");
|
|
44
|
-
const three_1 = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
45
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
46
|
-
const i1 = __webpack_require__(/*! ./services/configurator.service */ "./src/app/services/configurator.service.ts");
|
|
47
|
-
const i2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
48
|
-
const i3 = __webpack_require__(/*! ./components/selections/selections.component */ "./src/app/components/selections/selections.component.ts");
|
|
49
|
-
const i4 = __webpack_require__(/*! ./components/answers/answers.component */ "./src/app/components/answers/answers.component.ts");
|
|
50
|
-
const _c0 = ["canvas"];
|
|
51
|
-
function AppComponent_selections_2_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
53
|
-
i0.ɵɵelementStart(0, "selections", 4);
|
|
54
|
-
i0.ɵɵlistener("selectionClick", function AppComponent_selections_2_Template_selections_selectionClick_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.selectSelection($event); });
|
|
55
|
-
i0.ɵɵelementEnd();
|
|
56
|
-
} if (rf & 2) {
|
|
57
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
58
|
-
i0.ɵɵproperty("selections", ctx_r1.selections);
|
|
59
|
-
} }
|
|
60
|
-
function AppComponent_answers_3_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
-
const _r6 = i0.ɵɵgetCurrentView();
|
|
62
|
-
i0.ɵɵelementStart(0, "answers", 5);
|
|
63
|
-
i0.ɵɵlistener("answerClick", function AppComponent_answers_3_Template_answers_answerClick_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.selectAnswer($event); });
|
|
64
|
-
i0.ɵɵelementEnd();
|
|
65
|
-
} if (rf & 2) {
|
|
66
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
67
|
-
i0.ɵɵproperty("selectionTitle", ctx_r2.selectionTitle)("answers", ctx_r2.answers);
|
|
68
|
-
} }
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
window.loadGLTF = (file) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
-
const gltfLoader = new GLTFLoader_1.GLTFLoader();
|
|
72
|
-
try {
|
|
73
|
-
return new Promise((resolve) => {
|
|
74
|
-
gltfLoader.load(file, (obj) => {
|
|
75
|
-
resolve(obj.scene);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
catch (e) {
|
|
80
|
-
console.error(e);
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
// @ts-ignore
|
|
85
|
-
window.downloadVariation = (fileName) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
-
const response = yield axios_1.default({
|
|
87
|
-
method: "get",
|
|
88
|
-
url: `https://cdn1.colijn-it.nl/${fileName}`,
|
|
89
|
-
responseType: "arraybuffer"
|
|
90
|
-
});
|
|
91
|
-
if (response.status !== 200) {
|
|
92
|
-
throw Error(response.statusText);
|
|
93
|
-
}
|
|
94
|
-
return yield response.data;
|
|
95
|
-
});
|
|
96
|
-
class AppComponent {
|
|
97
|
-
constructor(_configuratorService) {
|
|
98
|
-
this._configuratorService = _configuratorService;
|
|
99
|
-
this.selections = [];
|
|
100
|
-
this.answers = [];
|
|
101
|
-
this.showAnswers = false;
|
|
102
|
-
this.showSelections = true;
|
|
103
|
-
this.scene = new THREE.Scene();
|
|
104
|
-
this._subs = [];
|
|
105
|
-
this._options = {
|
|
106
|
-
url: "http://130.62.7.180:8082/ione",
|
|
107
|
-
version: "251",
|
|
108
|
-
schema: "815"
|
|
109
|
-
};
|
|
110
|
-
this._instanceId = undefined;
|
|
111
|
-
this._sku = '1000234793';
|
|
112
|
-
}
|
|
113
|
-
ngAfterViewInit() {
|
|
114
|
-
this._builder = new builder_1.Builder(this.scene, this._options, true);
|
|
115
|
-
this._subs.push(this._builder.selectionsReceived.subscribe((selections) => {
|
|
116
|
-
this.selections = selections;
|
|
117
|
-
}), this._builder.answersReceived.subscribe((answers) => {
|
|
118
|
-
this.answers = answers;
|
|
119
|
-
this.showAnswers = this.answers.length > 0;
|
|
120
|
-
}), this._builder.modelLoaded.subscribe((object) => {
|
|
121
|
-
if (object && this.answers.length === 0) {
|
|
122
|
-
this._loadModel(object);
|
|
123
|
-
}
|
|
124
|
-
}));
|
|
125
|
-
this._initScene();
|
|
126
|
-
this._initRenderer();
|
|
127
|
-
this._initCameraAndControls();
|
|
128
|
-
this._initLights();
|
|
129
|
-
// this._test();
|
|
130
|
-
this._animate();
|
|
131
|
-
this._builder.buildModel(this._sku, this._instanceId);
|
|
132
|
-
}
|
|
133
|
-
ngOnDestroy() {
|
|
134
|
-
this._subs.forEach(s => s.unsubscribe());
|
|
135
|
-
}
|
|
136
|
-
disableControls() {
|
|
137
|
-
this.controls.enabled = false;
|
|
138
|
-
}
|
|
139
|
-
enableControls() {
|
|
140
|
-
this.controls.enabled = true;
|
|
141
|
-
}
|
|
142
|
-
selectSelection(selection) {
|
|
143
|
-
this._builder.selectSelection(selection);
|
|
144
|
-
this.selectionTitle = selection.commercialQuestion;
|
|
145
|
-
this.showSelections = false;
|
|
146
|
-
}
|
|
147
|
-
selectAnswer(answer) {
|
|
148
|
-
this._builder.selectAnswer(answer);
|
|
149
|
-
this.selectionTitle = ' . . / ' + answer.answer;
|
|
150
|
-
}
|
|
151
|
-
_initScene() {
|
|
152
|
-
this.scene = new THREE.Scene();
|
|
153
|
-
}
|
|
154
|
-
_initRenderer() {
|
|
155
|
-
this.renderer = new THREE.WebGLRenderer({
|
|
156
|
-
alpha: true,
|
|
157
|
-
antialias: true,
|
|
158
|
-
preserveDrawingBuffer: true
|
|
159
|
-
});
|
|
160
|
-
this.renderer.setClearColor(0xfafafa);
|
|
161
|
-
this.renderer.autoClear = true;
|
|
162
|
-
this.renderer.setPixelRatio(window.devicePixelRatio);
|
|
163
|
-
this.renderer.shadowMap.enabled = true;
|
|
164
|
-
// Use PCFShadowMap to enable radius else use PCFSoftShadowMap
|
|
165
|
-
this.renderer.shadowMap.type = THREE.PCFSoftShadowMap;
|
|
166
|
-
this.renderer.outputEncoding = THREE.LinearEncoding;
|
|
167
|
-
// this.renderer.gammaFactor = 2.2;
|
|
168
|
-
// this.renderer.toneMappingExposure = 1.1;
|
|
169
|
-
this.canvasElement.nativeElement.appendChild(this.renderer.domElement);
|
|
170
|
-
}
|
|
171
|
-
_initCameraAndControls() {
|
|
172
|
-
this.camera = new THREE.PerspectiveCamera(45, 1, 0.01, 100);
|
|
173
|
-
this.controls = new OrbitControls_1.OrbitControls(this.camera, this.renderer.domElement);
|
|
174
|
-
this.camera.position.set(0, 3, 1.5);
|
|
175
|
-
this.controls.update();
|
|
176
|
-
}
|
|
177
|
-
_animate() {
|
|
178
|
-
this.renderer.setAnimationLoop(() => this._render());
|
|
179
|
-
}
|
|
180
|
-
_render() {
|
|
181
|
-
this._checkCanvasResize();
|
|
182
|
-
this.renderer.render(this.scene, this.camera);
|
|
183
|
-
}
|
|
184
|
-
_checkCanvasResize() {
|
|
185
|
-
const canvas = this.renderer.domElement;
|
|
186
|
-
if (this.canvasElement.nativeElement.clientWidth !== canvas.width || this.canvasElement.nativeElement.clientHeight !== canvas.height) {
|
|
187
|
-
this._updateWindowSize();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
_updateWindowSize() {
|
|
191
|
-
this._resizeRendererToDisplaySize();
|
|
192
|
-
const canvas = this.renderer.domElement;
|
|
193
|
-
const aspect = canvas.width / canvas.height;
|
|
194
|
-
this.camera.aspect = aspect;
|
|
195
|
-
this.camera.updateProjectionMatrix();
|
|
196
|
-
}
|
|
197
|
-
_resizeRendererToDisplaySize() {
|
|
198
|
-
this.renderer.setSize(this.canvasElement.nativeElement.clientWidth, this.canvasElement.nativeElement.clientHeight, false);
|
|
199
|
-
}
|
|
200
|
-
_test() {
|
|
201
|
-
const mat = new THREE.MeshBasicMaterial({ color: 'blue' });
|
|
202
|
-
const geo = new THREE.BoxGeometry(1, 1, 1);
|
|
203
|
-
const mesh = new THREE.Mesh(geo, mat);
|
|
204
|
-
this.scene.add(mesh);
|
|
205
|
-
}
|
|
206
|
-
_loadModel(object) {
|
|
207
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
object.name = this._sku;
|
|
209
|
-
object.visible = true;
|
|
210
|
-
const objectFromScene = this.scene.getObjectByName(this._sku);
|
|
211
|
-
if (objectFromScene) {
|
|
212
|
-
this.scene.remove(objectFromScene);
|
|
213
|
-
}
|
|
214
|
-
this.scene.add(object);
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
_initLights() {
|
|
218
|
-
const ambientLight = new three_1.AmbientLight('#595959', 1.2);
|
|
219
|
-
ambientLight.name = 'ambientLight';
|
|
220
|
-
const directional = new three_1.DirectionalLight('white', 1);
|
|
221
|
-
directional.position.set(0, 4, 0);
|
|
222
|
-
directional.castShadow = true;
|
|
223
|
-
const spotLight1 = new three_1.SpotLight('white', 4, 25, 0.7, 0, 0.7);
|
|
224
|
-
spotLight1.position.set(-15, 9, -15);
|
|
225
|
-
spotLight1.castShadow = true;
|
|
226
|
-
const spotLight2 = new three_1.SpotLight('white', 4, 25, 0.7, 0, 0.7);
|
|
227
|
-
spotLight2.position.set(15, 9, -15);
|
|
228
|
-
spotLight2.castShadow = true;
|
|
229
|
-
const spotLight3 = new three_1.SpotLight('white', 4, 25, 0.7, 0, 0.7);
|
|
230
|
-
spotLight3.position.set(-15, 9, 15);
|
|
231
|
-
spotLight3.castShadow = true;
|
|
232
|
-
const spotLight4 = new three_1.SpotLight('white', 4, 25, 0.7, 0, 0.7);
|
|
233
|
-
spotLight4.position.set(15, 9, 15);
|
|
234
|
-
spotLight4.castShadow = true;
|
|
235
|
-
const hemiSphere = new three_1.HemisphereLight('white', 'white', 0.15);
|
|
236
|
-
this.scene.add(ambientLight, directional, spotLight1, spotLight2, spotLight3, spotLight4, hemiSphere);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
exports.AppComponent = AppComponent;
|
|
240
|
-
AppComponent.ɵfac = function AppComponent_Factory(t) { return new (t || AppComponent)(i0.ɵɵdirectiveInject(i1.ConfiguratorService)); };
|
|
241
|
-
AppComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AppComponent, selectors: [["app-root"]], viewQuery: function AppComponent_Query(rf, ctx) { if (rf & 1) {
|
|
242
|
-
i0.ɵɵviewQuery(_c0, true, core_1.ElementRef);
|
|
243
|
-
} if (rf & 2) {
|
|
244
|
-
var _t;
|
|
245
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.canvasElement = _t.first);
|
|
246
|
-
} }, decls: 4, vars: 2, consts: [[1, "canvas"], ["canvas", ""], [3, "selections", "selectionClick", 4, "ngIf"], [3, "selectionTitle", "answers", "answerClick", 4, "ngIf"], [3, "selections", "selectionClick"], [3, "selectionTitle", "answers", "answerClick"]], template: function AppComponent_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
-
i0.ɵɵelement(0, "div", 0, 1);
|
|
248
|
-
i0.ɵɵtemplate(2, AppComponent_selections_2_Template, 1, 1, "selections", 2);
|
|
249
|
-
i0.ɵɵtemplate(3, AppComponent_answers_3_Template, 1, 2, "answers", 3);
|
|
250
|
-
} if (rf & 2) {
|
|
251
|
-
i0.ɵɵadvance(2);
|
|
252
|
-
i0.ɵɵproperty("ngIf", !ctx.showAnswers);
|
|
253
|
-
i0.ɵɵadvance(1);
|
|
254
|
-
i0.ɵɵproperty("ngIf", ctx.showAnswers);
|
|
255
|
-
} }, directives: [i2.NgIf, i3.SelectionsComponent, i4.AnswersComponent], encapsulation: 2 });
|
|
256
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AppComponent, [{
|
|
257
|
-
type: core_1.Component,
|
|
258
|
-
args: [{
|
|
259
|
-
selector: 'app-root',
|
|
260
|
-
template: `
|
|
261
|
-
<div #canvas class="canvas"></div>
|
|
262
|
-
<selections *ngIf="!showAnswers" [selections]="selections" (selectionClick)="selectSelection($event)"></selections>
|
|
263
|
-
<answers *ngIf="showAnswers" [selectionTitle]="selectionTitle" [answers]="answers" (answerClick)="selectAnswer($event)"></answers>
|
|
264
|
-
`
|
|
265
|
-
}]
|
|
266
|
-
}], function () { return [{ type: i1.ConfiguratorService }]; }, { canvasElement: [{
|
|
267
|
-
type: core_1.ViewChild,
|
|
268
|
-
args: ['canvas', { read: core_1.ElementRef }]
|
|
269
|
-
}] }); })();
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
/***/ }),
|
|
273
|
-
|
|
274
|
-
/***/ "./src/app/app.module.ts":
|
|
275
|
-
/*!*******************************!*\
|
|
276
|
-
!*** ./src/app/app.module.ts ***!
|
|
277
|
-
\*******************************/
|
|
278
|
-
/*! no static exports found */
|
|
279
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
280
|
-
|
|
281
|
-
"use strict";
|
|
282
|
-
|
|
283
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
284
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
285
|
-
const app_component_1 = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
|
|
286
|
-
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
287
|
-
const animations_1 = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/animations.js");
|
|
288
|
-
const selections_module_1 = __webpack_require__(/*! ./components/selections/selections.module */ "./src/app/components/selections/selections.module.ts");
|
|
289
|
-
const answers_module_1 = __webpack_require__(/*! ./components/answers/answers.module */ "./src/app/components/answers/answers.module.ts");
|
|
290
|
-
const builder_1 = __webpack_require__(/*! ./builder */ "./src/app/builder.ts");
|
|
291
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
292
|
-
class AppModule {
|
|
293
|
-
}
|
|
294
|
-
exports.AppModule = AppModule;
|
|
295
|
-
AppModule.ɵmod = i0.ɵɵdefineNgModule({ type: AppModule, bootstrap: [app_component_1.AppComponent] });
|
|
296
|
-
AppModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AppModule_Factory(t) { return new (t || AppModule)(); }, providers: [
|
|
297
|
-
builder_1.Builder
|
|
298
|
-
], imports: [[
|
|
299
|
-
animations_1.BrowserAnimationsModule,
|
|
300
|
-
common_1.CommonModule,
|
|
301
|
-
selections_module_1.SelectionsModule,
|
|
302
|
-
answers_module_1.AnswersModule
|
|
303
|
-
]] });
|
|
304
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [app_component_1.AppComponent], imports: [animations_1.BrowserAnimationsModule,
|
|
305
|
-
common_1.CommonModule,
|
|
306
|
-
selections_module_1.SelectionsModule,
|
|
307
|
-
answers_module_1.AnswersModule], exports: [app_component_1.AppComponent] }); })();
|
|
308
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AppModule, [{
|
|
309
|
-
type: core_1.NgModule,
|
|
310
|
-
args: [{
|
|
311
|
-
imports: [
|
|
312
|
-
animations_1.BrowserAnimationsModule,
|
|
313
|
-
common_1.CommonModule,
|
|
314
|
-
selections_module_1.SelectionsModule,
|
|
315
|
-
answers_module_1.AnswersModule
|
|
316
|
-
],
|
|
317
|
-
providers: [
|
|
318
|
-
builder_1.Builder
|
|
319
|
-
],
|
|
320
|
-
declarations: [
|
|
321
|
-
app_component_1.AppComponent
|
|
322
|
-
],
|
|
323
|
-
entryComponents: [
|
|
324
|
-
app_component_1.AppComponent
|
|
325
|
-
],
|
|
326
|
-
exports: [
|
|
327
|
-
app_component_1.AppComponent
|
|
328
|
-
],
|
|
329
|
-
bootstrap: [
|
|
330
|
-
app_component_1.AppComponent
|
|
331
|
-
]
|
|
332
|
-
}]
|
|
333
|
-
}], null, null); })();
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
/***/ }),
|
|
337
|
-
|
|
338
|
-
/***/ "./src/app/builder.ts":
|
|
339
|
-
/*!****************************!*\
|
|
340
|
-
!*** ./src/app/builder.ts ***!
|
|
341
|
-
\****************************/
|
|
342
|
-
/*! no static exports found */
|
|
343
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
344
|
-
|
|
345
|
-
"use strict";
|
|
346
|
-
|
|
347
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
348
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
349
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
350
|
-
const options_1 = __webpack_require__(/*! @colijnit/ioneconnector/build/model/options */ "./node_modules/@colijnit/ioneconnector/build/model/options.js");
|
|
351
|
-
const deco_node_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/model/deco-node */ "./node_modules/@colijnit/configuratorapi/build/model/deco-node.js");
|
|
352
|
-
const business_object_factory_1 = __webpack_require__(/*! @colijnit/ioneconnector/build/service/business-object-factory */ "./node_modules/@colijnit/ioneconnector/build/service/business-object-factory.js");
|
|
353
|
-
const selection_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/model/selection */ "./node_modules/@colijnit/configuratorapi/build/model/selection.js");
|
|
354
|
-
const deco_node_type_enum_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/enum/deco-node-type.enum */ "./node_modules/@colijnit/configuratorapi/build/enum/deco-node-type.enum.js");
|
|
355
|
-
const threed_utils_1 = __webpack_require__(/*! ../utils/threed.utils */ "./src/utils/threed.utils.ts");
|
|
356
|
-
const deco_node_kind_enum_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/enum/deco-node-kind.enum */ "./node_modules/@colijnit/configuratorapi/build/enum/deco-node-kind.enum.js");
|
|
357
|
-
const scene_utils_1 = __webpack_require__(/*! ../utils/scene-utils */ "./src/utils/scene-utils.ts");
|
|
358
|
-
const variation_helper_1 = __webpack_require__(/*! ../helper/variation-helper */ "./src/helper/variation-helper.ts");
|
|
359
|
-
const article_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/model/article */ "./node_modules/@colijnit/configuratorapi/build/model/article.js");
|
|
360
|
-
const configurator_service_1 = __webpack_require__(/*! ./services/configurator.service */ "./src/app/services/configurator.service.ts");
|
|
361
|
-
const three_1 = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
362
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
363
|
-
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
|
|
364
|
-
const locator_service_1 = __webpack_require__(/*! ./services/locator.service */ "./src/app/services/locator.service.ts");
|
|
365
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
366
|
-
const i1 = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
367
|
-
const i2 = __webpack_require__(/*! @colijnit/ioneconnector/build/model/options */ "./node_modules/@colijnit/ioneconnector/build/model/options.js");
|
|
368
|
-
class Builder {
|
|
369
|
-
constructor(scene, options, useInAngular) {
|
|
370
|
-
this.selectionsReceived = new rxjs_1.BehaviorSubject([]);
|
|
371
|
-
this.answersReceived = new rxjs_1.BehaviorSubject([]);
|
|
372
|
-
this.modelLoaded = new rxjs_1.BehaviorSubject(null);
|
|
373
|
-
this._selections = [];
|
|
374
|
-
this._answers = [];
|
|
375
|
-
this._decos = [];
|
|
376
|
-
this._placedAdjustables = [];
|
|
377
|
-
this._placedAddables = [];
|
|
378
|
-
this._adjustables = [];
|
|
379
|
-
this._addables = [];
|
|
380
|
-
this._articleCache = new Map();
|
|
381
|
-
this._boFactory = new business_object_factory_1.BusinessObjectFactory();
|
|
382
|
-
this._threedUtils = new threed_utils_1.ThreedUtils();
|
|
383
|
-
this._variationHelper = new variation_helper_1.VariationHelper();
|
|
384
|
-
if (!scene) {
|
|
385
|
-
throw 'No scene object provided!';
|
|
386
|
-
}
|
|
387
|
-
if (!options) {
|
|
388
|
-
throw 'No connection options provided!';
|
|
389
|
-
}
|
|
390
|
-
if (useInAngular) {
|
|
391
|
-
this._configuratorService = locator_service_1.ServiceLocator.injector.get(configurator_service_1.ConfiguratorService);
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
this._configuratorService = new configurator_service_1.ConfiguratorService(undefined);
|
|
395
|
-
}
|
|
396
|
-
this._configuratorService.initApi(options);
|
|
397
|
-
this._scene = scene;
|
|
398
|
-
}
|
|
399
|
-
buildModel(sku, instanceId, goodId) {
|
|
400
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
401
|
-
if (!this._scene) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
try {
|
|
405
|
-
yield this._setInstanceId(sku, instanceId, goodId);
|
|
406
|
-
yield this._prepareConfiguration(this._sku, this._goodId);
|
|
407
|
-
if (this._source) {
|
|
408
|
-
yield this._configuratorService.setInstanceToConfigure(this._instanceId);
|
|
409
|
-
const promises = [];
|
|
410
|
-
promises.push(this.getQuestionAndAnswers());
|
|
411
|
-
promises.push(this._getSelections(this._instanceId));
|
|
412
|
-
promises.push(this._getDecos());
|
|
413
|
-
yield Promise.all(promises);
|
|
414
|
-
if (this._answers.length > 0) {
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
this._linkSelectionsAndDecos();
|
|
418
|
-
return this._build(this._instanceId);
|
|
419
|
-
}
|
|
420
|
-
else {
|
|
421
|
-
throw 'GLB source not found!';
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
catch (e) {
|
|
425
|
-
throw e;
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
initNodeInstance(goodId) {
|
|
430
|
-
return this._configuratorService.initNodeInstance(goodId);
|
|
431
|
-
}
|
|
432
|
-
destroy() {
|
|
433
|
-
this._threedUtils.clearCache();
|
|
434
|
-
this._variationHelper.clearCache();
|
|
435
|
-
}
|
|
436
|
-
selectSelection(selection) {
|
|
437
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
438
|
-
yield this._configuratorService.selectSelection(selection, false);
|
|
439
|
-
this.getQuestionAndAnswers();
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
getQuestionAndAnswers(publicationCode) {
|
|
443
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
444
|
-
const questionsAndAnswers = yield this._configuratorService.getQuestionAndAnswers(false, publicationCode);
|
|
445
|
-
this._answers = questionsAndAnswers.answers;
|
|
446
|
-
this.answersReceived.next(questionsAndAnswers.answers);
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
selectAnswer(answer) {
|
|
450
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
451
|
-
yield this._configuratorService.selectAnswer(answer, false);
|
|
452
|
-
this.modelLoaded.next(yield this.buildModel());
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
_setInstanceId(sku, instanceId, goodId) {
|
|
456
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
457
|
-
if (!instanceId && !this._instanceId) {
|
|
458
|
-
if (!goodId) {
|
|
459
|
-
goodId = yield this._getGoodIdFromSku(sku);
|
|
460
|
-
}
|
|
461
|
-
this._goodId = goodId;
|
|
462
|
-
const result = yield this.initNodeInstance(this._goodId);
|
|
463
|
-
if (result && result.resultObject) {
|
|
464
|
-
this._instanceId = result.resultObject;
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
throw 'Failed to initialize node instance';
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
else if (!this._instanceId) {
|
|
471
|
-
this._instanceId = instanceId;
|
|
472
|
-
}
|
|
473
|
-
if (!this._sku) {
|
|
474
|
-
this._sku = sku;
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
_prepareConfiguration(sku, goodId) {
|
|
479
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
480
|
-
const article = yield this._getArticle(sku, goodId);
|
|
481
|
-
if (article && article.assetUrl) {
|
|
482
|
-
this._source = yield this._threedUtils.download3DSource(article.assetUrl)
|
|
483
|
-
.catch((error) => {
|
|
484
|
-
throw error;
|
|
485
|
-
});
|
|
486
|
-
if (article.contentDeliveryUrl) {
|
|
487
|
-
this._variationHelper.assetPath =
|
|
488
|
-
article.contentDeliveryUrl +
|
|
489
|
-
(article.contentDeliveryUrl.endsWith('/') ? '' : '/') +
|
|
490
|
-
(article.distSchema ? article.distSchema : 'UP_DBA');
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
_build(instanceId) {
|
|
496
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
497
|
-
this._reset();
|
|
498
|
-
const adjustables = this._getAdjustables();
|
|
499
|
-
if (adjustables && adjustables.length > 0) {
|
|
500
|
-
const obj = new THREE.Object3D();
|
|
501
|
-
obj.visible = false; // no need to render visualy
|
|
502
|
-
this._scene.add(obj);
|
|
503
|
-
let connected = false;
|
|
504
|
-
for (let i = 0, len = adjustables.length; i < len; i++) {
|
|
505
|
-
const adjustable = this._createAdjustable(obj, adjustables[i]);
|
|
506
|
-
if (adjustable) {
|
|
507
|
-
for (let ii = 0, lenii = this._placedAdjustables.length; ii < lenii; ii++) {
|
|
508
|
-
if (scene_utils_1.SceneUtils.TrySelectorConnection(this._scene, obj, this._placedAdjustables[ii], adjustable)) {
|
|
509
|
-
this._placedAdjustables[ii].visible = true;
|
|
510
|
-
adjustable.visible = true;
|
|
511
|
-
connected = true;
|
|
512
|
-
break;
|
|
513
|
-
}
|
|
514
|
-
connected = false;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
if (!connected && this._placedAdjustables.length > 1) {
|
|
518
|
-
console.warn('No connection found for: ', adjustable.name);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
this._placeAddables(obj);
|
|
522
|
-
this._updatePivot(obj);
|
|
523
|
-
yield this._loadVariations(obj, instanceId);
|
|
524
|
-
this._scene.remove(obj);
|
|
525
|
-
return obj;
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
throw 'No adjustables found!';
|
|
529
|
-
// this._building = false;
|
|
530
|
-
// if (this.selections.length < 2) {
|
|
531
|
-
// this._errorService.addError(this.activeInstance, {message: 'NO_SELECTIONS_OR_DECOS', description: 'NO_SELECTIONS_OR_DECOS_INFO'});
|
|
532
|
-
// this.buildFinished.next({instanceId: this.activeInstance, resultType: ResultType.NoSelections});
|
|
533
|
-
// } else if (this.decos.size === 0) {
|
|
534
|
-
// this._errorService.addError(this.activeInstance, {message: 'NO_SELECTIONS_OR_DECOS', description: 'NO_SELECTIONS_OR_DECOS_INFO'});
|
|
535
|
-
// this.buildFinished.next({instanceId: this.activeInstance, resultType: ResultType.NoDecoNodes});
|
|
536
|
-
// } else {
|
|
537
|
-
// this._errorService.addError(this.activeInstance, {message: 'NO_ADJUSTABLES', description: 'NO_ADJUSTABLES_INFO'});
|
|
538
|
-
// this.buildFinished.next({instanceId: this.activeInstance, resultType: ResultType.NoAdjustables});
|
|
539
|
-
// }
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
_prepareTheSelections() {
|
|
544
|
-
// get generic variations
|
|
545
|
-
const globalVariations = this._selections
|
|
546
|
-
.filter(s => s.generic && s.decoNode.variation && !s.decoNode.type)
|
|
547
|
-
.map((value, index, array) => {
|
|
548
|
-
// find selection of variation
|
|
549
|
-
const sel = this._selections.find(s => s.artNodeIdDeco === value.decoNode.variation.id);
|
|
550
|
-
if (sel) {
|
|
551
|
-
value.decoNode.variation.supplierArticleNr = sel.supplierArticleNr;
|
|
552
|
-
}
|
|
553
|
-
value.decoNode.variation.materialId = value.hdecoGameObject;
|
|
554
|
-
return value.decoNode.variation;
|
|
555
|
-
});
|
|
556
|
-
// const usedVariations: FurniturePartVariation[] = [];
|
|
557
|
-
let globalVariationsRewrite = true;
|
|
558
|
-
const len = this._selections.length;
|
|
559
|
-
let lastAdded;
|
|
560
|
-
let lastAdjustable;
|
|
561
|
-
let newPart = false;
|
|
562
|
-
let previousPresLevel = -1;
|
|
563
|
-
let positioning;
|
|
564
|
-
for (let i = 0; i < len; i++) {
|
|
565
|
-
const selection = this._selections[i];
|
|
566
|
-
if (selection.presentationLevel === 1) {
|
|
567
|
-
positioning = selection.hdecoPositioning;
|
|
568
|
-
}
|
|
569
|
-
if (selection.presentationLevel > previousPresLevel) {
|
|
570
|
-
selection.hdecoPositioning = selection.hdecoPositioning || positioning;
|
|
571
|
-
}
|
|
572
|
-
if (selection.decoNode) {
|
|
573
|
-
if (selection.decoNode.type === deco_node_type_enum_1.DecoNodeType.Variation) {
|
|
574
|
-
if (lastAdded) {
|
|
575
|
-
if (newPart) {
|
|
576
|
-
lastAdded.variations = [selection.decoNode];
|
|
577
|
-
}
|
|
578
|
-
else {
|
|
579
|
-
lastAdded.variations.push(selection.decoNode);
|
|
580
|
-
}
|
|
581
|
-
newPart = false;
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
if (globalVariationsRewrite) {
|
|
585
|
-
globalVariations.length = 0;
|
|
586
|
-
globalVariationsRewrite = false;
|
|
587
|
-
}
|
|
588
|
-
globalVariations.push(selection.decoNode);
|
|
589
|
-
}
|
|
590
|
-
// const variation: FurniturePartVariation = new FurniturePartVariation();
|
|
591
|
-
// variation.BrandId = selection.decoNode.brandId;
|
|
592
|
-
// variation.Description = selection.decoNode.gameObjectName;
|
|
593
|
-
// variation.MaterialId = (selection.decoNode as any).materialId;
|
|
594
|
-
// variation.SupplierArticleNr = (selection.decoNode as any).supplierArticleNr;
|
|
595
|
-
// usedVariations.push(variation);
|
|
596
|
-
// this._upsertFurniture(this.activeInstance, {
|
|
597
|
-
// Variation: selection.decoNode.brandId,
|
|
598
|
-
// VariationDescription: selection.decoNode.gameObjectName,
|
|
599
|
-
// SupplierArticleNr: (selection.decoNode as any).supplierArticleNr
|
|
600
|
-
// });
|
|
601
|
-
}
|
|
602
|
-
else if (selection.decoNode.type === deco_node_type_enum_1.DecoNodeType.Part &&
|
|
603
|
-
typeof selection.decoNode.gameObjectName === 'string' &&
|
|
604
|
-
selection.decoNode.gameObjectName.length) {
|
|
605
|
-
if (selection.decoNode.kind === deco_node_kind_enum_1.DecoNodeKind.Adjustable) {
|
|
606
|
-
selection.variations = globalVariations;
|
|
607
|
-
this._adjustables.push(selection);
|
|
608
|
-
if (!lastAdded || lastAdded.nodeId !== selection.nodeId) {
|
|
609
|
-
newPart = true;
|
|
610
|
-
}
|
|
611
|
-
lastAdded = selection;
|
|
612
|
-
lastAdjustable = selection;
|
|
613
|
-
}
|
|
614
|
-
else if (selection.decoNode.kind === deco_node_kind_enum_1.DecoNodeKind.Addable) {
|
|
615
|
-
selection.variations = lastAdjustable ? lastAdjustable.variations : globalVariations;
|
|
616
|
-
if (lastAdjustable) {
|
|
617
|
-
lastAdjustable.addables.push(selection);
|
|
618
|
-
}
|
|
619
|
-
this._addables.push(selection);
|
|
620
|
-
if (!lastAdded || lastAdded.nodeId !== selection.nodeId) {
|
|
621
|
-
newPart = true;
|
|
622
|
-
}
|
|
623
|
-
lastAdded = selection;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
previousPresLevel = selection.presentationLevel;
|
|
628
|
-
}
|
|
629
|
-
// this._upsertFurniture(this.activeInstance,
|
|
630
|
-
// {Variations: usedVariations});
|
|
631
|
-
}
|
|
632
|
-
_createAdjustable(parent, adj) {
|
|
633
|
-
let obj = this._source ? this._source.getObjectByName(adj.decoNode.gameObjectName) : null;
|
|
634
|
-
if (!obj) {
|
|
635
|
-
// in case of glb files, the importer removes dots from names
|
|
636
|
-
const name = adj.decoNode.gameObjectName.replace(/[.]/g, '');
|
|
637
|
-
obj = this._source ? this._source.getObjectByName(name) : null;
|
|
638
|
-
if (!obj) {
|
|
639
|
-
// console.warn(`No object with name ${adj.decoNode.gameObjectName} found!`);
|
|
640
|
-
return null;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
let adjustable = obj.clone();
|
|
644
|
-
adjustable.name = this._createUniqueName(parent, obj);
|
|
645
|
-
adjustable.userData.selection = adj;
|
|
646
|
-
adjustable.position.set(0, 0, 0);
|
|
647
|
-
adjustable.visible = true;
|
|
648
|
-
parent.add(adjustable);
|
|
649
|
-
// the object being added to the customFloorGroup is being recreated so we loose the reference
|
|
650
|
-
// therefor we need to retrieve the created object again
|
|
651
|
-
// adjustable = parent.getObjectByName(adjustable.name);
|
|
652
|
-
this._placedAdjustables.push(adjustable);
|
|
653
|
-
return adjustable;
|
|
654
|
-
}
|
|
655
|
-
_createAddable(parent, add, part2, part1) {
|
|
656
|
-
const obj = this._source.getObjectByName(add.decoNode.gameObjectName);
|
|
657
|
-
if (!obj) {
|
|
658
|
-
return null;
|
|
659
|
-
}
|
|
660
|
-
// const selection: Selection = this._getSelectionFromId(adj.artNodeIdDeco);
|
|
661
|
-
const addable = obj.clone();
|
|
662
|
-
addable.name = this._createUniqueName(parent, obj);
|
|
663
|
-
addable.userData.selection = add;
|
|
664
|
-
addable.position.set(0, 0, 0);
|
|
665
|
-
addable.visible = true;
|
|
666
|
-
if (part1 && part2) {
|
|
667
|
-
parent.add(addable);
|
|
668
|
-
this._placedAddables.push(addable);
|
|
669
|
-
return addable;
|
|
670
|
-
}
|
|
671
|
-
return addable;
|
|
672
|
-
}
|
|
673
|
-
_placeAddables(parent) {
|
|
674
|
-
const len = this._placedAdjustables.length;
|
|
675
|
-
for (let i = 0; i < len; i++) {
|
|
676
|
-
if (this._placedAdjustables[i].userData.hasOwnProperty('selection') && this._placedAdjustables[i].userData.selection) {
|
|
677
|
-
const adjustableSelection = this._placedAdjustables[i].userData.selection;
|
|
678
|
-
if (adjustableSelection) {
|
|
679
|
-
const lena = adjustableSelection.addables.length;
|
|
680
|
-
let conAddable;
|
|
681
|
-
for (let ia = 0; ia < lena; ia++) {
|
|
682
|
-
scene_utils_1.SceneUtils.TrySelectorConnection(this._scene, parent, this._placedAdjustables[i], adjustableSelection.addables[ia], (add, part2, part1) => this._createAddable(parent, add, part2, part1));
|
|
683
|
-
if (conAddable) {
|
|
684
|
-
scene_utils_1.SceneUtils.TrySelectorConnection(this._scene, parent, conAddable, adjustableSelection.addables[ia], (add, part2, part1) => this._createAddable(parent, add, part2, part1));
|
|
685
|
-
}
|
|
686
|
-
conAddable = this._placedAddables[this._placedAddables.length - 1];
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
_createUniqueName(parent, obj) {
|
|
693
|
-
let iteration = 0;
|
|
694
|
-
let name = obj.name;
|
|
695
|
-
let existingObj = parent.getObjectByName(name);
|
|
696
|
-
while (existingObj) {
|
|
697
|
-
iteration++;
|
|
698
|
-
name = obj.name + (iteration !== 0 ? ('_' + iteration) : '');
|
|
699
|
-
existingObj = parent.getObjectByName(name);
|
|
700
|
-
}
|
|
701
|
-
return name;
|
|
702
|
-
}
|
|
703
|
-
_getGoodIdFromSku(sku) {
|
|
704
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
705
|
-
const response = yield this._configuratorService.getGoodIdFromSku(sku, false);
|
|
706
|
-
if (response.validationResult.success && response.resultObject) {
|
|
707
|
-
return response.resultObject;
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
_getArticle(sku, goodId) {
|
|
712
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
713
|
-
if (this._articleCache.has(sku)) {
|
|
714
|
-
return this._articleCache.get(sku);
|
|
715
|
-
}
|
|
716
|
-
if (!goodId) {
|
|
717
|
-
goodId = yield this._getGoodIdFromSku(sku)
|
|
718
|
-
.catch((error) => {
|
|
719
|
-
throw `Article with sku ${sku} not found!`;
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
let article;
|
|
723
|
-
const articleResponse = yield this._configuratorService.getArticleQuickSel(goodId, false);
|
|
724
|
-
if (articleResponse.validationResult.success && articleResponse.resultObject) {
|
|
725
|
-
if (articleResponse.resultObject.hasOwnProperty('oArticle')) {
|
|
726
|
-
const obj = Array.isArray(articleResponse.resultObject['oArticle']) ? articleResponse.resultObject['oArticle'][0] : articleResponse.resultObject['oArticle'];
|
|
727
|
-
article = this._boFactory.makeWithRawBackendData(article_1.Article, obj);
|
|
728
|
-
}
|
|
729
|
-
else {
|
|
730
|
-
article = this._boFactory.makeWithRawBackendData(article_1.Article, articleResponse.resultObject);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
this._articleCache.set(sku, article);
|
|
734
|
-
return article;
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
_getSelections(instanceId, publicationCode) {
|
|
738
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
739
|
-
this._selections = [];
|
|
740
|
-
const selectionResponse = yield this._configuratorService.getSelections(false, publicationCode);
|
|
741
|
-
if (selectionResponse.resultObjects && selectionResponse.resultObjects.length > 0) {
|
|
742
|
-
this._selections = this._boFactory.makeBOArrayFromRawBackendDataArray(selection_1.Selection, selectionResponse.resultObjects);
|
|
743
|
-
this._selections.forEach(s => s.instanceId = instanceId);
|
|
744
|
-
// const filtered: Selection[] = this._selections.filter(s => s.nodeType !== NodeType.Article && s.presentationLevel === 1);
|
|
745
|
-
this.selectionsReceived.next(this._selections);
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
throw 'No selections found!';
|
|
749
|
-
}
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
_getDecos() {
|
|
753
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
754
|
-
this._decos = [];
|
|
755
|
-
const decosResponse = yield this._configuratorService.getDecos(false);
|
|
756
|
-
if (decosResponse.resultObjects && decosResponse.resultObjects.length > 0) {
|
|
757
|
-
this._decos = this._boFactory.makeBOArrayFromRawBackendDataArray(deco_node_1.DecoNode, decosResponse.resultObjects);
|
|
758
|
-
}
|
|
759
|
-
else {
|
|
760
|
-
throw 'No deconodes found!';
|
|
761
|
-
}
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
_linkSelectionsAndDecos() {
|
|
765
|
-
const len = this._selections.length;
|
|
766
|
-
for (let i = 0; i < len; i++) {
|
|
767
|
-
let id = this._selections[i].artNodeIdDeco;
|
|
768
|
-
// if (this._useNodeIdToLink) {
|
|
769
|
-
// id = `${this._selections[i].node}_${this._selections[i].artNodeIdDeco}`;
|
|
770
|
-
// }
|
|
771
|
-
let deco = this._decos.find(d => d.id === id);
|
|
772
|
-
if (!deco) {
|
|
773
|
-
deco = new deco_node_1.DecoNode();
|
|
774
|
-
}
|
|
775
|
-
const variation = this._getVariations().find(v => v.parentId === this._selections[i].artNodeIdDeco);
|
|
776
|
-
if (variation) {
|
|
777
|
-
deco.variation = variation;
|
|
778
|
-
}
|
|
779
|
-
this._selections[i].decoNode = deco;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
_getVariations() {
|
|
783
|
-
return this._decos.filter((deco) => {
|
|
784
|
-
return deco.type === deco_node_type_enum_1.DecoNodeType.Variation;
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
_loadVariations(obj, instanceId) {
|
|
788
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
789
|
-
yield this._variationHelper.loadPart(obj, this._adjustables, true);
|
|
790
|
-
yield this._variationHelper.loadVariation(instanceId, obj, this._adjustables, true);
|
|
791
|
-
yield this._variationHelper.loadVariation(instanceId, obj, this._addables, true);
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
_getAdjustables() {
|
|
795
|
-
return this._selections.filter(s => {
|
|
796
|
-
const node = s.decoNode;
|
|
797
|
-
return node && node.gameObjectName && node.type === deco_node_type_enum_1.DecoNodeType.Part && node.kind === deco_node_kind_enum_1.DecoNodeKind.Adjustable;
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
_updatePivot(obj) {
|
|
801
|
-
const boundingBox = new THREE.Box3().setFromObject(obj);
|
|
802
|
-
const bbCenterPivot = new THREE.Vector3();
|
|
803
|
-
boundingBox.getCenter(bbCenterPivot);
|
|
804
|
-
const delta = new THREE.Vector3().sub(bbCenterPivot).setY(Math.abs(Math.min(boundingBox.min.y, 0)));
|
|
805
|
-
obj.children.forEach((child) => {
|
|
806
|
-
child.position.add(delta);
|
|
807
|
-
});
|
|
808
|
-
obj.updateWorldMatrix(false, true);
|
|
809
|
-
}
|
|
810
|
-
_reset() {
|
|
811
|
-
this._placedAddables.length = 0;
|
|
812
|
-
this._placedAdjustables.length = 0;
|
|
813
|
-
this._adjustables.length = 0;
|
|
814
|
-
this._addables.length = 0;
|
|
815
|
-
this._prepareTheSelections();
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
exports.Builder = Builder;
|
|
819
|
-
Builder.ɵfac = function Builder_Factory(t) { i0.ɵɵinvalidFactory(); };
|
|
820
|
-
Builder.ɵprov = i0.ɵɵdefineInjectable({ token: Builder, factory: Builder.ɵfac });
|
|
821
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(Builder, [{
|
|
822
|
-
type: core_1.Injectable
|
|
823
|
-
}], function () { return [{ type: i1.Scene }, { type: i2.Options }, { type: undefined }]; }, null); })();
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
/***/ }),
|
|
827
|
-
|
|
828
|
-
/***/ "./src/app/components/answers/answer/answer.component.ts":
|
|
829
|
-
/*!***************************************************************!*\
|
|
830
|
-
!*** ./src/app/components/answers/answer/answer.component.ts ***!
|
|
831
|
-
\***************************************************************/
|
|
832
|
-
/*! no static exports found */
|
|
833
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
834
|
-
|
|
835
|
-
"use strict";
|
|
836
|
-
|
|
837
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
838
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
839
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
840
|
-
const image_cache_service_1 = __webpack_require__(/*! ../../../services/image-cache.service */ "./src/app/services/image-cache.service.ts");
|
|
841
|
-
const answer_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/model/answer */ "./node_modules/@colijnit/configuratorapi/build/model/answer.js");
|
|
842
|
-
const animations_1 = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/__ivy_ngcc__/fesm2015/animations.js");
|
|
843
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
844
|
-
const i1 = __webpack_require__(/*! ../../../services/image-cache.service */ "./src/app/services/image-cache.service.ts");
|
|
845
|
-
const i2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
846
|
-
const i3 = __webpack_require__(/*! ../../shared/loader/loader.component */ "./src/app/components/shared/loader/loader.component.ts");
|
|
847
|
-
function AnswerComponent_rp_loader_4_Template(rf, ctx) { if (rf & 1) {
|
|
848
|
-
i0.ɵɵelement(0, "rp-loader");
|
|
849
|
-
} }
|
|
850
|
-
function AnswerComponent_img_5_Template(rf, ctx) { if (rf & 1) {
|
|
851
|
-
i0.ɵɵelement(0, "img", 10);
|
|
852
|
-
} if (rf & 2) {
|
|
853
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
854
|
-
i0.ɵɵproperty("src", ctx_r1.answer.imageData, i0.ɵɵsanitizeUrl);
|
|
855
|
-
} }
|
|
856
|
-
class AnswerComponent {
|
|
857
|
-
constructor(_imageCacheService) {
|
|
858
|
-
this._imageCacheService = _imageCacheService;
|
|
859
|
-
}
|
|
860
|
-
set showing(value) {
|
|
861
|
-
this.answer.imageData = '';
|
|
862
|
-
if (value && this.answer.answer !== 'Skip / Cancel') {
|
|
863
|
-
this._loadThumbnail(this.answer);
|
|
864
|
-
}
|
|
865
|
-
else {
|
|
866
|
-
this.answer.imageData = null;
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
ngOnInit() {
|
|
870
|
-
}
|
|
871
|
-
_loadThumbnail(answer) {
|
|
872
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
873
|
-
yield this._imageCacheService.getImageForSelectionOrAnswer(answer).then((imageSrc) => {
|
|
874
|
-
answer.imageData = imageSrc === "" ? null : imageSrc;
|
|
875
|
-
});
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
exports.AnswerComponent = AnswerComponent;
|
|
880
|
-
AnswerComponent.ɵfac = function AnswerComponent_Factory(t) { return new (t || AnswerComponent)(i0.ɵɵdirectiveInject(i1.ImageCacheService)); };
|
|
881
|
-
AnswerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AnswerComponent, selectors: [["answer"]], inputs: { answer: "answer", showing: "showing" }, decls: 10, vars: 4, consts: [[1, "ione-configurator"], [1, "answer-wrapper"], [1, "answer-content"], [1, "answer-thumbnail"], [4, "ngIf"], ["class", "answer-img", 3, "src", 4, "ngIf"], [1, "answer-title-wrapper"], [1, "answer-title", 3, "textContent"], [1, "price"], [1, "price-value"], [1, "answer-img", 3, "src"]], template: function AnswerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
882
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
883
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
884
|
-
i0.ɵɵelementStart(2, "div", 2);
|
|
885
|
-
i0.ɵɵelementStart(3, "div", 3);
|
|
886
|
-
i0.ɵɵtemplate(4, AnswerComponent_rp_loader_4_Template, 1, 0, "rp-loader", 4);
|
|
887
|
-
i0.ɵɵtemplate(5, AnswerComponent_img_5_Template, 1, 1, "img", 5);
|
|
888
|
-
i0.ɵɵelementEnd();
|
|
889
|
-
i0.ɵɵelementStart(6, "div", 6);
|
|
890
|
-
i0.ɵɵelement(7, "span", 7);
|
|
891
|
-
i0.ɵɵelementEnd();
|
|
892
|
-
i0.ɵɵelementStart(8, "div", 8);
|
|
893
|
-
i0.ɵɵelement(9, "span", 9);
|
|
894
|
-
i0.ɵɵelementEnd();
|
|
895
|
-
i0.ɵɵelementEnd();
|
|
896
|
-
i0.ɵɵelementEnd();
|
|
897
|
-
i0.ɵɵelementEnd();
|
|
898
|
-
} if (rf & 2) {
|
|
899
|
-
i0.ɵɵadvance(2);
|
|
900
|
-
i0.ɵɵproperty("@answerAppear", undefined);
|
|
901
|
-
i0.ɵɵadvance(2);
|
|
902
|
-
i0.ɵɵproperty("ngIf", ctx.answer.imageData === "");
|
|
903
|
-
i0.ɵɵadvance(1);
|
|
904
|
-
i0.ɵɵproperty("ngIf", ctx.answer.imageData !== "" && ctx.answer.imageData !== null);
|
|
905
|
-
i0.ɵɵadvance(2);
|
|
906
|
-
i0.ɵɵproperty("textContent", ctx.answer.commercialAnswer);
|
|
907
|
-
} }, directives: [i2.NgIf, i3.LoaderComponent], styles: [".ione-configurator[_ngcontent-%COMP%] .rp-answers-slideout[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-container[_ngcontent-%COMP%] {\n height: 100vh;\n overflow-y: scroll;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-content[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .img-size[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-title[_ngcontent-%COMP%] {\n font-size: 12px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n}\n.ione-configurator[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] {\n font-weight: bold;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] {\n font-size: 12px;\n font-style: italic;\n margin-top: 3px;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-content[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 12px;\n border: solid black;\n border-width: 0 3px 3px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(45deg);\n -webkit-transform: rotate(45deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle.expanded[_ngcontent-%COMP%] {\n transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .child-selection[_ngcontent-%COMP%] {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .mat-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .drawer__header[_ngcontent-%COMP%] {\n height: 48px;\n}\n.ione-configurator[_ngcontent-%COMP%] .rp-selections-summary[_ngcontent-%COMP%] {\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n background: transparent;\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selections-content[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n.ione-configurator[_ngcontent-%COMP%] .co-summary-line[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] {\n margin-left: 14px;\n align-self: center;\n}\n.ione-configurator[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-title-wrapper[_ngcontent-%COMP%] {\n text-align: center;\n align-self: center;\n margin-left: 14px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL2prL3dvcmtzcGFjZS9jb2xpam4vcmVwb3MvaW9uZXMvbWFzdGVyL0lvbmUvQ2xpZW50L0phdmFTY3JpcHQvQ29uZmlndXJhdG9yL3NyYy9zdHlsZS9zaGFyZWQuc2NzcyIsInNyYy9zdHlsZS9zaGFyZWQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGtCQUFBO0VBQ0EsTUFBQTtFQUNBLFFBQUE7RUFDQSxZQUFBO0VBQ0EsMkJBQUE7RUFBQSx3QkFBQTtFQUFBLG1CQUFBO0FDQUo7QURFRTtFQUNFLGlCQUFBO0VBQ0EsY0FBQTtBQ0FKO0FERUU7RUFDRSxhQUFBO0VBQ0Esa0JBQUE7QUNBSjtBREVFO0VBQ0Usa0JBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7RUFDQSxlQUFBO0VBQ0EsMkJBQUE7RUFDQSxhQUFBO0VBQ0EsYUFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7RUFDQSxrQkFBQTtFQUNBLDRDQUFBO0VBQ0EsaUJBQUE7QUNBSjtBREVFO0VBQ0UsV0FBQTtFQUNBLGVBQUE7RUFDQSxZQUFBO0VBQ0EsZ0JBQUE7RUFDQSx5QkFBQTtFQUNBLGtCQUFBO0FDQUo7QURFRTtFQUNFLFdBQUE7RUFDQSxlQUFBO0VBQ0EsWUFBQTtFQUNBLGdCQUFBO0VBQ0Esa0JB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ggc29saWQgI2QzZDNkMztcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC5hbnN3ZXItaW1nIHtcbiAgd2lkdGg6IDU0cHg7XG4gIG1pbi13aWR0aDogNTRweDtcbiAgaGVpZ2h0OiA1NHB4O1xuICBtaW4taGVpZ2h0OiA1NHB4O1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG4uaW9uZS1jb25maWd1cmF0b3IgLnVubG9hZGVkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogbGlnaHRncmV5O1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZXMge1xuICBtYXJnaW4tbGVmdDogMTRweDtcbiAgYWxpZ24tc2VsZjogY2VudGVyO1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZS13cmFwcGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbn1cbi5pb25lLWNvbmZpZ3VyYXRvciAuYW5zd2VyLXRpdGxlLXdyYXBwZXIge1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGFsaWduLXNlbGY6IGNlbnRlcjtcbiAgbWFyZ2luLWxlZnQ6IDE0cHg7XG59Il19 */"], data: { animation: [
|
|
908
|
-
animations_1.trigger('answerAppear', [
|
|
909
|
-
animations_1.state('void', animations_1.style({ 'background': '#dbdbdb' })),
|
|
910
|
-
animations_1.state('white', animations_1.style({ 'background': 'white' })),
|
|
911
|
-
animations_1.transition('void <=> *', animations_1.animate(500))
|
|
912
|
-
])
|
|
913
|
-
] } });
|
|
914
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AnswerComponent, [{
|
|
915
|
-
type: core_1.Component,
|
|
916
|
-
args: [{
|
|
917
|
-
selector: 'answer',
|
|
918
|
-
template: `
|
|
919
|
-
<div class="ione-configurator">
|
|
920
|
-
<div class="answer-wrapper">
|
|
921
|
-
<div class="answer-content" @answerAppear>
|
|
922
|
-
<div class="answer-thumbnail">
|
|
923
|
-
<rp-loader *ngIf="answer.imageData === ''"></rp-loader>
|
|
924
|
-
<img *ngIf="answer.imageData !== '' && answer.imageData !== null" class="answer-img" [src]="answer.imageData">
|
|
925
|
-
</div>
|
|
926
|
-
<div class="answer-title-wrapper">
|
|
927
|
-
<span class="answer-title" [textContent]="answer.commercialAnswer"></span>
|
|
928
|
-
</div>
|
|
929
|
-
<div class="price">
|
|
930
|
-
<span class="price-value"></span>
|
|
931
|
-
</div>
|
|
932
|
-
</div>
|
|
933
|
-
</div>
|
|
934
|
-
</div>
|
|
935
|
-
`,
|
|
936
|
-
styleUrls: [
|
|
937
|
-
'../../../../style/shared.scss'
|
|
938
|
-
],
|
|
939
|
-
animations: [
|
|
940
|
-
animations_1.trigger('answerAppear', [
|
|
941
|
-
animations_1.state('void', animations_1.style({ 'background': '#dbdbdb' })),
|
|
942
|
-
animations_1.state('white', animations_1.style({ 'background': 'white' })),
|
|
943
|
-
animations_1.transition('void <=> *', animations_1.animate(500))
|
|
944
|
-
])
|
|
945
|
-
]
|
|
946
|
-
}]
|
|
947
|
-
}], function () { return [{ type: i1.ImageCacheService }]; }, { answer: [{
|
|
948
|
-
type: core_1.Input
|
|
949
|
-
}], showing: [{
|
|
950
|
-
type: core_1.Input
|
|
951
|
-
}] }); })();
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
/***/ }),
|
|
955
|
-
|
|
956
|
-
/***/ "./src/app/components/answers/answers.component.ts":
|
|
957
|
-
/*!*********************************************************!*\
|
|
958
|
-
!*** ./src/app/components/answers/answers.component.ts ***!
|
|
959
|
-
\*********************************************************/
|
|
960
|
-
/*! no static exports found */
|
|
961
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
962
|
-
|
|
963
|
-
"use strict";
|
|
964
|
-
|
|
965
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
966
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
967
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
968
|
-
const i1 = __webpack_require__(/*! ../../directives/visibility-observer-master.directive */ "./src/app/directives/visibility-observer-master.directive.ts");
|
|
969
|
-
const i2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
970
|
-
const i3 = __webpack_require__(/*! ./answer/answer.component */ "./src/app/components/answers/answer/answer.component.ts");
|
|
971
|
-
const i4 = __webpack_require__(/*! ../../directives/visibility-observer.directive */ "./src/app/directives/visibility-observer.directive.ts");
|
|
972
|
-
function AnswersComponent_answer_4_Template(rf, ctx) { if (rf & 1) {
|
|
973
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
974
|
-
i0.ɵɵelementStart(0, "answer", 5, 6);
|
|
975
|
-
i0.ɵɵlistener("click", function AnswersComponent_answer_4_Template_answer_click_0_listener() { i0.ɵɵrestoreView(_r4); const answer_r1 = ctx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.answerClick.emit(answer_r1); });
|
|
976
|
-
i0.ɵɵelementEnd();
|
|
977
|
-
} if (rf & 2) {
|
|
978
|
-
const answer_r1 = ctx.$implicit;
|
|
979
|
-
const _r2 = i0.ɵɵreference(1);
|
|
980
|
-
i0.ɵɵproperty("answer", answer_r1)("observerEnabled", true)("showing", _r2.isIntersecting);
|
|
981
|
-
} }
|
|
982
|
-
class AnswersComponent {
|
|
983
|
-
constructor() {
|
|
984
|
-
this.answers = [];
|
|
985
|
-
this.answerClick = new core_1.EventEmitter();
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
exports.AnswersComponent = AnswersComponent;
|
|
989
|
-
AnswersComponent.ɵfac = function AnswersComponent_Factory(t) { return new (t || AnswersComponent)(); };
|
|
990
|
-
AnswersComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AnswersComponent, selectors: [["answers"]], inputs: { answers: "answers", selectionTitle: "selectionTitle" }, outputs: { answerClick: "answerClick" }, decls: 5, vars: 2, consts: [[1, "ione-configurator"], [1, "rp-answers-slideout"], [1, "answers-title", 3, "textContent"], ["visibilityObserverMaster", "", 1, "answers-container"], ["visibilityObserver", "", 3, "answer", "observerEnabled", "showing", "click", 4, "ngFor", "ngForOf"], ["visibilityObserver", "", 3, "answer", "observerEnabled", "showing", "click"], ["intersection", "intersection"]], template: function AnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
991
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
992
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
993
|
-
i0.ɵɵelement(2, "h2", 2);
|
|
994
|
-
i0.ɵɵelementStart(3, "div", 3);
|
|
995
|
-
i0.ɵɵtemplate(4, AnswersComponent_answer_4_Template, 2, 3, "answer", 4);
|
|
996
|
-
i0.ɵɵelementEnd();
|
|
997
|
-
i0.ɵɵelementEnd();
|
|
998
|
-
i0.ɵɵelementEnd();
|
|
999
|
-
} if (rf & 2) {
|
|
1000
|
-
i0.ɵɵadvance(2);
|
|
1001
|
-
i0.ɵɵproperty("textContent", ctx.selectionTitle);
|
|
1002
|
-
i0.ɵɵadvance(2);
|
|
1003
|
-
i0.ɵɵproperty("ngForOf", ctx.answers);
|
|
1004
|
-
} }, directives: [i1.VisibilityObserverMasterDirective, i2.NgForOf, i3.AnswerComponent, i4.VisibilityObserverDirective], styles: [".ione-configurator[_ngcontent-%COMP%] .rp-answers-slideout[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-container[_ngcontent-%COMP%] {\n height: 100vh;\n overflow-y: scroll;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-content[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .img-size[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-title[_ngcontent-%COMP%] {\n font-size: 12px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n}\n.ione-configurator[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] {\n font-weight: bold;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] {\n font-size: 12px;\n font-style: italic;\n margin-top: 3px;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-content[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 12px;\n border: solid black;\n border-width: 0 3px 3px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(45deg);\n -webkit-transform: rotate(45deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle.expanded[_ngcontent-%COMP%] {\n transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .child-selection[_ngcontent-%COMP%] {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .mat-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .drawer__header[_ngcontent-%COMP%] {\n height: 48px;\n}\n.ione-configurator[_ngcontent-%COMP%] .rp-selections-summary[_ngcontent-%COMP%] {\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n background: transparent;\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selections-content[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n.ione-configurator[_ngcontent-%COMP%] .co-summary-line[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] {\n margin-left: 14px;\n align-self: center;\n}\n.ione-configurator[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-title-wrapper[_ngcontent-%COMP%] {\n text-align: center;\n align-self: center;\n margin-left: 14px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL2prL3dvcmtzcGFjZS9jb2xpam4vcmVwb3MvaW9uZXMvbWFzdGVyL0lvbmUvQ2xpZW50L0phdmFTY3JpcHQvQ29uZmlndXJhdG9yL3NyYy9zdHlsZS9zaGFyZWQuc2NzcyIsInNyYy9zdHlsZS9zaGFyZWQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGtCQUFBO0VBQ0EsTUFBQTtFQUNBLFFBQUE7RUFDQSxZQUFBO0VBQ0EsMkJBQUE7RUFBQSx3QkFBQTtFQUFBLG1CQUFBO0FDQUo7QURFRTtFQUNFLGlCQUFBO0VBQ0EsY0FBQTtBQ0FKO0FERUU7RUFDRSxhQUFBO0VBQ0Esa0JBQUE7QUNBSjtBREVFO0VBQ0Usa0JBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7RUFDQSxlQUFBO0VBQ0EsMkJBQUE7RUFDQSxhQUFBO0VBQ0EsYUFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7RUFDQSxrQkFBQTtFQUNBLDRDQUFBO0VBQ0EsaUJBQUE7QUNBSjtBREVFO0VBQ0UsV0FBQTtFQUNBLGVBQUE7RUFDQSxZQUFBO0VBQ0EsZ0JBQUE7RUFDQSx5QkFBQTtFQUNBLGtCQUFBO0FDQUo7QURFRTtFQUNFLFdBQUE7RUFDQSxlQUFBO0VBQ0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LWhlaWdodDogNTRweDtcbiAgYm9yZGVyOiAxcHggc29saWQgI2QzZDNkMztcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC5hbnN3ZXItaW1nIHtcbiAgd2lkdGg6IDU0cHg7XG4gIG1pbi13aWR0aDogNTRweDtcbiAgaGVpZ2h0OiA1NHB4O1xuICBtaW4taGVpZ2h0OiA1NHB4O1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG4uaW9uZS1jb25maWd1cmF0b3IgLnVubG9hZGVkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogbGlnaHRncmV5O1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZXMge1xuICBtYXJnaW4tbGVmdDogMTRweDtcbiAgYWxpZ24tc2VsZjogY2VudGVyO1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZS13cmFwcGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbn1cbi5pb25lLWNvbmZpZ3VyYXRvciAuYW5zd2VyLXRpdGxlLXdyYXBwZXIge1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGFsaWduLXNlbGY6IGNlbnRlcjtcbiAgbWFyZ2luLWxlZnQ6IDE0cHg7XG59Il19 */"] });
|
|
1005
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AnswersComponent, [{
|
|
1006
|
-
type: core_1.Component,
|
|
1007
|
-
args: [{
|
|
1008
|
-
selector: "answers",
|
|
1009
|
-
template: `
|
|
1010
|
-
<div class="ione-configurator">
|
|
1011
|
-
<div class="rp-answers-slideout">
|
|
1012
|
-
<h2 class="answers-title" [textContent]="selectionTitle"></h2>
|
|
1013
|
-
<div class="answers-container" visibilityObserverMaster>
|
|
1014
|
-
<answer *ngFor="let answer of answers"
|
|
1015
|
-
(click)="answerClick.emit(answer)"
|
|
1016
|
-
[answer]="answer"
|
|
1017
|
-
visibilityObserver
|
|
1018
|
-
#intersection="intersection"
|
|
1019
|
-
[observerEnabled]="true"
|
|
1020
|
-
[showing]="intersection.isIntersecting"
|
|
1021
|
-
></answer>
|
|
1022
|
-
</div>
|
|
1023
|
-
|
|
1024
|
-
</div>
|
|
1025
|
-
</div>
|
|
1026
|
-
`,
|
|
1027
|
-
styleUrls: [
|
|
1028
|
-
'../../../style/shared.scss'
|
|
1029
|
-
]
|
|
1030
|
-
}]
|
|
1031
|
-
}], function () { return []; }, { answers: [{
|
|
1032
|
-
type: core_1.Input
|
|
1033
|
-
}], selectionTitle: [{
|
|
1034
|
-
type: core_1.Input
|
|
1035
|
-
}], answerClick: [{
|
|
1036
|
-
type: core_1.Output
|
|
1037
|
-
}] }); })();
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
/***/ }),
|
|
1041
|
-
|
|
1042
|
-
/***/ "./src/app/components/answers/answers.module.ts":
|
|
1043
|
-
/*!******************************************************!*\
|
|
1044
|
-
!*** ./src/app/components/answers/answers.module.ts ***!
|
|
1045
|
-
\******************************************************/
|
|
1046
|
-
/*! no static exports found */
|
|
1047
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1048
|
-
|
|
1049
|
-
"use strict";
|
|
1050
|
-
|
|
1051
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1052
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1053
|
-
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
1054
|
-
const answers_component_1 = __webpack_require__(/*! ./answers.component */ "./src/app/components/answers/answers.component.ts");
|
|
1055
|
-
const answer_component_1 = __webpack_require__(/*! ./answer/answer.component */ "./src/app/components/answers/answer/answer.component.ts");
|
|
1056
|
-
const visibility_observer_directive_1 = __webpack_require__(/*! ../../directives/visibility-observer.directive */ "./src/app/directives/visibility-observer.directive.ts");
|
|
1057
|
-
const visibility_observer_master_directive_1 = __webpack_require__(/*! ../../directives/visibility-observer-master.directive */ "./src/app/directives/visibility-observer-master.directive.ts");
|
|
1058
|
-
const shared_module_1 = __webpack_require__(/*! ../shared/shared.module */ "./src/app/components/shared/shared.module.ts");
|
|
1059
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1060
|
-
class AnswersModule {
|
|
1061
|
-
}
|
|
1062
|
-
exports.AnswersModule = AnswersModule;
|
|
1063
|
-
AnswersModule.ɵmod = i0.ɵɵdefineNgModule({ type: AnswersModule });
|
|
1064
|
-
AnswersModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AnswersModule_Factory(t) { return new (t || AnswersModule)(); }, imports: [[
|
|
1065
|
-
common_1.CommonModule,
|
|
1066
|
-
shared_module_1.SharedModule
|
|
1067
|
-
]] });
|
|
1068
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnswersModule, { declarations: [answers_component_1.AnswersComponent,
|
|
1069
|
-
answer_component_1.AnswerComponent,
|
|
1070
|
-
visibility_observer_directive_1.VisibilityObserverDirective,
|
|
1071
|
-
visibility_observer_master_directive_1.VisibilityObserverMasterDirective], imports: [common_1.CommonModule,
|
|
1072
|
-
shared_module_1.SharedModule], exports: [answers_component_1.AnswersComponent] }); })();
|
|
1073
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AnswersModule, [{
|
|
1074
|
-
type: core_1.NgModule,
|
|
1075
|
-
args: [{
|
|
1076
|
-
imports: [
|
|
1077
|
-
common_1.CommonModule,
|
|
1078
|
-
shared_module_1.SharedModule
|
|
1079
|
-
],
|
|
1080
|
-
declarations: [
|
|
1081
|
-
answers_component_1.AnswersComponent,
|
|
1082
|
-
answer_component_1.AnswerComponent,
|
|
1083
|
-
visibility_observer_directive_1.VisibilityObserverDirective,
|
|
1084
|
-
visibility_observer_master_directive_1.VisibilityObserverMasterDirective
|
|
1085
|
-
],
|
|
1086
|
-
exports: [
|
|
1087
|
-
answers_component_1.AnswersComponent
|
|
1088
|
-
]
|
|
1089
|
-
}]
|
|
1090
|
-
}], null, null); })();
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
/***/ }),
|
|
1094
|
-
|
|
1095
|
-
/***/ "./src/app/components/selections/selections.component.ts":
|
|
1096
|
-
/*!***************************************************************!*\
|
|
1097
|
-
!*** ./src/app/components/selections/selections.component.ts ***!
|
|
1098
|
-
\***************************************************************/
|
|
1099
|
-
/*! no static exports found */
|
|
1100
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1101
|
-
|
|
1102
|
-
"use strict";
|
|
1103
|
-
|
|
1104
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1105
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
1106
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1107
|
-
const animations_1 = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/__ivy_ngcc__/fesm2015/animations.js");
|
|
1108
|
-
const image_cache_service_1 = __webpack_require__(/*! ../../services/image-cache.service */ "./src/app/services/image-cache.service.ts");
|
|
1109
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1110
|
-
const i1 = __webpack_require__(/*! ../../services/image-cache.service */ "./src/app/services/image-cache.service.ts");
|
|
1111
|
-
const i2 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
1112
|
-
const i3 = __webpack_require__(/*! ../shared/loader/loader.component */ "./src/app/components/shared/loader/loader.component.ts");
|
|
1113
|
-
function SelectionsComponent_ng_container_5_rp_loader_3_Template(rf, ctx) { if (rf & 1) {
|
|
1114
|
-
i0.ɵɵelement(0, "rp-loader");
|
|
1115
|
-
} }
|
|
1116
|
-
function SelectionsComponent_ng_container_5_img_4_Template(rf, ctx) { if (rf & 1) {
|
|
1117
|
-
i0.ɵɵelement(0, "img", 19);
|
|
1118
|
-
} if (rf & 2) {
|
|
1119
|
-
const selectionViewModel_r1 = i0.ɵɵnextContext().$implicit;
|
|
1120
|
-
i0.ɵɵproperty("src", selectionViewModel_r1.thumbnail, i0.ɵɵsanitizeUrl);
|
|
1121
|
-
} }
|
|
1122
|
-
function SelectionsComponent_ng_container_5_div_9_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1123
|
-
const _r10 = i0.ɵɵgetCurrentView();
|
|
1124
|
-
i0.ɵɵelementStart(0, "div", 21);
|
|
1125
|
-
i0.ɵɵlistener("click", function SelectionsComponent_ng_container_5_div_9_div_1_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const selection_r8 = ctx.$implicit; const ctx_r9 = i0.ɵɵnextContext(3); return ctx_r9.selectSelection(selection_r8, $event); });
|
|
1126
|
-
i0.ɵɵelement(1, "label", 12);
|
|
1127
|
-
i0.ɵɵelement(2, "span", 13);
|
|
1128
|
-
i0.ɵɵelementEnd();
|
|
1129
|
-
} if (rf & 2) {
|
|
1130
|
-
const selection_r8 = ctx.$implicit;
|
|
1131
|
-
i0.ɵɵadvance(1);
|
|
1132
|
-
i0.ɵɵproperty("textContent", selection_r8.commercialQuestion);
|
|
1133
|
-
i0.ɵɵadvance(1);
|
|
1134
|
-
i0.ɵɵproperty("textContent", selection_r8.answer);
|
|
1135
|
-
} }
|
|
1136
|
-
function SelectionsComponent_ng_container_5_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
1137
|
-
i0.ɵɵelementStart(0, "div");
|
|
1138
|
-
i0.ɵɵtemplate(1, SelectionsComponent_ng_container_5_div_9_div_1_Template, 3, 2, "div", 20);
|
|
1139
|
-
i0.ɵɵelementEnd();
|
|
1140
|
-
} if (rf & 2) {
|
|
1141
|
-
const selectionViewModel_r1 = i0.ɵɵnextContext().$implicit;
|
|
1142
|
-
i0.ɵɵproperty("@showHideChildren", undefined);
|
|
1143
|
-
i0.ɵɵadvance(1);
|
|
1144
|
-
i0.ɵɵproperty("ngForOf", selectionViewModel_r1.children);
|
|
1145
|
-
} }
|
|
1146
|
-
function SelectionsComponent_ng_container_5_div_14_Template(rf, ctx) { if (rf & 1) {
|
|
1147
|
-
const _r14 = i0.ɵɵgetCurrentView();
|
|
1148
|
-
i0.ɵɵelementStart(0, "div", 22);
|
|
1149
|
-
i0.ɵɵlistener("click", function SelectionsComponent_ng_container_5_div_14_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r14); const selectionViewModel_r1 = i0.ɵɵnextContext().$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.expandClicked(selectionViewModel_r1, $event); });
|
|
1150
|
-
i0.ɵɵelementEnd();
|
|
1151
|
-
} if (rf & 2) {
|
|
1152
|
-
const selectionViewModel_r1 = i0.ɵɵnextContext().$implicit;
|
|
1153
|
-
i0.ɵɵclassProp("expanded", selectionViewModel_r1.expanded);
|
|
1154
|
-
} }
|
|
1155
|
-
function SelectionsComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
1156
|
-
const _r17 = i0.ɵɵgetCurrentView();
|
|
1157
|
-
i0.ɵɵelementContainerStart(0);
|
|
1158
|
-
i0.ɵɵelementStart(1, "div", 6);
|
|
1159
|
-
i0.ɵɵlistener("click", function SelectionsComponent_ng_container_5_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r17); const selectionViewModel_r1 = ctx.$implicit; const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.selectSelection(selectionViewModel_r1.selection, $event); });
|
|
1160
|
-
i0.ɵɵelementStart(2, "div", 7);
|
|
1161
|
-
i0.ɵɵtemplate(3, SelectionsComponent_ng_container_5_rp_loader_3_Template, 1, 0, "rp-loader", 8);
|
|
1162
|
-
i0.ɵɵtemplate(4, SelectionsComponent_ng_container_5_img_4_Template, 1, 1, "img", 9);
|
|
1163
|
-
i0.ɵɵelementEnd();
|
|
1164
|
-
i0.ɵɵelementStart(5, "div", 10);
|
|
1165
|
-
i0.ɵɵelementStart(6, "div", 11);
|
|
1166
|
-
i0.ɵɵelement(7, "label", 12);
|
|
1167
|
-
i0.ɵɵelement(8, "span", 13);
|
|
1168
|
-
i0.ɵɵtemplate(9, SelectionsComponent_ng_container_5_div_9_Template, 2, 2, "div", 8);
|
|
1169
|
-
i0.ɵɵelementEnd();
|
|
1170
|
-
i0.ɵɵelementEnd();
|
|
1171
|
-
i0.ɵɵelementStart(10, "div", 14);
|
|
1172
|
-
i0.ɵɵelement(11, "span", 15);
|
|
1173
|
-
i0.ɵɵelementEnd();
|
|
1174
|
-
i0.ɵɵelementStart(12, "div", 16);
|
|
1175
|
-
i0.ɵɵelementStart(13, "div", 17);
|
|
1176
|
-
i0.ɵɵtemplate(14, SelectionsComponent_ng_container_5_div_14_Template, 1, 2, "div", 18);
|
|
1177
|
-
i0.ɵɵelementEnd();
|
|
1178
|
-
i0.ɵɵelementEnd();
|
|
1179
|
-
i0.ɵɵelementEnd();
|
|
1180
|
-
i0.ɵɵelementContainerEnd();
|
|
1181
|
-
} if (rf & 2) {
|
|
1182
|
-
const selectionViewModel_r1 = ctx.$implicit;
|
|
1183
|
-
i0.ɵɵadvance(3);
|
|
1184
|
-
i0.ɵɵproperty("ngIf", selectionViewModel_r1.thumbnail === "");
|
|
1185
|
-
i0.ɵɵadvance(1);
|
|
1186
|
-
i0.ɵɵproperty("ngIf", selectionViewModel_r1.thumbnail !== "" && selectionViewModel_r1.thumbnail !== null);
|
|
1187
|
-
i0.ɵɵadvance(3);
|
|
1188
|
-
i0.ɵɵproperty("textContent", selectionViewModel_r1.selection.question);
|
|
1189
|
-
i0.ɵɵadvance(1);
|
|
1190
|
-
i0.ɵɵproperty("textContent", selectionViewModel_r1.selection.answer);
|
|
1191
|
-
i0.ɵɵadvance(1);
|
|
1192
|
-
i0.ɵɵproperty("ngIf", selectionViewModel_r1.children.length > 0 && selectionViewModel_r1.expanded);
|
|
1193
|
-
i0.ɵɵadvance(5);
|
|
1194
|
-
i0.ɵɵproperty("ngIf", selectionViewModel_r1.children.length > 0);
|
|
1195
|
-
} }
|
|
1196
|
-
class SelectionViewModel {
|
|
1197
|
-
constructor() {
|
|
1198
|
-
this.children = [];
|
|
1199
|
-
this.expanded = false;
|
|
1200
|
-
this.thumbnail = '';
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
class SelectionsComponent {
|
|
1204
|
-
constructor(_imageCacheService) {
|
|
1205
|
-
this._imageCacheService = _imageCacheService;
|
|
1206
|
-
this.selectionViewModels = [];
|
|
1207
|
-
this.selectionClick = new core_1.EventEmitter();
|
|
1208
|
-
}
|
|
1209
|
-
set selections(value) {
|
|
1210
|
-
this._prepareSelections(value);
|
|
1211
|
-
this._loadThumbnails();
|
|
1212
|
-
}
|
|
1213
|
-
ngOnInit() {
|
|
1214
|
-
}
|
|
1215
|
-
expandClicked(selectionViewModel, mouseEvent) {
|
|
1216
|
-
mouseEvent.preventDefault();
|
|
1217
|
-
mouseEvent.stopImmediatePropagation();
|
|
1218
|
-
selectionViewModel.expanded = !selectionViewModel.expanded;
|
|
1219
|
-
}
|
|
1220
|
-
selectSelection(selection, mouseEvent) {
|
|
1221
|
-
mouseEvent.preventDefault();
|
|
1222
|
-
mouseEvent.stopImmediatePropagation();
|
|
1223
|
-
this.selectionClick.next(selection);
|
|
1224
|
-
}
|
|
1225
|
-
_loadThumbnails() {
|
|
1226
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1227
|
-
if (this.selectionViewModels.length > 0) {
|
|
1228
|
-
this.selectionViewModels.forEach((viewModel) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1229
|
-
yield this._imageCacheService.getImageForSelectionOrAnswer(viewModel.selection).then((imageSrc) => {
|
|
1230
|
-
viewModel.thumbnail = imageSrc === "" ? null : imageSrc;
|
|
1231
|
-
});
|
|
1232
|
-
}));
|
|
1233
|
-
}
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
_prepareSelections(value) {
|
|
1237
|
-
this.selectionViewModels.length = 0;
|
|
1238
|
-
let selectionViewModel;
|
|
1239
|
-
value.forEach(s => {
|
|
1240
|
-
if (s.presentationLevel === 1) {
|
|
1241
|
-
selectionViewModel = new SelectionViewModel();
|
|
1242
|
-
selectionViewModel.selection = s;
|
|
1243
|
-
this.selectionViewModels.push(selectionViewModel);
|
|
1244
|
-
}
|
|
1245
|
-
else if (s.presentationLevel > 1) {
|
|
1246
|
-
if (selectionViewModel) {
|
|
1247
|
-
selectionViewModel.children.push(s);
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
exports.SelectionsComponent = SelectionsComponent;
|
|
1254
|
-
SelectionsComponent.ɵfac = function SelectionsComponent_Factory(t) { return new (t || SelectionsComponent)(i0.ɵɵdirectiveInject(i1.ImageCacheService)); };
|
|
1255
|
-
SelectionsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectionsComponent, selectors: [["selections"]], inputs: { selections: "selections" }, outputs: { selectionClick: "selectionClick" }, decls: 6, vars: 2, consts: [[1, "ione-configurator"], [1, "rp-selections-summary"], [1, "drawer__header"], [1, "mat-title", 3, "textContent"], [1, "selections-content"], [4, "ngFor", "ngForOf"], [1, "co-summary-line", 3, "click"], [1, "selection-thumbnail"], [4, "ngIf"], ["visibilityObserver", "", "class", "selection-img", 3, "src", 4, "ngIf"], [1, "titles"], [1, "title-wrapper"], [1, "question", 3, "textContent"], [1, "answer", 3, "textContent"], [1, "price-wrapper"], [1, "price-value"], [1, "collapse-wrapper"], [1, "collapse-content"], ["class", "collapse-handle", 3, "expanded", "click", 4, "ngIf"], ["visibilityObserver", "", 1, "selection-img", 3, "src"], ["class", "child-selection", 3, "click", 4, "ngFor", "ngForOf"], [1, "child-selection", 3, "click"], [1, "collapse-handle", 3, "click"]], template: function SelectionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1256
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
1257
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
1258
|
-
i0.ɵɵelementStart(2, "header", 2);
|
|
1259
|
-
i0.ɵɵelement(3, "h2", 3);
|
|
1260
|
-
i0.ɵɵelementEnd();
|
|
1261
|
-
i0.ɵɵelementStart(4, "div", 4);
|
|
1262
|
-
i0.ɵɵtemplate(5, SelectionsComponent_ng_container_5_Template, 15, 6, "ng-container", 5);
|
|
1263
|
-
i0.ɵɵelementEnd();
|
|
1264
|
-
i0.ɵɵelementEnd();
|
|
1265
|
-
i0.ɵɵelementEnd();
|
|
1266
|
-
} if (rf & 2) {
|
|
1267
|
-
i0.ɵɵadvance(3);
|
|
1268
|
-
i0.ɵɵproperty("textContent", "Configuratie");
|
|
1269
|
-
i0.ɵɵadvance(2);
|
|
1270
|
-
i0.ɵɵproperty("ngForOf", ctx.selectionViewModels);
|
|
1271
|
-
} }, directives: [i2.NgForOf, i2.NgIf, i3.LoaderComponent], styles: [".ione-configurator[_ngcontent-%COMP%] .rp-answers-slideout[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answers-container[_ngcontent-%COMP%] {\n height: 100vh;\n overflow-y: scroll;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-content[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .img-size[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-title[_ngcontent-%COMP%] {\n font-size: 12px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n}\n.ione-configurator[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] {\n font-weight: bold;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] {\n font-size: 12px;\n font-style: italic;\n margin-top: 3px;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-content[_ngcontent-%COMP%] {\n display: block;\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 12px;\n border: solid black;\n border-width: 0 3px 3px 0;\n display: inline-block;\n padding: 3px;\n transform: rotate(45deg);\n -webkit-transform: rotate(45deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .collapse-handle.expanded[_ngcontent-%COMP%] {\n transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n}\n.ione-configurator[_ngcontent-%COMP%] .child-selection[_ngcontent-%COMP%] {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .mat-title[_ngcontent-%COMP%] {\n margin-left: 10px;\n color: #1a1a1a;\n}\n.ione-configurator[_ngcontent-%COMP%] .drawer__header[_ngcontent-%COMP%] {\n height: 48px;\n}\n.ione-configurator[_ngcontent-%COMP%] .rp-selections-summary[_ngcontent-%COMP%] {\n height: -webkit-fit-content;\n height: -moz-fit-content;\n height: fit-content;\n background: transparent;\n overflow: auto;\n position: absolute;\n top: 0;\n right: 0;\n width: 400px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selections-content[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n.ione-configurator[_ngcontent-%COMP%] .co-summary-line[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n cursor: pointer;\n font-size: 12px;\n border: 1px solid lightgray;\n padding: 10px;\n display: flex;\n flex-direction: row;\n border-radius: 3px;\n margin-bottom: 3px;\n box-shadow: 2px 1px rgba(211, 211, 211, 0.5);\n background: white;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .selection-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-thumbnail[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .answer-img[_ngcontent-%COMP%] {\n width: 54px;\n min-width: 54px;\n height: 54px;\n min-height: 54px;\n border-radius: 5px;\n}\n.ione-configurator[_ngcontent-%COMP%] .unloaded[_ngcontent-%COMP%] {\n background-color: lightgrey;\n}\n.ione-configurator[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] {\n margin-left: 14px;\n align-self: center;\n}\n.ione-configurator[_ngcontent-%COMP%] .title-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n.ione-configurator[_ngcontent-%COMP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HB4O1xuICBtaW4taGVpZ2h0OiA1NHB4O1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG4uaW9uZS1jb25maWd1cmF0b3IgLnVubG9hZGVkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogbGlnaHRncmV5O1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZXMge1xuICBtYXJnaW4tbGVmdDogMTRweDtcbiAgYWxpZ24tc2VsZjogY2VudGVyO1xufVxuLmlvbmUtY29uZmlndXJhdG9yIC50aXRsZS13cmFwcGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbn1cbi5pb25lLWNvbmZpZ3VyYXRvciAuYW5zd2VyLXRpdGxlLXdyYXBwZXIge1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGFsaWduLXNlbGY6IGNlbnRlcjtcbiAgbWFyZ2luLWxlZnQ6IDE0cHg7XG59Il19 */"], data: { animation: [
|
|
1272
|
-
animations_1.trigger('showHideChildren', [
|
|
1273
|
-
animations_1.state('void', animations_1.style({ 'height': '0' })),
|
|
1274
|
-
animations_1.state('*', animations_1.style({ 'height': '*' })),
|
|
1275
|
-
animations_1.transition('void <=> *', animations_1.animate(200))
|
|
1276
|
-
])
|
|
1277
|
-
] } });
|
|
1278
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SelectionsComponent, [{
|
|
1279
|
-
type: core_1.Component,
|
|
1280
|
-
args: [{
|
|
1281
|
-
selector: "selections",
|
|
1282
|
-
template: `
|
|
1283
|
-
<div class="ione-configurator">
|
|
1284
|
-
<div class="rp-selections-summary">
|
|
1285
|
-
<header class="drawer__header">
|
|
1286
|
-
<h2 class="mat-title" [textContent]="'Configuratie'"></h2>
|
|
1287
|
-
<!--<button>-->
|
|
1288
|
-
<!---->
|
|
1289
|
-
<!--</button>-->
|
|
1290
|
-
</header>
|
|
1291
|
-
<div class="selections-content">
|
|
1292
|
-
<ng-container *ngFor="let selectionViewModel of selectionViewModels">
|
|
1293
|
-
|
|
1294
|
-
<div class="co-summary-line" (click)="selectSelection(selectionViewModel.selection, $event)">
|
|
1295
|
-
<div class="selection-thumbnail">
|
|
1296
|
-
<rp-loader *ngIf="selectionViewModel.thumbnail === ''"></rp-loader>
|
|
1297
|
-
<img visibilityObserver *ngIf="selectionViewModel.thumbnail !== '' && selectionViewModel.thumbnail !== null" class="selection-img" [src]="selectionViewModel.thumbnail">
|
|
1298
|
-
</div>
|
|
1299
|
-
<div class="titles">
|
|
1300
|
-
<div class="title-wrapper">
|
|
1301
|
-
<label class="question" [textContent]="selectionViewModel.selection.question"></label>
|
|
1302
|
-
<span class="answer" [textContent]="selectionViewModel.selection.answer"></span>
|
|
1303
|
-
<div *ngIf="selectionViewModel.children.length > 0 && selectionViewModel.expanded" @showHideChildren>
|
|
1304
|
-
<div class="child-selection" *ngFor="let selection of selectionViewModel.children"
|
|
1305
|
-
(click)="selectSelection(selection, $event)"
|
|
1306
|
-
>
|
|
1307
|
-
<label class="question" [textContent]="selection.commercialQuestion"></label>
|
|
1308
|
-
<span class="answer" [textContent]="selection.answer"></span>
|
|
1309
|
-
</div>
|
|
1310
|
-
</div>
|
|
1311
|
-
</div>
|
|
1312
|
-
</div>
|
|
1313
|
-
|
|
1314
|
-
<div class="price-wrapper">
|
|
1315
|
-
<span class="price-value"></span>
|
|
1316
|
-
</div>
|
|
1317
|
-
|
|
1318
|
-
<div class="collapse-wrapper">
|
|
1319
|
-
<div class="collapse-content">
|
|
1320
|
-
<div class="collapse-handle" [class.expanded]="selectionViewModel.expanded"
|
|
1321
|
-
*ngIf="selectionViewModel.children.length > 0" (click)="expandClicked(selectionViewModel, $event)"></div>
|
|
1322
|
-
</div>
|
|
1323
|
-
</div>
|
|
1324
|
-
</div>
|
|
1325
|
-
|
|
1326
|
-
</ng-container>
|
|
1327
|
-
</div>
|
|
1328
|
-
</div>
|
|
1329
|
-
</div>
|
|
1330
|
-
`,
|
|
1331
|
-
styleUrls: [
|
|
1332
|
-
'../../../style/shared.scss'
|
|
1333
|
-
],
|
|
1334
|
-
animations: [
|
|
1335
|
-
animations_1.trigger('showHideChildren', [
|
|
1336
|
-
animations_1.state('void', animations_1.style({ 'height': '0' })),
|
|
1337
|
-
animations_1.state('*', animations_1.style({ 'height': '*' })),
|
|
1338
|
-
animations_1.transition('void <=> *', animations_1.animate(200))
|
|
1339
|
-
])
|
|
1340
|
-
]
|
|
1341
|
-
}]
|
|
1342
|
-
}], function () { return [{ type: i1.ImageCacheService }]; }, { selections: [{
|
|
1343
|
-
type: core_1.Input
|
|
1344
|
-
}], selectionClick: [{
|
|
1345
|
-
type: core_1.Output
|
|
1346
|
-
}] }); })();
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
/***/ }),
|
|
1350
|
-
|
|
1351
|
-
/***/ "./src/app/components/selections/selections.module.ts":
|
|
1352
|
-
/*!************************************************************!*\
|
|
1353
|
-
!*** ./src/app/components/selections/selections.module.ts ***!
|
|
1354
|
-
\************************************************************/
|
|
1355
|
-
/*! no static exports found */
|
|
1356
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1357
|
-
|
|
1358
|
-
"use strict";
|
|
1359
|
-
|
|
1360
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1361
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1362
|
-
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
1363
|
-
const selections_component_1 = __webpack_require__(/*! ./selections.component */ "./src/app/components/selections/selections.component.ts");
|
|
1364
|
-
const shared_module_1 = __webpack_require__(/*! ../shared/shared.module */ "./src/app/components/shared/shared.module.ts");
|
|
1365
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1366
|
-
class SelectionsModule {
|
|
1367
|
-
}
|
|
1368
|
-
exports.SelectionsModule = SelectionsModule;
|
|
1369
|
-
SelectionsModule.ɵmod = i0.ɵɵdefineNgModule({ type: SelectionsModule });
|
|
1370
|
-
SelectionsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SelectionsModule_Factory(t) { return new (t || SelectionsModule)(); }, imports: [[
|
|
1371
|
-
common_1.CommonModule,
|
|
1372
|
-
shared_module_1.SharedModule
|
|
1373
|
-
]] });
|
|
1374
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SelectionsModule, { declarations: [selections_component_1.SelectionsComponent], imports: [common_1.CommonModule,
|
|
1375
|
-
shared_module_1.SharedModule], exports: [selections_component_1.SelectionsComponent] }); })();
|
|
1376
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SelectionsModule, [{
|
|
1377
|
-
type: core_1.NgModule,
|
|
1378
|
-
args: [{
|
|
1379
|
-
imports: [
|
|
1380
|
-
common_1.CommonModule,
|
|
1381
|
-
shared_module_1.SharedModule
|
|
1382
|
-
],
|
|
1383
|
-
declarations: [
|
|
1384
|
-
selections_component_1.SelectionsComponent
|
|
1385
|
-
],
|
|
1386
|
-
exports: [
|
|
1387
|
-
selections_component_1.SelectionsComponent
|
|
1388
|
-
]
|
|
1389
|
-
}]
|
|
1390
|
-
}], null, null); })();
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
/***/ }),
|
|
1394
|
-
|
|
1395
|
-
/***/ "./src/app/components/shared/loader/loader.component.ts":
|
|
1396
|
-
/*!**************************************************************!*\
|
|
1397
|
-
!*** ./src/app/components/shared/loader/loader.component.ts ***!
|
|
1398
|
-
\**************************************************************/
|
|
1399
|
-
/*! no static exports found */
|
|
1400
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1401
|
-
|
|
1402
|
-
"use strict";
|
|
1403
|
-
|
|
1404
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1405
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1406
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1407
|
-
class LoaderComponent {
|
|
1408
|
-
}
|
|
1409
|
-
exports.LoaderComponent = LoaderComponent;
|
|
1410
|
-
LoaderComponent.ɵfac = function LoaderComponent_Factory(t) { return new (t || LoaderComponent)(); };
|
|
1411
|
-
LoaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LoaderComponent, selectors: [["rp-loader"]], decls: 5, vars: 0, consts: [[1, "loader-wrapper"], ["xmlns", "http://www.w3.org/2000/svg", "width", "44", "height", "44", "viewBox", "0 0 44 44", "stroke", "#3760a1"], ["fill", "none", "fill-rule", "evenodd", "stroke-width", "3"], ["cx", "22", "cy", "22", "r", "19", 1, "ripple1"], ["cx", "22", "cy", "22", "r", "19", 1, "ripple2"]], template: function LoaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1412
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
1413
|
-
i0.ɵɵnamespaceSVG();
|
|
1414
|
-
i0.ɵɵelementStart(1, "svg", 1);
|
|
1415
|
-
i0.ɵɵelementStart(2, "g", 2);
|
|
1416
|
-
i0.ɵɵelement(3, "circle", 3);
|
|
1417
|
-
i0.ɵɵelement(4, "circle", 4);
|
|
1418
|
-
i0.ɵɵelementEnd();
|
|
1419
|
-
i0.ɵɵelementEnd();
|
|
1420
|
-
i0.ɵɵelementEnd();
|
|
1421
|
-
} }, styles: ["[_nghost-%COMP%] {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n[_nghost-%COMP%] .loader-wrapper[_ngcontent-%COMP%] {\n z-index: 1100;\n position: absolute;\n width: 54px;\n height: 54px;\n}\n[_nghost-%COMP%] .loader-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n}\n[_nghost-%COMP%] .loader-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .ripple1[_ngcontent-%COMP%] {\n transform-origin: center;\n -webkit-animation: ripple 1.5s infinite;\n animation: ripple 1.5s infinite;\n}\n[_nghost-%COMP%] .loader-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .ripple2[_ngcontent-%COMP%] {\n transform-origin: center;\n -webkit-animation: ripple 1.5s infinite 0.4s;\n animation: ripple 1.5s infinite 0.4s;\n}\n@-webkit-keyframes ripple {\n 0% {\n transform: scale(0);\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n opacity: 0;\n }\n}\n@keyframes ripple {\n 0% {\n transform: scale(0);\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n opacity: 0;\n }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL2prL3dvcmtzcGFjZS9jb2xpam4vcmVwb3MvaW9uZXMvbWFzdGVyL0lvbmUvQ2xpZW50L0phdmFTY3JpcHQvQ29uZmlndXJhdG9yL3NyYy9hcHAvY29tcG9uZW50cy9zaGFyZWQvbG9hZGVyL2xvYWRlci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvY29tcG9uZW50cy9zaGFyZWQvbG9hZGVyL2xvYWRlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHlCQUFBO0tBQUEsc0JBQUE7TUFBQSxxQkFBQTtVQUFBLGlCQUFBO0VBQ0Esb0JBQUE7QUNDRjtBREFFO0VBQ0UsYUFBQTtFQUNBLGtCQUFBO0VBQ0EsV0FBQTtFQUNBLFlBQUE7QUNFSjtBRERJO0VBQ0UsV0FBQTtFQUNBLFlBQUE7QUNHTjtBREZNO0VBQ0Usd0JBQUE7RUFDQSx1Q0FBQTtVQUFBLCtCQUFBO0FDSVI7QURGTTtFQUNFLHdCQUFBO0VBQ0EsNENBQUE7VUFB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IH1cclxuICAxMDAlIHtcclxuICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XHJcbiAgICBvcGFjaXR5OiAwO1xyXG4gIH1cclxufVxyXG4iLCI6aG9zdCB7XG4gIHVzZXItc2VsZWN0OiBub25lO1xuICBwb2ludGVyLWV2ZW50czogbm9uZTtcbn1cbjpob3N0IC5sb2FkZXItd3JhcHBlciB7XG4gIHotaW5kZXg6IDExMDA7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgd2lkdGg6IDU0cHg7XG4gIGhlaWdodDogNTRweDtcbn1cbjpob3N0IC5sb2FkZXItd3JhcHBlciBzdmcge1xuICB3aWR0aDogMTAwJTtcbiAgaGVpZ2h0OiAxMDAlO1xufVxuOmhvc3QgLmxvYWRlci13cmFwcGVyIHN2ZyAucmlwcGxlMSB7XG4gIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjtcbiAgYW5pbWF0aW9uOiByaXBwbGUgMS41cyBpbmZpbml0ZTtcbn1cbjpob3N0IC5sb2FkZXItd3JhcHBlciBzdmcgLnJpcHBsZTIge1xuICB0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXI7XG4gIGFuaW1hdGlvbjogcmlwcGxlIDEuNXMgaW5maW5pdGUgMC40cztcbn1cblxuQGtleWZyYW1lcyByaXBwbGUge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgwKTtcbiAgICBvcGFjaXR5OiAxO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XG4gICAgb3BhY2l0eTogMDtcbiAgfVxufSJdfQ== */"] });
|
|
1422
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(LoaderComponent, [{
|
|
1423
|
-
type: core_1.Component,
|
|
1424
|
-
args: [{
|
|
1425
|
-
selector: 'rp-loader',
|
|
1426
|
-
template: `
|
|
1427
|
-
<div class="loader-wrapper">
|
|
1428
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44" stroke="#3760a1">
|
|
1429
|
-
<g fill="none" fill-rule="evenodd" stroke-width="3">
|
|
1430
|
-
<circle class="ripple1" cx="22" cy="22" r="19">
|
|
1431
|
-
</circle>
|
|
1432
|
-
<circle class="ripple2" cx="22" cy="22" r="19">
|
|
1433
|
-
</circle>
|
|
1434
|
-
</g>
|
|
1435
|
-
</svg>
|
|
1436
|
-
</div>
|
|
1437
|
-
`,
|
|
1438
|
-
styleUrls: ['./loader.component.scss']
|
|
1439
|
-
}]
|
|
1440
|
-
}], null, null); })();
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
/***/ }),
|
|
1444
|
-
|
|
1445
|
-
/***/ "./src/app/components/shared/shared.module.ts":
|
|
1446
|
-
/*!****************************************************!*\
|
|
1447
|
-
!*** ./src/app/components/shared/shared.module.ts ***!
|
|
1448
|
-
\****************************************************/
|
|
1449
|
-
/*! no static exports found */
|
|
1450
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1451
|
-
|
|
1452
|
-
"use strict";
|
|
1453
|
-
|
|
1454
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1455
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1456
|
-
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
|
|
1457
|
-
const loader_component_1 = __webpack_require__(/*! ./loader/loader.component */ "./src/app/components/shared/loader/loader.component.ts");
|
|
1458
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1459
|
-
class SharedModule {
|
|
1460
|
-
}
|
|
1461
|
-
exports.SharedModule = SharedModule;
|
|
1462
|
-
SharedModule.ɵmod = i0.ɵɵdefineNgModule({ type: SharedModule });
|
|
1463
|
-
SharedModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SharedModule_Factory(t) { return new (t || SharedModule)(); }, imports: [[
|
|
1464
|
-
common_1.CommonModule
|
|
1465
|
-
]] });
|
|
1466
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SharedModule, { declarations: [loader_component_1.LoaderComponent], imports: [common_1.CommonModule], exports: [loader_component_1.LoaderComponent] }); })();
|
|
1467
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SharedModule, [{
|
|
1468
|
-
type: core_1.NgModule,
|
|
1469
|
-
args: [{
|
|
1470
|
-
imports: [
|
|
1471
|
-
common_1.CommonModule
|
|
1472
|
-
],
|
|
1473
|
-
declarations: [
|
|
1474
|
-
loader_component_1.LoaderComponent
|
|
1475
|
-
],
|
|
1476
|
-
exports: [
|
|
1477
|
-
loader_component_1.LoaderComponent
|
|
1478
|
-
]
|
|
1479
|
-
}]
|
|
1480
|
-
}], null, null); })();
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
/***/ }),
|
|
1484
|
-
|
|
1485
|
-
/***/ "./src/app/directives/visibility-observer-master.directive.ts":
|
|
1486
|
-
/*!********************************************************************!*\
|
|
1487
|
-
!*** ./src/app/directives/visibility-observer-master.directive.ts ***!
|
|
1488
|
-
\********************************************************************/
|
|
1489
|
-
/*! no static exports found */
|
|
1490
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1491
|
-
|
|
1492
|
-
"use strict";
|
|
1493
|
-
|
|
1494
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1495
|
-
// Import the core angular services.
|
|
1496
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1497
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1498
|
-
class VisibilityObserverMasterDirective {
|
|
1499
|
-
// I initialize the intersection observer parent directive.
|
|
1500
|
-
constructor() {
|
|
1501
|
-
// As each observable child attaches itself to the parent observer, we need to
|
|
1502
|
-
// map Elements to Callbacks so that when an Element's intersection changes,
|
|
1503
|
-
// we'll know which callback to invoke. For this, we'll use an ES6 Map.
|
|
1504
|
-
this._mapping = new Map();
|
|
1505
|
-
this._observer = new IntersectionObserver((entries) => {
|
|
1506
|
-
for (const entry of entries) {
|
|
1507
|
-
const callback = this._mapping.get(entry.target);
|
|
1508
|
-
if (callback) {
|
|
1509
|
-
callback(entry.isIntersecting);
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
}, {
|
|
1513
|
-
// This classifies the "intersection" as being a bit outside the
|
|
1514
|
-
// viewport. The intent here is give the elements a little time to react
|
|
1515
|
-
// to the change before the element is actually visible to the user.
|
|
1516
|
-
rootMargin: '300px 0px 300px 0px'
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
// I get called once when the host element is being destroyed.
|
|
1520
|
-
ngOnDestroy() {
|
|
1521
|
-
this._mapping.clear();
|
|
1522
|
-
this._observer.disconnect();
|
|
1523
|
-
}
|
|
1524
|
-
// ---
|
|
1525
|
-
// PUBLIC METHODS.
|
|
1526
|
-
// ---
|
|
1527
|
-
// I add the given Element for intersection observation. When the intersection status
|
|
1528
|
-
// changes, the given callback is invoked with the new status.
|
|
1529
|
-
add(element, callback) {
|
|
1530
|
-
this._mapping.set(element, callback);
|
|
1531
|
-
this._observer.observe(element);
|
|
1532
|
-
}
|
|
1533
|
-
// I remove the given Element from intersection observation.
|
|
1534
|
-
remove(element) {
|
|
1535
|
-
this._mapping.delete(element);
|
|
1536
|
-
this._observer.unobserve(element);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
exports.VisibilityObserverMasterDirective = VisibilityObserverMasterDirective;
|
|
1540
|
-
VisibilityObserverMasterDirective.ɵfac = function VisibilityObserverMasterDirective_Factory(t) { return new (t || VisibilityObserverMasterDirective)(); };
|
|
1541
|
-
VisibilityObserverMasterDirective.ɵdir = i0.ɵɵdefineDirective({ type: VisibilityObserverMasterDirective, selectors: [["", "visibilityObserverMaster", ""]] });
|
|
1542
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(VisibilityObserverMasterDirective, [{
|
|
1543
|
-
type: core_1.Directive,
|
|
1544
|
-
args: [{
|
|
1545
|
-
selector: '[visibilityObserverMaster]'
|
|
1546
|
-
}]
|
|
1547
|
-
}], function () { return []; }, null); })();
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
/***/ }),
|
|
1551
|
-
|
|
1552
|
-
/***/ "./src/app/directives/visibility-observer.directive.ts":
|
|
1553
|
-
/*!*************************************************************!*\
|
|
1554
|
-
!*** ./src/app/directives/visibility-observer.directive.ts ***!
|
|
1555
|
-
\*************************************************************/
|
|
1556
|
-
/*! no static exports found */
|
|
1557
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1558
|
-
|
|
1559
|
-
"use strict";
|
|
1560
|
-
|
|
1561
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1562
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1563
|
-
const visibility_observer_master_directive_1 = __webpack_require__(/*! ./visibility-observer-master.directive */ "./src/app/directives/visibility-observer-master.directive.ts");
|
|
1564
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1565
|
-
const i1 = __webpack_require__(/*! ./visibility-observer-master.directive */ "./src/app/directives/visibility-observer-master.directive.ts");
|
|
1566
|
-
class VisibilityObserverDirective {
|
|
1567
|
-
// I initialize the intersection observer directive.
|
|
1568
|
-
constructor(parent, elementRef) {
|
|
1569
|
-
this.observerEnabled = false;
|
|
1570
|
-
// These are just some human-friendly constants to make the HTML template a bit more
|
|
1571
|
-
// readable when being consumed as part of SWTCH/CASE statements.
|
|
1572
|
-
this.IS_INTERSECTING = true;
|
|
1573
|
-
this.IS_NOT_INTERSECTING = false;
|
|
1574
|
-
this._parent = parent;
|
|
1575
|
-
this._elementRef = elementRef;
|
|
1576
|
-
// By default, we're going to assume that the host element is NOT intersecting.
|
|
1577
|
-
// Then, we'll use the IntersectionObserver to asynchronously check for changes
|
|
1578
|
-
// in viewport visibility.
|
|
1579
|
-
this.isIntersecting = false;
|
|
1580
|
-
}
|
|
1581
|
-
// ---
|
|
1582
|
-
// PUBLIC METHODS.
|
|
1583
|
-
// ---
|
|
1584
|
-
// I get called once when the host element is being destroyed.
|
|
1585
|
-
ngOnDestroy() {
|
|
1586
|
-
this._parent.remove(this._elementRef.nativeElement);
|
|
1587
|
-
this._elementRef = undefined;
|
|
1588
|
-
}
|
|
1589
|
-
// I get called once after the inputs have been bound for the first time.
|
|
1590
|
-
ngOnInit() {
|
|
1591
|
-
// In this demo, instead of using an IntersectionObserver per Element, we're
|
|
1592
|
-
// going to use a shared observer in the parent element. However, we're still
|
|
1593
|
-
// going to use a CALLBACK style approach so that we're only reducing the number
|
|
1594
|
-
// of IntersectionObserver instances, not the number of Function calls.
|
|
1595
|
-
if (this.observerEnabled) {
|
|
1596
|
-
this._parent.add(this._elementRef.nativeElement, (isIntersecting) => {
|
|
1597
|
-
this.isIntersecting = isIntersecting;
|
|
1598
|
-
if (this.isIntersecting) {
|
|
1599
|
-
this._parent.remove(this._elementRef.nativeElement);
|
|
1600
|
-
}
|
|
1601
|
-
});
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
exports.VisibilityObserverDirective = VisibilityObserverDirective;
|
|
1606
|
-
VisibilityObserverDirective.ɵfac = function VisibilityObserverDirective_Factory(t) { return new (t || VisibilityObserverDirective)(i0.ɵɵdirectiveInject(i1.VisibilityObserverMasterDirective), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
1607
|
-
VisibilityObserverDirective.ɵdir = i0.ɵɵdefineDirective({ type: VisibilityObserverDirective, selectors: [["", "visibilityObserver", ""]], inputs: { observerEnabled: "observerEnabled" }, exportAs: ["intersection"] });
|
|
1608
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(VisibilityObserverDirective, [{
|
|
1609
|
-
type: core_1.Directive,
|
|
1610
|
-
args: [{
|
|
1611
|
-
selector: '[visibilityObserver]',
|
|
1612
|
-
exportAs: 'intersection'
|
|
1613
|
-
}]
|
|
1614
|
-
}], function () { return [{ type: i1.VisibilityObserverMasterDirective }, { type: i0.ElementRef }]; }, { observerEnabled: [{
|
|
1615
|
-
type: core_1.Input
|
|
1616
|
-
}] }); })();
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
/***/ }),
|
|
1620
|
-
|
|
1621
|
-
/***/ "./src/app/services/configurator.service.ts":
|
|
1622
|
-
/*!**************************************************!*\
|
|
1623
|
-
!*** ./src/app/services/configurator.service.ts ***!
|
|
1624
|
-
\**************************************************/
|
|
1625
|
-
/*! no static exports found */
|
|
1626
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1627
|
-
|
|
1628
|
-
"use strict";
|
|
1629
|
-
|
|
1630
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1631
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
1632
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1633
|
-
const configurator_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/configurator */ "./node_modules/@colijnit/configuratorapi/build/configurator.js");
|
|
1634
|
-
const locator_service_1 = __webpack_require__(/*! ./locator.service */ "./src/app/services/locator.service.ts");
|
|
1635
|
-
const not_nill_function_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/utils/function/not-nill.function */ "./node_modules/@colijnit/configuratorapi/build/utils/function/not-nill.function.js");
|
|
1636
|
-
const node_type_enum_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/enum/node-type.enum */ "./node_modules/@colijnit/configuratorapi/build/enum/node-type.enum.js");
|
|
1637
|
-
const is_nill_function_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/utils/function/is-nill.function */ "./node_modules/@colijnit/configuratorapi/build/utils/function/is-nill.function.js");
|
|
1638
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1639
|
-
class ConfiguratorService {
|
|
1640
|
-
constructor(_injector) {
|
|
1641
|
-
this._injector = _injector;
|
|
1642
|
-
if (!locator_service_1.ServiceLocator.injector) {
|
|
1643
|
-
locator_service_1.ServiceLocator.injector = _injector;
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
initApi(options) {
|
|
1647
|
-
this._configuratorApi = new configurator_1.Configurator(options);
|
|
1648
|
-
}
|
|
1649
|
-
initNodeInstance(goodId) {
|
|
1650
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1651
|
-
return yield this._configuratorApi.initNodeInstance(goodId);
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
setInstanceToConfigure(id, showLoader = false) {
|
|
1655
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1656
|
-
return yield this._configuratorApi.setInstanceToConfigure(id, showLoader);
|
|
1657
|
-
});
|
|
1658
|
-
}
|
|
1659
|
-
getGoodIdFromSku(sku, showLoader = false) {
|
|
1660
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1661
|
-
return yield this._configuratorApi.getGoodIdFromSku(sku, showLoader);
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
getArticleQuickSel(goodId, showLoader = false) {
|
|
1665
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1666
|
-
return yield this._configuratorApi.getArticleQuickSel(goodId, showLoader);
|
|
1667
|
-
});
|
|
1668
|
-
}
|
|
1669
|
-
getSelections(showLoader = false, publicationCode = 2) {
|
|
1670
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1671
|
-
const selections = yield this._configuratorApi.getSelections(showLoader);
|
|
1672
|
-
selections.resultObjects.filter((s) => {
|
|
1673
|
-
(is_nill_function_1.isNill(s.hierarchicalPublicationCode) || ((s.hierarchicalPublicationCode & publicationCode) > 0)) && ((s.nodeType === node_type_enum_1.NodeType.Question && (((s.questionPublicationCode & publicationCode) > 0) || is_nill_function_1.isNill(s.questionPublicationCode))) ||
|
|
1674
|
-
(s.nodeType === node_type_enum_1.NodeType.Answer && (((s.answerPublicationCode & publicationCode) > 0) || is_nill_function_1.isNill(s.answerPublicationCode))));
|
|
1675
|
-
});
|
|
1676
|
-
return selections;
|
|
1677
|
-
});
|
|
1678
|
-
}
|
|
1679
|
-
getDecos(showLoader = false) {
|
|
1680
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1681
|
-
return yield this._configuratorApi.getDecos(showLoader);
|
|
1682
|
-
});
|
|
1683
|
-
}
|
|
1684
|
-
getQuestionAndAnswers(showLoader = false, publicationCode = 2) {
|
|
1685
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1686
|
-
const questionAndAnswers = yield this._configuratorApi.getQuestionAndAnswers(showLoader);
|
|
1687
|
-
questionAndAnswers.answers.filter((answer) => {
|
|
1688
|
-
(not_nill_function_1.notNill(answer.hierarchicalPublicationCode) && (answer.hierarchicalPublicationCode & publicationCode) === 0) ||
|
|
1689
|
-
(answer.type === node_type_enum_1.NodeType.Question && (answer.questionPublicationCode & publicationCode) === 0 && not_nill_function_1.notNill(answer.questionPublicationCode)) ||
|
|
1690
|
-
(answer.type === node_type_enum_1.NodeType.Answer && (answer.publicationCode & publicationCode) === 0 && not_nill_function_1.notNill(answer.publicationCode));
|
|
1691
|
-
});
|
|
1692
|
-
return questionAndAnswers;
|
|
1693
|
-
});
|
|
1694
|
-
}
|
|
1695
|
-
getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader) {
|
|
1696
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1697
|
-
if (!nodeId) {
|
|
1698
|
-
return null;
|
|
1699
|
-
}
|
|
1700
|
-
return yield this._configuratorApi.getSingleImage(nodeId, publication, includeMimetype, thumb, showLoader);
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
|
-
selectSelection(selection, showLoader = false) {
|
|
1704
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1705
|
-
return yield this._configuratorApi.selectSelection(selection, showLoader);
|
|
1706
|
-
});
|
|
1707
|
-
}
|
|
1708
|
-
selectAnswer(answer, showLoader = false) {
|
|
1709
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1710
|
-
return yield this._configuratorApi.selectAnswer(answer, showLoader);
|
|
1711
|
-
});
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
exports.ConfiguratorService = ConfiguratorService;
|
|
1715
|
-
ConfiguratorService.ɵfac = function ConfiguratorService_Factory(t) { return new (t || ConfiguratorService)(i0.ɵɵinject(i0.Injector)); };
|
|
1716
|
-
ConfiguratorService.ɵprov = i0.ɵɵdefineInjectable({ token: ConfiguratorService, factory: ConfiguratorService.ɵfac, providedIn: 'root' });
|
|
1717
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ConfiguratorService, [{
|
|
1718
|
-
type: core_1.Injectable,
|
|
1719
|
-
args: [{
|
|
1720
|
-
providedIn: 'root'
|
|
1721
|
-
}]
|
|
1722
|
-
}], function () { return [{ type: i0.Injector }]; }, null); })();
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
/***/ }),
|
|
1726
|
-
|
|
1727
|
-
/***/ "./src/app/services/image-cache.service.ts":
|
|
1728
|
-
/*!*************************************************!*\
|
|
1729
|
-
!*** ./src/app/services/image-cache.service.ts ***!
|
|
1730
|
-
\*************************************************/
|
|
1731
|
-
/*! no static exports found */
|
|
1732
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1733
|
-
|
|
1734
|
-
"use strict";
|
|
1735
|
-
|
|
1736
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1737
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1738
|
-
const image_utils_1 = __webpack_require__(/*! ../../utils/image.utils */ "./src/utils/image.utils.ts");
|
|
1739
|
-
const configurator_service_1 = __webpack_require__(/*! ./configurator.service */ "./src/app/services/configurator.service.ts");
|
|
1740
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1741
|
-
const i1 = __webpack_require__(/*! ./configurator.service */ "./src/app/services/configurator.service.ts");
|
|
1742
|
-
class ImageCacheService {
|
|
1743
|
-
constructor(_configuratorService) {
|
|
1744
|
-
this._configuratorService = _configuratorService;
|
|
1745
|
-
// Map containing the retrieved images, @number = nodeId, @string = base64 string
|
|
1746
|
-
this._imageCache = new Map();
|
|
1747
|
-
}
|
|
1748
|
-
static _handleResponseData(includeMimetype, thumb, responseData) {
|
|
1749
|
-
if (responseData && responseData.resultObject) {
|
|
1750
|
-
if (responseData.resultObject.filePath !== null && responseData.resultObject.filePath !== "") {
|
|
1751
|
-
return image_utils_1.ImageUtils.getFixedImageFilepathUrl(responseData.resultObject.filePath);
|
|
1752
|
-
}
|
|
1753
|
-
else {
|
|
1754
|
-
if (includeMimetype) {
|
|
1755
|
-
return image_utils_1.ImageUtils.getDocBodyWithMimeTypeDefinition(responseData.resultObject.fileName, thumb ? responseData.resultObject.thumbnailBody : responseData.resultObject.documentBody);
|
|
1756
|
-
}
|
|
1757
|
-
else {
|
|
1758
|
-
return thumb ? responseData.resultObject.thumbnailBody : responseData.resultObject.documentBody;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
else {
|
|
1763
|
-
return '';
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
getImageForSelectionOrAnswer(object) {
|
|
1767
|
-
const includeMimeType = true, thumb = true;
|
|
1768
|
-
return new Promise((resolve, reject) => {
|
|
1769
|
-
if (object && object.nodeId) {
|
|
1770
|
-
if (!this._imageCache.has(object.nodeId)) {
|
|
1771
|
-
return this._configuratorService.getSingleImage(object.nodeId, 4, includeMimeType, thumb, true)
|
|
1772
|
-
.then((responseData) => {
|
|
1773
|
-
const base64 = ImageCacheService._handleResponseData(includeMimeType, thumb, responseData);
|
|
1774
|
-
this._imageCache.set(object.nodeId, base64);
|
|
1775
|
-
resolve(base64);
|
|
1776
|
-
}).catch(() => {
|
|
1777
|
-
reject();
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
else {
|
|
1781
|
-
resolve(this._imageCache.get(object.nodeId));
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
else {
|
|
1785
|
-
reject();
|
|
1786
|
-
}
|
|
1787
|
-
});
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
exports.ImageCacheService = ImageCacheService;
|
|
1791
|
-
ImageCacheService.ɵfac = function ImageCacheService_Factory(t) { return new (t || ImageCacheService)(i0.ɵɵinject(i1.ConfiguratorService)); };
|
|
1792
|
-
ImageCacheService.ɵprov = i0.ɵɵdefineInjectable({ token: ImageCacheService, factory: ImageCacheService.ɵfac, providedIn: 'root' });
|
|
1793
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ImageCacheService, [{
|
|
1794
|
-
type: core_1.Injectable,
|
|
1795
|
-
args: [{
|
|
1796
|
-
providedIn: 'root'
|
|
1797
|
-
}]
|
|
1798
|
-
}], function () { return [{ type: i1.ConfiguratorService }]; }, null); })();
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
/***/ }),
|
|
1802
|
-
|
|
1803
|
-
/***/ "./src/app/services/locator.service.ts":
|
|
1804
|
-
/*!*********************************************!*\
|
|
1805
|
-
!*** ./src/app/services/locator.service.ts ***!
|
|
1806
|
-
\*********************************************/
|
|
1807
|
-
/*! no static exports found */
|
|
1808
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1809
|
-
|
|
1810
|
-
"use strict";
|
|
1811
|
-
|
|
1812
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1813
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1814
|
-
const i0 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
1815
|
-
class ServiceLocator {
|
|
1816
|
-
}
|
|
1817
|
-
exports.ServiceLocator = ServiceLocator;
|
|
1818
|
-
ServiceLocator.injector = undefined;
|
|
1819
|
-
ServiceLocator.ɵfac = function ServiceLocator_Factory(t) { return new (t || ServiceLocator)(); };
|
|
1820
|
-
ServiceLocator.ɵprov = i0.ɵɵdefineInjectable({ token: ServiceLocator, factory: ServiceLocator.ɵfac });
|
|
1821
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ServiceLocator, [{
|
|
1822
|
-
type: core_1.Injectable
|
|
1823
|
-
}], null, null); })();
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
/***/ }),
|
|
1827
|
-
|
|
1828
|
-
/***/ "./src/environments/environment.ts":
|
|
1829
|
-
/*!*****************************************!*\
|
|
1830
|
-
!*** ./src/environments/environment.ts ***!
|
|
1831
|
-
\*****************************************/
|
|
1832
|
-
/*! no static exports found */
|
|
1833
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1834
|
-
|
|
1835
|
-
"use strict";
|
|
1836
|
-
|
|
1837
|
-
// The file contents for the current environment will overwrite these during build.
|
|
1838
|
-
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
|
1839
|
-
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
|
1840
|
-
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
|
1841
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1842
|
-
exports.environment = {
|
|
1843
|
-
production: false
|
|
1844
|
-
};
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
/***/ }),
|
|
1848
|
-
|
|
1849
|
-
/***/ "./src/helper/variation-helper.ts":
|
|
1850
|
-
/*!****************************************!*\
|
|
1851
|
-
!*** ./src/helper/variation-helper.ts ***!
|
|
1852
|
-
\****************************************/
|
|
1853
|
-
/*! no static exports found */
|
|
1854
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1855
|
-
|
|
1856
|
-
"use strict";
|
|
1857
|
-
|
|
1858
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1859
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
1860
|
-
const deco_node_type_enum_1 = __webpack_require__(/*! @colijnit/configuratorapi/build/enum/deco-node-type.enum */ "./node_modules/@colijnit/configuratorapi/build/enum/deco-node-type.enum.js");
|
|
1861
|
-
const asset_utils_1 = __webpack_require__(/*! ../utils/asset.utils */ "./src/utils/asset.utils.ts");
|
|
1862
|
-
const variation_1 = __webpack_require__(/*! ../model/variation */ "./src/model/variation.ts");
|
|
1863
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
1864
|
-
const variation_utils_1 = __webpack_require__(/*! ../utils/variation-utils */ "./src/utils/variation-utils.ts");
|
|
1865
|
-
class VariationHelper {
|
|
1866
|
-
constructor() {
|
|
1867
|
-
this._lastKnownVariations = new Map();
|
|
1868
|
-
}
|
|
1869
|
-
clearCache() {
|
|
1870
|
-
const valueMap = Array.from(this._lastKnownVariations.values());
|
|
1871
|
-
for (let i = 0; i < valueMap.length; i++) {
|
|
1872
|
-
const values = Array.from(valueMap[i].values());
|
|
1873
|
-
values.forEach((variations) => {
|
|
1874
|
-
variations.forEach((variation) => {
|
|
1875
|
-
variation.material.texture.dispose();
|
|
1876
|
-
variation.material.normal.dispose();
|
|
1877
|
-
variation.material.metalness.dispose();
|
|
1878
|
-
variation.material.roughness.dispose();
|
|
1879
|
-
variation.material.ao.dispose();
|
|
1880
|
-
});
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
loadPart(obj, parts, usePbr = false) {
|
|
1885
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1886
|
-
try {
|
|
1887
|
-
const len = parts.length;
|
|
1888
|
-
for (let i = 0; i < len; i++) {
|
|
1889
|
-
if (parts[i].decoNode && parts[i].decoNode.gameObjectName && parts[i].decoNode.type === deco_node_type_enum_1.DecoNodeType.Part) {
|
|
1890
|
-
const partSettings = yield variation_utils_1.VariationUtils.LoadVariation(this.assetPath, parts[i].decoNode.gameObjectName || parts[i].decoId);
|
|
1891
|
-
if (partSettings) {
|
|
1892
|
-
const partVariation = new variation_1.Variation();
|
|
1893
|
-
partVariation.decoId = parseFloat(parts[i].decoNode.id);
|
|
1894
|
-
partVariation.brandId = parts[i].decoNode.brandId;
|
|
1895
|
-
partVariation.gameObjectName = parts[i].decoNode.gameObjectName;
|
|
1896
|
-
partVariation.material = yield asset_utils_1.AssetUtils.CreateMaterialFromAsset(partSettings);
|
|
1897
|
-
// parts[i].variation = partVariation;
|
|
1898
|
-
this._applyMaterialPart(obj, partVariation, parts[i].node, usePbr);
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
catch (e) {
|
|
1904
|
-
console.error(e);
|
|
1905
|
-
}
|
|
1906
|
-
});
|
|
1907
|
-
}
|
|
1908
|
-
loadVariation(instanceId, obj, parts, usePbr = false) {
|
|
1909
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1910
|
-
try {
|
|
1911
|
-
const len = parts.length;
|
|
1912
|
-
for (let i = 0; i < len; i++) {
|
|
1913
|
-
const variations = parts[i].variations;
|
|
1914
|
-
if (!variations || variations.length === 0) {
|
|
1915
|
-
if (this._getLastKnownVariations(instanceId, parts[i].nodeId)) {
|
|
1916
|
-
parts[i].variations = this._getLastKnownVariations(instanceId, parts[i].nodeId);
|
|
1917
|
-
this._applyVariations(obj, parts[i], usePbr);
|
|
1918
|
-
continue;
|
|
1919
|
-
}
|
|
1920
|
-
else {
|
|
1921
|
-
continue;
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
const lastKnownVariations = [];
|
|
1925
|
-
for (let j = 0; j < variations.length; j++) {
|
|
1926
|
-
const variationSettings = yield variation_utils_1.VariationUtils.LoadVariation(this.assetPath, variations[j].gameObjectName || parts[i].decoId);
|
|
1927
|
-
const newVariation = new variation_1.Variation();
|
|
1928
|
-
newVariation.decoId = parseFloat(variations[j].id);
|
|
1929
|
-
newVariation.brandId = variations[j].brandId;
|
|
1930
|
-
newVariation.gameObjectName = variations[j].gameObjectName;
|
|
1931
|
-
newVariation.supplierArticleNr = variations[j].supplierArticleNr;
|
|
1932
|
-
newVariation.materialId = variations[j].materialId;
|
|
1933
|
-
newVariation.material = yield asset_utils_1.AssetUtils.CreateMaterialFromAsset(variationSettings);
|
|
1934
|
-
lastKnownVariations.push(newVariation);
|
|
1935
|
-
}
|
|
1936
|
-
this._setLastKnownVariations(instanceId, parts[i].nodeId, lastKnownVariations);
|
|
1937
|
-
parts[i].variations = lastKnownVariations;
|
|
1938
|
-
this._applyVariations(obj, parts[i], usePbr);
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
catch (e) {
|
|
1942
|
-
console.error(e);
|
|
1943
|
-
}
|
|
1944
|
-
});
|
|
1945
|
-
}
|
|
1946
|
-
_getChildrenFilterByProp(obj, userDataObjectProp, prop, value) {
|
|
1947
|
-
return obj.children.filter((child) => {
|
|
1948
|
-
return child.userData &&
|
|
1949
|
-
child.userData.hasOwnProperty(userDataObjectProp) &&
|
|
1950
|
-
child.userData[userDataObjectProp].hasOwnProperty(prop) &&
|
|
1951
|
-
child.userData[userDataObjectProp][prop] === value;
|
|
1952
|
-
});
|
|
1953
|
-
}
|
|
1954
|
-
_applyMaterialPart(obj, partMaterial, nodeId, usePbr = false) {
|
|
1955
|
-
const children = this._getChildrenFilterByProp(obj, 'selection', 'node', nodeId);
|
|
1956
|
-
const len = children.length;
|
|
1957
|
-
for (let i = 0; i < len; i++) {
|
|
1958
|
-
const child = children[i];
|
|
1959
|
-
if (child !== null && child !== undefined) {
|
|
1960
|
-
child.traverse((mesh) => {
|
|
1961
|
-
if (mesh instanceof THREE.Mesh && partMaterial) {
|
|
1962
|
-
if (Array.isArray(mesh.material)) { // multimaterial support
|
|
1963
|
-
for (let j = 0, jlen = mesh.material.length; j < jlen; j++) {
|
|
1964
|
-
if (mesh.material[j].name.toLowerCase().indexOf('fixed_frame') !== -1) {
|
|
1965
|
-
mesh.material[j] = this._setMeshMaterialFromVariation(mesh.material[j].name, partMaterial, usePbr);
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
else {
|
|
1970
|
-
if (mesh.material.name.toLowerCase().indexOf('fixed_frame') !== -1) {
|
|
1971
|
-
mesh.material = this._setMeshMaterialFromVariation(mesh.material.name, partMaterial, usePbr);
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
});
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
_applyVariations(obj, part, usePbr = false) {
|
|
1980
|
-
const children = this._getChildrenFilterByProp(obj, 'selection', 'node', part.node);
|
|
1981
|
-
const len = children.length;
|
|
1982
|
-
for (let i = 0; i < len; i++) {
|
|
1983
|
-
const child = children[i];
|
|
1984
|
-
if (child !== null && child !== undefined) {
|
|
1985
|
-
child.traverse((mesh) => {
|
|
1986
|
-
if (mesh instanceof THREE.Mesh && part.variations && part.variations.length > 0 && mesh.name.toLowerCase().indexOf('c_')) {
|
|
1987
|
-
for (let j = 0; j < part.variations.length; j++) {
|
|
1988
|
-
const variation = part.variations[j];
|
|
1989
|
-
if (variation.material) {
|
|
1990
|
-
const materialToSearch = !!variation.materialId ? variation.materialId.toLowerCase() : 'default';
|
|
1991
|
-
if (Array.isArray(mesh.material)) { // multimaterial support
|
|
1992
|
-
for (let m = 0, mlen = mesh.material.length; m < mlen; m++) {
|
|
1993
|
-
if (mesh.material[m].name.toLowerCase().indexOf(materialToSearch) !== -1) {
|
|
1994
|
-
mesh.material[m] = this._setMeshMaterialFromVariation(mesh.material[m].name, variation, usePbr);
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
else {
|
|
1999
|
-
if (mesh.material.name.toLowerCase().indexOf(materialToSearch) !== -1) {
|
|
2000
|
-
mesh.material = this._setMeshMaterialFromVariation(mesh.material.name, variation, usePbr);
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
_setMeshMaterialFromVariation(name, variation, usePbr = false) {
|
|
2011
|
-
if (variation.material.texture) {
|
|
2012
|
-
variation.material.texture.needsUpdate = true;
|
|
2013
|
-
}
|
|
2014
|
-
if (!usePbr) {
|
|
2015
|
-
const material = new THREE.MeshPhongMaterial({
|
|
2016
|
-
name: name,
|
|
2017
|
-
shininess: variation.material.shininess,
|
|
2018
|
-
specular: variation.material.specular,
|
|
2019
|
-
map: variation.material.texture,
|
|
2020
|
-
normalMap: variation.material.normal
|
|
2021
|
-
});
|
|
2022
|
-
// material.color.setRGB(0.8, 0.8, 0.8);
|
|
2023
|
-
material.needsUpdate = true;
|
|
2024
|
-
return material;
|
|
2025
|
-
}
|
|
2026
|
-
else {
|
|
2027
|
-
const params = {
|
|
2028
|
-
// side: DoubleSide,
|
|
2029
|
-
name: name,
|
|
2030
|
-
roughness: variation.material.roughnessValue ? variation.material.roughnessValue : 1,
|
|
2031
|
-
metalness: variation.material.metalnessValue ? variation.material.metalnessValue : 0,
|
|
2032
|
-
};
|
|
2033
|
-
if (variation.material.texture) {
|
|
2034
|
-
params.map = variation.material.texture;
|
|
2035
|
-
}
|
|
2036
|
-
if (variation.material.ao) {
|
|
2037
|
-
params.aoMap = variation.material.ao;
|
|
2038
|
-
}
|
|
2039
|
-
if (variation.material.roughness) {
|
|
2040
|
-
params.roughnessMap = variation.material.roughness;
|
|
2041
|
-
}
|
|
2042
|
-
if (variation.material.metalness) {
|
|
2043
|
-
params.metalnessMap = variation.material.metalness;
|
|
2044
|
-
}
|
|
2045
|
-
if (variation.material.normal) {
|
|
2046
|
-
params.normalMap = variation.material.normal;
|
|
2047
|
-
}
|
|
2048
|
-
const material = new THREE.MeshStandardMaterial(params);
|
|
2049
|
-
material.color.setRGB(1, 1, 1);
|
|
2050
|
-
material.needsUpdate = true;
|
|
2051
|
-
return material;
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
_setLastKnownVariations(instanceId, id, variation) {
|
|
2055
|
-
if (this._lastKnownVariations.has(instanceId)) {
|
|
2056
|
-
const variations = this._lastKnownVariations.get(instanceId);
|
|
2057
|
-
variations.set(id, variation);
|
|
2058
|
-
}
|
|
2059
|
-
else {
|
|
2060
|
-
const variations = new Map();
|
|
2061
|
-
this._lastKnownVariations.set(instanceId, variations.set(id, variation));
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
_getLastKnownVariations(instanceId, id) {
|
|
2065
|
-
if (this._lastKnownVariations.has(instanceId)) {
|
|
2066
|
-
const variations = this._lastKnownVariations.get(instanceId);
|
|
2067
|
-
if (variations.has(id)) {
|
|
2068
|
-
return variations.get(id);
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
return null;
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
exports.VariationHelper = VariationHelper;
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
/***/ }),
|
|
2078
|
-
|
|
2079
|
-
/***/ "./src/main.ts":
|
|
2080
|
-
/*!*********************!*\
|
|
2081
|
-
!*** ./src/main.ts ***!
|
|
2082
|
-
\*********************/
|
|
2083
|
-
/*! no static exports found */
|
|
2084
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2085
|
-
|
|
2086
|
-
"use strict";
|
|
2087
|
-
|
|
2088
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2089
|
-
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
|
|
2090
|
-
const environment_1 = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
|
|
2091
|
-
const __NgCli_bootstrap_1 = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
|
|
2092
|
-
const __NgCli_bootstrap_2 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js");
|
|
2093
|
-
if (environment_1.environment.production) {
|
|
2094
|
-
core_1.enableProdMode();
|
|
2095
|
-
}
|
|
2096
|
-
__NgCli_bootstrap_2.platformBrowser().bootstrapModule(__NgCli_bootstrap_1.AppModule);
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
/***/ }),
|
|
2100
|
-
|
|
2101
|
-
/***/ "./src/model/material.ts":
|
|
2102
|
-
/*!*******************************!*\
|
|
2103
|
-
!*** ./src/model/material.ts ***!
|
|
2104
|
-
\*******************************/
|
|
2105
|
-
/*! no static exports found */
|
|
2106
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2107
|
-
|
|
2108
|
-
"use strict";
|
|
2109
|
-
|
|
2110
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2111
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2112
|
-
class Material {
|
|
2113
|
-
constructor() {
|
|
2114
|
-
this.specular = new THREE.Color(0.3, 0.3, 0.3);
|
|
2115
|
-
this.shininess = 0;
|
|
2116
|
-
this.repeatX = 4;
|
|
2117
|
-
this.repeatY = 4;
|
|
2118
|
-
this.loaded = false;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
exports.Material = Material;
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
/***/ }),
|
|
2125
|
-
|
|
2126
|
-
/***/ "./src/model/variation-settings.ts":
|
|
2127
|
-
/*!*****************************************!*\
|
|
2128
|
-
!*** ./src/model/variation-settings.ts ***!
|
|
2129
|
-
\*****************************************/
|
|
2130
|
-
/*! no static exports found */
|
|
2131
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2132
|
-
|
|
2133
|
-
"use strict";
|
|
2134
|
-
|
|
2135
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2136
|
-
class VariationSettings {
|
|
2137
|
-
constructor() {
|
|
2138
|
-
this.settings = {};
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
exports.VariationSettings = VariationSettings;
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
/***/ }),
|
|
2145
|
-
|
|
2146
|
-
/***/ "./src/model/variation.ts":
|
|
2147
|
-
/*!********************************!*\
|
|
2148
|
-
!*** ./src/model/variation.ts ***!
|
|
2149
|
-
\********************************/
|
|
2150
|
-
/*! no static exports found */
|
|
2151
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2152
|
-
|
|
2153
|
-
"use strict";
|
|
2154
|
-
|
|
2155
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2156
|
-
class Variation {
|
|
2157
|
-
}
|
|
2158
|
-
exports.Variation = Variation;
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
/***/ }),
|
|
2162
|
-
|
|
2163
|
-
/***/ "./src/utils/asset.utils.ts":
|
|
2164
|
-
/*!**********************************!*\
|
|
2165
|
-
!*** ./src/utils/asset.utils.ts ***!
|
|
2166
|
-
\**********************************/
|
|
2167
|
-
/*! no static exports found */
|
|
2168
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2169
|
-
|
|
2170
|
-
"use strict";
|
|
2171
|
-
|
|
2172
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2173
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
2174
|
-
const material_1 = __webpack_require__(/*! ../model/material */ "./src/model/material.ts");
|
|
2175
|
-
const image_utils_1 = __webpack_require__(/*! ./image.utils */ "./src/utils/image.utils.ts");
|
|
2176
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2177
|
-
const three_1 = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2178
|
-
class FurnitureMaterial extends material_1.Material {
|
|
2179
|
-
}
|
|
2180
|
-
exports.FurnitureMaterial = FurnitureMaterial;
|
|
2181
|
-
class AssetUtils {
|
|
2182
|
-
static CreateMaterialFromAsset(asset) {
|
|
2183
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2184
|
-
const material = new material_1.Material();
|
|
2185
|
-
if (!asset) {
|
|
2186
|
-
return material;
|
|
2187
|
-
}
|
|
2188
|
-
if (asset.settings) {
|
|
2189
|
-
AssetUtils.setSettingsOfMaterial(material, asset.settings);
|
|
2190
|
-
}
|
|
2191
|
-
if (asset.texture) {
|
|
2192
|
-
material.texture = yield image_utils_1.ImageUtils.CreateTextureFromBase64(asset.id + '_texture', asset.texture, material);
|
|
2193
|
-
material.texture.encoding = three_1.sRGBEncoding;
|
|
2194
|
-
material.textureFilename = asset.textureFilename;
|
|
2195
|
-
}
|
|
2196
|
-
if (asset.normal) {
|
|
2197
|
-
material.normal = yield image_utils_1.ImageUtils.CreateTextureFromBase64(asset.id + '_normal', asset.normal, material);
|
|
2198
|
-
material.normalFilename = asset.normalFilename;
|
|
2199
|
-
// material.normal.anisotropy = 1;
|
|
2200
|
-
// material.normal.repeat.set(1, 1);
|
|
2201
|
-
// material.normal.flipY = false;
|
|
2202
|
-
}
|
|
2203
|
-
if (asset.ao) {
|
|
2204
|
-
material.ao = yield image_utils_1.ImageUtils.CreateTextureFromBase64(asset.id + '_ao', asset.ao, material);
|
|
2205
|
-
material.aoFilename = asset.aoFilename;
|
|
2206
|
-
}
|
|
2207
|
-
if (asset.metalness) {
|
|
2208
|
-
material.metalness = yield image_utils_1.ImageUtils.CreateTextureFromBase64(asset.id + '_metalness', asset.metalness, material);
|
|
2209
|
-
material.metalnessFilename = asset.metalnessFilename;
|
|
2210
|
-
}
|
|
2211
|
-
if (asset.roughness) {
|
|
2212
|
-
material.roughness = yield image_utils_1.ImageUtils.CreateTextureFromBase64(asset.id + '_roughness', asset.roughness, material);
|
|
2213
|
-
material.roughnessFilename = asset.roughnessFilename;
|
|
2214
|
-
}
|
|
2215
|
-
return material;
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2218
|
-
static setSettingsOfMaterial(material, settings) {
|
|
2219
|
-
const shininess = parseFloat(settings['power']);
|
|
2220
|
-
if (!isNaN(shininess)) {
|
|
2221
|
-
material.shininess = shininess;
|
|
2222
|
-
// material.roughness = 1 - (shininess / 100);
|
|
2223
|
-
}
|
|
2224
|
-
const level = parseFloat(settings['level']);
|
|
2225
|
-
if (!isNaN(level)) {
|
|
2226
|
-
material.specular = new THREE.Color(level, level, level);
|
|
2227
|
-
}
|
|
2228
|
-
const repeatObjectUsed = settings.hasOwnProperty('repeat');
|
|
2229
|
-
const repeatx = repeatObjectUsed ? parseFloat(settings['repeat']['repeatx']) : parseFloat(settings['repeatx']);
|
|
2230
|
-
if (!isNaN(repeatx)) {
|
|
2231
|
-
material.repeatX = Math.max(1, repeatx);
|
|
2232
|
-
}
|
|
2233
|
-
const repeaty = repeatObjectUsed ? parseFloat(settings['repeat']['repeaty']) : parseFloat(settings['repeaty']);
|
|
2234
|
-
if (!isNaN(repeaty)) {
|
|
2235
|
-
material.repeatY = Math.max(1, repeaty);
|
|
2236
|
-
}
|
|
2237
|
-
const metalness = parseFloat(settings['metalness']);
|
|
2238
|
-
if (!isNaN(metalness)) {
|
|
2239
|
-
material.metalnessValue = Math.min(1, metalness);
|
|
2240
|
-
}
|
|
2241
|
-
const roughness = parseFloat(settings['roughness']);
|
|
2242
|
-
if (!isNaN(roughness)) {
|
|
2243
|
-
material.roughnessValue = Math.min(1, roughness);
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
exports.AssetUtils = AssetUtils;
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
/***/ }),
|
|
2251
|
-
|
|
2252
|
-
/***/ "./src/utils/file.utils.ts":
|
|
2253
|
-
/*!*********************************!*\
|
|
2254
|
-
!*** ./src/utils/file.utils.ts ***!
|
|
2255
|
-
\*********************************/
|
|
2256
|
-
/*! no static exports found */
|
|
2257
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2258
|
-
|
|
2259
|
-
"use strict";
|
|
2260
|
-
|
|
2261
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2262
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
2263
|
-
const axios_1 = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
|
|
2264
|
-
// Static utility functions holder related to files.
|
|
2265
|
-
// @dynamic
|
|
2266
|
-
class FileUtils {
|
|
2267
|
-
// Returns the given dataUri string stripped of the mimetype part.
|
|
2268
|
-
static StripMimeStringFromDataUri(dataUri) {
|
|
2269
|
-
if (!dataUri) {
|
|
2270
|
-
return '';
|
|
2271
|
-
}
|
|
2272
|
-
const mimeString = this.GetMimeStringFromDataUri(dataUri);
|
|
2273
|
-
return dataUri.substr(mimeString.length + 1);
|
|
2274
|
-
}
|
|
2275
|
-
static GetMimeStringFromDataUri(dataUri) {
|
|
2276
|
-
if (!dataUri) {
|
|
2277
|
-
return '';
|
|
2278
|
-
}
|
|
2279
|
-
return dataUri.split(',')[0];
|
|
2280
|
-
}
|
|
2281
|
-
static FileExists(url, assetPath) {
|
|
2282
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2283
|
-
const result = yield axios_1.default({
|
|
2284
|
-
method: 'get',
|
|
2285
|
-
url: `${assetPath}getFiles.php?assetUrl=${url}`,
|
|
2286
|
-
responseType: "json"
|
|
2287
|
-
});
|
|
2288
|
-
return !!result.data;
|
|
2289
|
-
});
|
|
2290
|
-
}
|
|
2291
|
-
/**
|
|
2292
|
-
* There is some discrepancy regarding locations of h3d objects
|
|
2293
|
-
* Therefor we need to (temporarily?!) fix the content url
|
|
2294
|
-
* Also we need to change some additionals
|
|
2295
|
-
*/
|
|
2296
|
-
static FixUrl(assetUrl) {
|
|
2297
|
-
if (!assetUrl) {
|
|
2298
|
-
return '';
|
|
2299
|
-
}
|
|
2300
|
-
let fixedUrl = assetUrl;
|
|
2301
|
-
if (!fixedUrl.endsWith('glb') && !fixedUrl.endsWith('obj') && !fixedUrl.endsWith('glb.gz') && !fixedUrl.endsWith('obj.gz')) {
|
|
2302
|
-
fixedUrl = FileUtils.FixUnityUrl(fixedUrl);
|
|
2303
|
-
}
|
|
2304
|
-
fixedUrl = fixedUrl.replace('/content/', '/content43/');
|
|
2305
|
-
return fixedUrl;
|
|
2306
|
-
}
|
|
2307
|
-
static FixGlbUrl(assetUrl) {
|
|
2308
|
-
if (!assetUrl) {
|
|
2309
|
-
return '';
|
|
2310
|
-
}
|
|
2311
|
-
let fixedUrl = assetUrl;
|
|
2312
|
-
if (assetUrl.indexOf('_webplayer') === -1) {
|
|
2313
|
-
fixedUrl = assetUrl.concat('_webplayer');
|
|
2314
|
-
}
|
|
2315
|
-
fixedUrl = fixedUrl.replace('/content/', '/content43/');
|
|
2316
|
-
if (!fixedUrl.endsWith('.glb')) {
|
|
2317
|
-
fixedUrl = fixedUrl.concat('.glb');
|
|
2318
|
-
}
|
|
2319
|
-
return fixedUrl;
|
|
2320
|
-
}
|
|
2321
|
-
// Return the mimetype of the given filename.
|
|
2322
|
-
static MimeTypeFromFilename(fileName) {
|
|
2323
|
-
const regEx = /(?:\.([^.]+))?$/; // regex to find extension
|
|
2324
|
-
const extension = regEx.exec(fileName)[1];
|
|
2325
|
-
switch (extension) {
|
|
2326
|
-
case 'jpg':
|
|
2327
|
-
case 'jpeg':
|
|
2328
|
-
return 'image/jpeg';
|
|
2329
|
-
case 'png':
|
|
2330
|
-
return 'image/png';
|
|
2331
|
-
case 'bmp':
|
|
2332
|
-
return 'image/bmp';
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
/**
|
|
2336
|
-
* Downloads the given file to the users default download location.
|
|
2337
|
-
* @param fileName With or without extension
|
|
2338
|
-
* @param content File content as a string
|
|
2339
|
-
* @param [mimeType = 'text/plain']
|
|
2340
|
-
*/
|
|
2341
|
-
static DownloadFile(fileName, content, mimeType = 'text/plain') {
|
|
2342
|
-
const element = document.createElement('a');
|
|
2343
|
-
element.setAttribute('href', 'data:' + mimeType + ';charset=utf-8,' + encodeURIComponent(content));
|
|
2344
|
-
element.setAttribute('download', fileName);
|
|
2345
|
-
element.style.display = 'none';
|
|
2346
|
-
document.body.appendChild(element);
|
|
2347
|
-
element.click();
|
|
2348
|
-
document.body.removeChild(element);
|
|
2349
|
-
}
|
|
2350
|
-
// Returns the contents of given file as a text string.
|
|
2351
|
-
static ReadAsText(file) {
|
|
2352
|
-
return new Promise((resolve) => {
|
|
2353
|
-
const reader = new FileReader();
|
|
2354
|
-
reader.readAsText(file);
|
|
2355
|
-
reader.onloadend = (event) => {
|
|
2356
|
-
if (event.target.readyState === 2) {
|
|
2357
|
-
resolve(event.target.result);
|
|
2358
|
-
}
|
|
2359
|
-
};
|
|
2360
|
-
});
|
|
2361
|
-
}
|
|
2362
|
-
static GetExtensionFromDataUri(dataUri) {
|
|
2363
|
-
return dataUri.replace(/(data:image\/)(.*?)(;base64.*)/gi, '$2');
|
|
2364
|
-
}
|
|
2365
|
-
static CreateDownloadFileNameFromBase64(dataUri) {
|
|
2366
|
-
const ext = this.GetExtensionFromDataUri(dataUri);
|
|
2367
|
-
return 'preview.' + ext;
|
|
2368
|
-
}
|
|
2369
|
-
static DownloadFromDataUri(dataUri, fileName) {
|
|
2370
|
-
const link = document.createElement('a');
|
|
2371
|
-
link.download = fileName;
|
|
2372
|
-
link.href = dataUri;
|
|
2373
|
-
document.body.appendChild(link);
|
|
2374
|
-
link.click();
|
|
2375
|
-
document.body.removeChild(link);
|
|
2376
|
-
}
|
|
2377
|
-
// todo remove once Connector deals with mimetypes and this method isn't used anymore
|
|
2378
|
-
static DocumentBodyToDataUri(documentBody, mimeType) {
|
|
2379
|
-
if (!!documentBody) {
|
|
2380
|
-
return 'data:' + mimeType + ';base64,' + documentBody;
|
|
2381
|
-
}
|
|
2382
|
-
else {
|
|
2383
|
-
return '';
|
|
2384
|
-
}
|
|
2385
|
-
}
|
|
2386
|
-
static FixUnityUrl(url) {
|
|
2387
|
-
if (url.indexOf('_webplayer') === -1) {
|
|
2388
|
-
url = url.concat('_webplayer.ione3d');
|
|
2389
|
-
}
|
|
2390
|
-
else {
|
|
2391
|
-
url = url.replace('_webplayer', '_webplayer.ione3d');
|
|
2392
|
-
}
|
|
2393
|
-
if (!url.endsWith('.gz')) {
|
|
2394
|
-
url = url.concat('.gz');
|
|
2395
|
-
}
|
|
2396
|
-
return url.replace('.unity3d', '');
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
exports.FileUtils = FileUtils;
|
|
2400
|
-
FileUtils._cachedTextureUploads = new Map();
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
/***/ }),
|
|
2404
|
-
|
|
2405
|
-
/***/ "./src/utils/image.utils.ts":
|
|
2406
|
-
/*!**********************************!*\
|
|
2407
|
-
!*** ./src/utils/image.utils.ts ***!
|
|
2408
|
-
\**********************************/
|
|
2409
|
-
/*! no static exports found */
|
|
2410
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2411
|
-
|
|
2412
|
-
"use strict";
|
|
2413
|
-
|
|
2414
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2415
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2416
|
-
// @dynamic
|
|
2417
|
-
class ImageUtils {
|
|
2418
|
-
static CreateTextureFromBase64(id, base64, material) {
|
|
2419
|
-
return new Promise((resolve) => {
|
|
2420
|
-
if (ImageUtils.textures.has(id)) {
|
|
2421
|
-
resolve(ImageUtils.textures.get(id));
|
|
2422
|
-
}
|
|
2423
|
-
else {
|
|
2424
|
-
if (!base64) {
|
|
2425
|
-
resolve(new THREE.Texture());
|
|
2426
|
-
}
|
|
2427
|
-
else {
|
|
2428
|
-
const loader = new THREE.TextureLoader();
|
|
2429
|
-
loader.load(base64, (texture) => {
|
|
2430
|
-
texture.anisotropy = 16;
|
|
2431
|
-
texture.wrapS = THREE.RepeatWrapping;
|
|
2432
|
-
texture.wrapT = THREE.RepeatWrapping;
|
|
2433
|
-
texture.repeat = new THREE.Vector2(material ? material.repeatX : 1, material ? material.repeatY : 1);
|
|
2434
|
-
texture.needsUpdate = true;
|
|
2435
|
-
ImageUtils.textures.set(id, texture);
|
|
2436
|
-
resolve(texture);
|
|
2437
|
-
});
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
});
|
|
2441
|
-
}
|
|
2442
|
-
static getDocBodyWithMimeTypeDefinition(fileName, documentBody) {
|
|
2443
|
-
if (documentBody === null) {
|
|
2444
|
-
return documentBody;
|
|
2445
|
-
}
|
|
2446
|
-
const fileExtension = fileName.substr(fileName.lastIndexOf('.') + 1);
|
|
2447
|
-
switch (fileExtension.toLowerCase()) {
|
|
2448
|
-
case "jpg":
|
|
2449
|
-
case "jpeg":
|
|
2450
|
-
return "data:image/jpg;base64," + documentBody;
|
|
2451
|
-
case "png":
|
|
2452
|
-
return "data:image/png;base64," + documentBody;
|
|
2453
|
-
case "gif":
|
|
2454
|
-
return "data:image/gif;base64," + documentBody;
|
|
2455
|
-
case "bmp":
|
|
2456
|
-
return "data:image/bmp;base64," + documentBody;
|
|
2457
|
-
default:
|
|
2458
|
-
return "data:image/png;base64," + documentBody;
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
static getFixedImageFilepathUrl(imageFilepathUrl) {
|
|
2462
|
-
return imageFilepathUrl.replace("/content/", "/content43/");
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
|
-
exports.ImageUtils = ImageUtils;
|
|
2466
|
-
ImageUtils.textures = new Map();
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
/***/ }),
|
|
2470
|
-
|
|
2471
|
-
/***/ "./src/utils/object.utils.ts":
|
|
2472
|
-
/*!***********************************!*\
|
|
2473
|
-
!*** ./src/utils/object.utils.ts ***!
|
|
2474
|
-
\***********************************/
|
|
2475
|
-
/*! no static exports found */
|
|
2476
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2477
|
-
|
|
2478
|
-
"use strict";
|
|
2479
|
-
|
|
2480
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2481
|
-
const three_1 = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2482
|
-
class ObjectUtils {
|
|
2483
|
-
static DisposeMaterial(material) {
|
|
2484
|
-
if (!material) {
|
|
2485
|
-
return;
|
|
2486
|
-
}
|
|
2487
|
-
if (Array.isArray(material)) {
|
|
2488
|
-
material.forEach(mtrl => {
|
|
2489
|
-
this.materialProps
|
|
2490
|
-
.filter(mapType => mtrl[mapType])
|
|
2491
|
-
.forEach(mapType => mtrl[mapType].dispose());
|
|
2492
|
-
mtrl.dispose();
|
|
2493
|
-
});
|
|
2494
|
-
}
|
|
2495
|
-
else {
|
|
2496
|
-
this.materialProps
|
|
2497
|
-
.filter(mapType => material[mapType] && material[mapType].dispose)
|
|
2498
|
-
.forEach(mapType => material[mapType].dispose());
|
|
2499
|
-
if (material.dispose) {
|
|
2500
|
-
material.dispose();
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
static DisposeObject(object) {
|
|
2505
|
-
if (!object) {
|
|
2506
|
-
return;
|
|
2507
|
-
}
|
|
2508
|
-
if (object.children.length) {
|
|
2509
|
-
object.children.forEach(child => this.DisposeObject(child));
|
|
2510
|
-
}
|
|
2511
|
-
this.DisposeNode(object);
|
|
2512
|
-
}
|
|
2513
|
-
static DisposeNode(node) {
|
|
2514
|
-
node.traverse((obj) => {
|
|
2515
|
-
if (obj instanceof three_1.Mesh) {
|
|
2516
|
-
if (obj.geometry) {
|
|
2517
|
-
obj.geometry.dispose();
|
|
2518
|
-
}
|
|
2519
|
-
this.DisposeMaterial(obj.material);
|
|
2520
|
-
}
|
|
2521
|
-
if (typeof obj.dispose === 'function') {
|
|
2522
|
-
// @ts-ignore
|
|
2523
|
-
obj.dispose();
|
|
2524
|
-
}
|
|
2525
|
-
});
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
exports.ObjectUtils = ObjectUtils;
|
|
2529
|
-
ObjectUtils.materialProps = ['map', 'lightMap', 'bumpMap', 'normalMap', 'specularMap', 'envMap', 'aoMap', 'roughnessMap', 'metalnessMap'];
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
/***/ }),
|
|
2533
|
-
|
|
2534
|
-
/***/ "./src/utils/scene-utils.ts":
|
|
2535
|
-
/*!**********************************!*\
|
|
2536
|
-
!*** ./src/utils/scene-utils.ts ***!
|
|
2537
|
-
\**********************************/
|
|
2538
|
-
/*! no static exports found */
|
|
2539
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2540
|
-
|
|
2541
|
-
"use strict";
|
|
2542
|
-
|
|
2543
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2544
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2545
|
-
class SceneUtils {
|
|
2546
|
-
static TrySelectorConnection(scene, parent, part1, part2, createAddableFn) {
|
|
2547
|
-
let addable;
|
|
2548
|
-
if (createAddableFn) {
|
|
2549
|
-
addable = part2;
|
|
2550
|
-
part2 = createAddableFn(addable);
|
|
2551
|
-
}
|
|
2552
|
-
for (let i = 0; i < part1.children.length; i++) {
|
|
2553
|
-
for (let ii = 0; ii < part2.children.length; ii++) {
|
|
2554
|
-
const con1 = part1.children[i];
|
|
2555
|
-
const con2 = part2.children[ii];
|
|
2556
|
-
// if these connectors can connect connect them
|
|
2557
|
-
if (!con1['connected'] && !con2['connected'] && this.CanSelectorConnect(con1, con2)) {
|
|
2558
|
-
// if addable, continue this loop with a new addable
|
|
2559
|
-
if (addable) {
|
|
2560
|
-
const newPart2 = createAddableFn(addable, part2, part1);
|
|
2561
|
-
// reference of part2 changed, so refresh con2
|
|
2562
|
-
this.SelectorConnect(scene, parent, con1, newPart2.children[ii]);
|
|
2563
|
-
}
|
|
2564
|
-
else {
|
|
2565
|
-
return this.SelectorConnect(scene, parent, con1, con2);
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
return false;
|
|
2571
|
-
}
|
|
2572
|
-
static Convert3DPointToScreenPoint(point, camera, width, height) {
|
|
2573
|
-
if (!point) {
|
|
2574
|
-
return new THREE.Vector2();
|
|
2575
|
-
}
|
|
2576
|
-
const vector = point.clone().project(camera);
|
|
2577
|
-
vector.x = (vector.x + 1) / 2 * width;
|
|
2578
|
-
vector.y = -(vector.y - 1) / 2 * height;
|
|
2579
|
-
return new THREE.Vector2(vector.x, vector.y);
|
|
2580
|
-
}
|
|
2581
|
-
static CanSelectorConnect(con1, con2) {
|
|
2582
|
-
const con1Name = con1 instanceof THREE.Object3D ? con1.name : con1.connector;
|
|
2583
|
-
const con2Name = con2 instanceof THREE.Object3D ? con2.name : con2.connector;
|
|
2584
|
-
const sameParent = con1 instanceof THREE.Object3D && con2 instanceof THREE.Object3D ? con1.parent === con2.parent : false;
|
|
2585
|
-
const parts1 = con1Name.toUpperCase().split('_'), parts2 = con2Name.toUpperCase().split('_');
|
|
2586
|
-
if (parts1.length >= 3 && parts2.length >= 3 && !sameParent) {
|
|
2587
|
-
const connectable = parts1[0] === 'C' && parts2[0] === 'C' &&
|
|
2588
|
-
parts1[1] === parts2[1] && parts1[2] !== parts2[2];
|
|
2589
|
-
return connectable;
|
|
2590
|
-
}
|
|
2591
|
-
return false;
|
|
2592
|
-
}
|
|
2593
|
-
static SelectorConnect(scene, parent, con1, con2) {
|
|
2594
|
-
if (!scene || !parent) {
|
|
2595
|
-
return false;
|
|
2596
|
-
}
|
|
2597
|
-
con1['connectedTo'] = con2.parent.name;
|
|
2598
|
-
con2['connectedTo'] = con1.parent.name;
|
|
2599
|
-
const motherRotation = new THREE.Euler(0, 0, 0);
|
|
2600
|
-
const motherPosition = new THREE.Vector3(0, 0, 0);
|
|
2601
|
-
scene.updateMatrixWorld(true);
|
|
2602
|
-
motherRotation.copy(parent.rotation);
|
|
2603
|
-
parent.getWorldPosition(motherPosition);
|
|
2604
|
-
parent.rotation.set(0, 0, 0);
|
|
2605
|
-
parent.position.set(0, 0, 0);
|
|
2606
|
-
const con1Quat = new THREE.Quaternion();
|
|
2607
|
-
con1.getWorldQuaternion(con1Quat);
|
|
2608
|
-
const con2Quat = new THREE.Quaternion();
|
|
2609
|
-
con2.getWorldQuaternion(con2Quat);
|
|
2610
|
-
const con1QuatParent = new THREE.Quaternion();
|
|
2611
|
-
con1.parent.getWorldQuaternion(con1QuatParent);
|
|
2612
|
-
const con2QuatParent = new THREE.Quaternion();
|
|
2613
|
-
con2.parent.getWorldQuaternion(con2QuatParent);
|
|
2614
|
-
const rotation = new THREE.Quaternion().multiplyQuaternions(con1Quat.invert(), con2Quat).multiply(new THREE.Quaternion().multiplyQuaternions(con1QuatParent, con1QuatParent));
|
|
2615
|
-
con2.parent.quaternion.copy(rotation);
|
|
2616
|
-
// Update because the matrix has been tempered with
|
|
2617
|
-
scene.updateMatrixWorld(true);
|
|
2618
|
-
// Move the connectors towards eachother
|
|
2619
|
-
const con1Pos = new THREE.Vector3();
|
|
2620
|
-
con1.getWorldPosition(con1Pos);
|
|
2621
|
-
const con2Pos = new THREE.Vector3();
|
|
2622
|
-
con2.getWorldPosition(con2Pos);
|
|
2623
|
-
const move = con1Pos.sub(con2Pos);
|
|
2624
|
-
con2.parent.position.x += move.x;
|
|
2625
|
-
con2.parent.position.y += move.y;
|
|
2626
|
-
con2.parent.position.z += move.z;
|
|
2627
|
-
// reset parent's objects rotation and position
|
|
2628
|
-
parent.rotation.copy(motherRotation);
|
|
2629
|
-
parent.position.copy(motherPosition);
|
|
2630
|
-
scene.updateMatrixWorld(true);
|
|
2631
|
-
// Set the connected flag
|
|
2632
|
-
con1['connected'] = true;
|
|
2633
|
-
con2['connected'] = true;
|
|
2634
|
-
return true;
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
exports.SceneUtils = SceneUtils;
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
/***/ }),
|
|
2641
|
-
|
|
2642
|
-
/***/ "./src/utils/threed.utils.ts":
|
|
2643
|
-
/*!***********************************!*\
|
|
2644
|
-
!*** ./src/utils/threed.utils.ts ***!
|
|
2645
|
-
\***********************************/
|
|
2646
|
-
/*! no static exports found */
|
|
2647
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2648
|
-
|
|
2649
|
-
"use strict";
|
|
2650
|
-
|
|
2651
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2652
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
2653
|
-
const THREE = __webpack_require__(/*! three */ "./node_modules/three/build/three.module.js");
|
|
2654
|
-
const object_utils_1 = __webpack_require__(/*! ./object.utils */ "./src/utils/object.utils.ts");
|
|
2655
|
-
const file_utils_1 = __webpack_require__(/*! ./file.utils */ "./src/utils/file.utils.ts");
|
|
2656
|
-
class ThreedUtils {
|
|
2657
|
-
constructor() {
|
|
2658
|
-
this._objectCache = new Map();
|
|
2659
|
-
}
|
|
2660
|
-
clearCache() {
|
|
2661
|
-
const objs = Array.from(this._objectCache.values());
|
|
2662
|
-
objs.forEach(o => object_utils_1.ObjectUtils.DisposeObject(o));
|
|
2663
|
-
this._objectCache.clear();
|
|
2664
|
-
}
|
|
2665
|
-
download3DSource(fileName) {
|
|
2666
|
-
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2667
|
-
fileName = fileName.replace('.unity3d', '');
|
|
2668
|
-
let lookupFileName = fileName + (fileName.indexOf('.glb') < 0 ? '.glb' : '');
|
|
2669
|
-
if (this._objectCache.has(lookupFileName)) {
|
|
2670
|
-
resolve(this._objectCache.get(lookupFileName));
|
|
2671
|
-
return;
|
|
2672
|
-
}
|
|
2673
|
-
if (yield file_utils_1.FileUtils.FileExists(lookupFileName, 'https://cdn1.colijn-it.nl/content43/')) {
|
|
2674
|
-
this.loadGlbSource(lookupFileName).then((obj) => {
|
|
2675
|
-
this._objectCache.set(lookupFileName, obj);
|
|
2676
|
-
resolve(obj);
|
|
2677
|
-
});
|
|
2678
|
-
}
|
|
2679
|
-
else {
|
|
2680
|
-
reject(`GLB source not found! (${lookupFileName})`);
|
|
2681
|
-
}
|
|
2682
|
-
}));
|
|
2683
|
-
}
|
|
2684
|
-
readFileAsText(file) {
|
|
2685
|
-
const fileReader = new FileReader();
|
|
2686
|
-
return new Promise((resolve, reject) => {
|
|
2687
|
-
fileReader.onload = (e) => resolve(e.target.result);
|
|
2688
|
-
fileReader.onerror = error => reject(error);
|
|
2689
|
-
fileReader.readAsText(file);
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
|
-
loadJsonModel(filePath) {
|
|
2693
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2694
|
-
if (this._objectCache.has(filePath)) {
|
|
2695
|
-
return Promise.resolve(this._objectCache.get(filePath));
|
|
2696
|
-
}
|
|
2697
|
-
const json = yield this._readJsonFile(filePath);
|
|
2698
|
-
const loader = new THREE.ObjectLoader();
|
|
2699
|
-
loader.crossOrigin = 'Anonymous';
|
|
2700
|
-
return new Promise((resolve, reject) => {
|
|
2701
|
-
try {
|
|
2702
|
-
const obj = loader.parse(json);
|
|
2703
|
-
this._objectCache.set(filePath, obj);
|
|
2704
|
-
resolve(obj);
|
|
2705
|
-
}
|
|
2706
|
-
catch (e) {
|
|
2707
|
-
reject(null);
|
|
2708
|
-
}
|
|
2709
|
-
});
|
|
2710
|
-
});
|
|
2711
|
-
}
|
|
2712
|
-
loadJsonObjectModel(filePath) {
|
|
2713
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2714
|
-
if (this._objectCache.has(filePath)) {
|
|
2715
|
-
return Promise.resolve(this._objectCache.get(filePath));
|
|
2716
|
-
}
|
|
2717
|
-
const loader = new THREE.ObjectLoader();
|
|
2718
|
-
loader.setCrossOrigin('Anonymous');
|
|
2719
|
-
loader.setResourcePath('');
|
|
2720
|
-
return new Promise((resolve, reject) => {
|
|
2721
|
-
loader.load(filePath, (object) => {
|
|
2722
|
-
const obj = (object.type === 'Scene' && object.children[0].type === 'Object3D') ? object.children[0] : object;
|
|
2723
|
-
this._objectCache.set(filePath, obj);
|
|
2724
|
-
resolve(obj);
|
|
2725
|
-
}, xhr => null, error => reject(error));
|
|
2726
|
-
});
|
|
2727
|
-
});
|
|
2728
|
-
}
|
|
2729
|
-
loadGlbModel(file, cleanUp = true) {
|
|
2730
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2731
|
-
if (this._objectCache.has(file)) {
|
|
2732
|
-
return Promise.resolve(this._objectCache.get(file));
|
|
2733
|
-
}
|
|
2734
|
-
if (!window.hasOwnProperty('loadGLTF')) {
|
|
2735
|
-
console.error('loadGLTF not defined in window global');
|
|
2736
|
-
return null;
|
|
2737
|
-
}
|
|
2738
|
-
// const loader = new GLTFLoader();
|
|
2739
|
-
const obj = yield window.loadGLTF(file);
|
|
2740
|
-
if (obj) {
|
|
2741
|
-
this._cleanedUpObjects(obj, cleanUp);
|
|
2742
|
-
this._objectCache.set(file, obj);
|
|
2743
|
-
return obj;
|
|
2744
|
-
}
|
|
2745
|
-
else {
|
|
2746
|
-
return null;
|
|
2747
|
-
}
|
|
2748
|
-
});
|
|
2749
|
-
}
|
|
2750
|
-
loadGlbSource(file) {
|
|
2751
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2752
|
-
const obj = yield this.loadGlbModel(file, false);
|
|
2753
|
-
if (obj) {
|
|
2754
|
-
obj.children = obj.children.filter(c => !(c instanceof THREE.Camera));
|
|
2755
|
-
obj.children.sort((a, b) => a['name'] < b['name'] ? 1 : -1);
|
|
2756
|
-
obj.children.forEach((c) => {
|
|
2757
|
-
c.traverse((t) => {
|
|
2758
|
-
t.visible = !t.name.toLowerCase().startsWith('c_');
|
|
2759
|
-
});
|
|
2760
|
-
c.visible = false;
|
|
2761
|
-
});
|
|
2762
|
-
if (obj.children.length === 1 && obj.children[0] instanceof THREE.Group) { // flatten children
|
|
2763
|
-
const children = obj.children[0].children.slice();
|
|
2764
|
-
obj.children.length = 0;
|
|
2765
|
-
obj.children = children;
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
return obj;
|
|
2769
|
-
});
|
|
2770
|
-
}
|
|
2771
|
-
textureFromUrl(url) {
|
|
2772
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2773
|
-
// url = this._includeBaseUrl(url);
|
|
2774
|
-
return new Promise((resolve, reject) => {
|
|
2775
|
-
const textureLoader = new THREE.TextureLoader();
|
|
2776
|
-
// textureLoader.setBaseU(this._settingsService.settings.assetPath);
|
|
2777
|
-
textureLoader.load(url, (texture) => {
|
|
2778
|
-
texture.wrapT = THREE.RepeatWrapping;
|
|
2779
|
-
texture.wrapS = THREE.RepeatWrapping;
|
|
2780
|
-
texture.repeat.set(1, 1);
|
|
2781
|
-
texture.needsUpdate = true;
|
|
2782
|
-
return resolve(texture);
|
|
2783
|
-
}, null, reject);
|
|
2784
|
-
});
|
|
2785
|
-
});
|
|
2786
|
-
}
|
|
2787
|
-
_cleanedUpObjects(object, cleanUp = true) {
|
|
2788
|
-
let obj = new THREE.Object3D();
|
|
2789
|
-
object.children.forEach((c) => {
|
|
2790
|
-
if (!(c instanceof THREE.Camera)) {
|
|
2791
|
-
if (cleanUp && c instanceof THREE.Group || (c.children.length === 1 && c.children[0] instanceof THREE.Group)) {
|
|
2792
|
-
this._addGroupChildrenToObject(c, obj);
|
|
2793
|
-
}
|
|
2794
|
-
else if ((cleanUp && !(c instanceof THREE.Mesh)) || (!(c instanceof THREE.Mesh) && !c.name && c.children.length > 0)) {
|
|
2795
|
-
c.children.forEach((child) => {
|
|
2796
|
-
child.translateY(c.position.y);
|
|
2797
|
-
});
|
|
2798
|
-
c.translateY(-c.position.y);
|
|
2799
|
-
if (obj.children.length > 0) {
|
|
2800
|
-
obj.add(c.clone());
|
|
2801
|
-
}
|
|
2802
|
-
else {
|
|
2803
|
-
obj = c.clone();
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
else {
|
|
2807
|
-
// if (c.position.y > 0 || c.position.y < 0) {
|
|
2808
|
-
// c.children.forEach((child) => {
|
|
2809
|
-
// child.translateY(c.position.y);
|
|
2810
|
-
// });
|
|
2811
|
-
// c.translateY(-c.position.y);
|
|
2812
|
-
// }
|
|
2813
|
-
obj.add(c.clone());
|
|
2814
|
-
}
|
|
2815
|
-
}
|
|
2816
|
-
});
|
|
2817
|
-
const boundingBox = new THREE.Box3().setFromObject(obj);
|
|
2818
|
-
const bbCenterPivot = new THREE.Vector3();
|
|
2819
|
-
boundingBox.getCenter(bbCenterPivot);
|
|
2820
|
-
const delta = new THREE.Vector3().add(bbCenterPivot).negate();
|
|
2821
|
-
obj.children.forEach((cc) => {
|
|
2822
|
-
cc.position.add(delta);
|
|
2823
|
-
});
|
|
2824
|
-
return obj;
|
|
2825
|
-
}
|
|
2826
|
-
_addGroupChildrenToObject(group, obj, cleanUp = true) {
|
|
2827
|
-
group.children.forEach((gc) => {
|
|
2828
|
-
if (cleanUp && gc instanceof THREE.Group) {
|
|
2829
|
-
this._addGroupChildrenToObject(gc, obj);
|
|
2830
|
-
}
|
|
2831
|
-
else {
|
|
2832
|
-
// gc.translateX(-group.position.x);
|
|
2833
|
-
gc.translateY(group.position.y);
|
|
2834
|
-
// gc.translateZ(-group.position.z);
|
|
2835
|
-
obj.add(gc.clone());
|
|
2836
|
-
}
|
|
2837
|
-
});
|
|
2838
|
-
}
|
|
2839
|
-
_iterateChildren(children, callback) {
|
|
2840
|
-
for (let i = 0; i < children.length; i++) {
|
|
2841
|
-
const child = children[i];
|
|
2842
|
-
if (child instanceof THREE.Mesh) {
|
|
2843
|
-
callback(child);
|
|
2844
|
-
}
|
|
2845
|
-
else {
|
|
2846
|
-
this._iterateChildren(child.children, callback);
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
}
|
|
2850
|
-
_readJsonFile(filePath) {
|
|
2851
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2852
|
-
try {
|
|
2853
|
-
const response = yield fetch(filePath);
|
|
2854
|
-
if (!response.ok) {
|
|
2855
|
-
return '';
|
|
2856
|
-
}
|
|
2857
|
-
else {
|
|
2858
|
-
let empty = false;
|
|
2859
|
-
yield response.clone().text().then((value) => {
|
|
2860
|
-
if (value === '') {
|
|
2861
|
-
empty = true;
|
|
2862
|
-
}
|
|
2863
|
-
});
|
|
2864
|
-
return empty ? {} : response.json();
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
catch (e) {
|
|
2868
|
-
return '';
|
|
2869
|
-
}
|
|
2870
|
-
});
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
exports.ThreedUtils = ThreedUtils;
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
/***/ }),
|
|
2877
|
-
|
|
2878
|
-
/***/ "./src/utils/variation-utils.ts":
|
|
2879
|
-
/*!**************************************!*\
|
|
2880
|
-
!*** ./src/utils/variation-utils.ts ***!
|
|
2881
|
-
\**************************************/
|
|
2882
|
-
/*! no static exports found */
|
|
2883
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2884
|
-
|
|
2885
|
-
"use strict";
|
|
2886
|
-
|
|
2887
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2888
|
-
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
|
|
2889
|
-
const JSZip = __webpack_require__(/*! jszip */ "./node_modules/jszip/dist/jszip.min.js");
|
|
2890
|
-
const variation_settings_1 = __webpack_require__(/*! ../model/variation-settings */ "./src/model/variation-settings.ts");
|
|
2891
|
-
// @dynamic
|
|
2892
|
-
class VariationUtils {
|
|
2893
|
-
static LoadVariation(assetPath, fileName) {
|
|
2894
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2895
|
-
if (!fileName) {
|
|
2896
|
-
return null;
|
|
2897
|
-
}
|
|
2898
|
-
if (fileName.indexOf('ione3d') < 0) {
|
|
2899
|
-
fileName = fileName.concat('.ione3d');
|
|
2900
|
-
}
|
|
2901
|
-
const id = fileName.substr(0, fileName.lastIndexOf('.ione3d'));
|
|
2902
|
-
try {
|
|
2903
|
-
if (!assetPath.endsWith('/')) {
|
|
2904
|
-
assetPath += '/';
|
|
2905
|
-
}
|
|
2906
|
-
if (!window.hasOwnProperty('downloadVariation')) {
|
|
2907
|
-
console.error('downloadVariation not defined in window global');
|
|
2908
|
-
return null;
|
|
2909
|
-
}
|
|
2910
|
-
const file = yield window.downloadVariation(`${assetPath.replace('https://cdn1.colijn-it.nl/', '')}variation/${fileName}`);
|
|
2911
|
-
return yield VariationUtils.GetVariationSettingsFromFile(id, file);
|
|
2912
|
-
}
|
|
2913
|
-
catch (err) {
|
|
2914
|
-
const mute = err;
|
|
2915
|
-
return null;
|
|
2916
|
-
}
|
|
2917
|
-
});
|
|
2918
|
-
}
|
|
2919
|
-
// public static GetMaterialFromName(variationFolder: string, material: any): Promise<MeshStandardMaterial> {
|
|
2920
|
-
// return new Promise((resolve: Function) => {
|
|
2921
|
-
// if (!material) {
|
|
2922
|
-
// resolve(null);
|
|
2923
|
-
// }
|
|
2924
|
-
// if (this.MaterialCache.has(material.name)) {
|
|
2925
|
-
// resolve(this.MaterialCache.get(material.name).clone());
|
|
2926
|
-
// } else {
|
|
2927
|
-
// VariationUtils.LoadVariation(variationFolder, material.name, false).then((settings: VariationSettings) => {
|
|
2928
|
-
// if (settings) {
|
|
2929
|
-
// AssetUtils.CreateMaterialFromAsset(settings).then((materialObj: Material) => {
|
|
2930
|
-
// const materialParams: MeshStandardMaterialParameters = {};
|
|
2931
|
-
// materialParams.name = material.name;
|
|
2932
|
-
// materialParams.map = materialObj.texture;
|
|
2933
|
-
// materialParams.normalMap = materialObj.normal;
|
|
2934
|
-
// materialParams.aoMap = materialObj.ao;
|
|
2935
|
-
// materialParams.roughnessMap = materialObj.roughness;
|
|
2936
|
-
// materialParams.metalnessMap = materialObj.metalness;
|
|
2937
|
-
// materialParams.roughness = 1;
|
|
2938
|
-
// materialParams.metalness = 1;
|
|
2939
|
-
// const pbrMat: MeshStandardMaterial = new MeshStandardMaterial(materialParams);
|
|
2940
|
-
// this.MaterialCache.set(material.name, pbrMat);
|
|
2941
|
-
// resolve(pbrMat.clone());
|
|
2942
|
-
// });
|
|
2943
|
-
// } else {
|
|
2944
|
-
// resolve(material);
|
|
2945
|
-
// }
|
|
2946
|
-
// });
|
|
2947
|
-
// }
|
|
2948
|
-
// });
|
|
2949
|
-
// }
|
|
2950
|
-
static GetVariationSettingsFromFile(id, compressedFile) {
|
|
2951
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2952
|
-
if (!compressedFile) {
|
|
2953
|
-
return null;
|
|
2954
|
-
}
|
|
2955
|
-
const zipContent = yield VariationUtils.GetZipContent(compressedFile);
|
|
2956
|
-
const variationSettings = new variation_settings_1.VariationSettings();
|
|
2957
|
-
let index;
|
|
2958
|
-
variationSettings.id = id;
|
|
2959
|
-
if (zipContent.files['index.json']) {
|
|
2960
|
-
const indexFile = yield zipContent.files['index.json'].async('string');
|
|
2961
|
-
index = JSON.parse(indexFile);
|
|
2962
|
-
}
|
|
2963
|
-
if (index) {
|
|
2964
|
-
yield VariationUtils.CreateSettingsBasedOnIndex(index, variationSettings, zipContent);
|
|
2965
|
-
}
|
|
2966
|
-
else {
|
|
2967
|
-
yield VariationUtils.CreateSettingsBasedOnFileName(variationSettings, zipContent);
|
|
2968
|
-
}
|
|
2969
|
-
return variationSettings;
|
|
2970
|
-
});
|
|
2971
|
-
}
|
|
2972
|
-
static CreateSettingsBasedOnIndex(index, variationSettings, zipContent) {
|
|
2973
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2974
|
-
if (index.normalFile) {
|
|
2975
|
-
variationSettings.normal = yield VariationUtils.LoadFileContentFromZip(zipContent.files[index.normalFile], index.normalFile);
|
|
2976
|
-
variationSettings.normalFilename = index.normalFile;
|
|
2977
|
-
}
|
|
2978
|
-
if (index.aoFile) {
|
|
2979
|
-
variationSettings.ao = yield VariationUtils.LoadFileContentFromZip(zipContent.files[index.aoFile], index.aoFile);
|
|
2980
|
-
variationSettings.aoFilename = index.aoFile;
|
|
2981
|
-
}
|
|
2982
|
-
if (index.metalnessFile) {
|
|
2983
|
-
variationSettings.metalness = yield VariationUtils.LoadFileContentFromZip(zipContent.files[index.metalnessFile], index.metalnessFile);
|
|
2984
|
-
variationSettings.metalnessFilename = index.metalnessFile;
|
|
2985
|
-
}
|
|
2986
|
-
if (index.roughnessFile) {
|
|
2987
|
-
variationSettings.roughness = yield VariationUtils.LoadFileContentFromZip(zipContent.files[index.roughnessFile], index.roughnessFile);
|
|
2988
|
-
variationSettings.roughnessFilename = index.roughnessFile;
|
|
2989
|
-
}
|
|
2990
|
-
if (index.diffuseFile) {
|
|
2991
|
-
variationSettings.texture = yield VariationUtils.LoadFileContentFromZip(zipContent.files[index.diffuseFile], index.diffuseFile);
|
|
2992
|
-
variationSettings.textureFilename = index.diffuseFile;
|
|
2993
|
-
}
|
|
2994
|
-
variationSettings.settings =
|
|
2995
|
-
(yield VariationUtils.LoadFileContentFromZip(zipContent.files['repeat.json'], 'repeat.json', false)) || {};
|
|
2996
|
-
Object.assign(variationSettings.settings, index.repeat);
|
|
2997
|
-
variationSettings.settings.metalness = index.metalness;
|
|
2998
|
-
variationSettings.settings.roughness = index.roughness;
|
|
2999
|
-
});
|
|
3000
|
-
}
|
|
3001
|
-
static CreateSettingsBasedOnFileName(variationSettings, zipContent) {
|
|
3002
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3003
|
-
const allLoaded = [];
|
|
3004
|
-
for (const fileName in zipContent.files) {
|
|
3005
|
-
if (zipContent.files[fileName]) {
|
|
3006
|
-
const file = yield zipContent.files[fileName];
|
|
3007
|
-
if (file.name.toLowerCase().indexOf('normal') > -1 && this.FileIsImage(file.name)) {
|
|
3008
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((normalFile) => {
|
|
3009
|
-
variationSettings.normal = `data:image/${this.GetBase64FileType(file.name)};base64,${normalFile}`;
|
|
3010
|
-
variationSettings.normalFilename = fileName;
|
|
3011
|
-
}));
|
|
3012
|
-
}
|
|
3013
|
-
else if (file.name.toLowerCase().indexOf('ao') > -1 && this.FileIsImage(file.name)) {
|
|
3014
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((aoFile) => {
|
|
3015
|
-
variationSettings.ao = `data:image/${this.GetBase64FileType(file.name)};base64,${aoFile}`;
|
|
3016
|
-
variationSettings.aoFilename = fileName;
|
|
3017
|
-
}));
|
|
3018
|
-
}
|
|
3019
|
-
else if (file.name.toLowerCase().indexOf('metalness') > -1 && this.FileIsImage(file.name)) {
|
|
3020
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((metalnessFile) => {
|
|
3021
|
-
variationSettings.metalness = `data:image/${this.GetBase64FileType(file.name)};base64,${metalnessFile}`;
|
|
3022
|
-
variationSettings.metalnessFilename = fileName;
|
|
3023
|
-
}));
|
|
3024
|
-
}
|
|
3025
|
-
else if (file.name.toLowerCase().indexOf('roughness') > -1 && this.FileIsImage(file.name)) {
|
|
3026
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((roughnessFile) => {
|
|
3027
|
-
variationSettings.roughness = `data:image/${this.GetBase64FileType(file.name)};base64,${roughnessFile}`;
|
|
3028
|
-
variationSettings.roughnessFilename = fileName;
|
|
3029
|
-
}));
|
|
3030
|
-
}
|
|
3031
|
-
else if (file.name.toLowerCase().indexOf('diffuse') > -1 && this.FileIsImage(file.name)) {
|
|
3032
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((diffuseFile) => {
|
|
3033
|
-
variationSettings.texture = `data:image/${this.GetBase64FileType(file.name)};base64,${diffuseFile}`;
|
|
3034
|
-
variationSettings.textureFilename = fileName;
|
|
3035
|
-
}));
|
|
3036
|
-
}
|
|
3037
|
-
else if (file.name.indexOf('.jp') > -1) {
|
|
3038
|
-
allLoaded.push(zipContent.files[fileName].async('base64').then((textureFile) => {
|
|
3039
|
-
variationSettings.texture = 'data:image/jpeg;base64,' + textureFile;
|
|
3040
|
-
variationSettings.textureFilename = fileName;
|
|
3041
|
-
}));
|
|
3042
|
-
}
|
|
3043
|
-
else if (file.name.indexOf('.json') > -1) {
|
|
3044
|
-
allLoaded.push(zipContent.files[fileName].async('string').then((settingsFile) => {
|
|
3045
|
-
const settingsFileObj = JSON.parse(settingsFile);
|
|
3046
|
-
for (const key in settingsFileObj) {
|
|
3047
|
-
if (settingsFileObj[key]) {
|
|
3048
|
-
variationSettings.settings[key] = settingsFileObj[key];
|
|
3049
|
-
}
|
|
3050
|
-
}
|
|
3051
|
-
}));
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
}
|
|
3055
|
-
yield Promise.all(allLoaded);
|
|
3056
|
-
});
|
|
3057
|
-
}
|
|
3058
|
-
static LoadFileContentFromZip(zip, fileName, base64 = true) {
|
|
3059
|
-
return new Promise((resolve) => {
|
|
3060
|
-
if (zip && fileName) {
|
|
3061
|
-
zip.async(base64 ? 'base64' : 'string').then((fileContent) => {
|
|
3062
|
-
if (base64) {
|
|
3063
|
-
resolve(`data:image/${this.GetBase64FileType(fileName)};base64,${fileContent}`);
|
|
3064
|
-
}
|
|
3065
|
-
else {
|
|
3066
|
-
resolve(fileContent);
|
|
3067
|
-
}
|
|
3068
|
-
});
|
|
3069
|
-
}
|
|
3070
|
-
else {
|
|
3071
|
-
resolve(undefined);
|
|
3072
|
-
}
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
static FileIsImage(fileName) {
|
|
3076
|
-
const ext = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase();
|
|
3077
|
-
switch (ext) {
|
|
3078
|
-
case 'jpg':
|
|
3079
|
-
case 'jpeg':
|
|
3080
|
-
case 'png':
|
|
3081
|
-
case 'bmp':
|
|
3082
|
-
return true;
|
|
3083
|
-
default:
|
|
3084
|
-
return false;
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
static GetBase64FileType(fileName) {
|
|
3088
|
-
const ext = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase();
|
|
3089
|
-
switch (ext) {
|
|
3090
|
-
case 'jpg':
|
|
3091
|
-
case 'jpeg':
|
|
3092
|
-
return 'jpeg';
|
|
3093
|
-
case 'png':
|
|
3094
|
-
return 'png';
|
|
3095
|
-
case 'bmp':
|
|
3096
|
-
return 'bmp';
|
|
3097
|
-
default:
|
|
3098
|
-
return 'jpeg';
|
|
3099
|
-
}
|
|
3100
|
-
}
|
|
3101
|
-
// Get the content
|
|
3102
|
-
static GetZipContent(file) {
|
|
3103
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3104
|
-
const jszip = new JSZip();
|
|
3105
|
-
const content = yield jszip.loadAsync(file);
|
|
3106
|
-
return content;
|
|
3107
|
-
});
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
|
-
exports.VariationUtils = VariationUtils;
|
|
3111
|
-
VariationUtils.MaterialCache = new Map();
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
/***/ }),
|
|
3115
|
-
|
|
3116
|
-
/***/ 0:
|
|
3117
|
-
/*!***************************!*\
|
|
3118
|
-
!*** multi ./src/main.ts ***!
|
|
3119
|
-
\***************************/
|
|
3120
|
-
/*! no static exports found */
|
|
3121
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3122
|
-
|
|
3123
|
-
module.exports = __webpack_require__(/*! /home/jk/workspace/colijn/repos/iones/master/Ione/Client/JavaScript/Configurator/src/main.ts */"./src/main.ts");
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
/***/ })
|
|
3127
|
-
|
|
3128
|
-
},[[0,"runtime","vendor"]]]);
|
|
3129
|
-
//# sourceMappingURL=main-es2015.js.map
|