Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Feb 29, 2024
1 parent 42530dc commit f48e976
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/app/components/buttongroup/buttongroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation } from
</span>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
encapsulation: ViewEncapsulation.None
})
export class ButtonGroup {}

Expand Down
1 change: 0 additions & 1 deletion src/app/components/iconfield/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './iconfield';

8 changes: 4 additions & 4 deletions src/app/components/inputnumber/inputnumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -828,18 +828,18 @@ export class InputNumber implements OnInit, AfterContentInit, OnChanges, Control
break;

case 'ArrowLeft':
for( let index=selectionStart; index<=inputValue.length;index++){
for (let index = selectionStart; index <= inputValue.length; index++) {
const previousCharIndex = index === 0 ? 0 : index - 1;
if(this.isNumeralChar(inputValue.charAt(previousCharIndex))){
if (this.isNumeralChar(inputValue.charAt(previousCharIndex))) {
this.input.nativeElement.setSelectionRange(index, index);
break;
}
}
break;

case 'ArrowRight':
for( let index=selectionEnd; index>=0;index--){
if(this.isNumeralChar(inputValue.charAt(index))){
for (let index = selectionEnd; index >= 0; index--) {
if (this.isNumeralChar(inputValue.charAt(index))) {
this.input.nativeElement.setSelectionRange(index, index);
break;
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/metergroup/metergroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export class MeterGroupLabel {
<ng-container *ngTemplateOutlet="startTemplate; context: { $implicit: value, totalPercent: totalPercent(), percentages: percentages() }"></ng-container>
<div class="p-metergroup-meters">
<ng-container *ngFor="let meterItem of value; let index = index; trackBy: trackByFn">
<ng-container *ngTemplateOutlet="meterTemplate; context: { $implicit: meterItem, index: index, orientation: this.orientation, class: 'p-metergroup-meter', size: percentValue(meterItem.value), totalPercent: totalPercent() }"> </ng-container>
<ng-container *ngTemplateOutlet="meterTemplate; context: { $implicit: meterItem, index: index, orientation: this.orientation, class: 'p-metergroup-meter', size: percentValue(meterItem.value), totalPercent: totalPercent() }">
</ng-container>
<ng-container *ngIf="!meterTemplate">
<span class="p-metergroup-meter" [ngStyle]="meterStyle(meterItem)"></span>
</ng-container>
Expand Down
3 changes: 1 addition & 2 deletions src/app/showcase/doc/button/buttondoc.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { TemplateDoc } from './templatedoc';
import { TextDoc } from './textdoc';
import { ButtonGroupDoc } from './buttongroupdoc';


@NgModule({
imports: [CommonModule, AppCodeModule, AppDocModule, ButtonModule, ButtonGroupModule, RippleModule, RouterModule],
exports: [AppDocModule],
Expand All @@ -53,7 +52,7 @@ import { ButtonGroupDoc } from './buttongroupdoc';
TemplateDoc,
StyleDoc,
AccessibilityDoc,
DirectiveDoc,
DirectiveDoc
]
})
export class ButtonDocModule {}
2 changes: 1 addition & 1 deletion src/app/showcase/doc/dropdown/dropdowndoc.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ import { InputTextModule } from 'primeng/inputtext';
@NgModule({
imports: [CommonModule, RouterModule, AppCodeModule, AppDocModule, FormsModule, ReactiveFormsModule, DropdownModule, ButtonModule, InputTextModule],
exports: [AppDocModule],
declarations: [ImportDoc, BasicDoc, EditableDoc, GroupDoc, TemplateDoc, DisabledDoc, InvalidDoc, VirtualScrollDoc, LazyVirtualScrollDoc,CustomFilterDoc, FilterDoc, FloatLabelDoc, StyleDoc, AccessibilityDoc, ReactiveFormsDoc]
declarations: [ImportDoc, BasicDoc, EditableDoc, GroupDoc, TemplateDoc, DisabledDoc, InvalidDoc, VirtualScrollDoc, LazyVirtualScrollDoc, CustomFilterDoc, FilterDoc, FloatLabelDoc, StyleDoc, AccessibilityDoc, ReactiveFormsDoc]
})
export class DropdownDocModule {}
8 changes: 4 additions & 4 deletions src/app/showcase/doc/floatlabel/accessibilitydoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Component } from '@angular/core';
selector: 'accessibility-doc',
template: `
<app-docsectiontext>
<h3>Screen Reader</h3>
<p>FloatLabel does not require any roles and attributes.</p>
<h3>Screen Reader</h3>
<p>FloatLabel does not require any roles and attributes.</p>
<h3>Keyboard Support</h3>
<p>Component does not include any interactive elements.</p>
<h3>Keyboard Support</h3>
<p>Component does not include any interactive elements.</p>
</app-docsectiontext>
`
})
Expand Down
1 change: 0 additions & 1 deletion src/app/showcase/doc/floatlabel/importdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ export class ImportDoc {
typescript: `import { FloatLabelModule } from 'primeng/floatlabel';`
};
}

8 changes: 4 additions & 4 deletions src/app/showcase/doc/metergroup/accessibilitydoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Component } from '@angular/core';
selector: 'accessibility-doc',
template: `
<app-docsectiontext>
<h3>Screen Reader</h3>
<p>MeterGroup component uses <i>meter</i> role in addition to the <i>aria-valuemin</i>, <i>aria-valuemax</i> and <i>aria-valuenow</i> attributes. Value to describe the component can be defined using <i>aria-labelledby</i> prop.</p>
<h3>Screen Reader</h3>
<p>MeterGroup component uses <i>meter</i> role in addition to the <i>aria-valuemin</i>, <i>aria-valuemax</i> and <i>aria-valuenow</i> attributes. Value to describe the component can be defined using <i>aria-labelledby</i> prop.</p>
<h3>Keyboard Support</h3>
<p>Component does not include any interactive elements.</p>
<h3>Keyboard Support</h3>
<p>Component does not include any interactive elements.</p>
</app-docsectiontext>
`
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/metergroup/icondoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Code } from '../../domain/code';
selector: 'icon-doc',
template: `
<app-docsectiontext>
<p>Icons can be displayed next to the labels instead of the default marker.</p>
<p>Icons can be displayed next to the labels instead of the default marker.</p>
</app-docsectiontext>
<div class="card">
<p-meterGroup [value]="value"></p-meterGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/metergroup/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TemplateDoc {
];

code: Code = {
basic: `<p-meterGroup [value]="value" labelPosition="start">
basic: `<p-meterGroup [value]="value" labelPosition="start">
<ng-template pTemplate="label">
<div class="flex flex-wrap gap-3">
<ng-container *ngFor="let meterItem of value; let index = index">
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/metergroup/verticaldoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Code } from '../../domain/code';
selector: 'vertical-doc',
template: `
<app-docsectiontext>
<p>Layout of the MeterGroup is configured with the <i>orientation</i> property that accepts either <i>horizontal</i> or <i>vertical</i> as available options.</p>
<p>Layout of the MeterGroup is configured with the <i>orientation</i> property that accepts either <i>horizontal</i> or <i>vertical</i> as available options.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-meterGroup [value]="value" orientation="vertical" labelOrientation="vertical" [style]="{ height: '300px' }"></p-meterGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/tree/virtualscrolldoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ export class TreeVirtualScrollDemo implements OnInit {
}
}`,
service: ['NodeService'],
service: ['NodeService'],

data: `
data: `
/* NodeService */
{
key: '0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { IconFieldDemo } from './iconfielddemo';


@NgModule({
imports: [RouterModule.forChild([{ path: '', component: IconFieldDemo }])],
exports: [RouterModule]
Expand Down
1 change: 0 additions & 1 deletion src/app/showcase/pages/iconfield/iconfielddemo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { IconFieldDemo } from './iconfielddemo';
import { IconFieldDocModule } from '../../doc/iconfield/iconfielddoc.module';
import { IconFieldDemoRoutingModule } from './iconfielddemo-routing.module';


@NgModule({
imports: [CommonModule, IconFieldDocModule, IconFieldDemoRoutingModule],
declarations: [IconFieldDemo]
Expand Down
3 changes: 1 addition & 2 deletions src/app/showcase/pages/iconfield/iconfielddemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class IconFieldDemo {
id: 'accessibility',
label: 'Accessibility',
component: AccessibilityDoc
},

}
];
}
2 changes: 1 addition & 1 deletion src/app/showcase/pages/metergroup/metergroupdemo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import { MeterGroupDemoRoutingModule } from './metergroupdemo-routing.module';
@NgModule({
imports: [CommonModule, MeterGroupDemoRoutingModule, MeterGroupDocModule],
declarations: [MeterGroupDemo]
})
})
export class MeterGroupDemoModule {}
10 changes: 5 additions & 5 deletions src/app/showcase/pages/metergroup/metergroupdemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ export class MeterGroupDemo {
{
id: 'icon',
label: 'Icon',
component: IconDoc
component: IconDoc
},
{
id: 'label',
label: 'Label',
component: LabelDoc
component: LabelDoc
},
{
id: 'vertical',
label: 'Vertical',
component: VerticalDoc
component: VerticalDoc
},
{
id: 'minmax',
label: 'Min Max',
component: MinMaxDoc
component: MinMaxDoc
},
{
id: 'template',
Expand All @@ -63,6 +63,6 @@ export class MeterGroupDemo {
id: 'accessibility',
label: 'Accessibility',
component: AccessibilityDoc
},
}
];
}
4 changes: 2 additions & 2 deletions src/app/showcase/pages/tree/treedemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class TreeDemo {
{
id: 'virtualscroll',
label: 'Virtual Scroll',
children:[
children: [
{
id: 'preload',
label: 'Preload',
Expand All @@ -80,7 +80,7 @@ export class TreeDemo {
id: 'lazyvirtualscroll',
label: 'Lazy',
component: LazyVirtualScrollDoc
},
}
]
},
{
Expand Down

0 comments on commit f48e976

Please sign in to comment.