1 line
28 KiB
Plaintext
1 line
28 KiB
Plaintext
|
{"version":3,"file":"primeng-image.mjs","sources":["../../src/app/components/image/image.ts","../../src/app/components/image/primeng-image.ts"],"sourcesContent":["import { AnimationEvent, animate, style, transition, trigger } from '@angular/animations';\nimport { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n NgModule,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute\n} from '@angular/core';\nimport { SafeUrl } from '@angular/platform-browser';\nimport { PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { EyeIcon } from 'primeng/icons/eye';\nimport { RefreshIcon } from 'primeng/icons/refresh';\nimport { SearchMinusIcon } from 'primeng/icons/searchminus';\nimport { SearchPlusIcon } from 'primeng/icons/searchplus';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { UndoIcon } from 'primeng/icons/undo';\nimport { ZIndexUtils } from 'primeng/utils';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { FocusTrapModule } from 'primeng/focustrap';\n\n/**\n * Displays an image with preview and tranformation options. For multiple image, see Galleria.\n * @group Components\n */\n@Component({\n selector: 'p-image',\n template: `\n <span [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"style\">\n <img [attr.src]=\"src\" [attr.srcset]=\"srcSet\" [attr.sizes]=\"sizes\" [attr.alt]=\"alt\" [attr.width]=\"width\" [attr.height]=\"height\" [attr.loading]=\"loading\" [ngStyle]=\"imageStyle\" [class]=\"imageClass\" (error)=\"imageError($event)\" />\n <button *ngIf=\"preview\" [attr.aria-label]=\"zoomImageAriaLabel\" type=\"button\" class=\"p-image-preview-indicator\" (click)=\"onImageClick()\" #previewButton [ngStyle]=\"{ height: height + 'px', width: width + 'px' }\" style=\"border: 'none';\">\n <ng-container *ngIf=\"indicatorTemplate; else defaultTemplate\">\n <ng-container *ngTemplateOutlet=\"indicatorTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultTemplate>\n <EyeIcon [styleClass]=\"'p-image-preview-icon'\" />\n </ng-template>\n </button>\n <div #mask class=\"p-image-mask p-component-overlay p-component-overlay-enter\" *ngIf=\"maskVisible\" [attr.aria-modal]=\"maskVisible\" role=\"dialog\" (click)=\"onMaskClick()\" (keydown)=\"onMaskKeydown($event)\" pFocusTrap>\n <div class=\"p-image-toolbar\" (click)=\"handleToolbarClick($event)\">\n <button class=\"p-image-action p-link\" (click)=\"rotateRight()\" type=\"button\" [attr.aria-label]=\"rightAriaLabel()\">\n <RefreshIcon *ngIf=\"!rotateRightIconTemplate\" />\n <ng-template *ngTemplateOutlet=\"rotateRightIconTemplate\"></ng-template>\n </button>\n <button class=\"p-image-action p-link\" (click)=\"rotateLeft()\" type=\"button\" [attr.aria-label]=\"leftAriaLabel()\">\n <UndoIcon *ngIf=\"!rotateLeftIconTemplate\" />\n <ng-template *ngTemplateOutlet=\"rotateLeftIconTemplate\"></ng-template>\n </button>\n <button class=\"p-image-action p-link\" (click)=\"zoomOut()\" type=\"button\" [disabled]=\"isZoomOutDisabled\" [attr.aria-label]=\"zoomOutAriaLabel()\">\n <SearchMinusIcon *ngIf=\"!zoomOutIconTemplate\" />\n <ng-template *ngTemplateOutlet=\"zoomOutIconTemplate\"></ng-template>\n </button>\n <button class=\"p-image-action p-link\" (click)=\"zoomIn()\" type=\"button\" [disabled]=\"isZoomInDisabled\" [attr.aria-label]=\"zoomInAriaLabel()\">\n <SearchPlusIcon
|