ngx-show-hide-password
Version:
> Add split input button to password or text input. Toggles input type between "text" and "password".
96 lines (89 loc) • 3.91 kB
TypeScript
import * as i0 from '@angular/core';
import { WritableSignal, OnInit } from '@angular/core';
import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
declare class ShowHideService {
private readonly states;
private getIO;
private init;
private saveAndProadcast;
getSignal(id: string): WritableSignal<boolean>;
setShow(id: string, show: boolean): void;
toggleShow(id: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHideService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ShowHideService>;
}
declare class ShowHideTriggerDirective {
private service;
showHideTrigger: i0.InputSignal<string>;
onClick(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHideTriggerDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ShowHideTriggerDirective, "[showHideTrigger]", never, { "showHideTrigger": { "alias": "showHideTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}
interface ShowHideStatusConfig {
id?: string;
show?: string;
hide?: string;
materialIcon?: boolean;
}
declare class ShowHideStatusDirective {
private service;
private el;
private renderer;
private errorHandler;
private injector;
private config;
set showHideStatus(config: ShowHideStatusConfig);
private init;
private updateStatus;
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHideStatusDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ShowHideStatusDirective, "[showHideStatus]", never, { "showHideStatus": { "alias": "showHideStatus"; "required": true; }; }, {}, never, never, true, never>;
}
declare class ShowHideInputDirective implements OnInit {
private service;
private el;
private renderer;
private injector;
id: i0.InputSignal<string>;
disabled: i0.InputSignalWithTransform<boolean, string | boolean>;
ngOnInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHideInputDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ShowHideInputDirective, "input[showHideInput]", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
declare enum BtnStyle {
Primary = "primary",
Secondary = "secondary",
Success = "success",
Danger = "danger",
Warning = "warning",
Info = "info",
Dark = "dark",
Light = "light"
}
/**
* Add a split input button to password or text input. Toggles input type between "text" and "password".
*
* @example
* <show-hide-password size="sm|lg">
* <input type="password" name=... />
* </show-hide-password>
*/
declare class ShowHidePasswordComponent implements OnInit {
private service;
private elem;
private renderer;
private injector;
btnStyle: i0.InputSignal<BtnStyle>;
btnOutline: i0.InputSignalWithTransform<boolean, string | boolean>;
size: i0.InputSignal<"" | "sm" | "lg">;
input: any;
isHidden?: boolean;
id: string;
faEye: _fortawesome_fontawesome_common_types.IconDefinition;
faEyeSlash: _fortawesome_fontawesome_common_types.IconDefinition;
ngOnInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHidePasswordComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ShowHidePasswordComponent, "show-hide-password", never, { "btnStyle": { "alias": "btnStyle"; "required": false; "isSignal": true; }; "btnOutline": { "alias": "btnOutline"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
}
export { BtnStyle, ShowHideInputDirective, ShowHidePasswordComponent, ShowHideService, ShowHideStatusDirective, ShowHideTriggerDirective };
export type { ShowHideStatusConfig };
//# sourceMappingURL=index.d.ts.map