Skip to content

Commit 26babfd

Browse files
authored
Merge branch 'master' into mkirova/fix-7778
2 parents b4422f5 + f125387 commit 26babfd

File tree

239 files changed

+6200
-1954
lines changed

Some content is hidden

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

239 files changed

+6200
-1954
lines changed

.sassdocrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
"theme": "./node_modules/igniteui-sassdoc-theme/sassdoc/",
1010
"autofill": ["throws", "content"],
1111
"groups": {
12+
"global-themes": "Global Themes",
13+
"component-themes": "Component Themes",
1214
"undefined": "general"
1315
},
1416
"no-update-notifier": false,
1517
"verbose": false,
1618
"strict": false,
1719
"display": {
1820
"alias": true,
19-
"access": ["public", "private"]
21+
"access": ["public"]
2022
},
2123
"privatePrefix": true,
2224
"resolvedValue": true

CHANGELOG.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ All notable changes for each version of this project will be documented in this
77
### General
88
- `igxCombo`
99
- **Behavioral Change** - Change default positioning strategy from `ConnectedPositioningStrategy` to `AutoPositionStrategy`. The [`Auto`](https://www.infragistics.com/products/ignite-ui-angular/angular/components/overlay_position.html#auto) strategy will initially try to show the element like the Connected strategy does. If the element goes out of the viewport Auto will flip the starting point and the direction, i.e. if the direction is 'bottom', it will switch it to 'top' and so on. If after flipping direction the content goes out of the view, auto strategy will revert to initial start point and direction and will push the content into the view. Note after pushing the content it may hide the combo's input.
10+
- Make `onSearchInput` event cancellable. The event args type has been changed to `IComboSearchInputEventArgs`, which have the following properties: `searchText` - holds the text typed into the search input, `owner` - holds a reference to the combo component and `cancel` - indicates whether the event should be canceled.
1011
- `IgxOverlay`
11-
- Added new property - `closeOnEsc` - in `OverlaySettings`. The overlay can now be prevented from closing, on escape keypress, by setting the property to `false`, by default it's `true`.
12+
- Added new property `closeOnEscape` in `OverlaySettings` that controls whether the overlay should close on escape keypress. By default `closeOnEsc` is set to `false`.
13+
- **Behavioral Change** - `modal` overlays shown directly through the Overlay Service no longer close on Escape by default. That behavior can now be specified using the `closeOnEscape` property.
1214
- `igxDialog`
13-
- Added `closeOnEscapeKey` - with it, the dialog can be allowed or prevented from closing when `Esc` is pressed.
15+
- Added `closeOnEscape` - with it, the dialog can be allowed or prevented from closing when `Esc` is pressed.
1416
- `IgxNavbar`:
1517
- **Breaking Changes** - The `igx-action-icon` has been renamed to `igx-navbar-action`. It should get renamed in your components via `ng update`;
1618
- `igxGrid`
@@ -19,6 +21,29 @@ All notable changes for each version of this project will be documented in this
1921
- Removed `onDataPreLoad` event as it is specific for remote virtualization implementation, which is not supported for the `igxTreeGrid`. A more generic `onScroll` event is exposed and can be used instead.
2022
- `IgxTimePicker`
2123
- Added a disabled style for time parts outside of the minimum and maximum range.
24+
- `igxDatePicker`
25+
- Added new property - `editorTabIndex`, that allows setting tabindex for the default editor.
26+
27+
### New Theme
28+
Ignite UI for Angular now has a new theme based on our own design system.
29+
You can use one of the following mixins to include a dark or light indigo theme:
30+
`igx-indigo-light-theme` and `igx-indigo-dark-theme`
31+
32+
We also added two new palettes that go with the new theme, `$light-indigo-palette` and `$dark-indigo-palette`.
33+
34+
The following example shows how you can use the Indigo theme:
35+
36+
```scss
37+
// Light version
38+
.indigo-theme {
39+
@include igx-indigo-light-theme($light-indigo-palette);
40+
}
41+
42+
// Dark version
43+
.indigo-dark-theme {
44+
@include igx-indigo-dark-theme($dark-indigo-palette);
45+
}
46+
```
2247

2348
### New Features
2449
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
@@ -38,8 +63,8 @@ All notable changes for each version of this project will be documented in this
3863
- `IgxNavbar`
3964
- Added new `igx-navbar-title, igxNavbarTitle` directive that can be used to provide custom content for navbar title. It would override the value of `title` input property.
4065
- `IgxCalendar` and `IgxMonthPicker`
41-
- `onViewDateChanged` emitted after the month/year presented in the view is changed after user interaction.
42-
- `onActiveViewChanged` event emitted after the active view (DEFAULT, YEAR, DECADE) is changed after user interaction.
66+
- `viewDateChanged` emitted after the month/year presented in the view is changed after user interaction.
67+
- `activeViewChanged` event emitted after the active view (DEFAULT, YEAR, DECADE) is changed after user interaction.
4368
- `viewDate` day value is always 1.
4469
- `activeView` setter is now available as an input property.
4570

@@ -496,7 +521,7 @@ Ignite UI for angular now have a new theme that mimics Microsoft "Fluent" design
496521
Depending on your use case you can use one of the following mixins:
497522
`igx-fluent-theme` and `igx-fluent-dark-theme`
498523

499-
We also added two new pallets that go with the new theme, `$fluent-word-palette` and `$fluent-excel-palette`.
524+
We also added two new palettes that go with the new theme, `$fluent-word-palette` and `$fluent-excel-palette`.
500525

501526
Next example shows how you can use the Fluent theme.
502527

angularDocsPostDeploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if([System.IO.File]::Exists($filePath) -and [System.IO.Directory]::Exists($angul
6464
$folders = Get-ChildItem -Path $angularDocsRootFolder -Directory -Exclude $tagFolder,"sass","typescript" -Name | Sort-Object @{Expression = {[double]($_.Substring(0, $_.LastIndexOf('.'))) }};
6565
$textToUpdate = "";
6666
foreach($item in $folders) {
67-
$textToUpdate += '"' + $item.Name + '"';
67+
$textToUpdate += '"' + $item + '"';
6868
}
6969
$textToUpdate = "[" + $textToUpdate.Replace("`"`"","`"`,`"") + "]" ;
7070
Write-Host $textToUpdate;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ Controls the visibility of the dates that do not belong to the current month.
175175
Event fired when a value is selected through UI interaction.
176176
Emits the selected value (depending on the type of selection).
177177

178-
- `onViewDateChanged(): IViewDateChangeEventArgs`
178+
- `viewDateChanged(): IViewDateChangeEventArgs`
179179

180-
Event fired after the the month/year presented in the view is changed.
180+
Event fired after the month/year presented in the view is changed.
181181
Emits an object containing the previous and current value of the `viewDate` property.
182182

183-
- `onActiveViewChanged(): CalendarView`
183+
- `activeViewChanged(): CalendarView`
184184

185185
Event fired after the active view is changed.
186186
Emits an CalendarView enum, indicating the `activeView` property value.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,21 +250,21 @@ export class IgxCalendarBaseDirective implements ControlValueAccessor {
250250
/**
251251
* Emits an event when the month in view is changed.
252252
* ```html
253-
* <igx-calendar (onViewDateChanged)="viewDateChanged($event)"></igx-calendar>
253+
* <igx-calendar (viewDateChanged)="viewDateChanged($event)"></igx-calendar>
254254
* ```
255255
* ```typescript
256256
* public viewDateChanged(event: IViewDateChangeEventArgs) {
257-
* let newDate = event.newViewDate;
257+
* let viewDate = event.currentValue;
258258
* }
259259
* ```
260260
*/
261261
@Output()
262-
public onViewDateChanged = new EventEmitter<IViewDateChangeEventArgs>();
262+
public viewDateChanged = new EventEmitter<IViewDateChangeEventArgs>();
263263

264264
/**
265265
* Emits an event when the active view is changed.
266266
* ```html
267-
* <igx-calendar (onActiveViewChanged)="activeViewChanged($event)"></igx-calendar>
267+
* <igx-calendar (activeViewChanged)="activeViewChanged($event)"></igx-calendar>
268268
* ```
269269
* ```typescript
270270
* public activeViewChanged(event: CalendarView) {
@@ -273,7 +273,7 @@ export class IgxCalendarBaseDirective implements ControlValueAccessor {
273273
* ```
274274
*/
275275
@Output()
276-
public onActiveViewChanged = new EventEmitter<CalendarView>();
276+
public activeViewChanged = new EventEmitter<CalendarView>();
277277

278278
/**
279279
* @hidden

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,14 +1588,14 @@ describe('IgxCalendar - ', () => {
15881588

15891589
expect(year.nativeElement).toBe(document.activeElement);
15901590

1591-
spyOn(calendar.onActiveViewChanged, 'emit').and.callThrough();
1591+
spyOn(calendar.activeViewChanged, 'emit').and.callThrough();
15921592

15931593
UIInteractions.triggerKeyDownEvtUponElem('Enter', document.activeElement);
15941594
fixture.detectChanges();
15951595
tick();
15961596

1597-
expect(calendar.onActiveViewChanged.emit).toHaveBeenCalledTimes(1);
1598-
expect(calendar.onActiveViewChanged.emit).toHaveBeenCalledWith(CalendarView.DECADE);
1597+
expect(calendar.activeViewChanged.emit).toHaveBeenCalledTimes(1);
1598+
expect(calendar.activeViewChanged.emit).toHaveBeenCalledWith(CalendarView.DECADE);
15991599

16001600
const years = dom.queryAll(By.css(HelperTestFunctions.YEAR_CSSCLASS));
16011601
let currentYear = dom.query(By.css(HelperTestFunctions.CURRENT_YEAR_CSSCLASS));
@@ -1617,32 +1617,32 @@ describe('IgxCalendar - ', () => {
16171617
expect(currentYear.nativeElement.textContent.trim()).toMatch('2016');
16181618

16191619
const previousValue = fixture.componentInstance.calendar.viewDate;
1620-
spyOn(calendar.onViewDateChanged, 'emit').and.callThrough();
1620+
spyOn(calendar.viewDateChanged, 'emit').and.callThrough();
16211621

16221622
UIInteractions.triggerKeyDownEvtUponElem('Enter', currentYear.nativeElement);
16231623

16241624
fixture.detectChanges();
16251625
tick();
16261626

16271627
const eventArgs: IViewDateChangeEventArgs = { previousValue, currentValue: fixture.componentInstance.calendar.viewDate };
1628-
expect(calendar.onViewDateChanged.emit).toHaveBeenCalledTimes(1);
1629-
expect(calendar.onViewDateChanged.emit).toHaveBeenCalledWith(eventArgs);
1628+
expect(calendar.viewDateChanged.emit).toHaveBeenCalledTimes(1);
1629+
expect(calendar.viewDateChanged.emit).toHaveBeenCalledWith(eventArgs);
16301630
expect(calendar.viewDate.getFullYear()).toEqual(2016);
16311631
}));
16321632

16331633
it('Should open months view, navigate through and select a month via KB.', fakeAsync(() => {
16341634
const month = dom.queryAll(By.css(HelperTestFunctions.CALENDAR_DATE_CSSCLASS))[0];
16351635
month.nativeElement.focus();
1636-
spyOn(calendar.onActiveViewChanged, 'emit').and.callThrough();
1636+
spyOn(calendar.activeViewChanged, 'emit').and.callThrough();
16371637

16381638
expect(month.nativeElement).toBe(document.activeElement);
16391639

16401640
UIInteractions.triggerKeyDownEvtUponElem('Enter', document.activeElement);
16411641
fixture.detectChanges();
16421642
tick();
16431643

1644-
expect(calendar.onActiveViewChanged.emit).toHaveBeenCalledTimes(1);
1645-
expect(calendar.onActiveViewChanged.emit).toHaveBeenCalledWith(CalendarView.YEAR);
1644+
expect(calendar.activeViewChanged.emit).toHaveBeenCalledTimes(1);
1645+
expect(calendar.activeViewChanged.emit).toHaveBeenCalledWith(CalendarView.YEAR);
16461646

16471647
const months = dom.queryAll(By.css(HelperTestFunctions.MONTH_CSSCLASS));
16481648
const currentMonth = dom.query(By.css(HelperTestFunctions.CURRENT_MONTH_CSSCLASS));
@@ -1672,15 +1672,15 @@ describe('IgxCalendar - ', () => {
16721672
expect(document.activeElement.textContent.trim()).toMatch('Sep');
16731673

16741674
const previousValue = fixture.componentInstance.calendar.viewDate;
1675-
spyOn(calendar.onViewDateChanged, 'emit').and.callThrough();
1675+
spyOn(calendar.viewDateChanged, 'emit').and.callThrough();
16761676

16771677
UIInteractions.triggerKeyDownEvtUponElem('Enter', document.activeElement);
16781678
fixture.detectChanges();
16791679
tick();
16801680

16811681
const eventArgs: IViewDateChangeEventArgs = { previousValue, currentValue: fixture.componentInstance.calendar.viewDate };
1682-
expect(calendar.onViewDateChanged.emit).toHaveBeenCalledTimes(1);
1683-
expect(calendar.onViewDateChanged.emit).toHaveBeenCalledWith(eventArgs);
1682+
expect(calendar.viewDateChanged.emit).toHaveBeenCalledTimes(1);
1683+
expect(calendar.viewDateChanged.emit).toHaveBeenCalledWith(eventArgs);
16841684
expect(calendar.viewDate.getMonth()).toEqual(8);
16851685
}));
16861686

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
717717
public animationDone(event) {
718718
if ((event.fromState === ScrollMonth.NONE && (event.toState === ScrollMonth.PREV || event.toState === ScrollMonth.NEXT)) ||
719719
(event.fromState === 'void' && event.toState === ScrollMonth.NONE)) {
720-
this.onViewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });
720+
this.viewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });
721721
}
722722

723723
if (this.monthScrollDirection !== ScrollMonth.NONE) {
@@ -751,7 +751,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
751751
*/
752752
public viewRendered(event) {
753753
if (event.fromState !== 'void') {
754-
this.onActiveViewChanged.emit(this.activeView);
754+
this.activeViewChanged.emit(this.activeView);
755755
}
756756
}
757757

projects/igniteui-angular/src/lib/calendar/month-picker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ The default values are listed below.
122122
Event fired when a value is selected through UI interaction.
123123
Returns the selected value (depending on the type of selection).
124124

125-
- `onViewDateChanged(): IViewDateChangeEventArgs`
125+
- `viewDateChanged(): IViewDateChangeEventArgs`
126126

127-
Event fired after the the month/year presented in the view is changed.
127+
Event fired after the month/year presented in the view is changed.
128128
Emits an object containing the previous and current value of the `viewDate` property.
129129

130-
- `onActiveViewChanged(): CalendarView`
130+
- `activeViewChanged(): CalendarView`
131131

132132
Event fired after the active view is changed.
133133
Emits an CalendarView enum, indicating the `activeView` property value.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
103103
public animationDone(event) {
104104
if ((event.fromState === 'void' && event.toState === '') ||
105105
(event.fromState === '' && (event.toState === ScrollMonth.PREV || event.toState === ScrollMonth.NEXT))) {
106-
this.onViewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });
106+
this.viewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });
107107
}
108108
this.yearAction = '';
109109
}
@@ -113,7 +113,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
113113
*/
114114
public viewRendered(event) {
115115
if (event.fromState !== 'void') {
116-
this.onActiveViewChanged.emit(this.activeView);
116+
this.activeViewChanged.emit(this.activeView);
117117
}
118118
}
119119

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { configureTestSuite } from '../test-utils/configure-suite';
1818
import { DisplayDensity } from '../core/density';
1919
import { AbsoluteScrollStrategy, ConnectedPositioningStrategy } from '../services/public_api';
2020
import { IgxSelectionAPIService } from '../core/selection';
21+
import { CancelableEventArgs } from '../core/utils';
2122

