@docyrus/docyrus 0.0.31 → 0.0.33

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docyrus-app-dev-react
3
- description: Build Docyrus React TypeScript web applications end-to-end, combining authentication, API access, generated collections, TanStack Query/Form patterns, and production-grade UI implementation with preferred component libraries. Use when creating or modifying Docyrus-backed apps that use @docyrus/api-client, @docyrus/signin, Docyrus collections, queries, dashboards, forms, tables, layouts, or Docyrus UI components.
3
+ description: Build Docyrus React TypeScript web applications end-to-end, combining authentication, API access, @docyrus/app-utils runtime helpers, generated collections, TanStack Query/Form patterns, and production-grade UI implementation with preferred component libraries. Use when creating or modifying Docyrus-backed apps that use @docyrus/api-client, @docyrus/signin, @docyrus/app-utils, Docyrus collections, queries, dashboards, forms, tables, layouts, or Docyrus UI components.
4
4
  ---
5
5
 
6
6
  # Docyrus App Dev React
@@ -12,7 +12,7 @@ Build Docyrus React TypeScript applications end-to-end. This skill combines app
12
12
  - React 19 + TypeScript + Vite
13
13
  - TanStack Router (code-based), TanStack Query (server state), TanStack Form
14
14
  - Tailwind CSS v4, shadcn/ui components
15
- - `@docyrus/api-client` + `@docyrus/signin`
15
+ - `@docyrus/api-client` + `@docyrus/signin` + `@docyrus/app-utils`
16
16
  - Auto-generated collections from OpenAPI spec
17
17
  - Preferred UI libraries: shadcn, diceui, animate-ui, docyrus-ui, reui
18
18
 
@@ -22,7 +22,10 @@ Use this skill when you are:
22
22
 
23
23
  - Building or modifying a Docyrus-backed React app
24
24
  - Setting up authentication with `@docyrus/signin`
25
+ - Bootstrapping tenant-aware runtime utilities with `@docyrus/app-utils`
25
26
  - Fetching or mutating data with generated collections or `@docyrus/api-client`
27
+ - Persisting app-level config or saved grid views with `AppConfig` and `DataViews`
28
+ - Building record sharing, role management, or ACL-driven UI flows
26
29
  - Designing feature UIs such as dashboards, forms, tables, layouts, dialogs, analytics, or detail pages
27
30
  - Selecting between shadcn, diceui, animate-ui, docyrus-ui, and reui components
28
31
  - Implementing complete feature flows that combine data access and polished UI
@@ -30,11 +33,13 @@ Use this skill when you are:
30
33
  ## End-to-End Feature Workflow
31
34
 
32
35
  1. Set up app auth, routing, and query providers.
33
- 2. Use generated Docyrus collection hooks or the REST client for data access.
34
- 3. Define `columns`, filters, formulas, child queries, and mutations correctly.
35
- 4. Check preferred UI components before building anything custom.
36
- 5. Use Docyrus form and detail patterns for create, edit, and item detail flows.
37
- 6. Connect UI actions to TanStack Query mutations and invalidate relevant queries.
36
+ 2. Bootstrap `TenantPreferences`, date/number utilities, and shared app runtime helpers from `@docyrus/app-utils`.
37
+ 3. Use generated Docyrus collection hooks or the REST client for data access.
38
+ 4. Define `columns`, filters, formulas, child queries, and mutations correctly.
39
+ 5. Use `AppConfig` for per-app persisted settings and `DataViews` for saved grid views.
40
+ 6. Check preferred UI components before building anything custom.
41
+ 7. Use Docyrus form and detail patterns for create, edit, item detail, and editable grid flows.
42
+ 8. Connect UI actions to TanStack Query mutations and invalidate relevant queries.
38
43
 
39
44
  ## Quick Start: App Bootstrap
40
45
 
@@ -69,10 +74,60 @@ if (status === 'unauthenticated') return <SignInButton />
69
74
  // hasPermission('edit', dataSourceId) — check ACL permission on a data source
