• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

geonetwork / geonetwork-ui / 26558849210

28 May 2026 06:33AM UTC coverage: 84.15% (-3.6%) from 87.725%
26558849210

push

github

web-flow
Merge pull request #1572 from geonetwork/contacts-for-resource-panel

[Datahub] Add "Contacts for the resource" expandable panel

1886 of 2595 branches covered (72.68%)

Branch coverage included in aggregate %.

26 of 30 new or added lines in 7 files covered. (86.67%)

8557 of 9815 relevant lines covered (87.18%)

15.11 hits per line

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

57.89
/libs/ui/inputs/src/lib/button/button.component.ts
1
import {
12✔
2
  ChangeDetectionStrategy,
3
  Component,
4
  EventEmitter,
5
  Input,
6
  Output,
7
} from '@angular/core'
8
import { propagateToDocumentOnly } from '@geonetwork-ui/util/shared'
12✔
9

10
@Component({
11
  selector: 'gn-ui-button',
12
  templateUrl: './button.component.html',
13
  styleUrls: ['./button.component.css'],
14
  changeDetection: ChangeDetectionStrategy.OnPush,
15
  standalone: true,
16
})
17
export class ButtonComponent {
12✔
18
  private btnClass = 'gn-ui-btn-default'
77✔
19

20
  @Input() set type(
21
    value:
22
      | 'primary'
23
      | 'secondary'
24
      | 'default'
25
      | 'outline'
26
      | 'light'
27
      | 'gray'
28
      | 'black'
29
      | 'primary-light'
30
  ) {
31
    // btn-classes are written in full to be picked up by tailwind
32
    switch (value) {
76!
33
      case 'primary':
34
        this.btnClass = 'gn-ui-btn-primary'
31✔
35
        break
31✔
36
      case 'secondary':
37
        this.btnClass = 'gn-ui-btn-secondary'
×
38
        break
×
39
      case 'outline':
40
        this.btnClass = 'gn-ui-btn-outline'
39✔
41
        break
39✔
42
      case 'light':
43
        this.btnClass = 'gn-ui-btn-light'
6✔
44
        break
6✔
45
      case 'gray':
46
        this.btnClass = 'gn-ui-btn-gray'
×
47
        break
×
48
      case 'black':
49
        this.btnClass = 'gn-ui-btn-black'
×
50
        break
×
51
      case 'primary-light':
NEW
52
        this.btnClass = 'gn-ui-btn-primary-light'
×
NEW
53
        break
×
54
      case 'default':
55
      default:
56
        this.btnClass = 'gn-ui-btn-default'
×
57
        break
×
58
    }
59
  }
60

61
  @Input() disabled = false
77✔
62
  @Input() extraClass = ''
77✔
63
  @Output() buttonClick = new EventEmitter<Event>()
77✔
64

65
  get classList() {
66
    return `${this.btnClass} ${this.extraClass}`
85✔
67
  }
68

69
  handleClick(event: MouseEvent) {
70
    this.buttonClick.emit(event)
8✔
71
    event.preventDefault()
8✔
72
    ;(event.currentTarget as HTMLElement).blur()
8✔
73
    propagateToDocumentOnly(event)
8✔
74
  }
75
}
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