@oscarpalmer/tabela 0.2.0 → 0.4.0

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.
Files changed (45) hide show
  1. package/dist/components/body.component.cjs +40 -8
  2. package/dist/components/body.component.js +40 -8
  3. package/dist/components/column.component.cjs +1 -1
  4. package/dist/components/column.component.js +1 -1
  5. package/dist/components/footer.component.cjs +15 -9
  6. package/dist/components/footer.component.js +15 -9
  7. package/dist/components/header.component.cjs +9 -6
  8. package/dist/components/header.component.js +9 -6
  9. package/dist/components/row.component.cjs +20 -8
  10. package/dist/components/row.component.js +21 -9
  11. package/dist/helpers/dom.helpers.cjs +10 -3
  12. package/dist/helpers/dom.helpers.js +10 -3
  13. package/dist/managers/virtualization.manager.cjs +88 -0
  14. package/dist/managers/virtualization.manager.js +88 -0
  15. package/dist/tabela.cjs +19 -1
  16. package/dist/tabela.js +19 -1
  17. package/package.json +7 -7
  18. package/src/components/body.component.ts +59 -9
  19. package/src/components/column.component.ts +1 -1
  20. package/src/components/footer.component.ts +22 -9
  21. package/src/components/header.component.ts +15 -6
  22. package/src/components/row.component.ts +31 -11
  23. package/src/helpers/dom.helpers.ts +12 -3
  24. package/src/managers/virtualization.manager.ts +123 -0
  25. package/src/tabela.ts +39 -15
  26. package/types/components/body.component.d.cts +56 -31
  27. package/types/components/body.component.d.ts +11 -2
  28. package/types/components/column.component.d.cts +56 -31
  29. package/types/components/footer.component.d.cts +56 -31
  30. package/types/components/footer.component.d.ts +8 -3
  31. package/types/components/header.component.d.cts +56 -31
  32. package/types/components/header.component.d.ts +7 -2
  33. package/types/components/row.component.d.cts +56 -31
  34. package/types/components/row.component.d.ts +4 -3
  35. package/types/helpers/dom.helpers.d.cts +2 -2
  36. package/types/helpers/dom.helpers.d.ts +2 -2
  37. package/types/index.d.cts +56 -31
  38. package/types/{components/cell.component.d.cts → managers/virtualization.manager.d.cts} +56 -31
  39. package/types/managers/virtualization.manager.d.ts +16 -0
  40. package/types/tabela.d.cts +56 -31
  41. package/types/tabela.d.ts +2 -1
  42. package/dist/components/cell.component.cjs +0 -17
  43. package/dist/components/cell.component.js +0 -17
  44. package/src/components/cell.component.ts +0 -18
  45. package/types/components/cell.component.d.ts +0 -10
@@ -2,6 +2,54 @@
2
2
 
3
3
  import { PlainObject } from '@oscarpalmer/atoms/models';
4
4
 
