Skip to content
Closed
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
28 changes: 14 additions & 14 deletions packages/visual-editor/THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ https://www.npmjs.com/package/generate-license-file

The following npm package may be included in this product:

- react-aria-components@1.11.0
- react-aria-components@1.13.0

This package contains the following license:

Expand Down Expand Up @@ -412,7 +412,7 @@ Apache License

The following npm package may be included in this product:

- @microsoft/api-documenter@7.26.32
- @microsoft/api-documenter@7.28.1

This package contains the following license:

Expand Down Expand Up @@ -445,7 +445,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The following npm package may be included in this product:

- @microsoft/api-extractor@7.52.11
- @microsoft/api-extractor@7.55.1

This package contains the following license:

Expand Down Expand Up @@ -478,7 +478,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The following npm package may be included in this product:

- @microsoft/api-extractor-model@7.30.7
- @microsoft/api-extractor-model@7.32.1

This package contains the following license:

Expand Down Expand Up @@ -539,7 +539,7 @@ THE SOFTWARE.

The following npm package may be included in this product:

- dompurify@3.2.6
- dompurify@3.3.0

This package contains the following license:

Expand Down Expand Up @@ -1294,7 +1294,7 @@ SOFTWARE.

The following npm package may be included in this product:

- @tanstack/react-query@5.85.5
- @tanstack/react-query@5.90.11

This package contains the following license:

Expand Down Expand Up @@ -1358,12 +1358,12 @@ The following npm packages may be included in this product:
- @radix-ui/react-alert-dialog@1.1.15
- @radix-ui/react-dialog@1.1.15
- @radix-ui/react-dropdown-menu@2.1.16
- @radix-ui/react-label@2.1.7
- @radix-ui/react-label@2.1.8
- @radix-ui/react-popover@1.1.15
- @radix-ui/react-progress@1.1.7
- @radix-ui/react-progress@1.1.8
- @radix-ui/react-radio-group@1.3.8
- @radix-ui/react-separator@1.1.7
- @radix-ui/react-slot@1.2.3
- @radix-ui/react-separator@1.1.8
- @radix-ui/react-slot@1.2.4
- @radix-ui/react-switch@1.2.6
- @radix-ui/react-toggle@1.1.10
- @radix-ui/react-tooltip@1.2.8
Expand Down Expand Up @@ -1396,7 +1396,7 @@ SOFTWARE.

The following npm package may be included in this product:

- react-international-phone@4.6.0
- react-international-phone@4.6.1

This package contains the following license:

Expand Down Expand Up @@ -1456,7 +1456,7 @@ SOFTWARE.

The following npm package may be included in this product:

- tsx@4.20.4
- tsx@4.21.0

This package contains the following license:

Expand Down Expand Up @@ -1563,7 +1563,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The following npm package may be included in this product:

- i18next@25.4.0
- i18next@25.7.1

This package contains the following license:

Expand Down Expand Up @@ -1593,7 +1593,7 @@ SOFTWARE.

The following npm package may be included in this product:

- react-i18next@15.7.1
- react-i18next@15.7.4

This package contains the following license:

