Wiki source code of Live Data UI
Last modified by Manuel Leduc on 2026/03/24 10:19
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | Provides the Vue components and methods needed to initialize a Live Data UI. | ||
| 2 | |||
| 3 | == BaseDisplayer == | ||
| 4 | |||
| 5 | A generic displayer that can be used as a base for implementing more specific displayers. | ||
| 6 | |||
| 7 | === Props === | ||
| 8 | |||
| 9 | * ##viewOnly##: when true, disable the edit mode for the displayer, false otherwise | ||
| 10 | * ##isView##: when true, set the displayer in view mode, when false in edit mode | ||
| 11 | * ##isLoading##: when true, set the displayer in loading mode | ||
| 12 | * ##isEmpty##: indicates that the content of the displayer is actually empty and not just a missing value (e.g., because of rights) | ||
| 13 | * ##interceptTouch##: when false, disable the interception of touch events, in particular for handling links inside displayers. The default is true. | ||
| 14 | |||
| 15 | == displayerMixin == | ||
| 16 | |||
| 17 | A [[mixin>>https://vuejs.org/api/options-composition.html#mixins]] providing base methods for displayers. | ||
| 18 | |||
| 19 | /code | ||
| 20 | |||
| 21 | {{remotecode source="https://raw.githubusercontent.com/xwiki/xwiki-platform/refs/heads/master/xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayers/displayerMixin.js" language="javascript"/}} | ||
| 22 | |||
| 23 | == XWikiIcon == | ||
| 24 | |||
| 25 | An icon displayer Vue component. | ||
| 26 | |||
| 27 | === Props === | ||
| 28 | |||
| 29 | * ##iconDescriptor##: The descriptor of an icon, see [[the icons API>>doc:extensions:Extension.Icon Theme Application||anchor="HRESTAPI"]]. | ||
| 30 | |||
| 31 | == XWikiLivedata == | ||
| 32 | |||
| 33 | The root component of a Live Data. This is the main entry point of the Live Data UI. | ||
| 34 | |||
| 35 | === loadById === | ||
| 36 | |||
| 37 | Utility method to load a requirejs module by its id, but returning a promise instead of a taking a callback method. | ||
| 38 | |||
| 39 | {{code language="typescript"}} | ||
| 40 | loadById(...ids): Promise<unknown> | ||
| 41 | {{/code}} | ||
| 42 | |||
| 43 | == populateStore == | ||
| 44 | |||
| 45 | Initialize the [[Component Store>>doc:documentation.xs.dev.front-end.livedata.componentstore-api.WebHome]] with the default displayers and layouts. |