@contember/bindx-react 0.1.0 → 0.1.3
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/package.json +1 -1
- package/dist/dataview/DataGrid.d.ts +0 -45
- package/dist/dataview/DataGrid.d.ts.map +0 -1
- package/dist/dataview/DataGridPagination.d.ts +0 -24
- package/dist/dataview/DataGridPagination.d.ts.map +0 -1
- package/dist/dataview/DataGridToolbar.d.ts +0 -16
- package/dist/dataview/DataGridToolbar.d.ts.map +0 -1
- package/dist/dataview/DataViewContext.d.ts +0 -32
- package/dist/dataview/DataViewContext.d.ts.map +0 -1
- package/dist/dataview/columns.d.ts +0 -115
- package/dist/dataview/columns.d.ts.map +0 -1
- package/dist/dataview/contextHooks.d.ts +0 -48
- package/dist/dataview/contextHooks.d.ts.map +0 -1
- package/dist/dataview/dataAttribute.d.ts +0 -6
- package/dist/dataview/dataAttribute.d.ts.map +0 -1
- package/dist/dataview/export.d.ts +0 -46
- package/dist/dataview/export.d.ts.map +0 -1
- package/dist/dataview/filterComponents.d.ts +0 -127
- package/dist/dataview/filterComponents.d.ts.map +0 -1
- package/dist/dataview/filterContext.d.ts +0 -10
- package/dist/dataview/filterContext.d.ts.map +0 -1
- package/dist/dataview/filterHooks.d.ts +0 -74
- package/dist/dataview/filterHooks.d.ts.map +0 -1
- package/dist/dataview/filterScope.d.ts +0 -54
- package/dist/dataview/filterScope.d.ts.map +0 -1
- package/dist/dataview/filterWrappers.d.ts +0 -65
- package/dist/dataview/filterWrappers.d.ts.map +0 -1
- package/dist/dataview/index.d.ts +0 -21
- package/dist/dataview/index.d.ts.map +0 -1
- package/dist/dataview/infiniteLoad.d.ts +0 -32
- package/dist/dataview/infiniteLoad.d.ts.map +0 -1
- package/dist/dataview/loaderComponents.d.ts +0 -80
- package/dist/dataview/loaderComponents.d.ts.map +0 -1
- package/dist/dataview/pagingComponents.d.ts +0 -50
- package/dist/dataview/pagingComponents.d.ts.map +0 -1
- package/dist/dataview/renderCellValue.d.ts +0 -9
- package/dist/dataview/renderCellValue.d.ts.map +0 -1
- package/dist/dataview/selectionComponents.d.ts +0 -62
- package/dist/dataview/selectionComponents.d.ts.map +0 -1
- package/dist/dataview/sortingComponents.d.ts +0 -39
- package/dist/dataview/sortingComponents.d.ts.map +0 -1
- package/dist/dataview/stateStorage.d.ts +0 -19
- package/dist/dataview/stateStorage.d.ts.map +0 -1
- package/dist/dataview/useDataView.d.ts +0 -58
- package/dist/dataview/useDataView.d.ts.map +0 -1
- package/dist/dataview/useDataViewState.d.ts +0 -89
- package/dist/dataview/useDataViewState.d.ts.map +0 -1
- package/dist/hooks/createBindx.d.ts +0 -39
- package/dist/hooks/createBindx.d.ts.map +0 -1
- package/dist/hooks/useEntityCore.d.ts +0 -52
- package/dist/hooks/useEntityCore.d.ts.map +0 -1
- package/dist/hooks/useEntityImpl.d.ts +0 -105
- package/dist/hooks/useEntityImpl.d.ts.map +0 -1
- package/dist/hooks/useEntityListCore.d.ts +0 -49
- package/dist/hooks/useEntityListCore.d.ts.map +0 -1
- package/dist/hooks/useEntityListImpl.d.ts +0 -70
- package/dist/hooks/useEntityListImpl.d.ts.map +0 -1
- package/dist/hooks/useSelectionCollectionForList.d.ts +0 -40
- package/dist/hooks/useSelectionCollectionForList.d.ts.map +0 -1
- package/dist/hooks/useStableSelectionMeta.d.ts +0 -11
- package/dist/hooks/useStableSelectionMeta.d.ts.map +0 -1
- package/dist/jsx/inlineProxy.d.ts +0 -14
- package/dist/jsx/inlineProxy.d.ts.map +0 -1
- package/dist/jsx/runtimeProxy.d.ts +0 -11
- package/dist/jsx/runtimeProxy.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataGrid component — headless data grid context provider with two-pass rendering,
|
|
3
|
-
* integrated filtering, sorting, and pagination state management.
|
|
4
|
-
*
|
|
5
|
-
* The DataGrid extracts column metadata from the `columns` render callback,
|
|
6
|
-
* manages all state (filtering, sorting, paging, selection), loads data,
|
|
7
|
-
* and provides everything via DataViewContext. It does NOT render any UI —
|
|
8
|
-
* use composable components or the bindx-ui package for rendering.
|
|
9
|
-
*/
|
|
10
|
-
import React, { type ReactElement } from 'react';
|
|
11
|
-
import type { EntityWhere, OrderDirection, DataViewLayout, SelectionValues } from '@contember/bindx';
|
|
12
|
-
import type { StateStorageOrName } from './stateStorage.js';
|
|
13
|
-
import type { EntityAccessor } from '../jsx/types.js';
|
|
14
|
-
/** Well-known filter name for the universal query filter */
|
|
15
|
-
export declare const QUERY_FILTER_NAME = "__query";
|
|
16
|
-
export interface DataGridProps<TSchema, K extends keyof TSchema> {
|
|
17
|
-
/** Entity type name */
|
|
18
|
-
entity: K;
|
|
19
|
-
/** Column definitions: receives entity proxy `it`, returns column components */
|
|
20
|
-
columns: (it: EntityAccessor<TSchema[K]>) => React.ReactNode;
|
|
21
|
-
/** Rendered content within the DataViewProvider context */
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
/** Initial sorting (supports multi-column: { title: 'asc', date: 'desc' }) */
|
|
24
|
-
initialSorting?: Partial<Record<string, OrderDirection>>;
|
|
25
|
-
/** Items per page. null = show all. Default: 50 */
|
|
26
|
-
itemsPerPage?: number | null;
|
|
27
|
-
/** Static filter (combined with dynamic filters) */
|
|
28
|
-
filter?: EntityWhere<TSchema[K]>;
|
|
29
|
-
/** Available layouts */
|
|
30
|
-
layouts?: readonly DataViewLayout[];
|
|
31
|
-
/** Initial selection (layout + visibility) */
|
|
32
|
-
initialSelection?: SelectionValues;
|
|
33
|
-
/** State storage for filter/sorting/selection state */
|
|
34
|
-
stateStorage?: StateStorageOrName;
|
|
35
|
-
/** State storage for current page */
|
|
36
|
-
currentPageStateStorage?: StateStorageOrName;
|
|
37
|
-
/** State storage for page size preference */
|
|
38
|
-
pagingSettingsStorage?: StateStorageOrName;
|
|
39
|
-
/** Storage key prefix for isolation */
|
|
40
|
-
storageKey?: string;
|
|
41
|
-
}
|
|
42
|
-
declare function DataGridImpl<TSchema, K extends keyof TSchema>({ entity, columns: columnDefiner, children, initialSorting, itemsPerPage, filter: staticFilter, layouts, initialSelection, stateStorage, currentPageStateStorage, pagingSettingsStorage, storageKey, }: DataGridProps<TSchema, K>): ReactElement | null;
|
|
43
|
-
export declare const DataGrid: typeof DataGridImpl;
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=DataGrid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/dataview/DataGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAQ,KAAK,YAAY,EAAqD,MAAM,OAAO,CAAA;AACzG,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EAId,cAAc,EACd,eAAe,EACf,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAO3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAKrD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,YAAY,CAAA;AAM1C,MAAM,WAAW,aAAa,CAAC,OAAO,EAAE,CAAC,SAAS,MAAM,OAAO;IAC9D,uBAAuB;IACvB,MAAM,EAAE,CAAC,CAAA;IACT,gFAAgF;IAChF,OAAO,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAA;IAC5D,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;IACxD,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,oDAAoD;IACpD,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IAChC,wBAAwB;IACxB,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IACnC,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,eAAe,CAAA;IAClC,uDAAuD;IACvD,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,qCAAqC;IACrC,uBAAuB,CAAC,EAAE,kBAAkB,CAAA;IAC5C,6CAA6C;IAC7C,qBAAqB,CAAC,EAAE,kBAAkB,CAAA;IAC1C,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAMD,iBAAS,YAAY,CAAC,OAAO,EAAE,CAAC,SAAS,MAAM,OAAO,EAAE,EACvD,MAAM,EACN,OAAO,EAAE,aAAa,EACtB,QAAQ,EACR,cAAc,EACd,YAAiB,EACjB,MAAM,EAAE,YAAY,EACpB,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,GACV,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,YAAY,GAAG,IAAI,CAyJjD;AAMD,eAAO,MAAM,QAAQ,EAAoC,OAAO,YAAY,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataGrid pagination component.
|
|
3
|
-
*
|
|
4
|
-
* Renders page navigation controls using the DataView context's paging state.
|
|
5
|
-
* Must be used within a DataGrid (which provides DataViewContext).
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <DataGrid entity="Article" itemsPerPage={20}>
|
|
10
|
-
* {it => (...)}
|
|
11
|
-
* </DataGrid>
|
|
12
|
-
* // or as a standalone within the DataView context:
|
|
13
|
-
* <DataGridPagination />
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
import { type ReactElement } from 'react';
|
|
17
|
-
export interface DataGridPaginationProps {
|
|
18
|
-
/** Available page sizes */
|
|
19
|
-
pageSizes?: readonly number[];
|
|
20
|
-
/** Enable sticky positioning */
|
|
21
|
-
sticky?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare function DataGridPagination({ pageSizes, sticky, }?: DataGridPaginationProps): ReactElement;
|
|
24
|
-
//# sourceMappingURL=DataGridPagination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridPagination.d.ts","sourceRoot":"","sources":["../../src/dataview/DataGridPagination.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAA;AAGhD,MAAM,WAAW,uBAAuB;IACvC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAAC,EAClC,SAA6B,EAC7B,MAAM,GACN,GAAE,uBAA4B,GAAG,YAAY,CAgE7C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataGrid toolbar component.
|
|
3
|
-
*
|
|
4
|
-
* Renders filter controls, query filter, settings (visibility/layout/pageSize),
|
|
5
|
-
* reload and export buttons. Supports sticky positioning.
|
|
6
|
-
*/
|
|
7
|
-
import React, { type ReactElement } from 'react';
|
|
8
|
-
export interface DataGridToolbarProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/** Enable sticky positioning */
|
|
11
|
-
sticky?: boolean;
|
|
12
|
-
/** Page size options for settings (default: [10, 20, 50, 100]) */
|
|
13
|
-
pageSizes?: readonly number[];
|
|
14
|
-
}
|
|
15
|
-
export declare function DataGridToolbar({ children, sticky, pageSizes }: DataGridToolbarProps): ReactElement;
|
|
16
|
-
//# sourceMappingURL=DataGridToolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridToolbar.d.ts","sourceRoot":"","sources":["../../src/dataview/DataGridToolbar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAA4C,MAAM,OAAO,CAAA;AAc1F,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAA6B,EAAE,EAAE,oBAAoB,GAAG,YAAY,CAwKvH"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataView context — provides filtering, sorting, paging, selection state,
|
|
3
|
-
* and utility methods to descendant components.
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { FilteringState, SortingStateResult, PagingStateResult, SelectionStateResult } from './useDataViewState.js';
|
|
7
|
-
import type { ColumnMeta } from './columns.js';
|
|
8
|
-
import type { SelectionMeta } from '@contember/bindx';
|
|
9
|
-
export type DataViewLoaderState = 'initial' | 'loaded' | 'refreshing' | 'failed';
|
|
10
|
-
export interface DataViewItem {
|
|
11
|
-
readonly id: string;
|
|
12
|
-
readonly data: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface DataViewContextValue {
|
|
15
|
-
readonly filtering: FilteringState;
|
|
16
|
-
readonly sorting: SortingStateResult;
|
|
17
|
-
readonly paging: PagingStateResult;
|
|
18
|
-
readonly selection: SelectionStateResult;
|
|
19
|
-
readonly columns: readonly ColumnMeta[];
|
|
20
|
-
readonly entityType: string;
|
|
21
|
-
readonly items: readonly DataViewItem[];
|
|
22
|
-
readonly itemCount: number;
|
|
23
|
-
readonly loaderState: DataViewLoaderState;
|
|
24
|
-
readonly reload: () => void;
|
|
25
|
-
readonly highlightIndex: number | null;
|
|
26
|
-
readonly setHighlightIndex: (index: number | null) => void;
|
|
27
|
-
readonly selectionMeta: SelectionMeta;
|
|
28
|
-
}
|
|
29
|
-
export declare function useDataViewContext(): DataViewContextValue;
|
|
30
|
-
export declare function useOptionalDataViewContext(): DataViewContextValue | null;
|
|
31
|
-
export declare const DataViewProvider: React.Provider<DataViewContextValue | null>;
|
|
32
|
-
//# sourceMappingURL=DataViewContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewContext.d.ts","sourceRoot":"","sources":["../../src/dataview/DataViewContext.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAoC,MAAM,OAAO,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACxH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAA;AAEhF,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAA;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAA;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAA;CACrC;AAID,wBAAgB,kBAAkB,IAAI,oBAAoB,CAMzD;AAED,wBAAgB,0BAA0B,IAAI,oBAAoB,GAAG,IAAI,CAExE;AAED,eAAO,MAAM,gBAAgB,6CAA2B,CAAA"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataGrid column components.
|
|
3
|
-
*
|
|
4
|
-
* These are "metadata" components --- they are not rendered directly.
|
|
5
|
-
* Instead, the DataGrid parent analyzes them to extract column definitions,
|
|
6
|
-
* selection metadata, and filter/sort configuration.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import type { FieldRefBase, HasOneRef, HasManyRef } from '../jsx/types.js';
|
|
10
|
-
import type { FilterHandler, FilterArtifact } from '@contember/bindx';
|
|
11
|
-
export declare const COLUMN_META: unique symbol;
|
|
12
|
-
/**
|
|
13
|
-
* Column metadata extracted during collection phase.
|
|
14
|
-
*/
|
|
15
|
-
export interface ColumnMeta {
|
|
16
|
-
readonly type: 'text' | 'number' | 'date' | 'dateTime' | 'boolean' | 'enum' | 'enumList' | 'uuid' | 'isDefined' | 'hasOne' | 'hasMany' | 'action' | 'custom';
|
|
17
|
-
/** Field name on entity (null for action column) */
|
|
18
|
-
readonly fieldName: string | null;
|
|
19
|
-
/** Column header text */
|
|
20
|
-
readonly header: React.ReactNode;
|
|
21
|
-
/** Whether column supports sorting */
|
|
22
|
-
readonly sortable: boolean;
|
|
23
|
-
/** Whether column has filtering enabled */
|
|
24
|
-
readonly filterable: boolean;
|
|
25
|
-
/** Filter handler for this column */
|
|
26
|
-
readonly filterHandler?: FilterHandler<FilterArtifact>;
|
|
27
|
-
/** Render function for relation content (hasOne/hasMany children callback) */
|
|
28
|
-
readonly relationRenderer?: (ref: unknown) => React.ReactNode;
|
|
29
|
-
/** Enum options (for enum/enumList columns) */
|
|
30
|
-
readonly enumOptions?: readonly string[];
|
|
31
|
-
/** Custom cell renderer */
|
|
32
|
-
readonly cellRenderer?: (value: unknown) => React.ReactNode;
|
|
33
|
-
}
|
|
34
|
-
export interface ColumnElementProps {
|
|
35
|
-
[COLUMN_META]: ColumnMeta;
|
|
36
|
-
}
|
|
37
|
-
interface DataGridScalarColumnPropsBase<T> {
|
|
38
|
-
field: FieldRefBase<T>;
|
|
39
|
-
header?: React.ReactNode;
|
|
40
|
-
sortable?: boolean;
|
|
41
|
-
filter?: boolean;
|
|
42
|
-
children?: (value: T | null) => React.ReactNode;
|
|
43
|
-
}
|
|
44
|
-
export interface DataGridTextColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
45
|
-
}
|
|
46
|
-
export interface DataGridNumberColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
47
|
-
}
|
|
48
|
-
export interface DataGridDateColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
49
|
-
}
|
|
50
|
-
export interface DataGridDateTimeColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
51
|
-
}
|
|
52
|
-
export interface DataGridBooleanColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
53
|
-
}
|
|
54
|
-
export interface DataGridUuidColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
55
|
-
}
|
|
56
|
-
export interface DataGridIsDefinedColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
57
|
-
}
|
|
58
|
-
export interface DataGridEnumColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
59
|
-
options: readonly string[];
|
|
60
|
-
}
|
|
61
|
-
export interface DataGridEnumListColumnProps<T> extends DataGridScalarColumnPropsBase<T> {
|
|
62
|
-
options: readonly string[];
|
|
63
|
-
}
|
|
64
|
-
export declare function DataGridTextColumn<T>(_props: DataGridTextColumnProps<T>): React.ReactElement | null;
|
|
65
|
-
export declare function DataGridNumberColumn<T>(_props: DataGridNumberColumnProps<T>): React.ReactElement | null;
|
|
66
|
-
export declare function DataGridDateColumn<T>(_props: DataGridDateColumnProps<T>): React.ReactElement | null;
|
|
67
|
-
export declare function DataGridDateTimeColumn<T>(_props: DataGridDateTimeColumnProps<T>): React.ReactElement | null;
|
|
68
|
-
export declare function DataGridBooleanColumn<T>(_props: DataGridBooleanColumnProps<T>): React.ReactElement | null;
|
|
69
|
-
export declare function DataGridEnumColumn<T>(_props: DataGridEnumColumnProps<T>): React.ReactElement | null;
|
|
70
|
-
export declare function DataGridEnumListColumn<T>(_props: DataGridEnumListColumnProps<T>): React.ReactElement | null;
|
|
71
|
-
export declare function DataGridUuidColumn<T>(_props: DataGridUuidColumnProps<T>): React.ReactElement | null;
|
|
72
|
-
export declare function DataGridIsDefinedColumn<T>(_props: DataGridIsDefinedColumnProps<T>): React.ReactElement | null;
|
|
73
|
-
export interface DataGridHasOneColumnProps<TEntity, TSelected> {
|
|
74
|
-
field: HasOneRef<TEntity, TSelected> | FieldRefBase<unknown>;
|
|
75
|
-
header?: React.ReactNode;
|
|
76
|
-
children: (entity: unknown) => React.ReactNode;
|
|
77
|
-
}
|
|
78
|
-
export declare function DataGridHasOneColumn<TEntity, TSelected>(_props: DataGridHasOneColumnProps<TEntity, TSelected>): React.ReactElement | null;
|
|
79
|
-
export interface DataGridHasManyColumnProps<TEntity, TSelected> {
|
|
80
|
-
field: HasManyRef<TEntity, TSelected> | FieldRefBase<unknown>;
|
|
81
|
-
header?: React.ReactNode;
|
|
82
|
-
children: (entity: unknown) => React.ReactNode;
|
|
83
|
-
}
|
|
84
|
-
export declare function DataGridHasManyColumn<TEntity, TSelected>(_props: DataGridHasManyColumnProps<TEntity, TSelected>): React.ReactElement | null;
|
|
85
|
-
export interface DataGridActionColumnProps {
|
|
86
|
-
children: React.ReactNode | ((entity: unknown) => React.ReactNode);
|
|
87
|
-
header?: React.ReactNode;
|
|
88
|
-
}
|
|
89
|
-
export declare function DataGridActionColumn(_props: DataGridActionColumnProps): React.ReactElement | null;
|
|
90
|
-
export interface DataGridColumnProps<T> {
|
|
91
|
-
field?: FieldRefBase<T>;
|
|
92
|
-
header?: React.ReactNode;
|
|
93
|
-
sortable?: boolean;
|
|
94
|
-
filter?: boolean;
|
|
95
|
-
filterHandler?: FilterHandler<FilterArtifact>;
|
|
96
|
-
children?: (value: T | null) => React.ReactNode;
|
|
97
|
-
}
|
|
98
|
-
export declare function DataGridColumn<T>(_props: DataGridColumnProps<T>): React.ReactElement | null;
|
|
99
|
-
/**
|
|
100
|
-
* Extract field name from a field ref (works in both collector and runtime proxies)
|
|
101
|
-
*/
|
|
102
|
-
export declare function extractFieldName(ref: unknown): string | null;
|
|
103
|
-
/**
|
|
104
|
-
* Extract column metadata from a JSX element tree.
|
|
105
|
-
*
|
|
106
|
-
* Walks the children returned by the DataGrid render callback
|
|
107
|
-
* and collects column definitions, including filter handlers
|
|
108
|
-
* when `filter` prop is enabled on a column.
|
|
109
|
-
*
|
|
110
|
-
* When a collector proxy is provided, relation renderers are called
|
|
111
|
-
* during collection to capture nested field accesses for the selection.
|
|
112
|
-
*/
|
|
113
|
-
export declare function extractColumns(elements: React.ReactNode, collectorProxy?: unknown): ColumnMeta[];
|
|
114
|
-
export {};
|
|
115
|
-
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../src/dataview/columns.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK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KAAK,CAAC,YAAY,GAAG,IAAI,CAE3F;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAM5D;AAsED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,UAAU,EAAE,CAyFhG"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fine-grained context hooks matching Contember's react-dataview API.
|
|
3
|
-
*
|
|
4
|
-
* These hooks provide convenient access to specific parts of the DataView context,
|
|
5
|
-
* matching Contember's pattern of separate state/methods hooks per concern.
|
|
6
|
-
*/
|
|
7
|
-
import type { FilteringState } from './useDataViewState.js';
|
|
8
|
-
import type { SortingState, SortingDirectionAction, PagingState, PagingInfo, OrderDirection, FilterHandler, FilterArtifact, DataViewLayout } from '@contember/bindx';
|
|
9
|
-
export interface DataViewSortingMethods {
|
|
10
|
-
setOrderBy(field: string, action: SortingDirectionAction, append?: boolean): void;
|
|
11
|
-
}
|
|
12
|
-
export declare function useDataViewSortingState(): SortingState;
|
|
13
|
-
export declare function useDataViewSortingMethods(): DataViewSortingMethods;
|
|
14
|
-
export declare function useDataViewSortingDirection(field: string): OrderDirection | null;
|
|
15
|
-
export interface DataViewPagingMethods {
|
|
16
|
-
goToPage(page: number | 'first' | 'next' | 'previous' | 'last'): void;
|
|
17
|
-
setItemsPerPage(count: number | null): void;
|
|
18
|
-
refreshTotalCount(): void;
|
|
19
|
-
}
|
|
20
|
-
export declare function useDataViewPagingState(): PagingState;
|
|
21
|
-
export declare function useDataViewPagingInfo(): PagingInfo;
|
|
22
|
-
export declare function useDataViewPagingMethods(): DataViewPagingMethods;
|
|
23
|
-
export interface DataViewFilteringMethods {
|
|
24
|
-
setFilter(name: string, artifact: FilterArtifact): void;
|
|
25
|
-
}
|
|
26
|
-
export declare function useDataViewFilteringState(): FilteringState;
|
|
27
|
-
export declare function useDataViewFilteringMethods(): DataViewFilteringMethods;
|
|
28
|
-
export declare function useDataViewFilterHandlerRegistry(): ReadonlyMap<string, {
|
|
29
|
-
handler: FilterHandler<FilterArtifact>;
|
|
30
|
-
}>;
|
|
31
|
-
export interface DataViewSelectionState {
|
|
32
|
-
readonly layout: string | undefined;
|
|
33
|
-
readonly visibility: Record<string, boolean | undefined>;
|
|
34
|
-
readonly layouts: readonly DataViewLayout[];
|
|
35
|
-
}
|
|
36
|
-
export interface DataViewSelectionMethods {
|
|
37
|
-
setLayout(layout: string | undefined): void;
|
|
38
|
-
setVisibility(name: string, visible: boolean): void;
|
|
39
|
-
}
|
|
40
|
-
export declare function useDataViewSelectionState(): DataViewSelectionState;
|
|
41
|
-
export declare function useDataViewSelectionMethods(): DataViewSelectionMethods;
|
|
42
|
-
export interface DataViewElementData {
|
|
43
|
-
readonly name: string;
|
|
44
|
-
readonly label?: React.ReactNode;
|
|
45
|
-
readonly fallback?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export declare function useDataViewElements(): readonly DataViewElementData[];
|
|
48
|
-
//# sourceMappingURL=contextHooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextHooks.d.ts","sourceRoot":"","sources":["../../src/dataview/contextHooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,cAAc,EAA+D,MAAM,uBAAuB,CAAA;AACxH,OAAO,KAAK,EACX,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,cAAc,EACd,MAAM,kBAAkB,CAAA;AAMzB,MAAM,WAAW,sBAAsB;IACtC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjF;AAED,wBAAgB,uBAAuB,IAAI,YAAY,CAEtD;AAED,wBA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E;AAED,wBAAgB,2BAA2B,IAAI,wBAAwB,CAMtE;AAMD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAgB,mBAAmB,IAAI,SAAS,mBAAmB,EAAE,CAYpE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataAttribute.d.ts","sourceRoot":"","sources":["../../src/dataview/dataAttribute.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,EAAE,GAAG,SAAS,CAE5D"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DataView export functionality.
|
|
3
|
-
*
|
|
4
|
-
* Provides CSV export and a trigger component that downloads all matching data.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <DataViewExportTrigger baseName="articles">
|
|
9
|
-
* <button>Export CSV</button>
|
|
10
|
-
* </DataViewExportTrigger>
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
export interface ExportResult {
|
|
15
|
-
readonly blob: Blob;
|
|
16
|
-
readonly extension: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ExportFactoryArgs {
|
|
19
|
-
readonly data: readonly Record<string, unknown>[];
|
|
20
|
-
readonly columns: readonly {
|
|
21
|
-
name: string;
|
|
22
|
-
fieldName: string | null;
|
|
23
|
-
}[];
|
|
24
|
-
}
|
|
25
|
-
export interface ExportFactory {
|
|
26
|
-
create(args: ExportFactoryArgs): ExportResult;
|
|
27
|
-
}
|
|
28
|
-
export declare class CsvExportFactory implements ExportFactory {
|
|
29
|
-
create({ data, columns }: ExportFactoryArgs): ExportResult;
|
|
30
|
-
}
|
|
31
|
-
export interface DataViewExportTriggerProps {
|
|
32
|
-
/** Button element */
|
|
33
|
-
children: React.ReactElement;
|
|
34
|
-
/** Base file name. Default: entityType-date */
|
|
35
|
-
baseName?: string;
|
|
36
|
-
/** Export factory. Default: CSV */
|
|
37
|
-
exportFactory?: ExportFactory;
|
|
38
|
-
/** Only export visible columns (respects selection state). Default: false */
|
|
39
|
-
onlyVisible?: boolean;
|
|
40
|
-
}
|
|
41
|
-
export declare const DataViewExportTrigger: React.ForwardRefExoticComponent<DataViewExportTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
42
|
-
export interface FetchAllDataResult {
|
|
43
|
-
data: readonly Record<string, unknown>[];
|
|
44
|
-
}
|
|
45
|
-
export declare function useDataViewFetchAllData(): () => Promise<FetchAllDataResult | null>;
|
|
46
|
-
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/dataview/export.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAA+D,MAAM,OAAO,CAAA;AAWnF,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACjD,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAA;CACvE;AAED,MAAM,WAAW,aAAa;IAC7B,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,YAAY,CAAA;CAC7C;AAMD,qBAAa,gBAAiB,YAAW,aAAa;IACrD,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,iBAAiB,GAAG,YAAY;CAqB1D;AAyCD,MAAM,WAAW,0BAA0B;IAC1C,qBAAqB;IACrB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAA;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,qBAAqB,sGAyEjC,CAAA;AAOD,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACxC;AAED,wBAAgB,uBAAuB,IAAI,MAAM,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA0BlF"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composable filter UI components using Radix Slot pattern.
|
|
3
|
-
*
|
|
4
|
-
* All trigger components use `@radix-ui/react-slot` for proper prop merging
|
|
5
|
-
* and `forwardRef` for ref forwarding. Filter names can be inferred from
|
|
6
|
-
* context (via DataViewTextFilter, DataViewFilterScope, etc.) or passed explicitly.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* ```tsx
|
|
10
|
-
* // With explicit name
|
|
11
|
-
* <DataViewTextFilterInput name="title">
|
|
12
|
-
* <input placeholder="Search..." />
|
|
13
|
-
* </DataViewTextFilterInput>
|
|
14
|
-
*
|
|
15
|
-
* // With context-inferred name
|
|
16
|
-
* <DataViewTextFilter field="title">
|
|
17
|
-
* <DataViewTextFilterInput>
|
|
18
|
-
* <input placeholder="Search..." />
|
|
19
|
-
* </DataViewTextFilterInput>
|
|
20
|
-
* <DataViewTextFilterMatchModeTrigger mode="contains">
|
|
21
|
-
* <button>Contains</button>
|
|
22
|
-
* </DataViewTextFilterMatchModeTrigger>
|
|
23
|
-
* </DataViewTextFilter>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
import React, { type ReactElement, type ReactNode } from 'react';
|
|
27
|
-
import { type DataViewSetBooleanFilterAction, type DataViewSetEnumFilterAction, type DataViewSetRelationFilterAction, type DataViewSetNullFilterAction } from './filterHooks.js';
|
|
28
|
-
import type { TextFilterArtifact } from '@contember/bindx';
|
|
29
|
-
export { useDataViewFilter, } from './filterHooks.js';
|
|
30
|
-
export type { UseDataViewFilterResult as DataViewFilterState } from './filterHooks.js';
|
|
31
|
-
export interface DataViewTextFilterInputProps {
|
|
32
|
-
name?: string;
|
|
33
|
-
debounceMs?: number;
|
|
34
|
-
children: ReactElement;
|
|
35
|
-
}
|
|
36
|
-
export declare const DataViewTextFilterInput: React.ForwardRefExoticComponent<DataViewTextFilterInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
-
export interface DataViewTextFilterMatchModeTriggerProps {
|
|
38
|
-
name?: string;
|
|
39
|
-
mode: TextFilterArtifact['mode'];
|
|
40
|
-
children: ReactElement;
|
|
41
|
-
}
|
|
42
|
-
export declare const DataViewTextFilterMatchModeTrigger: React.ForwardRefExoticComponent<DataViewTextFilterMatchModeTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
43
|
-
export interface DataViewTextFilterMatchModeLabelProps {
|
|
44
|
-
name?: string;
|
|
45
|
-
}
|
|
46
|
-
export declare function DataViewTextFilterMatchModeLabel({ name, }: DataViewTextFilterMatchModeLabelProps): ReactElement;
|
|
47
|
-
export interface DataViewTextFilterResetTriggerProps {
|
|
48
|
-
name?: string;
|
|
49
|
-
children: ReactElement;
|
|
50
|
-
}
|
|
51
|
-
export declare const DataViewTextFilterResetTrigger: React.ForwardRefExoticComponent<DataViewTextFilterResetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
|
-
export interface DataViewNumberFilterInputProps {
|
|
53
|
-
name?: string;
|
|
54
|
-
type: 'from' | 'to';
|
|
55
|
-
allowFloat?: boolean;
|
|
56
|
-
children: ReactElement;
|
|
57
|
-
}
|
|
58
|
-
export declare const DataViewNumberFilterInput: React.ForwardRefExoticComponent<DataViewNumberFilterInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
59
|
-
export interface DataViewDateFilterInputProps {
|
|
60
|
-
name?: string;
|
|
61
|
-
type: 'start' | 'end';
|
|
62
|
-
children: ReactElement;
|
|
63
|
-
}
|
|
64
|
-
export declare const DataViewDateFilterInput: React.ForwardRefExoticComponent<DataViewDateFilterInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
65
|
-
export interface DataViewBooleanFilterTriggerProps {
|
|
66
|
-
name?: string;
|
|
67
|
-
value: boolean;
|
|
68
|
-
action?: DataViewSetBooleanFilterAction;
|
|
69
|
-
children: ReactElement;
|
|
70
|
-
}
|
|
71
|
-
export declare const DataViewBooleanFilterTrigger: React.ForwardRefExoticComponent<DataViewBooleanFilterTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
72
|
-
export interface DataViewEnumFilterTriggerProps {
|
|
73
|
-
name?: string;
|
|
74
|
-
value: string;
|
|
75
|
-
action?: DataViewSetEnumFilterAction;
|
|
76
|
-
children: ReactElement;
|
|
77
|
-
}
|
|
78
|
-
export declare const DataViewEnumFilterTrigger: React.ForwardRefExoticComponent<DataViewEnumFilterTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
79
|
-
export interface DataViewEnumFilterStateProps {
|
|
80
|
-
name?: string;
|
|
81
|
-
value: string;
|
|
82
|
-
children: (state: {
|
|
83
|
-
isIncluded: boolean;
|
|
84
|
-
isExcluded: boolean;
|
|
85
|
-
}) => ReactNode;
|
|
86
|
-
}
|
|
87
|
-
export declare function DataViewEnumFilterState({ name, value, children, }: DataViewEnumFilterStateProps): ReactElement;
|
|
88
|
-
export interface DataViewRelationFilterTriggerProps {
|
|
89
|
-
name?: string;
|
|
90
|
-
id: string;
|
|
91
|
-
action?: DataViewSetRelationFilterAction;
|
|
92
|
-
children: ReactElement;
|
|
93
|
-
}
|
|
94
|
-
export declare const DataViewRelationFilterTrigger: React.ForwardRefExoticComponent<DataViewRelationFilterTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
95
|
-
export interface DataViewRelationFilterStateProps {
|
|
96
|
-
name?: string;
|
|
97
|
-
id: string;
|
|
98
|
-
children: (state: {
|
|
99
|
-
isIncluded: boolean;
|
|
100
|
-
isExcluded: boolean;
|
|
101
|
-
}) => ReactNode;
|
|
102
|
-
}
|
|
103
|
-
export declare function DataViewRelationFilterState({ name, id, children, }: DataViewRelationFilterStateProps): ReactElement;
|
|
104
|
-
export interface DataViewNullFilterTriggerProps {
|
|
105
|
-
name?: string;
|
|
106
|
-
action: DataViewSetNullFilterAction;
|
|
107
|
-
children: ReactElement;
|
|
108
|
-
}
|
|
109
|
-
export declare const DataViewNullFilterTrigger: React.ForwardRefExoticComponent<DataViewNullFilterTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
110
|
-
export interface DataViewFilterResetTriggerProps {
|
|
111
|
-
name?: string;
|
|
112
|
-
children: ReactElement;
|
|
113
|
-
}
|
|
114
|
-
export declare const DataViewFilterResetTrigger: React.ForwardRefExoticComponent<DataViewFilterResetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
115
|
-
export interface DataViewDateFilterResetTriggerProps {
|
|
116
|
-
name?: string;
|
|
117
|
-
/** Which part to reset: 'start', 'end', or undefined (both) */
|
|
118
|
-
type?: 'start' | 'end';
|
|
119
|
-
children: ReactElement;
|
|
120
|
-
}
|
|
121
|
-
export declare const DataViewDateFilterResetTrigger: React.ForwardRefExoticComponent<DataViewDateFilterResetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
122
|
-
export interface DataViewNumberFilterResetTriggerProps {
|
|
123
|
-
name?: string;
|
|
124
|
-
children: ReactElement;
|
|
125
|
-
}
|
|
126
|
-
export declare const DataViewNumberFilterResetTrigger: React.ForwardRefExoticComponent<DataViewNumberFilterResetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
127
|
-
//# sourceMappingURL=filterComponents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterComponents.d.ts","sourceRoot":"","sources":["../../src/dataview/filterComponents.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAe,MAAM,OAAO,CAAA;AAKzF,OAAO,EASN,KAAK,8BAA8B,EAEnC,KAAK,2BAA2B,EAEhC,KAAK,+BAA+B,EAEpC,KAAK,2BAA2B,EAEhC,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAEX,kBAAkB,EAIlB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EACN,iBAAiB,GACjB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,uBAAuB,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAkBtF,MAAM,WAAW,4BAA4B;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,uBAAuB,uGAWnC,CAAA;AAOD,MAAM,WAAW,uCAAuC;IACvD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAChC,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,kCAAkC,mHAe9C,CAAA;AAOD,MAAM,WAAW,qCAAqC;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAUD,wBAAgB,gCAAgC,CAAC,EAChD,IAAI,GACJ,EAAE,qCAAqC,GAAG,YAAY,CAKtD;AAMD,MAAM,WAAW,mCAAmC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,8BAA8B,+GAsB1C,CAAA;AA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,MAAM,CAAC,EAAE,+BAA+B,CAAA;IACxC,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,6BAA6B,8GAsBzC,CAAA;AAeD,MAAM,WAAW,gCAAgC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAA;CAC5E;AAED,wBAAgB,2BAA2B,CAAC,EAC3C,IAAI,EACJ,EAAE,EACF,QAAQ,GACR,EAAE,gCAAgC,GAAG,YAAY,CAUjD;AAMD,MAAM,WAAW,8BAA8B;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,2BAA2B,CAAA;IACnC,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,yBAAyB,0GAsBrC,CAAA;AAeD,MAAM,WAAW,+BAA+B;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,0BAA0B,2GAuBtC,CAAA;AAOD,MAAM,WAAW,mCAAmC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IACtB,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,8BAA8B,+GAgC1C,CAAA;AAOD,MAAM,WAAW,qCAAqC;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,YAAY,CAAA;CACtB;AAED,eAAO,MAAM,gCAAgC,iHAsB5C,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter name context — provides the current filter name to descendant components.
|
|
3
|
-
*
|
|
4
|
-
* Used by DataViewTextFilter, DataViewBooleanFilter, etc. to scope
|
|
5
|
-
* trigger components so they don't need an explicit `name` prop.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useDataViewFilterName(): string;
|
|
8
|
-
export declare function useOptionalDataViewFilterName(): string | null;
|
|
9
|
-
export declare const DataViewFilterNameProvider: import("react").Provider<string | null>;
|
|
10
|
-
//# sourceMappingURL=filterContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterContext.d.ts","sourceRoot":"","sources":["../../src/dataview/filterContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,wBAAgB,qBAAqB,IAAI,MAAM,CAS9C;AAED,wBAAgB,6BAA6B,IAAI,MAAM,GAAG,IAAI,CAE7D;AAED,eAAO,MAAM,0BAA0B,yCAAqC,CAAA"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter hooks — typed state access and action hooks for filter components.
|
|
3
|
-
*
|
|
4
|
-
* These hooks match the Contember react-dataview API:
|
|
5
|
-
* - useDataViewFilter: generic [state, setFilter, meta] tuple
|
|
6
|
-
* - useDataViewBooleanFilter: [current, set] with action types
|
|
7
|
-
* - useDataViewEnumFilter: [current, set] with include/exclude/toggle actions
|
|
8
|
-
* - useDataViewRelationFilter: [current, set] with include/exclude/toggle actions
|
|
9
|
-
* - useDataViewTextFilterInput: { value, onChange } with debounce
|
|
10
|
-
* - useDataViewTextFilterMatchMode: [isCurrent, set]
|
|
11
|
-
* - useDataViewNullFilter: [state, set] with include/exclude/toggle actions
|
|
12
|
-
*/
|
|
13
|
-
import { type ChangeEvent, type SetStateAction } from 'react';
|
|
14
|
-
import type { FilterArtifact, TextFilterArtifact } from '@contember/bindx';
|
|
15
|
-
export type UseDataViewFilterResult<T extends FilterArtifact> = [
|
|
16
|
-
state: T | undefined,
|
|
17
|
-
setFilter: (filter: SetStateAction<T | undefined>) => void,
|
|
18
|
-
meta: {
|
|
19
|
-
isEmpty?: boolean;
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
export declare function useDataViewFilter<T extends FilterArtifact>(key: string): UseDataViewFilterResult<T>;
|
|
23
|
-
export type DataViewSetBooleanFilterAction = 'include' | 'unset' | 'toggle';
|
|
24
|
-
export type DataViewBooleanFilterCurrent = 'include' | 'none';
|
|
25
|
-
export type UseDataViewBooleanFilterResult = [
|
|
26
|
-
current: DataViewBooleanFilterCurrent,
|
|
27
|
-
set: (action: DataViewSetBooleanFilterAction) => void
|
|
28
|
-
];
|
|
29
|
-
export declare function useDataViewBooleanFilter(name: string, value: boolean): UseDataViewBooleanFilterResult;
|
|
30
|
-
export declare function useDataViewBooleanFilterFactory(name: string): (value: boolean) => UseDataViewBooleanFilterResult;
|
|
31
|
-
export type DataViewSetEnumFilterAction = 'include' | 'exclude' | 'unset' | 'toggleInclude' | 'toggleExclude';
|
|
32
|
-
export type DataViewEnumFilterCurrent = 'include' | 'exclude' | 'none';
|
|
33
|
-
export type UseDataViewEnumFilterResult = [
|
|
34
|
-
current: DataViewEnumFilterCurrent,
|
|
35
|
-
set: (action: DataViewSetEnumFilterAction) => void
|
|
36
|
-
];
|
|
37
|
-
export declare function useDataViewEnumFilter(name: string, value: string): UseDataViewEnumFilterResult;
|
|
38
|
-
export declare function useDataViewEnumFilterFactory(name: string): (value: string) => UseDataViewEnumFilterResult;
|
|
39
|
-
export type DataViewSetRelationFilterAction = 'include' | 'exclude' | 'unset' | 'toggleInclude' | 'toggleExclude';
|
|
40
|
-
export type DataViewRelationFilterCurrent = 'include' | 'exclude' | 'none';
|
|
41
|
-
export type UseDataViewRelationFilterResult = [
|
|
42
|
-
current: DataViewRelationFilterCurrent,
|
|
43
|
-
set: (action: DataViewSetRelationFilterAction) => void
|
|
44
|
-
];
|
|
45
|
-
export declare function useDataViewRelationFilter(name: string, entityId: string): UseDataViewRelationFilterResult;
|
|
46
|
-
export declare function useDataViewRelationFilterFactory(name: string): (id: string) => UseDataViewRelationFilterResult;
|
|
47
|
-
export interface UseDataViewTextFilterInputResult {
|
|
48
|
-
value: string;
|
|
49
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
50
|
-
}
|
|
51
|
-
export declare function useDataViewTextFilterInput({ name, debounceMs }: {
|
|
52
|
-
name: string;
|
|
53
|
-
debounceMs?: number;
|
|
54
|
-
}): UseDataViewTextFilterInputResult;
|
|
55
|
-
export type UseDataViewTextFilterMatchModeResult = [isCurrent: boolean, set: () => void];
|
|
56
|
-
export declare function useDataViewTextFilterMatchMode(name: string, mode: TextFilterArtifact['mode']): UseDataViewTextFilterMatchModeResult;
|
|
57
|
-
export interface UseDataViewNumberFilterInputResult {
|
|
58
|
-
value: string;
|
|
59
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
60
|
-
}
|
|
61
|
-
export interface UseDataViewNumberFilterInputProps {
|
|
62
|
-
name: string;
|
|
63
|
-
type: 'from' | 'to';
|
|
64
|
-
allowFloat?: boolean;
|
|
65
|
-
}
|
|
66
|
-
export declare function useDataViewNumberFilterInput({ name, type, allowFloat }: UseDataViewNumberFilterInputProps): UseDataViewNumberFilterInputResult;
|
|
67
|
-
export type DataViewSetNullFilterAction = 'include' | 'exclude' | 'unset' | 'toggleInclude' | 'toggleExclude';
|
|
68
|
-
export type DataViewNullFilterState = 'include' | 'exclude' | 'none';
|
|
69
|
-
export type UseDataViewNullFilterResult = [
|
|
70
|
-
state: DataViewNullFilterState,
|
|
71
|
-
set: (action: DataViewSetNullFilterAction) => void
|
|
72
|
-
];
|
|
73
|
-
export declare function useDataViewNullFilter(name: string): UseDataViewNullFilterResult;
|
|
74
|
-
//# sourceMappingURL=filterHooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterHooks.d.ts","sourceRoot":"","sources":["../../src/dataview/filterHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAqD,MAAM,OAAO,CAAA;AAEhH,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