From 37eb456f9bc0a25899f9a8d7a88b3d9e0977c40d Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 30 Apr 2024 16:03:20 +0300 Subject: [PATCH] Refactor #5592 - For Menubar, PanelMenu, Steps, TabMenu, TieredMenu --- components/lib/menubar/Menubar.d.ts | 24 +++++------ components/lib/menubar/Menubar.vue | 2 +- components/lib/menubar/MenubarSub.vue | 34 +++++++++------- components/lib/menubar/style/MenubarStyle.js | 12 +++--- components/lib/panelmenu/PanelMenu.d.ts | 40 +++++++++---------- components/lib/panelmenu/PanelMenu.vue | 12 +++--- components/lib/panelmenu/PanelMenuList.vue | 6 +-- components/lib/panelmenu/PanelMenuSub.vue | 22 +++++----- .../lib/panelmenu/style/PanelMenuStyle.js | 16 ++++---- components/lib/steps/Steps.d.ts | 16 ++++---- components/lib/steps/Steps.vue | 28 ++++++------- components/lib/steps/style/StepsStyle.js | 10 ++--- components/lib/tabmenu/TabMenu.d.ts | 20 +++++----- components/lib/tabmenu/TabMenu.vue | 36 ++++++++--------- components/lib/tabmenu/style/TabMenuStyle.js | 10 ++--- .../themes/primeone/base/panelmenu/index.js | 2 +- components/lib/tieredmenu/TieredMenu.d.ts | 22 +++++----- components/lib/tieredmenu/TieredMenu.vue | 2 +- components/lib/tieredmenu/TieredMenuSub.vue | 30 +++++++------- .../lib/tieredmenu/style/TieredMenuStyle.js | 12 +++--- 20 files changed, 181 insertions(+), 175 deletions(-) diff --git a/components/lib/menubar/Menubar.d.ts b/components/lib/menubar/Menubar.d.ts index e3e23f01d..68ace7c61 100755 --- a/components/lib/menubar/Menubar.d.ts +++ b/components/lib/menubar/Menubar.d.ts @@ -59,29 +59,29 @@ export interface MenubarPassThroughOptions { */ root?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the list's DOM element. + * Used to pass attributes to the root list's DOM element. */ - menu?: MenubarPassThroughOptionType; + rootList?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the list item's DOM element. + * Used to pass attributes to the item's DOM element. */ - menuitem?: MenubarPassThroughOptionType; + item?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the content's DOM element. + * Used to pass attributes to the item content's DOM element. */ - content?: MenubarPassThroughOptionType; + itemContent?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the action's DOM element. + * Used to pass attributes to the item link's DOM element. */ - action?: MenubarPassThroughOptionType; + itemLink?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the icon's DOM element. + * Used to pass attributes to the item icon's DOM element. */ - icon?: MenubarPassThroughOptionType; + itemIcon?: MenubarPassThroughOptionType; /** - * Used to pass attributes to the label's DOM element. + * Used to pass attributes to the item label's DOM element. */ - label?: MenubarPassThroughOptionType; + itemLabel?: MenubarPassThroughOptionType; /** * Used to pass attributes to the submenu icon's DOM element. */ diff --git a/components/lib/menubar/Menubar.vue b/components/lib/menubar/Menubar.vue index 92aa2e410..45a3040f0 100755 --- a/components/lib/menubar/Menubar.vue +++ b/components/lib/menubar/Menubar.vue @@ -404,7 +404,7 @@ export default { onEnterKey(event) { if (this.focusedItemInfo.index !== -1) { const element = DomHandler.findSingle(this.menubar, `li[id="${`${this.focusedItemId}`}"]`); - const anchorElement = element && DomHandler.findSingle(element, 'a[data-pc-section="action"]'); + const anchorElement = element && DomHandler.findSingle(element, 'a[data-pc-section="itemlink"]'); anchorElement ? anchorElement.click() : element && element.click(); diff --git a/components/lib/menubar/MenubarSub.vue b/components/lib/menubar/MenubarSub.vue index ad0c131e9..3e745c68e 100755 --- a/components/lib/menubar/MenubarSub.vue +++ b/components/lib/menubar/MenubarSub.vue @@ -1,11 +1,11 @@