70
75
  ```
71
76
 
77
+ ### Tenant-aware app utilities
78
+
79
+ Use `@docyrus/app-utils` as the default runtime layer for tenant-level formatting and persisted app/grid preferences.
80
+
81
+ ```tsx
82
+ import {
83
+ createAppConfigClient,
84
+ createDataViewClient,
85
+ createDateUtils,
86
+ createNumberUtils,
87
+ getTenantPreferences,
88
+ } from '@docyrus/app-utils'
89
+
90
+ function useAppRuntime(appId: string) {
91
+ const client = useDocyrusClient()
92
+ const { getMyInfo } = useUsersCollection()
93
+
94
+ return useQuery({
95
+ queryKey: ['app-runtime', appId],
96
+ enabled: !!client && !!appId,
97
+ queryFn: async () => {
98
+ const [preferences, me] = await Promise.all([
99
+ getTenantPreferences(client!),
100
+ getMyInfo(),
101
+ ])
102
+
103
+ return {
104
+ preferences,
105
+ me,
106
+ dateUtils: createDateUtils({
107
+ preferences,
108
+ userTimezone: me.timeZone?.id,
109
+ }),
110
+ numberUtils: createNumberUtils({ preferences }),
111
+ appConfig: createAppConfigClient(client!, appId),
112
+ dataViews: createDataViewClient(client!, appId),
113
+ }
114
+ },
115
+ })
116
+ }
117
+ ```
118
+
119
+ Use this runtime to:
120
+
121
+ - Format dates and datetimes with tenant format strings and the user's timezone.
122
+ - Format numbers, currency-like values, and decimals using tenant separators and precision.
123
+ - Read and upsert the app's single persisted `AppConfig` document.
124
+ - Read and persist saved grid views through `DataViews`.
125
+
72
126
  ### Data fetching with generated collections
73
127
 
74
128
  ```tsx
75
129
  const { list } = useBaseProjectCollection()
