Hooks

Overview

Reusable React hooks for common patterns.

Browse all available Docyrus UI hooks.

Available Hooks

HookDescription
useClickOutsideuseClickOutside hook.
useDateFormatProvider-agnostic date / datetime / time formatting context for Docyrus UI components. Wired automatically by DocyrusTenantProvider, but works with any date library.
useNumberFormatProvider-agnostic number formatting context for Docyrus UI components. Mirror of useDateFormat — wired automatically by DocyrusTenantProvider, but works with any number formatting library.
useUiTranslationuseUiTranslation hook.
useAdaptiveCardHeadless state, validation, visibility, and action dispatch for the Adaptive Cards 1.5 renderer. Drives the AdaptiveCard component and is exported so consumers can wire custom toolbars or server-side validation.
useDataExportProject an in-memory array of rows through a column definition and trigger a browser download as CSV, JSON, Markdown, or XLSX.
useDocyrusAdaptiveCardItemDetailGenerate 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 AdaptiveCard renderer.
useDocyrusAdaptiveCardItemListGenerate an array of Adaptive Card JSON payloads from a Docyrus field list + many records, and render them as a responsive grid, a stacked list, or a single Carousel card with the shared AdaptiveCard renderer.
useDocyrusAgentAttachmentsuseDocyrusAgentAttachments hook.
useDocyrusAgentInfouseDocyrusAgentInfo hook.
useDocyrusAgentMemoriesuseDocyrusAgentMemories hook.
useDocyrusAgentMemoryCandidatesuseDocyrusAgentMemoryCandidates hook.
useDocyrusAgentProjectsuseDocyrusAgentProjects hook.
useDocyrusAgentThreadsuseDocyrusAgentThreads hook.
useDocyrusCalendarWire a Docyrus data source to a fully configured calendar with auto-detected date / title / user fields, view-aware date-range fetching, color mapping, and drag-and-drop persistence.
useDocyrusContactActivityMerge a Docyrus record's audit log, threaded comments, related events, tasks, and status updates into one timeline for <ContactActivityPanel />, plus comment and status mutations.
useDocyrusContactChannelsuseDocyrusContactChannels hook.
useDocyrusDataExportServer-side export for Docyrus data sources — POSTs a query payload to the export edge function and streams the result file straight to the browser.
useDocyrusDataGalleryOne-call wiring of a Docyrus data source to a fully configured DataGallery + toolbar (DataGridViewSelect, search, filters, sort, group, gallery display menu, card config menu) — including row fetching, saved views, pivot filters, and automatic card field detection.
useDocyrusDataGridOne-call wiring of a Docyrus data source to a fully configured DataGrid + toolbar (DataGridViewSelect, search, filters, group, sort, row height, display) — including row fetching with view-derived query parameters.
useDocyrusDataImportWizardOne-call wiring of a Docyrus data source to the DataImportWizard — handles upload, analyse, mapping, preview, and import in a single guided flow.
useDocyrusDataSourceJsonSchemaGenerate a JSON Schema (object schema, properties keyed by field slug) from a Docyrus data source field list.
useDocyrusDataTableOne-call wiring of a Docyrus data source to a fully configured DataTable + toolbar (DataGridViewSelect, search, filters, group, sort) — including row fetching with view-derived query parameters and an optional side-panel filter rail.
useDocyrusDataViewSelectFetch data source fields and saved views from Docyrus and wire them into DataGridViewSelect with a single hook.
useDocyrusDummyDataGeneratorWizardOne-call wiring of a Docyrus data source to the DummyDataGenerator — handles field-aware strategies, deterministic generation, preview, and batch insert in a single guided flow.
useDocyrusEmailComposerWire an <EmailComposer /> to the Docyrus messaging API — loads sender accounts, lets the user pick a From address, and ships emails through /v1/messaging/email/accounts/{id}/send.
useDocyrusFieldComponentResolve the right UI component (form input, value renderer, data-grid cell, editable value, or TanStack column def builder) for any Docyrus data source field type.
useDocyrusFormViewOne-call wiring of a Docyrus data source item to create, edit, and read-only layouts with shared field-component mapping, item loading, option hydration, and submit handling.
useDocyrusInstantMessageComposeruseDocyrusInstantMessageComposer hook.
useDocyrusInventoryShared app-utils inventory cache for Docyrus metadata (apps, data sources with fields/enums/views/forms, users, brands, preferences) plus a post-sign-in load() warm-up hook that drives an application loading dialog.
useDocyrusKanbanOne-call wiring of a Docyrus data source to a fully configured Kanban board with select/status/radio-group, user, and date columns, drag-to-update persistence, final-zone integration, and a standard Docyrus card layout.
useDocyrusLogActivityuseDocyrusLogActivity hook.
useDocyrusMapViewBuild Docyrus-backed map pages from a locationSelect field with saved views, marker models, and ready-to-render Leaflet or Google Maps canvases.
useDocyrusPivotCalendarWires the PivotCalendar component to a Docyrus data source using the items endpoint's pivot parameter for server-side aggregation.
useDocyrusPivotFilterWire a Docyrus data source to a <PivotFilter> strip — auto-detects the field type, runs a pivot/aggregate query, transforms results into pill items, and emits filter rules ready to merge into a grid query.
useDocyrusPivotGridWires the PivotGrid component to a Docyrus data source with optional server-side aggregation via pivot.matrix + calculations.
useDocyrusTenantSingle-line tenant integration that fetches tenant preferences, builds dateUtils + numberUtils, and wires DateFormatProvider + NumberFormatProvider so every UI component (data grids, calendars, filters, value renderers) picks up the tenant's configured date/time/number formats automatically.
useDynamicFormViewBackend-agnostic dynamic form renderer — the sibling of useDocyrusFormView with no Docyrus wiring. Supply fields, values, options, and an onSubmit sink to render create/edit/view forms against any backend.
useLocalDataSourceDataGridWire a LocalDataSource object into the Docyrus DataGrid hook stack, including toolbar search, filters, sorting, grouping, saved views, and local CRUD.
useLocalDataSourceCreate an in-memory Docyrus-compatible data source from a JSON array, with local CRUD and Docyrus-style query parameters.
useParameterPersistenceuseParameterPersistence hook.
useSpeechRecognitionuseSpeechRecognition hook.

On this page