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

atinc / ngx-tethys / #55

30 Jul 2025 07:08AM UTC coverage: 9.866% (-80.4%) from 90.297%
#55

push

why520crazy
feat(empty): add setMessage for update display text #TINFR-2616

92 of 6794 branches covered (1.35%)

Branch coverage included in aggregate %.

2014 of 14552 relevant lines covered (13.84%)

6.15 hits per line

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

28.57
/src/message/message.component.ts
1
import { Component, Input, HostBinding, NgZone, inject } from '@angular/core';
2
import { trigger, state, style, animate, transition } from '@angular/animations';
3
import { ThyMessageConfig } from './message.config';
4
import { ThyMessageQueue } from './message-queue.service';
5
import { ANIMATION_IN_DURATION, ANIMATION_OUT_DURATION, HIDE_STYLE, ThyAbstractMessageComponent } from './abstract';
6
import { ThyStringOrTemplateOutletDirective } from 'ngx-tethys/shared';
7
import { ThyIcon } from 'ngx-tethys/icon';
8

9
import { coerceArray } from 'ngx-tethys/util';
10
import { useHostRenderer } from '@tethys/cdk/dom';
11

12
/**
13
 * @internal
14
 */
1✔
15
@Component({
16
    selector: 'thy-message',
×
17
    templateUrl: './message.component.html',
×
18
    host: {
×
19
        '[class]': "'thy-message thy-message-' + config.type"
×
20
    },
21
    animations: [
22
        trigger('flyInOut', [
23
            state('flyIn', style({ transform: 'translateY(0)', opacity: 1, height: '*' })),
×
24
            transition('void => flyIn', [
×
25
                style({ transform: 'translateY(-100%)', opacity: 0, height: '*' }),
×
26
                animate(ANIMATION_IN_DURATION)
×
27
            ]),
28
            transition('flyIn => componentHide', [animate(ANIMATION_OUT_DURATION, style(HIDE_STYLE))]),
1✔
29
            state('componentHide', style(HIDE_STYLE))
1✔
30
        ])
31
    ],
32
    imports: [ThyIcon, ThyStringOrTemplateOutletDirective]
33
})
34
export class ThyMessage extends ThyAbstractMessageComponent<ThyMessageConfig> {
1✔
35
    @HostBinding('@flyInOut') animationState = 'flyIn';
36

37
    config: ThyMessageConfig;
38

39
    private hostRenderer = useHostRenderer();
40

41
    @Input()
42
    set thyConfig(value: ThyMessageConfig) {
43
        this.config = value;
44

45
        if (this.config?.hostClass) {
46
            const hostClass = coerceArray(this.config.hostClass);
47
            this.hostRenderer.updateClass(hostClass);
48
        }
49
    }
50

51
    constructor() {
52
        const messageQueue = inject(ThyMessageQueue);
53
        super(messageQueue);
54
    }
55
}
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

© 2025 Coveralls, Inc