## What Adds a new custom component called `editMenuItems` that can be used in the document view. This options allows users to inject their own custom components into the dropdown menu found in the document controls (the 3 dot menu), the provided component(s) will be added below the default existing actions (Create New, Duplicate, Delete and so on). ## Why To increase flexibility and customization for users who wish to add functionality to this menu. This provides a clean and consistent way to add additional actions without needing to override or duplicate existing UI logic. ## How - Introduced the `editMenuItems` slot in the document controls dropdown (three-dot menu) - in edit and preview tabs. - Added documentation and tests to cover this new custom component #### Testing Use the `admin` test suite and go to the `edit menu items` collection
62 lines
2.2 KiB
TypeScript
62 lines
2.2 KiB
TypeScript
export const usersCollectionSlug = 'users'
|
|
export const customViews1CollectionSlug = 'custom-views-one'
|
|
export const customViews2CollectionSlug = 'custom-views-two'
|
|
export const geoCollectionSlug = 'geo'
|
|
export const arrayCollectionSlug = 'array'
|
|
export const postsCollectionSlug = 'posts'
|
|
export const group1Collection1Slug = 'group-one-collection-ones'
|
|
export const group1Collection2Slug = 'group-one-collection-twos'
|
|
export const group2Collection1Slug = 'group-two-collection-ones'
|
|
export const group2Collection2Slug = 'group-two-collection-twos'
|
|
export const hiddenCollectionSlug = 'hidden-collection'
|
|
export const notInViewCollectionSlug = 'not-in-view-collection'
|
|
export const noApiViewCollectionSlug = 'collection-no-api-view'
|
|
export const disableDuplicateSlug = 'disable-duplicate'
|
|
export const disableCopyToLocale = 'disable-copy-to-locale'
|
|
export const uploadCollectionSlug = 'uploads'
|
|
export const placeholderCollectionSlug = 'placeholder'
|
|
|
|
export const uploadTwoCollectionSlug = 'uploads-two'
|
|
export const customFieldsSlug = 'custom-fields'
|
|
|
|
export const listDrawerSlug = 'with-list-drawer'
|
|
export const collectionSlugs = [
|
|
usersCollectionSlug,
|
|
customViews1CollectionSlug,
|
|
customViews2CollectionSlug,
|
|
geoCollectionSlug,
|
|
arrayCollectionSlug,
|
|
postsCollectionSlug,
|
|
group1Collection1Slug,
|
|
group1Collection2Slug,
|
|
group2Collection1Slug,
|
|
group2Collection2Slug,
|
|
hiddenCollectionSlug,
|
|
noApiViewCollectionSlug,
|
|
customFieldsSlug,
|
|
disableDuplicateSlug,
|
|
listDrawerSlug,
|
|
]
|
|
|
|
export const customGlobalViews1GlobalSlug = 'custom-global-views-one'
|
|
export const customGlobalViews2GlobalSlug = 'custom-global-views-two'
|
|
export const globalSlug = 'global'
|
|
export const group1GlobalSlug = 'group-globals-one'
|
|
export const group2GlobalSlug = 'group-globals-two'
|
|
export const hiddenGlobalSlug = 'hidden-global'
|
|
|
|
export const notInViewGlobalSlug = 'not-in-view-global'
|
|
export const settingsGlobalSlug = 'settings'
|
|
export const noApiViewGlobalSlug = 'global-no-api-view'
|
|
export const globalSlugs = [
|
|
customGlobalViews1GlobalSlug,
|
|
customGlobalViews2GlobalSlug,
|
|
globalSlug,
|
|
group1GlobalSlug,
|
|
group2GlobalSlug,
|
|
hiddenGlobalSlug,
|
|
noApiViewGlobalSlug,
|
|
]
|
|
export const with300DocumentsSlug = 'with300documents'
|
|
export const editMenuItemsSlug = 'edit-menu-items'
|