import { Justify, Overlap, SearchForm } from './global-config.types'; import { SelectableCountries } from '../../api/models/stamp-duty-rates.types'; export declare enum ContainerWidth { Full = "full", Large = "large", Medium = "medium", Small = "small" } export declare enum PageName { Home = "home", AreaGuide = "area-guide", AreaGuideList = "area-guide-list", Article = "article", ArticleList = "article-list", Branch = "branch", BranchList = "branch-list", Property = "property", PropertyList = "property-list", PropertyListInterstitial = "property-list-interstitial", Staff = "staff", StaffList = "staff-list", Custom = "custom", NotFound = "not-found" } export interface PageConfig { _id: string | null; agencyId: number | null; sharedWith?: number[]; page: PageName | null; metadata: { title?: string; description?: string; canonicalUrl?: string; noindex?: boolean; }; areas: { [key: string]: Section[]; }; sectionOverrides?: { [key: number]: { [sectionId: string]: Section; }; }; createdAt: string; updatedAt: string; resourceId?: number; slug?: string; live?: boolean; category?: string; title?: string; home?: HomeFields; areaGuide?: AreaGuideFields; article?: ArticleFields; articleList?: ArticleListFields; branch?: BranchFields; branchList?: BranchListFields; property?: PropertyFields; propertyList?: PropertyListFields; interstitial?: InterstitalFields; staff?: StaffFields; staffList?: StaffListFields; custom?: CustomFields; position?: number; forcePageReload?: boolean; } export interface HomeFields { } export interface AreaGuideFields { /** Short promo text for the area guide */ promo?: string; /** Image to display in area guide results */ promoImage: ImageField; place: { id: string; name: string; }; branchIds?: number[]; } export interface ArticleFields { /** Short promo text for the article */ promo?: string; /** Image to display in article results */ promoImage: ImageField; /** Array of topics as strings */ topics?: string[]; /** The date to display for the article, which may differ from the createdAt date */ displayDate?: Date; } export interface ArticleListFields { } export interface BranchFields { branchId: string; } export interface BranchListFields { } export interface PropertyFields { label: string; rules: PropertyRules; } export interface PropertyListFields { label: string; rules: PropertyListRules; } export interface InterstitalFields { banner: boolean; } export interface StaffFields { } export interface StaffListFields { } export interface CustomFields { slug: string; category: string; live: boolean; title: string; pageWidth?: ContainerWidth; } export interface PropertyRules { primaryChannel?: string; propertyType?: string; tags?: string[]; hasChildProperties?: boolean; propertyIds?: number[]; } export interface PropertyListRules { channel: string; tags?: string[]; } export type TextField = { html: string; }; export type HeadingField = TextField & { level?: number; }; export type ImageField = { src?: string; alt: string; svg?: string; type?: string; lazy?: boolean; position?: string; objectFit?: string; hidden?: boolean; width?: number; height?: number; /** Enables/disables images, e.g. mobile on carousel slides */ active?: boolean; url?: string; target?: '_self' | '_blank'; /** Used for title attribute added to the a tag to add in SEO */ linkTitle?: string; opacity?: number; }; export type VideoField = { src: string; autoplay: boolean; controls: boolean; muted: boolean; loop: boolean; lazyLoading?: boolean; }; export type Iframe = { src: string; }; export type LinkField = TextField & { url?: string; target?: string; }; export declare enum ElementType { Heading = "heading", Text = "text", Link = "link", SearchForm = "searchForm", BranchSearchForm = "branchSearchForm", Social = "social", Image = "image", Divider = "divider", ElementContainer = "elementContainer" } export declare const elementTypeLabels: { heading: string; link: string; social: string; text: string; searchForm: string; branchSearchForm: string; image: string; divider: string; elementContainer: string; }; /** * The available variants for buttons and links. Please note that new themes should only use the lettered variants. * * Button style variants use single letters (e.g. A, B) whereas non-button link variants, i.e. for * tel / mailto links, use letter variants prefixed with an underscore (e.g. _A, _B). * * The named variants (Default, Primary etc) only exist here for backward-compatibility. * */ export declare enum ButtonVariant { Default = "default", Primary = "primary", PrimaryBorder = "primaryBorder", Tint = "tint", TintBorder = "tintBorder", WhiteBorder = "whiteBorder", /** Non-button link variants **/ _A = "_A", _B = "_B", _C = "_C", _D = "_D", /** The theme's primary, most bold button */ A = "a", /** The theme's secondary button */ B = "b", C = "c", D = "d", E = "e", F = "f", G = "g", H = "h", I = "i", J = "j", K = "k", L = "l", M = "m", N = "n", O = "o", P = "p", Q = "q", R = "r", S = "s", T = "t" } export declare enum ButtonSize { Small = "small", Medium = "medium", Large = "large" } export type SocialLink = { url: string; target: '_blank' | '_self'; }; export type SocialElement = { email: SocialLink; phone: SocialLink; facebook: SocialLink; instagram: SocialLink; x: SocialLink; linkedIn: SocialLink; pinterest: SocialLink; }; export type CustomFormElementVisibility = { status: VisibilityStatus; field: string; }; export interface FlexConfig { direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'; justifyContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'; alignItems?: 'start' | 'end' | 'center' | 'stretch'; wrap?: 'nowrap' | 'wrap'; } export interface ResponsiveFlexConfig { mobile?: FlexConfig; desktop?: FlexConfig; } export declare enum VisibilityStatus { Show = "show", Hide = "hide" } export type CustomFormElement = { fullWidth: boolean; visibility?: CustomFormElementVisibility; }; export interface SectionElement extends SearchForm { id: string; type: ElementType; html?: string; buttonVariant?: ButtonVariant; buttonSize?: ButtonSize; level?: number; icon?: string; url?: string; image?: ImageField; social?: SocialElement; target?: string; color?: string; marginBottom?: number; marginTop?: number; elements?: SectionElement[]; flex?: ResponsiveFlexConfig; } export type ImageBannerImageHeightClasses = { [K in SectionHeight]: string; } & { fallback: string; }; export declare enum SectionHeight { Small = "small", Medium = "medium", Large = "large", Screen = "screen", Auto = "auto" } export interface GenericConfig { justify?: Justify; id: string; paddingTop?: number; overlapTop?: Overlap; paddingBottom?: number; overlapBottom?: Overlap; containerWidth?: ContainerWidth; zIndex?: number; variant?: string; image?: ImageField; channel?: string; tags?: string; mobileImage?: ImageField; elements: SectionElement[]; link?: LinkField & { hidden: boolean; }; items?: GenericConfig[]; iframe?: Iframe; customCss?: string; count?: number; height?: SectionHeight; /** The IDs of campaigns to which the section is linked */ campaignIds?: string[]; /** The IDs of campaigns the section should be inactive during */ campaignStatus?: 'active' | 'inactive'; foregroundColor?: string; backgroundColor?: string; text?: string; flex?: ResponsiveFlexConfig; } export interface ImageBannerConfig extends GenericConfig { overlayOpacity: number; } export interface CalculatorConfig extends GenericConfig { country?: 'England' | 'Scotland' | 'Wales' | 'all'; } export interface CustomFormConfig extends GenericConfig { formId: string | number; formElements: CustomFormElement[]; hideMarketingOptIn?: boolean | undefined; gaName?: string; } export interface CarouselConfig extends GenericConfig { transition?: string; overlayOpacity?: number; items: GenericConfig[]; delay?: number; } export interface PropertySliderConfig extends GenericConfig { channel?: string; heading?: HeadingField; subheading?: HeadingField; tags?: string; sort?: string; status?: string; branchId?: number; } export interface StaffConfig extends GenericConfig { searchIds: number[]; branchId?: number; } export interface MapConfig extends GenericConfig { mapType: string; lat: number; lng: number; } export interface GenericMediaConfig extends GenericConfig { mediaType?: 'image' | 'video'; video?: VideoField; } export interface ImageWithTextConfig extends GenericMediaConfig { textWidth: string; } export interface MultiItemConfig extends GenericConfig { columns?: number; } export interface StampDutyConfig extends GenericConfig { country: SelectableCountries; } export interface RichTextConfig extends GenericConfig { html?: string; } export interface TestimonialsConfig extends GenericConfig { channel?: string; } export interface VideoBannerConfig extends GenericMediaConfig { overlayOpacity: number; } export interface CustomPagesConfig extends GenericConfig { category?: string; } export interface WithImagesConfig extends GenericConfig { image1?: ImageField; image2?: ImageField; image3?: ImageField; } export interface Section { _id?: string; component: string; id: string; configuration: T; name?: string; sharedSection?: string | Section; appliedTo?: string | null; } export type MixedSection = GenericConfig | ImageBannerConfig | CarouselConfig | PropertySliderConfig | StaffConfig | RichTextConfig | VideoBannerConfig | ImageWithTextConfig | CustomFormConfig | CalculatorConfig | WithImagesConfig; //# sourceMappingURL=page-config.types.d.ts.map