Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Mar 22, 2023
1 parent 1c5ee97 commit 6d99ef2
Show file tree
Hide file tree
Showing 104 changed files with 130 additions and 134 deletions.
6 changes: 3 additions & 3 deletions src/app/components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class Tooltip implements AfterViewInit, OnDestroy {
@Input() autoHide: boolean = true;

@Input() fitContent: boolean = true;

@Input() hideOnEscape: boolean = true;

@Input('pTooltip') text: string;
Expand Down Expand Up @@ -260,11 +260,11 @@ export class Tooltip implements AfterViewInit, OnDestroy {
this.deactivate();
}

@HostListener('document:keydown.escape', ['$event'])
@HostListener('document:keydown.escape', ['$event'])
onPressEscape() {
if (this.hideOnEscape) {
this.deactivate();
}
}
}

activate() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/autocomplete/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CountryService } from '../../service/countryservice';
<p-autoComplete [(ngModel)]="selectedCountryAdvanced" [suggestions]="filteredCountries" (completeMethod)="filterCountry($event)" field="name" [dropdown]="true">
<ng-template let-country pTemplate="item">
<div class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px" />
<div>{{ country.name }}</div>
</div>
</ng-template>
Expand Down
4 changes: 1 addition & 3 deletions src/app/showcase/doc/calendar/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { FormControl, FormGroup } from '@angular/forms';
selector: 'reactive-forms-doc',
template: ` <section>
<app-docsectiontext [title]="title" [id]="id">
<p>
Calendar can also be used with reactive forms. In this case, the <i>formControlName</i> property is used to bind the component to a form control.
</p>
<p>Calendar can also be used with reactive forms. In this case, the <i>formControlName</i> property is used to bind the component to a form control.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
Expand Down
10 changes: 9 additions & 1 deletion src/app/showcase/doc/cascadeselect/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ import { FormControl, FormGroup } from '@angular/forms';
</app-docsectiontext>
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<p-cascadeSelect formControlName="selectedCity" [options]="countries" optionLabel="cname" optionGroupLabel="name" [optionGroupChildren]="['states', 'cities']" [style]="{ minWidth: '14rem' }" placeholder="Select a City"></p-cascadeSelect>
<p-cascadeSelect
formControlName="selectedCity"
[options]="countries"
optionLabel="cname"
optionGroupLabel="name"
[optionGroupChildren]="['states', 'cities']"
[style]="{ minWidth: '14rem' }"
placeholder="Select a City"
></p-cascadeSelect>
</form>
</div>
<app-code [code]="code" selector="cascade-select-reactive-forms-demo"></app-code>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/colorpicker/colorpickerdoc.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { AccessibilityDoc } from './accessibilitydoc';
import { ReactiveFormsDoc } from './reactiveformsdoc';

@NgModule({
imports: [CommonModule, RouterModule, AppCodeModule, AppDocModule, FormsModule, ReactiveFormsModule ,ColorPickerModule],
imports: [CommonModule, RouterModule, AppCodeModule, AppDocModule, FormsModule, ReactiveFormsModule, ColorPickerModule],
exports: [AppDocModule],
declarations: [ImportDoc, BasicDoc, InlineDoc, FormatDoc, DisabledDoc, PropsDoc, StyleDoc, EventsDoc, AccessibilityDoc, ReactiveFormsDoc]
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/configuration/locale/apidoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,5 @@ export class ApiDoc {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class NgxTranslateDoc {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

code: Code = {
typescript: `
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/configuration/locale/repositorydoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export class RepositoryDoc {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;
}
2 changes: 1 addition & 1 deletion src/app/showcase/doc/configuration/locale/setlocaledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class SetLocaleDoc {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

code: Code = {
typescript: `
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/configuration/zindexdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ZIndexDoc {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

code: Code = {
typescript: `import { PrimeNGConfig } from 'primeng/api';
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dataview/basicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class BasicDoc {
this.productService.getProducts().then((data) => (this.products = data.slice(0, 5)));
}

getSeverity (product) {
getSeverity(product) {
switch (product.inventoryStatus) {
case 'INSTOCK':
return 'success';
Expand All @@ -70,7 +70,7 @@ export class BasicDoc {
default:
return null;
}
};
}

code: Code = {
basic: `
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dataview/layoutdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class LayoutDoc {
this.productService.getProducts().then((data) => (this.products = data.slice(0, 12)));
}

getSeverity (product) {
getSeverity(product) {
switch (product.inventoryStatus) {
case 'INSTOCK':
return 'success';
Expand All @@ -99,7 +99,7 @@ export class LayoutDoc {
default:
return null;
}
};
}

code: Code = {
basic: `
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dataview/paginationdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class PaginationDoc {
this.productService.getProducts().then((data) => (this.products = data));
}

getSeverity (product) {
getSeverity(product) {
switch (product.inventoryStatus) {
case 'INSTOCK':
return 'success';
Expand All @@ -67,7 +67,7 @@ export class PaginationDoc {
default:
return null;
}
};
}

code: Code = {
basic: `
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dataview/sortingdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class SortingDoc {
}
}

getSeverity (product) {
getSeverity(product) {
switch (product.inventoryStatus) {
case 'INSTOCK':
return 'success';
Expand All @@ -96,7 +96,7 @@ export class SortingDoc {
default:
return null;
}
};
}

code: Code = {
basic: `
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/dropdown/editabledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface City {
<app-code [code]="code" selector="dropdown-editable-demo"></app-code>
</section>`
})
export class EditableDoc implements OnInit{
export class EditableDoc implements OnInit {
@Input() id: string;

@Input() title: string;
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dropdown/filterdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { Code } from '../../domain/code';
<p-dropdown [options]="countries" [(ngModel)]="selectedCountry" optionLabel="name" [filter]="true" filterBy="name" [showClear]="true" placeholder="Select a Country">
<ng-template pTemplate="selectedItem">
<div class="flex align-items-center gap-2" *ngIf="selectedCountry">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + selectedCountry.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + selectedCountry.code.toLowerCase()" style="width: 18px" />
<div>{{ selectedCountry.name }}</div>
</div>
</ng-template>
<ng-template let-country pTemplate="item">
<div class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px" />
<div>{{ country.name }}</div>
</div>
</ng-template>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/dropdown/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ReactiveFormsDoc implements OnInit {
@Input() title: string;

cities: City[];

formGroup: FormGroup;

ngOnInit() {
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/dropdown/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { Code } from '../../domain/code';
<p-dropdown [options]="countries" [(ngModel)]="selectedCountry" optionLabel="name" [showClear]="true" placeholder="Select a Country">
<ng-template pTemplate="selectedItem">
<div class="flex align-items-center gap-2" *ngIf="selectedCountry">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + selectedCountry.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + selectedCountry.code.toLowerCase()" style="width: 18px" />
<div>{{ selectedCountry.name }}</div>
</div>
</ng-template>
<ng-template let-country pTemplate="item">
<div class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px" />
<div>{{ country.name }}</div>
</div>
</ng-template>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/editor/editordoc.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ import { ReactiveFormsDoc } from './reactiveformsdoc';
exports: [AppDocModule],
declarations: [ImportDoc, QuillDoc, BasicDoc, ReadOnlyDoc, CustomToolbarDoc, PropsDoc, EventsDoc, MethodsDoc, StyleDoc, AccessibilityDoc, ReactiveFormsDoc]
})
export class EditorDocModule {}
export class EditorDocModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class FullScreenTemplateDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

displayCustom: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class WithoutThumbnailsDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

displayBasic: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class WithThumbnailsDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

displayBasic: boolean;

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/indicator/clickeventdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ClickEventDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/indicator/hovereventdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class HoverEventDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/indicator/positioneddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class PositionedDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/indicator/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class TemplateDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/navigator/hoverdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class HoverDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/galleria/navigator/indicatorsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class IndicatorsDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ItemThumbnailsDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ItemWithoutThumbnailsDoc implements OnInit {

@Input() title: string;

@ViewChild('docsectiontext', {static: true}) docsectiontext: AppDocSectionTextComponent;
@ViewChild('docsectiontext', { static: true }) docsectiontext: AppDocSectionTextComponent;

images: any[];

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/inputtext/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FormControl, FormGroup } from '@angular/forms';
</app-docsectiontext>
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<input type="text" pInputText formControlName="text"/>
<input type="text" pInputText formControlName="text" />
</form>
</div>
<app-code [code]="code" selector="input-text-reactive-forms-demo"></app-code>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/keyfilter/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormControl, FormGroup } from '@angular/forms';
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<label for="integer" class="font-bold block mb-2"> Integer </label>
<input pInputText id="integer" pKeyFilter="int" class="w-full" formControlName="value"/>
<input pInputText id="integer" pKeyFilter="int" class="w-full" formControlName="value" />
</form>
</div>
<app-code [code]="code" selector="key-filter-reactive-forms-demo"></app-code>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/listbox/basicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface City {
<app-code [code]="code" selector="listbox-basic-demo"></app-code>
</section>`
})
export class BasicDoc implements OnInit{
export class BasicDoc implements OnInit {
@Input() id: string;

@Input() title: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/listbox/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface Country {
<p-listbox [options]="countries" [(ngModel)]="selectedCountry" optionLabel="name" [listStyle]="{ 'max-height': '250px' }" [style]="{ width: '15rem' }">
<ng-template let-country pTemplate="item">
<div class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px" />
<div>{{ country.name }}</div>
</div>
</ng-template>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/multiselect/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ interface Country {
<p>Available options and the selected options support templating with <i>pTemplate</i> properties respectively. In addition, header, footer and filter sections can be templated as well.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-multiSelect [options]="countries" [(ngModel)]="selectedCountries" defaultLabel="Select a Country" optionLabel="name" >
<p-multiSelect [options]="countries" [(ngModel)]="selectedCountries" defaultLabel="Select a Country" optionLabel="name">
<ng-template let-value pTemplate="selectedItems">
<div class="flex align-items-center gap-2" *ngFor="let option of selectedCountries1">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + option.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + option.code.toLowerCase()" style="width: 18px" />
<div>{{ option.name }}</div>
</div>
<div *ngIf="!selectedCountries1 || selectedCountries1.length === 0">Select Countries</div>
</ng-template>
<ng-template let-country pTemplate="item">
<div class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px"/>
<img src="https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png" [class]="'flag flag-' + country.code.toLowerCase()" style="width: 18px" />
<div>{{ country.name }}</div>
</div>
</ng-template>
Expand Down
Loading

0 comments on commit 6d99ef2

Please sign in to comment.