@microsoft/teamsfx-react 2.0.0-experimental.0 → 2.0.0

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.
Files changed (42) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -2
  3. package/build/{index.d.ts → cjs/index.d.ts} +4 -3
  4. package/build/cjs/index.d.ts.map +1 -0
  5. package/build/{index.js → cjs/index.js} +13 -11
  6. package/build/{useData.d.ts → cjs/useData.d.ts} +33 -33
  7. package/build/cjs/useData.d.ts.map +1 -0
  8. package/build/cjs/useData.js +47 -0
  9. package/build/{useGraph.d.ts → cjs/useGraph.d.ts} +18 -18
  10. package/build/cjs/useGraph.d.ts.map +1 -0
  11. package/build/cjs/useGraph.js +72 -0
  12. package/build/cjs/useTeams.d.ts +31 -0
  13. package/build/cjs/useTeams.d.ts.map +1 -0
  14. package/build/cjs/useTeams.js +82 -0
  15. package/build/{useTeamsFx.d.ts → cjs/useTeamsFx.d.ts} +41 -41
  16. package/build/cjs/useTeamsFx.d.ts.map +1 -0
  17. package/build/cjs/useTeamsFx.js +34 -0
  18. package/build/esm/index.d.ts +5 -0
  19. package/build/esm/index.d.ts.map +1 -0
  20. package/build/esm/index.js +6 -0
  21. package/build/esm/useData.d.ts +34 -0
  22. package/build/esm/useData.d.ts.map +1 -0
  23. package/build/esm/useData.js +43 -0
  24. package/build/esm/useGraph.d.ts +19 -0
  25. package/build/esm/useGraph.d.ts.map +1 -0
  26. package/build/esm/useGraph.js +68 -0
  27. package/build/esm/useTeams.d.ts +31 -0
  28. package/build/esm/useTeams.d.ts.map +1 -0
  29. package/build/esm/useTeams.js +78 -0
  30. package/build/esm/useTeamsFx.d.ts +42 -0
  31. package/build/esm/useTeamsFx.d.ts.map +1 -0
  32. package/build/esm/useTeamsFx.js +30 -0
  33. package/package.json +33 -19
  34. package/CHANGELOG.md +0 -4
  35. package/NOTICE.txt +0 -14833
  36. package/build/index.d.ts.map +0 -1
  37. package/build/useData.d.ts.map +0 -1
  38. package/build/useData.js +0 -45
  39. package/build/useGraph.d.ts.map +0 -1
  40. package/build/useGraph.js +0 -57
  41. package/build/useTeamsFx.d.ts.map +0 -1
  42. package/build/useTeamsFx.js +0 -30
