Skip to content

Commit

Permalink
style: re-format all code with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlewis92 committed Aug 21, 2024
1 parent 0ef8674 commit 44853f4
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 159 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ Finally use in one of your apps components:
import { Component } from '@angular/core';

@Component({
template: `
<input
type="text"
mwlFlatpickr
[(ngModel)]="selectedDate"
[altInput]="true"
[convertModelValue]="true"
/>
`,
template: ` <input type="text" mwlFlatpickr [(ngModel)]="selectedDate" [altInput]="true" [convertModelValue]="true" /> `,
})
export class MyComponent {}
```
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"karma-mocha": "^2.0.1",
"mocha": "^10.0.0",
"ng-packagr": "^17.3.0",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"rxjs": "~7.5.0",
"sinon": "^14.0.0",
"sinon-chai": "^3.7.0",
Expand Down
84 changes: 42 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions projects/angularx-flatpickr/src/lib/flatpickr.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class FlatpickrDirective
private elm: ElementRef,
private defaults: FlatpickrDefaults,
private renderer: Renderer2,
@Inject(PLATFORM_ID) private platformId: Object
@Inject(PLATFORM_ID) private platformId: Object,
) {}

ngAfterViewInit(): void {
Expand Down Expand Up @@ -417,14 +417,14 @@ export class FlatpickrDirective
onMonthChange: (
selectedDates: Date[],
dateString: string,
instance: any
instance: any,
) => {
this.flatpickrMonthChange.emit({ selectedDates, dateString, instance });
},
onYearChange: (
selectedDates: Date[],
dateString: string,
instance: any
instance: any,
) => {
this.flatpickrYearChange.emit({ selectedDates, dateString, instance });
},
Expand All @@ -434,15 +434,15 @@ export class FlatpickrDirective
onValueUpdate: (
selectedDates: Date[],
dateString: string,
instance: any
instance: any,
) => {
this.flatpickrValueUpdate.emit({ selectedDates, dateString, instance });
},
onDayCreate: (
selectedDates: Date[],
dateString: string,
instance: any,
dayElement: HTMLElement
dayElement: HTMLElement,
) => {
this.flatpickrDayCreate.emit({
selectedDates,
Expand Down Expand Up @@ -478,7 +478,7 @@ export class FlatpickrDirective
if (isPlatformBrowser(this.platformId)) {
this.instance = flatpickr(
this.elm.nativeElement,
options
options,
) as flatpickr.Instance;
this.setDisabledState(this.isDisabled);
}
Expand Down Expand Up @@ -543,8 +543,8 @@ export class FlatpickrDirective
this.instance.parseDate(
str,
this.instance.config.dateFormat,
!this.instance.config.enableTime
)
!this.instance.config.enableTime,
),
);
this.onChangeFn(dates);
break;
Expand All @@ -556,8 +556,8 @@ export class FlatpickrDirective
this.instance.parseDate(
str,
this.instance.config.dateFormat,
!this.instance.config.enableTime
)
!this.instance.config.enableTime,
),
);
this.onChangeFn({ from, to });
break;
Expand All @@ -568,8 +568,8 @@ export class FlatpickrDirective
this.instance.parseDate(
value,
this.instance.config.dateFormat,
!this.instance.config.enableTime
)
!this.instance.config.enableTime,
),
);
}
} else {
Expand Down
Loading

0 comments on commit 44853f4

Please sign in to comment.