@colijnit/configurator 1.0.17 → 12.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/builder.d.ts +15 -4
- package/app/components/answers/answer/answer.component.d.ts +3 -3
- package/app/components/selections/selections.component.d.ts +5 -6
- package/app/services/configurator.service.d.ts +2 -5
- package/app/utils/object.utils.d.ts +7 -0
- package/bundles/colijnit-configurator.umd.js +1051 -568
- package/bundles/colijnit-configurator.umd.js.map +1 -1
- package/colijnit-configurator.d.ts +2 -3
- package/colijnit-configurator.metadata.json +1 -1
- package/esm2015/app/builder.js +126 -44
- package/esm2015/app/components/answers/answer/answer.component.js +29 -32
- package/esm2015/app/components/answers/answers.component.js +16 -21
- package/esm2015/app/components/answers/answers.module.js +20 -22
- package/esm2015/app/components/selections/selections.component.js +29 -34
- package/esm2015/app/components/selections/selections.module.js +17 -19
- package/esm2015/app/components/shared/loader/loader.component.js +10 -12
- package/esm2015/app/components/shared/shared.module.js +16 -18
- package/esm2015/app/directives/visibility-observer-master.directive.js +9 -10
- package/esm2015/app/directives/visibility-observer.directive.js +13 -15
- package/esm2015/app/services/configurator.service.js +4 -23
- package/esm2015/app/services/image-cache.service.js +10 -13
- package/esm2015/app/services/locator.service.js +6 -8
- package/esm2015/app/utils/object.utils.js +49 -0
- package/esm2015/colijnit-configurator.js +3 -4
- package/esm2015/helper/variation-helper.js +174 -41
- package/esm2015/model/material.js +1 -1
- package/esm2015/model/variation-settings.js +4 -1
- package/esm2015/model/variation.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/utils/asset.utils.js +64 -12
- package/esm2015/utils/file.utils.js +4 -1
- package/esm2015/utils/image.utils.js +1 -1
- package/esm2015/utils/object.utils.js +1 -1
- package/esm2015/utils/scene-utils.js +1 -1
- package/esm2015/utils/threed.utils.js +3 -3
- package/esm2015/utils/variation-utils.js +99 -29
- package/fesm2015/colijnit-configurator.js +705 -403
- package/fesm2015/colijnit-configurator.js.map +1 -1
- package/helper/variation-helper.d.ts +1 -1
- package/model/material.d.ts +16 -0
- package/model/variation-settings.d.ts +21 -0
- package/package.json +19 -26
- package/utils/asset.utils.d.ts +3 -0
- package/utils/threed.utils.d.ts +1 -1
- package/utils/variation-utils.d.ts +1 -0
- package/bundles/colijnit-configurator.umd.min.js +0 -17
- package/bundles/colijnit-configurator.umd.min.js.map +0 -1
- package/esm5/app/builder.js +0 -591
- package/esm5/app/components/answers/answer/answer.component.js +0 -64
- package/esm5/app/components/answers/answers.component.js +0 -27
- package/esm5/app/components/answers/answers.module.js +0 -32
- package/esm5/app/components/selections/selections.component.js +0 -104
- package/esm5/app/components/selections/selections.module.js +0 -26
- package/esm5/app/components/shared/loader/loader.component.js +0 -16
- package/esm5/app/components/shared/shared.module.js +0 -24
- package/esm5/app/directives/visibility-observer-master.directive.js +0 -64
- package/esm5/app/directives/visibility-observer.directive.js +0 -59
- package/esm5/app/services/configurator.service.js +0 -160
- package/esm5/app/services/image-cache.service.js +0 -69
- package/esm5/app/services/locator.service.js +0 -13
- package/esm5/colijnit-configurator.js +0 -11
- package/esm5/helper/variation-helper.js +0 -268
- package/esm5/model/material.js +0 -13
- package/esm5/model/variation-settings.js +0 -8
- package/esm5/model/variation.js +0 -7
- package/esm5/public_api.js +0 -7
- package/esm5/utils/asset.utils.js +0 -106
- package/esm5/utils/file.utils.js +0 -151
- package/esm5/utils/image.utils.js +0 -56
- package/esm5/utils/object.utils.js +0 -56
- package/esm5/utils/scene-utils.js +0 -98
- package/esm5/utils/threed.utils.js +0 -279
- package/esm5/utils/variation-utils.js +0 -327
- package/fesm5/colijnit-configurator.js +0 -2527
- package/fesm5/colijnit-configurator.js.map +0 -1
package/app/builder.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
|
+
import { Scene } from "three";
|
|
2
3
|
import { Options } from "@colijnit/configuratorapi/build/model/options";
|
|
4
|
+
import { DecoNode } from "@colijnit/configuratorapi/build/model/deco-node";
|
|
3
5
|
import { Selection } from "@colijnit/configuratorapi/build/model/selection";
|
|
4
|
-
import {
|
|
5
|
-
import { Answer } from
|
|
6
|
-
import { BehaviorSubject } from
|
|
6
|
+
import { Article } from "@colijnit/configuratorapi/build/model/article";
|
|
7
|
+
import { Answer } from "@colijnit/configuratorapi/build/model/answer";
|
|
8
|
+
import { BehaviorSubject } from "rxjs";
|
|
7
9
|
export declare class Builder {
|
|
8
10
|
selectionsReceived: BehaviorSubject<Selection[]>;
|
|
11
|
+
articleLoaded: BehaviorSubject<Article>;
|
|
12
|
+
decosReceived: BehaviorSubject<DecoNode[]>;
|
|
9
13
|
answersReceived: BehaviorSubject<Answer[]>;
|
|
10
14
|
modelLoaded: BehaviorSubject<THREE.Object3D>;
|
|
11
15
|
private _scene;
|
|
@@ -19,21 +23,28 @@ export declare class Builder {
|
|
|
19
23
|
private _placedAddables;
|
|
20
24
|
private _adjustables;
|
|
21
25
|
private _addables;
|
|
26
|
+
private _imageCache;
|
|
22
27
|
private _boFactory;
|
|
23
28
|
private _source;
|
|
24
29
|
private _threedUtils;
|
|
25
30
|
private _variationHelper;
|
|
26
31
|
private _articleCache;
|
|
27
32
|
private _configuratorService;
|
|
28
|
-
constructor(
|
|
33
|
+
constructor();
|
|
34
|
+
init(scene: Scene, options?: Options): void;
|
|
29
35
|
buildModel(sku?: string, instanceId?: string, goodId?: number): Promise<THREE.Object3D>;
|
|
36
|
+
buildModelFromData(selections: Selection[], decos: DecoNode[], assetUrl: string, cdnUrl: string, schema: string): Promise<THREE.Object3D>;
|
|
30
37
|
initNodeInstance(goodId: number): Promise<any>;
|
|
31
38
|
destroy(): void;
|
|
32
39
|
selectSelection(selection: Selection): Promise<void>;
|
|
33
40
|
getQuestionAndAnswers(publicationCode?: number): Promise<void>;
|
|
34
41
|
selectAnswer(answer: Answer): Promise<void>;
|
|
42
|
+
getImageForSelectionOrAnswer(object: Selection | Answer): Promise<string>;
|
|
43
|
+
_cleanUp(): void;
|
|
44
|
+
private _handleResponseData;
|
|
35
45
|
private _setInstanceId;
|
|
36
46
|
private _prepareConfiguration;
|
|
47
|
+
private _downloadAsset;
|
|
37
48
|
private _build;
|
|
38
49
|
private _prepareTheSelections;
|
|
39
50
|
private _createAdjustable;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { ImageCacheService } from '../../../services/image-cache.service';
|
|
3
2
|
import { Answer } from '@colijnit/configuratorapi/build/model/answer';
|
|
3
|
+
import { Builder } from "../../../builder";
|
|
4
4
|
export declare class AnswerComponent implements OnInit {
|
|
5
|
-
private
|
|
5
|
+
private _builder;
|
|
6
6
|
answer: Answer;
|
|
7
7
|
set showing(value: boolean);
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(_builder: Builder);
|
|
9
9
|
ngOnInit(): void;
|
|
10
10
|
private _loadThumbnail;
|
|
11
11
|
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { EventEmitter
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { Selection } from "@colijnit/configuratorapi/build/model/selection";
|
|
3
|
-
import {
|
|
3
|
+
import { Builder } from "../../builder";
|
|
4
4
|
declare class SelectionViewModel {
|
|
5
5
|
selection: Selection;
|
|
6
6
|
children: Selection[];
|
|
7
7
|
expanded: boolean;
|
|
8
8
|
thumbnail: string;
|
|
9
9
|
}
|
|
10
|
-
export declare class SelectionsComponent
|
|
11
|
-
private
|
|
10
|
+
export declare class SelectionsComponent {
|
|
11
|
+
private _builder;
|
|
12
12
|
set selections(value: Selection[]);
|
|
13
13
|
selectionViewModels: SelectionViewModel[];
|
|
14
14
|
selectionClick: EventEmitter<Selection>;
|
|
15
|
-
constructor(
|
|
16
|
-
ngOnInit(): void;
|
|
15
|
+
constructor(_builder: Builder);
|
|
17
16
|
expandClicked(selectionViewModel: SelectionViewModel, mouseEvent: MouseEvent): void;
|
|
18
17
|
selectSelection(selection: Selection, mouseEvent: MouseEvent): void;
|
|
19
18
|
private _loadThumbnails;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
1
|
import { Selection } from '@colijnit/configuratorapi/build/model/selection';
|
|
3
2
|
import { Answer } from '@colijnit/configuratorapi/build/model/answer';
|
|
4
3
|
import { DataServiceResponseData } from '@colijnit/configuratorapi/build/model/data-service-response-data';
|
|
5
4
|
import { Options } from "@colijnit/configuratorapi/build/model/options";
|
|
6
5
|
import { QuestionAndAnswers } from "@colijnit/configuratorapi/build/model/question-and-answers";
|
|
7
6
|
export declare class ConfiguratorService {
|
|
8
|
-
private _injector;
|
|
9
7
|
private _configuratorApi;
|
|
10
|
-
constructor(_injector: Injector);
|
|
11
8
|
initApi(options: Options): void;
|
|
12
9
|
initNodeInstance(goodId: number): Promise<DataServiceResponseData>;
|
|
13
10
|
setInstanceToConfigure(id: string, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
@@ -17,6 +14,6 @@ export declare class ConfiguratorService {
|
|
|
17
14
|
getDecos(showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
18
15
|
getQuestionAndAnswers(showLoader?: boolean, publicationCode?: number): Promise<QuestionAndAnswers>;
|
|
19
16
|
getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean, showLoader: boolean): Promise<DataServiceResponseData>;
|
|
20
|
-
selectSelection(selection: Selection, showLoader?: boolean): Promise<
|
|
21
|
-
selectAnswer(answer: Answer, showLoader?: boolean): Promise<
|
|
17
|
+
selectSelection(selection: Selection, showLoader?: boolean): Promise<QuestionAndAnswers>;
|
|
18
|
+
selectAnswer(answer: Answer, showLoader?: boolean): Promise<QuestionAndAnswers>;
|
|
22
19
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Material, Mesh, Object3D } from "three";
|
|
2
|
+
export declare class ObjectUtils {
|
|
3
|
+
static materialProps: string[];
|
|
4
|
+
private static DisposeNode;
|
|
5
|
+
static DisposeMaterial(material: Material | Material[]): void;
|
|
6
|
+
static DisposeObject(object: Object3D | Mesh): void;
|
|
7
|
+
}
|