@colijnit/configurator 1.0.19 → 1.0.21

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.
Files changed (158) hide show
  1. package/.idea/Configurator.iml +12 -0
  2. package/.idea/codeStyles/Project.xml +21 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. package/.idea/misc.xml +9 -0
  6. package/.idea/modules.xml +8 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/angular.json +193 -0
  9. package/configurator.iml +11 -0
  10. package/dist/configurator/index.html +14 -0
  11. package/dist/configurator/main-es2015.js +3129 -0
  12. package/dist/configurator/main-es2015.js.map +1 -0
  13. package/dist/configurator/main-es5.js +5482 -0
  14. package/dist/configurator/main-es5.js.map +1 -0
  15. package/dist/configurator/polyfills-es2015.js +4520 -0
  16. package/dist/configurator/polyfills-es2015.js.map +1 -0
  17. package/dist/configurator/polyfills-es5.js +18375 -0
  18. package/dist/configurator/polyfills-es5.js.map +1 -0
  19. package/dist/configurator/runtime-es2015.js +155 -0
  20. package/dist/configurator/runtime-es2015.js.map +1 -0
  21. package/dist/configurator/runtime-es5.js +155 -0
  22. package/dist/configurator/runtime-es5.js.map +1 -0
  23. package/dist/configurator/styles-es2015.js +450 -0
  24. package/dist/configurator/styles-es2015.js.map +1 -0
  25. package/dist/configurator/styles-es5.js +432 -0
  26. package/dist/configurator/styles-es5.js.map +1 -0
  27. package/dist/configurator/vendor-es2015.js +155551 -0
  28. package/dist/configurator/vendor-es2015.js.map +1 -0
  29. package/dist/configurator/vendor-es5.js +183588 -0
  30. package/dist/configurator/vendor-es5.js.map +1 -0
  31. package/ng-package.json +9 -0
  32. package/package.json +47 -14
  33. package/src/app/app.component.ts +222 -0
  34. package/src/app/app.module.ts +34 -0
  35. package/src/app/builder.ts +480 -0
  36. package/src/app/components/answers/answer/answer.component.ts +61 -0
  37. package/src/app/components/answers/answers.component.ts +41 -0
  38. package/src/app/components/answers/answers.module.ts +26 -0
  39. package/src/app/components/selections/selections.component.ts +131 -0
  40. package/src/app/components/selections/selections.module.ts +20 -0
  41. package/src/app/components/shared/loader/loader.component.scss +33 -0
  42. package/src/app/components/shared/loader/loader.component.ts +20 -0
  43. package/src/app/components/shared/shared.module.ts +16 -0
  44. package/src/app/directives/visibility-observer-master.directive.ts +71 -0
  45. package/src/app/directives/visibility-observer.directive.ts +74 -0
  46. package/src/app/services/configurator.service.ts +86 -0
  47. package/src/app/services/image-cache.service.ts +56 -0
  48. package/src/app/services/locator.service.ts +6 -0
  49. package/src/environments/environment.prod.ts +3 -0
  50. package/src/environments/environment.ts +8 -0
  51. package/src/helper/variation-helper.ts +220 -0
  52. package/src/index.html +14 -0
  53. package/src/main.ts +11 -0
  54. package/src/model/material.ts +22 -0
  55. package/src/model/variation-settings.ts +14 -0
  56. package/src/model/variation.ts +11 -0
  57. package/src/polyfills.ts +73 -0
  58. package/{public_api.d.ts → src/public_api.ts} +6 -6
  59. package/src/style/shared.scss +173 -0
  60. package/src/style/styles.scss +45 -0
  61. package/src/tsconfig.app.json +16 -0
  62. package/src/tsconfig.spec.json +19 -0
  63. package/src/utils/asset.utils.ts +88 -0
  64. package/src/utils/file.utils.ts +156 -0
  65. package/src/utils/file.utils.unit.test.ts +8 -0
  66. package/src/utils/image.utils.ts +54 -0
  67. package/src/utils/object.utils.ts +52 -0
  68. package/src/utils/scene-utils.ts +119 -0
  69. package/src/utils/threed.utils.ts +219 -0
  70. package/src/utils/variation-utils.ts +216 -0
  71. package/tsconfig.json +23 -0
  72. package/tslint.json +132 -0
  73. package/app/builder.d.ts +0 -53
  74. package/app/components/answers/answer/answer.component.d.ts +0 -11
  75. package/app/components/answers/answers.component.d.ts +0 -8
  76. package/app/components/answers/answers.module.d.ts +0 -2
  77. package/app/components/selections/selections.component.d.ts +0 -22
  78. package/app/components/selections/selections.module.d.ts +0 -2
  79. package/app/components/shared/loader/loader.component.d.ts +0 -2
  80. package/app/components/shared/shared.module.d.ts +0 -2
  81. package/app/directives/visibility-observer-master.directive.d.ts +0 -9
  82. package/app/directives/visibility-observer.directive.d.ts +0 -13
  83. package/app/services/configurator.service.d.ts +0 -22
  84. package/app/services/image-cache.service.d.ts +0 -10
  85. package/app/services/locator.service.d.ts +0 -4
  86. package/bundles/colijnit-configurator.umd.js +0 -2745
  87. package/bundles/colijnit-configurator.umd.js.map +0 -1
  88. package/bundles/colijnit-configurator.umd.min.js +0 -17
  89. package/bundles/colijnit-configurator.umd.min.js.map +0 -1
  90. package/colijnit-configurator.d.ts +0 -10
  91. package/colijnit-configurator.metadata.json +0 -1
  92. package/esm2015/app/builder.js +0 -477
  93. package/esm2015/app/components/answers/answer/answer.component.js +0 -69
  94. package/esm2015/app/components/answers/answers.component.js +0 -43
  95. package/esm2015/app/components/answers/answers.module.js +0 -29
  96. package/esm2015/app/components/selections/selections.component.js +0 -134
  97. package/esm2015/app/components/selections/selections.module.js +0 -23
  98. package/esm2015/app/components/shared/loader/loader.component.js +0 -24
  99. package/esm2015/app/components/shared/shared.module.js +0 -21
  100. package/esm2015/app/directives/visibility-observer-master.directive.js +0 -51
  101. package/esm2015/app/directives/visibility-observer.directive.js +0 -57
  102. package/esm2015/app/services/configurator.service.js +0 -94
  103. package/esm2015/app/services/image-cache.service.js +0 -66
  104. package/esm2015/app/services/locator.service.js +0 -10
  105. package/esm2015/colijnit-configurator.js +0 -11
  106. package/esm2015/helper/variation-helper.js +0 -216
  107. package/esm2015/model/material.js +0 -11
  108. package/esm2015/model/variation-settings.js +0 -6
  109. package/esm2015/model/variation.js +0 -3
  110. package/esm2015/public_api.js +0 -7
  111. package/esm2015/utils/asset.utils.js +0 -74
  112. package/esm2015/utils/file.utils.js +0 -139
  113. package/esm2015/utils/image.utils.js +0 -52
  114. package/esm2015/utils/object.utils.js +0 -49
  115. package/esm2015/utils/scene-utils.js +0 -94
  116. package/esm2015/utils/threed.utils.js +0 -222
  117. package/esm2015/utils/variation-utils.js +0 -224
  118. package/esm5/app/builder.js +0 -591
  119. package/esm5/app/components/answers/answer/answer.component.js +0 -64
  120. package/esm5/app/components/answers/answers.component.js +0 -27
  121. package/esm5/app/components/answers/answers.module.js +0 -32
  122. package/esm5/app/components/selections/selections.component.js +0 -104
  123. package/esm5/app/components/selections/selections.module.js +0 -26
  124. package/esm5/app/components/shared/loader/loader.component.js +0 -16
  125. package/esm5/app/components/shared/shared.module.js +0 -24
  126. package/esm5/app/directives/visibility-observer-master.directive.js +0 -64
  127. package/esm5/app/directives/visibility-observer.directive.js +0 -59
  128. package/esm5/app/services/configurator.service.js +0 -160
  129. package/esm5/app/services/image-cache.service.js +0 -69
  130. package/esm5/app/services/locator.service.js +0 -13
  131. package/esm5/colijnit-configurator.js +0 -11
  132. package/esm5/helper/variation-helper.js +0 -268
  133. package/esm5/model/material.js +0 -13
  134. package/esm5/model/variation-settings.js +0 -8
  135. package/esm5/model/variation.js +0 -7
  136. package/esm5/public_api.js +0 -7
  137. package/esm5/utils/asset.utils.js +0 -106
  138. package/esm5/utils/file.utils.js +0 -151
  139. package/esm5/utils/image.utils.js +0 -56
  140. package/esm5/utils/object.utils.js +0 -56
  141. package/esm5/utils/scene-utils.js +0 -98
  142. package/esm5/utils/threed.utils.js +0 -279
  143. package/esm5/utils/variation-utils.js +0 -327
  144. package/fesm2015/colijnit-configurator.js +0 -2109
  145. package/fesm2015/colijnit-configurator.js.map +0 -1
  146. package/fesm5/colijnit-configurator.js +0 -2527
  147. package/fesm5/colijnit-configurator.js.map +0 -1
  148. package/helper/variation-helper.d.ts +0 -14
  149. package/model/material.d.ts +0 -17
  150. package/model/variation-settings.d.ts +0 -14
  151. package/model/variation.d.ts +0 -10
  152. package/utils/asset.utils.d.ts +0 -13
  153. package/utils/file.utils.d.ts +0 -27
  154. package/utils/image.utils.d.ts +0 -8
  155. package/utils/object.utils.d.ts +0 -7
  156. package/utils/scene-utils.d.ts +0 -7
  157. package/utils/threed.utils.d.ts +0 -16
  158. package/utils/variation-utils.d.ts +0 -12
