Skip to content

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]
FlagTypeDefaultDescription
--apply-theme-colorsSet settings.applyThemeColors (only emitted when the flag is passed)
--badge-iconstringBadge icon: a column (emitted as &COL.) or a static fa-* class (plugin-badge.icon)
--badge-labelstringBadge label (static text; plugin-badge.label)
--badge-state-columnstringColumn mapped to the badge state/color (plugin-badge.state)
--badge-value-columnstringColumn mapped to the badge value (plugin-badge.value)
--columnstringComma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required]
--column-spanint12-col grid span for the region’s layout (0 = omit)
--date-columnstringColumn mapped to the entry date [required]
--description-columnstringColumn mapped to the entry description [required]
--display-avatarShow an avatar for each entry (settings.displayAvatar: true)
--display-badgeShow a badge for each entry (settings.displayBadge: true + plugin-badge block)
--dry-runPrint rendered region to stdout without writing
--forceReplace an existing same-id region on the page
--idstringRegion id (default: kebab-case of —name)
--namestringDisplay name of the region [required]
--no-new-rowEmit startNewRow: false so this region sits next to the previous one
--pagestringTarget page (numeric ID, alias, or name) [required]
--pagination-rowsintentitiesPerPage for pagination (0 = omit)
--pk-columnstringColumn to flag as the primary key (optional)
--row-selectionstringRow selection: multiple, single, or focusOnly
--sequenceintLayout sequence (default: max existing + 10)
--slotstringbodyPage slot to place the region in
--sqlstringInline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required]
--stylestringTimeline style: compact (settings.style)
--title-columnstringColumn mapped to the entry title [required]
--user-name-columnstringColumn mapped to the entry user/actor [required]
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
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-run
Generated 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
}
)
)