Skip to content

Commit 8feaf7b

Browse files
authoredMar 9, 2023
Merge branch 'master' into rkaraivanov/issue-7089
2 parents d20b5d4 + 0b248ce commit 8feaf7b

File tree

9 files changed

+48
-22
lines changed

9 files changed

+48
-22
lines changed
 

‎CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ All notable changes for each version of this project will be documented in this
2525
- Added component validation along with styles for invalid state
2626
- `igxMask` directive
2727
- Added the capability to escape mask pattern literals.
28+
- `IgxBadge`
29+
- Added `shape` property that controls the shape of the badge and can be either `square` or `rounded`. The default shape of the badge is rounded.
2830
- `IgxAvatar`
2931
- **Breaking Change** The `roundShape` property has been deprecated and will be removed in a future version. Users can control the shape of the avatar by the newly added `shape` attribute that can be `square`, `rounded` or `circle`. The default shape of the avatar is `square`.
3032

‎README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ There are many ways in which you can [participate](https://github.com/IgniteUI/i
4141

4242
## Browser Support
4343

44-
![chrome_48x48](https://user-images.githubusercontent.com/2188411/168109445-fbd7b217-35f9-44d1-8002-1eb97e39cdc6.png) | ![firefox_48x48](https://user-images.githubusercontent.com/2188411/168109465-e46305ee-f69f-4fa5-8f4a-14876f7fd3ca.png) | ![edge_48x48](https://user-images.githubusercontent.com/2188411/168109472-a730f8c0-3822-4ae6-9f54-785a66695245.png) | ![opera_48x48](https://user-images.githubusercontent.com/2188411/168109520-b6865a6c-b69f-44a4-9948-748d8afd687c.png) | ![safari_48x48](https://user-images.githubusercontent.com/2188411/168109527-6c58f2cf-7386-4b97-98b1-cfe0ab4e8626.png) | ![ie_48x48](https://user-images.githubusercontent.com/2188411/168135931-ce5259bb-5b26-4003-8b89-dbee3d4f247c.png)
45-
--- | --- | --- | --- | --- |:---:|
46-
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11* |
44+
| ![chrome][] | ![firefox][] | ![edge][] | ![opera][] | ![safari][] | ![ie][] |
45+
|:-----------:|:------------:|:---------:|:----------:|:-----------:|:-------:|
46+
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11* |
4747

4848
\* *IE 11 is only supported in Ignite UI for Angular < 13.0.0*
4949

@@ -293,4 +293,14 @@ For information on that license, please go to our website [https://www.infragist
293293

294294

295295

296+
<!-- browser logos -->
297+
[chrome]: https://user-images.githubusercontent.com/2188411/168109445-fbd7b217-35f9-44d1-8002-1eb97e39cdc6.png "Google Chrome"
298+
[firefox]: https://user-images.githubusercontent.com/2188411/168109465-e46305ee-f69f-4fa5-8f4a-14876f7fd3ca.png "Mozilla Firefox"
299+
[edge]: https://user-images.githubusercontent.com/2188411/168109472-a730f8c0-3822-4ae6-9f54-785a66695245.png "Microsoft Edge"
300+
[opera]: https://user-images.githubusercontent.com/2188411/168109520-b6865a6c-b69f-44a4-9948-748d8afd687c.png "Opera"
301+
[safari]: https://user-images.githubusercontent.com/2188411/168109527-6c58f2cf-7386-4b97-98b1-cfe0ab4e8626.png "Safari"
302+
[ie]: https://user-images.githubusercontent.com/2188411/168135931-ce5259bb-5b26-4003-8b89-dbee3d4f247c.png "Internet Explorer"
303+
304+
305+
296306

‎projects/igniteui-angular/src/lib/combo/combo.common.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
EventEmitter,
99
forwardRef,
1010
HostBinding,
11-
HostListener,
1211
Inject,
1312
InjectionToken,
1413
Injector,
@@ -951,15 +950,6 @@ export abstract class IgxComboBaseDirective extends DisplayDensityBase implement
951950
super(_displayDensityOptions);
952951
}
953952

954-
/** @hidden @internal */
955-
@HostListener('keydown.ArrowDown', ['$event'])
956-
@HostListener('keydown.Alt.ArrowDown', ['$event'])
957-
public onArrowDown(event: Event) {
958-
event.preventDefault();
959-
event.stopPropagation();
960-
this.open();
961-
}
962-
963953
/** @hidden @internal */
964954
public ngOnInit() {
965955
this.ngControl = this._injector.get<NgControl>(NgControl, null);
@@ -1322,6 +1312,7 @@ export abstract class IgxComboBaseDirective extends DisplayDensityBase implement
13221312
public abstract set filteredData(val: any[] | null);
13231313

13241314
public abstract handleOpened();
1315+
public abstract onArrowDown(event: Event);
13251316
public abstract focusSearchInput(opening?: boolean);
13261317

13271318
public abstract select(newItem: any): void;

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CommonModule } from '@angular/common';
22
import {
33
AfterViewInit, ChangeDetectorRef, Component, ElementRef, NgModule, OnInit, OnDestroy,
4-
Optional, Inject, Injector, ViewChild, Input, Output, EventEmitter
4+
Optional, Inject, Injector, ViewChild, Input, Output, EventEmitter, HostListener
55
} from '@angular/core';
66
import {
77
IgxComboItemDirective,
@@ -202,6 +202,15 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
202202
this.comboAPI.register(this);
203203
}
204204

205+
/** @hidden @internal */
206+
@HostListener('keydown.ArrowDown', ['$event'])
207+
@HostListener('keydown.Alt.ArrowDown', ['$event'])
208+
public onArrowDown(event: Event) {
209+
event.preventDefault();
210+
event.stopPropagation();
211+
this.open();
212+
}
213+
205214
/** @hidden @internal */
206215
public get displaySearchInput(): boolean {
207216
return this.filteringOptions.filterable || this.allowCustomValues;

‎projects/igniteui-angular/src/lib/core/styles/components/badge/_badge-theme.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
color: var-get($theme, 'text-color');
109109
line-height: 1;
110110
background: var-get($theme, 'background-color');
111-
border-radius: var-get($theme, 'border-radius');
111+
border-radius: 50%;
112112
box-shadow: var-get($theme, 'shadow');
113113
border-width: var-get($theme, 'border-width');
114114
border-color: var-get($theme, 'border-color');
@@ -128,7 +128,7 @@
128128
}
129129

130130
%igx-badge--square {
131-
border-radius: 0;
131+
border-radius: var-get($theme, 'border-radius');
132132
}
133133

134134
%igx-badge-value {

‎projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_badge.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// @prop {Number} border-width [0] - The border width of the badge component.
1616
/// @prop {Map} background-color [color: ('primary', 500)] - The background color used.
1717
/// @prop {Number} elevation [1] - The elevation level, between 0-24, to be used for the badge shadow.
18-
/// @prop {Number} border-radius [11px] - The border radius used for badge. Can be a fraction between 0 and 1, pixels, or percent.
18+
/// @prop {Number} border-radius [0] - The border radius used for badge. Can be a fraction between 0 and 1, pixels, or percent.
1919
/// @requires {Map} $default-elevation-badge
2020
$light-badge: extend(
2121
$default-elevation-badge,
@@ -40,7 +40,7 @@ $light-badge: extend(
4040

4141
border-width: 0,
4242

43-
border-radius: rem(11px)
43+
border-radius: 0
4444
)
4545
);
4646

‎projects/igniteui-angular/src/lib/grids/public_api.ts

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ export * from './summaries/summary.module';
3838
export * from './grouping/tree-grid-group-by-area.component';
3939
export * from './grouping/grid-group-by-area.component';
4040
export * from './grouping/group-by-area.directive';
41+
export { DropPosition } from './moving/moving.service';

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

+16-3
Original file line numberDiff line numberDiff line change
@@ -1039,13 +1039,26 @@ describe('IgxSimpleCombo', () => {
10391039
expect(combo.comboInput.value).toEqual('con');
10401040
fixture.detectChanges();
10411041

1042-
UIInteractions.triggerKeyDownEvtUponElem('ArrowDown', input.nativeElement);
1043-
expect(document.activeElement).toHaveClass('igx-combo__content');
1044-
10451042
UIInteractions.triggerKeyDownEvtUponElem('Enter', input.nativeElement);
10461043
expect(input.nativeElement.value).toEqual('Wisconsin');
10471044
});
10481045

1046+
it('should navigate to next filtered item on ArrowDown', () => {
1047+
combo.allowCustomValues = true;
1048+
1049+
input.triggerEventHandler('focus', {});
1050+
fixture.detectChanges();
1051+
1052+
UIInteractions.simulateTyping('con', input);
1053+
expect(combo.comboInput.value).toEqual('con');
1054+
fixture.detectChanges();
1055+
1056+
// filtered data -> Wisconsin, Connecticut
1057+
UIInteractions.triggerKeyDownEvtUponElem('ArrowDown', input.nativeElement);
1058+
UIInteractions.triggerKeyDownEvtUponElem('Enter', input.nativeElement);
1059+
expect(input.nativeElement.value).toEqual('Connecticut');
1060+
});
1061+
10491062
it('should clear selection when all text in input is removed by Backspace and Delete', () => {
10501063
combo.select('Wisconsin');
10511064
fixture.detectChanges();

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
140140
this.open();
141141
} else {
142142
if (this.virtDir.igxForOf.length > 0 && !this.selectedItem) {
143-
this.dropdown.navigateFirst();
143+
this.dropdown.navigateNext();
144144
this.dropdownContainer.nativeElement.focus();
145145
} else if (this.allowCustomValues) {
146146
this.addItem?.element.nativeElement.focus();

0 commit comments

Comments
 (0)
Please sign in to comment.