5
+ export type ElementPool = {
6
+ cells: Record<string, HTMLDivElement[]>;
7
+ rows: HTMLDivElement[];
8
+ };
9
+ declare class VirtualizationManager {
10
+ private readonly body;
11
+ private active;
12
+ private readonly pool;
13
+ private top;
14
+ private readonly visible;
15
+ constructor(body: BodyComponent);
16
+ destroy(): void;
17
+ update(down: boolean): void;
18
+ private onScroll;
19
+ }
20
+ declare class RowComponent {
21
+ readonly tabela: Tabela;
22
+ readonly data: PlainObject;
23
+ element: HTMLDivElement | undefined;
24
+ constructor(tabela: Tabela, data: PlainObject);
25
+ remove(pool: ElementPool): void;
26
+ render(pool: ElementPool): void;
27
+ }
28
+ export type Elements = {
29
+ faker: HTMLDivElement;
30
+ group: HTMLDivElement;
31
+ };
32
+ declare class BodyComponent {
33
+ readonly tabela: Tabela;
34
+ readonly elements: Elements;
35
+ readonly rows: RowComponent[];
36
+ readonly virtualization: VirtualizationManager;
37
+ constructor(tabela: Tabela);
38
+ addData(data: PlainObject[]): Promise<void>;
39
+ destroy(): void;
40
+ private updateVirtualization;
41
+ }
42
+ type Elements$1 = {
43
+ cells: HTMLDivElement[];
44
+ group: HTMLDivElement;
45
+ row: HTMLDivElement;
46
+ };
47
+ declare class FooterComponent {
48
+ readonly tabela: Tabela;
49
+ readonly elements: Elements$1;
50
+ constructor(tabela: Tabela);
51
+ destroy(): void;
52
+ }
5
53
  export type TabelaColumn = {
6
54
  field: string;
7
55
  title: string;
@@ -21,40 +69,16 @@ export declare class ColumnComponent {
21
69
  readonly options: TabelaColumn;
22
70
  constructor(tabela: Tabela, options: TabelaColumnOptions);
23
71
  }
24
- declare class CellComponent {
25
- readonly tabela: Tabela;
26
- readonly column: ColumnComponent;
27
- readonly row: RowComponent;
28
- readonly element: HTMLDivElement;
29
- constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
30
- }
31
- declare class RowComponent {
32
- readonly tabela: Tabela;
33
- readonly data: PlainObject;
34
- readonly cells: CellComponent[];
35
- readonly element: HTMLDivElement;
36
- constructor(tabela: Tabela, data: PlainObject);
37
- }
38
- declare class BodyComponent {
39
- readonly tabela: Tabela;
40
- readonly group: HTMLDivElement;
41
- readonly rows: RowComponent[];
42
- constructor(tabela: Tabela);
43
- addData(data: PlainObject[]): void;
44
- }
45
- declare class FooterComponent {
46
- readonly tabela: Tabela;
47
- readonly cells: HTMLDivElement[];
48
- readonly group: HTMLDivElement;
49
- readonly row: HTMLDivElement;
50
- constructor(tabela: Tabela);
51
- }
72
+ type Elements$2 = {
73
+ group: HTMLDivElement;
74
+ row: HTMLDivElement;
75
+ };
52
76
  declare class HeaderComponent {
53
77
  readonly tabela: Tabela;
54
78
  readonly columns: ColumnComponent[];
55
- readonly group: HTMLDivElement;
56
- readonly row: HTMLDivElement;
79
+ readonly elements: Elements$2;
57
80
  constructor(tabela: Tabela);
81
+ destroy(): void;
58
82
  }
59
83
  export type TabelaOptions = {
60
84
  columns: TabelaColumnOptions[];
@@ -62,12 +86,13 @@ export type TabelaOptions = {
62
86
  label: string;
63
87
  };
64
88
  declare class Tabela {
65
- readonly element: HTMLElement;
89
+ element: HTMLElement;
66
90
  readonly options: TabelaOptions;
67
91
  readonly body: BodyComponent;
68
92
  readonly footer: FooterComponent;
69
93
  readonly header: HeaderComponent;
70
94
  constructor(element: HTMLElement, options: TabelaOptions);
95
+ destroy(): void;
71
96
  }
72
97
 
73
98
  export {};
@@ -2,6 +2,54 @@
2
2
 
3
3
  import { PlainObject } from '@oscarpalmer/atoms/models';
4
4
 
5
+ export type ElementPool = {
6
+ cells: Record<string, HTMLDivElement[]>;
7
+ rows: HTMLDivElement[];
8
+ };
9
+ declare class VirtualizationManager {
10
+ private readonly body;
11
+ private active;
12
+ private readonly pool;
13
+ private top;
14
+ private readonly visible;
15
+ constructor(body: BodyComponent);
16
+ destroy(): void;
17
+ update(down: boolean): void;
18
+ private onScroll;
19
+ }
20
+ declare class RowComponent {
21
+ readonly tabela: Tabela;
22
+ readonly data: PlainObject;
23
+ element: HTMLDivElement | undefined;
24
+ constructor(tabela: Tabela, data: PlainObject);
25
+ remove(pool: ElementPool): void;
26
+ render(pool: ElementPool): void;
27
+ }
28
+ export type Elements = {
29
+ faker: HTMLDivElement;
30
+ group: HTMLDivElement;
31
+ };
32
+ declare class BodyComponent {
33
+ readonly tabela: Tabela;
34
+ readonly elements: Elements;
35
+ readonly rows: RowComponent[];
36
+ readonly virtualization: VirtualizationManager;
37
+ constructor(tabela: Tabela);
38
+ addData(data: PlainObject[]): Promise<void>;
39
+ destroy(): void;
40
+ private updateVirtualization;
41
+ }
42
+ type Elements$1 = {
43
+ cells: HTMLDivElement[];
44
+ group: HTMLDivElement;
45
+ row: HTMLDivElement;
46
+ };
47
+ export declare class FooterComponent {
48
+ readonly tabela: Tabela;
49
+ readonly elements: Elements$1;
50
+ constructor(tabela: Tabela);
51
+ destroy(): void;
52
+ }
5
53
  export type TabelaColumn = {
6
54
  field: string;
7
55
  title: string;
@@ -21,40 +69,16 @@ declare class ColumnComponent {
21
69
  readonly options: TabelaColumn;
22
70
  constructor(tabela: Tabela, options: TabelaColumnOptions);
23
71
  }
24
- declare class CellComponent {
25
- readonly tabela: Tabela;
26
- readonly column: ColumnComponent;
27
- readonly row: RowComponent;
28
- readonly element: HTMLDivElement;
29
- constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
30
- }
31
- declare class RowComponent {
32
- readonly tabela: Tabela;
33
- readonly data: PlainObject;
34
- readonly cells: CellComponent[];
35
- readonly element: HTMLDivElement;
36
- constructor(tabela: Tabela, data: PlainObject);
37
- }
38
- declare class BodyComponent {
39
- readonly tabela: Tabela;
40
- readonly group: HTMLDivElement;
41
- readonly rows: RowComponent[];
42
- constructor(tabela: Tabela);
43
- addData(data: PlainObject[]): void;
44
- }
45
- export declare class FooterComponent {
46
- readonly tabela: Tabela;
47
- readonly cells: HTMLDivElement[];
48
- readonly group: HTMLDivElement;
49
- readonly row: HTMLDivElement;
50
- constructor(tabela: Tabela);
51
- }
72
+ type Elements$2 = {
73
+ group: HTMLDivElement;
74
+ row: HTMLDivElement;
75
+ };
52
76
  declare class HeaderComponent {
53
77
  readonly tabela: Tabela;
54
78
  readonly columns: ColumnComponent[];
55
- readonly group: HTMLDivElement;
56
- readonly row: HTMLDivElement;
79
+ readonly elements: Elements$2;
57
80
  constructor(tabela: Tabela);
81
+ destroy(): void;
58
82
  }
59
83
  export type TabelaOptions = {
60
84
  columns: TabelaColumnOptions[];
@@ -62,12 +86,13 @@ export type TabelaOptions = {
62
86
  label: string;
63
87
  };
64
88
  declare class Tabela {
65
- readonly element: HTMLElement;
89
+ element: HTMLElement;
66
90
  readonly options: TabelaOptions;
67
91
  readonly body: BodyComponent;
68
92
  readonly footer: FooterComponent;
69
93
  readonly header: HeaderComponent;
70
94
  constructor(element: HTMLElement, options: TabelaOptions);
95
+ destroy(): void;
71
96
  }
72
97
 
73
98
  export {};
@@ -1,8 +1,13 @@
1
1
  import type { Tabela } from '../tabela';
2
+ type Elements = {
3
+ cells: HTMLDivElement[];
4
+ group: HTMLDivElement;
5
+ row: HTMLDivElement;
6
+ };
2
7
  export declare class FooterComponent {
3
8
  readonly tabela: Tabela;
4
- readonly cells: HTMLDivElement[];
5
- readonly group: HTMLDivElement;
6
- readonly row: HTMLDivElement;
9
+ readonly elements: Elements;
7
10
  constructor(tabela: Tabela);
11
+ destroy(): void;
8
12
  }
13
+ export {};
@@ -2,6 +2,54 @@
2
2
 
3
3
  import { PlainObject } from '@oscarpalmer/atoms/models';
4
4
 
5
+ export type ElementPool = {
6
+ cells: Record<string, HTMLDivElement[]>;
7
+ rows: HTMLDivElement[];
8
+ };
9
+ declare class VirtualizationManager {
10
+ private readonly body;
11
+ private active;
12
+ private readonly pool;
13
+ private top;
14
+ private readonly visible;
15
+ constructor(body: BodyComponent);
16
+ destroy(): void;
17
+ update(down: boolean): void;
18
+ private onScroll;
19
+ }
20
+ declare class RowComponent {
21
+ readonly tabela: Tabela;
22
+ readonly data: PlainObject;
23
+ element: HTMLDivElement | undefined;
24
+ constructor(tabela: Tabela, data: PlainObject);
25
+ remove(pool: ElementPool): void;
26
+ render(pool: ElementPool): void;
27
+ }
28
+ export type Elements = {
29
+ faker: HTMLDivElement;
30
+ group: HTMLDivElement;
31
+ };
32
+ declare class BodyComponent {
33
+ readonly tabela: Tabela;
34
+ readonly elements: Elements;
35
+ readonly rows: RowComponent[];
36
+ readonly virtualization: VirtualizationManager;
37
+ constructor(tabela: Tabela);
38
+ addData(data: PlainObject[]): Promise<void>;
39
+ destroy(): void;
40
+ private updateVirtualization;
41
+ }
42
+ type Elements$1 = {
43
+ cells: HTMLDivElement[];
44
+ group: HTMLDivElement;
45
+ row: HTMLDivElement;
46
+ };
47
+ declare class FooterComponent {
48
+ readonly tabela: Tabela;
49
+ readonly elements: Elements$1;
50
+ constructor(tabela: Tabela);
51
+ destroy(): void;
52
+ }
5
53
  export type TabelaColumn = {
6
54
  field: string;
7
55
  title: string;
@@ -21,40 +69,16 @@ declare class ColumnComponent {
21
69
  readonly options: TabelaColumn;
22
70
  constructor(tabela: Tabela, options: TabelaColumnOptions);
23
71
  }
24
- declare class CellComponent {
25
- readonly tabela: Tabela;
26
- readonly column: ColumnComponent;
27
- readonly row: RowComponent;
28
- readonly element: HTMLDivElement;
29
- constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
30
- }
31
- declare class RowComponent {
32
- readonly tabela: Tabela;
33
- readonly data: PlainObject;
34
- readonly cells: CellComponent[];
35
- readonly element: HTMLDivElement;
36
- constructor(tabela: Tabela, data: PlainObject);
37
- }
38
- declare class BodyComponent {
39
- readonly tabela: Tabela;
40
- readonly group: HTMLDivElement;
41
- readonly rows: RowComponent[];
42
- constructor(tabela: Tabela);
43
- addData(data: PlainObject[]): void;
44
- }
45
- declare class FooterComponent {
46
- readonly tabela: Tabela;
47
- readonly cells: HTMLDivElement[];
48
- readonly group: HTMLDivElement;
49
- readonly row: HTMLDivElement;
50
- constructor(tabela: Tabela);
51
- }
72
+ type Elements$2 = {
73
+ group: HTMLDivElement;
74
+ row: HTMLDivElement;
75
+ };
52
76
  export declare class HeaderComponent {
53
77
  readonly tabela: Tabela;
54
78
  readonly columns: ColumnComponent[];
55
- readonly group: HTMLDivElement;
56
- readonly row: HTMLDivElement;
79
+ readonly elements: Elements$2;
57
80
  constructor(tabela: Tabela);
81
+ destroy(): void;
58
82
  }
59
83
  export type TabelaOptions = {
60
84
  columns: TabelaColumnOptions[];
@@ -62,12 +86,13 @@ export type TabelaOptions = {
62
86
  label: string;
63
87
  };
64
88
  declare class Tabela {
65
- readonly element: HTMLElement;
89
+ element: HTMLElement;
66
90
  readonly options: TabelaOptions;
67
91
  readonly body: BodyComponent;
68
92
  readonly footer: FooterComponent;
69
93
  readonly header: HeaderComponent;
70
94
  constructor(element: HTMLElement, options: TabelaOptions);
95
+ destroy(): void;
71
96
  }
72
97
 
73
98
  export {};
@@ -1,9 +1,14 @@
1
1
  import type { Tabela } from '../tabela';
2
2
  import { ColumnComponent } from './column.component';
3
+ type Elements = {
4
+ group: HTMLDivElement;
5
+ row: HTMLDivElement;
6
+ };
3
7
  export declare class HeaderComponent {
4
8
  readonly tabela: Tabela;
5
9
  readonly columns: ColumnComponent[];
6
- readonly group: HTMLDivElement;
7
- readonly row: HTMLDivElement;
10
+ readonly elements: Elements;
8
11
  constructor(tabela: Tabela);
12
+ destroy(): void;
9
13
  }
14
+ export {};
@@ -2,6 +2,54 @@
2
2
 
3
3
  import { PlainObject } from '@oscarpalmer/atoms/models';
4
4
 
5
+ export type ElementPool = {
6
+ cells: Record<string, HTMLDivElement[]>;
7
+ rows: HTMLDivElement[];
8
+ };
9
+ declare class VirtualizationManager {
10
+ private readonly body;
11
+ private active;
12
+ private readonly pool;
13
+ private top;
14
+ private readonly visible;
15
+ constructor(body: BodyComponent);
16
+ destroy(): void;
17
+ update(down: boolean): void;
18
+ private onScroll;
19
+ }
20
+ export declare class RowComponent {
21
+ readonly tabela: Tabela;
22
+ readonly data: PlainObject;
23
+ element: HTMLDivElement | undefined;
24
+ constructor(tabela: Tabela, data: PlainObject);
25
+ remove(pool: ElementPool): void;
26
+ render(pool: ElementPool): void;
27
+ }
28
+ export type Elements = {
29
+ faker: HTMLDivElement;
30
+ group: HTMLDivElement;
31
+ };
32
+ declare class BodyComponent {
33
+ readonly tabela: Tabela;
34
+ readonly elements: Elements;
35
+ readonly rows: RowComponent[];
36
+ readonly virtualization: VirtualizationManager;
37
+ constructor(tabela: Tabela);
38
+ addData(data: PlainObject[]): Promise<void>;
39
+ destroy(): void;
40
+ private updateVirtualization;
41
+ }
42
+ type Elements$1 = {
43
+ cells: HTMLDivElement[];
44
+ group: HTMLDivElement;
45
+ row: HTMLDivElement;
46
+ };
47
+ declare class FooterComponent {
48
+ readonly tabela: Tabela;
49
+ readonly elements: Elements$1;
50
+ constructor(tabela: Tabela);
51
+ destroy(): void;
52
+ }
5
53
  export type TabelaColumn = {
6
54
  field: string;
7
55
  title: string;
@@ -21,40 +69,16 @@ declare class ColumnComponent {
21
69
  readonly options: TabelaColumn;
22
70
  constructor(tabela: Tabela, options: TabelaColumnOptions);
23
71
  }
24
- declare class CellComponent {
25
- readonly tabela: Tabela;
26
- readonly column: ColumnComponent;
27
- readonly row: RowComponent;
28
- readonly element: HTMLDivElement;
29
- constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
30
- }
31
- export declare class RowComponent {
32
- readonly tabela: Tabela;
33
- readonly data: PlainObject;
34
- readonly cells: CellComponent[];
35
- readonly element: HTMLDivElement;
36
- constructor(tabela: Tabela, data: PlainObject);
37
- }
38
- declare class BodyComponent {
39
- readonly tabela: Tabela;
40
- readonly group: HTMLDivElement;
41
- readonly rows: RowComponent[];
42
- constructor(tabela: Tabela);
43
- addData(data: PlainObject[]): void;
44
- }
45
- declare class FooterComponent {
46
- readonly tabela: Tabela;
47
- readonly cells: HTMLDivElement[];
48
- readonly group: HTMLDivElement;
49
- readonly row: HTMLDivElement;
50
- constructor(tabela: Tabela);
51
- }
72
+ type Elements$2 = {
73
+ group: HTMLDivElement;
74
+ row: HTMLDivElement;
75
+ };
52
76
  declare class HeaderComponent {
53
77
  readonly tabela: Tabela;
54
78
  readonly columns: ColumnComponent[];
55
- readonly group: HTMLDivElement;
56
- readonly row: HTMLDivElement;
79
+ readonly elements: Elements$2;
57
80
  constructor(tabela: Tabela);
81
+ destroy(): void;
58
82
  }
59
83
  export type TabelaOptions = {
60
84
  columns: TabelaColumnOptions[];
@@ -62,12 +86,13 @@ export type TabelaOptions = {
62
86
  label: string;
63
87
  };
64
88
  declare class Tabela {
65
- readonly element: HTMLElement;
89
+ element: HTMLElement;
66
90
  readonly options: TabelaOptions;
67
91
  readonly body: BodyComponent;
68
92
  readonly footer: FooterComponent;
69
93
  readonly header: HeaderComponent;
70
94
  constructor(element: HTMLElement, options: TabelaOptions);
95
+ destroy(): void;
71
96
  }
72
97
 
73
98
  export {};
@@ -1,10 +1,11 @@
1
1
  import type { PlainObject } from '@oscarpalmer/atoms/models';
2
+ import type { ElementPool } from '../managers/virtualization.manager';
2
3
  import type { Tabela } from '../tabela';
3
- import { CellComponent } from './cell.component';
4
4
  export declare class RowComponent {
5
5
  readonly tabela: Tabela;
6
6
  readonly data: PlainObject;
7
- readonly cells: CellComponent[];
8
- readonly element: HTMLDivElement;
7
+ element: HTMLDivElement | undefined;
9
8
  constructor(tabela: Tabela, data: PlainObject);
9
+ remove(pool: ElementPool): void;
10
+ render(pool: ElementPool): void;
10
11
  }
@@ -4,9 +4,9 @@ export type RowGroupWithRow = {
4
4
  group: HTMLDivElement;
5
5
  row: HTMLDivElement;
6
6
  };
7
- export declare function createCell(width: number): HTMLDivElement;
7
+ export declare function createCell(width: number, body?: boolean): HTMLDivElement;
8
8
  export declare function createRowGroup(): RowGroupWithRow;
9
9
  export declare function createRowGroup(withRow: boolean): HTMLDivElement;
10
- export declare function createRow(): HTMLDivElement;
10
+ export declare function createRow(withStyle?: boolean): HTMLDivElement;
11
11
 
12
12
  export {};
@@ -2,8 +2,8 @@ type RowGroupWithRow = {
2
2
  group: HTMLDivElement;
3
3
  row: HTMLDivElement;
4
4
  };
5
- export declare function createCell(width: number): HTMLDivElement;
5
+ export declare function createCell(width: number, body?: boolean): HTMLDivElement;
6
6
  export declare function createRowGroup(): RowGroupWithRow;
7
7
  export declare function createRowGroup(withRow: boolean): HTMLDivElement;
8
- export declare function createRow(): HTMLDivElement;
8
+ export declare function createRow(withStyle?: boolean): HTMLDivElement;
9
9
  export {};
package/types/index.d.cts CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  import { PlainObject } from '@oscarpalmer/atoms/models';
4
4
 
5
+ export type ElementPool = {
6
+ cells: Record<string, HTMLDivElement[]>;
7
+ rows: HTMLDivElement[];
8
+ };
9
+ declare class VirtualizationManager {
10
+ private readonly body;
11
+ private active;
12
+ private readonly pool;
13
+ private top;
14
+ private readonly visible;
15
+ constructor(body: BodyComponent);
16
+ destroy(): void;
17
+ update(down: boolean): void;
18
+ private onScroll;
19
+ }
20
+ declare class RowComponent {
21
+ readonly tabela: Tabela;
22
+ readonly data: PlainObject;
23
+ element: HTMLDivElement | undefined;
24
+ constructor(tabela: Tabela, data: PlainObject);
25
+ remove(pool: ElementPool): void;
26
+ render(pool: ElementPool): void;
27
+ }
28
+ export type Elements = {
29
+ faker: HTMLDivElement;
30
+ group: HTMLDivElement;
31
+ };
32
+ declare class BodyComponent {
33
+ readonly tabela: Tabela;
34
+ readonly elements: Elements;
35
+ readonly rows: RowComponent[];
36
+ readonly virtualization: VirtualizationManager;
37
+ constructor(tabela: Tabela);
38
+ addData(data: PlainObject[]): Promise<void>;
39
+ destroy(): void;
40
+ private updateVirtualization;
41
+ }
42
+ type Elements$1 = {
43
+ cells: HTMLDivElement[];
44
+ group: HTMLDivElement;
45
+ row: HTMLDivElement;
46
+ };
47
+ declare class FooterComponent {
48
+ readonly tabela: Tabela;
49
+ readonly elements: Elements$1;
50
+ constructor(tabela: Tabela);
51
+ destroy(): void;
52
+ }
5
53
  export type TabelaColumn = {
6
54
  field: string;
7
55
  title: string;
@@ -21,40 +69,16 @@ declare class ColumnComponent {
21
69
  readonly options: TabelaColumn;
22
70
  constructor(tabela: Tabela, options: TabelaColumnOptions);
23
71
  }
24
- declare class CellComponent {
25
- readonly tabela: Tabela;
26
- readonly column: ColumnComponent;
27
- readonly row: RowComponent;
28
- readonly element: HTMLDivElement;
29
- constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
30
- }
31
- declare class RowComponent {
32
- readonly tabela: Tabela;
33
- readonly data: PlainObject;
34
- readonly cells: CellComponent[];
35
- readonly element: HTMLDivElement;
36
- constructor(tabela: Tabela, data: PlainObject);
37
- }
38
- declare class BodyComponent {
39
- readonly tabela: Tabela;
40
- readonly group: HTMLDivElement;
41
- readonly rows: RowComponent[];
42
- constructor(tabela: Tabela);
43
- addData(data: PlainObject[]): void;
44
- }
45
- declare class FooterComponent {
46
- readonly tabela: Tabela;
47
- readonly cells: HTMLDivElement[];
48
- readonly group: HTMLDivElement;
49
- readonly row: HTMLDivElement;
50
- constructor(tabela: Tabela);
51
- }
72
+ type Elements$2 = {
73
+ group: HTMLDivElement;
74
+ row: HTMLDivElement;
75
+ };
52
76
  declare class HeaderComponent {
53
77
  readonly tabela: Tabela;
54
78
  readonly columns: ColumnComponent[];
55
- readonly group: HTMLDivElement;
56
- readonly row: HTMLDivElement;
79
+ readonly elements: Elements$2;
57
80
  constructor(tabela: Tabela);
81
+ destroy(): void;
58
82
  }
59
83
  export type TabelaOptions = {
60
84
  columns: TabelaColumnOptions[];
@@ -62,12 +86,13 @@ export type TabelaOptions = {
62
86
  label: string;
63
87
  };
64
88
  export declare class Tabela {
65
- readonly element: HTMLElement;
89
+ element: HTMLElement;
66
90
  readonly options: TabelaOptions;
67
91
  readonly body: BodyComponent;
68
92
  readonly footer: FooterComponent;
69
93
  readonly header: HeaderComponent;
70
94
  constructor(element: HTMLElement, options: TabelaOptions);
95
+ destroy(): void;
71
96
  }
72
97
  export declare function tabela(element: HTMLElement, options: TabelaOptions): Tabela;
73
98