1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
|
{"version":3,"file":"primeng-tristatecheckbox.mjs","sources":["../../src/app/components/tristatecheckbox/tristatecheckbox.ts","../../src/app/components/tristatecheckbox/primeng-tristatecheckbox.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation, booleanAttribute, forwardRef, numberAttribute } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { CheckIcon } from 'primeng/icons/check';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { TriStateCheckboxChangeEvent } from './tristatecheckbox.interface';\n\nexport const TRISTATECHECKBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TriStateCheckbox),\n multi: true\n};\n/**\n * TriStateCheckbox is used to select either 'true', 'false' or 'null' as the value.\n * @group Components\n */\n@Component({\n selector: 'p-triStateCheckbox',\n template: `\n <div\n [ngStyle]=\"style\"\n [ngClass]=\"{ 'p-checkbox p-component': true, 'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused, 'p-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\n [class]=\"styleClass\"\n (click)=\"onClick($event, input)\"\n [attr.data-pc-name]=\"'tristatecheckbox'\"\n [attr.data-pc-section]=\"'root'\"\n >\n <div class=\"p-hidden-accessible\">\n <input\n #input\n [attr.id]=\"inputId\"\n type=\"checkbox\"\n [name]=\"name\"\n [attr.tabindex]=\"tabindex\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel\"\n inputmode=\"none\"\n [attr.data-pc-section]=\"'hiddenInput'\"\n pAutoFocus\n [autofocus]=\"autofocus\"\n />\n </div>\n <div class=\"p-checkbox-box\" role=\"checkbox\" [attr.aria-checked]=\"value === true\" [ngClass]=\"{ 'p-highlight': value != null, 'p-disabled': disabled, 'p-focus': focused }\">\n <ng-container *ngIf=\"value === true\">\n <span *ngIf=\"checkboxTrueIcon\" [ngClass]=\"checkboxTrueIcon\" class=\"p-checkbox-icon\" [attr.data-pc-section]=\"'checkIcon'\"></span>\n <ng-container *ngIf=\"!checkboxTrueIcon\">\n <CheckIcon [styleClass]=\"'p-checkbox-icon'\" *ngIf=\"!checkIconTemplate\" [attr.data-pc-section]=\"'checkIcon'\" />\n <span *ngIf=\"checkIconTemplate\" class=\"p-checkbox-icon\" [attr.data-pc-section]=\"'checkIcon'\">\n <ng-template *ngTemplateOutlet=\"checkIconTemplate\"></ng-template>\n </span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"value === false\">\n <span *ngIf=\"checkboxFalseIcon\" [ngClass]=\"checkboxFalseIcon\" class=\"p-checkbox-icon\" [attr.data-pc-section]=\"'uncheckIcon'\"></span>\n <ng-container *ngIf=\"!checkboxFalseIcon\">\n <TimesIcon [styleClass]=\"'p-checkbox-icon'\" *ngIf=\"!uncheckIconTemplate\" [attr.data-pc-section]=\"'uncheckIcon'\" />\n <span class=\"p-checkbox-icon\" *ngIf=\"uncheckIconTemplate\" [attr.data-pc-section]=\"'uncheckIcon'\">\n <ng-t
|