source: trip-planner-front/node_modules/primeng/fesm2020/primeng-badge.mjs.map

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

adding photos

  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[59329aa]1{"version":3,"file":"primeng-badge.mjs","sources":["../../src/app/components/badge/badge.ts","../../src/app/components/badge/primeng-badge.ts"],"sourcesContent":["import { NgModule, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, QueryList, ContentChildren, TemplateRef, Directive, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SharedModule } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { UniqueComponentId } from 'primeng/utils';\n\n@Directive({\n selector: '[pBadge]',\n host: {\n 'class': 'p-element'\n }\n})\nexport class BadgeDirective implements AfterViewInit, OnDestroy {\n\n @Input() iconPos: 'left' | 'right' | 'top' | 'bottom' = 'left';\n\n public _value: string;\n\n public initialized: boolean;\n\n private id: string;\n\n constructor(public el: ElementRef) {}\n\n ngAfterViewInit() {\n this.id = UniqueComponentId() + '_badge';\n let el = this.el.nativeElement.nodeName.indexOf(\"-\") != -1 ? this.el.nativeElement.firstChild : this.el.nativeElement;\n\n let badge = document.createElement('span');\n badge.id = this.id ;\n badge.className = 'p-badge p-component';\n\n if (this.severity) {\n DomHandler.addClass(badge, 'p-badge-' + this.severity);\n }\n\n if (this.value != null) {\n badge.appendChild(document.createTextNode(this.value));\n\n if (String(this.value).length === 1) {\n DomHandler.addClass(badge, 'p-badge-no-gutter');\n }\n }\n else {\n DomHandler.addClass(badge, 'p-badge-dot');\n }\n\n DomHandler.addClass(el, 'p-overlay-badge');\n el.appendChild(badge);\n\n this.initialized = true;\n }\n\n @Input() get value(): string {\n return this._value;\n }\n\n set value(val: string) {\n if (val !== this._value) {\n this._value = val;\n\n if (this.initialized) {\n let badge = document.getElementById(this.id);\n\n if (this._value) {\n if (DomHandler.hasClass(badge, 'p-badge-dot'))\n DomHandler.removeClass(badge, 'p-badge-dot');\n\n if (String(this._value).length === 1) {\n DomHandler.addClass(badge, 'p-badge-no-gutter');\n }\n else {\n DomHandler.removeClass(badge, 'p-badge-no-gutter');\n }\n }\n else if (!this._value && !DomHandler.hasClass(badge, 'p-badge-dot')) {\n DomHandler.addClass(badge, 'p-badge-dot');\n }\n\n badge.innerHTML = '';\n badge.appendChild(document.createTextNode(this._value));\n }\n }\n }\n\n @Input() severity: string;\n\n ngOnDestroy() {\n this.initialized = false;\n }\n}\n\n@Component({\n selector: 'p-badge',\n template: `\n <span [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"style\">\n {{value}}\n </span>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./badge.css'],\n host: {\n 'class': 'p-element'\n }\n})\nexport class Badge {\n\n @Input() styleClass: string;\n\n @Input() style: any;\n\n @Input() size: string;\n\n @Input() severity: string;\n\n @Input() value: string;\n\n containerClass() {\n return {\n 'p-badge p-component': true,\n 'p-badge-no-gutter': this.value != undefined && String(this.value).length === 1,\n 'p-badge-lg': this.size === 'large',\n 'p-badge-xl': this.size === 'xlarge',\n 'p-badge-info': this.severity === 'info',\n 'p-badge-success': this.severity === 'success',\n 'p-badge-warning': this.severity === 'warning',\n 'p-badge-danger': this.severity === 'danger'\n };\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Badge, BadgeDirective, SharedModule],\n declarations: [Badge, BadgeDirective]\n})\nexport class BadgeModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAYa,cAAc;IAUvB,YAAmB,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;QARxB,YAAO,GAAwC,MAAM,CAAC;KAQ1B;IAErC,eAAe;QACX,IAAI,CAAC,EAAE,GAAG,iBAAiB,EAAE,GAAG,QAAQ,CAAC;QACzC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAA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