package/tslint.json ADDED
@@ -0,0 +1,132 @@
1
+ {
2
+ "rulesDirectory": [
3
+ "node_modules/codelyzer"
4
+ ],
5
+ "rules": {
6
+ "arrow-return-shorthand": true,
7
+ "callable-types": true,
8
+ "class-name": true,
9
+ "comment-format": [
10
+ true,
11
+ "check-space"
12
+ ],
13
+ "curly": true,
14
+ "eofline": true,
15
+ "forin": true,
16
+ "import-blacklist": [
17
+ true
18
+ ],
19
+ "import-spacing": true,
20
+ "indent": [
21
+ true,
22
+ "spaces"
23
+ ],
24
+ "interface-over-type-literal": true,
25
+ "label-position": true,
26
+ "max-line-length": [
27
+ true,
28
+ 140
29
+ ],
30
+ "member-access": false,
31
+ "member-ordering": [
32
+ true,
33
+ "static-before-instance",
34
+ "variables-before-functions"
35
+ ],
36
+ "no-arg": true,
37
+ "no-bitwise": true,
38
+ "no-console": [
39
+ true,
40
+ "debug",
41
+ "info",
42
+ "time",
43
+ "timeEnd",
44
+ "trace"
45
+ ],
46
+ "no-construct": true,
47
+ "no-debugger": true,
48
+ "no-duplicate-super": true,
49
+ "no-empty": false,
50
+ "no-empty-interface": true,
51
+ "no-eval": true,
52
+ "no-inferrable-types": [
53
+ true,
54
+ "ignore-params"
55
+ ],
56
+ "no-misused-new": true,
57
+ "no-non-null-assertion": true,
58
+ "no-shadowed-variable": true,
59
+ "no-string-literal": false,
60
+ "no-string-throw": true,
61
+ "no-switch-case-fall-through": true,
62
+ "no-trailing-whitespace": true,
63
+ "no-unnecessary-initializer": true,
64
+ "no-unused-expression": true,
65
+ "no-use-before-declare": true,
66
+ "no-var-keyword": true,
67
+ "object-literal-sort-keys": false,
68
+ "one-line": [
69
+ true,
70
+ "check-open-brace",
71
+ "check-catch",
72
+ "check-else",
73
+ "check-whitespace"
74
+ ],
75
+ "prefer-const": true,
76
+ "quotemark": [
77
+ true,
78
+ "single"
79
+ ],
80
+ "radix": true,
81
+ "semicolon": [
82
+ "always"
83
+ ],
84
+ "triple-equals": [
85
+ true,
86
+ "allow-null-check"
87
+ ],
88
+ "typedef-whitespace": [
89
+ true,
90
+ {
91
+ "call-signature": "nospace",
92
+ "index-signature": "nospace",
93
+ "parameter": "nospace",
94
+ "property-declaration": "nospace",
95
+ "variable-declaration": "nospace"
96
+ }
97
+ ],
98
+ "typeof-compare": true,
99
+ "unified-signatures": true,
100
+ "variable-name": false,
101
+ "whitespace": [
102
+ true,
103
+ "check-branch",
104
+ "check-decl",
105
+ "check-operator",
106
+ "check-separator",
107
+ "check-type"
108
+ ],
109
+ "directive-selector": [
110
+ true,
111
+ "attribute",
112
+ "camelCase"
113
+ ],
114
+ "component-selector": [
115
+ true,
116
+ "element",
117
+ "kebab-case"
118
+ ],
119
+ "no-inputs-metadata-property": true,
120
+ "no-outputs-metadata-property": true,
121
+ "no-host-metadata-property": true,
122
+ "no-input-rename": true,
123
+ "no-output-rename": true,
124
+ "use-lifecycle-interface": true,
125
+ "use-pipe-transform-interface": true,
126
+ "component-class-suffix": true,
127
+ "directive-class-suffix": true,
128
+ "no-access-missing-member": true,
129
+ "templates-use-public": true,
130
+ "invoke-injectable": true
131
+ }
132
+ }
package/app/builder.d.ts DELETED
@@ -1,53 +0,0 @@
1
- import * as THREE from "three";
2
- import { Options } from "@colijnit/ioneconnector/build/model/options";
3
- import { Selection } from "@colijnit/configuratorapi/build/model/selection";
4
- import { Scene } from 'three';
5
- import { Answer } from '@colijnit/configuratorapi/build/model/answer';
6
- import { BehaviorSubject } from 'rxjs';
7
- export declare class Builder {
8
- selectionsReceived: BehaviorSubject<Selection[]>;
9
- answersReceived: BehaviorSubject<Answer[]>;
10
- modelLoaded: BehaviorSubject<THREE.Object3D>;
11
- private _scene;
12
- private _instanceId;
13
- private _sku;
14
- private _goodId;
15
- private _selections;
16
- private _answers;
17
- private _decos;
18
- private _placedAdjustables;
19
- private _placedAddables;
20
- private _adjustables;
21
- private _addables;
22
- private _boFactory;
23
- private _source;
24
- private _threedUtils;
25
- private _variationHelper;
26
- private _articleCache;
27
- private _configuratorService;
28
- constructor(scene: Scene, options: Options, useInAngular: boolean);
29
- buildModel(sku?: string, instanceId?: string, goodId?: number): Promise<THREE.Object3D>;
30
- initNodeInstance(goodId: number): Promise<any>;
31
- destroy(): void;
32
- selectSelection(selection: Selection): Promise<void>;
33
- getQuestionAndAnswers(publicationCode?: number): Promise<void>;
34
- selectAnswer(answer: Answer): Promise<void>;
35
- private _setInstanceId;
36
- private _prepareConfiguration;
37
- private _build;
38
- private _prepareTheSelections;
39
- private _createAdjustable;
40
- private _createAddable;
41
- private _placeAddables;
42
- private _createUniqueName;
43
- private _getGoodIdFromSku;
44
- private _getArticle;
45
- private _getSelections;
46
- private _getDecos;
47
- private _linkSelectionsAndDecos;
48
- private _getVariations;
49
- private _loadVariations;
50
- private _getAdjustables;
51
- private _updatePivot;
52
- private _reset;
53
- }
@@ -1,11 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ImageCacheService } from '../../../services/image-cache.service';
3
- import { Answer } from '@colijnit/configuratorapi/build/model/answer';
4
- export declare class AnswerComponent implements OnInit {
5
- private _imageCacheService;
6
- answer: Answer;
7
- set showing(value: boolean);
8
- constructor(_imageCacheService: ImageCacheService);
9
- ngOnInit(): void;
10
- private _loadThumbnail;
11
- }
@@ -1,8 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { Answer } from "@colijnit/configuratorapi/build/model/answer";
3
- export declare class AnswersComponent {
4
- answers: Answer[];
5
- selectionTitle: string;
6
- answerClick: EventEmitter<Answer>;
7
- constructor();
8
- }
@@ -1,2 +0,0 @@
1
- export declare class AnswersModule {
2
- }
@@ -1,22 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { Selection } from "@colijnit/configuratorapi/build/model/selection";
3
- import { ImageCacheService } from '../../services/image-cache.service';
4
- declare class SelectionViewModel {
5
- selection: Selection;
6
- children: Selection[];
7
- expanded: boolean;
8
- thumbnail: string;
9
- }
10
- export declare class SelectionsComponent implements OnInit {
11
- private _imageCacheService;
12
- set selections(value: Selection[]);
13
- selectionViewModels: SelectionViewModel[];
14
- selectionClick: EventEmitter<Selection>;
15
- constructor(_imageCacheService: ImageCacheService);
16
- ngOnInit(): void;
17
- expandClicked(selectionViewModel: SelectionViewModel, mouseEvent: MouseEvent): void;
18
- selectSelection(selection: Selection, mouseEvent: MouseEvent): void;
19
- private _loadThumbnails;
20
- private _prepareSelections;
21
- }
22
- export {};
@@ -1,2 +0,0 @@
1
- export declare class SelectionsModule {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class LoaderComponent {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class SharedModule {
2
- }
@@ -1,9 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- export declare class VisibilityObserverMasterDirective implements OnDestroy {
3
- private _mapping;
4
- private _observer;
5
- constructor();
6
- ngOnDestroy(): void;
7
- add(element: HTMLElement, callback: Function): void;
8
- remove(element: HTMLElement): void;
9
- }
@@ -1,13 +0,0 @@
1
- import { ElementRef, OnDestroy, OnInit } from '@angular/core';
2
- import { VisibilityObserverMasterDirective } from './visibility-observer-master.directive';
3
- export declare class VisibilityObserverDirective implements OnDestroy, OnInit {
4
- observerEnabled: boolean;
5
- isIntersecting: boolean;
6
- IS_INTERSECTING: boolean;
7
- IS_NOT_INTERSECTING: boolean;
8
- private _elementRef;
9
- private _parent;
10
- constructor(parent: VisibilityObserverMasterDirective, elementRef: ElementRef);
11
- ngOnDestroy(): void;
12
- ngOnInit(): void;
13
- }
@@ -1,22 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- import { Selection } from '@colijnit/configuratorapi/build/model/selection';
3
- import { Answer } from '@colijnit/configuratorapi/build/model/answer';
4
- import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/data-service-response-data';
5
- import { Options } from "@colijnit/ioneconnector/build/model/options";
6
- import { QuestionAndAnswers } from "@colijnit/configuratorapi/build/model/question-and-answers";
7
- export declare class ConfiguratorService {
8
- private _injector;
9
- private _configuratorApi;
10
- constructor(_injector: Injector);
11
- initApi(options: Options): void;
12
- initNodeInstance(goodId: number): Promise<DataServiceResponseData>;
13
- setInstanceToConfigure(id: string, showLoader?: boolean): Promise<DataServiceResponseData>;
14
- getGoodIdFromSku(sku: string, showLoader?: boolean): Promise<DataServiceResponseData>;
15
- getArticleQuickSel(goodId: number, showLoader?: boolean): Promise<DataServiceResponseData>;
16
- getSelections(showLoader?: boolean, publicationCode?: number): Promise<DataServiceResponseData>;
17
- getDecos(showLoader?: boolean): Promise<DataServiceResponseData>;
18
- getQuestionAndAnswers(showLoader?: boolean, publicationCode?: number): Promise<QuestionAndAnswers>;
19
- getSingleImage(nodeId: number | string, publication: number, includeMimetype: boolean, thumb: boolean, showLoader: boolean): Promise<DataServiceResponseData>;
20
- selectSelection(selection: Selection, showLoader?: boolean): Promise<DataServiceResponseData>;
21
- selectAnswer(answer: Answer, showLoader?: boolean): Promise<DataServiceResponseData>;
22
- }
@@ -1,10 +0,0 @@
1
- import { Answer } from '@colijnit/configuratorapi/build/model/answer';
2
- import { Selection } from '@colijnit/configuratorapi/build/model/selection';
3
- import { ConfiguratorService } from './configurator.service';
4
- export declare class ImageCacheService {
5
- private _configuratorService;
6
- private _imageCache;
7
- constructor(_configuratorService: ConfiguratorService);
8
- private static _handleResponseData;
9
- getImageForSelectionOrAnswer(object: Selection | Answer): Promise<string>;
10
- }
@@ -1,4 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- export declare class ServiceLocator {
3
- static injector: Injector;
4
- }