130
+
76
131
  const { data: projects } = useQuery({
77
132
  queryKey: ['projects'],
78
133
  queryFn: () =>
@@ -85,12 +140,40 @@ const { data: projects } = useQuery({
85
140
  })
86
141
  ```
87
142
 
88
- ## Common Docyrus Asset URL Templates
143
+ ### ACL, roles, and record sharing
89
144
 
90
- - `User avatar path template`: `https://api.docyrus.app/storage/v1/object/tenant-public/:tenantId/users/:userId/:user.photo`
91
- - `Tenant logo path template`: `https://api.docyrus.app/storage/v1/object/tenant-public/:tenantId/:tenant.logo`
145
+ Use direct `useDocyrusClient()` calls for ACL features. These routes may be hidden from generated OpenAPI output, so they are typically not available through generated collection hooks.
92
146
 
93
- Use these templates when wiring user chips, assignee avatars, comments, activity feeds, app shell branding, workspace switchers, and any `DataGrid` user option payload that needs `avatarUrl`.
147
+ ```tsx
148
+ const client = useDocyrusClient()
149
+
150
+ const { data: roles } = useQuery({
151
+ queryKey: ['acl', 'roles'],
152
+ queryFn: () => client!.get('/v1/users/acl/roles'),
153
+ })
154
+
155
+ const replaceUserRoles = useMutation({
156
+ mutationFn: ({ userId, roleIds }: { userId: string; roleIds: string[] }) =>
157
+ client!.put(`/v1/users/acl/users/${userId}/roles`, { roleIds }),
158
+ })
159
+
160
+ const createRoleQuery = useMutation({
161
+ mutationFn: (payload: Record<string, unknown>) =>
162
+ client!.post('/v1/users/acl/role-queries', payload),
163
+ })
164
+ ```
165
+
166
+ Prefer role `uid` values returned by the API when sending `roleIds` for user-role updates or role-query payloads.
167
+
168
+ ### Saved data grid views
169
+
170
+ Use `DataGridViewSelect` as the default saved-view UI for Docyrus grids, and persist those views with `createDataViewClient(client, appId)`.
171
+
172
+ - `DataGridViewSelect` is the default component for showing and editing saved grid views.
173
+ - Pass the TanStack table instance via `table` so the selector/editor can read column definitions.
174
+ - Pass `fields` when you want the built-in filter builder enabled in the editor.
175
+ - Back `views`, `onViewCreate`, `onViewSave`, `onViewDelete`, `onViewHide`, and `onViewUnhide` with `DataViews` CRUD.
176
+ - Use `DataGridViewEditor` separately only when you need a standalone editor outside the selector.
94
177
 
95
178
  ## Critical App/Data Rules
96
179
 
@@ -101,7 +184,20 @@ Use these templates when wiring user chips, assignee avatars, comments, activity
101
184
  5. **Child query keys must appear in `columns`**.
102
185
  6. **Formula keys must appear in `columns`**.
103
186
  7. **Use `useUsersCollection().getMyInfo()`** for current user profile instead of making a direct profile call.
104
- 8. **Regenerate collections after schema changes** by rebuilding the tenant OpenAPI spec, downloading the latest `openapi.json`, and re-running the collection generator.
187
+ 8. **Initialize `TenantPreferences` once per app runtime** and create shared `dateUtils` / `numberUtils` instances from `@docyrus/app-utils`.
188
+ 9. **Formatting functions from `@docyrus/app-utils` are regionalized** — do not hardcode locale, date format, decimal separator, thousand separator, or decimal precision when tenant preferences should drive them.
189
+ 10. **Use `createAppConfigClient(client, appId)`** for the app's single persisted config document; `upsert` is the default write path.
190
+ 11. **Use `createDataViewClient(client, appId)`** for saved grid-view CRUD.
191
+ 12. **Use `DataViews` with `DataGridViewSelect`** to show, create, edit, reorder, hide, unhide, soft-delete, and hard-delete saved data grid views.
192
+ 13. **`DataGridViewSelect` needs a TanStack table instance** and should receive `fields` when you want the built-in filter builder/editor experience.
193
+ 14. **Data view creation requires `name` and `tenant_data_source_id`**.
194
+ 15. **Use `dataViews.update(viewId, { archived: true })` for soft-delete** and `dataViews.remove(viewId)` only for irreversible hard-delete.
195
+ 16. **Regenerate collections after schema changes** by rebuilding the tenant OpenAPI spec, downloading the latest `openapi.json`, and re-running the collection generator.
196
+ 17. **ACL endpoints are usually raw-client integrations** — use `useDocyrusClient()` or `RestApiClient` for roles, user-role assignments, role queries, record sharing, and ownership transfer.
197
+ 18. **Prefer role `uid` values** for ACL role writes, user-role `roleIds`, and role-query `roleIds`.
198
+ 19. **Treat `PUT /v1/users/acl/users/:userId/roles` as full replacement** and `POST /v1/users/acl/users/:userId/roles` as additive.
199
+ 20. **Send role-query `query` as raw JSON** and omit `tenantAppId` when `dataSourceId` is present; backend derives it.
200
+ 21. **After deleting a role, invalidate dependent app queries** for role lists, user-role lists, role-query lists, and any UI that renders primary-role labels.
105
201
 
106
202
  ## Critical UI/UX Rules
107
203
 
@@ -119,10 +215,8 @@ Use these templates when wiring user chips, assignee avatars, comments, activity
119
215
  8. **All forms must use TanStack Form + the Docyrus form system**. Do not build feature forms with plain HTML forms or React Hook Form directly.
120
216
  9. **Use `EditableRecordDetail` for inline editing** in item detail views.
121
217
  10. **Always enable `trackChanges`** for editable detail and grid experiences.
122
- 11. **When using Docyrus `DataGrid`, always set the correct `meta.cell` variant for the field type**. Do not reuse a generic text cell for typed Docyrus data.
123
- 12. **When rendering data source records in tables, cards, or lists, prefer the matching Docyrus value renderer** instead of handwritten display JSX.
124
- 13. **When editing inline, pass the real `IField` metadata into `EditableRecordDetailField` or `EditableValue`** so Docyrus can dispatch the correct editor and display pair from `field.type`.
125
- 14. **If a field type has no dedicated `DataGrid` cell variant, keep the grid cell read-only and move editing to a sheet, dialog, or detail page**.
218
+ 11. **Use `DataGridViewSelect` for saved grid views** and back it with `DataViews` from `@docyrus/app-utils`.
219
+ 12. **Prefer `DataGridViewEditor` only when you need a standalone grid-view editor** outside the selector component.
126
220
 
127
221
  ## Default UI Choices
128
222
 
@@ -138,7 +232,7 @@ Use these templates when wiring user chips, assignee avatars, comments, activity
138
232
  | App navigation | `Sidebar` | animate-ui |
139
233
  | Data table | `DataTable` | diceui |
140
234
  | Editable grid | `Data Grid` | docyrus |
141
- | Grid saved views | `DataGridViewSelect` | docyrus |
235
+ | Grid saved views | `DataGridViewSelect` + `DataViews` | docyrus + `@docyrus/app-utils` |
142
236
  | Forms | Docyrus form fields + TanStack Form | docyrus |
143
237
  | Charts | shadcn chart + Recharts | shadcn |
144
238
  | File upload | File Upload | diceui |
@@ -149,74 +243,6 @@ Use these templates when wiring user chips, assignee avatars, comments, activity
149
243
  | Pricing / quoting | `PricingEnginePanel` | docyrus |
150
244
  | Analytics / pivot | `PivotGrid` | docyrus |
151
245
 
152
- ## Data Source Field Type UI Mapping
153
-
154
- If you already have Docyrus field metadata, prefer explicit Docyrus field-specific primitives over custom UI glue:
155
-
156
- - Forms: use the specific `*FormField` for the field type
157
- - Read-only display: matching value renderer / `DynamicValue`
158
- - Inline editing: `EditableRecordDetailField` or `EditableValue`
159
- - Editable grids: `DataGrid` with the matching `meta.cell` variant
160
-
161
- Use the table below as the default mapping guide.
162
-
163
- | Field type(s) | `DataGrid` cell variant | Form field | Inline edit | Value renderer | Notes |
164
- |---------------|-------------------------|------------|-------------|----------------|-------|
165
- | `field-text` | `short-text` | `TextFormField` | `EditableValue` with `field-text` | `TextValue` | Default single-line text |
166
- | `field-textarea` | `long-text` | `TextareaFormField` | `EditableValue` with `field-textarea` | `TextValue` | Multi-line content |
167
- | `field-email` | `email` | `EmailFormField` | `EditableValue` with `field-email` | `EmailValue` | Use for clickable email cells |
168
- | `field-url` | `url` | `UrlFormField` | `EditableValue` with `field-url` | `UrlValue` | Prefer typed URL rendering over plain text |
169
- | `field-phone` | `phone` | `PhoneFormField` | `EditableValue` with `field-phone` | `PhoneValue` | Supports phone-specific display and editing |
170
- | `field-number` | `number` | `NumberFormField` | `EditableValue` with `field-number` | `NumberValue` | Standard numeric input |
171
- | `field-money` | `currency` | `MoneyFormField` | `EditableValue` with `field-money` | `MoneyValue` | Use money-specific formatting |
172
- | `field-currency` | `currency-code` | `CurrencyCodeFormField` | `EditableValue` with `field-currency` | `CurrencyCodeValue` | ISO currency codes |
173
- | `field-duration` | `duration` | `DurationFormField` | `EditableValue` with `field-duration` | `DurationValue` | Duration editing/display |
174
- | `field-rating` | `rating` | `RatingFormField` | `EditableValue` with `field-rating` | `RatingValue` | Star rating |
175
- | `field-select` | `select` | `SelectFormField` | `EditableValue` with `field-select` | `SelectValue` | Single select with Docyrus enum options |
176
- | `field-radioGroup` | `select` | `RadioGroupFormField` | `EditableValue` with `field-radioGroup` | `SelectValue` | In grids, use a select-style cell |
177
- | `field-enum` | `enum` | `EnumFormField` | `EditableValue` with `field-enum` | `SelectValue` | Backend-driven enum values |
178
- | `field-status` | `status` | `StatusFormField` | `EditableValue` with `field-status` | `StatusValue` | Preserves status metadata such as description/follow-up |
179
- | `field-multiSelect` | `multi-select` | `MultiSelectFormField` | `EditableValue` with `field-multiSelect` | `MultiSelectValue` | Multi-badge selection |
180
- | `field-tagSelect` | `tag-select` | `TagSelectFormField` | `EditableValue` with `field-tagSelect` | `MultiSelectValue` | Colored tag chips |
181
- | `field-userSelect` | `user` | `UserSelectFormField` | `EditableValue` with `field-userSelect` | `UserValue` | Populate `CellUserOption.avatarUrl` using the user avatar template |
182
- | `field-userMultiSelect` | `user-multi-select` | `UserMultiSelectFormField` | `EditableValue` with `field-userMultiSelect` | `UserMultiValue` | Use the avatar template for each selected user |
183
- | `field-relation` | `relation` | `RelationFormField` | `EditableValue` with `field-relation` | `RelationValue` | Prefer Docyrus relation lookup behavior |
184
- | `field-date` | `date` | `DateFormField` | `EditableValue` with `field-date` | `DateValue` | Date-only |
185
- | `field-dateTime` | `datetime` | `DateTimeFormField` | `EditableValue` with `field-dateTime` | `DateTimeValue` | Date + time |
186
- | `field-time` | `time` | `TimeFormField` | `EditableValue` with `field-time` | `TimeValue` | Time-only |
187
- | `field-dateRange` | `date-range` | `DateRangeFormField` | `EditableValue` with `field-dateRange` | `DateRangeValue` | Start/end pairs |
188
- | `field-checkbox` | `checkbox` | `CheckboxFormField` | `EditableValue` with `field-checkbox` | `CheckboxValue` | Boolean checkbox |
189
- | `field-switch` | `switch` | `SwitchFormField` | `EditableValue` with `field-switch` | `SwitchValue` | Boolean toggle |
190
- | `field-color` | `color` | `ColorFormField` | `EditableValue` with `field-color` | `ColorValue` | Use the swatch-aware UI |
191
- | `field-icon` | `icon` | `IconFormField` | `EditableValue` with `field-icon` | `IconValue` | Keep icon selection/rendering typed |
192
- | `field-file` | `file` | `FileFormField` | `EditableValue` with `field-file` when inline file editing is acceptable | `FileValue` | Grid editing is fine only when upload UX fits the workflow |
193
- | `field-image` | `image` | `ImageFormField` | `EditableValue` with `field-image` when inline image editing is acceptable | `ImageValue` | Prefer preview-aware image handling |
194
- | `field-locationSelect` | `—` | `LocationSelectFormField` | `EditableValue` with `field-locationSelect` | `LocationValue` | No dedicated `DataGrid` cell variant in current docs; prefer detail editing |
195
- | `field-docEditor` | `—` | `DocEditorFormField` | `EditableValue` with `field-docEditor` | `DocEditorValue` | Avoid dense grid editing; use a detail view or sheet |
196
- | `field-htmlEditor` | `—` | `HtmlEditorFormField` | `EditableValue` with `field-htmlEditor` | `RichTextValue` | Prefer detail editing over grid editing |
197
- | `field-emailEditor` | `—` | `EmailEditorFormField` | `EditableValue` with `field-emailEditor` | `RichTextValue` | Better in a drawer/modal editor |
198
- | `field-codeEditor` | `long-text` or `—` | `CodeEditorFormField` | `EditableValue` with `field-codeEditor` | `CodeValue` | Prefer a detail editor if syntax-aware editing matters |
199
- | `field-taskList` | `—` | `TaskListFormField` | `EditableValue` with `field-taskList` | `TaskListValue` | Better in detail surfaces than grids |
200
- | `field-queryBuilder` | `—` | `QueryBuilderFormField` | `EditableValue` with `field-queryBuilder` | `—` | Use dedicated query-builder UI |
201
- | `field-dynamic` | `—` | `DynamicConfigFormField` | `EditableValue` with `field-dynamic` | `—` | Specialized config UX |
202
- | `field-schemaRepeater` | `—` | `SchemaRepeaterFormField` | `EditableValue` with `field-schemaRepeater` | `—` | Repeater editing belongs in a form/detail surface |
203
- | `field-approvalStatus` | `—` | `ApprovalStatusFormField` | `EditableValue` with `field-approvalStatus` | `ApprovalStatusValue` | No dedicated `DataGrid` cell variant in current docs |
204
- | `field-inlineData`, `field-inlineForm`, `field-todo` | `—` | `—` | Use `EditableValue` only if the field has a supported dedicated inline experience | `InlineDataValue`, `TodoValue` | Prefer specialized detail UI over grid editing |
205
- | `field-display`, `field-formula`, `field-relatedField`, `field-button`, `field-identity`, `field-autonumber`, `field-list` | `—` | `—` | Keep read-only by default | `TextValue`, `FormulaValue`, `RelatedFieldValue`, `ButtonValue`, `IdentityValue`, `ListValue` | These are commonly display/virtual/system-driven rather than user-editable |
206
- | `field-code` | `—` | `—` | Keep read-only or build a custom feature-specific editor intentionally | `TextValue` | Do not force this into a generic grid editor unless the simplification is intentional |
207
-
208
- ### Field-Type Mapping Notes
209
-
210
- - `EditableValue` is the low-level inline editor. The important choice is the `field.type` you pass in; Docyrus uses that metadata to choose the correct inline form/display behavior.
211
- - If a field type does not have a documented `DataGrid` cell variant, do not approximate it with a text cell unless the simplification is intentional and acceptable for the feature.
212
- - For large rich-content or structured fields, prefer `AwesomeDialog`, dedicated detail pages, or `EditableRecordDetail` instead of dense grid editing.
213
- - The current shared `FIELD_TYPES` list in the platform is the authoritative source. If UI docs mention a field type not present in the tenant schema/runtime, do not assume it is available.
214
- - Reference docs:
215
- - `https://ui.docy.app/docs/web/docyrus/value-renderers/llms.txt`
216
- - `https://ui.docy.app/docs/web/docyrus/form-fields/llms.txt`
217
- - `https://ui.docy.app/docs/web/docyrus/editable-value/llms.txt`
218
- - `https://ui.docy.app/docs/web/docyrus/data-grid/llms.txt`
219
-
220
246
  ## Quick UI Patterns
221
247
 
222
248
  ### Item create form
@@ -326,6 +352,7 @@ For deep dives, read:
326
352
  - `references/README.md` — merged reference map for app development and UI design
327
353
  - `references/api-client-and-auth.md`
328
354
  - `references/collections-and-patterns.md`
355
+ - `../docyrus-api-dev/references/acl-endpoints-frontend.md`
329
356
  - `../docyrus-api-dev/references/data-source-query-guide.md`
330
357
  - `../docyrus-api-dev/references/formula-design-guide-llm.md`
331
358
  - `../docyrus-api-dev/references/query-guide.md`
@@ -8,6 +8,7 @@ Read these files for data access, auth, query design, and collection patterns:
8
8
 
9
9
  - `api-client-and-auth.md`
10
10
  - `collections-and-patterns.md`
11
+ - `../../docyrus-api-dev/references/acl-endpoints-frontend.md`
11
12
  - `../../docyrus-api-dev/references/data-source-query-guide.md`
12
13
  - `../../docyrus-api-dev/references/formula-design-guide-llm.md`
13
14
  - `../../docyrus-api-dev/references/query-guide.md`
@@ -239,6 +239,7 @@ export function useDeleteProject() {
239
239
  },
240
240
  })
