@oscarpalmer/tabela 0.12.0 → 0.14.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/tabela.full.js +146 -18
- package/package.json +45 -37
- package/src/components/body.component.ts +11 -7
- package/src/components/column.component.ts +23 -24
- package/src/components/footer.component.ts +7 -5
- package/src/components/group.component.ts +73 -9
- package/src/components/header.component.ts +6 -4
- package/src/components/row.component.ts +28 -18
- package/src/helpers/dom.helpers.ts +27 -29
- package/src/helpers/misc.helpers.ts +5 -0
- package/src/helpers/style.helper.ts +1 -1
- package/src/managers/column.manager.ts +4 -0
- package/src/managers/data.manager.ts +197 -124
- package/src/managers/event.manager.ts +27 -17
- package/src/managers/filter.manager.ts +49 -25
- package/src/managers/group.manager.ts +73 -12
- package/src/managers/navigation.manager.ts +48 -50
- package/src/managers/render.manager.ts +56 -29
- package/src/managers/row.manager.ts +22 -10
- package/src/managers/selection.manager.ts +40 -31
- package/src/managers/sort.manager.ts +58 -43
- package/src/managers/style.manager.ts +171 -0
- package/src/models/column.model.ts +2 -6
- package/src/models/data.model.ts +12 -10
- package/src/models/dom.model.ts +33 -0
- package/src/models/event.model.ts +7 -0
- package/src/models/filter.model.ts +20 -0
- package/src/models/group.model.ts +10 -2
- package/src/models/sort.model.ts +4 -0
- package/src/models/style.model.ts +51 -0
- package/src/models/tabela.model.ts +11 -8
- package/src/tabela.ts +67 -37
- package/types/components/body.component.d.ts +0 -6
- package/types/components/column.component.d.ts +0 -13
- package/types/components/footer.component.d.ts +0 -8
- package/types/components/group.component.d.ts +0 -14
- package/types/components/header.component.d.ts +0 -8
- package/types/components/row.component.d.ts +0 -11
- package/types/helpers/dom.helpers.d.ts +0 -10
- package/types/helpers/misc.helpers.d.ts +0 -2
- package/types/helpers/style.helper.d.ts +0 -1
- package/types/index.d.ts +0 -4
- package/types/managers/column.manager.d.ts +0 -12
- package/types/managers/data.manager.d.ts +0 -29
- package/types/managers/event.manager.d.ts +0 -7
- package/types/managers/filter.manager.d.ts +0 -19
- package/types/managers/group.manager.d.ts +0 -17
- package/types/managers/navigation.manager.d.ts +0 -10
- package/types/managers/render.manager.d.ts +0 -17
- package/types/managers/row.manager.d.ts +0 -13
- package/types/managers/selection.manager.d.ts +0 -24
- package/types/managers/sort.manager.d.ts +0 -28
- package/types/models/body.model.d.ts +0 -4
- package/types/models/column.model.d.ts +0 -13
- package/types/models/data.model.d.ts +0 -24
- package/types/models/filter.model.d.ts +0 -13
- package/types/models/footer.model.d.ts +0 -5
- package/types/models/group.model.d.ts +0 -4
- package/types/models/header.model.d.ts +0 -4
- package/types/models/render.model.d.ts +0 -13
- package/types/models/selection.model.d.ts +0 -8
- package/types/models/sort.model.d.ts +0 -12
- package/types/models/tabela.model.d.ts +0 -39
- package/types/models/tabela.options.d.ts +0 -10
- package/types/tabela.d.ts +0 -15
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { State } from './tabela.model';
|
|
2
|
-
export type RenderElementPool = {
|
|
3
|
-
cells: Record<string, HTMLDivElement[]>;
|
|
4
|
-
rows: HTMLDivElement[];
|
|
5
|
-
};
|
|
6
|
-
export type RenderRange = {
|
|
7
|
-
end: number;
|
|
8
|
-
start: number;
|
|
9
|
-
};
|
|
10
|
-
export type RenderState = {
|
|
11
|
-
active: boolean;
|
|
12
|
-
top: number;
|
|
13
|
-
} & State;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type TabelaSort = {
|
|
2
|
-
add(field: string, direction?: TabelaSortDirection): void;
|
|
3
|
-
clear(): void;
|
|
4
|
-
flip(field: string): void;
|
|
5
|
-
remove(field: string): void;
|
|
6
|
-
set(items: TabelaSortItem[]): void;
|
|
7
|
-
};
|
|
8
|
-
export type TabelaSortDirection = 'ascending' | 'descending';
|
|
9
|
-
export type TabelaSortItem = {
|
|
10
|
-
direction: TabelaSortDirection;
|
|
11
|
-
field: string;
|
|
12
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { BodyComponent } from '../components/body.component';
|
|
2
|
-
import type { FooterComponent } from '../components/footer.component';
|
|
3
|
-
import type { HeaderComponent } from '../components/header.component';
|
|
4
|
-
import type { ColumnManager } from '../managers/column.manager';
|
|
5
|
-
import type { DataManager } from '../managers/data.manager';
|
|
6
|
-
import type { EventManager } from '../managers/event.manager';
|
|
7
|
-
import type { FilterManager } from '../managers/filter.manager';
|
|
8
|
-
import type { GroupManager } from '../managers/group.manager';
|
|
9
|
-
import type { NavigationManager } from '../managers/navigation.manager';
|
|
10
|
-
import type { RenderManager } from '../managers/render.manager';
|
|
11
|
-
import type { RowManager } from '../managers/row.manager';
|
|
12
|
-
import type { SelectionManager } from '../managers/selection.manager';
|
|
13
|
-
import type { SortManager } from '../managers/sort.manager';
|
|
14
|
-
import type { TabelaOptions } from './tabela.options';
|
|
15
|
-
export type Components = {
|
|
16
|
-
body: BodyComponent;
|
|
17
|
-
footer: FooterComponent;
|
|
18
|
-
header: HeaderComponent;
|
|
19
|
-
};
|
|
20
|
-
export type Managers = {
|
|
21
|
-
column: ColumnManager;
|
|
22
|
-
data: DataManager;
|
|
23
|
-
event: EventManager;
|
|
24
|
-
filter: FilterManager;
|
|
25
|
-
group: GroupManager;
|
|
26
|
-
navigation: NavigationManager;
|
|
27
|
-
row: RowManager;
|
|
28
|
-
selection: SelectionManager;
|
|
29
|
-
sort: SortManager;
|
|
30
|
-
render: RenderManager;
|
|
31
|
-
};
|
|
32
|
-
export type State = {
|
|
33
|
-
readonly components: Components;
|
|
34
|
-
readonly element: HTMLElement;
|
|
35
|
-
readonly id: number;
|
|
36
|
-
readonly key: string;
|
|
37
|
-
readonly managers: Managers;
|
|
38
|
-
readonly options: TabelaOptions;
|
|
39
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PlainObject } from '@oscarpalmer/atoms/models';
|
|
2
|
-
import type { TabelaColumn } from './column.model';
|
|
3
|
-
export type TabelaOptions = {
|
|
4
|
-
columns: TabelaColumn[];
|
|
5
|
-
data: PlainObject[];
|
|
6
|
-
grouping?: string;
|
|
7
|
-
key: string;
|
|
8
|
-
label: string;
|
|
9
|
-
rowHeight: number;
|
|
10
|
-
};
|
package/types/tabela.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TabelaData } from './models/data.model';
|
|
2
|
-
import type { TabelaFilter } from './models/filter.model';
|
|
3
|
-
import type { TabelaSelection } from './models/selection.model';
|
|
4
|
-
import type { TabelaSort } from './models/sort.model';
|
|
5
|
-
import type { TabelaOptions } from './models/tabela.options';
|
|
6
|
-
export declare class Tabela {
|
|
7
|
-
#private;
|
|
8
|
-
readonly data: TabelaData;
|
|
9
|
-
readonly filter: TabelaFilter;
|
|
10
|
-
readonly selection: TabelaSelection;
|
|
11
|
-
readonly sort: TabelaSort;
|
|
12
|
-
get key(): string;
|
|
13
|
-
constructor(element: HTMLElement, options: TabelaOptions);
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|