ecosystem/shared/package-changelog/package-changelog.component.ts
Component to display the change log of a package. It fetches the change log file from the package's repository and displays it. It can fetch the change log for the latest version or a specific version if provided. It can also compare the change log with the previous version if provided and display the difference between the two versions.
OnChanges
selector | c8y-contents-changelog |
standalone | true |
imports |
LoadingComponent
MarkdownToHtmlPipe
EmptyStateComponent
AsyncPipe
C8yTranslatePipe
NgIf
|
templateUrl | ./package-changelog.component.html |
Properties |
Methods |
|
Inputs |
package |
Type : IApplication
|
previousVersion |
Type : string | null
|
Default value : null
|
selectedVersion |
Type : string
|
Default value : 'latest'
|
Async ngOnChanges |
ngOnChanges()
|
Returns :
any
|
baseUrl |
Type : string
|
changelog |
Type : string
|
isLoading |
Default value : true
|
<c8y-loading *ngIf="isLoading"></c8y-loading>
<ng-container *ngIf="!isLoading">
<div
*ngIf="changelog"
class="markdown-content markdown-content--to-h3"
[innerHTML]="changelog | markdownToHtml: { baseUrl } | async"
></div>
<c8y-ui-empty-state
[icon]="'user-manual'"
[title]="'No CHANGELOG.md found for package version' | translate"
[subtitle]="
'To view the contents of "CHANGELOG", add the file "CHANGELOG.md" to the package.'
| translate
"
*ngIf="!changelog"
[horizontal]="true"
></c8y-ui-empty-state>
</ng-container>