@llmnative/react 1.6.1 → 1.7.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/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +610 -593
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/widgets/grid-core/GridCore.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/types.d.ts +19 -0
- package/dist/types/src/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type RecordProps } from "../../../providers/data/DataProvider";
|
|
3
3
|
import { type GridCoreProps } from "./types";
|
|
4
|
-
declare function GridCore<TRecord extends RecordProps>({ records, recordId, sourcePath, columns, actions, form, editDeepLink, header, footer, view, views, sticky, wrapperClassName, cardClassName, bodyClassName, loading, title, before, after, sortable, pagination, selection, onRowClick, reorderable, onReorder, groupBy, searchable, onSave, onDelete, onComplete, audit, onLoad, }: GridCoreProps<TRecord>): React.JSX.Element;
|
|
4
|
+
declare function GridCore<TRecord extends RecordProps>({ records, recordId, sourcePath, columns, actions, form, editDeepLink, header, footer, view, views, sticky, wrapperClassName, cardClassName, bodyClassName, loading, title, before, after, sortable, pagination, selection, onRowClick, reorderable, onReorder, groupBy, searchable, filters, onSave, onDelete, onComplete, audit, onLoad, }: GridCoreProps<TRecord>): React.JSX.Element;
|
|
5
5
|
export default GridCore;
|
|
@@ -274,6 +274,20 @@ export type GridSearchConfig<TRecord> = {
|
|
|
274
274
|
/** Field keys to match against — omit to search every string-valued field on each record. */
|
|
275
275
|
fields?: Array<keyof TRecord | string>;
|
|
276
276
|
};
|
|
277
|
+
/** A single toggle filter rendered as a checkbox in Grid's own default header, next to the
|
|
278
|
+
* search box (see `GridBehavior.filters`). */
|
|
279
|
+
export type GridFilterConfig<TRecord> = {
|
|
280
|
+
/** Unique key identifying this filter — used as the React key and to track its checkbox
|
|
281
|
+
* state, so it must be stable and unique within the `filters` array. */
|
|
282
|
+
key: string;
|
|
283
|
+
/** Label rendered next to the checkbox. */
|
|
284
|
+
label: string;
|
|
285
|
+
/** Initial checkbox state. Defaults to `false`. */
|
|
286
|
+
defaultValue?: boolean;
|
|
287
|
+
/** Return `true` to keep `record` given the filter's current checkbox `value`. Called for
|
|
288
|
+
* every record on every render of the filtered set — keep it cheap and pure. */
|
|
289
|
+
predicate: (record: TRecord, value: boolean) => boolean;
|
|
290
|
+
};
|
|
277
291
|
/** Interaction / behaviour props for `<Grid>`. */
|
|
278
292
|
export type GridBehavior<TRecord> = {
|
|
279
293
|
/** Enable global sorting. Pass an `OrderConfig` to set a default sort. */
|
|
@@ -298,6 +312,11 @@ export type GridBehavior<TRecord> = {
|
|
|
298
312
|
* header — same as `views.table.columnPicker`/`views.toggle`, a fully custom `header` prop
|
|
299
313
|
* bypasses it entirely (render your own search input there instead). */
|
|
300
314
|
searchable?: boolean | GridSearchConfig<TRecord>;
|
|
315
|
+
/** Toggle filters (checkboxes) rendered in Grid's OWN default header, next to the search
|
|
316
|
+
* box — applied BEFORE `searchable` (filters → search → sort → pagination/selection all see
|
|
317
|
+
* the FILTERED set). Same extension point as `searchable`: a fully custom `header` prop
|
|
318
|
+
* bypasses it entirely (render your own filter controls there instead). */
|
|
319
|
+
filters?: GridFilterConfig<TRecord>[];
|
|
301
320
|
};
|
|
302
321
|
/** Data-mutation hooks for `<Grid>`. */
|
|
303
322
|
export type GridPersistence<TRecord> = {
|
|
@@ -21,7 +21,7 @@ export { PromptUtils } from './libs/promptUtils';
|
|
|
21
21
|
export type { PromptAction, PromptStatusItem, PromptRunStats } from './components/widgets/Prompt';
|
|
22
22
|
export type { TableHeaderProp, TableReorderHandler, TableReorderMeta, TableSelectionChangeHandler, TableSelectionState } from './components/ui/Table';
|
|
23
23
|
export type { GalleryRecord, GallerySelectionChangeHandler, GallerySelectionState } from './components/ui/Gallery';
|
|
24
|
-
export type { GridAction, GridActions, GridAfterActionArgs, GridAfterActionHandler, GridArrayProps, GridColumn, GridCoreProps, GridDBPath, GridDBQuery, GridDBProps, GridFooterContext, GridFormContext, GridGalleryField, GridGalleryViewProps, GridGalleryViewConfig, GridHeaderContext, GridLayout, GridMutationDeleteArgs, GridMutationDeleteHandler, GridMutationSaveArgs, GridMutationSaveHandler, GridReorderHandler, GridReorderMeta, GridRecordKey, GridProps, GridSearchConfig, GridSelectionChangeHandler, GridSelectionMode, GridSelectionState, GridSticky, GridTableViewProps, GridTableViewConfig, GridViewsConfig, GridCellContext, } from './components/widgets/Grid';
|
|
24
|
+
export type { GridAction, GridActions, GridAfterActionArgs, GridAfterActionHandler, GridArrayProps, GridColumn, GridCoreProps, GridDBPath, GridDBQuery, GridDBProps, GridFooterContext, GridFormContext, GridGalleryField, GridGalleryViewProps, GridGalleryViewConfig, GridFilterConfig, GridHeaderContext, GridLayout, GridMutationDeleteArgs, GridMutationDeleteHandler, GridMutationSaveArgs, GridMutationSaveHandler, GridReorderHandler, GridReorderMeta, GridRecordKey, GridProps, GridSearchConfig, GridSelectionChangeHandler, GridSelectionMode, GridSelectionState, GridSticky, GridTableViewProps, GridTableViewConfig, GridViewsConfig, GridCellContext, } from './components/widgets/Grid';
|
|
25
25
|
export type { ProviderConfigurable, ProviderConfigurationState } from './providers/ProviderConfiguration';
|
|
26
26
|
export { getProviderConfigurationState } from './providers/ProviderConfiguration';
|
|
27
27
|
export type { ProviderAdapterMap, ProviderService, SetProviderFn, ProviderRegistrySnapshot } from './providers/ProviderRegistryContext';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|