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

nsf-open / ember-ui-foundation / 3839712737

pending completion
3839712737

push

github

GitHub
chore(deps): update dependency typescript to v4.9.4

1051 of 1271 branches covered (82.69%)

Branch coverage included in aggregate %.

1678 of 1779 relevant lines covered (94.32%)

28.78 hits per line

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

62.5
/addon/components/ui-table/th/component.ts
1
import type UiSorterCriterion from '../../ui-sorter/criterion/component';
2

3
import Component from '@ember/component';
4
import { layout, tagName } from '@ember-decorators/component';
5
import { computed, get } from '@ember/object';
6
import { humanize } from '@nsf-open/ember-general-utils';
7
import template from './template';
8

9
@tagName('')
10
@layout(template)
11
export default class UiTableTh extends Component {
12
  public label?: string;
13

14
  public propertyName?: string;
15

16
  public sortOn?: string;
17

18
  public sortDirection?: string;
19

20
  public subSortOn?: string;
21

22
  public subSortDirection?: string;
23

24
  public description?: string;
25

26
  public colspan?: string | number;
27

28
  public recordSet?: unknown[];
29

30
  public showColumnFilter = false;
9✔
31

32
  protected declare sortCriterion: UiSorterCriterion;
33

34
  @computed('sortOn')
35
  get isSortable() {
36
    return typeof this.sortOn === 'string';
9✔
37
  }
38

39
  @computed('label', 'propertyName')
40
  get displayName() {
41
    return (
9✔
42
      this.label ?? (typeof this.propertyName === 'string' ? humanize(this.propertyName, true) : '')
27!
43
    );
44
  }
45

46
  @computed('recordSet.[]', 'propertyName', 'showColumnFilter')
47
  get uniqueColumnValues() {
48
    if (!(this.showColumnFilter && this.recordSet?.length && this.propertyName)) {
9!
49
      return undefined;
9✔
50
    }
51

52
    return new Set(
×
53
      this.recordSet.map((item) => get(item, this.propertyName as keyof typeof item)).sort()
×
54
    );
55
  }
56
}
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