Skip to content

Commit 963b612

Browse files
authored
Merge branch '21.1.x' into mkirova/fix-17005-21.1.x
2 parents 06c1dd2 + a68d01e commit 963b612

45 files changed

Lines changed: 2733 additions & 2055 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 21.1.3
6+
7+
### Security Fixes
8+
- Bumped `jspdf` dependency to `4.2.1` to address a security vulnerability present in earlier versions.
9+
510
## 21.1.0
611

712
### New Features

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"igniteui-i18n-core": "^1.0.2",
8080
"igniteui-theming": "^25.0.0",
8181
"igniteui-trial-watermark": "^3.1.0",
82-
"jspdf": "^4.0.0",
82+
"jspdf": "^4.2.1",
8383
"lodash-es": "^4.17.21",
8484
"marked": "^17.0.1",
8585
"marked-shiki": "^1.2.1",

projects/igniteui-angular-elements/src/public_api.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { registerI18n, setCurrentI18n } from 'igniteui-i18n-core';
2-
import { ByLevelTreeGridMergeStrategy, ColumnPinningPosition, DefaultMergeStrategy, DefaultTreeGridMergeStrategy, FilteringExpressionsTree, FilteringExpressionsTreeType, FilteringLogic, HorizontalAlignment, IgxBooleanFilteringOperand, IgxDateFilteringOperand, IgxDateTimeFilteringOperand, IgxFilteringOperand, IgxNumberFilteringOperand, IgxStringFilteringOperand, IgxTimeFilteringOperand, NoopFilteringStrategy, NoopSortingStrategy, SortingDirection, VerticalAlignment } from 'igniteui-angular/core';
2+
import { ByLevelTreeGridMergeStrategy, ColumnPinningPosition, DefaultMergeStrategy, DefaultTreeGridMergeStrategy, FilteringExpressionsTree, FilteringExpressionsTreeType, FilteringLogic, HorizontalAlignment, IgxBooleanFilteringOperand, IgxDateFilteringOperand, IgxDateTimeFilteringOperand, IgxFilteringOperand, IgxNumberFilteringOperand, IgxStringFilteringOperand, IgxTimeFilteringOperand, NoopFilteringStrategy, NoopSortingStrategy, SortingDirection, TransactionType, TransactionEventOrigin, VerticalAlignment } from 'igniteui-angular/core';
33
import { DropPosition, GridPagingMode, IgxDateSummaryOperand, IgxNumberSummaryOperand, IgxPivotAggregate, IgxPivotDateAggregate, IgxPivotDateDimension, IgxPivotNumericAggregate, IgxPivotTimeAggregate, IgxSummaryOperand, IgxTimeSummaryOperand, NoopPivotDimensionsStrategy, PivotDimensionType, RowPinningPosition } from 'igniteui-angular/grids/core';
44

