uc-apx create region timeline
Insert a themeTemplateComponent/timeline region backed by an inline
SQL query. A timeline renders a chronological list of events, each with a
user name, date, title and description.
Required mappings: —user-name-column, —date-column, —title-column, —description-column (all name columns the —sql projects).
Optional avatar (—display-avatar) and badge (—display-badge + —badge-* flags) decorate each entry.
uc-apx create region timeline [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--apply-theme-colors | Set settings.applyThemeColors (only emitted when the flag is passed) | ||
--badge-icon | string | Badge icon: a column (emitted as &COL.) or a static fa-* class (plugin-badge.icon) | |
--badge-label | string | Badge label (static text; plugin-badge.label) | |
--badge-state-column | string | Column mapped to the badge state/color (plugin-badge.state) | |
--badge-value-column | string | Column mapped to the badge value (plugin-badge.value) | |
--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) | |
--date-column | string | Column mapped to the entry date [required] | |
--description-column | string | Column mapped to the entry description [required] | |
--display-avatar | Show an avatar for each entry (settings.displayAvatar: true) | ||
--display-badge | Show a badge for each entry (settings.displayBadge: true + plugin-badge block) | ||
--dry-run | Print rendered region to stdout without writing | ||
--force | Replace an existing same-id region on the page | ||
--id | string | Region id (default: kebab-case of —name) | |
--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) | |
--row-selection | string | Row selection: multiple, single, or focusOnly | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--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] | |
--style | string | Timeline style: compact (settings.style) | |
--title-column | string | Column mapped to the entry title [required] | |
--user-name-column | string | Column mapped to the entry user/actor [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 timeline --page 46 --name Activity --sql select id, who, when_at, what, descr from events --column ID:number,WHO,WHEN_AT:date,WHAT,DESCR --pk-column ID --user-name-column WHO --date-column WHEN_AT --title-column WHAT --description-column DESCR --dry-runGenerated APEXlang
region activity ( name: Activity type: themeTemplateComponent/timeline source { location: localDatabase type: sqlQuery sqlQuery: ```sql select id, who, when_at, what, descr from events ``` } layout { sequence: 50 slot: body } appearance { template: @/blank-with-attributes-no-grid templateOptions: #DEFAULT# } componentAppearance { display: report } settings { userName: WHO date: WHEN_AT title: WHAT description: DESCR }
column ID ( layout { sequence: 10 } source { databaseColumn: ID dataType: number primaryKey: true } )
column WHO ( layout { sequence: 20 } source { databaseColumn: WHO dataType: varchar2 } )
column WHEN_AT ( layout { sequence: 30 } source { databaseColumn: WHEN_AT dataType: date } )
column WHAT ( layout { sequence: 40 } source { databaseColumn: WHAT dataType: varchar2 } )
column DESCR ( layout { sequence: 50 } source { databaseColumn: DESCR dataType: varchar2 } ) )