@r2digisolutions/ui 0.22.3 → 0.22.5
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/container/DataTable/DataTable.svelte +11 -12
- package/dist/components/container/DataTable/DataTable.svelte.d.ts +4 -6
- package/dist/components/container/DataTable/components/Cell.svelte +2 -2
- package/dist/components/container/DataTable/components/Cell.svelte.d.ts +2 -2
- package/dist/components/container/DataTable/components/ColumnVisibilityToggle.svelte +2 -2
- package/dist/components/container/DataTable/components/ColumnVisibilityToggle.svelte.d.ts +2 -2
- package/dist/components/container/DataTable/components/ContextMenu.svelte +8 -18
- package/dist/components/container/DataTable/components/ContextMenu.svelte.d.ts +2 -10
- package/dist/components/container/DataTable/components/QuickFilters.svelte +4 -4
- package/dist/components/container/DataTable/components/QuickFilters.svelte.d.ts +3 -3
- package/dist/components/container/DataTable/core/DataTableManager.svelte.d.ts +8 -8
- package/dist/components/container/DataTable/core/filters/types.d.ts +2 -2
- package/dist/components/container/DataTable/core/filters/utils.d.ts +2 -2
- package/dist/components/container/DataTable/core/types.d.ts +41 -32
- package/dist/components/container/DataTable/core/utils.d.ts +3 -3
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/container/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
<script module lang="ts">
|
|
2
|
-
import * as DataTableTypes from './core/types.js';
|
|
3
|
-
export type { DataTableTypes };
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
1
|
<script lang="ts" generics="T extends { id?: any }">
|
|
7
2
|
import type { Snippet } from 'svelte';
|
|
8
3
|
import { tick } from 'svelte';
|
|
9
|
-
import type {
|
|
10
|
-
|
|
4
|
+
import type {
|
|
5
|
+
TDataTableCellContext,
|
|
6
|
+
TDataTableColumnDef,
|
|
7
|
+
TDataTableTableOptions
|
|
8
|
+
} from './core/types.js';
|
|
9
|
+
import type { TContextMenuEntry } from './components/ContextMenu.svelte';
|
|
11
10
|
import type { FilterField } from './core/filters/types.js';
|
|
12
11
|
import { DataTableManager } from './core/DataTableManager.svelte';
|
|
13
12
|
import FilterPanel from './components/FilterPanel.svelte';
|
|
@@ -19,9 +18,9 @@
|
|
|
19
18
|
|
|
20
19
|
interface Props<T> {
|
|
21
20
|
filters?: Snippet;
|
|
22
|
-
options:
|
|
21
|
+
options: TDataTableTableOptions<T>;
|
|
23
22
|
rowId?: (row: T) => any;
|
|
24
|
-
actions?: (rows: T[], ctx?:
|
|
23
|
+
actions?: (rows: T[], ctx?: TDataTableCellContext<T> | null) => TContextMenuEntry[];
|
|
25
24
|
rowActions?: (row: T) => any;
|
|
26
25
|
onRowClick?: (row: T) => void;
|
|
27
26
|
density?: 'compact' | 'normal' | 'comfortable';
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
let filterValues = $state<Record<string, any>>({});
|
|
55
54
|
let container: HTMLDivElement | null = $state(null);
|
|
56
55
|
let rightMenu = $state<{ open: boolean; x: number; y: number }>({ open: false, x: 0, y: 0 });
|
|
57
|
-
let rightClickContext = $state<
|
|
56
|
+
let rightClickContext = $state<TDataTableCellContext<T> | null>(null);
|
|
58
57
|
let measuring = $state(true);
|
|
59
58
|
|
|
60
59
|
const sizeRow = $derived.by(() =>
|
|
@@ -112,7 +111,7 @@
|
|
|
112
111
|
measureColumns();
|
|
113
112
|
});
|
|
114
113
|
|
|
115
|
-
function headerClick(c:
|
|
114
|
+
function headerClick(c: TDataTableColumnDef<T>) {
|
|
116
115
|
if (!c.sortable) return;
|
|
117
116
|
manager.setSort(c.id);
|
|
118
117
|
}
|
|
@@ -133,7 +132,7 @@
|
|
|
133
132
|
columnIndex,
|
|
134
133
|
event: e,
|
|
135
134
|
column: columnId ? manager.getColumn(columnId) : null
|
|
136
|
-
} as
|
|
135
|
+
} as TDataTableCellContext<T>;
|
|
137
136
|
}
|
|
138
137
|
|
|
139
138
|
function selectedRows(): T[] {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import * as DataTableTypes from './core/types.js';
|
|
2
|
-
export type { DataTableTypes };
|
|
3
1
|
import type { Snippet } from 'svelte';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
2
|
+
import type { TDataTableCellContext, TDataTableTableOptions } from './core/types.js';
|
|
3
|
+
import type { TContextMenuEntry } from './components/ContextMenu.svelte';
|
|
6
4
|
import type { FilterField } from './core/filters/types.js';
|
|
7
5
|
interface Props<T> {
|
|
8
6
|
filters?: Snippet;
|
|
9
|
-
options:
|
|
7
|
+
options: TDataTableTableOptions<T>;
|
|
10
8
|
rowId?: (row: T) => any;
|
|
11
|
-
actions?: (rows: T[], ctx?:
|
|
9
|
+
actions?: (rows: T[], ctx?: TDataTableCellContext<T> | null) => TContextMenuEntry[];
|
|
12
10
|
rowActions?: (row: T) => any;
|
|
13
11
|
onRowClick?: (row: T) => void;
|
|
14
12
|
density?: 'compact' | 'normal' | 'comfortable';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" generics="T">
|
|
2
|
-
import type {
|
|
2
|
+
import type { TDataTableColumnDef } from '../core/types.js';
|
|
3
3
|
import { Check, X, ExternalLink } from 'lucide-svelte';
|
|
4
4
|
|
|
5
5
|
interface Props<T> {
|
|
6
|
-
column:
|
|
6
|
+
column: TDataTableColumnDef<T>;
|
|
7
7
|
row: T;
|
|
8
8
|
measuring?: boolean;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { TDataTableColumnDef } from '../core/types.js';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
-
columns?:
|
|
5
|
+
columns?: TDataTableColumnDef<any>[];
|
|
6
6
|
visible?: string[];
|
|
7
7
|
onToggle: (id: string, show: boolean) => void;
|
|
8
8
|
buttonText?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TDataTableColumnDef } from '../core/types.js';
|
|
2
2
|
interface Props {
|
|
3
|
-
columns?:
|
|
3
|
+
columns?: TDataTableColumnDef<any>[];
|
|
4
4
|
visible?: string[];
|
|
5
5
|
onToggle: (id: string, show: boolean) => void;
|
|
6
6
|
buttonText?: string;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
<script module lang="ts">
|
|
2
|
-
export type Entry = {
|
|
3
|
-
id: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
shortcut?: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
children?: Entry[];
|
|
9
|
-
kind?: 'item' | 'divider' | 'label';
|
|
10
|
-
};
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
1
|
<script lang="ts">
|
|
2
|
+
import type { TContextMenuEntry } from '../core/types.js';
|
|
3
|
+
|
|
14
4
|
type Props = {
|
|
15
|
-
items?:
|
|
5
|
+
items?: TContextMenuEntry[];
|
|
16
6
|
x?: number;
|
|
17
7
|
y?: number;
|
|
18
8
|
open?: boolean;
|
|
@@ -30,7 +20,7 @@
|
|
|
30
20
|
context = null
|
|
31
21
|
}: Props = $props();
|
|
32
22
|
|
|
33
|
-
let stack = $state<{ label: string; items:
|
|
23
|
+
let stack = $state<{ label: string; items: TContextMenuEntry[] }[]>([]);
|
|
34
24
|
let q = $state('');
|
|
35
25
|
|
|
36
26
|
const current = $derived(stack.length ? stack[stack.length - 1] : { label: title, items });
|
|
@@ -41,11 +31,11 @@
|
|
|
41
31
|
q = '';
|
|
42
32
|
}
|
|
43
33
|
|
|
44
|
-
function hasChildren(it:
|
|
34
|
+
function hasChildren(it: TContextMenuEntry) {
|
|
45
35
|
return !!(it.children && it.children.length);
|
|
46
36
|
}
|
|
47
37
|
|
|
48
|
-
function clickItem(it:
|
|
38
|
+
function clickItem(it: TContextMenuEntry) {
|
|
49
39
|
if (it.disabled) return;
|
|
50
40
|
if (hasChildren(it)) {
|
|
51
41
|
stack.push({ label: it.label ?? '', items: it.children! });
|
|
@@ -58,7 +48,7 @@
|
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
|
|
61
|
-
function matches(it:
|
|
51
|
+
function matches(it: TContextMenuEntry, query: string): boolean {
|
|
62
52
|
if (it.kind === 'divider') return true;
|
|
63
53
|
const lbl = (it.label ?? '').toLowerCase();
|
|
64
54
|
if (lbl.includes(query)) return true;
|
|
@@ -72,7 +62,7 @@
|
|
|
72
62
|
let arr = query ? list.filter((it) => matches(it, query)) : list.slice();
|
|
73
63
|
|
|
74
64
|
// limpiar divisores (sin duplicados, ni al principio/fin)
|
|
75
|
-
const out:
|
|
65
|
+
const out: TContextMenuEntry[] = [];
|
|
76
66
|
let prevDiv = false;
|
|
77
67
|
for (const it of arr) {
|
|
78
68
|
if (it.kind === 'divider') {
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
label?: string;
|
|
4
|
-
shortcut?: string;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
children?: Entry[];
|
|
8
|
-
kind?: 'item' | 'divider' | 'label';
|
|
9
|
-
};
|
|
1
|
+
import type { TContextMenuEntry } from '../core/types.js';
|
|
10
2
|
type Props = {
|
|
11
|
-
items?:
|
|
3
|
+
items?: TContextMenuEntry[];
|
|
12
4
|
x?: number;
|
|
13
5
|
y?: number;
|
|
14
6
|
open?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { TDataTableFilterDef } from '../core/types.js';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
-
filters:
|
|
6
|
-
onapply: (filters:
|
|
5
|
+
filters: TDataTableFilterDef<any>[];
|
|
6
|
+
onapply: (filters: TDataTableFilterDef<any>[]) => void;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const { filters, onapply }: Props = $props();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
function submit() {
|
|
14
14
|
const base = filters.filter((f) => f.meta?.kind !== 'quick');
|
|
15
|
-
const q:
|
|
15
|
+
const q: TDataTableFilterDef<any> = {
|
|
16
16
|
id: 'q',
|
|
17
17
|
label: 'Búsqueda',
|
|
18
18
|
op: 'contains',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TDataTableFilterDef } from '../core/types.js';
|
|
2
2
|
interface Props {
|
|
3
|
-
filters:
|
|
4
|
-
onapply: (filters:
|
|
3
|
+
filters: TDataTableFilterDef<any>[];
|
|
4
|
+
onapply: (filters: TDataTableFilterDef<any>[]) => void;
|
|
5
5
|
}
|
|
6
6
|
declare const QuickFilters: import("svelte").Component<Props, {}, "">;
|
|
7
7
|
type QuickFilters = ReturnType<typeof QuickFilters>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { SvelteSet } from 'svelte/reactivity';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TDataTableTableOptions, TDataTableTableState, TDataTableVisibilityPlan } from './types.js';
|
|
3
3
|
export declare class DataTableManager<T extends {
|
|
4
4
|
id?: any;
|
|
5
5
|
} = any> {
|
|
6
|
-
options:
|
|
7
|
-
state:
|
|
6
|
+
options: TDataTableTableOptions<T>;
|
|
7
|
+
state: TDataTableTableState<T>;
|
|
8
8
|
measured: Record<string, number>;
|
|
9
9
|
reservedWidth: number;
|
|
10
10
|
forcedVisible: SvelteSet<string>;
|
|
11
11
|
forcedHidden: SvelteSet<string>;
|
|
12
12
|
expanded: SvelteSet<any>;
|
|
13
13
|
lastWidth: number | null;
|
|
14
|
-
constructor(opts:
|
|
14
|
+
constructor(opts: TDataTableTableOptions<T>);
|
|
15
15
|
setMeasuredWidths(map: Record<string, number>): void;
|
|
16
|
-
get columns(): import("./types.js").
|
|
17
|
-
getColumn(id: string): import("./types.js").
|
|
16
|
+
get columns(): import("./types.js").TDataTableColumnDef<T>[];
|
|
17
|
+
getColumn(id: string): import("./types.js").TDataTableColumnDef<T>;
|
|
18
18
|
isExpanded(id: any): boolean;
|
|
19
19
|
toggleExpand(id: any): void;
|
|
20
20
|
setColumnVisibility(id: string, show: boolean): void;
|
|
21
21
|
setReservedWidth(n: number): void;
|
|
22
22
|
clearColumnOverrides(): void;
|
|
23
|
-
visibilityPlan(containerWidth: number):
|
|
23
|
+
visibilityPlan(containerWidth: number): TDataTableVisibilityPlan;
|
|
24
24
|
private mergeWithOverrides;
|
|
25
|
-
applyVisibility(plan:
|
|
25
|
+
applyVisibility(plan: TDataTableVisibilityPlan): void;
|
|
26
26
|
reflowForWidth(width: number): void;
|
|
27
27
|
reflow(): void;
|
|
28
28
|
setPerPage(n: number): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TDataTableFilterOp } from "../types.js";
|
|
2
2
|
export type FilterInputType = 'text' | 'select' | 'number' | 'range' | 'checkbox' | 'multiselect' | 'date' | 'rating';
|
|
3
3
|
export type SelectOption = {
|
|
4
4
|
label: string;
|
|
@@ -10,7 +10,7 @@ export type FilterField<T> = {
|
|
|
10
10
|
type: FilterInputType;
|
|
11
11
|
columnId?: string;
|
|
12
12
|
options?: SelectOption[];
|
|
13
|
-
op?:
|
|
13
|
+
op?: TDataTableFilterOp;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
min?: number;
|
|
16
16
|
max?: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TDataTableFilterDef } from "../types.js";
|
|
2
2
|
import type { FilterField } from "./types.js";
|
|
3
|
-
export declare function buildFilterDefs<T>(fields: FilterField<T>[], values: Record<string, any>):
|
|
3
|
+
export declare function buildFilterDefs<T>(fields: FilterField<T>[], values: Record<string, any>): TDataTableFilterDef<T>[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
type
|
|
1
|
+
export type TDataTableRowId = string | number;
|
|
2
|
+
export type TDataTableSortDir = 'asc' | 'desc' | null;
|
|
3
|
+
export type TDataTableColumnKey<T> = Extract<keyof T, string>;
|
|
4
|
+
export type TDataTableAccessor<T, R = any> = (row: T) => R;
|
|
5
|
+
export type TDataTableColumnType = 'text' | 'number' | 'currency' | 'date' | 'datetime' | 'boolean' | 'badge' | 'link' | 'code';
|
|
6
|
+
type TDataTableBaseColumn<T> = {
|
|
7
7
|
header: string;
|
|
8
8
|
width?: number;
|
|
9
9
|
minWidth?: number;
|
|
@@ -13,64 +13,64 @@ type BaseColumn<T> = {
|
|
|
13
13
|
hideOnMobile?: boolean;
|
|
14
14
|
responsiveLabel?: string;
|
|
15
15
|
class?: string;
|
|
16
|
-
type?:
|
|
16
|
+
type?: TDataTableColumnType;
|
|
17
17
|
format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions;
|
|
18
18
|
trueLabel?: string;
|
|
19
19
|
falseLabel?: string;
|
|
20
20
|
};
|
|
21
21
|
/** Columna ligada a una key existente de T (autocomplete de keys) */
|
|
22
|
-
export type
|
|
22
|
+
export type TDataTableKeyColumn<T, K extends TDataTableColumnKey<T> = TDataTableColumnKey<T>> = TDataTableBaseColumn<T> & {
|
|
23
23
|
id: K;
|
|
24
24
|
accessor?: (row: T) => T[K];
|
|
25
25
|
renderCell?: (row: T) => any;
|
|
26
26
|
renderCollapsed?: (row: T) => any;
|
|
27
27
|
};
|
|
28
28
|
/** Columna virtual (id libre), requiere accessor explícito */
|
|
29
|
-
export type
|
|
29
|
+
export type TDataTableVirtualColumn<T> = TDataTableBaseColumn<T> & {
|
|
30
30
|
id: string;
|
|
31
|
-
accessor:
|
|
31
|
+
accessor: TDataTableAccessor<T>;
|
|
32
32
|
renderCell?: (row: T) => any;
|
|
33
33
|
renderCollapsed?: (row: T) => any;
|
|
34
34
|
};
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
37
|
-
export type
|
|
35
|
+
export type TDataTableColumnDef<T> = TDataTableKeyColumn<T>;
|
|
36
|
+
export type TDataTableFilterOp = 'equals' | 'not_equals' | 'contains' | 'starts_with' | 'ends_with' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'not_in' | 'is_empty' | 'is_not_empty';
|
|
37
|
+
export type TDataTableFilterDef<T> = {
|
|
38
38
|
id: string;
|
|
39
39
|
label: string;
|
|
40
40
|
columnId?: string;
|
|
41
|
-
op:
|
|
41
|
+
op: TDataTableFilterOp;
|
|
42
42
|
value?: any;
|
|
43
43
|
meta?: Record<string, any>;
|
|
44
44
|
};
|
|
45
|
-
export type
|
|
45
|
+
export type TDataTableFetchResult<T> = {
|
|
46
46
|
items: T[];
|
|
47
47
|
total: number;
|
|
48
48
|
nextCursor?: string;
|
|
49
49
|
};
|
|
50
|
-
export type
|
|
50
|
+
export type TDataTableFetchParams = {
|
|
51
51
|
page: number;
|
|
52
52
|
perPage: number;
|
|
53
53
|
cursor?: string;
|
|
54
54
|
sortBy?: string | null;
|
|
55
|
-
sortDir?:
|
|
56
|
-
filters:
|
|
55
|
+
sortDir?: TDataTableSortDir;
|
|
56
|
+
filters: TDataTableFilterDef<any>[];
|
|
57
57
|
};
|
|
58
|
-
export type
|
|
59
|
-
export type
|
|
58
|
+
export type TDataTableLoadMode = 'local' | 'remote' | 'cursor';
|
|
59
|
+
export type TDataTableTableOptions<T> = {
|
|
60
60
|
id?: string;
|
|
61
|
-
columns:
|
|
62
|
-
loadMode:
|
|
61
|
+
columns: TDataTableColumnDef<T>[];
|
|
62
|
+
loadMode: TDataTableLoadMode;
|
|
63
63
|
data?: T[];
|
|
64
|
-
fetcher?: (params:
|
|
64
|
+
fetcher?: (params: TDataTableFetchParams) => Promise<TDataTableFetchResult<T>>;
|
|
65
65
|
perPage?: number;
|
|
66
66
|
perPageOptions?: number[];
|
|
67
67
|
multiSelect?: boolean;
|
|
68
68
|
keepSelectionOnPageChange?: boolean;
|
|
69
69
|
initialSortBy?: string | null;
|
|
70
|
-
initialSortDir?:
|
|
71
|
-
initialFilters?:
|
|
70
|
+
initialSortDir?: TDataTableSortDir;
|
|
71
|
+
initialFilters?: TDataTableFilterDef<T>[];
|
|
72
72
|
};
|
|
73
|
-
export type
|
|
73
|
+
export type TDataTableTableState<T> = {
|
|
74
74
|
ready: boolean;
|
|
75
75
|
items: T[];
|
|
76
76
|
page: number;
|
|
@@ -78,24 +78,33 @@ export type TableState<T> = {
|
|
|
78
78
|
total: number;
|
|
79
79
|
cursor?: string;
|
|
80
80
|
sortBy: string | null;
|
|
81
|
-
sortDir:
|
|
82
|
-
filters:
|
|
81
|
+
sortDir: TDataTableSortDir;
|
|
82
|
+
filters: TDataTableFilterDef<T>[];
|
|
83
83
|
visibleColumns: string[];
|
|
84
84
|
hiddenColumns: string[];
|
|
85
|
-
selected: Set<
|
|
85
|
+
selected: Set<TDataTableRowId>;
|
|
86
86
|
loading: boolean;
|
|
87
87
|
error?: string;
|
|
88
88
|
};
|
|
89
|
-
export type
|
|
89
|
+
export type TDataTableVisibilityPlan = {
|
|
90
90
|
visible: string[];
|
|
91
91
|
hidden: string[];
|
|
92
92
|
};
|
|
93
|
-
export type
|
|
93
|
+
export type TDataTableCellContext<T> = {
|
|
94
94
|
row: T | null;
|
|
95
95
|
rowIndex: number | null;
|
|
96
96
|
columnId: string | null;
|
|
97
|
-
column:
|
|
97
|
+
column: TDataTableColumnDef<T> | null;
|
|
98
98
|
columnIndex: number | null;
|
|
99
99
|
event: MouseEvent;
|
|
100
100
|
};
|
|
101
|
+
export type TContextMenuEntry = {
|
|
102
|
+
id: string;
|
|
103
|
+
label?: string;
|
|
104
|
+
shortcut?: string;
|
|
105
|
+
onClick?: () => void;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
children?: TContextMenuEntry[];
|
|
108
|
+
kind?: 'item' | 'divider' | 'label';
|
|
109
|
+
};
|
|
101
110
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function normalize<T>(columns:
|
|
1
|
+
import type { TDataTableColumnDef, TDataTableFilterOp } from './types.js';
|
|
2
|
+
export declare function normalize<T>(columns: TDataTableColumnDef<T>[]): TDataTableColumnDef<T>[];
|
|
3
3
|
export declare function defaultAccessor<T>(row: any, id: string): any;
|
|
4
4
|
export declare function compareValues(a: any, b: any): number;
|
|
5
|
-
export declare function applyFilterOp(value: any, op:
|
|
5
|
+
export declare function applyFilterOp(value: any, op: TDataTableFilterOp, target: any): boolean;
|