PromucFlow_constructor/app/client/src/selectors/datasourceSelectors.ts

40 lines
1.2 KiB
TypeScript
Raw Normal View History

import type { AppState } from "ee/reducers";
export const getGsheetSpreadsheets =
(id = "") =>
(state: AppState) => {
return state.entities.datasources.gsheetStructure.spreadsheets[id];
};
export const getIsFetchingGsheetSpreadsheets = (state: AppState) =>
state.entities.datasources.gsheetStructure.isFetchingSpreadsheets;
export const getGsheetsSheets =
(id = "") =>
(state: AppState) => {
return state.entities.datasources.gsheetStructure.sheets[id];
};
export const getisFetchingGsheetsSheets = (state: AppState) =>
state.entities.datasources.gsheetStructure.isFetchingSheets;
export const getGsheetsColumns =
(id = "") =>
(state: AppState) => {
return state.entities.datasources.gsheetStructure.columns[id];
};
export const getIsFetchingGsheetsColumns = (state: AppState) => {
return state.entities.datasources.gsheetStructure.isFetchingColumns;
};
chore: [App Sidebar] Data Pane (#28248) ## Description Works on the new data pane as part of the App Sidebar. This is currently behind a feature flag. - Shows workspace datasources on the left pane - Updated create new flow by refactoring the existing IntegrationsHomeScreen - Updates context switching for default value selectors - Fixes some settings pane issues #### PR fixes following issue(s) Fixes #27956 Fixes #27952 #### Media https://github.com/appsmithorg/appsmith/assets/12022471/29e36823-4469-418c-ad2a-5362caa93cf4 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? No new tests. Existing tests should pass #### 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 - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] 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 - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-10-24 09:58:21 +00:00
export const getFirstDatasourceId = (state: AppState) => {
const { list } = state.entities.datasources;
if (list.length) {
return list[0].id;
}
};
export const getLoadingTokenForDatasourceId = (state: AppState) =>
state.entities.datasources.loadingTokenForDatasourceId;