Skip to content

Commit 1f811d7

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Merge from master.
2 parents 9f408c4 + d47477f commit 1f811d7

31 files changed

+908
-266
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes for each version of this project will be documented in this
44

55
## 9.1.0
66

7+
### Themes
8+
- **Breaking Change** Change the default `$legacy-support` value to false in the `igx-theme` function.
9+
710
### New Features
811

912
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
@@ -14,6 +17,8 @@ All notable changes for each version of this project will be documented in this
1417
```typescript
1518
public pinningConfiguration: IPinningConfig = { columns: ColumnPinningPosition.End };
1619
```
20+
- `IgxCombo`:
21+
- Added `autoFocusSearch` input that allows to manipulate the combo's opening behavior. When the property is `true` (by default), the combo's search input is focused on open. When set to `false`, the focus goes to the combo items container, which can be used to prevent the software keyboard from activating on mobile devices when opening the combo.
1722

1823
### RTL Support
1924
- `igxSlider` have full right-to-left (RTL) support.
@@ -2487,4 +2492,3 @@ export class IgxCustomFilteringOperand extends IgxFilteringOperand {
24872492
- `IgxDraggableDirective` moved inside `../directives/dragdrop/` folder
24882493
- `IgxRippleDirective` moved inside `../directives/ripple/` folder
24892494
- Folder `"./navigation/nav-service"` renamed to `"./navigation/nav.service"`
2490-

ROADMAP.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
2. Range Date Picker [#5732](https://github.com/IgniteUI/igniteui-angular/issues/5732)
99
3. RTL Support across Ignite UI for Angular components [#5958](https://github.com/IgniteUI/igniteui-angular/issues/5958)
1010
4. Column freezing/Pinning on the right (igx-grid) [#5879](https://github.com/IgniteUI/igniteui-angular/issues/5879)
11-
5. Column Selection for IgxGrid [#6638](https://github.com/IgniteUI/igniteui-angular/issues/6638)
11+
5. Column Selection for IgxGrid [#6578](https://github.com/IgniteUI/igniteui-angular/issues/6578)
1212
6. Splitter IgxGrid [#6639](https://github.com/IgniteUI/igniteui-angular/issues/6639)
1313
7. Row Pinning IgxGrid [#6640](https://github.com/IgniteUI/igniteui-angular/issues/6640)
1414
8. Data Analysis Directive [#1752](https://github.com/IgniteUI/igniteui-angular-samples/issues/1752)
@@ -23,16 +23,19 @@
2323

2424
## Milestone 10 (Released February 10th, 2020)
2525

26-
1. Dock Manger [#5980](https://github.com/IgniteUI/igniteui-angular/issues/5980)
27-
2. **[DONE]** Theming service for Ignite UI for Angular [#5999](https://github.com/IgniteUI/igniteui-angular/issues/5999)
28-
3. Range Date Picker [#5732](https://github.com/IgniteUI/igniteui-angular/issues/5732)
29-
4. **[DONE]** igxGrid overlay components exposed for instantiation in arbitrary container [#5878](https://github.com/IgniteUI/igniteui-angular/issues/5878)
30-
5. RTL Support across Ignite UI for Angular components [#5958](https://github.com/IgniteUI/igniteui-angular/issues/5958)
31-
6. **[DONE]** Carousel slide animations/transitions [#4268](https://github.com/IgniteUI/igniteui-angular/issues/4268)
32-
7. **[DONE]** Access all data when calculating summary per column [#5754](https://github.com/IgniteUI/igniteui-angular/issues/5754)
33-
8. **[DONE]** Angular 9 support [#5998](https://github.com/IgniteUI/igniteui-angular/issues/5998)
34-
9. **[DONE]** Allow master-detail style visualization with igxHierarchicalGrid [#5880](https://github.com/IgniteUI/igniteui-angular/issues/5880)
35-
10. **[DONE]** Collapsible column groups (column expansion state templates) [#3343](https://github.com/IgniteUI/igniteui-angular/issues/3343)
26+
1. **[DONE]** Theming service for Ignite UI for Angular [#5999](https://github.com/IgniteUI/igniteui-angular/issues/5999)
27+
2. **[DONE]** igxGrid overlay components exposed for instantiation in arbitrary container [#5878](https://github.com/IgniteUI/igniteui-angular/issues/5878)
28+
3. **[DONE]** Carousel slide animations/transitions [#4268](https://github.com/IgniteUI/igniteui-angular/issues/4268)
29+
4. **[DONE]** Access all data when calculating summary per column [#5754](https://github.com/IgniteUI/igniteui-angular/issues/5754)
30+
5. **[DONE]** Angular 9 support [#5998](https://github.com/IgniteUI/igniteui-angular/issues/5998)
31+
6. **[DONE]** Allow master-detail style visualization with igxHierarchicalGrid [#5880](https://github.com/IgniteUI/igniteui-angular/issues/5880)
32+
7. **[DONE]** Collapsible column groups (column expansion state templates) [#3343](https://github.com/IgniteUI/igniteui-angular/issues/3343)
33+
8. **[DONE]** Igx combo select all item [#6342](https://github.com/IgniteUI/igniteui-angular/issues/6342)
34+
9. **[DONE]** Container instance for igxGrid overlay components [#5878](https://github.com/IgniteUI/igniteui-angular/issues/5878)
35+
10. **[DONE]** [igx-select] Footer element [#5911](https://github.com/IgniteUI/igniteui-angular/issues/5911)
36+
11. **[DONE]** Provide the state persistence directive of the igx-grid by default [#5460](https://github.com/IgniteUI/igniteui-angular/issues/5460)
37+
12. **[DONE]** Directive for custom row drag ghost in the grids [#6081](https://github.com/IgniteUI/igniteui-angular/issues/6081)
38+
13. **[DONE]** Provide a way to turn off the built-in filtering and sorting for remote scenarios [#4356](https://github.com/IgniteUI/igniteui-angular/issues/4356)
3639

3740
## Milestone 9 (Released September 26th, 2019)
3841

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ export class IgxCalendarBaseDirective implements ControlValueAccessor {
620620
* Deselects date(s) (based on the selection type).
621621
*/
622622
public deselectDate(value?: Date | Date[]) {
623-
if (this.selectedDates === null || this.selectedDates.length === 0) {
623+
if (!this.selectedDates || this.selectedDates.length === 0) {
624624
return;
625625
}
626626

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ Setting `[displayDensity]` affects the control's items' and inputs' css properti
314314
| `type` | Combo style. - "line", "box", "border", "search" | string |
315315
| `valid` | gets if control is valid, when used in a form | boolean |
316316
| `overlaySettings` | gets/sets the custom overlay settings that control how the drop-down list displays | OverlaySettings |
317+
| `autoFocusSearch` | controls whether the search input should be focused when the combo is opened | boolean |
317318

318319
### Getters
319320
| Name | Description | Type |

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

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,24 @@ describe('igxCombo', () => {
149149
expect(combo.dropdown.toggle).toHaveBeenCalledTimes(1);
150150
expect(combo.collapsed).toBe(false);
151151
});
152+
it(`should not focus search input when property autoFocusSearch=false`, () => {
153+
combo = new IgxComboComponent({ nativeElement: null }, mockCdr, mockSelection as any, mockComboService, null, mockInjector);
154+
const dropdownContainer = { nativeElement: { focus: () => {}}};
155+
combo['dropdownContainer'] = dropdownContainer;
156+
spyOn(combo, 'focusSearchInput');
157+
158+
combo.autoFocusSearch = false;
159+
combo.handleOpened();
160+
expect(combo.focusSearchInput).toHaveBeenCalledTimes(0);
161+
162+
combo.autoFocusSearch = true;
163+
combo.handleOpened();
164+
expect(combo.focusSearchInput).toHaveBeenCalledTimes(1);
165+
166+
combo.autoFocusSearch = false;
167+
combo.handleOpened();
168+
expect(combo.focusSearchInput).toHaveBeenCalledTimes(1);
169+
});
152170
it('should call dropdown toggle with correct overlaySettings', () => {
153171
combo = new IgxComboComponent({ nativeElement: null }, mockCdr, mockSelection as any, mockComboService, null, mockInjector);
154172
const dropdown = jasmine.createSpyObj('IgxComboDropDownComponent', ['toggle']);
@@ -788,6 +806,19 @@ describe('igxCombo', () => {
788806
fixture.detectChanges();
789807
expect(combo.searchInput).toBeFalsy();
790808
});
809+
it('should focus search input', fakeAsync(() => {
810+
combo.toggle();
811+
tick();
812+
fixture.detectChanges();
813+
expect(document.activeElement).toEqual(combo.searchInput.nativeElement);
814+
}));
815+
it('should not focus search input, when autoFocusSearch=false', fakeAsync(() => {
816+
combo.autoFocusSearch = false;
817+
combo.toggle();
818+
tick();
819+
fixture.detectChanges();
820+
expect(document.activeElement).not.toEqual(combo.searchInput.nativeElement);
821+
}));
791822
it('should properly initialize templates', () => {
792823
expect(combo).toBeDefined();
793824
expect(combo.footerTemplate).toBeDefined();
@@ -983,7 +1014,7 @@ describe('igxCombo', () => {
9831014

9841015
productIndex = 485;
9851016
combo.virtualScrollContainer.scrollTo(productIndex);
986-
await wait();
1017+
await wait(30);
9871018
fixture.detectChanges();
9881019
verifyComboData();
9891020
expect(combo.virtualizationState.startIndex + combo.virtualizationState.chunkSize - 1)

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,14 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
813813
@Input()
814814
public type = 'box';
815815

816+
/**
817+
* An @Input property that controls whether the combo's search box
818+
* should be focused after the `onOpened` event is called
819+
* When `false`, the combo's list item container will be focused instead
820+
*/
821+
@Input()
822+
public autoFocusSearch = true;
823+
816824
/**
817825
* Gets if control is valid, when used in a form
818826
*
@@ -1480,7 +1488,15 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
14801488
*/
14811489
public handleOpened() {
14821490
this.triggerCheck();
1483-
this.focusSearchInput(true);
1491+
1492+
// Disabling focus of the search input should happen only when drop down opens.
1493+
// During keyboard navigation input should receive focus, even the autoFocusSearch is disabled.
1494+
// That is why in such cases focusing of the dropdownContainer happens outside focusSearchInput method.
1495+
if (this.autoFocusSearch) {
1496+
this.focusSearchInput(true);
1497+
} else {
1498+
this.dropdownContainer.nativeElement.focus();
1499+
}
14841500
this.onOpened.emit();
14851501
}
14861502

projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
/// // otherwise, it will return the value for key 'icon-color' in the '$avatar-theme';
351351
/// @returns {String} - The value of the key in the passed map, or the name of key concatenated with the key name.
352352
@function --var($map, $key, $fallback: null) {
353-
$igx-legacy-support: if(global-variable-exists('igx-legacy-support'), $igx-legacy-support, true);
353+
$igx-legacy-support: if(global-variable-exists('igx-legacy-support'), $igx-legacy-support, false);
354354

355355
@if map-has-key($map, $key) {
356356
@if $igx-legacy-support == false {

projects/igniteui-angular/src/lib/core/styles/themes/_index.scss

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
/// @param {Map} $palette - An igx-palette to be used by the global theme.
5252
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the components.
5353
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
54-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
54+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
5555
/// @param {Boolean} $elevation [true] - Turns on/off elevations for all components in the theme.
5656
/// @param {Number} $roundness [null] - Sets the global roundness factor (the value can be any decimal fraction between 0 and 1) for all components.
5757
/// @requires {variable} $components
@@ -91,7 +91,7 @@
9191
$palette,
9292
$schema: $light-schema,
9393
$exclude: (),
94-
$legacy-support: true,
94+
$legacy-support: false,
9595
$roundness: null,
9696
$elevation: true,
9797
) {
@@ -412,11 +412,11 @@
412412
/// Creates a global theme that can be used with light backgrounds.
413413
/// @param {Map} $palette - An igx-palette to be used by the global theme.
414414
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
415-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
415+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
416416
@mixin igx-light-theme(
417417
$palette,
418418
$exclude: (),
419-
$legacy-support: true,
419+
$legacy-support: false,
420420
$roundness: null,
421421
$elevation: true,
422422
) {
@@ -447,11 +447,11 @@
447447
/// Creates a global theme that can be used with dark backgrounds.
448448
/// @param {Map} $palette - An igx-palette to be used by the global theme.
449449
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
450-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
450+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
451451
@mixin igx-dark-theme(
452452
$palette,
453453
$exclude: (),
454-
$legacy-support: true,
454+
$legacy-support: false,
455455
$roundness: null,
456456
$elevation: true,
457457
) {
@@ -482,11 +482,11 @@
482482
/// Creates a global fluent theme that can be used with light backgrounds.
483483
/// @param {Map} $palette - An igx-palette to be used by the global theme.
484484
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
485-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
485+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
486486
@mixin igx-fluent-theme(
487487
$palette,
488488
$exclude: (),
489-
$legacy-support: true,
489+
$legacy-support: false,
490490
$roundness: null,
491491
$elevation: true,
492492
) {
@@ -517,11 +517,11 @@
517517
/// Creates a global fluent theme that can be used with dark backgrounds.
518518
/// @param {Map} $palette - An igx-palette to be used by the global theme.
519519
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
520-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
520+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
521521
@mixin igx-fluent-dark-theme(
522522
$palette,
523523
$exclude: (),
524-
$legacy-support: true,
524+
$legacy-support: false,
525525
$roundness: null,
526526
$elevation: true,
527527
) {
@@ -553,11 +553,11 @@
553553
/// Creates a global bootstrap-like theme that can be used with light backgrounds.
554554
/// @param {Map} $palette - An igx-palette to be used by the global theme.
555555
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
556-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
556+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
557557
@mixin igx-bootstrap-theme(
558558
$palette,
559559
$exclude: (),
560-
$legacy-support: true,
560+
$legacy-support: false,
561561
$roundness: null,
562562
$elevation: true,
563563
) {
@@ -615,11 +615,11 @@
615615
/// Creates a global bootstrap-like theme that can be used with dark backgrounds.
616616
/// @param {Map} $palette - An igx-palette to be used by the global theme.
617617
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
618-
/// @param {Boolean} $legacy-support - Turn off support for IE11, allowing you to use css variables to style components.
618+
/// @param {Boolean} $legacy-support [false] - If set to true, it turns on support for IE11, i.e. css variables are not used in the generated component themes.
619619
@mixin igx-bootstrap-dark-theme(
620620
$palette,
621621
$exclude: (),
622-
$legacy-support: true,
622+
$legacy-support: false,
623623
$roundness: null,
624624
$elevation: true,
625625
) {
@@ -667,4 +667,3 @@
667667
$elevation: $elevation,
668668
);
669669
}
670-

projects/igniteui-angular/src/lib/date-picker/date-picker.component.html

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
<ng-template #readOnlyDatePickerTemplate>
2-
<igx-input-group (click)="openDialog()">
2+
<igx-input-group (click)="openDialog()" (mousedown)="mouseDown($event)">
33
<igx-prefix>
44
<igx-icon>today</igx-icon>
55
</igx-prefix>
66
<label *ngIf="labelVisibility" igxLabel>{{label}}</label>
7-
<input #readonlyInput class="igx-date-picker__input-date" igxInput [value]="displayData || ''"
8-
[disabled]="disabled" readonly />
7+
<input
8+
class="igx-date-picker__input-date"
9+
igxInput
10+
[value]="displayData || ''"
11+
[disabled]="disabled"
12+
(blur)="onBlur($event)"
13+
readonly
14+
/>
915
</igx-input-group>
1016
</ng-template>
1117

1218
<ng-template #editableDatePickerTemplate>
13-
<igx-input-group #editableInputGroup [supressInputAutofocus]="true">
19+
<igx-input-group #editableInputGroup [supressInputAutofocus]="true" (mousedown)="mouseDown($event)">
1420
<igx-prefix (click)="openDialog(editableInputGroup.element.nativeElement)">
1521
<igx-icon>today</igx-icon>
1622
</igx-prefix>
1723
<label *ngIf="labelVisibility" igxLabel>{{label}}</label>
18-
<input #editableInput class="igx-date-picker__input-date" igxInput [igxTextSelection]="true"
19-
type="text" [value]="transformedDate"
20-
[igxMask]="inputMask" [placeholder]="mask" [disabled]="disabled" [displayValuePipe]="displayValuePipe"
21-
[focusedValuePipe]="inputValuePipe" (blur)="onBlur($event)" (wheel)="onWheel($event)"
22-
(input)="onInput($event)" (focus)="onFocus()" />
24+
<input
25+
class="igx-date-picker__input-date"
26+
igxInput
27+
[igxTextSelection]="true"
28+
type="text"
29+
[value]="transformedDate"
30+
[igxMask]="inputMask"
31+
[placeholder]="mask"
32+
[disabled]="disabled"
33+
[displayValuePipe]="displayValuePipe"
34+
[focusedValuePipe]="inputValuePipe"
35+
(blur)="onBlur($event)"
36+
(wheel)="onWheel($event)"
37+
(input)="onInput($event)"
38+
(focus)="onFocus()"
39+
/>
2340
<igx-suffix *ngIf="!isEmpty" (click)="clear()">
2441
<igx-icon>clear</igx-icon>
2542
</igx-suffix>

0 commit comments

Comments
 (0)