diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts index 6e3f8803e8..d9ed33889b 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts @@ -366,13 +366,13 @@ describe("JS Function Execution", function () { : i === functionsLength - 1 ? ` ${functionName}: ${ - isMarkedAsync ? "async" : "" - } ()=>"${functionName}", + isMarkedAsync ? "async" : "" + } ()=>"${functionName}", }` : ` ${functionName}: ${ - isMarkedAsync ? "async" : "" - } ()=> "${functionName}",`; + isMarkedAsync ? "async" : "" + } ()=> "${functionName}",`; } return JS_OBJECT_BODY; }; diff --git a/app/client/cypress/support/Pages/AggregateHelper.ts b/app/client/cypress/support/Pages/AggregateHelper.ts index 0f4c85aee1..0217b56fa9 100644 --- a/app/client/cypress/support/Pages/AggregateHelper.ts +++ b/app/client/cypress/support/Pages/AggregateHelper.ts @@ -1043,8 +1043,8 @@ export class AggregateHelper extends ReusableHelper { public ActionContextMenuWithInPane({ action = "Delete", - subAction = "", entityType = EntityItems.JSObject, + subAction = "", toastToValidate = "", }: DeleteParams) { cy.get(this.locator._contextMenuInPane).click(); diff --git a/app/client/cypress/support/Pages/EntityExplorer.ts b/app/client/cypress/support/Pages/EntityExplorer.ts index 8e42bd557a..48a94a178a 100644 --- a/app/client/cypress/support/Pages/EntityExplorer.ts +++ b/app/client/cypress/support/Pages/EntityExplorer.ts @@ -28,6 +28,7 @@ interface EntityActionParams { | "Refresh" | "Set as home page"; subAction?: string; + //@ts-expect-error: type mismatch entityType?: EntityItems; toAssertAction?: boolean; toastToValidate?: string; @@ -232,10 +233,10 @@ export class EntityExplorer { } public ActionContextMenuByEntityName({ - entityNameinLeftSidebar, action = "Delete", - subAction = "", + entityNameinLeftSidebar, entityType = EntityItems.Query, + subAction = "", toAssertAction, toastToValidate = "", }: EntityActionParams) { diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 94add0da1c..bf48613063 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -189,7 +189,7 @@ export class Table { _divFirstChild = "div:first-child abbr"; _listPreviousPage = ".rc-pagination-prev"; _listNavigation = (move: string) => - "//button[@area-label='" + move + " page']"; + "//button[@aria-label='" + move + " page']"; _listNextPage = ".rc-pagination-next"; _listActivePage = (version: "v1" | "v2") => `.t--widget-listwidget${ diff --git a/app/client/package.json b/app/client/package.json index a0b9ec81c6..adb4c390a8 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -282,10 +282,11 @@ "@types/tinycolor2": "^1.4.2", "@types/to-json-schema": "^0.2.1", "@types/toposort": "^2.0.3", + "@types/uuid": "^9.0.5", "@types/webfontloader": "1.6.33", "@types/zipcelx": "^1.5.0", - "@typescript-eslint/eslint-plugin": "^5.54.1", - "@typescript-eslint/parser": "^5.54.1", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", "babel-plugin-lodash": "^3.3.4", "babel-plugin-module-resolver": "^4.1.0", "chalk": "^4.1.1", @@ -306,17 +307,17 @@ "cypress-xpath": "^1.6.0", "diff": "^5.0.0", "dotenv": "^8.1.0", - "eslint": "^8.42.0", - "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-babel-module": "^5.3.1", - "eslint-plugin-cypress": "^2.11.2", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.30.0", - "eslint-plugin-react-hooks": "^2.3.0", - "eslint-plugin-sort-destructure-keys": "^1.3.5", - "eslint-plugin-storybook": "^0.6.11", + "eslint": "^8.51.0", + "eslint-config-prettier": "^9.0.0", + "eslint-import-resolver-babel-module": "^5.3.2", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jest": "^27.4.2", + "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-sort-destructure-keys": "^1.5.0", + "eslint-plugin-storybook": "^0.6.15", "esm": "^3.2.25", "factory.ts": "^0.5.1", "husky": "^8.0.0", @@ -325,7 +326,7 @@ "jest-environment-jsdom": "^27.4.1", "jest-styled-components": "^7.0.8", "json5": "^2.2.3", - "lint-staged": "^13.2.0", + "lint-staged": "^14.0.1", "msw": "^0.28.0", "pg": "^8.11.3", "plop": "^3.1.1", @@ -338,7 +339,7 @@ "postcss-nesting": "^12.0.1", "postcss-url": "^10.1.3", "postinstall-postinstall": "^2.1.0", - "prettier": "^2.8.6", + "prettier": "^3.0.3", "prop-types": "^15.8.1", "raw-loader": "^4.0.2", "react-is": "^16.12.0", diff --git a/app/client/packages/design-system/headless/src/components/Checkbox/src/Checkbox.tsx b/app/client/packages/design-system/headless/src/components/Checkbox/src/Checkbox.tsx index 06149c86bd..93fac5a2f9 100644 --- a/app/client/packages/design-system/headless/src/components/Checkbox/src/Checkbox.tsx +++ b/app/client/packages/design-system/headless/src/components/Checkbox/src/Checkbox.tsx @@ -36,8 +36,8 @@ const _Checkbox = (props: CheckboxProps, ref: CheckboxRef) => { icon: Icon = CheckIcon, isDisabled: isDisabledProp = false, isIndeterminate = false, - validationState, labelPosition = "right", + validationState, } = props; const state = useToggleState(props); const inputRef = useRef(null); diff --git a/app/client/packages/design-system/headless/src/components/Field/src/Field.tsx b/app/client/packages/design-system/headless/src/components/Field/src/Field.tsx index 8a388d553c..ffb5e26604 100644 --- a/app/client/packages/design-system/headless/src/components/Field/src/Field.tsx +++ b/app/client/packages/design-system/headless/src/components/Field/src/Field.tsx @@ -24,19 +24,19 @@ export type FieldRef = Ref; const _Field = (props: FieldProps, ref: FieldRef) => { const { children, + contextualHelp, + description, + descriptionProps, elementType, errorMessage, errorMessageProps = {}, + fieldType = "field", isDisabled = false, label, labelProps, validationState, wrapperClassName, - description, - descriptionProps, wrapperProps = {}, - contextualHelp, - fieldType = "field", } = props; const hasHelpText = Boolean(description) || diff --git a/app/client/packages/design-system/headless/src/components/Tooltip/src/useTooltip.ts b/app/client/packages/design-system/headless/src/components/Tooltip/src/useTooltip.ts index bd7ee2387b..94360530e6 100644 --- a/app/client/packages/design-system/headless/src/components/Tooltip/src/useTooltip.ts +++ b/app/client/packages/design-system/headless/src/components/Tooltip/src/useTooltip.ts @@ -35,14 +35,14 @@ export interface TooltipOptions { export function useTooltip({ closeDelay = 0, initialOpen = false, + interaction = "hover", + offset: offsetProp = DEFAULT_TOOLTIP_OFFSET, onOpenChange: setControlledOpen, open: controlledOpen, openDelay = 0, - placement = "top", - interaction = "hover", - offset: offsetProp = DEFAULT_TOOLTIP_OFFSET, - shift: shiftProp = DEFAULT_TOOLTIP_SHIFT, padding: paddingProp = DEFAULT_TOOLTIP_PADDING, + placement = "top", + shift: shiftProp = DEFAULT_TOOLTIP_SHIFT, }: TooltipOptions = {}) { const [uncontrolledOpen, setUncontrolledOpen] = React.useState(initialOpen); diff --git a/app/client/packages/design-system/theming/src/token/src/styles.module.css b/app/client/packages/design-system/theming/src/token/src/styles.module.css index 94240e4ef2..525c30fcf1 100644 --- a/app/client/packages/design-system/theming/src/token/src/styles.module.css +++ b/app/client/packages/design-system/theming/src/token/src/styles.module.css @@ -1,4 +1,4 @@ -//THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT. +/* THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT. */ :root { --root-unit: clamp(4px, calc(0.06vw + 3.77px), 5px); --spacing-0: 0; @@ -159,7 +159,7 @@ --color-fg-on-warning: rgb(21.953% 9.0775% 0%); --color-bd: rgb(72.54% 73.727% 82.602%); --color-bd-accent: rgb(33.333% 23.922% 91.373%); - --color-bd-focus: rgb(78.161% 34.431% 0%); + --color-bd-focus: rgb(33.333% 23.922% 91.373%); --color-bd-neutral: rgb(37.869% 38.922% 47.553%); --color-bd-neutral-hover: rgb(49.162% 50.308% 59.345%); --color-bd-positive: rgb(6.7435% 63.436% 18.481%); diff --git a/app/client/packages/design-system/theming/src/token/src/themeTokens.json b/app/client/packages/design-system/theming/src/token/src/themeTokens.json index 3a500e1f6c..e69207cc5c 100644 --- a/app/client/packages/design-system/theming/src/token/src/themeTokens.json +++ b/app/client/packages/design-system/theming/src/token/src/themeTokens.json @@ -193,7 +193,7 @@ "type": "color" }, "bd-focus": { - "value": "rgb(78.161% 34.431% 0%)", + "value": "rgb(33.333% 23.922% 91.373%)", "type": "color" }, "bd-neutral": { diff --git a/app/client/packages/design-system/theming/src/utils/tokensToCss.ts b/app/client/packages/design-system/theming/src/utils/tokensToCss.ts index 67de7e7058..3ab42ecc42 100644 --- a/app/client/packages/design-system/theming/src/utils/tokensToCss.ts +++ b/app/client/packages/design-system/theming/src/utils/tokensToCss.ts @@ -18,7 +18,7 @@ const allTokens = new TokensAccessor({ }).getAllTokens(); const ATTENTION_MESSAGE = - "//THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT."; + "/* THIS FILE IS CREATED AUTOMATICALLY. PLEASE DON'T EDIT IT. */"; const cssStyles = `:root {--root-unit: ${getFluidRootUnit(fluid)}; ${cssRule( allTokens, )}}`; diff --git a/app/client/packages/design-system/widgets-old/src/Dropdown/index.tsx b/app/client/packages/design-system/widgets-old/src/Dropdown/index.tsx index fb9557c44d..caf712d81d 100644 --- a/app/client/packages/design-system/widgets-old/src/Dropdown/index.tsx +++ b/app/client/packages/design-system/widgets-old/src/Dropdown/index.tsx @@ -346,7 +346,8 @@ export const DropdownWrapper = styled.div<{ border: 1px solid var(--ads-dropdown-default-menu-border-color); overflow: hidden; overflow-y: auto; - box-shadow: 0px 12px 16px -4px rgba(0, 0, 0, 0.1), + box-shadow: + 0px 12px 16px -4px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05); display: ${(props) => (props.isOpen ? "inline-block" : "none")}; .dropdown-search { @@ -1121,9 +1122,8 @@ export default function Dropdown(props: DropdownProps) { const handleKeydown = useCallback( (e: React.KeyboardEvent) => { - const elementList = document.getElementById( - "ds--dropdown-options", - )?.children; + const elementList = document.getElementById("ds--dropdown-options") + ?.children; if (!elementList || elementList?.length === 0) { setHighlight(-1); } diff --git a/app/client/packages/design-system/widgets/src/components/Button/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Button/src/styles.module.css index 1a882211e2..99ec4a3435 100644 --- a/app/client/packages/design-system/widgets/src/components/Button/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Button/src/styles.module.css @@ -108,7 +108,9 @@ *----------------------------------------------------------------------------- */ &[data-focused] { - box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus); + box-shadow: + 0 0 0 2px var(--color-bg), + 0 0 0 4px var(--color-bd-focus); } /** diff --git a/app/client/packages/design-system/widgets/src/components/Checkbox/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Checkbox/src/styles.module.css index 6cde08c23e..08c22fa5a9 100644 --- a/app/client/packages/design-system/widgets/src/components/Checkbox/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Checkbox/src/styles.module.css @@ -50,7 +50,9 @@ *----------------------------------------------------------------------------- */ &[data-focused] [data-icon] { - box-shadow: var(--checkbox-box-shadow), 0 0 0 2px var(--color-bg), + box-shadow: + var(--checkbox-box-shadow), + 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus); } diff --git a/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css index 79a92fa649..5da0dc267f 100644 --- a/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Radio/src/styles.module.css @@ -48,7 +48,9 @@ *----------------------------------------------------------------------------- */ &[data-focused] [data-icon] { - box-shadow: var(--radio-box-shadow), 0 0 0 2px var(--color-bg), + box-shadow: + var(--radio-box-shadow), + 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus); } diff --git a/app/client/packages/design-system/widgets/src/components/Switch/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Switch/src/styles.module.css index e4f3ebdaa8..57332dfe0e 100644 --- a/app/client/packages/design-system/widgets/src/components/Switch/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Switch/src/styles.module.css @@ -56,6 +56,8 @@ *----------------------------------------------------------------------------- */ &[data-focused] [data-icon] { - box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus); + box-shadow: + 0 0 0 2px var(--color-bg), + 0 0 0 4px var(--color-bd-focus); } } diff --git a/app/client/packages/design-system/widgets/src/components/testing/styles.module.css b/app/client/packages/design-system/widgets/src/components/testing/styles.module.css index 5677dac88c..bc1c1cb604 100644 --- a/app/client/packages/design-system/widgets/src/components/testing/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/testing/styles.module.css @@ -59,7 +59,9 @@ &[data-focused], &:focus-visible { - box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-bd-focus); + box-shadow: + 0 0 0 2px var(--color-bg), + 0 0 0 4px var(--color-bd-focus); } &[data-disabled] { diff --git a/app/client/src/WidgetQueryGenerators/GSheets/index.ts b/app/client/src/WidgetQueryGenerators/GSheets/index.ts index b79a1ef3b4..fed3841500 100644 --- a/app/client/src/WidgetQueryGenerators/GSheets/index.ts +++ b/app/client/src/WidgetQueryGenerators/GSheets/index.ts @@ -15,6 +15,7 @@ enum COMMAND_TYPES { "FIND" = "FETCH_MANY", "INSERT" = "INSERT_ONE", "UPDATE" = "UPDATE_ONE", + // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values "COUNT" = "FETCH_MANY", } const COMMON_INITIAL_VALUE_KEYS = [ @@ -237,10 +238,13 @@ export default abstract class GSheets extends BaseQueryGenerator { ]; const scrubedOutInitialValues = allowedInitialValueKeys .filter((key) => initialValues[key as keyof GSheetsFormData]) - .reduce((acc, key) => { - acc[key] = initialValues[key as keyof GSheetsFormData]; - return acc; - }, {} as Record); + .reduce( + (acc, key) => { + acc[key] = initialValues[key as keyof GSheetsFormData]; + return acc; + }, + {} as Record, + ); const { formData, ...rest } = builtValues; diff --git a/app/client/src/WidgetQueryGenerators/MongoDB/index.ts b/app/client/src/WidgetQueryGenerators/MongoDB/index.ts index cf6b3c1b45..eaf0b6d88d 100644 --- a/app/client/src/WidgetQueryGenerators/MongoDB/index.ts +++ b/app/client/src/WidgetQueryGenerators/MongoDB/index.ts @@ -191,10 +191,13 @@ export default abstract class MongoDB extends BaseQueryGenerator { const scrubedOutInitalValues = [...ALLOWED_INITAL_VALUE_KEYS, commandKey] .filter((key) => initialValues[key as keyof MongoDBFormData]) - .reduce((acc, key) => { - acc[key] = initialValues[key as keyof MongoDBFormData]; - return acc; - }, {} as Record); + .reduce( + (acc, key) => { + acc[key] = initialValues[key as keyof MongoDBFormData]; + return acc; + }, + {} as Record, + ); const { formData, ...rest } = builtValues; diff --git a/app/client/src/actions/gitSyncActions.ts b/app/client/src/actions/gitSyncActions.ts index ce998114e4..a5fa06cc84 100644 --- a/app/client/src/actions/gitSyncActions.ts +++ b/app/client/src/actions/gitSyncActions.ts @@ -183,8 +183,8 @@ export const fetchGitStatusSuccess = (payload: GitStatusData) => ({ }); export const fetchGitRemoteStatusInit = ({ - onSuccessCallback = noop, onErrorCallback = noop, + onSuccessCallback = noop, } = {}) => ({ type: ReduxActionTypes.FETCH_GIT_REMOTE_STATUS_INIT, onSuccessCallback, diff --git a/app/client/src/ce/pages/Upgrade/Carousel.tsx b/app/client/src/ce/pages/Upgrade/Carousel.tsx index 3a57a41f59..0cfae1f499 100644 --- a/app/client/src/ce/pages/Upgrade/Carousel.tsx +++ b/app/client/src/ce/pages/Upgrade/Carousel.tsx @@ -65,7 +65,8 @@ const CarouselContainer = styled.div` &.active { height: max-content; - box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.06), + box-shadow: + 0 2px 4px -2px rgba(0, 0, 0, 0.06), 0 4px 8px -2px rgba(0, 0, 0, 0.1); background-color: var(--ads-v2-color-bg); diff --git a/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx b/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx index 1a9da5b11f..3e51e3e05e 100644 --- a/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx +++ b/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx @@ -13,8 +13,10 @@ import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; export const UpgradeToBEPageWrapper = styled.div` width: 100%; height: 100%; - background: linear-gradient(90deg, #fff 20px, transparent 1%) center, - linear-gradient(#fff 20px, transparent 1%) center, #d2ddec; + background: + linear-gradient(90deg, #fff 20px, transparent 1%) center, + linear-gradient(#fff 20px, transparent 1%) center, + #d2ddec; background-size: 22px 22px; position: relative; diff --git a/app/client/src/ce/sagas/ApplicationSagas.tsx b/app/client/src/ce/sagas/ApplicationSagas.tsx index 0f49425f24..f571d8a9bc 100644 --- a/app/client/src/ce/sagas/ApplicationSagas.tsx +++ b/app/client/src/ce/sagas/ApplicationSagas.tsx @@ -260,10 +260,13 @@ export function* fetchAppAndPagesSaga( const isValidResponse: boolean = yield call(validateResponse, response); if (isValidResponse) { const prevPagesState: Page[] = yield select(getPageList); - const pagePermissionsMap = prevPagesState.reduce((acc, page) => { - acc[page.pageId] = page.userPermissions ?? []; - return acc; - }, {} as Record); + const pagePermissionsMap = prevPagesState.reduce( + (acc, page) => { + acc[page.pageId] = page.userPermissions ?? []; + return acc; + }, + {} as Record, + ); yield put({ type: ReduxActionTypes.FETCH_APPLICATION_SUCCESS, payload: { ...response.data.application, pages: response.data.pages }, @@ -921,9 +924,8 @@ export function* initializeDatasourceWithDefaultValues(datasource: Datasource) { datasource.datasourceStorages[currentEnvironment], ); payload.isConfigured = false; // imported datasource as not configured yet - const response: ApiResponse = yield DatasourcesApi.updateDatasourceStorage( - payload, - ); + const response: ApiResponse = + yield DatasourcesApi.updateDatasourceStorage(payload); const isValidResponse: boolean = yield validateResponse(response); if (isValidResponse) { yield put({ diff --git a/app/client/src/ce/sagas/WorkspaceSagas.ts b/app/client/src/ce/sagas/WorkspaceSagas.ts index 12efda80a1..097b5e4904 100644 --- a/app/client/src/ce/sagas/WorkspaceSagas.ts +++ b/app/client/src/ce/sagas/WorkspaceSagas.ts @@ -273,9 +273,8 @@ export function* createWorkspaceSaga( ); const isValidResponse: boolean = yield validateResponse(response); if (!isValidResponse) { - const errorMessage: string | undefined = yield getResponseErrorMessage( - response, - ); + const errorMessage: string | undefined = + yield getResponseErrorMessage(response); yield call(reject, { _error: errorMessage }); } else { yield put({ diff --git a/app/client/src/ce/sagas/analyticsSaga.ts b/app/client/src/ce/sagas/analyticsSaga.ts index e6460ee5dc..769ef7d71c 100644 --- a/app/client/src/ce/sagas/analyticsSaga.ts +++ b/app/client/src/ce/sagas/analyticsSaga.ts @@ -44,12 +44,10 @@ export function* getUserAndAppDetails() { getCurrentApplication, ); const user: ReturnType = yield select(getCurrentUser); - const instanceId: ReturnType = yield select( - getInstanceId, - ); - const pageId: ReturnType = yield select( - getCurrentPageId, - ); + const instanceId: ReturnType = + yield select(getInstanceId); + const pageId: ReturnType = + yield select(getCurrentPageId); const userAndAppDetails: UserAndAppDetails = { pageId, appId: currentApp?.id || "", diff --git a/app/client/src/ce/sagas/userSagas.tsx b/app/client/src/ce/sagas/userSagas.tsx index 957fc49a9e..608dbb9c59 100644 --- a/app/client/src/ce/sagas/userSagas.tsx +++ b/app/client/src/ce/sagas/userSagas.tsx @@ -228,9 +228,8 @@ export function* forgotPasswordSaga( ); const isValidResponse: boolean = yield validateResponse(response); if (!isValidResponse) { - const errorMessage: string | undefined = yield getResponseErrorMessage( - response, - ); + const errorMessage: string | undefined = + yield getResponseErrorMessage(response); yield call(reject, { _error: errorMessage }); } else { yield put({ @@ -260,9 +259,8 @@ export function* resetPasswordSaga( const response: ApiResponse = yield callAPI(UserApi.resetPassword, request); const isValidResponse: boolean = yield validateResponse(response); if (!isValidResponse) { - const errorMessage: string | undefined = yield getResponseErrorMessage( - response, - ); + const errorMessage: string | undefined = + yield getResponseErrorMessage(response); yield call(reject, { _error: errorMessage }); } else { yield put({ @@ -294,9 +292,8 @@ export function* invitedUserSignupSaga( ); const isValidResponse: boolean = yield validateResponse(response); if (!isValidResponse) { - const errorMessage: string | undefined = yield getResponseErrorMessage( - response, - ); + const errorMessage: string | undefined = + yield getResponseErrorMessage(response); yield call(reject, { _error: errorMessage }); } else { yield put(invitedUserSignupSuccess()); diff --git a/app/client/src/ce/selectors/entitiesSelector.ts b/app/client/src/ce/selectors/entitiesSelector.ts index e7c414f902..35aa61a050 100644 --- a/app/client/src/ce/selectors/entitiesSelector.ts +++ b/app/client/src/ce/selectors/entitiesSelector.ts @@ -860,10 +860,13 @@ export const getPageActions = (pageId = "") => { export const selectDatasourceIdToNameMap = createSelector( getDatasources, (datasources) => { - return datasources.reduce((acc, datasource) => { - acc[datasource.id] = datasource.name; - return acc; - }, {} as Record); + return datasources.reduce( + (acc, datasource) => { + acc[datasource.id] = datasource.name; + return acc; + }, + {} as Record, + ); }, ); @@ -1185,9 +1188,8 @@ export const getDatasourceScopeValue = ( const options = formConfig[0]?.children?.find( (child: any) => child?.configProperty === configProperty, )?.options; - const label = options?.find( - (option: any) => option.value === scopeValue, - )?.label; + const label = options?.find((option: any) => option.value === scopeValue) + ?.label; return label; }; diff --git a/app/client/src/components/editorComponents/CodeEditor/modes.ts b/app/client/src/components/editorComponents/CodeEditor/modes.ts index ab3d6bb07a..65c0a3a690 100644 --- a/app/client/src/components/editorComponents/CodeEditor/modes.ts +++ b/app/client/src/components/editorComponents/CodeEditor/modes.ts @@ -59,18 +59,21 @@ export const MULTIPLEXING_MODE_CONFIGS: MultiplexingModeConfigs = { }, ...Object.values(sqlModesConfig) .filter((config) => config.isMultiplex) - .reduce((prev, current) => { - prev[current.mode] = { - outerMode: current.mime, - innerModes: [ - { - open: BINDING_OPEN, - close: BINDING_CLOSE, - }, - ], - }; - return prev; - }, {} as Record), + .reduce( + (prev, current) => { + prev[current.mode] = { + outerMode: current.mime, + innerModes: [ + { + open: BINDING_OPEN, + close: BINDING_CLOSE, + }, + ], + }; + return prev; + }, + {} as Record, + ), "text/plain": undefined, "application/json": undefined, javascript: undefined, diff --git a/app/client/src/components/editorComponents/EditorContextProvider.tsx b/app/client/src/components/editorComponents/EditorContextProvider.tsx index 01591ea968..25b287de8e 100644 --- a/app/client/src/components/editorComponents/EditorContextProvider.tsx +++ b/app/client/src/components/editorComponents/EditorContextProvider.tsx @@ -152,12 +152,15 @@ function extractFromObj( keys: K[], ): [Pick, T[K][]] { const deps = [] as T[K][]; - const newObj = keys.reduce((newObj, curr) => { - newObj[curr] = obj[curr]; - deps.push(obj[curr]); + const newObj = keys.reduce( + (newObj, curr) => { + newObj[curr] = obj[curr]; + deps.push(obj[curr]); - return newObj; - }, {} as Pick); + return newObj; + }, + {} as Pick, + ); return [newObj, deps]; } diff --git a/app/client/src/components/editorComponents/GlobalSearch/index.tsx b/app/client/src/components/editorComponents/GlobalSearch/index.tsx index 45455f0523..86e1a1ef33 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/index.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/index.tsx @@ -68,7 +68,9 @@ import { const StyledContainer = styled.div<{ category: SearchCategory; query: string }>` max-height: 530px; - transition: height 0.1s ease, width 0.1s ease; + transition: + height 0.1s ease, + width 0.1s ease; height: ${(props) => isMenu(props.category) || isActionOperation(props.category) || diff --git a/app/client/src/components/editorComponents/PaneWrapper.tsx b/app/client/src/components/editorComponents/PaneWrapper.tsx index a82fdbebf0..ad2dd63d65 100644 --- a/app/client/src/components/editorComponents/PaneWrapper.tsx +++ b/app/client/src/components/editorComponents/PaneWrapper.tsx @@ -4,7 +4,9 @@ import { Colors } from "constants/Colors"; export default styled.div` background-color: ${Colors.GREY_1}; border-radius: ${(props) => props.theme.radii[0]}px; - box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2), 0px 2px 10px rgba(0, 0, 0, 0.1); + box-shadow: + 0px 0px 2px rgba(0, 0, 0, 0.2), + 0px 2px 10px rgba(0, 0, 0, 0.1); color: ${(props) => props.theme.colors.textOnDarkBG}; text-transform: capitalize; `; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/index.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/index.tsx index 0ef8bba672..9b62c7b545 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/index.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/index.tsx @@ -121,22 +121,22 @@ function WidgetQueryGeneratorForm(props: Props) { const [pristine, setPristine] = useState(true); const { - aliases, - alertMessage, - showEditFieldsModal = false, actionButtonCtaText = createMessage(CONNECT_BUTTON_TEXT), + alertMessage, + aliases, + datasourceDropdownVariant, errorMsg, excludePrimaryColumnFromQueryGeneration, expectedType, + isConnectableToWidget, onUpdate, + otherFields = [], propertyPath, propertyValue, sampleData, searchableColumn, + showEditFieldsModal = false, widgetId, - otherFields = [], - isConnectableToWidget, - datasourceDropdownVariant, } = props; const isSourceOpen = useSelector(getIsOneClickBindingOptionsVisibility); diff --git a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx index ee675469e7..e55bb41094 100644 --- a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx +++ b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx @@ -147,7 +147,8 @@ const StyledTooltip = styled.span<{ width?: number }>` text-align: left; background-color: var(--ads-v2-color-bg-emphasis-max); border-radius: var(--ads-v2-border-radius); - box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.06), + box-shadow: + 0 2px 4px -2px rgba(0, 0, 0, 0.06), 0 4px 8px -2px rgba(0, 0, 0, 0.1); color: var(--ads-v2-color-fg-on-emphasis-max); font-family: var(--ads-v2-font-family); diff --git a/app/client/src/components/featureWalkthrough/walkthroughRenderer.tsx b/app/client/src/components/featureWalkthrough/walkthroughRenderer.tsx index 89f7d6c6f0..fab3f46416 100644 --- a/app/client/src/components/featureWalkthrough/walkthroughRenderer.tsx +++ b/app/client/src/components/featureWalkthrough/walkthroughRenderer.tsx @@ -122,12 +122,12 @@ type BoundingRectTargets = Record; const WalkthroughRenderer = ({ details, - offset, - targetId, + dismissOnOverlayClick, eventParams = {}, multipleHighlights, + offset, overlayColor, - dismissOnOverlayClick, + targetId, }: FeatureParams) => { const [boundingRects, setBoundingRects] = useState(null); diff --git a/app/client/src/components/propertyControls/DropDownControl.tsx b/app/client/src/components/propertyControls/DropDownControl.tsx index 430f839e29..9406f5296b 100644 --- a/app/client/src/components/propertyControls/DropDownControl.tsx +++ b/app/client/src/components/propertyControls/DropDownControl.tsx @@ -100,9 +100,8 @@ class DropDownControl extends BaseControl { ? this.props.evaluatedValue : this.props.propertyValue; - selected = options.find( - (option) => option.value === computedValue, - )?.value; + selected = options.find((option) => option.value === computedValue) + ?.value; if (this.props.alwaysShowSelected && !selected) { selected = computedValue; diff --git a/app/client/src/components/propertyControls/FieldConfigurationControl.tsx b/app/client/src/components/propertyControls/FieldConfigurationControl.tsx index c7f43c6f61..4e866233ba 100644 --- a/app/client/src/components/propertyControls/FieldConfigurationControl.tsx +++ b/app/client/src/components/propertyControls/FieldConfigurationControl.tsx @@ -113,7 +113,7 @@ class FieldConfigurationControl extends BaseControl { addNewField = () => { if (this.isArrayItem()) return; - const { propertyValue = {}, propertyName, widgetProperties } = this.props; + const { propertyName, propertyValue = {}, widgetProperties } = this.props; const { childStylesheet, widgetName } = widgetProperties as JSONFormWidgetProps; const schema: Schema = propertyValue; @@ -193,7 +193,7 @@ class FieldConfigurationControl extends BaseControl { }; render() { - const { propertyValue = {}, panelConfig } = this.props; + const { panelConfig, propertyValue = {} } = this.props; const schema: Schema = propertyValue; const schemaItems = Object.values(schema); diff --git a/app/client/src/entities/URLRedirect/URLAssembly.ts b/app/client/src/entities/URLRedirect/URLAssembly.ts index 45bbb79a98..c4ddadf9a7 100644 --- a/app/client/src/entities/URLRedirect/URLAssembly.ts +++ b/app/client/src/entities/URLRedirect/URLAssembly.ts @@ -129,10 +129,13 @@ export class URLBuilder { appParams.applicationVersion || this.appParams.applicationVersion; } if (pageParams) { - const params = pageParams.reduce((acc, page) => { - acc[page.pageId] = page; - return acc; - }, {} as Record); + const params = pageParams.reduce( + (acc, page) => { + acc[page.pageId] = page; + return acc; + }, + {} as Record, + ); Object.assign(this.pageParams, params); } } @@ -196,12 +199,12 @@ export class URLBuilder { */ build(builderParams: URLBuilderParams, mode: APP_MODE = APP_MODE.EDIT) { const { + branch, hash = "", + pageId, params = {}, persistExistingParams = false, suffix, - pageId, - branch, } = builderParams; if (!pageId) { diff --git a/app/client/src/layoutSystems/common/resizer/ModalResizable.tsx b/app/client/src/layoutSystems/common/resizer/ModalResizable.tsx index 42ed69b0f0..570d87c8b3 100644 --- a/app/client/src/layoutSystems/common/resizer/ModalResizable.tsx +++ b/app/client/src/layoutSystems/common/resizer/ModalResizable.tsx @@ -42,7 +42,7 @@ type ResizableHandleProps = { function ResizableHandle(props: ResizableHandleProps) { const bind = useDrag( - ({ first, last, dragging, movement: [mx, my], memo }) => { + ({ dragging, first, last, memo, movement: [mx, my] }) => { if (!props.allowResize) { return; } diff --git a/app/client/src/layoutSystems/common/resizer/common.tsx b/app/client/src/layoutSystems/common/resizer/common.tsx index 06e2bfbeb9..a8ba4b472e 100644 --- a/app/client/src/layoutSystems/common/resizer/common.tsx +++ b/app/client/src/layoutSystems/common/resizer/common.tsx @@ -168,9 +168,9 @@ type ResizableHandleProps = { export function ResizableHandle(props: ResizableHandleProps) { const bind = useDrag((state) => { const { + dragging, first, last, - dragging, memo, movement: [mx, my], } = state; diff --git a/app/client/src/layoutSystems/fixedlayout/common/widgetGrouping/WidgetsMultiSelectBox.tsx b/app/client/src/layoutSystems/fixedlayout/common/widgetGrouping/WidgetsMultiSelectBox.tsx index f40d8d7578..d8e6d4f19e 100644 --- a/app/client/src/layoutSystems/fixedlayout/common/widgetGrouping/WidgetsMultiSelectBox.tsx +++ b/app/client/src/layoutSystems/fixedlayout/common/widgetGrouping/WidgetsMultiSelectBox.tsx @@ -206,10 +206,8 @@ function WidgetsMultiSelectBox(props: { left: (e.clientX - bounds.left) / props.snapColumnSpace, }; const top = minBy(selectedWidgets, (rect) => rect.topRow)?.topRow; - const left = minBy( - selectedWidgets, - (rect) => rect.leftColumn, - )?.leftColumn; + const left = minBy(selectedWidgets, (rect) => rect.leftColumn) + ?.leftColumn; setDraggingState({ isDragging: true, dragGroupActualParent: parentId || "", diff --git a/app/client/src/pages/AdminSettings/FormGroup/ColorInput.tsx b/app/client/src/pages/AdminSettings/FormGroup/ColorInput.tsx index 1dd4ea0c68..c5263ee0ba 100644 --- a/app/client/src/pages/AdminSettings/FormGroup/ColorInput.tsx +++ b/app/client/src/pages/AdminSettings/FormGroup/ColorInput.tsx @@ -102,11 +102,11 @@ export const ColorInput = (props: ColorInputProps) => { useState("primary"); const { className, + filter = () => true, + logEvent, onChange, tooltips, value, - filter = () => true, - logEvent, } = props; const colorInputRef = useRef(null); diff --git a/app/client/src/pages/Editor/EntityNavigation/PropertyPane/utils.ts b/app/client/src/pages/Editor/EntityNavigation/PropertyPane/utils.ts index 231e8e58cc..4e7b4e5bdf 100644 --- a/app/client/src/pages/Editor/EntityNavigation/PropertyPane/utils.ts +++ b/app/client/src/pages/Editor/EntityNavigation/PropertyPane/utils.ts @@ -78,14 +78,13 @@ export const getSectionId = ( // "boxShadow" and "resetButtonStyles.boxShadow" // The intendened match is "resetButtonStyles.boxShadow". // So we aggregrate matches and find the best match which is the longest string - const bestMatchedSection = matchedSections.reduce(function ( - sectiona, - sectionb, - ) { - return sectiona.propertyName.length > sectionb.propertyName.length - ? sectiona - : sectionb; - }); + const bestMatchedSection = matchedSections.reduce( + function (sectiona, sectionb) { + return sectiona.propertyName.length > sectionb.propertyName.length + ? sectiona + : sectionb; + }, + ); return bestMatchedSection.id; }; diff --git a/app/client/src/pages/Editor/Explorer/Actions/helpers.tsx b/app/client/src/pages/Editor/Explorer/Actions/helpers.tsx index 5587dab081..1da72a8483 100644 --- a/app/client/src/pages/Editor/Explorer/Actions/helpers.tsx +++ b/app/client/src/pages/Editor/Explorer/Actions/helpers.tsx @@ -97,8 +97,9 @@ export const ACTION_PLUGIN_MAP: Array = [ ]; export const getActionConfig = (type: PluginType) => - ACTION_PLUGIN_MAP.find((configByType: ActionGroupConfig | undefined) => - configByType?.types.includes(type), + ACTION_PLUGIN_MAP.find( + (configByType: ActionGroupConfig | undefined) => + configByType?.types.includes(type), ); export const useNewActionName = () => { diff --git a/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx b/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx index 328179681d..bb076a17f5 100644 --- a/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx +++ b/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx @@ -188,10 +188,10 @@ export function MoreJSCollectionsMenu(props: EntityContextMenuProps) { /> - {options.map((option) => { + {options.map((option, index) => { if (option.children) { return ( - + {option.label} diff --git a/app/client/src/pages/Editor/Explorer/Libraries/index.tsx b/app/client/src/pages/Editor/Explorer/Libraries/index.tsx index 2d3ba566d8..7e502331be 100644 --- a/app/client/src/pages/Editor/Explorer/Libraries/index.tsx +++ b/app/client/src/pages/Editor/Explorer/Libraries/index.tsx @@ -46,10 +46,13 @@ import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; import { FEATURE_FLAG } from "@appsmith/entities/FeatureFlag"; import { getHasCreateActionPermission } from "@appsmith/utils/BusinessFeatures/permissionPageHelpers"; -const docsURLMap = recommendedLibraries.reduce((acc, lib) => { - acc[lib.url] = lib.docsURL; - return acc; -}, {} as Record); +const docsURLMap = recommendedLibraries.reduce( + (acc, lib) => { + acc[lib.url] = lib.docsURL; + return acc; + }, + {} as Record, +); const Library = styled.li` list-style: none; diff --git a/app/client/src/pages/Editor/Explorer/hooks.ts b/app/client/src/pages/Editor/Explorer/hooks.ts index c8a8ff5828..d0068e4bd8 100644 --- a/app/client/src/pages/Editor/Explorer/hooks.ts +++ b/app/client/src/pages/Editor/Explorer/hooks.ts @@ -123,15 +123,17 @@ export const useAppWideAndOtherDatasource = () => { const otherDatasourceInWorkspace = useOtherDatasourcesInWorkspace(); const appWideDS = useMemo( () => - [...datasourcesUsedInApplication].sort((ds1, ds2) => - ds1.name?.toLowerCase()?.localeCompare(ds2.name?.toLowerCase()), + [...datasourcesUsedInApplication].sort( + (ds1, ds2) => + ds1.name?.toLowerCase()?.localeCompare(ds2.name?.toLowerCase()), ), [datasourcesUsedInApplication], ); const otherDS = useMemo( () => - [...otherDatasourceInWorkspace].sort((ds1, ds2) => - ds1.name?.toLowerCase()?.localeCompare(ds2.name?.toLowerCase()), + [...otherDatasourceInWorkspace].sort( + (ds1, ds2) => + ds1.name?.toLowerCase()?.localeCompare(ds2.name?.toLowerCase()), ), [otherDatasourceInWorkspace], ); @@ -249,8 +251,9 @@ export const usePageIds = (searchKeyword?: string) => { }; export const useEntityUpdateState = (entityId: string) => { - return useSelector((state: AppState) => - get(state, "ui.explorer.entity.updatingEntity")?.includes(entityId), + return useSelector( + (state: AppState) => + get(state, "ui.explorer.entity.updatingEntity")?.includes(entityId), ); }; diff --git a/app/client/src/pages/Editor/Popper.tsx b/app/client/src/pages/Editor/Popper.tsx index 4a94460835..3db62f80d4 100644 --- a/app/client/src/pages/Editor/Popper.tsx +++ b/app/client/src/pages/Editor/Popper.tsx @@ -104,14 +104,14 @@ export default (props: PopperProps) => { const { boundaryParent = "viewport", - isDraggable = false, + cypressSelectorDragHandle, disablePopperEvents = false, + isDraggable = false, + onPositionChange = onPositionChangeFn, position, renderDragBlock, - onPositionChange = onPositionChangeFn, - themeMode = props.themeMode || ThemeMode.LIGHT, renderDragBlockPositions, - cypressSelectorDragHandle, + themeMode = props.themeMode || ThemeMode.LIGHT, } = props; // Memoizing to avoid rerender of draggable icon. diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/AddDeployKey.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/AddDeployKey.tsx index be6208e8e7..bca05c7d55 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/AddDeployKey.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/AddDeployKey.tsx @@ -147,11 +147,11 @@ interface AddDeployKeyProps { } function AddDeployKey({ + connectLoading = false, + errorData, + isImport = false, onChange = noop, value = {}, - isImport = false, - errorData, - connectLoading = false, }: AddDeployKeyProps) { const isModalOpen = useSelector(getIsGitSyncModalOpen); const [fetched, setFetched] = useState(false); diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/ChooseGitProvider.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/ChooseGitProvider.tsx index f0ec3289b6..00d6829500 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/ChooseGitProvider.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/ChooseGitProvider.tsx @@ -66,9 +66,9 @@ interface ChooseGitProviderProps { } function ChooseGitProvider({ + isImport = false, onChange = noop, value = {}, - isImport = false, }: ChooseGitProviderProps) { const workspace = useSelector(getCurrentAppWorkspace); const isMobile = useIsMobileDevice(); diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/GenerateSSH.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/GenerateSSH.tsx index ce194d6001..181d900723 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/GenerateSSH.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/GenerateSSH.tsx @@ -44,9 +44,9 @@ interface GenerateSSHProps { } function GenerateSSH({ + errorData, onChange = noop, value = {}, - errorData, }: GenerateSSHProps) { const [isTouched, setIsTouched] = useState(false); const isInvalid = diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/Steps.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/Steps.tsx index a621ae5188..e702e2ce3e 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/Steps.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/Steps.tsx @@ -77,9 +77,9 @@ interface StepsProps { } function Steps({ - steps = [], activeKey, onActiveKeyChange = noop, + steps = [], }: StepsProps) { const activeIndex = steps.findIndex((s) => s.key === activeKey); diff --git a/app/client/src/pages/Editor/gitSync/components/CopyButton.tsx b/app/client/src/pages/Editor/gitSync/components/CopyButton.tsx index 7bdbf5065d..1bceb97188 100644 --- a/app/client/src/pages/Editor/gitSync/components/CopyButton.tsx +++ b/app/client/src/pages/Editor/gitSync/components/CopyButton.tsx @@ -21,11 +21,11 @@ interface CopyButtonProps { } export function CopyButton({ - value, delay = 2000, + isDisabled = false, onCopy = noop, tooltipMessage, - isDisabled = false, + value, }: CopyButtonProps) { const timerRef = useRef(); const [showCopied, setShowCopied] = useState(false); diff --git a/app/client/src/pages/Editor/gitSync/components/Statusbar.tsx b/app/client/src/pages/Editor/gitSync/components/Statusbar.tsx index 155f8439f7..726231295c 100644 --- a/app/client/src/pages/Editor/gitSync/components/Statusbar.tsx +++ b/app/client/src/pages/Editor/gitSync/components/Statusbar.tsx @@ -27,9 +27,12 @@ export default function GitSyncStatusbar(props: StatusbarProps) { } } else { if (percentage < 90) { - const interval = setInterval(() => { - setPercentage((percentage) => percentage + 10); - }, (period * 1000) / 9); + const interval = setInterval( + () => { + setPercentage((percentage) => percentage + 10); + }, + (period * 1000) / 9, + ); return () => clearInterval(interval); } } diff --git a/app/client/src/pages/Editor/gitSync/hooks/useSSHKeyPair.ts b/app/client/src/pages/Editor/gitSync/hooks/useSSHKeyPair.ts index 26684aba83..03073ab82f 100644 --- a/app/client/src/pages/Editor/gitSync/hooks/useSSHKeyPair.ts +++ b/app/client/src/pages/Editor/gitSync/hooks/useSSHKeyPair.ts @@ -23,7 +23,7 @@ export const useSSHKeyPair = () => { const [failedGeneratingSSHKey, setFailedGeneratingSSHKey] = useState(false); const fetchSSHKeyPair = useCallback( - ({ onSuccessCallback = noop, onErrorCallback = noop } = {}) => { + ({ onErrorCallback = noop, onSuccessCallback = noop } = {}) => { setIsFetchingSSHKeyPair(true); dispatch( getSSHKeyPair({ @@ -44,7 +44,7 @@ export const useSSHKeyPair = () => { const generateSSHKey = useCallback( ( keyType = "ECDSA", - { onSuccessCallback = noop, onErrorCallback = noop } = {}, + { onErrorCallback = noop, onSuccessCallback = noop } = {}, ) => { // if (currentApplication?.id) { setIsGeneratingSSHKey(true); diff --git a/app/client/src/pages/Templates/TemplateView.tsx b/app/client/src/pages/Templates/TemplateView.tsx index bde92c63e0..181f57588c 100644 --- a/app/client/src/pages/Templates/TemplateView.tsx +++ b/app/client/src/pages/Templates/TemplateView.tsx @@ -52,7 +52,8 @@ export const IframeWrapper = styled.div` iframe { border-radius: 0px 0px 16px 16px; - box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.1), + box-shadow: + 0px 20px 24px -4px rgba(16, 24, 40, 0.1), 0px 8px 8px -4px rgba(16, 24, 40, 0.04); width: 100%; height: 734px; diff --git a/app/client/src/pages/common/SuccessTick.tsx b/app/client/src/pages/common/SuccessTick.tsx index a1c9f1a91e..d423dd50a0 100644 --- a/app/client/src/pages/common/SuccessTick.tsx +++ b/app/client/src/pages/common/SuccessTick.tsx @@ -33,7 +33,8 @@ const CheckmarkWrapper = styled.div<{ $height: string; $width: string }>` stroke-miterlimit: 10; margin: 10% auto; box-shadow: inset 0px 0px 0px #7ac142; - animation: fill 0.4s ease-in-out 0.4s forwards, + animation: + fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both; } diff --git a/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx b/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx index f2be6c97ce..ad8ebcabc5 100644 --- a/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx +++ b/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx @@ -47,9 +47,9 @@ export default function AuthMessage(props: AuthMessageProps) { calloutType = "error", datasource, description, + isInViewMode = false, pageId, style = {}, - isInViewMode = false, } = props; const dispatch = useDispatch(); const pluginType = useSelector((state: AppState) => diff --git a/app/client/src/pages/common/datasourceAuth/index.tsx b/app/client/src/pages/common/datasourceAuth/index.tsx index 04d26e0ada..c69a72a087 100644 --- a/app/client/src/pages/common/datasourceAuth/index.tsx +++ b/app/client/src/pages/common/datasourceAuth/index.tsx @@ -134,20 +134,20 @@ function DatasourceAuth({ ], formData, getSanitizedFormData, + isFormDirty, + isInsideReconnectModal, isInvalid, - pageId: pageIdProp = "", - pluginType, - pluginName, - pluginPackageName, isSaving, isTesting, - viewMode, + onCancel, + pageId: pageIdProp = "", + pluginName, + pluginPackageName, + pluginType, + scopeValue, shouldDisplayAuthMessage = true, triggerSave, - isFormDirty, - scopeValue, - isInsideReconnectModal, - onCancel, + viewMode, }: Props) { const shouldRender = !viewMode || isInsideReconnectModal; const authType = diff --git a/app/client/src/plugins/Linting/constants.ts b/app/client/src/plugins/Linting/constants.ts index c985f1a90b..5c04ff6e24 100644 --- a/app/client/src/plugins/Linting/constants.ts +++ b/app/client/src/plugins/Linting/constants.ts @@ -27,7 +27,7 @@ export const lintOptions = (globalData: Record) => // global values globals: globalData, loopfunc: true, - } as LintOptions); + }) as LintOptions; export const JS_OBJECT_START_STATEMENT = "export default"; export const INVALID_JSOBJECT_START_STATEMENT = `JSObject must start with '${JS_OBJECT_START_STATEMENT}'`; export const INVALID_JSOBJECT_START_STATEMENT_ERROR_CODE = diff --git a/app/client/src/plugins/Linting/handlers/lintService.ts b/app/client/src/plugins/Linting/handlers/lintService.ts index 9eb7c8913f..7cf77eeab4 100644 --- a/app/client/src/plugins/Linting/handlers/lintService.ts +++ b/app/client/src/plugins/Linting/handlers/lintService.ts @@ -318,9 +318,12 @@ class LintService { } function convertArrayToObject(arr: string[]) { - return arr.reduce((acc, item) => { - return { ...acc, [item]: true } as const; - }, {} as Record); + return arr.reduce( + (acc, item) => { + return { ...acc, [item]: true } as const; + }, + {} as Record, + ); } function filterDataPaths(paths: string[], entityTree: EntityTree) { diff --git a/app/client/src/reducers/entityReducers/pageListReducer.tsx b/app/client/src/reducers/entityReducers/pageListReducer.tsx index fc2bee888e..acf24c650b 100644 --- a/app/client/src/reducers/entityReducers/pageListReducer.tsx +++ b/app/client/src/reducers/entityReducers/pageListReducer.tsx @@ -59,10 +59,13 @@ export const pageListReducer = createReducer(initialState, { Array<{ pageId: string; dsl: DSL; userPermissions: string[] }> >, ) => { - const pagePermissionsMap = action.payload.reduce((acc, page) => { - acc[page.pageId] = page.userPermissions; - return acc; - }, {} as Record); + const pagePermissionsMap = action.payload.reduce( + (acc, page) => { + acc[page.pageId] = page.userPermissions; + return acc; + }, + {} as Record, + ); return { ...state, diff --git a/app/client/src/sagas/ActionExecution/geolocationSaga.ts b/app/client/src/sagas/ActionExecution/geolocationSaga.ts index f216bcca4c..53be2acb11 100644 --- a/app/client/src/sagas/ActionExecution/geolocationSaga.ts +++ b/app/client/src/sagas/ActionExecution/geolocationSaga.ts @@ -12,7 +12,10 @@ import type { } from "workers/Evaluation/fns/geolocationFns"; class GeoLocationError extends Error { - constructor(message: string, private responseData?: any) { + constructor( + message: string, + private responseData?: any, + ) { super(message); } } diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index 302b3eabc3..699b304b30 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -301,9 +301,8 @@ export function* fetchActionsSaga( { mode: "EDITOR", appId: applicationId }, ); try { - const response: ApiResponse = yield ActionAPI.fetchActions( - applicationId, - ); + const response: ApiResponse = + yield ActionAPI.fetchActions(applicationId); const isValidResponse: boolean = yield validateResponse(response); if (isValidResponse) { yield put({ @@ -727,9 +726,8 @@ export function* refactorActionName( newName: newName, }); - const isRefactorSuccessful: boolean = yield validateResponse( - refactorResponse, - ); + const isRefactorSuccessful: boolean = + yield validateResponse(refactorResponse); const currentPageId: string = yield select(getCurrentPageId); diff --git a/app/client/src/sagas/ApiPaneSagas.ts b/app/client/src/sagas/ApiPaneSagas.ts index 9ee5664afd..4dae512000 100644 --- a/app/client/src/sagas/ApiPaneSagas.ts +++ b/app/client/src/sagas/ApiPaneSagas.ts @@ -666,7 +666,7 @@ function* handleCreateNewApiActionSaga( }>, ) { const workspaceId: string = yield select(getCurrentWorkspaceId); - const { pageId, apiType = PluginPackageName.REST_API } = action.payload; + const { apiType = PluginPackageName.REST_API, pageId } = action.payload; const pluginId: string = yield select(getPluginIdOfPackageName, apiType); // Default Config is Rest Api Plugin Config let defaultConfig = DEFAULT_CREATE_API_CONFIG; diff --git a/app/client/src/sagas/AppThemingSaga.tsx b/app/client/src/sagas/AppThemingSaga.tsx index 13c16026c3..3855bc7f6a 100644 --- a/app/client/src/sagas/AppThemingSaga.tsx +++ b/app/client/src/sagas/AppThemingSaga.tsx @@ -74,9 +74,8 @@ export function* initAppTheming() { export function* fetchAppThemes(action: ReduxAction) { try { const { applicationId } = action.payload; - const response: ApiResponse = yield ThemingApi.fetchThemes( - applicationId, - ); + const response: ApiResponse = + yield ThemingApi.fetchThemes(applicationId); yield put({ type: ReduxActionTypes.FETCH_APP_THEMES_SUCCESS, @@ -294,9 +293,8 @@ function* closeisBetaCardShown() { */ function* resetTheme() { try { - const canvasWidgets: CanvasWidgetsReduxState = yield select( - getCanvasWidgets, - ); + const canvasWidgets: CanvasWidgetsReduxState = + yield select(getCanvasWidgets); const propertiesToUpdate: UpdateWidgetPropertyPayload[] = getPropertiesToUpdateForReset(canvasWidgets); @@ -313,9 +311,8 @@ function* setDefaultSelectedThemeOnError() { const applicationId: string = yield select(getCurrentApplicationId); try { // Fetch all system themes - const response: ApiResponse = yield ThemingApi.fetchThemes( - applicationId, - ); + const response: ApiResponse = + yield ThemingApi.fetchThemes(applicationId); // Gets default theme const theme = find(response.data, { name: "Default" }); diff --git a/app/client/src/sagas/AutoLayoutUpdateSagas.tsx b/app/client/src/sagas/AutoLayoutUpdateSagas.tsx index 1032caae51..32a20323cc 100644 --- a/app/client/src/sagas/AutoLayoutUpdateSagas.tsx +++ b/app/client/src/sagas/AutoLayoutUpdateSagas.tsx @@ -149,9 +149,8 @@ export function* updateLayoutSystemTypeSaga( actionPayload: ReduxAction, ) { try { - const currLayoutSystemType: LayoutSystemTypes = yield select( - getLayoutSystemType, - ); + const currLayoutSystemType: LayoutSystemTypes = + yield select(getLayoutSystemType); const payloadLayoutSystemType = actionPayload.payload; if (currLayoutSystemType === payloadLayoutSystemType) return; @@ -194,9 +193,8 @@ export function* recalculateAutoLayoutColumnsAndSave( widgets?: CanvasWidgetsReduxState, ) { const layoutSystemType: LayoutSystemTypes = yield select(getLayoutSystemType); - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); yield put( updateLayoutForMobileBreakpointAction( diff --git a/app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts b/app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts index 2354a0c9d3..c4078a3ef1 100644 --- a/app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts +++ b/app/client/src/sagas/CanvasSagas/DraggingCanvasSagas.ts @@ -72,9 +72,8 @@ export function* getCanvasSizeAfterWidgetMove( let mainCanvasMinHeight; let canvasParentMinHeight = canvasWidget.minHeight; if (canvasWidgetId === MAIN_CONTAINER_WIDGET_ID) { - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); mainCanvasMinHeight = mainCanvasProps?.height; } else if (canvasWidget.parentId) { const parent: FlattenedWidgetProps = yield select( @@ -335,9 +334,8 @@ function* moveWidgetsSaga( ); } - const layoutSystemType: LayoutSystemTypes = yield select( - getLayoutSystemType, - ); + const layoutSystemType: LayoutSystemTypes = + yield select(getLayoutSystemType); let updatedWidgets: CanvasWidgetsReduxState = { ...allWidgets }; if (layoutSystemType === LayoutSystemTypes.AUTO) { /** diff --git a/app/client/src/sagas/DebuggerSagas.ts b/app/client/src/sagas/DebuggerSagas.ts index 8aa2f80ae3..4bf9b77c6f 100644 --- a/app/client/src/sagas/DebuggerSagas.ts +++ b/app/client/src/sagas/DebuggerSagas.ts @@ -453,9 +453,8 @@ function* logDebuggerErrorAnalyticsSaga( function* addDebuggerErrorLogsSaga(action: ReduxAction) { const errorLogs = action.payload; - const currentDebuggerErrors: Record = yield select( - getDebuggerErrors, - ); + const currentDebuggerErrors: Record = + yield select(getDebuggerErrors); const appMode: ReturnType = yield select(getAppMode); yield put(debuggerLogInit(errorLogs)); const validErrorLogs = errorLogs.filter((log) => log.source && log.id); @@ -585,9 +584,8 @@ function* deleteDebuggerErrorLogsSaga( action: ReduxAction<{ id: string; analytics: Log["analytics"] }[]>, ) { const { payload } = action; - const currentDebuggerErrors: Record = yield select( - getDebuggerErrors, - ); + const currentDebuggerErrors: Record = + yield select(getDebuggerErrors); const appMode: ReturnType = yield select(getAppMode); const existingErrorPayloads = payload.filter((item) => currentDebuggerErrors.hasOwnProperty(item.id), diff --git a/app/client/src/sagas/EvaluationsSaga.ts b/app/client/src/sagas/EvaluationsSaga.ts index 6078ed9cab..93de0767b8 100644 --- a/app/client/src/sagas/EvaluationsSaga.ts +++ b/app/client/src/sagas/EvaluationsSaga.ts @@ -130,16 +130,16 @@ export function* updateDataTreeHandler( errors, evalMetaUpdates = [], evaluationOrder, - reValidatedPaths, isCreateFirstTree = false, isNewWidgetAdded, jsUpdates, + jsVarsCreatedEvent, logs, removedPaths, + reValidatedPaths, staleMetaIds, undefinedEvalValuesMap, unEvalUpdates, - jsVarsCreatedEvent, updates, } = evalTreeResponse; @@ -243,12 +243,10 @@ export function* evaluateTreeSaga( > = yield select(getAllActionValidationConfig); const unevalTree = unEvalAndConfigTree.unEvalTree; const widgets: ReturnType = yield select(getWidgets); - const metaWidgets: ReturnType = yield select( - getMetaWidgets, - ); - const theme: ReturnType = yield select( - getSelectedAppTheme, - ); + const metaWidgets: ReturnType = + yield select(getMetaWidgets); + const theme: ReturnType = + yield select(getSelectedAppTheme); const toPrintConfigTree = unEvalAndConfigTree.configTree; log.debug({ unevalTree, configTree: toPrintConfigTree }); PerformanceTracker.startAsyncTracking( @@ -600,9 +598,8 @@ function* evaluationChangeListenerSaga(): any { evalQueueBuffer(), ); while (true) { - const action: EvaluationReduxAction = yield take( - evtActionChannel, - ); + const action: EvaluationReduxAction = + yield take(evtActionChannel); yield call(evalAndLintingHandler, true, action, { shouldReplay: get(action, "payload.shouldReplay"), diff --git a/app/client/src/sagas/FormEvaluationSaga.ts b/app/client/src/sagas/FormEvaluationSaga.ts index 7151fb41f5..adf5c383ec 100644 --- a/app/client/src/sagas/FormEvaluationSaga.ts +++ b/app/client/src/sagas/FormEvaluationSaga.ts @@ -270,9 +270,8 @@ function* formEvaluationChangeListenerSaga() { type: ReduxActionTypes.FORM_EVALUATION_EMPTY_BUFFER, }); } - const action: ReduxAction = yield take( - formEvalChannel, - ); + const action: ReduxAction = + yield take(formEvalChannel); yield call(setFormEvaluationSagaAsync, action); } } diff --git a/app/client/src/sagas/GitSyncSagas.ts b/app/client/src/sagas/GitSyncSagas.ts index 9408ddc60f..47df5af578 100644 --- a/app/client/src/sagas/GitSyncSagas.ts +++ b/app/client/src/sagas/GitSyncSagas.ts @@ -1072,9 +1072,8 @@ function* watchGitRequests() { ); while (true) { - const { type, ...args }: ReduxAction = yield take( - gitActionChannel, - ); + const { type, ...args }: ReduxAction = + yield take(gitActionChannel); yield call(gitRequestActions[type], { type, ...args }); } } diff --git a/app/client/src/sagas/JSActionSagas.ts b/app/client/src/sagas/JSActionSagas.ts index 51cfc162e7..16d2ba8ed2 100644 --- a/app/client/src/sagas/JSActionSagas.ts +++ b/app/client/src/sagas/JSActionSagas.ts @@ -361,9 +361,8 @@ export function* refactorJSObjectName( newName: newName, }); - const isRefactorSuccessful: boolean = yield validateResponse( - refactorResponse, - ); + const isRefactorSuccessful: boolean = + yield validateResponse(refactorResponse); const currentPageId: string | undefined = yield select(getCurrentPageId); diff --git a/app/client/src/sagas/JSLibrarySaga.ts b/app/client/src/sagas/JSLibrarySaga.ts index 0e1857ab9f..17d57a7101 100644 --- a/app/client/src/sagas/JSLibrarySaga.ts +++ b/app/client/src/sagas/JSLibrarySaga.ts @@ -404,9 +404,8 @@ function* startInstallationRequestChannel() { ReduxActionTypes.INSTALL_LIBRARY_INIT, ]); while (true) { - const action: ReduxAction> = yield take( - queueInstallChannel, - ); + const action: ReduxAction> = + yield take(queueInstallChannel); yield put({ type: ReduxActionTypes.INSTALL_LIBRARY_START, payload: action.payload.url, diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index d19df1b87b..4a8c004622 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -568,9 +568,8 @@ function* handleRefactorJSActionNameSaga( const refactorResponse: ApiResponse = yield JSActionAPI.updateJSCollectionActionRefactor(requestData); - const isRefactorSuccessful: boolean = yield validateResponse( - refactorResponse, - ); + const isRefactorSuccessful: boolean = + yield validateResponse(refactorResponse); const currentPageId: string | undefined = yield select(getCurrentPageId); diff --git a/app/client/src/sagas/ModalSagas.ts b/app/client/src/sagas/ModalSagas.ts index 036e4501c8..b2f5dbc06a 100644 --- a/app/client/src/sagas/ModalSagas.ts +++ b/app/client/src/sagas/ModalSagas.ts @@ -109,9 +109,8 @@ export function* createModalSaga(action: ReduxAction<{ modalName: string }>) { export function* showModalByNameSaga( action: ReduxAction<{ modalName: string }>, ) { - const widgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const widgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const modal: FlattenedWidgetProps | undefined = Object.values(widgets).find( (widget: FlattenedWidgetProps) => widget.widgetName === action.payload.modalName, diff --git a/app/client/src/sagas/OnboardingSagas.ts b/app/client/src/sagas/OnboardingSagas.ts index 011f28a1c3..ff743506fa 100644 --- a/app/client/src/sagas/OnboardingSagas.ts +++ b/app/client/src/sagas/OnboardingSagas.ts @@ -186,9 +186,8 @@ function* setCurrentStepSaga(action: ReduxAction) { function* setUpTourAppSaga() { yield put(setPreviewModeAction(false)); // Delete the container widget - const widgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const widgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const containerWidget = Object.values(widgets).find( (widget) => widget.type === "CONTAINER_WIDGET", ); @@ -281,9 +280,8 @@ function* addOnboardingWidget(action: ReduxAction>) { // Wait for widget names to be updated // Updating widget names here as widget blueprints don't take widget names yield take(ReduxActionTypes.SAVE_PAGE_SUCCESS); - const widgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const widgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const nameInput = Object.values(widgets).find( (widget) => widget.widgetName === "Input1", @@ -331,9 +329,8 @@ function* addOnboardingWidget(action: ReduxAction>) { // Update button widget text function* updateWidgetTextSaga() { - const widgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const widgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const buttonWidget = Object.values(widgets).find( (widget) => widget.type === "BUTTON_WIDGET", ); @@ -373,9 +370,8 @@ function* endGuidedTourSaga(action: ReduxAction) { function* selectWidgetSaga( action: ReduxAction<{ widgetName: string; propertyName?: string }>, ) { - const widgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const widgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const widget = Object.values(widgets).find((widget) => { return widget.widgetName === action.payload.widgetName; }); diff --git a/app/client/src/sagas/PageSagas.tsx b/app/client/src/sagas/PageSagas.tsx index 363d4aca8e..5c5e8263e6 100644 --- a/app/client/src/sagas/PageSagas.tsx +++ b/app/client/src/sagas/PageSagas.tsx @@ -171,10 +171,13 @@ export function* fetchPageListSaga( const response: FetchPageListResponse = yield call(apiCall, applicationId); const isValidResponse: boolean = yield validateResponse(response); const prevPagesState: Page[] = yield select(getPageList); - const pagePermissionsMap = prevPagesState.reduce((acc, page) => { - acc[page.pageId] = page.userPermissions ?? []; - return acc; - }, {} as Record); + const pagePermissionsMap = prevPagesState.reduce( + (acc, page) => { + acc[page.pageId] = page.userPermissions ?? []; + return acc; + }, + {} as Record, + ); if (isValidResponse) { const workspaceId = response.data.workspaceId; const pages: Page[] = response.data.pages.map((page) => ({ @@ -292,9 +295,8 @@ export function* handleFetchedPage({ isFirstLoad?: boolean; }) { const isAutoLayout: boolean = yield select(getIsAutoLayout); - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); const isValidResponse: boolean = yield validateResponse(fetchPageResponse); const willPageBeMigrated = checkIfMigrationIsNeeded(fetchPageResponse); const lastUpdatedTime = getLastUpdateTime(fetchPageResponse); @@ -705,9 +707,8 @@ export function* createNewPageFromEntity( ) { try { const isAutoLayout: boolean = yield select(getIsAutoLayout); - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); // Default layout is extracted by adding dynamically computed properties like min-height. const defaultPageLayouts = [ { @@ -748,9 +749,8 @@ export function* createPageSaga( try { const guidedTourEnabled: boolean = yield select(inGuidedTour); const isAutoLayout: boolean = yield select(getIsAutoLayout); - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); // Prevent user from creating a new page during the guided tour if (guidedTourEnabled) { @@ -1130,9 +1130,8 @@ export function* setDataUrl() { export function* fetchPageDSLSaga(pageId: string) { try { const isAutoLayout: boolean = yield select(getIsAutoLayout); - const mainCanvasProps: MainCanvasReduxState = yield select( - getMainCanvasProps, - ); + const mainCanvasProps: MainCanvasReduxState = + yield select(getMainCanvasProps); const fetchPageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { id: pageId, }); diff --git a/app/client/src/sagas/PostEvaluationSagas.ts b/app/client/src/sagas/PostEvaluationSagas.ts index d8f859e7e8..dfb89089f8 100644 --- a/app/client/src/sagas/PostEvaluationSagas.ts +++ b/app/client/src/sagas/PostEvaluationSagas.ts @@ -222,9 +222,8 @@ export function* evalErrorHandler( removedPaths?: Array<{ entityId: string; fullpath: string }>, ) { if (dataTree && evaluationOrder && configTree && reValidatedPaths) { - const currentDebuggerErrors: Record = yield select( - getDebuggerErrors, - ); + const currentDebuggerErrors: Record = + yield select(getDebuggerErrors); const evalAndValidationOrder = new Set([ ...reValidatedPaths, diff --git a/app/client/src/sagas/ProvidersSaga.ts b/app/client/src/sagas/ProvidersSaga.ts index 368ecfcc66..a9bd13e6cf 100644 --- a/app/client/src/sagas/ProvidersSaga.ts +++ b/app/client/src/sagas/ProvidersSaga.ts @@ -124,9 +124,8 @@ export function* fetchProvidersWithCategorySaga( ) { try { const request: FetchProviderWithCategoryRequest = action.payload; - const response: Providers = yield ProvidersApi.fetchProvidersWithCategory( - request, - ); + const response: Providers = + yield ProvidersApi.fetchProvidersWithCategory(request); const isValidResponse: boolean = yield validateResponse(response); diff --git a/app/client/src/sagas/QueryPaneSagas.ts b/app/client/src/sagas/QueryPaneSagas.ts index 66f78bf805..ad5401dbf8 100644 --- a/app/client/src/sagas/QueryPaneSagas.ts +++ b/app/client/src/sagas/QueryPaneSagas.ts @@ -342,9 +342,8 @@ function* handleQueryCreatedSaga(actionPayload: ReduxAction) { actionPayload.payload; const pageId: string = yield select(getCurrentPageId); if (pluginType !== PluginType.DB && pluginType !== PluginType.REMOTE) return; - const pluginTemplates: Record = yield select( - getPluginTemplates, - ); + const pluginTemplates: Record = + yield select(getPluginTemplates); const queryTemplate = pluginTemplates[pluginId]; // Do not show template view if the query has body(code) or if there are no templates or if the plugin is MongoDB const showTemplate = !( diff --git a/app/client/src/sagas/SnapshotSagas.ts b/app/client/src/sagas/SnapshotSagas.ts index 2ca9bacfa2..e95fc19624 100644 --- a/app/client/src/sagas/SnapshotSagas.ts +++ b/app/client/src/sagas/SnapshotSagas.ts @@ -84,9 +84,8 @@ function* restoreApplicationFromSnapshotSaga() { applicationId, }); - const currentLayoutSystemType: LayoutSystemTypes = yield select( - getLayoutSystemType, - ); + const currentLayoutSystemType: LayoutSystemTypes = + yield select(getLayoutSystemType); const isValidResponse: boolean = yield validateResponse( response, @@ -170,9 +169,8 @@ export function* deleteApplicationSnapshotSaga() { //Saga to update snapshot details by fetching info from backend function* updateSnapshotDetailsSaga() { try { - const snapShotDetails: { updatedTime: Date } | undefined = yield call( - fetchSnapshotSaga, - ); + const snapShotDetails: { updatedTime: Date } | undefined = + yield call(fetchSnapshotSaga); yield put( updateSnapshotDetails( snapShotDetails && snapShotDetails.updatedTime diff --git a/app/client/src/sagas/WidgetDeletionSagas.ts b/app/client/src/sagas/WidgetDeletionSagas.ts index b0866e552e..485509f422 100644 --- a/app/client/src/sagas/WidgetDeletionSagas.ts +++ b/app/client/src/sagas/WidgetDeletionSagas.ts @@ -122,9 +122,8 @@ function* deleteTabChildSaga( function* deleteSagaInit(deleteAction: ReduxAction) { const { widgetId } = deleteAction.payload; - const selectedWidget: FlattenedWidgetProps | undefined = yield select( - getSelectedWidget, - ); + const selectedWidget: FlattenedWidgetProps | undefined = + yield select(getSelectedWidget); const selectedWidgets: string[] = yield select(getSelectedWidgets); const guidedTourEnabled: boolean = yield select(inGuidedTour); const isExploring: boolean = yield select(isExploringSelector); @@ -209,9 +208,8 @@ function* deleteSaga(deleteAction: ReduxAction) { const { disallowUndo, isShortcut } = deleteAction.payload; if (!widgetId) { - const selectedWidget: FlattenedWidgetProps | undefined = yield select( - getSelectedWidget, - ); + const selectedWidget: FlattenedWidgetProps | undefined = + yield select(getSelectedWidget); if (!selectedWidget) return; // if widget is not deletable, don't do anything diff --git a/app/client/src/sagas/WidgetOperationSagas.tsx b/app/client/src/sagas/WidgetOperationSagas.tsx index e99b8553ab..028c461e2f 100644 --- a/app/client/src/sagas/WidgetOperationSagas.tsx +++ b/app/client/src/sagas/WidgetOperationSagas.tsx @@ -209,9 +209,8 @@ export function* resizeSaga(resizeAction: ReduxAction) { widgetId, } = resizeAction.payload; - const layoutSystemType: LayoutSystemTypes = yield select( - getLayoutSystemType, - ); + const layoutSystemType: LayoutSystemTypes = + yield select(getLayoutSystemType); const mainCanvasWidth: number = yield select(getCanvasWidth); widget = { ...widget, @@ -689,7 +688,7 @@ export function* getPropertiesUpdatedWidget( ) { const { dynamicUpdates, updates, widgetId } = updatesObj; - const { modify = {}, remove = [], postUpdateAction, triggerPaths } = updates; + const { modify = {}, postUpdateAction, remove = [], triggerPaths } = updates; const stateWidget: WidgetProps = yield select(getWidget, widgetId); @@ -990,9 +989,8 @@ function* createSelectedWidgetsCopy( * @returns */ function* copyWidgetSaga(action: ReduxAction<{ isShortcut: boolean }>) { - const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const selectedWidgets: string[] = yield select(getSelectedWidgets); if (!selectedWidgets) { toast.show(createMessage(ERROR_WIDGET_COPY_NO_WIDGET_SELECTED), { @@ -1834,9 +1832,8 @@ function* pasteWidgetSaga( !flexLayers || flexLayers.length <= 0) ) { - const metaProps: Record = yield select( - getWidgetsMeta, - ); + const metaProps: Record = + yield select(getWidgetsMeta); if (widget.widgetId === widgetIdMap[copiedWidget.widgetId]) widgets = pasteWidgetInFlexLayers( widgets, @@ -1955,9 +1952,8 @@ function* pasteWidgetSaga( } function* cutWidgetSaga() { - const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const selectedWidgets: string[] = yield select(getSelectedWidgets); if (!selectedWidgets) { toast.show(createMessage(ERROR_WIDGET_CUT_NO_WIDGET_SELECTED), { diff --git a/app/client/src/sagas/WidgetOperationUtils.ts b/app/client/src/sagas/WidgetOperationUtils.ts index fdfaa7a47f..9d7693ef84 100644 --- a/app/client/src/sagas/WidgetOperationUtils.ts +++ b/app/client/src/sagas/WidgetOperationUtils.ts @@ -671,13 +671,11 @@ export const getSelectedWidgetWhenPasting = function* () { const { widgets: copiedWidgetGroups }: { widgets: CopiedWidgetGroup[] } = yield getCopiedWidgets(); - let selectedWidget: FlattenedWidgetProps | undefined = yield select( - getSelectedWidget, - ); + let selectedWidget: FlattenedWidgetProps | undefined = + yield select(getSelectedWidget); - const focusedWidget: FlattenedWidgetProps | undefined = yield select( - getFocusedWidget, - ); + const focusedWidget: FlattenedWidgetProps | undefined = + yield select(getFocusedWidget); selectedWidget = getSelectedWidgetIfPastingIntoListWidget( canvasWidgets, @@ -1490,9 +1488,8 @@ export function getNextWidgetName( * @returns */ export function* createWidgetCopy(widget: FlattenedWidgetProps) { - const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = yield select( - getWidgets, - ); + const allWidgets: { [widgetId: string]: FlattenedWidgetProps } = + yield select(getWidgets); const widgetsToStore = getAllWidgetsInTree(widget.widgetId, allWidgets); return { widgetId: widget.widgetId, diff --git a/app/client/src/sagas/WidgetSelectionSagas.ts b/app/client/src/sagas/WidgetSelectionSagas.ts index 60741561b3..e574d96a15 100644 --- a/app/client/src/sagas/WidgetSelectionSagas.ts +++ b/app/client/src/sagas/WidgetSelectionSagas.ts @@ -56,10 +56,10 @@ import { APP_MODE } from "entities/App"; function* selectWidgetSaga(action: ReduxAction) { try { const { - payload = [], - selectionRequestType, invokedBy, pageId, + payload = [], + selectionRequestType, } = action.payload; if (payload.some(isInvalidSelectionRequest)) { diff --git a/app/client/src/sagas/autoHeightSagas/widgets.ts b/app/client/src/sagas/autoHeightSagas/widgets.ts index 34a0f12505..573921b022 100644 --- a/app/client/src/sagas/autoHeightSagas/widgets.ts +++ b/app/client/src/sagas/autoHeightSagas/widgets.ts @@ -243,9 +243,8 @@ export function* updateWidgetAutoHeightSaga( // Get the canvas level map from the store // This map tells us the nesting of each canvas widget in the DSL. // MainContainer's level is 0. - const canvasLevelMap: CanvasLevelsReduxState = yield select( - getCanvasLevelMap, - ); + const canvasLevelMap: CanvasLevelsReduxState = + yield select(getCanvasLevelMap); // 1. Get all siblings together. // Get all updates for that level. diff --git a/app/client/src/selectors/editorSelectors.tsx b/app/client/src/selectors/editorSelectors.tsx index 2f8bd2080e..4c4763dd49 100644 --- a/app/client/src/selectors/editorSelectors.tsx +++ b/app/client/src/selectors/editorSelectors.tsx @@ -184,11 +184,14 @@ export const getCurrentPageDescription = createSelector( ); export const selectPageSlugToIdMap = createSelector(getPageList, (pages) => - pages.reduce((acc, page: Page) => { - // Comeback - acc[page.pageId] = page.slug || ""; - return acc; - }, {} as Record), + pages.reduce( + (acc, page: Page) => { + // Comeback + acc[page.pageId] = page.slug || ""; + return acc; + }, + {} as Record, + ), ); export const getCurrentApplication = (state: AppState) => diff --git a/app/client/src/selectors/themeSelectors.tsx b/app/client/src/selectors/themeSelectors.tsx index f99a127c1b..e61cfdf255 100644 --- a/app/client/src/selectors/themeSelectors.tsx +++ b/app/client/src/selectors/themeSelectors.tsx @@ -12,8 +12,10 @@ export const lightTheme = { ...theme, colors: { ...theme.colors, ...light } }; const darkTheme = { ...theme, colors: { ...theme.colors, ...dark } }; // Only for usage with ThemeProvider -export const getThemeDetails = (state: AppState, themeMode: ThemeMode): Theme => - themeMode === ThemeMode.LIGHT ? lightTheme : darkTheme; +export const getThemeDetails = ( + state: AppState, + themeMode: ThemeMode, +): Theme => (themeMode === ThemeMode.LIGHT ? lightTheme : darkTheme); export const getTheme = (themeMode: ThemeMode) => { const colors = themeMode === ThemeMode.LIGHT ? light : dark; diff --git a/app/client/src/utils/hooks/dragResizeHooks.tsx b/app/client/src/utils/hooks/dragResizeHooks.tsx index 6c61a5d922..b04ce458b9 100644 --- a/app/client/src/utils/hooks/dragResizeHooks.tsx +++ b/app/client/src/utils/hooks/dragResizeHooks.tsx @@ -109,11 +109,11 @@ export const useWidgetDragResize = () => { ), setDraggingState: useCallback( ({ - isDragging, - dragGroupActualParent = "", - draggingGroupCenter = {}, - startPoints, draggedOn, + draggingGroupCenter = {}, + dragGroupActualParent = "", + isDragging, + startPoints, }: { isDragging: boolean; dragGroupActualParent?: string; diff --git a/app/client/src/utils/storage.ts b/app/client/src/utils/storage.ts index 4be8f3717b..d6bf0a21ae 100644 --- a/app/client/src/utils/storage.ts +++ b/app/client/src/utils/storage.ts @@ -716,15 +716,15 @@ export const initAppKbState = async ( const appKbState = { checksum, - pageSlugs: pageSlugs.reduce((acc, pageSlug) => { - acc[pageSlug] = { - hasReacted: false, - }; - return acc; - }, {} as Record) as Record< - string, - { hasReacted: boolean } - >, + pageSlugs: pageSlugs.reduce( + (acc, pageSlug) => { + acc[pageSlug] = { + hasReacted: false, + }; + return acc; + }, + {} as Record, + ) as Record, }; aiKBApplicationMap[appId] = appKbState; diff --git a/app/client/src/widgets/ButtonWidgetV2/component/Container.tsx b/app/client/src/widgets/ButtonWidgetV2/component/Container.tsx index a09eb4e7dc..45780d680d 100644 --- a/app/client/src/widgets/ButtonWidgetV2/component/Container.tsx +++ b/app/client/src/widgets/ButtonWidgetV2/component/Container.tsx @@ -7,16 +7,15 @@ const StyledContainer = styled.div` height: 100%; position: relative; - ${({ maxWidth, minHeight, minWidth }) => - css` - & [data-button] { - display: flex; - width: auto; - ${minWidth ? `min-width: ${minWidth}px;` : ""} - ${minHeight ? `min-height: ${minHeight}px;` : ""} + ${({ maxWidth, minHeight, minWidth }) => css` + & [data-button] { + display: flex; + width: auto; + ${minWidth ? `min-width: ${minWidth}px;` : ""} + ${minHeight ? `min-height: ${minHeight}px;` : ""} ${maxWidth ? `max-width: ${maxWidth}px;` : ""} - } - `} + } + `} .grecaptcha-badge { visibility: hidden; diff --git a/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV2.tsx b/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV2.tsx index fab1348d9c..6c230d84d3 100644 --- a/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV2.tsx +++ b/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV2.tsx @@ -19,12 +19,12 @@ export function RecaptchaV2(props: RecaptchaV2Props) { props.handleRecaptchaV2Loading && props.handleRecaptchaV2Loading(isloading); }; const { - isLoading, isDisabled, - recaptchaKey, - onRecaptchaSubmitSuccess, - onRecaptchaSubmitError = noop, + isLoading, onPress: onClickProp, + onRecaptchaSubmitError = noop, + onRecaptchaSubmitSuccess, + recaptchaKey, } = props; const onClick = () => { if (isDisabled) return onClickProp; diff --git a/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV3.tsx b/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV3.tsx index b37f11ae67..eb7229dc6a 100644 --- a/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV3.tsx +++ b/app/client/src/widgets/ButtonWidgetV2/component/RecaptchaV3.tsx @@ -17,10 +17,10 @@ export function RecaptchaV3(props: RecaptchaV3Props) { }; const { - recaptchaKey, onPress: onClickProp, - onRecaptchaSubmitSuccess, onRecaptchaSubmitError = noop, + onRecaptchaSubmitSuccess, + recaptchaKey, } = props; const onClick: ButtonComponentProps["onPress"] = () => { diff --git a/app/client/src/widgets/CurrencyInputWidget/component/CurrencyCodeDropdown.tsx b/app/client/src/widgets/CurrencyInputWidget/component/CurrencyCodeDropdown.tsx index 4b70d6d83e..6d34dfc074 100644 --- a/app/client/src/widgets/CurrencyInputWidget/component/CurrencyCodeDropdown.tsx +++ b/app/client/src/widgets/CurrencyInputWidget/component/CurrencyCodeDropdown.tsx @@ -101,8 +101,8 @@ export const PopoverStyles = createGlobalStyle<{ } .${props.portalClassName} .${Classes.INPUT}:focus, .${ - props.portalClassName - } .${Classes.INPUT}:active { + props.portalClassName + } .${Classes.INPUT}:active { border: 1px solid ${props.accentColor} !important; box-shadow: 0px 0px 0px 2px ${lightenColor(props.accentColor)} !important; } diff --git a/app/client/src/widgets/InputWidget/component/CurrencyCodeDropdown.tsx b/app/client/src/widgets/InputWidget/component/CurrencyCodeDropdown.tsx index 817a072caf..ddb0f74784 100644 --- a/app/client/src/widgets/InputWidget/component/CurrencyCodeDropdown.tsx +++ b/app/client/src/widgets/InputWidget/component/CurrencyCodeDropdown.tsx @@ -66,8 +66,8 @@ export const PopoverStyles = createGlobalStyle<{ } .${props.portalClassName} .${Classes.INPUT}:focus, .${ - props.portalClassName - } .${Classes.INPUT}:active { + props.portalClassName + } .${Classes.INPUT}:active { border: 1px solid ${props.accentColor} !important; } diff --git a/app/client/src/widgets/InputWidget/component/ISDCodeDropdown.tsx b/app/client/src/widgets/InputWidget/component/ISDCodeDropdown.tsx index e6bbf5797d..0c987adc04 100644 --- a/app/client/src/widgets/InputWidget/component/ISDCodeDropdown.tsx +++ b/app/client/src/widgets/InputWidget/component/ISDCodeDropdown.tsx @@ -61,8 +61,8 @@ export const PopoverStyles = createGlobalStyle<{ } .${props.portalClassName} .${Classes.INPUT}:focus, .${ - props.portalClassName - } .${Classes.INPUT}:active { + props.portalClassName + } .${Classes.INPUT}:active { border: 1px solid ${props.accentColor} !important; box-shadow: 0px 0px 0px 3px ${lightenColor( props.accentColor, diff --git a/app/client/src/widgets/JSONFormWidget/constants.ts b/app/client/src/widgets/JSONFormWidget/constants.ts index 14abbab5e2..44dfc15e92 100644 --- a/app/client/src/widgets/JSONFormWidget/constants.ts +++ b/app/client/src/widgets/JSONFormWidget/constants.ts @@ -40,11 +40,14 @@ export type FieldTypeKey = keyof typeof FieldType; export const inverseFieldType = Object.entries(FieldType).reduce< Record ->((previousValue, currentValue) => { - const [key, value] = currentValue; - previousValue[value] = key as FieldTypeKey; - return previousValue; -}, {} as Record); +>( + (previousValue, currentValue) => { + const [key, value] = currentValue; + previousValue[value] = key as FieldTypeKey; + return previousValue; + }, + {} as Record, +); export enum DataType { STRING = "string", diff --git a/app/client/src/widgets/JSONFormWidget/schemaParser.ts b/app/client/src/widgets/JSONFormWidget/schemaParser.ts index da913cf137..28c6f426d7 100644 --- a/app/client/src/widgets/JSONFormWidget/schemaParser.ts +++ b/app/client/src/widgets/JSONFormWidget/schemaParser.ts @@ -367,7 +367,7 @@ class SchemaParser { * @param schema Previous generated schema if present. */ static parse = (widgetName: string, options: ParseOptions) => { - const { currSourceData, schema = {}, fieldThemeStylesheets } = options; + const { currSourceData, fieldThemeStylesheets, schema = {} } = options; if (!currSourceData) return { schema, modifiedSchemaItems: {}, removedSchemaItems: [] }; @@ -709,9 +709,9 @@ class SchemaParser { static convertObjectToSchema = ({ baseSchemaPath, currSourceData, - removedSchemaItems, modifiedSchemaItems, prevSchema = {}, + removedSchemaItems, sourceDataPath, ...rest }: Omit): Schema => { diff --git a/app/client/src/widgets/JSONFormWidget/widget/index.tsx b/app/client/src/widgets/JSONFormWidget/widget/index.tsx index 3565e647a0..4a3ed77fa7 100644 --- a/app/client/src/widgets/JSONFormWidget/widget/index.tsx +++ b/app/client/src/widgets/JSONFormWidget/widget/index.tsx @@ -270,9 +270,10 @@ class JSONFormWidget extends BaseWidget< (column) => `${column.name}`, ); modify = { - sourceData: `{{_.pick(${ - formConfig?.otherFields?.defaultValues - },${selectedColumnNames.map((name) => `'${name}'`).join(",")})}}`, + sourceData: `{{_.pick(${formConfig?.otherFields + ?.defaultValues},${selectedColumnNames + .map((name) => `'${name}'`) + .join(",")})}}`, title: `Update Row ${primaryKey} {{${formConfig?.otherFields?.defaultValues}.${primaryKey}}}`, onSubmit: queryConfig?.update.run, }; diff --git a/app/client/src/widgets/ListWidgetV2/MetaWidgetGenerator.ts b/app/client/src/widgets/ListWidgetV2/MetaWidgetGenerator.ts index 3c52019e8f..d5ef0281ee 100644 --- a/app/client/src/widgets/ListWidgetV2/MetaWidgetGenerator.ts +++ b/app/client/src/widgets/ListWidgetV2/MetaWidgetGenerator.ts @@ -914,8 +914,8 @@ class MetaWidgetGenerator { } return newObj; })(${metaContainerName}.data, ${JSON.stringify( - BLACKLISTED_ENTITY_DEFINITION_IN_LEVEL_DATA[type], - )} ) + BLACKLISTED_ENTITY_DEFINITION_IN_LEVEL_DATA[type], + )} ) }}`, }, }, @@ -1665,8 +1665,8 @@ class MetaWidgetGenerator { // "Input1: { value: List1_Input1_1.value, text: List1_Input1_1.text }" dependantBinding[templateWidgetName] = ` ${templateWidgetName}: {${ - dependantMetaWidget?.entityDefinition || "" - }} + dependantMetaWidget?.entityDefinition || "" + }} `; } }); diff --git a/app/client/src/widgets/ListWidgetV2/component/ListPagination.tsx b/app/client/src/widgets/ListWidgetV2/component/ListPagination.tsx index 0897d9075e..095988f529 100644 --- a/app/client/src/widgets/ListWidgetV2/component/ListPagination.tsx +++ b/app/client/src/widgets/ListWidgetV2/component/ListPagination.tsx @@ -439,7 +439,7 @@ export function ServerSideListPagination(props: ServerSideListPaginationProps) { title="Previous Page" >