@colijnit/configurator 1.0.17 → 1.0.19

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 (88) hide show
  1. package/app/builder.d.ts +53 -53
  2. package/app/components/answers/answer/answer.component.d.ts +11 -11
  3. package/app/components/answers/answers.component.d.ts +8 -8
  4. package/app/components/answers/answers.module.d.ts +2 -2
  5. package/app/components/selections/selections.component.d.ts +22 -22
  6. package/app/components/selections/selections.module.d.ts +2 -2
  7. package/app/components/shared/loader/loader.component.d.ts +2 -2
  8. package/app/components/shared/shared.module.d.ts +2 -2
  9. package/app/directives/visibility-observer-master.directive.d.ts +9 -9
  10. package/app/directives/visibility-observer.directive.d.ts +13 -13
  11. package/app/services/configurator.service.d.ts +22 -22
  12. package/app/services/image-cache.service.d.ts +10 -10
  13. package/app/services/locator.service.d.ts +4 -4
  14. package/bundles/colijnit-configurator.umd.js +2455 -2455
  15. package/bundles/colijnit-configurator.umd.js.map +1 -1
  16. package/bundles/colijnit-configurator.umd.min.js +1 -1
  17. package/bundles/colijnit-configurator.umd.min.js.map +1 -1
  18. package/colijnit-configurator.d.ts +10 -10
  19. package/colijnit-configurator.metadata.json +1 -1
  20. package/esm2015/app/builder.js +477 -477
  21. package/esm2015/app/components/answers/answer/answer.component.js +51 -51
  22. package/esm2015/app/components/answers/answers.component.js +25 -25
  23. package/esm2015/app/components/answers/answers.module.js +28 -28
  24. package/esm2015/app/components/selections/selections.component.js +85 -85
  25. package/esm2015/app/components/selections/selections.module.js +22 -22
  26. package/esm2015/app/components/shared/loader/loader.component.js +12 -12
  27. package/esm2015/app/components/shared/shared.module.js +20 -20
  28. package/esm2015/app/directives/visibility-observer-master.directive.js +50 -50
  29. package/esm2015/app/directives/visibility-observer.directive.js +56 -56
  30. package/esm2015/app/services/configurator.service.js +94 -94
  31. package/esm2015/app/services/image-cache.service.js +66 -66
  32. package/esm2015/app/services/locator.service.js +9 -9
  33. package/esm2015/colijnit-configurator.js +10 -10
  34. package/esm2015/helper/variation-helper.js +215 -215
  35. package/esm2015/model/material.js +10 -10
  36. package/esm2015/model/variation-settings.js +5 -5
  37. package/esm2015/model/variation.js +2 -2
  38. package/esm2015/public_api.js +6 -6
  39. package/esm2015/utils/asset.utils.js +73 -73
  40. package/esm2015/utils/file.utils.js +138 -138
  41. package/esm2015/utils/image.utils.js +51 -51
  42. package/esm2015/utils/object.utils.js +48 -48
  43. package/esm2015/utils/scene-utils.js +93 -93
  44. package/esm2015/utils/threed.utils.js +221 -221
  45. package/esm2015/utils/variation-utils.js +223 -223
  46. package/esm5/app/builder.js +591 -591
  47. package/esm5/app/components/answers/answer/answer.component.js +63 -63
  48. package/esm5/app/components/answers/answers.component.js +26 -26
  49. package/esm5/app/components/answers/answers.module.js +31 -31
  50. package/esm5/app/components/selections/selections.component.js +103 -103
  51. package/esm5/app/components/selections/selections.module.js +25 -25
  52. package/esm5/app/components/shared/loader/loader.component.js +15 -15
  53. package/esm5/app/components/shared/shared.module.js +23 -23
  54. package/esm5/app/directives/visibility-observer-master.directive.js +63 -63
  55. package/esm5/app/directives/visibility-observer.directive.js +58 -58
  56. package/esm5/app/services/configurator.service.js +160 -160
  57. package/esm5/app/services/image-cache.service.js +69 -69
  58. package/esm5/app/services/locator.service.js +12 -12
  59. package/esm5/colijnit-configurator.js +10 -10
  60. package/esm5/helper/variation-helper.js +267 -267
  61. package/esm5/model/material.js +12 -12
  62. package/esm5/model/variation-settings.js +7 -7
  63. package/esm5/model/variation.js +6 -6
  64. package/esm5/public_api.js +6 -6
  65. package/esm5/utils/asset.utils.js +105 -105
  66. package/esm5/utils/file.utils.js +150 -150
  67. package/esm5/utils/image.utils.js +55 -55
  68. package/esm5/utils/object.utils.js +55 -55
  69. package/esm5/utils/scene-utils.js +97 -97
  70. package/esm5/utils/threed.utils.js +278 -278
  71. package/esm5/utils/variation-utils.js +326 -326
  72. package/fesm2015/colijnit-configurator.js +1946 -1946
  73. package/fesm2015/colijnit-configurator.js.map +1 -1
  74. package/fesm5/colijnit-configurator.js +2457 -2457
  75. package/fesm5/colijnit-configurator.js.map +1 -1
  76. package/helper/variation-helper.d.ts +14 -14
  77. package/model/material.d.ts +17 -17
  78. package/model/variation-settings.d.ts +14 -14
  79. package/model/variation.d.ts +10 -10
  80. package/package.json +3 -2
  81. package/public_api.d.ts +6 -6
  82. package/utils/asset.utils.d.ts +13 -13
  83. package/utils/file.utils.d.ts +27 -27
  84. package/utils/image.utils.d.ts +8 -8
  85. package/utils/object.utils.d.ts +7 -7
  86. package/utils/scene-utils.d.ts +7 -7
  87. package/utils/threed.utils.d.ts +16 -16
  88. package/utils/variation-utils.d.ts +12 -12
