Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/visual-editor/src/components/Locator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,7 @@ export const LocatorComponent: ComponentConfig<{ props: LocatorProps }> = {
showDistanceOptions: false,
},
pageHeading: {
title: {
en: DEFAULT_TITLE,
hasLocalizedValue: "true",
},
title: DEFAULT_TITLE,
},
resultCard: DEFAULT_LOCATOR_RESULT_CARD_PROPS,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@ export const BodyText: ComponentConfig<{ props: BodyTextProps }> = {
data: {
text: {
field: "",
constantValue: {
en: "Text",
hasLocalizedValue: "true",
},
constantValue: "Text",
constantValueEnabled: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,11 @@ export const CTAWrapper: ComponentConfig<{ props: CTAWrapperProps }> = {
},
selectedType: "textAndLink",
},
buttonText: {
en: "Button",
hasLocalizedValue: "true",
},
buttonText: "Button",
customId: "",
customClass: "",
dataAttributes: [],
ariaLabel: {
en: "Button",
hasLocalizedValue: "true",
},
ariaLabel: "Button",
},
styles: {
variant: "primary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,7 @@ export const HeadingText: ComponentConfig<{ props: HeadingTextProps }> = {
data: {
text: {
field: "",
constantValue: {
en: "Text",
hasLocalizedValue: "true",
},
constantValue: "Text",
constantValueEnabled: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ export const defaultPhoneDataProps: PhoneProps["data"] = {
field: "mainPhone",
constantValue: "",
},
label: {
en: "Phone",
hasLocalizedValue: "true",
},
label: "Phone",
};

export const PhoneFields: Fields<PhoneProps> = {
Expand Down
5 changes: 1 addition & 4 deletions packages/visual-editor/src/components/contentBlocks/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ export const Text: ComponentConfig<{ props: TextProps }> = {
data: {
text: {
field: "",
constantValue: {
en: "Text",
hasLocalizedValue: "true",
},
constantValue: "Text",
constantValueEnabled: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const ImageWrapperComponent: PuckComponent<ImageWrapperProps> = (props) => {
(typeof imageUrl === "string" && imageUrl.trim() === "");

const inputLink = resolveComponentData(
data.link ?? { en: DEFAULT_LINK, hasLocalizedValue: "true" as const },
data.link ?? DEFAULT_LINK,
i18n.language,
streamDocument
);
Expand Down Expand Up @@ -238,7 +238,7 @@ export const imageDefaultProps = {
},
constantValueEnabled: true,
},
link: { en: DEFAULT_LINK, hasLocalizedValue: "true" as const },
link: DEFAULT_LINK,
},
styles: {
aspectRatio: 1.78,
Expand Down
15 changes: 3 additions & 12 deletions packages/visual-editor/src/components/directory/Directory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ export const Directory: ComponentConfig<{ props: DirectoryProps }> = {
props: {
data: {
text: {
constantValue: {
en: "",
hasLocalizedValue: "true",
},
constantValue: "",
constantValueEnabled: false,
field: "name",
},
Expand All @@ -145,10 +142,7 @@ export const Directory: ComponentConfig<{ props: DirectoryProps }> = {
props: {
data: {
text: {
constantValue: {
en: "",
hasLocalizedValue: "true",
},
constantValue: "",
constantValueEnabled: true,
field: "name",
},
Expand All @@ -162,10 +156,7 @@ export const Directory: ComponentConfig<{ props: DirectoryProps }> = {
type: "BreadcrumbsSlot",
props: {
data: {
directoryRoot: {
en: "Directory Root",
hasLocalizedValue: "true",
},
directoryRoot: "Directory Root",
},
styles: {
backgroundColor: backgroundColors.background1.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ const CopyrightMessageSlotInternal: PuckComponent<CopyrightMessageSlotProps> = (

export const defaultCopyrightMessageSlotProps: CopyrightMessageSlotProps = {
data: {
text: {
en: "",
hasLocalizedValue: "true",
},
text: "",
},
};

Expand Down
15 changes: 6 additions & 9 deletions packages/visual-editor/src/components/footer/ExpandedFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ const PLACEHOLDER_LOGO_IMAGE: string =

export const defaultLink = {
linkType: "URL" as const,
label: {
en: "Footer Link",
hasLocalizedValue: "true" as const,
},
label: "Footer Link",
link: "#",
openInNewTab: false,
};
Expand Down Expand Up @@ -322,7 +319,7 @@ export const ExpandedFooter: ComponentConfig<{ props: ExpandedFooterProps }> = {
url: PLACEHOLDER_LOGO_IMAGE,
height: 100,
width: 100,
alternateText: { en: "Logo", hasLocalizedValue: "true" },
alternateText: "Logo",
},
constantValueEnabled: true,
},
Expand Down Expand Up @@ -383,19 +380,19 @@ export const ExpandedFooter: ComponentConfig<{ props: ExpandedFooterProps }> = {
data: {
sections: [
{
label: { en: "Footer Label", hasLocalizedValue: "true" },
label: "Footer Label",
links: defaultLinks,
},
{
label: { en: "Footer Label", hasLocalizedValue: "true" },
label: "Footer Label",
links: defaultLinks,
},
{
label: { en: "Footer Label", hasLocalizedValue: "true" },
label: "Footer Label",
links: defaultLinks,
},
{
label: { en: "Footer Label", hasLocalizedValue: "true" },
label: "Footer Label",
links: defaultLinks,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const defaultFooterExpandedLinkSectionProps: FooterExpandedLinkSectionSlotProps
data: {
label: {
field: "",
constantValue: { en: "Footer Label", hasLocalizedValue: "true" },
constantValue: "Footer Label",
constantValueEnabled: true,
},
links: defaultLinks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
import { defaultLink, defaultLinks } from "./ExpandedFooter.tsx";

const defaultSection = {
label: { en: "Footer Label", hasLocalizedValue: "true" as const },
label: "Footer Label",
links: defaultLinks,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const FooterLogoSlot: ComponentConfig<{ props: FooterLogoSlotProps }> = {
url: "https://a.mktgcdn.com/p/wa83C1O1lvtxHI9cGqEdP2HILyUzbD0jvtzwWpOAJfE/196x196.jpg",
height: 100,
width: 100,
alternateText: { en: "Logo", hasLocalizedValue: "true" },
alternateText: "Logo",
},
constantValueEnabled: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import { defaultCopyrightMessageSlotProps } from "./CopyrightMessageSlot.tsx";

const defaultLink = {
linkType: "URL" as const,
label: {
en: "Footer Link",
hasLocalizedValue: "true" as const,
},
label: "Footer Link",
link: "#",
openInNewTab: false,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type HeaderLinksProps = {

const defaultLink: TranslatableCTA = {
linkType: "URL",
label: { en: "Header Link", hasLocalizedValue: "true" },
label: "Header Link",
link: "#",
openInNewTab: false,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,12 @@ export const defaultPrimaryHeaderProps: PrimaryHeaderSlotProps = {
data: {
show: true,
actionType: "link",
buttonText: { en: "Button", hasLocalizedValue: "true" },
buttonText: "Button",
entityField: {
field: "",
constantValue: {
label: { en: "Call to Action", hasLocalizedValue: "true" },
link: { en: "#", hasLocalizedValue: "true" },
label: "Call to Action",
link: "#",
linkType: "URL",
ctaType: "textAndLink",
},
Expand All @@ -451,12 +451,12 @@ export const defaultPrimaryHeaderProps: PrimaryHeaderSlotProps = {
data: {
show: true,
actionType: "link",
buttonText: { en: "Button", hasLocalizedValue: "true" },
buttonText: "Button",
entityField: {
field: "",
constantValue: {
label: { en: "Call to Action", hasLocalizedValue: "true" },
link: { en: "#", hasLocalizedValue: "true" },
label: "Call to Action",
link: "#",
linkType: "URL",
ctaType: "textAndLink",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ import {
import { ComponentErrorBoundary } from "../../../internal/components/ComponentErrorBoundary.tsx";

const placeholderText = {
en: {
json: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}',
html: '<p dir="ltr" style="font-size: 14.67px; font-weight: 400; line-height: 18.67px; color: rgb(0, 0, 0); margin: 0; padding: 3px 2px 3px 2px; position: relative;"><span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span></p>',
},
hasLocalizedValue: "true",
json: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1},{"type":"linebreak","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}',
html: '<p dir="ltr" style="font-size: 14.67px; font-weight: 400; line-height: 18.67px; color: rgb(0, 0, 0); margin: 0; padding: 3px 2px 3px 2px; position: relative;"><span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span><br/><br/><span>Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</span></p>',
};

export type AboutSectionProps = {
Expand Down Expand Up @@ -202,10 +199,7 @@ export const AboutSection: ComponentConfig<{ props: AboutSectionProps }> = {
props: {
data: {
text: {
constantValue: {
en: "About [[name]]",
hasLocalizedValue: "true",
},
constantValue: "About [[name]]",
constantValueEnabled: true,
field: "",
},
Expand Down Expand Up @@ -242,10 +236,7 @@ export const AboutSection: ComponentConfig<{ props: AboutSectionProps }> = {
{
header: {
field: "",
constantValue: {
en: "Hours",
hasLocalizedValue: "true",
},
constantValue: "Hours",
constantValueEnabled: true,
},
content: {
Expand All @@ -256,10 +247,7 @@ export const AboutSection: ComponentConfig<{ props: AboutSectionProps }> = {
{
header: {
field: "",
constantValue: {
en: "Services Offered",
hasLocalizedValue: "true",
},
constantValue: "Services Offered",
constantValueEnabled: true,
},
content: {
Expand All @@ -276,10 +264,7 @@ export const AboutSection: ComponentConfig<{ props: AboutSectionProps }> = {
{
header: {
field: "",
constantValue: {
en: "Follow Us",
hasLocalizedValue: "true",
},
constantValue: "Follow Us",
constantValueEnabled: true,
},
content: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ export const defaultAboutSectionProps: Omit<DetailSection["content"], "type"> =
constantValue: "",
constantValueEnabled: false,
},
label: {
en: "Phone",
hasLocalizedValue: "true",
},
label: "Phone",
},
styles: {
phoneFormat: "domestic",
Expand Down Expand Up @@ -301,7 +298,7 @@ const aboutSectionDetailsColumnFields: Fields<AboutSectionDetailsColumnProps> =
defaultItemProps: {
header: {
field: "",
constantValue: { en: "Header", hasLocalizedValue: "true" },
constantValue: "Header",
constantValueEnabled: true,
},
content: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ export const defaultBannerProps: BannerSectionProps = {
data: {
text: {
field: "",
constantValue: {
en: getDefaultRTF("Banner Text"),
hasLocalizedValue: "true",
},
constantValue: getDefaultRTF("Banner Text"),
constantValueEnabled: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ export const BreadcrumbsSection: ComponentConfig<{
fields: breadcrumbsSectionFields,
defaultProps: {
data: {
directoryRoot: {
en: "Directory Root",
hasLocalizedValue: "true",
},
directoryRoot: "Directory Root",
},
styles: {
backgroundColor: backgroundColors.background1.value,
Expand Down
Loading