Skip to content

Commit f7f2f49

Browse files
authored
Merge branch '20.1.x' into mkirova/fix-border-calc-20.1.x
2 parents d88b811 + b0173b1 commit f7f2f49

32 files changed

+888
-474
lines changed

.github/workflows/nodejs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [20.x, 22.x]
19+
node-version: [22.x]
2020

2121
steps:
2222
- name: Checkout
@@ -50,7 +50,7 @@ jobs:
5050
npm run test:schematics
5151
npm run test:i18n
5252
env:
53-
NODE_OPTIONS: --max_old_space_size=4096 ${{ matrix.node-version == '22.x' && '--no-experimental-strip-types' || '' }}
53+
NODE_OPTIONS: --max_old_space_size=4096 --no-experimental-strip-types
5454
TZ: America/New_York
5555
- name: Build i18n & validate output
5656
run: |
@@ -71,7 +71,6 @@ jobs:
7171
- name: Bundle Tree-Shake & SSR Test
7272
run: npm run build:bundletest
7373
- name: Publish to coveralls.io
74-
if: github.repository == 'IgniteUI/igniteui-angular' && matrix.node-version == '20.x'
75-
uses: coverallsapp/github-action@v2.3.4
74+
uses: coverallsapp/github-action@v2
7675
with:
7776
github-token: ${{ github.token }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Trigger Licensed Release
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
inputs:
11+
release_tag:
12+
description: 'Release tag to dispatch (e.g. 21.1.1)'
13+
required: true
14+
type: string
15+
16+
jobs:
17+
dispatch-to-private-repo:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Get app token
22+
id: app-token
23+
uses: actions/create-github-app-token@v2
24+
with:
25+
app-id: ${{ secrets.IGNITEUI_GITHUB_APP_ID }}
26+
private-key: ${{ secrets.IGNITEUI_GITHUB_APP_PRIVATE_KEY }}
27+
owner: IgniteUI
28+
29+
- name: Send repository dispatch to private repo
30+
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
31+
with:
32+
token: ${{ steps.app-token.outputs.token }}
33+
repository: IgniteUI/igniteui-actions
34+
event-type: igniteui-angular-public-release-created
35+
client-payload: |
36+
{
37+
"release_tag": "${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.event.release.tag_name }}",
38+
"public_repo": "${{ github.repository }}"
39+
}

projects/igniteui-angular-elements/src/index.html

Lines changed: 443 additions & 394 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@
12681268
outline-style: none;
12691269

12701270
igx-icon {
1271-
--component-size: #{if($variant == 'indigo', 2, 3)};
1271+
--ig-size: #{if($variant == 'indigo', 2, 3)};
12721272
}
12731273
}
12741274

projects/igniteui-angular/src/lib/core/styles/components/stepper/_stepper-theme.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,10 @@
366366
}
367367

368368
@if $variant == 'indigo' {
369-
[aria-selected='true'] {
370-
%igx-stepper__step-content-wrapper {
371-
padding-block: rem(16px);
372-
padding-inline-end: rem(16px);
373-
}
374-
}
375-
376369
[aria-selected='false'] {
377370
%igx-stepper__step-content-wrapper {
378371
padding-block: 0;
372+
transition: padding-block 0.3s 0.2s ease;
379373
}
380374
}
381375
}