2223
const CSS_CLASS_COMBO = 'igx-combo';
2324
const CSS_CLASS_COMBO_DROPDOWN = 'igx-combo__drop-down';
@@ -530,21 +531,42 @@ describe('igxCombo', () => {
530531
expect(matchSpy).toHaveBeenCalledTimes(1);
531532
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(0);
532533

534+
const args = {
535+
searchText: 'Fake',
536+
owner: combo,
537+
cancel: false
538+
};
533539
combo.handleInputChange('Fake');
534540
expect(matchSpy).toHaveBeenCalledTimes(2);
535541
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(1);
536-
expect(combo.onSearchInput.emit).toHaveBeenCalledWith('Fake');
542+
expect(combo.onSearchInput.emit).toHaveBeenCalledWith(args);
537543

544+
args.searchText = '';
538545
combo.handleInputChange('');
539546
expect(matchSpy).toHaveBeenCalledTimes(3);
540547
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(2);
541-
expect(combo.onSearchInput.emit).toHaveBeenCalledWith('');
548+
expect(combo.onSearchInput.emit).toHaveBeenCalledWith(args);
542549

543550
combo.filterable = false;
544551
combo.handleInputChange();
545552
expect(matchSpy).toHaveBeenCalledTimes(4);
546553
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(2);
547554
});
555+
it('should be able to cancel onSearchInput', () => {
556+
combo = new IgxComboComponent({ nativeElement: null }, mockCdr, mockSelection as any, mockComboService, null, mockInjector);
557+
combo.ngOnInit();
558+
combo.data = data;
559+
combo.filterable = true;
560+
combo.onSearchInput.subscribe((e) => {
561+
e.cancel = true;
562+
});
563+
const matchSpy = spyOn<any>(combo, 'checkMatch').and.callThrough();
564+
spyOn(combo.onSearchInput, 'emit').and.callThrough();
565+
566+
combo.handleInputChange('Item1');
567+
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(1);
568+
expect(matchSpy).toHaveBeenCalledTimes(0);
569+
});
548570
});
549571
describe('Initialization and rendering tests: ', () => {
550572
configureTestSuite();

0 commit comments

Comments
 (0)