2023-06-01 13:36:11 +00:00
|
|
|
import React, { useEffect, useRef } from "react";
|
2021-09-12 16:36:43 +00:00
|
|
|
import styled from "styled-components";
|
|
|
|
|
import { connect } from "react-redux";
|
2023-10-16 12:07:06 +00:00
|
|
|
import type { DetailsFormValues, SetupFormProps } from "./DetailsForm";
|
2021-09-12 16:36:43 +00:00
|
|
|
import DetailsForm from "./DetailsForm";
|
|
|
|
|
import {
|
2022-12-20 09:49:09 +00:00
|
|
|
WELCOME_FORM_USECASE_FIELD_NAME,
|
2021-09-12 16:36:43 +00:00
|
|
|
WELCOME_FORM_EMAIL_FIELD_NAME,
|
|
|
|
|
WELCOME_FORM_NAME,
|
|
|
|
|
WELCOME_FORM_NAME_FIELD_NAME,
|
|
|
|
|
WELCOME_FORM_PASSWORD_FIELD_NAME,
|
|
|
|
|
WELCOME_FORM_VERIFY_PASSWORD_FIELD_NAME,
|
2023-12-25 12:24:46 +00:00
|
|
|
WELCOME_FORM_PROFICIENCY_LEVEL,
|
2022-09-02 17:15:08 +00:00
|
|
|
} from "@appsmith/constants/forms";
|
2023-10-16 12:07:06 +00:00
|
|
|
import type { FormErrors } from "redux-form";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import { formValueSelector, getFormSyncErrors, reduxForm } from "redux-form";
|
2021-09-12 16:36:43 +00:00
|
|
|
import { isEmail, isStrongPassword } from "utils/formhelpers";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import type { AppState } from "@appsmith/reducers";
|
2022-01-07 06:08:17 +00:00
|
|
|
import { SUPER_USER_SUBMIT_PATH } from "@appsmith/constants/ApiConstants";
|
2022-12-20 09:49:09 +00:00
|
|
|
import { useState } from "react";
|
2023-04-20 09:27:41 +00:00
|
|
|
import { isAirgapped } from "@appsmith/utils/airgapHelpers";
|
2023-09-29 04:50:06 +00:00
|
|
|
import {
|
|
|
|
|
WELCOME_FORM_USE_CASE_ERROR_MESSAGE,
|
|
|
|
|
WELCOME_FORM_EMAIL_ERROR_MESSAGE,
|
|
|
|
|
createMessage,
|
|
|
|
|
WELCOME_FORM_STRONG_PASSWORD_ERROR_MESSAGE,
|
|
|
|
|
WELCOME_FORM_GENERIC_ERROR_MESSAGE,
|
|
|
|
|
WELCOME_FORM_PASSWORDS_NOT_MATCHING_ERROR_MESSAGE,
|
2023-12-25 12:24:46 +00:00
|
|
|
WELCOME_FORM_PROFICIENCY_ERROR_MESSAGE,
|
2023-09-29 04:50:06 +00:00
|
|
|
} from "@appsmith/constants/messages";
|
2021-09-12 16:36:43 +00:00
|
|
|
|
|
|
|
|
const PageWrapper = styled.div`
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
2023-05-25 18:21:56 +00:00
|
|
|
justify-content: start;
|
2021-09-17 10:01:42 +00:00
|
|
|
overflow: auto;
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 100;
|
2021-09-12 16:36:43 +00:00
|
|
|
`;
|
|
|
|
|
|
2023-05-25 18:21:56 +00:00
|
|
|
const SetupFormContainer = styled.div``;
|
2021-09-12 16:36:43 +00:00
|
|
|
|
|
|
|
|
const SetupStep = styled.div<{ active: boolean }>`
|
|
|
|
|
display: ${(props) => (props.active ? "block" : "none")};
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const SpaceFiller = styled.div`
|
|
|
|
|
height: 100px;
|
|
|
|
|
`;
|
|
|
|
|
|
2023-06-01 13:36:11 +00:00
|
|
|
export const firstpageValues = [
|
|
|
|
|
"firstName",
|
|
|
|
|
"lastName",
|
|
|
|
|
"email",
|
|
|
|
|
"password",
|
|
|
|
|
"verifyPassword",
|
|
|
|
|
];
|
|
|
|
|
|
2023-12-25 12:24:46 +00:00
|
|
|
export const secondPageValues = ["proficiency", "useCase"];
|
2023-06-01 13:36:11 +00:00
|
|
|
|
2021-09-12 16:36:43 +00:00
|
|
|
const validate = (values: DetailsFormValues) => {
|
|
|
|
|
const errors: DetailsFormValues = {};
|
2023-05-25 18:21:56 +00:00
|
|
|
if (!values.firstName) {
|
2023-09-29 04:50:06 +00:00
|
|
|
errors.firstName = createMessage(WELCOME_FORM_GENERIC_ERROR_MESSAGE);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!values.email || !isEmail(values.email)) {
|
2023-09-29 04:50:06 +00:00
|
|
|
errors.email = createMessage(WELCOME_FORM_EMAIL_ERROR_MESSAGE);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!values.password || !isStrongPassword(values.password)) {
|
2023-09-29 04:50:06 +00:00
|
|
|
errors.password = createMessage(WELCOME_FORM_STRONG_PASSWORD_ERROR_MESSAGE);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!values.verifyPassword || values.password != values.verifyPassword) {
|
2023-09-29 04:50:06 +00:00
|
|
|
errors.verifyPassword = createMessage(
|
|
|
|
|
WELCOME_FORM_PASSWORDS_NOT_MATCHING_ERROR_MESSAGE,
|
|
|
|
|
);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
2023-12-25 12:24:46 +00:00
|
|
|
if (!values.proficiency) {
|
|
|
|
|
errors.proficiency = createMessage(WELCOME_FORM_PROFICIENCY_ERROR_MESSAGE);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!values.useCase) {
|
2023-09-29 04:50:06 +00:00
|
|
|
errors.useCase = createMessage(WELCOME_FORM_USE_CASE_ERROR_MESSAGE);
|
2021-09-12 16:36:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return errors;
|
|
|
|
|
};
|
|
|
|
|
|
2022-04-13 10:07:11 +00:00
|
|
|
function SetupForm(props: SetupFormProps) {
|
2021-09-12 16:36:43 +00:00
|
|
|
const signupURL = `/api/v1/${SUPER_USER_SUBMIT_PATH}`;
|
2023-06-01 13:36:11 +00:00
|
|
|
const [isFirstPage, setIsFirstPage] = useState(true);
|
2021-09-12 16:36:43 +00:00
|
|
|
const formRef = useRef<HTMLFormElement>(null);
|
2023-05-25 18:21:56 +00:00
|
|
|
const isAirgappedFlag = isAirgapped();
|
2023-06-02 11:08:30 +00:00
|
|
|
const [isSubmitted, setIsSubmitted] = useState(false);
|
2023-05-25 18:21:56 +00:00
|
|
|
|
2021-09-12 16:36:43 +00:00
|
|
|
const onSubmit = () => {
|
2024-04-01 09:01:45 +00:00
|
|
|
if (isSubmitted) return;
|
2021-09-12 16:36:43 +00:00
|
|
|
const form: HTMLFormElement = formRef.current as HTMLFormElement;
|
|
|
|
|
const verifyPassword: HTMLInputElement = document.querySelector(
|
|
|
|
|
`[name="verifyPassword"]`,
|
|
|
|
|
) as HTMLInputElement;
|
2023-06-01 13:36:11 +00:00
|
|
|
if (verifyPassword) verifyPassword.removeAttribute("name");
|
2023-05-25 18:21:56 +00:00
|
|
|
|
|
|
|
|
const firstName: HTMLInputElement = document.querySelector(
|
|
|
|
|
`[name="firstName"]`,
|
|
|
|
|
) as HTMLInputElement;
|
|
|
|
|
|
|
|
|
|
const lastName: HTMLInputElement = document.querySelector(
|
|
|
|
|
`[name="lastName"]`,
|
|
|
|
|
) as HTMLInputElement;
|
|
|
|
|
|
|
|
|
|
if (firstName && lastName) {
|
|
|
|
|
const fullName = document.createElement("input");
|
|
|
|
|
fullName.type = "text";
|
|
|
|
|
fullName.name = "name";
|
|
|
|
|
fullName.style.display = "none";
|
|
|
|
|
fullName.value = `${firstName.value} ${lastName.value}`;
|
|
|
|
|
form.appendChild(fullName);
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-25 12:24:46 +00:00
|
|
|
const proficiencyInput = document.createElement("input");
|
|
|
|
|
proficiencyInput.type = "text";
|
|
|
|
|
proficiencyInput.name = "proficiency";
|
|
|
|
|
proficiencyInput.style.display = "none";
|
|
|
|
|
proficiencyInput.value = props.proficiency as string;
|
|
|
|
|
form.appendChild(proficiencyInput);
|
2023-09-29 04:50:06 +00:00
|
|
|
|
2021-09-12 16:36:43 +00:00
|
|
|
const useCaseInput = document.createElement("input");
|
|
|
|
|
useCaseInput.type = "text";
|
|
|
|
|
useCaseInput.name = "useCase";
|
|
|
|
|
useCaseInput.style.display = "none";
|
2023-12-25 12:24:46 +00:00
|
|
|
useCaseInput.value = props.useCase as string;
|
2021-09-12 16:36:43 +00:00
|
|
|
form.appendChild(useCaseInput);
|
2023-12-25 12:24:46 +00:00
|
|
|
|
2023-05-25 18:21:56 +00:00
|
|
|
const anonymousDataInput = document.createElement("input");
|
|
|
|
|
anonymousDataInput.type = "checkbox";
|
|
|
|
|
anonymousDataInput.value = isAirgappedFlag ? "false" : "true";
|
|
|
|
|
anonymousDataInput.checked = isAirgappedFlag ? false : true;
|
|
|
|
|
anonymousDataInput.name = "allowCollectingAnonymousData";
|
|
|
|
|
anonymousDataInput.style.display = "none";
|
|
|
|
|
form.appendChild(anonymousDataInput);
|
|
|
|
|
const signupForNewsletter: HTMLInputElement = document.querySelector(
|
|
|
|
|
`[name="signupForNewsletter"]`,
|
|
|
|
|
) as HTMLInputElement;
|
|
|
|
|
if (signupForNewsletter)
|
|
|
|
|
signupForNewsletter.value = signupForNewsletter.checked.toString();
|
2023-06-01 13:36:11 +00:00
|
|
|
form.submit();
|
2024-04-01 09:01:45 +00:00
|
|
|
//if form is already submitted once do not submit it again
|
|
|
|
|
setIsSubmitted(true);
|
2021-09-12 16:36:43 +00:00
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-01 13:36:11 +00:00
|
|
|
useEffect(() => {
|
|
|
|
|
//add enter key event listener
|
|
|
|
|
document.addEventListener("keydown", onKeyDown);
|
|
|
|
|
return () => {
|
|
|
|
|
document.removeEventListener("keydown", onKeyDown);
|
|
|
|
|
};
|
2023-06-02 11:08:30 +00:00
|
|
|
}, [props, isSubmitted]);
|
2023-06-01 13:36:11 +00:00
|
|
|
|
|
|
|
|
const toggleFormPage = () => {
|
|
|
|
|
setIsFirstPage(!isFirstPage);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onKeyDown = (event: any) => {
|
2022-04-13 10:07:11 +00:00
|
|
|
if (event.key === "Enter") {
|
|
|
|
|
if (props.valid) {
|
2023-06-01 13:36:11 +00:00
|
|
|
if (isFirstPage) {
|
|
|
|
|
// If we are on the first page we do not want to submit the form
|
2022-04-13 10:07:11 +00:00
|
|
|
// instead we move the user to the next page
|
2023-06-01 13:36:11 +00:00
|
|
|
toggleFormPage();
|
|
|
|
|
} else {
|
2023-06-02 11:08:30 +00:00
|
|
|
// If we are on the second page we submit the form if not submitted already
|
2024-04-01 09:01:45 +00:00
|
|
|
onSubmit();
|
2022-04-13 10:07:11 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// The fields to be marked as touched so that we can display the errors
|
|
|
|
|
const toTouch = [];
|
2023-06-01 13:36:11 +00:00
|
|
|
// We fetch the fields which are invalid based on field name
|
2022-04-13 10:07:11 +00:00
|
|
|
for (const key in props.formSyncErrors) {
|
2023-06-01 13:36:11 +00:00
|
|
|
if (
|
|
|
|
|
(isFirstPage && firstpageValues.includes(key)) ||
|
|
|
|
|
(!isFirstPage && secondPageValues.includes(key))
|
|
|
|
|
)
|
|
|
|
|
props.formSyncErrors.hasOwnProperty(key) && toTouch.push(key);
|
2022-04-13 10:07:11 +00:00
|
|
|
}
|
|
|
|
|
props.touch(...toTouch);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2021-09-12 16:36:43 +00:00
|
|
|
return (
|
|
|
|
|
<PageWrapper>
|
|
|
|
|
<SetupFormContainer>
|
|
|
|
|
<form
|
|
|
|
|
action={signupURL}
|
2022-04-13 10:07:11 +00:00
|
|
|
data-testid="super-user-form"
|
2021-09-12 16:36:43 +00:00
|
|
|
id="super-user-form"
|
|
|
|
|
method="POST"
|
|
|
|
|
onSubmit={onSubmit}
|
|
|
|
|
ref={formRef}
|
|
|
|
|
>
|
2023-06-01 13:36:11 +00:00
|
|
|
<SetupStep active>
|
|
|
|
|
<DetailsForm
|
|
|
|
|
{...props}
|
|
|
|
|
isFirstPage={isFirstPage}
|
|
|
|
|
toggleFormPage={toggleFormPage}
|
|
|
|
|
/>
|
2021-09-12 16:36:43 +00:00
|
|
|
</SetupStep>
|
|
|
|
|
</form>
|
|
|
|
|
<SpaceFiller />
|
|
|
|
|
</SetupFormContainer>
|
|
|
|
|
</PageWrapper>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const selector = formValueSelector(WELCOME_FORM_NAME);
|
|
|
|
|
export default connect((state: AppState) => {
|
|
|
|
|
return {
|
|
|
|
|
name: selector(state, WELCOME_FORM_NAME_FIELD_NAME),
|
|
|
|
|
email: selector(state, WELCOME_FORM_EMAIL_FIELD_NAME),
|
|
|
|
|
password: selector(state, WELCOME_FORM_PASSWORD_FIELD_NAME),
|
|
|
|
|
verify_password: selector(state, WELCOME_FORM_VERIFY_PASSWORD_FIELD_NAME),
|
2023-12-25 12:24:46 +00:00
|
|
|
proficiency: selector(state, WELCOME_FORM_PROFICIENCY_LEVEL),
|
2021-09-12 16:36:43 +00:00
|
|
|
useCase: selector(state, WELCOME_FORM_USECASE_FIELD_NAME),
|
2022-04-13 10:07:11 +00:00
|
|
|
formSyncErrors: getFormSyncErrors(WELCOME_FORM_NAME)(state),
|
2021-09-12 16:36:43 +00:00
|
|
|
};
|
|
|
|
|
}, null)(
|
2022-04-13 10:07:11 +00:00
|
|
|
reduxForm<DetailsFormValues, { formSyncErrors?: FormErrors<string, string> }>(
|
|
|
|
|
{
|
|
|
|
|
validate,
|
|
|
|
|
form: WELCOME_FORM_NAME,
|
|
|
|
|
touchOnBlur: true,
|
|
|
|
|
},
|
|
|
|
|
)(SetupForm),
|
2021-09-12 16:36:43 +00:00
|
|
|
);
|