Expand Down
3 changes: 2 additions & 1 deletion packages/visual-editor/src/components/atoms/body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const bodyVariants = cva(

// Omit 'color' from HTMLAttributes<HTMLParagraphElement> to avoid conflict
export interface BodyProps
extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">,
extends
Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">,
VariantProps<typeof bodyVariants> {}

export const Body = React.forwardRef<HTMLParagraphElement, BodyProps>(
Expand Down
4 changes: 2 additions & 2 deletions packages/visual-editor/src/components/atoms/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export const buttonVariants = cva(
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
extends
React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
Expand All @@ -102,7 +103,6 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
)}
// textTransform has to be applied via styles because there is no custom tailwind utility
style={{
// @ts-expect-error ts(2322) the css variable here resolves to a valid enum value
textTransform: variant?.toLowerCase().includes("link")
? "var(--textTransform-link-textTransform)"
: "var(--textTransform-button-textTransform)",
Expand Down
3 changes: 2 additions & 1 deletion packages/visual-editor/src/components/atoms/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const headingVariants = cva("components", {

// Omit 'color' from HTMLAttributes<HTMLHeadingElement> to avoid conflict
export interface HeadingProps
extends Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">,
extends
Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">,
VariantProps<typeof headingVariants> {
level: HeadingLevel;
semanticLevelOverride?: HeadingLevel | "span";
Expand Down
9 changes: 4 additions & 5 deletions packages/visual-editor/src/components/atoms/hoursTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { HoursTable, HoursTableProps } from "@yext/pages-components";
import { useTranslation } from "react-i18next";
import { themeManagerCn } from "@yext/visual-editor";

export interface HoursTableAtomProps
extends Omit<
HoursTableProps,
"dayOfWeekNames" | "intervalStringsBuilderFn" | "intervalTranslations"
> {
export interface HoursTableAtomProps extends Omit<
HoursTableProps,
"dayOfWeekNames" | "intervalStringsBuilderFn" | "intervalTranslations"
> {
className?: string;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/visual-editor/src/components/atoms/pageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const maxWidthVariants = cva("mx-auto", {
});

export interface PageSectionProps
extends VariantProps<typeof maxWidthVariants>,
extends
VariantProps<typeof maxWidthVariants>,
React.HTMLAttributes<HTMLDivElement> {
background?: BackgroundStyle;
verticalPadding?: VariantProps<typeof pageSectionVariants>["verticalPadding"];
Expand Down
1 change: 0 additions & 1 deletion packages/visual-editor/src/components/atoms/toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function Toggle({
<TogglePrimitive.Root
data-slot="toggle"
style={{
// @ts-expect-error ts(2322) the css variable here resolves to a valid enum value
textTransform: "var(--textTransform-button-textTransform)",
}}
className={themeManagerCn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
} from "../categories/SlotsCategory";

export interface DirectoryConfigProps
extends DirectoryCategoryProps,
extends
DirectoryCategoryProps,
SlotsCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
} from "../categories/SlotsCategory";

export interface LocatorConfigProps
extends LocatorCategoryProps,
extends
LocatorCategoryProps,
SlotsCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps {
Expand Down
3 changes: 2 additions & 1 deletion packages/visual-editor/src/components/configs/mainConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import {
} from "../categories";

export interface MainConfigProps
extends PageSectionCategoryProps,
extends
PageSectionCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps,
AdvancedCoreInfoCategoryProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,41 +432,41 @@ export const EventCard: ComponentConfig<{ props: EventCardProps }> = {
);
const showDescription = Boolean(
descriptionSlotProps &&
(descriptionSlotProps.parentData
? descriptionSlotProps.parentData.richText
: resolveYextEntityField(
params.metadata.streamDocument,
descriptionSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
(descriptionSlotProps.parentData
? descriptionSlotProps.parentData.richText
: resolveYextEntityField(
params.metadata.streamDocument,
descriptionSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
);
const showTitle = Boolean(
titleSlotProps &&
(titleSlotProps.parentData
? titleSlotProps.parentData.text
: resolveYextEntityField(
params.metadata.streamDocument,
titleSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
(titleSlotProps.parentData
? titleSlotProps.parentData.text
: resolveYextEntityField(
params.metadata.streamDocument,
titleSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
);
const showDateTime = Boolean(
dateTimeSlotProps?.parentData?.date?.trim() ||
resolveYextEntityField(
params.metadata.streamDocument,
dateTimeSlotProps.data.date,
i18nComponentsInstance.language || "en"
)?.trim()
resolveYextEntityField(
params.metadata.streamDocument,
dateTimeSlotProps.data.date,
i18nComponentsInstance.language || "en"
)?.trim()
);
const showCTA = Boolean(
ctaSlotProps &&
(ctaSlotProps.parentData
? ctaSlotProps.parentData.cta?.label
: resolveComponentData(
ctaSlotProps.data.entityField,
i18nComponentsInstance.language || "en",
params.metadata.streamDocument
)?.label)
(ctaSlotProps.parentData
? ctaSlotProps.parentData.cta?.label
: resolveComponentData(
ctaSlotProps.data.entityField,
i18nComponentsInstance.language || "en",
params.metadata.streamDocument
)?.label)
);

let updatedData = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,58 +439,58 @@ export const TeamCard: ComponentConfig<{ props: TeamCardProps }> = {

const showImage = Boolean(
person?.headshot ||
imageSlotProps?.parentData?.image ||
(imageSlotProps &&
(imageSlotProps?.data.image.field ||
("url" in imageSlotProps.data.image.constantValue &&
imageSlotProps.data.image.constantValue.url) ||
("image" in imageSlotProps.data.image.constantValue &&
imageSlotProps.data.image.constantValue.image.url)))
imageSlotProps?.parentData?.image ||
(imageSlotProps &&
(imageSlotProps?.data.image.field ||
("url" in imageSlotProps.data.image.constantValue &&
imageSlotProps.data.image.constantValue.url) ||
("image" in imageSlotProps.data.image.constantValue &&
imageSlotProps.data.image.constantValue.image.url)))
);
const showName = Boolean(
person?.name ||
nameSlotProps?.parentData?.text ||
(nameSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
nameSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
nameSlotProps?.parentData?.text ||
(nameSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
nameSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
);
const showTitle = Boolean(
person?.title ||
titleSlotProps?.parentData?.richText ||
(titleSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
titleSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
titleSlotProps?.parentData?.richText ||
(titleSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
titleSlotProps.data.text,
i18nComponentsInstance.language || "en"
))
);
const showPhone = Boolean(
person?.phoneNumber ||
phoneSlotProps?.parentData?.phoneNumbers?.length ||
(phoneSlotProps?.data?.phoneNumbers?.length &&
phoneSlotProps.data.phoneNumbers.some(
(phone: any) => phone.number?.constantValue || phone.number?.field
))
phoneSlotProps?.parentData?.phoneNumbers?.length ||
(phoneSlotProps?.data?.phoneNumbers?.length &&
phoneSlotProps.data.phoneNumbers.some(
(phone: any) => phone.number?.constantValue || phone.number?.field
))
);
const showEmail = Boolean(
person?.email ||
emailSlotProps?.parentData?.list?.length ||
emailSlotProps?.data?.list?.constantValue?.length ||
emailSlotProps?.data?.list?.field
emailSlotProps?.parentData?.list?.length ||
emailSlotProps?.data?.list?.constantValue?.length ||
emailSlotProps?.data?.list?.field
);
const showCTA = Boolean(
person?.cta?.label ||
ctaSlotProps?.parentData?.cta?.label ||
ctaSlotProps?.data?.entityField?.constantValue?.label ||
ctaSlotProps?.data?.entityField?.field ||
(ctaSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
ctaSlotProps.data.entityField
)?.label)
ctaSlotProps?.parentData?.cta?.label ||
ctaSlotProps?.data?.entityField?.constantValue?.label ||
ctaSlotProps?.data?.entityField?.field ||
(ctaSlotProps &&
resolveYextEntityField(
params.metadata.streamDocument,
ctaSlotProps.data.entityField
)?.label)
);

let updatedData = {
Expand Down
Loading
Loading