@eurosat/resized-event 20.0.0 → 21.0.0
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.
|
@@ -50,10 +50,10 @@ class EsResizedEventDirective {
|
|
|
50
50
|
this.zone.run(() => this.resized.emit(event));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
54
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
54
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.26", type: EsResizedEventDirective, isStandalone: true, selector: "[resized]", outputs: { resized: "resized" }, ngImport: i0 });
|
|
55
55
|
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventDirective, decorators: [{
|
|
57
57
|
type: Directive,
|
|
58
58
|
args: [{
|
|
59
59
|
selector: '[resized]',
|
|
@@ -65,11 +65,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.35", ngImpo
|
|
|
65
65
|
}] } });
|
|
66
66
|
|
|
67
67
|
class EsResizedEventModule {
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
70
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
69
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventModule, imports: [EsResizedEventDirective], exports: [EsResizedEventDirective] });
|
|
70
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventModule });
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: EsResizedEventModule, decorators: [{
|
|
73
73
|
type: NgModule,
|
|
74
74
|
args: [{
|
|
75
75
|
imports: [EsResizedEventDirective],
|
|
@@ -1 +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, NgZone, Output, OnInit, OnDestroy, inject } from '@angular/core';\nimport { EsResizedEvent } from './es-resized-event';\n\n@Directive({\n selector: '[resized]',\n standalone: true,\n})\nexport class EsResizedEventDirective implements OnInit, OnDestroy {\n\n private readonly elementRef = inject(ElementRef);\n private readonly zone = inject(NgZone);\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth?: number;\n private oldHeight?: number;\n private resizeObserver?: ResizeObserver;\n\n ngOnInit(): void {\n this.zone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver(() => this.onResized());\n this.resizeObserver.observe(this.elementRef.nativeElement);\n });\n\n this.onResized();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private onResized(): void {\n const nativeElement = this.elementRef.nativeElement;\n const newWidth = nativeElement.clientWidth;\n const newHeight = nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.elementRef,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight\n );\n\n this.oldWidth = newWidth;\n this.oldHeight = newHeight;\n\n if (NgZone.isInAngularZone()) {\n this.resized.emit(event);\n } else {\n this.zone.run(() => this.resized.emit(event));\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n imports: [EsResizedEventDirective],\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;AAEV,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,SAAA;AACA,IAAA,QAAA;AACA,IAAA,SAAA;IALb,WAAA,CACa,OAAmB,EACnB,QAAgB,EAChB,SAAiB,EACjB,QAAiB,EACjB,SAAkB,EAAA;QAJlB,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,SAAS,GAAT,SAAS;IACnB;AACN;;MCHY,uBAAuB,CAAA;AAEf,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,IAAI,GAAG,MAAM,CAA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jD;IACJ;wGAlDS,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AACnB,iBAAA;;sBAMI,MAAM;uBAAC,SAAS;;;MCLR,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAApB,oBAAoB,EAAA,OAAA,EAAA,CAHrB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CACvB,uBAAuB,CAAA,EAAA,CAAA;yGAEtB,oBAAoB,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,OAAO,EAAE,CAAC,uBAAuB;AAClC,iBAAA;;;ACND;;AAEG;;ACFH;;AAEG
|
|
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, NgZone, Output, OnInit, OnDestroy, inject } from '@angular/core';\nimport { EsResizedEvent } from './es-resized-event';\n\n@Directive({\n selector: '[resized]',\n standalone: true,\n})\nexport class EsResizedEventDirective implements OnInit, OnDestroy {\n\n private readonly elementRef = inject(ElementRef);\n private readonly zone = inject(NgZone);\n\n @Output('resized')\n readonly resized = new EventEmitter<EsResizedEvent>();\n\n private oldWidth?: number;\n private oldHeight?: number;\n private resizeObserver?: ResizeObserver;\n\n ngOnInit(): void {\n this.zone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver(() => this.onResized());\n this.resizeObserver.observe(this.elementRef.nativeElement);\n });\n\n this.onResized();\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private onResized(): void {\n const nativeElement = this.elementRef.nativeElement;\n const newWidth = nativeElement.clientWidth;\n const newHeight = nativeElement.clientHeight;\n\n if (newWidth === this.oldWidth && newHeight === this.oldHeight) {\n return;\n }\n\n const event = new EsResizedEvent(\n this.elementRef,\n newWidth,\n newHeight,\n this.oldWidth,\n this.oldHeight\n );\n\n this.oldWidth = newWidth;\n this.oldHeight = newHeight;\n\n if (NgZone.isInAngularZone()) {\n this.resized.emit(event);\n } else {\n this.zone.run(() => this.resized.emit(event));\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EsResizedEventDirective } from './es-resized-event.directive';\n\n@NgModule({\n imports: [EsResizedEventDirective],\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;AAEV,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,SAAA;AACA,IAAA,QAAA;AACA,IAAA,SAAA;IAL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C,uBAAuB;AAClC,iBAAA;;;ACND;;AAEG;;ACFH;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eurosat/resized-event",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^21.2.26",
|
|
6
|
+
"@angular/core": "^21.2.26"
|
|
7
7
|
},
|
|
8
8
|
"module": "fesm2022/eurosat-resized-event.mjs",
|
|
9
|
-
"typings": "
|
|
9
|
+
"typings": "types/eurosat-resized-event.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
"./package.json": {
|
|
12
12
|
"default": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
".": {
|
|
15
|
-
"types": "./
|
|
15
|
+
"types": "./types/eurosat-resized-event.d.ts",
|
|
16
16
|
"default": "./fesm2022/eurosat-resized-event.mjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"sideEffects": false,
|
|
20
|
+
"type": "module",
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"tslib": "^2.3.0"
|
|
22
23
|
}
|
|
File without changes
|