Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-inputotp.mjs.map

1 line
20 KiB
Plaintext
Raw Permalink Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-inputotp.mjs","sources":["../../src/app/components/inputotp/inputotp.ts","../../src/app/components/inputotp/primeng-inputotp.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation, booleanAttribute, forwardRef } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { InputOtpChangeEvent } from './inputotp.interface';\n\nexport const INPUT_OTP_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputOtp),\n multi: true\n};\n/**\n * Input Otp is used to enter one time passwords.\n * @group Components\n */\n@Component({\n selector: 'p-inputOtp',\n template: `\n <ng-container *ngFor=\"let i of getRange(length); trackBy: trackByFn\">\n <ng-container *ngIf=\"!inputTemplate\">\n <input\n type=\"text\"\n pInputText\n [value]=\"getModelValue(i)\"\n [maxLength]=\"1\"\n [type]=\"inputType\"\n class=\"p-inputotp-input\"\n [inputmode]=\"inputMode\"\n [variant]=\"variant\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [invalid]=\"invalid\"\n [tabindex]=\"tabindex\"\n [unstyled]=\"unstyled\"\n (input)=\"onInput($event, i - 1)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeyDown($event)\"\n pAutoFocus\n [autofocus]=\"getAutofocus(i)\"\n />\n </ng-container>\n <ng-container *ngIf=\"inputTemplate\">\n <ng-container *ngTemplateOutlet=\"inputTemplate; context: { $implicit: getToken(i - 1), events: getTemplateEvents(i - 1), index: i }\"> </ng-container>\n </ng-container>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'p-inputotp p-component'\n },\n providers: [INPUT_OTP_VALUE_ACCESSOR]\n})\nexport class InputOtp implements AfterContentInit {\n /**\n * When present, it specifies that the component should have invalid state style.\n * @group Props\n */\n @Input() invalid: boolean = false;\n /**\n * When present, it specifies that the component should be disabled.\n * @group Props\n */\n\n @Input() disabled: boolean = false;\n /**\n * When present, it specifies that an input field is read-only.\n * @group Props\n */\n @Input() readonly: boolean = false;\n /**\n * Specifies the input variant of the component.\n * @group Props\n */\n @Input() variant: 'filled' | 'outlined' = 'outlined';\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input() tabindex: number | null = null;\n /**\n * Number of characters to initiate.\n * @group Props\n */\n @Input() length: number = 4;\n /**\n * Mask pattern.\n * @group Props\n */\n @Input() mask: boolean = false;\n /**\n * When present, it specifies that an input field is integer-only.\n * @group Props\n */\n @Input() integerOnly: boolean = false;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Cal