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

1 line
37 KiB
Plaintext
Raw Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-chips.mjs","sources":["../../src/app/components/chips/chips.ts","../../src/app/components/chips/primeng-chips.ts"],"sourcesContent":["import { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgModule,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n numberAttribute\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { TimesCircleIcon } from 'primeng/icons/timescircle';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { UniqueComponentId } from 'primeng/utils';\nimport { ChipsAddEvent, ChipsClickEvent, ChipsRemoveEvent } from './chips.interface';\n\nexport const CHIPS_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Chips),\n multi: true\n};\n/**\n * Chips groups a collection of contents in tabs.\n * @group Components\n */\n@Component({\n selector: 'p-chips',\n template: `\n <div\n [ngClass]=\"{\n 'p-chips p-component p-input-wrapper': true,\n 'p-disabled': disabled,\n 'p-focus': focused,\n 'p-inputwrapper-filled': (value && value.length) || (this.inputViewChild?.nativeElement.value && this.inputViewChild?.nativeElement.value.length),\n 'p-inputwrapper-focus': focused,\n }\"\n [ngStyle]=\"style\"\n [class]=\"styleClass\"\n [attr.data-pc-name]=\"'chips'\"\n [attr.data-pc-section]=\"'root'\"\n >\n <ul\n #container\n [ngClass]=\"{ 'p-inputtext p-chips-multiple-container': true, 'p-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\n tabindex=\"-1\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\n [attr.aria-orientation]=\"'horizontal'\"\n (click)=\"onWrapperClick()\"\n (focus)=\"onContainerFocus()\"\n (blur)=\"onContainerBlur()\"\n (keydown)=\"onContainerKeyDown($event)\"\n [attr.data-pc-section]=\"'container'\"\n >\n <li\n #token\n *ngFor=\"let item of value; let i = index\"\n [attr.id]=\"id + '_chips_item_' + i\"\n role=\"option\"\n [attr.ariaLabel]=\"item\"\n [attr.aria-selected]=\"true\"\n [attr.aria-setsize]=\"value.length\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.data-p-focused]=\"focusedIndex === i\"\n [ngClass]=\"{ 'p-chips-token': true, 'p-focus': focusedIndex === i }\"\n (click)=\"onItemClick($event, item)\"\n [attr.data-pc-section]=\"'token'\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n <span *ngIf=\"!itemTemplate\" class=\"p-chips-token-label\" [attr.data-pc-section]=\"'label'\">{{ field ? resolveFieldData(item, field) : item }}</span>\n <ng-container *ngIf=\"!disabled\">\n <TimesCircleIcon [styleClass]=\"'p-chips-token-icon'\" *ngIf=\"!removeTokenIconTemplate\" (click)=\"removeItem($event, i)\" [attr.data-pc-section]=\"'removeTokenIcon'\" [attr.aria-hidden]=\"true\" />\