Skip to content

Commit 56913bd

Browse files
committed
merge master
2 parents 1b00629 + 214cfb5 commit 56913bd

33 files changed

+2052
-609
lines changed

Diff for: CHANGELOG.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ All notable changes for each version of this project will be documented in this
1515

1616
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
1717
- **Behavioral Change** - Pinning columns is no longer automatically prevented when the pinning area would exceed the size of the grid.
18+
- `IgxCarousel`:
19+
- **Breaking Changes** -The carousel slides are no longer array, they are changed to QueryList.
20+
- **Behavioural change** - When slides are more than 5, a label is shown instead of the indicators. The count limit of visible indicators can be changed with the input `maximumIndicatorsCount`
21+
1822

1923
### New Features
2024
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`:
@@ -25,13 +29,13 @@ All notable changes for each version of this project will be documented in this
2529
- `sortingExpressionsChange` event emitter is added, which is fired whenever a change to the sorting expressions has occurred (prior to performing the actual sorting).
2630
- `filteringExpressionsTreeChange` event emitter is added, which is fired whenever a change to the filtering expressions has occurred (prior to performing the actual filtering).
2731
- `advancedFilteringExpressionsTreeChange` event emitter is added, which is fired whenever a change to the advanced filtering expressions has occurred (prior to performing the actual filtering).
28-
- `IgxGridExcelStyleFilteringComponent` and `IgxAdvancedFilteringDialogComponent` can now be hosted outside of the grid in order to provide the same experience as the built-in filtering UI.
29-
- `IgxOverlayService`:
30-
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
31-
- `IgxToggleDirective`:
32-
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
33-
- `IgxRowDragGhost` directive is added. It allows providing a custom template for the drag ghost when dragging a row.
34-
```html
32+
- `IgxGridExcelStyleFilteringComponent` and `IgxAdvancedFilteringDialogComponent` can now be hosted outside of the grid in order to provide the same experience as the built-in filtering UI.
33+
- `IgxOverlayService`:
34+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
35+
- `IgxToggleDirective`:
36+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
37+
- `IgxRowDragGhost` directive is added. It allows providing a custom template for the drag ghost when dragging a row.
38+
```html
3539
<igx-grid #grid1 [data]="remote | async" primaryKey="ProductID"
3640
[rowDraggable]="true">
3741
<igx-column field="ProductName"></igx-column>
@@ -43,7 +47,13 @@ All notable changes for each version of this project will be documented in this
4347
</div>
4448
</ng-template>
4549
</igx-grid>
46-
```
50+
```
51+
- `IgxCarousel`:
52+
- `keyboardSupport` input is added, which can be used to enable and disable keyboard navigation
53+
- `maximumIndicatorsCount` input is added, which can be used to set the number of visible indicators
54+
- `indicatorsOrientation` input is added, which can be used to set the position of indicators it can be top or bottom
55+
- `animationType` input is added, which can be used to set animation when changing slides
56+
- `indicatorTemplate` directive is added, which can be used to provide a custom indicator for carousel. If this property is not provided, a default indicator template will be used instead.
4757

4858
## 8.2.6
4959

Diff for: projects/igniteui-angular/src/lib/carousel/README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A carousel component is used to browse or navigate through a collection of slides - galleries of images,
44
cards, on-boarding tutorials or page-based interfaces. It can be used as a separate full screen element
5-
or inside another component.
5+
or inside another component.
66
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/carousel.html)
77

88
# API Summary `igx-carousel`
@@ -13,6 +13,10 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
1313
| `pause` | boolean | Should the carousel stop playing on user interaction. Defaults to `true`. |
1414
| `interval` | number | The amount of time in milliseconds between slides transition. |
1515
| `navigation` | boolean | Controls should the carousel render the left/right navigation buttons. Defaults to `true`. |
16+
| `keyboardSupport` | boolean | Controls should the keyboard navigation should be supported. Defaults to `true`. |
17+
| `maximumIndicatorsCount` | number | The number of visible indicators. Defaults to `5`. |
18+
| `indicatorsOrientation` | CarouselIndicatorsOrientation | Controls whether the indicators should be previewed on top or on bottom of carousel. Defaults to `bottom`. |
19+
| `animationType` | CarouselAnimationType | Controls what animation should be played when slides are changing. Defaults to `slide`. |
1620
| `total` | number | The number of slides the carousel currently has. |
1721
| `current` | number | The index of the slide currently showing. |
1822
| `isPlaying` | boolean | Returns whether the carousel is paused/playing. |
@@ -31,6 +35,26 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
3135
| `get(index: Number)` | IgxSlide or void | Returns the slide with the given index or null. |
3236
| `select(slide: IgxSlide, direction: Direction)`| void | Selects the slide and the direction to transition to. Emits `onSlideChanged` event. |
3337

38+
### Keyboard navigation
39+
Keyboard navigation will be enabled when the **IgxCarousel** component is focused and `keyboardSupport` property is set to `true`:
40+
- Arrow keys will navigate through the slides.
41+
- `Home` will focus the first slide inside the carousel view.
42+
- `End` will focus the last slide inside the carousel view.
43+
44+
### Templates
45+
The **IgxCarousel** supports templating of its indicators
46+
47+
#### Defining item template:
48+
```html
49+
<igx-carousel #carousel>
50+
...
51+
<ng-template igxCarouselIndicator let-slide>
52+
<igx-icon *ngIf="slide.active" fontSet="material">brightness_7</igx-icon>
53+
<igx-icon *ngIf="!slide.active" fontSet="material">brightness_5</igx-icon>
54+
</ng-template>
55+
</igx-carousel>
56+
```
57+
3458
# API Summary `igx-slide`
3559
| Name | Type | Description |
3660
|:----------|:-------------:|:------|
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
1-
<div tabindex="0" aria-label="carousel" class="igx-carousel"
2-
(mouseenter)="stop()"
3-
(mouseleave)="play()"
4-
(swipeleft)="next()"
5-
(swiperight)="prev()"
6-
(tap)="isPlaying ? stop() : play()">
7-
<ul class="igx-carousel__indicators" [hidden]="slides.length <= 1">
8-
<li *ngFor="let slide of slides" [attr.aria-label]="setAriaLabel(slide)" [attr.aria-selected]="slide.active" [class.active]="slide.active === true"
9-
(click)="select(slide)"></li>
10-
</ul>
11-
<div class="igx-carousel__inner" role="list">
12-
<ng-content></ng-content>
1+
<ng-template #defaultIndicator let-slide>
2+
<div class="igx-nav-dot"
3+
[class.igx-nav-dot--active]="slide.active"
4+
>
135
</div>
14-
<div *ngIf="navigation">
15-
<a role="button" tabindex="0" class="igx-carousel__arrow--prev" (click)="prev()" [hidden]="!slides.length">
16-
<igx-icon fontSet="material">arrow_back</igx-icon>
17-
</a>
18-
<a role="button" tabindex="0" class="igx-carousel__arrow--next" (click)="next()" [hidden]="!slides.length">
19-
<igx-icon fontSet="material">arrow_forward</igx-icon>
20-
</a>
6+
</ng-template>
7+
8+
9+
<div *ngIf="showIndicators" [ngClass]="indicatorsOrientationClass">
10+
<div *ngFor="let slide of slides"
11+
class="igx-carousel-indicators__indicator"
12+
(click)="select(slide)"
13+
[attr.aria-label]="setAriaLabel(slide)"
14+
[attr.aria-selected]="slide.active">
15+
<ng-container *ngTemplateOutlet="getIndicatorTemplate; context: {$implicit: slide};"></ng-container>
2116
</div>
2217
</div>
18+
19+
<div *ngIf="showIndicatorsLabel" [ngClass]="indicatorsOrientationClass">
20+
<span class="igx-carousel__label">{{getCarouselLabel}}</span>
21+
</div>
22+
23+
<div class="igx-carousel__inner" role="list">
24+
<ng-content></ng-content>
25+
</div>
26+
27+
<ng-container *ngIf="navigation">
28+
<a role="button" tabindex="0" class="igx-carousel__arrow--prev" (click)="prev()" [hidden]="!slides.length">
29+
<igx-icon fontSet="material">arrow_back</igx-icon>
30+
</a>
31+
<a role="button" tabindex="0" class="igx-carousel__arrow--next" (click)="next()" [hidden]="!slides.length">
32+
<igx-icon fontSet="material">arrow_forward</igx-icon>
33+
</a>
34+
</ng-container>
35+

0 commit comments

Comments
 (0)