PromucFlow_constructor/app/client/src/actions
sneha122 0f838535c3
feat: file picker added and access token generation (#20778)
## Description

This PR includes following changes:

- In case of limiting google sheet access project, when user selects specific sheets as an option, they should be shown file picker UI once the authorisation is complete, In this file picker UI, users can select the google sheet files that they want to use with appsmith application and allow access to only those files.
- This PR contains the changes for file picker UI and updating datasource auth state based on the files selected by user.


TL;DR
Steps to test this PR:

- Create Google Sheet datasource
- In the datasource config form, select specific sheets as an option from the scope dropdown.
- Click on save and authorise
- This will take you to google oauth process

<img width="467" alt="Screenshot 2023-02-20 at 1 24 24 PM" src="https://user-images.githubusercontent.com/30018882/220045493-57b0ca6c-3f08-4963-af55-d603cf79bc43.png">

- Select the google account
- This will take you to google oauth2 consent screen

<img width="451" alt="Screenshot 2023-02-20 at 1 24 55 PM" src="https://user-images.githubusercontent.com/30018882/220045641-9f70dd29-6664-489a-b77b-df65445491df.png">

- Click on allow for all requested permissions
- This will take you back to appsmith's datasource config page in view mode and load the file picker UI
<img width="425" alt="Screenshot 2023-02-20 at 1 25 47 PM" src="https://user-images.githubusercontent.com/30018882/220045828-8b3e3e46-4ddc-4e30-b2f8-f12865395817.png">
- Select the files that you want to share with appsmith app
- Click on select
- You should see the new query button in enabled state, as datasource authorisation is complete

<img width="800" alt="Screenshot 2023-02-20 at 1 27 28 PM" src="https://user-images.githubusercontent.com/30018882/220046131-6ce99a85-cddc-4529-ae45-f9833aefd71b.png">

- In case you select cancel on google oauth2 consent screen, you should error message on datasource config page with new query button being disabled

<img width="810" alt="Screenshot 2023-02-20 at 1 28 49 PM" src="https://user-images.githubusercontent.com/30018882/220046385-6b8d636c-b517-44c3-a596-b52bc0084b94.png">

- In case you do give all the permissions but do not select any files in google file picker, then also you should see error message on datasource config page with new query button disabled.

Fixes #20163, #20290, #20160, #20162


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video


## Type of change

> Please delete options that are not relevant.

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or manual QA
- [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-03-08 10:55:17 +05:30
..
analyticsActions.ts chore: send segment anonymous id (#19122) 2023-01-06 19:39:38 +05:30
apiPaneActions.ts chore: Context switching - Api right pane tabs (#17473) 2022-11-25 09:17:00 +05:30
appCollabActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
applicationActions.ts feat: Renamed design system package (#19854) 2023-01-23 09:20:47 +05:30
appSettingsPaneActions.ts fix: Updating page permissions in view mode to solve error message for updating the page (#18946) 2022-12-14 20:32:13 +05:30
appThemingActions.tsx fix: Theming UX Changes (#13741) 2022-06-03 15:55:38 +05:30
appViewActions.ts feat: App Theming (#9714) 2022-05-04 15:15:57 +05:30
authActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
autoHeightActions.ts feat: Auto height instant update (#19082) 2023-02-03 11:17:40 +05:30
autoLayoutActions.ts feat: Auto layout appsmith editor and mobile responsiveness (#21151) 2023-03-04 12:55:54 +05:30
batchActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
browserRequestActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
canvasSelectionActions.ts feat: drag n drop and Container jump enhancements (#19047) 2023-01-06 22:27:40 +05:30
collectionAction.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
controlActions.tsx feat: Non auto height invisible widgets (#20118) 2023-02-14 19:06:19 +05:30
crudInfoModalActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
datasourceActions.ts feat: file picker added and access token generation (#20778) 2023-03-08 10:55:17 +05:30
debuggerActions.ts fix: Aggregate calls to add and remove Appsmith errors (#18285) 2022-12-07 11:28:29 +01:00
editorActions.ts feat: editor header UI update (#19414) 2023-01-09 19:52:23 +05:30
editorContextActions.ts chore: Revert "feat: move the widget creation CTA off the Entity explorer (#… (#20335) 2023-02-03 14:47:01 +06:00
errorActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
evaluationActions.ts feat: List V2 (#15839) 2023-02-14 17:07:31 +01:00
explorerActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
focusHistoryActions.ts feat: URL Navigation for Widgets (#20202) 2023-02-21 19:08:16 +05:30
gitSyncActions.ts fix: Add error message for protected branch (#18737) 2022-12-16 12:07:40 +05:30
globalSearchActions.ts chore: Navigation analytics (#18781) 2022-12-15 09:36:13 +05:30
helpActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
importActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
initActions.ts fix: AppViewer init and page fetch logic (#14294) 2022-06-10 18:22:59 +00:00
jsActionActions.ts chore: Adding JS Object Events (#16472) 2022-09-14 21:04:10 +05:30
JSLibraryActions.ts feat: Import javascript libraries (#17895) 2022-12-21 22:44:47 +05:30
jsPaneActions.ts feat: Maintain Focus and Context Phase 1 (#16317) 2022-10-17 20:46:38 +05:30
lintingActions.ts feat: Split evaluation and linting (#17287) 2022-11-03 14:53:15 +05:30
metaActions.ts feat: meta rehydration (#19683) 2023-01-13 23:59:03 +05:30
metaWidgetActions.ts feat: List V2 (#15839) 2023-02-14 17:07:31 +01:00
multiPaneActions.ts feat: Multi Pane IDE: Phase 1 (#19261) 2023-01-09 10:54:41 +05:30
onboardingActions.ts fix: welcome tour ending on page refresh (#16079) 2022-09-02 18:45:48 +05:30
pageActions.tsx fix: User gets an error even when table widget is added from the API … (#20593) 2023-02-20 17:33:54 +05:30
pageVisibilityActions.ts feat: Fetch Appsmith version when browser tab comes on focus (#16153) 2022-09-01 14:17:29 +05:30
pluginActionActions.ts fix: fast render form elements in UQI query editors (#16199) 2022-09-01 10:41:57 +05:30
pluginActions.ts feat: migrate organisation to workspace (#13863) 2022-06-15 21:07:41 +05:30
propertyPaneActions.ts fix: set soft focus for property pane inputs (#19009) 2022-12-16 22:52:47 +05:30
providerActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
queryPaneActions.ts feat: Maintain Focus and Context Phase 1 (#16317) 2022-10-17 20:46:38 +05:30
recentEntityActions.ts chore: Navigation analytics (#18781) 2022-12-15 09:36:13 +05:30
reflowActions.ts move reflow out of beta (#12746) 2022-04-20 18:33:30 +05:30
releasesActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
templateActions.ts feat: fork templates inside an existing app (#17184) 2022-09-30 19:11:04 +05:30
themeActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
tourActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
userActions.ts refactor: deprecate commenting and notifications (#15484) 2022-08-03 12:32:49 +05:30
utilActions.ts feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30
websocketActions.ts chore: Refactor rts connection retry with limits (#19781) 2023-01-14 21:38:39 +05:30
widgetActions.tsx feat: Automatic height updates for widgets based on contents (Auto Height) (#18341) 2022-11-23 15:18:23 +05:30
widgetSelectionActions.ts feat: URL Navigation for Widgets (#20202) 2023-02-21 19:08:16 +05:30
widgetSidebarActions.tsx feat: Refactor code for SAML integration (#12700) 2022-04-12 16:20:01 +05:30