Skip to content

Commit ebe4188

Browse files
authored
Merge branch 'master' into mkirova/fix-default-row-height
2 parents 0654678 + 513e67b commit ebe4188

File tree

9 files changed

+304
-584
lines changed

9 files changed

+304
-584
lines changed

package-lock.json

Lines changed: 193 additions & 552 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@
5656
},
5757
"private": true,
5858
"dependencies": {
59-
"@angular/animations": "^18.0.0",
60-
"@angular/common": "^18.0.0",
61-
"@angular/compiler": "^18.0.0",
62-
"@angular/core": "^18.0.0",
63-
"@angular/forms": "^18.0.0",
64-
"@angular/platform-browser": "^18.0.0",
65-
"@angular/platform-browser-dynamic": "^18.0.0",
66-
"@angular/platform-server": "^18.0.0",
67-
"@angular/router": "^18.0.0",
68-
"@angular/ssr": "^18.0.0",
59+
"@angular/animations": "^18.0.1",
60+
"@angular/common": "^18.0.1",
61+
"@angular/compiler": "^18.0.1",
62+
"@angular/core": "^18.0.1",
63+
"@angular/forms": "^18.0.1",
64+
"@angular/platform-browser": "^18.0.1",
65+
"@angular/platform-browser-dynamic": "^18.0.1",
66+
"@angular/platform-server": "^18.0.1",
67+
"@angular/router": "^18.0.1",
68+
"@angular/ssr": "^18.0.2",
6969
"@igniteui/material-icons-extended": "^3.0.0",
7070
"@types/source-map": "0.5.2",
7171
"express": "^4.19.2",
@@ -81,16 +81,16 @@
8181
"zone.js": "~0.14.4"
8282
},
8383
"devDependencies": {
84-
"@angular-devkit/build-angular": "^18.0.0",
85-
"@angular-devkit/schematics": "^18.0.0",
86-
"@angular-eslint/builder": "^18.0.0-alpha.1",
87-
"@angular-eslint/eslint-plugin": "^18.0.0-alpha.1",
88-
"@angular-eslint/eslint-plugin-template": "^18.0.0-alpha.1",
89-
"@angular-eslint/schematics": "^18.0.0-alpha.1",
90-
"@angular-eslint/template-parser": "^18.0.0-alpha.1",
91-
"@angular/cli": "^18.0.0",
92-
"@angular/compiler-cli": "^18.0.0",
93-
"@angular/language-service": "^18.0.0",
84+
"@angular-devkit/build-angular": "^18.0.2",
85+
"@angular-devkit/schematics": "^18.0.2",
86+
"@angular-eslint/builder": "^18.0.1",
87+
"@angular-eslint/eslint-plugin": "^18.0.1",
88+
"@angular-eslint/eslint-plugin-template": "^18.0.1",
89+
"@angular-eslint/schematics": "^18.0.1",
90+
"@angular-eslint/template-parser": "^18.0.1",
91+
"@angular/cli": "^18.0.2",
92+
"@angular/compiler-cli": "^18.0.1",
93+
"@angular/language-service": "^18.0.1",
9494
"@angularclass/hmr": "^3.0.0",
9595
"@types/estree": "^1.0.0",
9696
"@types/express": "^4.17.17",
@@ -142,4 +142,4 @@
142142
"typedoc-plugin-localization": "^3.0.4",
143143
"typescript": "5.4.5"
144144
}
145-
}
145+
}

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@
139139
}
140140
}
141141

