@vallift/ngl 0.0.19 → 0.0.21
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/shimmer/shimmer.component.d.ts +1 -1
- package/components/tooltip/tooltip.component.d.ts +3 -12
- package/components/tooltip/tooltip.directive.d.ts +21 -0
- package/fesm2022/vallift-ngl.mjs +141 -44
- 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 +2 -2
- package/inputs/text-input/text-input.component.d.ts +2 -7
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/components/tooltip/tooltip.enums.d.ts +0 -13
|
@@ -8,7 +8,7 @@ export declare class ButtonComponent {
|
|
|
8
8
|
type: import("@angular/core").InputSignal<"submit" | "button" | "reset">;
|
|
9
9
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
10
10
|
fullWidth: import("@angular/core").InputSignal<boolean>;
|
|
11
|
-
appearance: import("@angular/core").InputSignal<"
|
|
11
|
+
appearance: import("@angular/core").InputSignal<"textType" | "primary" | "outline" | "primaryRounded" | "outlineRounded">;
|
|
12
12
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
13
13
|
iconSize: import("@angular/core").InputSignal<number>;
|
|
14
14
|
iconSrc: import("@angular/core").InputSignal<string | null | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class ShimmerComponent {
|
|
3
|
-
type: import("@angular/core").InputSignal<"
|
|
3
|
+
type: import("@angular/core").InputSignal<"grid" | "list" | "single-line" | "multiline">;
|
|
4
4
|
count: import("@angular/core").InputSignal<number>;
|
|
5
5
|
loop: import("@angular/core").Signal<number[]>;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<ShimmerComponent, never>;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { TooltipPosition, TooltipTheme } from "./tooltip.enums";
|
|
3
1
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TooltipComponent
|
|
5
|
-
|
|
6
|
-
tooltipTheme: TooltipTheme;
|
|
7
|
-
tooltip: string;
|
|
8
|
-
left: number;
|
|
9
|
-
top: number;
|
|
10
|
-
visible: boolean;
|
|
11
|
-
constructor();
|
|
12
|
-
ngOnInit(): void;
|
|
2
|
+
export declare class TooltipComponent {
|
|
3
|
+
text: string;
|
|
13
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "lib-tooltip", never, { "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
6
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TooltipDirective {
|
|
3
|
+
private overlay;
|
|
4
|
+
private elementRef;
|
|
5
|
+
private positionBuilder;
|
|
6
|
+
private overlayRef;
|
|
7
|
+
private longPressTimeout;
|
|
8
|
+
libTooltip: string;
|
|
9
|
+
tooltipPosition: import("@angular/core").InputSignal<"bottom" | "top" | "left" | "right" | "before" | "after">;
|
|
10
|
+
constructor();
|
|
11
|
+
private showTooltip;
|
|
12
|
+
private hideTooltip;
|
|
13
|
+
private getPosition;
|
|
14
|
+
private isTouch;
|
|
15
|
+
onMouseEnter(): void;
|
|
16
|
+
onMouseLeave(): void;
|
|
17
|
+
onTouchStart(): void;
|
|
18
|
+
onTouchEnd(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[libTooltip]", never, { "libTooltip": { "alias": "libTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
package/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, signal, input, output, Component, Input, ElementRef, Renderer2, EventEmitter, Output, RendererFactory2, HostListener, Directive, computed, ChangeDetectorRef, model, ViewChild, ViewContainerRef, ComponentFactoryResolver, ApplicationRef, Injector, Inject, Pipe, ContentChildren, ChangeDetectionStrategy, viewChild } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, signal, input, output, Component, Input, ElementRef, Renderer2, EventEmitter, Output, RendererFactory2, HostListener, Directive, computed, ChangeDetectorRef, model, ViewChild, ViewContainerRef, ComponentFactoryResolver, ApplicationRef, Injector, Inject, Pipe, ContentChildren, ChangeDetectionStrategy, effect, viewChild } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common/http';
|
|
4
4
|
import { HttpClient, HttpHeaders, HttpRequest } from '@angular/common/http';
|
|
5
5
|
import { retry, throwError, Subject, debounceTime, fromEvent, filter as filter$1, take, of } from 'rxjs';
|
|
@@ -8,11 +8,11 @@ import * as i1 from '@angular/forms';
|
|
|
8
8
|
import { FormControl, NgControl, FormGroupDirective, FormsModule, ReactiveFormsModule, FormGroup } from '@angular/forms';
|
|
9
9
|
import { Router, NavigationStart, NavigationEnd } from '@angular/router';
|
|
10
10
|
import { DialogRef, DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
|
11
|
-
import { Overlay, OverlayConfig, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
11
|
+
import { Overlay, OverlayConfig, OverlayPositionBuilder, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
12
12
|
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
13
13
|
import { NgClass, DOCUMENT, NgStyle, CommonModule, DatePipe } from '@angular/common';
|
|
14
14
|
import { SvgIconComponent } from 'angular-svg-icon';
|
|
15
|
-
import { CdkPortal } from '@angular/cdk/portal';
|
|
15
|
+
import { CdkPortal, ComponentPortal } from '@angular/cdk/portal';
|
|
16
16
|
import { NgxMaskDirective } from 'ngx-mask';
|
|
17
17
|
import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
|
|
18
18
|
import * as i2 from '@angular/platform-browser';
|
|
@@ -2746,13 +2746,6 @@ class TextInputComponent extends BaseControlValueAccessor {
|
|
|
2746
2746
|
isFocused = signal(false);
|
|
2747
2747
|
ngControl = inject(NgControl, { optional: true, self: true });
|
|
2748
2748
|
searchSubject = new Subject();
|
|
2749
|
-
get placeholderSizeClass() {
|
|
2750
|
-
return {
|
|
2751
|
-
'placeholder-small': this.size() === 'small',
|
|
2752
|
-
'placeholder-medium': this.size() === 'medium',
|
|
2753
|
-
'placeholder-large': this.size() === 'large',
|
|
2754
|
-
};
|
|
2755
|
-
}
|
|
2756
2749
|
constructor() {
|
|
2757
2750
|
super();
|
|
2758
2751
|
if (this.ngControl) {
|
|
@@ -2823,7 +2816,7 @@ class TextInputComponent extends BaseControlValueAccessor {
|
|
|
2823
2816
|
this.isFocused.set(false);
|
|
2824
2817
|
}
|
|
2825
2818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2826
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: TextInputComponent, isStandalone: true, selector: "app-text-input", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, actionIcon: { classPropertyName: "actionIcon", publicName: "actionIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, showErrorSpace: { classPropertyName: "showErrorSpace", publicName: "showErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, debounceSearchEnabled: { classPropertyName: "debounceSearchEnabled", publicName: "debounceSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changeValue: "changeValue", actionIconClicked: "actionIconClicked" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<app-base-input #inputElement [title]=\"label()\" [fullWidth]=\"fullWidth()\" [isRequiredField]=\"hasRequiredValidator()\">\n <div input class=\"relative flex items-center w-full text-neutral-400 bg-white shadow-1 rounded-md\">\n @if (iconSrc()) {\n <app-svg-icon [size]=\"18\" [src]=\"iconSrc()!\"\n class=\"absolute pointer-events-none ml-3 text-neutral-400\"></app-svg-icon>\n }\n\n <!-- <p>{{ formControl.getError('required') ? placeholder + ' ' : placeholder }}</p>-->\n\n <input\n #inputRef\n [mask]=\"mask()\"\n class=\"placeholder-neutral-400 text-black rounded-md border-none outline-none focus:border-none ring-1 ring-neutral-300 focus:ring-primary-500 focus:ring-2 transition-all duration-300\"\n [class.text-neutral-400]=\"formControl.disabled\"\n [class.disabled-placeholder]=\"formControl.disabled\"\n [style.height]=\"sizeMap[size()]\"\n [formControl]=\"formControl\"\n [ngClass]=\"
|
|
2819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: TextInputComponent, isStandalone: true, selector: "app-text-input", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, actionIcon: { classPropertyName: "actionIcon", publicName: "actionIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, showErrorSpace: { classPropertyName: "showErrorSpace", publicName: "showErrorSpace", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, debounceSearchEnabled: { classPropertyName: "debounceSearchEnabled", publicName: "debounceSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changeValue: "changeValue", actionIconClicked: "actionIconClicked" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<app-base-input #inputElement [title]=\"label()\" [fullWidth]=\"fullWidth()\" [isRequiredField]=\"hasRequiredValidator()\">\n <div input class=\"relative flex items-center w-full text-neutral-400 bg-white shadow-1 rounded-md\">\n @if (iconSrc()) {\n <app-svg-icon [size]=\"18\" [src]=\"iconSrc()!\"\n class=\"absolute pointer-events-none ml-3 text-neutral-400\"></app-svg-icon>\n }\n\n <!-- <p>{{ formControl.getError('required') ? placeholder + ' ' : placeholder }}</p>-->\n\n <input\n #inputRef\n [mask]=\"mask()\"\n class=\"placeholder-neutral-400 text-black rounded-md border-none outline-none focus:border-none ring-1 ring-neutral-300 focus:ring-primary-500 focus:ring-2 transition-all duration-300\"\n [class.text-neutral-400]=\"formControl.disabled\"\n [class.disabled-placeholder]=\"formControl.disabled\"\n [style.height]=\"sizeMap[size()]\"\n [formControl]=\"formControl\"\n [ngClass]=\"getClass()\"\n [type]=\"type()\"\n [placeholder]=\"placeholder()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onValueChange($event)\">\n\n @if (actionIcon()) {\n <div (click)=\"onActionClicked()\"\n class=\"absolute right-2 p-2 flex justify-center items-center hover:bg-neutral-100 rounded-full\">\n <app-svg-icon [size]=\"18\" [src]=\"actionIcon()!\" class=\"text-neutral-400 cursor-pointer\">\n </app-svg-icon>\n </div>\n }\n </div>\n</app-base-input>\n\n@if (formControl.errors && hasErrors) {\n <div class=\"mt-1\">\n <span class=\"text-caption text-red-500\">{{ formControl.errors | humanizeFormMessages: errorMessages() }}</span>\n </div>\n} @else {\n @if (showErrorSpace()) {\n <div class=\"mt-1\">\n <span class=\"text-caption text-transparent\">.</span>\n </div>\n }\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: HumanizeFormMessagesPipe, name: "humanizeFormMessages" }, { kind: "component", type: AppSvgIconComponent, selector: "app-svg-icon", inputs: ["src", "stretch", "size", "svgStyle"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: BaseInputComponent, selector: "app-base-input", inputs: ["title", "isRequiredField", "fullWidth", "inputType"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
|
|
2827
2820
|
}
|
|
2828
2821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TextInputComponent, decorators: [{
|
|
2829
2822
|
type: Component,
|
|
@@ -2835,7 +2828,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
2835
2828
|
CommonModule,
|
|
2836
2829
|
BaseInputComponent,
|
|
2837
2830
|
NgxMaskDirective
|
|
2838
|
-
], template: "<app-base-input #inputElement [title]=\"label()\" [fullWidth]=\"fullWidth()\" [isRequiredField]=\"hasRequiredValidator()\">\n <div input class=\"relative flex items-center w-full text-neutral-400 bg-white shadow-1 rounded-md\">\n @if (iconSrc()) {\n <app-svg-icon [size]=\"18\" [src]=\"iconSrc()!\"\n class=\"absolute pointer-events-none ml-3 text-neutral-400\"></app-svg-icon>\n }\n\n <!-- <p>{{ formControl.getError('required') ? placeholder + ' ' : placeholder }}</p>-->\n\n <input\n #inputRef\n [mask]=\"mask()\"\n class=\"placeholder-neutral-400 text-black rounded-md border-none outline-none focus:border-none ring-1 ring-neutral-300 focus:ring-primary-500 focus:ring-2 transition-all duration-300\"\n [class.text-neutral-400]=\"formControl.disabled\"\n [class.disabled-placeholder]=\"formControl.disabled\"\n [style.height]=\"sizeMap[size()]\"\n [formControl]=\"formControl\"\n [ngClass]=\"
|
|
2831
|
+
], template: "<app-base-input #inputElement [title]=\"label()\" [fullWidth]=\"fullWidth()\" [isRequiredField]=\"hasRequiredValidator()\">\n <div input class=\"relative flex items-center w-full text-neutral-400 bg-white shadow-1 rounded-md\">\n @if (iconSrc()) {\n <app-svg-icon [size]=\"18\" [src]=\"iconSrc()!\"\n class=\"absolute pointer-events-none ml-3 text-neutral-400\"></app-svg-icon>\n }\n\n <!-- <p>{{ formControl.getError('required') ? placeholder + ' ' : placeholder }}</p>-->\n\n <input\n #inputRef\n [mask]=\"mask()\"\n class=\"placeholder-neutral-400 text-black rounded-md border-none outline-none focus:border-none ring-1 ring-neutral-300 focus:ring-primary-500 focus:ring-2 transition-all duration-300\"\n [class.text-neutral-400]=\"formControl.disabled\"\n [class.disabled-placeholder]=\"formControl.disabled\"\n [style.height]=\"sizeMap[size()]\"\n [formControl]=\"formControl\"\n [ngClass]=\"getClass()\"\n [type]=\"type()\"\n [placeholder]=\"placeholder()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onValueChange($event)\">\n\n @if (actionIcon()) {\n <div (click)=\"onActionClicked()\"\n class=\"absolute right-2 p-2 flex justify-center items-center hover:bg-neutral-100 rounded-full\">\n <app-svg-icon [size]=\"18\" [src]=\"actionIcon()!\" class=\"text-neutral-400 cursor-pointer\">\n </app-svg-icon>\n </div>\n }\n </div>\n</app-base-input>\n\n@if (formControl.errors && hasErrors) {\n <div class=\"mt-1\">\n <span class=\"text-caption text-red-500\">{{ formControl.errors | humanizeFormMessages: errorMessages() }}</span>\n </div>\n} @else {\n @if (showErrorSpace()) {\n <div class=\"mt-1\">\n <span class=\"text-caption text-transparent\">.</span>\n </div>\n }\n}\n" }]
|
|
2839
2832
|
}], ctorParameters: () => [], propDecorators: { inputRef: [{
|
|
2840
2833
|
type: ViewChild,
|
|
2841
2834
|
args: ['inputRef']
|
|
@@ -3596,42 +3589,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
3596
3589
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toaster fixed top-1 right-1 px-3 py-2\">\n @for (toast of currentToasts; track toast; let i = $index) {\n <div>\n <app-toast\n [type]=\"toast.type\"\n [title]=\"toast.title\"\n [message]=\"toast.message\"\n [duration]=\"toast.duration\"\n (disposeEvent)=\"dispose(i)\"\n [themeType]=\"toast.themeType ?? 'light'\"\n ></app-toast>\n </div>\n }\n</div>\n", styles: [".toaster{z-index:2000}\n"] }]
|
|
3597
3590
|
}], ctorParameters: () => [{ type: ToastService }, { type: i0.ChangeDetectorRef }] });
|
|
3598
3591
|
|
|
3599
|
-
var TooltipPosition;
|
|
3600
|
-
(function (TooltipPosition) {
|
|
3601
|
-
TooltipPosition["ABOVE"] = "above";
|
|
3602
|
-
TooltipPosition["BELOW"] = "below";
|
|
3603
|
-
TooltipPosition["LEFT"] = "left";
|
|
3604
|
-
TooltipPosition["RIGHT"] = "right";
|
|
3605
|
-
TooltipPosition["DYNAMIC"] = "dynamic";
|
|
3606
|
-
TooltipPosition["DEFAULT"] = "above";
|
|
3607
|
-
})(TooltipPosition || (TooltipPosition = {}));
|
|
3608
|
-
var TooltipTheme;
|
|
3609
|
-
(function (TooltipTheme) {
|
|
3610
|
-
TooltipTheme["DARK"] = "dark";
|
|
3611
|
-
TooltipTheme["LIGHT"] = "light";
|
|
3612
|
-
TooltipTheme["DEFAULT"] = "dark";
|
|
3613
|
-
})(TooltipTheme || (TooltipTheme = {}));
|
|
3614
|
-
|
|
3615
3592
|
class TooltipComponent {
|
|
3616
|
-
|
|
3617
|
-
tooltipTheme = TooltipTheme.DEFAULT;
|
|
3618
|
-
tooltip = '';
|
|
3619
|
-
left = 0;
|
|
3620
|
-
top = 0;
|
|
3621
|
-
visible = false;
|
|
3622
|
-
constructor() {
|
|
3623
|
-
}
|
|
3624
|
-
ngOnInit() {
|
|
3625
|
-
}
|
|
3593
|
+
text = '';
|
|
3626
3594
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3627
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: TooltipComponent, isStandalone: true, selector: "
|
|
3595
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: TooltipComponent, isStandalone: true, selector: "lib-tooltip", inputs: { text: "text" }, ngImport: i0, template: "<div class=\"bg-gray-800 text-white text-xs px-3 py-1 rounded shadow-lg max-w-xs whitespace-nowrap z-50\">\n {{ text }}\n</div>\n", styles: [""] });
|
|
3628
3596
|
}
|
|
3629
3597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
3630
3598
|
type: Component,
|
|
3631
|
-
args: [{ selector: '
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3599
|
+
args: [{ selector: 'lib-tooltip', imports: [], template: "<div class=\"bg-gray-800 text-white text-xs px-3 py-1 rounded shadow-lg max-w-xs whitespace-nowrap z-50\">\n {{ text }}\n</div>\n" }]
|
|
3600
|
+
}], propDecorators: { text: [{
|
|
3601
|
+
type: Input
|
|
3602
|
+
}] } });
|
|
3603
|
+
|
|
3604
|
+
class TooltipDirective {
|
|
3605
|
+
overlay = inject(Overlay);
|
|
3606
|
+
elementRef = inject(ElementRef);
|
|
3607
|
+
positionBuilder = inject(OverlayPositionBuilder);
|
|
3608
|
+
overlayRef = null;
|
|
3609
|
+
longPressTimeout = null;
|
|
3610
|
+
// tooltipText = input<string>('');
|
|
3611
|
+
libTooltip = '';
|
|
3612
|
+
tooltipPosition = input('bottom');
|
|
3613
|
+
constructor() {
|
|
3614
|
+
effect(() => {
|
|
3615
|
+
this.hideTooltip();
|
|
3616
|
+
});
|
|
3617
|
+
}
|
|
3618
|
+
showTooltip() {
|
|
3619
|
+
if (this.overlayRef?.hasAttached())
|
|
3620
|
+
return;
|
|
3621
|
+
const position = this.getPosition(this.tooltipPosition());
|
|
3622
|
+
const positionStrategy = this.positionBuilder
|
|
3623
|
+
.flexibleConnectedTo(this.elementRef)
|
|
3624
|
+
.withPositions([position]);
|
|
3625
|
+
this.overlayRef = this.overlay.create({
|
|
3626
|
+
positionStrategy,
|
|
3627
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3628
|
+
});
|
|
3629
|
+
const tooltipPortal = new ComponentPortal(TooltipComponent);
|
|
3630
|
+
const tooltipRef = this.overlayRef.attach(tooltipPortal);
|
|
3631
|
+
tooltipRef.instance.text = this.libTooltip;
|
|
3632
|
+
}
|
|
3633
|
+
hideTooltip() {
|
|
3634
|
+
if (this.overlayRef?.hasAttached()) {
|
|
3635
|
+
this.overlayRef.detach();
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
getPosition(position) {
|
|
3639
|
+
switch (position) {
|
|
3640
|
+
case 'bottom':
|
|
3641
|
+
return {
|
|
3642
|
+
originX: 'center',
|
|
3643
|
+
originY: 'bottom',
|
|
3644
|
+
overlayX: 'center',
|
|
3645
|
+
overlayY: 'top',
|
|
3646
|
+
offsetY: 8,
|
|
3647
|
+
};
|
|
3648
|
+
case 'left':
|
|
3649
|
+
case 'before':
|
|
3650
|
+
return {
|
|
3651
|
+
originX: 'start',
|
|
3652
|
+
originY: 'center',
|
|
3653
|
+
overlayX: 'end',
|
|
3654
|
+
overlayY: 'center',
|
|
3655
|
+
offsetX: -8,
|
|
3656
|
+
};
|
|
3657
|
+
case 'right':
|
|
3658
|
+
case 'after':
|
|
3659
|
+
return {
|
|
3660
|
+
originX: 'end',
|
|
3661
|
+
originY: 'center',
|
|
3662
|
+
overlayX: 'start',
|
|
3663
|
+
overlayY: 'center',
|
|
3664
|
+
offsetX: 8,
|
|
3665
|
+
};
|
|
3666
|
+
default: // 'top'
|
|
3667
|
+
return {
|
|
3668
|
+
originX: 'center',
|
|
3669
|
+
originY: 'top',
|
|
3670
|
+
overlayX: 'center',
|
|
3671
|
+
overlayY: 'bottom',
|
|
3672
|
+
offsetY: -8,
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
isTouch() {
|
|
3677
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
3678
|
+
}
|
|
3679
|
+
// 👉 Hover for desktop
|
|
3680
|
+
onMouseEnter() {
|
|
3681
|
+
if (!this.isTouch()) {
|
|
3682
|
+
this.showTooltip();
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
onMouseLeave() {
|
|
3686
|
+
if (!this.isTouch()) {
|
|
3687
|
+
this.hideTooltip();
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
// 👉 Long press for mobile
|
|
3691
|
+
onTouchStart() {
|
|
3692
|
+
if (this.isTouch()) {
|
|
3693
|
+
this.longPressTimeout = setTimeout(() => {
|
|
3694
|
+
this.showTooltip();
|
|
3695
|
+
}, 500);
|
|
3696
|
+
}
|
|
3697
|
+
}
|
|
3698
|
+
onTouchEnd() {
|
|
3699
|
+
if (this.longPressTimeout) {
|
|
3700
|
+
clearTimeout(this.longPressTimeout);
|
|
3701
|
+
this.longPressTimeout = null;
|
|
3702
|
+
}
|
|
3703
|
+
this.hideTooltip();
|
|
3704
|
+
}
|
|
3705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3706
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.7", type: TooltipDirective, isStandalone: true, selector: "[libTooltip]", inputs: { libTooltip: { classPropertyName: "libTooltip", publicName: "libTooltip", isSignal: false, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "touchstart": "onTouchStart()", "touchend": "onTouchEnd()", "touchcancel": "onTouchEnd()" } }, ngImport: i0 });
|
|
3707
|
+
}
|
|
3708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
3709
|
+
type: Directive,
|
|
3710
|
+
args: [{
|
|
3711
|
+
selector: '[libTooltip]',
|
|
3712
|
+
standalone: true,
|
|
3713
|
+
}]
|
|
3714
|
+
}], ctorParameters: () => [], propDecorators: { libTooltip: [{
|
|
3715
|
+
type: Input
|
|
3716
|
+
}], onMouseEnter: [{
|
|
3717
|
+
type: HostListener,
|
|
3718
|
+
args: ['mouseenter']
|
|
3719
|
+
}], onMouseLeave: [{
|
|
3720
|
+
type: HostListener,
|
|
3721
|
+
args: ['mouseleave']
|
|
3722
|
+
}], onTouchStart: [{
|
|
3723
|
+
type: HostListener,
|
|
3724
|
+
args: ['touchstart']
|
|
3725
|
+
}], onTouchEnd: [{
|
|
3726
|
+
type: HostListener,
|
|
3727
|
+
args: ['touchend']
|
|
3728
|
+
}, {
|
|
3729
|
+
type: HostListener,
|
|
3730
|
+
args: ['touchcancel']
|
|
3731
|
+
}] } });
|
|
3635
3732
|
|
|
3636
3733
|
class ClickOutsideDirective {
|
|
3637
3734
|
clickOutside = new EventEmitter();
|
|
@@ -6488,5 +6585,5 @@ function provideNglConfig(config) {
|
|
|
6488
6585
|
* Generated bundle index. Do not edit.
|
|
6489
6586
|
*/
|
|
6490
6587
|
|
|
6491
|
-
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseTableComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ClickOutsideDirective, CloseButtonComponent, ColorConverterService, ColorFormats, ColorPickerComponent, ColorPickerDirective, ContextMenuButtonComponent, ContextMenuIconComponent, DataTableComponent, DateInputComponent, DatePickerComponent, DatePickerOverlayComponent, DateRangePickerComponent, DateUtils, DropdownComponent, DynamicRendererComponent, EnvBannerComponent, FORM_ERRORS, FileUploaderComponent, FormValidationUtils, HumanizeFormMessagesPipe, InputDateFormat, InvalidControlScrollContainerDirective, InvalidControlScrollDirective, InvalidTokenError, ListviewComponent, LoaderComponent, LoaderService, MultiSelectDropdownAppearance, MultiSelectDropdownComponent, MultiSelectionFieldComponent, NGL_CONFIG, NetworkImageComponent, NglService, NoDataComponent, NoDataTableComponent, NumberInputComponent, OverlayContextMenuComponent, OverlayService, OverlayWizardUtils, PaginationComponent, PaginationState, PhoneNumberInputComponent, RadioButtonComponent, RequestState, ResizableColumnDirective, ResponsiveHelperComponent, SharedConstants, ShimmerComponent, SingleItemPickerInputComponent, SingleSelectionFieldComponent, SortableTableDirective, SpinnerComponent, State, StatusBadgeComponent, SvgUrlIconComponent, SwitchComponent, TableCustomComponent, TableResizableColumnsDirective, TemplateResolverArrayUtil, TemplateResolverFormat, TextAreaInputComponent, TextInputComponent, TimePickerComponent, ToastComponent, ToastService, ToasterComponent,
|
|
6588
|
+
export { AlertDialogComponent, AppErrorComponent, AppSvgIconComponent, BaseApiService, BaseControlValueAccessor, BaseControlValueAccessorV2, BaseControlValueAccessorV3, BaseInputComponent, BaseOverlayComponent, BaseTableComponent, BreadcrumbComponent, ButtonComponent, CheckboxComponent, ClickOutsideDirective, CloseButtonComponent, ColorConverterService, ColorFormats, ColorPickerComponent, ColorPickerDirective, ContextMenuButtonComponent, ContextMenuIconComponent, DataTableComponent, DateInputComponent, DatePickerComponent, DatePickerOverlayComponent, DateRangePickerComponent, DateUtils, DropdownComponent, DynamicRendererComponent, EnvBannerComponent, FORM_ERRORS, FileUploaderComponent, FormValidationUtils, HumanizeFormMessagesPipe, InputDateFormat, InvalidControlScrollContainerDirective, InvalidControlScrollDirective, InvalidTokenError, ListviewComponent, LoaderComponent, LoaderService, MultiSelectDropdownAppearance, MultiSelectDropdownComponent, MultiSelectionFieldComponent, NGL_CONFIG, NetworkImageComponent, NglService, NoDataComponent, NoDataTableComponent, NumberInputComponent, OverlayContextMenuComponent, OverlayService, OverlayWizardUtils, PaginationComponent, PaginationState, PhoneNumberInputComponent, RadioButtonComponent, RequestState, ResizableColumnDirective, ResponsiveHelperComponent, SharedConstants, ShimmerComponent, SingleItemPickerInputComponent, SingleSelectionFieldComponent, SortableTableDirective, SpinnerComponent, State, StatusBadgeComponent, SvgUrlIconComponent, SwitchComponent, TableCustomComponent, TableResizableColumnsDirective, TemplateResolverArrayUtil, TemplateResolverFormat, TextAreaInputComponent, TextInputComponent, TimePickerComponent, ToastComponent, ToastService, ToasterComponent, TooltipDirective, UnsavedAwareDirective, arrayToCSV, arrayToSeparator, arrayToSpaceSeparator, deepEqual, defaultErrors, getDynamicTypeStructure, isDynamicType, isValid, jsonEqual, jwtDecode, mmddyyyyDateValidatorAsync, onlyFutureDateValidator, onlyPastDateValidator, openLink, printInvalidFields, provideNglConfig, resolveTemplateWithObject, toSentenceCase };
|
|
6492
6589
|
//# sourceMappingURL=vallift-ngl.mjs.map
|