@@ -50,8 +66,10 @@ export default function Group({ name, settings }: GroupProps) {
{settings &&
settings.map((setting) => {
if (
- setting.isVisible &&
- !setting.isVisible(formValuesSelector(state))
+ (setting.isVisible &&
+ !setting.isVisible(formValuesSelector(state))) ||
+ (setting.category !== category &&
+ setting.category !== subCategory)
) {
return null;
}
@@ -79,11 +97,19 @@ export default function Group({ name, settings }: GroupProps) {
case SettingTypes.LINK:
return (
-
+ setting.label || "")}
+ type="Info"
+ url={setting.url}
+ />
);
case SettingTypes.TEXT:
@@ -113,7 +139,12 @@ export default function Group({ name, settings }: GroupProps) {
data-testid="admin-settings-group"
key={setting.name}
>
-
+
);
}
diff --git a/app/client/src/pages/Settings/LeftPane.tsx b/app/client/src/pages/Settings/LeftPane.tsx
index 10b5eba741..e6f27bd42a 100644
--- a/app/client/src/pages/Settings/LeftPane.tsx
+++ b/app/client/src/pages/Settings/LeftPane.tsx
@@ -3,7 +3,8 @@ import { getAdminSettingsCategoryUrl } from "constants/routes";
import React from "react";
import { Link, useParams } from "react-router-dom";
import styled from "styled-components";
-import { SettingsFactory } from "./SettingsConfig";
+import AdminConfig from "./config";
+import { Category } from "@appsmith/pages/AdminSettings/config/types";
const Wrapper = styled.div`
flex-basis: ${(props) =>
@@ -15,19 +16,22 @@ const Wrapper = styled.div`
const HeaderContainer = styled.div``;
const StyledHeader = styled.div`
- font-size: 20px;
- text-transform: capitalize;
+ font-size: 14px;
+ height: 20px;
+ line-height: 17px;
+ letter-spacing: -0.24px;
+ text-transform: uppercase;
margin: 40px 16px 16px;
color: ${Colors.MASALA};
`;
const CategoryList = styled.ul`
margin: 0;
- padding: 0;
+ padding: 0 0 0 16px;
list-style-type: none;
`;
-const Category = styled.li``;
+const CategoryItem = styled.li``;
const StyledLink = styled(Link)<{ $active: boolean }>`
height: 38px;
@@ -51,43 +55,68 @@ const StyledLink = styled(Link)<{ $active: boolean }>`
`;
function useSettingsCategory() {
- return Array.from(SettingsFactory.categories)
- .map((setting: string) => {
- return {
- label: setting.replace(/-/g, " "),
- slug: setting,
- };
- })
- .sort((a, b) => {
- if (a.label == "general") return -1;
- else if (b.label == "general") return 1;
- if (a.label == "advanced") return 1;
- else if (b.label == "advanced") return -1;
- return a.label < b.label ? -1 : 1;
- });
+ return Array.from(AdminConfig.categories);
+}
+
+function Categories({
+ categories,
+ currentCategory,
+ currentSubCategory,
+ parentCategory,
+ showSubCategory,
+}: {
+ categories?: Category[];
+ parentCategory?: Category;
+ currentCategory: string;
+ currentSubCategory?: string;
+ showSubCategory?: boolean;
+}) {
+ return (
+
+ {categories?.map((config) => (
+
+
+ {config.title}
+
+ {showSubCategory && (
+
+ )}
+
+ ))}
+
+ );
}
export default function LeftPane() {
const categories = useSettingsCategory();
- const { category } = useParams() as any;
+ const { category, subCategory } = useParams() as any;
return (
Appsmith Admin
-
- {categories.map((config) => (
-
-
- {config.label}
-
-
- ))}
-
+
);
}
diff --git a/app/client/src/pages/Settings/Main.tsx b/app/client/src/pages/Settings/Main.tsx
index 2e43ea2dbd..276aa54d1d 100644
--- a/app/client/src/pages/Settings/Main.tsx
+++ b/app/client/src/pages/Settings/Main.tsx
@@ -1,230 +1,27 @@
-import React, { useCallback, useEffect } from "react";
-import { Icon } from "@blueprintjs/core";
-import { saveSettings } from "actions/settingsAction";
-import Button, { Category } from "components/ads/Button";
-import { SETTINGS_FORM_NAME } from "constants/forms";
-import { createMessage } from "constants/messages";
-import { ReduxActionTypes } from "constants/ReduxActionConstants";
-import {
- APPLICATIONS_URL,
- ADMIN_SETTINGS_CATEGORY_DEFAULT_URL,
-} from "constants/routes";
-import _ from "lodash";
-import ProductUpdatesModal from "pages/Applications/ProductUpdatesModal";
-import { connect, useDispatch } from "react-redux";
-import {
- Redirect,
- RouteComponentProps,
- useParams,
- withRouter,
-} from "react-router";
-import { AppState } from "reducers";
-import { formValueSelector, InjectedFormProps, reduxForm } from "redux-form";
-import {
- getSettings,
- getSettingsSavingState,
- getShowReleaseNotes,
-} from "selectors/settingsSelectors";
-import styled from "styled-components";
-import history from "utils/history";
-import Group from "./Main/group";
-import RestartBanner from "./RestartBanner";
-import { SettingsFactory, SettingTypes } from "./SettingsConfig";
+import AdminConfig from "./config";
+import { Redirect, useParams } from "react-router";
+import { SettingCategories } from "@appsmith/pages/AdminSettings/config/types";
+import { ADMIN_SETTINGS_CATEGORY_DEFAULT_URL } from "../../constants/routes";
+import React from "react";
+import SettingsForm from "./SettingsForm";
-const Wrapper = styled.div`
- flex-basis: calc(100% - ${(props) => props.theme.homePage.leftPane.width}px);
- padding-left: ${(props) =>
- props.theme.homePage.leftPane.rightMargin +
- props.theme.homePage.leftPane.leftPadding}px;
- padding-top: 40px;
- height: calc(100vh - ${(props) => props.theme.homePage.header}px);
- overflow: auto;
-`;
+const Main = () => {
+ const params = useParams() as any;
+ const { category, subCategory } = params;
+ const wrapperCategory =
+ AdminConfig.wrapperCategories[subCategory ?? category];
-const BackButton = styled.div`
- display: inline-block;
- cursor: pointer;
-`;
-
-const BackButtonText = styled.span``;
-
-const SettingsFormWrapper = styled.div``;
-
-const SettingsButtonWrapper = styled.div`
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- height: ${(props) => props.theme.settings.footerHeight}px;
- padding: ${(props) => props.theme.spaces[11]}px 0px 0px
- ${(props) =>
- props.theme.spaces[6] +
- props.theme.homePage.leftPane.leftPadding +
- props.theme.homePage.leftPane.rightMargin +
- props.theme.homePage.leftPane.width}px;
- box-shadow: ${(props) => props.theme.settings.footerShadow};
- z-index: 2;
- background-color: ${(props) => props.theme.colors.homepageBackground};
-`;
-
-const StyledButton = styled(Button)`
- height: 24px;
- display: inline-block;
- margin-right: 16px;
-`;
-
-const StyledSaveButton = styled(StyledButton)`
- width: 128px;
- height: 38px;
-
- & .cs-spinner {
- top: 11px;
- }
-`;
-
-const StyledClearButton = styled(StyledButton)`
- width: 68px;
- height: 38px;
-`;
-
-export const BottomSpace = styled.div`
- height: ${(props) => props.theme.settings.footerHeight + 20}px;
-`;
-
-export const SettingsHeader = styled.h2`
- font-size: 24px;
- font-weight: 500;
- text-transform: capitalize;
- margin-bottom: 0;
-`;
-
-type MainProps = {
- settings: Record;
- settingsConfig: Record;
- isSaving: boolean;
- showReleaseNotes: boolean;
-};
-
-function getSettingLabel(name = "") {
- return name.replace(/-/g, " ");
-}
-
-function useSettings(category: string) {
- return SettingsFactory.get(category);
-}
-
-export function Main(
- props: InjectedFormProps & RouteComponentProps & MainProps,
-) {
- const { category } = useParams() as any;
- const settings = useSettings(category);
- const dispatch = useDispatch();
- const isSavable = SettingsFactory.savableCategories.has(category);
- const onBack = () => {
- history.push(APPLICATIONS_URL);
- };
- const onSave = () => {
- dispatch(saveSettings(props.settings));
- };
-
- const onClear = () => {
- _.forEach(props.settingsConfig, (value, settingName) => {
- const setting = SettingsFactory.settingsMap[settingName];
- if (setting && setting.controlType == SettingTypes.TOGGLE) {
- props.settingsConfig[settingName] =
- props.settingsConfig[settingName].toString() == "true";
- }
- });
- props.initialize(props.settingsConfig);
- };
-
- useEffect(onClear, []);
-
- const onReleaseNotesClose = useCallback(() => {
- dispatch({
- type: ReduxActionTypes.TOGGLE_RELEASE_NOTES,
- payload: false,
- });
- }, []);
-
- if (!SettingsFactory.categories.has(category)) {
+ if (!!wrapperCategory && !!wrapperCategory.component) {
+ const { component: WrapperCategoryComponent } = wrapperCategory;
+ return ;
+ } else if (
+ !Object.values(SettingCategories).includes(category) ||
+ (subCategory && !Object.values(SettingCategories).includes(subCategory))
+ ) {
return ;
+ } else {
+ return ;
}
-
- return (
-
-
-
- Back
-
-
- {getSettingLabel(category)} settings
-
- {isSavable && (
-
- "Save & Restart")}
- />
- "Reset")}
- />
-
- )}
-
-
- {props.showReleaseNotes && (
-
- )}
-
-
- );
-}
-
-const validate = (values: Record) => {
- const errors: any = {};
- _.filter(values, (value, name) => {
- const message = SettingsFactory.validate(name, value);
- if (message) {
- errors[name] = message;
- }
- });
- return errors;
};
-const selector = formValueSelector(SETTINGS_FORM_NAME);
-export default withRouter(
- connect((state: AppState) => {
- const settingsConfig = getSettings(state);
- const newProps: any = {
- settings: {},
- settingsConfig,
- isSaving: getSettingsSavingState(state),
- showReleaseNotes: getShowReleaseNotes(state),
- };
- _.forEach(SettingsFactory.settingsMap, (setting, name) => {
- const fieldValue = selector(state, name);
-
- if (fieldValue !== settingsConfig[name]) {
- newProps.settings[name] = fieldValue;
- }
- });
- return newProps;
- }, null)(
- reduxForm({
- validate,
- form: SETTINGS_FORM_NAME,
- touchOnBlur: true,
- })(Main),
- ),
-);
+export default Main;
diff --git a/app/client/src/pages/Settings/RestartBanner.tsx b/app/client/src/pages/Settings/RestartBanner.tsx
index 4150d833ad..c26bb8ac69 100644
--- a/app/client/src/pages/Settings/RestartBanner.tsx
+++ b/app/client/src/pages/Settings/RestartBanner.tsx
@@ -15,19 +15,20 @@ import {
RESTART_BANNER_HEADER,
RESTART_ERROR_BODY,
RESTART_ERROR_HEADER,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const HeaderContents = styled.div`
display: flex;
- justify-content: space-between;
+ justify-content: center;
align-items: center;
- padding-bottom: ${(props) => props.theme.spaces[7]}px;
+ padding-bottom: ${(props) => props.theme.spaces[3]}px;
`;
const Heading = styled.div`
color: ${(props) => props.theme.colors.modal.headerText};
display: flex;
justify-content: center;
+ align-items: baseline;
font-weight: ${(props) => props.theme.typography.h1.fontWeight};
font-size: ${(props) => props.theme.typography.h1.fontSize}px;
line-height: ${(props) => props.theme.typography.h1.lineHeight}px;
@@ -35,11 +36,11 @@ const Heading = styled.div`
`;
const RestartMessage = styled.p`
- transform: translate(0, -16px);
+ text-align: center;
`;
const StyledSpinner = styled.span`
- transform: translate(16px, 1px);
+ margin-left: 10px;
`;
function Header() {
diff --git a/app/client/src/pages/Settings/SaveSettings.tsx b/app/client/src/pages/Settings/SaveSettings.tsx
new file mode 100644
index 0000000000..4ebf974f10
--- /dev/null
+++ b/app/client/src/pages/Settings/SaveSettings.tsx
@@ -0,0 +1,72 @@
+import Button, { Category } from "components/ads/Button";
+import { createMessage } from "@appsmith/constants/messages";
+import React from "react";
+import styled from "styled-components";
+
+const StyledButton = styled(Button)`
+ height: 24px;
+ display: inline-block;
+ margin-right: 16px;
+`;
+
+const StyledSaveButton = styled(StyledButton)`
+ width: 128px;
+ height: 38px;
+
+ & .cs-spinner {
+ top: 11px;
+ }
+`;
+
+const StyledClearButton = styled(StyledButton)`
+ width: 68px;
+ height: 38px;
+`;
+
+const SettingsButtonWrapper = styled.div`
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: ${(props) => props.theme.settings.footerHeight}px;
+ padding: ${(props) => props.theme.spaces[11]}px 0px 0px
+ ${(props) =>
+ props.theme.homePage.leftPane.leftPadding +
+ props.theme.homePage.leftPane.width +
+ props.theme.homePage.main.marginLeft -
+ props.theme.spaces[11]}px;
+ box-shadow: ${(props) => props.theme.settings.footerShadow};
+ z-index: 2;
+ background-color: ${(props) => props.theme.colors.homepageBackground};
+`;
+
+const saveAdminSettings = (props: {
+ isSaving?: boolean;
+ onSave?: () => void;
+ onClear?: () => void;
+ settings: Record;
+ valid: boolean;
+}) => {
+ return (
+
+ "Save & Restart")}
+ />
+ "Reset")}
+ />
+
+ );
+};
+export default saveAdminSettings;
diff --git a/app/client/src/pages/Settings/SettingsBreadcrumbs.tsx b/app/client/src/pages/Settings/SettingsBreadcrumbs.tsx
new file mode 100644
index 0000000000..5618610511
--- /dev/null
+++ b/app/client/src/pages/Settings/SettingsBreadcrumbs.tsx
@@ -0,0 +1,26 @@
+import React from "react";
+import Breadcrumbs from "components/ads/Breadcrumbs";
+import { BreadcrumbCategories } from "@appsmith/pages/AdminSettings/BreadcrumbCategories";
+
+export const getBreadcrumbList = (category: string, subCategory?: string) => {
+ const breadcrumbList = [
+ BreadcrumbCategories.HOMEPAGE,
+ ...(subCategory
+ ? [BreadcrumbCategories[category], BreadcrumbCategories[subCategory]]
+ : [BreadcrumbCategories[category]]),
+ ];
+
+ return breadcrumbList;
+};
+
+function SettingsBreadcrumbs({
+ category,
+ subCategory,
+}: {
+ category: string;
+ subCategory?: string;
+}) {
+ return ;
+}
+
+export default SettingsBreadcrumbs;
diff --git a/app/client/src/pages/Settings/SettingsConfig.ts b/app/client/src/pages/Settings/SettingsConfig.ts
deleted file mode 100644
index da794ed81a..0000000000
--- a/app/client/src/pages/Settings/SettingsConfig.ts
+++ /dev/null
@@ -1,419 +0,0 @@
-import { apiRequestConfig } from "api/Api";
-import UserApi from "api/UserApi";
-import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
-import {
- EMAIL_SETUP_DOC,
- GITHUB_SIGNUP_SETUP_DOC,
- GOOGLE_MAPS_SETUP_DOC,
- GOOGLE_SIGNUP_SETUP_DOC,
-} from "constants/ThirdPartyConstants";
-import { isNil, omitBy } from "lodash";
-import { Dispatch } from "react";
-import { isEmail } from "utils/formhelpers";
-
-export enum SettingTypes {
- TEXTINPUT = "TEXTINPUT",
- TOGGLE = "TOGGLE",
- LINK = "LINK",
- BUTTON = "BUTTON",
- GROUP = "GROUP",
- TEXT = "TEXT",
-}
-
-export enum SettingSubtype {
- EMAIL = "email",
- TEXT = "text",
- NUMBER = "number",
- PASSWORD = "password",
-}
-
-export type Setting = {
- category: string;
- controlType: SettingTypes;
- controlSubType?: SettingSubtype;
- helpText?: string;
- label?: string;
- name?: string;
- placeholder?: string;
- validate?: (value: string, setting?: Setting) => string | void;
- url?: string;
- children?: any;
- subCategory?: string;
- value?: string;
- text?: string;
- action?: (
- dispatch?: Dispatch>,
- settings?: Record,
- ) => void;
- sortOrder?: number;
- subText?: string;
- toggleText?: (value: boolean) => string;
- isVisible?: (values: Record) => boolean;
- isHidden?: boolean;
- isDisabled?: (values: Record) => boolean;
-};
-
-export class SettingsFactory {
- static settingsMap: Record = {};
- static settings: Setting[] = [];
- static categories: Set = new Set();
- static savableCategories: Set = new Set();
- static sortOrder = 0;
- static subCategoryMap: Record = {};
-
- static register(name: string, options: Setting) {
- SettingsFactory.categories.add(options.category);
- SettingsFactory.settingsMap[name] = {
- ...options,
- sortOrder: ++SettingsFactory.sortOrder,
- };
- if (
- options.controlType !== SettingTypes.GROUP &&
- options.controlType !== SettingTypes.LINK &&
- options.controlType !== SettingTypes.TEXT
- ) {
- SettingsFactory.savableCategories.add(options.category);
- }
-
- if (options.subCategory) {
- if (
- !SettingsFactory.subCategoryMap[
- `${options.category}.${options.subCategory}`
- ]
- ) {
- SettingsFactory.subCategoryMap[
- `${options.category}.${options.subCategory}`
- ] = {
- name: options.subCategory,
- category: options.category,
- controlType: SettingTypes.GROUP,
- children: [],
- };
- SettingsFactory.settings.push(
- SettingsFactory.subCategoryMap[
- `${options.category}.${options.subCategory}`
- ],
- );
- }
- SettingsFactory.subCategoryMap[
- `${options.category}.${options.subCategory}`
- ].children.push({
- name,
- ...options,
- });
- } else {
- SettingsFactory.settings.push({
- name,
- ...options,
- });
- }
- }
-
- static validate(name: string, value: string) {
- const setting = SettingsFactory.settingsMap[name];
- if (setting?.validate) {
- return setting.validate(value, setting);
- }
-
- return "";
- }
-
- static get(category: string) {
- SettingsFactory.settings.forEach((setting) => {
- setting.isHidden = setting.category !== category;
- });
-
- return SettingsFactory.settings;
- }
-}
-
-//EMAIL
-SettingsFactory.register("APPSMITH_MAIL_READ_MORE", {
- category: "email",
- controlType: SettingTypes.LINK,
- label: "How to configure?",
- url: EMAIL_SETUP_DOC,
-});
-
-SettingsFactory.register("APPSMITH_MAIL_HOST", {
- category: "email",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "SMTP Host",
- placeholder: "email-smtp.us-east-2.amazonaws.com",
-});
-
-SettingsFactory.register("APPSMITH_MAIL_PORT", {
- category: "email",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.NUMBER,
- placeholder: "25",
- label: "SMTP Port",
- validate: (value: string) => {
- const port = parseInt(value);
- if (value && (typeof port != "number" || port < 0 || port > 65535)) {
- return "Please enter a valid port";
- }
- },
-});
-
-SettingsFactory.register("APPSMITH_MAIL_FROM", {
- category: "email",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "From Address",
- placeholder: "admin@appsmith.com",
- validate: (value: string) => {
- if (value && !isEmail(value)) {
- return "Please enter a valid email id";
- }
- },
- subText:
- "You will need to verify your from email address to begin sending emails",
-});
-
-SettingsFactory.register("APPSMITH_MAIL_SMTP_TLS_ENABLED", {
- category: "email",
- controlType: SettingTypes.TOGGLE,
- label: "TLS Protected Connection",
-});
-
-SettingsFactory.register("APPSMITH_MAIL_USERNAME", {
- category: "email",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "SMTP Username",
- isVisible: (values: Record) => {
- return values && values["APPSMITH_MAIL_SMTP_TLS_ENABLED"];
- },
-});
-
-SettingsFactory.register("APPSMITH_MAIL_PASSWORD", {
- category: "email",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.PASSWORD,
- label: "SMTP Password",
- isVisible: (values: Record) => {
- return values && values["APPSMITH_MAIL_SMTP_TLS_ENABLED"];
- },
-});
-
-SettingsFactory.register("APPSMITH_MAIL_TEST_EMAIL", {
- action: (dispatch, settings = {}) => {
- dispatch &&
- dispatch({
- type: ReduxActionTypes.SEND_TEST_EMAIL,
- payload: omitBy(
- {
- smtpHost: settings["APPSMITH_MAIL_HOST"],
- smtpPort: settings["APPSMITH_MAIL_PORT"],
- fromEmail: settings["APPSMITH_MAIL_FROM"],
- username: settings["APPSMITH_MAIL_USERNAME"],
- password: settings["APPSMITH_MAIL_PASSWORD"],
- },
- isNil,
- ),
- });
- },
- category: "email",
- controlType: SettingTypes.BUTTON,
- isDisabled: (settings: Record) => {
- return (
- !settings ||
- !settings["APPSMITH_MAIL_HOST"] ||
- !settings["APPSMITH_MAIL_FROM"]
- );
- },
- text: "Send Test Email",
-});
-
-//General
-SettingsFactory.register("APPSMITH_INSTANCE_NAME", {
- category: "general",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Instance Name",
- placeholder: "appsmith/prod",
-});
-
-SettingsFactory.register("APPSMITH_ADMIN_EMAILS", {
- category: "general",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.EMAIL,
- label: "Admin Email",
- subText:
- "Emails of the users who can modify instance settings (Comma Separated)",
- placeholder: "Jane@example.com",
- validate: (value: string) => {
- if (
- value &&
- !value
- .split(",")
- .reduce((prev, curr) => prev && isEmail(curr.trim()), true)
- ) {
- return "Please enter valid email id(s)";
- }
- },
-});
-
-SettingsFactory.register("APPSMITH_DOWNLOAD_DOCKER_COMPOSE_FILE", {
- action: () => {
- const { host, protocol } = window.location;
- window.open(
- `${protocol}//${host}${apiRequestConfig.baseURL}${UserApi.downloadConfigURL}`,
- "_blank",
- );
- },
- category: "general",
- controlType: SettingTypes.BUTTON,
- label: "Generated Docker Compose File",
- text: "Download",
-});
-
-SettingsFactory.register("APPSMITH_DISABLE_TELEMETRY", {
- category: "general",
- controlType: SettingTypes.TOGGLE,
- label: "Disable Sharing Anonymous Usage Data",
- subText: "Share anonymous usage data to help improve the product",
- toggleText: (value: boolean) => {
- if (value) {
- return "Don't share any data";
- } else {
- return "Share data & make appsmith better!";
- }
- },
-});
-
-//goolge maps
-SettingsFactory.register("APPSMITH_GOOGLE_MAPS_READ_MORE", {
- category: "google-maps",
- controlType: SettingTypes.LINK,
- label: "How to configure?",
- url: GOOGLE_MAPS_SETUP_DOC,
-});
-
-SettingsFactory.register("APPSMITH_GOOGLE_MAPS_API_KEY", {
- category: "google-maps",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Google Maps API Key",
-});
-
-//authentication
-SettingsFactory.register("APPSMITH_SIGNUP_DISABLED", {
- category: "authentication",
- subCategory: "form signup",
- controlType: SettingTypes.TOGGLE,
- label: "Signup",
- toggleText: (value: boolean) => {
- if (value) {
- return "Allow invited users to signup";
- } else {
- return " Allow all users to signup";
- }
- },
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GOOGLE_READ_MORE", {
- category: "authentication",
- subCategory: "google signup",
- controlType: SettingTypes.LINK,
- label: "How to configure?",
- url: GOOGLE_SIGNUP_SETUP_DOC,
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GOOGLE_CLIENT_ID", {
- category: "authentication",
- subCategory: "google signup",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Client ID",
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET", {
- category: "authentication",
- subCategory: "google signup",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Client Secret",
-});
-
-SettingsFactory.register("APPSMITH_SIGNUP_ALLOWED_DOMAINS", {
- category: "authentication",
- subCategory: "google signup",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Allowed Domains",
- placeholder: "domain1.com, domain2.com",
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GITHUB_READ_MORE", {
- category: "authentication",
- subCategory: "github signup",
- controlType: SettingTypes.LINK,
- label: "How to configure?",
- url: GITHUB_SIGNUP_SETUP_DOC,
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GITHUB_CLIENT_ID", {
- category: "authentication",
- subCategory: "github signup",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Client ID",
-});
-
-SettingsFactory.register("APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET", {
- category: "authentication",
- subCategory: "github signup",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Client Secret",
-});
-
-//version
-SettingsFactory.register("APPSMITH_CURRENT_VERSION", {
- category: "version",
- controlType: SettingTypes.TEXT,
- label: "Current version",
-});
-
-SettingsFactory.register("APPSMITH_VERSION_READ_MORE", {
- action: (dispatch?: Dispatch>) => {
- dispatch &&
- dispatch({
- type: ReduxActionTypes.TOGGLE_RELEASE_NOTES,
- payload: true,
- });
- },
- category: "version",
- controlType: SettingTypes.LINK,
- label: "Release Notes",
-});
-
-//Advanced
-SettingsFactory.register("APPSMITH_MONGODB_URI", {
- category: "advanced",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "MongoDB URI",
- subText:
- "Appsmith internally uses MongoDB. Change to an external MongoDb for Clustering",
-});
-
-SettingsFactory.register("APPSMITH_REDIS_URL", {
- category: "advanced",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Redis URL",
- subText:
- "Appsmith internally uses redis for session storage. Change this to an external redis for Clustering",
-});
-
-SettingsFactory.register("APPSMITH_CUSTOM_DOMAIN", {
- category: "advanced",
- controlType: SettingTypes.TEXTINPUT,
- controlSubType: SettingSubtype.TEXT,
- label: "Custom Domain",
- subText: "Custom domain for your Appsmith instance",
-});
diff --git a/app/client/src/pages/Settings/SettingsForm.tsx b/app/client/src/pages/Settings/SettingsForm.tsx
new file mode 100644
index 0000000000..600bef9aba
--- /dev/null
+++ b/app/client/src/pages/Settings/SettingsForm.tsx
@@ -0,0 +1,181 @@
+import React, { useCallback, useEffect } from "react";
+import { saveSettings } from "actions/settingsAction";
+import { SETTINGS_FORM_NAME } from "constants/forms";
+import { ReduxActionTypes } from "constants/ReduxActionConstants";
+import _ from "lodash";
+import ProductUpdatesModal from "pages/Applications/ProductUpdatesModal";
+import { connect, useDispatch } from "react-redux";
+import { RouteComponentProps, useParams, withRouter } from "react-router";
+import { AppState } from "reducers";
+import { formValueSelector, InjectedFormProps, reduxForm } from "redux-form";
+import {
+ getSettings,
+ getSettingsSavingState,
+ getShowReleaseNotes,
+} from "selectors/settingsSelectors";
+import styled from "styled-components";
+import Group from "./FormGroup/group";
+import RestartBanner from "./RestartBanner";
+import AdminConfig from "./config";
+import SaveAdminSettings from "./SaveSettings";
+import { SettingTypes } from "@appsmith/pages/AdminSettings/config/types";
+import SettingsBreadcrumbs from "./SettingsBreadcrumbs";
+
+const Wrapper = styled.div`
+ flex-basis: calc(100% - ${(props) => props.theme.homePage.leftPane.width}px);
+ margin-left: ${(props) => props.theme.homePage.main.marginLeft}px;
+ padding-top: 40px;
+ height: calc(100vh - ${(props) => props.theme.homePage.header}px);
+ overflow: auto;
+`;
+
+const SettingsFormWrapper = styled.div``;
+
+export const BottomSpace = styled.div`
+ height: ${(props) => props.theme.settings.footerHeight + 20}px;
+`;
+
+export const SettingsHeader = styled.h2`
+ font-size: 24px;
+ font-weight: 500;
+ text-transform: capitalize;
+ margin-bottom: 0;
+`;
+
+export const SettingsSubHeader = styled.div`
+ font-size: 12px;
+`;
+
+type FormProps = {
+ settings: Record;
+ settingsConfig: Record;
+ isSaving: boolean;
+ showReleaseNotes: boolean;
+};
+
+function getSettingLabel(name = "") {
+ return name.replace(/-/g, "");
+}
+
+function getSettingDetail(category: string, subCategory: string) {
+ return AdminConfig.getCategoryDetails(category, subCategory);
+}
+
+function useSettings(category: string, subCategory?: string) {
+ return AdminConfig.get(subCategory ?? category);
+}
+
+export function SettingsForm(
+ props: InjectedFormProps & RouteComponentProps & FormProps,
+) {
+ const params = useParams() as any;
+ const { category, subCategory } = params;
+ const settings = useSettings(category, subCategory);
+ const details = getSettingDetail(category, subCategory);
+ const dispatch = useDispatch();
+ const isSavable = AdminConfig.savableCategories.includes(
+ subCategory ?? category,
+ );
+
+ const onSave = () => {
+ dispatch(saveSettings(props.settings));
+ };
+
+ const onClear = () => {
+ _.forEach(props.settingsConfig, (value, settingName) => {
+ const setting = AdminConfig.settingsMap[settingName];
+ if (setting && setting.controlType == SettingTypes.TOGGLE) {
+ props.settingsConfig[settingName] =
+ props.settingsConfig[settingName].toString() == "true";
+
+ if (
+ typeof props.settingsConfig["APPSMITH_SIGNUP_DISABLED"] ===
+ "undefined"
+ ) {
+ props.settingsConfig["APPSMITH_SIGNUP_DISABLED"] = true;
+ }
+ }
+ });
+ props.initialize(props.settingsConfig);
+ };
+
+ useEffect(onClear, []);
+
+ const onReleaseNotesClose = useCallback(() => {
+ dispatch({
+ type: ReduxActionTypes.TOGGLE_RELEASE_NOTES,
+ payload: false,
+ });
+ }, []);
+
+ return (
+
+
+
+
+ {getSettingLabel(details?.title || (subCategory ?? category))}
+
+ {details?.subText && (
+ {details.subText}
+ )}
+
+ {isSavable && (
+
+ )}
+
+
+ {props.showReleaseNotes && (
+
+ )}
+
+
+ );
+}
+
+const validate = (values: Record) => {
+ const errors: any = {};
+ _.filter(values, (value, name) => {
+ const message = AdminConfig.validate(name, value);
+ if (message) {
+ errors[name] = message;
+ }
+ });
+ return errors;
+};
+
+const selector = formValueSelector(SETTINGS_FORM_NAME);
+export default withRouter(
+ connect((state: AppState) => {
+ const settingsConfig = getSettings(state);
+ const newProps: any = {
+ settings: {},
+ settingsConfig,
+ isSaving: getSettingsSavingState(state),
+ showReleaseNotes: getShowReleaseNotes(state),
+ };
+ _.forEach(AdminConfig.settingsMap, (setting, name) => {
+ const fieldValue = selector(state, name);
+
+ if (fieldValue !== settingsConfig[name]) {
+ newProps.settings[name] = fieldValue;
+ }
+ });
+ return newProps;
+ }, null)(
+ reduxForm({
+ validate,
+ form: SETTINGS_FORM_NAME,
+ touchOnBlur: true,
+ })(SettingsForm),
+ ),
+);
diff --git a/app/client/src/pages/Settings/config/ConfigFactory.ts b/app/client/src/pages/Settings/config/ConfigFactory.ts
new file mode 100644
index 0000000000..592f66bd32
--- /dev/null
+++ b/app/client/src/pages/Settings/config/ConfigFactory.ts
@@ -0,0 +1,88 @@
+import {
+ AdminConfigType,
+ Category,
+ Setting,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+export class ConfigFactory {
+ static settingsMap: Record = {};
+ static settings: Setting[] = [];
+ static categories: Category[] = [];
+ static wrapperCategories: Record = {};
+ static savableCategories: string[] = [];
+
+ static registerSettings(config: AdminConfigType): void {
+ config?.settings?.forEach((item) => {
+ ConfigFactory.settingsMap[item.id] = {
+ ...item,
+ };
+ ConfigFactory.settings.push({
+ name: item.id,
+ ...item,
+ });
+ });
+ config?.children?.forEach((child) => ConfigFactory.registerSettings(child));
+ }
+
+ static getCategory(config: AdminConfigType): Category {
+ if (config.controlType === SettingTypes.PAGE) {
+ ConfigFactory.wrapperCategories[config.type] = config;
+ }
+ if (config.canSave) {
+ ConfigFactory.savableCategories.push(config.type);
+ }
+
+ return {
+ title: config.title,
+ slug: config.type,
+ subText: config.subText,
+ children: config?.children?.map((child) =>
+ ConfigFactory.getCategory(child),
+ ),
+ };
+ }
+
+ static registerCategory(config: AdminConfigType): void {
+ ConfigFactory.categories.push(ConfigFactory.getCategory(config));
+ }
+
+ static register(config: AdminConfigType) {
+ ConfigFactory.registerSettings(config);
+ ConfigFactory.registerCategory(config);
+ }
+
+ static validate(name: string, value: string) {
+ const setting = ConfigFactory.settingsMap[name];
+ if (setting?.validate) {
+ return setting.validate(value, setting);
+ }
+
+ return "";
+ }
+
+ static get(category: string) {
+ ConfigFactory.settings.forEach((setting) => {
+ setting.isHidden = setting.category !== category;
+ });
+
+ return ConfigFactory.settings;
+ }
+
+ static getCategoryDetails(
+ currentCategory: string,
+ currentSubCategory: string,
+ ) {
+ if (
+ currentSubCategory &&
+ ConfigFactory.wrapperCategories[currentCategory].children
+ ) {
+ return ConfigFactory.wrapperCategories[currentCategory].children?.find(
+ (category) => category.type === currentSubCategory,
+ );
+ } else {
+ return ConfigFactory.categories.find(
+ (category) => category.slug === currentCategory,
+ );
+ }
+ }
+}
diff --git a/app/client/src/pages/Settings/config/advanced.ts b/app/client/src/pages/Settings/config/advanced.ts
new file mode 100644
index 0000000000..323c424785
--- /dev/null
+++ b/app/client/src/pages/Settings/config/advanced.ts
@@ -0,0 +1,40 @@
+import {
+ AdminConfigType,
+ SettingCategories,
+ SettingSubtype,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+export const config: AdminConfigType = {
+ type: SettingCategories.ADVANCED,
+ controlType: SettingTypes.GROUP,
+ title: "Advanced",
+ canSave: true,
+ settings: [
+ {
+ id: "APPSMITH_MONGODB_URI",
+ category: "advanced",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "MongoDB URI",
+ subText:
+ "Appsmith internally uses MongoDB. Change to an external MongoDb for Clustering",
+ },
+ {
+ id: "APPSMITH_REDIS_URL",
+ category: "advanced",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "Redis URL",
+ subText:
+ "Appsmith internally uses redis for session storage. Change this to an external redis for Clustering",
+ },
+ {
+ id: "APPSMITH_CUSTOM_DOMAIN",
+ category: "advanced",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "Custom Domain",
+ subText: "Custom domain for your Appsmith instance",
+ },
+ ],
+};
diff --git a/app/client/src/pages/Settings/config/email.ts b/app/client/src/pages/Settings/config/email.ts
new file mode 100644
index 0000000000..ff638f4028
--- /dev/null
+++ b/app/client/src/pages/Settings/config/email.ts
@@ -0,0 +1,122 @@
+import { EMAIL_SETUP_DOC } from "../../../constants/ThirdPartyConstants";
+import { isEmail } from "../../../utils/formhelpers";
+import { Dispatch } from "react";
+import {
+ ReduxAction,
+ ReduxActionTypes,
+} from "../../../constants/ReduxActionConstants";
+import { isNil, omitBy } from "lodash";
+import {
+ AdminConfigType,
+ SettingCategories,
+ SettingSubtype,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+
+export const config: AdminConfigType = {
+ type: SettingCategories.EMAIL,
+ controlType: SettingTypes.GROUP,
+ title: "Email",
+ canSave: true,
+ settings: [
+ {
+ id: "APPSMITH_MAIL_READ_MORE",
+ category: "email",
+ controlType: SettingTypes.LINK,
+ label: "How to configure?",
+ url: EMAIL_SETUP_DOC,
+ },
+ {
+ id: "APPSMITH_MAIL_HOST",
+ category: "email",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "SMTP Host",
+ placeholder: "email-smtp.us-east-2.amazonaws.com",
+ },
+ {
+ id: "APPSMITH_MAIL_PORT",
+ category: "email",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.NUMBER,
+ placeholder: "25",
+ label: "SMTP Port",
+ validate: (value: string) => {
+ const port = parseInt(value);
+ if (value && (port < 0 || port > 65535)) {
+ return "Please enter a valid port";
+ }
+ },
+ },
+ {
+ id: "APPSMITH_MAIL_FROM",
+ category: "email",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "From Address",
+ placeholder: "admin@appsmith.com",
+ validate: (value: string) => {
+ if (value && !isEmail(value)) {
+ return "Please enter a valid email id";
+ }
+ },
+ subText:
+ "You will need to verify your from email address to begin sending emails",
+ },
+ {
+ id: "APPSMITH_MAIL_SMTP_TLS_ENABLED",
+ category: "email",
+ controlType: SettingTypes.TOGGLE,
+ label: "TLS Protected Connection",
+ },
+ {
+ id: "APPSMITH_MAIL_USERNAME",
+ category: "email",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "SMTP Username",
+ isVisible: (values: Record) => {
+ return values && values["APPSMITH_MAIL_SMTP_TLS_ENABLED"];
+ },
+ },
+ {
+ id: "APPSMITH_MAIL_PASSWORD",
+ category: "email",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.PASSWORD,
+ label: "SMTP Password",
+ isVisible: (values: Record) => {
+ return values && values["APPSMITH_MAIL_SMTP_TLS_ENABLED"];
+ },
+ },
+ {
+ id: "APPSMITH_MAIL_TEST_EMAIL",
+ category: "email",
+ action: (dispatch: Dispatch>, settings: any = {}) => {
+ dispatch &&
+ dispatch({
+ type: ReduxActionTypes.SEND_TEST_EMAIL,
+ payload: omitBy(
+ {
+ smtpHost: settings["APPSMITH_MAIL_HOST"],
+ smtpPort: settings["APPSMITH_MAIL_PORT"],
+ fromEmail: settings["APPSMITH_MAIL_FROM"],
+ username: settings["APPSMITH_MAIL_USERNAME"],
+ password: settings["APPSMITH_MAIL_PASSWORD"],
+ },
+ isNil,
+ ),
+ });
+ },
+ controlType: SettingTypes.BUTTON,
+ isDisabled: (settings: Record) => {
+ return (
+ !settings ||
+ !settings["APPSMITH_MAIL_HOST"] ||
+ !settings["APPSMITH_MAIL_FROM"]
+ );
+ },
+ text: "Send Test Email",
+ },
+ ],
+};
diff --git a/app/client/src/pages/Settings/config/general.ts b/app/client/src/pages/Settings/config/general.ts
new file mode 100644
index 0000000000..6138fe1ed1
--- /dev/null
+++ b/app/client/src/pages/Settings/config/general.ts
@@ -0,0 +1,74 @@
+import { isEmail } from "../../../utils/formhelpers";
+import { apiRequestConfig } from "../../../api/Api";
+import UserApi from "../../../api/UserApi";
+import {
+ AdminConfigType,
+ SettingCategories,
+ SettingSubtype,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+
+export const config: AdminConfigType = {
+ type: SettingCategories.GENERAL,
+ controlType: SettingTypes.GROUP,
+ title: "General",
+ canSave: true,
+ settings: [
+ {
+ id: "APPSMITH_INSTANCE_NAME",
+ category: "general",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "Instance Name",
+ placeholder: "appsmith/prod",
+ },
+ {
+ id: "APPSMITH_ADMIN_EMAILS",
+ category: "general",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.EMAIL,
+ label: "Admin Email",
+ subText:
+ "Emails of the users who can modify instance settings (Comma Separated)",
+ placeholder: "Jane@example.com",
+ validate: (value: string) => {
+ if (
+ value &&
+ !value
+ .split(",")
+ .reduce((prev, curr) => prev && isEmail(curr.trim()), true)
+ ) {
+ return "Please enter valid email id(s)";
+ }
+ },
+ },
+ {
+ id: "APPSMITH_DOWNLOAD_DOCKER_COMPOSE_FILE",
+ action: () => {
+ const { host, protocol } = window.location;
+ window.open(
+ `${protocol}//${host}${apiRequestConfig.baseURL}${UserApi.downloadConfigURL}`,
+ "_blank",
+ );
+ },
+ category: "general",
+ controlType: SettingTypes.BUTTON,
+ label: "Generated Docker Compose File",
+ text: "Download",
+ },
+ {
+ id: "APPSMITH_DISABLE_TELEMETRY",
+ category: "general",
+ controlType: SettingTypes.TOGGLE,
+ label: "Disable Sharing Anonymous Usage Data",
+ subText: "Share anonymous usage data to help improve the product",
+ toggleText: (value: boolean) => {
+ if (value) {
+ return "Don't share any data";
+ } else {
+ return "Share data & make appsmith better!";
+ }
+ },
+ },
+ ],
+} as AdminConfigType;
diff --git a/app/client/src/pages/Settings/config/googleMaps.ts b/app/client/src/pages/Settings/config/googleMaps.ts
new file mode 100644
index 0000000000..365bd5b532
--- /dev/null
+++ b/app/client/src/pages/Settings/config/googleMaps.ts
@@ -0,0 +1,30 @@
+import { GOOGLE_MAPS_SETUP_DOC } from "constants/ThirdPartyConstants";
+import {
+ AdminConfigType,
+ SettingCategories,
+ SettingSubtype,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+
+export const config: AdminConfigType = {
+ type: SettingCategories.GOOGLE_MAPS,
+ controlType: SettingTypes.GROUP,
+ title: "Google Maps",
+ canSave: true,
+ settings: [
+ {
+ id: "APPSMITH_GOOGLE_MAPS_READ_MORE",
+ category: "google-maps",
+ controlType: SettingTypes.LINK,
+ label: "How to configure?",
+ url: GOOGLE_MAPS_SETUP_DOC,
+ },
+ {
+ id: "APPSMITH_GOOGLE_MAPS_API_KEY",
+ category: "google-maps",
+ controlType: SettingTypes.TEXTINPUT,
+ controlSubType: SettingSubtype.TEXT,
+ label: "Google Maps API Key",
+ },
+ ],
+};
diff --git a/app/client/src/pages/Settings/config/index.ts b/app/client/src/pages/Settings/config/index.ts
new file mode 100644
index 0000000000..c26dc1a882
--- /dev/null
+++ b/app/client/src/pages/Settings/config/index.ts
@@ -0,0 +1,17 @@
+import { ConfigFactory } from "./ConfigFactory";
+
+import { config as GeneralConfig } from "./general";
+import { config as EmailConfig } from "./email";
+import { config as MapsConfig } from "./googleMaps";
+import { config as VersionConfig } from "./version";
+import { config as AdvancedConfig } from "./advanced";
+import { config as Authentication } from "@appsmith/pages/AdminSettings/config/authentication";
+
+ConfigFactory.register(GeneralConfig);
+ConfigFactory.register(EmailConfig);
+ConfigFactory.register(MapsConfig);
+ConfigFactory.register(Authentication);
+ConfigFactory.register(AdvancedConfig);
+ConfigFactory.register(VersionConfig);
+
+export default ConfigFactory;
diff --git a/app/client/src/pages/Settings/config/version.ts b/app/client/src/pages/Settings/config/version.ts
new file mode 100644
index 0000000000..36d84ec6f0
--- /dev/null
+++ b/app/client/src/pages/Settings/config/version.ts
@@ -0,0 +1,35 @@
+import { Dispatch } from "react";
+import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
+import {
+ AdminConfigType,
+ SettingCategories,
+ SettingTypes,
+} from "@appsmith/pages/AdminSettings/config/types";
+
+export const config: AdminConfigType = {
+ type: SettingCategories.VERSION,
+ controlType: SettingTypes.GROUP,
+ title: "Version",
+ canSave: false,
+ settings: [
+ {
+ id: "APPSMITH_CURRENT_VERSION",
+ category: "version",
+ controlType: SettingTypes.TEXT,
+ label: "Current version",
+ },
+ {
+ id: "APPSMITH_VERSION_READ_MORE",
+ action: (dispatch?: Dispatch>) => {
+ dispatch &&
+ dispatch({
+ type: ReduxActionTypes.TOGGLE_RELEASE_NOTES,
+ payload: true,
+ });
+ },
+ category: "version",
+ controlType: SettingTypes.LINK,
+ label: "Release Notes",
+ },
+ ],
+};
diff --git a/app/client/src/pages/UserAuth/ForgotPassword.tsx b/app/client/src/pages/UserAuth/ForgotPassword.tsx
index ad3758eb9e..0161b1b17c 100644
--- a/app/client/src/pages/UserAuth/ForgotPassword.tsx
+++ b/app/client/src/pages/UserAuth/ForgotPassword.tsx
@@ -21,7 +21,7 @@ import {
FORGOT_PASSWORD_SUCCESS_TEXT,
FORGOT_PASSWORD_PAGE_LOGIN_LINK,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { AUTH_LOGIN_URL } from "constants/routes";
import FormMessage from "components/ads/formFields/FormMessage";
import { FORGOT_PASSWORD_FORM_NAME } from "constants/forms";
diff --git a/app/client/src/pages/UserAuth/ResetPassword.tsx b/app/client/src/pages/UserAuth/ResetPassword.tsx
index c1e3eb9bb3..7bc067f8cb 100644
--- a/app/client/src/pages/UserAuth/ResetPassword.tsx
+++ b/app/client/src/pages/UserAuth/ResetPassword.tsx
@@ -42,7 +42,7 @@ import {
RESET_PASSWORD_RESET_SUCCESS,
RESET_PASSWORD_RESET_SUCCESS_LOGIN_LINK,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const validate = (values: ResetPasswordFormValues) => {
const errors: ResetPasswordFormValues = {};
diff --git a/app/client/src/pages/UserAuth/StyledComponents.tsx b/app/client/src/pages/UserAuth/StyledComponents.tsx
index 206145f190..8112212333 100644
--- a/app/client/src/pages/UserAuth/StyledComponents.tsx
+++ b/app/client/src/pages/UserAuth/StyledComponents.tsx
@@ -3,7 +3,6 @@ import { Link } from "react-router-dom";
import Form from "components/editorComponents/Form";
import { Card } from "@blueprintjs/core";
import { getTypographyByKey } from "constants/DefaultTheme";
-import { Classes } from "@blueprintjs/core";
export const AuthContainer = styled.section`
position: absolute;
@@ -14,10 +13,6 @@ export const AuthContainer = styled.section`
flex-direction: column;
align-items: center;
overflow: auto;
-
- & .${Classes.FORM_GROUP} {
- margin: 0 0 ${(props) => props.theme.spaces[2]}px;
- }
`;
export const AuthCardContainer = styled.div`
diff --git a/app/client/src/pages/UserProfile/General.tsx b/app/client/src/pages/UserProfile/General.tsx
index 6522568da3..ce437caa9b 100644
--- a/app/client/src/pages/UserProfile/General.tsx
+++ b/app/client/src/pages/UserProfile/General.tsx
@@ -12,7 +12,7 @@ import { Variant } from "components/ads/common";
import {
FORGOT_PASSWORD_SUCCESS_TEXT,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { logoutUser, updateUserDetails } from "actions/userActions";
import { AppState } from "reducers";
import UserProfileImagePicker from "components/ads/UserProfileImagePicker";
diff --git a/app/client/src/pages/UserProfile/GitConfig.tsx b/app/client/src/pages/UserProfile/GitConfig.tsx
index 031d77e723..787d5c9f81 100644
--- a/app/client/src/pages/UserProfile/GitConfig.tsx
+++ b/app/client/src/pages/UserProfile/GitConfig.tsx
@@ -10,7 +10,7 @@ import {
AUTHOR_EMAIL,
AUTHOR_NAME,
SUBMIT,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import Text, { TextType } from "components/ads/Text";
import { Classes } from "@blueprintjs/core";
import TextInput, { notEmptyValidator } from "components/ads/TextInput";
diff --git a/app/client/src/pages/common/PageNotFound.tsx b/app/client/src/pages/common/PageNotFound.tsx
index 1ef010291a..37d42b1bd9 100644
--- a/app/client/src/pages/common/PageNotFound.tsx
+++ b/app/client/src/pages/common/PageNotFound.tsx
@@ -9,7 +9,7 @@ import {
BACK_TO_HOMEPAGE,
createMessage,
PAGE_NOT_FOUND,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const Wrapper = styled.div`
text-align: center;
diff --git a/app/client/src/pages/common/ProfileDropdown.tsx b/app/client/src/pages/common/ProfileDropdown.tsx
index a93fa967f3..7288455081 100644
--- a/app/client/src/pages/common/ProfileDropdown.tsx
+++ b/app/client/src/pages/common/ProfileDropdown.tsx
@@ -20,7 +20,7 @@ import {
ACCOUNT_TOOLTIP,
createMessage,
ADMIN_SETTINGS,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { TOOLTIP_HOVER_ON_DELAY } from "constants/AppConstants";
import { useSelector } from "react-redux";
import { getCurrentUser } from "selectors/usersSelectors";
diff --git a/app/client/src/pages/common/UnsubscribeEmail.tsx b/app/client/src/pages/common/UnsubscribeEmail.tsx
index bea7a6535c..8432ec21f7 100644
--- a/app/client/src/pages/common/UnsubscribeEmail.tsx
+++ b/app/client/src/pages/common/UnsubscribeEmail.tsx
@@ -11,7 +11,7 @@ import {
UNSUBSCRIBE_EMAIL_MSG_2,
UNSUBSCRIBE_EMAIL_CONFIRM_MSG,
UNSUBSCRIBE_BUTTON_LABEL,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const Wrapper = styled.div`
height: calc(100vh - ${(props) => props.theme.headerHeight});
diff --git a/app/client/src/pages/common/datasourceAuth/OAuth.tsx b/app/client/src/pages/common/datasourceAuth/OAuth.tsx
index 23389c41ae..5272b5f1ba 100644
--- a/app/client/src/pages/common/datasourceAuth/OAuth.tsx
+++ b/app/client/src/pages/common/datasourceAuth/OAuth.tsx
@@ -22,7 +22,7 @@ import { AppState } from "reducers";
import {
OAUTH_AUTHORIZATION_APPSMITH_ERROR,
OAUTH_AUTHORIZATION_FAILED,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { Variant } from "components/ads/common";
import { Toaster } from "components/ads/Toast";
import AnalyticsUtil from "utils/AnalyticsUtil";
diff --git a/app/client/src/pages/organization/DeleteConfirmationModal.tsx b/app/client/src/pages/organization/DeleteConfirmationModal.tsx
index a8e6d78cd9..1c6f79c80e 100644
--- a/app/client/src/pages/organization/DeleteConfirmationModal.tsx
+++ b/app/client/src/pages/organization/DeleteConfirmationModal.tsx
@@ -6,7 +6,7 @@ import { Variant } from "components/ads/common";
import {
DELETE_CONFIRMATION_MODAL_TITLE,
DELETE_CONFIRMATION_MODAL_SUBTITLE,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import Dialog from "components/ads/DialogComponent";
import { Classes } from "@blueprintjs/core";
import { Colors } from "constants/Colors";
diff --git a/app/client/src/pages/organization/OrgInviteUsersForm.tsx b/app/client/src/pages/organization/OrgInviteUsersForm.tsx
index 9f180560b0..5abdad618c 100644
--- a/app/client/src/pages/organization/OrgInviteUsersForm.tsx
+++ b/app/client/src/pages/organization/OrgInviteUsersForm.tsx
@@ -22,7 +22,7 @@ import {
INVITE_USERS_VALIDATION_EMAILS_EMPTY,
INVITE_USERS_VALIDATION_EMAIL_LIST,
INVITE_USERS_VALIDATION_ROLE_EMPTY,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { isEmail } from "utils/formhelpers";
import {
isPermitted,
diff --git a/app/client/src/pages/setup/DataCollectionForm.tsx b/app/client/src/pages/setup/DataCollectionForm.tsx
index dc9771e217..dceb270d31 100644
--- a/app/client/src/pages/setup/DataCollectionForm.tsx
+++ b/app/client/src/pages/setup/DataCollectionForm.tsx
@@ -21,7 +21,7 @@ import {
WELCOME_FORM_DATA_COLLECTION_LABEL_DISABLE,
WELCOME_FORM_DATA_COLLECTION_LABEL_ENABLE,
WELCOME_FORM_DATA_COLLECTION_LINK,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const DataCollectionFormWrapper = styled.div`
width: 100%;
diff --git a/app/client/src/pages/setup/DetailsForm.tsx b/app/client/src/pages/setup/DetailsForm.tsx
index a701a5a690..1cc632aac7 100644
--- a/app/client/src/pages/setup/DetailsForm.tsx
+++ b/app/client/src/pages/setup/DetailsForm.tsx
@@ -20,7 +20,7 @@ import {
WELCOME_FORM_ROLE,
WELCOME_FORM_USE_CASE,
WELCOME_FORM_HEADER,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import FormTextField from "components/ads/formFields/TextField";
import { DetailsFormValues } from "./SetupForm";
import { ButtonWrapper } from "pages/Applications/ForkModalStyles";
diff --git a/app/client/src/pages/setup/GetStarted.tsx b/app/client/src/pages/setup/GetStarted.tsx
index 796c0ffc27..ca67e0736e 100644
--- a/app/client/src/pages/setup/GetStarted.tsx
+++ b/app/client/src/pages/setup/GetStarted.tsx
@@ -13,7 +13,7 @@ import {
WELCOME_FORM_NON_SUPER_USER_ROLE_DROPDOWN,
WELCOME_FORM_NON_SUPER_USER_USE_CASE,
WELCOME_FORM_ROLE,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import React from "react";
import { connect } from "react-redux";
import { AppState } from "reducers";
diff --git a/app/client/src/pages/setup/NewsletterForm.tsx b/app/client/src/pages/setup/NewsletterForm.tsx
index 8626110a4f..140a86405b 100644
--- a/app/client/src/pages/setup/NewsletterForm.tsx
+++ b/app/client/src/pages/setup/NewsletterForm.tsx
@@ -19,7 +19,7 @@ import {
WELCOME_FORM_NEWLETTER_HEADER,
WELCOME_FORM_NEWLETTER_LABEL,
WELCOME_FORM_SUBMIT_LABEL,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
export const StyledButton = styled(Button)`
width: 201px;
diff --git a/app/client/src/pages/setup/Welcome.tsx b/app/client/src/pages/setup/Welcome.tsx
index 8c28ecb8a8..11dff7a65f 100644
--- a/app/client/src/pages/setup/Welcome.tsx
+++ b/app/client/src/pages/setup/Welcome.tsx
@@ -7,7 +7,7 @@ import {
createMessage,
WELCOME_BODY,
WELCOME_HEADER,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import NonSuperUserForm, { SuperUserForm } from "./GetStarted";
const LandingPageWrapper = styled.div<{ hide: boolean }>`
diff --git a/app/client/src/reducers/uiReducers/applicationsReducer.tsx b/app/client/src/reducers/uiReducers/applicationsReducer.tsx
index 3b312430f9..addd08af77 100644
--- a/app/client/src/reducers/uiReducers/applicationsReducer.tsx
+++ b/app/client/src/reducers/uiReducers/applicationsReducer.tsx
@@ -10,7 +10,7 @@ import { Organization, OrgUser } from "constants/orgConstants";
import {
createMessage,
ERROR_MESSAGE_CREATE_APPLICATION,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { UpdateApplicationRequest } from "api/ApplicationApi";
import { CreateApplicationFormValues } from "pages/Applications/helpers";
import { AppLayoutConfig } from "reducers/entityReducers/pageListReducer";
diff --git a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts
index cd7717ed26..a3c3102575 100644
--- a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts
+++ b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts
@@ -51,7 +51,7 @@ import {
ERROR_ACTION_EXECUTE_FAIL,
ERROR_FAIL_ON_PAGE_LOAD_ACTIONS,
ERROR_PLUGIN_ACTION_EXECUTE,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { Variant } from "components/ads/common";
import {
EventType,
diff --git a/app/client/src/sagas/ActionExecution/errorUtils.ts b/app/client/src/sagas/ActionExecution/errorUtils.ts
index 9b60bacb05..408c4cf0b6 100644
--- a/app/client/src/sagas/ActionExecution/errorUtils.ts
+++ b/app/client/src/sagas/ActionExecution/errorUtils.ts
@@ -6,7 +6,7 @@ import {
createMessage,
DEBUGGER_TRIGGER_ERROR,
TRIGGER_ACTION_VALIDATION_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { ENTITY_TYPE } from "entities/AppsmithConsole";
import { Toaster } from "components/ads/Toast";
import { Variant } from "components/ads/common";
diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts
index 8a307e317e..89e8bdc7e7 100644
--- a/app/client/src/sagas/ActionSagas.ts
+++ b/app/client/src/sagas/ActionSagas.ts
@@ -86,7 +86,7 @@ import {
ERROR_ACTION_COPY_FAIL,
ERROR_ACTION_MOVE_FAIL,
ERROR_ACTION_RENAME_FAIL,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { merge, get } from "lodash";
import { getConfigInitialValues } from "components/formControls/utils";
import AppsmithConsole from "utils/AppsmithConsole";
diff --git a/app/client/src/sagas/ApiPaneSagas.ts b/app/client/src/sagas/ApiPaneSagas.ts
index 9ede8b5fb4..d99adce331 100644
--- a/app/client/src/sagas/ApiPaneSagas.ts
+++ b/app/client/src/sagas/ApiPaneSagas.ts
@@ -56,7 +56,10 @@ import PerformanceTracker, {
import { EventLocation } from "utils/AnalyticsUtil";
import { Variant } from "components/ads/common";
import { Toaster } from "components/ads/Toast";
-import { createMessage, ERROR_ACTION_RENAME_FAIL } from "constants/messages";
+import {
+ createMessage,
+ ERROR_ACTION_RENAME_FAIL,
+} from "@appsmith/constants/messages";
import {
getIndextoUpdate,
parseUrlForQueryParams,
diff --git a/app/client/src/sagas/ApplicationSagas.tsx b/app/client/src/sagas/ApplicationSagas.tsx
index 432ed4644c..3d3f86b1fa 100644
--- a/app/client/src/sagas/ApplicationSagas.tsx
+++ b/app/client/src/sagas/ApplicationSagas.tsx
@@ -49,7 +49,7 @@ import {
createMessage,
DELETING_APPLICATION,
DUPLICATING_APPLICATION,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { Toaster } from "components/ads/Toast";
import { APP_MODE } from "entities/App";
import { Organization } from "constants/orgConstants";
diff --git a/app/client/src/sagas/CurlImportSagas.ts b/app/client/src/sagas/CurlImportSagas.ts
index 3df1de7f6b..135444b4ac 100644
--- a/app/client/src/sagas/CurlImportSagas.ts
+++ b/app/client/src/sagas/CurlImportSagas.ts
@@ -8,7 +8,10 @@ import { validateResponse } from "sagas/ErrorSagas";
import CurlImportApi, { CurlImportRequest } from "api/ImportApi";
import { ApiResponse } from "api/ApiResponses";
import AnalyticsUtil from "utils/AnalyticsUtil";
-import { createMessage, CURL_IMPORT_SUCCESS } from "constants/messages";
+import {
+ createMessage,
+ CURL_IMPORT_SUCCESS,
+} from "@appsmith/constants/messages";
import { getCurrentOrgId } from "selectors/organizationSelectors";
import transformCurlImport from "transformers/CurlImportTransformer";
import { API_EDITOR_ID_URL } from "constants/routes";
diff --git a/app/client/src/sagas/DatasourcesSagas.ts b/app/client/src/sagas/DatasourcesSagas.ts
index f3f31b97d1..24a8eff1a9 100644
--- a/app/client/src/sagas/DatasourcesSagas.ts
+++ b/app/client/src/sagas/DatasourcesSagas.ts
@@ -73,7 +73,7 @@ import {
OAUTH_AUTHORIZATION_APPSMITH_ERROR,
OAUTH_AUTHORIZATION_FAILED,
OAUTH_AUTHORIZATION_SUCCESSFUL,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import AppsmithConsole from "utils/AppsmithConsole";
import { ENTITY_TYPE } from "entities/AppsmithConsole";
import localStorage from "utils/localStorage";
diff --git a/app/client/src/sagas/DebuggerSagas.ts b/app/client/src/sagas/DebuggerSagas.ts
index 0a14a0e5de..4b4efe2d82 100644
--- a/app/client/src/sagas/DebuggerSagas.ts
+++ b/app/client/src/sagas/DebuggerSagas.ts
@@ -41,7 +41,7 @@ import {
ACTION_CONFIGURATION_UPDATED,
createMessage,
WIDGET_PROPERTIES_UPDATED,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import AppsmithConsole from "utils/AppsmithConsole";
import { getWidget } from "./selectors";
import AnalyticsUtil from "utils/AnalyticsUtil";
diff --git a/app/client/src/sagas/ErrorSagas.tsx b/app/client/src/sagas/ErrorSagas.tsx
index 616d82ed85..5875ce3150 100644
--- a/app/client/src/sagas/ErrorSagas.tsx
+++ b/app/client/src/sagas/ErrorSagas.tsx
@@ -25,7 +25,7 @@ import {
ERROR_0,
DEFAULT_ERROR_MESSAGE,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import * as Sentry from "@sentry/react";
import { axiosConnectionAbortedCode } from "../api/ApiUtils";
diff --git a/app/client/src/sagas/EvaluationsSaga.ts b/app/client/src/sagas/EvaluationsSaga.ts
index 0029be622d..b467d8657b 100644
--- a/app/client/src/sagas/EvaluationsSaga.ts
+++ b/app/client/src/sagas/EvaluationsSaga.ts
@@ -69,7 +69,7 @@ import {
createMessage,
SNIPPET_EXECUTION_FAILED,
SNIPPET_EXECUTION_SUCCESS,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { validate } from "workers/validations";
import { diff } from "deep-diff";
import { REPLAY_DELAY } from "entities/Replay/replayUtils";
diff --git a/app/client/src/sagas/GitSyncSagas.ts b/app/client/src/sagas/GitSyncSagas.ts
index 51ed2726d3..c909ad0a8a 100644
--- a/app/client/src/sagas/GitSyncSagas.ts
+++ b/app/client/src/sagas/GitSyncSagas.ts
@@ -48,7 +48,7 @@ import { fetchGitStatusSuccess } from "actions/gitSyncActions";
import {
createMessage,
GIT_USER_UPDATED_SUCCESSFULLY,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { GitApplicationMetadata } from "../api/ApplicationApi";
import history from "utils/history";
diff --git a/app/client/src/sagas/JSActionSagas.ts b/app/client/src/sagas/JSActionSagas.ts
index 1696f36200..64c55cc3ce 100644
--- a/app/client/src/sagas/JSActionSagas.ts
+++ b/app/client/src/sagas/JSActionSagas.ts
@@ -48,7 +48,7 @@ import {
JS_ACTION_MOVE_SUCCESS,
ERROR_JS_ACTION_MOVE_FAIL,
ERROR_JS_COLLECTION_RENAME_FAIL,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { validateResponse } from "./ErrorSagas";
import { DataTreeJSAction } from "entities/DataTree/dataTreeFactory";
import PageApi from "api/PageApi";
diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts
index e25202d54c..1a03a6ffd7 100644
--- a/app/client/src/sagas/JSPaneSagas.ts
+++ b/app/client/src/sagas/JSPaneSagas.ts
@@ -51,7 +51,7 @@ import {
JS_FUNCTION_CREATE_SUCCESS,
JS_FUNCTION_DELETE_SUCCESS,
JS_FUNCTION_UPDATE_SUCCESS,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { validateResponse } from "./ErrorSagas";
import AppsmithConsole from "utils/AppsmithConsole";
import { ENTITY_TYPE, PLATFORM_ERROR } from "entities/AppsmithConsole";
diff --git a/app/client/src/sagas/OrgSagas.ts b/app/client/src/sagas/OrgSagas.ts
index 675ceb51d2..4ad192c97d 100644
--- a/app/client/src/sagas/OrgSagas.ts
+++ b/app/client/src/sagas/OrgSagas.ts
@@ -34,7 +34,10 @@ import history from "utils/history";
import { APPLICATIONS_URL } from "constants/routes";
import { getAllApplications } from "actions/applicationActions";
import log from "loglevel";
-import { createMessage, DELETE_ORG_SUCCESSFUL } from "constants/messages";
+import {
+ createMessage,
+ DELETE_ORG_SUCCESSFUL,
+} from "@appsmith/constants/messages";
export function* fetchRolesSaga() {
try {
diff --git a/app/client/src/sagas/PostEvaluationSagas.ts b/app/client/src/sagas/PostEvaluationSagas.ts
index de7af2a0e7..317caad474 100644
--- a/app/client/src/sagas/PostEvaluationSagas.ts
+++ b/app/client/src/sagas/PostEvaluationSagas.ts
@@ -34,7 +34,7 @@ import {
ERROR_EVAL_ERROR_GENERIC,
JS_OBJECT_BODY_INVALID,
VALUE_IS_INVALID,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import log from "loglevel";
import { AppState } from "reducers";
import { getAppMode } from "selectors/applicationSelectors";
diff --git a/app/client/src/sagas/ProvidersSaga.ts b/app/client/src/sagas/ProvidersSaga.ts
index 9d5336751d..0d0a4835e8 100644
--- a/app/client/src/sagas/ProvidersSaga.ts
+++ b/app/client/src/sagas/ProvidersSaga.ts
@@ -34,7 +34,7 @@ import {
import {
ADD_API_TO_PAGE_SUCCESS_MESSAGE,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import AnalyticsUtil from "utils/AnalyticsUtil";
import { getCurrentOrgId } from "selectors/organizationSelectors";
import { Toaster } from "components/ads/Toast";
diff --git a/app/client/src/sagas/QueryPaneSagas.ts b/app/client/src/sagas/QueryPaneSagas.ts
index 253a0374d5..d1a1a424c3 100644
--- a/app/client/src/sagas/QueryPaneSagas.ts
+++ b/app/client/src/sagas/QueryPaneSagas.ts
@@ -43,7 +43,10 @@ import { Variant } from "components/ads/common";
import { Toaster } from "components/ads/Toast";
import { Datasource } from "entities/Datasource";
import _ from "lodash";
-import { createMessage, ERROR_ACTION_RENAME_FAIL } from "constants/messages";
+import {
+ createMessage,
+ ERROR_ACTION_RENAME_FAIL,
+} from "@appsmith/constants/messages";
import get from "lodash/get";
import {
initFormEvaluations,
diff --git a/app/client/src/sagas/SnipingModeSagas.ts b/app/client/src/sagas/SnipingModeSagas.ts
index 677f0e47b9..5ab7676030 100644
--- a/app/client/src/sagas/SnipingModeSagas.ts
+++ b/app/client/src/sagas/SnipingModeSagas.ts
@@ -19,7 +19,7 @@ import AnalyticsUtil from "../utils/AnalyticsUtil";
import {
SNIPING_NOT_SUPPORTED,
SNIPING_SELECT_WIDGET_AGAIN,
-} from "../constants/messages";
+} from "@appsmith/constants/messages";
import WidgetFactory from "utils/WidgetFactory";
diff --git a/app/client/src/sagas/SuperUserSagas.tsx b/app/client/src/sagas/SuperUserSagas.tsx
index da46acfd01..6263af6483 100644
--- a/app/client/src/sagas/SuperUserSagas.tsx
+++ b/app/client/src/sagas/SuperUserSagas.tsx
@@ -20,7 +20,7 @@ import {
TEST_EMAIL_FAILURE,
TEST_EMAIL_SUCCESS,
TEST_EMAIL_SUCCESS_TROUBLESHOOT,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { getCurrentUser } from "selectors/usersSelectors";
import { EMAIL_SETUP_DOC } from "constants/ThirdPartyConstants";
diff --git a/app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx b/app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx
index 68b7ca10b6..413a50b382 100644
--- a/app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx
+++ b/app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx
@@ -16,7 +16,7 @@ import { Toaster } from "components/ads/Toast";
import {
createMessage,
INFO_VERSION_MISMATCH_FOUND_RELOAD_REQUEST,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { Variant } from "components/ads/common";
import React from "react";
import { getAppsmithConfigs } from "@appsmith/configs";
diff --git a/app/client/src/sagas/WidgetOperationSagas.tsx b/app/client/src/sagas/WidgetOperationSagas.tsx
index 8f43c43e2d..9edf35a2e8 100644
--- a/app/client/src/sagas/WidgetOperationSagas.tsx
+++ b/app/client/src/sagas/WidgetOperationSagas.tsx
@@ -75,7 +75,7 @@ import {
WIDGET_COPY,
WIDGET_CUT,
ERROR_WIDGET_COPY_NOT_ALLOWED,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import {
CopiedWidgetGroup,
diff --git a/app/client/src/sagas/WidgetSelectionSagas.ts b/app/client/src/sagas/WidgetSelectionSagas.ts
index a07e43fd17..17e82edaf3 100644
--- a/app/client/src/sagas/WidgetSelectionSagas.ts
+++ b/app/client/src/sagas/WidgetSelectionSagas.ts
@@ -19,7 +19,10 @@ import {
silentAddSelectionsAction,
} from "actions/widgetSelectionActions";
import { Toaster } from "components/ads/Toast";
-import { createMessage, SELECT_ALL_WIDGETS_MSG } from "constants/messages";
+import {
+ createMessage,
+ SELECT_ALL_WIDGETS_MSG,
+} from "@appsmith/constants/messages";
import { Variant } from "components/ads/common";
import { getSelectedWidget, getSelectedWidgets } from "selectors/ui";
import {
diff --git a/app/client/src/utils/AppsmithUtils.tsx b/app/client/src/utils/AppsmithUtils.tsx
index b97435e417..5c8296211f 100644
--- a/app/client/src/utils/AppsmithUtils.tsx
+++ b/app/client/src/utils/AppsmithUtils.tsx
@@ -15,7 +15,7 @@ import { LogLevelDesc } from "loglevel";
import produce from "immer";
import { AppIconCollection, AppIconName } from "components/ads/AppIcon";
import { ERROR_CODES } from "@appsmith/constants/ApiConstants";
-import { createMessage, ERROR_500 } from "../constants/messages";
+import { createMessage, ERROR_500 } from "@appsmith/constants/messages";
import localStorage from "utils/localStorage";
import { APP_MODE } from "entities/App";
import { trimQueryString } from "./helpers";
diff --git a/app/client/src/utils/localStorage.tsx b/app/client/src/utils/localStorage.tsx
index ed678f2e84..e155036083 100644
--- a/app/client/src/utils/localStorage.tsx
+++ b/app/client/src/utils/localStorage.tsx
@@ -6,7 +6,7 @@ import {
LOCAL_STORAGE_NO_SPACE_LEFT_ON_DEVICE_MESSAGE,
LOCAL_STORAGE_NOT_SUPPORTED_APP_MIGHT_NOT_WORK_AS_EXPECTED,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
class LocalStorageNotSupportedError extends Error {
name: string;
diff --git a/app/client/src/utils/replayHelpers.tsx b/app/client/src/utils/replayHelpers.tsx
index b4b4ca5aa1..a99f91d9a7 100644
--- a/app/client/src/utils/replayHelpers.tsx
+++ b/app/client/src/utils/replayHelpers.tsx
@@ -17,7 +17,7 @@ import {
BULK_WIDGET_ADDED,
WIDGET_REMOVED,
BULK_WIDGET_REMOVED,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
/**
* get the text for toast
diff --git a/app/client/src/utils/validation/common.ts b/app/client/src/utils/validation/common.ts
index 2a1d2edc68..b7fe0250ef 100644
--- a/app/client/src/utils/validation/common.ts
+++ b/app/client/src/utils/validation/common.ts
@@ -1,4 +1,7 @@
-import { createMessage, FIELD_REQUIRED_ERROR } from "constants/messages";
+import {
+ createMessage,
+ FIELD_REQUIRED_ERROR,
+} from "@appsmith/constants/messages";
import { ValidationConfig } from "constants/PropertyControlConstants";
import { ValidationTypes } from "constants/WidgetValidation";
import moment from "moment";
diff --git a/app/client/src/widgets/AudioWidget/component/index.tsx b/app/client/src/widgets/AudioWidget/component/index.tsx
index f837bb995e..b08a9e8dbd 100644
--- a/app/client/src/widgets/AudioWidget/component/index.tsx
+++ b/app/client/src/widgets/AudioWidget/component/index.tsx
@@ -1,7 +1,7 @@
import ReactPlayer from "react-player";
import React, { Ref } from "react";
import styled from "styled-components";
-import { createMessage, ENTER_AUDIO_URL } from "constants/messages";
+import { createMessage, ENTER_AUDIO_URL } from "@appsmith/constants/messages";
export interface AudioComponentProps {
url?: string;
autoplay?: boolean;
diff --git a/app/client/src/widgets/BaseInputWidget/component/index.tsx b/app/client/src/widgets/BaseInputWidget/component/index.tsx
index d478c8f583..f156964f41 100644
--- a/app/client/src/widgets/BaseInputWidget/component/index.tsx
+++ b/app/client/src/widgets/BaseInputWidget/component/index.tsx
@@ -29,7 +29,7 @@ import _, { isNil } from "lodash";
import {
createMessage,
INPUT_WIDGET_DEFAULT_VALIDATION_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { InputTypes } from "../constants";
// TODO(abhinav): All of the following imports should not be in widgets.
diff --git a/app/client/src/widgets/ButtonWidget/component/index.tsx b/app/client/src/widgets/ButtonWidget/component/index.tsx
index 2d9c9eea80..084e285627 100644
--- a/app/client/src/widgets/ButtonWidget/component/index.tsx
+++ b/app/client/src/widgets/ButtonWidget/component/index.tsx
@@ -18,7 +18,7 @@ import {
GOOGLE_RECAPTCHA_KEY_ERROR,
GOOGLE_RECAPTCHA_DOMAIN_ERROR,
createMessage,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { ThemeProp, Variant } from "components/ads/common";
import { Toaster } from "components/ads/Toast";
diff --git a/app/client/src/widgets/CurrencyInputWidget/widget/index.tsx b/app/client/src/widgets/CurrencyInputWidget/widget/index.tsx
index b492013c28..3146270558 100644
--- a/app/client/src/widgets/CurrencyInputWidget/widget/index.tsx
+++ b/app/client/src/widgets/CurrencyInputWidget/widget/index.tsx
@@ -9,7 +9,10 @@ import {
ValidationTypes,
ValidationResponse,
} from "constants/WidgetValidation";
-import { createMessage, FIELD_REQUIRED_ERROR } from "constants/messages";
+import {
+ createMessage,
+ FIELD_REQUIRED_ERROR,
+} from "@appsmith/constants/messages";
import { DerivedPropertiesMap } from "utils/WidgetFactory";
import {
CurrencyDropdownOptions,
diff --git a/app/client/src/widgets/DatePickerWidget/component/index.tsx b/app/client/src/widgets/DatePickerWidget/component/index.tsx
index a051446802..20ba0d800f 100644
--- a/app/client/src/widgets/DatePickerWidget/component/index.tsx
+++ b/app/client/src/widgets/DatePickerWidget/component/index.tsx
@@ -19,7 +19,7 @@ import ErrorTooltip from "components/editorComponents/ErrorTooltip";
import {
createMessage,
DATE_WIDGET_DEFAULT_VALIDATION_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const StyledControlGroup = styled(ControlGroup)<{ isValid: boolean }>`
&&& {
diff --git a/app/client/src/widgets/DatePickerWidget2/component/index.tsx b/app/client/src/widgets/DatePickerWidget2/component/index.tsx
index 8d8a34f743..c273f70fcb 100644
--- a/app/client/src/widgets/DatePickerWidget2/component/index.tsx
+++ b/app/client/src/widgets/DatePickerWidget2/component/index.tsx
@@ -18,7 +18,7 @@ import ErrorTooltip from "components/editorComponents/ErrorTooltip";
import {
createMessage,
DATE_WIDGET_DEFAULT_VALIDATION_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
const StyledControlGroup = styled(ControlGroup)<{ isValid: boolean }>`
&&& {
diff --git a/app/client/src/widgets/InputWidget/component/index.tsx b/app/client/src/widgets/InputWidget/component/index.tsx
index 8b95ecb99f..19a5f7e618 100644
--- a/app/client/src/widgets/InputWidget/component/index.tsx
+++ b/app/client/src/widgets/InputWidget/component/index.tsx
@@ -29,7 +29,7 @@ import _ from "lodash";
import {
createMessage,
INPUT_WIDGET_DEFAULT_VALIDATION_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { InputType, InputTypes } from "../constants";
import CurrencyTypeDropdown, {
diff --git a/app/client/src/widgets/InputWidget/widget/index.tsx b/app/client/src/widgets/InputWidget/widget/index.tsx
index d734e5576b..22f9efc97f 100644
--- a/app/client/src/widgets/InputWidget/widget/index.tsx
+++ b/app/client/src/widgets/InputWidget/widget/index.tsx
@@ -16,7 +16,7 @@ import {
createMessage,
FIELD_REQUIRED_ERROR,
INPUT_DEFAULT_TEXT_MAX_CHAR_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { DerivedPropertiesMap } from "utils/WidgetFactory";
import { InputType, InputTypes } from "../constants";
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
diff --git a/app/client/src/widgets/InputWidgetV2/widget/index.tsx b/app/client/src/widgets/InputWidgetV2/widget/index.tsx
index bcc3f5562e..08add250a7 100644
--- a/app/client/src/widgets/InputWidgetV2/widget/index.tsx
+++ b/app/client/src/widgets/InputWidgetV2/widget/index.tsx
@@ -11,7 +11,7 @@ import {
createMessage,
FIELD_REQUIRED_ERROR,
INPUT_DEFAULT_TEXT_MAX_CHAR_ERROR,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { DerivedPropertiesMap } from "utils/WidgetFactory";
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
import { AutocompleteDataType } from "utils/autocomplete/TernServer";
diff --git a/app/client/src/widgets/PhoneInputWidget/widget/index.tsx b/app/client/src/widgets/PhoneInputWidget/widget/index.tsx
index dd5024816f..6e4d3b73ca 100644
--- a/app/client/src/widgets/PhoneInputWidget/widget/index.tsx
+++ b/app/client/src/widgets/PhoneInputWidget/widget/index.tsx
@@ -7,7 +7,10 @@ import {
ValidationTypes,
ValidationResponse,
} from "constants/WidgetValidation";
-import { createMessage, FIELD_REQUIRED_ERROR } from "constants/messages";
+import {
+ createMessage,
+ FIELD_REQUIRED_ERROR,
+} from "@appsmith/constants/messages";
import { DerivedPropertiesMap } from "utils/WidgetFactory";
import {
getCountryCode,
diff --git a/app/client/src/widgets/TableWidget/component/TableFilterPaneContent.tsx b/app/client/src/widgets/TableWidget/component/TableFilterPaneContent.tsx
index 0307352a7d..d777a1a183 100644
--- a/app/client/src/widgets/TableWidget/component/TableFilterPaneContent.tsx
+++ b/app/client/src/widgets/TableWidget/component/TableFilterPaneContent.tsx
@@ -14,7 +14,7 @@ import CascadeFields from "./CascadeFields";
import {
createMessage,
TABLE_FILTER_COLUMN_TYPE_CALLOUT,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { ControlIcons } from "icons/ControlIcons";
import Icon, { IconSize } from "components/ads/Icon";
diff --git a/app/client/src/widgets/TableWidget/widget/propertyConfig.ts b/app/client/src/widgets/TableWidget/widget/propertyConfig.ts
index 327a2c54e7..c3f06ecf4d 100644
--- a/app/client/src/widgets/TableWidget/widget/propertyConfig.ts
+++ b/app/client/src/widgets/TableWidget/widget/propertyConfig.ts
@@ -22,7 +22,7 @@ import {
import {
createMessage,
TABLE_WIDGET_TOTAL_RECORD_TOOLTIP,
-} from "constants/messages";
+} from "@appsmith/constants/messages";
import { IconNames } from "@blueprintjs/icons";
const ICON_NAMES = Object.keys(IconNames).map(
diff --git a/app/client/src/widgets/VideoWidget/component/index.tsx b/app/client/src/widgets/VideoWidget/component/index.tsx
index 342651d51a..67170e5a87 100644
--- a/app/client/src/widgets/VideoWidget/component/index.tsx
+++ b/app/client/src/widgets/VideoWidget/component/index.tsx
@@ -1,7 +1,7 @@
import ReactPlayer from "react-player";
import React, { Ref } from "react";
import styled from "styled-components";
-import { createMessage, ENTER_VIDEO_URL } from "constants/messages";
+import { createMessage, ENTER_VIDEO_URL } from "@appsmith/constants/messages";
export interface VideoComponentProps {
url?: string;
autoplay?: boolean;