Hooks
Browse all available Docyrus 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 Docyrus native components. Wired automatically by DocyrusTenantProvider, but works with any date library. |
| useDocyrusAdaptiveCardItemDetail | Generate an Adaptive Card JSON payload from a Docyrus field list + a single record — mapping Docyrus field types onto the Adaptive Cards element vocabulary — and render it with the shared native AdaptiveCard renderer. |
| useDocyrusAdaptiveCardItemList | Generate an array of Adaptive Card JSON payloads from a Docyrus 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. |
| useDocyrusAgentAttachments | Uploads chat attachments to a Docyrus agent thread (creating the thread on first use) and returns the storage paths for the chat request. |
| useDocyrusAgentChat | The complete streaming chat runtime for a Docyrus AI agent — AI SDK transport, threads, attachment uploads and client-side tool execution — ready to drive DocyrusAgent. |
| useDocyrusAgentInfo | Fetches a Docyrus AI agent's profile, suggestions and capabilities from the agent-deployment endpoint and maps them onto the DocyrusAgent props. |
| useDocyrusAgentMemories | Backend glue for the DocyrusAgent memory manager — list, create, update and delete /v1/ai/memories with optimistic local state. |
| useDocyrusAgentMemoryCandidates | Backend glue for the DocyrusAgent memory-extraction dialog — extract candidates from a thread, then save or skip them. |
| useDocyrusAgentProjects | Lists, creates, renames and deletes Docyrus AI projects scoped to an agent. |
| useDocyrusAgentThreads | Lists, renames, deletes and loads the messages of Docyrus AI assistant chat threads. |
| useDocyrusCalendar | Calendar backed by a Docyrus 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. |
| useDocyrusContactActivity | 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. |
| useDocyrusContactChannels | 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. |
| useDocyrusDataExport | Server-side export of a Docyrus 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. |
| useDocyrusDataGallery | Docyrus-backed card gallery for React Native — composes useDocyrusDataGrid 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. |
| useDocyrusDataGrid | Everything a Docyrus-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. |
| useDocyrusDataImportWizard | One-call wiring of a Docyrus 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. |
| useDocyrusDataSourceFields | Lightweight schema hook for one Docyrus 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. |
| useDocyrusDataSourceJsonSchema | Generate a JSON Schema (object schema, properties keyed by field slug) from a Docyrus data source field list. |
| useDocyrusDataTable | Headless Docyrus-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. |
| useDocyrusDataViewSelect | Load a Docyrus 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. |
| useDocyrusDummyDataGeneratorWizard | One-call wiring of a Docyrus 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. |
| useDocyrusEmailComposer | Wires the native EmailComposer to the Docyrus messaging API — sender accounts, @ mention users and the send mutation, with composer state managed for you. |
| useDocyrusFieldComponent | Resolve the native form field, value renderer or inline editor for a Docyrus field type — plus the shared FORM_FIELD_MAP / VALUE_RENDERER_MAP registries and IField helpers. |
| useDocyrusFormView | Create, edit and view forms bound to a Docyrus data source on React Native. Loads the schema, record and options, uploads files to Docyrus storage and creates or updates the record through the shared form-view engine. |
| useDocyrusInstantMessageComposer | Wires the native InstantMessageComposer to the Docyrus SMS and WhatsApp messaging API. |
| useDocyrusInventory | Shared app-utils inventory cache for Docyrus 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. |
| useDocyrusKanban | Kanban board backed by a Docyrus 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. |
| useDocyrusLogActivity | Docyrus 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. |
| useDocyrusMapView | Map backed by a Docyrus 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. |
| useDocyrusPivotCalendar | PivotCalendar backed by a Docyrus 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. |
| useDocyrusPivotFilter | Connects a Docyrus 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. DocyrusPivotFilterGroup stacks several strips that cross-filter each other. |
| useDocyrusPivotGrid | Pivot grid backed by a Docyrus 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. |
| useDocyrusTenant | Tenant integration for Docyrus 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. |
| 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. |
| useLocalDataSource | Create an in-memory Docyrus-compatible data source from a JSON array, with local CRUD and Docyrus-style query parameters. |
| useLocalDataSourceDataGrid | Run the full useDocyrusDataGrid 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 Docyrus native components. Mirror of useDateFormat, wired automatically by DocyrusTenantProvider. |
| 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 Docyrus native components. Same ui.<group>.<key> keys as the web package, English fallback when no provider is mounted. |
DocyFieldUpload
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.