@triptyk/ember-yeti-table 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +9 -115
- package/declarations/components/yeti-table/body.d.ts +32 -0
- package/declarations/components/yeti-table/body.d.ts.map +1 -0
- package/declarations/components/yeti-table/header.d.ts +33 -0
- package/declarations/components/yeti-table/header.d.ts.map +1 -0
- package/declarations/components/yeti-table/pagination.d.ts +40 -0
- package/declarations/components/yeti-table/pagination.d.ts.map +1 -0
- package/declarations/components/yeti-table/table.d.ts +21 -0
- package/declarations/components/yeti-table/table.d.ts.map +1 -0
- package/declarations/components/yeti-table/tbody/row/cell.d.ts +44 -0
- package/declarations/components/yeti-table/tbody/row/cell.d.ts.map +1 -0
- package/declarations/components/yeti-table/tbody/row.d.ts +37 -0
- package/declarations/components/yeti-table/tbody/row.d.ts.map +1 -0
- package/declarations/components/yeti-table/tbody.d.ts +29 -0
- package/declarations/components/yeti-table/tbody.d.ts.map +1 -0
- package/declarations/components/yeti-table/tfoot/row/cell.d.ts +40 -0
- package/declarations/components/yeti-table/tfoot/row/cell.d.ts.map +1 -0
- package/declarations/components/yeti-table/tfoot/row.d.ts +37 -0
- package/declarations/components/yeti-table/tfoot/row.d.ts.map +1 -0
- package/declarations/components/yeti-table/tfoot.d.ts +27 -0
- package/declarations/components/yeti-table/tfoot.d.ts.map +1 -0
- package/declarations/components/yeti-table/thead/row/cell.d.ts +54 -0
- package/declarations/components/yeti-table/thead/row/cell.d.ts.map +1 -0
- package/declarations/components/yeti-table/thead/row/column.d.ts +69 -0
- package/declarations/components/yeti-table/thead/row/column.d.ts.map +1 -0
- package/declarations/components/yeti-table/thead/row.d.ts +55 -0
- package/declarations/components/yeti-table/thead/row.d.ts.map +1 -0
- package/declarations/components/yeti-table/thead.d.ts +34 -0
- package/declarations/components/yeti-table/thead.d.ts.map +1 -0
- package/declarations/components/yeti-table.d.ts +107 -0
- package/declarations/components/yeti-table.d.ts.map +1 -0
- package/declarations/index.d.ts +1 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +1 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/declarations/themes/default-theme.d.ts +3 -27
- package/declarations/themes/default-theme.d.ts.map +1 -1
- package/declarations/types.d.ts +82 -0
- package/declarations/types.d.ts.map +1 -0
- package/declarations/utils/create-regex.d.ts +1 -1
- package/declarations/utils/create-regex.d.ts.map +1 -1
- package/declarations/utils/filtering-utils.d.ts +2 -4
- package/declarations/utils/filtering-utils.d.ts.map +1 -1
- package/declarations/utils/sorting-utils.d.ts +6 -15
- package/declarations/utils/sorting-utils.d.ts.map +1 -1
- package/dist/components/yeti-table/body.js +19 -14
- package/dist/components/yeti-table/body.js.map +1 -1
- package/dist/components/yeti-table/header.js +10 -10
- package/dist/components/yeti-table/header.js.map +1 -1
- package/dist/components/yeti-table/pagination.js +14 -44
- package/dist/components/yeti-table/pagination.js.map +1 -1
- package/dist/components/yeti-table/table.js +1 -23
- package/dist/components/yeti-table/table.js.map +1 -1
- package/dist/components/yeti-table/tbody/row/cell.js +12 -12
- package/dist/components/yeti-table/tbody/row/cell.js.map +1 -1
- package/dist/components/yeti-table/tbody/row.js +15 -21
- package/dist/components/yeti-table/tbody/row.js.map +1 -1
- package/dist/components/yeti-table/tbody.js +1 -0
- package/dist/components/yeti-table/tbody.js.map +1 -1
- package/dist/components/yeti-table/tfoot/row/cell.js +9 -9
- package/dist/components/yeti-table/tfoot/row/cell.js.map +1 -1
- package/dist/components/yeti-table/tfoot/row.js +11 -11
- package/dist/components/yeti-table/tfoot/row.js.map +1 -1
- package/dist/components/yeti-table/tfoot.js +1 -0
- package/dist/components/yeti-table/tfoot.js.map +1 -1
- package/dist/components/yeti-table/thead/row/cell.js +11 -8
- package/dist/components/yeti-table/thead/row/cell.js.map +1 -1
- package/dist/components/yeti-table/thead/row/column.js +27 -128
- package/dist/components/yeti-table/thead/row/column.js.map +1 -1
- package/dist/components/yeti-table/thead/row.js +15 -15
- package/dist/components/yeti-table/thead/row.js.map +1 -1
- package/dist/components/yeti-table/thead.js +3 -22
- package/dist/components/yeti-table/thead.js.map +1 -1
- package/dist/components/yeti-table.js +99 -303
- package/dist/components/yeti-table.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/template-registry.js +2 -0
- package/dist/template-registry.js.map +1 -0
- package/dist/themes/default-theme.js +3 -2
- package/dist/themes/default-theme.js.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/create-regex.js +6 -6
- package/dist/utils/create-regex.js.map +1 -1
- package/dist/utils/filtering-utils.js +20 -8
- package/dist/utils/filtering-utils.js.map +1 -1
- package/dist/utils/sorting-utils.js +13 -18
- package/dist/utils/sorting-utils.js.map +1 -1
- package/package.json +37 -16
- package/src/components/yeti-table/{body.gjs → body.gts} +49 -45
- package/src/components/yeti-table/header.gts +67 -0
- package/src/components/yeti-table/pagination.gts +118 -0
- package/src/components/yeti-table/table.gts +27 -0
- package/src/components/yeti-table/tbody/row/{cell.gjs → cell.gts} +38 -19
- package/src/components/yeti-table/tbody/row.gts +76 -0
- package/src/components/yeti-table/tbody.gts +53 -0
- package/src/components/yeti-table/tfoot/row/cell.gts +64 -0
- package/src/components/yeti-table/tfoot/row.gts +59 -0
- package/src/components/yeti-table/tfoot.gts +41 -0
- package/src/components/yeti-table/thead/row/{cell.gjs → cell.gts} +36 -13
- package/src/components/yeti-table/thead/row/column.gts +177 -0
- package/src/components/yeti-table/thead/row.gts +105 -0
- package/src/components/yeti-table/thead.gts +65 -0
- package/src/components/yeti-table.gts +629 -0
- package/src/template-registry.ts +10 -0
- package/src/themes/{default-theme.js → default-theme.ts} +5 -1
- package/src/types.ts +94 -0
- package/src/utils/{create-regex.js → create-regex.ts} +10 -10
- package/src/utils/filtering-utils.ts +91 -0
- package/src/utils/{sorting-utils.js → sorting-utils.ts} +35 -26
- package/dist/_app_/themes/default-theme.js +0 -1
- package/dist/_app_/utils/create-regex.js +0 -1
- package/dist/_app_/utils/filtering-utils.js +0 -1
- package/dist/_app_/utils/sorting-utils.js +0 -1
- package/src/components/yeti-table/header.gjs +0 -54
- package/src/components/yeti-table/pagination.gjs +0 -155
- package/src/components/yeti-table/table.gjs +0 -34
- package/src/components/yeti-table/tbody/row.gjs +0 -89
- package/src/components/yeti-table/tbody.gjs +0 -55
- package/src/components/yeti-table/tfoot/row/cell.gjs +0 -45
- package/src/components/yeti-table/tfoot/row.gjs +0 -44
- package/src/components/yeti-table/tfoot.gjs +0 -33
- package/src/components/yeti-table/thead/row/column.gjs +0 -260
- package/src/components/yeti-table/thead/row.gjs +0 -71
- package/src/components/yeti-table/thead.gjs +0 -45
- package/src/components/yeti-table.gjs +0 -780
- package/src/utils/filtering-utils.js +0 -75
- /package/src/{.gitkeep → index.ts} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type Owner from '@ember/owner';
|
|
3
|
+
import type { ColumnDefinition, FilterFunction, SortDirection, Theme } from '../../../../types.ts';
|
|
4
|
+
/**
|
|
5
|
+
An important component yielded from the header or head.row component that is used to define
|
|
6
|
+
a column of the table.
|
|
7
|
+
|
|
8
|
+
@class Column
|
|
9
|
+
*/
|
|
10
|
+
export interface ColumnParent {
|
|
11
|
+
registerColumn(column: Column): void;
|
|
12
|
+
unregisterColumn(column: Column): void;
|
|
13
|
+
}
|
|
14
|
+
export interface ColumnSignature {
|
|
15
|
+
Element: HTMLTableCellElement;
|
|
16
|
+
Args: {
|
|
17
|
+
class?: string;
|
|
18
|
+
theme?: Theme;
|
|
19
|
+
prop?: string;
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
sortable?: boolean;
|
|
22
|
+
sort?: SortDirection | null;
|
|
23
|
+
sortSequence?: SortDirection[] | string;
|
|
24
|
+
filterable?: boolean;
|
|
25
|
+
filter?: string;
|
|
26
|
+
filterFunction?: FilterFunction;
|
|
27
|
+
filterUsing?: unknown;
|
|
28
|
+
columnClass?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
onClick?: (column: Column, e: MouseEvent) => void;
|
|
31
|
+
parent?: ColumnParent;
|
|
32
|
+
};
|
|
33
|
+
Blocks: {
|
|
34
|
+
default: [
|
|
35
|
+
{
|
|
36
|
+
isSorted: boolean;
|
|
37
|
+
isAscSorted: boolean;
|
|
38
|
+
isDescSorted: boolean;
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export default class Column extends Component<ColumnSignature> implements ColumnDefinition {
|
|
44
|
+
get prop(): string | undefined;
|
|
45
|
+
visible: boolean;
|
|
46
|
+
sortable: boolean;
|
|
47
|
+
sort: SortDirection | null | undefined;
|
|
48
|
+
filterable: boolean;
|
|
49
|
+
get filter(): string | undefined;
|
|
50
|
+
get filterFunction(): FilterFunction | undefined;
|
|
51
|
+
get filterUsing(): unknown;
|
|
52
|
+
get columnClass(): string | undefined;
|
|
53
|
+
name: string | undefined;
|
|
54
|
+
get isAscSorted(): boolean;
|
|
55
|
+
get isDescSorted(): boolean;
|
|
56
|
+
get isSorted(): boolean;
|
|
57
|
+
get normalizedSortSequence(): string[];
|
|
58
|
+
constructor(owner: Owner, args: ColumnSignature['Args']);
|
|
59
|
+
willDestroy(): void;
|
|
60
|
+
updateName: import("ember-modifier").FunctionBasedModifier<{
|
|
61
|
+
Args: {
|
|
62
|
+
Positional: unknown[];
|
|
63
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
64
|
+
};
|
|
65
|
+
Element: Element;
|
|
66
|
+
}>;
|
|
67
|
+
handleClick(e: MouseEvent): void;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../src/components/yeti-table/thead/row/column.gts"],"names":[],"mappings":"AAoLA,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MACnB,SAAQ,SAAS,CAAC,eAAe,CACjC,YAAW,gBAAgB;IAE3B,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAE7B;IAGD,OAAO,EAAG,OAAO,CAAC;IAGlB,QAAQ,EAAG,OAAO,CAAC;IAGnB,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;IAGvC,UAAU,EAAG,OAAO,CAAC;IAErB,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,cAAc,IAAI,cAAc,GAAG,SAAS,CAE/C;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAGD,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzB,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,sBAAsB,IAAI,MAAM,EAAE,CAcrC;gBAEW,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC;IAMvD,WAAW,IAAI,IAAI;IAKnB,UAAU;;;;;;OAIP;IAGH,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CA6BjC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
3
|
+
import Column from './row/column';
|
|
4
|
+
import type { ColumnParent } from './row/column';
|
|
5
|
+
import Cell from './row/cell';
|
|
6
|
+
import type { ColumnDefinition, SortDirection, Theme } from '../../../types.ts';
|
|
7
|
+
/**
|
|
8
|
+
Renders a `<tr>` element and yields the column and cell component.
|
|
9
|
+
```hbs
|
|
10
|
+
<table.thead as |head|>
|
|
11
|
+
<head.row as |row|>
|
|
12
|
+
<row.column @prop="firstName" as |column|>
|
|
13
|
+
First name
|
|
14
|
+
{{if column.isAscSorted "(sorted asc)"}}
|
|
15
|
+
{{if column.isDescSorted "(sorted desc)"}}
|
|
16
|
+
</row.column>
|
|
17
|
+
</head.row>
|
|
18
|
+
</table.thead>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
@class THeadRow
|
|
22
|
+
@yield {Component} column
|
|
23
|
+
@yield {Component} cell
|
|
24
|
+
*/
|
|
25
|
+
interface THeadCellLike {
|
|
26
|
+
prop?: string;
|
|
27
|
+
column?: ColumnDefinition;
|
|
28
|
+
}
|
|
29
|
+
export interface THeadRowSignature {
|
|
30
|
+
Element: HTMLTableRowElement;
|
|
31
|
+
Args: {
|
|
32
|
+
trClass?: string;
|
|
33
|
+
theme?: Theme;
|
|
34
|
+
sortable?: boolean;
|
|
35
|
+
sortSequence?: SortDirection[] | string;
|
|
36
|
+
onColumnClick?: (column: Column, e: MouseEvent) => void;
|
|
37
|
+
columns: ColumnDefinition[];
|
|
38
|
+
parent?: ColumnParent;
|
|
39
|
+
};
|
|
40
|
+
Blocks: {
|
|
41
|
+
default: [
|
|
42
|
+
{
|
|
43
|
+
column: WithBoundArgs<typeof Column, 'sortable' | 'sortSequence' | 'onClick' | 'theme' | 'parent'>;
|
|
44
|
+
cell: WithBoundArgs<typeof Cell, 'theme' | 'parent'>;
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export default class THeadRow extends Component<THeadRowSignature> {
|
|
50
|
+
cells: THeadCellLike[];
|
|
51
|
+
registerCell(cell: THeadCellLike): ColumnDefinition | undefined;
|
|
52
|
+
unregisterCell(cell: THeadCellLike): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../src/components/yeti-table/thead/row.gts"],"names":[],"mappings":"AAyGA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KA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AAG,SAAS;IAkB/D,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;CAuB1C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TemplateOnlyComponent } from '@ember/component/template-only';
|
|
2
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
3
|
+
import THeadRow from './thead/row';
|
|
4
|
+
import type Column from './thead/row/column';
|
|
5
|
+
import type { ColumnParent } from './thead/row/column';
|
|
6
|
+
import type { ColumnDefinition, SortDirection, Theme } from '../../types.ts';
|
|
7
|
+
/**
|
|
8
|
+
Renders a `<thead>` element and yields the row component.
|
|
9
|
+
|
|
10
|
+
@class THead
|
|
11
|
+
@yield {object} head
|
|
12
|
+
@yield {Component} head.row
|
|
13
|
+
*/
|
|
14
|
+
export interface THeadSignature {
|
|
15
|
+
Element: HTMLTableSectionElement;
|
|
16
|
+
Args: {
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
sortable?: boolean;
|
|
19
|
+
sortSequence?: SortDirection[] | string;
|
|
20
|
+
onColumnClick?: (column: Column, e: MouseEvent) => void;
|
|
21
|
+
columns: ColumnDefinition[];
|
|
22
|
+
parent?: ColumnParent;
|
|
23
|
+
};
|
|
24
|
+
Blocks: {
|
|
25
|
+
default: [
|
|
26
|
+
{
|
|
27
|
+
row: WithBoundArgs<typeof THeadRow, 'sortable' | 'sortSequence' | 'onColumnClick' | 'columns' | 'theme' | 'parent'>;
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
declare const THeadComponent: TemplateOnlyComponent<THeadSignature>;
|
|
33
|
+
export default THeadComponent;
|
|
34
|
+
//# sourceMappingURL=thead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["../../../src/components/yeti-table/thead.gts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAI5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;;;;;EAME;AAEF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,uBAAuB,CAAC;IACjC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,YAAY,CAAC,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QACxC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;QACxD,OAAO,EAAE,gBAAgB,EAAE,CAAC;QAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;KACvB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,aAAa,CAChB,OAAO,QAAQ,EACb,UAAU,GACV,cAAc,GACd,eAAe,GACf,SAAS,GACT,OAAO,GACP,QAAQ,CACX,CAAC;aACH;SACF,CAAC;KACH,CAAC;CACH;AAED,QAAA,MAAM,cAAc,EAAE,qBAAqB,CAAC,cAAc,CAcxD,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type Owner from '@ember/owner';
|
|
3
|
+
import Table from './yeti-table/table';
|
|
4
|
+
import HeaderComponent from './yeti-table/header';
|
|
5
|
+
import THead from './yeti-table/thead';
|
|
6
|
+
import Body from './yeti-table/body';
|
|
7
|
+
import TBody from './yeti-table/tbody';
|
|
8
|
+
import TFoot from './yeti-table/tfoot';
|
|
9
|
+
import Pagination from './yeti-table/pagination';
|
|
10
|
+
import type Column from './yeti-table/thead/row/column';
|
|
11
|
+
import type { LoadDataParams, PaginationData, Row, RowFilterFunction, SortDirection, Theme } from '../types.ts';
|
|
12
|
+
import type { Comparator } from '../utils/sorting-utils.ts';
|
|
13
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
14
|
+
export type YetiTableLoadData = (params: LoadDataParams) => Row[] | Promise<Row[]>;
|
|
15
|
+
export interface YetiTableSignature {
|
|
16
|
+
Element: HTMLElement;
|
|
17
|
+
Args: {
|
|
18
|
+
data?: Row[] | Promise<Row[]>;
|
|
19
|
+
loadData?: YetiTableLoadData;
|
|
20
|
+
theme?: Partial<Theme>;
|
|
21
|
+
pagination?: boolean;
|
|
22
|
+
pageSize?: number;
|
|
23
|
+
pageNumber?: number;
|
|
24
|
+
totalRows?: number;
|
|
25
|
+
filter?: string;
|
|
26
|
+
filterFunction?: RowFilterFunction;
|
|
27
|
+
filterUsing?: unknown;
|
|
28
|
+
sortable?: boolean;
|
|
29
|
+
sortFunction?: (itemA: Row, itemB: Row, sorts: {
|
|
30
|
+
prop: string;
|
|
31
|
+
direction: SortDirection;
|
|
32
|
+
}[], compareFn: Comparator) => number;
|
|
33
|
+
compareFunction?: Comparator;
|
|
34
|
+
sortSequence?: SortDirection[] | string;
|
|
35
|
+
ignoreDataChanges?: boolean;
|
|
36
|
+
renderTableElement?: boolean;
|
|
37
|
+
isColumnVisible?: (column: Column) => boolean;
|
|
38
|
+
registerApi?: (api: YetiTable['publicApi']) => void;
|
|
39
|
+
};
|
|
40
|
+
Blocks: {
|
|
41
|
+
default: [
|
|
42
|
+
{
|
|
43
|
+
table: WithBoundArgs<typeof Table, 'theme' | 'parent'>;
|
|
44
|
+
header: WithBoundArgs<typeof HeaderComponent, 'columns' | 'onColumnClick' | 'sortable' | 'sortSequence' | 'parent' | 'theme'>;
|
|
45
|
+
thead: WithBoundArgs<typeof THead, 'columns' | 'onColumnClick' | 'sortable' | 'sortSequence' | 'theme' | 'parent'>;
|
|
46
|
+
body: WithBoundArgs<typeof Body, 'data' | 'columns' | 'theme'>;
|
|
47
|
+
tbody: WithBoundArgs<typeof TBody, 'data' | 'columns' | 'theme'>;
|
|
48
|
+
tfoot: WithBoundArgs<typeof TFoot, 'columns' | 'theme' | 'parent'>;
|
|
49
|
+
pagination: WithBoundArgs<typeof Pagination, 'disabled' | 'theme' | 'paginationData' | 'paginationActions'>;
|
|
50
|
+
actions: YetiTable['publicApi'];
|
|
51
|
+
paginationData: PaginationData;
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
columns: Column[];
|
|
54
|
+
visibleColumns: Column[];
|
|
55
|
+
rows: Row[] | undefined;
|
|
56
|
+
totalRows: number;
|
|
57
|
+
visibleRows: Row[] | undefined;
|
|
58
|
+
theme: Theme;
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export default class YetiTable extends Component<YetiTableSignature> {
|
|
64
|
+
publicApi: {
|
|
65
|
+
previousPage: () => void;
|
|
66
|
+
nextPage: () => void;
|
|
67
|
+
goToPage: (n: number) => void;
|
|
68
|
+
changePageSize: (n: number | string) => void;
|
|
69
|
+
reloadData: () => Promise<unknown>;
|
|
70
|
+
};
|
|
71
|
+
pagination: boolean;
|
|
72
|
+
pageSize: number;
|
|
73
|
+
pageNumber: number;
|
|
74
|
+
totalRows: number | undefined;
|
|
75
|
+
filter: string;
|
|
76
|
+
sortable: boolean;
|
|
77
|
+
sortFunction: YetiTableSignature['Args']['sortFunction'];
|
|
78
|
+
compareFunction: Comparator;
|
|
79
|
+
sortSequence: SortDirection[] | string;
|
|
80
|
+
ignoreDataChanges: boolean;
|
|
81
|
+
renderTableElement: boolean;
|
|
82
|
+
get mergedTheme(): Theme;
|
|
83
|
+
get visibleColumns(): Column[];
|
|
84
|
+
config: Record<string, unknown>;
|
|
85
|
+
get normalizedTotalRows(): number;
|
|
86
|
+
get normalizedRows(): Row[] | undefined;
|
|
87
|
+
get paginationData(): PaginationData;
|
|
88
|
+
columns: Column[];
|
|
89
|
+
previousResolvedData: Row[];
|
|
90
|
+
processedData: Row[] | undefined;
|
|
91
|
+
processedDataRows: Row[] | undefined;
|
|
92
|
+
resolvedData: import("reactiveweb/function").State<Promise<Row[] | undefined>>;
|
|
93
|
+
latestData: Row[];
|
|
94
|
+
constructor(owner: Owner, args: YetiTableSignature['Args']);
|
|
95
|
+
processData(data: Row[]): void;
|
|
96
|
+
computeLoadDataParams(): LoadDataParams;
|
|
97
|
+
paginateData(data: Row[]): Row[];
|
|
98
|
+
reloadData(): Promise<unknown>;
|
|
99
|
+
onColumnSort(column: Column, e: MouseEvent): void;
|
|
100
|
+
previousPage(): void;
|
|
101
|
+
nextPage(): void;
|
|
102
|
+
goToPage(pageNumber: number): void;
|
|
103
|
+
changePageSize(pageSize: number | string): void;
|
|
104
|
+
registerColumn(column: Column): void;
|
|
105
|
+
unregisterColumn(column: Column): void;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=yeti-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yeti-table.d.ts","sourceRoot":"","sources":["../../src/components/yeti-table.gts"],"names":[],"mappings":"AAynBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAkBtC,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,GAAG,EACH,iBAAiB,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AAE,GAAG,GAAG,EAAE;IAU1B,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,GAAG,IAAI;IA6BjD,YAAY,IAAI,IAAI;IAOpB,QAAQ,IAAI,IAAI;IAWhB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAclC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAM/C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAapC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CA4DvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
thead: string;
|
|
5
|
-
theadRow: string;
|
|
6
|
-
theadCell: string;
|
|
7
|
-
tbody: string;
|
|
8
|
-
tbodyRow: string;
|
|
9
|
-
tbodyCell: string;
|
|
10
|
-
tfoot: string;
|
|
11
|
-
tfootRow: string;
|
|
12
|
-
tfootCell: string;
|
|
13
|
-
sorting: {
|
|
14
|
-
columnSortable: string;
|
|
15
|
-
columnSorted: string;
|
|
16
|
-
columnSortedAsc: string;
|
|
17
|
-
columnSortedDesc: string;
|
|
18
|
-
};
|
|
19
|
-
pagination: {
|
|
20
|
-
controls: string;
|
|
21
|
-
info: string;
|
|
22
|
-
pageSize: string;
|
|
23
|
-
next: string;
|
|
24
|
-
previous: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default _default;
|
|
1
|
+
import type { Theme } from '../types.ts';
|
|
2
|
+
declare const defaultTheme: Theme;
|
|
3
|
+
export default defaultTheme;
|
|
28
4
|
//# sourceMappingURL=default-theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-theme.d.ts","sourceRoot":"","sources":["../../src/themes/default-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-theme.d.ts","sourceRoot":"","sources":["../../src/themes/default-theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,QAAA,MAAM,YAAY,EAAE,KAkDnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type SortDirection = 'asc' | 'desc';
|
|
2
|
+
export interface Sort {
|
|
3
|
+
prop: string;
|
|
4
|
+
direction: SortDirection;
|
|
5
|
+
}
|
|
6
|
+
export type FilterFunction = (value: unknown, filterUsing?: unknown) => boolean;
|
|
7
|
+
export type RowFilterFunction = (row: Row, filterUsing?: unknown) => boolean;
|
|
8
|
+
export type Row = Record<string, unknown>;
|
|
9
|
+
export type RowClickHandler = (...args: any[]) => void;
|
|
10
|
+
export interface ColumnDefinition {
|
|
11
|
+
prop?: string;
|
|
12
|
+
filter?: string;
|
|
13
|
+
filterFunction?: FilterFunction;
|
|
14
|
+
filterUsing?: unknown;
|
|
15
|
+
filterable?: boolean;
|
|
16
|
+
sortable?: boolean;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
sort?: SortDirection | null;
|
|
19
|
+
columnClass?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ThemeSorting {
|
|
23
|
+
columnSortable: string;
|
|
24
|
+
columnSorted: string;
|
|
25
|
+
columnSortedAsc: string;
|
|
26
|
+
columnSortedDesc: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ThemePagination {
|
|
29
|
+
controls: string;
|
|
30
|
+
info: string;
|
|
31
|
+
pageSize: string;
|
|
32
|
+
next: string;
|
|
33
|
+
previous: string;
|
|
34
|
+
}
|
|
35
|
+
export interface Theme {
|
|
36
|
+
table: string;
|
|
37
|
+
row: string;
|
|
38
|
+
thead: string;
|
|
39
|
+
theadRow: string;
|
|
40
|
+
theadCell: string;
|
|
41
|
+
tbody: string;
|
|
42
|
+
tbodyRow: string;
|
|
43
|
+
tbodyCell: string;
|
|
44
|
+
tfoot: string;
|
|
45
|
+
tfootRow: string;
|
|
46
|
+
tfootCell: string;
|
|
47
|
+
sorting: ThemeSorting;
|
|
48
|
+
pagination: ThemePagination;
|
|
49
|
+
}
|
|
50
|
+
export interface PaginationData {
|
|
51
|
+
pageSize: number;
|
|
52
|
+
pageNumber: number;
|
|
53
|
+
pageStart: number;
|
|
54
|
+
pageEnd: number;
|
|
55
|
+
isFirstPage: boolean;
|
|
56
|
+
isLastPage?: boolean;
|
|
57
|
+
totalRows?: number;
|
|
58
|
+
totalPages?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface PaginationActions {
|
|
61
|
+
previousPage: () => void;
|
|
62
|
+
nextPage: () => void;
|
|
63
|
+
goToPage: (page: number) => void;
|
|
64
|
+
changePageSize: (size: number | string) => void;
|
|
65
|
+
}
|
|
66
|
+
export interface LoadDataParams {
|
|
67
|
+
paginationData?: PaginationData;
|
|
68
|
+
sortData: Array<{
|
|
69
|
+
prop: string | undefined;
|
|
70
|
+
direction: SortDirection | null | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
filterData: {
|
|
73
|
+
filter: string;
|
|
74
|
+
filterUsing: unknown;
|
|
75
|
+
columnFilters: Array<{
|
|
76
|
+
prop: string | undefined;
|
|
77
|
+
filter: string | undefined;
|
|
78
|
+
filterUsing: unknown;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL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Aa,GAAG,IAAI,GAAG,SAAS,CAAC;KAC7C,CAAC,CAAC;IACH,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,OAAO,CAAC;QACrB,aAAa,EAAE,KAAK,CAAC;YACnB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;YACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;YAC3B,WAAW,EAAE,OAAO,CAAC;SACtB,CAAC,CAAC;KACJ,CAAC;CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function createRegex(search: string, regex?: boolean, smart?: boolean, caseInsensitive?: boolean): RegExp | undefined;
|
|
1
|
+
export default function createRegex(search: string | null | undefined, regex?: boolean, smart?: boolean, caseInsensitive?: boolean): RegExp | undefined;
|
|
2
2
|
//# sourceMappingURL=create-regex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-regex.d.ts","sourceRoot":"","sources":["../../src/utils/create-regex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-regex.d.ts","sourceRoot":"","sources":["../../src/utils/create-regex.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,KAAK,UAAQ,EACb,KAAK,UAAO,EACZ,eAAe,UAAO,GACrB,MAAM,GAAG,SAAS,CA6BpB"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
import type { FilterFunction } from '../components/yeti-table.ts';
|
|
4
|
-
export default function filterData(data: TableData[], columns: Column[], globalFilter: string, filterFunction?: FilterFunction, filterUsing?: string): TableData[];
|
|
1
|
+
import type { ColumnDefinition, Row, RowFilterFunction } from '../types.ts';
|
|
2
|
+
export default function filterData(data: Row[], columns: ColumnDefinition[], globalFilter?: string, filterFunction?: RowFilterFunction, filterUsing?: unknown): Row[];
|
|
5
3
|
//# sourceMappingURL=filtering-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filtering-utils.d.ts","sourceRoot":"","sources":["../../src/utils/filtering-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"filtering-utils.d.ts","sourceRoot":"","sources":["../../src/utils/filtering-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA4C5E,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,EAAE,gBAAgB,EAAE,EAC3B,YAAY,CAAC,EAAE,MAAM,EACrB,cAAc,CAAC,EAAE,iBAAiB,EAClC,WAAW,CAAC,EAAE,OAAO,GACpB,GAAG,EAAE,CAoCP"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type
|
|
3
|
-
export type SortProps = {
|
|
4
|
-
prop?: string;
|
|
5
|
-
direction?: 'asc' | 'desc' | null;
|
|
6
|
-
}[];
|
|
7
|
-
export type SortFunction<T> = (itemA: T, itemB: T, sorts: SortProps, compare: ComparatorFunction<T>) => number;
|
|
1
|
+
import type { Sort } from '../types.ts';
|
|
2
|
+
export type Comparator<T = unknown> = (a: T, b: T) => number;
|
|
8
3
|
/**
|
|
9
4
|
* An implementation of the standard merge sort algorithm.
|
|
10
5
|
*
|
|
@@ -12,13 +7,9 @@ export type SortFunction<T> = (itemA: T, itemB: T, sorts: SortProps, compare: Co
|
|
|
12
7
|
* a general comparator. The built in sort function and Ember's sort functions
|
|
13
8
|
* are not stable, and `_.sortBy` doesn't take a general comparator. Ideally
|
|
14
9
|
* lodash would add a `_.sort` function whose API would mimic this function's.
|
|
15
|
-
*
|
|
16
|
-
* @function
|
|
17
|
-
* @param {Array} array The array to be sorted
|
|
18
|
-
* @param {Comparator} comparator The comparator function to compare elements with.
|
|
19
|
-
* @return {Array} A sorted array
|
|
20
10
|
*/
|
|
21
|
-
export declare function mergeSort<T
|
|
22
|
-
export declare function sortMultiple<T>(itemA: T, itemB: T, sorts:
|
|
23
|
-
export declare function compareValues
|
|
11
|
+
export declare function mergeSort<T>(array: T[], comparator?: Comparator<T>): T[];
|
|
12
|
+
export declare function sortMultiple<T>(itemA: T, itemB: T, sorts: Sort[], compareFn: Comparator): number;
|
|
13
|
+
export declare function compareValues(itemA: unknown, itemB: unknown): number;
|
|
14
|
+
export default compareValues;
|
|
24
15
|
//# sourceMappingURL=sorting-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sorting-utils.d.ts","sourceRoot":"","sources":["../../src/utils/sorting-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sorting-utils.d.ts","sourceRoot":"","sources":["../../src/utils/sorting-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AA8B7D;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,CAAC,EAAE,EACV,UAAU,GAAE,UAAU,CAAC,CAAC,CAAW,GAClC,CAAC,EAAE,CAUL;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,IAAI,EAAE,EACb,SAAS,EAAE,UAAU,GACpB,MAAM,CAkBR;AA2BD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAMpE;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -7,8 +7,26 @@ import { setComponentTemplate } from '@ember/component';
|
|
|
7
7
|
import { n } from 'decorator-transforms/runtime-esm';
|
|
8
8
|
|
|
9
9
|
class Body extends Component {
|
|
10
|
+
handleRowClick(rowData) {
|
|
11
|
+
this.args.onRowClick?.(rowData);
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
n(this.prototype, "handleRowClick", [action]);
|
|
15
|
+
}
|
|
16
|
+
asContent = value => {
|
|
17
|
+
if (value == null) return '';
|
|
18
|
+
if (typeof value === 'string') return value;
|
|
19
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
20
|
+
return String(value);
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
return JSON.stringify(value);
|
|
24
|
+
} catch {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
10
28
|
static {
|
|
11
|
-
setComponentTemplate(precompileTemplate("<tbody class={{@theme.tbody}} ...attributes>\n {{#if (has-block)}}\n\n {{#each @data as |rowData index|}}\n {{yield (hash row=(component TBodyRow theme=@theme onClick=@onRowClick columns=@columns)) rowData index}}\n {{/each}}\n\n {{else}}\n\n {{#each @data as |rowData|}}\n <TBodyRow @theme={{@theme}} @onClick={{if @onRowClick (fn this.handleRowClick rowData)}} @columns={{@columns}} as |row|>\n\n {{#each @columns as |column|}}\n <row.cell @class={{column.columnClass}}>\n {{#if column.prop}}\n {{get rowData column.prop}}\n {{else}}\n {{rowData}}\n {{/if}}\n </row.cell>\n {{/each}}\n </TBodyRow>\n {{/each}}\n {{/if}}\n</tbody>", {
|
|
29
|
+
setComponentTemplate(precompileTemplate("<tbody class={{@theme.tbody}} ...attributes>\n {{#if (has-block)}}\n\n {{#each @data as |rowData index|}}\n {{yield (hash row=(component TBodyRow theme=@theme onClick=@onRowClick columns=@columns)) rowData index}}\n {{/each}}\n\n {{else}}\n\n {{#each @data as |rowData|}}\n <TBodyRow @theme={{@theme}} @onClick={{if @onRowClick (fn this.handleRowClick rowData)}} @columns={{@columns}} as |row|>\n\n {{#each @columns as |column|}}\n <row.cell @class={{column.columnClass}}>\n {{#if column.prop}}\n {{this.asContent (get rowData column.prop)}}\n {{else}}\n {{this.asContent rowData}}\n {{/if}}\n </row.cell>\n {{/each}}\n </TBodyRow>\n {{/each}}\n {{/if}}\n</tbody>", {
|
|
12
30
|
strictMode: true,
|
|
13
31
|
scope: () => ({
|
|
14
32
|
hash,
|
|
@@ -18,19 +36,6 @@ class Body extends Component {
|
|
|
18
36
|
})
|
|
19
37
|
}), this);
|
|
20
38
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Adds a click action to each row, called with the clicked row's data as an argument.
|
|
23
|
-
* Can be used with both the blockless and block invocations.
|
|
24
|
-
*
|
|
25
|
-
* @argument onRowClick
|
|
26
|
-
* @type Function
|
|
27
|
-
*/
|
|
28
|
-
handleRowClick(rowData) {
|
|
29
|
-
this.args.onRowClick?.(rowData);
|
|
30
|
-
}
|
|
31
|
-
static {
|
|
32
|
-
n(this.prototype, "handleRowClick", [action]);
|
|
33
|
-
}
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
export { Body as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":["../../../src/components/yeti-table/body.
|
|
1
|
+
{"version":3,"file":"body.js","sources":["../../../src/components/yeti-table/body.gts"],"sourcesContent":["import { action } from '@ember/object';\nimport Component from '@glimmer/component';\n\nimport { fn, get, hash } from '@ember/helper';\n\nimport type { WithBoundArgs } from '@glint/template';\n\nimport TBodyRow from './tbody/row.gts';\nimport type {\n ColumnDefinition,\n Row,\n RowClickHandler,\n Theme,\n} from '../../types.ts';\n\n/**\n Renders a `<tbody>` element and yields the row component, row data and index.\n\n @class Body\n*/\n\nexport interface BodySignature {\n Element: HTMLTableSectionElement;\n Args: {\n theme?: Theme;\n data?: Row[];\n columns?: ColumnDefinition[];\n onRowClick?: RowClickHandler;\n };\n Blocks: {\n default: [\n { row: WithBoundArgs<typeof TBodyRow, 'theme' | 'onClick' | 'columns'> },\n Row,\n number,\n ];\n };\n}\n\nexport default class Body extends Component<BodySignature> {\n @action\n handleRowClick(rowData: Row): void {\n this.args.onRowClick?.(rowData);\n }\n\n asContent = (value: unknown): string => {\n if (value == null) return '';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n try {\n return JSON.stringify(value);\n } catch {\n return '';\n }\n };\n\n <template>\n <tbody class={{@theme.tbody}} ...attributes>\n {{#if (has-block)}}\n\n {{#each @data as |rowData index|}}\n {{yield\n (hash\n row=(component\n TBodyRow theme=@theme onClick=@onRowClick columns=@columns\n )\n )\n rowData\n index\n }}\n {{/each}}\n\n {{else}}\n\n {{#each @data as |rowData|}}\n <TBodyRow\n @theme={{@theme}}\n @onClick={{if @onRowClick (fn this.handleRowClick rowData)}}\n @columns={{@columns}}\n as |row|\n >\n\n {{#each @columns as |column|}}\n <row.cell @class={{column.columnClass}}>\n {{#if column.prop}}\n {{this.asContent (get rowData column.prop)}}\n {{else}}\n {{this.asContent rowData}}\n {{/if}}\n </row.cell>\n {{/each}}\n </TBodyRow>\n {{/each}}\n {{/if}}\n </tbody>\n </template>\n}\n"],"names":["Body","Component","handleRowClick","rowData","args","onRowClick","n","prototype","action","asContent","value","String","JSON","stringify","setComponentTemplate","precompileTemplate","strictMode","scope","hash","TBodyRow","fn","get"],"mappings":";;;;;;;;AAsCe,MAAMA,aAAaC,SAAA,CAAU;EAE1CC,cAAAA,CAAeC,OAAY,EAAQ;AACjC,IAAA,IAAI,CAACC,IAAI,CAACC,UAAU,GAAGF,OAAA,CAAA;AACzB,EAAA;AAAA,EAAA;IAAAG,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CAHCC,MAAA,CAAA,CAAA;AAAA;EAKDC,SAAA,GAAaC,KAAc,IAAS;AAClC,IAAA,IAAIA,KAAA,IAAS,MAAM,OAAO,EAAA;AAC1B,IAAA,IAAI,OAAOA,KAAA,KAAU,QAAA,EAAU,OAAOA,KAAA;IACtC,IAAI,OAAOA,KAAA,KAAU,QAAA,IAAY,OAAOA,UAAU,SAAA,EAAW;MAC3D,OAAOC,MAAA,CAAOD,KAAA,CAAA;AAChB,IAAA;IACA,IAAI;AACF,MAAA,OAAOE,IAAA,CAAKC,SAAS,CAACH,KAAA,CAAA;AACxB,IAAA,CAAA,CAAE,MAAM;AACN,MAAA,OAAO,EAAA;AACT,IAAA;EACF,CAAA;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,kxBAAA,EAuCA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;QAAAC,QAAA;QAAAC,EAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { action } from '@ember/object';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
|
-
import Column from './thead/row/column.js';
|
|
4
3
|
import { hash } from '@ember/helper';
|
|
4
|
+
import Column from './thead/row/column.js';
|
|
5
5
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
6
6
|
import { setComponentTemplate } from '@ember/component';
|
|
7
7
|
import { n } from 'decorator-transforms/runtime-esm';
|
|
8
8
|
|
|
9
9
|
class Header extends Component {
|
|
10
|
-
static {
|
|
11
|
-
setComponentTemplate(precompileTemplate("<thead class={{@theme.thead}} ...attributes>\n <tr class=\"{{@trClass}} {{@theme.theadRow}} {{@theme.row}}\">\n {{yield (hash column=(component THead sortable=@sortable sortSequence=@sortSequence onClick=this.onColumnClickHeader parent=@parent theme=@theme))}}\n </tr>\n</thead>", {
|
|
12
|
-
strictMode: true,
|
|
13
|
-
scope: () => ({
|
|
14
|
-
hash,
|
|
15
|
-
THead: Column
|
|
16
|
-
})
|
|
17
|
-
}), this);
|
|
18
|
-
}
|
|
19
10
|
onColumnClickHeader(column, e) {
|
|
20
11
|
if (this.args.onColumnClick && column.sortable) {
|
|
21
12
|
this.args.onColumnClick(column, e);
|
|
@@ -24,6 +15,15 @@ class Header extends Component {
|
|
|
24
15
|
static {
|
|
25
16
|
n(this.prototype, "onColumnClickHeader", [action]);
|
|
26
17
|
}
|
|
18
|
+
static {
|
|
19
|
+
setComponentTemplate(precompileTemplate("<thead class={{@theme.thead}} ...attributes>\n <tr class=\"{{@trClass}} {{@theme.theadRow}} {{@theme.row}}\">\n {{yield (hash column=(component Column sortable=@sortable sortSequence=@sortSequence onClick=this.onColumnClickHeader parent=@parent theme=@theme))}}\n </tr>\n</thead>", {
|
|
20
|
+
strictMode: true,
|
|
21
|
+
scope: () => ({
|
|
22
|
+
hash,
|
|
23
|
+
Column
|
|
24
|
+
})
|
|
25
|
+
}), this);
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { Header as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../src/components/yeti-table/header.
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../src/components/yeti-table/header.gts"],"sourcesContent":["import { action } from '@ember/object';\nimport Component from '@glimmer/component';\n\nimport { hash } from '@ember/helper';\n\nimport type { WithBoundArgs } from '@glint/template';\n\nimport Column from './thead/row/column.gts';\nimport type { ColumnParent } from './thead/row/column.gts';\nimport type { ColumnDefinition, SortDirection, Theme } from '../../types.ts';\n\n/**\n Renders a `<thead>` element and yields the column component.\n\n @class Header\n*/\n\nexport interface HeaderSignature {\n Element: HTMLTableSectionElement;\n Args: {\n trClass?: string;\n theme?: Theme;\n sortable?: boolean;\n sortSequence?: SortDirection[] | string;\n columns?: ColumnDefinition[];\n onColumnClick?: (column: Column, e: MouseEvent) => void;\n parent?: ColumnParent;\n };\n Blocks: {\n default: [\n {\n column: WithBoundArgs<\n typeof Column,\n 'sortable' | 'sortSequence' | 'onClick' | 'parent' | 'theme'\n >;\n },\n ];\n };\n}\n\nexport default class Header extends Component<HeaderSignature> {\n @action\n onColumnClickHeader(column: Column, e: MouseEvent): void {\n if (this.args.onColumnClick && column.sortable) {\n this.args.onColumnClick(column, e);\n }\n }\n\n <template>\n <thead class={{@theme.thead}} ...attributes>\n <tr class=\"{{@trClass}} {{@theme.theadRow}} {{@theme.row}}\">\n {{yield\n (hash\n column=(component\n Column\n sortable=@sortable\n sortSequence=@sortSequence\n onClick=this.onColumnClickHeader\n parent=@parent\n theme=@theme\n )\n )\n }}\n </tr>\n </thead>\n </template>\n}\n"],"names":["Header","Component","onColumnClickHeader","column","e","args","onColumnClick","sortable","n","prototype","action","setComponentTemplate","precompileTemplate","strictMode","scope","hash","Column"],"mappings":";;;;;;;;AAwCe,MAAMA,eAAeC,SAAA,CAAU;AAE5CC,EAAAA,mBAAAA,CAAoBC,MAAc,EAAEC,CAAa,EAAQ;IACvD,IAAI,IAAI,CAACC,IAAI,CAACC,aAAa,IAAIH,MAAA,CAAOI,QAAQ,EAAE;MAC9C,IAAI,CAACF,IAAI,CAACC,aAAa,CAACH,MAAA,EAAQC,CAAA,CAAA;AAClC,IAAA;AACF,EAAA;AAAA,EAAA;IAAAI,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,qBAAA,EAAA,CALCC,MAAA,CAAA,CAAA;AAAA;AAOD,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,8RAAA,EAiBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|