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

atinc / ngx-tethys / #71

06 Aug 2025 02:34AM UTC coverage: 9.672% (-80.6%) from 90.298%
#71

push

web-flow
feat(date-picker): add dateCellRender #TINFR-2386 (#3495) (#3499)

104 of 6813 branches covered (1.53%)

Branch coverage included in aggregate %.

5 of 5 new or added lines in 1 file covered. (100.0%)

11855 existing lines in 343 files now uncovered.

1969 of 14620 relevant lines covered (13.47%)

6.13 hits per line

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

90.91
/src/date-picker/lib/date/date-table-cell.component.ts
1
import { isEmpty, isFunction, isString, isTemplateRef, isUndefinedOrNull } from 'ngx-tethys/util';
2

3
import { Component, computed, inject, input } from '@angular/core';
4

5
import { NgTemplateOutlet } from '@angular/common';
6
import { ThyDatePickerConfigService } from '../../date-picker.service';
7
import { DateCell } from './types';
8

9
/**
10
 * @private
11
 */
1✔
12
@Component({
13
    // eslint-disable-next-line @angular-eslint/component-selector
5✔
14
    selector: '[date-table-cell]',
5✔
15
    exportAs: 'dateTableCell',
5✔
16
    templateUrl: './date-table-cell.component.html',
6✔
17
    imports: [NgTemplateOutlet]
5✔
18
})
2✔
19
export class DateTableCell {
2!
UNCOV
20
    isTemplateRef = isTemplateRef;
×
21

22
    readonly prefixCls = input<'thy-calendar' | 'thy-calendar-full'>();
2✔
23

2✔
24
    readonly cell = input<DateCell>();
25

5✔
26
    isNonEmptyString = (v: any) => isEmpty(v) && isString(v);
5✔
27

1✔
28
    functionRenderResult = computed(() => {
29
        const renderFn = this.cellRender();
30
        if (!isFunction(renderFn)) {
1✔
31
            return false;
32
        }
33

34
        const result = renderFn(this.cell().value);
35
        return !isUndefinedOrNull(result);
1✔
36
    });
37

38
    datePickerConfigService = inject(ThyDatePickerConfigService);
39

40
    cellRender = computed(() => {
41
        return this.cell()?.dateCellRender || this.datePickerConfigService.config?.dateCellRender;
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

© 2025 Coveralls, Inc