2022-04-12 10:50:01 +00:00
|
|
|
import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants";
|
2022-10-17 15:16:38 +00:00
|
|
|
|
2020-02-21 12:16:49 +00:00
|
|
|
export const updateWidgetName = (widgetId: string, newName: string) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.UPDATE_WIDGET_NAME_INIT,
|
|
|
|
|
payload: {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
id: widgetId,
|
2020-02-21 12:16:49 +00:00
|
|
|
newName,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
};
|
2021-04-23 05:43:13 +00:00
|
|
|
|
2021-07-26 16:44:10 +00:00
|
|
|
export const bindDataToWidget = (payload: { widgetId: string }) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.BIND_DATA_TO_WIDGET,
|
|
|
|
|
payload,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-17 15:16:38 +00:00
|
|
|
export const setSnipingMode = (payload: {
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
bindTo?: string;
|
|
|
|
|
}) => ({
|
2021-07-26 16:44:10 +00:00
|
|
|
type: ReduxActionTypes.SET_SNIPING_MODE,
|
|
|
|
|
payload,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const resetSnipingMode = () => ({
|
|
|
|
|
type: ReduxActionTypes.RESET_SNIPING_MODE,
|
|
|
|
|
});
|
2022-10-17 15:16:38 +00:00
|
|
|
|
|
|
|
|
export const setPropertySectionState = (key: string, isOpen: boolean) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.SET_PROPERTY_SECTION_STATE,
|
|
|
|
|
payload: { key, isOpen },
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
export const setAllPropertySectionState = (payload: {
|
|
|
|
|
[key: string]: boolean;
|
|
|
|
|
}) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.SET_ALL_PROPERTY_SECTION_STATE,
|
|
|
|
|
payload,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
export const setSelectedPropertyTabIndex = (selectedIndex: number) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.SET_SELECTED_PROPERTY_TAB_INDEX,
|
|
|
|
|
payload: selectedIndex,
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-11-15 06:20:18 +00:00
|
|
|
|
|
|
|
|
export const generateKeyAndSetFocusablePropertyPaneField = (path?: string) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.GENERATE_KEY_AND_SET_FOCUSABLE_PROPERTY_FIELD,
|
|
|
|
|
payload: { path },
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const setFocusablePropertyPaneField = (path?: string) => {
|
|
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.SET_FOCUSABLE_PROPERTY_FIELD,
|
|
|
|
|
payload: { path },
|
|
|
|
|
};
|
|
|
|
|
};
|