Skip to content

Commit a19f77e

Browse files
committed
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular into rkaraivanov/toolbar-resize-fix
2 parents 6cc94c3 + 1fea5cc commit a19f77e

File tree

142 files changed

+4364
-1791
lines changed

Some content is hidden

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

142 files changed

+4364
-1791
lines changed

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes for each version of this project will be documented in this
55
## 12.1.0
66

77
### New Features
8+
- `igxGrid`
9+
- New `additionalTemplateContext` column input:
10+
11+
```html
12+
<igx-column [additionalTemplateContext]="contextObject">
13+
<ng-template igxCell let-cell="cell" let-props="additionalTemplateContext">
14+
{{ props }}
15+
</ng-template>
16+
</igx-column>
17+
```
818
- `Toolbar Actions`
919
- Exposed a new input property `overlaySettings` for all column actions (`hiding` | `pinning` | `advanced filtering` | `exporter`). Example below:
1020

@@ -14,7 +24,6 @@ All notable changes for each version of this project will be documented in this
1424
<igx-grid-toolbar-hiding [overlaySettings]="overlaySettingsAuto"></igx-grid-toolbar-hiding>
1525
</igx-grid-toolbar-actions>
1626
```
17-
- `Exporters`'s `columnExporting` event now supports changing the index of the column in the exported file.
1827
- `IgxPaginatorComponent`
1928
- Added `paging` and `pagingDone` events; `paging` event is cancellable and is emitted before pagination is performed, `pagingDone` event gives you information about the previous and the current page number and is not cancellable; Also `IgxPageSizeSelectorComponent` and `IgxPageNavigationComponent` are introduced and now the paginator components allows you to define a custom content, as it is shown in the example below:
2029
```html
@@ -27,7 +36,6 @@ All notable changes for each version of this project will be documented in this
2736
</igx-paginator-content>
2837
</igx-paginator>
2938
```
30-
3139
- `Exporters`'s `columnExporting` event now supports changing the index of the column in the exported file.
3240
```typescript
3341
this.excelExporterService.columnExporting.subscribe((col) => {
@@ -36,6 +44,9 @@ All notable changes for each version of this project will be documented in this
3644
}
3745
});
3846
```
47+
- `IgxExcelExporterService`
48+
- Added support for exporting the grids' multi-column headers to **Excel**. By default, the multi-column headers would be exported but this behavior can be controlled by the `ignoreMultiColumnHeaders` option off the IgxExcelExporterOptions object.
49+
3950
### General
4051
- `IgxPaginatorComponent`
4152
- Deprecated properties `selectLabel` and `prepositionPage` are now removed;
@@ -83,6 +94,10 @@ All notable changes for each version of this project will be documented in this
8394
</igx-expansion-panel>
8495
```
8596

97+
### Themes
98+
- **Breaking Change** - The `$color` property of the `igx-action-strip-theme` has been renamed as follows:
99+
- `$color` -> `$icon-color`
100+
86101
## 12.0.3
87102

88103
### General

ROADMAP.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@
55
## Milestone 17 (Due by July, 2021)
66

