chore: add params for query instance (#30333)
## Description Adding params for query module instance on action selector #### PR fixes following issue(s) Fixes # (issue number) > if no issue exists, please create an issue and ask the maintainers about this first > > #### 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. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced action entity detection within the app for improved user experience. - **Refactor** - Streamlined action-related code for better performance and maintainability. - **Bug Fixes** - Resolved issues with incorrect action entity recognition in certain scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
811a342267
commit
49d5615bfa
|
|
@ -988,3 +988,7 @@ export const isAPathDynamicBindingPath = (
|
|||
export const isNotEntity = (entity: DataTreeEntity) => {
|
||||
return !isAction(entity) && !isWidget(entity) && !isJSAction(entity);
|
||||
};
|
||||
|
||||
export const isEntityAction = (entity: DataTreeEntity) => {
|
||||
return isAction(entity);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ import { setGlobalSearchCategory } from "actions/globalSearchActions";
|
|||
import { createNewJSCollection } from "actions/jsPaneActions";
|
||||
import { createModalAction } from "actions/widgetActions";
|
||||
import type { AppState } from "@appsmith/reducers";
|
||||
import { getEntityNameAndPropertyPath } from "@appsmith/workers/Evaluation/evaluationUtils";
|
||||
import {
|
||||
getEntityNameAndPropertyPath,
|
||||
isEntityAction,
|
||||
} from "@appsmith/workers/Evaluation/evaluationUtils";
|
||||
import type { TreeDropdownOption } from "design-system-old";
|
||||
import { Icon } from "design-system";
|
||||
import { PluginType } from "entities/Action";
|
||||
|
|
@ -62,10 +65,7 @@ import {
|
|||
} from "./utils";
|
||||
import store from "store";
|
||||
import { selectEvaluationVersion } from "@appsmith/selectors/applicationSelectors";
|
||||
import {
|
||||
isAction,
|
||||
isJSAction,
|
||||
} from "@appsmith/workers/Evaluation/evaluationUtils";
|
||||
import { isJSAction } from "@appsmith/workers/Evaluation/evaluationUtils";
|
||||
import type { DataTreeEntity } from "entities/DataTree/dataTreeTypes";
|
||||
import type { ModuleInstanceDataState } from "@appsmith/constants/ModuleInstanceConstants";
|
||||
import { MODULE_TYPE } from "@appsmith/constants/ModuleConstants";
|
||||
|
|
@ -111,7 +111,7 @@ export function getFieldFromValue(
|
|||
const entity = dataTree && dataTree[entityProps.entityName];
|
||||
|
||||
if (entity && "ENTITY_TYPE" in entity) {
|
||||
if (isAction(entity as DataTreeEntity)) {
|
||||
if (isEntityAction(entity as DataTreeEntity)) {
|
||||
// get fields for API action
|
||||
return getActionEntityFields(
|
||||
fields,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import type { AdditionalDynamicDataTree } from "utils/autocomplete/customTreeTyp
|
|||
import type { FieldType, ViewTypes, AppsmithFunction } from "./constants";
|
||||
import type { APPSMITH_INTEGRATIONS } from "./constants";
|
||||
import type { Variants } from "./constants";
|
||||
import type { MODULE_TYPE } from "@appsmith/constants/ModuleConstants";
|
||||
|
||||
export type GenericFunction = (...args: any[]) => any;
|
||||
|
||||
|
|
@ -162,6 +163,7 @@ export interface DataTreeForActionCreator {
|
|||
[key: string]: {
|
||||
ENTITY_TYPE?: EntityTypeValue;
|
||||
meta?: Record<string, MetaArgs>;
|
||||
type?: MODULE_TYPE;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ export const getDataTreeForActionCreator = memoize((state: AppState) => {
|
|||
dataTree[key] = {
|
||||
meta: value?.meta || null,
|
||||
ENTITY_TYPE: value?.ENTITY_TYPE || null,
|
||||
type: value?.type || null,
|
||||
};
|
||||
});
|
||||
return dataTree;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user