UNPKG

primeng

Version:

PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,

1 lines 63.7 kB
{"version":3,"file":"primeng-password.mjs","sources":["../../src/password/style/passwordstyle.ts","../../src/password/password.ts","../../src/password/primeng-password.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as password_style } from '@primeuix/styles/password';\nimport { BaseStyle } from 'primeng/base';\n\nconst style = /*css*/ `\n${password_style}\n\n/* For PrimeNG */\n.p-password-overlay {\n min-width: 100%;\n}\n\np-password.ng-invalid.ng-dirty .p-inputtext {\n border-color: dt('inputtext.invalid.border.color');\n}\n\np-password.ng-invalid.ng-dirty .p-inputtext:enabled:focus {\n border-color: dt('inputtext.focus.border.color');\n}\n\np-password.ng-invalid.ng-dirty .p-inputtext::placeholder {\n color: dt('inputtext.invalid.placeholder.color');\n}\n\n.p-password-fluid-directive {\n width: 100%;\n}\n\n/* Animations */\n.p-password-enter {\n animation: p-animate-password-enter 300ms cubic-bezier(.19,1,.22,1);\n}\n\n.p-password-leave {\n animation: p-animate-password-leave 300ms cubic-bezier(.19,1,.22,1);\n}\n\n@keyframes p-animate-password-enter {\n from {\n opacity: 0;\n transform: scale(0.93);\n }\n}\n\n@keyframes p-animate-password-leave {\n to {\n opacity: 0;\n transform: scale(0.93);\n }\n}\n`;\n\nconst inlineStyles = {\n root: ({ instance }) => ({ position: instance.$appendTo() === 'self' ? 'relative' : undefined }),\n overlay: { position: 'absolute' }\n};\n\nconst classes = {\n root: ({ instance }) => [\n 'p-password p-component p-inputwrapper',\n {\n 'p-inputwrapper-filled': instance.$filled(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-inputwrapper-focus': instance.focused,\n 'p-password-fluid': instance.hasFluid\n }\n ],\n rootDirective: ({ instance }) => [\n 'p-password p-inputtext p-component p-inputwrapper',\n {\n 'p-inputwrapper-filled': instance.$filled(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-password-fluid-directive': instance.hasFluid\n }\n ],\n pcInputText: 'p-password-input',\n maskIcon: 'p-password-toggle-mask-icon p-password-mask-icon',\n unmaskIcon: 'p-password-toggle-mask-icon p-password-unmask-icon',\n overlay: 'p-password-overlay p-component',\n content: 'p-password-content',\n meter: 'p-password-meter',\n meterLabel: ({ instance }) => `p-password-meter-label ${instance.meter ? 'p-password-meter-' + instance.meter.strength : ''}`,\n meterText: 'p-password-meter-text',\n clearIcon: 'p-password-clear-icon'\n};\n\n@Injectable()\nexport class PasswordStyle extends BaseStyle {\n name = 'password';\n\n style = style;\n\n classes = classes;\n\n inlineStyles = inlineStyles;\n}\n\n/**\n *\n * Password displays strength indicator for password fields.\n *\n * [Live Demo](https://www.primeng.org/password/)\n *\n * @module passwordstyle\n *\n */\n\nexport enum PasswordClasses {\n /**\n * Class name of the root element\n */\n root = 'p-password',\n /**\n * Class name of the pt input element\n */\n pcInputText = 'p-password-input',\n /**\n * Class name of the mask icon element\n */\n maskIcon = 'p-password-mask-icon',\n /**\n * Class name of the unmask icon element\n */\n unmaskIcon = 'p-password-unmask-icon',\n /**\n * Class name of the overlay element\n */\n overlay = 'p-password-overlay',\n /**\n * Class name of the meter element\n */\n meter = 'p-password-meter',\n /**\n * Class name of the meter label element\n */\n meterLabel = 'p-password-meter-label',\n /**\n * Class name of the meter text element\n */\n meterText = 'p-password-meter-text',\n /**\n * Class name of the clear icon\n */\n clearIcon = 'p-password-clear-icon'\n}\n\nexport interface PasswordStyle extends BaseStyle {}\n","import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n HostListener,\n inject,\n InjectionToken,\n input,\n NgModule,\n numberAttribute,\n output,\n Pipe,\n PipeTransform,\n signal,\n TemplateRef,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MotionOptions } from '@primeuix/motion';\nimport { absolutePosition, addClass, hasClass, isTouchDevice, removeClass } from '@primeuix/utils';\nimport { OverlayOptions, OverlayService, SharedModule, TranslationKeys } from 'primeng/api';\nimport { AutoFocus } from 'primeng/autofocus';\nimport { PARENT_INSTANCE } from 'primeng/basecomponent';\nimport { BaseEditableHolder } from 'primeng/baseeditableholder';\nimport { BaseInput } from 'primeng/baseinput';\nimport { Bind, BindModule } from 'primeng/bind';\nimport { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom';\nimport { Fluid } from 'primeng/fluid';\nimport { Eye as EyeIcon } from '@primeicons/angular/eye';\nimport { EyeSlash as EyeSlashIcon } from '@primeicons/angular/eye-slash';\nimport { Times as TimesIcon } from '@primeicons/angular/times';\nimport { InputText } from 'primeng/inputtext';\nimport { Overlay } from 'primeng/overlay';\nimport { Nullable, VoidListener } from 'primeng/ts-helpers';\nimport type { AppendTo, CSSProperties, InputSize, InputVariant } from 'primeng/types/shared';\nimport type { PasswordIconTemplateContext, PasswordPassThrough } from 'primeng/types/password';\nimport { Subscription } from 'rxjs';\nimport { PasswordStyle } from './style/passwordstyle';\n\nconst PASSWORD_DIRECTIVE_INSTANCE = new InjectionToken<PasswordDirective>('PASSWORD_DIRECTIVE_INSTANCE');\n\nconst PASSWORD_INSTANCE = new InjectionToken<Password>('PASSWORD_INSTANCE');\n\ntype Meter = {\n strength: string;\n width: string;\n};\n/**\n * Password directive.\n * @deprecated since v22, use pInputPassword directive instead.\n * @group Components\n */\n@Directive({\n selector: '[pPassword]',\n standalone: true,\n host: {\n '[class]': \"cx('rootDirective')\"\n },\n providers: [PasswordStyle, { provide: PASSWORD_DIRECTIVE_INSTANCE, useExisting: PasswordDirective }, { provide: PARENT_INSTANCE, useExisting: PasswordDirective }],\n hostDirectives: [Bind]\n})\nexport class PasswordDirective extends BaseEditableHolder {\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcPasswordDirective: PasswordDirective | undefined = inject(PASSWORD_DIRECTIVE_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n /**\n * Used to pass attributes to DOM elements inside the Password component.\n * @defaultValue undefined\n * @group Props\n */\n pPasswordPT = input<PasswordPassThrough | undefined>();\n /**\n * Indicates whether the component should be rendered without styles.\n * @defaultValue undefined\n * @group Props\n */\n pPasswordUnstyled = input<boolean | undefined>();\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n /**\n * Text to prompt password entry. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n promptLabel = input<string>('Enter a password');\n /**\n * Text for a weak password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n weakLabel = input<string>('Weak');\n /**\n * Text for a medium password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n mediumLabel = input<string>('Medium');\n /**\n * Text for a strong password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n strongLabel = input<string>('Strong');\n /**\n * Whether to show the strength indicator or not.\n * @group Props\n */\n feedback = input(true, { transform: booleanAttribute });\n /**\n * Sets the visibility of the password field.\n * @defaultValue false\n * @type boolean\n * @group Props\n */\n showPassword = input(false, { transform: booleanAttribute });\n /**\n * Specifies the input variant of the component.\n * @defaultValue 'outlined'\n * @group Props\n */\n variant = input<InputVariant>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue false\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<InputSize>(undefined, { alias: 'pSize' });\n\n pcFluid: Fluid | null = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n $variant = computed(() => this.variant() || this.config.inputVariant());\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n\n panel: Nullable<HTMLDivElement>;\n\n meter: Nullable<HTMLDivElement>;\n\n info: Nullable<HTMLDivElement>;\n\n filled: Nullable<boolean>;\n\n content: Nullable<HTMLDivElement>;\n\n label: Nullable<HTMLLabelElement>;\n\n scrollHandler: Nullable<ConnectedOverlayScrollHandler>;\n\n documentResizeListener: VoidListener;\n\n _componentStyle = inject(PasswordStyle);\n\n constructor() {\n super();\n\n effect(() => {\n const pt = this.pPasswordPT();\n pt && this.directivePT.set(pt);\n });\n\n effect(() => {\n this.pPasswordUnstyled() && this.directiveUnstyled.set(this.pPasswordUnstyled());\n });\n\n effect(() => {\n const show = this.showPassword();\n this.el.nativeElement.type = show ? 'text' : 'password';\n });\n }\n\n @HostListener('input', ['$event'])\n onInput(e: Event) {\n this.writeModelValue(this.el.nativeElement.value);\n }\n\n createPanel() {\n if (isPlatformBrowser(this.platformId)) {\n this.panel = this.renderer.createElement('div');\n this.renderer.addClass(this.panel, 'p-password-overlay');\n this.renderer.addClass(this.panel, 'p-component');\n\n this.content = this.renderer.createElement('div');\n this.renderer.addClass(this.content, 'p-password-content');\n this.renderer.appendChild(this.panel, this.content);\n\n this.meter = this.renderer.createElement('div');\n this.renderer.addClass(this.meter, 'p-password-meter');\n this.renderer.appendChild(this.content, this.meter);\n\n this.label = this.renderer.createElement('div');\n this.renderer.addClass(this.label, 'p-password-meter-label');\n this.renderer.appendChild(this.meter, this.label);\n\n this.info = this.renderer.createElement('div');\n this.renderer.addClass(this.info, 'p-password-meter-text');\n this.renderer.setProperty(this.info, 'textContent', this.promptLabel());\n this.renderer.appendChild(this.content, this.info);\n\n this.renderer.setStyle(this.panel, 'minWidth', `${this.el.nativeElement.offsetWidth}px`);\n this.renderer.appendChild(document.body, this.panel);\n this.updateMeter();\n }\n }\n\n showOverlay() {\n if (this.feedback()) {\n if (!this.panel) {\n this.createPanel();\n }\n\n this.renderer.setStyle(this.panel, 'zIndex', String(++DomHandler.zindex));\n this.renderer.setStyle(this.panel, 'display', 'block');\n setTimeout(() => {\n addClass(this.panel!, 'p-connected-overlay-visible');\n this.bindScrollListener();\n this.bindDocumentResizeListener();\n }, 1);\n absolutePosition(this.panel!, this.el.nativeElement);\n }\n }\n\n hideOverlay() {\n if (this.feedback() && this.panel) {\n addClass(this.panel, 'p-connected-overlay-hidden');\n removeClass(this.panel, 'p-connected-overlay-visible');\n this.unbindScrollListener();\n this.unbindDocumentResizeListener();\n\n setTimeout(() => {\n this.onDestroy();\n }, 150);\n }\n }\n\n @HostListener('focus')\n onFocus() {\n this.showOverlay();\n }\n\n @HostListener('blur')\n onBlur() {\n this.hideOverlay();\n }\n\n labelSignal = signal('');\n\n @HostListener('keyup', ['$event'])\n onKeyup(e: Event) {\n if (this.feedback()) {\n let value = (e.target as HTMLInputElement).value,\n label: string | null = null,\n meterPos: string | null = null;\n\n if (value.length === 0) {\n label = this.promptLabel();\n meterPos = '0px 0px';\n } else {\n var score = this.testStrength(value);\n\n if (score < 30) {\n label = this.weakLabel();\n meterPos = '0px -10px';\n } else if (score >= 30 && score < 80) {\n label = this.mediumLabel();\n meterPos = '0px -20px';\n } else if (score >= 80) {\n label = this.strongLabel();\n meterPos = '0px -30px';\n }\n\n this.labelSignal.set(label!);\n this.updateMeter();\n }\n\n if (!this.panel || !hasClass(this.panel, 'p-connected-overlay-visible')) {\n this.showOverlay();\n }\n\n if (this.meter) {\n this.renderer.setStyle(this.meter, 'backgroundPosition', meterPos);\n }\n\n if (this.info) {\n (this.info as HTMLDivElement).textContent = label;\n }\n }\n }\n\n updateMeter() {\n if (this.labelSignal() && this.meter && this.info) {\n const label = this.labelSignal();\n const strengthClass = this.strengthClass(label.toLowerCase());\n const width = this.getWidth(label.toLowerCase());\n\n this.renderer.addClass(this.meter, strengthClass);\n this.renderer.setStyle(this.meter, 'width', width);\n (this.info as HTMLDivElement).textContent = label;\n }\n }\n\n getWidth(label: string) {\n return label === 'weak' ? '33.33%' : label === 'medium' ? '66.66%' : label === 'strong' ? '100%' : '';\n }\n\n strengthClass(label: string) {\n return `p-password-meter${label ? `-${label}` : ''}`;\n }\n\n testStrength(str: string) {\n let grade: number = 0;\n let val: Nullable<RegExpMatchArray>;\n\n val = str.match('[0-9]');\n grade += this.normalize(val ? val.length : 1 / 4, 1) * 25;\n\n val = str.match('[a-zA-Z]');\n grade += this.normalize(val ? val.length : 1 / 2, 3) * 10;\n\n val = str.match('[!@#$%^&*?_~.,;=]');\n grade += this.normalize(val ? val.length : 1 / 6, 1) * 35;\n\n val = str.match('[A-Z]');\n grade += this.normalize(val ? val.length : 1 / 6, 1) * 30;\n\n grade *= str.length / 8;\n\n return grade > 100 ? 100 : grade;\n }\n\n normalize(x: number, y: number) {\n let diff = x - y;\n\n if (diff <= 0) return x / y;\n else return 1 + 0.5 * (x / (x + y / 4));\n }\n\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.el.nativeElement, () => {\n if (hasClass(this.panel!, 'p-connected-overlay-visible')) {\n this.hideOverlay();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n\n bindDocumentResizeListener() {\n if (isPlatformBrowser(this.platformId)) {\n if (!this.documentResizeListener) {\n const window = this.document.defaultView as Window;\n this.documentResizeListener = this.renderer.listen(window, 'resize', this.onWindowResize.bind(this));\n }\n }\n }\n\n unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n this.documentResizeListener();\n this.documentResizeListener = null;\n }\n }\n\n onWindowResize() {\n if (!isTouchDevice()) {\n this.hideOverlay();\n }\n }\n\n onDestroy() {\n if (this.panel) {\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n this.unbindDocumentResizeListener();\n\n this.renderer.removeChild(this.document.body, this.panel);\n this.panel = null;\n this.meter = null;\n this.info = null;\n }\n }\n}\n\ntype Mapper<T, G> = (item: T, ...args: any[]) => G;\n\n@Pipe({\n name: 'mapper',\n pure: true,\n standalone: true\n})\nexport class MapperPipe implements PipeTransform {\n public transform<T, G>(value: T, mapper: Mapper<T, G>, ...args: unknown[]): G {\n return mapper(value, ...args);\n }\n}\n\nexport const Password_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Password),\n multi: true\n};\n/**\n * Password displays strength indicator for password fields.\n * @deprecated since v22, use pInputPassword directive instead.\n * @group Components\n */\n@Component({\n selector: 'p-password',\n standalone: true,\n imports: [NgTemplateOutlet, InputText, AutoFocus, TimesIcon, EyeSlashIcon, EyeIcon, Overlay, SharedModule, BindModule],\n template: `\n <input\n #input\n [attr.label]=\"label()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledBy]=\"ariaLabelledBy()\"\n [attr.id]=\"inputId()\"\n [attr.tabindex]=\"tabindex()\"\n pInputText\n [pSize]=\"size()\"\n [style]=\"inputStyle()\"\n [class]=\"cn(cx('pcInputText'), inputStyleClass())\"\n [attr.type]=\"inputType()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"value\"\n [variant]=\"$variant()\"\n [attr.name]=\"name()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.minlength]=\"minlength()\"\n [attr.required]=\"requiredAttr()\"\n [attr.disabled]=\"disabledAttr()\"\n [invalid]=\"invalid()\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (keyup)=\"onKeyUp($event)\"\n [pAutoFocus]=\"autofocus()\"\n [pt]=\"ptm('pcInputText')\"\n [unstyled]=\"unstyled()\"\n />\n @if (showClearIcon) {\n @if (!clearIconTemplate()) {\n <svg data-p-icon=\"times\" [class]=\"cx('clearIcon')\" (click)=\"clear()\" [pBind]=\"ptm('clearIcon')\" />\n }\n <span (click)=\"clear()\" [class]=\"cx('clearIcon')\" [pBind]=\"ptm('clearIcon')\">\n <ng-container *ngTemplateOutlet=\"clearIconTemplate()\"></ng-container>\n </span>\n }\n\n @if (toggleMask()) {\n @if (unmasked()) {\n @if (!hideIconTemplate()) {\n <svg data-p-icon=\"eye-slash\" [class]=\"cx('maskIcon')\" [pBind]=\"ptm('maskIcon')\" (click)=\"onMaskToggle()\" />\n } @else {\n <span (click)=\"onMaskToggle()\" [pBind]=\"ptm('maskIcon')\">\n <ng-container *ngTemplateOutlet=\"hideIconTemplate(); context: maskIconContext\"></ng-container>\n </span>\n }\n } @else {\n @if (!showIconTemplate()) {\n <svg data-p-icon=\"eye\" [class]=\"cx('unmaskIcon')\" [pBind]=\"ptm('unmaskIcon')\" (click)=\"onMaskToggle()\" />\n } @else {\n <span (click)=\"onMaskToggle()\" [pBind]=\"ptm('unmaskIcon')\">\n <ng-container *ngTemplateOutlet=\"showIconTemplate(); context: unmaskIconContext\"></ng-container>\n </span>\n }\n }\n }\n\n <p-overlay\n #overlay\n [hostAttrSelector]=\"$attrSelector\"\n [visible]=\"overlayVisible()\"\n (visibleChange)=\"overlayVisible.set($event)\"\n [options]=\"overlayOptions()\"\n [target]=\"'@parent'\"\n [appendTo]=\"$appendTo()\"\n [unstyled]=\"unstyled()\"\n [pt]=\"ptm('pcOverlay')\"\n [motionOptions]=\"motionOptions()\"\n >\n <ng-template #content>\n <div [class]=\"cx('overlay')\" [style]=\"sx('overlay')\" (click)=\"onOverlayClick($event)\" [pBind]=\"ptm('overlay')\" [attr.data-p]=\"overlayDataP\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()\"></ng-container>\n @if (contentTemplate()) {\n <ng-container *ngTemplateOutlet=\"contentTemplate()\"></ng-container>\n } @else {\n <div [class]=\"cx('content')\" [pBind]=\"ptm('content')\">\n <div [class]=\"cx('meter')\" [pBind]=\"ptm('meter')\">\n <div [class]=\"cx('meterLabel')\" [style.width]=\"meter ? meter.width : ''\" [pBind]=\"ptm('meterLabel')\" [attr.data-p]=\"meterDataP\"></div>\n </div>\n <div [class]=\"cx('meterText')\" [pBind]=\"ptm('meterText')\">{{ infoText }}</div>\n </div>\n }\n <ng-container *ngTemplateOutlet=\"footerTemplate()\"></ng-container>\n </div>\n </ng-template>\n </p-overlay>\n `,\n providers: [Password_VALUE_ACCESSOR, PasswordStyle, { provide: PASSWORD_INSTANCE, useExisting: Password }, { provide: PARENT_INSTANCE, useExisting: Password }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[style]': \"sx('root')\",\n '[attr.data-p]': 'containerDataP'\n },\n hostDirectives: [Bind]\n})\nexport class Password extends BaseInput<PasswordPassThrough> {\n componentName = 'Password';\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcPassword: Password | undefined = inject(PASSWORD_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n /**\n * Defines a string that labels the input for accessibility.\n * @group Props\n */\n ariaLabel = input<string>();\n /**\n * Specifies one or more IDs in the DOM that labels the input field.\n * @group Props\n */\n ariaLabelledBy = input<string>();\n /**\n * Label of the input for accessibility.\n * @group Props\n */\n label = input<string>();\n /**\n * Text to prompt password entry. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n promptLabel = input<string>();\n /**\n * Regex value for medium regex.\n * @group Props\n */\n mediumRegex = input<string>('^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})');\n /**\n * Regex value for strong regex.\n * @group Props\n */\n strongRegex = input<string>('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})');\n /**\n * Text for a weak password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n weakLabel = input<string>();\n /**\n * Text for a medium password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n mediumLabel = input<string>();\n /**\n * Text for a strong password. Defaults to PrimeNG I18N API configuration.\n * @group Props\n */\n strongLabel = input<string>();\n /**\n * Identifier of the accessible input element.\n * @group Props\n */\n inputId = input<string>();\n /**\n * Whether to show the strength indicator or not.\n * @group Props\n */\n feedback = input(true, { transform: booleanAttribute });\n /**\n * Whether to show an icon to display the password as plain text.\n * @group Props\n */\n toggleMask = input(undefined, { transform: booleanAttribute });\n /**\n * Style class of the input field.\n * @group Props\n */\n inputStyleClass = input<string>();\n /**\n * Inline style of the input field.\n * @group Props\n */\n inputStyle = input<CSSProperties>();\n /**\n * Specify automated assistance in filling out password by browser.\n * @group Props\n */\n autocomplete = input<string>();\n /**\n * Advisory information to display on input.\n * @group Props\n */\n placeholder = input<string>();\n /**\n * When enabled, a clear icon is displayed to clear the value.\n * @group Props\n */\n showClear = input(false, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n autofocus = input(undefined, { transform: booleanAttribute });\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n tabindex = input(undefined, { transform: numberAttribute });\n /**\n * Target element to attach the overlay, valid values are \"body\" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]=\"mydiv\" for a div element having #mydiv as variable name).\n * @defaultValue 'self'\n * @group Props\n */\n appendTo = input<AppendTo>('self');\n /**\n * The motion options.\n * @group Props\n */\n motionOptions = input<MotionOptions>();\n /**\n * Whether to use overlay API feature. The properties of overlay API can be used like an object in it.\n * @group Props\n */\n overlayOptions = input<OverlayOptions>();\n /**\n * Callback to invoke when the component receives focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n onFocus = output<Event>();\n /**\n * Callback to invoke when the component loses focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n onBlur = output<Event>();\n /**\n * Callback to invoke when clear button is clicked.\n * @group Emits\n */\n onClear = output<void>();\n\n overlayViewChild = viewChild<Overlay>('overlay');\n\n inputViewChild = viewChild<ElementRef>('input');\n\n /**\n * Custom template of content.\n * @group Templates\n */\n contentTemplate = contentChild<TemplateRef<void>>('content', { descendants: false });\n\n /**\n * Custom template of footer.\n * @group Templates\n */\n footerTemplate = contentChild<TemplateRef<void>>('footer', { descendants: false });\n\n /**\n * Custom template of header.\n * @group Templates\n */\n headerTemplate = contentChild<TemplateRef<void>>('header', { descendants: false });\n\n /**\n * Custom template of clear icon.\n * @group Templates\n */\n clearIconTemplate = contentChild<TemplateRef<void>>('clearicon', { descendants: false });\n\n /**\n * Custom template of hide icon.\n * @param {PasswordIconTemplateContext} context - icon context.\n * @see {@link PasswordIconTemplateContext}\n * @group Templates\n */\n hideIconTemplate = contentChild<TemplateRef<PasswordIconTemplateContext>>('hideicon', { descendants: false });\n\n /**\n * Custom template of show icon.\n * @param {PasswordIconTemplateContext} context - icon context.\n * @see {@link PasswordIconTemplateContext}\n * @group Templates\n */\n showIconTemplate = contentChild<TemplateRef<PasswordIconTemplateContext>>('showicon', { descendants: false });\n\n $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo());\n\n overlayVisible = signal<boolean>(false);\n\n meter: Nullable<Meter>;\n\n infoText: Nullable<string>;\n\n focused: boolean = false;\n\n unmasked = signal(false);\n\n requiredAttr = computed(() => (this.required() ? '' : undefined));\n\n disabledAttr = computed(() => (this.$disabled() ? '' : undefined));\n\n inputType = computed(() => (this.unmasked() ? 'text' : 'password'));\n\n get showClearIcon() {\n return this.showClear() && this.value != null;\n }\n\n get maskIconContext(): PasswordIconTemplateContext {\n return { class: this.cx('maskIcon') ?? '' };\n }\n\n get unmaskIconContext(): PasswordIconTemplateContext {\n return { class: this.cx('unmaskIcon') ?? '' };\n }\n\n mediumCheckRegExp!: RegExp;\n\n strongCheckRegExp!: RegExp;\n\n resizeListener: VoidListener;\n\n scrollHandler: Nullable<ConnectedOverlayScrollHandler>;\n\n value: Nullable<string> = null;\n\n translationSubscription: Nullable<Subscription>;\n\n _componentStyle = inject(PasswordStyle);\n\n overlayService = inject(OverlayService);\n\n onInit() {\n this.infoText = this.promptText();\n this.mediumCheckRegExp = new RegExp(this.mediumRegex());\n this.strongCheckRegExp = new RegExp(this.strongRegex());\n this.translationSubscription = this.config.translationObserver.subscribe(() => {\n this.updateUI(this.value || '');\n });\n }\n\n onInput(event: Event) {\n this.value = (event.target as HTMLInputElement).value;\n this.onModelChange(this.value);\n }\n\n onInputFocus(event: Event) {\n this.focused = true;\n if (this.feedback()) {\n this.overlayVisible.set(true);\n }\n\n this.onFocus.emit(event);\n }\n\n onInputBlur(event: Event) {\n this.focused = false;\n if (this.feedback()) {\n this.overlayVisible.set(false);\n }\n\n this.onModelTouched();\n this.onBlur.emit(event);\n }\n\n onKeyUp(event: KeyboardEvent) {\n if (this.feedback()) {\n let value = (event.target as HTMLInputElement).value;\n this.updateUI(value);\n\n if (event.code === 'Escape') {\n this.overlayVisible() && this.overlayVisible.set(false);\n\n return;\n }\n\n if (!this.overlayVisible()) {\n this.overlayVisible.set(true);\n }\n }\n }\n\n updateUI(value: string) {\n let label = null;\n let meter: { strength: string; width: string } | null = null;\n\n switch (this.testStrength(value)) {\n case 1:\n label = this.weakText();\n meter = {\n strength: 'weak',\n width: '33.33%'\n };\n break;\n\n case 2:\n label = this.mediumText();\n meter = {\n strength: 'medium',\n width: '66.66%'\n };\n break;\n\n case 3:\n label = this.strongText();\n meter = {\n strength: 'strong',\n width: '100%'\n };\n break;\n\n default:\n label = this.promptText();\n meter = null;\n break;\n }\n\n this.meter = meter;\n this.infoText = label;\n }\n\n onMaskToggle() {\n this.unmasked.update((v) => !v);\n }\n\n onOverlayClick(event: Event) {\n this.overlayService.add({\n originalEvent: event,\n target: this.el.nativeElement\n });\n }\n\n testStrength(str: string) {\n let level = 0;\n\n if (this.strongCheckRegExp?.test(str)) level = 3;\n else if (this.mediumCheckRegExp?.test(str)) level = 2;\n else if (str.length) level = 1;\n\n return level;\n }\n\n promptText() {\n return this.promptLabel() || this.translate(TranslationKeys.PASSWORD_PROMPT);\n }\n\n weakText() {\n return this.weakLabel() || this.translate(TranslationKeys.WEAK);\n }\n\n mediumText() {\n return this.mediumLabel() || this.translate(TranslationKeys.MEDIUM);\n }\n\n strongText() {\n return this.strongLabel() || this.translate(TranslationKeys.STRONG);\n }\n\n clear() {\n this.value = null;\n this.onModelChange(this.value);\n this.writeValue(this.value);\n this.onClear.emit();\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void) {\n if (value === undefined) this.value = null;\n else this.value = value;\n\n if (this.feedback()) this.updateUI(this.value || '');\n setModelValue(this.value);\n }\n\n onDestroy() {\n if (this.translationSubscription) {\n this.translationSubscription.unsubscribe();\n }\n }\n\n get containerDataP() {\n return this.cn({\n fluid: this.hasFluid\n });\n }\n\n get meterDataP() {\n return this.cn({\n [this.meter?.strength as string]: this.meter?.strength\n });\n }\n\n get overlayDataP() {\n return this.cn({\n ['overlay-' + this.$appendTo()]: 'overlay-' + this.$appendTo()\n });\n }\n}\n\n@NgModule({\n imports: [Password, PasswordDirective, SharedModule, BindModule],\n exports: [PasswordDirective, Password, SharedModule, BindModule]\n})\nexport class PasswordModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["password_style","TimesIcon","EyeSlashIcon","EyeIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;EACpBA,OAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Cf;AAED,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,MAAM,GAAG,UAAU,GAAG,SAAS,EAAE,CAAC;AAChG,IAAA,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU;CAClC;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,uCAAuC;AACvC,QAAA;AACI,YAAA,uBAAuB,EAAE,QAAQ,CAAC,OAAO,EAAE;AAC3C,YAAA,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,QAAQ;YACpD,sB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