@oscarpalmer/tabela 0.1.0 → 0.2.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 +26 -0
- package/dist/components/body.component.js +26 -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 +26 -0
- package/dist/components/row.component.js +26 -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/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 +28 -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 +30 -0
- package/src/helpers/dom.helpers.ts +44 -0
- package/src/index.ts +1 -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 +73 -0
- package/types/components/body.component.d.ts +10 -0
- package/types/components/cell.component.d.cts +73 -0
- package/types/components/cell.component.d.ts +10 -0
- package/types/components/column.component.d.cts +73 -0
- package/types/components/column.component.d.ts +8 -0
- package/types/components/footer.component.d.cts +73 -0
- package/types/components/footer.component.d.ts +8 -0
- package/types/components/header.component.d.cts +73 -0
- package/types/components/header.component.d.ts +9 -0
- package/types/components/row.component.d.cts +73 -0
- package/types/components/row.component.d.ts +10 -0
- package/types/helpers/dom.helpers.d.cts +12 -0
- package/types/helpers/dom.helpers.d.ts +9 -0
- package/types/index.d.cts +71 -0
- package/types/index.d.ts +1 -1
- 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 +74 -0
- package/types/tabela.d.ts +13 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
type RowGroupWithRow = {
|
|
2
|
+
group: HTMLDivElement;
|
|
3
|
+
row: HTMLDivElement;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export function createCell(width: number): HTMLDivElement {
|
|
7
|
+
const cell = document.createElement('div');
|
|
8
|
+
|
|
9
|
+
cell.className = 'tabela__cell';
|
|
10
|
+
cell.role = 'cell';
|
|
11
|
+
cell.style.width = `${width}px`;
|
|
12
|
+
|
|
13
|
+
return cell;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function createRowGroup(): RowGroupWithRow;
|
|
17
|
+
|
|
18
|
+
export function createRowGroup(withRow: boolean): HTMLDivElement;
|
|
19
|
+
|
|
20
|
+
export function createRowGroup(withRow?: boolean) {
|
|
21
|
+
const group = document.createElement('div');
|
|
22
|
+
|
|
23
|
+
group.className = 'tabela__rowgroup';
|
|
24
|
+
group.role = 'rowgroup';
|
|
25
|
+
|
|
26
|
+
if (!(withRow ?? true)) {
|
|
27
|
+
return group;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const row = createRow();
|
|
31
|
+
|
|
32
|
+
group.append(row);
|
|
33
|
+
|
|
34
|
+
return {group, row};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function createRow() {
|
|
38
|
+
const row = document.createElement('div');
|
|
39
|
+
|
|
40
|
+
row.className = 'tabela__row';
|
|
41
|
+
row.role = 'row';
|
|
42
|
+
|
|
43
|
+
return row;
|
|
44
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tabela';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type TabelaColumn = {
|
|
2
|
+
field: string;
|
|
3
|
+
title: string;
|
|
4
|
+
type: TabelaColumnType;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type TabelaColumnOptions = {
|
|
9
|
+
field: string;
|
|
10
|
+
title: string;
|
|
11
|
+
type: TabelaColumnType;
|
|
12
|
+
width?: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type TabelaColumnType =
|
|
16
|
+
| 'boolean'
|
|
17
|
+
| 'date'
|
|
18
|
+
| 'date-time'
|
|
19
|
+
| 'number'
|
|
20
|
+
| 'string'
|
|
21
|
+
| 'time';
|
package/src/tabela.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {BodyComponent} from './components/body.component';
|
|
2
|
+
import {FooterComponent} from './components/footer.component';
|
|
3
|
+
import {HeaderComponent} from './components/header.component';
|
|
4
|
+
import type {TabelaOptions} from './models/tabela.options';
|
|
5
|
+
|
|
6
|
+
export class Tabela {
|
|
7
|
+
readonly body: BodyComponent;
|
|
8
|
+
readonly footer: FooterComponent;
|
|
9
|
+
readonly header: HeaderComponent;
|
|
10
|
+
|
|
11
|
+
constructor(
|
|
12
|
+
readonly element: HTMLElement,
|
|
13
|
+
readonly options: TabelaOptions,
|
|
14
|
+
) {
|
|
15
|
+
element.role = 'table';
|
|
16
|
+
|
|
17
|
+
element.classList.add('tabela');
|
|
18
|
+
element.setAttribute('aria-label', options.label);
|
|
19
|
+
|
|
20
|
+
this.header = new HeaderComponent(this);
|
|
21
|
+
this.body = new BodyComponent(this);
|
|
22
|
+
this.footer = new FooterComponent(this);
|
|
23
|
+
|
|
24
|
+
element.append(this.header.group, this.body.group, this.footer.group);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function tabela(element: HTMLElement, options: TabelaOptions): Tabela {
|
|
29
|
+
return new Tabela(element, options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
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
|
+
export 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
|
+
}
|
|
52
|
+
declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PlainObject } from '@oscarpalmer/atoms/models';
|
|
2
|
+
import type { Tabela } from '../tabela';
|
|
3
|
+
import { RowComponent } from './row.component';
|
|
4
|
+
export declare class BodyComponent {
|
|
5
|
+
readonly tabela: Tabela;
|
|
6
|
+
readonly group: HTMLDivElement;
|
|
7
|
+
readonly rows: RowComponent[];
|
|
8
|
+
constructor(tabela: Tabela);
|
|
9
|
+
addData(data: PlainObject[]): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
24
|
+
export 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
|
+
}
|
|
52
|
+
declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Tabela } from '../tabela';
|
|
2
|
+
import type { ColumnComponent } from './column.component';
|
|
3
|
+
import type { RowComponent } from './row.component';
|
|
4
|
+
export declare class CellComponent {
|
|
5
|
+
readonly tabela: Tabela;
|
|
6
|
+
readonly column: ColumnComponent;
|
|
7
|
+
readonly row: RowComponent;
|
|
8
|
+
readonly element: HTMLDivElement;
|
|
9
|
+
constructor(tabela: Tabela, column: ColumnComponent, row: RowComponent);
|
|
10
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
export declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
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
|
+
}
|
|
52
|
+
declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
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,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
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
|
+
}
|
|
52
|
+
declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
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
|
+
}
|
|
52
|
+
export declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
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,73 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { PlainObject } from '@oscarpalmer/atoms/models';
|
|
4
|
+
|
|
5
|
+
export type TabelaColumn = {
|
|
6
|
+
field: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: TabelaColumnType;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type TabelaColumnOptions = {
|
|
12
|
+
field: string;
|
|
13
|
+
title: string;
|
|
14
|
+
type: TabelaColumnType;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export type TabelaColumnType = "boolean" | "date" | "date-time" | "number" | "string" | "time";
|
|
18
|
+
declare class ColumnComponent {
|
|
19
|
+
readonly tabela: Tabela;
|
|
20
|
+
readonly element: HTMLDivElement;
|
|
21
|
+
readonly options: TabelaColumn;
|
|
22
|
+
constructor(tabela: Tabela, options: TabelaColumnOptions);
|
|
23
|
+
}
|
|
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
|
+
}
|
|
52
|
+
declare class HeaderComponent {
|
|
53
|
+
readonly tabela: Tabela;
|
|
54
|
+
readonly columns: ColumnComponent[];
|
|
55
|
+
readonly group: HTMLDivElement;
|
|
56
|
+
readonly row: HTMLDivElement;
|
|
57
|
+
constructor(tabela: Tabela);
|
|
58
|
+
}
|
|
59
|
+
export type TabelaOptions = {
|
|
60
|
+
columns: TabelaColumnOptions[];
|
|
61
|
+
data: PlainObject[];
|
|
62
|
+
label: string;
|
|
63
|
+
};
|
|
64
|
+
declare class Tabela {
|
|
65
|
+
readonly element: HTMLElement;
|
|
66
|
+
readonly options: TabelaOptions;
|
|
67
|
+
readonly body: BodyComponent;
|
|
68
|
+
readonly footer: FooterComponent;
|
|
69
|
+
readonly header: HeaderComponent;
|
|
70
|
+
constructor(element: HTMLElement, options: TabelaOptions);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
|
@@ -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 {};
|