Skip to content

Commit c52898a

Browse files
vogtnnmetulev
andauthored
mgt-teams-channel-picker (#249)
* [mgt-teams-channel-picker] initial commit * updates to render methods to follow easier flow, fixing types * refactor nomenclature * add channel logic * adding team selection rendering, updating render method of team to include visible property for SVG * additional arrow handling logic, styles for selection * svg issues on teamlist * fixing focus and hide of channel list, removing text if user deletes selection * fixing close button to right-hand side. No matches found bug. more handling of search * arrow selection handling * handle arrow selection updates, reselect availablity, spacing * refactor of handle arrow selection * better channel selection, hide selection on search, updating icons * updated user input and initial states * selectedChannelById * team search if no channels found * css properties for help with dark mode * fixing placeholder custom css * spacing and border * input arrow visual designator * fixing padding * loading spinner * design updates * highlights and overflow * style updates * overflow and selection * overflow on custom color * fixes for custom css hover states * refactoring graph calls to baseGraph * tooltips * css props * moving teams specific calls in accordance to current path * filename and update private isHovered isFocused * protected render functions * prettier/stories for darkmode * prettier/build * fixing style on stories * prettier update * selectedChannel issue * channels view * key controls * removing test style * typo on focuslist * keynavigation bug * navigation bug * debounce 400ms * redo addChannel functionality * selected channel ui * add channel w/ no parent * selected channel focus state reset * updated render method * rename people, matching selectchannelbyId to current docs * error state using treeview, rename getChannelById * bug with loading/error * tab selection and open/close * update selectedItem case to SelectedItem * bug with reset search state if lostFocus * focus automatically gained on user input * selected item state handling * font-fix * loading and hover fixes for selectById * Added few more stories, cleaned up the code a bit, and fixed few bugs * loading using built in structures * typo and refactor loops * selectById logic optimization * search icon functionality and styles * updating keycode logic * removing extra keycode check and safari bug * selectChannelById await for items to load before set * adding error message text to custom font-color to facilitate dark mode * removing extra font color property Co-authored-by: Nikola Metulev <[email protected]> Co-authored-by: Nikola Metulev <[email protected]>
1 parent 868d6b4 commit c52898a

File tree

6 files changed

+1453
-1
lines changed

6 files changed

+1453
-1
lines changed

src/components/components.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import './mgt-people/mgt-people';
1313
import './mgt-person-card/mgt-person-card';
1414
import './mgt-person/mgt-person';
1515
import './mgt-tasks/mgt-tasks';
16+
import './mgt-teams-channel-picker/mgt-teams-channel-picker';
1617

1718
export * from './mgt-agenda/mgt-agenda';
1819
export * from './mgt-get/mgt-get';
@@ -22,6 +23,7 @@ export * from './mgt-people/mgt-people';
2223
export * from './mgt-person-card/mgt-person-card';
2324
export * from './mgt-person/mgt-person';
2425
export * from './mgt-tasks/mgt-tasks';
26+
export * from './mgt-teams-channel-picker/mgt-teams-channel-picker';
2527

2628
// Sub-Components, not for export!
2729
// export * from './sub-components/mgt-dot-options/mgt-dot-options';
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* -------------------------------------------------------------------------------------------
3+
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4+
* See License in the project root for license information.
5+
* -------------------------------------------------------------------------------------------
6+
*/
7+
8+
import { Team } from '@microsoft/microsoft-graph-types';
9+
import { IGraph } from '../../IGraph';
10+
import { prepScopes } from '../../utils/GraphHelpers';
11+
12+
/**
13+
* async promise, returns all Teams associated with the user logged in
14+
*
15+
* @returns {Promise<Team[]>}
16+
* @memberof Graph
17+
*/
18+
export async function getAllMyTeams(graph: IGraph): Promise<Team[]> {
19+
const teams = await graph
20+
.api('/me/joinedTeams')
21+
.middlewareOptions(prepScopes('User.Read.All'))
22+
.select(['displayName', 'id'])
23+
.get();
24+
return teams ? teams.value : null;
25+
}

0 commit comments

Comments
 (0)