@eurosat/resized-event 10.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.
- package/esm2020/eurosat-resized-event.mjs +5 -0
- package/esm2020/lib/es-resized-event.directive.mjs +39 -0
- package/esm2020/lib/es-resized-event.mjs +10 -0
- package/esm2020/lib/es-resized-event.module.mjs +17 -0
- package/esm2020/public_api.mjs +7 -0
- package/fesm2015/eurosat-resized-event.mjs +73 -0
- package/fesm2015/eurosat-resized-event.mjs.map +1 -0
- package/fesm2020/eurosat-resized-event.mjs +73 -0
- package/fesm2020/eurosat-resized-event.mjs.map +1 -0
- package/{eurosat-resized-event.d.ts → index.d.ts} +5 -4
- package/lib/es-resized-event.d.ts +9 -9
- package/lib/es-resized-event.directive.d.ts +14 -11
- package/lib/es-resized-event.module.d.ts +7 -2
- package/package.json +24 -12
- package/public_api.d.ts +3 -3
- package/bundles/eurosat-resized-event.umd.js +0 -164
- package/bundles/eurosat-resized-event.umd.js.map +0 -1
- package/bundles/eurosat-resized-event.umd.min.js +0 -2
- package/bundles/eurosat-resized-event.umd.min.js.map +0 -1
- package/esm2015/eurosat-resized-event.js +0 -10
- package/esm2015/lib/es-resized-event.directive.js +0 -80
- package/esm2015/lib/es-resized-event.js +0 -34
- package/esm2015/lib/es-resized-event.module.js +0 -17
- package/esm2015/public_api.js +0 -12
- package/eurosat-resized-event.metadata.json +0 -1
- package/fesm2015/eurosat-resized-event.js +0 -143
- package/fesm2015/eurosat-resized-event.js.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVyb3NhdC1yZXNpemVkLWV2ZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvcmVzaXplZC1ldmVudC9zcmMvZXVyb3NhdC1yZXNpemVkLWV2ZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy9saWIvZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNwRixPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDbEQsT0FBTyxZQUFZLE1BQU0sc0NBQXNDLENBQUM7O0FBT2hFLE1BQU0sT0FBTyx1QkFBdUI7SUFRaEMsWUFBNkIsT0FBbUI7UUFBbkIsWUFBTyxHQUFQLE9BQU8sQ0FBWTtRQUx2QyxZQUFPLEdBQ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50Lm5hdGl2ZUVsZW1lbnQsIHggPT4gdGhpcy5vblJlc2l6ZWQoKSk7XG4gICAgICAgIHRoaXMub25SZXNpemVkKCk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBvblJlc2l6ZWQoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IG5ld1dpZHRoID0gdGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuY2xpZW50V2lkdGg7XG4gICAgICAgIGNvbnN0IG5ld0hlaWdodCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudEhlaWdodDtcblxuICAgICAgICBpZiAobmV3V2lkdGggPT09IHRoaXMub2xkV2lkdGggJiYgbmV3SGVpZ2h0ID09PSB0aGlzLm9sZEhlaWdodCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXNSZXNpemVkRXZlbnQoXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnQsXG4gICAgICAgICAgICBuZXdXaWR0aCxcbiAgICAgICAgICAgIG5ld0hlaWdodCxcbiAgICAgICAgICAgIHRoaXMub2xkV2lkdGgsXG4gICAgICAgICAgICB0aGlzLm9sZEhlaWdodCk7XG5cbiAgICAgICAgdGhpcy5vbGRXaWR0aCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudFdpZHRoO1xuICAgICAgICB0aGlzLm9sZEhlaWdodCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudEhlaWdodDtcblxuICAgICAgICB0aGlzLnJlc2l6ZWQubmV4dChldmVudCk7XG4gICAgfVxuXG59XG4iXX0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class EsResizedEvent {
|
|
2
|
+
constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
|
|
3
|
+
this.element = element;
|
|
4
|
+
this.newWidth = newWidth;
|
|
5
|
+
this.newHeight = newHeight;
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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
|
+
exports: [EsResizedEventDirective]
|
|
15
|
+
}]
|
|
16
|
+
}] });
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy9saWIvZXMtcmVzaXplZC1ldmVudC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQzs7QUFRdkUsTUFBTSxPQUFPLG9CQUFvQjs7b0lBQXBCLG9CQUFvQjtxSUFBcEIsb0JBQW9CLGlCQUxoQix1QkFBdUIsYUFHNUIsdUJBQXVCO3FJQUV0QixvQkFBb0I7MkZBQXBCLG9CQUFvQjtrQkFOaEMsUUFBUTttQkFBQztvQkFDUixZQUFZLEVBQUUsQ0FBQyx1QkFBdUIsQ0FBQztvQkFDdkMsT0FBTyxFQUFFLEVBQ1I7b0JBQ0QsT0FBTyxFQUFFLENBQUMsdUJBQXVCLENBQUM7aUJBQ25DIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEVzUmVzaXplZEV2ZW50RGlyZWN0aXZlIH0gZnJvbSAnLi9lcy1yZXNpemVkLWV2ZW50LmRpcmVjdGl2ZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW0VzUmVzaXplZEV2ZW50RGlyZWN0aXZlXSxcbiAgaW1wb3J0czogW1xuICBdLFxuICBleHBvcnRzOiBbRXNSZXNpemVkRXZlbnREaXJlY3RpdmVdXG59KVxuZXhwb3J0IGNsYXNzIEVzUmVzaXplZEV2ZW50TW9kdWxlIHsgfVxuIl19
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of resized-event
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/es-resized-event';
|
|
5
|
+
export * from './lib/es-resized-event.directive';
|
|
6
|
+
export * from './lib/es-resized-event.module';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3Jlc2l6ZWQtZXZlbnQvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgcmVzaXplZC1ldmVudFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2VzLXJlc2l6ZWQtZXZlbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZXMtcmVzaXplZC1ldmVudC5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZXMtcmVzaXplZC1ldmVudC5tb2R1bGUnO1xuIl19
|
|
@@ -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;AAChB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;AACjB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;AAChB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;KAC1B;AACP;;MCDY,uBAAuB,CAAA;AAQhC,IAAA,WAAA,CAA6B,OAAmB,EAAA;AAAnB,QAA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BAAuB,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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AAA,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;AACxB,iBAAA,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;AACnC,iBAAA,CAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@eurosat/resized-event" />
|
|
5
|
+
export * from './public_api';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
export declare class EsResizedEvent {
|
|
3
|
-
readonly element: ElementRef;
|
|
4
|
-
readonly newWidth: number;
|
|
5
|
-
readonly newHeight: number;
|
|
6
|
-
readonly oldWidth: number;
|
|
7
|
-
readonly oldHeight: number;
|
|
8
|
-
constructor(element: ElementRef, newWidth: number, newHeight: number, oldWidth: number, oldHeight: number);
|
|
9
|
-
}
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
export declare class EsResizedEvent {
|
|
3
|
+
readonly element: ElementRef;
|
|
4
|
+
readonly newWidth: number;
|
|
5
|
+
readonly newHeight: number;
|
|
6
|
+
readonly oldWidth: number;
|
|
7
|
+
readonly oldHeight: number;
|
|
8
|
+
constructor(element: ElementRef, newWidth: number, newHeight: number, oldWidth: number, oldHeight: number);
|
|
9
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { EsResizedEvent } from './es-resized-event';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly
|
|
6
|
-
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { EsResizedEvent } from './es-resized-event';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EsResizedEventDirective implements OnInit {
|
|
5
|
+
private readonly element;
|
|
6
|
+
readonly resized: EventEmitter<EsResizedEvent>;
|
|
7
|
+
private oldWidth;
|
|
8
|
+
private oldHeight;
|
|
9
|
+
constructor(element: ElementRef);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
private onResized;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsResizedEventDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EsResizedEventDirective, "[resized]", never, {}, { "resized": "resized"; }, never, never, false>;
|
|
14
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./es-resized-event.directive";
|
|
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>;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eurosat/resized-event",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
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.
|
|
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
|
+
}
|
package/public_api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './lib/es-resized-event';
|
|
2
|
-
export * from './lib/es-resized-event.directive';
|
|
3
|
-
export * from './lib/es-resized-event.module';
|
|
1
|
+
export * from './lib/es-resized-event';
|
|
2
|
+
export * from './lib/es-resized-event.directive';
|
|
3
|
+
export * from './lib/es-resized-event.module';
|
|
@@ -1,164 +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
|
-
/**
|
|
12
|
-
* @fileoverview added by tsickle
|
|
13
|
-
* Generated from: lib/es-resized-event.ts
|
|
14
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
15
|
-
*/
|
|
16
|
-
var EsResizedEvent = /** @class */ (function () {
|
|
17
|
-
/**
|
|
18
|
-
* @param {?} element
|
|
19
|
-
* @param {?} newWidth
|
|
20
|
-
* @param {?} newHeight
|
|
21
|
-
* @param {?} oldWidth
|
|
22
|
-
* @param {?} oldHeight
|
|
23
|
-
*/
|
|
24
|
-
function EsResizedEvent(element, newWidth, newHeight, oldWidth, oldHeight) {
|
|
25
|
-
this.element = element;
|
|
26
|
-
this.newWidth = newWidth;
|
|
27
|
-
this.newHeight = newHeight;
|
|
28
|
-
this.oldWidth = oldWidth;
|
|
29
|
-
this.oldHeight = oldHeight;
|
|
30
|
-
}
|
|
31
|
-
return EsResizedEvent;
|
|
32
|
-
}());
|
|
33
|
-
if (false) {
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
EsResizedEvent.prototype.element;
|
|
36
|
-
/** @type {?} */
|
|
37
|
-
EsResizedEvent.prototype.newWidth;
|
|
38
|
-
/** @type {?} */
|
|
39
|
-
EsResizedEvent.prototype.newHeight;
|
|
40
|
-
/** @type {?} */
|
|
41
|
-
EsResizedEvent.prototype.oldWidth;
|
|
42
|
-
/** @type {?} */
|
|
43
|
-
EsResizedEvent.prototype.oldHeight;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @fileoverview added by tsickle
|
|
48
|
-
* Generated from: lib/es-resized-event.directive.ts
|
|
49
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
50
|
-
*/
|
|
51
|
-
var EsResizedEventDirective = /** @class */ (function () {
|
|
52
|
-
/**
|
|
53
|
-
* @param {?} element
|
|
54
|
-
*/
|
|
55
|
-
function EsResizedEventDirective(element) {
|
|
56
|
-
this.element = element;
|
|
57
|
-
this.resized = new core.EventEmitter();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* @return {?}
|
|
61
|
-
*/
|
|
62
|
-
EsResizedEventDirective.prototype.ngOnInit = function () {
|
|
63
|
-
var _this = this;
|
|
64
|
-
// tslint:disable-next-line:no-unused-expression
|
|
65
|
-
new ResizeSensor__default['default'](this.element.nativeElement, ( /**
|
|
66
|
-
* @param {?} x
|
|
67
|
-
* @return {?}
|
|
68
|
-
*/function (/**
|
|
69
|
-
* @param {?} x
|
|
70
|
-
* @return {?}
|
|
71
|
-
*/ x) { return _this.onResized(); }));
|
|
72
|
-
this.onResized();
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* @private
|
|
76
|
-
* @return {?}
|
|
77
|
-
*/
|
|
78
|
-
EsResizedEventDirective.prototype.onResized = function () {
|
|
79
|
-
/** @type {?} */
|
|
80
|
-
var newWidth = this.element.nativeElement.clientWidth;
|
|
81
|
-
/** @type {?} */
|
|
82
|
-
var newHeight = this.element.nativeElement.clientHeight;
|
|
83
|
-
if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
/** @type {?} */
|
|
87
|
-
var event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
|
|
88
|
-
this.oldWidth = this.element.nativeElement.clientWidth;
|
|
89
|
-
this.oldHeight = this.element.nativeElement.clientHeight;
|
|
90
|
-
this.resized.next(event);
|
|
91
|
-
};
|
|
92
|
-
return EsResizedEventDirective;
|
|
93
|
-
}());
|
|
94
|
-
EsResizedEventDirective.decorators = [
|
|
95
|
-
{ type: core.Directive, args: [{
|
|
96
|
-
// tslint:disable-next-line:directive-selector
|
|
97
|
-
selector: '[resized]'
|
|
98
|
-
},] }
|
|
99
|
-
];
|
|
100
|
-
/** @nocollapse */
|
|
101
|
-
EsResizedEventDirective.ctorParameters = function () { return [
|
|
102
|
-
{ type: core.ElementRef }
|
|
103
|
-
]; };
|
|
104
|
-
EsResizedEventDirective.propDecorators = {
|
|
105
|
-
resized: [{ type: core.Output, args: ['resized',] }]
|
|
106
|
-
};
|
|
107
|
-
if (false) {
|
|
108
|
-
/** @type {?} */
|
|
109
|
-
EsResizedEventDirective.prototype.resized;
|
|
110
|
-
/**
|
|
111
|
-
* @type {?}
|
|
112
|
-
* @private
|
|
113
|
-
*/
|
|
114
|
-
EsResizedEventDirective.prototype.oldWidth;
|
|
115
|
-
/**
|
|
116
|
-
* @type {?}
|
|
117
|
-
* @private
|
|
118
|
-
*/
|
|
119
|
-
EsResizedEventDirective.prototype.oldHeight;
|
|
120
|
-
/**
|
|
121
|
-
* @type {?}
|
|
122
|
-
* @private
|
|
123
|
-
*/
|
|
124
|
-
EsResizedEventDirective.prototype.element;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @fileoverview added by tsickle
|
|
129
|
-
* Generated from: lib/es-resized-event.module.ts
|
|
130
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
131
|
-
*/
|
|
132
|
-
var EsResizedEventModule = /** @class */ (function () {
|
|
133
|
-
function EsResizedEventModule() {
|
|
134
|
-
}
|
|
135
|
-
return EsResizedEventModule;
|
|
136
|
-
}());
|
|
137
|
-
EsResizedEventModule.decorators = [
|
|
138
|
-
{ type: core.NgModule, args: [{
|
|
139
|
-
declarations: [EsResizedEventDirective],
|
|
140
|
-
imports: [],
|
|
141
|
-
exports: [EsResizedEventDirective]
|
|
142
|
-
},] }
|
|
143
|
-
];
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @fileoverview added by tsickle
|
|
147
|
-
* Generated from: public_api.ts
|
|
148
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @fileoverview added by tsickle
|
|
153
|
-
* Generated from: eurosat-resized-event.ts
|
|
154
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
exports.EsResizedEvent = EsResizedEvent;
|
|
158
|
-
exports.EsResizedEventDirective = EsResizedEventDirective;
|
|
159
|
-
exports.EsResizedEventModule = EsResizedEventModule;
|
|
160
|
-
|
|
161
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
162
|
-
|
|
163
|
-
})));
|
|
164
|
-
//# 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"],"sourcesContent":["import { ElementRef } from '@angular/core';\r\n\r\nexport class EsResizedEvent {\r\n constructor(\r\n readonly element: ElementRef,\r\n readonly newWidth: number,\r\n readonly newHeight: number,\r\n readonly oldWidth: number,\r\n readonly oldHeight: number\r\n ) {}\r\n}\r\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\r\nimport {EsResizedEvent} from './es-resized-event';\r\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\r\n\r\n\r\n@Directive({\r\n // tslint:disable-next-line:directive-selector\r\n selector: '[resized]'\r\n})\r\nexport class EsResizedEventDirective implements OnInit {\r\n\r\n @Output('resized')\r\n readonly resized = new EventEmitter<EsResizedEvent>();\r\n\r\n private oldWidth: number;\r\n private oldHeight: number;\r\n\r\n constructor(private readonly element: ElementRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n // tslint:disable-next-line:no-unused-expression\r\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\r\n this.onResized();\r\n }\r\n\r\n private onResized(): void {\r\n const newWidth = this.element.nativeElement.clientWidth;\r\n const newHeight = this.element.nativeElement.clientHeight;\r\n\r\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\r\n return;\r\n }\r\n\r\n const event = new EsResizedEvent(\r\n this.element,\r\n newWidth,\r\n newHeight,\r\n this.oldWidth,\r\n this.oldHeight);\r\n\r\n this.oldWidth = this.element.nativeElement.clientWidth;\r\n this.oldHeight = this.element.nativeElement.clientHeight;\r\n\r\n this.resized.next(event);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { EsResizedEventDirective } from './es-resized-event.directive';\r\n\r\n@NgModule({\r\n declarations: [EsResizedEventDirective],\r\n imports: [\r\n ],\r\n exports: [EsResizedEventDirective]\r\n})\r\nexport class EsResizedEventModule { }\r\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,IAAA;;;QANO,iCAA4B;;QAC5B,kCAAyB;;QACzB,mCAA0B;;QAC1B,kCAAyB;;QACzB,mCAA0B;;;;;;;;;;;;QCS9B,iCAA6B,OAAmB;YAAnB,YAAO,GAAP,OAAO,CAAY;YALvC,YAAO,GAAG,IAAIA,iBAAY,EAAkB,CAAC;SAMrD;;;;QAED,0CAAQ,GAAR;YAAA,iBAIC;;YAFG,IAAIC,gCAAY,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa;;;eAAE;;;gBAAA,CAAC,IAAI,OAAA,KAAI,CAAC,SAAS,EAAE,GAAA,EAAC,CAAC;YACpE,IAAI,CAAC,SAAS,EAAE,CAAC;SACpB;;;;;QAEO,2CAAS,GAAT;;gBACE,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW;;gBACjD,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY;YAEzD,IAAI,QAAQ,KAAK,IAAI,CAAC,QAAQ,IAAI,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE;gBAC5D,OAAO;aACV;;gBAEK,KAAK,GAAG,IAAI,cAAc,CAC5B,IAAI,CAAC,OAAO,EACZ,QAAQ,EACR,SAAS,EACT,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAS,CAAC;YAEnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC;YACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;YAEzD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC5B;;;;gBAxCJC,cAAS,SAAC;;oBAEP,QAAQ,EAAE,WAAW;iBACxB;;;;gBARmBC,eAAU;;;0BAWzBC,WAAM,SAAC,SAAS;;;;QAAjB,0CACsD;;;;;QAEtD,2CAAyB;;;;;QACzB,4CAA0B;;;;;QAEd,0CAAoC;;;;;;;;;QCRpD;;;;;gBANCC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("css-element-queries/src/ResizeSensor")):"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};var 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,oBCSb,SAAAE,EAA6BN,GAAAK,KAAAL,QAAAA,EALpBK,KAAAE,QAAU,IAAIC,EAAAA,oBAQvBF,EAAAG,UAAAC,SAAA,WAAA,IAAAC,EAAAN,KAEI,IAAIO,EAAAA,QAAaP,KAAKL,QAAQa,eAAa,SAAEC,GAAK,OAAAH,EAAKI,eACvDV,KAAKU,aAGDT,EAAAG,UAAAM,UAAA,eACEd,EAAWI,KAAKL,QAAQa,cAAcG,YACtCd,EAAYG,KAAKL,QAAQa,cAAcI,aAE7C,GAAIhB,IAAaI,KAAKF,UAAYD,IAAcG,KAAKD,UAArD,KAIMc,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';\r\n\r\nexport class EsResizedEvent {\r\n constructor(\r\n readonly element: ElementRef,\r\n readonly newWidth: number,\r\n readonly newHeight: number,\r\n readonly oldWidth: number,\r\n readonly oldHeight: number\r\n ) {}\r\n}\r\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\r\nimport {EsResizedEvent} from './es-resized-event';\r\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\r\n\r\n\r\n@Directive({\r\n // tslint:disable-next-line:directive-selector\r\n selector: '[resized]'\r\n})\r\nexport class EsResizedEventDirective implements OnInit {\r\n\r\n @Output('resized')\r\n readonly resized = new EventEmitter<EsResizedEvent>();\r\n\r\n private oldWidth: number;\r\n private oldHeight: number;\r\n\r\n constructor(private readonly element: ElementRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n // tslint:disable-next-line:no-unused-expression\r\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\r\n this.onResized();\r\n }\r\n\r\n private onResized(): void {\r\n const newWidth = this.element.nativeElement.clientWidth;\r\n const newHeight = this.element.nativeElement.clientHeight;\r\n\r\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\r\n return;\r\n }\r\n\r\n const event = new EsResizedEvent(\r\n this.element,\r\n newWidth,\r\n newHeight,\r\n this.oldWidth,\r\n this.oldHeight);\r\n\r\n this.oldWidth = this.element.nativeElement.clientWidth;\r\n this.oldHeight = this.element.nativeElement.clientHeight;\r\n\r\n this.resized.next(event);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { EsResizedEventDirective } from './es-resized-event.directive';\r\n\r\n@NgModule({\r\n declarations: [EsResizedEventDirective],\r\n imports: [\r\n ],\r\n exports: [EsResizedEventDirective]\r\n})\r\nexport class EsResizedEventModule { }\r\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: eurosat-resized-event.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Generated bundle index. Do not edit.
|
|
8
|
-
*/
|
|
9
|
-
export { EsResizedEvent, EsResizedEventDirective, EsResizedEventModule } from './public_api';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVyb3NhdC1yZXNpemVkLWV2ZW50LmpzIiwic291cmNlUm9vdCI6IkM6L1VzZXJzL01pY2hhbC9FdXJvc2F0L25pbC9wcm9qZWN0cy9yZXNpemVkLWV2ZW50L3NyYy8iLCJzb3VyY2VzIjpbImV1cm9zYXQtcmVzaXplZC1ldmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUlBLDhFQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: lib/es-resized-event.directive.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
import { Directive, ElementRef, EventEmitter, Output } from '@angular/core';
|
|
7
|
-
import { EsResizedEvent } from './es-resized-event';
|
|
8
|
-
import ResizeSensor from 'css-element-queries/src/ResizeSensor';
|
|
9
|
-
export class EsResizedEventDirective {
|
|
10
|
-
/**
|
|
11
|
-
* @param {?} element
|
|
12
|
-
*/
|
|
13
|
-
constructor(element) {
|
|
14
|
-
this.element = element;
|
|
15
|
-
this.resized = new EventEmitter();
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @return {?}
|
|
19
|
-
*/
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
// tslint:disable-next-line:no-unused-expression
|
|
22
|
-
new ResizeSensor(this.element.nativeElement, (/**
|
|
23
|
-
* @param {?} x
|
|
24
|
-
* @return {?}
|
|
25
|
-
*/
|
|
26
|
-
x => this.onResized()));
|
|
27
|
-
this.onResized();
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @private
|
|
31
|
-
* @return {?}
|
|
32
|
-
*/
|
|
33
|
-
onResized() {
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
const newWidth = this.element.nativeElement.clientWidth;
|
|
36
|
-
/** @type {?} */
|
|
37
|
-
const newHeight = this.element.nativeElement.clientHeight;
|
|
38
|
-
if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
/** @type {?} */
|
|
42
|
-
const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
|
|
43
|
-
this.oldWidth = this.element.nativeElement.clientWidth;
|
|
44
|
-
this.oldHeight = this.element.nativeElement.clientHeight;
|
|
45
|
-
this.resized.next(event);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
EsResizedEventDirective.decorators = [
|
|
49
|
-
{ type: Directive, args: [{
|
|
50
|
-
// tslint:disable-next-line:directive-selector
|
|
51
|
-
selector: '[resized]'
|
|
52
|
-
},] }
|
|
53
|
-
];
|
|
54
|
-
/** @nocollapse */
|
|
55
|
-
EsResizedEventDirective.ctorParameters = () => [
|
|
56
|
-
{ type: ElementRef }
|
|
57
|
-
];
|
|
58
|
-
EsResizedEventDirective.propDecorators = {
|
|
59
|
-
resized: [{ type: Output, args: ['resized',] }]
|
|
60
|
-
};
|
|
61
|
-
if (false) {
|
|
62
|
-
/** @type {?} */
|
|
63
|
-
EsResizedEventDirective.prototype.resized;
|
|
64
|
-
/**
|
|
65
|
-
* @type {?}
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
EsResizedEventDirective.prototype.oldWidth;
|
|
69
|
-
/**
|
|
70
|
-
* @type {?}
|
|
71
|
-
* @private
|
|
72
|
-
*/
|
|
73
|
-
EsResizedEventDirective.prototype.oldHeight;
|
|
74
|
-
/**
|
|
75
|
-
* @type {?}
|
|
76
|
-
* @private
|
|
77
|
-
*/
|
|
78
|
-
EsResizedEventDirective.prototype.element;
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=data: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h0KSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEVzUmVzaXplZEV2ZW50KFxyXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnQsXHJcbiAgICAgICAgICAgIG5ld1dpZHRoLFxyXG4gICAgICAgICAgICBuZXdIZWlnaHQsXHJcbiAgICAgICAgICAgIHRoaXMub2xkV2lkdGgsXHJcbiAgICAgICAgICAgIHRoaXMub2xkSGVpZ2h0KTtcclxuXHJcbiAgICAgICAgdGhpcy5vbGRXaWR0aCA9IHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LmNsaWVudFdpZHRoO1xyXG4gICAgICAgIHRoaXMub2xkSGVpZ2h0ID0gdGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQuY2xpZW50SGVpZ2h0O1xyXG5cclxuICAgICAgICB0aGlzLnJlc2l6ZWQubmV4dChldmVudCk7XHJcbiAgICB9XHJcblxyXG59XHJcbiJdfQ==
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: lib/es-resized-event.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
export class EsResizedEvent {
|
|
7
|
-
/**
|
|
8
|
-
* @param {?} element
|
|
9
|
-
* @param {?} newWidth
|
|
10
|
-
* @param {?} newHeight
|
|
11
|
-
* @param {?} oldWidth
|
|
12
|
-
* @param {?} oldHeight
|
|
13
|
-
*/
|
|
14
|
-
constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
|
|
15
|
-
this.element = element;
|
|
16
|
-
this.newWidth = newWidth;
|
|
17
|
-
this.newHeight = newHeight;
|
|
18
|
-
this.oldWidth = oldWidth;
|
|
19
|
-
this.oldHeight = oldHeight;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (false) {
|
|
23
|
-
/** @type {?} */
|
|
24
|
-
EsResizedEvent.prototype.element;
|
|
25
|
-
/** @type {?} */
|
|
26
|
-
EsResizedEvent.prototype.newWidth;
|
|
27
|
-
/** @type {?} */
|
|
28
|
-
EsResizedEvent.prototype.newHeight;
|
|
29
|
-
/** @type {?} */
|
|
30
|
-
EsResizedEvent.prototype.oldWidth;
|
|
31
|
-
/** @type {?} */
|
|
32
|
-
EsResizedEvent.prototype.oldHeight;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy9NaWNoYWwvRXVyb3NhdC9uaWwvcHJvamVjdHMvcmVzaXplZC1ldmVudC9zcmMvIiwic291cmNlcyI6WyJsaWIvZXMtcmVzaXplZC1ldmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLE1BQU0sT0FBTyxjQUFjOzs7Ozs7OztJQUN2QixZQUNhLE9BQW1CLEVBQ25CLFFBQWdCLEVBQ2hCLFNBQWlCLEVBQ2pCLFFBQWdCLEVBQ2hCLFNBQWlCO1FBSmpCLFlBQU8sR0FBUCxPQUFPLENBQVk7UUFDbkIsYUFBUSxHQUFSLFFBQVEsQ0FBUTtRQUNoQixjQUFTLEdBQVQsU0FBUyxDQUFRO1FBQ2pCLGFBQVEsR0FBUixRQUFRLENBQVE7UUFDaEIsY0FBUyxHQUFULFNBQVMsQ0FBUTtJQUMzQixDQUFDO0NBQ1A7OztJQU5PLGlDQUE0Qjs7SUFDNUIsa0NBQXlCOztJQUN6QixtQ0FBMEI7O0lBQzFCLGtDQUF5Qjs7SUFDekIsbUNBQTBCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRWxlbWVudFJlZiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuZXhwb3J0IGNsYXNzIEVzUmVzaXplZEV2ZW50IHtcclxuICAgIGNvbnN0cnVjdG9yKFxyXG4gICAgICAgIHJlYWRvbmx5IGVsZW1lbnQ6IEVsZW1lbnRSZWYsXHJcbiAgICAgICAgcmVhZG9ubHkgbmV3V2lkdGg6IG51bWJlcixcclxuICAgICAgICByZWFkb25seSBuZXdIZWlnaHQ6IG51bWJlcixcclxuICAgICAgICByZWFkb25seSBvbGRXaWR0aDogbnVtYmVyLFxyXG4gICAgICAgIHJlYWRvbmx5IG9sZEhlaWdodDogbnVtYmVyXHJcbiAgICApIHt9XHJcbn1cclxuIl19
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: lib/es-resized-event.module.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { EsResizedEventDirective } from './es-resized-event.directive';
|
|
8
|
-
export class EsResizedEventModule {
|
|
9
|
-
}
|
|
10
|
-
EsResizedEventModule.decorators = [
|
|
11
|
-
{ type: NgModule, args: [{
|
|
12
|
-
declarations: [EsResizedEventDirective],
|
|
13
|
-
imports: [],
|
|
14
|
-
exports: [EsResizedEventDirective]
|
|
15
|
-
},] }
|
|
16
|
-
];
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMtcmVzaXplZC1ldmVudC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiQzovVXNlcnMvTWljaGFsL0V1cm9zYXQvbmlsL3Byb2plY3RzL3Jlc2l6ZWQtZXZlbnQvc3JjLyIsInNvdXJjZXMiOlsibGliL2VzLXJlc2l6ZWQtZXZlbnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQVF2RSxNQUFNLE9BQU8sb0JBQW9COzs7WUFOaEMsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRSxDQUFDLHVCQUF1QixDQUFDO2dCQUN2QyxPQUFPLEVBQUUsRUFDUjtnQkFDRCxPQUFPLEVBQUUsQ0FBQyx1QkFBdUIsQ0FBQzthQUNuQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IEVzUmVzaXplZEV2ZW50RGlyZWN0aXZlIH0gZnJvbSAnLi9lcy1yZXNpemVkLWV2ZW50LmRpcmVjdGl2ZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGRlY2xhcmF0aW9uczogW0VzUmVzaXplZEV2ZW50RGlyZWN0aXZlXSxcclxuICBpbXBvcnRzOiBbXHJcbiAgXSxcclxuICBleHBvcnRzOiBbRXNSZXNpemVkRXZlbnREaXJlY3RpdmVdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBFc1Jlc2l6ZWRFdmVudE1vZHVsZSB7IH1cclxuIl19
|
package/esm2015/public_api.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: public_api.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
/*
|
|
7
|
-
* Public API Surface of resized-event
|
|
8
|
-
*/
|
|
9
|
-
export { EsResizedEvent } from './lib/es-resized-event';
|
|
10
|
-
export { EsResizedEventDirective } from './lib/es-resized-event.directive';
|
|
11
|
-
export { EsResizedEventModule } from './lib/es-resized-event.module';
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy9NaWNoYWwvRXVyb3NhdC9uaWwvcHJvamVjdHMvcmVzaXplZC1ldmVudC9zcmMvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBSUEsK0JBQWMsd0JBQXdCLENBQUM7QUFDdkMsd0NBQWMsa0NBQWtDLENBQUM7QUFDakQscUNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgcmVzaXplZC1ldmVudFxyXG4gKi9cclxuXHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2VzLXJlc2l6ZWQtZXZlbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9lcy1yZXNpemVkLWV2ZW50LmRpcmVjdGl2ZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2VzLXJlc2l6ZWQtZXZlbnQubW9kdWxlJztcclxuIl19
|
|
@@ -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,143 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Directive, ElementRef, Output, NgModule } from '@angular/core';
|
|
2
|
-
import ResizeSensor from 'css-element-queries/src/ResizeSensor';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview added by tsickle
|
|
6
|
-
* Generated from: lib/es-resized-event.ts
|
|
7
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8
|
-
*/
|
|
9
|
-
class EsResizedEvent {
|
|
10
|
-
/**
|
|
11
|
-
* @param {?} element
|
|
12
|
-
* @param {?} newWidth
|
|
13
|
-
* @param {?} newHeight
|
|
14
|
-
* @param {?} oldWidth
|
|
15
|
-
* @param {?} oldHeight
|
|
16
|
-
*/
|
|
17
|
-
constructor(element, newWidth, newHeight, oldWidth, oldHeight) {
|
|
18
|
-
this.element = element;
|
|
19
|
-
this.newWidth = newWidth;
|
|
20
|
-
this.newHeight = newHeight;
|
|
21
|
-
this.oldWidth = oldWidth;
|
|
22
|
-
this.oldHeight = oldHeight;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (false) {
|
|
26
|
-
/** @type {?} */
|
|
27
|
-
EsResizedEvent.prototype.element;
|
|
28
|
-
/** @type {?} */
|
|
29
|
-
EsResizedEvent.prototype.newWidth;
|
|
30
|
-
/** @type {?} */
|
|
31
|
-
EsResizedEvent.prototype.newHeight;
|
|
32
|
-
/** @type {?} */
|
|
33
|
-
EsResizedEvent.prototype.oldWidth;
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
EsResizedEvent.prototype.oldHeight;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @fileoverview added by tsickle
|
|
40
|
-
* Generated from: lib/es-resized-event.directive.ts
|
|
41
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
42
|
-
*/
|
|
43
|
-
class EsResizedEventDirective {
|
|
44
|
-
/**
|
|
45
|
-
* @param {?} element
|
|
46
|
-
*/
|
|
47
|
-
constructor(element) {
|
|
48
|
-
this.element = element;
|
|
49
|
-
this.resized = new EventEmitter();
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @return {?}
|
|
53
|
-
*/
|
|
54
|
-
ngOnInit() {
|
|
55
|
-
// tslint:disable-next-line:no-unused-expression
|
|
56
|
-
new ResizeSensor(this.element.nativeElement, (/**
|
|
57
|
-
* @param {?} x
|
|
58
|
-
* @return {?}
|
|
59
|
-
*/
|
|
60
|
-
x => this.onResized()));
|
|
61
|
-
this.onResized();
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @private
|
|
65
|
-
* @return {?}
|
|
66
|
-
*/
|
|
67
|
-
onResized() {
|
|
68
|
-
/** @type {?} */
|
|
69
|
-
const newWidth = this.element.nativeElement.clientWidth;
|
|
70
|
-
/** @type {?} */
|
|
71
|
-
const newHeight = this.element.nativeElement.clientHeight;
|
|
72
|
-
if (newWidth === this.oldWidth && newHeight === this.oldHeight) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
/** @type {?} */
|
|
76
|
-
const event = new EsResizedEvent(this.element, newWidth, newHeight, this.oldWidth, this.oldHeight);
|
|
77
|
-
this.oldWidth = this.element.nativeElement.clientWidth;
|
|
78
|
-
this.oldHeight = this.element.nativeElement.clientHeight;
|
|
79
|
-
this.resized.next(event);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
EsResizedEventDirective.decorators = [
|
|
83
|
-
{ type: Directive, args: [{
|
|
84
|
-
// tslint:disable-next-line:directive-selector
|
|
85
|
-
selector: '[resized]'
|
|
86
|
-
},] }
|
|
87
|
-
];
|
|
88
|
-
/** @nocollapse */
|
|
89
|
-
EsResizedEventDirective.ctorParameters = () => [
|
|
90
|
-
{ type: ElementRef }
|
|
91
|
-
];
|
|
92
|
-
EsResizedEventDirective.propDecorators = {
|
|
93
|
-
resized: [{ type: Output, args: ['resized',] }]
|
|
94
|
-
};
|
|
95
|
-
if (false) {
|
|
96
|
-
/** @type {?} */
|
|
97
|
-
EsResizedEventDirective.prototype.resized;
|
|
98
|
-
/**
|
|
99
|
-
* @type {?}
|
|
100
|
-
* @private
|
|
101
|
-
*/
|
|
102
|
-
EsResizedEventDirective.prototype.oldWidth;
|
|
103
|
-
/**
|
|
104
|
-
* @type {?}
|
|
105
|
-
* @private
|
|
106
|
-
*/
|
|
107
|
-
EsResizedEventDirective.prototype.oldHeight;
|
|
108
|
-
/**
|
|
109
|
-
* @type {?}
|
|
110
|
-
* @private
|
|
111
|
-
*/
|
|
112
|
-
EsResizedEventDirective.prototype.element;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @fileoverview added by tsickle
|
|
117
|
-
* Generated from: lib/es-resized-event.module.ts
|
|
118
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
119
|
-
*/
|
|
120
|
-
class EsResizedEventModule {
|
|
121
|
-
}
|
|
122
|
-
EsResizedEventModule.decorators = [
|
|
123
|
-
{ type: NgModule, args: [{
|
|
124
|
-
declarations: [EsResizedEventDirective],
|
|
125
|
-
imports: [],
|
|
126
|
-
exports: [EsResizedEventDirective]
|
|
127
|
-
},] }
|
|
128
|
-
];
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @fileoverview added by tsickle
|
|
132
|
-
* Generated from: public_api.ts
|
|
133
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @fileoverview added by tsickle
|
|
138
|
-
* Generated from: eurosat-resized-event.ts
|
|
139
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
export { EsResizedEvent, EsResizedEventDirective, EsResizedEventModule };
|
|
143
|
-
//# 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"],"sourcesContent":["import { ElementRef } from '@angular/core';\r\n\r\nexport class EsResizedEvent {\r\n constructor(\r\n readonly element: ElementRef,\r\n readonly newWidth: number,\r\n readonly newHeight: number,\r\n readonly oldWidth: number,\r\n readonly oldHeight: number\r\n ) {}\r\n}\r\n","import { Directive, ElementRef, EventEmitter, Output, OnInit } from '@angular/core';\r\nimport {EsResizedEvent} from './es-resized-event';\r\nimport ResizeSensor from 'css-element-queries/src/ResizeSensor';\r\n\r\n\r\n@Directive({\r\n // tslint:disable-next-line:directive-selector\r\n selector: '[resized]'\r\n})\r\nexport class EsResizedEventDirective implements OnInit {\r\n\r\n @Output('resized')\r\n readonly resized = new EventEmitter<EsResizedEvent>();\r\n\r\n private oldWidth: number;\r\n private oldHeight: number;\r\n\r\n constructor(private readonly element: ElementRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n // tslint:disable-next-line:no-unused-expression\r\n new ResizeSensor(this.element.nativeElement, x => this.onResized());\r\n this.onResized();\r\n }\r\n\r\n private onResized(): void {\r\n const newWidth = this.element.nativeElement.clientWidth;\r\n const newHeight = this.element.nativeElement.clientHeight;\r\n\r\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\r\n return;\r\n }\r\n\r\n const event = new EsResizedEvent(\r\n this.element,\r\n newWidth,\r\n newHeight,\r\n this.oldWidth,\r\n this.oldHeight);\r\n\r\n this.oldWidth = this.element.nativeElement.clientWidth;\r\n this.oldHeight = this.element.nativeElement.clientHeight;\r\n\r\n this.resized.next(event);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { EsResizedEventDirective } from './es-resized-event.directive';\r\n\r\n@NgModule({\r\n declarations: [EsResizedEventDirective],\r\n imports: [\r\n ],\r\n exports: [EsResizedEventDirective]\r\n})\r\nexport class EsResizedEventModule { }\r\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;CACP;;;IANO,iCAA4B;;IAC5B,kCAAyB;;IACzB,mCAA0B;;IAC1B,kCAAyB;;IACzB,mCAA0B;;;;;;;;MCCrB,uBAAuB;;;;IAQhC,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QALvC,YAAO,GAAG,IAAI,YAAY,EAAkB,CAAC;KAMrD;;;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