Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Dec 13, 2023
1 parent 79d4dd0 commit d1f1ba1
Show file tree
Hide file tree
Showing 43 changed files with 271 additions and 281 deletions.
8 changes: 2 additions & 6 deletions src/app/components/confirmdialog/confirmdialog.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export interface ConfirmDialogTemplates {
/**
* Custom template of message.
*/
message(context:{
$implicit?:any
}): TemplateRef<any>;
message(context: { $implicit?: any }): TemplateRef<any>;
/**
* Custom template of icon.
*/
Expand All @@ -33,7 +31,5 @@ export interface ConfirmDialogTemplates {
/**
* Headless template.
*/
headless(context:{
$implicit?:any
}): TemplateRef<any>;
headless(context: { $implicit?: any }): TemplateRef<any>;
}
8 changes: 2 additions & 6 deletions src/app/components/confirmpopup/confirmpopup.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export interface ConfirmPopupTemplates {
/**
* Custom content template.
*/
content(context:{
$implicit?:any
}): TemplateRef<any>;
content(context: { $implicit?: any }): TemplateRef<any>;
/**
* Custom template of rejecticon.
*/
Expand All @@ -22,7 +20,5 @@ export interface ConfirmPopupTemplates {
/**
* Headless template.
*/
headless(context:{
$implicit?:any
}): TemplateRef<any>;
headless(context: { $implicit?: any }): TemplateRef<any>;
}
84 changes: 42 additions & 42 deletions src/app/components/confirmpopup/confirmpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,48 @@ import { Subscription } from 'rxjs';
(@animation.start)="onAnimationStart($event)"
(@animation.done)="onAnimationEnd($event)"
>
<ng-container *ngIf="headlessTemplate; else notHeadless">
<ng-container *ngTemplateOutlet="headlessTemplate; context:{$implicit:confirmation}"></ng-container>
</ng-container>
<ng-template #notHeadless>
<div #content class="p-confirm-popup-content">
<ng-container *ngIf="contentTemplate; else withoutContentTemplate">
<ng-container *ngTemplateOutlet="contentTemplate; context:{$implicit:confirmation}"></ng-container>
</ng-container>
<ng-template #withoutContentTemplate>
<i [ngClass]="'p-confirm-popup-icon'" [class]="confirmation?.icon" *ngIf="confirmation?.icon"></i>
<span class="p-confirm-popup-message">{{ confirmation?.message }}</span>
</ng-template>
</div>
<div class="p-confirm-popup-footer">
<button
type="button"
pButton
[label]="rejectButtonLabel"
(click)="reject()"
[ngClass]="'p-confirm-popup-reject p-button-sm'"
[class]="confirmation?.rejectButtonStyleClass || 'p-button-text'"
*ngIf="confirmation?.rejectVisible !== false"
[attr.aria-label]="rejectButtonLabel"
>
<i [class]="confirmation?.rejectIcon" *ngIf="confirmation?.rejectIcon; else rejecticon"></i>
<ng-template #rejecticon *ngTemplateOutlet="rejectIconTemplate"></ng-template>
</button>
<button
type="button"
pButton
[label]="acceptButtonLabel"
(click)="accept()"
[ngClass]="'p-confirm-popup-accept p-button-sm'"
[class]="confirmation?.acceptButtonStyleClass"
*ngIf="confirmation?.acceptVisible !== false"
[attr.aria-label]="acceptButtonLabel"
>
<i [class]="confirmation?.acceptIcon" *ngIf="confirmation?.acceptIcon; else accepticon"></i>
<ng-template #accepticon *ngTemplateOutlet="acceptIconTemplate"></ng-template>
</button>
</div>
</ng-template>
<ng-container *ngIf="headlessTemplate; else notHeadless">
<ng-container *ngTemplateOutlet="headlessTemplate; context: { $implicit: confirmation }"></ng-container>
</ng-container>
<ng-template #notHeadless>
<div #content class="p-confirm-popup-content">
<ng-container *ngIf="contentTemplate; else withoutContentTemplate">
<ng-container *ngTemplateOutlet="contentTemplate; context: { $implicit: confirmation }"></ng-container>
</ng-container>
<ng-template #withoutContentTemplate>
<i [ngClass]="'p-confirm-popup-icon'" [class]="confirmation?.icon" *ngIf="confirmation?.icon"></i>
<span class="p-confirm-popup-message">{{ confirmation?.message }}</span>
</ng-template>
</div>
<div class="p-confirm-popup-footer">
<button
type="button"
pButton
[label]="rejectButtonLabel"
(click)="reject()"
[ngClass]="'p-confirm-popup-reject p-button-sm'"
[class]="confirmation?.rejectButtonStyleClass || 'p-button-text'"
*ngIf="confirmation?.rejectVisible !== false"
[attr.aria-label]="rejectButtonLabel"
>
<i [class]="confirmation?.rejectIcon" *ngIf="confirmation?.rejectIcon; else rejecticon"></i>
<ng-template #rejecticon *ngTemplateOutlet="rejectIconTemplate"></ng-template>
</button>
<button
type="button"
pButton
[label]="acceptButtonLabel"
(click)="accept()"
[ngClass]="'p-confirm-popup-accept p-button-sm'"
[class]="confirmation?.acceptButtonStyleClass"
*ngIf="confirmation?.acceptVisible !== false"
[attr.aria-label]="acceptButtonLabel"
>
<i [class]="confirmation?.acceptIcon" *ngIf="confirmation?.acceptIcon; else accepticon"></i>
<ng-template #accepticon *ngTemplateOutlet="acceptIconTemplate"></ng-template>
</button>
</div>
</ng-template>
</div>
`,
animations: [
Expand Down
100 changes: 50 additions & 50 deletions src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,55 +83,55 @@ const hideAnimation = animation([animate('{{transition}}', style({ transform: '{
</ng-container>
<ng-template #notHeadless>
<div *ngIf="resizable" class="p-resizable-handle" style="z-index: 90;" (mousedown)="initResize($event)"></div>
<div #titlebar class="p-dialog-header" (mousedown)="initDrag($event)" *ngIf="showHeader">
<span [id]="getAriaLabelledBy()" class="p-dialog-title" *ngIf="!headerFacet && !headerTemplate">{{ header }}</span>
<span [id]="getAriaLabelledBy()" class="p-dialog-title" *ngIf="headerFacet">
<ng-content select="p-header"></ng-content>
</span>
<ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
<div class="p-dialog-header-icons">
<button *ngIf="maximizable" role="button" type="button" [ngClass]="{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }" (click)="maximize()" (keydown.enter)="maximize()" tabindex="-1" pRipple>
<span *ngIf="maximizeIcon && !maximizeIconTemplate && !minimizeIconTemplate" class="p-dialog-header-maximize-icon" [ngClass]="maximized ? minimizeIcon : maximizeIcon"></span>
<ng-container *ngIf="!maximizeIcon">
<WindowMaximizeIcon *ngIf="!maximized && !maximizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<WindowMinimizeIcon *ngIf="maximized && !minimizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
</ng-container>
<ng-container *ngIf="!maximized">
<ng-template *ngTemplateOutlet="maximizeIconTemplate"></ng-template>
</ng-container>
<ng-container *ngIf="maximized">
<ng-template *ngTemplateOutlet="minimizeIconTemplate"></ng-template>
</ng-container>
</button>
<button
*ngIf="closable"
type="button"
[ngClass]="{ 'p-dialog-header-icon p-dialog-header-close p-link': true }"
[attr.aria-label]="closeAriaLabel"
(click)="close($event)"
(keydown.enter)="close($event)"
[attr.tabindex]="closeTabindex"
pRipple
>
<ng-container *ngIf="!closeIconTemplate">
<span *ngIf="closeIcon" class="p-dialog-header-close-icon" [ngClass]="closeIcon"></span>
<TimesIcon *ngIf="!closeIcon" [styleClass]="'p-dialog-header-close-icon'" />
</ng-container>
<span *ngIf="closeIconTemplate">
<ng-template *ngTemplateOutlet="closeIconTemplate"></ng-template>
</span>
</button>
<div *ngIf="resizable" class="p-resizable-handle" style="z-index: 90;" (mousedown)="initResize($event)"></div>
<div #titlebar class="p-dialog-header" (mousedown)="initDrag($event)" *ngIf="showHeader">
<span [id]="getAriaLabelledBy()" class="p-dialog-title" *ngIf="!headerFacet && !headerTemplate">{{ header }}</span>
<span [id]="getAriaLabelledBy()" class="p-dialog-title" *ngIf="headerFacet">
<ng-content select="p-header"></ng-content>
</span>
<ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
<div class="p-dialog-header-icons">
<button *ngIf="maximizable" role="button" type="button" [ngClass]="{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }" (click)="maximize()" (keydown.enter)="maximize()" tabindex="-1" pRipple>
<span *ngIf="maximizeIcon && !maximizeIconTemplate && !minimizeIconTemplate" class="p-dialog-header-maximize-icon" [ngClass]="maximized ? minimizeIcon : maximizeIcon"></span>
<ng-container *ngIf="!maximizeIcon">
<WindowMaximizeIcon *ngIf="!maximized && !maximizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<WindowMinimizeIcon *ngIf="maximized && !minimizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
</ng-container>
<ng-container *ngIf="!maximized">
<ng-template *ngTemplateOutlet="maximizeIconTemplate"></ng-template>
</ng-container>
<ng-container *ngIf="maximized">
<ng-template *ngTemplateOutlet="minimizeIconTemplate"></ng-template>
</ng-container>
</button>
<button
*ngIf="closable"
type="button"
[ngClass]="{ 'p-dialog-header-icon p-dialog-header-close p-link': true }"
[attr.aria-label]="closeAriaLabel"
(click)="close($event)"
(keydown.enter)="close($event)"
[attr.tabindex]="closeTabindex"
pRipple
>
<ng-container *ngIf="!closeIconTemplate">
<span *ngIf="closeIcon" class="p-dialog-header-close-icon" [ngClass]="closeIcon"></span>
<TimesIcon *ngIf="!closeIcon" [styleClass]="'p-dialog-header-close-icon'" />
</ng-container>
<span *ngIf="closeIconTemplate">
<ng-template *ngTemplateOutlet="closeIconTemplate"></ng-template>
</span>
</button>
</div>
</div>
<div #content [ngClass]="'p-dialog-content'" [ngStyle]="contentStyle" [class]="contentStyleClass">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
</div>
<div #footer class="p-dialog-footer" *ngIf="footerFacet || footerTemplate">
<ng-content select="p-footer"></ng-content>
<ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
</div>
</div>
<div #content [ngClass]="'p-dialog-content'" [ngStyle]="contentStyle" [class]="contentStyleClass">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
</div>
<div #footer class="p-dialog-footer" *ngIf="footerFacet || footerTemplate">
<ng-content select="p-footer"></ng-content>
<ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
</div>
</ng-template>
</div>
</div>
Expand Down Expand Up @@ -248,11 +248,11 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy {
* @group Props
*/
@Input() maskStyleClass: string | undefined;
/**
/**
* Style of the mask.
* @group Props
*/
@Input() maskStyle: string | undefined;
@Input() maskStyle: string | undefined;
/**
* Whether to show the header or not.
* @group Props
Expand Down
6 changes: 0 additions & 6 deletions src/app/components/panelmenu/panelmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,6 @@ export class PanelMenu implements AfterContentInit {
*/
@Input() set model(value: MenuItem[] | undefined) {
this._model = value;

}
get model(): MenuItem[] | undefined {
return this._model;
Expand Down Expand Up @@ -905,12 +904,8 @@ export class PanelMenu implements AfterContentInit {

activeItem = signal<any>(null);



_model: MenuItem[] | undefined;



ngOnInit() {
this.id = this.id || UniqueComponentId();
}
Expand Down Expand Up @@ -1123,4 +1118,3 @@ export class PanelMenu implements AfterContentInit {
declarations: [PanelMenu, PanelMenuSub, PanelMenuList]
})
export class PanelMenuModule {}

9 changes: 4 additions & 5 deletions src/app/components/progressbar/progressbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ import { QueryList } from '@angular/core';
[ngClass]="{ 'p-progressbar p-component': true, 'p-progressbar-determinate': mode === 'determinate', 'p-progressbar-indeterminate': mode === 'indeterminate' }"
>
<div *ngIf="mode === 'determinate'" class="p-progressbar-value p-progressbar-value-animate" [style.width]="value + '%'" style="display:flex" [style.background]="color" [attr.data-pc-section]="'value'">
<div class="p-progressbar-label">
<div *ngIf="showValue && !contentTemplate" [style.display]="value != null && value !== 0 ? 'flex' : 'none'" [attr.data-pc-section]="'label'">{{ value }}{{ unit }}</div>
<ng-container *ngTemplateOutlet="contentTemplate; context: { $implicit: value }"></ng-container>
</div>
<div class="p-progressbar-label">
<div *ngIf="showValue && !contentTemplate" [style.display]="value != null && value !== 0 ? 'flex' : 'none'" [attr.data-pc-section]="'label'">{{ value }}{{ unit }}</div>
<ng-container *ngTemplateOutlet="contentTemplate; context: { $implicit: value }"></ng-container>
</div>
</div>
<div *ngIf="mode === 'indeterminate'" class="p-progressbar-indeterminate-container" [attr.data-pc-section]="'container'">
<div class="p-progressbar-value p-progressbar-value-animate" [style.background]="color" [attr.data-pc-section]="'value'"></div>
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/sidebar/sidebar.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export interface SidebarTemplates {
* Custom template of closeicon.
*/
closeicon(): TemplateRef<any>;
/**
* Headless template.
*/
/**
* Headless template.
*/
headless(): TemplateRef<any>;
}
Loading

0 comments on commit d1f1ba1

Please sign in to comment.