241
241
  }
242
+ ```
242
243
 
243
244
  ---
244
245
 
@@ -243,26 +243,43 @@ Follow this process when selecting a component:
243
243
 
244
244
  | Need | Component | Library | Rationale |
245
245
  |------|-----------|---------|-----------|
246
- | App sidebar | **Sidebar** | animate-ui | Default choice - smooth animations, composable |
247
- | Alternative sidebar | Navigation Menu | shadcn | For mega menus and dropdowns |
248
- | Breadcrumbs | Breadcrumb | shadcn | Path navigation |
249
- | Menu bar | Menubar | shadcn | Desktop-style persistent menu |
250
- | Dropdown menu | Dropdown Menu | animate-ui | Animated transitions |
251
- | Context menu | Context Menu | shadcn | Right-click menus |
252
- | Tabs | Tabs | animate-ui | Animated tab transitions |
246
+ | Dynamic forms (default) | **Form Fields + TanStack Form** | docyrus | 47 field types with auto-dispatch **always use this** |
247
+ | Inline record editing | **EditableRecordDetail** | docyrus | Click-to-edit fields with change tracking + ActionBar |
248
+ | Single field inline edit | EditableValue | docyrus | Lower-level click-to-edit for individual values |
249
+ | Text input | Input | shadcn | Basic text input (use via TextFormField in forms) |
250
+ | Text area | Textarea | shadcn | Multi-line text (use via TextareaFormField in forms) |
251
+ | Select dropdown | Select | shadcn | Basic select (use via SelectFormField in forms) |
252
+ | Combobox/autocomplete | Combobox | diceui | Search + select |
253
+ | Date picker | Date Time Picker | docyrus | Date + time combined |
254
+ | Date range picker | **Date Time Range Picker** | docyrus | Start/end date+time pair with size variants |
255
+ | Date only | Calendar | shadcn | Date selection only |
256
+ | Time only | Time Picker | diceui | Time selection only |
257
+ | Phone number | Phone Input | diceui | International formatting |
258
+ | Color selection | Color Picker | diceui | Full spectrum + palette |
259
+ | File upload | File Upload | diceui | Drag-drop, preview, progress |
260
+ | Tags input | Tags Input | diceui | Multiple tag entry |
261
+ | Rating | Rating | diceui | Star/heart rating |
262
+ | Checkbox group | Checkbox Group | diceui | Multiple selections |
263
+ | Radio group (animated) | Radio Group | animate-ui | Single selection with animation |
264
+ | Radio group (card/grid) | **Radio Group** | docyrus | Card variant with icons, descriptions, grid columns |
265
+ | Switch | Switch | animate-ui | Toggle with animation |
266
+ | Slider | Slider | shadcn | Range selection |
267
+ | OTP input | Input OTP | shadcn | One-time password codes |
253
268
 
254
269
  ### Data Display & Tables
255
270
 
256
271
  | Need | Component | Library | Rationale |
257
272
  |------|-----------|---------|-----------|
258
273
  | Editable grid | Data Grid | docyrus | Virtualized, keyboard nav, cell editing — enable `trackChanges` for edit tracking |
259
- | Grid saved views | **Data Grid View Select** | docyrus | Saved view management with sort/filter/columns |
274
+ | Grid saved views | **Data Grid View Select** | docyrus | Saved view management with sort/filter/columns — persist with `DataViews` from `@docyrus/app-utils` |
260
275
  | Read-only table | Table | shadcn | Simple, responsive tables |
261
276
  | Advanced data table | Data Table | diceui | Filtering, sorting, pagination built-in |
262
277
  | Table filters | Data Table Filter | docyrus | Multi-column filter bar |
263
278
  | Value display | Value Renderers | docyrus | 44 renderer types for read-only display |
264
279
  | Empty state | Empty | shadcn | No data placeholder |
265
280
 
281
+ When using **Data Grid View Select**, back its `views`, `onViewCreate`, `onViewSave`, `onViewDelete`, `onViewHide`, and `onViewUnhide` flows with `createDataViewClient(client, appId)` from `@docyrus/app-utils`. Always pass the TanStack `table` instance, and pass `fields` when you want the editor's built-in filter builder enabled.
282
+
266
283
  ### Forms & Inputs
267
284
 
268
285
  **Always use TanStack Form + Docyrus form fields.** The `DynamicFormField` component auto-dispatches to the correct field type.
@@ -426,7 +443,7 @@ These are the **recommended defaults** unless the user specifies otherwise:
426
443
  | App navigation | Sidebar | animate-ui |
427
444
  | Charts | Chart + Recharts | shadcn |
428
445
  | Data table | Data Table | diceui |
429
- | Data grid saved views | **Data Grid View Select** | docyrus |
446
+ | Data grid saved views | **Data Grid View Select** + `DataViews` | docyrus + `@docyrus/app-utils` |
430
447
  | Forms | **Form Fields + TanStack Form** | docyrus |
431
448
  | File upload | File Upload | diceui |
432
449
  | Confirmation dialogs | Alert Dialog | animate-ui |
@@ -538,7 +555,7 @@ import { LucideActivity } from 'lucide-react'
538
555
  ### Data & Display
539
556
  - Tables: docyrus Data Grid, diceui Data Table, shadcn Table
540
557
  - Pivot table: docyrus PivotGrid (hierarchies, subtotals, drilldown, export)
541
- - Grid saved views: docyrus Data Grid View Select
558
+ - Grid saved views: docyrus Data Grid View Select + `DataViews` from `@docyrus/app-utils`
542
559
  - Cards: docyrus AwesomeCard, shadcn Card
543
560
  - Stat dashboards: docyrus AwesomeStats (grid/flex/tabs, mini-charts, comparisons)
544
561
  - Charts: shadcn Chart + Recharts