@uxf/data-grid 11.125.0 → 11.126.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/README.md +25 -25
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -128,23 +128,23 @@ Only exports listed below are part of the public surface. Import paths resolve b
|
|
|
128
128
|
|
|
129
129
|
### Root export — `@uxf/data-grid`
|
|
130
130
|
|
|
131
|
-
| Name
|
|
132
|
-
|
|
|
133
|
-
| `DataGrid`
|
|
134
|
-
| `DataGridProps<GridType>`
|
|
135
|
-
| `InferDataGridRow<Schema>`
|
|
136
|
-
| `BaseGridType`, `Schema`, `ChangeTabFilterBehavior`, `DataGridActionCell`, … | types
|
|
137
|
-
| `mergeSchemaWithConfig(schema, config)`
|
|
138
|
-
| `encodeFilter(request)` / `decodeFilter(string)`
|
|
131
|
+
| Name | Kind | Description |
|
|
132
|
+
| ---------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------- |
|
|
133
|
+
| `DataGrid` | component | The compound grid. Props: `DataGridProps<GridType>`. |
|
|
134
|
+
| `DataGridProps<GridType>` | type | Grid props = base props + control (`state`, `actions`) + data (`isLoading`, `error`, `data`, `reload`). |
|
|
135
|
+
| `InferDataGridRow<Schema>` | type | Derives the row shape from a schema via `ColumnTypes`. |
|
|
136
|
+
| `BaseGridType`, `Schema`, `ChangeTabFilterBehavior`, `DataGridActionCell`, … | types | Re-exported from `./types`. |
|
|
137
|
+
| `mergeSchemaWithConfig(schema, config)` | fn | Returns a new schema with a frontend config applied (see below). |
|
|
138
|
+
| `encodeFilter(request)` / `decodeFilter(string)` | fn | Base64 (de)serialize a grid request. |
|
|
139
139
|
|
|
140
140
|
### Deep imports
|
|
141
141
|
|
|
142
|
-
| Import path
|
|
143
|
-
|
|
|
144
|
-
| `@uxf/data-grid/use-data-grid-control`
|
|
145
|
-
| `@uxf/data-grid/use-data-grid-fetching`
|
|
146
|
-
| `@uxf/data-grid/user-config-storage-adapters/local-storage` | `useUserConfigLocalStorageAdapter(schema)`, `useClearLocalStorageUserConfig(schema)` | `localStorage` persistence of user column config.
|
|
147
|
-
| `@uxf/data-grid/column-types`
|
|
142
|
+
| Import path | Export | Description |
|
|
143
|
+
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
144
|
+
| `@uxf/data-grid/use-data-grid-control` | `useDataGridControl(config)` | Owns grid `state` + `actions`. Config: `{ schema, initialState?, initialUserConfig?, middleware? }`. |
|
|
145
|
+
| `@uxf/data-grid/use-data-grid-fetching` | `useDataGridFetching(config)` | Runs the loader on request changes. Config: `{ schema, state, loader?, isWithTabCounts? }`. Returns `{ isLoading, error, data, reload }`. |
|
|
146
|
+
| `@uxf/data-grid/user-config-storage-adapters/local-storage` | `useUserConfigLocalStorageAdapter(schema)`, `useClearLocalStorageUserConfig(schema)` | `localStorage` persistence of user column config. |
|
|
147
|
+
| `@uxf/data-grid/column-types` | `ColumnTypes` (interface) | Augment to register custom column value types. |
|
|
148
148
|
|
|
149
149
|
Notable optional `DataGrid` props: `actionCell`, `bodyCells`, `changeTabFilterBehavior`, `customActions`, `filterHandlers`, `fulltextInputPlaceholder`, `getCsvDownloadUrl`, `hasStickyHeader`, `isRowsSelectable`, `isRowSelectDisabled`, `isWithTabCounts`, `keyExtractor`, `rowAccent`, `rowClassName`, `rowHeight`, `tabsVariant`, `HiddenColumnsComponent`, `NoRowsFallback`, `SelectedRowsToolbarActions`, `isDebug`.
|
|
150
150
|
|
|
@@ -177,17 +177,17 @@ type Row = InferDataGridRow<typeof schema>;
|
|
|
177
177
|
|
|
178
178
|
Each filter is rendered by looking up `filterHandlers[filter.type]`. The grid uses `defaultFilterHandlers` unless you pass a `filterHandlers` prop. Built-in handler keys:
|
|
179
179
|
|
|
180
|
-
| `filter.type`
|
|
181
|
-
|
|
|
182
|
-
| `checkbox`
|
|
183
|
-
| `date`
|
|
184
|
-
| `datetime`
|
|
185
|
-
| `entitySelect`
|
|
186
|
-
| `entityMultiSelect` | Multi-select combobox (async entity)
|
|
187
|
-
| `interval`
|
|
188
|
-
| `multiSelect`
|
|
189
|
-
| `select`
|
|
190
|
-
| `string`
|
|
180
|
+
| `filter.type` | Renders |
|
|
181
|
+
| ------------------- | ------------------------------------------ |
|
|
182
|
+
| `checkbox` | Checkbox (value is sent only when checked) |
|
|
183
|
+
| `date` | Date range (from / to date pickers) |
|
|
184
|
+
| `datetime` | Datetime range |
|
|
185
|
+
| `entitySelect` | Single-select combobox (async entity) |
|
|
186
|
+
| `entityMultiSelect` | Multi-select combobox (async entity) |
|
|
187
|
+
| `interval` | Numeric range (min / max inputs) |
|
|
188
|
+
| `multiSelect` | Multi-select |
|
|
189
|
+
| `select` | Select |
|
|
190
|
+
| `string` | Text input |
|
|
191
191
|
|
|
192
192
|
Extend or override by merging into `defaultFilterHandlers` and passing the result as the `filterHandlers` prop:
|
|
193
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/data-grid",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.126.0",
|
|
4
4
|
"description": "UXF DataGrid",
|
|
5
5
|
"homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@dnd-kit/core": "^6.3.1",
|
|
42
42
|
"@dnd-kit/sortable": "^10.0.0",
|
|
43
43
|
"@dnd-kit/utilities": "^3.2.2",
|
|
44
|
-
"@uxf/core": "11.
|
|
45
|
-
"@uxf/core-react": "11.
|
|
46
|
-
"@uxf/localize": "11.
|
|
47
|
-
"@uxf/styles": "11.
|
|
48
|
-
"@uxf/ui": "11.
|
|
44
|
+
"@uxf/core": "11.126.0",
|
|
45
|
+
"@uxf/core-react": "11.126.0",
|
|
46
|
+
"@uxf/localize": "11.126.0",
|
|
47
|
+
"@uxf/styles": "11.126.0",
|
|
48
|
+
"@uxf/ui": "11.126.0",
|
|
49
49
|
"dayjs": "^1.11.21",
|
|
50
50
|
"react": ">=18.2.0",
|
|
51
51
|
"react-dom": ">=18.2.0"
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"@dnd-kit/utilities": "^3.2.2",
|
|
57
57
|
"@types/react": "18.3.31",
|
|
58
58
|
"@types/react-dom": "18.3.7",
|
|
59
|
-
"@uxf/core": "11.
|
|
60
|
-
"@uxf/core-react": "11.
|
|
61
|
-
"@uxf/localize": "11.
|
|
62
|
-
"@uxf/styles": "11.
|
|
63
|
-
"@uxf/ui": "11.
|
|
59
|
+
"@uxf/core": "11.126.0",
|
|
60
|
+
"@uxf/core-react": "11.126.0",
|
|
61
|
+
"@uxf/localize": "11.126.0",
|
|
62
|
+
"@uxf/styles": "11.126.0",
|
|
63
|
+
"@uxf/ui": "11.126.0",
|
|
64
64
|
"dayjs": "^1.11.21",
|
|
65
65
|
"react": "18.3.1",
|
|
66
66
|
"react-dom": "18.3.1"
|