import { get, startCase, uniqueId } from "lodash"; import { ILayoutSettings, PageSectionCategory, } from "@sc/plugins/misc/v2/blocks/weblayouts/types"; import { ComponentTypes } from "@sc/plugins/webcomponents/v2/types"; import { combineData, lorem } from "../../utils"; import { default as defaultData } from "./data.json"; import { style } from "./style"; import { getImagePlaceholder, ImagePlaceholderTypes, getVideoPlaceholder, VideoPlaceholderTypes, } from "../../Placeholders"; import theme from "../../theme"; import { FormLayouts } from "../types"; import { FormFieldTypes } from "@sc/modules/v2/CRUD/FormBuilder/types"; import { FieldNamePresets } from "@sc/modules/v2/CRUD/FormBuilder/EditFormField/types"; const content = combineData(defaultData); const settings: ILayoutSettings = { label: FormLayouts.ONE, layout: FormLayouts.ONE, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/forms/Form01.png", default: { type: ComponentTypes.SECTION, label: PageSectionCategory.FORM, bodyOnly: true, canHaveChildren: false, properties: { ...style.SECTION, ...style.SECTION_INNER, }, children: [ { type: ComponentTypes.COLUMNS, canHaveChildren: false, properties: { width: "100%", }, children: [ { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((8 * 100) / 12), properties: { height: "100%", padding: 10, minHeight: 20 }, children: [ { type: ComponentTypes.HEADLINE, canHaveChildren: false, properties: { ...style.HEADLINE, ...get(content, "main_headline.style", {}), }, html: "Contact us!", }, { type: ComponentTypes.FORM, data: [ { type: FormFieldTypes.TEXT, name: "name", placeholder: "Name", preset: FieldNamePresets.NAME, }, { type: FormFieldTypes.TEXT, name: "email", placeholder: "Email", preset: FieldNamePresets.EMAIL, }, { type: FormFieldTypes.DROPDOWN, name: "subject", placeholder: "Subject", data: [ { id: "id", name: "name", value: "Test" }, { id: "id", name: "name", value: "Test" }, { id: "id", name: "name", value: "Test" }, { id: "id", name: "name", value: "Test" }, ], }, { type: FormFieldTypes.TEXTAREA, name: "comment", placeholder: "Write something...", }, ], properties: { containerStyle: style.FORM_FIELD.style, inputStyle: style.FORM_FIELD.inputStyle, }, }, { type: ComponentTypes.BUTTON, canHaveChildren: false, properties: style.BUTTON.style, caption1: "Send", caption1style: style.BUTTON.caption1, }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((4 * 100) / 12), properties: { height: "100%", padding: 10, minHeight: 20 }, children: [ { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { padding: 30, }, children: [ { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, fontWeight: "bold" as "bold", marginTop: 15, }, html: "Phone", }, { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, ...get(content, "sub_headline.style", {}), }, html: "1-888-555-1212", }, { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, ...get(content, "sub_headline.style", {}), }, html: `

123 Elm Street
Newnan, GA
30263

`, }, ], }, ], }, ], }, ], }, }; export default settings;