@eurosat/resized-event 12.0.0 → 14.0.1

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.
@@ -0,0 +1,39 @@
1
+ import { Directive, ElementRef, EventEmitter, Output } from '@angular/core';
2
+ import { EsResizedEvent } from './es-resized-event';
3
+ import ResizeSensor from 'css-element-queries/src/ResizeSensor';
4
+ import * as i0 from "@angular/core";
5
+ export class EsResizedEventDirective {
6
+ constructor(element) {
7
+ this.element = element;
8
+ this.resized = new EventEmitter();
9
+ }
10
+ ngOnInit() {
11
+ // tslint:disable-next-line:no-unused-expression
12
+ new ResizeSensor(this.element.nativeElement, x => this.onResized());
13
+ this.onResized();
14
+ }
15
+ onResized() {
16
+ const newWidth = this.element.nativeElement.clientWidth;
17
+ const newHeight = this.element.nativeElement.clientHeight;
18
+ if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
19
+ return;
20
+ }
21
+ const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
22
+ this.oldWidth = this.element.nativeElement.clientWidth;
23
+ this.oldHeight = this.element.nativeElement.clientHeight;
24
+ this.resized.next(event);
25
+ }
26
+ }
27
+ /** @nocollapse */ EsResizedEventDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
28
+ /** @nocollapse */ EsResizedEventDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EsResizedEventDirective, selector: "[resized]", outputs: { resized: "resized" }, ngImport: i0 });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, decorators: [{
30
+ type: Directive,
31
+ args: [{
32
+ // tslint:disable-next-line:directive-selector
33
+ selector: '[resized]'
34
+ }]
35
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { resized: [{
36
+ type: Output,
37
+ args: ['resized']
38
+ }] } });
39
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy9saWIvZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNwRixPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDbEQsT0FBTyxZQUFZLE1BQU0sc0NBQXNDLENBQUM7O0FBT2hFLE1BQU0sT0FBTyx1QkFBdUI7SUFRaEMsWUFBNkIsT0FBbUI7UUFBbkIsWUFBTyxHQUFQLE9BQU8sQ0FBWTtRQUx2QyxZQUFPLEdBQUcsSUFBSSxZQUFZLEVBQWtCLENBQUM7SUFNdEQsQ0FBQztJQUVELFFBQVE7UUFDSixnREFBZ0Q7UUFDaEQsSUFBSSxZQUFZLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUMsQ0FBQztRQUNwRSxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7SUFDckIsQ0FBQztJQUVPLFNBQVM7UUFDYixNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxXQUFXLENBQUM7UUFDeEQsTUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUM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XJuO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXNSZXNpemVkRXZlbnQoXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnQsXG4gICAgICAgICAgICBuZXdXaWR0aCxcbiAgICAgICAgICAgIG5ld0hlaWdodCxcbiAgICAgICAgICAgIHRoaXMub2xkV2lkdGgsXG4gICAgICAgICAgICB0aGlzLm9sZEhlaWdodCk7XG5cbiAgICAgICAgdGhpcy5vbGRXaWR0aCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudFdpZHRoO1xuICAgICAgICB0aGlzLm9sZEhlaWdodCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudEhlaWdodDtcblxuICAgICAgICB0aGlzLnJlc2l6ZWQubmV4dChldmVudCk7XG4gICAgfVxuXG59XG4iXX0=
@@ -0,0 +1,17 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { EsResizedEventDirective } from './es-resized-event.directive';
3
+ import * as i0 from "@angular/core";
4
+ export class EsResizedEventModule {
5
+ }
6
+ /** @nocollapse */ EsResizedEventModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7
+ /** @nocollapse */ EsResizedEventModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, declarations: [EsResizedEventDirective], exports: [EsResizedEventDirective] });
8
+ /** @nocollapse */ EsResizedEventModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule });
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, decorators: [{
10
+ type: NgModule,
11
+ args: [{
12
+ declarations: [EsResizedEventDirective],
13
+ imports: [],
14
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zaXplZEV2ZW50TW9kdWxlIHsgfVxuIl19
@@ -0,0 +1,73 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Directive, Output, NgModule } from '@angular/core';
3
+ import ResizeSensor from 'css-element-queries/src/ResizeSensor';
4
+
5
+ class EsResizedEvent {
6
+ constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
7
+ this.element = element;
8
+ this.newWidth = newWidth;
9
+ this.newHeight = newHeight;
10
+ this.oldWidth = oldWidth;
11
+ this.oldHeight = oldHeight;
12
+ }
13
+ }
14
+
15
+ class EsResizedEventDirective {
16
+ constructor(element) {
17
+ this.element = element;
18
+ this.resized = new EventEmitter();
19
+ }
20
+ ngOnInit() {
21
+ // tslint:disable-next-line:no-unused-expression
22
+ new ResizeSensor(this.element.nativeElement, x => this.onResized());
23
+ this.onResized();
24
+ }
25
+ onResized() {
26
+ const newWidth = this.element.nativeElement.clientWidth;
27
+ const newHeight = this.element.nativeElement.clientHeight;
28
+ if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
29
+ return;
30
+ }
31
+ const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
32
+ this.oldWidth = this.element.nativeElement.clientWidth;
33
+ this.oldHeight = this.element.nativeElement.clientHeight;
34
+ this.resized.next(event);
35
+ }
36
+ }
37
+ /** @nocollapse */ EsResizedEventDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
38
+ /** @nocollapse */ EsResizedEventDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EsResizedEventDirective, selector: "[resized]", outputs: { resized: "resized" }, ngImport: i0 });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, decorators: [{
40
+ type: Directive,
41
+ args: [{
42
+ // tslint:disable-next-line:directive-selector
43
+ selector: '[resized]'
44
+ }]
45
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { resized: [{
46
+ type: Output,
47
+ args: ['resized']
48
+ }] } });
49
+
50
+ class EsResizedEventModule {
51
+ }
52
+ /** @nocollapse */ EsResizedEventModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
53
+ /** @nocollapse */ EsResizedEventModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, declarations: [EsResizedEventDirective], exports: [EsResizedEventDirective] });
54
+ /** @nocollapse */ EsResizedEventModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, decorators: [{
56
+ type: NgModule,
57
+ args: [{
58
+ declarations: [EsResizedEventDirective],
59
+ imports: [],
60
+ exports: [EsResizedEventDirective]
61
+ }]
62
+ }] });
63
+
64
+ /*
65
+ * Public API Surface of resized-event
66
+ */
67
+
68
+ /**
69
+ * Generated bundle index. Do not edit.
70
+ */
71
+
72
+ export { EsResizedEvent, EsResizedEventDirective, EsResizedEventModule };
73
+ //# sourceMappingURL=eurosat-resized-event.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eurosat-resized-event.mjs","sources":["../../../projects/resized-event/src/lib/es-resized-event.ts","../../../projects/resized-event/src/lib/es-resized-event.directive.ts","../../../projects/resized-event/src/lib/es-resized-event.module.ts","../../../projects/resized-event/src/public_api.ts","../../../projects/resized-event/src/eurosat-resized-event.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\nexport class EsResizedEvent {\n constructor(\n readonly element: ElementRef,\n readonly newWidth: number,\n readonly newHeight: number,\n readonly oldWidth: number,\n readonly oldHeight: number\n ) {}\n}\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\nimport {EsResizedEvent} from './es-resized-event';\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[resized]'\n})\nexport class EsResizedEventDirective implements OnInit {\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth: number;\n private oldHeight: number;\n\n constructor(private readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // tslint:disable-next-line:no-unused-expression\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\n this.onResized();\n }\n\n private onResized(): void {\n const newWidth = this.element.nativeElement.clientWidth;\n const newHeight = this.element.nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.element,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight);\n\n this.oldWidth = this.element.nativeElement.clientWidth;\n this.oldHeight = this.element.nativeElement.clientHeight;\n\n this.resized.next(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n declarations: [EsResizedEventDirective],\n imports: [\n ],\n exports: [EsResizedEventDirective]\n})\nexport class EsResizedEventModule { }\n","/*\n * Public API Surface of resized-event\n */\n\nexport * from './lib/es-resized-event';\nexport * from './lib/es-resized-event.directive';\nexport * from './lib/es-resized-event.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAEa,cAAc,CAAA;IACvB,WACa,CAAA,OAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,QAAgB,EAChB,SAAiB,EAAA;AAJjB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;AACnB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;A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A,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2HAAvB,uBAAuB,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAEP,oBAAA,QAAQ,EAAE,WAAW;iBACxB,CAAA;iGAIY,OAAO,EAAA,CAAA;sBADf,MAAM;uBAAC,SAAS,CAAA;;;MCFR,oBAAoB,CAAA;;oIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;qIAApB,oBAAoB,EAAA,YAAA,EAAA,CALhB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAG5B,uBAAuB,CAAA,EAAA,CAAA,CAAA;qIAEtB,oBAAoB,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC,CAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,73 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Directive, Output, NgModule } from '@angular/core';
3
+ import ResizeSensor from 'css-element-queries/src/ResizeSensor';
4
+
5
+ class EsResizedEvent {
6
+ constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
7
+ this.element = element;
8
+ this.newWidth = newWidth;
9
+ this.newHeight = newHeight;
10
+ this.oldWidth = oldWidth;
11
+ this.oldHeight = oldHeight;
12
+ }
13
+ }
14
+
15
+ class EsResizedEventDirective {
16
+ constructor(element) {
17
+ this.element = element;
18
+ this.resized = new EventEmitter();
19
+ }
20
+ ngOnInit() {
21
+ // tslint:disable-next-line:no-unused-expression
22
+ new ResizeSensor(this.element.nativeElement, x => this.onResized());
23
+ this.onResized();
24
+ }
25
+ onResized() {
26
+ const newWidth = this.element.nativeElement.clientWidth;
27
+ const newHeight = this.element.nativeElement.clientHeight;
28
+ if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
29
+ return;
30
+ }
31
+ const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
32
+ this.oldWidth = this.element.nativeElement.clientWidth;
33
+ this.oldHeight = this.element.nativeElement.clientHeight;
34
+ this.resized.next(event);
35
+ }
36
+ }
37
+ /** @nocollapse */ EsResizedEventDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
38
+ /** @nocollapse */ EsResizedEventDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EsResizedEventDirective, selector: "[resized]", outputs: { resized: "resized" }, ngImport: i0 });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventDirective, decorators: [{
40
+ type: Directive,
41
+ args: [{
42
+ // tslint:disable-next-line:directive-selector
43
+ selector: '[resized]'
44
+ }]
45
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { resized: [{
46
+ type: Output,
47
+ args: ['resized']
48
+ }] } });
49
+
50
+ class EsResizedEventModule {
51
+ }
52
+ /** @nocollapse */ EsResizedEventModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
53
+ /** @nocollapse */ EsResizedEventModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, declarations: [EsResizedEventDirective], exports: [EsResizedEventDirective] });
54
+ /** @nocollapse */ EsResizedEventModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EsResizedEventModule, decorators: [{
56
+ type: NgModule,
57
+ args: [{
58
+ declarations: [EsResizedEventDirective],
59
+ imports: [],
60
+ exports: [EsResizedEventDirective]
61
+ }]
62
+ }] });
63
+
64
+ /*
65
+ * Public API Surface of resized-event
66
+ */
67
+
68
+ /**
69
+ * Generated bundle index. Do not edit.
70
+ */
71
+
72
+ export { EsResizedEvent, EsResizedEventDirective, EsResizedEventModule };
73
+ //# sourceMappingURL=eurosat-resized-event.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eurosat-resized-event.mjs","sources":["../../../projects/resized-event/src/lib/es-resized-event.ts","../../../projects/resized-event/src/lib/es-resized-event.directive.ts","../../../projects/resized-event/src/lib/es-resized-event.module.ts","../../../projects/resized-event/src/public_api.ts","../../../projects/resized-event/src/eurosat-resized-event.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\nexport class EsResizedEvent {\n constructor(\n readonly element: ElementRef,\n readonly newWidth: number,\n readonly newHeight: number,\n readonly oldWidth: number,\n readonly oldHeight: number\n ) {}\n}\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\nimport {EsResizedEvent} from './es-resized-event';\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[resized]'\n})\nexport class EsResizedEventDirective implements OnInit {\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth: number;\n private oldHeight: number;\n\n constructor(private readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // tslint:disable-next-line:no-unused-expression\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\n this.onResized();\n }\n\n private onResized(): void {\n const newWidth = this.element.nativeElement.clientWidth;\n const newHeight = this.element.nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.element,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight);\n\n this.oldWidth = this.element.nativeElement.clientWidth;\n this.oldHeight = this.element.nativeElement.clientHeight;\n\n this.resized.next(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n declarations: [EsResizedEventDirective],\n imports: [\n ],\n exports: [EsResizedEventDirective]\n})\nexport class EsResizedEventModule { }\n","/*\n * Public API Surface of resized-event\n */\n\nexport * from './lib/es-resized-event';\nexport * from './lib/es-resized-event.directive';\nexport * from './lib/es-resized-event.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAEa,cAAc,CAAA;IACvB,WACa,CAAA,OAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,QAAgB,EAChB,SAAiB,EAAA;QAJjB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;QACnB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;QAChB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;QACjB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;QAChB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;KAC1B;AACP;;MCDY,uBAAuB,CAAA;AAQhC,IAAA,WAAA,CAA6B,OAAmB,EAAA;QAAnB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;AALvC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAkB,CAAC;KAMrD;IAED,QAAQ,GAAA;;AAEJ,QAAA,IA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EAAA,CAAA;sBADf,MAAM;uBAAC,SAAS,CAAA;;;MCFR,oBAAoB,CAAA;;oIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;qIAApB,oBAAoB,EAAA,YAAA,EAAA,CALhB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAG5B,uBAAuB,CAAA,EAAA,CAAA,CAAA;qIAEtB,oBAAoB,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@eurosat/resized-event" />
4
5
  export * from './public_api';
