Skip to content

Commit 588a865

Browse files
authored
Merge branch 'master' into rkaraivanov/template-outlet-performance
2 parents ca252e9 + 23f597e commit 588a865

11 files changed

Lines changed: 77 additions & 16 deletions

File tree

projects/igniteui-angular/core/src/core/styles/components/button/_button-theme.scss

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@
6161
$variant
6262
);
6363

64-
$button-transition: color var(--_init-transition, #{$time}) ease-in-out,
65-
background-color var(--_init-transition, #{$time}) ease-in-out,
66-
border-color var(--_init-transition, #{$time}) ease-in-out,
67-
box-shadow var(--_init-transition, #{$time}) ease-in-out;
68-
6964
$button-disabled-shadow: none;
7065

7166
$button-floating-width: rem(56px);
@@ -287,6 +282,12 @@
287282
}
288283

289284
%igx-button-display {
285+
--_button-transition:
286+
color var(--_init-transition, #{$time}) ease-in-out,
287+
background-color var(--_init-transition, #{$time}) ease-in-out,
288+
border-color var(--_init-transition, #{$time}) ease-in-out,
289+
box-shadow var(--_init-transition, #{$time}) ease-in-out;
290+
290291
@include sizable();
291292

292293
position: relative;
@@ -312,7 +313,7 @@
312313
-webkit-tap-highlight-color: transparent;
313314
overflow: hidden;
314315
white-space: nowrap;
315-
transition: $button-transition;
316+
transition: var(--_button-transition);
316317
gap: pad-inline(
317318
map.get($items-gap, 'compact'),
318319
map.get($items-gap, 'cosy'),
@@ -330,7 +331,7 @@
330331
width: var(--igx-icon-size, #{$icon-in-button-size});
331332
height: var(--igx-icon-size, #{$icon-in-button-size});
332333
font-size: var(--igx-icon-size, #{$icon-in-button-size});
333-
transition: $button-transition;
334+
transition: var(--_button-transition);
334335
}
335336
}
336337

@@ -525,7 +526,7 @@
525526
color: var-get($outlined-theme, 'focus-visible-foreground');
526527
border-color: var-get($outlined-theme, 'focus-visible-border-color');
527528

528-
@if $variant == 'material' or $variant == 'bootstrap' {
529+
@if $variant == 'material' or $variant == 'bootstrap' {
529530
igx-icon {
530531
color: var-get($outlined-theme, 'icon-color-hover');
531532
}
@@ -701,7 +702,7 @@
701702
align-items: center;
702703
outline: none;
703704
cursor: pointer;
704-
transition: $button-transition;
705+
transition: var(--_button-transition);
705706
user-select: none;
706707
-webkit-tap-highlight-color: transparent;
707708
overflow: hidden;

projects/igniteui-angular/core/src/core/styles/components/combo/_combo-theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178

179179
.igx-input-group {
180180
%igx-combo__toggle-button {
181+
cursor: pointer;
181182
background: var-get($theme, 'toggle-button-background');
182183
color: var-get($theme, 'toggle-button-foreground');
183184
}
@@ -286,4 +287,12 @@
286287
}
287288
}
288289
}
290+
291+
igx-combo {
292+
%form-group-input,
293+
%form-group-prefix,
294+
%form-group-suffix {
295+
cursor: pointer;
296+
}
297+
}
289298
}

projects/igniteui-angular/core/src/core/styles/components/input/_input-group-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
[igxPrefix] {
150150
@extend %form-group-prefix;
151151
outline-style: none;
152+
cursor: default;
152153

153154
&:first-child {
154155
@if $variant == 'fluent' {
@@ -164,6 +165,7 @@
164165
[igxSuffix] {
165166
@extend %form-group-suffix;
166167
outline-style: none;
168+
cursor: default;
167169

168170
&:last-child {
169171
@if $variant == 'fluent' {
@@ -1425,7 +1427,6 @@
14251427
}
14261428

14271429
%form-group-input--hover {
1428-
cursor: pointer;
14291430
color: var-get($theme, 'filled-text-hover-color');
14301431

14311432
&::placeholder {
@@ -1434,7 +1435,6 @@
14341435
}
14351436

14361437
%form-group-input--focus {
1437-
cursor: text;
14381438
color: var-get($theme, 'focused-text-color');
14391439

14401440
&::placeholder {

projects/igniteui-angular/core/src/core/styles/components/select/_select-theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
.igx-input-group {
1717
%igx-select__toggle-button {
18+
cursor: pointer;
1819
background: var-get($theme, 'toggle-button-background');
1920
color: var-get($theme, 'toggle-button-foreground');
2021
}
@@ -60,4 +61,12 @@
6061
color: var-get($theme, 'toggle-button-foreground-disabled');
6162
}
6263
}
64+
65+
igx-select {
66+
%form-group-input,
67+
%form-group-prefix,
68+
%form-group-suffix {
69+
cursor: pointer;
70+
}
71+
}
6372
}

projects/igniteui-angular/directives/src/directives/button/button-base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export abstract class IgxButtonBaseDirective implements AfterViewInit, OnDestroy
105105
// Fix style flickering https://github.com/IgniteUI/igniteui-angular/issues/14759
106106
if (this._platformUtil.isBrowser) {
107107
this.element.nativeElement.style.setProperty('--_init-transition', '0s');
108+
this.element.nativeElement.style.setProperty('transition', 'none');
108109
}
109110
}
110111

@@ -114,6 +115,7 @@ export abstract class IgxButtonBaseDirective implements AfterViewInit, OnDestroy
114115

115116
this._animationScheduler = animationFrameScheduler.schedule(() => {
116117
this.element.nativeElement.style.removeProperty('--_init-transition');
118+
this.element.nativeElement.style.setProperty('transition', 'var(--_button-transition)');
117119
});
118120
}
119121
}

projects/igniteui-angular/grids/core/src/api.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ export class GridBaseAPIService<T extends GridType> implements GridServiceType {
289289
}
290290

291291
public should_apply_number_style(column: ColumnType): boolean {
292-
return column.dataType === GridColumnDataType.Number;
292+
return column.dataType === GridColumnDataType.Number
293+
|| column.dataType === GridColumnDataType.Currency
294+
|| column.dataType === GridColumnDataType.Percent;
293295
}
294296

295297
public get_data(): any[] {

projects/igniteui-angular/grids/core/src/headers/grid-header.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export class IgxGridHeaderComponent implements DoCheck, OnDestroy {
151151

152152
@HostBinding('class.igx-grid-th--number')
153153
public get numberStyle() {
154-
return this.column.dataType === GridColumnDataType.Number;
154+
return this.column.dataType === GridColumnDataType.Number
155+
|| this.column.dataType === GridColumnDataType.Currency
156+
|| this.column.dataType === GridColumnDataType.Percent;
155157
}
156158

157159
@HostBinding('class.igx-grid-th--sortable')

projects/igniteui-angular/grids/tree-grid/src/tree-grid-api.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,14 @@ export class IgxTreeGridAPIService extends GridBaseAPIService<GridType> {
8383
if (expanded !== undefined) {
8484
return expanded;
8585
} else {
86-
return record.children && record.children.length && record.level < grid.expansionDepth;
86+
return record.children && !!record.children.length && record.level < grid.expansionDepth;
8787
}
8888
}
8989

9090
public override should_apply_number_style(column: ColumnType): boolean {
91-
return column.dataType === GridColumnDataType.Number && column.visibleIndex !== 0;
91+
return (column.dataType === GridColumnDataType.Number
92+
|| column.dataType === GridColumnDataType.Currency
93+
|| column.dataType === GridColumnDataType.Percent) && column.visibleIndex !== 0;
9294
}
9395

9496
public override deleteRowById(rowID: any): any {

projects/igniteui-angular/grids/tree-grid/src/tree-grid-expanding.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ describe('IgxTreeGrid - Expanding / Collapsing #tGrid', () => {
4444
treeGrid = fix.componentInstance.treeGrid;
4545
});
4646

47+
it('should return boolean for expand state of row without children using getRowByKey()', () => {
48+
treeGrid.primaryKey = "ID";
49+
treeGrid.childDataKey = "";
50+
fix.detectChanges();
51+
52+
const testRow = treeGrid.getRowByKey(147);
53+
expect(testRow.expanded).toEqual(false);
54+
});
55+
4756
it('check row expanding and collapsing are changing rows count (UI)', () => {
4857
let rows = TreeGridFunctions.getAllRows(fix);
4958
expect(rows.length).toBe(4);

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,6 +2103,29 @@ describe('IgxSimpleCombo', () => {
21032103
fixture.detectChanges();
21042104
expect(document.activeElement).toEqual(thirdComboInput.nativeElement);
21052105
}));
2106+
2107+
it('should lose focus when user closes combo by clicking outside', fakeAsync(() => {
2108+
// Initially combo is not focused
2109+
expect(document.activeElement).not.toBe(input.nativeElement);
2110+
2111+
// Click inside combo input to focus it
2112+
input.triggerEventHandler('focus', {});
2113+
input.triggerEventHandler('click', UIInteractions.getMouseEvent('click'));
2114+
fixture.detectChanges();
2115+
2116+
// Verify combo is focused and opened
2117+
expect(document.activeElement).toBe(input.nativeElement);
2118+
expect(combo.collapsed).toBe(false);
2119+
2120+
// Simulate outside click by clicking on document body
2121+
// This triggers the blur event which is what happens on outside clicks
2122+
input.triggerEventHandler('blur', {});
2123+
document.body.click();
2124+
tick();
2125+
fixture.detectChanges();
2126+
2127+
expect(document.activeElement).not.toBe(input.nativeElement);
2128+
}));
21062129
});
21072130

21082131
describe('Form control tests: ', () => {

0 commit comments

Comments
 (0)