From 5e54a2521c01f6347f0c02de9656757eef6e42cc Mon Sep 17 00:00:00 2001 From: Deborah Date: Tue, 30 Apr 2024 17:57:14 +0100 Subject: [PATCH 1/8] fix unit test for menubar and progressbar component --- src/app/components/menubar/menubar.spec.ts | 72 ++++--------------- src/app/components/picklist/picklist.spec.ts | 5 +- .../progressbar/progressbar.spec.ts | 4 +- 3 files changed, 20 insertions(+), 61 deletions(-) diff --git a/src/app/components/menubar/menubar.spec.ts b/src/app/components/menubar/menubar.spec.ts index 9e906633579..04c21cdd6ce 100755 --- a/src/app/components/menubar/menubar.spec.ts +++ b/src/app/components/menubar/menubar.spec.ts @@ -1,16 +1,16 @@ import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { RouterTestingModule } from '@angular/router/testing'; import { Menubar, MenubarModule, MenubarService, MenubarSub } from './menubar'; +import { RouterModule } from '@angular/router'; -describe('Menubar', () => { +fdescribe('Menubar', () => { let menubar: Menubar; let fixture: ComponentFixture; beforeEach(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, RouterTestingModule.withRoutes([{ path: 'test', component: Menubar }]), MenubarModule], + imports: [NoopAnimationsModule, RouterModule.forRoot([{ path: 'test', component: Menubar }]), MenubarModule], providers: [MenubarService] }); @@ -45,7 +45,7 @@ describe('Menubar', () => { const subMenu = fixture.debugElement.query(By.css('.p-menubar-root-list')).componentInstance as MenubarSub; expect(subMenu.baseZIndex).toEqual(20); expect(subMenu.autoZIndex).toEqual(false); - expect(subMenu.autoDisplay).toBeUndefined(); + expect(subMenu.autoDisplay).toBeDefined(); expect(subMenu.autoDisplay).toEqual(menubar.autoDisplay); expect(subMenu.autoZIndex).toEqual(menubar.autoZIndex); expect(subMenu.baseZIndex).toEqual(menubar.baseZIndex); @@ -121,53 +121,11 @@ describe('Menubar', () => { const parentEl = fixture.debugElement.query(By.css('.p-menubar-root-list')); const firstParentEl = parentEl.query(By.css('.p-menuitem-link')); const secondParentEl = parentEl.queryAll(By.css('.p-menuitem-link'))[1]; - firstParentEl.nativeElement.dispatchEvent(new Event('click')); - fixture.detectChanges(); - - expect(firstParentEl.parent.nativeElement.classList.contains('p-menuitem-active')).toBe(true); - expect(secondParentEl.parent.nativeElement.classList.contains('p-menuitem-active')).toBe(false); - }); - - it('should call itemClick', () => { - menubar.model = [ - { - label: 'File', - icon: 'pi pi-fw pi-file', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus' - }, - { label: 'Open' }, - { separator: true }, - { label: 'Quit' } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-pencil', - items: [ - { label: 'Delete', icon: 'pi pi-fw pi-trash' }, - { label: 'Refresh', icon: 'pi pi-fw pi-refresh' } - ] - } - ]; - fixture.detectChanges(); - - const parentEl = fixture.debugElement.query(By.css('.p-menubar-root-list')); - const firstParentEl = parentEl.query(By.css('.p-menuitem-link')); - const secondParentEl = parentEl.queryAll(By.css('.p-menuitem-link'))[1]; - firstParentEl.nativeElement.dispatchEvent(new Event('click')); - fixture.detectChanges(); - - const firstSubmenuList = fixture.debugElement.query(By.css('.p-submenu-list')); - const firstSubItem = firstSubmenuList.query(By.css('.p-menuitem-link')); - firstSubItem.nativeElement.click(); + firstParentEl.nativeElement.click(); fixture.detectChanges(); - expect(firstParentEl.componentInstance.activeItem).toEqual(null); - expect(secondParentEl.componentInstance.activeItem).toEqual(null); - expect(firstParentEl.parent.nativeElement.className).not.toContain('p-menuitem-active'); + expect(firstParentEl?.parent?.parent?.nativeElement.classList.contains('p-menuitem-active')).toBe(true); + expect(secondParentEl?.parent?.parent?.nativeElement.classList.contains('p-menuitem-active')).toBe(false); }); it('should call onItemMouseEnter and not show firstParentMenu', () => { @@ -241,11 +199,11 @@ describe('Menubar', () => { firstParentEl.nativeElement.dispatchEvent(new Event('mouseleave')); tick(300); fixture.detectChanges(); - expect(firstParentEl.parent.nativeElement.classList.contains('p-menuitem-active')).toBe(true); + expect(firstParentEl?.parent?.parent?.nativeElement.classList.contains('p-menuitem-active')).toBe(true); flush(); })); - it('should call itemClick and bindEventListener', () => { + it('should call itemClick', () => { menubar.model = [ { label: 'File', @@ -273,7 +231,7 @@ describe('Menubar', () => { const parentEl = fixture.debugElement.query(By.css('.p-menubar-root-list')); const firstParentEl = parentEl.query(By.css('.p-menuitem-link')); - const bindEventListenerSpy = spyOn(firstParentEl.componentInstance, 'bindDocumentClickListener').and.callThrough(); + const secondParentEl = parentEl.queryAll(By.css('.p-menuitem-link'))[1]; firstParentEl.nativeElement.click(); fixture.detectChanges(); @@ -282,8 +240,9 @@ describe('Menubar', () => { firstSubItem.nativeElement.dispatchEvent(new Event('mouseenter')); fixture.detectChanges(); - expect(bindEventListenerSpy).toHaveBeenCalled(); - expect(firstParentEl.parent.nativeElement.className).toContain('p-menuitem-active'); + expect(firstParentEl?.parent?.parent?.nativeElement.className).toContain('p-menuitem-active'); + expect(secondParentEl?.parent?.parent?.nativeElement.className).not.toContain('p-menuitem-active'); + }); it('should show router items', () => { @@ -315,10 +274,9 @@ describe('Menubar', () => { const parentEl = fixture.debugElement.query(By.css('.p-menubar-root-list')); const firstParentEl = parentEl.query(By.css('.p-menuitem-link')); - firstParentEl.nativeElement.dispatchEvent(new Event('click')); + firstParentEl.nativeElement.click(); fixture.detectChanges(); - - expect(firstParentEl.componentInstance.activeItem.label).toEqual(firstParentEl.nativeElement.textContent); + expect(firstParentEl?.componentInstance.activeItemPath[0].item.label).toEqual(firstParentEl.nativeElement.textContent); }); it('should call itemClick', () => { diff --git a/src/app/components/picklist/picklist.spec.ts b/src/app/components/picklist/picklist.spec.ts index 4db1f5c6d8e..e2109887883 100755 --- a/src/app/components/picklist/picklist.spec.ts +++ b/src/app/components/picklist/picklist.spec.ts @@ -1,6 +1,6 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { PickListModule, PickList } from 'primeng/picklist'; +import { PickListModule, PickList } from './picklist'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Component, EventEmitter } from '@angular/core'; @@ -106,6 +106,7 @@ describe('PickList', () => { fixture.detectChanges(); const sourceListItems = fixture.debugElement.query(By.css('.p-picklist-source-wrapper')).queryAll(By.css('.p-picklist-item')); + //expect(picklist.visibleOptionsSource).toBeDefined(); expect(picklist.visibleOptionsSource.length).toEqual(2); expect(picklist.visibleOptionsSource[0].brand).toEqual('VW'); expect(picklist.visibleOptionsSource[1].brand).toEqual('Volvo'); @@ -250,7 +251,7 @@ describe('PickList', () => { let event = { ctrlKey: true }; let callback = new EventEmitter(); - picklist.onItemClick(event, picklist.source[0], picklist.selectedItemsSource, callback); + picklist.onItemClick(event, picklist.source, picklist.selectedItemsSource, picklist.SOURCE_LIST, callback); fixture.detectChanges(); picklist.cd.detectChanges(); diff --git a/src/app/components/progressbar/progressbar.spec.ts b/src/app/components/progressbar/progressbar.spec.ts index f676069b478..c9c6dc9823a 100755 --- a/src/app/components/progressbar/progressbar.spec.ts +++ b/src/app/components/progressbar/progressbar.spec.ts @@ -27,7 +27,7 @@ describe('ProgressBar', () => { expect(progressbarLabelEl.textContent).toEqual('50%'); }); - it('should not show value', () => { + it('should not show value when showValue is set to false', () => { progressbar.value = 50; progressbar.showValue = false; fixture.detectChanges(); @@ -35,7 +35,7 @@ describe('ProgressBar', () => { const progressbarValueEl = fixture.debugElement.query(By.css('.p-progressbar-value')).nativeElement; const progressbarLabelEl = fixture.debugElement.query(By.css('.p-progressbar-label')); expect(progressbarValueEl.style.width).toEqual('50%'); - expect(progressbarLabelEl).toBeFalsy(); + expect(progressbarLabelEl.children.length).toBe(0); }); it('should change style and styleClass', () => { From 66b21a612061f4948dd1eb98ed0dfb46865e472f Mon Sep 17 00:00:00 2001 From: Deborah Date: Thu, 2 May 2024 09:43:51 +0100 Subject: [PATCH 2/8] fix checkbox and menubar tests --- src/app/components/checkbox/checkbox.spec.ts | 4 ++-- src/app/components/menubar/menubar.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/checkbox/checkbox.spec.ts b/src/app/components/checkbox/checkbox.spec.ts index 8e63ad2f64b..76a8770d86e 100755 --- a/src/app/components/checkbox/checkbox.spec.ts +++ b/src/app/components/checkbox/checkbox.spec.ts @@ -123,8 +123,8 @@ describe('Checkbox', () => { const input = fixture.nativeElement.querySelector('input'); const boxEl = fixture.nativeElement.querySelector('.p-checkbox-box'); const labelEl = fixture.nativeElement.querySelector('.p-checkbox-label'); - const onBlurSpy = spyOn(checkbox, 'onBlur').and.callThrough(); - const onFocusSpy = spyOn(checkbox, 'onFocus').and.callThrough(); + const onBlurSpy = spyOn(checkbox, 'onInputBlur').and.callThrough(); + const onFocusSpy = spyOn(checkbox, 'onInputFocus').and.callThrough(); input.dispatchEvent(new Event('focus')); fixture.detectChanges(); diff --git a/src/app/components/menubar/menubar.spec.ts b/src/app/components/menubar/menubar.spec.ts index 04c21cdd6ce..46c55e6d05c 100755 --- a/src/app/components/menubar/menubar.spec.ts +++ b/src/app/components/menubar/menubar.spec.ts @@ -4,7 +4,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Menubar, MenubarModule, MenubarService, MenubarSub } from './menubar'; import { RouterModule } from '@angular/router'; -fdescribe('Menubar', () => { +describe('Menubar', () => { let menubar: Menubar; let fixture: ComponentFixture; From 25aaba8f458aa7f96869184de2775aa03aedff3a Mon Sep 17 00:00:00 2001 From: "Lisa Flinn (She/Her)" Date: Thu, 2 May 2024 10:36:32 +0100 Subject: [PATCH 3/8] add case for numpadEnter --- src/app/components/menu/menu.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index 04e5e2845a5..b41baf51a6f 100755 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -30,6 +30,7 @@ import { } from '@angular/core'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; +import e from 'express'; import { MenuItem, OverlayService, PrimeNGConfig, PrimeTemplate } from 'primeng/api'; import { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom'; import { RippleModule } from 'primeng/ripple'; @@ -569,6 +570,10 @@ export class Menu implements OnDestroy { this.onEnterKey(event); break; + case 'NumpadEnter': + this.onEnterKey(event); + break; + case 'Space': this.onSpaceKey(event); break; From 48f96f3c50220df31ce2e674f3d2158a6115ddbb Mon Sep 17 00:00:00 2001 From: "Lisa Flinn (She/Her)" Date: Thu, 2 May 2024 10:39:04 +0100 Subject: [PATCH 4/8] rm unused import --- src/app/components/menu/menu.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index b41baf51a6f..b8ed9512e43 100755 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -30,7 +30,6 @@ import { } from '@angular/core'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; -import e from 'express'; import { MenuItem, OverlayService, PrimeNGConfig, PrimeTemplate } from 'primeng/api'; import { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom'; import { RippleModule } from 'primeng/ripple'; From 358eeca13200953d4656d22f04057ca8b6e75b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 2 May 2024 12:59:09 +0300 Subject: [PATCH 5/8] update overlaypanel basicdoc --- src/app/showcase/doc/overlaypanel/basicdoc.ts | 111 +++++++++++++++--- 1 file changed, 95 insertions(+), 16 deletions(-) diff --git a/src/app/showcase/doc/overlaypanel/basicdoc.ts b/src/app/showcase/doc/overlaypanel/basicdoc.ts index 71fca32f4c3..806f61d5559 100644 --- a/src/app/showcase/doc/overlaypanel/basicdoc.ts +++ b/src/app/showcase/doc/overlaypanel/basicdoc.ts @@ -22,10 +22,10 @@ import { Code } from '@domain/code';
Invite Member - - - - +
+ + +
Team Members @@ -57,26 +57,105 @@ export class BasicDoc { ]; code: Code = { - basic: ` - product - -`, + basic: ` + +
+
+ Share this document + + + + + + +
+
+ Invite Member +
+ + +
+
+
+ Team Members +
    +
  • + +
    + {{ member.name }} +
    {{ member.email }}
    +
    +
    + {{ member.role }} + +
    +
  • +
+
+
+
`, - html: ` -
+ html: `
+ - product +
+
+ Share this document + + + + + + +
+
+ Invite Member +
+ + +
+
+
+ Team Members +
    +
  • + +
    + {{ member.name }} +
    {{ member.email }}
    +
    +
    + {{ member.role }} + +
    +
  • +
+
+
-
`, - typescript: ` -import { Component } from '@angular/core'; + typescript: `import { Component } from '@angular/core'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; +import { InputGroupModule } from 'primeng/inputgroup'; +import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { ChipsModule } from 'primeng/chips'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'overlay-panel-basic-demo', - templateUrl: './overlay-panel-basic-demo.html' + templateUrl: './overlay-panel-basic-demo.html', + standalone: true, + imports: [OverlayPanelModule, InputGroupModule, InputGroupAddonModule, ButtonModule, InputTextModule, ChipsModule, CommonModule] }) -export class OverlayPanelBasicDemo {}` +export class OverlayPanelBasicDemo { + members = [ + { name: 'Amy Elsner', image: 'amyelsner.png', email: 'amy@email.com', role: 'Owner' }, + { name: 'Bernardo Dominic', image: 'bernardodominic.png', email: 'bernardo@email.com', role: 'Editor' }, + { name: 'Ioni Bowcher', image: 'ionibowcher.png', email: 'ioni@email.com', role: 'Viewer' } + ]; +}` }; } From ae29ee4aabdd737c5a0e601aa0bccfdea341309f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 2 May 2024 13:14:20 +0300 Subject: [PATCH 6/8] update paginator --- src/app/components/paginator/paginator.ts | 312 ++++++------------ src/app/showcase/doc/paginator/templatedoc.ts | 128 ++++--- 2 files changed, 199 insertions(+), 241 deletions(-) diff --git a/src/app/components/paginator/paginator.ts b/src/app/components/paginator/paginator.ts index 328718139c8..adc75e2310d 100755 --- a/src/app/components/paginator/paginator.ts +++ b/src/app/components/paginator/paginator.ts @@ -41,159 +41,121 @@ import { PaginatorState } from './paginator.interface';
- - + {{ currentPageReport }} + + + - - - - - - - {{ currentPageReport }} - - - - - - - - - - {{ currentPageReport }} - - - - - - - + + {{ currentPageReport }} + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + +
@@ -335,22 +297,6 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { @ContentChildren(PrimeTemplate) templates: Nullable>; - firstPageLinkTemplate: Nullable>; - - prevPageLinkTemplate: Nullable>; - - pageLinksTemplate: Nullable>; - - nextPageLinkTemplate: Nullable>; - - lastPageLinkTemplate: Nullable>; - - rowsPerPageDropdownTemplate: Nullable>; - - jumpToPageDropdownTemplate: Nullable>; - - jumpToPageInputTemplate: Nullable>; - dropdownIconTemplate: Nullable>; firstPageLinkIconTemplate: Nullable>; @@ -401,38 +347,6 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { ngAfterContentInit(): void { (this.templates as QueryList).forEach((item) => { switch (item.getType()) { - case 'firstpagelink': - this.firstPageLinkTemplate = item.template; - break; - - case 'prevpagelink': - this.prevPageLinkTemplate = item.template; - break; - - case 'pagelinks': - this.pageLinksTemplate = item.template; - break; - - case 'nextpagelink': - this.nextPageLinkTemplate = item.template; - break; - - case 'lastpagelink': - this.lastPageLinkTemplate = item.template; - break; - - case 'rowsperpagedropdown': - this.rowsPerPageDropdownTemplate = item.template; - break; - - case 'jumptopagedropdown': - this.jumpToPageDropdownTemplate = item.template; - break; - - case 'jumptopageinput': - this.jumpToPageInputTemplate = item.template; - break; - case 'dropdownicon': this.dropdownIconTemplate = item.template; break; @@ -571,14 +485,6 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { return Math.floor(this.first / this.rows); } - getFirst(): number { - return this.totalRecords > 0 ? this._first + 1 : 0; - } - - getLast(): number { - return Math.min(this._first + this.rows, this.totalRecords); - } - changePageToFirst(event: Event) { if (!this.isFirstPage()) { this.changePage(0); @@ -645,8 +551,6 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { .replace('{rows}', String(this.rows)) .replace('{totalRecords}', String(this.totalRecords)); } - - } @NgModule({ @@ -654,4 +558,4 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { exports: [Paginator, DropdownModule, InputNumberModule, FormsModule, SharedModule], declarations: [Paginator] }) -export class PaginatorModule {} +export class PaginatorModule {} \ No newline at end of file diff --git a/src/app/showcase/doc/paginator/templatedoc.ts b/src/app/showcase/doc/paginator/templatedoc.ts index cd30fe3a876..3e0b0944988 100644 --- a/src/app/showcase/doc/paginator/templatedoc.ts +++ b/src/app/showcase/doc/paginator/templatedoc.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { Code } from '@domain/code'; +import { Code } from '../../domain/code'; interface PageEvent { first: number; @@ -12,28 +12,67 @@ interface PageEvent { selector: 'template-doc', template: ` -

- Paginator elements can be customized using the pTemplate property. -

+

Templating allows overriding the default content of the UI elements by defining callbacks using the element name.

-
- - - ({{ currentPage }} of {{ totalPages }}) - - -
- +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ Items per page: + + +
+ +
+
+ Items per page: + +
+
- -
+ ` }) export class TemplateDoc { - first: number = 0; + first1: number = 0; + + rows1: number = 10; + + first2: number = 0; + + rows2: number = 10; - rows: number = 1; + first3: number = 0; + + rows3: number = 10; totalRecords: number = 120; @@ -44,27 +83,37 @@ export class TemplateDoc { { label: 120, value: 120 } ]; - onPageChange(event: PageEvent) { - this.first = event.first; - this.rows = event.rows; + onPageChange1(event: PageEvent) { + this.first1 = event.first; + this.rows1 = event.rows; + } + + onPageChange2(event: PageEvent) { + this.first2 = event.first; + this.rows2 = event.rows; + } + + onPageChange3(event: PageEvent) { + this.first3 = event.first; + this.rows3 = event.rows; } code: Code = { basic: `
- +
- +
- +
Items per page: - +
@@ -72,46 +121,49 @@ export class TemplateDoc {
Items per page: - +
`, - html: ` -
+ html: `
- +
- +
- +
- +
Items per page: - +
- +
Items per page: - +
`, - typescript: ` -import { Component } from '@angular/core'; - + typescript: `import { Component } from '@angular/core'; +import { PaginatorModule } from 'primeng/paginator'; +import { ButtonModule } from 'primeng/button'; +import { DividerModule } from 'primeng/divider'; +import { SliderModule } from 'primeng/slider'; +import { FormsModule } from '@angular/forms'; + interface PageEvent { first: number; rows: number; @@ -121,7 +173,9 @@ interface PageEvent { @Component({ selector: 'paginator-template-demo', - templateUrl: './paginator-template-demo.html' + templateUrl: './paginator-template-demo.html', + standalone: true, + imports: [PaginatorModule, ButtonModule, DividerModule, SliderModule, FormsModule] }) export class PaginatorTemplateDemo { first1: number = 0; From 0f44fca75f681efa6f82030b8704f0e61eb06eeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 10:18:10 +0000 Subject: [PATCH 7/8] Bump ejs from 3.1.9 to 3.1.10 Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10. - [Release notes](https://github.com/mde/ejs/releases) - [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10) --- updated-dependencies: - dependency-name: ejs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2d2912363aa..aa9c1ec2db6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,9 +42,9 @@ "esbuild": "^0.19.8", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", - "eslint-plugin-import": "latest", - "eslint-plugin-jsdoc": "latest", - "eslint-plugin-prefer-arrow": "latest", + "eslint-plugin-import": "*", + "eslint-plugin-jsdoc": "*", + "eslint-plugin-prefer-arrow": "*", "express": "^4.19.2", "file-saver": "^2.0.5", "gulp": "^4.0.2", @@ -9423,9 +9423,9 @@ "dev": true }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { "jake": "^10.8.5" From b46426820770b99a4f05999f8383a626148436f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 2 May 2024 13:26:37 +0300 Subject: [PATCH 8/8] update menubar interface.ts --- src/app/components/menubar/menubar.interface.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/components/menubar/menubar.interface.ts b/src/app/components/menubar/menubar.interface.ts index 22e3a2f8b22..5016db86b6c 100644 --- a/src/app/components/menubar/menubar.interface.ts +++ b/src/app/components/menubar/menubar.interface.ts @@ -6,16 +6,19 @@ import { MenuItem } from 'primeng/api'; * @group Templates */ export interface MenubarTemplates { - /** + /** * Custom item template. */ - item(context: { + item(context: { /** * Item instance. */ - $implicit: MenuItem - - }): TemplateRef<{ $implicit: MenuItem }>; + $implicit: MenuItem; + /** + * Whether root or not + */ + root: boolean; + }): TemplateRef<{ $implicit: MenuItem; root: boolean }>; /** * Custom template of start. */