• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geonetwork / geonetwork-ui / 11516117983

25 Oct 2024 10:02AM UTC coverage: 83.955% (+0.4%) from 83.538%
11516117983

push

github

web-flow
Merge pull request #1020 from geonetwork/migrate-ng-icons

[Technical debt] Migration to ng-icons

3201 of 4294 branches covered (74.55%)

Branch coverage included in aggregate %.

70 of 74 new or added lines in 32 files covered. (94.59%)

1 existing line in 1 file now uncovered.

9053 of 10302 relevant lines covered (87.88%)

294.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/libs/ui/elements/src/lib/notification/notification.component.ts
1
import {
1✔
2
  ChangeDetectionStrategy,
3
  Component,
4
  EventEmitter,
5
  Input,
6
  Output,
7
} from '@angular/core'
8
import { CommonModule } from '@angular/common'
1✔
9
import { ButtonComponent } from '@geonetwork-ui/ui/inputs'
1✔
10
import { NgIconComponent, provideIcons } from '@ng-icons/core'
1✔
11
import { matCheckCircleOutline } from '@ng-icons/material-icons/baseline'
1✔
12
import {
1✔
13
  matErrorOutlineOutline,
14
  matWarningAmberOutline,
15
  matInfoOutline,
16
  matCloseOutline,
17
} from '@ng-icons/material-icons/outline'
18

19
@Component({
20
  selector: 'gn-ui-notification',
21
  standalone: true,
22
  imports: [CommonModule, ButtonComponent, NgIconComponent],
23
  providers: [
24
    provideIcons({
25
      matCheckCircleOutline,
26
      matErrorOutlineOutline,
27
      matWarningAmberOutline,
28
      matInfoOutline,
29
      matCloseOutline,
30
    }),
31
  ],
32
  templateUrl: './notification.component.html',
33
  styleUrls: ['./notification.component.css'],
34
  changeDetection: ChangeDetectionStrategy.OnPush,
35
})
36
export class NotificationComponent {
1✔
37
  @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info'
1✔
38
  @Input() title: string
39
  @Input() text: string
40
  @Input() closeMessage?: string
41
  @Output() notificationClose = new EventEmitter<void>()
1✔
42

43
  handleClose(event?: Event) {
44
    event?.preventDefault()
×
45
    this.notificationClose.emit()
×
46
  }
47

48
  getIconName(type: string): string {
49
    switch (type) {
1!
50
      case 'success':
NEW
51
        return 'matCheckCircleOutline'
×
52
      case 'info':
53
        return 'matInfoOutline'
1✔
54
      case 'warning':
NEW
55
        return 'matWarningAmberOutline'
×
56
      case 'error':
NEW
57
        return 'matErrorOutlineOutline'
×
58
      default:
NEW
59
        return ''
×
60
    }
61
  }
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc