Skip to content

Commit

Permalink
Code format:
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Sep 4, 2024
1 parent fc116b3 commit 11f4664
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 121 deletions.
17 changes: 10 additions & 7 deletions src/app/components/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1251,16 +1251,16 @@ export class DatePicker extends BaseComponent implements OnInit, OnDestroy, Cont
return this.currentView === 'year'
? this.getTranslation('prevDecade')
: this.currentView === 'month'
? this.getTranslation('prevYear')
: this.getTranslation('prevMonth');
? this.getTranslation('prevYear')
: this.getTranslation('prevMonth');
}

get nextIconAriaLabel() {
return this.currentView === 'year'
? this.getTranslation('nextDecade')
: this.currentView === 'month'
? this.getTranslation('nextYear')
: this.getTranslation('nextMonth');
? this.getTranslation('nextYear')
: this.getTranslation('nextMonth');
}

get rootClass() {
Expand All @@ -1277,7 +1277,10 @@ export class DatePicker extends BaseComponent implements OnInit, OnDestroy, Cont
return this.fluid || !!fluidComponent;
}

constructor(private zone: NgZone, public overlayService: OverlayService) {
constructor(
private zone: NgZone,
public overlayService: OverlayService,
) {
super();
this.window = this.document.defaultView as Window;
}
Expand Down Expand Up @@ -3174,8 +3177,8 @@ export class DatePicker extends BaseComponent implements OnInit, OnDestroy, Cont
this.defaultDate && this.isValidDate(this.defaultDate) && !this.value
? this.defaultDate
: propValue && this.isValidDate(propValue)
? propValue
: new Date();
? propValue
: new Date();

this.currentMonth = val.getMonth();
this.currentYear = val.getFullYear();
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/selectbutton/selectbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { PrimeTemplate, SharedModule } from 'primeng/api';
import { RippleModule } from 'primeng/ripple';
import { ObjectUtils } from 'primeng/utils';
import { SelectButtonChangeEvent, SelectButtonOptionClickEvent } from './selectbutton.interface';
import { ToggleButton} from 'primeng/togglebutton';
import { ToggleButton } from 'primeng/togglebutton';
import { BaseComponent } from 'primeng/basecomponent';
import { SelectButtonStyle } from './style/selectbuttonstyle';
import { CommonModule } from '@angular/common';
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/togglebutton/togglebutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ export class ToggleButton extends BaseComponent implements ControlValueAccessor
* @group Props
*/
@Input({ transform: booleanAttribute }) autofocus: boolean | undefined;
/**
/**
* Whether selection can not be cleared.
* @group Props
*/
@Input() allowEmpty: boolean | undefined
@Input() allowEmpty: boolean | undefined;
/**
* Callback to invoke on value change.
* @param {ToggleButtonChangeEvent} event - Custom change event.
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/dataview/loadingdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class LoadingDoc {

products!: Product[];

options : string[] = ['list', 'grid'];
options: string[] = ['list', 'grid'];

constructor(private productService: ProductService) {}

Expand Down
17 changes: 8 additions & 9 deletions src/app/showcase/doc/guides/primeflex/overviewdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { Component } from '@angular/core';

template: `
<app-docsectiontext>
<p>
<a href="https://primeflex.org">PrimeFlex</a> is designed to be a lightweight CSS utility to accompany Prime UI libraries. As part of our product roadmap planning at PrimeTek, the team has decided to avoid the maintenance of a CSS library
and utilize the resources on improving the UI libraries instead. Community feedback has been essential in this decision as well since majority of the applications have their own CSS utilities whether it is Tailwind, Bootstrap or an
in-house one, as a result adding PrimeFlex to a project was causing overlapping functionality.
</p>
<p>
<a href="https://primeflex.org">PrimeFlex</a> is designed to be a lightweight CSS utility to accompany Prime UI libraries.
As part of our product roadmap planning at PrimeTek, the team has decided to avoid the maintenance of a CSS library and
utilize the resources on improving the UI libraries instead. Community feedback has been essential in this decision as well
since majority of the applications have their own CSS utilities whether it is Tailwind, Bootstrap or an in-house one, as a
result adding PrimeFlex to a project was causing overlapping functionality.
</p>
</app-docsectiontext>
`,
})
export class OverviewDoc {

}
export class OverviewDoc {}
32 changes: 16 additions & 16 deletions src/app/showcase/doc/tailwind/animationsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Code } from '@domain/code';
<div class="card">
<p-select [(ngModel)]="animation" [options]="animations" placeholder="Select One" class="w-full sm:w-44" />
<div class="py-8 overflow-hidden">
<div [ngClass]="dynamicAnimationClasses"></div>
<div [ngClass]="dynamicAnimationClasses"></div>
</div>
</div>
<app-code [code]="code" selector="code" [hideToggleCode]="true" [hideCodeSandbox]="true" [hideStackBlitz]="true"></app-code>
Expand Down Expand Up @@ -397,24 +397,24 @@ import { Code } from '@domain/code';
`,
})
export class AnimationsDoc {
animation = null
animations
animation = null;
animations;

get dynamicAnimationClasses(): string[] {
return [
'rounded-border',
'bg-primary',
'w-16',
'h-16',
'mx-auto',
`animate-${this.animation}`,
'animate-once',
'animate-duration-1000'
'rounded-border',
'bg-primary',
'w-16',
'h-16',
'mx-auto',
`animate-${this.animation}`,
'animate-once',
'animate-duration-1000',
];
}
}

ngOnInit(){
this.animations= [
ngOnInit() {
this.animations = [
'fadein',
'fadeout',
'slideup',
Expand All @@ -433,8 +433,8 @@ export class AnimationsDoc {
'zoomindown',
'zoominleft',
'zoominright',
'zoominup'
]
'zoominup',
];
}

code: Code = {
Expand Down
143 changes: 73 additions & 70 deletions src/app/showcase/doc/tailwind/extensionsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,79 @@ import { Component } from '@angular/core';
selector: 'extensions-doc',
template: `
<app-docsectiontext>
<p>The plugin extends the default configuration with a new set of utilities. All variants and breakpoints are supported e.g. <i>dark:sm:hover:bg-primary</i>.</p>
<h3>Color Palette</h3>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Class</th>
<th>Property</th>
</tr>
</thead>
<tbody>
<tr>
<td>primary-[50-950]</td>
<td>Primary color palette.</td>
</tr>
<tr>
<td>surface-[0-950]</td>
<td>Surface color palette.</td>
</tr>
<tr>
<td>primary</td>
<td>Default primary color.</td>
</tr>
<tr>
<td>primary-contrast</td>
<td>Default primary contrast color.</td>
</tr>
<tr>
<td>primary-emphasis</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>border-surface</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>bg-emphasis</td>
<td>Emphasis background e.g. hovered element.</td>
</tr>
<tr>
<td>bg-highlight</td>
<td>Highlight background.</td>
</tr>
<tr>
<td>bg-highlight-emphasis</td>
<td>Highlight background with emphasis.</td>
</tr>
<tr>
<td>rounded-border</td>
<td>Border radius.</td>
</tr>
<tr>
<td>text-color</td>
<td>Text color with emphasis.</td>
</tr>
<tr>
<td>text-color-emphasis</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>text-muted-color</td>
<td>Secondary text color.</td>
</tr>
<tr>
<td>text-muted-color-emphasis</td>
<td>Secondary text color with emphasis.</td>
</tr>
</tbody>
</table>
</div>
<p>
The plugin extends the default configuration with a new set of utilities. All variants and breakpoints are supported e.g.
<i>dark:sm:hover:bg-primary</i>.
</p>
<h3>Color Palette</h3>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Class</th>
<th>Property</th>
</tr>
</thead>
<tbody>
<tr>
<td>primary-[50-950]</td>
<td>Primary color palette.</td>
</tr>
<tr>
<td>surface-[0-950]</td>
<td>Surface color palette.</td>
</tr>
<tr>
<td>primary</td>
<td>Default primary color.</td>
</tr>
<tr>
<td>primary-contrast</td>
<td>Default primary contrast color.</td>
</tr>
<tr>
<td>primary-emphasis</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>border-surface</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>bg-emphasis</td>
<td>Emphasis background e.g. hovered element.</td>
</tr>
<tr>
<td>bg-highlight</td>
<td>Highlight background.</td>
</tr>
<tr>
<td>bg-highlight-emphasis</td>
<td>Highlight background with emphasis.</td>
</tr>
<tr>
<td>rounded-border</td>
<td>Border radius.</td>
</tr>
<tr>
<td>text-color</td>
<td>Text color with emphasis.</td>
</tr>
<tr>
<td>text-color-emphasis</td>
<td>Default primary emphasis color.</td>
</tr>
<tr>
<td>text-muted-color</td>
<td>Secondary text color.</td>
</tr>
<tr>
<td>text-muted-color-emphasis</td>
<td>Secondary text color with emphasis.</td>
</tr>
</tbody>
</table>
</div>
</app-docsectiontext>
`,
})
Expand Down
10 changes: 2 additions & 8 deletions src/app/showcase/doc/tailwind/headlessdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,8 @@ import { Code } from '@domain/code';
d="M11.3853 16.9726L12.6739 15.0309L13.4793 15.5163H16.7008L17.5061 15.0309L18.7947 16.9726V24.254L17.8283 25.7103L16.7008 26.843H13.4793L12.3518 25.7103L11.3853 24.254V16.9726Z"
fill="var(--ground-background)"
/>
<path
d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z"
fill="var(--ground-background)"
/>
<path
d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z"
fill="var(--ground-background)"
/>
<path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
<path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
Expand Down
18 changes: 11 additions & 7 deletions src/app/showcase/pages/landing/footersection.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,17 @@ import { RouterModule } from '@angular/router';
</ul>
</div>
<div class="w-6/12 lg:w-3/12 flex">
<ul class="list-none p-0 m-0">
<li class="font-bold mt-8 lg:mt-0 mb-8">Theming</li>
<li class="mb-6">
<a [routerLink]="'/theming'" class="text-surface-500 dark:text-surface-400 font-medium hover:text-primary rounded transition-all duration-300">Styled Mode</a>
</li>
</ul>
</div>
<ul class="list-none p-0 m-0">
<li class="font-bold mt-8 lg:mt-0 mb-8">Theming</li>
<li class="mb-6">
<a
[routerLink]="'/theming'"
class="text-surface-500 dark:text-surface-400 font-medium hover:text-primary rounded transition-all duration-300"
>Styled Mode</a
>
</li>
</ul>
</div>
<div class="w-6/12 lg:w-3/12 flex">
<ul class="list-none p-0 m-0">
<li class="font-bold mt-8 lg:mt-0 mb-8">Resources</li>
Expand Down

0 comments on commit 11f4664

Please sign in to comment.