Skip to content

Commit

Permalink
chore: update to ngx-edu-sharing-wlo-pages v0.1.26 (different filterb…
Browse files Browse the repository at this point in the history
…ar options + more generic side-menu-wrapper)

feat: adjust right side menu to the changed components
  • Loading branch information
tkubica-edu committed Nov 8, 2024
1 parent 7c53c99 commit 902ba4c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"ngx-colors": "^3.5.3",
"ngx-edu-sharing-api": "^9999.0.2",
"ngx-edu-sharing-ui": "^9999.0.4",
"ngx-edu-sharing-wlo-pages": "^0.1.25",
"ngx-edu-sharing-wlo-pages": "^0.1.26",
"ngx-slick-carousel": "^17.0.0",
"rxjs": "^7.0.0",
"slick-carousel": "^1.8.1",
Expand Down
26 changes: 13 additions & 13 deletions src/app/wlo-search/template/template.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,27 @@
(closeContentView)="selectedMenuItem = ''"
>
<ng-container slot="menu">
<wlo-collapsible-menu-item
<wlo-side-menu-item
[icon]="'person'"
[selectedMenuItem]="selectedMenuItem"
[title]="menuItems.profiling"
[icon]="'person'"
(nestedComponentChange)="selectedMenuItem = $event"
></wlo-collapsible-menu-item>
<wlo-collapsible-menu-item
(itemClicked)="collapsibleItemClicked($event)"
></wlo-side-menu-item>
<wlo-side-menu-item
[selectedMenuItem]="selectedMenuItem"
[title]="menuItems.topicTree"
(nestedComponentChange)="selectedMenuItem = $event"
></wlo-collapsible-menu-item>
<wlo-collapsible-menu-item
(itemClicked)="collapsibleItemClicked($event)"
></wlo-side-menu-item>
<wlo-side-menu-item
[selectedMenuItem]="selectedMenuItem"
[title]="menuItems.statistics"
(nestedComponentChange)="selectedMenuItem = $event"
></wlo-collapsible-menu-item>
<wlo-collapsible-menu-item
(itemClicked)="collapsibleItemClicked($event)"
></wlo-side-menu-item>
<wlo-side-menu-item
[selectedMenuItem]="selectedMenuItem"
[title]="menuItems.feedback"
(nestedComponentChange)="selectedMenuItem = $event"
></wlo-collapsible-menu-item>
(itemClicked)="collapsibleItemClicked($event)"
></wlo-side-menu-item>
</ng-container>
<ng-container slot="content">
<ng-container *ngIf="selectedMenuItem === menuItems.profiling">
Expand Down
15 changes: 13 additions & 2 deletions src/app/wlo-search/template/template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { SearchResultNode } from 'ngx-edu-sharing-api/lib/api/models/search-resu
import { Value } from 'ngx-edu-sharing-api/lib/api/models/value';
import { EduSharingUiCommonModule, SpinnerComponent } from 'ngx-edu-sharing-ui';
import {
CollapsibleMenuItemComponent,
FilterBarComponent,
SideMenuItemComponent,
SideMenuWrapperComponent,
StatisticChart,
StatisticsSummaryComponent,
Expand Down Expand Up @@ -83,11 +83,11 @@ import { Swimlane } from './swimlane/swimlane';
imports: [
AddSwimlaneBorderButtonComponent,
CdkDragHandle,
CollapsibleMenuItemComponent,
EduSharingUiCommonModule,
FilterBarComponent,
SearchModule,
SharedModule,
SideMenuItemComponent,
SideMenuWrapperComponent,
SpinnerComponent,
StatisticsSummaryComponent,
Expand Down Expand Up @@ -1016,6 +1016,17 @@ export class TemplateComponent implements OnInit {
});
}

/**
* Function to call on wlo-side-menu-item itemClicked output.
*/
collapsibleItemClicked(item: string) {
if (this.selectedMenuItem === item) {
this.selectedMenuItem = '';
} else {
this.selectedMenuItem = item;
}
}

// https://stackoverflow.com/a/16348977
stringToColour(str: string) {
let hash = 0;
Expand Down

0 comments on commit 902ba4c

Please sign in to comment.