142+
@if not($icon-color) and $background {
143+
@if meta.type-of($background) == 'color' {
144+
$icon-color: text-contrast($background);
145+
}
146+
}
147+
142148
@if not($icon-color-hover) and $hover-foreground {
143149
@if meta.type-of($hover-background) == 'color' {
144150
$icon-color-hover: $hover-foreground;
@@ -577,7 +583,7 @@
577583
background: var-get($flat-theme, 'focus-visible-background');
578584
color: var-get($flat-theme, 'focus-visible-foreground');
579585
border-color: var-get($flat-theme, 'focus-visible-border-color');
580-
586+
581587
igx-icon {
582588
color: var-get($flat-theme, 'icon-color');
583589
}
@@ -599,7 +605,7 @@
599605
color: var-get($flat-theme, 'focus-foreground');
600606
}
601607
}
602-
608+
603609
@if ($variant == 'bootstrap') {
604610
box-shadow: 0 0 0 rem(4px) var-get($flat-theme, 'shadow-color');
605611
}
@@ -780,7 +786,7 @@
780786
map.get($items-gap, 'cosy'),
781787
$items-gap-indigo-comfortable
782788
);
783-
789+
784790
&:active {
785791
igx-icon {
786792
color: var-get($outlined-theme, 'icon-color-hover');

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,8 @@
932932
%month-picker {
933933
@extend %parent-container;
934934

935+
display: flex;
936+
935937
%years-view,
936938
%months-view {
937939
color: inherit;

projects/igniteui-angular/src/lib/core/styles/components/grid/_excel-filtering-theme.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,35 @@
113113
--item-hover-background: #{color($color: 'gray', $variant: 100)};
114114
--item-selected-background: #{color($color: 'gray', $variant: 100)};
115115
--item-text-color: #{color($color: 'gray', $variant: 700)};
116+
--item-icon-color: #{color($color: 'gray', $variant: 700)};
116117
--item-hover-text-color: #{color($color: 'gray', $variant: 800)};
118+
--item-hover-icon-color: #{color($color: 'gray', $variant: 800)};
117119
--item-selected-text-color: #{if(
118120
$variant == 'indigo-design',
119121
contrast-color($color: 'surface'),
120122
color($color: 'secondary', $variant: 500)
121123
)};
124+
--item-selected-icon-color: #{if(
125+
$variant == 'indigo-design',
126+
contrast-color($color: 'surface'),
127+
color($color: 'secondary', $variant: 500)
128+
)};
129+
--item-selected-hover-icon-color: #{if(
130+
$variant == 'fluent',
131+
color($color: 'secondary', $variant: 500),
132+
contrast-color($color: 'gray', $variant: 50)
133+
)};
122134
--item-border-color: transparent;
135+
--item-hover-border-color: transparent;
136+
--item-focused-border-color: #{if(
137+
$variant == 'fluent',
138+
color($color: 'gray', $variant: 700),
139+
transparent
140+
)};
123141
--item-selected-border-color: transparent;
142+
--item-selected-hover-border-color: transparent;
124143
--item-disabled-border: transparent;
144+
--disabled-selected-border-color: transparent;
125145
}
126146

