source: trip-planner-front/node_modules/.cache/babel-webpack/cf536f546e6536107c95d44ab21e3824.json@ 571e0df

Last change on this file since 571e0df was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

  • Property mode set to 100644
File size: 34.7 KB
Line 
1{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { ObjectUtils } from 'primeng/utils';\nimport * as i2 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nfunction SelectButton_div_1_ng_container_2_span_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 8);\n }\n\n if (rf & 2) {\n const option_r1 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵclassMap(option_r1.icon);\n i0.ɵɵproperty(\"ngClass\", \"p-button-icon p-button-icon-left\");\n }\n}\n\nfunction SelectButton_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, SelectButton_div_1_ng_container_2_span_1_Template, 1, 3, \"span\", 6);\n i0.ɵɵelementStart(2, \"span\", 7);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n\n if (rf & 2) {\n const option_r1 = i0.ɵɵnextContext().$implicit;\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", option_r1.icon);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r4.getOptionLabel(option_r1));\n }\n}\n\nfunction SelectButton_div_1_ng_template_3_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nconst _c0 = function (a0, a1) {\n return {\n $implicit: a0,\n index: a1\n };\n};\n\nfunction SelectButton_div_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SelectButton_div_1_ng_template_3_ng_container_0_Template, 1, 0, \"ng-container\", 9);\n }\n\n if (rf & 2) {\n const ctx_r11 = i0.ɵɵnextContext();\n const option_r1 = ctx_r11.$implicit;\n const i_r2 = ctx_r11.index;\n const ctx_r6 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r6.itemTemplate)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction2(2, _c0, option_r1, i_r2));\n }\n}\n\nconst _c1 = function (a0, a1, a2) {\n return {\n \"p-highlight\": a0,\n \"p-disabled\": a1,\n \"p-button-icon-only\": a2\n };\n};\n\nfunction SelectButton_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"div\", 2, 3);\n i0.ɵɵlistener(\"click\", function SelectButton_div_1_Template_div_click_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r13);\n const option_r1 = restoredCtx.$implicit;\n const i_r2 = restoredCtx.index;\n const ctx_r12 = i0.ɵɵnextContext();\n return ctx_r12.onItemClick($event, option_r1, i_r2);\n })(\"keydown.enter\", function SelectButton_div_1_Template_div_keydown_enter_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r13);\n const option_r1 = restoredCtx.$implicit;\n const i_r2 = restoredCtx.index;\n const ctx_r14 = i0.ɵɵnextContext();\n return ctx_r14.onItemClick($event, option_r1, i_r2);\n })(\"blur\", function SelectButton_div_1_Template_div_blur_0_listener() {\n i0.ɵɵrestoreView(_r13);\n const ctx_r15 = i0.ɵɵnextContext();\n return ctx_r15.onBlur();\n });\n i0.ɵɵtemplate(2, SelectButton_div_1_ng_container_2_Template, 4, 2, \"ng-container\", 4);\n i0.ɵɵtemplate(3, SelectButton_div_1_ng_template_3_Template, 1, 5, \"ng-template\", null, 5, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const option_r1 = ctx.$implicit;\n\n const _r5 = i0.ɵɵreference(4);\n\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(option_r1.styleClass);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction3(10, _c1, ctx_r0.isSelected(option_r1), ctx_r0.disabled || ctx_r0.isOptionDisabled(option_r1), option_r1.icon && !ctx_r0.getOptionLabel(option_r1)));\n i0.ɵɵattribute(\"aria-pressed\", ctx_r0.isSelected(option_r1))(\"title\", option_r1.title)(\"aria-label\", option_r1.label)(\"tabindex\", ctx_r0.disabled ? null : ctx_r0.tabindex)(\"aria-labelledby\", ctx_r0.getOptionLabel(option_r1));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.itemTemplate)(\"ngIfElse\", _r5);\n }\n}\n\nconst SELECTBUTTON_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButton),\n multi: true\n};\n\nclass SelectButton {\n constructor(cd) {\n this.cd = cd;\n this.tabindex = 0;\n this.onOptionClick = new EventEmitter();\n this.onChange = new EventEmitter();\n\n this.onModelChange = () => {};\n\n this.onModelTouched = () => {};\n }\n\n getOptionLabel(option) {\n return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option.label != undefined ? option.label : option;\n }\n\n getOptionValue(option) {\n return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : this.optionLabel || option.value === undefined ? option : option.value;\n }\n\n isOptionDisabled(option) {\n return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : option.disabled !== undefined ? option.disabled : false;\n }\n\n writeValue(value) {\n this.value = value;\n this.cd.markForCheck();\n }\n\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val) {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n onItemClick(event, option, index) {\n if (this.disabled || this.isOptionDisabled(option)) {\n return;\n }\n\n if (this.multiple) {\n if (this.isSelected(option)) this.removeOption(option);else this.value = [...(this.value || []), this.getOptionValue(option)];\n } else {\n this.value = this.getOptionValue(option);\n }\n\n this.onOptionClick.emit({\n originalEvent: event,\n option: option,\n index: index\n });\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n\n onBlur() {\n this.onModelTouched();\n }\n\n removeOption(option) {\n this.value = this.value.filter(val => !ObjectUtils.equals(val, this.getOptionValue(option), this.dataKey));\n }\n\n isSelected(option) {\n let selected = false;\n let optionValue = this.getOptionValue(option);\n\n if (this.multiple) {\n if (this.value) {\n for (let val of this.value) {\n if (ObjectUtils.equals(val, optionValue, this.dataKey)) {\n selected = true;\n break;\n }\n }\n }\n } else {\n selected = ObjectUtils.equals(this.getOptionValue(option), this.value, this.dataKey);\n }\n\n return selected;\n }\n\n}\n\nSelectButton.ɵfac = function SelectButton_Factory(t) {\n return new (t || SelectButton)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n\nSelectButton.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SelectButton,\n selectors: [[\"p-selectButton\"]],\n contentQueries: function SelectButton_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TemplateRef, 5);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.itemTemplate = _t.first);\n }\n },\n hostAttrs: [1, \"p-element\"],\n inputs: {\n options: \"options\",\n optionLabel: \"optionLabel\",\n optionValue: \"optionValue\",\n optionDisabled: \"optionDisabled\",\n tabindex: \"tabindex\",\n multiple: \"multiple\",\n style: \"style\",\n styleClass: \"styleClass\",\n ariaLabelledBy: \"ariaLabelledBy\",\n disabled: \"disabled\",\n dataKey: \"dataKey\"\n },\n outputs: {\n onOptionClick: \"onOptionClick\",\n onChange: \"onChange\"\n },\n features: [i0.ɵɵProvidersFeature([SELECTBUTTON_VALUE_ACCESSOR])],\n decls: 2,\n vars: 5,\n consts: [[\"role\", \"group\", 3, \"ngClass\", \"ngStyle\"], [\"class\", \"p-button p-component\", \"role\", \"button\", \"pRipple\", \"\", 3, \"class\", \"ngClass\", \"click\", \"keydown.enter\", \"blur\", 4, \"ngFor\", \"ngForOf\"], [\"role\", \"button\", \"pRipple\", \"\", 1, \"p-button\", \"p-component\", 3, \"ngClass\", \"click\", \"keydown.enter\", \"blur\"], [\"btn\", \"\"], [4, \"ngIf\", \"ngIfElse\"], [\"customcontent\", \"\"], [3, \"ngClass\", \"class\", 4, \"ngIf\"], [1, \"p-button-label\"], [3, \"ngClass\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]],\n template: function SelectButton_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, SelectButton_div_1_Template, 5, 14, \"div\", 1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.styleClass);\n i0.ɵɵproperty(\"ngClass\", \"p-selectbutton p-buttonset p-component\")(\"ngStyle\", ctx.style);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.options);\n }\n },\n directives: [i1.NgClass, i1.NgStyle, i1.NgForOf, i2.Ripple, i1.NgIf, i1.NgTemplateOutlet],\n 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\"],\n encapsulation: 2,\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(SelectButton, [{\n type: Component,\n args: [{\n selector: 'p-selectButton',\n template: `\n <div [ngClass]=\"'p-selectbutton p-buttonset p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" role=\"group\">\n <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)\"\n [ngClass]=\"{'p-highlight':isSelected(option),\n 'p-disabled': disabled || isOptionDisabled(option),\n 'p-button-icon-only': (option.icon && !getOptionLabel(option))}\"\n (click)=\"onItemClick($event,option,i)\" (keydown.enter)=\"onItemClick($event,option,i)\"\n [attr.title]=\"option.title\" [attr.aria-label]=\"option.label\" (blur)=\"onBlur()\" [attr.tabindex]=\"disabled ? null : tabindex\" [attr.aria-labelledby]=\"this.getOptionLabel(option)\" pRipple>\n <ng-container *ngIf=\"!itemTemplate else customcontent\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"option.icon\" *ngIf=\"option.icon\"></span>\n <span class=\"p-button-label\">{{getOptionLabel(option)}}</span>\n </ng-container>\n <ng-template #customcontent>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: option, index: i}\"></ng-container>\n </ng-template>\n </div>\n </div>\n `,\n providers: [SELECTBUTTON_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n },\n 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\"]\n }]\n }], function () {\n return [{\n type: i0.ChangeDetectorRef\n }];\n }, {\n options: [{\n type: Input\n }],\n optionLabel: [{\n type: Input\n }],\n optionValue: [{\n type: Input\n }],\n optionDisabled: [{\n type: Input\n }],\n tabindex: [{\n type: Input\n }],\n multiple: [{\n type: Input\n }],\n style: [{\n type: Input\n }],\n styleClass: [{\n type: Input\n }],\n ariaLabelledBy: [{\n type: Input\n }],\n disabled: [{\n type: Input\n }],\n dataKey: [{\n type: Input\n }],\n onOptionClick: [{\n type: Output\n }],\n onChange: [{\n type: Output\n }],\n itemTemplate: [{\n type: ContentChild,\n args: [TemplateRef]\n }]\n });\n})();\n\nclass SelectButtonModule {}\n\nSelectButtonModule.ɵfac = function SelectButtonModule_Factory(t) {\n return new (t || SelectButtonModule)();\n};\n\nSelectButtonModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SelectButtonModule\n});\nSelectButtonModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, RippleModule]]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(SelectButtonModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, RippleModule],\n exports: [SelectButton],\n declarations: [SelectButton]\n }]\n }], null, null);\n})();\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { SELECTBUTTON_VALUE_ACCESSOR, SelectButton, SelectButtonModule };","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/node_modules/primeng/fesm2015/primeng-selectbutton.mjs"],"names":["i0","forwardRef","EventEmitter","TemplateRef","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","Output","ContentChild","NgModule","i1","CommonModule","ObjectUtils","i2","RippleModule","NG_VALUE_ACCESSOR","SELECTBUTTON_VALUE_ACCESSOR","provide","useExisting","SelectButton","multi","constructor","cd","tabindex","onOptionClick","onChange","onModelChange","onModelTouched","getOptionLabel","option","optionLabel","resolveFieldData","label","undefined","getOptionValue","optionValue","value","isOptionDisabled","optionDisabled","disabled","writeValue","markForCheck","registerOnChange","fn","registerOnTouched","setDisabledState","val","onItemClick","event","index","multiple","isSelected","removeOption","emit","originalEvent","onBlur","filter","equals","dataKey","selected","ɵfac","ChangeDetectorRef","ɵcmp","NgClass","NgStyle","NgForOf","Ripple","NgIf","NgTemplateOutlet","type","args","selector","template","providers","changeDetection","OnPush","encapsulation","None","host","styles","options","style","styleClass","ariaLabelledBy","itemTemplate","SelectButtonModule","ɵmod","ɵinj","imports","exports","declarations"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,WAAnC,EAAgDC,SAAhD,EAA2DC,uBAA3D,EAAoFC,iBAApF,EAAuGC,KAAvG,EAA8GC,MAA9G,EAAsHC,YAAtH,EAAoIC,QAApI,QAAoJ,eAApJ;AACA,OAAO,KAAKC,EAAZ,MAAoB,iBAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,OAAO,KAAKC,EAAZ,MAAoB,gBAApB;AACA,SAASC,YAAT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AAnB;AAAA,mBAA+GyB,kBAA/G;AAAA;;AACAA,kBAAkB,CAACC,IAAnB,kBA1E+FvF,EA0E/F;AAAA,QAAgHsF;AAAhH;AACAA,kBAAkB,CAACE,IAAnB,kBA3E+FxF,EA2E/F;AAAA,YAA8I,CAACY,YAAD,EAAeG,YAAf,CAA9I;AAAA;;AACA;AAAA,qDA5E+Ff,EA4E/F,mBAA2FsF,kBAA3F,EAA2H,CAAC;AAChHhB,IAAAA,IAAI,EAAE5D,QAD0G;AAEhH6D,IAAAA,IAAI,EAAE,CAAC;AACCkB,MAAAA,OAAO,EAAE,CAAC7E,YAAD,EAAeG,YAAf,CADV;AAEC2E,MAAAA,OAAO,EAAE,CAACtE,YAAD,CAFV;AAGCuE,MAAAA,YAAY,EAAE,CAACvE,YAAD;AAHf,KAAD;AAF0G,GAAD,CAA3H;AAAA;AASA;AACA;AACA;;;AAEA,SAASH,2BAAT,EAAsCG,YAAtC,EAAoDkE,kBAApD","sourcesContent":["import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { ObjectUtils } from 'primeng/utils';\nimport * as i2 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nconst SELECTBUTTON_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButton),\n multi: true\n};\nclass SelectButton {\n constructor(cd) {\n this.cd = cd;\n this.tabindex = 0;\n this.onOptionClick = new EventEmitter();\n this.onChange = new EventEmitter();\n this.onModelChange = () => { };\n this.onModelTouched = () => { };\n }\n getOptionLabel(option) {\n return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : (option.label != undefined ? option.label : option);\n }\n getOptionValue(option) {\n return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (this.optionLabel || option.value === undefined ? option : option.value);\n }\n isOptionDisabled(option) {\n return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : (option.disabled !== undefined ? option.disabled : false);\n }\n writeValue(value) {\n this.value = value;\n this.cd.markForCheck();\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n setDisabledState(val) {\n this.disabled = val;\n this.cd.markForCheck();\n }\n onItemClick(event, option, index) {\n if (this.disabled || this.isOptionDisabled(option)) {\n return;\n }\n if (this.multiple) {\n if (this.isSelected(option))\n this.removeOption(option);\n else\n this.value = [...(this.value || []), this.getOptionValue(option)];\n }\n else {\n this.value = this.getOptionValue(option);\n }\n this.onOptionClick.emit({\n originalEvent: event,\n option: option,\n index: index\n });\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n onBlur() {\n this.onModelTouched();\n }\n removeOption(option) {\n this.value = this.value.filter(val => !ObjectUtils.equals(val, this.getOptionValue(option), this.dataKey));\n }\n isSelected(option) {\n let selected = false;\n let optionValue = this.getOptionValue(option);\n if (this.multiple) {\n if (this.value) {\n for (let val of this.value) {\n if (ObjectUtils.equals(val, optionValue, this.dataKey)) {\n selected = true;\n break;\n }\n }\n }\n }\n else {\n selected = ObjectUtils.equals(this.getOptionValue(option), this.value, this.dataKey);\n }\n return selected;\n }\n}\nSelectButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButton, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nSelectButton.ɵ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: `\n <div [ngClass]=\"'p-selectbutton p-buttonset p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" role=\"group\">\n <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)\"\n [ngClass]=\"{'p-highlight':isSelected(option),\n 'p-disabled': disabled || isOptionDisabled(option),\n 'p-button-icon-only': (option.icon && !getOptionLabel(option))}\"\n (click)=\"onItemClick($event,option,i)\" (keydown.enter)=\"onItemClick($event,option,i)\"\n [attr.title]=\"option.title\" [attr.aria-label]=\"option.label\" (blur)=\"onBlur()\" [attr.tabindex]=\"disabled ? null : tabindex\" [attr.aria-labelledby]=\"this.getOptionLabel(option)\" pRipple>\n <ng-container *ngIf=\"!itemTemplate else customcontent\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"option.icon\" *ngIf=\"option.icon\"></span>\n <span class=\"p-button-label\">{{getOptionLabel(option)}}</span>\n </ng-container>\n <ng-template #customcontent>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: option, index: i}\"></ng-container>\n </ng-template>\n </div>\n </div>\n `, 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 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButton, decorators: [{\n type: Component,\n args: [{ selector: 'p-selectButton', template: `\n <div [ngClass]=\"'p-selectbutton p-buttonset p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" role=\"group\">\n <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)\"\n [ngClass]=\"{'p-highlight':isSelected(option),\n 'p-disabled': disabled || isOptionDisabled(option),\n 'p-button-icon-only': (option.icon && !getOptionLabel(option))}\"\n (click)=\"onItemClick($event,option,i)\" (keydown.enter)=\"onItemClick($event,option,i)\"\n [attr.title]=\"option.title\" [attr.aria-label]=\"option.label\" (blur)=\"onBlur()\" [attr.tabindex]=\"disabled ? null : tabindex\" [attr.aria-labelledby]=\"this.getOptionLabel(option)\" pRipple>\n <ng-container *ngIf=\"!itemTemplate else customcontent\">\n <span [ngClass]=\"'p-button-icon p-button-icon-left'\" [class]=\"option.icon\" *ngIf=\"option.icon\"></span>\n <span class=\"p-button-label\">{{getOptionLabel(option)}}</span>\n </ng-container>\n <ng-template #customcontent>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: option, index: i}\"></ng-container>\n </ng-template>\n </div>\n </div>\n `, providers: [SELECTBUTTON_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {\n 'class': 'p-element'\n }, 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\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { options: [{\n type: Input\n }], optionLabel: [{\n type: Input\n }], optionValue: [{\n type: Input\n }], optionDisabled: [{\n type: Input\n }], tabindex: [{\n type: Input\n }], multiple: [{\n type: Input\n }], style: [{\n type: Input\n }], styleClass: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input\n }], disabled: [{\n type: Input\n }], dataKey: [{\n type: Input\n }], onOptionClick: [{\n type: Output\n }], onChange: [{\n type: Output\n }], itemTemplate: [{\n type: ContentChild,\n args: [TemplateRef]\n }] } });\nclass SelectButtonModule {\n}\nSelectButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nSelectButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButtonModule, declarations: [SelectButton], imports: [CommonModule, RippleModule], exports: [SelectButton] });\nSelectButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButtonModule, imports: [[CommonModule, RippleModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: SelectButtonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, RippleModule],\n exports: [SelectButton],\n declarations: [SelectButton]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SELECTBUTTON_VALUE_ACCESSOR, SelectButton, SelectButtonModule };\n"]},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.