77
1. Accordion component to Ignite UI for Angular [#9559](https://github.com/IgniteUI/igniteui-angular/issues/9559)
8-
2. Expose a column input for passing additional data/state in the template contexts of the column [#9020](https://github.com/IgniteUI/igniteui-angular/issues/9020)
8+
2. **[DONE]** Expose a column input for passing additional data/state in the template contexts of the column [#9020](https://github.com/IgniteUI/igniteui-angular/issues/9020)
99
3. Expose a new cell-like object API for the data grids [#9555](https://github.com/IgniteUI/igniteui-angular/issues/9555)
10-
4. PDF Export feature on Angular Grid [#5696](https://github.com/IgniteUI/igniteui-angular/issues/5696)
11-
5. Change the way igxGrid allows using the igxPaginator [#9097](https://github.com/IgniteUI/igniteui-angular/issues/9097)
12-
6. Themes: Move code to Sass modules [#9554](https://github.com/IgniteUI/igniteui-angular/issues/9554)
13-
7. Themes: Split themes and aid with Grid refactoring [#9556](https://github.com/IgniteUI/igniteui-angular/issues/9556)
10+
4. Change the way igxGrid allows using the igxPaginator [#9097](https://github.com/IgniteUI/igniteui-angular/issues/9097)
11+
5. **[DONE]** Tree Grid Grouping Pipe and Group Area [#9184](https://github.com/IgniteUI/igniteui-angular/issues/9184)
12+
6. **[DONE]** Grid Multi Column Headers to exported excel [#6288](https://github.com/IgniteUI/igniteui-angular/issues/6288)
13+
7. **[DONE]** Snackbar IToggleView [#9677](https://github.com/IgniteUI/igniteui-angular/issues/9677)
14+
8. **[DONE]** Allow for passing a positioning strategy to IgxGridToolbarHidingComponent [#9065](https://github.com/IgniteUI/igniteui-angular/issues/9065)
15+
9. **[DONE]** IgxPaginator Component should be templatable [#9587](https://github.com/IgniteUI/igniteui-angular/issues/9587)
16+
10. **[DONE]** Editable cell styling support [#9630](https://github.com/IgniteUI/igniteui-angular/issues/9630)
17+
11. **[DONE]** Excel Export Service - onColumnExport Allow to modify columnIndex Property [#8874](https://github.com/IgniteUI/igniteui-angular/issues/8874)
1418

1519
## Going down the road
1620

1721
1. Scheduler component
1822
2. Grid Cell Merging
23+
3. PDF Export feature on Angular Grid [#5696](https://github.com/IgniteUI/igniteui-angular/issues/5696)
24+
4. Themes: Move code to Sass modules [#9554](https://github.com/IgniteUI/igniteui-angular/issues/9554)
25+
5. Themes: Split themes and aid with Grid refactoring [#9556](https://github.com/IgniteUI/igniteui-angular/issues/9556)
1926

2027
# Previous Milestone
2128

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "../../common/schema/theme-props.schema.json",
3+
"changes": [
4+
{
5+
"name": "$color",
6+
"replaceWith": "$icon-color",
7+
"owner": "igx-action-strip-theme"
8+
}
9+
]
10+
}

projects/igniteui-angular/src/lib/chips/chip.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ export class IgxChipComponent extends DisplayDensityBase {
513513
return this.getComponentDensityClass('igx-chip__ghost');
514514
}
515515

516+
/** @hidden @internal */
517+
public get nativeElement() {
518+
return this.ref.nativeElement;
519+
}
520+
516521
/**
517522
* @hidden
518523
* @internal
@@ -525,7 +530,7 @@ export class IgxChipComponent extends DisplayDensityBase {
525530
protected _movedWhileRemoving = false;
526531
private _resourceStrings = CurrentResourceStrings.ChipResStrings;
527532

528-
constructor(public cdr: ChangeDetectorRef, public elementRef: ElementRef, private renderer: Renderer2,
533+
constructor(public cdr: ChangeDetectorRef, private ref: ElementRef<HTMLElement>, private renderer: Renderer2,
529534
@Optional() @Inject(DisplayDensityToken) protected _displayDensityOptions: IDisplayDensityOptions) {
530535
super(_displayDensityOptions);
531536
}

projects/igniteui-angular/src/lib/chips/chip.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ describe('IgxChip', () => {
382382

383383
spyOn(firstChipComp.selectedChanging, 'emit');
384384
spyOn(firstChipComp.selectedChanged, 'emit');
385-
firstChipComp.elementRef.nativeElement.focus();
385+
firstChipComp.nativeElement.focus();
386386

387387
UIInteractions.triggerKeyDownEvtUponElem(' ', firstChipComp.chipArea.nativeElement, true);
388388
fix.detectChanges();

projects/igniteui-angular/src/lib/chips/chips-area.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,18 +273,18 @@ export class IgxChipsAreaComponent implements DoCheck, AfterViewInit, OnDestroy
273273
orderChanged = this.positionChipAtIndex(dragChipIndex, dragChipIndex - 1, false, event.originalEvent);
274274
if (orderChanged) {
275275
setTimeout(() => {
276-
this.chipsList.toArray()[dragChipIndex - 1].elementRef.nativeElement.focus();
276+
this.chipsList.get(dragChipIndex - 1).nativeElement.focus();
277277
});
278278
}
279279
} else if (event.originalEvent.key === 'ArrowRight' || event.originalEvent.key === 'Right') {
280280
orderChanged = this.positionChipAtIndex(dragChipIndex, dragChipIndex + 1, true, event.originalEvent);
281281
}
282282
} else {
283283
if ((event.originalEvent.key === 'ArrowLeft' || event.originalEvent.key === 'Left') && dragChipIndex > 0) {
284-
chipsArray[dragChipIndex - 1].elementRef.nativeElement.focus();
284+
chipsArray[dragChipIndex - 1].nativeElement.focus();
285285
} else if ((event.originalEvent.key === 'ArrowRight' || event.originalEvent.key === 'Right') &&
286286
dragChipIndex < chipsArray.length - 1) {
287-
chipsArray[dragChipIndex + 1].elementRef.nativeElement.focus();
287+
chipsArray[dragChipIndex + 1].nativeElement.focus();
288288
}
289289
}
290290
}

projects/igniteui-angular/src/lib/chips/chips-area.spec.ts

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ import { wait, UIInteractions } from '../test-utils/ui-interactions.spec';
2323
`
2424
})
2525
class TestChipComponent {
26-
@ViewChild('chipsArea', { read: IgxChipsAreaComponent, static: true })
26+
@ViewChild('chipsArea', { read: IgxChipsAreaComponent, static: true })
2727
public chipsArea: IgxChipsAreaComponent;
2828

29-
@ViewChildren('chipElem', { read: IgxChipComponent})
29+
@ViewChildren('chipElem', { read: IgxChipComponent })
3030
public chips: QueryList<IgxChipComponent>;
3131

3232
public chipList = [
3333
{ id: 'Country', text: 'Country', removable: false, selectable: false, draggable: false },
3434
{ id: 'City', text: 'City', removable: true, selectable: true, draggable: true }
3535
];
3636

37-
constructor(public cdr: ChangeDetectorRef) {}
37+
constructor(public cdr: ChangeDetectorRef) { }
3838
}
3939

4040
@Component({
@@ -56,8 +56,7 @@ class TestChipSelectComponent extends TestChipComponent {
5656
}
5757

5858
@Component({
59-
template:
60-
`
59+
template: `
6160
<igx-chips-area #chipsArea (reorder)="chipsOrderChanged($event)">
6261
<igx-chip #chipElem *ngFor="let chip of chipList" [id]="chip.id" [draggable]="true"
6362
[removable]="true" [selectable]="true" (remove)="chipRemoved($event)">
@@ -68,10 +67,10 @@ class TestChipSelectComponent extends TestChipComponent {
6867
`
6968
})
7069
class TestChipReorderComponent {
71-
@ViewChild('chipsArea', { read: IgxChipsAreaComponent, static: true })
70+
@ViewChild('chipsArea', { read: IgxChipsAreaComponent, static: true })
7271
public chipsArea: IgxChipsAreaComponent;
7372

74-
@ViewChildren('chipElem', { read: IgxChipComponent})
73+
@ViewChildren('chipElem', { read: IgxChipComponent })
7574
public chips: QueryList<IgxChipComponent>;
7675

7776
public chipList = [
@@ -81,7 +80,7 @@ class TestChipReorderComponent {
8180
{ id: 'FirstName', text: 'First Name' },
8281
];
8382

84-
constructor(public cdr: ChangeDetectorRef) {}
83+
constructor(public cdr: ChangeDetectorRef) { }
8584

8685
public chipsOrderChanged(event) {
8786
const newChipList = [];
@@ -197,11 +196,11 @@ describe('IgxChipsArea ', () => {
197196
const firstChipComp = fix.componentInstance.chips.toArray()[0];
198197
const secondChipComp = fix.componentInstance.chips.toArray()[1];
199198

200-
firstChipComp.elementRef.nativeElement.focus();
201-
expect(document.activeElement).toBe(firstChipComp.elementRef.nativeElement);
199+
firstChipComp.nativeElement.focus();
200+
expect(document.activeElement).toBe(firstChipComp.nativeElement);
202201

203-
secondChipComp.elementRef.nativeElement.focus();
204-
expect(document.activeElement).toBe(secondChipComp.elementRef.nativeElement);
202+
secondChipComp.nativeElement.focus();
203+
expect(document.activeElement).toBe(secondChipComp.nativeElement);
205204
});
206205

207206
it('should focus on previous and next chips after arrows are pressed', () => {
@@ -211,22 +210,22 @@ describe('IgxChipsArea ', () => {
211210
const firstChipComp = fix.componentInstance.chips.toArray()[0];
212211
const secondChipComp = fix.componentInstance.chips.toArray()[1];
213212

214-
firstChipComp.elementRef.nativeElement.focus();
213+
firstChipComp.nativeElement.focus();
215214
fix.detectChanges();
216215

217-
expect(document.activeElement).toBe(firstChipComp.elementRef.nativeElement);
216+
expect(document.activeElement).toBe(firstChipComp.nativeElement);
218217

219218
const rightKey = new KeyboardEvent('keydown', { key: 'ArrowRight' });
220219
firstChipComp.onChipKeyDown(rightKey);
221220
fix.detectChanges();
222221

223-
expect(document.activeElement).toBe(secondChipComp.elementRef.nativeElement);
222+
expect(document.activeElement).toBe(secondChipComp.nativeElement);
224223

225224
const leftKey = new KeyboardEvent('keydown', { key: 'ArrowLeft' });
226225
secondChipComp.onChipKeyDown(leftKey);
227226
fix.detectChanges();
228227

229-
expect(document.activeElement).toBe(firstChipComp.elementRef.nativeElement);
228+
expect(document.activeElement).toBe(firstChipComp.nativeElement);
230229
});
231230

232231
it('should fire selectionChange event', () => {
@@ -328,17 +327,17 @@ describe('IgxChipsArea ', () => {
328327
selectedChip.selected = true;
329328
fix.detectChanges();
330329

331-
const selectedChipIconContainer = selectedChip.elementRef.nativeElement.children[0].children[0];
332-
const unselectedChipIconContainer = unselectedChip.elementRef.nativeElement.children[0].children[0];
330+
const selectedChipIconContainer = selectedChip.nativeElement.children[0].children[0];
331+
const unselectedChipIconContainer = unselectedChip.nativeElement.children[0].children[0];
333332
expect(selectedChip.selected).toBe(true);
334333
expect(selectedChipIconContainer.children.length).toEqual(1);
335334
expect(selectedChipIconContainer.children[0].tagName).toEqual('IGX-ICON');
336335
// expect(selectedChip.elementRef.nativeElement.children[0].children[0].offsetWidth).not.toEqual(0);
337-
expect(selectedChip.elementRef.nativeElement.children[0].children[0].className).toEqual(CHIP_SELECT_ICON);
338-
expect(selectedChip.elementRef.nativeElement.children[0].children[0].className).not.toEqual(CHIP_SELECT_ICON_HIDDEN);
336+
expect(selectedChip.nativeElement.children[0].children[0].className).toEqual(CHIP_SELECT_ICON);
337+
expect(selectedChip.nativeElement.children[0].children[0].className).not.toEqual(CHIP_SELECT_ICON_HIDDEN);
339338
expect(unselectedChipIconContainer.children.length).toEqual(1);
340339
expect(unselectedChipIconContainer.children[0].tagName).toEqual('IGX-ICON');
341-
expect(unselectedChip.elementRef.nativeElement.children[0].children[0].offsetWidth).toEqual(0);
340+
expect(unselectedChip.nativeElement.children[0].children[0].offsetWidth).toEqual(0);
342341
});
343342

344343
it('should fire only onSelection event for chip area when selecting a chip using spacebar', () => {
@@ -423,8 +422,8 @@ describe('IgxChipsArea ', () => {
423422

424423
it('should reorder chips when shift + leftarrow and shift + rightarrow is pressed', () => {
425424
const chipComponents = fix.debugElement.queryAll(By.directive(IgxChipComponent));
426-
const firstChipAreaElem = chipComponents[0].componentInstance.elementRef.nativeElement;
427-
const secondChipAreaElem = chipComponents[1].componentInstance.elementRef.nativeElement;
425+
const firstChipAreaElem = chipComponents[0].componentInstance.nativeElement;
426+
const secondChipAreaElem = chipComponents[1].componentInstance.nativeElement;
428427
const firstChipLeft = firstChipAreaElem.getBoundingClientRect().left;
429428
const secondChipLeft = secondChipAreaElem.getBoundingClientRect().left;
430429

@@ -451,7 +450,7 @@ describe('IgxChipsArea ', () => {
451450
chipArea = fix.componentInstance.chipsArea;
452451
const chipComponents = fix.debugElement.queryAll(By.directive(IgxChipComponent));
453452
const targetChip = chipComponents[2].componentInstance;
454-
const targetChipElem = targetChip.elementRef.nativeElement;
453+
const targetChipElem = targetChip.nativeElement;
455454

456455
targetChipElem.focus();
457456
fix.detectChanges();

projects/igniteui-angular/src/lib/core/styles/components/action-strip/_action-strip-theme.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @param {Map} $palette [null] - The palette used as basis for styling the component.
1010
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
1111
///
12-
/// @param {Color} $color [null] - The color used for the actions icons.
12+
/// @param {Color} $icon-color [null] - The color used for the actions icons.
1313
/// @param {Color} $background [null] - The color used for the action strip component content background.
1414
/// @param {Color} $actions-background [null] - The color used for the actions background.
1515
/// @param {Color} $delete-action [null] - The color used for the delete icon in action strip component.
@@ -30,7 +30,7 @@
3030
3131
$background: null,
3232
$actions-background: null,
33-
$color: null,
33+
$icon-color: null,
3434
$delete-action: null,
3535
$actions-border-radius: null,
3636
) {
@@ -49,16 +49,16 @@
4949
if($actions-border-radius, $actions-border-radius, map-get($action-strip-schema, 'actions-border-radius')), 0, 24px
5050
);
5151

52-
@if not($color) and $actions-background {
53-
$color: text-contrast($actions-background);
52+
@if not($icon-color) and $actions-background {
53+
$icon-color: text-contrast($actions-background);
5454
}
5555

5656
@return extend($theme, (
5757
name: $name,
5858
palette: $palette,
5959
background: $background,
6060
actions-background: $actions-background,
61-
color: $color,
61+
icon-color: $icon-color,
6262
delete-action: $delete-action,
6363
actions-border-radius: $actions-border-radius,
6464
));
@@ -175,7 +175,7 @@
175175
justify-content: center;
176176
pointer-events: all;
177177
position: relative;
178-
color: --var($theme, 'color');
178+
color: --var($theme, 'icon-color');
179179
border-radius: --var($theme, 'actions-border-radius');
180180
background: --var($theme, 'actions-background');
181181
max-height: 36px;
@@ -185,12 +185,12 @@
185185
}
186186

187187
igx-icon {
188-
color: --var($theme, 'color');
188+
color: --var($theme, 'icon-color');
189189
}
190190

191191
[igxButton='icon'] {
192192
igx-icon {
193-
color: --var($theme, 'color');
193+
color: --var($theme, 'icon-color');
194194
}
195195

196196
@if $variant == 'indigo-design' {

0 commit comments

Comments
 (0)