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