From 011077732224f578b1e2c98f256df3cf8e4d7f5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Tue, 14 May 2024 14:50:54 +0300
Subject: [PATCH 1/3] update panelmenu
---
src/app/components/panelmenu/panelmenu.ts | 4 +-
src/app/showcase/doc/panelmenu/routerdoc.ts | 98 ++++++++++---------
src/app/showcase/doc/panelmenu/templatedoc.ts | 10 +-
3 files changed, 61 insertions(+), 51 deletions(-)
diff --git a/src/app/components/panelmenu/panelmenu.ts b/src/app/components/panelmenu/panelmenu.ts
index 1ca8b6a1511..73274149e26 100644
--- a/src/app/components/panelmenu/panelmenu.ts
+++ b/src/app/components/panelmenu/panelmenu.ts
@@ -742,7 +742,7 @@ export class PanelMenuList implements OnChanges {
(keydown)="onHeaderKeyDown($event, item, i)"
>
@@ -90,51 +90,57 @@ export class RouterDoc implements OnInit {
code: Code = {
basic: `
-
-
+
+
{{ item.label }}
-
-
-
-
-
-
- {{ item.label }}
-
-
+
+
+
+ {{ item.label }}
+
+
+
+
`,
- html: `
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-`,
+ html: `
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
`,
typescript: `import { Component, OnInit } from '@angular/core';
import { MenuItem, MessageService } from 'primeng/api';
diff --git a/src/app/showcase/doc/panelmenu/templatedoc.ts b/src/app/showcase/doc/panelmenu/templatedoc.ts
index 8437d34953b..598229bb5e7 100644
--- a/src/app/showcase/doc/panelmenu/templatedoc.ts
+++ b/src/app/showcase/doc/panelmenu/templatedoc.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { MenuItem } from 'primeng/api';
import { Code } from '@domain/code';
@@ -31,6 +31,7 @@ export class TemplateDoc implements OnInit {
{
label: 'Mail',
icon: 'pi pi-envelope',
+ badge: '5',
items: [
{
label: 'Compose',
@@ -119,7 +120,8 @@ export class TemplateDoc implements OnInit {
{{ item.label }}
-
+
{{ item.shortcut }}
@@ -135,7 +137,8 @@ export class TemplateDoc implements OnInit {
{{ item.label }}
-
+
{{ item.shortcut }}
@@ -164,6 +167,7 @@ export class PanelMenuTemplateDemo implements OnInit {
{
label: 'Mail',
icon: 'pi pi-envelope',
+ badge: '5',
items: [
{
label: 'Compose',
From 0e6abd133e42487d6f6b5f4b9243460437eefd65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Tue, 14 May 2024 14:55:34 +0300
Subject: [PATCH 2/3] refactor
---
src/app/components/panelmenu/panelmenu.ts | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/app/components/panelmenu/panelmenu.ts b/src/app/components/panelmenu/panelmenu.ts
index 73274149e26..91308de1d4e 100644
--- a/src/app/components/panelmenu/panelmenu.ts
+++ b/src/app/components/panelmenu/panelmenu.ts
@@ -894,8 +894,6 @@ export class PanelMenu implements AfterContentInit {
submenuIconTemplate: TemplateRef | undefined;
- headerContentTemplate: TemplateRef | undefined;
-
itemTemplate: TemplateRef | undefined;
public animating: boolean | undefined;
@@ -909,10 +907,6 @@ export class PanelMenu implements AfterContentInit {
ngAfterContentInit() {
this.templates?.forEach((item) => {
switch (item.getType()) {
- case 'headercontent':
- this.headerContentTemplate = item.template;
- break;
-
case 'submenuicon':
this.submenuIconTemplate = item.template;
break;
From 06e1ca036ea899bd3035305aeea772fb394e1b77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mehmet=20=C3=87etin?=
<92744169+mehmetcetin01140@users.noreply.github.com>
Date: Tue, 14 May 2024 14:57:02 +0300
Subject: [PATCH 3/3] fix typo
---
src/app/showcase/doc/panelmenu/routerdoc.ts | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/app/showcase/doc/panelmenu/routerdoc.ts b/src/app/showcase/doc/panelmenu/routerdoc.ts
index bf03da7ca26..679c0a2a53d 100644
--- a/src/app/showcase/doc/panelmenu/routerdoc.ts
+++ b/src/app/showcase/doc/panelmenu/routerdoc.ts
@@ -12,13 +12,13 @@ import { Router } from '@angular/router';