@@ -0,0 +1,43 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useEffect, useReducer } from "react";
4
+ var createReducer = function () {
5
+ return function (state, action) {
6
+ switch (action.type) {
7
+ case "loading":
8
+ return { data: state.data, loading: true };
9
+ case "result":
10
+ return { data: action.result, loading: false };
11
+ case "error":
12
+ return { loading: false, error: action.error };
13
+ }
14
+ };
15
+ };
16
+ /**
17
+ * Helper function to fetch data with status and error.
18
+ *
19
+ * @param fetchDataAsync - async function of how to fetch data
20
+ * @param options - if autoLoad is true, reload data immediately
21
+ * @returns data, loading status, error and reload function
22
+ *
23
+ * @beta
24
+ */
25
+ export function useData(fetchDataAsync, options) {
26
+ var _a;
27
+ var auto = (_a = options === null || options === void 0 ? void 0 : options.autoLoad) !== null && _a !== void 0 ? _a : true;
28
+ var _b = useReducer(createReducer(), {
29
+ loading: auto,
30
+ }), _c = _b[0], data = _c.data, loading = _c.loading, error = _c.error, dispatch = _b[1];
31
+ function reload() {
32
+ if (!loading)
33
+ dispatch({ type: "loading" });
34
+ fetchDataAsync()
35
+ .then(function (data) { return dispatch({ type: "result", result: data }); })
36
+ .catch(function (error) { return dispatch({ type: "error", error: error }); });
37
+ }
38
+ useEffect(function () {
39
+ if (auto)
40
+ reload();
41
+ }, []);
42
+ return { data: data, loading: loading, error: error, reload: reload };
43
+ }
@@ -0,0 +1,19 @@
1
+ import { Data } from "./useData";
2
+ import { TeamsFx } from "@microsoft/teamsfx";
3
+ import { Client } from "@microsoft/microsoft-graph-client";
4
+ declare type GraphOption = {
5
+ scope?: string[];
6
+ teamsfx?: TeamsFx;
7
+ };
8
+ /**
9
+ * Helper function to call Microsoft Graph API with authentication.
10
+ *
11
+ * @param fetchGraphDataAsync - async function of how to call Graph API and fetch data.
12
+ * @param options - teamsfx instance and OAuth resource scope.
13
+ * @returns data, loading status, error and reload function
14
+ *
15
+ * @beta
16
+ */
17
+ export declare function useGraph<T>(fetchGraphDataAsync: (graph: Client, teamsfx: TeamsFx, scope: string[]) => Promise<T>, options?: GraphOption): Data<T>;
18
+ export {};
19
+ //# sourceMappingURL=useGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGraph.d.ts","sourceRoot":"","sources":["../../src/useGraph.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAA6C,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,MAAM,EAAc,MAAM,mCAAmC,CAAC;AAGvE,aAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EACrF,OAAO,CAAC,EAAE,WAAW,GACpB,IAAI,CAAC,CAAC,CAAC,CAkCT"}
@@ -0,0 +1,68 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { __assign, __awaiter, __generator } from "tslib";
4
+ import { useData } from "./useData";
5
+ import { TeamsFx, createMicrosoftGraphClient, ErrorWithCode } from "@microsoft/teamsfx";
6
+ import { GraphError } from "@microsoft/microsoft-graph-client";
7
+ import { useState } from "react";
8
+ /**
9
+ * Helper function to call Microsoft Graph API with authentication.
10
+ *
11
+ * @param fetchGraphDataAsync - async function of how to call Graph API and fetch data.
12
+ * @param options - teamsfx instance and OAuth resource scope.
13
+ * @returns data, loading status, error and reload function
14
+ *
15
+ * @beta
16
+ */
17
+ export function useGraph(fetchGraphDataAsync, options) {
18
+ var _this = this;
19
+ var _a = __assign({ scope: ["User.Read"], teamsfx: new TeamsFx() }, options), scope = _a.scope, teamsfx = _a.teamsfx;
20
+ var _b = useState(false), needConsent = _b[0], setNeedConsent = _b[1];
21
+ var _c = useData(function () { return __awaiter(_this, void 0, void 0, function () {
22
+ var err_1, helpLink, graph, graphData, err_2;
23
+ var _a, _b;
24
+ return __generator(this, function (_c) {
25
+ switch (_c.label) {
26
+ case 0:
27
+ if (!needConsent) return [3 /*break*/, 4];
28
+ _c.label = 1;
29
+ case 1:
30
+ _c.trys.push([1, 3, , 4]);
31
+ return [4 /*yield*/, teamsfx.login(scope)];
32
+ case 2:
33
+ _c.sent();
34
+ setNeedConsent(false);
35
+ return [3 /*break*/, 4];
36
+ case 3:
37
+ err_1 = _c.sent();
38
+ if (err_1 instanceof ErrorWithCode && ((_a = err_1.message) === null || _a === void 0 ? void 0 : _a.includes("CancelledByUser"))) {
39
+ helpLink = "https://aka.ms/teamsfx-auth-code-flow";
40
+ err_1.message +=
41
+ '\nIf you see "AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application" ' +
42
+ "in the popup window, you may be using unmatched version for TeamsFx SDK (version >= 0.5.0) and Teams Toolkit (version < 3.3.0) or " +
43
+ "cli (version < 0.11.0). Please refer to the help link for how to fix the issue: ".concat(helpLink);
44
+ }
45
+ throw err_1;
46
+ case 4:
47
+ _c.trys.push([4, 6, , 7]);
48
+ graph = createMicrosoftGraphClient(teamsfx, scope);
49
+ return [4 /*yield*/, fetchGraphDataAsync(graph, teamsfx, scope)];
50
+ case 5:
51
+ graphData = _c.sent();
52
+ return [2 /*return*/, graphData];
53
+ case 6:
54
+ err_2 = _c.sent();
55
+ if (err_2 instanceof GraphError && ((_b = err_2.code) === null || _b === void 0 ? void 0 : _b.includes("UiRequiredError"))) {
56
+ // Silently fail for user didn't consent error
57
+ setNeedConsent(true);
58
+ }
59
+ else {
60
+ throw err_2;
61
+ }
62
+ return [3 /*break*/, 7];
63
+ case 7: return [2 /*return*/];
64
+ }
65
+ });
66
+ }); }), data = _c.data, error = _c.error, loading = _c.loading, reload = _c.reload;
67
+ return { data: data, error: error, loading: loading, reload: reload };
68
+ }
@@ -0,0 +1,31 @@
1
+ import { app } from "@microsoft/teams-js";
2
+ import { ThemePrepared } from "@fluentui/react-northstar";
3
+ /**
4
+ * Microsoft Teams React hook
5
+ * @param options optional options
6
+ * @returns A tuple with properties and methods
7
+ * properties:
8
+ * - inTeams: boolean = true if inside Microsoft Teams
9
+ * - fullscreen: boolean = true if in full screen mode
10
+ * - theme: Fluent UI Theme
11
+ * - themeString: string - representation of the theme (default, dark or contrast)
12
+ * - context - the Microsoft Teams JS SDK context
13
+ * methods:
14
+ * - setTheme - manually set the theme
15
+ */
16
+ export declare function useTeams(options?: {
17
+ initialTheme?: string;
18
+ setThemeHandler?: (theme?: string) => void;
19
+ }): [
20
+ {
21
+ inTeams?: boolean;
22
+ fullScreen?: boolean;
23
+ theme: ThemePrepared;
24
+ themeString: string;
25
+ context?: app.Context;
26
+ },
27
+ {
28
+ setTheme: (theme: string | undefined) => void;
29
+ }
30
+ ];
31
+ //# sourceMappingURL=useTeams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTeams.d.ts","sourceRoot":"","sources":["../../src/useTeams.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAS,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAIL,aAAa,EACd,MAAM,2BAA2B,CAAC;AAQnC;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,GAAG;IACF;QACE,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,KAAK,EAAE,aAAa,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;KACvB;IACD;QACE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;KAC/C;CACF,CA4DA"}
@@ -0,0 +1,78 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useEffect, useState } from "react";
4
+ import { unstable_batchedUpdates as batchedUpdates } from "react-dom";
5
+ import { app, pages } from "@microsoft/teams-js";
6
+ import { teamsDarkTheme, teamsHighContrastTheme, teamsTheme, } from "@fluentui/react-northstar";
7
+ var getTheme = function () {
8
+ var urlParams = new URLSearchParams(window.location.search);
9
+ var theme = urlParams.get("theme");
10
+ return theme == null ? undefined : theme;
11
+ };
12
+ /**
13
+ * Microsoft Teams React hook
14
+ * @param options optional options
15
+ * @returns A tuple with properties and methods
16
+ * properties:
17
+ * - inTeams: boolean = true if inside Microsoft Teams
18
+ * - fullscreen: boolean = true if in full screen mode
19
+ * - theme: Fluent UI Theme
20
+ * - themeString: string - representation of the theme (default, dark or contrast)
21
+ * - context - the Microsoft Teams JS SDK context
22
+ * methods:
23
+ * - setTheme - manually set the theme
24
+ */
25
+ export function useTeams(options) {
26
+ var _a = useState(undefined), inTeams = _a[0], setInTeams = _a[1];
27
+ var _b = useState(undefined), fullScreen = _b[0], setFullScreen = _b[1];
28
+ var _c = useState(teamsTheme), theme = _c[0], setTheme = _c[1];
29
+ var _d = useState("default"), themeString = _d[0], setThemeString = _d[1];
30
+ var initialTheme = useState(options && options.initialTheme ? options.initialTheme : getTheme())[0];
31
+ var _e = useState(undefined), context = _e[0], setContext = _e[1];
32
+ var themeChangeHandler = function (theme) {
33
+ setThemeString(theme || "default");
34
+ switch (theme) {
35
+ case "dark":
36
+ setTheme(teamsDarkTheme);
37
+ break;
38
+ case "contrast":
39
+ setTheme(teamsHighContrastTheme);
40
+ break;
41
+ case "default":
42
+ default:
43
+ setTheme(teamsTheme);
44
+ }
45
+ };
46
+ var overrideThemeHandler = (options === null || options === void 0 ? void 0 : options.setThemeHandler)
47
+ ? options.setThemeHandler
48
+ : themeChangeHandler;
49
+ useEffect(function () {
50
+ // set initial theme based on options or query string
51
+ overrideThemeHandler(initialTheme);
52
+ app
53
+ .initialize()
54
+ .then(function () {
55
+ app
56
+ .getContext()
57
+ .then(function (context) {
58
+ batchedUpdates(function () {
59
+ setInTeams(true);
60
+ setContext(context);
61
+ setFullScreen(context.page.isFullScreen);
62
+ });
63
+ overrideThemeHandler(context.app.theme);
64
+ app.registerOnThemeChangeHandler(overrideThemeHandler);
65
+ pages.registerFullScreenHandler(function (isFullScreen) {
66
+ setFullScreen(isFullScreen);
67
+ });
68
+ })
69
+ .catch(function () {
70
+ setInTeams(false);
71
+ });
72
+ })
73
+ .catch(function () {
74
+ setInTeams(false);
75
+ });
76
+ }, []);
77
+ return [{ inTeams: inTeams, fullScreen: fullScreen, theme: theme, context: context, themeString: themeString }, { setTheme: overrideThemeHandler }];
78
+ }
@@ -0,0 +1,42 @@
1
+ import { TeamsFx } from "@microsoft/teamsfx";
2
+ import { ThemePrepared } from "@fluentui/react-northstar";
3
+ export declare type TeamsFxContext = {
4
+ /**
5
+ * Instance of TeamsFx.
6
+ */
7
+ teamsfx?: TeamsFx;
8
+ /**
9
+ * Status of data loading.
10
+ */
11
+ loading: boolean;
12
+ /**
13
+ * Error information.
14
+ */
15
+ error: unknown;
16
+ /**
17
+ * Indicates that current environment is in Teams
18
+ */
19
+ inTeams?: boolean;
20
+ /**
21
+ * Teams theme.
22
+ */
23
+ theme: ThemePrepared;
24
+ /**
25
+ * Teams theme string.
26
+ */
27
+ themeString: string;
28
+ /**
29
+ * Teams context object.
30
+ */
31
+ context?: any;
32
+ };
33
+ /**
34
+ * Initialize TeamsFx SDK with customized configuration.
35
+ *
36
+ * @param teamsfxConfig - custom configuration to override default ones.
37
+ * @returns TeamsFxContext object
38
+ *
39
+ * @beta
40
+ */
41
+ export declare function useTeamsFx(teamsfxConfig?: Record<string, string>): TeamsFxContext;
42
+ //# sourceMappingURL=useTeamsFx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTeamsFx.d.ts","sourceRoot":"","sources":["../../src/useTeamsFx.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,OAAO,EAAgB,MAAM,oBAAoB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IAEH,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,cAAc,CAYjF"}
@@ -0,0 +1,30 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { __assign, __awaiter, __generator } from "tslib";
4
+ import { LogLevel, setLogLevel, setLogFunction, TeamsFx, IdentityType } from "@microsoft/teamsfx";
5
+ import { useTeams } from "./useTeams";
6
+ import { useData } from "./useData";
7
+ /**
8
+ * Initialize TeamsFx SDK with customized configuration.
9
+ *
10
+ * @param teamsfxConfig - custom configuration to override default ones.
11
+ * @returns TeamsFxContext object
12
+ *
13
+ * @beta
14
+ */
15
+ export function useTeamsFx(teamsfxConfig) {
16
+ var _this = this;
17
+ var result = useTeams({})[0];
18
+ var _a = useData(function () { return __awaiter(_this, void 0, void 0, function () {
19
+ return __generator(this, function (_a) {
20
+ if (process.env.NODE_ENV === "development") {
21
+ setLogLevel(LogLevel.Verbose);
22
+ setLogFunction(function (level, message) {
23
+ console.log(message);
24
+ });
25
+ }
26
+ return [2 /*return*/, new TeamsFx(IdentityType.User, teamsfxConfig)];
27
+ });
28
+ }); }), data = _a.data, error = _a.error, loading = _a.loading;
29
+ return __assign({ teamsfx: data, error: error, loading: loading }, result);
30
+ }
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@microsoft/teamsfx-react",
3
- "version": "2.0.0-experimental.0",
3
+ "version": "2.0.0",
4
4
  "description": "React helper functions for Microsoft TeamsFx",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
