diff --git a/CHANGELOG.md b/CHANGELOG.md index a893072f..3b85a172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,10 @@ I will attempt to also trap a new project create to run the install if I can. Ot * [ ] Template Examples - remove old library example. * [ ] `uib-sender` - remove ref to uibuilderfe and update flows. * [ ] Navigation menu examples. 1x Router, 1x page. + * [x] jQuery + * [x] Client side/Dynamic SVG + * [x] Low code/report builder + * [x] Simple flow ### Documentation diff --git a/examples/3rd-party Frameworks/jQuery.json b/examples/3rd-party Frameworks/jQuery.json new file mode 100644 index 00000000..889e8a81 --- /dev/null +++ b/examples/3rd-party Frameworks/jQuery.json @@ -0,0 +1,316 @@ +[ + { + "id": "51317a1ca60f92ef", + "type": "group", + "z": "ff9704678e3a4b61", + "name": "UIBUILDER super-simple jQuery example (Updated: 2024-07-01) \\n ", + "style": { + "fill": "#e3f3d3", + "fill-opacity": "0.2", + "label": true, + "color": "#000000" + }, + "nodes": [ + "ef2c6bdb83f45e40", + "f8176cc4d8409322", + "174c8a1a9edc3178", + "0e38f1543880aa12", + "1d65510c9840813a", + "60481ea45d3c3ccc" + ], + "x": 138, + "y": 843, + "w": 734, + "h": 304 + }, + { + "id": "ef2c6bdb83f45e40", + "type": "inject", + "z": "ff9704678e3a4b61", + "g": "51317a1ca60f92ef", + "name": "Msg", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "msg-from-nr", + "payload": "A message from Node-RED", + "payloadType": "str", + "x": 250, + "y": 920, + "wires": [ + [ + "0e38f1543880aa12" + ] + ] + }, + { + "id": "f8176cc4d8409322", + "type": "debug", + "z": "ff9704678e3a4b61", + "g": "51317a1ca60f92ef", + "name": "std msg output", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": true, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "counter", + "x": 755, + "y": 900, + "wires": [], + "l": false + }, + { + "id": "174c8a1a9edc3178", + "type": "debug", + "z": "ff9704678e3a4b61", + "d": true, + "g": "51317a1ca60f92ef", + "name": "ctrl msg output", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": true, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "counter", + "x": 755, + "y": 960, + "wires": [], + "l": false + }, + { + "id": "0e38f1543880aa12", + "type": "uibuilder", + "z": "ff9704678e3a4b61", + "g": "51317a1ca60f92ef", + "name": "", + "topic": "", + "url": "uib-jquery-example", + "okToGo": true, + "fwdInMessages": false, + "allowScripts": false, + "allowStyles": false, + "copyIndex": true, + "templateFolder": "blank", + "extTemplate": "", + "showfolder": false, + "reload": true, + "sourceFolder": "src", + "deployedVersion": "6.2.0-dev", + "showMsgUib": true, + "editurl": "vscode://file/src/uibRoot/uib-jquery-example/?windowId=_blank", + "x": 600, + "y": 920, + "wires": [ + [ + "f8176cc4d8409322" + ], + [ + "174c8a1a9edc3178" + ] + ] + }, + { + "id": "1d65510c9840813a", + "type": "inject", + "z": "ff9704678e3a4b61", + "g": "51317a1ca60f92ef", + "name": "Toggle Visible Msgs", + "props": [ + { + "p": "_uib", + "v": "{\"command\":\"showMsg\"}", + "vt": "json" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "x": 290, + "y": 960, + "wires": [ + [ + "0e38f1543880aa12" + ] + ] + }, + { + "id": "60481ea45d3c3ccc", + "type": "group", + "z": "ff9704678e3a4b61", + "g": "51317a1ca60f92ef", + "name": "Run this to update the front-end code files (after setting the uibuilder url name)", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.31", + "label": true, + "color": "#000000" + }, + "nodes": [ + "4a251bd2ace9ddd0", + "c35dbab075b18367", + "d6f22ca9617c2dcf", + "806312030f917d49", + "a79d8f961c84980b", + "9cc007b379853232" + ], + "x": 164, + "y": 999, + "w": 682, + "h": 122 + }, + { + "id": "4a251bd2ace9ddd0", + "type": "inject", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "name": "", + "props": [], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "x": 225, + "y": 1080, + "wires": [ + [ + "806312030f917d49", + "a79d8f961c84980b" + ] + ], + "l": false + }, + { + "id": "c35dbab075b18367", + "type": "template", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "name": "", + "field": "payload", + "fieldType": "msg", + "format": "html", + "syntax": "mustache", + "template": "\n\n \n \n \n\n jQuery Example - Node-RED UIBUILDER\n \n\n \n \n\n \n \n \n \n \n \n \n\n

jQuery Example