@@ -1,5 +1,6 @@
1
1
  import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { EsResizedEvent } from './es-resized-event';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class EsResizedEventDirective implements OnInit {
4
5
  private readonly element;
5
6
  readonly resized: EventEmitter<EsResizedEvent>;
@@ -8,4 +9,6 @@ export declare class EsResizedEventDirective implements OnInit {
8
9
  constructor(element: ElementRef);
9
10
  ngOnInit(): void;
10
11
  private onResized;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsResizedEventDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EsResizedEventDirective, "[resized]", never, {}, { "resized": "resized"; }, never, never, false>;
11
14
  }
@@ -1,2 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./es-resized-event.directive";
1
3
  export declare class EsResizedEventModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsResizedEventModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EsResizedEventModule, [typeof i1.EsResizedEventDirective], never, [typeof i1.EsResizedEventDirective]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<EsResizedEventModule>;
2
7
  }
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@eurosat/resized-event",
3
- "version": "12.0.0",
3
+ "version": "14.0.1",
4
4
  "peerDependencies": {
5
- "@angular/common": "^12.2.16",
6
- "@angular/core": "^12.2.16",
5
+ "@angular/common": "^14.3.0",
6
+ "@angular/core": "^14.3.0",
7
7
  "css-element-queries": "^1.2.3"
8
8
  },