5
+ "main": "build/cjs/index.js",
6
+ "module": "build/esm/index.js",
7
+ "types": "build/cjs/index.d.ts",
8
+ "sideEffects": false,
7
9
  "license": "MIT",
8
10
  "keywords": [
9
11
  "teamsfx",
@@ -15,11 +17,11 @@
15
17
  "build/**/*"
16
18
  ],
17
19
  "scripts": {
18
- "build": "rimraf build && npx tsc -p ./",
20
+ "build": "rimraf build && npx tsc -p tsconfig.json && npx tsc -p tsconfig.es.json",
19
21
  "lint:staged": "lint-staged",
20
22
  "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
21
23
  "test": "npm run test:unit",
22
- "test:unit": "nyc mocha --no-timeouts --require init.js --require ts-node/register test/**/*.test.ts",
24
+ "test:unit": "jest --ci --reporters=jest-junit --reporters=default --coverage --coverageDirectory='coverage' --collectCoverageFrom='src/*.{ts,tsx,js}'",
23
25
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
24
26
  "format-check": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
25
27
  "check-sensitive": "npx eslint --plugin 'no-secrets' --cache --ignore-pattern 'package.json' --ignore-pattern 'package-lock.json'",
@@ -29,39 +31,50 @@
29
31
  "@fluentui/react-northstar": "^0.62.0",
30
32
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
31
33
  "@microsoft/microsoft-graph-client": "^3.0.1",
32
- "@microsoft/teams-js": "^2.0.0-experimental.0",
33
- "@microsoft/teamsfx": "^2.0.0-experimental.0",
34
+ "@microsoft/teams-js": "^2.0.0",
35
+ "@microsoft/teamsfx": "^2.0.0",
36
+ "@testing-library/react": "^12.1.1",
34
37
  "@testing-library/react-hooks": "^7.0.2",
35
- "@types/chai": "^4.3.0",
36
- "@types/mocha": "^9.1.0",
38
+ "@types/enzyme": "^3.10.10",
39
+ "@types/jest": "^27.0.2",
37
40
  "@types/react": "^16.8.0",
38
41
  "@types/react-dom": "^16.8.0",
39
- "@types/sinon": "^10.0.11",
40
42
  "@typescript-eslint/eslint-plugin": "^5.13.0",
41
43
  "@typescript-eslint/parser": "^5.13.0",
42
- "chai": "^4.3.6",
43
- "eslint": "^7.32.0",
44
+ "eslint": "^8.15.0",
45
+ "eslint-config-standard": "^17.0.0",
44
46
  "eslint-plugin-import": "^2.25.4",
47
+ "eslint-plugin-jest": "^26.1.0",
48
+ "eslint-plugin-n": "^15.2.0",
45
49
  "eslint-plugin-no-secrets": "^0.8.9",
46
50
  "eslint-plugin-prettier": "^4.0.0",
51
+ "eslint-plugin-promise": "^6.0.0",
52
+ "eslint-plugin-react": "^7.26.0",
53
+ "eslint-plugin-react-hooks": "^4.2.0",
47
54
  "isomorphic-fetch": "^3.0.0",
55
+ "jest": "^28.1.0",
56
+ "jest-environment-jsdom": "^28.1.0",
57
+ "jest-junit": "^13.0.0",
58
+ "jwt-decode": "^3.1.2",
48
59
  "lint-staged": "^12.3.4",
49
- "mocha": "^9.2.1",
50
- "msteams-react-base-component": "^4.0.1",
60
+ "mocha": "^10.0.0",
51
61
  "nyc": "^15.1.0",
52
62
  "prettier": "^2.5.1",
53
63
  "react": "^16.9.0",
54
64
  "react-dom": "^16.9.0",
55
65
  "react-test-renderer": "^16.9.0",
56
66
  "rimraf": "^3.0.2",
57
- "sinon": "^13.0.1"
67
+ "scheduler": "^0.20.2",
68
+ "ts-jest": "^28.0.2",
69
+ "typescript": "latest"
58
70
  },
59
71
  "peerDependencies": {
60
72
  "@fluentui/react-northstar": "^0.62.0",
61
73
  "@microsoft/microsoft-graph-client": "^3.0.1",
62
- "@microsoft/teamsfx": "^2.0.0-experimental.0",
63
- "msteams-react-base-component": "^4.0.1",
64
- "react": "^16.8.6"
74
+ "@microsoft/teams-js": "^2.0.0",
75
+ "@microsoft/teamsfx": ">2.0.0-alpha",
76
+ "react": "^16.8.6",
77
+ "react-dom": "^16.8.6"
65
78
  },
66
79
  "publishConfig": {
67
80
  "access": "public"
@@ -70,5 +83,6 @@
70
83
  "*.{js,jsx,css,ts,tsx}": [
71
84
  "npx eslint --cache --fix --quiet"
72
85
  ]
73
- }
86
+ },
87
+ "gitHead": "63334564aa58f1673aa4dd2352fdd8dc47d6cc75"
74
88
  }
package/CHANGELOG.md DELETED
@@ -1,4 +0,0 @@
1
- # 0.1.0
2
- Initial release of the SDK for React Hook.
3
-
4
- - Add 3 React Hook functions: useTeamsFx, useGraph and useData