Hooks
Browse all available Kiva UI native hooks.
Available Hooks
| Hook | Description |
|---|---|
| useAdaptiveCard | Headless state, validation, visibility and action dispatch for the native Adaptive Cards renderer. Drives the AdaptiveCard component and is exported so apps can wire custom toolbars or server-side validation. |
| useDataExport | Client-side export of already-loaded rows to CSV, JSON, Markdown or Excel on React Native. Projects rows through a column list, writes the file into the cache directory and opens the share sheet. API-aligned with the web useDataExport. |
| useDateFormat | Provider-agnostic date, datetime and time formatting context for Kiva native components. Wired automatically by KivaTenantProvider, but works with any date library. |
| useDynamicFormView | Backend-agnostic form engine for React Native. Renders an IField schema with sections, tabs, collapsible panels, computed fields, field and form actions, validation tokens and a submit payload builder, with no network I/O. |
| useKivaAdaptiveCardItemDetail | Generate an Adaptive Card JSON payload from a Kiva field list + a single record — mapping Kiva field types onto the Adaptive Cards element vocabulary — and render it with the shared native AdaptiveCard renderer. |
| useKivaAdaptiveCardItemList | Generate an array of Adaptive Card JSON payloads from a Kiva field list + many records, and render them as a responsive grid, a stacked list, a single Carousel card or a single Table card with the shared native AdaptiveCard renderer. |
| useKivaAgentAttachments | Uploads chat attachments to a Kiva agent thread (creating the thread on first use) and returns the storage paths for the chat request. |
| useKivaAgentChat | The complete streaming chat runtime for a Kiva AI agent — AI SDK transport, threads, attachment uploads and client-side tool execution — ready to drive KivaAgent. |
| useKivaAgentInfo | Fetches a Kiva AI agent's profile, suggestions and capabilities from the agent-deployment endpoint and maps them onto the KivaAgent props. |
| useKivaAgentMemories | Backend glue for the KivaAgent memory manager — list, create, update and delete /v1/ai/memories with optimistic local state. |
| useKivaAgentMemoryCandidates | Backend glue for the KivaAgent memory-extraction dialog — extract candidates from a thread, then save or skip them. |
| useKivaAgentProjects | Lists, creates, renames and deletes Kiva AI projects scoped to an agent. |
| useKivaAgentThreads | Lists, renames, deletes and loads the messages of Kiva AI assistant chat threads. |
| useKivaCalendar | Calendar backed by a Kiva data source. Detects the date, title, color, description and user fields, turns records into events, and wires create, update, delete and drag to the API. |
| useKivaContactActivity | Merges a record's audit log, comments, related events and tasks, and status updates into one typed timeline for ContactActivityPanel, with upcoming items, a relationship summary and comment and status mutations. |
| useKivaContactChannels | React Query wiring for the Contact Channels & Consent API — a record's channels, consent and validation ledgers, tenant brands and every channel / consent / validation mutation. |
| useKivaDataExport | Server-side export of a Kiva data source on React Native. POSTs the column list, filters and keyword to the query-export endpoint, writes the returned xlsx or csv file into the cache directory and opens the share sheet. |
| useKivaDataGallery | Kiva-backed card gallery for React Native — composes useKivaDataGrid for schema, saved views, server filters / sort / search / paging and pivot / side filters, and adds gallery-owned card + display config, a toolbar and props for the native DataGallery. |
| useKivaDataGrid | Everything a Kiva-backed native DataGrid needs in one hook — columns from the schema, server-side filters / sort / search / paging, saved views, pivot filters, advanced AND/OR filter, borrowed relation columns, inline edit, status updates, bulk actions, exports and persisted view parameters. |
| useKivaDataImportWizard | One-call wiring of a Kiva data source to the native DataImportWizard. Picks a spreadsheet, uploads and analyses it on the server, auto-maps columns, imports the rows and returns a ready-to-render wizard element plus imperative helpers. |
| useKivaDataSourceFields | Lightweight schema hook for one Kiva data source on React Native. Returns the data source and its field list (including inline enum options), served cache-first from the shared inventory so no extra request is made after the post-sign-in warm-up. |
| useKivaDataSourceJsonSchema | Generate a JSON Schema (object schema, properties keyed by field slug) from a Kiva data source field list. |
| useKivaDataTable | Headless Kiva-backed table for the native DataTable — schema columns rendered with the value renderers, server filters / sort / search / paging, saved views, bulk actions, exports and a table ↔ gallery view node. |
| useKivaDataViewSelect | Load a Kiva data source's fields, saved views and forms, and wire them into the native DataGridViewSelect with one hook — view CRUD, reorder, hidden views and persisted active view included. |
| useKivaDummyDataGeneratorWizard | One-call wiring of a Kiva data source to the native DummyDataGenerator. Loads the schema, seeds per-field strategies, generates seeded sample rows, previews and exports them, and inserts them into the data source. Returns an inline wizard element plus imperative helpers. |
| useKivaEmailComposer | Wires the native EmailComposer to the Kiva messaging API — sender accounts, @ mention users and the send mutation, with composer state managed for you. |
| useKivaFieldComponent | Resolve the native form field, value renderer or inline editor for a Kiva field type — plus the shared FORM_FIELD_MAP / VALUE_RENDERER_MAP registries and IField helpers. |
| useKivaFormView | Create, edit and view forms bound to a Kiva data source on React Native. Loads the schema, record and options, uploads files to Kiva storage and creates or updates the record through the shared form-view engine. |
| useKivaInstantMessageComposer | Wires the native InstantMessageComposer to the Kiva SMS and WhatsApp messaging API. |
| useKivaInventory | Shared app-utils inventory cache for Kiva metadata (apps, data sources with fields, enums, views and forms, users, brands, preferences) plus a post-sign-in warm-up hook that drives a loading screen. |
| useKivaKanban | Kanban board backed by a Kiva data source. Groups records by an enum, user or date field, and saves a card's move to the API when it is dropped. Enum options marked final become drop zones. |
| useKivaLogActivity | Kiva data engine for LogActivityForm. Fetches comments, users, task and event options and the record's status field, and runs the comment, task, event and two-call status mutations. |
| useKivaMapView | Map backed by a Kiva data source. Detects the location field and builds markers from logos, icons or the default pin, with clustering, a viewport filter, basemaps and drag-to-move with reverse geocoding. |
| useKivaPivotCalendar | PivotCalendar backed by a Kiva data source. Aggregates per day or month in the database through a pivot matrix, optionally grouped by a relation, and turns a tapped value into a ready-to-run drilldown query. |
| useKivaPivotFilter | Connects a Kiva data source to a native PivotFilter strip. It detects the field type, runs a pivot aggregate query, builds pill items and date buckets, and emits filter rules. KivaPivotFilterGroup stacks several strips that cross-filter each other. |
| useKivaPivotGrid | Pivot grid backed by a Kiva data source. Aggregates on the device from raw records, or in the database through a pivot matrix and calculations, and returns a controller for the native PivotGrid components. |
| useKivaTenant | Tenant integration for Kiva native apps. Fetches tenant preferences, builds dateUtils and numberUtils, and wires DateFormatProvider and NumberFormatProvider so every native component picks up the tenant's date and number formats. |
| useLocalDataSource | Create an in-memory Kiva-compatible data source from a JSON array, with local CRUD and Kiva-style query parameters. |
| useLocalDataSourceDataGrid | Run the full useKivaDataGrid workflow — views, search, filters, grouping, sort, inline save, bulk delete — over an in-memory LocalDataSource. No backend, no sign-in. |
| useNumberFormat | Provider-agnostic number formatting context for Kiva native components. Mirror of useDateFormat, wired automatically by KivaTenantProvider. |
| useParameterPersistence | Persist a serializable view-parameter snapshot (search, filters, sort, column layout, …) per saved view and restore it on the next mount, backed by a synchronous native key-value store. |
| useSpeechRecognition | Live speech-to-text for React Native with the same API as the web hook, backed by the optional expo-speech-recognition module. |
| useUiTranslation | Provider-agnostic i18n bridge for Kiva native components. Same ui.<group>.<key> keys as the web package, English fallback when no provider is mounted. |
KivaFieldUpload
File upload form field using expo-document-picker for native file selection.
useAdaptiveCard
Headless state, validation, visibility and action dispatch for the native Adaptive Cards renderer. Drives the AdaptiveCard component and is exported so apps can wire custom toolbars or server-side validation.