@kardoe/quickback 0.5.13 → 0.5.14
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
CHANGED
package/package.json
CHANGED
package/src/skill/SKILL.md
CHANGED
|
@@ -147,6 +147,15 @@ export default defineTable(todos, {
|
|
|
147
147
|
masking: {
|
|
148
148
|
userId: { type: "redact", show: { roles: ["admin"] } },
|
|
149
149
|
},
|
|
150
|
+
|
|
151
|
+
layouts: {
|
|
152
|
+
default: {
|
|
153
|
+
sections: [
|
|
154
|
+
{ label: "Details", columns: 2, fields: ["title", "completed"] },
|
|
155
|
+
{ label: "Audit", collapsed: true, fields: ["userId"] },
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
150
159
|
});
|
|
151
160
|
```
|
|
152
161
|
|
|
@@ -378,6 +387,44 @@ export default defineTable(rooms, {
|
|
|
378
387
|
|
|
379
388
|
---
|
|
380
389
|
|
|
390
|
+
# CMS Record Layouts
|
|
391
|
+
|
|
392
|
+
Control how fields are grouped on the CMS record detail page. Without layouts, fields are auto-grouped by naming heuristics.
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
export default defineTable(contacts, {
|
|
396
|
+
// ... firewall, crud, guards, etc.
|
|
397
|
+
|
|
398
|
+
layouts: {
|
|
399
|
+
default: {
|
|
400
|
+
sections: [
|
|
401
|
+
{ label: "Contact Info", columns: 2, fields: ["name", "email", "phone", "mobile"] },
|
|
402
|
+
{ label: "Address", columns: 2, fields: ["address1", "address2", "city", "state", "zip"] },
|
|
403
|
+
{ label: "Internal Notes", collapsed: true, fields: ["notes", "internalNotes"] },
|
|
404
|
+
],
|
|
405
|
+
},
|
|
406
|
+
compact: {
|
|
407
|
+
sections: [
|
|
408
|
+
{ label: "Summary", fields: ["name", "status", "email"] },
|
|
409
|
+
],
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Section Options
|
|
416
|
+
|
|
417
|
+
| Property | Type | Default | Description |
|
|
418
|
+
|----------|------|---------|-------------|
|
|
419
|
+
| `label` | string | required | Section header text |
|
|
420
|
+
| `fields` | string[] | required | Column names to display |
|
|
421
|
+
| `columns` | `1 \| 2` | `1` | Number of columns for field layout |
|
|
422
|
+
| `collapsed` | boolean | `false` | Whether the section starts collapsed |
|
|
423
|
+
|
|
424
|
+
Fields not assigned to any section are collected into an "Other Fields" section. When multiple layouts are defined, a dropdown appears in the CMS record detail header.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
381
428
|
# Actions — Custom Business Logic
|
|
382
429
|
|
|
383
430
|
Actions are custom API endpoints for business logic beyond CRUD. Defined in a separate `actions.ts` file using `defineActions()`.
|
|
@@ -726,18 +773,34 @@ Detect from `quickback.config.ts` and use the correct imports:
|
|
|
726
773
|
|
|
727
774
|
# Documentation
|
|
728
775
|
|
|
776
|
+
## CLI Docs (Recommended)
|
|
777
|
+
|
|
778
|
+
The fastest way to access documentation is via the Quickback CLI. It bundles all docs offline:
|
|
779
|
+
|
|
780
|
+
```bash
|
|
781
|
+
quickback docs # List all available topics
|
|
782
|
+
quickback docs <topic> # Show docs for a specific topic
|
|
783
|
+
quickback docs firewall # Example: firewall docs
|
|
784
|
+
quickback docs cms/record-layouts # Example: CMS record layouts
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
## Online Docs
|
|
788
|
+
|
|
729
789
|
Full documentation at https://docs.quickback.dev
|
|
730
790
|
|
|
731
|
-
- [
|
|
732
|
-
- [Concepts](https://docs.quickback.dev/definitions/concepts)
|
|
733
|
-
- [Database Schema](https://docs.quickback.dev/definitions/
|
|
734
|
-
- [
|
|
735
|
-
- [
|
|
736
|
-
- [
|
|
737
|
-
- [
|
|
738
|
-
- [
|
|
739
|
-
- [
|
|
740
|
-
- [
|
|
741
|
-
- [
|
|
742
|
-
- [
|
|
743
|
-
- [
|
|
791
|
+
- [Getting Started](https://docs.quickback.dev/compiler/getting-started)
|
|
792
|
+
- [Concepts](https://docs.quickback.dev/compiler/definitions/concepts)
|
|
793
|
+
- [Database Schema](https://docs.quickback.dev/compiler/definitions/schema)
|
|
794
|
+
- [Firewall](https://docs.quickback.dev/compiler/definitions/firewall)
|
|
795
|
+
- [Access](https://docs.quickback.dev/compiler/definitions/access)
|
|
796
|
+
- [Guards](https://docs.quickback.dev/compiler/definitions/guards)
|
|
797
|
+
- [Masking](https://docs.quickback.dev/compiler/definitions/masking)
|
|
798
|
+
- [Views](https://docs.quickback.dev/compiler/definitions/views)
|
|
799
|
+
- [Validation](https://docs.quickback.dev/compiler/definitions/validation)
|
|
800
|
+
- [Actions](https://docs.quickback.dev/compiler/definitions/actions)
|
|
801
|
+
- [CRUD API](https://docs.quickback.dev/compiler/using-the-api/crud)
|
|
802
|
+
- [Query Parameters](https://docs.quickback.dev/compiler/using-the-api/query-params)
|
|
803
|
+
- [CLI Reference](https://docs.quickback.dev/compiler/cloud-compiler/cli)
|
|
804
|
+
- [CMS Overview](https://docs.quickback.dev/cms)
|
|
805
|
+
- [CMS Record Layouts](https://docs.quickback.dev/cms/record-layouts)
|
|
806
|
+
- [CMS Schema Format](https://docs.quickback.dev/cms/schema-format)
|
|
@@ -19,6 +19,7 @@ You deeply understand:
|
|
|
19
19
|
- **Actions**: Custom endpoints using `defineActions()` with Zod schemas
|
|
20
20
|
- **Views**: Column-level security with named projections
|
|
21
21
|
- **Validation**: Field-level validation rules
|
|
22
|
+
- **Layouts**: CMS record page field grouping with sections, columns, and collapsed state
|
|
22
23
|
|
|
23
24
|
## When Invoked
|
|
24
25
|
|
|
@@ -193,10 +194,24 @@ Before finishing, verify:
|
|
|
193
194
|
- [ ] Masking for any PII fields
|
|
194
195
|
- [ ] Views for different visibility levels (if needed)
|
|
195
196
|
- [ ] Validation rules for constrained fields (if needed)
|
|
197
|
+
- [ ] Layouts for CMS record page field grouping (if needed)
|
|
196
198
|
- [ ] No audit fields in schema (auto-injected)
|
|
197
199
|
- [ ] Using `defineTable()` combined mode (not separate schema.ts + resource.ts)
|
|
198
200
|
- [ ] Actions use `defineActions()` with Zod schemas (not JSON schema)
|
|
199
201
|
|
|
202
|
+
## Accessing Documentation
|
|
203
|
+
|
|
204
|
+
When you need to look up Quickback docs, use the CLI — it bundles all docs offline:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
quickback docs # List all available topics
|
|
208
|
+
quickback docs <topic> # Show docs for a specific topic
|
|
209
|
+
quickback docs firewall # Example: firewall docs
|
|
210
|
+
quickback docs cms/record-layouts # Example: CMS record layouts
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Full online docs: https://docs.quickback.dev
|
|
214
|
+
|
|
200
215
|
## Response Style
|
|
201
216
|
|
|
202
217
|
- Be direct and practical
|