|
| 1 | +# UI Showcase Examples |
| 2 | + |
| 3 | +This example demonstrates the comprehensive UI capabilities of ObjectStack, including: |
| 4 | + |
| 5 | +## 📋 FormView Examples |
| 6 | + |
| 7 | +Demonstrates all 6 form layout types with advanced features: |
| 8 | + |
| 9 | +- **Simple**: Basic sectioned forms with collapsible sections and 1-4 column layouts |
| 10 | +- **Tabbed**: Multi-tab forms for organizing complex data |
| 11 | +- **Wizard**: Step-by-step guided processes |
| 12 | +- **Split**: Master-detail split view |
| 13 | +- **Drawer**: Side panel forms |
| 14 | +- **Modal**: Dialog-based forms |
| 15 | + |
| 16 | +### Form Features Showcased |
| 17 | + |
| 18 | +- **Section Configuration**: Collapsible sections with 1-4 column layouts |
| 19 | +- **Field-Level Controls**: |
| 20 | + - `readonly` - Read-only fields |
| 21 | + - `required` - Required field validation |
| 22 | + - `hidden` - Conditionally hide fields |
| 23 | + - `colSpan` - Multi-column spanning (1-4) |
| 24 | + - `visibleOn` - Conditional visibility expressions |
| 25 | + - `dependsOn` - Cascading field dependencies |
| 26 | + - Custom `widget` - Custom field renderers |
| 27 | +- **Multiple Named Views**: Switch between different form layouts per scenario |
| 28 | + |
| 29 | +## 📄 PageSchema Examples |
| 30 | + |
| 31 | +Demonstrates component-based page layouts similar to Salesforce Lightning: |
| 32 | + |
| 33 | +- **Record Pages**: Detail pages for individual records |
| 34 | +- **Home Pages**: Dashboard-style landing pages |
| 35 | +- **App Pages**: Application launcher pages |
| 36 | +- **Utility Pages**: Utility bar components |
| 37 | + |
| 38 | +### Page Features Showcased |
| 39 | + |
| 40 | +- **Template-Based Layouts**: Regions-based component composition |
| 41 | +- **Rich Component Types**: |
| 42 | + - `record:details` - Record detail view with 1-4 columns |
| 43 | + - `record:highlights` - Key field highlights (1-7 fields) |
| 44 | + - `record:related_list` - Related records list |
| 45 | + - `page:tabs` - Tabbed content areas |
| 46 | + - `page:accordion` - Collapsible panels |
| 47 | + - `ai:chat_window` - AI assistant integration |
| 48 | +- **Visibility Rules**: Component-level conditional visibility |
| 49 | +- **Profile Assignment**: Assign pages to specific user profiles |
| 50 | + |
| 51 | +## 🧩 Component Properties |
| 52 | + |
| 53 | +Comprehensive component property schemas: |
| 54 | + |
| 55 | +- `RecordDetailsProps`: 1-4 columns, auto/custom layout modes |
| 56 | +- `RecordHighlightsProps`: 1-7 key fields highlighted |
| 57 | +- `RecordRelatedListProps`: Related object, columns, sorting, limits |
| 58 | + |
| 59 | +## 📁 Structure |
| 60 | + |
| 61 | +``` |
| 62 | +ui-showcase/ |
| 63 | +├── README.md (this file) |
| 64 | +└── src/ |
| 65 | + ├── objects/ |
| 66 | + │ └── lead.object.ts (sample object for UI examples) |
| 67 | + ├── views/ |
| 68 | + │ └── lead.view.ts (all 6 form types + multiple list views) |
| 69 | + └── pages/ |
| 70 | + ├── lead_detail.page.ts (record page) |
| 71 | + ├── home.page.ts (home page) |
| 72 | + ├── app_launcher.page.ts (app page) |
| 73 | + └── utility_bar.page.ts (utility page) |
| 74 | +``` |
| 75 | + |
| 76 | +## 🚀 Usage |
| 77 | + |
| 78 | +These examples serve as reference implementations demonstrating best practices for: |
| 79 | + |
| 80 | +1. **Salesforce Developers**: Familiar patterns like Page Layouts and FlexiPages |
| 81 | +2. **Low-Code Builders**: Visual form and page composition |
| 82 | +3. **AI Agents**: Structured metadata for code generation |
| 83 | + |
| 84 | +All examples follow ObjectStack naming conventions: |
| 85 | +- Configuration properties: `camelCase` |
| 86 | +- Machine names/identifiers: `snake_case` |
0 commit comments