From e4c7e46f35ccad46ac9f9a1c62d816ab865d8250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 23 May 2024 22:31:27 +0300 Subject: [PATCH] revert calendar buttonprops --- src/app/components/calendar/calendar.ts | 224 +++++------------------- 1 file changed, 40 insertions(+), 184 deletions(-) diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index 51c73e0a375..ff43be2053c 100644 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -25,7 +25,7 @@ import { } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { OverlayService, PrimeNGConfig, PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api'; -import { ButtonModule, ButtonProps } from 'primeng/button'; +import { ButtonModule } from 'primeng/button'; import { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom'; import { RippleModule } from 'primeng/ripple'; import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils'; @@ -118,30 +118,24 @@ export const CALENDAR_VALUE_ACCESSOR: any = { styleClass="p-datepicker-trigger p-button-icon-only" [disabled]="disabled" tabindex="0" - [buttonProps]="iconButtonProps" > - + - - - - + + + - - - - - - + +
- - - + + + @@ -202,7 +187,6 @@ export const CALENDAR_VALUE_ACCESSOR: any = { styleClass="p-datepicker-month p-link" [disabled]="switchViewButtonDisabled()" [attr.aria-label]="this.getTranslation('chooseMonth')" - [buttonProps]="monthButtonProps" [text]="true" > {{ getMonthName(month.month) }} @@ -215,7 +199,6 @@ export const CALENDAR_VALUE_ACCESSOR: any = { styleClass="p-datepicker-year p-link" [disabled]="switchViewButtonDisabled()" [attr.aria-label]="getTranslation('chooseYear')" - [buttonProps]="yearButtonProps" [text]="true" > {{ getYear(month) }} @@ -233,11 +216,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = { type="button" [attr.aria-label]="nextIconAriaLabel" pRipple - [buttonProps]="nextButtonProps" > - + - + @@ -336,12 +318,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = { (mouseleave)="onTimePickerElementMouseLeave()" [attr.aria-label]="getTranslation('nextHour')" pRipple - [buttonProps]="hourPickerIncrementButtonProps" > - - - - + + + 0{{ currentHour }} - - - - + + +
@@ -382,12 +360,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = { (mouseleave)="onTimePickerElementMouseLeave()" [attr.aria-label]="getTranslation('nextMinute')" pRipple - [buttonProps]="minutePickerIncrementButtonProps" > - - - - + + + 0{{ currentMinute }} - - + + @@ -428,12 +403,10 @@ export const CALENDAR_VALUE_ACCESSOR: any = { (mouseleave)="onTimePickerElementMouseLeave()" [attr.aria-label]="getTranslation('nextSecond')" pRipple - [buttonProps]="secondPickerIncrementButtonProps" > - - - - + + + 0{{ currentSecond }} - - - - + + +
- - - - - + + + + {{ pm ? 'PM' : 'AM' }} - - - - - + + + +
- - + +
@@ -817,83 +750,6 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { * @group Props */ @Input() showTransitionOptions: string = '.12s cubic-bezier(0, 0, 0.2, 1)'; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() yearButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() monthButtonProps: ButtonProps; - /** - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() nextButtonProps: ButtonProps; - /** - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() prevButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() iconButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() hourPickerIncrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() hourPickerDecrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() minutePickerIncrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() minutePickerDecrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() secondPickerIncrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() secondPickerDecrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() ampmPickerIncrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() ampmPickerDecrementButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() todayButtonProps: ButtonProps; - /** - * Used to pass all properties of the ButtonProps to the Button component. - * @group Props - */ - @Input() clearButtonProps: ButtonProps; /** * Transition options of the hide animation. * @group Props