Merge branch 'fix/remove-console-warnings' into 'release'
Remove console warnings - Remove console eslint warnings like react hook dependency warnings and unused vars warnings See merge request theappsmith/internal-tools-client!738
This commit is contained in:
commit
f70d92b8d0
|
|
@ -1,7 +1,6 @@
|
|||
import Api from "./Api";
|
||||
import { ApiResponse } from "./ApiResponses";
|
||||
import { AxiosPromise } from "axios";
|
||||
import { getUserCurrentOrgId } from "selectors/organizationSelectors";
|
||||
|
||||
export interface PublishApplicationRequest {
|
||||
applicationId: string;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import {
|
|||
WrappedFieldMetaProps,
|
||||
WrappedFieldInputProps,
|
||||
} from "redux-form";
|
||||
import FormFieldError from "components/editorComponents/form/FieldError";
|
||||
import SelectComponent from "components/editorComponents/SelectComponent";
|
||||
|
||||
const renderComponent = (
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@ import {
|
|||
} from "actions/metaActions";
|
||||
import AppRoute from "pages/common/AppRoute";
|
||||
import { editorInitializer } from "utils/EditorUtils";
|
||||
import { getCurrentOrg } from "selectors/organizationSelectors";
|
||||
import { PERMISSION_TYPE } from "pages/Applications/permissionHelpers";
|
||||
import { Organization } from "constants/orgConstants";
|
||||
|
||||
const AppViewWrapper = styled.div`
|
||||
margin-top: ${props => props.theme.headerHeight};
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@ import {
|
|||
getApplicationViewerPageURL,
|
||||
BUILDER_PAGE_URL,
|
||||
} from "constants/routes";
|
||||
import { Card, Tooltip, Classes, Icon } from "@blueprintjs/core";
|
||||
import { Card, Tooltip, Icon } from "@blueprintjs/core";
|
||||
import { ApplicationPayload } from "constants/ReduxActionConstants";
|
||||
import Button from "components/editorComponents/Button";
|
||||
import {
|
||||
theme,
|
||||
getBorderCSSShorthand,
|
||||
getColorWithOpacity,
|
||||
Theme,
|
||||
} from "constants/DefaultTheme";
|
||||
import ContextDropdown, {
|
||||
ContextDropdownOption,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ type Props = InjectedFormProps<
|
|||
// TODO(abhinav): abstract onCancel out.
|
||||
|
||||
export const CreateApplicationForm = (props: Props) => {
|
||||
const { error, handleSubmit, pristine, submitting, orgId } = props;
|
||||
const { error, handleSubmit, pristine, submitting } = props;
|
||||
return (
|
||||
<Form onSubmit={handleSubmit(createApplicationFormSubmitHandler)}>
|
||||
{error && !pristine && <FormMessage intent="danger" message={error} />}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {
|
|||
getIsCreatingApplication,
|
||||
getCreateApplicationError,
|
||||
getIsDeletingApplication,
|
||||
getUserApplicationsOrgs,
|
||||
getUserApplicationsOrgsList,
|
||||
} from "selectors/applicationSelectors";
|
||||
import {
|
||||
|
|
@ -20,17 +19,13 @@ import {
|
|||
import PageWrapper from "pages/common/PageWrapper";
|
||||
import SubHeader from "pages/common/SubHeader";
|
||||
import PageSectionDivider from "pages/common/PageSectionDivider";
|
||||
import { getApplicationPayloads } from "mockComponentProps/ApplicationPayloads";
|
||||
import ApplicationCard from "./ApplicationCard";
|
||||
import CreateApplicationForm from "./CreateApplicationForm";
|
||||
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
||||
import { CREATE_APPLICATION_FORM_NAME } from "constants/forms";
|
||||
import { PERMISSION_TYPE } from "./permissionHelpers";
|
||||
import { DELETING_APPLICATION } from "constants/messages";
|
||||
import { AppToaster } from "components/editorComponents/ToastComponent";
|
||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||
import FormDialogComponent from "components/editorComponents/form/FormDialogComponent";
|
||||
import OrganizationListMockResponse from "mockResponses/OrganisationListResponse";
|
||||
import { User } from "constants/userConstants";
|
||||
import CustomizedDropdown, {
|
||||
CustomizedDropdownProps,
|
||||
|
|
@ -60,12 +55,6 @@ const ApplicationCardsWrapper = styled.div`
|
|||
font-size: ${props => props.theme.fontSizes[4]}px;
|
||||
`;
|
||||
|
||||
const OrgName = styled.div`
|
||||
font-size: ${props => props.theme.fontSizes[6]}px;
|
||||
padding-top: ${props => props.theme.spaces[2]}px;
|
||||
padding-left: ${props => props.theme.spaces[5]}px;
|
||||
`;
|
||||
|
||||
const ApplicationAddCardWrapper = styled(Card)`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -135,9 +124,6 @@ class Applications extends Component<
|
|||
}
|
||||
|
||||
public render() {
|
||||
const applicationList = this.props.isFetchingApplications
|
||||
? getApplicationPayloads(8)
|
||||
: this.props.applicationList;
|
||||
const Form: any = InviteUsersFormv2;
|
||||
const DropdownProps = (
|
||||
user: User,
|
||||
|
|
@ -215,7 +201,7 @@ class Applications extends Component<
|
|||
/>
|
||||
<PageSectionDivider />
|
||||
{this.props.userOrgs &&
|
||||
this.props.userOrgs.length != 0 &&
|
||||
this.props.userOrgs.length !== 0 &&
|
||||
this.props.userOrgs.map((organizationObject: any) => {
|
||||
const { organization, applications } = organizationObject;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import {
|
|||
InjectedFormProps,
|
||||
FormSubmitHandler,
|
||||
formValueSelector,
|
||||
Field,
|
||||
} from "redux-form";
|
||||
import {
|
||||
HTTP_METHOD_OPTIONS,
|
||||
|
|
@ -29,7 +28,6 @@ import CollapsibleHelp from "components/designSystems/appsmith/help/CollapsibleH
|
|||
import KeyValueFieldArray from "components/editorComponents/form/fields/KeyValueFieldArray";
|
||||
import PostBodyData from "./PostBodyData";
|
||||
import ApiResponseView from "components/editorComponents/ApiResponseView";
|
||||
import _ from "lodash";
|
||||
import EntityNameComponent from "components/editorComponents/EntityNameComponent";
|
||||
import { editApiName, saveApiName } from "actions/actionActions";
|
||||
import { ApiNameValidation } from "reducers/uiReducers/apiPaneReducer";
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class ApiSidebar extends React.Component<Props> {
|
|||
};
|
||||
|
||||
handleCreateNewApiClick = (selectedPageId: string) => {
|
||||
const { history, createNewApiAction } = this.props;
|
||||
const { history } = this.props;
|
||||
const { pageId, applicationId } = this.props.match.params;
|
||||
history.push(
|
||||
API_EDITOR_URL_WITH_SELECTED_PAGE_ID(
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import React, { useEffect } from "react";
|
||||
import { Route } from "react-router-dom";
|
||||
import { useDispatch } from "react-redux";
|
||||
import {
|
||||
useShowPropertyPane,
|
||||
useWidgetSelection,
|
||||
} from "utils/hooks/dragResizeHooks";
|
||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||
import { setCurrentUserDetails } from "actions/userActions";
|
||||
|
||||
export const WrappedComponent = (props: any) => {
|
||||
const showPropertyPane = useShowPropertyPane();
|
||||
|
|
@ -31,8 +29,6 @@ const AppRoute = ({
|
|||
name: string;
|
||||
location?: any;
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
if (!rest.logDisable) {
|
||||
AnalyticsUtil.logEvent("NAVIGATE_EDITOR", {
|
||||
|
|
|
|||
|
|
@ -1,55 +1,8 @@
|
|||
import React from "react";
|
||||
import Badge from "./Badge";
|
||||
import { Directions } from "utils/helpers";
|
||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||
import { getOnSelectAction, DropdownOnSelectActions } from "./dropdownHelpers";
|
||||
import DropdownComponent, { CustomizedDropdownProps } from "./index";
|
||||
import { Org } from "constants/orgConstants";
|
||||
import { CustomizedDropdownProps } from "./index";
|
||||
import { User } from "constants/userConstants";
|
||||
import FormDialogComponent from "components/editorComponents/form/FormDialogComponent";
|
||||
import CreateOrganizationForm from "pages/organization/CreateOrganizationForm";
|
||||
|
||||
const switchdropdown = (
|
||||
orgs: Org[],
|
||||
currentOrg: Org,
|
||||
): CustomizedDropdownProps => ({
|
||||
sections: [
|
||||
{
|
||||
isSticky: true,
|
||||
options: [
|
||||
{
|
||||
content: (
|
||||
<FormDialogComponent
|
||||
trigger="Create Organization"
|
||||
Form={CreateOrganizationForm}
|
||||
title="Create Organization"
|
||||
/>
|
||||
),
|
||||
shouldCloseDropdown: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
options: orgs
|
||||
.filter(org => org.id !== currentOrg.id)
|
||||
.map(org => ({
|
||||
content: org.name,
|
||||
onSelect: () =>
|
||||
getOnSelectAction(DropdownOnSelectActions.DISPATCH, {
|
||||
type: ReduxActionTypes.SWITCH_ORGANIZATION_INIT,
|
||||
payload: {
|
||||
orgId: org.id,
|
||||
},
|
||||
}),
|
||||
})),
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
text: "Switch Organization",
|
||||
},
|
||||
openDirection: Directions.RIGHT,
|
||||
openOnHover: true,
|
||||
});
|
||||
|
||||
export const options = (
|
||||
user: User,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const PageHeader = (props: PageHeaderProps) => {
|
|||
<StyledPageHeader>
|
||||
<LogoContainer>
|
||||
<a href="/applications">
|
||||
<img className="logoimg" src={Logo} />
|
||||
<img className="logoimg" src={Logo} alt="Appsmith Logo" />
|
||||
</a>
|
||||
</LogoContainer>
|
||||
<StyledDropDownContainer>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,20 @@
|
|||
import React, { useEffect } from "react";
|
||||
import styled from "styled-components";
|
||||
import TagListField from "components/editorComponents/form/fields/TagListField";
|
||||
import FormGroup from "components/editorComponents/form/FormGroup";
|
||||
import { reduxForm } from "redux-form";
|
||||
import SelectField from "components/editorComponents/form/fields/SelectField";
|
||||
import Button from "components/editorComponents/Button";
|
||||
import { connect } from "react-redux";
|
||||
import { AppState } from "reducers";
|
||||
import {
|
||||
getRoles,
|
||||
getDefaultRole,
|
||||
getRolesForField,
|
||||
getAllUsers,
|
||||
} from "selectors/organizationSelectors";
|
||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||
import { InviteUsersToOrgFormValues, inviteUsersToOrg } from "./helpers";
|
||||
import { OrgRole } from "constants/orgConstants";
|
||||
import { INVITE_USERS_TO_ORG_FORM } from "constants/forms";
|
||||
import { Classes } from "@blueprintjs/core";
|
||||
import { noop } from "lodash";
|
||||
import FormMessage from "components/editorComponents/form/FormMessage";
|
||||
import {
|
||||
INVITE_USERS_SUBMIT_SUCCESS,
|
||||
|
|
@ -89,11 +85,13 @@ const InviteUsersForm = (props: any) => {
|
|||
submitFailed,
|
||||
submitSucceeded,
|
||||
error,
|
||||
fetchUser,
|
||||
fetchAllRoles,
|
||||
} = props;
|
||||
useEffect(() => {
|
||||
props.fetchUser(props.orgId);
|
||||
props.fetchAllRoles(props.orgId);
|
||||
}, [props.orgId]);
|
||||
fetchUser(props.orgId);
|
||||
fetchAllRoles(props.orgId);
|
||||
}, [props.orgId, fetchUser, fetchAllRoles]);
|
||||
|
||||
return (
|
||||
<StyledForm>
|
||||
|
|
|
|||
|
|
@ -1,27 +1,23 @@
|
|||
import React, { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Icon } from "@blueprintjs/core";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
GridComponent,
|
||||
ColumnsDirective,
|
||||
ColumnDirective,
|
||||
} from "@syncfusion/ej2-react-grids";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { AppState } from "reducers";
|
||||
import {
|
||||
getCurrentOrg,
|
||||
getAllUsers,
|
||||
getAllRoles,
|
||||
getOrgs,
|
||||
} from "selectors/organizationSelectors";
|
||||
import { ORG_INVITE_USERS_PAGE_URL } from "constants/routes";
|
||||
import PageSectionDivider from "pages/common/PageSectionDivider";
|
||||
import PageSectionHeader from "pages/common/PageSectionHeader";
|
||||
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
||||
import InviteUsersFormv2 from "pages/organization/InviteUsersFromv2";
|
||||
import Button from "components/editorComponents/Button";
|
||||
import { Org, OrgUser, Organization } from "constants/orgConstants";
|
||||
import { OrgUser, Organization } from "constants/orgConstants";
|
||||
import { Menu, MenuItem, Popover, Position } from "@blueprintjs/core";
|
||||
import styled from "styled-components";
|
||||
import { FormIcons } from "icons/FormIcons";
|
||||
|
|
@ -87,7 +83,6 @@ const StyledMenu = styled(Menu)`
|
|||
`;
|
||||
|
||||
export const OrgSettings = (props: PageProps) => {
|
||||
const history = useHistory();
|
||||
const {
|
||||
match: {
|
||||
params: { orgId },
|
||||
|
|
@ -95,6 +90,9 @@ export const OrgSettings = (props: PageProps) => {
|
|||
deleteOrgUser,
|
||||
changeOrgUserRole,
|
||||
allOrgs,
|
||||
fetchUser,
|
||||
fetchAllRoles,
|
||||
getAllApplication,
|
||||
} = props;
|
||||
|
||||
const userTableData = props.allUsers.map(user => ({
|
||||
|
|
@ -105,10 +103,10 @@ export const OrgSettings = (props: PageProps) => {
|
|||
const currentOrgName = currentOrg?.organization.name ?? "";
|
||||
|
||||
useEffect(() => {
|
||||
props.fetchUser(orgId);
|
||||
props.fetchAllRoles(orgId);
|
||||
props.getAllApplication();
|
||||
}, [orgId]);
|
||||
fetchUser(orgId);
|
||||
fetchAllRoles(orgId);
|
||||
getAllApplication();
|
||||
}, [orgId, fetchUser, fetchAllRoles, getAllApplication]);
|
||||
|
||||
const Dropdown = (props: DropdownProps) => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import {
|
|||
} from "constants/ReduxActionConstants";
|
||||
import { Organization } from "constants/orgConstants";
|
||||
import { ERROR_MESSAGE_CREATE_APPLICATION } from "constants/messages";
|
||||
import { getApplicationPayload } from "mockComponentProps/ApplicationPayloads";
|
||||
|
||||
const initialState: ApplicationsReduxState = {
|
||||
isFetchingApplications: false,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import ApplicationApi, {
|
|||
ApplicationPagePayload,
|
||||
SetDefaultPageRequest,
|
||||
DeleteApplicationRequest,
|
||||
GetAllApplicationResponse,
|
||||
FetchUsersApplicationsOrgsResponse,
|
||||
OrganizationApplicationObject,
|
||||
ApplicationObject,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import OrgApi, {
|
|||
CreateOrgRequest,
|
||||
FetchAllUsersResponse,
|
||||
FetchAllUsersRequest,
|
||||
FetchAllRolesRequest,
|
||||
FetchAllRolesResponse,
|
||||
DeleteOrgUserRequest,
|
||||
ChangeUserRoleRequest,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import UserApi, {
|
|||
ForgotPasswordRequest,
|
||||
VerifyTokenRequest,
|
||||
TokenPasswordUpdateRequest,
|
||||
FetchUserRequest,
|
||||
FetchUserResponse,
|
||||
SwitchUserOrgRequest,
|
||||
AddUserToOrgRequest,
|
||||
} from "api/UserApi";
|
||||
|
|
@ -25,11 +23,6 @@ import {
|
|||
getResponseErrorMessage,
|
||||
callAPI,
|
||||
} from "./ErrorSagas";
|
||||
import * as Sentry from "@sentry/browser";
|
||||
|
||||
import { fetchOrgsSaga } from "./OrgSagas";
|
||||
|
||||
import { resetAuthExpiration } from "utils/storage";
|
||||
import {
|
||||
logoutUserSuccess,
|
||||
logoutUserError,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { createSelector } from "reselect";
|
||||
import { AppState } from "reducers";
|
||||
import { OrgRole, Org, Organization } from "constants/orgConstants";
|
||||
import { OrgRole, Organization } from "constants/orgConstants";
|
||||
|
||||
export const getRolesFromState = (state: AppState) => {
|
||||
return state.ui.orgs.roles;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class FormWidget extends ContainerWidget {
|
|||
getFormData(formWidget: ContainerWidgetProps<WidgetProps>) {
|
||||
const formData: any = {};
|
||||
if (formWidget.children)
|
||||
formWidget.children.map(widgetData => {
|
||||
formWidget.children.forEach(widgetData => {
|
||||
if (widgetData.value) {
|
||||
formData[widgetData.widgetName] = widgetData.value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user