@vallift/ngl 0.0.24 → 0.0.25
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.
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
1
|
+
import { EventEmitter, Type, OnDestroy } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class OpenFloatingMenuDirective {
|
|
3
|
+
export declare class OpenFloatingMenuDirective implements OnDestroy {
|
|
4
4
|
private elementRef;
|
|
5
5
|
private overlayService;
|
|
6
6
|
component: Type<unknown>;
|
|
7
7
|
floatingMenuPositionPreference: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
8
|
+
floatingMenuData: any;
|
|
9
|
+
onFloatingMenuActionPerformed: EventEmitter<{
|
|
10
|
+
actionKey: string;
|
|
11
|
+
data: any;
|
|
12
|
+
}>;
|
|
13
|
+
private overlaySub?;
|
|
14
|
+
ngOnDestroy(): void;
|
|
8
15
|
onClick(): void;
|
|
9
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<OpenFloatingMenuDirective, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<OpenFloatingMenuDirective, "[libOpenFloatingMenu]", never, { "component": { "alias": "libOpenFloatingMenu"; "required": false; }; "floatingMenuPositionPreference": { "alias": "floatingMenuPositionPreference"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<OpenFloatingMenuDirective, "[libOpenFloatingMenu]", never, { "component": { "alias": "libOpenFloatingMenu"; "required": false; }; "floatingMenuPositionPreference": { "alias": "floatingMenuPositionPreference"; "required": false; }; "floatingMenuData": { "alias": "floatingMenuData"; "required": false; }; }, { "onFloatingMenuActionPerformed": "onFloatingMenuActionPerformed"; }, never, never, true, never>;
|
|
11
18
|
}
|
package/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -3151,15 +3151,30 @@ class OpenFloatingMenuDirective {
|
|
|
3151
3151
|
overlayService = inject(OverlayService);
|
|
3152
3152
|
component;
|
|
3153
3153
|
floatingMenuPositionPreference = 'bottomCenter';
|
|
3154
|
+
floatingMenuData;
|
|
3155
|
+
onFloatingMenuActionPerformed = new EventEmitter();
|
|
3156
|
+
overlaySub;
|
|
3157
|
+
ngOnDestroy() {
|
|
3158
|
+
this.overlaySub?.unsubscribe();
|
|
3159
|
+
}
|
|
3154
3160
|
onClick() {
|
|
3155
3161
|
if (!this.component)
|
|
3156
3162
|
return;
|
|
3157
|
-
this.overlayService.openNearElement(this.component, this.elementRef.nativeElement, {
|
|
3163
|
+
const overlayRef = this.overlayService.openNearElement(this.component, this.elementRef.nativeElement, {
|
|
3158
3164
|
positionPreference: this.floatingMenuPositionPreference,
|
|
3165
|
+
data: this.floatingMenuData,
|
|
3159
3166
|
});
|
|
3167
|
+
if (this.overlaySub) {
|
|
3168
|
+
this.overlaySub.unsubscribe();
|
|
3169
|
+
}
|
|
3170
|
+
if (overlayRef?.closed) {
|
|
3171
|
+
this.overlaySub = overlayRef.closed.subscribe((result) => {
|
|
3172
|
+
this.onFloatingMenuActionPerformed.emit(result);
|
|
3173
|
+
});
|
|
3174
|
+
}
|
|
3160
3175
|
}
|
|
3161
3176
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OpenFloatingMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3162
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: OpenFloatingMenuDirective, isStandalone: true, selector: "[libOpenFloatingMenu]", inputs: { component: ["libOpenFloatingMenu", "component"], floatingMenuPositionPreference: "floatingMenuPositionPreference" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
3177
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.7", type: OpenFloatingMenuDirective, isStandalone: true, selector: "[libOpenFloatingMenu]", inputs: { component: ["libOpenFloatingMenu", "component"], floatingMenuPositionPreference: "floatingMenuPositionPreference", floatingMenuData: "floatingMenuData" }, outputs: { onFloatingMenuActionPerformed: "onFloatingMenuActionPerformed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
3163
3178
|
}
|
|
3164
3179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: OpenFloatingMenuDirective, decorators: [{
|
|
3165
3180
|
type: Directive,
|
|
@@ -3172,6 +3187,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
3172
3187
|
args: ['libOpenFloatingMenu']
|
|
3173
3188
|
}], floatingMenuPositionPreference: [{
|
|
3174
3189
|
type: Input
|
|
3190
|
+
}], floatingMenuData: [{
|
|
3191
|
+
type: Input
|
|
3192
|
+
}], onFloatingMenuActionPerformed: [{
|
|
3193
|
+
type: Output
|
|
3175
3194
|
}], onClick: [{
|
|
3176
3195
|
type: HostListener,
|
|
3177
3196
|
args: ['click']
|