9
9
  "dependencies": {
10
- "tslib": "^2.0.0"
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2015/eurosat-resized-event.mjs",
13
+ "es2020": "fesm2020/eurosat-resized-event.mjs",
14
+ "esm2020": "esm2020/eurosat-resized-event.mjs",
15
+ "fesm2020": "fesm2020/eurosat-resized-event.mjs",
16
+ "fesm2015": "fesm2015/eurosat-resized-event.mjs",
17
+ "typings": "index.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./index.d.ts",
24
+ "esm2020": "./esm2020/eurosat-resized-event.mjs",
25
+ "es2020": "./fesm2020/eurosat-resized-event.mjs",
26
+ "es2015": "./fesm2015/eurosat-resized-event.mjs",
27
+ "node": "./fesm2015/eurosat-resized-event.mjs",
28
+ "default": "./fesm2020/eurosat-resized-event.mjs"
29
+ }
11
30
  },
12
- "main": "bundles/eurosat-resized-event.umd.js",
13
- "module": "fesm2015/eurosat-resized-event.js",
14
- "es2015": "fesm2015/eurosat-resized-event.js",
15
- "esm2015": "esm2015/eurosat-resized-event.js",
16
- "fesm2015": "fesm2015/eurosat-resized-event.js",
17
- "typings": "eurosat-resized-event.d.ts",
18
- "metadata": "eurosat-resized-event.metadata.json",
19
31
  "sideEffects": false
