diff --git a/docs/components.md b/docs/components.md index ec93b7526..c2247c55a 100644 --- a/docs/components.md +++ b/docs/components.md @@ -159,22 +159,31 @@ This modal is based on [svelte-modals](https://svelte-modals.mattjennings.io/) w 🌙 ## MoonBase components +Renderer: Takes JSON definitions and based on the type property shows a specific widget (e.g. input, checkbox, dropdown, ...) +Widget: Complex, interactive components with editing capabilities + -### MultiInput +### FieldRenderer Support for html input widgets including text, number, range, checkbox and pad (multiple buttons in 2D array layout) -### Array +### RowRenderer -* Show an array of objects - * Summary and editor +* Show multiple rows of objects + * Summary and zoom * Recursive - * An array can have an array e.g. multiple nodes with multiple controls per node -* Uses MultiInput + * A row renderer can have a row renderer e.g. multiple nodes with multiple controls per node +* Uses FieldRenderer * Used data and definition rest apis -### FileEdit +### EditRowWidget + +Shows all fields of a row (using FieldRenderer) in a popup + +### FileEditWidget + +Shows filename, file contents and uploadfile (from file system). Used in FileManager and FieldRenderer (select widgets containing files, which can directly be edited - for livescripts) Arguments diff --git a/docs/develop/modules.md b/docs/develop/modules.md index 179ebc37b..46fd61c24 100644 --- a/docs/develop/modules.md +++ b/docs/develop/modules.md @@ -144,7 +144,7 @@ It might be arguable that readonly variables are not stored in state data. ### UI * [Module.svelte](https://github.com/MoonModules/MoonLight/blob/main/interface/src/routes/moonbase/module/Module.svelte) will deal with the UI -* [MultiInput.svelte](https://github.com/MoonModules/MoonLight/blob/main/interface/src/lib/components/moonbase/MultiInput.svelte) is used by Module.svelte to display the right UI widget based on what is defined in the definition json +* [FieldRenderer.svelte](https://github.com/MoonModules/MoonLight/blob/main/interface/src/lib/components/moonbase/FieldRenderer.svelte) is used by Module.svelte to display the right UI widget based on what is defined in the definition json * Modifications done in [menu.svelte](https://github.com/MoonModules/MoonLight/blob/main/interface/src/routes/menu.svelte) do identify a module by href and not by title alone ### Example of json diff --git a/docs/moonbase/filemanager.md b/docs/moonbase/filemanager.md index 5ff611030..6ce9299da 100644 --- a/docs/moonbase/filemanager.md +++ b/docs/moonbase/filemanager.md @@ -4,5 +4,5 @@ * Navigate through folders * create files and folders -* edit and upload files (see FileEdit) +* edit and upload files (see FileEditWidget) * Option to show hidden files (files starting with . e.g. .config) diff --git a/docs/moonbase/inputoutput.md b/docs/moonbase/inputoutput.md index b99f342c6..66a36c3a3 100644 --- a/docs/moonbase/inputoutput.md +++ b/docs/moonbase/inputoutput.md @@ -75,7 +75,7 @@ For each board the following presets are defined: * On new ESP32-P4 Nano boards, the WiFi coprocessor needs to be updated first to a recent version, currently ESP-Hosted v2.0.17, see the link in the [MoonLight Installer](../../gettingstarted/installer/) * After install, select the **MHC P4 Nano Shield** board preset to have the pins assigned correctly. * Assuming 100W LED power; change if needed. - * Switch1: (set also the switches on the board) + * Switch1: (also set the switches on the board) * off (default): 16 LED pins. * On: 8 LED pins, 4 RS-485 pins and 4 exposed pins * Switch2: diff --git a/interface/src/lib/components/moonbase/EditObject.svelte b/interface/src/lib/components/moonbase/EditRowWidget.svelte similarity index 74% rename from interface/src/lib/components/moonbase/EditObject.svelte rename to interface/src/lib/components/moonbase/EditRowWidget.svelte index 0f8c71612..57445fde0 100644 --- a/interface/src/lib/components/moonbase/EditObject.svelte +++ b/interface/src/lib/components/moonbase/EditRowWidget.svelte @@ -1,3 +1,13 @@ + +