source: trip-planner-front/node_modules/primeng/esm2020/selectbutton/selectbutton.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: 24.9 KB
Line 
1import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ContentChild, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { ObjectUtils } from 'primeng/utils';
4import { RippleModule } from 'primeng/ripple';
5import { NG_VALUE_ACCESSOR } from '@angular/forms';
6import * as i0 from "@angular/core";
7import * as i1 from "@angular/common";
8import * as i2 from "primeng/ripple";
9export const SELECTBUTTON_VALUE_ACCESSOR = {
10 provide: NG_VALUE_ACCESSOR,
11 useExisting: forwardRef(() => SelectButton),
12 multi: true
13};
14export class SelectButton {
15 constructor(cd) {
16 this.cd = cd;
17 this.tabindex = 0;
18 this.onOptionClick = new EventEmitter();
19 this.onChange = new EventEmitter();
20 this.onModelChange = () => { };
21 this.onModelTouched = () => { };
22 }
23 getOptionLabel(option) {
24 return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : (option.label != undefined ? option.label : option);
25 }
26 getOptionValue(option) {
27 return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (this.optionLabel || option.value === undefined ? option : option.value);
28 }
29 isOptionDisabled(option) {
30 return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : (option.disabled !== undefined ? option.disabled : false);
31 }
32 writeValue(value) {
33 this.value = value;
34 this.cd.markForCheck();
35 }
36 registerOnChange(fn) {
37 this.onModelChange = fn;
38 }
39 registerOnTouched(fn) {
40 this.onModelTouched = fn;
41 }
42 setDisabledState(val) {
43 this.disabled = val;
44 this.cd.markForCheck();
45 }
46 onItemClick(event, option, index) {
47 if (this.disabled || this.isOptionDisabled(option)) {
48 return;
49 }
50 if (this.multiple) {
51 if (this.isSelected(option))
52 this.removeOption(option);
53 else
54 this.value = [...(this.value || []), this.getOptionValue(option)];
55 }
56 else {
57 this.value = this.getOptionValue(option);
58 }
59 this.onOptionClick.emit({
60 originalEvent: event,
61 option: option,
62 index: index
63 });
64 this.onModelChange(this.value);
65 this.onChange.emit({
66 originalEvent: event,
67 value: this.value
68 });
69 }
70 onBlur() {
71 this.onModelTouched();
72 }
73 removeOption(option) {
74 this.value = this.value.filter(val => !ObjectUtils.equals(val, this.getOptionValue(option), this.dataKey));
75 }
76 isSelected(option) {
77 let selected = false;
78 let optionValue = this.getOptionValue(option);
79 if (this.multiple) {
80 if (this.value) {
81 for (let val of this.value) {
82 if (ObjectUtils.equals(val, optionValue, this.dataKey)) {
83 selected = true;
84 break;
85 }
86 }
87 }
88 }
89 else {
90 selected = ObjectUtils.equals(this.getOptionValue(option), this.value, this.dataKey);
91 }
92 return selected;
93 }
94}
95SelectButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButton, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
96SelectButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: SelectButton, selector: "p-selectButton", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", tabindex: "tabindex", multiple: "multiple", style: "style", styleClass: "styleClass", ariaLabelledBy: "ariaLabelledBy", disabled: "disabled", dataKey: "dataKey" }, outputs: { onOptionClick: "onOptionClick", onChange: "onChange" }, host: { classAttribute: "p-element" }, providers: [SELECTBUTTON_VALUE_ACCESSOR], queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: `
97 <div [ngClass]="'p-selectbutton p-buttonset p-component'" [ngStyle]="style" [class]="styleClass" role="group">
98 <div *ngFor="let option of options; let i = index" #btn class="p-button p-component" [class]="option.styleClass" role="button" [attr.aria-pressed]="isSelected(option)"
99 [ngClass]="{'p-highlight':isSelected(option),
100 'p-disabled': disabled || isOptionDisabled(option),
101 'p-button-icon-only': (option.icon && !getOptionLabel(option))}"
102 (click)="onItemClick($event,option,i)" (keydown.enter)="onItemClick($event,option,i)"
103 [attr.title]="option.title" [attr.aria-label]="option.label" (blur)="onBlur()" [attr.tabindex]="disabled ? null : tabindex" [attr.aria-labelledby]="this.getOptionLabel(option)" pRipple>
104 <ng-container *ngIf="!itemTemplate else customcontent">
105 <span [ngClass]="'p-button-icon p-button-icon-left'" [class]="option.icon" *ngIf="option.icon"></span>
106 <span class="p-button-label">{{getOptionLabel(option)}}</span>
107 </ng-container>
108 <ng-template #customcontent>
109 <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
110 </ng-template>
111 </div>
112 </div>
113 `, isInline: true, styles: [".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-button-label{transition:all .2s}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.Ripple, selector: "[pRipple]" }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
114i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButton, decorators: [{
115 type: Component,
116 args: [{ selector: 'p-selectButton', template: `
117 <div [ngClass]="'p-selectbutton p-buttonset p-component'" [ngStyle]="style" [class]="styleClass" role="group">
118 <div *ngFor="let option of options; let i = index" #btn class="p-button p-component" [class]="option.styleClass" role="button" [attr.aria-pressed]="isSelected(option)"
119 [ngClass]="{'p-highlight':isSelected(option),
120 'p-disabled': disabled || isOptionDisabled(option),
121 'p-button-icon-only': (option.icon && !getOptionLabel(option))}"
122 (click)="onItemClick($event,option,i)" (keydown.enter)="onItemClick($event,option,i)"
123 [attr.title]="option.title" [attr.aria-label]="option.label" (blur)="onBlur()" [attr.tabindex]="disabled ? null : tabindex" [attr.aria-labelledby]="this.getOptionLabel(option)" pRipple>
124 <ng-container *ngIf="!itemTemplate else customcontent">
125 <span [ngClass]="'p-button-icon p-button-icon-left'" [class]="option.icon" *ngIf="option.icon"></span>
126 <span class="p-button-label">{{getOptionLabel(option)}}</span>
127 </ng-container>
128 <ng-template #customcontent>
129 <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
130 </ng-template>
131 </div>
132 </div>
133 `, providers: [SELECTBUTTON_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
134 'class': 'p-element'
135 }, styles: [".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-button-label{transition:all .2s}\n"] }]
136 }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { options: [{
137 type: Input
138 }], optionLabel: [{
139 type: Input
140 }], optionValue: [{
141 type: Input
142 }], optionDisabled: [{
143 type: Input
144 }], tabindex: [{
145 type: Input
146 }], multiple: [{
147 type: Input
148 }], style: [{
149 type: Input
150 }], styleClass: [{
151 type: Input
152 }], ariaLabelledBy: [{
153 type: Input
154 }], disabled: [{
155 type: Input
156 }], dataKey: [{
157 type: Input
158 }], onOptionClick: [{
159 type: Output
160 }], onChange: [{
161 type: Output
162 }], itemTemplate: [{
163 type: ContentChild,
164 args: [TemplateRef]
165 }] } });
166export class SelectButtonModule {
167}
168SelectButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
169SelectButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButtonModule, declarations: [SelectButton], imports: [CommonModule, RippleModule], exports: [SelectButton] });
170SelectButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButtonModule, imports: [[CommonModule, RippleModule]] });
171i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SelectButtonModule, decorators: [{
172 type: NgModule,
173 args: [{
174 imports: [CommonModule, RippleModule],
175 exports: [SelectButton],
176 declarations: [SelectButton]
177 }]
178 }] });
179//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0YnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL3NlbGVjdGJ1dHRvbi9zZWxlY3RidXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQUMsS0FBSyxFQUFDLE1BQU0sRUFBQyxZQUFZLEVBQUMsVUFBVSxFQUFtQixZQUFZLEVBQUMsV0FBVyxFQUFDLHVCQUF1QixFQUFFLGlCQUFpQixFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzVLLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUM3QyxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUM1QyxPQUFPLEVBQUMsaUJBQWlCLEVBQXVCLE1BQU0sZ0JBQWdCLENBQUM7Ozs7QUFFdkUsTUFBTSxDQUFDLE1BQU0sMkJBQTJCLEdBQVE7SUFDOUMsT0FBTyxFQUFFLGlCQUFpQjtJQUMxQixXQUFXLEVBQUUsVUFBVSxDQUFDLEdBQUcsRUFBRSxDQUFDLFlBQVksQ0FBQztJQUMzQyxLQUFLLEVBQUUsSUFBSTtDQUNaLENBQUM7QUE4QkYsTUFBTSxPQUFPLFlBQVk7SUFvQ3JCLFlBQW1CLEVBQXFCO1FBQXJCLE9BQUUsR0FBRixFQUFFLENBQW1CO1FBMUIvQixhQUFRLEdBQVcsQ0FBQyxDQUFDO1FBY3BCLGtCQUFhLEdBQXNCL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AgICAgICAgICAgICAgICAgIGlmIChPYmplY3RVdGlscy5lcXVhbHModmFsLCBvcHRpb25WYWx1ZSwgdGhpcy5kYXRhS2V5KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzZWxlY3RlZCA9IE9iamVjdFV0aWxzLmVxdWFscyh0aGlzLmdldE9wdGlvblZhbHVlKG9wdGlvbiksIHRoaXMudmFsdWUsIHRoaXMuZGF0YUtleSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gc2VsZWN0ZWQ7XG4gICAgfVxufVxuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsUmlwcGxlTW9kdWxlXSxcbiAgICBleHBvcnRzOiBbU2VsZWN0QnV0dG9uXSxcbiAgICBkZWNsYXJhdGlvbnM6IFtTZWxlY3RCdXR0b25dXG59KVxuZXhwb3J0IGNsYXNzIFNlbGVjdEJ1dHRvbk1vZHVsZSB7IH1cbiJdfQ==
Note: See TracBrowser for help on using the repository browser.