Skip to content

Commit 23ce4df

Browse files
authored
Merge branch '21.1.x' into mkirova/fix-3903-21.1.x
2 parents b2fdd5a + 2b99198 commit 23ce4df

38 files changed

Lines changed: 2498 additions & 1833 deletions
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/tooltip/tooltip-target.directive.ts

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
Directive, OnInit, OnDestroy, Output, ElementRef, ViewContainerRef,
2+
Directive, OnInit, OnDestroy, Output, ViewContainerRef,
33
Input, EventEmitter, booleanAttribute, TemplateRef, ComponentRef, Renderer2,
44
EnvironmentInjector,
55
createComponent,
@@ -380,6 +380,7 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
380380
private _positionSettings: PositionSettings = TooltipPositionSettings;
381381
private _showTriggers = new Set(['pointerenter']);
382382
private _hideTriggers = new Set(['pointerleave', 'click']);
383+
private _pendingShowTrigger: string | null = null;
383384

384385
private _abortController = new AbortController();
385386

@@ -400,15 +401,20 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
400401
/**
401402
* @hidden
402403
*/
403-
public onShow(): void {
404-
this._checksBeforeShowing(() => this._showOnInteraction());
404+
public onShow(event?: Event): void {
405+
this._checksBeforeShowing(() => this._showOnInteraction(event));
405406
}
406407

407408
/**
408409
* @hidden
409410
*/
410-
public onHide(): void {
411-
if (this.tooltipDisabled || this.target.collapsed) {
411+
public onHide(event?: Event): void {
412+
if (this.target.collapsed) {
413+
this._cancelPendingShow(event);
414+
return;
415+
}
416+
417+
if (this.tooltipDisabled) {
412418
return;
413419
}
414420

@@ -538,7 +544,7 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
538544
}, withDelay ? this.hideDelay : 0);
539545
}
540546

541-
private _showTooltip(withDelay: boolean, withEvents: boolean): void {
547+
private _showTooltip(withDelay: boolean, withEvents: boolean, triggerEvent?: Event): void {
542548
if (!this.target.collapsed && !this._isForceClosed) {
543549
return;
544550
}
@@ -555,17 +561,19 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
555561
}
556562

557563
this._evaluateStickyState();
564+
this._pendingShowTrigger = triggerEvent?.type ?? null;
558565

559566
this.target.timeoutId = setTimeout(() => {
560567
// Call open() of IgxTooltipDirective
568+
this._pendingShowTrigger = null;
561569
this.target.open(this._mergedOverlaySettings);
562570
}, withDelay ? this.showDelay : 0);
563571
}
564572

565573

566-
private _showOnInteraction(): void {
574+
private _showOnInteraction(triggerEvent?: Event): void {
567575
this._stopTimeoutAndAnimation();
568-
this._showTooltip(true, true);
576+
this._showTooltip(true, true, triggerEvent);
569577
}
570578

571579
private _hideOnInteraction(): void {
@@ -594,6 +602,26 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
594602
this.target.stopAnimations();
595603
}
596604

605+
/**
606+
* Used when a hide trigger occurs before the tooltip opens.
607+
* Clears the pending timeout and resets the tracked show trigger
608+
* so the tooltip does not open after the user has already left the target.
609+
*/
610+
private _cancelPendingShow(event?: Event): void {
611+
if (!this.target.timeoutId) {
612+
return;
613+
}
614+
615+
// Keep same-event show/hide trigger combinations acting as toggle behavior.
616+
if (event?.type && event.type === this._pendingShowTrigger) {
617+
return;
618+
}
619+
620+
clearTimeout(this.target.timeoutId);
621+
this.target.timeoutId = null;
622+
this._pendingShowTrigger = null;
623+
}
624+
597625
/**
598626
* Used when a single tooltip is used for multiple targets.
599627
*/

projects/igniteui-angular/directives/src/directives/tooltip/tooltip.directive.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,19 @@ describe('IgxTooltip', () => {
519519
flush();
520520
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, false);
521521
}));
522+
523+
it('should not open when pointer leaves before the show delay elapses', fakeAsync(() => {
524+
tooltipTarget.showDelay = 500;
525+
fix.detectChanges();
526+
527+
hoverElement(button);
528+
tick(300);
529+
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, false);
530+
531+
unhoverElement(button);
532+
tick(300);
533+
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, false);
534+
}));
522535
});
523536
});
524537

projects/igniteui-angular/grids/core/src/columns/column.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,8 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
21892189
result.push(size.width + 'px');
21902190
} else {
21912191
const currentWidth = parseFloat(this.grid.getPossibleColumnWidth());
2192-
result.push((this.getConstrainedSizePx(currentWidth)) + 'px');
2192+
const target = size && size.ref ? size.ref : this;
2193+
result.push((target as IgxColumnComponent).getConstrainedSizePx(currentWidth) + 'px');
21932194
}
21942195
}
21952196
return result;
@@ -2682,7 +2683,7 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
26822683
} else if (this.minWidth && newSize <= this.userSetMinWidthPx) {
26832684
this.widthConstrained = true;
26842685
return this.userSetMinWidthPx;
2685-
} else if (!this.minWidth && (!this.widthSetByUser || this.width === 'fit-content') && !this.grid.columnWidthSetByUser && (!newSize || newSize <= this.grid.minColumnWidth)) {
2686+
} else if (!this.columnGroup && !this.minWidth && (!this.widthSetByUser || this.width === 'fit-content') && !this.grid.columnWidthSetByUser && (!newSize || newSize <= this.grid.minColumnWidth)) {
26862687
return this.grid.minColumnWidth;
26872688
} else {
26882689
this.widthConstrained = false;

0 commit comments

Comments
 (0)