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

1 line
11 KiB
Plaintext
Raw Permalink Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-inputswitch.mjs","sources":["../../src/app/components/inputswitch/inputswitch.ts","../../src/app/components/inputswitch/primeng-inputswitch.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, NgModule, Output, ViewChild, ViewEncapsulation, booleanAttribute, forwardRef, numberAttribute } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { InputSwitchChangeEvent } from './inputswitch.interface';\n\nexport const INPUTSWITCH_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputSwitch),\n multi: true\n};\n/**\n * InputSwitch is used to select a boolean value.\n * @group Components\n */\n@Component({\n selector: 'p-inputSwitch',\n template: `\n <div\n [ngClass]=\"{ 'p-inputswitch p-component': true, 'p-inputswitch-checked': checked(), 'p-disabled': disabled, 'p-focus': focused }\"\n [ngStyle]=\"style\"\n [class]=\"styleClass\"\n (click)=\"onClick($event)\"\n [attr.data-pc-name]=\"'inputswitch'\"\n [attr.data-pc-section]=\"'root'\"\n >\n <div class=\"p-hidden-accessible\" [attr.data-pc-section]=\"'hiddenInputWrapper'\" [attr.data-p-hidden-accessible]=\"true\">\n <input\n #input\n [attr.id]=\"inputId\"\n type=\"checkbox\"\n role=\"switch\"\n [checked]=\"checked()\"\n [disabled]=\"disabled\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.name]=\"name\"\n [attr.tabindex]=\"tabindex\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [attr.data-pc-section]=\"'hiddenInput'\"\n pAutoFocus\n [autofocus]=\"autofocus\"\n />\n </div>\n <span class=\"p-inputswitch-slider\" [attr.data-pc-section]=\"'slider'\"></span>\n </div>\n `,\n providers: [INPUTSWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./inputswitch.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class InputSwitch {\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number | undefined;\n /**\n * Identifier of the input element.\n * @group Props\n */\n @Input() inputId: string | undefined;\n /**\n * Name of the input element.\n * @group Props\n */\n @Input() name: string | undefined;\n /**\n * When present, it specifies that the element should be disabled.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) disabled: boolean | undefined;\n /**\n * When present, it specifies that the component cannot be edited.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) readonly: boolean | undefined;\n /**\n * Value in checked state.\n * @group Props\n */\n @Input() trueValue: any = true;\n /**\n * Value in unchecked state.\n * @group Props\n */\n @Input() falseValue: any = false;\n /**\n * Used to define a string that autocomplete attribute the current element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Establishes relationships between the