Skip to content

Commit caca67b

Browse files
authored
Merge branch '18.2.x' into iminchev/add-coerceToInt-to-props-18.2.x
2 parents 9587860 + 77ba2ba commit caca67b

File tree

67 files changed

+616
-176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+616
-176
lines changed

projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { IgxIconComponent } from '../icon/icon.component';
2424
import { IgxDropDownItemNavigationDirective } from '../drop-down/drop-down-navigation.directive';
2525
import { IgxToggleActionDirective } from '../directives/toggle/toggle.directive';
2626
import { IgxRippleDirective } from '../directives/ripple/ripple.directive';
27-
import { IgxButtonDirective } from '../directives/button/button.directive';
2827
import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common';
2928
import { getCurrentResourceStrings } from '../core/i18n/resources';
3029
import { IgxIconButtonDirective } from '../directives/button/icon-button.directive';
@@ -78,7 +77,6 @@ export class IgxActionStripMenuItemDirective {
7877
NgIf,
7978
NgFor,
8079
NgTemplateOutlet,
81-
IgxButtonDirective,
8280
IgxIconButtonDirective,
8381
IgxRippleDirective,
8482
IgxToggleActionDirective,

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-action-button.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Component, Input, TemplateRef, ViewChild, Output, EventEmitter, ElementRef, booleanAttribute } from '@angular/core';
22
import { IgxIconComponent } from '../../icon/icon.component';
33
import { IgxRippleDirective } from '../../directives/ripple/ripple.directive';
4-
import { IgxButtonDirective } from '../../directives/button/button.directive';
54
import { NgIf } from '@angular/common';
65
import { IgxIconButtonDirective } from '../../directives/button/icon-button.directive';
76

@@ -12,7 +11,7 @@ import { IgxIconButtonDirective } from '../../directives/button/icon-button.dire
1211
selector: 'igx-grid-action-button',
1312
templateUrl: 'grid-action-button.component.html',
1413
standalone: true,
15-
imports: [NgIf, IgxButtonDirective, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective]
14+
imports: [NgIf, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective]
1615
})
1716
export class IgxGridActionButtonComponent {
1817

projects/igniteui-angular/src/lib/calendar/calendar.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
booleanAttribute,
1414
HostListener,
1515
} from '@angular/core';
16-
import { NgIf, NgTemplateOutlet, NgStyle, NgFor, DatePipe } from '@angular/common';
16+
import { NgIf, NgTemplateOutlet, NgFor, DatePipe } from '@angular/common';
1717
import { NG_VALUE_ACCESSOR } from '@angular/forms';
1818

1919
import {
@@ -72,7 +72,7 @@ let NEXT_ID = 0;
7272
selector: 'igx-calendar',
7373
templateUrl: 'calendar.component.html',
7474
standalone: true,
75-
imports: [NgIf, NgTemplateOutlet, IgxCalendarScrollPageDirective, NgStyle, IgxIconComponent, NgFor, IgxDaysViewComponent, IgxMonthsViewComponent, IgxYearsViewComponent, DatePipe, IgxMonthViewSlotsCalendar, IgxGetViewDateCalendar],
75+
imports: [NgIf, NgTemplateOutlet, IgxCalendarScrollPageDirective, IgxIconComponent, NgFor, IgxDaysViewComponent, IgxMonthsViewComponent, IgxYearsViewComponent, DatePipe, IgxMonthViewSlotsCalendar, IgxGetViewDateCalendar],
7676
})
7777
export class IgxCalendarComponent extends IgxCalendarBaseDirective implements AfterViewInit, OnDestroy {
7878
/**

projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
OnDestroy,
1010
OnInit,
1111
} from "@angular/core";
12-
import { NgIf, NgStyle, NgTemplateOutlet, DatePipe } from "@angular/common";
12+
import { NgIf, NgTemplateOutlet, DatePipe } from "@angular/common";
1313
import { NG_VALUE_ACCESSOR } from "@angular/forms";
1414

1515
import { IgxMonthsViewComponent } from "../months-view/months-view.component";
@@ -40,7 +40,6 @@ let NEXT_ID = 0;
4040
standalone: true,
4141
imports: [
4242
NgIf,
43-
NgStyle,
4443
NgTemplateOutlet,
4544
DatePipe,
4645
IgxIconComponent,

projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
[date]="date"
1313
[showActive]="showActive"
1414
(itemSelection)="selectDate($event)"
15+
(mousedown)="onMouseDown()"
1516
>
1617
<span class="igx-calendar-view__item-inner" aria-hidden="true">
1718
{{ formattedMonth(month).formatted | titlecase }}

projects/igniteui-angular/src/lib/calendar/months-view/months-view.component.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Inject,
88
} from "@angular/core";
99
import { IgxCalendarMonthDirective } from "../calendar.directives";
10-
import { NgFor, TitleCasePipe, DatePipe } from "@angular/common";
10+
import { NgFor, TitleCasePipe } from "@angular/common";
1111
import {
1212
IgxCalendarViewDirective,
1313
DAY_INTERVAL_TOKEN,
@@ -34,7 +34,7 @@ let NEXT_ID = 0;
3434
selector: "igx-months-view",
3535
templateUrl: "months-view.component.html",
3636
standalone: true,
37-
imports: [NgFor, IgxCalendarMonthDirective, TitleCasePipe, DatePipe],
37+
imports: [NgFor, IgxCalendarMonthDirective, TitleCasePipe],
3838
})
3939
export class IgxMonthsViewComponent extends IgxCalendarViewDirective implements ControlValueAccessor {
4040
#standalone = true;
@@ -136,6 +136,15 @@ export class IgxMonthsViewComponent extends IgxCalendarViewDirective implements
136136
super(dayInterval);
137137
}
138138

139+
/**
140+
* @hidden
141+
*/
142+
protected onMouseDown() {
143+
if (this.tabIndex !== -1) {
144+
this.el.nativeElement.focus();
145+
}
146+
}
147+
139148
/**
140149
* Returns the locale representation of the month in the months view.
141150
*

projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
[date]="date"
1414
[showActive]="showActive"
1515
(itemSelection)="selectDate($event)"
16+
(mousedown)="onMouseDown()"
1617
>
1718
<span class="igx-calendar-view__item-inner" aria-hidden="true">
1819
{{ formattedYear(year).formatted }}

projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,13 @@ export class IgxYearsViewComponent extends IgxCalendarViewDirective implements C
155155
year: this.yearFormat,
156156
});
157157
}
158+
159+
/**
160+
* @hidden
161+
*/
162+
protected onMouseDown() {
163+
if (this.tabIndex !== -1) {
164+
this.el.nativeElement.focus();
165+
}
166+
}
158167
}

