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

geonetwork / geonetwork-ui / 14239475405

03 Apr 2025 09:19AM UTC coverage: 82.101% (-2.2%) from 84.313%
14239475405

Pull #1198

github

web-flow
Merge 35f455e1d into 4fa0a0afc
Pull Request #1198: Datahub: Add quick access menu

1855 of 2592 branches covered (71.57%)

Branch coverage included in aggregate %.

47 of 50 new or added lines in 7 files covered. (94.0%)

9 existing lines in 4 files now uncovered.

6140 of 7146 relevant lines covered (85.92%)

10.07 hits per line

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

42.11
/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts
1
import {
1✔
2
  ChangeDetectionStrategy,
3
  Component,
4
  ElementRef,
5
  EventEmitter,
6
  Input,
7
  Output,
8
  ViewChild,
9
} from '@angular/core'
10
import { propagateToDocumentOnly } from '@geonetwork-ui/util/shared'
1✔
11
import { NgIcon, provideIcons } from '@ng-icons/core'
1✔
12
import { CommonModule } from '@angular/common'
1✔
13
import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
1✔
14

15
@Component({
16
  selector: 'gn-ui-star-toggle',
17
  templateUrl: './star-toggle.component.html',
18
  styleUrls: ['./star-toggle.component.css'],
19
  changeDetection: ChangeDetectionStrategy.OnPush,
20
  standalone: true,
21
  imports: [CommonModule, NgIcon],
22
  viewProviders: [provideIcons({ matStar, matStarBorder })],
23
})
24
export class StarToggleComponent {
1✔
25
  @Input() toggled!: boolean
26
  @Input() disabled = false
1✔
27
  @Output() newValue = new EventEmitter<boolean>()
1✔
28
  @ViewChild('starOverlay') overlay: ElementRef
29

30
  toggle(event: Event) {
UNCOV
31
    if (!this.disabled) {
×
32
      this.toggled = !this.toggled
×
33
      if (this.toggled) {
×
34
        const anim = this.overlay.nativeElement.getAnimations()[0]
×
35
        anim.cancel()
×
36
        anim.play()
×
37
      }
UNCOV
38
      this.newValue.emit(this.toggled)
×
39
    }
UNCOV
40
    propagateToDocumentOnly(event)
×
41
    event.preventDefault()
×
42
  }
43
}
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