mgwdev-m365-components 0.0.5 → 0.0.7
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 -30
- package/dist/components/common/ConditionalRenderComponent.d.ts +1 -1
- package/dist/components/common/graphEntityPicker/AbstractGraphEntityPicker.d.ts +1 -1
- package/dist/components/search/M365CopilotSearch.d.ts +15 -0
- package/dist/components/search/index.d.ts +1 -0
- package/dist/mwdev-m365-components.es.js +3015 -2814
- package/dist/mwdev-m365-components.umd.js +48 -48
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,30 +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
|
|
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
|
|
@@ -4,4 +4,4 @@ export interface IConditionalRenderComponentProps extends React.PropsWithChildre
|
|
|
4
4
|
initialRender?: boolean;
|
|
5
5
|
placeholder?: JSX.Element | string;
|
|
6
6
|
}
|
|
7
|
-
export declare function ConditionalRenderComponent(props: IConditionalRenderComponentProps):
|
|
7
|
+
export declare function ConditionalRenderComponent(props: IConditionalRenderComponentProps): React.JSX.Element;
|
|
@@ -13,4 +13,4 @@ export interface IAbstractGraphEntityPickerProps<T> {
|
|
|
13
13
|
onSuggestionRendering?: (entity: T) => React.ReactNode;
|
|
14
14
|
renderOverride?: (entities: T[], isLoading: boolean, loadData: (query?: string) => Promise<void>) => React.ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare function AbstractGraphEntityPicker<T extends IEntityWithIdAndDisplayName>(props: IAbstractGraphEntityPickerProps<T>):
|
|
16
|
+
export declare function AbstractGraphEntityPicker<T extends IEntityWithIdAndDisplayName>(props: IAbstractGraphEntityPickerProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { IGraphSearchResult } from "../../model";
|
|
3
|
+
export interface IM365CopilotSearchProps<T> {
|
|
4
|
+
onResultRendering?: (result: IGraphSearchResult<T>) => any;
|
|
5
|
+
dataProviderProps?: {
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
initialQuery?: string;
|
|
8
|
+
queryTemplate?: string;
|
|
9
|
+
selectFields?: string[];
|
|
10
|
+
};
|
|
11
|
+
searchInputComponent?: (props: {
|
|
12
|
+
onSearch: (query: string) => void;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export declare const M365CopilotSearch: <T>(props: IM365CopilotSearchProps<T>) => React.JSX.Element;
|