Skip to content

Commit 25dfacb

Browse files
authored
Merge branch 'master' into ganastasov/fix-15424-master
2 parents 1eaca47 + ee889f0 commit 25dfacb

File tree

10 files changed

+109
-169
lines changed

10 files changed

+109
-169
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Ignite UI for Angular Change Log
22

33
All notable changes for each version of this project will be documented in this file.
4+
5+
## 19.2.0
6+
### General
7+
- `IgxCarousel`
8+
- Removed deprecated property `keyboardSupport`.
9+
- `IgxSlide`
10+
- **Deprecation** - `tabIndex` has been deprecated and will be removed in a future version.
11+
412
## 19.1.1
513
### New Features
614
- IgxListItem
@@ -11,6 +19,7 @@ All notable changes for each version of this project will be documented in this
1119
- `IgxCarousel`
1220
- **Behavioral Changes** - the `maximumIndicatorsCount` input property now defaults to `10`.
1321
- **Deprecation** - `CarouselIndicatorsOrientation` enum members `top` and `bottom` have been deprecated and will be removed in a future version. Use `start` and `end` instead.
22+
1423
### New Features
1524
- `IgxBanner`
1625
- Introduced a new `expanded` input property, enabling dynamic control over the banner's state. The banner can now be programmatically set to expanded (visible) or collapsed (hidden) both initially and at runtime. Animations will trigger during runtime updates — the **open animation** plays when `expanded` is set to `true`, and the **close animation** plays when set to `false`. However, no animations will trigger when the property is set initially.

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@
216216
"version": "19.1.1",
217217
"description": "Updates Ignite UI for Angular from v19.1.0 to v19.1.1",
218218
"factory": "./update-19_1_1"
219+
},
220+
"migration-44": {
221+
"version": "19.2.0",
222+
"description": "Updates Ignite UI for Angular from v19.1.1 to v19.2.0",
223+
"factory": "./update-19_2_0"
219224
}
220225
}
221226
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "../../common/schema/binding.schema.json",
3+
"changes": [
4+
{
5+
"name": "keyboardSupport",
6+
"remove": true,
7+
"owner": {
8+
"selector": "igx-carousel",
9+
"type": "component"
10+
}
11+
}
12+
]
13+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import * as path from 'path';
2+
3+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
4+
import { setupTestTree } from '../common/setup.spec';
5+
6+
const version = '19.2.0';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
beforeEach(() => {
13+
appTree = setupTestTree();
14+
});
15+
16+
const migrationName = 'migration-44';
17+
18+
it('should remove igx-caroursel property `keyboardSupport` in template', async () => {
19+
appTree.create(`/testSrc/appPrefix/component/test.component.html`,
20+
`
21+
<igx-carousel [keyboardSupport]="true"></igx-carousel>
22+
<igx-carousel [keyboardSupport]="false"></igx-carousel>
23+
<igx-carousel [keyboardSupport]="myProp"></igx-carousel>
24+
`
25+
);
26+
27+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
28+
29+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.html')).toEqual(
30+
`
31+
<igx-carousel></igx-carousel>
32+
<igx-carousel></igx-carousel>
33+
<igx-carousel></igx-carousel>
34+
`
35+
);
36+
});
37+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '19.2.0';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
};

projects/igniteui-angular/src/lib/carousel/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
1515
| `navigation` | boolean | Controls should the carousel render the left/right navigation buttons. Defaults to `true`. |
1616
| `indicators` | boolean | Controls should the carousel render the indicators. Defaults to `true`. |
1717
| `vertical` | boolean | Controls should the carousel be rendered in vertical alignment. Defaults to `false`. |
18-
| `keyboardSupport` | boolean | Controls should the keyboard navigation should be supported. Defaults to `false`. |
1918
| `gesturesSupport` | boolean | Controls should the gestures should be supported. Defaults to `true`. |
2019
| `maximumIndicatorsCount` | number | The number of visible indicators. Defaults to `10`. |
2120
| `indicatorsOrientation` | CarouselIndicatorsOrientation | Controls the orientation of the indicators. Defaults to `end`. |
@@ -39,10 +38,14 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
3938
| `select(slide: IgxSlide, direction: Direction)`| void | Selects the slide and the direction to transition to. Emits `slideChanged` event. |
4039

4140
### Keyboard navigation
42-
Keyboard navigation will be enabled when the **IgxCarousel** component is focused and `keyboardSupport` property is set to `true`:
43-
- Arrow keys will navigate through the slides.
44-
- `Home` will focus the first slide inside the carousel view.
45-
- `End` will focus the last slide inside the carousel view.
41+
42+
- Navigation buttons
43+
- `Space`/`Enter` key - navigates to the next/previous slide.
44+
- Indicators
45+
- `ArrowLeft` key - navigates to the previous (next in Right-to-Left mode) slide.
46+
- `ArrowRight` key - navigates to the next (previous in Right-to-Left mode) slide.
47+
- `Home` key - navigates to the first (last in Right-to-Left mode) slide.
48+
- `End` key - navigates to the last (first in Right-to-Left mode) slide.
4649

4750
### Templates
4851
The **IgxCarousel** supports templating indicators and navigation buttons

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

