From 1ca2b92873766883abfb7179d39be3a60eccf25f Mon Sep 17 00:00:00 2001 From: Suren Date: Fri, 7 Mar 2025 17:32:47 +0530 Subject: [PATCH] #10901: Update plugin documentation of BrandNavbar and localConfig --- web/client/configs/localConfig.json | 28 ------------------ .../plugins/ResourcesCatalog/BrandNavbar.jsx | 29 ++++++++++++------- 2 files changed, 18 insertions(+), 39 deletions(-) diff --git a/web/client/configs/localConfig.json b/web/client/configs/localConfig.json index 09b09bc361..56ef211c8c 100644 --- a/web/client/configs/localConfig.json +++ b/web/client/configs/localConfig.json @@ -412,12 +412,6 @@ ], "desktop": [ "Details", - { - "name": "BrandNavbar", - "cfg": { - "containerPosition": "header" - } - }, { "name": "Map", "cfg": { @@ -806,9 +800,6 @@ "FeedbackMask" ], "common": [ - { - "name": "BrandNavbar" - }, { "name": "ManagerMenu" }, "Login", "Language", @@ -987,12 +978,6 @@ }, { "name": "DashboardExport" }, { "name": "DashboardImport" }, - { - "name": "BrandNavbar", - "cfg": { - "containerPosition": "header" - } - }, { "name": "Share", "cfg": { @@ -1118,13 +1103,6 @@ }, { "name": "Save", "cfg": { "resourceType": "GEOSTORY" } }, { "name": "SaveAs", "cfg": { "resourceType": "GEOSTORY" } }, - { - "name": "BrandNavbar", - "cfg": { - "containerPosition": "header", - "disablePluginIf": "{(state('router') && state('router').includes('/geostory/shared') && state('geostorymode') !== 'edit')}" - } - }, { "name": "Tutorial", "cfg": { @@ -1195,12 +1173,6 @@ "Permalink" ], "context-creator": [ - { - "name": "BrandNavbar", - "cfg": { - "containerPosition": "header" - } - }, "Redirect", "Login", "Language", diff --git a/web/client/plugins/ResourcesCatalog/BrandNavbar.jsx b/web/client/plugins/ResourcesCatalog/BrandNavbar.jsx index 1bdfe3676a..64a7de4dcd 100644 --- a/web/client/plugins/ResourcesCatalog/BrandNavbar.jsx +++ b/web/client/plugins/ResourcesCatalog/BrandNavbar.jsx @@ -67,6 +67,9 @@ BrandNavbarMenuItem.defaultProps = { * @prop {object[]} cfg.leftMenuItems menu items configuration for left side * @prop {object[]} cfg.rightMenuItems menu items configuration for right side * @prop {object[]} items this property contains the items injected from the other plugins, + * @prop {object} logo configuration to display a logo in the navbar. If not provided, the default logo will be used. + * @prop {string} logo.src image source path of the logo + * @prop {string} logo.href hyperlink of the logo * using the `containers` option in the plugin that want to inject new menu items. * ```javascript * const MyMenuButtonComponent = connect(selector, { onActivateTool })(({ @@ -133,17 +136,21 @@ BrandNavbarMenuItem.defaultProps = { * "type": "divider" * } * ], -* "rightMenuItems": [ -* { -* "type": "button", -* "href": "/my-link", -* "target": "blank", -* "glyph": "heart", -* "labelId": "myMessageId", -* "variant": "default" -* } -* ] - * } + * "rightMenuItems": [ + * { + * "type": "button", + * "href": "/my-link", + * "target": "blank", + * "glyph": "heart", + * "labelId": "myMessageId", + * "variant": "default" + * } + * ], + * "logo": { + * "src": "/my-image.jpg", + * "href": "/my-link", + * } + * } * } */ function BrandNavbar({