Skip to content

Commit 41139a1

Browse files
committed
release: v2.6.2
2 parents cdf5880 + 73dc57e commit 41139a1

File tree

54 files changed

+288
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+288
-268
lines changed

.github/workflows/pr-storybook.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
branch: gh-pages
3939
folder: storybook-static
4040
target-folder: next/pr/${{ github.event.number }}
41-
token: ${{ secrets.ACCESS_TOKEN }}
4241

4342
- name: Comment PR
4443
uses: thollander/actions-comment-pull-request@v1

.storybook/manager-head.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
// This is a fix for an accessibility issue: https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/1085
47-
sidebarHeader[0].innerHTML = '<h1 tabindex="0" class="css-1su1ft1">' + '<a href="https://aka.ms/mgt" target="_blank" class="css-ixbm00">' + "Microsoft Graph Toolkit Playground</a>" + "</h1>";
47+
sidebarHeader[0].innerHTML = '<h1 tabindex="-1" class="css-1su1ft1">' + '<a href="https://aka.ms/mgt" target="_blank" class="css-ixbm00">' + "Microsoft Graph Toolkit Playground</a>" + "</h1>";
4848

4949
const sidebarNode = sidebarHeader[0].parentNode;
5050

@@ -417,6 +417,7 @@
417417
color: #717171 !important;
418418
}
419419

420+
.sto-ulso1l,
420421
.css-1en6m26 {
421422
color: #616159 !important;
422423
}
@@ -425,4 +426,12 @@
425426
.css-8ktt77 {
426427
display: none;
427428
}
429+
430+
.css-14o7vtb {
431+
border: 2px solid transparent;
432+
}
433+
434+
.css-14o7vtb:focus-visible {
435+
outline: auto;
436+
}
428437
</style>

.storybook/preview-body.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@
7676
}
7777