\n
Using the UIBUILDER IIFE library.
\n\n
\n", + "output": "str", + "x": 500, + "y": 1040, + "wires": [ + [ + "d6f22ca9617c2dcf" + ] + ] + }, + { + "id": "d6f22ca9617c2dcf", + "type": "uib-save", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "url": "uib-jquery-example", + "uibId": "0e38f1543880aa12", + "folder": "src", + "fname": "", + "createFolder": false, + "reload": false, + "usePageName": false, + "encoding": "utf8", + "mode": 438, + "name": "", + "topic": "", + "x": 730, + "y": 1080, + "wires": [] + }, + { + "id": "806312030f917d49", + "type": "change", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "name": "index.html", + "rules": [ + { + "t": "set", + "p": "fname", + "pt": "msg", + "to": "index.html", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 350, + "y": 1040, + "wires": [ + [ + "c35dbab075b18367" + ] + ] + }, + { + "id": "a79d8f961c84980b", + "type": "change", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "name": "index.js", + "rules": [ + { + "t": "set", + "p": "fname", + "pt": "msg", + "to": "index.js", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 340, + "y": 1080, + "wires": [ + [ + "9cc007b379853232" + ] + ] + }, + { + "id": "9cc007b379853232", + "type": "template", + "z": "ff9704678e3a4b61", + "g": "60481ea45d3c3ccc", + "name": "", + "field": "payload", + "fieldType": "msg", + "format": "javascript", + "syntax": "mustache", + "template": "/** The simplest use of uibuilder client library\n * See the docs if the client doesn't start on its own.\n */\n\n$(document).ready(function () {\n\n // Listen for incoming messages from Node-RED and action\n uibuilder.onChange('msg', (msg) => {\n console.log('msg received', msg)\n // do stuff with the incoming msg\n $('#more').text(msg.payload)\n })\n\n})\n", + "output": "str", + "x": 500, + "y": 1080, + "wires": [ + [ + "d6f22ca9617c2dcf" + ] + ] + } +] diff --git a/examples/Client-side code/Dynamic SVG.json b/examples/Client-side code/Dynamic SVG.json new file mode 100644 index 00000000..16ca6663 --- /dev/null +++ b/examples/Client-side code/Dynamic SVG.json @@ -0,0 +1,771 @@ +[ + { + "id": "1678f3c7ab967e39", + "type": "group", + "z": "ff9704678e3a4b61", + "name": "UIBUILDER Dynamic SVG Example - Interactive bulb icons linked to Node-RED, minimal coding required (Updated 2024-07-01) \\n ", + "style": { + "label": true, + "color": "#000000", + "fill": "#ffffff", + "fill-opacity": "0.21" + }, + "nodes": [ + "18b02b8e78a54427", + "68208d9442bc03c1", + "5f6a472f6435e598", + "389e05735379ed2e", + "3feb6c0d7c1c07b2", + "8ce7dd9a5d97b83b", + "891a5f86c7c89917", + "3939b0bbde991557", + "5eb220cde9614fee", + "8653c6e164389a3a", + "9ca3a3da680721e7", + "bf47991b0cd95827" + ], + "x": 74, + "y": 879, + "w": 1172, + "h": 508 + }, + { + "id": "18b02b8e78a54427", + "type": "uibuilder", + "z": "ff9704678e3a4b61", + "g": "1678f3c7ab967e39", + "name": "", + "topic": "", + "url": "uib-dynamic-svg-eg", + "okToGo": true, + "fwdInMessages": false, + "allowScripts": false, + "allowStyles": false, + "copyIndex": true, + "templateFolder": "blank", + "extTemplate": "", + "showfolder": false, + "reload": true, + "sourceFolder": "src", + "deployedVersion": "6.2.0-dev", + "showMsgUib": true, + "editurl": "vscode://file/src/uibRoot/uib-dynamic-svg-eg/?windowId=_blank", + "x": 720, + "y": 1040, + "wires": [ + [ + "95af327f377fa565" + ], + [ + "5f6a472f6435e598" + ] + ] + }, + { + "id": "68208d9442bc03c1", + "type": "debug", + "z": "ff9704678e3a4b61", + "g": "1678f3c7ab967e39", + "name": "Std output", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": true, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "counter", + "x": 1105, + "y": 1100, + "wires": [], + "l": false + }, + { + "id": "5f6a472f6435e598", + "type": "debug", + "z": "ff9704678e3a4b61", + "d": true, + "g": "1678f3c7ab967e39", + "name": "Ctrl output", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": true, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "counter", + "x": 885, + "y": 1100, + "wires": [], + "l": false + }, + { + "id": "389e05735379ed2e", + "type": "comment", + "z": "ff9704678e3a4b61", + "g": "1678f3c7ab967e39", + "name": "Vanilla HTML, no framework needed. \\n Updated version of old example that used VueJS & update again for UIBUILDER v7 \\n Read this comment for details.", + "info": "This example demonstrates how to use uibuilder\nwith SVG images to create a dynamic home\nlighting dashboard.\n\nUse a background-image (see index.css) and\nthen clone the included \"bulb\" SVG \n(see index.html `