@vallift/ngl 0.0.7 → 0.0.9
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/components/button/button.component.d.ts +1 -1
- package/components/context-menu-button/context-menu-button.component.d.ts +1 -1
- package/components/overlay/overlay.service.d.ts +1 -2
- package/fesm2022/vallift-ngl.mjs +50 -10
- package/fesm2022/vallift-ngl.mjs.map +1 -1
- package/inputs/_base/base-input/base-input.component.d.ts +1 -1
- package/inputs/text-area-input/text-area-input.component.d.ts +1 -1
- package/inputs/text-input/text-input.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ export declare class ButtonComponent {
|
|
|
5
5
|
elementRef: ElementRef<any>;
|
|
6
6
|
document: Document;
|
|
7
7
|
renderer: Renderer2;
|
|
8
|
-
type: import("@angular/core").InputSignal<"
|
|
8
|
+
type: import("@angular/core").InputSignal<"button" | "submit" | "reset">;
|
|
9
9
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
10
10
|
fullWidth: import("@angular/core").InputSignal<boolean>;
|
|
11
11
|
appearance: import("@angular/core").InputSignal<"textType" | "primary" | "outline" | "primaryRounded" | "outlineRounded">;
|
|
@@ -7,7 +7,7 @@ export declare class ContextMenuButtonComponent implements OnDestroy {
|
|
|
7
7
|
overlay: Overlay;
|
|
8
8
|
dialog: Dialog;
|
|
9
9
|
actions: import("@angular/core").InputSignal<ContextMenuButtonAction[] | undefined>;
|
|
10
|
-
positionPreference: import("@angular/core").InputSignal<"
|
|
10
|
+
positionPreference: import("@angular/core").InputSignal<"topLeft" | "topRight" | "topCenter" | "bottomLeft" | "bottomRight" | "bottomCenter" | "leftTop" | "leftCenter" | "leftBottom" | "rightTop" | "rightCenter" | "rightBottom" | "center">;
|
|
11
11
|
onActionClicked: import("@angular/core").OutputEmitterRef<string>;
|
|
12
12
|
private basePanelClass;
|
|
13
13
|
private dialogRef?;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
2
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
3
2
|
import { ComponentType } from '@angular/cdk/portal';
|
|
4
3
|
import { AlertDialogComponent } from './alert-dialog/alert-dialog.component';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
@@ -13,7 +12,7 @@ export declare class OverlayService {
|
|
|
13
12
|
private basePanelClass;
|
|
14
13
|
modalMaxHeightClass: string;
|
|
15
14
|
openNearElement<T>(component: ComponentType<T>, triggerElement: HTMLElement, options?: {
|
|
16
|
-
|
|
15
|
+
positionPreference?: 'topLeft' | 'topRight' | 'topCenter' | 'bottomLeft' | 'bottomRight' | 'bottomCenter' | 'leftTop' | 'leftCenter' | 'leftBottom' | 'rightTop' | 'rightCenter' | 'rightBottom' | 'center';
|
|
17
16
|
disableClose?: boolean;
|
|
18
17
|
data?: any;
|
|
19
18
|
scrollStrategy?: 'noop' | 'block' | 'reposition' | 'close';
|
package/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -775,15 +775,55 @@ class OverlayService {
|
|
|
775
775
|
basePanelClass = ['bg-white', 'shadow-2'];
|
|
776
776
|
modalMaxHeightClass = 'max-h-[80vh]';
|
|
777
777
|
openNearElement(component, triggerElement, options) {
|
|
778
|
-
const {
|
|
779
|
-
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 }, // Default: Centered Below
|
|
780
|
-
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 }, // Fallback: Centered Above
|
|
781
|
-
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 }, // **New Fallback: Align Left if Overflowing Right**
|
|
782
|
-
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 }
|
|
783
|
-
], // **New Fallback: Align Left if Overflowing Right and not enough space below**
|
|
784
|
-
disableClose = false, data, scrollStrategy = 'block', isMobileResponsive = false } = options ?? {};
|
|
778
|
+
const { positionPreference = 'bottomLeft', disableClose = false, data, scrollStrategy = 'block', isMobileResponsive = false } = options ?? {};
|
|
785
779
|
const isMobile = this.breakpointObserver.isMatched([Breakpoints.XSmall, Breakpoints.Small]);
|
|
786
780
|
let positionStrategy;
|
|
781
|
+
const positionMappings = {
|
|
782
|
+
// **BOTTOM POSITIONS**
|
|
783
|
+
bottomRight: [
|
|
784
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },
|
|
785
|
+
],
|
|
786
|
+
bottomCenter: [
|
|
787
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },
|
|
788
|
+
],
|
|
789
|
+
bottomLeft: [
|
|
790
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },
|
|
791
|
+
],
|
|
792
|
+
// **TOP POSITIONS**
|
|
793
|
+
topRight: [
|
|
794
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },
|
|
795
|
+
],
|
|
796
|
+
topCenter: [
|
|
797
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },
|
|
798
|
+
],
|
|
799
|
+
topLeft: [
|
|
800
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },
|
|
801
|
+
],
|
|
802
|
+
// **LEFT POSITIONS**
|
|
803
|
+
leftBottom: [
|
|
804
|
+
{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },
|
|
805
|
+
],
|
|
806
|
+
leftCenter: [
|
|
807
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },
|
|
808
|
+
],
|
|
809
|
+
leftTop: [
|
|
810
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },
|
|
811
|
+
],
|
|
812
|
+
// **RIGHT POSITIONS**
|
|
813
|
+
rightBottom: [
|
|
814
|
+
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },
|
|
815
|
+
],
|
|
816
|
+
rightCenter: [
|
|
817
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },
|
|
818
|
+
],
|
|
819
|
+
rightTop: [
|
|
820
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },
|
|
821
|
+
],
|
|
822
|
+
// **CENTER**
|
|
823
|
+
center: [
|
|
824
|
+
{ originX: 'center', originY: 'center', overlayX: 'center', overlayY: 'center' },
|
|
825
|
+
]
|
|
826
|
+
};
|
|
787
827
|
if (isMobile && isMobileResponsive) {
|
|
788
828
|
positionStrategy = this.overlay.position()
|
|
789
829
|
.global()
|
|
@@ -796,7 +836,7 @@ class OverlayService {
|
|
|
796
836
|
.flexibleConnectedTo(triggerElement)
|
|
797
837
|
.withFlexibleDimensions(false)
|
|
798
838
|
.withPush(true)
|
|
799
|
-
.withPositions(
|
|
839
|
+
.withPositions(positionMappings[positionPreference] || positionMappings.bottomCenter);
|
|
800
840
|
}
|
|
801
841
|
const scrollStrategyMapping = {
|
|
802
842
|
noop: this.overlay.scrollStrategies.noop(),
|
|
@@ -1549,13 +1589,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
1549
1589
|
|
|
1550
1590
|
class CloseButtonComponent {
|
|
1551
1591
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: CloseButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: CloseButtonComponent, isStandalone: true, selector: "app-close-button", ngImport: i0, template: "<p class=\"rounded-lg p-3 border border-neutral-300 cursor-pointer hover:bg-neutral-50\">\n <
|
|
1592
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: CloseButtonComponent, isStandalone: true, selector: "app-close-button", ngImport: i0, template: "<p class=\"rounded-lg p-3 border border-neutral-300 cursor-pointer hover:bg-neutral-50\">\n <svg class=\"w-12 h-12 text-neutral-800\" xmlns=\"http://www.w3.org/2000/svg\" id=\"mdi-window-close\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z\"/>\n </svg>\n\n</p>\n", styles: [""] });
|
|
1553
1593
|
}
|
|
1554
1594
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: CloseButtonComponent, decorators: [{
|
|
1555
1595
|
type: Component,
|
|
1556
1596
|
args: [{ selector: 'app-close-button', standalone: true, imports: [
|
|
1557
1597
|
AppSvgIconComponent
|
|
1558
|
-
], template: "<p class=\"rounded-lg p-3 border border-neutral-300 cursor-pointer hover:bg-neutral-50\">\n <
|
|
1598
|
+
], template: "<p class=\"rounded-lg p-3 border border-neutral-300 cursor-pointer hover:bg-neutral-50\">\n <svg class=\"w-12 h-12 text-neutral-800\" xmlns=\"http://www.w3.org/2000/svg\" id=\"mdi-window-close\" viewBox=\"0 0 24 24\">\n <path\n fill=\"currentColor\"\n d=\"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z\"/>\n </svg>\n\n</p>\n" }]
|
|
1559
1599
|
}] });
|
|
1560
1600
|
|
|
1561
1601
|
class OverlayContextMenuComponent {
|