Eslint integration
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PrimeIcons } from 'primeng/api';
|
||||
|
||||
@Component({
|
||||
templateUrl: './timelinedemo.component.html',
|
||||
styleUrls: ['./timelinedemo.scss']
|
||||
})
|
||||
export class TimelineDemoComponent {
|
||||
export class TimelineDemoComponent implements OnInit {
|
||||
|
||||
events1: any[] = [];
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ enum BlockView {
|
||||
}
|
||||
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'block-viewer',
|
||||
template: `
|
||||
<div class="block-section">
|
||||
@@ -16,8 +17,8 @@ enum BlockView {
|
||||
<span class="badge-new" *ngIf="new">New</span>
|
||||
</span>
|
||||
<div class="block-actions">
|
||||
<a tabindex="0" [ngClass]="{'block-action-active': blockView == BlockView.PREVIEW}" (click)="activateView($event, BlockView.PREVIEW)"><span>Preview</span></a>
|
||||
<a [attr.tabindex]="'0'" [ngClass]="{'block-action-active': blockView == BlockView.CODE}" (click)="activateView($event, BlockView.CODE)">
|
||||
<a tabindex="0" [ngClass]="{'block-action-active': blockView === BlockView.PREVIEW}" (click)="activateView($event, BlockView.PREVIEW)"><span>Preview</span></a>
|
||||
<a [attr.tabindex]="'0'" [ngClass]="{'block-action-active': blockView === BlockView.CODE}" (click)="activateView($event, BlockView.CODE)">
|
||||
<span>Code</span>
|
||||
</a>
|
||||
<a [attr.tabindex]="'0'" class="block-action-copy" (click)="copyCode($event)"
|
||||
@@ -25,10 +26,10 @@ enum BlockView {
|
||||
</div>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<div [class]="containerClass" [ngStyle]="previewStyle" *ngIf="blockView == BlockView.PREVIEW">
|
||||
<div [class]="containerClass" [ngStyle]="previewStyle" *ngIf="blockView === BlockView.PREVIEW">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
<div *ngIf="blockView == BlockView.CODE">
|
||||
<div *ngIf="blockView === BlockView.CODE">
|
||||
<app-code lang="markup" ngPreserveWhitespaces>{{code}}
|
||||
</app-code>
|
||||
</div>
|
||||
@@ -37,7 +38,7 @@ enum BlockView {
|
||||
`,
|
||||
styleUrls: ['./blockviewer.component.scss']
|
||||
})
|
||||
export class BlockViewer {
|
||||
export class BlockViewerComponent {
|
||||
|
||||
@Input() header!: string;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { BlocksComponent } from './blocks/blocks.component';
|
||||
import { PrimeBlocksRoutingModule } from './primeblocks-routing.module';
|
||||
import { BlockViewer } from './blockviewer/blockviewer.component'
|
||||
import { BlockViewerComponent } from './blockviewer/blockviewer.component'
|
||||
import { AppCodeModule } from '../code/code.component';
|
||||
import { ChipModule } from 'primeng/chip';
|
||||
import { CheckboxModule } from 'primeng/checkbox';
|
||||
@@ -28,6 +28,6 @@ import { TooltipModule } from 'primeng/tooltip';
|
||||
PrimeBlocksRoutingModule,
|
||||
AppCodeModule
|
||||
],
|
||||
declarations: [BlocksComponent, BlockViewer]
|
||||
declarations: [BlocksComponent, BlockViewerComponent]
|
||||
})
|
||||
export class PrimeBlocksModule { }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { LayoutService } from 'src/app/layout/service/app.layout.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './chartsdemo.component.html'
|
||||
})
|
||||
export class ChartsDemoComponent implements OnInit {
|
||||
export class ChartsDemoComponent implements OnInit, OnDestroy {
|
||||
|
||||
lineData: any;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
|
||||
<tr>
|
||||
<td *ngFor="let col of columns; let i = index">
|
||||
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
|
||||
<p-treeTableCheckbox [value]="rowNode" *ngIf="i == 0"></p-treeTableCheckbox>
|
||||
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
|
||||
<p-treeTableCheckbox [value]="rowNode" *ngIf="i === 0"></p-treeTableCheckbox>
|
||||
{{rowData[col.field]}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user