diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 56441f9d37..e0dc5001b1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.1" + ".": "3.1.0" } \ No newline at end of file diff --git a/.storybook/addons/codeEditorAddon/codeAddon.js b/.storybook/addons/codeEditorAddon/codeAddon.js index f9a11c894e..c3db8125cb 100644 --- a/.storybook/addons/codeEditorAddon/codeAddon.js +++ b/.storybook/addons/codeEditorAddon/codeAddon.js @@ -70,8 +70,9 @@ export const withCodeEditor = makeDecorator({ skipIfNoParametersOrOptions: false, wrapper: (getStory, context, { options }) => { const forOptions = options ? options.disableThemeToggle : false; - const forContext = - context && (context.name === 'Custom CSS Properties' || context.title.toLowerCase().includes('templating')); + const title = + ['Custom CSS Properties', 'Theme'].includes(context.name) || context.title.toLowerCase().includes('templating'); + const forContext = context && title; const disableThemeToggle = forOptions || forContext; let story = getStory(context); diff --git a/.storybook/preview.js b/.storybook/preview.js index 9518088445..1731b26fd7 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -47,7 +47,12 @@ addParameters({ inlineStories: false, page: noArgsDocsPage }, - version: versionInfo + version: versionInfo, + options: { + storySort: { + order: ['stories'] + } + } }); const req = require.context('../stories', true, /\.(js|mdx)$/); diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a27c346c..a80b680b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [3.1.0](https://github.com/microsoftgraph/microsoft-graph-toolkit/compare/v3.0.1...v3.1.0) (2023-07-28) + + +### Features + +* add canary url to allowed endpoints for graph ([#2635](https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/2635)) ([ec621cd](https://github.com/microsoftgraph/microsoft-graph-toolkit/commit/ec621cd37a8eb7f91356944fb29ad85699ee89fa)) + + +### Bug Fixes + +* **a11y:** add distinct name definitions for copy code buttons in storybook overview ([#2622](https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/2622)) ([4e52f41](https://github.com/microsoftgraph/microsoft-graph-toolkit/commit/4e52f41398b1a5771ada9fe54a67dba4e4b84397)) +* add a title text if displaying images only. ([#2625](https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/2625)) ([28703c9](https://github.com/microsoftgraph/microsoft-graph-toolkit/commit/28703c96dd5366b8543fab2a160994db34a9c13b)) +* check the file type being uploaded before performing upload ([#2584](https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/2584)) ([7fb265c](https://github.com/microsoftgraph/microsoft-graph-toolkit/commit/7fb265c744cbbf53d49fe6d5c3d45bc8493eb2fd)) +* remove agenda tooltip ([#2621](https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/2621)) ([27e1fc9](https://github.com/microsoftgraph/microsoft-graph-toolkit/commit/27e1fc9c61e1957dd8addacb3b667de9546fb358)) + ## [3.0.1](https://github.com/microsoftgraph/microsoft-graph-toolkit/compare/v3.0.0...v3.0.1) (2023-07-18) diff --git a/package.json b/package.json index 856ce539c9..f461490819 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "root", "private": true, - "version": "3.0.1", + "version": "3.1.0", "workspaces": { "packages": [ "packages/*", diff --git a/packages/mgt-element/src/IGraph.ts b/packages/mgt-element/src/IGraph.ts index 30024dfaf3..ddb60065c4 100644 --- a/packages/mgt-element/src/IGraph.ts +++ b/packages/mgt-element/src/IGraph.ts @@ -75,12 +75,8 @@ export type GraphEndpoint = | 'https://graph.microsoft.us' | 'https://dod-graph.microsoft.us' | 'https://graph.microsoft.de' - | 'https://microsoftgraph.chinacloudapi.cn'; - -/** - * MICROSOFT_GRAPH_ENDPOINTS is a set of all the valid Graph URL endpoints. - */ -export const MICROSOFT_GRAPH_ENDPOINTS: Set = new Set(); + | 'https://microsoftgraph.chinacloudapi.cn' + | 'https://canary.graph.microsoft.com'; /** * MICROSOFT_GRAPH_DEFAULT_ENDPOINT is the default Graph endpoint that is silently set on @@ -88,13 +84,14 @@ export const MICROSOFT_GRAPH_ENDPOINTS: Set = new Set { - const endpoints: GraphEndpoint[] = [ - MICROSOFT_GRAPH_DEFAULT_ENDPOINT, - 'https://graph.microsoft.us', - 'https://dod-graph.microsoft.us', - 'https://graph.microsoft.de', - 'https://microsoftgraph.chinacloudapi.cn' - ]; - endpoints.forEach(endpoint => MICROSOFT_GRAPH_ENDPOINTS.add(endpoint)); -})(); +/** + * MICROSOFT_GRAPH_ENDPOINTS is a set of all the valid Graph URL endpoints. + */ +export const MICROSOFT_GRAPH_ENDPOINTS: Set = new Set([ + MICROSOFT_GRAPH_DEFAULT_ENDPOINT, + 'https://graph.microsoft.us', + 'https://dod-graph.microsoft.us', + 'https://graph.microsoft.de', + 'https://microsoftgraph.chinacloudapi.cn', + 'https://canary.graph.microsoft.com' +]); diff --git a/stories/components/agenda/agenda.a.js b/stories/components/agenda/agenda.stories.js similarity index 100% rename from stories/components/agenda/agenda.a.js rename to stories/components/agenda/agenda.stories.js diff --git a/stories/components/file/file.a.js b/stories/components/file/file.stories.js similarity index 100% rename from stories/components/file/file.a.js rename to stories/components/file/file.stories.js diff --git a/stories/components/fileList/fileList.a.js b/stories/components/fileList/fileList.stories.js similarity index 100% rename from stories/components/fileList/fileList.a.js rename to stories/components/fileList/fileList.stories.js diff --git a/stories/components/people/people.a.js b/stories/components/people/people.stories.js similarity index 100% rename from stories/components/people/people.a.js rename to stories/components/people/people.stories.js diff --git a/stories/components/peoplePicker/peoplePicker.a.js b/stories/components/peoplePicker/peoplePicker.stories.js similarity index 100% rename from stories/components/peoplePicker/peoplePicker.a.js rename to stories/components/peoplePicker/peoplePicker.stories.js diff --git a/stories/components/personCard/personCard.a.js b/stories/components/personCard/personCard.stories.js similarity index 100% rename from stories/components/personCard/personCard.a.js rename to stories/components/personCard/personCard.stories.js diff --git a/stories/components/preview/searchBox/searchBox.a.js b/stories/components/preview/searchBox/searchBox.stories.js similarity index 100% rename from stories/components/preview/searchBox/searchBox.a.js rename to stories/components/preview/searchBox/searchBox.stories.js diff --git a/stories/components/preview/searchResults/searchResults.a.js b/stories/components/preview/searchResults/searchResults.stories.js similarity index 100% rename from stories/components/preview/searchResults/searchResults.a.js rename to stories/components/preview/searchResults/searchResults.stories.js diff --git a/stories/components/teamsChannelPicker/teamsChannelPicker.a.js b/stories/components/teamsChannelPicker/teamsChannelPicker.stories.js similarity index 100% rename from stories/components/teamsChannelPicker/teamsChannelPicker.a.js rename to stories/components/teamsChannelPicker/teamsChannelPicker.stories.js diff --git a/stories/samples/general.stories.b.js b/stories/samples/general.stories.b.js deleted file mode 100644 index 59c139565a..0000000000 --- a/stories/samples/general.stories.b.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import { html } from 'lit'; -import { withCodeEditor } from '../../.storybook/addons/codeEditorAddon/codeAddon'; - -export default { - title: 'Samples / General', - decorators: [ - withCodeEditor({ - disableThemeToggle: true - }) - ], - parameters: { - viewMode: 'story' - } -}; - -export const theme = () => html` -
-

This demonstrates how to set the theme globally without using a theme toggle and customize styling within specific scopes

-

Please refer to the JS and CSS tabs in the editor for implentation details

- -

This picker shows the custom focus ring color

-
- -
-
-

I use the theme set on the body

- -
-

I am custom themed, take care to ensure that your customizations maintain accessibility standards

- -
- - -`; diff --git a/stories/samples/general.stories.a.js b/stories/samples/general.stories.js similarity index 75% rename from stories/samples/general.stories.a.js rename to stories/samples/general.stories.js index 15e8dbc007..86c011bd3c 100644 --- a/stories/samples/general.stories.a.js +++ b/stories/samples/general.stories.js @@ -172,3 +172,54 @@ clearCacheButton.addEventListener('click', onClearCacheButtonClick); // }; `; + +export const theme = () => html` +
+

This demonstrates how to set the theme globally without using a theme toggle and customize styling within specific scopes

+

Please refer to the JS and CSS tabs in the editor for implentation details

+ +

This picker shows the custom focus ring color

+
+ +
+
+

I use the theme set on the body

+ +
+

I am custom themed, take care to ensure that your customizations maintain accessibility standards

+ +
+ + +`;