mgwdev-m365-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/App.d.ts +3 -0
- package/dist/components/Test.d.ts +4 -0
- package/dist/components/index.d.ts +0 -0
- package/dist/context/AuthenticationContext.d.ts +13 -0
- package/dist/context/GraphContext.d.ts +11 -0
- package/dist/context/SPContext.d.ts +13 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/mwdev-m365-components.es.js +10570 -0
- package/dist/mwdev-m365-components.umd.js +57 -0
- package/dist/vite.svg +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
+
|
|
14
|
+
- Configure the top-level `parserOptions` property like this:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
export default {
|
|
18
|
+
// other rules...
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaVersion: 'latest',
|
|
21
|
+
sourceType: 'module',
|
|
22
|
+
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
23
|
+
tsconfigRootDir: __dirname,
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
29
|
+
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
30
|
+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
package/dist/App.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAuthenticationService, IMsalAuthenticationConfig } from "mgwdev-m365-helpers";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface IAuthenticationContextProps {
|
|
4
|
+
authProvider: IAuthenticationService;
|
|
5
|
+
}
|
|
6
|
+
export interface IAuthenticationContextProviderProps extends React.PropsWithChildren<{}> {
|
|
7
|
+
authProvider?: IAuthenticationService;
|
|
8
|
+
authProviderFactory?: () => Promise<IAuthenticationService>;
|
|
9
|
+
msalAuthConfig?: IMsalAuthenticationConfig;
|
|
10
|
+
}
|
|
11
|
+
export declare const AuthenticationContext: React.Context<IAuthenticationContextProps>;
|
|
12
|
+
export declare const useAuthentication: () => IAuthenticationContextProps;
|
|
13
|
+
export declare const AuthenticationContextProvider: (props: IAuthenticationContextProviderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { IHttpClient } from "mgwdev-m365-helpers";
|
|
3
|
+
export interface IGraphContextProps {
|
|
4
|
+
graphClient: IHttpClient;
|
|
5
|
+
}
|
|
6
|
+
export interface IGraphContextProviderProps extends React.PropsWithChildren<{}> {
|
|
7
|
+
graphClient?: IHttpClient;
|
|
8
|
+
}
|
|
9
|
+
export declare const GraphContext: React.Context<IGraphContextProps>;
|
|
10
|
+
export declare const useGraph: () => IGraphContextProps;
|
|
11
|
+
export declare const GraphContextProvider: (props: IGraphContextProviderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { IHttpClient } from "mgwdev-m365-helpers";
|
|
3
|
+
export interface ISPContextProps {
|
|
4
|
+
siteUrl: string;
|
|
5
|
+
spClient: IHttpClient;
|
|
6
|
+
}
|
|
7
|
+
export interface ISPContextProviderProps extends React.PropsWithChildren<{}> {
|
|
8
|
+
siteUrl: string;
|
|
9
|
+
spClient?: IHttpClient;
|
|
10
|
+
}
|
|
11
|
+
export declare const SPContext: React.Context<ISPContextProps>;
|
|
12
|
+
export declare const useSP: () => ISPContextProps;
|
|
13
|
+
export declare const SPContextProvider: (props: ISPContextProviderProps) => React.JSX.Element;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./context";
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|