Skip to content

Commit 31ba540

Browse files
committed
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular into ddincheva/gridPaging12.1
2 parents d954b78 + 9aa40c3 commit 31ba540

37 files changed

+625
-612
lines changed

CHANGELOG.md

+34-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,32 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5-
## 12.0.1
5+
## 12.1.0
66

77
### New Features
8+
- `Toolbar Actions`
9+
- Exposed a new input property `overlaySettings` for all column actions (`hiding` | `pinning` | `advanced filtering` | `exporter`). Example below:
10+
11+
```html
12+
<igx-grid-toolbar-actions>
13+
<igx-grid-toolbar-pinning [overlaySettings]="overlaySettingsGlobal"></igx-grid-toolbar-pinning>
14+
<igx-grid-toolbar-hiding [overlaySettings]="overlaySettingsAuto"></igx-grid-toolbar-hiding>
15+
</igx-grid-toolbar-actions>
16+
```
17+
- `Exporters`'s `columnExporting` event now supports changing the index of the column in the exported file.
818
- `IgxPaginatorComponent`
9-
- 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;
19+
- 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:
20+
```html
21+
<igx-paginator #paginator>
22+
<igx-paginator-content>
23+
<igx-page-size></igx-page-size>
24+
<button [disabled]="paginator.isFirstPage" (click)="paginator.previousPage()">PREV</button>
25+
<span>Page {{paginator.page}} of {{paginator.totalPages}}</span>
26+
<button [disabled]="paginator.isLastPage" (click)="paginator.nextPage()">NEXT</button>
27+
</igx-paginator-content>
28+
</igx-paginator>
29+
```
30+
1031
- `Exporters`'s `columnExporting` event now supports changing the index of the column in the exported file.
1132
```typescript
1233
this.excelExporterService.columnExporting.subscribe((col) => {
@@ -23,7 +44,12 @@ All notable changes for each version of this project will be documented in this
2344
- `pagerHidden `
2445
- `dropdownEnabled`
2546
- `dropdownHidden`
26-
47+
- `IgxSnackbarComponent`
48+
- Deprecated property `message` is now removed;
49+
- **Breaking Change** - the `snackbarAnimationStarted` and `snackbarAnimationDone` methods are now removed. The `animationStarted` and `animationDone` events now provide reference to the `ToggleViewEventArgs` interface as an argument and are emitted by the `onOpened` and `onClosed` events of the `IgxToggleDirective`.
50+
- `IgxToastComponent`
51+
- Deprecated property `message` is now removed;
52+
- **Breaking Change** - The `isVisibleChange` event now provides reference to the `ToggleViewEventArgs` interface as an argument.
2753

2854
- **Breaking Change** - `IgxOverlayService` events are renamed as follows:
2955
- `onOpening` -> `opening`
@@ -57,6 +83,10 @@ All notable changes for each version of this project will be documented in this
5783
</igx-expansion-panel>
5884
```
5985

86+
### Themes
87+
- **Breaking Change** - The `$color` property of the `igx-action-strip-theme` has been renamed as follows:
88+
- `$color` -> `$icon-color`
89+
6090
## 12.0.3
6191