@@ -1,16 +1,16 @@
1
- import { __decorate } from "tslib";
2
- import { Component } from '@angular/core';
3
- var LoaderComponent = /** @class */ (function () {
4
- function LoaderComponent() {
5
- }
6
- LoaderComponent = __decorate([
7
- Component({
8
- selector: 'rp-loader',
9
- template: "\n <div class=\"loader-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\" stroke=\"#3760a1\">\n <g fill=\"none\" fill-rule=\"evenodd\" stroke-width=\"3\">\n <circle class=\"ripple1\" cx=\"22\" cy=\"22\" r=\"19\">\n </circle>\n <circle class=\"ripple2\" cx=\"22\" cy=\"22\" r=\"19\">\n </circle>\n </g>\n </svg>\n </div>\n ",
10
- styles: [":host{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}:host .loader-wrapper{z-index:1100;position:absolute;width:54px;height:54px}:host .loader-wrapper svg{width:100%;height:100%}:host .loader-wrapper svg .ripple1{transform-origin:center;-webkit-animation:1.5s infinite ripple;animation:1.5s infinite ripple}:host .loader-wrapper svg .ripple2{transform-origin:center;-webkit-animation:1.5s .4s infinite ripple;animation:1.5s .4s infinite ripple}@-webkit-keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1);opacity:0}}@keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1);opacity:0}}"]
11
- })
12
- ], LoaderComponent);
13
- return LoaderComponent;
14
- }());
15
- export { LoaderComponent };
1
+ import { __decorate } from "tslib";
2
+ import { Component } from '@angular/core';
3
+ var LoaderComponent = /** @class */ (function () {
4
+ function LoaderComponent() {
5
+ }
6
+ LoaderComponent = __decorate([
7
+ Component({
8
+ selector: 'rp-loader',
9
+ template: "\n <div class=\"loader-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\" stroke=\"#3760a1\">\n <g fill=\"none\" fill-rule=\"evenodd\" stroke-width=\"3\">\n <circle class=\"ripple1\" cx=\"22\" cy=\"22\" r=\"19\">\n </circle>\n <circle class=\"ripple2\" cx=\"22\" cy=\"22\" r=\"19\">\n </circle>\n </g>\n </svg>\n </div>\n ",
10
+ styles: [":host{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}:host .loader-wrapper{z-index:1100;position:absolute;width:54px;height:54px}:host .loader-wrapper svg{width:100%;height:100%}:host .loader-wrapper svg .ripple1{transform-origin:center;-webkit-animation:1.5s infinite ripple;animation:1.5s infinite ripple}:host .loader-wrapper svg .ripple2{transform-origin:center;-webkit-animation:1.5s .4s infinite ripple;animation:1.5s .4s infinite ripple}@-webkit-keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1);opacity:0}}@keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1);opacity:0}}"]
11
+ })
12
+ ], LoaderComponent);
13
+ return LoaderComponent;
14
+ }());
15
+ export { LoaderComponent };
16
16
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bjb2xpam5pdC9jb25maWd1cmF0b3IvIiwic291cmNlcyI6WyJhcHAvY29tcG9uZW50cy9zaGFyZWQvbG9hZGVyL2xvYWRlci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VVybHM6IFsnLi9sb2FkZXIuY29tcG9uZW50LnNjc3MnXVxufSlcbmV4cG9ydCBjbGFzcyBMb2FkZXJDb21wb25lbnQge1xufVxuIl19
@@ -1,24 +1,24 @@
1
- import { __decorate } from "tslib";
2
- import { NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { LoaderComponent } from './loader/loader.component';
5
- var SharedModule = /** @class */ (function () {
6
- function SharedModule() {
7
- }
8
- SharedModule = __decorate([
9
- NgModule({
10
- imports: [
11
- CommonModule
12
- ],
13
- declarations: [
14
- LoaderComponent
15
- ],
16
- exports: [
17
- LoaderComponent
18
- ]
19
- })
20
- ], SharedModule);
21
- return SharedModule;
22
- }());
23
- export { SharedModule };
1
+ import { __decorate } from "tslib";
2
+ import { NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { LoaderComponent } from './loader/loader.component';
5
+ var SharedModule = /** @class */ (function () {
6
+ function SharedModule() {
7
+ }
8
+ SharedModule = __decorate([
9
+ NgModule({
10
+ imports: [
11
+ CommonModule
12
+ ],
13
+ declarations: [
14
+ LoaderComponent
15
+ ],
16
+ exports: [
17
+ LoaderComponent
18
+ ]
19
+ })
20
+ ], SharedModule);
21
+ return SharedModule;
22
+ }());
23
+ export { SharedModule };
24
24
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bjb2xpam5pdC9jb25maWd1cmF0b3IvIiwic291cmNlcyI6WyJhcHAvY29tcG9uZW50cy9zaGFyZWQvc2hhcmVkLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLDJCQUEyQixDQUFDO0FBYTFEO0lBQUE7SUFBNEIsQ0FBQztJQUFoQixZQUFZO1FBWHhCLFFBQVEsQ0FBQztZQUNSLE9BQU8sRUFBRTtnQkFDUCxZQUFZO2FBQ2I7WUFDRCxZQUFZLEVBQUU7Z0JBQ1osZUFBZTthQUNoQjtZQUNELE9BQU8sRUFBRTtnQkFDUCxlQUFlO2FBQ2hCO1NBQ0YsQ0FBQztPQUNXLFlBQVksQ0FBSTtJQUFELG1CQUFDO0NBQUEsQUFBN0IsSUFBNkI7U0FBaEIsWUFBWSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHtMb2FkZXJDb21wb25lbnR9IGZyb20gJy4vbG9hZGVyL2xvYWRlci5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlXG4gIF0sXG4gIGRlY2xhcmF0aW9uczogW1xuICAgIExvYWRlckNvbXBvbmVudFxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgTG9hZGVyQ29tcG9uZW50XG4gIF1cbn0pXG5leHBvcnQgY2xhc3MgU2hhcmVkTW9kdWxlIHsgfVxuIl19
@@ -1,64 +1,64 @@
1
- import { __decorate, __values } from "tslib";
2
- // Import the core angular services.
3
- import { Directive } from '@angular/core';
4
- var VisibilityObserverMasterDirective = /** @class */ (function () {
5
- // I initialize the intersection observer parent directive.
6
- function VisibilityObserverMasterDirective() {
7
- var _this = this;
8
- // As each observable child attaches itself to the parent observer, we need to
9
- // map Elements to Callbacks so that when an Element's intersection changes,
10
- // we'll know which callback to invoke. For this, we'll use an ES6 Map.
11
- this._mapping = new Map();
12
- this._observer = new IntersectionObserver(function (entries) {
13
- var e_1, _a;
14
- try {
15
- for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
16
- var entry = entries_1_1.value;
17
- var callback = _this._mapping.get(entry.target);
18
- if (callback) {
19
- callback(entry.isIntersecting);
20
- }
21
- }
22
- }
23
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
24
- finally {
25
- try {
26
- if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
27
- }
28
- finally { if (e_1) throw e_1.error; }
29
- }
30
- }, {
31
- // This classifies the "intersection" as being a bit outside the
32
- // viewport. The intent here is give the elements a little time to react
33
- // to the change before the element is actually visible to the user.
34
- rootMargin: '300px 0px 300px 0px'
35
- });
36
- }
37
- // I get called once when the host element is being destroyed.
38
- VisibilityObserverMasterDirective.prototype.ngOnDestroy = function () {
39
- this._mapping.clear();
40
- this._observer.disconnect();
41
- };
42
- // ---
43
- // PUBLIC METHODS.
44
- // ---
45
- // I add the given Element for intersection observation. When the intersection status
46
- // changes, the given callback is invoked with the new status.
47
- VisibilityObserverMasterDirective.prototype.add = function (element, callback) {
48
- this._mapping.set(element, callback);
49
- this._observer.observe(element);
50
- };
51
- // I remove the given Element from intersection observation.
52
- VisibilityObserverMasterDirective.prototype.remove = function (element) {
53
- this._mapping.delete(element);
54
- this._observer.unobserve(element);
55
- };
56
- VisibilityObserverMasterDirective = __decorate([
57
- Directive({
58
- selector: '[visibilityObserverMaster]'
59
- })
60
- ], VisibilityObserverMasterDirective);
61
- return VisibilityObserverMasterDirective;
62
- }());
63
- export { VisibilityObserverMasterDirective };
1
+ import { __decorate, __values } from "tslib";
2
+ // Import the core angular services.
3
+ import { Directive } from '@angular/core';
4
+ var VisibilityObserverMasterDirective = /** @class */ (function () {
5
+ // I initialize the intersection observer parent directive.
6
+ function VisibilityObserverMasterDirective() {
7
+ var _this = this;
8
+ // As each observable child attaches itself to the parent observer, we need to
9
+ // map Elements to Callbacks so that when an Element's intersection changes,
10
+ // we'll know which callback to invoke. For this, we'll use an ES6 Map.
11
+ this._mapping = new Map();
12
+ this._observer = new IntersectionObserver(function (entries) {
13
+ var e_1, _a;
14
+ try {
15
+ for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
16
+ var entry = entries_1_1.value;
17
+ var callback = _this._mapping.get(entry.target);
18
+ if (callback) {
19
+ callback(entry.isIntersecting);
20
+ }
21
+ }
22
+ }
23
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
24
+ finally {
25
+ try {
26
+ if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
27
+ }
28
+ finally { if (e_1) throw e_1.error; }
29
+ }
30
+ }, {
31
+ // This classifies the "intersection" as being a bit outside the
32
+ // viewport. The intent here is give the elements a little time to react
33
+ // to the change before the element is actually visible to the user.
34
+ rootMargin: '300px 0px 300px 0px'
35
+ });
36
+ }
37
+ // I get called once when the host element is being destroyed.
38
+ VisibilityObserverMasterDirective.prototype.ngOnDestroy = function () {
39
+ this._mapping.clear();
40
+ this._observer.disconnect();
41
+ };
42
+ // ---
43
+ // PUBLIC METHODS.
44
+ // ---
45
+ // I add the given Element for intersection observation. When the intersection status
46
+ // changes, the given callback is invoked with the new status.
47
+ VisibilityObserverMasterDirective.prototype.add = function (element, callback) {
48
+ this._mapping.set(element, callback);
49
+ this._observer.observe(element);
50
+ };
51
+ // I remove the given Element from intersection observation.
52
+ VisibilityObserverMasterDirective.prototype.remove = function (element) {
53
+ this._mapping.delete(element);
54
+ this._observer.unobserve(element);
55
+ };
56
+ VisibilityObserverMasterDirective = __decorate([
57
+ Directive({
58
+ selector: '[visibilityObserverMaster]'
59
+ })
60
+ ], VisibilityObserverMasterDirective);
61
+ return VisibilityObserverMasterDirective;
62
+ }());
63
+ export { VisibilityObserverMasterDirective };
64
64
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzaWJpbGl0eS1vYnNlcnZlci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9ic2VydmUoZWxlbWVudCk7XG5cbiAgfVxuXG4gIC8vIEkgcmVtb3ZlIHRoZSBnaXZlbiBFbGVtZW50IGZyb20gaW50ZXJzZWN0aW9uIG9ic2VydmF0aW9uLlxuICBwdWJsaWMgcmVtb3ZlKGVsZW1lbnQ6IEhUTUxFbGVtZW50KTogdm9pZCB7XG5cbiAgICB0aGlzLl9tYXBwaW5nLmRlbGV0ZShlbGVtZW50KTtcbiAgICB0aGlzLl9vYnNlcnZlci51bm9ic2VydmUoZWxlbWVudCk7XG5cbiAgfVxuXG59XG4iXX0=
@@ -1,59 +1,59 @@
1
- import { __decorate } from "tslib";
2
- import { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
3
- import { VisibilityObserverMasterDirective } from './visibility-observer-master.directive';
4
- var VisibilityObserverDirective = /** @class */ (function () {
5
- // I initialize the intersection observer directive.
6
- function VisibilityObserverDirective(parent, elementRef) {
7
- this.observerEnabled = false;
8
- // These are just some human-friendly constants to make the HTML template a bit more
9
- // readable when being consumed as part of SWTCH/CASE statements.
10
- this.IS_INTERSECTING = true;
11
- this.IS_NOT_INTERSECTING = false;
12
- this._parent = parent;
13
- this._elementRef = elementRef;
14
- // By default, we're going to assume that the host element is NOT intersecting.
15
- // Then, we'll use the IntersectionObserver to asynchronously check for changes
16
- // in viewport visibility.
17
- this.isIntersecting = false;
18
- }
19
- // ---
20
- // PUBLIC METHODS.
21
- // ---
22
- // I get called once when the host element is being destroyed.
23
- VisibilityObserverDirective.prototype.ngOnDestroy = function () {
24
- this._parent.remove(this._elementRef.nativeElement);
25
- this._elementRef = undefined;
26
- };
27
- // I get called once after the inputs have been bound for the first time.
28
- VisibilityObserverDirective.prototype.ngOnInit = function () {
29
- var _this = this;
30
- // In this demo, instead of using an IntersectionObserver per Element, we're
31
- // going to use a shared observer in the parent element. However, we're still
32
- // going to use a CALLBACK style approach so that we're only reducing the number
33
- // of IntersectionObserver instances, not the number of Function calls.
34
- if (this.observerEnabled) {
35
- this._parent.add(this._elementRef.nativeElement, function (isIntersecting) {
36
- _this.isIntersecting = isIntersecting;
37
- if (_this.isIntersecting) {
38
- _this._parent.remove(_this._elementRef.nativeElement);
39
- }
40
- });
41
- }
42
- };
43
- VisibilityObserverDirective.ctorParameters = function () { return [
44
- { type: VisibilityObserverMasterDirective },
45
- { type: ElementRef }
46
- ]; };
47
- __decorate([
48
- Input()
49
- ], VisibilityObserverDirective.prototype, "observerEnabled", void 0);
50
- VisibilityObserverDirective = __decorate([
51
- Directive({
52
- selector: '[visibilityObserver]',
53
- exportAs: 'intersection'
54
- })
55
- ], VisibilityObserverDirective);
56
- return VisibilityObserverDirective;
57
- }());
58
- export { VisibilityObserverDirective };
1
+ import { __decorate } from "tslib";
2
+ import { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
3
+ import { VisibilityObserverMasterDirective } from './visibility-observer-master.directive';
4
+ var VisibilityObserverDirective = /** @class */ (function () {
5
+ // I initialize the intersection observer directive.
6
+ function VisibilityObserverDirective(parent, elementRef) {
7
+ this.observerEnabled = false;
8
+ // These are just some human-friendly constants to make the HTML template a bit more
9
+ // readable when being consumed as part of SWTCH/CASE statements.
10
+ this.IS_INTERSECTING = true;
11
+ this.IS_NOT_INTERSECTING = false;
12
+ this._parent = parent;
13
+ this._elementRef = elementRef;
14
+ // By default, we're going to assume that the host element is NOT intersecting.
15
+ // Then, we'll use the IntersectionObserver to asynchronously check for changes
16
+ // in viewport visibility.
17
+ this.isIntersecting = false;
18
+ }
19
+ // ---
20
+ // PUBLIC METHODS.
21
+ // ---
22
+ // I get called once when the host element is being destroyed.
23
+ VisibilityObserverDirective.prototype.ngOnDestroy = function () {
24
+ this._parent.remove(this._elementRef.nativeElement);
25
+ this._elementRef = undefined;
26
+ };
27
+ // I get called once after the inputs have been bound for the first time.
28
+ VisibilityObserverDirective.prototype.ngOnInit = function () {
29
+ var _this = this;
30
+ // In this demo, instead of using an IntersectionObserver per Element, we're
31
+ // going to use a shared observer in the parent element. However, we're still
32
+ // going to use a CALLBACK style approach so that we're only reducing the number
33
+ // of IntersectionObserver instances, not the number of Function calls.
34
+ if (this.observerEnabled) {
35
+ this._parent.add(this._elementRef.nativeElement, function (isIntersecting) {
36
+ _this.isIntersecting = isIntersecting;
37
+ if (_this.isIntersecting) {
38
+ _this._parent.remove(_this._elementRef.nativeElement);
39
+ }
40
+ });
41
+ }
42
+ };
43
+ VisibilityObserverDirective.ctorParameters = function () { return [
44
+ { type: VisibilityObserverMasterDirective },
45
+ { type: ElementRef }
46
+ ]; };
47
+ __decorate([
48
+ Input()
49
+ ], VisibilityObserverDirective.prototype, "observerEnabled", void 0);
50
+ VisibilityObserverDirective = __decorate([
51
+ Directive({
52
+ selector: '[visibilityObserver]',
53
+ exportAs: 'intersection'
54
+ })
55
+ ], VisibilityObserverDirective);
56
+ return VisibilityObserverDirective;
57
+ }());
58
+ export { VisibilityObserverDirective };
59
59
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzaWJpbGl0eS1vYnNlcnZlci5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AY29saWpuaXQvY29uZmlndXJhdG9yLyIsInNvdXJjZXMiOlsiYXBwL2RpcmVjdGl2ZXMvdmlzaWJpbGl0eS1vYnNlcnZlci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsVUFBVSxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDcEcsT0FBTyxFQUFDLGlDQUFpQyxFQUFDLE1BQU0sd0NBQXdDLENBQUM7QUFNekY7SUFjRSxvREFBb0Q7SUFDcEQscUNBQ0ksTUFBeUMsRUFDekMsVUFBc0I7UUFkbkIsb0JBQWUsR0FBWSxLQ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