From 832d7e3dda2af18f6c63d074374616530139e9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 30 Aug 2023 16:28:00 +0300 Subject: [PATCH 1/7] Refactor #4351 --- components/lib/breadcrumb/Breadcrumb.d.ts | 8 ++++++++ components/lib/breadcrumb/BreadcrumbItem.vue | 2 +- components/lib/contextmenu/ContextMenu.d.ts | 8 ++++++++ components/lib/contextmenu/ContextMenuSub.vue | 3 ++- components/lib/dock/Dock.d.ts | 8 ++++++++ components/lib/dock/DockSub.vue | 1 + components/lib/megamenu/MegaMenu.d.ts | 12 ++++++++++++ components/lib/megamenu/MegaMenuSub.vue | 2 +- components/lib/menu/Menu.d.ts | 8 ++++++++ components/lib/menubar/Menubar.d.ts | 12 ++++++++++++ components/lib/menubar/MenubarSub.vue | 4 ++-- components/lib/panelmenu/PanelMenu.d.ts | 12 ++++++++++++ components/lib/panelmenu/PanelMenuSub.vue | 2 +- components/lib/tieredmenu/TieredMenu.d.ts | 12 ++++++++++++ components/lib/tieredmenu/TieredMenuSub.vue | 3 ++- 15 files changed, 90 insertions(+), 7 deletions(-) diff --git a/components/lib/breadcrumb/Breadcrumb.d.ts b/components/lib/breadcrumb/Breadcrumb.d.ts index d93a6c6b5..ea6db8c49 100755 --- a/components/lib/breadcrumb/Breadcrumb.d.ts +++ b/components/lib/breadcrumb/Breadcrumb.d.ts @@ -138,6 +138,14 @@ export interface BreadcrumbSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; }): VNode[]; /** * Custom separator template. diff --git a/components/lib/breadcrumb/BreadcrumbItem.vue b/components/lib/breadcrumb/BreadcrumbItem.vue index e62e1f19e..82d02312c 100755 --- a/components/lib/breadcrumb/BreadcrumbItem.vue +++ b/components/lib/breadcrumb/BreadcrumbItem.vue @@ -14,7 +14,7 @@ {{ label() }} - + diff --git a/components/lib/contextmenu/ContextMenu.d.ts b/components/lib/contextmenu/ContextMenu.d.ts index a85b4f92f..abc6840f6 100755 --- a/components/lib/contextmenu/ContextMenu.d.ts +++ b/components/lib/contextmenu/ContextMenu.d.ts @@ -237,6 +237,14 @@ export interface ContextMenuSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; }): VNode[]; /** * Custom item icon template. diff --git a/components/lib/contextmenu/ContextMenuSub.vue b/components/lib/contextmenu/ContextMenuSub.vue index 3a7e01598..a62a8dbde 100755 --- a/components/lib/contextmenu/ContextMenuSub.vue +++ b/components/lib/contextmenu/ContextMenuSub.vue @@ -39,7 +39,7 @@ - + string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; }): VNode[]; /** * Custom icon content. diff --git a/components/lib/dock/DockSub.vue b/components/lib/dock/DockSub.vue index 6e3f3ae92..e0b38ee11 100644 --- a/components/lib/dock/DockSub.vue +++ b/components/lib/dock/DockSub.vue @@ -77,6 +77,7 @@ import BaseComponent from 'primevue/basecomponent'; import Ripple from 'primevue/ripple'; import Tooltip from 'primevue/tooltip'; import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils'; +import { mergeProps } from 'vue'; export default { name: 'DockSub', diff --git a/components/lib/megamenu/MegaMenu.d.ts b/components/lib/megamenu/MegaMenu.d.ts index 02a0f951b..bb945707b 100755 --- a/components/lib/megamenu/MegaMenu.d.ts +++ b/components/lib/megamenu/MegaMenu.d.ts @@ -242,6 +242,18 @@ export interface MegaMenuSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; + /** + * Whether or not there is a submenu + */ + hasSubmenu: boolean; }): VNode[]; /** * Custom submenu icon template. diff --git a/components/lib/megamenu/MegaMenuSub.vue b/components/lib/megamenu/MegaMenuSub.vue index 05fb56b18..54b0fc0f3 100644 --- a/components/lib/megamenu/MegaMenuSub.vue +++ b/components/lib/megamenu/MegaMenuSub.vue @@ -39,7 +39,7 @@ - +
diff --git a/components/lib/menu/Menu.d.ts b/components/lib/menu/Menu.d.ts index 4b15a86c1..b13531941 100755 --- a/components/lib/menu/Menu.d.ts +++ b/components/lib/menu/Menu.d.ts @@ -218,6 +218,14 @@ export interface MenuSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; }): VNode[]; /** * Custom item icon template. diff --git a/components/lib/menubar/Menubar.d.ts b/components/lib/menubar/Menubar.d.ts index 94d81cd9f..061c4f7dd 100755 --- a/components/lib/menubar/Menubar.d.ts +++ b/components/lib/menubar/Menubar.d.ts @@ -233,6 +233,18 @@ export interface MenubarSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; + /** + * State of the root + */ + root: boolean; }): VNode[]; /** * Custom popup icon template on responsive mode. diff --git a/components/lib/menubar/MenubarSub.vue b/components/lib/menubar/MenubarSub.vue index 220fd1482..292e1738b 100755 --- a/components/lib/menubar/MenubarSub.vue +++ b/components/lib/menubar/MenubarSub.vue @@ -38,7 +38,7 @@ - +
string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; + /** + * Whether or not there is a submenu + */ + hasSubmenu: boolean; }): VNode[]; /** * Custom submenu icon template. diff --git a/components/lib/panelmenu/PanelMenuSub.vue b/components/lib/panelmenu/PanelMenuSub.vue index 057ece7c4..7c389f532 100755 --- a/components/lib/panelmenu/PanelMenuSub.vue +++ b/components/lib/panelmenu/PanelMenuSub.vue @@ -35,7 +35,7 @@ {{ getItemLabel(processedItem) }} - +
diff --git a/components/lib/tieredmenu/TieredMenu.d.ts b/components/lib/tieredmenu/TieredMenu.d.ts index acb402bdf..2881e0a3f 100755 --- a/components/lib/tieredmenu/TieredMenu.d.ts +++ b/components/lib/tieredmenu/TieredMenu.d.ts @@ -236,6 +236,18 @@ export interface TieredMenuSlots { * Menuitem instance */ item: MenuItem; + /** + * Label property of the menuitem + */ + label: string | ((...args: any) => string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; + /** + * Whether or not there is a submenu + */ + hasSubmenu: boolean; }): VNode[]; /** * Custom submenu icon template. diff --git a/components/lib/tieredmenu/TieredMenuSub.vue b/components/lib/tieredmenu/TieredMenuSub.vue index ae08ecbb9..106d08d1b 100755 --- a/components/lib/tieredmenu/TieredMenuSub.vue +++ b/components/lib/tieredmenu/TieredMenuSub.vue @@ -38,7 +38,7 @@ - +
Date: Wed, 30 Aug 2023 13:28:51 +0000 Subject: [PATCH 2/7] Update API doc --- doc/common/apidoc/index.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 353813aae..7f90b572b 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -5181,7 +5181,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n }", "description": "item slot's params." } ], @@ -14771,7 +14771,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n }", "description": "item slot's params." } ], @@ -19670,7 +19670,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Custom content for item.\n \t index: number, // Index of the menuitem\n }", + "type": "{\n \t item: MenuItem, // Custom content for item.\n \t index: number, // Index of the menuitem\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n }", "description": "item slot's params." } ], @@ -27505,7 +27505,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n \t hasSubmenu: boolean, // Whether or not there is a submenu\n }", "description": "item slot's params." } ], @@ -27992,7 +27992,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n }", "description": "item slot's params." } ], @@ -28477,7 +28477,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n \t root: boolean, // State of the root\n }", "description": "item slot's params." } ], @@ -33000,7 +33000,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n \t hasSubmenu: boolean, // Whether or not there is a submenu\n }", "description": "item slot's params." } ], @@ -41449,7 +41449,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: MenuItem, // Menuitem instance\n }", + "type": "{\n \t item: MenuItem, // Menuitem instance\n \t label: undefined, // Label property of the menuitem\n \t props: (args: any) ⇒ string, // Binding properties of the menuitem\n \t hasSubmenu: boolean, // Whether or not there is a submenu\n }", "description": "item slot's params." } ], From 1359cd0b1594aa60ec9420dd2a6006c03c21b19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 30 Aug 2023 16:33:42 +0300 Subject: [PATCH 3/7] Added menu docs for router --- doc/breadcrumb/RouterDoc.vue | 127 +++++++++ doc/contextmenu/RouterDoc.vue | 109 ++++++++ doc/dock/RouterDoc.vue | 8 + doc/megamenu/RouterDoc.vue | 467 ++++++++++++++++++++++++++++++++ doc/megamenu/TemplateDoc.vue | 67 +++++ doc/menu/RouterDoc.vue | 2 +- doc/menubar/RouterDoc.vue | 488 ++++++++++++++++++++++++++++++++++ doc/menubar/TemplateDoc.vue | 67 +++++ doc/panelmenu/RouterDoc.vue | 8 + doc/tieredmenu/RouterDoc.vue | 455 +++++++++++++++++++++++++++++++ pages/breadcrumb/index.vue | 6 + pages/contextmenu/index.vue | 6 + pages/dock/index.vue | 6 + pages/megamenu/index.vue | 6 + pages/menubar/index.vue | 6 + pages/panelmenu/index.vue | 6 + pages/tieredmenu/index.vue | 6 + 17 files changed, 1839 insertions(+), 1 deletion(-) create mode 100644 doc/breadcrumb/RouterDoc.vue create mode 100644 doc/contextmenu/RouterDoc.vue create mode 100644 doc/dock/RouterDoc.vue create mode 100644 doc/megamenu/RouterDoc.vue create mode 100644 doc/menubar/RouterDoc.vue create mode 100644 doc/panelmenu/RouterDoc.vue create mode 100644 doc/tieredmenu/RouterDoc.vue diff --git a/doc/breadcrumb/RouterDoc.vue b/doc/breadcrumb/RouterDoc.vue new file mode 100644 index 000000000..eb92679b9 --- /dev/null +++ b/doc/breadcrumb/RouterDoc.vue @@ -0,0 +1,127 @@ + + + diff --git a/doc/contextmenu/RouterDoc.vue b/doc/contextmenu/RouterDoc.vue new file mode 100644 index 000000000..0fd5afd0e --- /dev/null +++ b/doc/contextmenu/RouterDoc.vue @@ -0,0 +1,109 @@ + + + diff --git a/doc/dock/RouterDoc.vue b/doc/dock/RouterDoc.vue new file mode 100644 index 000000000..dc9dc9f95 --- /dev/null +++ b/doc/dock/RouterDoc.vue @@ -0,0 +1,8 @@ + diff --git a/doc/megamenu/RouterDoc.vue b/doc/megamenu/RouterDoc.vue new file mode 100644 index 000000000..bab93c05d --- /dev/null +++ b/doc/megamenu/RouterDoc.vue @@ -0,0 +1,467 @@ + + + diff --git a/doc/megamenu/TemplateDoc.vue b/doc/megamenu/TemplateDoc.vue index a030494db..4f7b55f27 100644 --- a/doc/megamenu/TemplateDoc.vue +++ b/doc/megamenu/TemplateDoc.vue @@ -9,6 +9,19 @@ logo + @@ -135,6 +148,11 @@ export default { } ] ] + }, + { + label: 'Upload', + icon: 'pi pi-fw pi-upload', + route: '/fileupload' } ], code: { @@ -142,6 +160,19 @@ export default { + @@ -154,6 +185,19 @@ export default { logo + @@ -279,6 +323,11 @@ export default { } ] ] + }, + { + label: 'Upload', + icon: 'pi pi-fw pi-upload', + route: '/fileupload' } ] }; @@ -291,6 +340,19 @@ export default { logo + @@ -413,6 +475,11 @@ const items = ref([ } ] ] + }, + { + label: 'Upload', + icon: 'pi pi-fw pi-upload', + route: '/fileupload' } ]); <\/script>` diff --git a/doc/menu/RouterDoc.vue b/doc/menu/RouterDoc.vue index 712525558..30a6a1eba 100644 --- a/doc/menu/RouterDoc.vue +++ b/doc/menu/RouterDoc.vue @@ -1,7 +1,7 @@ - + @@ -32,11 +32,17 @@