projects/igniteui-angular/src/lib/date-picker/date-picker.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ describe('IgxDatePicker', () => {
966966
},
967967
element: {
968968
nativeElement: jasmine.createSpyObj('mockElement',
969-
['focus', 'blur', 'click', 'addEventListener', 'removeEventListener'])
969+
['focus', 'blur', 'click', 'addEventListener', 'removeEventListener', 'querySelector'])
970970
}
971971
} as any;
972972
mockInputDirective = {
@@ -1016,6 +1016,7 @@ describe('IgxDatePicker', () => {
10161016
};
10171017
datePicker = new IgxDatePickerComponent(elementRef, 'en-US', overlay, mockInjector, renderer2, null, mockCdr);
10181018
(datePicker as any).inputGroup = mockInputGroup;
1019+
(mockInputGroup.element.nativeElement.querySelector as jasmine.Spy).and.returnValue(mockInputGroup.element.nativeElement);
10191020
(datePicker as any).inputDirective = mockInputDirective;
10201021
(datePicker as any).dateTimeEditor = mockDateEditor;
10211022
(datePicker as any).viewContainerRef = viewsContainerRef;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export class IgxDatePickerComponent extends PickerBaseDirective implements Contr
451451
}
452452

453453
private get inputGroupElement(): HTMLElement {
454-
return this.inputGroup?.element.nativeElement;
454+
return this.inputGroup?.element.nativeElement.querySelector('.igx-input-group__bundle');
455455
}
456456

457457
private get dateValue(): Date {

projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,10 +1965,11 @@ describe('IgxDateRangePicker', () => {
19651965
fixture.detectChanges();
19661966

19671967
const overlayContent = document.getElementsByClassName(CSS_CLASS_OVERLAY_CONTENT)[0] as HTMLElement;
1968+
const expectedTarget = dateRange.element.nativeElement.querySelector('.igx-input-group__bundle');
19681969
expect(AutoPositionStrategy.prototype.position).toHaveBeenCalledTimes(1);
19691970
expect(AutoPositionStrategy.prototype.position)
19701971
.toHaveBeenCalledWith(overlayContent, jasmine.anything(), document,
1971-
jasmine.anything(), dateRange.element.nativeElement);
1972+
jasmine.anything(), expectedTarget);
19721973
}));
19731974
it('Should the weekStart property takes precedence over locale.', fakeAsync(() => {
19741975
fixture = TestBed.createComponent(DateRangeCustomComponent);

projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,10 +1223,15 @@ export class IgxDateRangePickerComponent extends PickerBaseDirective
12231223
private configPositionStrategy(): void {
12241224
this._positionSettings = {
12251225
openAnimation: fadeIn,
1226-
closeAnimation: fadeOut
1226+
closeAnimation: fadeOut,
1227+
offset: 1
12271228
};
12281229
this._dropDownOverlaySettings.positionStrategy = new AutoPositionStrategy(this._positionSettings);
1229-
this._dropDownOverlaySettings.target = this.element.nativeElement;
1230+
1231+
const bundle = this.hasProjectedInputs
1232+
? this.projectedInputs.first?.nativeElement.querySelector('.igx-input-group__bundle')
1233+
: this.element.nativeElement.querySelector('.igx-input-group__bundle');
1234+
this._dropDownOverlaySettings.target = bundle || this.element.nativeElement;
12301235
}
12311236

12321237
private configOverlaySettings(): void {

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
423423
}
424424

425425
public isScrollable() {
426-
return this.scrollComponent.size > parseInt(this.igxForContainerSize, 10);
426+
return this.scrollComponent.size > parseFloat(this.igxForContainerSize);
427427
}
428428

429429
/**
@@ -556,8 +556,8 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
556556
}
557557
const containerSize = 'igxForContainerSize';
558558
if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {
559-
const prevSize = parseInt(changes[containerSize].previousValue, 10);
560-
const newSize = parseInt(changes[containerSize].currentValue, 10);
559+
const prevSize = parseFloat(changes[containerSize].previousValue);
560+
const newSize = parseFloat(changes[containerSize].currentValue);
561561
this._recalcOnContainerChange({prevSize, newSize});
562562
}
563563
}
@@ -614,7 +614,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
614614
return false;
615615
}
616616
const originalVirtScrollTop = this._virtScrollPosition;
617-
const containerSize = parseInt(this.igxForContainerSize, 10);
617+
const containerSize = parseFloat(this.igxForContainerSize);
618618
const maxVirtScrollTop = this._virtSize - containerSize;
619619

620620
this._bScrollInternal = true;
@@ -627,7 +627,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
627627
if (Math.abs(add / this._virtRatio) < 1) {
628628
// Actual scroll delta that was added is smaller than 1 and onScroll handler doesn't trigger when scrolling < 1px
629629
const scrollOffset = this.fixedUpdateAllElements(this._virtScrollPosition);
630-
// scrollOffset = scrollOffset !== parseInt(this.igxForItemSize, 10) ? scrollOffset : 0;
630+
// scrollOffset = scrollOffset !== parseFloat(this.igxForItemSize, 10) ? scrollOffset : 0;
631631
this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';
632632
}
633633

@@ -659,7 +659,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
659659
if (index < 0 || index > (this.isRemote ? this.totalItemCount : this.igxForOf.length) - 1) {
660660
return;
661661
}
662-
const containerSize = parseInt(this.igxForContainerSize, 10);
662+
const containerSize = parseFloat(this.igxForContainerSize);
663663
const isPrevItem = index < this.state.startIndex || this.scrollPosition > this.sizesCache[index];
664664
let nextScroll = isPrevItem ? this.sizesCache[index] : this.sizesCache[index + 1] - containerSize;
665665
if (nextScroll < 0) {
@@ -684,7 +684,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
684684
*/
685685
public scrollNext() {
686686
const scr = Math.abs(Math.ceil(this.scrollPosition));
687-
const endIndex = this.getIndexAt(scr + parseInt(this.igxForContainerSize, 10), this.sizesCache);
687+
const endIndex = this.getIndexAt(scr + parseFloat(this.igxForContainerSize), this.sizesCache);
688688
this.scrollTo(endIndex);
689689
}
690690

@@ -707,7 +707,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
707707
* ```
708708
*/
709709
public scrollNextPage() {
710-
this.addScroll(parseInt(this.igxForContainerSize, 10));
710+
this.addScroll(parseFloat(this.igxForContainerSize));
711711
}
712712

713713
/**
@@ -718,7 +718,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
718718
* ```
719719
*/
720720
public scrollPrevPage() {
721-
const containerSize = (parseInt(this.igxForContainerSize, 10));
721+
const containerSize = (parseFloat(this.igxForContainerSize));
722722
this.addScroll(-containerSize);
723723
}
724724

@@ -741,7 +741,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
741741
// fisrt item is not fully in view
742742
startIndex++;
743743
}
744-
const endIndex = this.getIndexAt(this.scrollPosition + parseInt(this.igxForContainerSize, 10), this.sizesCache);
744+
const endIndex = this.getIndexAt(this.scrollPosition + parseFloat(this.igxForContainerSize), this.sizesCache);
745745
return endIndex - startIndex;
746746
}
747747

@@ -780,7 +780,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
780780
* ```
781781
*/
782782
public getScrollForIndex(index: number, bottom?: boolean) {
783-
const containerSize = parseInt(this.igxForContainerSize, 10);
783+
const containerSize = parseFloat(this.igxForContainerSize);
784784
const scroll = bottom ? Math.max(0, this.sizesCache[index + 1] - containerSize) : this.sizesCache[index];
785785
return scroll;
786786
}
@@ -805,7 +805,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
805805
this._embeddedViews.map(view =>
806806
view.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE) || view.rootNodes[0].nextElementSibling)[index - this.state.startIndex] : null;
807807
const rowHeight = this.getSizeAt(index);
808-
const containerSize = parseInt(this.igxForContainerSize, 10);
808+
const containerSize = parseFloat(this.igxForContainerSize);
809809
const containerOffset = -(this.scrollPosition - this.sizesCache[this.state.startIndex]);
810810
const endTopOffset = targetNode ? targetNode.offsetTop + rowHeight + containerOffset : containerSize + rowHeight;
811811
return !targetNode || targetNode.offsetTop < Math.abs(containerOffset)
@@ -828,7 +828,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
828828
const rNode = rNodes[i];
829829
if (rNode) {
830830
const height = window.getComputedStyle(rNode).getPropertyValue('height');
831-
const h = parseFloat(height) || parseInt(this.igxForItemSize, 10);
831+
const h = parseFloat(height) || parseFloat(this.igxForItemSize);
832832
const index = this.state.startIndex + i;
833833
if (!this.isRemote && !this.igxForOf[index]) {
834834
continue;
@@ -863,7 +863,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
863863
}
864864
const scrToBottom = this._isScrolledToBottom && !this.dc.instance.notVirtual;
865865
if (scrToBottom && !this._isAtBottomIndex) {
866-
const containerSize = parseInt(this.igxForContainerSize, 10);
866+
const containerSize = parseFloat(this.igxForContainerSize);
867867
const maxVirtScrollTop = this._virtSize - containerSize;
868868
this._bScrollInternal = true;
869869
this._virtScrollPosition = maxVirtScrollTop;
@@ -912,7 +912,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
912912
*/
913913
protected onScroll(event) {
914914
/* in certain situations this may be called when no scrollbar is visible */
915-
if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) {
915+
if (!parseFloat(this.scrollComponent.nativeElement.style.height)) {
916916
return;
917917
}
918918
if (!this._bScrollInternal) {
@@ -1100,7 +1100,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
11001100
protected onHScroll(event) {
11011101
/* in certain situations this may be called when no scrollbar is visible */
11021102
const firstScrollChild = this.scrollComponent.nativeElement.children.item(0) as HTMLElement;
1103-
if (!parseInt(firstScrollChild.style.width, 10)) {
1103+
if (!parseFloat(firstScrollChild.style.width)) {
11041104
return;
11051105
}
11061106
if (!this._bScrollInternal) {
@@ -1272,7 +1272,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
12721272
let maxLength = 0;
12731273
const arr = [];
12741274
let sum = 0;
1275-
const availableSize = parseInt(this.igxForContainerSize, 10);
1275+
const availableSize = parseFloat(this.igxForContainerSize);
12761276
if (!availableSize) {
12771277
return 0;
12781278
}
@@ -1302,7 +1302,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
13021302
const prevItem = this.igxForOf[prevIndex];
13031303
const prevSize = dimension === 'height' ?
13041304
this.individualSizeCache[prevIndex] :
1305-
parseInt(prevItem[dimension], 10);
1305+
parseFloat(prevItem[dimension]);
13061306
sum = arr.reduce(reducer, prevSize);
13071307
arr.unshift(prevItem);
13081308
length = arr.length;
@@ -1349,19 +1349,19 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
13491349
this.dc.instance.notVirtual = !(this.igxForContainerSize && this.dc && this.state.chunkSize < count);
13501350
const scrollable = containerSizeInfo ? this.scrollComponent.size > containerSizeInfo.prevSize : this.isScrollable();
13511351
if (this.igxForScrollOrientation === 'horizontal') {
1352-
const totalWidth = parseInt(this.igxForContainerSize, 10) > 0 ? this._calcSize() : 0;
1353-
if (totalWidth <= parseInt(this.igxForContainerSize, 10)) {
1352+
const totalWidth = parseFloat(this.igxForContainerSize) > 0 ? this._calcSize() : 0;
1353+
if (totalWidth <= parseFloat(this.igxForContainerSize)) {
13541354
this.resetScrollPosition();
13551355
}
13561356
this.scrollComponent.nativeElement.style.width = this.igxForContainerSize + 'px';
13571357
this.scrollComponent.size = totalWidth;
13581358
}
13591359
if (this.igxForScrollOrientation === 'vertical') {
13601360
const totalHeight = this._calcSize();
1361-
if (totalHeight <= parseInt(this.igxForContainerSize, 10)) {
1361+
if (totalHeight <= parseFloat(this.igxForContainerSize)) {
13621362
this.resetScrollPosition();
13631363
}
1364-
this.scrollComponent.nativeElement.style.height = parseInt(this.igxForContainerSize, 10) + 'px';
1364+
this.scrollComponent.nativeElement.style.height = parseFloat(this.igxForContainerSize) + 'px';
13651365
this.scrollComponent.size = totalHeight;
13661366
}
13671367
if (scrollable !== this.isScrollable()) {
@@ -1453,7 +1453,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
14531453
}
14541454

14551455
protected _calcVirtualScrollPosition(scrollPosition: number) {
1456-
const containerSize = parseInt(this.igxForContainerSize, 10);
1456+
const containerSize = parseFloat(this.igxForContainerSize);
14571457
const maxRealScrollPosition = this.scrollComponent.size - containerSize;
14581458
const realPercentScrolled = maxRealScrollPosition !== 0 ? scrollPosition / maxRealScrollPosition : 0;
14591459
const maxVirtScroll = this._virtSize - containerSize;
@@ -1462,7 +1462,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
14621462

14631463
protected _getItemSize(item, dimension: string): number {
14641464
const dim = item ? item[dimension] : null;
1465-
return typeof dim === 'number' ? dim : parseInt(this.igxForItemSize, 10) || 0;
1465+
return typeof dim === 'number' ? dim : parseFloat(this.igxForItemSize) || 0;
14661466
}
14671467

14681468
protected _updateScrollOffset() {
@@ -1485,8 +1485,8 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
14851485
if (Math.abs(sizeDiff) > 0 && this.scrollPosition > 0) {
14861486
this.recalcUpdateSizes();
14871487
const offset = this.igxForScrollOrientation === 'horizontal' ?
1488-
parseInt(this.dc.instance._viewContainer.element.nativeElement.style.left, 10) :
1489-
parseInt(this.dc.instance._viewContainer.element.nativeElement.style.top, 10);
1488+
parseFloat(this.dc.instance._viewContainer.element.nativeElement.style.left) :
1489+
parseFloat(this.dc.instance._viewContainer.element.nativeElement.style.top);
14901490
const newSize = this.sizesCache[this.state.startIndex] - offset;
14911491
this.scrollPosition = newSize;
14921492
if (this.scrollPosition !== newSize) {
@@ -1651,8 +1651,8 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16511651
}
16521652
const containerSize = 'igxForContainerSize';
16531653
if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {
1654-
const prevSize = parseInt(changes[containerSize].previousValue, 10);
1655-
const newSize = parseInt(changes[containerSize].currentValue, 10);
1654+
const prevSize = parseFloat(changes[containerSize].previousValue);
1655+
const newSize = parseFloat(changes[containerSize].currentValue);
16561656
this._recalcOnContainerChange({prevSize, newSize});
16571657
}
16581658
}
@@ -1700,7 +1700,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17001700
}
17011701

17021702
public override onScroll(event) {
1703-
if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) {
1703+
if (!parseFloat(this.scrollComponent.nativeElement.style.height)) {
17041704
return;
17051705
}
17061706
if (!this._bScrollInternal) {
@@ -1719,7 +1719,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17191719
public override onHScroll(scrollAmount) {
17201720
/* in certain situations this may be called when no scrollbar is visible */
17211721
const firstScrollChild = this.scrollComponent.nativeElement.children.item(0) as HTMLElement;
1722-
if (!this.scrollComponent || !parseInt(firstScrollChild.style.width, 10)) {
1722+
if (!this.scrollComponent || !parseFloat(firstScrollChild.style.width)) {
17231723
return;
17241724
}
17251725
// Updating horizontal chunks
@@ -1744,7 +1744,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17441744
size = item.height;
17451745
}
17461746
} else {
1747-
size = parseInt(item[dimension], 10) || 0;
1747+
size = parseFloat(item[dimension]) || 0;
17481748
}
17491749
return size;
17501750
}

0 commit comments

Comments
 (0)