Lines changed: 2 additions & 33 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, InjectionToken } from '@angular/core';
2+
import { ChangeDetectorRef, EventEmitter, Inject } 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, CarouselIndicatorsOrientation } from './enums';
6+
import { CarouselAnimationType } from './enums';
77

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

@@ -12,37 +12,6 @@ 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-
4615
/** @hidden */
4716
export interface IgxSlideComponentBase {
4817
direction: Direction;

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

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe('Carousel', () => {
186186
expect(carousel.slideChanged.emit).toHaveBeenCalledTimes(3);
187187

188188
spyOn(carousel.slideAdded, 'emit');
189-
const newSlide = new IgxSlideComponent(null, null);
189+
const newSlide = new IgxSlideComponent(null);
190190
carousel.add(newSlide);
191191
fixture.detectChanges();
192192
args = {
@@ -233,37 +233,41 @@ describe('Carousel', () => {
233233
it('keyboard navigation test', () => {
234234
spyOn(carousel.slideChanged, 'emit');
235235
carousel.pause = true;
236-
carousel.keyboardSupport = true;
236+
const indicators = HelperTestFunctions.getIndicatorsContainer(fixture);
237+
238+
indicators.dispatchEvent(new KeyboardEvent('keyup', { key: 'Tab' }));
239+
fixture.detectChanges();
240+
expect(indicators.classList).toContain('igx-carousel-indicators--focused');
237241

238-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
242+
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', indicators, true);
239243
fixture.detectChanges();
240244
HelperTestFunctions.verifyActiveSlide(carousel, 1);
241245

242-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
246+
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', indicators, true);
243247
fixture.detectChanges();
244248
HelperTestFunctions.verifyActiveSlide(carousel, 2);
245249

246-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
250+
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', indicators, true);
247251
fixture.detectChanges();
248252
HelperTestFunctions.verifyActiveSlide(carousel, 3);
249253

250-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
254+
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', indicators, true);
251255
fixture.detectChanges();
252256
HelperTestFunctions.verifyActiveSlide(carousel, 0);
253257

254-
UIInteractions.triggerKeyDownEvtUponElem('ArrowLeft', carousel.nativeElement, true);
258+
UIInteractions.triggerKeyDownEvtUponElem('ArrowLeft', indicators, true);
255259
fixture.detectChanges();
256260
HelperTestFunctions.verifyActiveSlide(carousel, 3);
257261

258-
UIInteractions.triggerKeyDownEvtUponElem('ArrowLeft', carousel.nativeElement, true);
262+
UIInteractions.triggerKeyDownEvtUponElem('ArrowLeft', indicators, true);
259263
fixture.detectChanges();
260264
HelperTestFunctions.verifyActiveSlide(carousel, 2);
261265

262-
UIInteractions.triggerKeyDownEvtUponElem('Home', carousel.nativeElement, true);
266+
UIInteractions.triggerKeyDownEvtUponElem('Home', indicators, true);
263267
fixture.detectChanges();
264268
HelperTestFunctions.verifyActiveSlide(carousel, 0);
265269

266-
UIInteractions.triggerKeyDownEvtUponElem('End', carousel.nativeElement, true);
270+
UIInteractions.triggerKeyDownEvtUponElem('End', indicators, true);
267271
fixture.detectChanges();
268272
HelperTestFunctions.verifyActiveSlide(carousel, 3);
269273

@@ -402,39 +406,6 @@ describe('Carousel', () => {
402406
expect(indicatorsContainer).toBeDefined();
403407
});
404408

405-
it('keyboardSupport changes support for keyboard navigation', () => {
406-
expect(carousel.keyboardSupport).toBe(false);
407-
carousel.select(carousel.get(1));
408-
fixture.detectChanges();
409-
410-
spyOn(carousel.slideChanged, 'emit');
411-
412-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
413-
fixture.detectChanges();
414-
HelperTestFunctions.verifyActiveSlide(carousel, 1);
415-
416-
UIInteractions.triggerKeyDownEvtUponElem('ArrowLeft', carousel.nativeElement, true);
417-
fixture.detectChanges();
418-
HelperTestFunctions.verifyActiveSlide(carousel, 1);
419-
420-
UIInteractions.triggerKeyDownEvtUponElem('End', carousel.nativeElement, true);
421-
fixture.detectChanges();
422-
HelperTestFunctions.verifyActiveSlide(carousel, 1);
423-
424-
UIInteractions.triggerKeyDownEvtUponElem('Home', carousel.nativeElement, true);
425-
fixture.detectChanges();
426-
HelperTestFunctions.verifyActiveSlide(carousel, 1);
427-
428-
expect(carousel.slideChanged.emit).toHaveBeenCalledTimes(0);
429-
carousel.keyboardSupport = true;
430-
fixture.detectChanges();
431-
432-
UIInteractions.triggerKeyDownEvtUponElem('ArrowRight', carousel.nativeElement, true);
433-
fixture.detectChanges();
434-
HelperTestFunctions.verifyActiveSlide(carousel, 2);
435-
expect(carousel.slideChanged.emit).toHaveBeenCalledTimes(1);
436-
});
437-
438409
it('should stop/play on mouse enter/leave ', () => {
439410
carousel.interval = 1000;
440411
carousel.play();

0 commit comments

Comments
 (0)