7878
.css-19nbuh3,
79-
.css-1m7olli * .token.attr-value {
79+
.css-zj0253 * .token.attr-value {
8080
color: #0360B9 !important;
8181
}
8282

83-
.css-1m7olli * .token.attr-name{
83+
.css-zj0253 * .token.attr-name {
8484
color: #e50000 !important;
8585
}
8686

87+
.css-3ltsna:focus-visible {
88+
outline: auto;
89+
}
90+
8791
@media (max-width: 768px) {
8892
.story-mgt-root {
8993
flex-direction: column;

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
66

7-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://learn.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
88

99
## Reporting Security Issues
1010

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "root",
33
"private": true,
4-
"version": "2.6.1",
4+
"version": "2.6.2",
55
"workspaces": [
66
"packages/*",
77
"packages/providers/*",
@@ -116,7 +116,7 @@
116116
"tslint": "^6.1.3",
117117
"tslint-config-prettier": "^1.18.0",
118118
"tslint-microsoft-contrib": "^6.2.0",
119-
"typescript": "^3.7.5",
119+
"typescript": "^4.8.2",
120120
"web-component-analyzer": "^1.1.6",
121121
"whatwg-fetch": "^3.5.0"
122122
},
@@ -134,6 +134,7 @@
134134
},
135135
"resolutions": {
136136
"react": "16.13.1",
137-
"react-dom": "16.13.1"
137+
"react-dom": "16.13.1",
138+
"responselike": "2.0.0"
138139
}
139140
}

packages/mgt-components/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ You can explore components and samples with the [playground](https://mgt.dev) po
1313

1414
The Toolkit currently includes the following components:
1515

16-
* [mgt-login](https://docs.microsoft.com/graph/toolkit/components/login)
17-
* [mgt-person](https://docs.microsoft.com/graph/toolkit/components/person)
18-
* [mgt-person-card](https://docs.microsoft.com/graph/toolkit/components/person-card)
19-
* [mgt-people](https://docs.microsoft.com/graph/toolkit/components/people)
20-
* [mgt-people-picker](https://docs.microsoft.com/graph/toolkit/components/people-picker)
21-
* [mgt-agenda](https://docs.microsoft.com/graph/toolkit/components/agenda)
22-
* [mgt-tasks](https://docs.microsoft.com/graph/toolkit/components/tasks)
23-
* [mgt-todo](https://docs.microsoft.com/graph/toolkit/components/todo)
24-
* [mgt-get](https://docs.microsoft.com/graph/toolkit/components/get)
25-
* [mgt-teams-channel-picker](https://docs.microsoft.com/en-us/graph/toolkit/components/teams-channel-picker)
26-
27-
The components work best when used with a [provider](https://docs.microsoft.com/graph/toolkit/providers). The provider handles authentication and the requests to the Microsoft Graph APIs used by the components.
16+
* [mgt-login](https://learn.microsoft.com/graph/toolkit/components/login)
17+
* [mgt-person](https://learn.microsoft.com/graph/toolkit/components/person)
18+
* [mgt-person-card](https://learn.microsoft.com/graph/toolkit/components/person-card)
19+
* [mgt-people](https://learn.microsoft.com/graph/toolkit/components/people)
20+
* [mgt-people-picker](https://learn.microsoft.com/graph/toolkit/components/people-picker)
21+
* [mgt-agenda](https://learn.microsoft.com/graph/toolkit/components/agenda)
22+
* [mgt-tasks](https://learn.microsoft.com/graph/toolkit/components/tasks)
23+
* [mgt-todo](https://learn.microsoft.com/graph/toolkit/components/todo)
24+
* [mgt-get](https://learn.microsoft.com/graph/toolkit/components/get)
25+
* [mgt-teams-channel-picker](https://learn.microsoft.com/graph/toolkit/components/teams-channel-picker)
26+
27+
The components work best when used with a [provider](https://learn.microsoft.com/graph/toolkit/providers). The provider handles authentication and the requests to the Microsoft Graph APIs used by the components.
2828

2929
## Get started
3030

packages/mgt-components/src/components/mgt-file-list/mgt-file-upload/mgt-file-upload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ export class MgtFileUpload extends MgtBaseComponent {
312312
<div>
313313
<input
314314
id="file-upload-input"
315+
aria-label="file upload input"
315316
type="file"
316317
multiple="true"
317318
@change="${this.onFileUploadChange}"

packages/mgt-components/src/components/mgt-login/mgt-login.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ mgt-login .login-button {
7272
&.no-click {
7373
pointer-events: none;
7474
}
75+
76+
&:focus-visible {
77+
outline: auto;
78+
}
7579
}
7680

7781
:host .login-icon,

packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
756756
aria-label="close-icon"
757757
class="selected-list__person-wrapper__overflow__close-icon"
758758
@click="${e => this.removePerson(person, e)}"
759-
@keydown="${e => this.removePerson(person, e)}"
759+
@keydown="${e => this.handleRemovePersonKeyDown(person, e)}"
760760
>
761761
\uE711
762762
</div>
@@ -899,10 +899,9 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
899899
};
900900
return html`
901901
<li
902-
role="option"
902+
role="listitem"
903903
@keydown="${this.onUserKeyDown}"
904904
aria-label=" ${this.strings.suggestedContact} ${person.displayName}"
905-
id="${person.displayName}"
906905
tabindex="0"
907906
class="${classMap(listPersonClasses)}"
908907
@click="${e => this.onPersonClick(person)}">
@@ -974,7 +973,13 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
974973
const input = this.userInput.toLowerCase();
975974
const provider = Providers.globalProvider;
976975

977-
if (!people && provider && provider.state === ProviderState.SignedIn) {
976+
if (people) {
977+
if (input) {
978+
const displayNameMatch = people.filter(person => person?.displayName.toLowerCase().includes(input));
979+
people = displayNameMatch;
980+
}
981+
this._showLoading = false;
982+
} else if (!people && provider && provider.state === ProviderState.SignedIn) {
978983
const graph = provider.graph.forComponent(this);
979984

980985
if (!input.length && this._isFocused) {
@@ -1242,7 +1247,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
12421247
* Removes person from selected people
12431248
* @param person - person and details pertaining to user selected
12441249
*/
1245-
protected removePerson(person: IDynamicPerson, e: MouseEvent): void {
1250+
protected removePerson(person: IDynamicPerson, e: UIEvent): void {
12461251
e.stopPropagation();
12471252
const filteredPersonArr = this.selectedPeople.filter(p => {
12481253
if (!person.id && p.displayName) {
@@ -1255,6 +1260,17 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
12551260
this.fireCustomEvent('selectionChanged', this.selectedPeople);
12561261
}
12571262

1263+
/**
1264+
* Checks if key pressed is an `Enter` key before removing person
1265+
* @param person
1266+
* @param e
1267+
*/
1268+
protected handleRemovePersonKeyDown(person: IDynamicPerson, e: KeyboardEvent): void {
1269+
if (e.key === 'Enter') {
1270+
this.removePerson(person, e);
1271+
}
1272+
}
1273+
12581274
/**
12591275
* Tracks when user selects person from picker
12601276
* @param person - contains details pertaining to selected user

packages/mgt-components/src/components/mgt-people/mgt-people.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export class MgtPeople extends MgtTemplatedComponent {
358358
people: this.people
359359
}) ||
360360
html`
361-
<li tabindex=0 aria-label="and ${extra} more attendees" class="overflow"><span>+${extra}<span></li>
361+
<li aria-label="and ${extra} more attendees" class="overflow"><span>+${extra}<span></li>
362362
`
363363
);
364364
}

0 commit comments

Comments
 (0)