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

geonetwork / geonetwork-ui / 14360399170

09 Apr 2025 02:56PM UTC coverage: 82.343% (-2.1%) from 84.432%
14360399170

Pull #1198

github

web-flow
Merge 99a07eb2a into 582b4530a
Pull Request #1198: Datahub: Add quick access menu

1879 of 2618 branches covered (71.77%)

Branch coverage included in aggregate %.

51 of 51 new or added lines in 9 files covered. (100.0%)

10 existing lines in 3 files now uncovered.

6212 of 7208 relevant lines covered (86.18%)

10.44 hits per line

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

47.62
/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
import { ButtonComponent } from '../button/button.component'
1✔
15

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

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