Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v13.7.9 (2023-05-11)
* **suggest** add input for aria-label
* **suggest** condition title display by input

# v13.7.8 (2023-05-10)
* **fix** display outline on suggest grid filter

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-components",
"version": "13.7.8",
"version": "13.7.9",
"author": {
"name": "UiPath Inc",
"url": "https://uipath.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
[uiAutofocus]="!isOpen && focus"
[refocus]="!isOpen && focus"
[matRippleDisabled]="isFormControl"
[attr.aria-label]="placeholder"
[attr.aria-label]="ariaLabel ?? placeholder"
[attr.aria-describedby]="describedBy"
[attr.aria-required]="required"
[attr.aria-disabled]="disabled || readonly"
Expand Down Expand Up @@ -44,7 +44,7 @@
<ng-template #showDefaultValue>
<div [matTooltip]="tooltip ?? ''"
class="display-container text-ellipsis">
<span *ngIf="!isFormControl && placeholder"
<span *ngIf="!isFormControl && placeholder && !shouldHideTitle"
class="display-title"
aria-hidden="true">
{{ placeholder }}:
Expand Down Expand Up @@ -74,7 +74,7 @@
<ng-template #chipsTemplate>
<mat-chip-list #chipList
[attr.tabindex]="!disabled && !readonly ? 0 : null"
[attr.aria-label]="placeholder"
[attr.aria-label]="ariaLabel ?? placeholder"
[attr.aria-describedby]="describedBy"
[attr.aria-required]="required"
[attr.aria-disabled]="disabled || readonly"
Expand Down Expand Up @@ -116,7 +116,7 @@
[formControl]="inputControl"
[matChipInputFor]="chipList"
[attr.maxlength]="maxLength"
[attr.aria-label]="placeholder"
[attr.aria-label]="ariaLabel ?? placeholder"
selectionLocation="end"
autocomplete="off"
aria-autocomplete="list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class UiSuggestFixtureDirective {
displayPriority: 'default' | 'selected' = 'default';
fetchStrategy: 'eager' | 'onOpen' = 'eager';
minChars = 0;
shouldHideTitle = false;

set value(value: ISuggestValue[] | undefined) {
this._value = value;
Expand Down Expand Up @@ -148,6 +149,21 @@ const sharedSpecifications = (
});

describe('Behavior: standard usage', () => {
([true, false].forEach(shouldHideTitle => {
it(`should ${shouldHideTitle ? 'not' : ''} display title if shouldHideTitle is ${shouldHideTitle}`, () => {
component.placeholder = 'some place holder';
component.shouldHideTitle = shouldHideTitle;

fixture.detectChanges();
const spanElem = document.querySelector('.display-title');
if (shouldHideTitle || uiSuggest.isFormControl) {
expect(spanElem).toBeNull();
} else {
expect(spanElem).toBeTruthy();
}
});
}));

it('should be initialized', () => {
expect(uiSuggest).toBeDefined();
});
Expand Down Expand Up @@ -2464,7 +2480,8 @@ describe('Component: UiSuggest', () => {
[minChars]="minChars"
[drillDown]="drillDown"
[readonly]="readonly"
[compact]="compact">
[compact]="compact"
[shouldHideTitle]="shouldHideTitle">
</ui-suggest>
`,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ export abstract class UiSuggestMatFormFieldDirective implements
this.stateChanges.next();
}

/**
* Hides the combo box title.
*
*/
@Input()
shouldHideTitle = false;

/**
* Sets aria-label on input or mat-chip-list element.
*
*/
@Input('aria-label')
ariaLabel: string | null = null;

/**
* Set a custom size for the list items.
*
Expand Down
2 changes: 1 addition & 1 deletion projects/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uipath/angular",
"version": "13.7.8",
"version": "13.7.9",
"license": "MIT",
"author": {
"name": "UiPath Inc",
Expand Down