@r2digisolutions/ui 0.22.2 → 0.22.4
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 +14 -15
- package/dist/components/container/DataTable/DataTable.svelte.d.ts +3 -5
- 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/FilterPanel.svelte +9 -13
- package/dist/components/container/DataTable/components/FilterPanel.svelte.d.ts +1 -1
- 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 +30 -30
- 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,12 +1,11 @@
|
|
|
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 {
|
|
4
|
+
import type {
|
|
5
|
+
TDataTableCellContext,
|
|
6
|
+
TDataTableColumnDef,
|
|
7
|
+
TDataTableTableOptions
|
|
8
|
+
} from './core/types.js';
|
|
10
9
|
import type { Entry } from './components/ContextMenu.svelte';
|
|
11
10
|
import type { FilterField } from './core/filters/types.js';
|
|
12
11
|
import { DataTableManager } from './core/DataTableManager.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) => Entry[];
|
|
25
24
|
rowActions?: (row: T) => any;
|
|
26
25
|
onRowClick?: (row: T) => void;
|
|
27
26
|
density?: 'compact' | 'normal' | 'comfortable';
|
|
@@ -52,9 +51,9 @@
|
|
|
52
51
|
const manager = new DataTableManager<T>(options);
|
|
53
52
|
|
|
54
53
|
let filterValues = $state<Record<string, any>>({});
|
|
55
|
-
let container:
|
|
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(() =>
|
|
@@ -90,11 +89,11 @@
|
|
|
90
89
|
if (!container) return;
|
|
91
90
|
const widths: Record<string, number> = {};
|
|
92
91
|
for (const c of manager.columns) {
|
|
93
|
-
const head = container.querySelector(`[data-dt-head="${c.id}"]`) as
|
|
92
|
+
const head = container.querySelector(`[data-dt-head="${c.id}"]`) as HTMLElement | null;
|
|
94
93
|
let maxW = head ? head.offsetWidth : 0;
|
|
95
94
|
const cells = Array.from(
|
|
96
95
|
container.querySelectorAll(`[data-dt-cell="1"][data-col-id="${c.id}"]`)
|
|
97
|
-
).slice(0, SAMPLE_ROWS) as
|
|
96
|
+
).slice(0, SAMPLE_ROWS) as HTMLElement[];
|
|
98
97
|
for (const el of cells) maxW = Math.max(maxW, el.offsetWidth);
|
|
99
98
|
if (c.minWidth != null) maxW = Math.max(maxW, c.minWidth);
|
|
100
99
|
if (c.width != null) maxW = Math.max(maxW, c.width);
|
|
@@ -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[] {
|
|
@@ -197,7 +196,7 @@
|
|
|
197
196
|
checked={manager.state.items.length > 0 &&
|
|
198
197
|
manager.state.items.every((r) => manager.state.selected.has(rowId(r)))}
|
|
199
198
|
onclick={(e) =>
|
|
200
|
-
(e.currentTarget as
|
|
199
|
+
(e.currentTarget as HTMLInputElement).checked
|
|
201
200
|
? manager.selectAllCurrentPage(rowId)
|
|
202
201
|
: manager.clearSelection()}
|
|
203
202
|
/>
|
|
@@ -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 {
|
|
2
|
+
import type { TDataTableCellContext, TDataTableTableOptions } from './core/types.js';
|
|
5
3
|
import type { Entry } 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) => Entry[];
|
|
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,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Input from '@UI/Input/Input.svelte';
|
|
3
|
-
import type { FilterField } from '../core/filters/types';
|
|
4
|
-
import { buildFilterDefs } from '../core/filters/utils';
|
|
5
|
-
import Checkbox from '@UI/Checkbox/Checkbox.svelte';
|
|
6
|
-
import Button from '@UI/buttons/Button.svelte';
|
|
7
2
|
import { Check, X } from 'lucide-svelte';
|
|
3
|
+
import type { FilterField } from '../core/filters/types.js';
|
|
4
|
+
import { buildFilterDefs } from '../core/filters/utils.js';
|
|
5
|
+
import Input from '../../../ui/Input/Input.svelte';
|
|
6
|
+
import Checkbox from '../../../ui/Checkbox/Checkbox.svelte';
|
|
7
|
+
import Button from '../../../ui/Button/Button.svelte';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
fields: FilterField<any>[];
|
|
@@ -90,16 +90,16 @@
|
|
|
90
90
|
<div class="space-y-3">
|
|
91
91
|
{#each fields as f}
|
|
92
92
|
{#if f.type === 'text'}
|
|
93
|
+
<label class="mb-1 block text-xs opacity-70">{f.label}</label>
|
|
93
94
|
<Input
|
|
94
|
-
label={f.label}
|
|
95
95
|
type="text"
|
|
96
96
|
placeholder={f.placeholder}
|
|
97
97
|
value={values[f.id]}
|
|
98
98
|
onchange={(e) => (values[f.id] = e)}
|
|
99
99
|
/>
|
|
100
100
|
{:else if f.type === 'number'}
|
|
101
|
+
<label class="mb-1 block text-xs opacity-70">{f.label}</label>
|
|
101
102
|
<Input
|
|
102
|
-
label={f.label}
|
|
103
103
|
type="number"
|
|
104
104
|
min={f.min}
|
|
105
105
|
max={f.max}
|
|
@@ -108,12 +108,8 @@
|
|
|
108
108
|
onchange={(e) => (values[f.id] = e)}
|
|
109
109
|
/>
|
|
110
110
|
{:else if f.type === 'date'}
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
type="date"
|
|
114
|
-
value={values[f.id]}
|
|
115
|
-
onchange={(e) => (values[f.id] = e)}
|
|
116
|
-
/>
|
|
111
|
+
<label class="mb-1 block text-xs opacity-70">{f.label}</label>
|
|
112
|
+
<Input type="date" value={values[f.id]} onchange={(e) => (values[f.id] = e)} />
|
|
117
113
|
{:else if f.type === 'checkbox'}
|
|
118
114
|
<Checkbox checked={values[f.id]} label={f.label} onchange={(e) => (values[f.id] = e)} />
|
|
119
115
|
{:else if f.type === 'select'}
|
|
@@ -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
|
|
1
|
+
export type TDataTableRowId = string | number;
|
|
2
|
+
export type TDataTableSortDir = 'asc' | 'desc' | null;
|
|
3
|
+
export type TDataTableColumnKey<T> = Extract<keyof T, string>;
|
|
4
4
|
export type Accessor<T, R = any> = (row: T) => R;
|
|
5
|
-
export type
|
|
6
|
-
type
|
|
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
31
|
accessor: Accessor<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,23 +78,23 @@ 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
|
};
|
|
@@ -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;
|