uc-apx create region avatar
Insert a themeTemplateComponent/avatar region backed by an inline SQL
query — the multiple (report) display that renders one avatar per row.
—avatar-type picks the source: image (+ —image-column), initials (+ —initials-column), or icon (+ —icon fa-*).
To render an avatar inside a report instead, use
uc-apx edit column --type avatar on an IR/IG column.
uc-apx create region avatar [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--avatar-type | string | Avatar source type: image, initials, or icon [required] | |
--column | string | Comma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required] | |
--column-span | int | 12-col grid span for the region’s layout (0 = omit) | |
--css-classes | string | CSS classes applied to the avatar, e.g. u-color-29 (optional) | |
--dry-run | Print rendered region to stdout without writing | ||
--force | Replace an existing same-id region on the page | ||
--icon | string | Static Font Awesome class, e.g. fa-user (required when —avatar-type icon) | |
--id | string | Region id (default: kebab-case of —name) | |
--image-column | string | Column holding the image URL (required when —avatar-type image) | |
--initials-column | string | Column holding the initials (required when —avatar-type initials) | |
--name | string | Display name of the region [required] | |
--no-new-row | Emit startNewRow: false so this region sits next to the previous one | ||
--page | string | Target page (numeric ID, alias, or name) [required] | |
--pagination-rows | int | entitiesPerPage for pagination (0 = omit) | |
--pk-column | string | Column to flag as the primary key (optional) | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--shape | string | Avatar shape: rounded, circular, square (optional) | |
--size | string | Avatar size: extraSmall, small, large, extraLarge, … (optional) | |
--slot | string | body | Page slot to place the region in |
--sql | string | Inline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required] |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create region avatar --page 46 --name People --sql select product_name as title, image as avatar from oow_demo_products --column TITLE,AVATAR --avatar-type image --image-column AVATAR --dry-runGenerated APEXlang
region people ( name: People type: themeTemplateComponent/avatar source { location: localDatabase type: sqlQuery sqlQuery: ```sql select product_name as title, image as avatar from oow_demo_products ``` } layout { sequence: 50 slot: body } appearance { template: @/blank-with-attributes-no-grid templateOptions: #DEFAULT# } componentAppearance { display: report } settings { type: image image: { type: urlColumn urlColumn: AVATAR } }
column TITLE ( layout { sequence: 10 } source { databaseColumn: TITLE dataType: varchar2 } )
column AVATAR ( layout { sequence: 20 } source { databaseColumn: AVATAR dataType: varchar2 } ) )