source: trip-planner-front/node_modules/primeng/esm2020/tristatecheckbox/tristatecheckbox.mjs@ 1ad8e64

Last change on this file since 1ad8e64 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 17.6 KB
RevLine 
[59329aa]1import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { NG_VALUE_ACCESSOR } from '@angular/forms';
4import * as i0 from "@angular/core";
5import * as i1 from "@angular/common";
6export const TRISTATECHECKBOX_VALUE_ACCESSOR = {
7 provide: NG_VALUE_ACCESSOR,
8 useExisting: forwardRef(() => TriStateCheckbox),
9 multi: true
10};
11export class TriStateCheckbox {
12 constructor(cd) {
13 this.cd = cd;
14 this.checkboxTrueIcon = 'pi pi-check';
15 this.checkboxFalseIcon = 'pi pi-times';
16 this.onChange = new EventEmitter();
17 this.onModelChange = () => { };
18 this.onModelTouched = () => { };
19 }
20 onClick(event, input) {
21 if (!this.disabled && !this.readonly) {
22 this.toggle(event);
23 this.focused = true;
24 input.focus();
25 }
26 }
27 onKeydown(event) {
28 if (event.keyCode == 32) {
29 event.preventDefault();
30 }
31 }
32 onKeyup(event) {
33 if (event.keyCode == 32 && !this.readonly) {
34 this.toggle(event);
35 event.preventDefault();
36 }
37 }
38 toggle(event) {
39 if (this.value == null || this.value == undefined)
40 this.value = true;
41 else if (this.value == true)
42 this.value = false;
43 else if (this.value == false)
44 this.value = null;
45 this.onModelChange(this.value);
46 this.onChange.emit({
47 originalEvent: event,
48 value: this.value
49 });
50 }
51 onFocus() {
52 this.focused = true;
53 }
54 onBlur() {
55 this.focused = false;
56 this.onModelTouched();
57 }
58 registerOnChange(fn) {
59 this.onModelChange = fn;
60 }
61 registerOnTouched(fn) {
62 this.onModelTouched = fn;
63 }
64 writeValue(value) {
65 this.value = value;
66 this.cd.markForCheck();
67 }
68 setDisabledState(disabled) {
69 this.disabled = disabled;
70 this.cd.markForCheck();
71 }
72}
73TriStateCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckbox, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
74TriStateCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: TriStateCheckbox, selector: "p-triStateCheckbox", inputs: { disabled: "disabled", name: "name", ariaLabelledBy: "ariaLabelledBy", tabindex: "tabindex", inputId: "inputId", style: "style", styleClass: "styleClass", label: "label", readonly: "readonly", checkboxTrueIcon: "checkboxTrueIcon", checkboxFalseIcon: "checkboxFalseIcon" }, outputs: { onChange: "onChange" }, host: { classAttribute: "p-element" }, providers: [TRISTATECHECKBOX_VALUE_ACCESSOR], ngImport: i0, template: `
75 <div [ngStyle]="style" [ngClass]="{'p-checkbox p-component': true,'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused}" [class]="styleClass">
76 <div class="p-hidden-accessible">
77 <input #input type="text" [attr.id]="inputId" [name]="name" [attr.tabindex]="tabindex" [readonly]="readonly" [disabled]="disabled" (keyup)="onKeyup($event)" (keydown)="onKeydown($event)" (focus)="onFocus()" (blur)="onBlur()" [attr.aria-labelledby]="ariaLabelledBy" inputmode="none">
78 </div>
79 <div class="p-checkbox-box" (click)="onClick($event,input)" role="checkbox" [attr.aria-checked]="value === true"
80 [ngClass]="{'p-highlight':value!=null,'p-disabled':disabled,'p-focus':focused}">
81 <span class="p-checkbox-icon" [ngClass]="value === true ? checkboxTrueIcon : value === false ? checkboxFalseIcon : ''"></span>
82 </div>
83 </div>
84 <label class="p-checkbox-label" (click)="onClick($event,input)"
85 [ngClass]="{'p-checkbox-label-active':value!=null, 'p-disabled':disabled, 'p-checkbox-label-focus':focused}"
86 *ngIf="label" [attr.for]="inputId">{{label}}</label>
87 `, isInline: true, directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
88i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckbox, decorators: [{
89 type: Component,
90 args: [{
91 selector: 'p-triStateCheckbox',
92 template: `
93 <div [ngStyle]="style" [ngClass]="{'p-checkbox p-component': true,'p-checkbox-disabled': disabled, 'p-checkbox-focused': focused}" [class]="styleClass">
94 <div class="p-hidden-accessible">
95 <input #input type="text" [attr.id]="inputId" [name]="name" [attr.tabindex]="tabindex" [readonly]="readonly" [disabled]="disabled" (keyup)="onKeyup($event)" (keydown)="onKeydown($event)" (focus)="onFocus()" (blur)="onBlur()" [attr.aria-labelledby]="ariaLabelledBy" inputmode="none">
96 </div>
97 <div class="p-checkbox-box" (click)="onClick($event,input)" role="checkbox" [attr.aria-checked]="value === true"
98 [ngClass]="{'p-highlight':value!=null,'p-disabled':disabled,'p-focus':focused}">
99 <span class="p-checkbox-icon" [ngClass]="value === true ? checkboxTrueIcon : value === false ? checkboxFalseIcon : ''"></span>
100 </div>
101 </div>
102 <label class="p-checkbox-label" (click)="onClick($event,input)"
103 [ngClass]="{'p-checkbox-label-active':value!=null, 'p-disabled':disabled, 'p-checkbox-label-focus':focused}"
104 *ngIf="label" [attr.for]="inputId">{{label}}</label>
105 `,
106 providers: [TRISTATECHECKBOX_VALUE_ACCESSOR],
107 changeDetection: ChangeDetectionStrategy.OnPush,
108 encapsulation: ViewEncapsulation.None,
109 host: {
110 'class': 'p-element'
111 }
112 }]
113 }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
114 type: Input
115 }], name: [{
116 type: Input
117 }], ariaLabelledBy: [{
118 type: Input
119 }], tabindex: [{
120 type: Input
121 }], inputId: [{
122 type: Input
123 }], style: [{
124 type: Input
125 }], styleClass: [{
126 type: Input
127 }], label: [{
128 type: Input
129 }], readonly: [{
130 type: Input
131 }], checkboxTrueIcon: [{
132 type: Input
133 }], checkboxFalseIcon: [{
134 type: Input
135 }], onChange: [{
136 type: Output
137 }] } });
138export class TriStateCheckboxModule {
139}
140TriStateCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141TriStateCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckboxModule, declarations: [TriStateCheckbox], imports: [CommonModule], exports: [TriStateCheckbox] });
142TriStateCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckboxModule, imports: [[CommonModule]] });
143i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TriStateCheckboxModule, decorators: [{
144 type: NgModule,
145 args: [{
146 imports: [CommonModule],
147 exports: [TriStateCheckbox],
148 declarations: [TriStateCheckbox]
149 }]
150 }] });
151//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJpc3RhdGVjaGVja2JveC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90cmlzdGF0ZWNoZWNrYm94L3RyaXN0YXRlY2hlY2tib3gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQUMsS0FBSyxFQUFDLE1BQU0sRUFBQyxZQUFZLEVBQUMsVUFBVSxFQUFtQix1QkFBdUIsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNuSixPQUFPLE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gIHRoaXMuZm9jdXNlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgb25CbHVyKCkge1xuICAgICAgICB0aGlzLmZvY3VzZWQgPSBmYWxzZTtcbiAgICAgICAgdGhpcy5vbk1vZGVsVG91Y2hlZCgpO1xuICAgIH1cblxuICAgIHJlZ2lzdGVyT25DaGFuZ2UoZm46IEZ1bmN0aW9uKTogdm9pZCB7XG4gICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSA9IGZuO1xuICAgIH1cblxuICAgIHJlZ2lzdGVyT25Ub3VjaGVkKGZuOiBGdW5jdGlvbik6IHZvaWQge1xuICAgICAgICB0aGlzLm9uTW9kZWxUb3VjaGVkID0gZm47XG4gICAgfVxuXG4gICAgd3JpdGVWYWx1ZSh2YWx1ZTogYW55KSA6IHZvaWQge1xuICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7XG4gICAgICAgIHRoaXMuY2QubWFya0ZvckNoZWNrKCk7XG4gICAgfVxuXG4gICAgc2V0RGlzYWJsZWRTdGF0ZShkaXNhYmxlZDogYm9vbGVhbik6IHZvaWQge1xuICAgICAgICB0aGlzLmRpc2FibGVkID0gZGlzYWJsZWQ7XG4gICAgICAgIHRoaXMuY2QubWFya0ZvckNoZWNrKCk7XG4gICAgfVxufVxuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICAgIGV4cG9ydHM6IFtUcmlTdGF0ZUNoZWNrYm94XSxcbiAgICBkZWNsYXJhdGlvbnM6IFtUcmlTdGF0ZUNoZWNrYm94XVxufSlcbmV4cG9ydCBjbGFzcyBUcmlTdGF0ZUNoZWNrYm94TW9kdWxlIHsgfVxuIl19
Note: See TracBrowser for help on using the repository browser.