55
/** Export Public API, TODO: reorganize, Generate all w/ renames? */
@@ -49,4 +49,8 @@ export {
4949
// i18n
5050
registerI18n,
5151
setCurrentI18n,
52+
53+
// Transactions API
54+
TransactionType,
55+
TransactionEventOrigin,
5256
}

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,6 +1866,40 @@ describe('igxCombo', () => {
18661866
expect(document.activeElement).toEqual(combo.comboInput.nativeElement);
18671867
expect(combo.selection.length).toEqual(0);
18681868
}));
1869+
it('should stop Escape keydown event propagation when the dropdown is open', fakeAsync(() => {
1870+
const escapeEvent = new KeyboardEvent('keydown', { key: 'Escape', bubbles: true });
1871+
spyOn(escapeEvent, 'stopPropagation');
1872+
1873+
combo.comboInput.nativeElement.focus();
1874+
fixture.detectChanges();
1875+
1876+
combo.toggle();
1877+
fixture.detectChanges();
1878+
expect(combo.collapsed).toBeFalsy();
1879+
1880+
combo.onEscape(escapeEvent);
1881+
tick();
1882+
fixture.detectChanges();
1883+
1884+
expect(escapeEvent.stopPropagation).toHaveBeenCalled();
1885+
}));
1886+
it('should stop Escape key propagation when the combo is collapsed and has a selection', fakeAsync(() => {
1887+
combo.comboInput.nativeElement.focus();
1888+
fixture.detectChanges();
1889+
1890+
combo.select([combo.data[0][combo.valueKey]]);
1891+
expect(combo.selection.length).toEqual(1);
1892+
fixture.detectChanges();
1893+
1894+
const keyEvent = new KeyboardEvent('keydown', { key: 'Escape' });
1895+
const stopPropSpy = spyOn(keyEvent, 'stopPropagation');
1896+
1897+
combo.onEscape(keyEvent);
1898+
tick();
1899+
fixture.detectChanges();
1900+
1901+
expect(stopPropSpy).toHaveBeenCalledTimes(1);
1902+
}));
18691903
it('should close the combo and preserve the focus when Escape key is pressed', fakeAsync(() => {
18701904
combo.comboInput.nativeElement.focus();
18711905
fixture.detectChanges();

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
187187

188188
@HostListener('keydown.Escape', ['$event'])
189189
public onEscape(event: Event) {
190+
event.stopPropagation();
190191
if (this.collapsed) {
191192
this.deselectAllItems(true, event);
192193
}

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
415415
}
416416

417417
public isScrollable() {
418-
return this.scrollComponent.size > parseInt(this.igxForContainerSize, 10);
418+
return this.scrollComponent.size > parseFloat(this.igxForContainerSize);
419419
}
420420

421421
protected get embeddedViewNodes() {
@@ -583,8 +583,8 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
583583
}
584584
const containerSize = 'igxForContainerSize';
585585
if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {
586-
const prevSize = parseInt(changes[containerSize].previousValue, 10);
587-
const newSize = parseInt(changes[containerSize].currentValue, 10);
586+
const prevSize = parseFloat(changes[containerSize].previousValue);
587+
const newSize = parseFloat(changes[containerSize].currentValue);
588588
this._recalcOnContainerChange({prevSize, newSize});
589589
}
590590
}
@@ -641,7 +641,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
641641
return false;
642642
}
643643
const originalVirtScrollTop = this._virtScrollPosition;
644-
const containerSize = parseInt(this.igxForContainerSize, 10);
644+
const containerSize = parseFloat(this.igxForContainerSize);
645645
const maxVirtScrollTop = this._virtSize - containerSize;
646646

647647
this._bScrollInternal = true;
@@ -692,7 +692,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
692692
if (index < 0 || index > (this.isRemote ? this.totalItemCount : this.igxForOf.length) - 1) {
693693
return;
694694
}
695-
const containerSize = parseInt(this.igxForContainerSize, 10);
695+
const containerSize = parseFloat(this.igxForContainerSize);
696696
const isPrevItem = index < this.state.startIndex || this.scrollPosition > this.sizesCache[index];
697697
let nextScroll = isPrevItem ? this.sizesCache[index] : this.sizesCache[index + 1] - containerSize;
698698
if (nextScroll < 0) {
@@ -717,7 +717,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
717717
*/
718718
public scrollNext() {
719719
const scr = Math.abs(Math.ceil(this.scrollPosition));
720-
const endIndex = this.getIndexAt(scr + parseInt(this.igxForContainerSize, 10), this.sizesCache);
720+
const endIndex = this.getIndexAt(scr + parseFloat(this.igxForContainerSize), this.sizesCache);
721721
this.scrollTo(endIndex);
722722
}
723723

@@ -740,7 +740,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
740740
* ```
741741
*/
742742
public scrollNextPage() {
743-
this.addScroll(parseInt(this.igxForContainerSize, 10));
743+
this.addScroll(parseFloat(this.igxForContainerSize));
744744
}
745745

746746
/**
@@ -751,7 +751,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
751751
* ```
752752
*/
753753
public scrollPrevPage() {
754-
const containerSize = (parseInt(this.igxForContainerSize, 10));
754+
const containerSize = (parseFloat(this.igxForContainerSize));
755755
this.addScroll(-containerSize);
756756
}
757757

@@ -774,7 +774,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
774774
// fisrt item is not fully in view
775775
startIndex++;
776776
}
777-
const endIndex = this.getIndexAt(this.scrollPosition + parseInt(this.igxForContainerSize, 10), this.sizesCache);
777+
const endIndex = this.getIndexAt(this.scrollPosition + parseFloat(this.igxForContainerSize), this.sizesCache);
778778
return endIndex - startIndex;
779779
}
780780

