外观
lib-ui 库参考
原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793226400/FIN+5.3.1+lib-ui 中文整理基于 FIN 5.3.1
导读: 支持 Fresco UI
以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。
目录(导读)
- lib
- meta
- tags
- funcs
- views
- def
- enum
- supertypes
- favEdit(dict)
- favNew(dict)
- favTrash(refs)
- iconUri(name, style, color)
- uiLink(req)
- uiLinkAbs(req)
- vizAutoRange(min, max)
- vizInterpolateRgb(colors, val)
- src
概述(中译)
支持 Fresco UI
API 正文(英文)
tags
| chartAreaMode | Enumeration for how to renders an area fill for a line plot series Note |
| chartGroup | Group name used to explicitly group series into one chart |
| chartHeight | Fixes the height of a chart plot |
| chartLegend | Provides option to control legend on charts |
| chartLegendNoSort | Disable sorting series by their display name in the legend |
| chartMax | Define explicit max value for series axis |
| chartMin | Define explicit min value for series axis |
| chartNoScroll | Disable scrollbars in viz charts |
| chartType | Enumerated chart type such as "line" or "bar" |
| exclude | Marks a series are excluded from the chart |
| format | Pattern used to format a value via format() |
| noData | Message string when no data available |
| opacity | Alpha transparency for colors as number between 0.0 (transparent) to 1.0 (completely opaque) |
| strokeDasharray | Comma separated lengths of dashs and gaps for rendering lines such as "6,4" |
| strokeWidth | Stroke width for rendering lines |
| subtitle | Defines subtitle string for visualizations |
| title | Defines title string for visualizations |
| uiMeta | Singleton used to configure project level user interface settings |
funcs
| favEdit | Edit a favotie record |
| favNew | Create a new fav record action |
| favTrash | Trash a favorite record |
| iconUri | Create a virtual file URI to an icon |
| uiLink | Host relative URI to hyperlink to a Fresco view - see Export |
| uiLinkAbs | Convenience for httpSiteUri() + uiLink() to generate an absolute URI hyperlink |
| vizAutoRange | Return the automatic axis range of a min, max number |
| vizInterpolateRgb | Interpolate a heatmap color using the RGB color model |
views
| apps | App builder used to edit application view groupings |
| backups | Execute and manage project database backups |
| codeEditor | Editor for Axon functions |
| debugExts | Debug the installed extensions |
| debugFolio | Debug the Folio database and the JIT indexing |
| debugProj | Debug the project actor pools |
| extSettings | Enable and disable project extensions |
| favs | Manage saved favorite views |
| files | Browse the virtual file system |
| lint | View lint errors to validate your database |
| projAdmin | Admin tools for the current project |
| projSettings | Settings for the project configured on projMeta |
| shell | Axon interactive shell to evaluate and visualize expressions |
| sites | Site builder used to edit the site/space/equip/point model |
| tags | Tag builder used to edit project tag definitions |
| trash | View and restore records which have been moved to the trash |
| uiSettings | Settings for the user interfactor configured on uiMeta |
| usingSettings | Manage Xeto libraries |
| views | View builder used to edit customized views in the local project |
def
chartAreaMode
Enumeration for how to renders an area fill for a line plot series Note: nextSeries/prevSeries mode does not support NA data gaps
meta
| def | chartAreaMode |
| enum | See below |
| is | str |
| lib | lib:ui |
enum
| none | no area fill |
| axisMin | fill area down to the min value of the y-axis |
| axisMax | fill area up to the max value of the y-axis |
| zero | fill area up to the zero position on y-axis |
| nextSeries | fill area to the next series in the plot |
| prevSeries | fill area from the previous series in the plot |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
chartGroup
Group name used to explicitly group series into one chart. See Charts.
meta
| def | chartGroup |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
chartHeight
Fixes the height of a chart plot. This tag must be applied to all series within the plot. It is mesaured in SVG logical units which same as pixels when rendering to the screen. See Charts.
meta
| def | chartHeight |
| is | number |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| number | Integer or floating point numbers annotated with an optional unit |
def
chartLegend
Provides option to control legend on charts. See Charts.
meta
| def | chartLegend |
| enum | See below |
| is | str |
| lib | lib:ui |
enum
| auto | legend is displayed automatically if there is room |
| hide | legend is not displayed |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
chartLegendNoSort
Disable sorting series by their display name in the legend. This forces ordering of the series within one plot based on the grid column ordering. Note that if multiple plots are overlaid into one chart, the legend will still by ordered by the plot level. See Charts.
meta
| def | chartLegendNoSort |
| is | marker |
| lib | lib:ui |
supertypes
| marker | Marker labels a dict with typing information |
def
chartMax
Define explicit max value for series axis. See Charts.
meta
| def | chartMax |
| is | number |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| number | Integer or floating point numbers annotated with an optional unit |
def
chartMin
Define explicit min value for series axis. See Charts.
meta
| def | chartMin |
| is | number |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| number | Integer or floating point numbers annotated with an optional unit |
def
chartNoScroll
Disable scrollbars in viz charts. See Charts.
meta
| def | chartNoScroll |
| is | marker |
| lib | lib:ui |
supertypes
| marker | Marker labels a dict with typing information |
def
chartType
Enumerated chart type such as "line" or "bar". See Charts.
meta
| def | chartType |
| enum | See below |
| is | str |
| lib | lib:ui |
enum
| bar | vertical bar chart |
| donut | like pie chart with cutouts in middle of circles |
| heatMap | color coded cells |
| line | draws a line thru y-axis values for series |
| pie | visualize as slices of total |
| runtime | shows on/off/NA data as horizontal bar chart |
| scatter | draws dots for series |
| stackedBar | stacks vertical bars from multiple series |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
exclude
Marks a series are excluded from the chart. Excluded series are not used when computing the y-axis bounds (unless toggling the series in the legend). See Charts.
meta
| def | exclude |
| is | marker |
| lib | lib:ui |
supertypes
| marker | Marker labels a dict with typing information |
def
format
Pattern used to format a value via format(). Use "_blank" to disable showing text in UI screens such as tables.
meta
| def | format |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
func:favEdit
favEdit(dict)
Edit a favotie record. Do not use this function directly; for actions only.
meta
| admin | ✓ |
| def | func:favEdit |
| disKey | ui::edit |
| is | func |
| lib | lib:ui |
| multi | ✓ |
| name | favEdit |
| select | ✓ |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:favNew
favNew(dict)
Create a new fav record action. Do not use this function directly; for actions only.
meta
| def | func:favNew |
| disKey | ui::new |
| is | func |
| lib | lib:ui |
| name | favNew |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:favTrash
favTrash(refs)
Trash a favorite record. Do not use this function directly; for actions only.
meta
| admin | ✓ |
| confirm | |
| def | func:favTrash |
| disKey | ui::trash |
| is | func |
| lib | lib:ui |
| multi | ✓ |
| name | favTrash |
| select | ✓ |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:iconUri
iconUri(name, style, color)
Create a virtual file URI to an icon. If name is null, then default to the "unknown" icon.
iconUri("lock")
iconUri("lock", "outline")
iconUri("lock", "outline", "blue")meta
| def | func:iconUri |
| is | func |
| lib | lib:ui |
| name | iconUri |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:uiLink
uiLink(req)
Host relative URI to hyperlink to a Fresco view - see Export
meta
| def | func:uiLink |
| is | func |
| lib | lib:ui |
| name | uiLink |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:uiLinkAbs
uiLinkAbs(req)
Convenience for httpSiteUri() + uiLink() to generate an absolute URI hyperlink
meta
| def | func:uiLinkAbs |
| is | func |
| lib | lib:ui |
| name | uiLinkAbs |
| overridable | ✓ |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:vizAutoRange
vizAutoRange(min, max)
Return the automatic axis range of a min, max number. The range is returned as a dict of {min, max, interval}.
Examples:
vizAutoRange(22, 99)meta
| def | func:vizAutoRange |
| is | func |
| lib | lib:ui |
| name | vizAutoRange |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
func:vizInterpolateRgb
vizInterpolateRgb(colors, val)
Interpolate a heatmap color using the RGB color model. The colors must be a list of color strings or a single string of comma separated colors. The value must be a number between 0.0 to 1.0.
Examples:
vizInterpolateRgb("blue,green,red", 0.5)
vizInterpolateRgb(["#2980b9", "#9b59b6"], 0.5)meta
| def | func:vizInterpolateRgb |
| is | func |
| lib | lib:ui |
| name | vizInterpolateRgb |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| func | Axon function |
def
noData
Message string when no data available. See Charts.
meta
| def | noData |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
opacity
Alpha transparency for colors as number between 0.0 (transparent) to 1.0 (completely opaque).
meta
| def | opacity |
| is | number |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| number | Integer or floating point numbers annotated with an optional unit |
def
strokeDasharray
Comma separated lengths of dashs and gaps for rendering lines such as "6,4". For bar and runtime plots the second digit is used to determine cross hatch spacing (the first digit is ignored).
meta
| def | strokeDasharray |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
strokeWidth
Stroke width for rendering lines
meta
| def | strokeWidth |
| is | number |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| number | Integer or floating point numbers annotated with an optional unit |
def
subtitle
Defines subtitle string for visualizations. See Charts.
meta
| def | subtitle |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
title
Defines title string for visualizations. See Charts.
meta
| def | title |
| is | str |
| lib | lib:ui |
supertypes
| val | Data value type |
| scalar | Scalar is an atomic value kind |
| str | Unicode string of characters |
def
uiMeta
Singleton used to configure project level user interface settings. See Nav.
meta
| def | uiMeta |
| is | marker |
| lib | lib:ui |
supertypes
| marker | Marker labels a dict with typing information |
def
view:apps
App builder used to edit application view groupings
meta
| admin | ✓ |
| appName | builder |
| def | view:apps |
| defName | app |
| disKey | ui::app |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { inherit:"table" }
search: { input var kind:"Str" defVal:"" }
new: { action:"recNew" }
edit: { action:"recEdit" }
trash: { action:"recTrash" }
menu: { action:"uiContextMenu" }
data: { expr:"readAll(app, { sort, search:{{search}} })" }def
view:backups
Execute and manage project database backups
meta
| admin | ✓ |
| appName | tools |
| def | view:backups |
| disKey | ui::backups |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
backup: {action:"folioBackup"}
delete: {action:"folioBackupDelete"}
data: {expr:"folioBackups()"}def
view:codeEditor
Editor for Axon functions
meta
| admin | ✓ |
| appName | code |
| def | view:codeEditor |
| defName | func |
| disKey | ui::editor |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 100 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { uiType:"uiDev::DevView" }
uri: { var defVal:`dev:blank` }
showNav: { var defVal:"funcs" }
showTool: { var defVal:"hide" }
markers: { var }def
view:debugExts
Debug the installed extensions
meta
| admin | ✓ |
| appName | debug |
| def | view:debugExts |
| disKey | ui::exts |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
data: {expr:"exts()"}def
view:debugFolio
Debug the Folio database and the JIT indexing
meta
| admin | ✓ |
| appName | debug |
| def | view:debugFolio |
| disKey | ui::folio |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
mode: {var input kind:"Str" enum:"Summary,Reads by Tag,Reads by Plan,Watches" defVal:"Summary"}
refresh: {dis:"Refresh" noFlash action:"noop"}
details: {dis:"Details" noFlash select action:"folioDebugDetails"}
data: {expr:"folioDebug({{mode}})"}def
view:debugProj
Debug the project actor pools
meta
| appName | debug |
| def | view:debugProj |
| disKey | ui::proj |
| icon | view |
| is | view |
| lib | lib:ui |
| su | ✓ |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"text"}
data: {expr:"debugProj()"}def
view:extSettings
Enable and disable project extensions
meta
| admin | ✓ |
| appName | settings |
| def | view:extSettings |
| disKey | ui::exts |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 100 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
enable: {disKey:"ui::enable" select multi action:"uiBuilder::LibActions.enable"}
disable: {disKey:"ui::disable" select multi action:"uiBuilder::LibActions.disable"}
data: {expr: "exts()"}def
view:favs
Manage saved favorite views
meta
| appName | favs |
| def | view:favs |
| disKey | ui::favorites |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view : { inherit:"tile" }
layout: { var kind:"Str" defVal:"grid 4x1; 0 0 1 1; 1 0 3 1" }
nav: Trio:
view: { inherit:"table" }
filter: { var defVal:"fav" bindSelect:"filter" }
sep1: { action:"uiSep" }
data: { expr:"favGroups()" }
table: Trio:
view: { inherit:"table" templateName:"fav" }
filter: { var binding:"../nav/filter" }
search: { input var kind:"Str" defVal:"" }
edit: { action:"favEdit" refresh }
trash: { action:"favTrash" }
data: { expr:"favReadAll({{filter}}, { search:{{search}} })" }def
view:files
Browse the virtual file system
meta
| admin | ✓ |
| appName | tools |
| def | view:files |
| dis | File |
| disKey | ui::file |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { uiType:"uiBuilder::FileBuilder" }
uri: { var kind:"Uri" }
newDir: { disKey:"ui::newDir" action:"fileBuilderNewDir" select tag:"uri" }
newFile: { disKey:"ui::newFile" action:"fileBuilderNewFile" select tag:"uri" }
upload: { disKey:"ui::upload" action:"fileBuilderUpload" upload multi }
rename: { disKey:"ui::rename" action:"fileBuilderRename" select tag:"uri" }
delete: { disKey:"ui::delete" action:"ioDelete" select tag:"uri" confirm:{icon:"warn" disKey:"ui::ioDeleteConfirm" detailsKey:"ui::ioDeleteConfirmDetails"} }
data: { expr:"{}" }def
view:lint
View lint errors to validate your database
meta
| admin | ✓ |
| appName | tools |
| def | view:lint |
| disKey | ui::lint |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
show: {var input enum:"All,Warn Only,Err Only" defVal:"All"}
menu: { action:"uiContextMenu" }
data: {expr:"lintTool({{show}})"}def
view:projAdmin
Admin tools for the current project
meta
| appName | tools |
| def | view:projAdmin |
| disKey | ui::projAdmin |
| icon | view |
| is | view |
| lib | lib:ui |
| su | ✓ |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
demogen: {disKey:"ui::demogen" action:"uiMisc::ProjDemogen.open"}
backup: {action:"folioBackup"}
restore: {action:"projRestore" templateName:"projRestore" hideAdd hideAdvanced}
projExport: {action:"projExport" templateName:"projExport" hideAdd hideAdvanced}
projImport: {action:"projImport" templateName:"projImport" hideAdd hideAdvanced}
projRebuild: {action:"projRebuildAction"}
data: {expr:"projViewStatus()"}def
view:projSettings
Settings for the project configured on projMeta
meta
| admin | ✓ |
| appName | settings |
| def | view:projSettings |
| disKey | ui::proj |
| icon | view |
| is | view |
| lib | lib:ui |
| templateName | projSettings |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"form"}
submit: {action:"recFormCommit" refresh}
data: {expr: "read(projMeta).recForm(\"projSettings\").addMeta({templateName:\"projSettings\"})"}def
view:shell
Axon interactive shell to evaluate and visualize expressions
meta
| admin | ✓ |
| appName | tools |
| def | view:shell |
| defName | entity |
| disKey | ui::shell |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 100 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { uiType:"uiBuilder::ShellView" }
tab: { var kind:"Str" defVal:"" }
expr: { var kind:"Str" defVal:"{}" }
new: { action:"recNew" }
edit: { action:"recEdit" }
dup: { action:"recDup" }
trash: { action:"recTrash" }
menu: { action:"uiContextMenu" }
data: { expr:"evalOrReadAll({{expr}})" }def
view:sites
Site builder used to edit the site/space/equip/point model
meta
| admin | ✓ |
| appName | builder |
| def | view:sites |
| disKey | ui::site |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 101 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { uiType:"uiBuilder::SiteBuilder" }
menu: { action:"uiContextMenu" }def
view:tags
Tag builder used to edit project tag definitions
meta
| admin | ✓ |
| appName | builder |
| def | view:tags |
| defName | def |
| disKey | ui::tag |
| icon | view |
| is | view |
| lib | lib:ui |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { inherit:"table" }
search: { input var kind:"Str" defVal:"" }
new: { action:"recNew" }
edit: { action:"recEdit" }
dup: { action:"recDup" }
trash: { action:"recTrash" }
menu: { action:"uiContextMenu" }
data: { expr:"recTagDefs({ search:{{search}} })" }def
view:trash
View and restore records which have been moved to the trash
meta
| admin | ✓ |
| appName | tools |
| def | view:trash |
| disKey | ui::trash |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 801 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { inherit:"table" }
empty: { disKey:"ui::empty" action:"recEmptyTrash" }
restore: { disKey:"ui::restore" action:"recRestoreFromTrash" select multi }
data: { expr:"readAll(trash, {trash})" }def
view:uiSettings
Settings for the user interfactor configured on uiMeta
meta
| admin | ✓ |
| appName | settings |
| def | view:uiSettings |
| disKey | ui::ui |
| icon | view |
| is | view |
| lib | lib:ui |
| templateName | uiSettings |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"form"}
submit: {action:"uiSettingsFormCommit" refresh}
config: {disMacro:"$<ui::config> $<ui::target>" action:"uiMisc::ConfigTarget.config"}
testNav: {disMacro:"$<ui::test> Nav" action:"uiMisc::NavPathTest.test"}
data: {expr: "read(uiMeta).recForm(\"uiSettings\").addMeta({templateName:\"uiSettings\"})"}def
view:usingSettings
Manage Xeto libraries
meta
| admin | ✓ |
| appName | settings |
| def | view:usingSettings |
| disKey | ui::using |
| icon | view |
| is | view |
| lib | lib:ui |
| order | 200 |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: {inherit:"table"}
enable: {disKey:"ui::enable" select multi action:"uiBuilder::UsingActions.enable"}
disable: {disKey:"ui::disable" select multi action:"uiBuilder::UsingActions.disable"}
data: {expr: "usingStatus()"}def
view:views
View builder used to edit customized views in the local project
meta
| admin | ✓ |
| appName | builder |
| def | view:views |
| disKey | ui::view |
| icon | view |
| is | view |
| lib | lib:ui |
| templateName | view |
supertypes
| feature | Feature namespace of definitions formatted as feature:name |
| view | Fresco UI view |
src
view: { uiType:"uiBuilder::ViewBuilder" }
viewRef: { var input kind:"Ref<view>" }
newView: { disKey:"ui::new" action:"uiBuilder::ViewBuilder.onNew" }
editView: { disKey:"ui::edit" action:"recEdit" }
saveView: { disKey:"ui::save" action:"uiBuilder::ViewBuilder.onSave" select }
trash: { disKey:"ui::trash" action:"recTrash" refresh }
batchBind: { disKey:"ui::batchBind" action:"uiBuilder::ViewBuilder.onBatchBind" select refresh }
togglesb: { disKey:"ui::toggleSidebar" action:"uiBuilder::ViewBuilder.onToggleSidebar" }
gotoView: { disKey:"ui::goto" select action:"uiGoto" target:{view:"{{view}}" } refresh }
data: { expr:"readAll(view)" }