From 9088b11c5d0d23734f26197d990f84d3e5d3bcd7 Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Thu, 7 Dec 2023 23:28:38 +0000 Subject: [PATCH] Added Teams Virtual Events --- samples/react-teams-my-webinars/.eslintrc.js | 352 ++++++++++++++++++ samples/react-teams-my-webinars/.gitignore | 35 ++ samples/react-teams-my-webinars/.npmignore | 16 + samples/react-teams-my-webinars/.yo-rc.json | 21 ++ samples/react-teams-my-webinars/README.md | 73 ++++ .../config/config.json | 19 + .../config/deploy-azure-storage.json | 7 + .../config/package-solution.json | 75 ++++ .../react-teams-my-webinars/config/sass.json | 3 + .../react-teams-my-webinars/config/serve.json | 6 + .../config/write-manifests.json | 4 + samples/react-teams-my-webinars/gulpfile.js | 16 + samples/react-teams-my-webinars/package.json | 47 +++ samples/react-teams-my-webinars/src/index.ts | 1 + .../MyTeamsVirtualEventsWebPart.manifest.json | 27 ++ .../MyTeamsVirtualEventsWebPart.ts | 71 ++++ .../components/IMyTeamsVirtualEventsProps.ts | 5 + .../MyTeamsVirtualEvents.module.scss | 34 ++ .../components/MyTeamsVirualEvents.tsx | 159 ++++++++ .../components/RegistrantCounts.tsx | 59 +++ .../myTeamsVirtualEvents/components/Sync.tsx | 156 ++++++++ .../components/TeamApprove.tsx | 154 ++++++++ .../myTeamsVirtualEvents/components/Teams.tsx | 58 +++ .../myTeamsVirtualEvents/loc/en-us.js | 42 +++ .../myTeamsVirtualEvents/loc/mystrings.d.ts | 45 +++ ...5509-1d36-4279-bde0-324e258040b2_color.png | Bin 0 -> 10248 bytes ...09-1d36-4279-bde0-324e258040b2_outline.png | Bin 0 -> 249 bytes samples/react-teams-my-webinars/tsconfig.json | 35 ++ 28 files changed, 1520 insertions(+) create mode 100644 samples/react-teams-my-webinars/.eslintrc.js create mode 100644 samples/react-teams-my-webinars/.gitignore create mode 100644 samples/react-teams-my-webinars/.npmignore create mode 100644 samples/react-teams-my-webinars/.yo-rc.json create mode 100644 samples/react-teams-my-webinars/README.md create mode 100644 samples/react-teams-my-webinars/config/config.json create mode 100644 samples/react-teams-my-webinars/config/deploy-azure-storage.json create mode 100644 samples/react-teams-my-webinars/config/package-solution.json create mode 100644 samples/react-teams-my-webinars/config/sass.json create mode 100644 samples/react-teams-my-webinars/config/serve.json create mode 100644 samples/react-teams-my-webinars/config/write-manifests.json create mode 100644 samples/react-teams-my-webinars/gulpfile.js create mode 100644 samples/react-teams-my-webinars/package.json create mode 100644 samples/react-teams-my-webinars/src/index.ts create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.manifest.json create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.ts create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/IMyTeamsVirtualEventsProps.ts create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirtualEvents.module.scss create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirualEvents.tsx create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/RegistrantCounts.tsx create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Sync.tsx create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/TeamApprove.tsx create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Teams.tsx create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/en-us.js create mode 100644 samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/mystrings.d.ts create mode 100644 samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_color.png create mode 100644 samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_outline.png create mode 100644 samples/react-teams-my-webinars/tsconfig.json diff --git a/samples/react-teams-my-webinars/.eslintrc.js b/samples/react-teams-my-webinars/.eslintrc.js new file mode 100644 index 000000000..473df80cd --- /dev/null +++ b/samples/react-teams-my-webinars/.eslintrc.js @@ -0,0 +1,352 @@ +require('@rushstack/eslint-config/patch/modern-module-resolution'); +module.exports = { + extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'], + parserOptions: { tsconfigRootDir: __dirname }, + overrides: [ + { + files: ['*.ts', '*.tsx'], + parser: '@typescript-eslint/parser', + 'parserOptions': { + 'project': './tsconfig.json', + 'ecmaVersion': 2018, + 'sourceType': 'module' + }, + rules: { + // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin + '@rushstack/no-new-null': 1, + // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin + '@rushstack/hoist-jest-mock': 1, + // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security + '@rushstack/security/no-unsafe-regexp': 1, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/adjacent-overload-signatures': 1, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // + // CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol + '@typescript-eslint/ban-types': [ + 1, + { + 'extendDefaults': false, + 'types': { + 'String': { + 'message': 'Use \'string\' instead', + 'fixWith': 'string' + }, + 'Boolean': { + 'message': 'Use \'boolean\' instead', + 'fixWith': 'boolean' + }, + 'Number': { + 'message': 'Use \'number\' instead', + 'fixWith': 'number' + }, + 'Object': { + 'message': 'Use \'object\' instead, or else define a proper TypeScript type:' + }, + 'Symbol': { + 'message': 'Use \'symbol\' instead', + 'fixWith': 'symbol' + }, + 'Function': { + 'message': 'The \'Function\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.' + } + } + } + ], + // RATIONALE: Code is more readable when the type of every variable is immediately obvious. + // Even if the compiler may be able to infer a type, this inference will be unavailable + // to a person who is reviewing a GitHub diff. This rule makes writing code harder, + // but writing code is a much less important activity than reading it. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/explicit-function-return-type': [ + 1, + { + 'allowExpressions': true, + 'allowTypedFunctionExpressions': true, + 'allowHigherOrderFunctions': false + } + ], + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style. + // Set to 1 (warning) or 2 (error) to enable. + '@typescript-eslint/explicit-member-accessibility': 0, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/no-array-constructor': 1, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // + // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript. + // This rule should be suppressed only in very special cases such as JSON.stringify() + // where the type really can be anything. Even if the type is flexible, another type + // may be more appropriate such as "unknown", "{}", or "Record". + '@typescript-eslint/no-explicit-any': 1, + // RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch() + // handler. Thus wherever a Promise arises, the code must either append a catch handler, + // or else return the object to a caller (who assumes this responsibility). Unterminated + // promise chains are a serious issue. Besides causing errors to be silently ignored, + // they can also cause a NodeJS process to terminate unexpectedly. + '@typescript-eslint/no-floating-promises': 2, + // RATIONALE: Catches a common coding mistake. + '@typescript-eslint/no-for-in-array': 2, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/no-misused-new': 2, + // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks + // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler + // optimizations. If you are declaring loose functions/variables, it's better to make them + // static members of a class, since classes support property getters and their private + // members are accessible by unit tests. Also, the exercise of choosing a meaningful + // class name tends to produce more discoverable APIs: for example, search+replacing + // the function "reverse()" is likely to return many false matches, whereas if we always + // write "Text.reverse()" is more unique. For large scale organization, it's recommended + // to decompose your code into separate NPM packages, which ensures that component + // dependencies are tracked more conscientiously. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/no-namespace': [ + 1, + { + 'allowDeclarations': false, + 'allowDefinitionFiles': false + } + ], + // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)" + // that avoids the effort of declaring "title" as a field. This TypeScript feature makes + // code easier to write, but arguably sacrifices readability: In the notes for + // "@typescript-eslint/member-ordering" we pointed out that fields are central to + // a class's design, so we wouldn't want to bury them in a constructor signature + // just to save some typing. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // Set to 1 (warning) or 2 (error) to enable the rule + '@typescript-eslint/parameter-properties': 0, + // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code + // may impact performance. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/no-unused-vars': [ + 1, + { + 'vars': 'all', + // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code, + // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures + // that are overriding a base class method or implementing an interface. + 'args': 'none' + } + ], + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/no-use-before-define': [ + 2, + { + 'functions': false, + 'classes': true, + 'variables': true, + 'enums': true, + 'typedefs': true + } + ], + // Disallows require statements except in import statements. + // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports. + '@typescript-eslint/no-var-requires': 'error', + // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + '@typescript-eslint/prefer-namespace-keyword': 1, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // Rationale to disable: it's up to developer to decide if he wants to add type annotations + // Set to 1 (warning) or 2 (error) to enable the rule + '@typescript-eslint/no-inferrable-types': 0, + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios + '@typescript-eslint/no-empty-interface': 0, + // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake. + 'accessor-pairs': 1, + // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking. + 'dot-notation': [ + 1, + { + 'allowPattern': '^_' + } + ], + // RATIONALE: Catches code that is likely to be incorrect + 'eqeqeq': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'for-direction': 1, + // RATIONALE: Catches a common coding mistake. + 'guard-for-in': 2, + // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time + // to split up your code. + 'max-lines': ['warn', { max: 2000 }], + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-async-promise-executor': 2, + // RATIONALE: Deprecated language feature. + 'no-caller': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-compare-neg-zero': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-cond-assign': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-constant-condition': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-control-regex': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-debugger': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-delete-var': 2, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-duplicate-case': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-empty': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-empty-character-class': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-empty-pattern': 1, + // RATIONALE: Eval is a security concern and a performance concern. + 'no-eval': 1, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-ex-assign': 2, + // RATIONALE: System types are global and should not be tampered with in a scalable code base. + // If two different libraries (or two versions of the same library) both try to modify + // a type, only one of them can win. Polyfills are acceptable because they implement + // a standardized interoperable contract, but polyfills are generally coded in plain + // JavaScript. + 'no-extend-native': 1, + // Disallow unnecessary labels + 'no-extra-label': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-fallthrough': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-func-assign': 1, + // RATIONALE: Catches a common coding mistake. + 'no-implied-eval': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-invalid-regexp': 2, + // RATIONALE: Catches a common coding mistake. + 'no-label-var': 2, + // RATIONALE: Eliminates redundant code. + 'no-lone-blocks': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-misleading-character-class': 2, + // RATIONALE: Catches a common coding mistake. + 'no-multi-str': 2, + // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to + // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()", + // or else implies that the constructor is doing nontrivial computations, which is often + // a poor class design. + 'no-new': 1, + // RATIONALE: Obsolete language feature that is deprecated. + 'no-new-func': 2, + // RATIONALE: Obsolete language feature that is deprecated. + 'no-new-object': 2, + // RATIONALE: Obsolete notation. + 'no-new-wrappers': 1, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-octal': 2, + // RATIONALE: Catches code that is likely to be incorrect + 'no-octal-escape': 2, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-regex-spaces': 2, + // RATIONALE: Catches a common coding mistake. + 'no-return-assign': 2, + // RATIONALE: Security risk. + 'no-script-url': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-self-assign': 2, + // RATIONALE: Catches a common coding mistake. + 'no-self-compare': 2, + // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use + // commas to create compound expressions. In general code is more readable if each + // step is split onto a separate line. This also makes it easier to set breakpoints + // in the debugger. + 'no-sequences': 1, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-shadow-restricted-names': 2, + // RATIONALE: Obsolete language feature that is deprecated. + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-sparse-arrays': 2, + // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception, + // such flexibility adds pointless complexity, by requiring every catch block to test + // the type of the object that it receives. Whereas if catch blocks can always assume + // that their object implements the "Error" contract, then the code is simpler, and + // we generally get useful additional information like a call stack. + 'no-throw-literal': 2, + // RATIONALE: Catches a common coding mistake. + 'no-unmodified-loop-condition': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-unsafe-finally': 2, + // RATIONALE: Catches a common coding mistake. + 'no-unused-expressions': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-unused-labels': 1, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-useless-catch': 1, + // RATIONALE: Avoids a potential performance problem. + 'no-useless-concat': 1, + // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior. + // Always use "let" or "const" instead. + // + // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json + 'no-var': 2, + // RATIONALE: Generally not needed in modern code. + 'no-void': 1, + // RATIONALE: Obsolete language feature that is deprecated. + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'no-with': 2, + // RATIONALE: Makes logic easier to understand, since constants always have a known value + // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js + 'prefer-const': 1, + // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. + 'promise/param-names': 2, + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'require-atomic-updates': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'require-yield': 1, + // "Use strict" is redundant when using the TypeScript compiler. + 'strict': [ + 2, + 'never' + ], + // RATIONALE: Catches code that is likely to be incorrect + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + 'use-isnan': 2, + // STANDARDIZED BY: eslint\conf\eslint-recommended.js + // Set to 1 (warning) or 2 (error) to enable. + // Rationale to disable: !!{} + 'no-extra-boolean-cast': 0, + // ==================================================================== + // @microsoft/eslint-plugin-spfx + // ==================================================================== + '@microsoft/spfx/import-requires-chunk-name': 1, + '@microsoft/spfx/no-require-ensure': 2, + '@microsoft/spfx/pair-react-dom-render-unmount': 1 + } + }, + { + // For unit tests, we can be a little bit less strict. The settings below revise the + // defaults specified in the extended configurations, as well as above. + files: [ + // Test files + '*.test.ts', + '*.test.tsx', + '*.spec.ts', + '*.spec.tsx', + + // Facebook convention + '**/__mocks__/*.ts', + '**/__mocks__/*.tsx', + '**/__tests__/*.ts', + '**/__tests__/*.tsx', + + // Microsoft convention + '**/test/*.ts', + '**/test/*.tsx' + ], + rules: {} + } + ] +}; \ No newline at end of file diff --git a/samples/react-teams-my-webinars/.gitignore b/samples/react-teams-my-webinars/.gitignore new file mode 100644 index 000000000..24f740831 --- /dev/null +++ b/samples/react-teams-my-webinars/.gitignore @@ -0,0 +1,35 @@ +# Logs +logs +*.log +npm-debug.log* + +# Dependency directories +node_modules + +# Build generated files +dist +lib +release +solution +temp +*.sppkg +.heft + +# Coverage directory used by tools like istanbul +coverage + +# OSX +.DS_Store + +# Visual Studio files +.ntvs_analysis.dat +.vs +bin +obj + +# Resx Generated Code +*.resx.ts + +# Styles Generated Code +*.scss.ts +package-lock.json \ No newline at end of file diff --git a/samples/react-teams-my-webinars/.npmignore b/samples/react-teams-my-webinars/.npmignore new file mode 100644 index 000000000..ae0b487c0 --- /dev/null +++ b/samples/react-teams-my-webinars/.npmignore @@ -0,0 +1,16 @@ +!dist +config + +gulpfile.js + +release +src +temp + +tsconfig.json +tslint.json + +*.log + +.yo-rc.json +.vscode diff --git a/samples/react-teams-my-webinars/.yo-rc.json b/samples/react-teams-my-webinars/.yo-rc.json new file mode 100644 index 000000000..8a73b656c --- /dev/null +++ b/samples/react-teams-my-webinars/.yo-rc.json @@ -0,0 +1,21 @@ +{ + "@microsoft/generator-sharepoint": { + "plusBeta": false, + "isCreatingSolution": true, + "nodeVersion": "18.18.2", + "sdksVersions": { + "@microsoft/microsoft-graph-client": "3.0.2", + "@microsoft/teams-js": "2.12.0" + }, + "version": "1.18.1", + "libraryName": "teams-virtual-events", + "libraryId": "38997de3-1140-4a1b-b50d-fe43cd8c1404", + "environment": "spo", + "packageManager": "npm", + "solutionName": "Teams Virtual Events", + "solutionShortDescription": "Teams Virtual Events description", + "skipFeatureDeployment": true, + "isDomainIsolated": false, + "componentType": "webpart" + } +} diff --git a/samples/react-teams-my-webinars/README.md b/samples/react-teams-my-webinars/README.md new file mode 100644 index 000000000..bd74ef6b4 --- /dev/null +++ b/samples/react-teams-my-webinars/README.md @@ -0,0 +1,73 @@ +# teams-virtual-events + +## Summary + +Short summary on functionality and used technologies. + +[picture of the solution in action, if possible] + +## Used SharePoint Framework Version + +![version](https://img.shields.io/badge/version-1.18.0-green.svg) + +## Applies to + +- [SharePoint Framework](https://aka.ms/spfx) +- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) + +> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram) + +## Prerequisites + +> Any special pre-requisites? + +## Solution + +| Solution | Author(s) | +| ----------- | ------------------------------------------------------- | +| folder name | Author details (name, company, twitter alias with link) | + +## Version history + +| Version | Date | Comments | +| ------- | ---------------- | --------------- | +| 1.1 | March 10, 2021 | Update comment | +| 1.0 | January 29, 2021 | Initial release | + +## Disclaimer + +**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** + +--- + +## Minimal Path to Awesome + +- Clone this repository +- Ensure that you are at the solution folder +- in the command-line run: + - **npm install** + - **gulp serve** + +> Include any additional steps as needed. + +## Features + +Description of the extension that expands upon high-level summary above. + +This extension illustrates the following concepts: + +- topic 1 +- topic 2 +- topic 3 + +> Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance. + +> Share your web part with others through Microsoft 365 Patterns and Practices program to get visibility and exposure. More details on the community, open-source projects and other activities from http://aka.ms/m365pnp. + +## References + +- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) +- [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview) +- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis) +- [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview) +- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development diff --git a/samples/react-teams-my-webinars/config/config.json b/samples/react-teams-my-webinars/config/config.json new file mode 100644 index 000000000..784116166 --- /dev/null +++ b/samples/react-teams-my-webinars/config/config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", + "version": "2.0", + "bundles": { + "my-teams-virual-events-web-part": { + "components": [ + { + "entrypoint": "./lib/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.js", + "manifest": "./src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.manifest.json" + } + ] + } + }, + "externals": {}, + "localizedResources": { + "MyTeamsVirtualEventsWebPartStrings": "lib/webparts/myTeamsVirtualEvents/loc/{locale}.js", + "ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js" + } +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/config/deploy-azure-storage.json b/samples/react-teams-my-webinars/config/deploy-azure-storage.json new file mode 100644 index 000000000..0ac140e64 --- /dev/null +++ b/samples/react-teams-my-webinars/config/deploy-azure-storage.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", + "workingDir": "./release/assets/", + "account": "", + "container": "teams-virtual-events", + "accessKey": "" +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/config/package-solution.json b/samples/react-teams-my-webinars/config/package-solution.json new file mode 100644 index 000000000..c80a1e2f5 --- /dev/null +++ b/samples/react-teams-my-webinars/config/package-solution.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", + "solution": { + "name": "Teams Webinars Virtual Events", + "id": "633573bf-ea82-4607-a64c-ff68856efe2c", + "title": "Teams Webinars Virtual Events", + "version": "1.0.0.0", + "includeClientSideAssets": true, + "skipFeatureDeployment": true, + "isDomainIsolated": false, + "webApiPermissionRequests": [ + { + "resource": "Microsoft Graph", + "scope": "VirtualEvent.Read" + }, + { + "resource": "Microsoft Graph", + "scope": "Team.ReadBasic.All" + }, + { + "resource": "Microsoft Graph", + "scope": "Sites.ReadWrite.All" + }, + { + "resource": "Microsoft Graph", + "scope": "OnlineMeetings.ReadWrite" + }, + { + "resource": "Microsoft Graph", + "scope": "GroupMember.Read.All" + } + ], + "developer": { + "name": "Nick Brown", + "websiteUrl": "https://nbdev.uk", + "privacyUrl": "", + "termsOfUseUrl": "", + "mpnId": "Undefined-1.18.2" + }, + "metadata": { + "shortDescription": { + "default": "Teams Webinars Virtual Events description" + }, + "longDescription": { + "default": "Displays a list of your up coming Webinars, allows you to auto approve registrants based on an Entra group or sync them to a SharePoint list" + }, + "screenshotPaths": [], + "videoUrl": "", + "categories": [] + }, + "features": [ + { + "title": "List My Teams Webinars", + "description": "Displays a list of Webinars you have organized or are organizing", + "id": "acfa9985-28d2-42ab-bf26-d0afc29cb6d3", + "version": "1.0.0.0" + }, + { + "title": "Sync Webinars to a SharePoint List", + "description": "Based on selected webinars Sync those into a SharePoint list for showing in a Team", + "id": "26e47f10-6862-4af8-9ef3-8c557b4c871f", + "version": "1.0.0.0" + }, + { + "title": "Approve pending registrants based on group membership", + "description": "Go though pending registrants and approve them based on an Entra Group membership", + "id": "6714ae2f-9d6a-429d-a23d-fc4ee575fef6", + "version": "1.0.0.0" + } + ] + }, + "paths": { + "zippedPackage": "solution/teams-virtual-events.sppkg" + } +} diff --git a/samples/react-teams-my-webinars/config/sass.json b/samples/react-teams-my-webinars/config/sass.json new file mode 100644 index 000000000..5e78c982d --- /dev/null +++ b/samples/react-teams-my-webinars/config/sass.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json" +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/config/serve.json b/samples/react-teams-my-webinars/config/serve.json new file mode 100644 index 000000000..a4c03e287 --- /dev/null +++ b/samples/react-teams-my-webinars/config/serve.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json", + "port": 4321, + "https": true, + "initialPage": "https://{tenantDomain}/_layouts/workbench.aspx" +} diff --git a/samples/react-teams-my-webinars/config/write-manifests.json b/samples/react-teams-my-webinars/config/write-manifests.json new file mode 100644 index 000000000..bad352605 --- /dev/null +++ b/samples/react-teams-my-webinars/config/write-manifests.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json", + "cdnBasePath": "" +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/gulpfile.js b/samples/react-teams-my-webinars/gulpfile.js new file mode 100644 index 000000000..be2918708 --- /dev/null +++ b/samples/react-teams-my-webinars/gulpfile.js @@ -0,0 +1,16 @@ +'use strict'; + +const build = require('@microsoft/sp-build-web'); + +build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`); + +var getTasks = build.rig.getTasks; +build.rig.getTasks = function () { + var result = getTasks.call(build.rig); + + result.set('serve', result.get('serve-deprecated')); + + return result; +}; + +build.initialize(require('gulp')); diff --git a/samples/react-teams-my-webinars/package.json b/samples/react-teams-my-webinars/package.json new file mode 100644 index 000000000..d28b77b5f --- /dev/null +++ b/samples/react-teams-my-webinars/package.json @@ -0,0 +1,47 @@ +{ + "name": "teams-virtual-events", + "version": "0.0.1", + "private": true, + "engines": { + "node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0" + }, + "main": "lib/index.js", + "scripts": { + "build": "gulp bundle", + "clean": "gulp clean", + "test": "gulp test" + }, + "dependencies": { + "@fluentui/react": "^8.112.9", + "@fluentui/react-components": "^9.42.0", + "@fluentui/react-migration-v8-v9": "^9.4.37", + "@microsoft/microsoft-graph-types": "^2.40.0", + "@microsoft/microsoft-graph-types-beta": "^0.42.0-preview", + "@microsoft/sp-component-base": "1.18.2", + "@microsoft/sp-core-library": "1.18.2", + "@microsoft/sp-lodash-subset": "1.18.2", + "@microsoft/sp-office-ui-fabric-core": "1.18.2", + "@microsoft/sp-property-pane": "1.18.2", + "@microsoft/sp-webpart-base": "1.18.2", + "@pnp/spfx-controls-react": "3.16.0", + "react": "17.0.1", + "react-dom": "17.0.1", + "tslib": "2.3.1" + }, + "devDependencies": { + "@microsoft/eslint-config-spfx": "1.18.2", + "@microsoft/eslint-plugin-spfx": "1.18.2", + "@microsoft/rush-stack-compiler-4.7": "0.1.0", + "@microsoft/sp-build-web": "1.18.2", + "@microsoft/sp-module-interfaces": "1.18.2", + "@rushstack/eslint-config": "2.5.1", + "@types/react": "17.0.45", + "@types/react-dom": "17.0.17", + "@types/webpack-env": "~1.15.2", + "ajv": "^6.12.5", + "eslint": "8.7.0", + "eslint-plugin-react-hooks": "4.3.0", + "gulp": "4.0.2", + "typescript": "4.7.4" + } +} diff --git a/samples/react-teams-my-webinars/src/index.ts b/samples/react-teams-my-webinars/src/index.ts new file mode 100644 index 000000000..fb81db1e2 --- /dev/null +++ b/samples/react-teams-my-webinars/src/index.ts @@ -0,0 +1 @@ +// A file is required to be in the root of the /src directory by the TypeScript compiler diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.manifest.json b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.manifest.json new file mode 100644 index 000000000..04e09090c --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.manifest.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", + "id": "26c11d2f-c74a-4d93-91ed-054bdea6aad8", + "alias": "MyTeamsVirtualEventsWebPart", + "componentType": "WebPart", + + // The "*" signifies that the version should be taken from the package.json + "version": "*", + "manifestVersion": 2, + + // If true, the component can only be installed on sites where Custom Script is allowed. + // Components that allow authors to embed arbitrary script code should set this to true. + // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f + "requiresCustomScript": false, + "supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"], + "supportsThemeVariants": true, + + "preconfiguredEntries": [{ + "groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Advanced + "group": { "default": "Advanced" }, + "title": { "default": "My Teams Virtual Events" }, + "description": { "default": "My Teams Virtual Events description" }, + "officeFabricIconFontName": "TeamsLogo", + "properties": { + } + }] +} diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.ts b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.ts new file mode 100644 index 000000000..51809f585 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/MyTeamsVirtualEventsWebPart.ts @@ -0,0 +1,71 @@ +import * as React from 'react'; +import * as ReactDom from 'react-dom'; +import { Version } from '@microsoft/sp-core-library'; +import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base'; +import { IReadonlyTheme } from '@microsoft/sp-component-base'; +import MyTeamsVirtualEvents from './components/MyTeamsVirualEvents'; +import { IMyTeamsVirtualEventsProps } from './components/IMyTeamsVirtualEventsProps'; +import { createV9Theme } from '@fluentui/react-migration-v8-v9'; +import { FluentProvider, FluentProviderProps, Theme, teamsDarkTheme, teamsLightTheme, webDarkTheme, webLightTheme } from '@fluentui/react-components'; + +export enum AppMode { + SharePoint, Teams, Office, Outlook +} + +export default class MyTeamsVirtualEventsWebPart extends BaseClientSideWebPart<{}> { + private _isDarkTheme: boolean = false; + private _appMode: AppMode = AppMode.SharePoint; + private _theme: Theme = webLightTheme; + + protected async onInit(): Promise { + if (!!this.context.sdks.microsoftTeams) { + const teamsContext = await this.context.sdks.microsoftTeams.teamsJs.app.getContext(); + switch (teamsContext.app.host.name.toLowerCase()) { + case 'teams': this._appMode = AppMode.Teams; break; + case 'office': this._appMode = AppMode.Office; break; + case 'outlook': this._appMode = AppMode.Outlook; break; + default: throw new Error('Unknown host'); + } + } else this._appMode = AppMode.SharePoint; + return super.onInit(); + } + + public render(): void { + const element: React.ReactElement = React.createElement( + MyTeamsVirtualEvents, { context: this.context } + ); + + //wrap the component with the Fluent UI 9 Provider. + const fluentElement: React.ReactElement = React.createElement( + FluentProvider, + { + theme: this._appMode === AppMode.Teams ? + this._isDarkTheme ? teamsDarkTheme : teamsLightTheme : + this._appMode === AppMode.SharePoint ? + this._isDarkTheme ? webDarkTheme : this._theme : + this._isDarkTheme ? webDarkTheme : webLightTheme + }, + element + ); + + ReactDom.render(fluentElement, this.domElement); + } + + protected onThemeChanged(currentTheme: IReadonlyTheme | undefined): void { + if (!currentTheme) return; + this._isDarkTheme = !!currentTheme.isInverted; + //if the app mode is sharepoint, adjust the fluent ui 9 web light theme to use the sharepoint theme color, teams/dark mode should be fine on default + if (this._appMode === AppMode.SharePoint) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._theme = createV9Theme(currentTheme as any, webLightTheme); + } + } + + protected onDispose(): void { + ReactDom.unmountComponentAtNode(this.domElement); + } + + protected get dataVersion(): Version { + return Version.parse('1.0'); + } +} diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/IMyTeamsVirtualEventsProps.ts b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/IMyTeamsVirtualEventsProps.ts new file mode 100644 index 000000000..3bcef09f5 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/IMyTeamsVirtualEventsProps.ts @@ -0,0 +1,5 @@ +import { WebPartContext } from "@microsoft/sp-webpart-base"; + +export interface IMyTeamsVirtualEventsProps { + context: WebPartContext +} diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirtualEvents.module.scss b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirtualEvents.module.scss new file mode 100644 index 000000000..f2fc32ca9 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirtualEvents.module.scss @@ -0,0 +1,34 @@ +@import '~@fluentui/react/dist/sass/References.scss'; + +.myTeamsVirualEvents { + overflow: hidden; + padding: 1em; + color: "[theme:bodyText, default: #323130]"; + color: var(--bodyText); + &.teams { + font-family: $ms-font-family-fallbacks; + } +} + +.welcome { + text-align: center; +} + +.welcomeImage { + width: 100%; + max-width: 420px; +} + +.links { + a { + text-decoration: none; + color: "[theme:link, default:#03787c]"; + color: var(--link); // note: CSS Custom Properties support is limited to modern browsers only + + &:hover { + text-decoration: underline; + color: "[theme:linkHovered, default: #014446]"; + color: var(--linkHovered); // note: CSS Custom Properties support is limited to modern browsers only + } + } +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirualEvents.tsx b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirualEvents.tsx new file mode 100644 index 000000000..dc554c712 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/MyTeamsVirualEvents.tsx @@ -0,0 +1,159 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import * as React from 'react'; +import styles from './MyTeamsVirtualEvents.module.scss'; +import type { IMyTeamsVirtualEventsProps } from './IMyTeamsVirtualEventsProps'; +import { + DataGrid, DataGridBody, DataGridCell, DataGridHeader, DataGridHeaderCell, DataGridProps, DataGridRow, Skeleton, SkeletonItem, Spinner, + TableColumnDefinition, createTableColumn, makeStyles, shorthands, tokens, Text, Toolbar, ToolbarButton, TableRowId, Tooltip, Link, Button, + DrawerBody, DrawerHeader, DrawerHeaderTitle, OverlayDrawer +} from '@fluentui/react-components'; +import { MSGraphClientV3 } from '@microsoft/sp-http'; +import * as MicrosoftGraphBeta from '@microsoft/microsoft-graph-types-beta'; +import { GraphError } from '@microsoft/microsoft-graph-client'; +import RegistrantCounts from './RegistrantCounts'; +import { ApprovalsAppRegular, ApprovalsAppFilled, bundleIcon, FilterSyncRegular, FilterSyncFilled, DismissRegular, DismissFilled } from '@fluentui/react-icons'; +import TeamApprove from './TeamApprove'; +import * as strings from 'MyTeamsVirtualEventsWebPartStrings'; +import Sync from './Sync'; + +const useStyles = makeStyles({ + invertedWrapper: { + backgroundColor: tokens.colorNeutralBackground1, + }, + skeletonRow: { + alignItems: "center", + display: "grid", + paddingBottom: "10px", + width: "100%", + position: "relative", + ...shorthands.gap("10px"), + gridTemplateColumns: "min-content 20% 20% 15% 15%", + }, +}); + +const ApprovalIcon = bundleIcon(ApprovalsAppFilled, ApprovalsAppRegular); +const SyncListIcon = bundleIcon(FilterSyncFilled, FilterSyncRegular); +const DismissIcon = bundleIcon(DismissRegular, DismissFilled); + +enum DrawState { Closed, OpenTeam, OpenSync } + +export default function MyTeamsVirtualEvents(props: IMyTeamsVirtualEventsProps): React.ReactElement { + const { context } = props; + const styles2 = useStyles(); + const [events, setEvents] = React.useState(); + const [selectedRows, setSelectedRows] = React.useState(new Set([])); + const [drawState, setDrawState] = React.useState(DrawState.Closed); + + const processGraph = (client: MSGraphClientV3, err: GraphError, res: { '@odata.nextlink'?: string, value: MicrosoftGraphBeta.VirtualEventWebinar[] }): void => { + if (err) { + console.error(err); + return; + } + setEvents((events ?? []).concat(res.value.filter(e => e.startDateTime?.dateTime && new Date(e.startDateTime.dateTime) > new Date()))); + if (res['@odata.nextlink']) + client.api(res['@odata.nextlink']) + .get((err1: GraphError, res1: { '@odata.nextlink'?: string, value: MicrosoftGraphBeta.VirtualEventWebinar[] }) => processGraph(client, err1, res1)) + .catch(console.error); + }; + + React.useEffect(() => { + context.msGraphClientFactory + .getClient('3') + .then((client: MSGraphClientV3) => { + client + .api(`/solutions/virtualEvents/webinars/getByUserRole(role='organizer')`) + .version("Beta") + .filter(`status eq 'published' and startDateTime/dateTime gt '${new Date().toJSON()}'`) + .get((err: GraphError, res: { '@odata.nextlink'?: string, value: MicrosoftGraphBeta.VirtualEventWebinar[] }) => processGraph(client, err, res)) + .catch(console.error); + }).catch(console.error); + }, [context]); + + const columns: TableColumnDefinition[] = [ + createTableColumn({ + columnId: "name", + compare: (a, b) => (a.displayName ?? "").localeCompare(b.displayName ?? ""), + renderHeaderCell: () => strings.Name, + renderCell: (item) => {item.displayName}, + + }), + createTableColumn({ + columnId: "createdBy", + compare: (a, b) => (a.createdBy?.user?.displayName ?? "").localeCompare(b.createdBy?.user?.displayName ?? ""), + renderHeaderCell: () => strings.CreatedBy, + renderCell: (item) => item.createdBy?.user?.displayName ?? JSON.stringify(item.createdBy) + }), + createTableColumn({ + columnId: "start", + compare: (a, b) => (new Date(a.startDateTime!.dateTime!) as unknown as number) - (new Date(b.startDateTime!.dateTime!) as unknown as number), + renderHeaderCell: () => strings.Start, + renderCell: (item) => {new Date(item.startDateTime!.dateTime!).toLocaleString()} + }), + createTableColumn({ + columnId: "end", + compare: (a, b) => (new Date(a.endDateTime!.dateTime!) as unknown as number) - (new Date(b.endDateTime!.dateTime!) as unknown as number), + renderHeaderCell: () => strings.End, + renderCell: (item) => {new Date(item.endDateTime!.dateTime!).toLocaleString()} + }), + createTableColumn({ + columnId: "registrants", + renderHeaderCell: () => strings.Registrants, + renderCell: (item) => + }) + ]; + + const defaultSortState = React.useMemo>[1]>(() => ({ sortColumn: "start", sortDirection: "ascending" }), []); + const onSelectionChange: DataGridProps["onSelectionChange"] = (e, data) => setSelectedRows(data.selectedItems); + + return ( +
+ + + } disabled={selectedRows.size === 0} onClick={() => setDrawState(DrawState.OpenSync)}>{strings.SyncFieldLabel} + + + } disabled={selectedRows.size !== 1} onClick={() => setDrawState(DrawState.OpenTeam)}>{strings.ApproveButton} + + + {!events &&
+ +
+ + {[0, 1, 2, 3, 4].map(v => (
+ + + + +
))} +
+
+
} + !open && setDrawState(DrawState.Closed)}> + + } onClick={() => setDrawState(DrawState.Closed)} />}> + {drawState === DrawState.OpenSync ? strings.DrawHeaderSync : strings.DrawHeaderApprove} + + + + {drawState === DrawState.OpenTeam && } + {drawState === DrawState.OpenSync && selectedRows.has(e.id!)) ?? []} />} + + + {events && item.id} selectedItems={selectedRows} + onSelectionChange={onSelectionChange} focusMode="composite" defaultSortState={defaultSortState} resizableColumns> + + + {({ renderHeaderCell }) => ({renderHeaderCell()})} + + + > + {({ item, rowId }) => ( + key={rowId} selectionCell={{ "aria-label": strings.SelectRow }}> + {({ renderCell }) => ({renderCell(item)})} + + )} + + } +
+ ); +} diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/RegistrantCounts.tsx b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/RegistrantCounts.tsx new file mode 100644 index 000000000..551ee83e9 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/RegistrantCounts.tsx @@ -0,0 +1,59 @@ +import * as React from 'react'; +import { WebPartContext } from '@microsoft/sp-webpart-base'; +import * as MicrosoftGraphBeta from '@microsoft/microsoft-graph-types-beta'; +import { Label, Skeleton, SkeletonItem, Tooltip, makeStyles, shorthands, tokens } from '@fluentui/react-components'; +import { MSGraphClientV3 } from '@microsoft/sp-http'; +import { GraphError } from '@microsoft/microsoft-graph-client'; +import * as strings from 'MyTeamsVirtualEventsWebPartStrings'; + +interface IRegistrantCountsProps { + id: string; + context: WebPartContext; +} + +const useStyles = makeStyles({ + regdetails: { + alignItems: "center", + display: 'flex', + flexDirection: 'row', + ...shorthands.gap("10px") + }, + regcount: { + fontSize: tokens.fontSizeBase100 + } +}); + +export default function RegistrantCounts(props: IRegistrantCountsProps): React.ReactElement { + const [registrants, setRegistrants] = React.useState(); + const { id, context } = props; + const styles = useStyles(); + + React.useEffect(() => { + context.msGraphClientFactory + .getClient('3') + .then((client: MSGraphClientV3) => { + client + .api(`solutions/virtualEvents/webinars/${id}/registrations`) + .version("Beta") + .get((err: GraphError, res: { value: MicrosoftGraphBeta.VirtualEventRegistration[] }) => { + if (err) { + console.error(err); + return; + } + setRegistrants(res.value); + }).catch(console.error); + }).catch(console.error); + }, [context]); + + if (!registrants) return (); + else return (
+ r.status === 'registered').length.toString())} + relationship="label"> + + + r.status === 'pendingApproval').length.toString())} + relationship="label"> + + +
); +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Sync.tsx b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Sync.tsx new file mode 100644 index 000000000..441e90813 --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Sync.tsx @@ -0,0 +1,156 @@ +import { Accordion, AccordionHeader, AccordionItem, AccordionPanel, Button, Field, Label, ProgressBar, Text, makeStyles } from '@fluentui/react-components'; +import { WebPartContext } from '@microsoft/sp-webpart-base'; +import * as React from 'react'; +import * as strings from 'MyTeamsVirtualEventsWebPartStrings'; +import { ISite, SitePicker } from "@pnp/spfx-controls-react/lib/SitePicker"; +import { ListPicker } from "@pnp/spfx-controls-react/lib/ListPicker"; +import * as MicrosoftGraphBeta from '@microsoft/microsoft-graph-types-beta'; +import { MonacoEditor } from "@pnp/spfx-controls-react/lib/MonacoEditor"; + +interface ISyncProps { + context: WebPartContext; + webinars: MicrosoftGraphBeta.VirtualEventWebinar[]; +} + +const useStyles = makeStyles({ + AccordionPanel: { + display: 'flex', + flexDirection: 'column', + rowGap: '4px' + } +}) + +export default function Sync(props: ISyncProps): React.ReactElement { + const { context, webinars } = props; + const [site, setSite] = React.useState(); + const [list, setList] = React.useState(); + const [running, setRunning] = React.useState(false); + const [status, setStatus] = React.useState(-1); + const [error, setError] = React.useState(); + const styles = useStyles(); + + const regLinkColFormatting = React.useMemo(() => JSON.stringify({ + "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", + "elmType": "div", + "children": [ + { + "elmType": "div", + "style": { + "display": "flex", + "flex-direction": "row" + }, + "children": [ + { + "elmType": "a", + "style": { + "width": "80px", + "height": "26px", + "border-radius": "3px", + "cursor": "pointer", + "display": "flex", + "align-items": "center", + "justify-content": "space-evenly", + "margin": "5px", + "text-decoration": "none" + }, + "attributes": { + "href": "=[$RegistrationLink]", + "target": "_blank", + "class": "ms-bgColor-themePrimary ms-bgColor-themeDark--hover ms-fontColor-white ms-fontSize-12 ms-fontWeight-bold" + }, + "children": [ + { + "elmType": "span", + "attributes": { + "iconName": "TeamsLogo" + } + }, + { + "elmType": "span", + "txtContent": "Register" + } + ] + } + ] + } + ] + }, null, 2), []); + + const sync = async (): Promise => { + setRunning(true); + setStatus(0); + const client = await context.msGraphClientFactory.getClient('3'); + for (let i = 0; i < webinars.length; i++) { + const webinar = webinars[i]; + try { + await client.api(`/sites/${site?.id}/lists/${list}/items`) + .version("v1.0") + .header('Content-Type', 'application/json') + .post(JSON.stringify({ + "fields": { + "Title": webinar.displayName, + "Description": webinar.description?.content, + "RegistrationLink": `https://events.teams.microsoft.com/event/${webinar.id}`, + "Start": `${webinar.startDateTime?.dateTime}Z`, + "End": `${webinar.endDateTime?.dateTime}Z` + } + })); + setStatus(i + 1); + } catch (e) { + setStatus(i + 1); + console.error(e); + setError(`${error ? `${error}; ` : ''}${e.toString()}`); + } + } + setRunning(false); + }; + + return (
+ + + + Title [Single line of text] + + {strings.TitleDescription} + + + + Description [Multiple lines of text with Rich Text] + + {strings.DescriptionDescription1} + {strings.DescriptionDescription2} + + + + Start [Date and time include time] + + {strings.Start1} + {strings.Start2} + + + + End [Date and time include time] + + {strings.End1} + {strings.End2} + + + + Registration Link [Single line of text] + + {strings.RegistrationLink} + + + + + setSite(sites[0] ?? undefined)} + placeholder={strings.SelectTeamSync} searchPlaceholder={strings.SearchTeamSync} /> + setList(Array.isArray(v) ? v[0] : v ?? undefined)} webAbsoluteUrl={site?.url ?? undefined} disabled={!site} /> + + {status >= 0 && + + } +
); +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/TeamApprove.tsx b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/TeamApprove.tsx new file mode 100644 index 000000000..0713d102d --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/TeamApprove.tsx @@ -0,0 +1,154 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import * as React from 'react'; +import { WebPartContext } from '@microsoft/sp-webpart-base'; +import * as MicrosoftGraphBeta from '@microsoft/microsoft-graph-types-beta'; +import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; +import { + Skeleton, SkeletonItem, Spinner, makeStyles, shorthands, tokens, DataGrid, DataGridBody, + DataGridCell, DataGridHeader, DataGridHeaderCell, DataGridRow, TableColumnDefinition, + createTableColumn, DataGridProps, PresenceBadge, Title1 +} from '@fluentui/react-components'; +import { MSGraphClientV3 } from '@microsoft/sp-http'; +import { GraphError } from '@microsoft/microsoft-graph-client'; +import Teams from './Teams'; +import * as strings from 'MyTeamsVirtualEventsWebPartStrings'; + +interface ITeamApproveProps { + context: WebPartContext + id: string; +} + +const useStyles = makeStyles({ + invertedWrapper: { + backgroundColor: tokens.colorNeutralBackground1, + }, + skeletonRow: { + alignItems: "center", + display: "grid", + paddingBottom: "10px", + width: "100%", + position: "relative", + ...shorthands.gap("10px"), + gridTemplateColumns: "min-content 20% 20% 15% 15%", + }, +}); + +export default function TeamApprove(props: ITeamApproveProps): React.ReactElement { + const [registrants, setRegistrants] = React.useState(); + const [selTeam, setSelTeam] = React.useState(); + const [myTeams, setMyTeams] = React.useState(); + const [teamMembers, setTeamMembers] = React.useState(); + const { id, context } = props; + const styles = useStyles(); + + React.useEffect(() => { + if (id) context.msGraphClientFactory + .getClient('3') + .then((client: MSGraphClientV3) => { + if (!registrants) client + .api(`solutions/virtualEvents/webinars/${id}/registrations`) + .version("Beta") + .get((err: GraphError, res: { value: MicrosoftGraphBeta.VirtualEventRegistration[] }) => { + if (err) { + console.error(err); + return; + } + setRegistrants(res.value.filter(r => r.status === 'pendingApproval')); + }).catch(console.error); + if (!myTeams) client + .api(`me/joinedTeams`) + .version("v1.0") + .get((err: GraphError, res: { value: MicrosoftGraph.Team[] }) => { + if (err) { + console.error(err); + return; + } + setMyTeams(res.value); + }).catch(console.error); + }).catch(console.error); + }, [context]); + + React.useEffect(() => { + setTeamMembers(undefined); + if (selTeam) context.msGraphClientFactory + .getClient('3') + .then((client: MSGraphClientV3) => { + client + .api(`groups/${selTeam}/members`) + .version("v1.0") + .top(999) + .get((err: GraphError, res: { value: MicrosoftGraph.User[] }) => { + if (err) { + console.error(err); + return; + } + setTeamMembers(res.value); + }).catch(console.error); + }).catch(console.error); + }, [selTeam, context]); + + const columns: TableColumnDefinition[] = [ + createTableColumn({ + columnId: "firstName", + compare: (a, b) => (a.firstName ?? "").localeCompare(b.firstName ?? ""), + renderHeaderCell: () => strings.FirstName, + renderCell: (item) => item.firstName! + }), + createTableColumn({ + columnId: "lastName", + compare: (a, b) => (a.lastName ?? "").localeCompare(b.lastName ?? ""), + renderHeaderCell: () => strings.LastName, + renderCell: (item) => item.lastName! + }), + createTableColumn({ + columnId: "email", + compare: (a, b) => (a.email ?? "").localeCompare(b.email ?? ""), + renderHeaderCell: () => strings.Email, + renderCell: (item) => item.email! + }), + createTableColumn({ + columnId: "matched", + renderHeaderCell: () => strings.Matched, + // eslint-disable-next-line @rushstack/security/no-unsafe-regexp + renderCell: (item) => new RegExp(item.email!, "gi").test(t.mail!)) ? 'available' : 'blocked'} /> + }), + ]; + + const defaultSortState = React.useMemo>[1]>(() => ({ sortColumn: "email", sortDirection: "ascending" }), []); + + return ( +
+ {!registrants} + {(!myTeams || !registrants) &&
+ {!registrants && } + {!myTeams && } + +
} + {registrants?.length === 0 && {strings.NoPending}} + {registrants && registrants.length > 0 && <> + {myTeams && setSelTeam(d.optionValue)} />} + {selTeam && registrants && !teamMembers &&
+ + {registrants.map((v, i) => (
+ + +
))} +
+
} + {selTeam && registrants && teamMembers && item.id} + focusMode="composite" defaultSortState={defaultSortState} resizableColumns> + + + {({ renderHeaderCell }) => ({renderHeaderCell()})} + + + > + {({ item, rowId }) => ( key={rowId}> + {({ renderCell }) => ({renderCell(item)})} + )} + + } + } +
+ ); +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Teams.tsx b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Teams.tsx new file mode 100644 index 000000000..0ba1458af --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/components/Teams.tsx @@ -0,0 +1,58 @@ +import { Dropdown, Field, Skeleton, SkeletonItem, Option } from "@fluentui/react-components"; +import { WebPartContext } from "@microsoft/sp-webpart-base"; +import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; +import { MSGraphClientV3 } from '@microsoft/sp-http'; +import { GraphError } from '@microsoft/microsoft-graph-client'; +import * as React from "react"; + +export declare type SelectionEvents = React.ChangeEvent | React.KeyboardEvent | React.MouseEvent; +export declare type OptionOnSelectData = { + optionValue: string | undefined; + optionText: string | undefined; + selectedOptions: string[]; +}; + +interface ITeamsProps { + context: WebPartContext; + label: string; + onOptionSelect?: (event: SelectionEvents, data: OptionOnSelectData) => void; +} + +export default function Teams(props: ITeamsProps): React.ReactElement { + const { context, label } = props; + const [myTeams, setMyTeams] = React.useState(); + const [selectedOptions, setSelectedOptions] = React.useState([]); + const [value, setValue] = React.useState(""); + + const onOptionSelect: (typeof props)["onOptionSelect"] = (ev, data) => { + setSelectedOptions(data.selectedOptions); + setValue(data.optionText ?? ""); + if (props.onOptionSelect) props.onOptionSelect(ev, data); + }; + + React.useEffect(() => { + if ((myTeams?.length ?? -1) < 0) context.msGraphClientFactory + .getClient('3') + .then((client: MSGraphClientV3) => { + if (!myTeams) client + .api(`me/joinedTeams`) + .version("v1.0") + .get((err: GraphError, res: { value: MicrosoftGraph.Team[] }) => { + if (err) { + console.error(err); + return; + } + setMyTeams(res.value); + }).catch(console.error); + }).catch(console.error); + }, [context]); + + return ( + {!myTeams && } + {myTeams && + {myTeams.map(t => ())} + } + ); +} \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/en-us.js b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/en-us.js new file mode 100644 index 000000000..1e28cc1fd --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/en-us.js @@ -0,0 +1,42 @@ +define([], function() { + return { + "SyncFieldLabel": "Add to list", + "SiteLabel": "Select a site", + "ListLabel": "Select a list", + "DrawHeaderSync": "Add Webinars to a List", + "DrawHeaderApprove": "Approve based on Team Membership", + "SelectAllRows": "Select all rows", + "SelectRow": "Select row", + "Close": "Close", + "SelectTeamApprove": "Select the team to get membership off", + "SelectTeamSync": "Select the site", + "SearchTeamSync": "Search for a site", + "Done": "Done", + "Processing": "Processing {name}", + "WithErrors": "With error(s): ", + "SelectList": "Select your list", + "SyncColumns": "The sync expects the following columns", + "TitleDescription": "This will hold the title of the webinar", + "DescriptionDescription1": "Please set this column to use multiple lines of text and use rich text", + "DescriptionDescription2": "This will hold the details of the webinar, this field is HTML formatted", + "Start1": "Make sure to toggle include time", + "Start2": "This will hold the Date and Time the webinar starts", + "End1": "Make sure to toggle include time", + "End2": "This will hold the Date and Time the webinar ends", + "RegistrationLink": "To avoid issues use a single line of text and some column formatting to make it into a button. Example formatting:", + "NoPending": "No pending registrants", + "FirstName": "First Name", + "LastName": "Last Name", + "Email": "Email", + "Matched": "Matched", + "ThereAreRegistrantsRegistered": "There are {x} registrants registered", + "ThereAreRegistrantsPendingApproval": "There are {x} registrants pending approval", + "Name": "Name", + "CreatedBy": "Created by", + "Start": "Start", + "End": "End", + "Registrants": "Registrants", + "ApproveButton": "Team membership approve", + "LoadingTeamsWebinars": "Loading My Teams Webinars" + } +}); \ No newline at end of file diff --git a/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/mystrings.d.ts b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/mystrings.d.ts new file mode 100644 index 000000000..6afffd2cc --- /dev/null +++ b/samples/react-teams-my-webinars/src/webparts/myTeamsVirtualEvents/loc/mystrings.d.ts @@ -0,0 +1,45 @@ +declare interface IMyTeamsVirtualEventsWebPartStrings { + SyncFieldLabel: string; + SiteLabel: string; + ListLabel: string; + DrawHeaderSync: string; + DrawHeaderApprove: string; + SelectAllRows: string; + SelectRow: string; + Close: string; + SelectTeamApprove: string; + SelectTeamSync: string; + SearchTeamSync: string; + Done: string; + Processing: string; + WithErrors: string; + SelectList: string; + SyncColumns: string; + TitleDescription: string; + DescriptionDescription1: string; + DescriptionDescription2: string; + Start1: string; + Start2: string; + End1: string; + End2: string; + RegistrationLink: string; + NoPending: string; + FirstName: string; + LastName: string; + Email: string; + Matched: string; + ThereAreRegistrantsRegistered: string; + ThereAreRegistrantsPendingApproval: string; + Name: string; + CreatedBy: string; + Start: string; + End: string; + Registrants: string; + ApproveButton: string; + LoadingTeamsWebinars: string; +} + +declare module 'MyTeamsVirtualEventsWebPartStrings' { + const strings: IMyTeamsVirtualEventsWebPartStrings; + export = strings; +} diff --git a/samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_color.png b/samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_color.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1f764fa8df4791a61c71b4f011c26f9083ee52 GIT binary patch literal 10248 zcmeHs2T)UM*Y2hl>0MEYh=BCai=jwWAoLiXZ}l(vc=b zI!cjVEr>`H2yl1Q)4ub~+6|q6PIX{3=ffYI)PdeQ zR`~Mm(+6(VOiWV08f{~!kKt+Um1}JSomPzC1=>>nm(xf=7gse0=?;PVduy zEDHV*&HDD2WGpQJ(3PMyHI30OB--?qyKctjm$(S4S2NfdCk)|+aJDnD5GA1w6Z7nv zj*32{u?f{@Jid#KNH>B4a?fF-GSP0UZ^ zMsLlx<6Re>>Aw1q_ZaBIDS)jRnWQehYrSG*x*>C7WbMIo*Pq=3)M!-sC;d9v=3xMSbN^<7GMT#nQNXnK z&ii+XSf%-~PXO~P0(E{kxiQ&2b#5Lq87DfAaCR@6NeB=XAx@xk)?k~CFep9oiTamp zo?pW?v#Ez71^dXynlAM*N)SY+m7gX)NW4_8GcU22mPntoLR03GtAz zBaVqN7d7unQB+34rhx#N;}ivrN?v5Od?gXQGlO2-!Bq8(DNX0Tan?owwB+Z>bE5jR zrC69~v06O*$C|W1X>ptqVNHtl(~@*%@#bsN6oaVp_v?vVPae{?;kQo>*AtYcdcl4v z;;}~NdB0OM*S1s5UTM!;anPNK8PK?t{m%GQA&BNmIe%R0WfB{^-zGKJgjvNq(! z;qsa_xtjfJ%XWCWUD|4jkfX4OOdUyt6c0L)sf~UvDXt|SK@T0iGk8b;j!8GeBE>C& zMawZn##4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}8R>Y! z&I;H+;~Z@b+y6qX+b*QX=f<-9UMss`ov0afT?z<)nQ9NtfQrgJkdX8y$HUz#8-D(P zJFzPxOoAF>jaQ>~qAPY#P#z;%NhFI>QLq?Hl|Rl~IYkb$2iIYS#>9*M+%p_JBPSa7aOh15i4ZLUg zx?`4~B5j4aP2g_loUev;#XpLFIeOH5bGLlJwUtx-+Q%(1GYd|)^Aywc|My!*8G9fe z=e;18;df%6ExwhX-px&zp16Poz+KSV%mzoR^IGT1Sla}bH+LJA0TlL8RtvPjS55|LjhwdSxcwxo8Vj?Zm;U(vken}t2dcFdD0V{Zj}5nMt|ggHb6 zb1rcvXoCi&oRdwUcw{ok;ljk%IiI-bkSK<&h~vQiun0d1M3^H}|K>Za=X zi_?vJh7ZmV2Hz7JYPm;7 z^jJVk2D*1Vnr@xIhJPez3Y8v8$^7j1&9=_kVWOpTOwc(Fxf69wgdf-sIiO*-TgXbG zmXc>{nV(}dP(3N9YR6$l?KITC7$f~KyP${yoE=kNFI?+d$ay4f2_$H%oL$B%PvhLN zfxEUa_p2k9g9{Zqy#=ovSONWV2L6I~mVKoDhfgd2@X$1NNETJWa+|p#ZG`l`^MW>9 KtK_^>#Qy@$+e&%> literal 0 HcmV?d00001 diff --git a/samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_outline.png b/samples/react-teams-my-webinars/teams/89b85509-1d36-4279-bde0-324e258040b2_outline.png new file mode 100644 index 0000000000000000000000000000000000000000..e8cb4b6ba4f726d47a2e274f16b6069b9a8041cc GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?3oVGw3ym^DWND9BhG z%|CHbgX^da?eHs6`1kLARhjOac zf3;y1Iq~M{LLS3g_M2bU{+PBvomV=FH7$YTy5I%1<5B$=?>3fqI5P%5iajq7)W9SX p;gpazd1JnvZNlx8HB0WjVJ`J~Q+P@%pA+aZ22WQ%mvv4FO#n^cR9FB2 literal 0 HcmV?d00001 diff --git a/samples/react-teams-my-webinars/tsconfig.json b/samples/react-teams-my-webinars/tsconfig.json new file mode 100644 index 000000000..01c71ae65 --- /dev/null +++ b/samples/react-teams-my-webinars/tsconfig.json @@ -0,0 +1,35 @@ +{ + "extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json", + "compilerOptions": { + "target": "ES6", + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "jsx": "react", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "skipLibCheck": true, + "outDir": "lib", + "inlineSources": false, + "noImplicitAny": true, + + "typeRoots": [ + "./node_modules/@types", + "./node_modules/@microsoft" + ], + "types": [ + "webpack-env" + ], + "lib": [ + "es6", + "dom", + "es2015.collection", + "es2015.promise" + ] + }, + "include": [ + "src/**/*.ts", + "src/**/*.tsx" + ] +}