6292
### General
@@ -3201,7 +3231,7 @@ export class IgxCustomFilteringOperand extends IgxFilteringOperand {
32013231
[igxForContainerSize]='"500px"'
32023232
[igxForItemSize]='"50px"'
32033233
let-rowIndex="index">
3204-
<div style='height:50px;'>{{rowIndex}} : {{item.text}}</div>
3234+
<div style='height: 50px;'>{{rowIndex}} : {{item.text}}</div>
32053235
</ng-template>
32063236
</div>
32073237
```
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/buttonGroup/buttonGroup.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
212212
* ```
213213
* ```html
214214
* <igx-buttongroup #MyChild [multiSelection]="!multi" (selected)="selectedHandler($event)"></igx-buttongroup>
215-
* <igx-toast #toast message="You have made a selection!"></igx-toast>
215+
* <igx-toast #toast>You have made a selection!</igx-toast>
216216
* ```
217217
*/
218218
@Output()
@@ -230,7 +230,7 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
230230
* ```
231231
* ```html
232232
* <igx-buttongroup> #MyChild [multiSelection]="multi" (deselected)="deselectedHandler($event)"></igx-buttongroup>
233-
* <igx-toast #toast message="You have deselected a button!"></igx-toast>
233+
* <igx-toast #toast>You have deselected a button!</igx-toast>
234234
* ```
235235
*/
236236
@Output()

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

+8-8
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' {

projects/igniteui-angular/src/lib/core/styles/components/snackbar/_snackbar-theme.scss

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
/// @requires --var
8888
@mixin igx-snackbar($theme) {
8989
@include igx-css-vars($theme);
90+
@include fade-in();
9091

9192
// @debug $theme;
9293

@@ -114,6 +115,10 @@
114115
backdrop-filter: blur(8px);
115116
}
116117

118+
%igx-snackbar-message {
119+
@include animation('fade-in' .35s ease-out);
120+
}
121+
117122
%igx-snackbar-button {
118123
background: transparent;
119124
color: --var($theme, 'button-color');
@@ -129,6 +134,7 @@
129134
font-size: inherit;
130135
font-family: inherit;
131136
cursor: pointer;
137+
@include animation('fade-in' .35s ease-out);
132138

133139
&:hover {
134140
color: --var($theme, 'button-color');

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_action-strip.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/// Generates a light action-strip schema.
1010
/// @type {Map}
11-
/// @prop {Color} color ["'currentColor'"] - The color used for the actions icons.
11+
/// @prop {Color} icon-color ["'currentColor'"] - The color used for the actions icons.
1212
/// @prop {Map} background [igx-color: ('grays', 100] - The color used for the action strip component content background.
1313
/// @prop {Map} actions-background [igx-color: ('grays', 200), to-opaque: #fff, rgba: .9] - The color used for actions background.
1414
/// @prop {Map} delete-action [igx-color: ('error')] - The color used for the delete icon in action strip component.
@@ -31,7 +31,7 @@ $_light-action-strip: extend(
3131
igx-color: ('grays', 100)
3232
),
3333

34-
color: "'currentColor'",
34+
icon-color: "'currentColor'",
3535

3636
delete-action: (
3737
igx-color: ('error')
@@ -85,7 +85,7 @@ $_indigo-action-strip: extend(
8585
igx-color: ('primary')
8686
),
8787

88-
color: (
88+
icon-color: (
8989
igx-contrast-color: 'primary'
9090
),
9191
)

projects/igniteui-angular/src/lib/directives/date-time-editor/date-time-editor.directive.spec.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IgxDateTimeEditorDirective, IgxDateTimeEditorModule } from './date-time-editor.directive';
22
import { DatePart } from './date-time-editor.common';
3-
import { DOCUMENT } from '@angular/common';
3+
import { DOCUMENT, formatDate } from '@angular/common';
44
import { Component, ViewChild, DebugElement, EventEmitter, Output, SimpleChange, SimpleChanges } from '@angular/core';
55
import { fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
66
import { FormsModule, FormGroup, FormBuilder, ReactiveFormsModule, Validators, NgControl } from '@angular/forms';
@@ -15,7 +15,7 @@ describe('IgxDateTimeEditor', () => {
1515
let dateTimeEditor: IgxDateTimeEditorDirective;
1616
describe('Unit tests', () => {
1717
const maskParsingService = jasmine.createSpyObj('MaskParsingService',
18-
['parseMask', 'restoreValueFromMask', 'parseMaskValue', 'applyMask']);
18+
['parseMask', 'restoreValueFromMask', 'parseMaskValue', 'applyMask', 'parseValueFromMask']);
1919
const renderer2 = jasmine.createSpyObj('Renderer2', ['setAttribute']);
2020
const locale = 'en';
2121
const _ngModel = {
@@ -647,11 +647,7 @@ describe('IgxDateTimeEditor', () => {
647647
inputElement.triggerEventHandler('blur', { target: inputElement.nativeElement });
648648
fixture.detectChanges();
649649
date = new Date(2010, 10, 10, 2, 0, 0);
650-
const longTimeOptions = { hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true };
651-
result = ControlsFunction.formatDate(date, longTimeOptions);
652-
const offset = date.getTimezoneOffset();
653-
const tz = (offset > 0 ? '-' : '+') + (Math.abs(offset) / 60);
654-
result = `${result} GMT${tz}`;
650+
result = formatDate(date, 'longTime', 'en-US');
655651
expect(inputElement.nativeElement.value).toEqual(result);
656652
});
657653
it('should be able to apply custom display format.', fakeAsync(() => {

projects/igniteui-angular/src/lib/directives/date-time-editor/date-time-editor.directive.ts

+13-9
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,21 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
254254
}
255255
}
256256

257-
private get hasDateParts() {
257+
private get hasDateParts(): boolean {
258258
return this._inputDateParts.some(
259259
p => p.type === DatePart.Date
260260
|| p.type === DatePart.Month
261261
|| p.type === DatePart.Year);
262262
}
263263

264-
private get hasTimeParts() {
264+
private get hasTimeParts(): boolean {
265265
return this._inputDateParts.some(
266266
p => p.type === DatePart.Hours
267267
|| p.type === DatePart.Minutes
268268
|| p.type === DatePart.Seconds);
269269
}
270270

271-
private get dateValue() {
271+
private get dateValue(): Date {
272272
return this._dateValue;
273273
}
274274

@@ -285,7 +285,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
285285
}
286286

287287
@HostListener('wheel', ['$event'])
288-
public onWheel(event: WheelEvent) {
288+
public onWheel(event: WheelEvent): void {
289289
if (!this._isFocused) {
290290
return;
291291
}
@@ -305,7 +305,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
305305
}
306306

307307
/** @hidden @internal */
308-
public ngOnChanges(changes: SimpleChanges) {
308+
public ngOnChanges(changes: SimpleChanges): void {
309309
if (changes['locale'] && !changes['locale'].firstChange) {
310310
this.updateDefaultFormat();
311311
if (!this._inputFormat) {
@@ -406,7 +406,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
406406
public setDisabledState?(_isDisabled: boolean): void { }
407407

408408
/** @hidden @internal */
409-
public onInputChanged(isComposing: boolean) {
409+
public onInputChanged(isComposing: boolean): void {
410410
super.onInputChanged(isComposing);
411411
if (this.inputIsComplete()) {
412412
const parsedDate = this.parseDate(this.inputValue);
@@ -479,6 +479,10 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
479479
super.onBlur(value);
480480
}
481481

482+
// the date editor sets its own inputFormat as its placeholder if none is provided
483+
/** @hidden */
484+
protected setPlaceholder(_value: string): void { }
485+
482486
private updateDefaultFormat(): void {
483487
this._defaultInputFormat = DateTimeUtil.getDefaultInputFormat(this.locale);
484488
}
@@ -508,7 +512,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
508512
}
509513
}
510514

511-
private setMask(inputFormat: string) {
515+
private setMask(inputFormat: string): void {
512516
const oldFormat = this._inputDateParts?.map(p => p.format).join('');
513517
this._inputDateParts = DateTimeUtil.parseDateTimeFormat(inputFormat);
514518
inputFormat = this._inputDateParts.map(p => p.format).join('');
@@ -599,7 +603,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
599603
return newDate;
600604
}
601605

602-
private trySpinValue(datePart: DatePart, delta?: number, negative = false) {
606+
private trySpinValue(datePart: DatePart, delta?: number, negative = false): Date {
603607
if (!delta) {
604608
// default to 1 if a delta is set to 0 or any other falsy value
605609
delta = this.datePartDeltas[datePart] || 1;
@@ -608,7 +612,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
608612
return this.spinValue(datePart, spinValue) || new Date();
609613
}
610614

611-
private setDateValue(value: Date | string) {
615+
private setDateValue(value: Date | string): void {
612616
this._dateValue = DateTimeUtil.isValidDate(value)
613617
? value
614618
: DateTimeUtil.parseIsoDate(value);

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
9292
* ```
9393
*/
9494
@Input()
95-
public igxForOf: any[];
95+
public igxForOf: any[] | null;
9696

9797
/**
9898
* An @Input property that sets the property name from which to read the size in the data object.

0 commit comments

Comments
 (0)