Skip to content

Commit

Permalink
Migration to SPFx 1.15.0 and lots of optimalizations
Browse files Browse the repository at this point in the history
  • Loading branch information
cupo365 committed Jul 24, 2022
1 parent ee9261d commit 2d95997
Show file tree
Hide file tree
Showing 30 changed files with 3,931 additions and 7,013 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'],
parserOptions: { tsconfigRootDir: __dirname }
};
5 changes: 0 additions & 5 deletions .vscode/extensions.json

This file was deleted.

86 changes: 40 additions & 46 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,47 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Hosted workbench (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
],
"preLaunchTask": "gulp serve",
"postDebugTask": "Terminate All Tasks",
"presentation": {
"group": "remote",
"order": 1
}
{
"name": "Hosted workbench (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
{
"name": "Hosted workbench (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
],
"preLaunchTask": "gulp serve",
"postDebugTask": "Terminate All Tasks",
"presentation": {
"group": "remote",
"order": 2
}
"runtimeArgs": ["--remote-debugging-port=9222", "-incognito"],
"preLaunchTask": "gulp serve",
"postDebugTask": "Terminate All Tasks",
"presentation": {
"group": "remote",
"order": 1
}
},
{
"name": "Hosted workbench (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": ["--remote-debugging-port=9222", "-incognito"],
"preLaunchTask": "gulp serve",
"postDebugTask": "Terminate All Tasks",
"presentation": {
"group": "remote",
"order": 2
}
}
]
}
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@microsoft/generator-sharepoint": {
"plusBeta": false,
"isCreatingSolution": true,
"version": "1.12.1",
"version": "1.15.0",
"libraryName": "enhanced-power-automate-trigger",
"libraryId": "6a305bc9-c1e5-4995-a23e-959851d784f6",
"environment": "spo",
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@ My colleague [MrAutomate33](https://github.com/mrautomate33) and I have been lon
<br />
This SPFx (SharePoint Framework) command set expands on the existing 'trigger a flow' menu button in SharePoint, and allows you to configure one or more HTTP request triggered flows and serve the user with a choice on which flow to execute when selecting one or more items by injecting a menu button upon loading the page. The command set is compatible with both SharePoint document libaries and custom lists.

**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for custom lists here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.0.1)**
**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for custom lists here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.1.0)**

**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for document libraries here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.0.1)**
**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for document libraries here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.1.0)**

## Compatibility

![SPFx 1.12.1](https://img.shields.io/badge/SPFx-1.12.1-green.svg) ![Node.js v14.17.0](https://img.shields.io/badge/Node.js-v14.17.0-green.svg)
![React v16.8.8](https://img.shields.io/badge/React-v16.8.8-green.svg)
![Typescript v3.9](https://img.shields.io/badge/Typescript-v3.9-green.svg)
![SPFx 1.15.0](https://img.shields.io/badge/SPFx-1.15.0-green.svg) ![Node.js v14.17.0](https://img.shields.io/badge/Node.js-v14.17.0-green.svg)
![React v16.13.1](https://img.shields.io/badge/React-v16.13.1-green.svg)
![Typescript v4.5](https://img.shields.io/badge/Typescript-v3.9-green.svg) ![PnP v3.5.1](https://img.shields.io/badge/PnP-v3.5.1-green.svg)
![Fluent UI v8.83.0](https://img.shields.io/badge/Fluent%20UI-v8.83.0-green.svg)

![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg) ![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg) ![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg)

![Compatible with SharePoint document libraries](https://img.shields.io/badge/Document%20libraries-Compatible-green.svg) ![Compatible with SharePoint custom lists](https://img.shields.io/badge/Custom%20lists-Compatible-green.svg)

![Compatible with Microsoft Edge](https://img.shields.io/badge/MS%20Edge-Compatible-green.svg) ![Compatible with Google Chrome](https://img.shields.io/badge/Google%20Chrome-Compatible-green.svg) ![Compatible with Mozilla Firefox](https://img.shields.io/badge/Mozilla%20Firefox-Compatible-green.svg)

## Applies to

- [SharePoint Framework](https://aka.ms/spfx)
Expand All @@ -41,7 +44,7 @@ This SPFx (SharePoint Framework) command set expands on the existing 'trigger a

## Prerequisites

> - Node.js v10/12/14
> - Node.js v12/14/16
> - A Power Automate per user or per flow plan that allows you to use the Request (HTTP) connector (see [Power Automate pricing](https://powerautomate.microsoft.com/en-us/pricing/))
> - (optional) An M365 account. Get your own free Microsoft 365 tenant from [M365 developer program](https://developer.microsoft.com/en-us/microsoft-365/dev-program)
Expand All @@ -54,11 +57,11 @@ This SPFx (SharePoint Framework) command set expands on the existing 'trigger a

## Version history

| Version | Date | Comments |
| ------- | ------------- | ------------------------------------------------ |
| 0.9.0 | April 3, 2022 | Pre-release |
| 1.0.0 | July 1, 2022 | Initial release, doc lib and lists compatibility |
| 1.0.1 | July 24, 2022 | Optimalizations, code and structure refactoring |
| Version | Date | Comments |
| ------- | ------------- | ---------------------------------------------------- |
| 0.9.0 | April 3, 2022 | Pre-release |
| 1.0.0 | July 1, 2022 | Initial release, doc lib and lists compatibility |
| 1.1.0 | July 24, 2022 | Migration to SPFx 1.15.0 and lots of optimalizations |

## Supported languages
- English
Expand Down Expand Up @@ -221,6 +224,6 @@ Once the user closes the dialog, the page will be refreshed.

## Download the web part packages

**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for custom lists here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.0.1)**
**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for custom lists here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.1.0)**

**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for document libraries here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.0.1)**
**[<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.iconsdb.com%2Ficons%2Fpreview%2Froyal-blue%2Fdata-transfer-download-xxl.png&f=1&nofb=1" alt="Download .sppkg file" style="width:15px;margin-right:10px;"/><u>Download the .sppkg file for document libraries here!</u>](https://github.com/cupo365/enhanced-power-automate-command-set/releases/tag/v1.1.0)**
4 changes: 2 additions & 2 deletions config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "enhanced-power-automate-trigger-client-side-solution",
"id": "6a305bc9-c1e5-4995-a23e-959851d784f6",
"version": "1.0.1.0",
"version": "1.1.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand All @@ -12,7 +12,7 @@
"websiteUrl": "https://cupo365.gg",
"privacyUrl": "https://cupo365.gg/privacy-policy",
"termsOfUseUrl": "https://cup0365.gg/disclaimer",
"mpnId": ""
"mpnId": "Undefined-1.15.0"
},
"metadata": {
"shortDescription": {
Expand Down
4 changes: 2 additions & 2 deletions gulpfile-switch-list-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ build.task("switch-list-type", {
);

resolve();
} catch (ex) {
gutil.log(gutil.colors.red(ex));
} catch (err) {
gutil.log(gutil.colors.red(err));

reject();
}
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ build.rig.getTasks = function () {
return result;
};

// Disable deprecated tslint (for PnP)
build.tslintCmd.enabled = false;

require("./gulpfile-switch-list-type");

build.initialize(require("gulp"));
Loading

0 comments on commit 2d95997

Please sign in to comment.