20
32
  }
@@ -1,88 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('css-element-queries/src/ResizeSensor')) :
3
- typeof define === 'function' && define.amd ? define('@eurosat/resized-event', ['exports', '@angular/core', 'css-element-queries/src/ResizeSensor'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.eurosat = global.eurosat || {}, global.eurosat['resized-event'] = {}), global.ng.core, global.ResizeSensor));
5
- }(this, (function (exports, core, ResizeSensor) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var ResizeSensor__default = /*#__PURE__*/_interopDefaultLegacy(ResizeSensor);
10
-
11
- var EsResizedEvent = /** @class */ (function () {
12
- function EsResizedEvent(element, newWidth, newHeight, oldWidth, oldHeight) {
13
- this.element = element;
14
- this.newWidth = newWidth;
15
- this.newHeight = newHeight;
16
- this.oldWidth = oldWidth;
17
- this.oldHeight = oldHeight;
18
- }
19
- return EsResizedEvent;
20
- }());
21
-
22
- var EsResizedEventDirective = /** @class */ (function () {
23
- function EsResizedEventDirective(element) {
24
- this.element = element;
25
- this.resized = new core.EventEmitter();
26
- }
27
- EsResizedEventDirective.prototype.ngOnInit = function () {
28
- var _this = this;
29
- // tslint:disable-next-line:no-unused-expression
30
- new ResizeSensor__default['default'](this.element.nativeElement, function (x) { return _this.onResized(); });
31
- this.onResized();
32
- };
33
- EsResizedEventDirective.prototype.onResized = function () {
34
- var newWidth = this.element.nativeElement.clientWidth;
35
- var newHeight = this.element.nativeElement.clientHeight;
36
- if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
37
- return;
38
- }
39
- var event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
40
- this.oldWidth = this.element.nativeElement.clientWidth;
41
- this.oldHeight = this.element.nativeElement.clientHeight;
42
- this.resized.next(event);
43
- };
44
- return EsResizedEventDirective;
45
- }());
46
- EsResizedEventDirective.decorators = [
47
- { type: core.Directive, args: [{
48
- // tslint:disable-next-line:directive-selector
49
- selector: '[resized]'
50
- },] }
51
- ];
52
- /** @nocollapse */
53
- EsResizedEventDirective.ctorParameters = function () { return [
54
- { type: core.ElementRef }
55
- ]; };
56
- EsResizedEventDirective.propDecorators = {
57
- resized: [{ type: core.Output, args: ['resized',] }]
58
- };
59
-
60
- var EsResizedEventModule = /** @class */ (function () {
61
- function EsResizedEventModule() {
62
- }
63
- return EsResizedEventModule;
64
- }());
65
- EsResizedEventModule.decorators = [
66
- { type: core.NgModule, args: [{
67
- declarations: [EsResizedEventDirective],
68
- imports: [],
69
- exports: [EsResizedEventDirective]
70
- },] }
71
- ];
72
-
73
- /*
74
- * Public API Surface of resized-event
75
- */
76
-
77
- /**
78
- * Generated bundle index. Do not edit.
79
- */
80
-
81
- exports.EsResizedEvent = EsResizedEvent;
82
- exports.EsResizedEventDirective = EsResizedEventDirective;
83
- exports.EsResizedEventModule = EsResizedEventModule;
84
-
85
- Object.defineProperty(exports, '__esModule', { value: true });
86
-
87
- })));
88
- //# sourceMappingURL=eurosat-resized-event.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eurosat-resized-event.umd.js","sources":["../../../projects/resized-event/src/lib/es-resized-event.ts","../../../projects/resized-event/src/lib/es-resized-event.directive.ts","../../../projects/resized-event/src/lib/es-resized-event.module.ts","../../../projects/resized-event/src/public_api.ts","../../../projects/resized-event/src/eurosat-resized-event.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\nexport class EsResizedEvent {\n constructor(\n readonly element: ElementRef,\n readonly newWidth: number,\n readonly newHeight: number,\n readonly oldWidth: number,\n readonly oldHeight: number\n ) {}\n}\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\nimport {EsResizedEvent} from './es-resized-event';\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[resized]'\n})\nexport class EsResizedEventDirective implements OnInit {\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth: number;\n private oldHeight: number;\n\n constructor(private readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // tslint:disable-next-line:no-unused-expression\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\n this.onResized();\n }\n\n private onResized(): void {\n const newWidth = this.element.nativeElement.clientWidth;\n const newHeight = this.element.nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.element,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight);\n\n this.oldWidth = this.element.nativeElement.clientWidth;\n this.oldHeight = this.element.nativeElement.clientHeight;\n\n this.resized.next(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n declarations: [EsResizedEventDirective],\n imports: [\n ],\n exports: [EsResizedEventDirective]\n})\nexport class EsResizedEventModule { }\n","/*\n * Public API Surface of resized-event\n */\n\nexport * from './lib/es-resized-event';\nexport * from './lib/es-resized-event.directive';\nexport * from './lib/es-resized-event.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["EventEmitter","ResizeSensor","Directive","ElementRef","Output","NgModule"],"mappings":";;;;;;;;;;;QAGI,wBACa,OAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,QAAgB,EAChB,SAAiB;YAJjB,YAAO,GAAP,OAAO,CAAY;YACnB,aAAQ,GAAR,QAAQ,CAAQ;YAChB,cAAS,GAAT,SAAS,CAAQ;YACjB,aAAQ,GAAR,QAAQ,CAAQ;YAChB,cAAS,GAAT,SAAS,CAAQ;SAC1B;6BACP;KAAA;;;QCOG,iCAA6B,OAAmB;YAAnB,YAAO,GAAP,OAAO,CAAY;YALvC,YAAO,GAAG,IAAIA,iBAAY,EAAkB,CAAC;SAMrD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Sensor")):"function"==typeof define&&define.amd?define("@eurosat/resized-event",["exports","@angular/core","css-element-queries/src/ResizeSensor"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).eurosat=e.eurosat||{},e.eurosat["resized-event"]={}),e.ng.core,e.ResizeSensor)}(this,(function(e,t,i){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(i),r=function(e,t,i,n,s){this.element=e,this.newWidth=t,this.newHeight=i,this.oldWidth=n,this.oldHeight=s},o=function(){function e(e){this.element=e,this.resized=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;new s.default(this.element.nativeElement,(function(t){return e.onResized()})),this.onResized()},e.prototype.onResized=function(){var e=this.element.nativeElement.clientWidth,t=this.element.nativeElement.clientHeight;if(e!==this.oldWidth||t!==this.oldHeight){var i=new r(this.element,e,t,this.oldWidth,this.oldHeight);this.oldWidth=this.element.nativeElement.clientWidth,this.oldHeight=this.element.nativeElement.clientHeight,this.resized.next(i)}},e}();o.decorators=[{type:t.Directive,args:[{selector:"[resized]"}]}],o.ctorParameters=function(){return[{type:t.ElementRef}]},o.propDecorators={resized:[{type:t.Output,args:["resized"]}]};var d=function(){};d.decorators=[{type:t.NgModule,args:[{declarations:[o],imports:[],exports:[o]}]}],e.EsResizedEvent=r,e.EsResizedEventDirective=o,e.EsResizedEventModule=d,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=eurosat-resized-event.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../projects/resized-event/src/lib/es-resized-event.ts","../../../projects/resized-event/src/lib/es-resized-event.directive.ts","../../../projects/resized-event/src/lib/es-resized-event.module.ts"],"names":["element","newWidth","newHeight","oldWidth","oldHeight","this","EsResizedEventDirective","resized","EventEmitter","prototype","ngOnInit","_this","ResizeSensor","nativeElement","x","onResized","clientWidth","clientHeight","event","EsResizedEvent","next","Directive","args","selector","ElementRef","Output","NgModule","declarations","imports","exports"],"mappings":"qiBAGI,SACaA,EACAC,EACAC,EACAC,EACAC,GAJAC,KAAAL,QAAAA,EACAK,KAAAJ,SAAAA,EACAI,KAAAH,UAAAA,EACAG,KAAAF,SAAAA,EACAE,KAAAD,UAAAA,gBCSb,SAAAE,EAA6BN,GAAAK,KAAAL,QAAAA,EALpBK,KAAAE,QAAU,IAAIC,EAAAA,oBAQvBF,EAAAG,UAAAC,SAAA,WAAA,IAAAC,EAAAN,KAEI,IAAIO,EAAAA,QAAaP,KAAKL,QAAQa,eAAe,SAAAC,GAAK,OAAAH,EAAKI,eACvDV,KAAKU,aAGDT,EAAAG,UAAAM,UAAA,WACJ,IAAMd,EAAWI,KAAKL,QAAQa,cAAcG,YACtCd,EAAYG,KAAKL,QAAQa,cAAcI,aAE7C,GAAIhB,IAAaI,KAAKF,UAAYD,IAAcG,KAAKD,UAArD,CAIA,IAAMc,EAAQ,IAAIC,EACdd,KAAKL,QACLC,EACAC,EACAG,KAAKF,SACLE,KAAKD,WAETC,KAAKF,SAAWE,KAAKL,QAAQa,cAAcG,YAC3CX,KAAKD,UAAYC,KAAKL,QAAQa,cAAcI,aAE5CZ,KAAKE,QAAQa,KAAKF,8BAvCzBG,EAAAA,UAASC,KAAA,CAAC,CAEPC,SAAU,yDAPMC,EAAAA,+CAWfC,EAAAA,OAAMH,KAAA,CAAC,oBCFZ,iCANCI,EAAAA,SAAQJ,KAAA,CAAC,CACRK,aAAc,CAACrB,GACfsB,QAAS,GAETC,QAAS,CAACvB","sourcesContent":["import { ElementRef } from '@angular/core';\n\nexport class EsResizedEvent {\n constructor(\n readonly element: ElementRef,\n readonly newWidth: number,\n readonly newHeight: number,\n readonly oldWidth: number,\n readonly oldHeight: number\n ) {}\n}\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\nimport {EsResizedEvent} from './es-resized-event';\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[resized]'\n})\nexport class EsResizedEventDirective implements OnInit {\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth: number;\n private oldHeight: number;\n\n constructor(private readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // tslint:disable-next-line:no-unused-expression\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\n this.onResized();\n }\n\n private onResized(): void {\n const newWidth = this.element.nativeElement.clientWidth;\n const newHeight = this.element.nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.element,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight);\n\n this.oldWidth = this.element.nativeElement.clientWidth;\n this.oldHeight = this.element.nativeElement.clientHeight;\n\n this.resized.next(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n declarations: [EsResizedEventDirective],\n imports: [\n ],\n exports: [EsResizedEventDirective]\n})\nexport class EsResizedEventModule { }\n"]}
@@ -1,39 +0,0 @@
1
- import { Directive, ElementRef, EventEmitter, Output } from '@angular/core';
2
- import { EsResizedEvent } from './es-resized-event';
3
- import ResizeSensor from 'css-element-queries/src/ResizeSensor';
4
- export class EsResizedEventDirective {
5
- constructor(element) {
6
- this.element = element;
7
- this.resized = new EventEmitter();
8
- }
9
- ngOnInit() {
10
- // tslint:disable-next-line:no-unused-expression
11
- new ResizeSensor(this.element.nativeElement, x => this.onResized());
12
- this.onResized();
13
- }
14
- onResized() {
15
- const newWidth = this.element.nativeElement.clientWidth;
16
- const newHeight = this.element.nativeElement.clientHeight;
17
- if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
18
- return;
19
- }
20
- const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
21
- this.oldWidth = this.element.nativeElement.clientWidth;
22
- this.oldHeight = this.element.nativeElement.clientHeight;
23
- this.resized.next(event);
24
- }
25
- }
26
- EsResizedEventDirective.decorators = [
27
- { type: Directive, args: [{
28
- // tslint:disable-next-line:directive-selector
29
- selector: '[resized]'
30
- },] }
31
- ];
32
- /** @nocollapse */
33
- EsResizedEventDirective.ctorParameters = () => [
34
- { type: ElementRef }
35
- ];
36
- EsResizedEventDirective.propDecorators = {
37
- resized: [{ type: Output, args: ['resized',] }]
38
- };
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy9saWIvZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNwRixPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDbEQsT0FBTyxZQUFZLE1BQU0sc0NBQXNDLENBQUM7QUFPaEUsTUFBTSxPQUFPLHVCQUF1QjtJQVFoQyxZQUE2QixPQUFtQjtRQUFuQixZQUFPLEdBQVAsT0FBTyxDQUFZO1FBTHZDLFlBQU8sR0FBRyxJQUFJLFlBQVksRUFBa0IsQ0FBQztJQU10RCxDQUFDO0lBRUQsUUFBUTtRQUNKLGdEQUFnRDtRQUNoRCxJQUFJLFlBQVksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDO1FBQ3BFLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztJQUNyQixDQUFDO0lBRU8sU0FBUztRQUNiLE1BQU0sUUFBUSxHQUFHLElBQUksQ0FBQyxPQ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ZXdIZWlnaHQgPT09IHRoaXMub2xkSGVpZ2h0KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBldmVudCA9IG5ldyBFc1Jlc2l6ZWRFdmVudChcbiAgICAgICAgICAgIHRoaXMuZWxlbWVudCxcbiAgICAgICAgICAgIG5ld1dpZHRoLFxuICAgICAgICAgICAgbmV3SGVpZ2h0LFxuICAgICAgICAgICAgdGhpcy5vbGRXaWR0aCxcbiAgICAgICAgICAgIHRoaXMub2xkSGVpZ2h0KTtcblxuICAgICAgICB0aGlzLm9sZFdpZHRoID0gdGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuY2xpZW50V2lkdGg7XG4gICAgICAgIHRoaXMub2xkSGVpZ2h0ID0gdGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuY2xpZW50SGVpZ2h0O1xuXG4gICAgICAgIHRoaXMucmVzaXplZC5uZXh0KGV2ZW50KTtcbiAgICB9XG5cbn1cbiJdfQ==
@@ -1,12 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { EsResizedEventDirective } from './es-resized-event.directive';
3
- export class EsResizedEventModule {
4
- }
5
- EsResizedEventModule.decorators = [
6
- { type: NgModule, args: [{
7
- declarations: [EsResizedEventDirective],
8
- imports: [],
9
- exports: [EsResizedEventDirective]
10
- },] }
11
- ];
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy9saWIvZXMtcmVzaXplZC1ldmVudC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQVF2RSxNQUFNLE9BQU8sb0JBQW9COzs7WUFOaEMsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRSxDQUFDLHVCQUF1QixDQUFDO2dCQUN2QyxPQUFPLEVBQUUsRUFDUjtnQkFDRCxPQUFPLEVBQUUsQ0FBQyx1QkFBdUIsQ0FBQzthQUNuQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBFc1Jlc2l6ZWRFdmVudERpcmVjdGl2ZSB9IGZyb20gJy4vZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtFc1Jlc2l6ZWRFdmVudERpcmVjdGl2ZV0sXG4gIGltcG9ydHM6IFtcbiAgXSxcbiAgZXhwb3J0czogW0VzUmVzaXplZEV2ZW50RGlyZWN0aXZlXVxufSlcbmV4cG9ydCBjbGFzcyBFc1Jlc2l6ZWRFdmVudE1vZHVsZSB7IH1cbiJdfQ==
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"EsResizedEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":4,"character":26},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"}]}]}},"EsResizedEventDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[resized]"}]}],"members":{"resized":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":11,"character":5},"arguments":["resized"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":17,"character":42}]}],"ngOnInit":[{"__symbolic":"method"}],"onResized":[{"__symbolic":"method"}]}},"EsResizedEventModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"EsResizedEventDirective"}],"imports":[],"exports":[{"__symbolic":"reference","name":"EsResizedEventDirective"}]}]}],"members":{}}},"origins":{"EsResizedEvent":"./lib/es-resized-event","EsResizedEventDirective":"./lib/es-resized-event.directive","EsResizedEventModule":"./lib/es-resized-event.module"},"importAs":"@eurosat/resized-event"}
@@ -1,69 +0,0 @@
1
- import { EventEmitter, Directive, ElementRef, Output, NgModule } from '@angular/core';
2
- import ResizeSensor from 'css-element-queries/src/ResizeSensor';
3
-
4
- class EsResizedEvent {
5
- constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
6
- this.element = element;
7
- this.newWidth = newWidth;
8
- this.newHeight = newHeight;
9
- this.oldWidth = oldWidth;
10
- this.oldHeight = oldHeight;
11
- }
12
- }
13
-
14
- class EsResizedEventDirective {
15
- constructor(element) {
16
- this.element = element;
17
- this.resized = new EventEmitter();
18
- }
19
- ngOnInit() {
20
- // tslint:disable-next-line:no-unused-expression
21
- new ResizeSensor(this.element.nativeElement, x => this.onResized());
22
- this.onResized();
23
- }
24
- onResized() {
25
- const newWidth = this.element.nativeElement.clientWidth;
26
- const newHeight = this.element.nativeElement.clientHeight;
27
- if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
28
- return;
29
- }
30
- const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
31
- this.oldWidth = this.element.nativeElement.clientWidth;
32
- this.oldHeight = this.element.nativeElement.clientHeight;
33
- this.resized.next(event);
34
- }
35
- }
36
- EsResizedEventDirective.decorators = [
37
- { type: Directive, args: [{
38
- // tslint:disable-next-line:directive-selector
39
- selector: '[resized]'
40
- },] }
41
- ];
42
- /** @nocollapse */
43
- EsResizedEventDirective.ctorParameters = () => [
44
- { type: ElementRef }
45
- ];
46
- EsResizedEventDirective.propDecorators = {
47
- resized: [{ type: Output, args: ['resized',] }]
48
- };
49
-
50
- class EsResizedEventModule {
51
- }
52
- EsResizedEventModule.decorators = [
53
- { type: NgModule, args: [{
54
- declarations: [EsResizedEventDirective],
55
- imports: [],
56
- exports: [EsResizedEventDirective]
57
- },] }
58
- ];
59
-
60
- /*
61
- * Public API Surface of resized-event
62
- */
63
-
64
- /**
65
- * Generated bundle index. Do not edit.
66
- */
67
-
68
- export { EsResizedEvent, EsResizedEventDirective, EsResizedEventModule };
69
- //# sourceMappingURL=eurosat-resized-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eurosat-resized-event.js","sources":["../../../projects/resized-event/src/lib/es-resized-event.ts","../../../projects/resized-event/src/lib/es-resized-event.directive.ts","../../../projects/resized-event/src/lib/es-resized-event.module.ts","../../../projects/resized-event/src/public_api.ts","../../../projects/resized-event/src/eurosat-resized-event.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\nexport class EsResizedEvent {\n constructor(\n readonly element: ElementRef,\n readonly newWidth: number,\n readonly newHeight: number,\n readonly oldWidth: number,\n readonly oldHeight: number\n ) {}\n}\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\nimport {EsResizedEvent} from './es-resized-event';\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[resized]'\n})\nexport class EsResizedEventDirective implements OnInit {\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth: number;\n private oldHeight: number;\n\n constructor(private readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // tslint:disable-next-line:no-unused-expression\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\n this.onResized();\n }\n\n private onResized(): void {\n const newWidth = this.element.nativeElement.clientWidth;\n const newHeight = this.element.nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.element,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight);\n\n this.oldWidth = this.element.nativeElement.clientWidth;\n this.oldHeight = this.element.nativeElement.clientHeight;\n\n this.resized.next(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n declarations: [EsResizedEventDirective],\n imports: [\n ],\n exports: [EsResizedEventDirective]\n})\nexport class EsResizedEventModule { }\n","/*\n * Public API Surface of resized-event\n */\n\nexport * from './lib/es-resized-event';\nexport * from './lib/es-resized-event.directive';\nexport * from './lib/es-resized-event.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAEa,cAAc;IACvB,YACa,OAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,QAAgB,EAChB,SAAiB;QAJjB,YAAO,GAAP,OAAO,CAAY;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,cAAS,GAAT,SAAS,CAAQ;KAC1B;;;MCAK,uBAAuB;IAQhC,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QALvC,YAAO,GAAG,IAAI,YAAY,EAAkB,CAAC;KAMrD;IAED,QAAQ;;QAEJ,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC,SAAS,EAAE,CAAC;KACpB;IAEO,SAAS;QACb,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC;QACxD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;Q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