rename input from extraContextMenuItems to contextMenuItems
Signed-off-by: Mark Dunphy <markd@spotify.com>
This commit is contained in:
@@ -56,7 +56,7 @@ describe('EntityContextMenuItemBlueprint', () => {
|
||||
"T": undefined,
|
||||
"attachTo": {
|
||||
"id": "page:catalog/entity",
|
||||
"input": "extraContextMenuItems",
|
||||
"input": "contextMenuItems",
|
||||
},
|
||||
"configSchema": undefined,
|
||||
"disabled": false,
|
||||
|
||||
@@ -62,7 +62,7 @@ export type EntityContextMenuItemParams =
|
||||
/** @alpha */
|
||||
export const EntityContextMenuItemBlueprint = createExtensionBlueprint({
|
||||
kind: 'entity-context-menu-item',
|
||||
attachTo: { id: 'page:catalog/entity', input: 'extraContextMenuItems' },
|
||||
attachTo: { id: 'page:catalog/entity', input: 'contextMenuItems' },
|
||||
output: [coreExtensionData.reactElement],
|
||||
*factory(params: EntityContextMenuItemParams, { node, apis }) {
|
||||
const loaderFactory = () => {
|
||||
|
||||
@@ -72,9 +72,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
||||
EntityContentBlueprint.dataRefs.filterExpression.optional(),
|
||||
EntityContentBlueprint.dataRefs.group.optional(),
|
||||
]),
|
||||
extraContextMenuItems: createExtensionInput([
|
||||
coreExtensionData.reactElement,
|
||||
]),
|
||||
contextMenuItems: createExtensionInput([coreExtensionData.reactElement]),
|
||||
},
|
||||
config: {
|
||||
schema: {
|
||||
@@ -91,7 +89,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
||||
loader: async () => {
|
||||
const { EntityLayout } = await import('./components/EntityLayout');
|
||||
|
||||
const extraMenuItems = inputs.extraContextMenuItems.map(item =>
|
||||
const menuItems = inputs.contextMenuItems.map(item =>
|
||||
item.get(coreExtensionData.reactElement),
|
||||
);
|
||||
|
||||
@@ -102,7 +100,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
||||
|
||||
const header = inputs.header?.get(
|
||||
EntityHeaderBlueprint.dataRefs.element,
|
||||
) ?? <EntityHeader extraMenuItems={extraMenuItems} />;
|
||||
) ?? <EntityHeader extraMenuItems={menuItems} />;
|
||||
|
||||
let groups = Object.entries(defaultEntityContentGroups).reduce<Groups>(
|
||||
(rest, group) => {
|
||||
@@ -141,7 +139,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
||||
const Component = () => {
|
||||
return (
|
||||
<AsyncEntityProvider {...useEntityFromUrl()}>
|
||||
<EntityLayout header={header} extraMenuItems={extraMenuItems}>
|
||||
<EntityLayout header={header} extraMenuItems={menuItems}>
|
||||
{Object.values(groups).flatMap(({ title, items }) =>
|
||||
items.map(output => (
|
||||
<EntityLayout.Route
|
||||
|
||||
Reference in New Issue
Block a user