1 line
62 KiB
Plaintext
1 line
62 KiB
Plaintext
|
{"version":3,"file":"primeng-treeselect.mjs","sources":["../../src/app/components/treeselect/treeselect.ts","../../src/app/components/treeselect/primeng-treeselect.ts"],"sourcesContent":["import { AnimationEvent } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n NgModule,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { OverlayOptions, OverlayService, PrimeNGConfig, PrimeTemplate, ScrollerOptions, SharedModule, TreeNode } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { ChevronDownIcon } from 'primeng/icons/chevrondown';\nimport { SearchIcon } from 'primeng/icons/search';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { Overlay, OverlayModule } from 'primeng/overlay';\nimport { RippleModule } from 'primeng/ripple';\nimport { Tree, TreeFilterEvent, TreeModule, TreeNodeSelectEvent, TreeNodeUnSelectEvent } from 'primeng/tree';\nimport { ObjectUtils, UniqueComponentId } from 'primeng/utils';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { TreeSelectNodeCollapseEvent, TreeSelectNodeExpandEvent } from './treeselect.interface';\n\nexport const TREESELECT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TreeSelect),\n multi: true\n};\n/**\n * TreeSelect is a form component to choose from hierarchical data.\n * @group Components\n */\n@Component({\n selector: 'p-treeSelect',\n template: `\n <div #container [ngClass]=\"containerClass()\" [class]=\"containerStyleClass\" [ngStyle]=\"containerStyle\" (click)=\"onClick($event)\">\n <div class=\"p-hidden-accessible\">\n <input\n #focusInput\n type=\"text\"\n role=\"combobox\"\n [attr.id]=\"inputId\"\n readonly\n [disabled]=\"disabled\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n [attr.tabindex]=\"!disabled ? tabindex : -1\"\n [attr.aria-controls]=\"overlayVisible ? listId : null\"\n [attr.aria-haspopup]=\"'tree'\"\n [attr.aria-expanded]=\"overlayVisible ?? false\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel || (label === 'p-emptylabel' ? undefined : label)\"\n pAutoFocus\n [autofocus]=\"autofocus\"\n />\n </div>\n <div class=\"p-treeselect-label-container\">\n <div [ngClass]=\"labelClass()\" [class]=\"labelStyleClass\" [ngStyle]=\"labelStyle\">\n <ng-container *ngIf=\"valueTemplate; else defaultValueTemplate\">\n <ng-container *ngTemplateOutlet=\"valueTemplate; context: { $implicit: value, placeholder: placeholder }\"></ng-container>\n </ng-container>\n <ng-template #defaultValueTemplate>\n <ng-container *ngIf=\"display === 'comma'; else chipsValueTemplate\">\n {{ label || 'empty' }}\n </ng-container>\n <ng-template #chipsValueTemplate>\n <div *ngFor=\"let node of value\" class=\"p-treeselect-token\">\n <span class=\"p-treeselect-token-label\">{{ node.label }}</span>\n </div>\n <ng-container *ngIf=\"emptyValue\">{{ placeholder || 'empty' }}</ng-container>\n </ng-template>\n </ng-t
|