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

geonetwork / geonetwork-ui / 17645154980

11 Sep 2025 12:53PM UTC coverage: 81.779% (-2.6%) from 84.347%
17645154980

Pull #1347

github

web-flow
Merge 2659abd15 into d3eeddaf5
Pull Request #1347: Convert remaining components to standalone

2159 of 3067 branches covered (70.39%)

Branch coverage included in aggregate %.

120 of 121 new or added lines in 51 files covered. (99.17%)

46 existing lines in 12 files now uncovered.

7091 of 8244 relevant lines covered (86.01%)

11.53 hits per line

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

50.0
/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
import { TranslateDirective } from '@ngx-translate/core'
1✔
16

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

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