Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-timeline.mjs.map

1 line
8.0 KiB
Plaintext
Raw Permalink Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-timeline.mjs","sources":["../../src/app/components/timeline/timeline.ts","../../src/app/components/timeline/primeng-timeline.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, Input, NgModule, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { BlockableUI, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { Nullable } from 'primeng/ts-helpers';\n/**\n * Timeline visualizes a series of chained events.\n * @group Components\n */\n@Component({\n selector: 'p-timeline',\n template: `\n <div\n [class]=\"styleClass\"\n [ngStyle]=\"style\"\n [ngClass]=\"{\n 'p-timeline p-component': true,\n 'p-timeline-left': align === 'left',\n 'p-timeline-right': align === 'right',\n 'p-timeline-top': align === 'top',\n 'p-timeline-bottom': align === 'bottom',\n 'p-timeline-alternate': align === 'alternate',\n 'p-timeline-vertical': layout === 'vertical',\n 'p-timeline-horizontal': layout === 'horizontal'\n }\"\n [attr.data-pc-name]=\"'timeline'\"\n [attr.data-pc-section]=\"'root'\"\n >\n <div *ngFor=\"let event of value; let last = last\" class=\"p-timeline-event\" [attr.data-pc-section]=\"'event'\">\n <div class=\"p-timeline-event-opposite\" [attr.data-pc-section]=\"'opposite'\">\n <ng-container *ngTemplateOutlet=\"oppositeTemplate; context: { $implicit: event }\"></ng-container>\n </div>\n <div class=\"p-timeline-event-separator\" [attr.data-pc-section]=\"'separator'\">\n <ng-container *ngIf=\"markerTemplate; else marker\">\n <ng-container *ngTemplateOutlet=\"markerTemplate; context: { $implicit: event }\"></ng-container>\n </ng-container>\n <ng-template #marker>\n <div class=\"p-timeline-event-marker\" [attr.data-pc-section]=\"'marker'\"></div>\n </ng-template>\n <div *ngIf=\"!last\" class=\"p-timeline-event-connector\"></div>\n </div>\n <div class=\"p-timeline-event-content\" [attr.data-pc-section]=\"'content'\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: { $implicit: event }\"></ng-container>\n </div>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./timeline.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Timeline implements AfterContentInit, BlockableUI {\n /**\n * An array of events to display.\n * @group Props\n */\n @Input() value: any[] | undefined;\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Position of the timeline bar relative to the content. Valid values are \"left\", \"right\" for vertical layout and \"top\", \"bottom\" for horizontal layout.\n * @group Props\n */\n @Input() align: string = 'left';\n /**\n * Orientation of the timeline.\n * @group Props\n */\n @Input() layout: 'vertical' | 'horizontal' = 'vertical';\n\n @ContentChildren(PrimeTemplate) templates: Nullable<QueryList<any>>;\n\n contentTemplate: Nullable<TemplateRef<any>>;\n\n oppositeTemplate: Nullable<TemplateRef<any>>;\n\n markerTemplate: Nullable<TemplateRef<any>>;\n\n constructor(private el: ElementRef) {}\n\n getBlockableElement(): HTMLElement {\n return this.el.nativeElement.children[0];\n }\n\n ngAfterContentInit() {\n (this.template