diff --git a/assets/js/src/form_editor/blocks/submit/edit.tsx b/assets/js/src/form_editor/blocks/submit/edit.tsx index cb68da5d75..25ec60b5ee 100644 --- a/assets/js/src/form_editor/blocks/submit/edit.tsx +++ b/assets/js/src/form_editor/blocks/submit/edit.tsx @@ -12,7 +12,7 @@ import { useSelect } from '@wordpress/data'; import ParagraphEdit from '../paragraph_edit.jsx'; import StylesSettings from './styles_settings'; -import { FormSettingsType } from '../../components/form_settings/form_settings'; +import { FormSettingsType } from '../../store/form_data_types'; const SubmitEdit = ({ attributes, setAttributes }) => { const settings: FormSettingsType = useSelect( diff --git a/assets/js/src/form_editor/components/form_settings/form_settings.tsx b/assets/js/src/form_editor/components/form_settings/form_settings.tsx index 57a4bb6a2e..b4bdf9d217 100644 --- a/assets/js/src/form_editor/components/form_settings/form_settings.tsx +++ b/assets/js/src/form_editor/components/form_settings/form_settings.tsx @@ -7,46 +7,6 @@ import StylesSettingsPanel from './styles_settings_panel'; import FormPlacementPanel from './form_placement_panel'; import CustomCssPanel from './custom_css_panel'; -type PlacementStyles = { - width: { - unit: string - value: number - } -} - -export type FormSettingsType = { - alignment: string - backgroundImageDisplay?: string - backgroundImageUrl?: string - belowPostStyles: PlacementStyles - borderColor?: string - borderRadius: number - borderSize: number - errorValidationColor?: string - fixedBarFormDelay: number - fixedBarFormPosition: string - fixedBarStyles: PlacementStyles - fontFamily?: string - formPadding: number - inputPadding: number - otherStyles: PlacementStyles - placeFixedBarFormOnAllPages: boolean - placeFixedBarFormOnAllPosts: boolean - placeFormBellowAllPages: boolean - placeFormBellowAllPosts: boolean - placePopupFormOnAllPages: boolean - placePopupFormOnAllPosts: boolean - placeSlideInFormOnAllPages: boolean - placeSlideInFormOnAllPosts: boolean - popupFormDelay: number - popupStyles: PlacementStyles - segments: Array - slideInFormDelay: number - slideInFormPosition: string - slideInStyles: PlacementStyles - successValidationColor?: string -}; - export default () => { const { toggleSidebarPanel } = useDispatch('mailpoet-form-editor'); const openedPanels = useSelect( diff --git a/assets/js/src/form_editor/store/form_data_types.ts b/assets/js/src/form_editor/store/form_data_types.ts new file mode 100644 index 0000000000..394391a096 --- /dev/null +++ b/assets/js/src/form_editor/store/form_data_types.ts @@ -0,0 +1,39 @@ +type PlacementStyles = { + width: { + unit: string + value: number + } +} + +export type FormSettingsType = { + alignment: string + backgroundImageDisplay?: string + backgroundImageUrl?: string + belowPostStyles: PlacementStyles + borderColor?: string + borderRadius: number + borderSize: number + errorValidationColor?: string + fixedBarFormDelay: number + fixedBarFormPosition: string + fixedBarStyles: PlacementStyles + fontFamily?: string + formPadding: number + inputPadding: number + otherStyles: PlacementStyles + placeFixedBarFormOnAllPages: boolean + placeFixedBarFormOnAllPosts: boolean + placeFormBellowAllPages: boolean + placeFormBellowAllPosts: boolean + placePopupFormOnAllPages: boolean + placePopupFormOnAllPosts: boolean + placeSlideInFormOnAllPages: boolean + placeSlideInFormOnAllPosts: boolean + popupFormDelay: number + popupStyles: PlacementStyles + segments: Array + slideInFormDelay: number + slideInFormPosition: string + slideInStyles: PlacementStyles + successValidationColor?: string +};