Skip to content
Merged
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
3 changes: 3 additions & 0 deletions packages/visual-editor/locales/cs/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/da/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/de/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/en-GB/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/en/visual-editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"callToActions": "Call to Actions",
"cancel": "Cancel",
"categories": {
"coreInformation": "Core Information",
"directory": "Directory",
"locator": "Locator",
"other": "OTHER",
"pageSections": "PAGE SECTIONS"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/visual-editor/locales/es/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/et/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/fi/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/fr/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/hr/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/hu/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/it/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/ja/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/lt/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/lv/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/nb/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/nl/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/pl/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/pt/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/ro/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/sk/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/sv/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/tr/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/zh-TW/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/visual-editor/locales/zh/visual-editor.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions packages/visual-editor/src/components/categories/SlotsCategory.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {
HeadingTextProps,
HeadingText,
} from "../contentBlocks/HeadingText.tsx";

export interface SlotsCategoryProps {
HeadingTextSlot: HeadingTextProps;
}

const lockedPermissions = {
delete: false,
drag: false,
duplicate: false,
insert: false,
};

export const SlotsCategoryComponents = {
HeadingTextSlot: { ...HeadingText, permissions: lockedPermissions },
};

export const SlotsCategory = Object.keys(
SlotsCategoryComponents
) as (keyof SlotsCategoryProps)[];
1 change: 1 addition & 0 deletions packages/visual-editor/src/components/categories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from "./LocatorCategory";
export * from "./OtherCategory";
export * from "./PageSectionCategory";
export * from "./DeprecatedCategory";
export * from "./SlotsCategory";
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Config, DropZone } from "@measured/puck";
import { msg } from "@yext/visual-editor";
import {
DeprecatedCategory,
DeprecatedCategoryComponents,
Expand Down Expand Up @@ -29,7 +30,7 @@ export const directoryConfig: Config<DirectoryConfigProps> = {
},
categories: {
directoryComponents: {
title: "Directory",
title: msg("categories.directory", "Directory"),
components: [...DirectoryCategory, ...OtherCategory],
},
// deprecated components are hidden in the sidebar but still render if used in the page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Config, DropZone } from "@measured/puck";
import { msg } from "@yext/visual-editor";
import {
DeprecatedCategory,
DeprecatedCategoryComponents,
Expand Down Expand Up @@ -29,7 +30,7 @@ export const locatorConfig: Config<LocatorConfigProps> = {
},
categories: {
locatorComponents: {
title: "Locator",
title: msg("categories.locator", "Locator"),
components: [...LocatorCategory, ...OtherCategory],
},
// deprecated components are hidden in the sidebar but still render if used in the page
Expand Down
20 changes: 16 additions & 4 deletions packages/visual-editor/src/components/configs/mainConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DropZone, Config } from "@measured/puck";
import { msg } from "@yext/visual-editor";
import {
DeprecatedCategory,
DeprecatedCategoryComponents,
Expand All @@ -19,36 +20,47 @@ import {
AdvancedCoreInfoCategoryComponents,
type AdvancedCoreInfoCategoryProps,
} from "../categories/AdvancedCoreInfoCategory";
import {
SlotsCategory,
SlotsCategoryComponents,
SlotsCategoryProps,
} from "../categories";

export interface MainConfigProps
extends PageSectionCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps,
AdvancedCoreInfoCategoryProps {}
AdvancedCoreInfoCategoryProps,
SlotsCategoryProps {}

const components: Config<MainConfigProps>["components"] = {
...PageSectionCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
...AdvancedCoreInfoCategoryComponents,
...SlotsCategoryComponents,
};

// The config used for base entities (locations, financial professionals, etc.)
export const mainConfig: Config<MainConfigProps> = {
components,
categories: {
pageSections: {
title: "Page Sections",
title: msg("categories.pageSections", "Page Sections"),
components: PageSectionCategory,
},
coreInformation: {
title: "Core Information",
title: msg("categories.coreInformation", "Core Information"),
components: AdvancedCoreInfoCategory,
},
other: {
title: "Other",
title: msg("categories.other", "Other"),
components: OtherCategory,
},
slots: {
components: SlotsCategory,
visible: false,
},
// deprecated components are hidden in the sidebar but still render if used in the page
deprecatedComponents: {
visible: false,
Expand Down
Loading