-
Notifications
You must be signed in to change notification settings - Fork 160
Updating master to Angular v21 #16345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
de60276
feat(deps): updating typedoc to match new ts requirements
ChronosSF d42c973
feat(deps): updating to cli next 8
ChronosSF d10955b
feat(deps): updating to next9
ChronosSF 184fb09
feat(deps): updating cli to rc0
ChronosSF b0a93af
feat(deps): upgrading to angular rc0
ChronosSF 1f525c5
feat(deps): updating to cli rc1
ChronosSF ed913d1
feat(deps): updating to @angular/core 21
ChronosSF 494d147
fix(*): fixing build errors from new strict event arg type check
ChronosSF a598e02
Merge remote-tracking branch 'origin/master' into sstoychev/update-to-21
ChronosSF b8dd705
chore(dte): trying to fix issue in date pipe with normalize
ChronosSF 212c693
fix(tests): adding normalize to certain date formatting tests
ChronosSF 5c1976a
test(*): fixing more issues with tests
ChronosSF db27552
Merge branch 'master' into sstoychev/update-to-21
ChronosSF 2dcb09a
fix(build): moving to bundler resolution for i18n
ChronosSF 9deae36
fix(elements): createEnvironmentInjector build error
rkaraivanov 21ebdd2
chore(*): updating to rc.2
ChronosSF 73e99f1
chore(*): updating angular core and fixing demo app issue
ChronosSF 3256f0f
Merge branch 'master' into sstoychev/update-to-21
ChronosSF 5cd167b
Merge remote-tracking branch 'origin/master' into sstoychev/update-to-21
rkaraivanov 352ff23
chore: update public_api.ts to export global-types
rkaraivanov 96f2b4d
chore: Updated to Angular 21
rkaraivanov 89227f8
chore: Unused imports cleanup and injection context
rkaraivanov 17fb8a4
Merge remote-tracking branch 'origin/master' into sstoychev/update-to-21
rkaraivanov 84a3133
chore: Formatting issues
rkaraivanov e2d53ed
Merge remote-tracking branch 'origin/master' into sstoychev/update-to-21
rkaraivanov 3edbc1c
Merge branch 'master' into sstoychev/update-to-21
rkaraivanov e4652ff
Merge branch 'master' into sstoychev/update-to-21
rkaraivanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import { provideZoneChangeDetection } from "@angular/core"; | ||
| import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser'; | ||
| import { AppComponent } from './app/app.component'; | ||
| import { config } from './app/app.config.server'; | ||
|
|
||
| const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context); | ||
| const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, {...config, providers: [provideZoneChangeDetection(), ...config.providers]}, context); | ||
|
|
||
| export default bootstrap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import { provideZoneChangeDetection } from "@angular/core"; | ||
| import { AppComponent } from './app/app.component'; | ||
| import { bootstrapApplication } from '@angular/platform-browser'; | ||
| import { appConfig } from './app/app.config'; | ||
|
|
||
|
|
||
| bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)); | ||
| bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]}).catch(err => console.error(err)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Global type augmentations for IgniteUI Angular | ||
| */ | ||
|
|
||
| declare global { | ||
| interface GlobalEventHandlersEventMap { | ||
| 'keydown.enter': KeyboardEvent; | ||
| 'keydown.escape': KeyboardEvent; | ||
| 'keydown.tab': KeyboardEvent; | ||
| 'keydown.arrowup': KeyboardEvent; | ||
| 'keydown.arrowdown': KeyboardEvent; | ||
| 'keydown.arrowleft': KeyboardEvent; | ||
| 'keydown.arrowright': KeyboardEvent; | ||
| 'keydown.shift.tab': KeyboardEvent; | ||
| 'keydown.alt.arrowup': KeyboardEvent; | ||
| 'keydown.alt.arrowdown': KeyboardEvent; | ||
| 'keydown.pageup': KeyboardEvent; | ||
| 'keydown.pagedown': KeyboardEvent; | ||
| 'keydown.home': KeyboardEvent; | ||
| 'keydown.end': KeyboardEvent; | ||
| 'keydown.space': KeyboardEvent; | ||
| 'igcChange': CustomEvent; | ||
| } | ||
| } | ||
|
|
||
| // This export is needed to make this file a module | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 43 additions & 44 deletions
87
...r/date-picker/src/date-range-picker/predefined-ranges/predefined-ranges-area.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,71 +1,70 @@ | ||
| import { Component, EventEmitter, Input, Output, ChangeDetectionStrategy } from '@angular/core'; | ||
| import { CommonModule } from '@angular/common'; | ||
| import { IgxChipComponent } from 'igniteui-angular/chips'; | ||
| import { CalendarDay, CustomDateRange, DateRange, DateRangePickerResourceStringsEN, IDateRangePickerResourceStrings } from 'igniteui-angular/core'; | ||
|
|
||
|
|
||
| type PredefinedRangeKey = 'last7Days' | 'currentMonth' | 'last30Days' | 'yearToDate'; | ||
|
|
||
| @Component({ | ||
| selector: 'igx-predefined-ranges-area', | ||
| standalone: true, | ||
| imports: [CommonModule, IgxChipComponent], | ||
| templateUrl: './predefined-ranges-area-component.html', | ||
| styles: [` | ||
| selector: 'igx-predefined-ranges-area', | ||
| standalone: true, | ||
| imports: [IgxChipComponent], | ||
| templateUrl: './predefined-ranges-area-component.html', | ||
| styles: [` | ||
| :host { display:block; } | ||
| .igx-predefined-ranges { | ||
| display:flex; flex-wrap:wrap; gap:.5rem; padding:.5rem .75rem; | ||
| } | ||
| `], | ||
| changeDetection: ChangeDetectionStrategy.OnPush | ||
| changeDetection: ChangeDetectionStrategy.OnPush | ||
| }) | ||
| export class IgxPredefinedRangesAreaComponent { | ||
| @Input() public usePredefinedRanges = false; | ||
| @Input() public customRanges: CustomDateRange[] = []; | ||
| @Input() public resourceStrings: IDateRangePickerResourceStrings = DateRangePickerResourceStringsEN as any; | ||
| @Input() public usePredefinedRanges = false; | ||
| @Input() public customRanges: CustomDateRange[] = []; | ||
| @Input() public resourceStrings: IDateRangePickerResourceStrings = DateRangePickerResourceStringsEN as any; | ||
|
|
||
| @Output() public rangeSelect = new EventEmitter<DateRange>(); | ||
| @Output() public rangeSelect = new EventEmitter<DateRange>(); | ||
|
|
||
| public get ranges(): CustomDateRange[] { | ||
| const base = this.usePredefinedRanges ? this.getPredefinedRanges() : []; | ||
| return [...base, ...(this.customRanges ?? [])]; | ||
| } | ||
| public get ranges(): CustomDateRange[] { | ||
| const base = this.usePredefinedRanges ? this.getPredefinedRanges() : []; | ||
| return [...base, ...(this.customRanges ?? [])]; | ||
| } | ||
|
|
||
| public trackByLabel = (i: number, r: CustomDateRange) => r.label; | ||
| public trackByLabel = (i: number, r: CustomDateRange) => r.label; | ||
|
|
||
| public onSelect(range: DateRange) { | ||
| this.rangeSelect.emit(range); | ||
| } | ||
| public onSelect(range: DateRange) { | ||
| this.rangeSelect.emit(range); | ||
| } | ||
|
|
||
| private getLabel(rs: any, shortKey: string, prefixedKey: string, fallback: string): string { | ||
| return rs?.[shortKey] ?? rs?.[prefixedKey] ?? fallback; | ||
| private getLabel(rs: any, shortKey: string, prefixedKey: string, fallback: string): string { | ||
| return rs?.[shortKey] ?? rs?.[prefixedKey] ?? fallback; | ||
| } | ||
|
|
||
| private getPredefinedRanges(): CustomDateRange[] { | ||
| const today = CalendarDay.today; | ||
| const rs: any = this.resourceStrings ?? {}; | ||
| private getPredefinedRanges(): CustomDateRange[] { | ||
| const today = CalendarDay.today; | ||
| const rs: any = this.resourceStrings ?? {}; | ||
|
|
||
| const labels = { | ||
| last7Days: this.getLabel(rs, 'last7Days', 'igx_date_range_picker_last7Days', 'Last 7 Days'), | ||
| currentMonth: this.getLabel(rs, 'currentMonth', 'igx_date_range_picker_currentMonth', 'Current Month'), | ||
| last30Days: this.getLabel(rs, 'last30Days', 'igx_date_range_picker_last30Days', 'Last 30 Days'), | ||
| yearToDate: this.getLabel(rs, 'yearToDate', 'igx_date_range_picker_yearToDate', 'Year to Date') | ||
| }; | ||
| const labels = { | ||
| last7Days: this.getLabel(rs, 'last7Days', 'igx_date_range_picker_last7Days', 'Last 7 Days'), | ||
| currentMonth: this.getLabel(rs, 'currentMonth', 'igx_date_range_picker_currentMonth', 'Current Month'), | ||
| last30Days: this.getLabel(rs, 'last30Days', 'igx_date_range_picker_last30Days', 'Last 30 Days'), | ||
| yearToDate: this.getLabel(rs, 'yearToDate', 'igx_date_range_picker_yearToDate', 'Year to Date') | ||
| }; | ||
|
|
||
| const startOfMonth = new Date(today.native.getFullYear(), today.native.getMonth(), 1); | ||
| const endOfMonth = new Date(today.native.getFullYear(), today.native.getMonth() + 1, 0); | ||
| const startOfYear = new Date(today.native.getFullYear(), 0, 1); | ||
| const startOfMonth = new Date(today.native.getFullYear(), today.native.getMonth(), 1); | ||
| const endOfMonth = new Date(today.native.getFullYear(), today.native.getMonth() + 1, 0); | ||
| const startOfYear = new Date(today.native.getFullYear(), 0, 1); | ||
|
|
||
| const predefinedRanges: { key: PredefinedRangeKey; get: () => { start: Date; end: Date } }[] = [ | ||
| { key: 'last7Days', get: () => ({ start: today.add('day', -7).native, end: today.native }) }, | ||
| { key: 'currentMonth', get: () => ({ start: startOfMonth, end: endOfMonth }) }, | ||
| { key: 'last30Days', get: () => ({ start: today.add('day', -29).native, end: today.native }) }, | ||
| { key: 'yearToDate', get: () => ({ start: startOfYear, end: today.native }) }, | ||
| ]; | ||
| const predefinedRanges: { key: PredefinedRangeKey; get: () => { start: Date; end: Date } }[] = [ | ||
| { key: 'last7Days', get: () => ({ start: today.add('day', -7).native, end: today.native }) }, | ||
| { key: 'currentMonth', get: () => ({ start: startOfMonth, end: endOfMonth }) }, | ||
| { key: 'last30Days', get: () => ({ start: today.add('day', -29).native, end: today.native }) }, | ||
| { key: 'yearToDate', get: () => ({ start: startOfYear, end: today.native }) }, | ||
| ]; | ||
|
|
||
| return predefinedRanges.map(range => ({ | ||
| label: labels[range.key], | ||
| dateRange: range.get() | ||
| })); | ||
| } | ||
| return predefinedRanges.map(range => ({ | ||
| label: labels[range.key], | ||
| dateRange: range.get() | ||
| })); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.