127147
@include tree(tree-theme(

projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
// WARN: This is a workaround around a bug in Safari.
103103
position: absolute;
104104
visibility: hidden;
105+
// width/height/min-width to 0 needed for bug #14303
106+
width: 0;
107+
min-width: 0;
108+
height: 0;
105109
top: 0;
106110
left: 0;
107111
margin: -1px;

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

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewChild } from '@angular/core';
1+
import { Component, Input, ViewChild } from '@angular/core';
22
import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
33
import { FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
44
import { By, HammerModule } from '@angular/platform-browser';
@@ -1753,6 +1753,10 @@ describe('IgxSlider', () => {
17531753
fakeDoc.documentElement.dir = 'rtl';
17541754
});
17551755

1756+
afterEach(() => {
1757+
fakeDoc.documentElement.dir = 'ltr';
1758+
});
1759+
17561760
it('should reflect on the right instead of the left css property of the slider handlers', () => {
17571761
const fix = TestBed.createComponent(SliderRtlComponent);
17581762
fix.detectChanges();
@@ -1809,6 +1813,40 @@ describe('IgxSlider', () => {
18091813
fixture.detectChanges();
18101814
expect(slider.value).toBe(formControl.value);
18111815
});
1816+
1817+
it('Should respect the ngModelOptions updateOn: blur', fakeAsync(() => {
1818+
const fixture = TestBed.createComponent(SliderTemplateFormComponent);
1819+
fixture.componentInstance.updateOn = 'blur';
1820+
fixture.componentInstance.value = 0;
1821+
fixture.detectChanges();
1822+
1823+
const slider = fixture.componentInstance.slider;
1824+
1825+
const thumbEl = fixture.debugElement.query(By.css(THUMB_TAG)).nativeElement;
1826+
const { x: sliderX, width: sliderWidth } = thumbEl.getBoundingClientRect();
1827+
const startX = sliderX + sliderWidth / 2;
1828+
1829+
thumbEl.dispatchEvent(new Event('focus'));
1830+
fixture.detectChanges();
1831+
1832+
(slider as any).onPointerDown(new PointerEvent('pointerdown', { pointerId: 1, clientX: startX }));
1833+
fixture.detectChanges();
1834+
tick();
1835+
1836+
(slider as any).onPointerMove(new PointerEvent('pointermove', { pointerId: 1, clientX: startX + 150 }));
1837+
fixture.detectChanges();
1838+
tick();
1839+
1840+
const activeThumb = fixture.debugElement.query(By.css(THUMB_TO_PRESSED_CLASS));
1841+
expect(activeThumb).not.toBeNull();
1842+
expect(fixture.componentInstance.value).not.toBeGreaterThan(0);
1843+
1844+
thumbEl.dispatchEvent(new Event('blur'));
1845+
fixture.detectChanges();
1846+
tick();
1847+
1848+
expect(fixture.componentInstance.value).toBeGreaterThan(0);
1849+
}));
18121850
});
18131851

18141852

@@ -1984,7 +2022,7 @@ class RangeSliderWithCustomTemplateComponent {
19842022
@Component({
19852023
template: `
19862024
<form #form="ngForm">
1987-
<igx-slider [(ngModel)]="value" name="amount"></igx-slider>
2025+
<igx-slider [(ngModel)]="value" name="amount" [ngModelOptions]="{ updateOn: updateOn}"></igx-slider>
19882026
</form>
19892027
`,
19902028
standalone: true,
@@ -1993,6 +2031,8 @@ class RangeSliderWithCustomTemplateComponent {
19932031
export class SliderTemplateFormComponent {
19942032
@ViewChild(IgxSliderComponent, { read: IgxSliderComponent, static: true }) public slider: IgxSliderComponent;
19952033

2034+
@Input() public updateOn: 'change' | 'blur' | 'submit' = 'change';
2035+
19962036
public value = 10;
19972037
}
19982038

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -991,13 +991,13 @@ export class IgxSliderComponent implements
991991
this.setTickInterval();
992992
this.changeThumbFocusableState(this.disabled);
993993

994-
this.subscribeTo(this.thumbFrom, this.thumbChanged.bind(this));
995-
this.subscribeTo(this.thumbTo, this.thumbChanged.bind(this));
994+
this.subscribeToEvents(this.thumbFrom);
995+
this.subscribeToEvents(this.thumbTo);
996996

997997
this.thumbs.changes.pipe(takeUntil(this._destroyer$)).subscribe(change => {
998998
const thumbFrom = change.find((thumb: IgxSliderThumbComponent) => thumb.type === SliderHandle.FROM);
999999
this.positionHandler(thumbFrom, null, this.lowerValue);
1000-
this.subscribeTo(thumbFrom, this.thumbChanged.bind(this));
1000+
this.subscribeToEvents(thumbFrom);
10011001
this.changeThumbFocusableState(this.disabled);
10021002
});
10031003

@@ -1078,7 +1078,6 @@ export class IgxSliderComponent implements
10781078
// Finally do positionHandlersAndUpdateTrack the DOM
10791079
// based on data values
10801080
this.positionHandlersAndUpdateTrack();
1081-
this._onTouchedCallback();
10821081
}
10831082

10841083
/**
@@ -1411,14 +1410,18 @@ export class IgxSliderComponent implements
14111410
}
14121411
}
14131412

1414-
private subscribeTo(thumb: IgxSliderThumbComponent, callback: (a: number, b: string) => void) {
1413+
private subscribeToEvents(thumb: IgxSliderThumbComponent) {
14151414
if (!thumb) {
14161415
return;
14171416
}
14181417

14191418
thumb.thumbValueChange
14201419
.pipe(takeUntil(this.unsubscriber(thumb)))
1421-
.subscribe(value => callback(value, thumb.type));
1420+
.subscribe(value => this.thumbChanged(value, thumb.type));
1421+
1422+
thumb.thumbBlur
1423+
.pipe(takeUntil(this.unsubscriber(thumb)))
1424+
.subscribe(() => this._onTouchedCallback());
14221425
}
14231426

14241427
private unsubscriber(thumb: IgxSliderThumbComponent) {

projects/igniteui-angular/src/lib/slider/thumb/thumb-slider.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export class IgxSliderThumbComponent implements OnInit, OnDestroy {
6666
@Output()
6767
public thumbChange = new EventEmitter<any>();
6868

69+
@Output()
70+
public thumbBlur = new EventEmitter<void>();
71+
6972
@Output()
7073
public hoverChange = new EventEmitter<boolean>();
7174

@@ -189,6 +192,7 @@ export class IgxSliderThumbComponent implements OnInit, OnDestroy {
189192
this.isActive = false;
190193
this.zIndex = 0;
191194
this.focused = false;
195+
this.thumbBlur.emit();
192196
}
193197

194198
@HostListener('focus')

0 commit comments

Comments
 (0)