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

1 line
3.4 KiB
Plaintext

{"version":3,"file":"primeng-focustrap.mjs","sources":["../../src/app/components/focustrap/focustrap.ts","../../src/app/components/focustrap/primeng-focustrap.ts"],"sourcesContent":["import { DomHandler } from 'primeng/dom';\n\nimport { CommonModule } from '@angular/common';\nimport { Directive, ElementRef, HostListener, Input, NgModule, inject, booleanAttribute } from '@angular/core';\n/**\n * Focus Trap keeps focus within a certain DOM element while tabbing.\n * @group Components\n */\n@Directive({\n selector: '[pFocusTrap]',\n host: {\n class: 'p-element'\n }\n})\nexport class FocusTrap {\n /**\n * When set as true, focus wouldn't be managed.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) pFocusTrapDisabled: boolean = false;\n\n host: ElementRef = inject(ElementRef);\n\n @HostListener('keydown.tab', ['$event'])\n @HostListener('keydown.shift.tab', ['$event'])\n onkeydown(e: KeyboardEvent) {\n if (this.pFocusTrapDisabled !== true) {\n e.preventDefault();\n const focusableElement = DomHandler.getNextFocusableElement(this.host.nativeElement, e.shiftKey);\n if (focusableElement) {\n focusableElement.focus();\n focusableElement.select?.();\n }\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [FocusTrap],\n declarations: [FocusTrap]\n})\nexport class FocusTrapModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;;;AAGG;MAOU,SAAS,CAAA;AAClB;;;AAGG;IACqC,kBAAkB,GAAY,KAAK,CAAC;AAE5E,IAAA,IAAI,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAItC,IAAA,SAAS,CAAC,CAAgB,EAAA;AACtB,QAAA,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,EAAE;YAClC,CAAC,CAAC,cAAc,EAAE,CAAC;AACnB,YAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,a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