projects/igniteui-angular/src/lib/carousel/carousel-base.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { AnimationReferenceMetadata, useAnimation } from '@angular/animations';
2-
import { ChangeDetectorRef, EventEmitter, Inject } from '@angular/core';
2+
import { ChangeDetectorRef, EventEmitter, Inject, InjectionToken } from '@angular/core';
33
import { IgxAngularAnimationService } from '../services/animation/angular-animation-service';
44
import { AnimationPlayer, AnimationService } from '../services/animation/animation';
55
import { fadeIn, slideInLeft } from 'igniteui-angular/animations';
6-
import { CarouselAnimationType } from './enums';
6+
import { CarouselAnimationType, CarouselIndicatorsOrientation } from './enums';
77

88
export enum Direction { NONE, NEXT, PREV }
99

@@ -12,6 +12,37 @@ export interface CarouselAnimationSettings {
1212
leaveAnimation: AnimationReferenceMetadata;
1313
}
1414

15+
export interface ICarouselComponentBase {
16+
id: string;
17+
role: string;
18+
cssClass: string;
19+
loop: boolean;
20+
pause: boolean;
21+
navigation: boolean;
22+
indicators: boolean;
23+
vertical: boolean;
24+
keyboardSupport: boolean;
25+
gesturesSupport: boolean;
26+
maximumIndicatorsCount: number;
27+
indicatorsOrientation: CarouselIndicatorsOrientation;
28+
animationType: CarouselAnimationType;
29+
total: number;
30+
current: number;
31+
interval: number;
32+
slideChanged: EventEmitter<any>;
33+
slideAdded: EventEmitter<any>;
34+
slideRemoved: EventEmitter<any>;
35+
carouselPaused: EventEmitter<any>;
36+
carouselPlaying: EventEmitter<any>;
37+
next(): void;
38+
prev(): void;
39+
play(): void;
40+
stop(): void
41+
}
42+
43+
/** @hidden */
44+
export const IGX_CAROUSEL_COMPONENT = /*@__PURE__*/new InjectionToken<ICarouselComponentBase>('IgxCarouselToken');
45+
1546
/** @hidden */
1647
export interface IgxSlideComponentBase {
1748
direction: Direction;

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { CarouselResourceStringsEN, ICarouselResourceStrings } from '../core/i18
3030
import { first, IBaseEventArgs, last, PlatformUtil } from '../core/utils';
3131
import { IgxAngularAnimationService } from '../services/animation/angular-animation-service';
3232
import { AnimationService } from '../services/animation/animation';
33-
import { Direction, IgxCarouselComponentBase } from './carousel-base';
33+
import { Direction, ICarouselComponentBase, IGX_CAROUSEL_COMPONENT, IgxCarouselComponentBase } from './carousel-base';
3434
import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives';
3535
import { IgxSlideComponent } from './slide.component';
3636
import { IgxIconComponent } from '../icon/icon.component';
@@ -75,7 +75,8 @@ export class CarouselHammerConfig extends HammerGestureConfig {
7575
{
7676
provide: HAMMER_GESTURE_CONFIG,
7777
useClass: CarouselHammerConfig
78-
}
78+
},
79+
{ provide: IGX_CAROUSEL_COMPONENT, useExisting: IgxCarouselComponent }
7980
],
8081
selector: 'igx-carousel',
8182
templateUrl: 'carousel.component.html',
@@ -88,7 +89,7 @@ export class CarouselHammerConfig extends HammerGestureConfig {
8889
imports: [IgxButtonDirective, IgxIconComponent, NgIf, NgClass, NgFor, NgTemplateOutlet]
8990
})
9091

91-
export class IgxCarouselComponent extends IgxCarouselComponentBase implements OnDestroy, AfterContentInit {
92+
export class IgxCarouselComponent extends IgxCarouselComponentBase implements ICarouselComponentBase, OnDestroy, AfterContentInit {
9293

9394
/**
9495
* Sets the `id` of the carousel.

0 commit comments

Comments
 (0)