@@ -813,7 +813,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
813813
* ```
814814
*/
815815
public getScrollForIndex(index: number, bottom?: boolean) {
816-
const containerSize = parseInt(this.igxForContainerSize, 10);
816+
const containerSize = parseFloat(this.igxForContainerSize);
817817
const scroll = bottom ? Math.max(0, this.sizesCache[index + 1] - containerSize) : this.sizesCache[index];
818818
return scroll;
819819
}
@@ -837,7 +837,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
837837
const targetNode = index >= this.state.startIndex && index <= this.state.startIndex + this.state.chunkSize ?
838838
this.embeddedViewNodes[index - this.state.startIndex] : null;
839839
const rowHeight = this.getSizeAt(index);
840-
const containerSize = parseInt(this.igxForContainerSize, 10);
840+
const containerSize = parseFloat(this.igxForContainerSize);
841841
const containerOffset = -(this.scrollPosition - this.sizesCache[this.state.startIndex]);
842842
const endTopOffset = targetNode ? targetNode.offsetTop + rowHeight + containerOffset : containerSize + rowHeight;
843843
return !targetNode || targetNode.offsetTop < Math.abs(containerOffset)
@@ -897,7 +897,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
897897
}
898898
const scrToBottom = this._isScrolledToBottom && !this.dc.instance.notVirtual;
899899
if (scrToBottom && !this._isAtBottomIndex) {
900-
const containerSize = parseInt(this.igxForContainerSize, 10);
900+
const containerSize = parseFloat(this.igxForContainerSize);
901901
const maxVirtScrollTop = this._virtSize - containerSize;
902902
this._bScrollInternal = true;
903903
this._virtScrollPosition = maxVirtScrollTop;
@@ -946,7 +946,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
946946
*/
947947
protected onScroll(event) {
948948
/* in certain situations this may be called when no scrollbar is visible */
949-
if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) {
949+
if (!parseFloat(this.scrollComponent.nativeElement.style.height)) {
950950
return;
951951
}
952952
this.scrollComponent.scrollAmount = event.target.scrollTop;
@@ -1153,7 +1153,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
11531153
protected onHScroll(event) {
11541154
/* in certain situations this may be called when no scrollbar is visible */
11551155
const firstScrollChild = this.scrollComponent.nativeElement.children.item(0) as HTMLElement;
1156-
if (!parseInt(firstScrollChild.style.width, 10)) {
1156+
if (!parseFloat(firstScrollChild.style.width)) {
11571157
return;
11581158
}
11591159
this.scrollComponent.scrollAmount = event.target.scrollLeft;
@@ -1326,7 +1326,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
13261326
let maxLength = 0;
13271327
const arr = [];
13281328
let sum = 0;
1329-
const availableSize = parseInt(this.igxForContainerSize, 10);
1329+
const availableSize = parseFloat(this.igxForContainerSize);
13301330
if (!availableSize) {
13311331
return 0;
13321332
}
@@ -1356,7 +1356,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
13561356
const prevItem = this.igxForOf[prevIndex];
13571357
const prevSize = dimension === 'height' ?
13581358
this.individualSizeCache[prevIndex] :
1359-
parseInt(prevItem[dimension], 10);
1359+
parseFloat(prevItem[dimension]);
13601360
sum = arr.reduce(reducer, prevSize);
13611361
arr.unshift(prevItem);
13621362
length = arr.length;
@@ -1403,19 +1403,19 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
14031403
this.dc.instance.notVirtual = !(this.igxForContainerSize && this.dc && this.state.chunkSize < count);
14041404
const scrollable = containerSizeInfo ? this.scrollComponent.size > containerSizeInfo.prevSize : this.isScrollable();
14051405
if (this.igxForScrollOrientation === 'horizontal') {
1406-
const totalWidth = parseInt(this.igxForContainerSize, 10) > 0 ? this._calcSize() : 0;
1407-
if (totalWidth <= parseInt(this.igxForContainerSize, 10)) {
1406+
const totalWidth = parseFloat(this.igxForContainerSize) > 0 ? this._calcSize() : 0;
1407+
if (totalWidth <= parseFloat(this.igxForContainerSize)) {
14081408
this.resetScrollPosition();
14091409
}
14101410
this.scrollComponent.nativeElement.style.width = this.igxForContainerSize + 'px';
14111411
this.scrollComponent.size = totalWidth;
14121412
}
14131413
if (this.igxForScrollOrientation === 'vertical') {
14141414
const totalHeight = this._calcSize();
1415-
if (totalHeight <= parseInt(this.igxForContainerSize, 10)) {
1415+
if (totalHeight <= parseFloat(this.igxForContainerSize)) {
14161416
this.resetScrollPosition();
14171417
}
1418-
this.scrollComponent.nativeElement.style.height = parseInt(this.igxForContainerSize, 10) + 'px';
1418+
this.scrollComponent.nativeElement.style.height = parseFloat(this.igxForContainerSize) + 'px';
14191419
this.scrollComponent.size = totalHeight;
14201420
}
14211421
if (scrollable !== this.isScrollable()) {
@@ -1512,7 +1512,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
15121512
}
15131513

15141514
protected _calcVirtualScrollPosition(scrollPosition: number) {
1515-
const containerSize = parseInt(this.igxForContainerSize, 10);
1515+
const containerSize = parseFloat(this.igxForContainerSize);
15161516
const maxRealScrollPosition = this.scrollComponent.size - containerSize;
15171517
const realPercentScrolled = maxRealScrollPosition !== 0 ? scrollPosition / maxRealScrollPosition : 0;
15181518
const maxVirtScroll = this._virtSize - containerSize;
@@ -1521,7 +1521,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
15211521

15221522
protected _getItemSize(item, dimension: string): number {
15231523
const dim = item ? item[dimension] : null;
1524-
return typeof dim === 'number' ? dim : parseInt(this.igxForItemSize, 10) || 0;
1524+
return typeof dim === 'number' ? dim : parseFloat(this.igxForItemSize) || 0;
15251525
}
15261526

15271527
protected _updateScrollOffset() {
@@ -1545,7 +1545,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
15451545
// should update scroll top/left according to change so that same startIndex is in view
15461546
if (Math.abs(sizeDiff) > 0 && this.scrollPosition > 0) {
15471547
const offset = this.igxForScrollOrientation === 'horizontal' ?
1548-
parseInt(this.dc.instance._viewContainer.element.nativeElement.style.left, 10) :
1548+
parseFloat(this.dc.instance._viewContainer.element.nativeElement.style.left) :
15491549
Number(this.dc.instance._viewContainer.element.nativeElement.style.transform?.match(/translateY\((-?\d+\.?\d*)px\)/)?.[1]);
15501550
const newSize = this.sizesCache[this.state.startIndex] - offset;
15511551
this.scrollPosition = newSize;
@@ -1706,8 +1706,8 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17061706
}
17071707
const containerSize = 'igxForContainerSize';
17081708
if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {
1709-
const prevSize = parseInt(changes[containerSize].previousValue, 10);
1710-
const newSize = parseInt(changes[containerSize].currentValue, 10);
1709+
const prevSize = parseFloat(changes[containerSize].previousValue);
1710+
const newSize = parseFloat(changes[containerSize].currentValue);
17111711
this._recalcOnContainerChange({prevSize, newSize});
17121712
}
17131713
}
@@ -1781,7 +1781,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
17811781
public override onHScroll(scrollAmount) {
17821782
/* in certain situations this may be called when no scrollbar is visible */
17831783
const firstScrollChild = this.scrollComponent.nativeElement.children.item(0) as HTMLElement;
1784-
if (!this.scrollComponent || !parseInt(firstScrollChild.style.width, 10)) {
1784+
if (!this.scrollComponent || !parseFloat(firstScrollChild.style.width)) {
17851785
return;
17861786
}
17871787
this.scrollComponent.scrollAmount = scrollAmount;
@@ -1807,7 +1807,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
18071807
size = item.height;
18081808
}
18091809
} else {
1810-
size = parseInt(item[dimension], 10) || 0;
1810+
size = parseFloat(item[dimension]) || 0;
18111811
}
18121812
return size;
18131813
}
@@ -1836,7 +1836,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
18361836
protected override getNodeSize(rNode: Element, index?: number): number {
18371837
if (this.igxForScrollOrientation === 'vertical') {
18381838
const view = this._embeddedViews[index];
1839-
return this._embeddedViewSizesCache.get(view) || parseInt(this.igxForItemSize, 10);
1839+
return this._embeddedViewSizesCache.get(view) || parseFloat(this.igxForItemSize);
18401840
} else {
18411841
return super.getNodeSize(rNode, index);
18421842
}

0 commit comments

Comments
 (0)