-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff09336
commit 06e25e5
Showing
11 changed files
with
148 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 53 additions & 38 deletions
91
src/dotnet/APIView/ClientSPA/src/app/_components/review-info/review-info.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,55 @@ | ||
|
||
<div *ngIf="review" class="input-group input-group-sm py-2" id="review-info-bar"> | ||
<span role="img" class="input-group-text"> | ||
<img src="assets/images/{{ review!.language | languageNames }}-original.svg" alt="{{ review!.language}}" width="25"> | ||
</span> | ||
<span class="input-group-text">{{ review!.packageName }}</span> | ||
<span *ngIf="review!.status == 'Approved'" class="input-group-text" data-bs-toggle="tooltip" title="Approved for First Release"> | ||
<i class="fa-regular fa-circle-check text-success"></i> | ||
</span> | ||
<button class="btn btn-outline-primary" type="button" (click)="showRevisionSidePanel()">Revision :</button> | ||
<p-dropdown [options]="revisionsTypeDropDown" [(ngModel)]="selectedRevisionsType" (onChange)="onRevisionTypeChange($event)" optionLabel="name"> | ||
<ng-template pTemplate="selectedItem"> | ||
<div class="flex align-items-center gap-2" *ngIf="selectedRevisionsType"> | ||
<div><i class="{{ badgeClass.get(selectedRevisionsType.value) }} me-2"></i>{{ selectedRevisionsType.name }}</div> | ||
</div> | ||
</ng-template> | ||
<ng-template let-revisionsTypeDropDown pTemplate="item"> | ||
<div class="flex align-items-center gap-2"> | ||
<div><i class="{{ badgeClass.get(revisionsTypeDropDown.value) }} me-2"></i>{{ revisionsTypeDropDown.name }}</div> | ||
<div class="row my-2"> | ||
<div class="col-11"> | ||
<div *ngIf="review" class="input-group input-group-sm" id="review-info-bar"> | ||
<button class="btn btn-outline-primary" type="button"><i class="bi bi-arrow-bar-left"></i></button> | ||
<span role="img" class="input-group-text"> | ||
<img src="assets/images/{{ review!.language | languageNames }}-original.svg" alt="{{ review!.language}}" width="25"> | ||
</span> | ||
<span class="input-group-text review-name">{{ review!.packageName }}</span> | ||
<span *ngIf="review!.status == 'Approved'" class="input-group-text" data-bs-toggle="tooltip" title="Approved for First Release"> | ||
<i class="fa-regular fa-circle-check text-success"></i> | ||
</span> | ||
<button class="btn btn-outline-primary" type="button" (click)="showRevisionSidePanel()">Revision :</button> | ||
<p-dropdown [options]="revisionsTypeDropDown" [(ngModel)]="selectedRevisionsType" | ||
(onChange)="onRevisionTypeChange($event)" optionLabel="name"> | ||
<ng-template pTemplate="selectedItem"> | ||
<div class="flex align-items-center gap-2" *ngIf="selectedRevisionsType"> | ||
<div><i class="{{ badgeClass.get(selectedRevisionsType.value) }} me-2"></i>{{ selectedRevisionsType.name }}</div> | ||
</div> | ||
</ng-template> | ||
<ng-template let-revisionsTypeDropDown pTemplate="item"> | ||
<div class="flex align-items-center gap-2"> | ||
<div><i class="{{ badgeClass.get(revisionsTypeDropDown.value) }} me-2"></i>{{ revisionsTypeDropDown.name }}</div> | ||
</div> | ||
</ng-template> | ||
</p-dropdown> | ||
<p-dropdown [options]="revisionsDropDown" [(ngModel)]="selectedRevisionsDropDown" optionLabel="name" [filter]="true" styleClass="revision-drop-down" filterBy="name"></p-dropdown> | ||
<button class="btn btn-outline-primary" type="button">Diff :</button> | ||
|
||
<p-dropdown [options]="diffRevisionsTypeDropDown" [(ngModel)]="selectedDiffRevisionsType" (onChange)="onDiffRevisionTypeChange($event)" optionLabel="name"> | ||
<ng-template pTemplate="selectedItem"> | ||
<div class="flex align-items-center gap-2" *ngIf="selectedDiffRevisionsType"> | ||
<div><i class="{{ badgeClass.get(selectedDiffRevisionsType.value) }} me-2"></i>{{ selectedDiffRevisionsType.name }}</div> | ||
</div> | ||
</ng-template> | ||
<ng-template let-diffRevisionsTypeDropDown pTemplate="item"> | ||
<div class="flex align-items-center gap-2"> | ||
<div><i class="{{ badgeClass.get(diffRevisionsTypeDropDown.value) }} me-2"></i>{{ diffRevisionsTypeDropDown.name }}</div> | ||
</div> | ||
</ng-template> | ||
</p-dropdown> | ||
<p-dropdown [options]="diffRevisionsDropDown" [(ngModel)]="selecteddiffRevisionsDropDown" optionLabel="name" [filter]="true" styleClass="revision-drop-down" filterBy="name"></p-dropdown> | ||
<button class="btn btn-outline-primary" type="button">Conversations :</button> | ||
<button class="btn btn-info" type="button"><span class="badge">0 / 0</span></button> | ||
<button class="btn btn-outline-primary" type="button">Samples</button> | ||
</div> | ||
</div> | ||
<div class="col-1 d-flex"> | ||
<div class="ms-auto"> | ||
<div class="input-group input-group-sm"> | ||
<button class="btn btn-outline-primary" type="button" style="padding-top: 0.4rem; padding-bottom: 0.4rem;"><i class="bi bi-arrow-bar-right"></i></button> | ||
</div> | ||
</ng-template> | ||
</p-dropdown> | ||
<p-dropdown [options]="revisionsDropDown" [(ngModel)]="selectedRevisionsDropDown" optionLabel="name" [filter]="true" filterBy="name"></p-dropdown> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<p-dropdown [options]="diffRevisionsTypeDropDown" [(ngModel)]="selectedDiffRevisionsType" (onChange)="onDiffRevisionTypeChange($event)" optionLabel="name"> | ||
<ng-template pTemplate="selectedItem"> | ||
<div class="flex align-items-center gap-2" *ngIf="selectedDiffRevisionsType"> | ||
<div><i class="{{ badgeClass.get(selectedDiffRevisionsType.value) }} me-2"></i>{{ selectedDiffRevisionsType.name }}</div> | ||
</div> | ||
</ng-template> | ||
<ng-template let-diffRevisionsTypeDropDown pTemplate="item"> | ||
<div class="flex align-items-center gap-2"> | ||
<div><i class="{{ badgeClass.get(diffRevisionsTypeDropDown.value) }} me-2"></i>{{ diffRevisionsTypeDropDown.name }}</div> | ||
</div> | ||
</ng-template> | ||
</p-dropdown> | ||
<p-dropdown [options]="diffRevisionsDropDown" [(ngModel)]="selecteddiffRevisionsDropDown" optionLabel="name" [filter]="true" filterBy="name"></p-dropdown> | ||
<button class="btn btn-outline-primary" type="button">Conversations</button> | ||
<button class="btn btn-outline-primary" type="button">Samples</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/dotnet/APIView/ClientSPA/src/app/_components/review-nav/review-nav.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<p-tabMenu [model]="menuItems" [activeItem]="activeItem"></p-tabMenu> | ||
<p-tree *ngIf="navigationTree.length > 0" [value]="navigationTree"></p-tree> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
:host ::ng-deep { | ||
.p-tree { | ||
border: 0px; | ||
padding: 0.1rem; | ||
max-height: 100%; | ||
width: 100%; | ||
overflow-y: scroll; | ||
overflow-x: hidden; | ||
} | ||
|
||
.p-tree .p-tree-container .p-treenode .p-treenode-content { | ||
display: block; | ||
padding: 0.15rem; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
} | ||
} |
54 changes: 23 additions & 31 deletions
54
src/dotnet/APIView/ClientSPA/src/app/_components/review-nav/review-nav.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,35 @@ | ||
import { Component } from '@angular/core'; | ||
import { MenuItem } from 'primeng/api'; | ||
import { Component, Input, SimpleChanges } from '@angular/core'; | ||
import { NavigationItem } from 'src/app/_models/review'; | ||
import { TreeNode } from 'primeng/api' | ||
|
||
@Component({ | ||
selector: 'app-review-nav', | ||
templateUrl: './review-nav.component.html', | ||
styleUrls: ['./review-nav.component.scss'] | ||
}) | ||
export class ReviewNavComponent { | ||
menuItems : MenuItem[] | undefined = []; | ||
activeItem: MenuItem | undefined; | ||
@Input() navigation : NavigationItem[] | null = null; | ||
navigationTree : TreeNode[] = []; | ||
|
||
ngOnInit() { | ||
this.menuItems = this.setDockItems(); | ||
this.activeItem = this.menuItems[0]; | ||
ngOnChanges(changes: SimpleChanges) { | ||
if (changes['navigation'].previousValue){ | ||
this.navigation?.forEach(navigationItem => { | ||
this.navigationTree.push(this.parseNavigationItemsToTreeNodes(navigationItem)); | ||
}); | ||
} | ||
} | ||
|
||
setDockItems() { | ||
return [ | ||
{ | ||
label: 'API', | ||
icon: 'bi bi-braces', | ||
expanded: false | ||
}, | ||
{ | ||
label: 'Revisions', | ||
icon: 'bi bi-clock-history', | ||
expanded: true | ||
}, | ||
{ | ||
label: 'Conversiation', | ||
icon: 'fa-regular fa-message', | ||
expanded: true | ||
}, | ||
{ | ||
label: 'Samples', | ||
icon: 'bi bi-puzzle', | ||
expanded: true | ||
}, | ||
] | ||
parseNavigationItemsToTreeNodes(navigationItem : NavigationItem) { | ||
let treeNode : TreeNode = { | ||
label: navigationItem.text, | ||
data: navigationItem.navigationId, | ||
expanded: true | ||
} | ||
let children : TreeNode[] = []; | ||
navigationItem.childItems.forEach(child => { | ||
children.push(this.parseNavigationItemsToTreeNodes(child)); | ||
}); | ||
treeNode.children = children; | ||
return treeNode; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,9 @@ | |
.p-sidebar-right { | ||
width: 70dvw; | ||
} | ||
|
||
.p-splitter-panel-nested { | ||
display: block; | ||
min-width: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters