diff --git a/.eslintrc.js b/.eslintrc.js
index b78e965b..05ea447a 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -104,7 +104,7 @@ module.exports = {
// Try to keep code complexity in functions to a minimum
'sonarjs/cognitive-complexity': ['error', 60], // default is 15! Need to try and improve this :-)
- 'sonarjs/no-duplicate-string': ['warn', 5], // default is 3
+ 'sonarjs/no-duplicate-string': ['warn', { 'threshold': 5 }], // default is 3
// Make Standard less annoying
'brace-style': 'off', // You should only use one-true-brace style but sometimes we want to compress things a bit.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000..e42e572a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,65 @@
+name: ๐ชฒ Report a bug or issue
+description: File an issue for UIBUILDER
+labels: [needs-triage]
+body:
+- type: markdown
+ attributes:
+ value: |
+ If your issue is a general 'how-to' type question, or something that needs discussion, please
+ firstly ask on [the Node-RED forum using the node-red-contrib-uibuilder tag](https://totallyinformation.github.io/node-red-contrib-uibuilder).
+
+ If you have a feature request or suggestion for a change, please use the Feature Request template.
+
+ Before logging an issue, please make sure that you are either on the latest npm version or the latest GitHub version of UIBUILDER.
+
+ Please ensure that as much of the following information is included as possible as it makes analysing and fixing it much easier.
+
+ Also, please try to include a simplified Node-RED flow that illustrates the issue.
+- type: textarea
+ attributes:
+ label: Current Behavior
+ description: A clear & concise description of what you're experiencing.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Expected Behavior
+ description: A clear & concise description of what you expected to happen.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: Steps to reproduce the behavior.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Example Node-RED flow
+ description: If you have a minimal example flow that demonstrates the issue, share it here.
+ value: |
+ ```
+ paste your flow here
+ ```
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Environment
+ description: Please tell us about your environment. Include any relevant information on how you are running Node-RED.
+ value: |
+ - UIBUILDER version:
+ - Node-RED version:
+ - Node.js version:
+ - npm version:
+ - Platform/OS:
+ - Browser:
+
+ How is Node-RED installed? (globally/locally? admin/user?):
+
+ How/where is UIBUILDER installed (palette-manager/globally/locally? Which folder?)
+
+ Have you changed any of the `uibuilder` settings in your `settings.js` file?
+
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000..cf3f39b1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,44 @@
+blank_issues_enabled: true
+contact_links:
+ - name: โ Ideas, questions & general help
+ url: https://discourse.nodered.org/tag/node-red-contrib-uibuilder
+ about: Ask your question on the Node-RED forum using the node-red-contrib-uibuilder tag
+ - name: ๐ Documentation
+ url: https://totallyinformation.github.io/node-red-contrib-uibuilder
+ about: Go to the latest documentation
+ - name: ๐งโ๐ป Flows
+ url: https://flows.nodered.org/search?term=uibuilder
+ about: Example flows, nodes and collections related to UIBUILDER
+ - name: โน๏ธ WIKI
+ url: https://github.com/TotallyInformation/node-red-contrib-uibuilder/wiki
+ about: More documentation and examples
+ - name: ๐ Example Svelte Template
+ url: https://github.com/TotallyInformation/uib-template-svelte-simple
+ about: In case you want to build your own svelte app
+ - name: ๐ Example Simple Template
+ url: https://github.com/TotallyInformation/uib-template-test
+ about: In case you want to build your own external template
+
+
+ - name: ๐ uPlot UIBUILDER extension
+ url: https://github.com/TotallyInformation/nr-uibuilder-uplot
+ about: Useful charts but also demonstrates how to build your own extension
+ - name: ๐จ ui library module used by UIBUILDER
+ url: https://github.com/TotallyInformation/ui.js
+ about: Can be used stand-alone for turning UI standard config JSON into HTML
+ - name: ๐จ Event Handler module used by UIBUILDER
+ url: https://github.com/TotallyInformation/ti-common-event-handler
+ about: So you can see some of the inner workings
+ - name: ๐งช Test Nodes for Node-RED
+ url: https://github.com/TotallyInformation/uib-template-test
+ about: Some test nodes for Node-RED that help you understand how everything works
+ - name: ๐ค HotNipi Gauge Web Component
+ url: https://github.com/TotallyInformation/gauge-hotnipi
+ about: A really nice looking gauge component. Works with UIBUILDER or stand-alone
+ - name: ๐งช Experimental Web Components
+ url: https://github.com/TotallyInformation/web-components
+ about: Have some Node-RED & UIBUILDER specific enhancements but also work well stand-alone
+
+ - name: ๐งช Array Grouper
+ url: https://github.com/TotallyInformation/groupit
+ about: Stand-alone function to reshape an array of objects
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 00000000..3d8a0c2a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,19 @@
+name: ๐ Request a feature
+description: File a bug/issue on the core of Node-RED
+labels: [needs-triage]
+body:
+- type: markdown
+ attributes:
+ value: |
+ Before requesting a new feature or improvement, please check the docs/roadmap.md file in the latest branch to see
+ whether it is already on the roadmap.
+
+ New features can be discussed in the Node-RED forum under the `node-red-contrib-uibuilder` tag and you may wish
+ to discuss there before raising a request.
+- type: textarea
+ attributes:
+ label: Request
+ description: A clear & concise description of what you would like.
+ validations:
+ required: true
+
diff --git a/.github/issue_template.md b/.github/issue_template.md
deleted file mode 100644
index 1e5539ff..00000000
--- a/.github/issue_template.md
+++ /dev/null
@@ -1,35 +0,0 @@
-Before logging an issue, please make sure that you are either on the latest npm version or the latest GitHub version.
-
-Please ensure that as much of the following information is included as possible.
-
-### Software and Package Versions
-
-> Node.JS, Node-RED and uibuilder back-end versions are listed in the Node-RED log on startup.
- `npm --version` shows the installed version of npm.
- From your browser's developer console (F12), the uibuilder front-end
- version can be seen by issuing the command `uibuilder.get('version').
- Please include all 5. Node.JS needs to be at least 4 but realistically, anything less than 6 is unlikely to work.
-
-> Please also include your Operating System name and version and your browser's name and version. Any browser version less than n-2 or IE < v11 very unlikely to work without help from [polyfill.io](https://polyfill.io).
-
-> I know it seems like a lot but it saves time in the long run
-
-Software | Version
--------------- | -------
-Node.JS |
-npm |
-Node-RED |
-uibuilder node |
-uibuilderFE |
-OS |
-Browser |
-
-
-### How is Node-RED installed? Where is uibuilder installed?
-
-> Often, issues with nodes occur because of non-standard installations.
- This may still indicate a bug so it is fine to report an issue. Just be sure you understand the consequences of how you have installed things.
-
-> A very common set of issues come from installing nodes as root instead of the user that runs Node-RED (e.g. using sudo on Mac/Linux). You will most likely be asked to undo that before we can analyse the issue.
-
-> Also quite common is to install the uibuilder node in the wrong folder. It is best to install using the Node-RED admin interface "Manage Palette". If installing manually, make sure you are in your `userDir` folder before installing (typically `~/.node-red`).
diff --git a/.github/workflows/chk-links-v66.yml b/.github/workflows/chk-links-v66.yml
new file mode 100644
index 00000000..0d2958a2
--- /dev/null
+++ b/.github/workflows/chk-links-v66.yml
@@ -0,0 +1,19 @@
+name: Check .md links on v6.6.0 branch
+
+on:
+ push: [v6.6.0]
+
+jobs:
+ markdown-link-check:
+ runs-on: ubuntu-latest
+ # check out the the code
+ steps:
+ - uses: actions/checkout@master
+ with:
+ ref: v6.6.0
+
+ # Checks the status of hyperlinks in .md files in verbose mode
+ - name: Check links
+ uses: gaurav-nelson/github-action-markdown-link-check@v1
+ with:
+ use-verbose-mode: 'yes'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index a3b69441..50518161 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -39,7 +39,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@master
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.gitignore b/.gitignore
index ade30969..ec80bd0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -123,8 +123,7 @@ _node_modules
*.code-workspace
.checksums
-# We shouldn't commit files with names starting with _
-_*
+# Omit Obsidian db files
docs/.obsidian/app.json
docs/.obsidian/appearance.json
docs/.obsidian/core-plugins.json
@@ -133,3 +132,15 @@ docs/.obsidian/workspace.json
docs/.obsidian/snippets/attention-callout.css
docs/.obsidian/themes/Minimal/manifest.json
docs/.obsidian/themes/Minimal/theme.css
+
+# Omit random test files.
+tests/execa/package-lock.json
+tests/execa/package.json
+tests/execa/test-execa-src.js
+tests/execa/test-execa-src.mjs
+tests/execa/test-execa.js
+tests/execa/test2.mjs
+tests/execa/test3.js
+
+#
+tmp/_*
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 004162d3..7fac1b93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,12 +10,192 @@ Please see the documentation for archived changelogs - a new archive is produced
Check the [roadmap](./docs/roadmap.md) for future developments.
-----
+* Outdated examples - some of the included example flows such as the "remote-commands" example are now out of date. What is there will still work but they are no longer comprehensive. Will try to catch them up as soon as I can.
+* Add URL case sensitivity flag - currently ExpressJS and Socket.IO handle URL case sensitivity differently. In rare cases, this can cause an error. Will make both case sensitive in line with W3C recommendations (will be optional until next major release).
-## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.4.1...main)
+ Add case sensitivity flag to uibuilder node and allow setting of ExpressJS flags on routers. [ref 1](https://stackoverflow.com/questions/21216523/nodejs-express-case-sensitive-urls), [Ref 2](http://expressjs.com/en/api.html). Also document in uibuilder settings. [Ref 3](https://discourse.nodered.org/t/uibuilder-and-url-case-sensitivity/81019/6).
+
+### TO FIX
+
+* Loading template - if it fails due to a missing dependency, the template isn't loaded but the Template shows the new one. Need to revert the name if loading fails.
+* uibRoot package.json - add check if dependencies blank but `node_modules` is not empty, if so, repopulate? Need to decide when to check - on commit at least.
+* uib-tag - Attribs Source - should be "None" as default
+* Editor (all nodes) - Use jQueryUI tooltips instead of uib custom (see `uib-element`)
+* Templates - add eslint dev dependencies to package.json
+ * .eslintrc.js: Configuration for rule "sonarjs/no-duplicate-string" is invalid: Value 6 should be object.
+
+
+
+------------
+
+## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.6.0...main)
Nothing currently.
+## [v6.6.0](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.5.0...v6.6.0)
+
+### Highlights
+
+
+
+### **NEW NODE** - `uib-html` - Hydrates `msg._ui` configurations into HTML
+
+Takes a `msg._ui` input such as those produced by the uibuilder zero-code nodes (`uib-element`, `uib-tag`, `uib-update`) and "hydrates" that config UI description into HTML.
+
+Uses the same code as the client library. Outputs HTML on `msg.payload`, removes the input `msg._ui`.
+
+
+#### Current Limitations
+
+* Uses the widely used [`jsdom` library](https://www.npmjs.com/package/jsdom) to do all the heavy lifting. This library is used by many existing tools and implements virtually all of the DOM v4 spec. However, there will always be a few things that can't be done in a virtual DOM outside the browser. Check the JSDOM library documentation and WIKI for any current limitations.
+* Some things such as the dynamic client commands (reload, toggle visible msgs, ... ) don't make sense in this context. They will either produce an error or will be ignored. Occasionally, they might produce some unexpected output.
+* Testing is currently very limited. Please report any errors.
+
+#### Why?
+
+- Learn how to write your own HTML
+- Output to a uibuilder node to save processing the _ui data in the front-end
+- Output to a uibuilder server folder for use in your app as a static load (or occasionally changing load)
+- Output to a file for use in an external (to Node-RED) static web server/service
+- Output to an `http-out` node as a response to a request
+- Output to a `ui_template` node for incorporation in Dashboard UI's
+
+### **NEW NODE** `uib-save` - Save a file to a UIBUILDER instance folder
+
+Makes it easy to output files to the folder structure of a uibuilder node.
+
+This can be used for all manner of things.
+
+* Use with the `uib-html` node to make a permanent copy of some zero-/low-code output.
+* Use with the `htmlSend()` front-end function (`htmlSend` `_uib` cmd from Node-RED) to get a copy of the current state of the UI and save it back to the page file for future use.
+* Use with HTML like `` to get one or more files from the user (e.g. images or anything else to save) and save the file.
+
+Obviously, this means that all input must be carefully checked for safety.
+
+Why might you use this node?
+
+- Save `msg._ui` configuration data to a static JSON which can then be used to load an entire UI on page load.
+- Save/update files that are automatically available via the uibuilder web. For example a static web page that is perhaps updated periodically. This could also work with data, JavaScript, CSS, etc. In fact anything that can be serialised or that is already a string.
+- Use with the `uib-html` node to save static HTML files built via `uib-element` or some other flow that outputs `msg._ui` configurations.
+
+### Improvements to the client library
+
+- **NEW Feature** A new built-in web component `uib-var`, used as `
UIBUILDER client library version "
Last msg received: "
+ UIBUILDER client library version
+ "
Last msg received: "
The answer is
.
/
"),-1!==e.indexOf("\\")&&(this.urlErrors.bslash="Cannot contain \\
"),-1!==e.indexOf(" ")&&(this.urlErrors.sp="Cannot contain spaces"),"_"===e.substring(0,1)&&(this.urlErrors.strtU="Cannot start with _
(underscore)"),"."===e.substring(0,1)&&(this.urlErrors.strtDot="Cannot start with .
(dot)"),"templates"===e.toLowerCase().substring(0,9)&&(this.urlErrors.templ='Cannot be "templates"'),"uibuilder"===e.toLowerCase()&&(this.urlErrors.uibname='Cannot be "uibuilder" (since v5)')),!0===this.urlDeployedDup&&(this.urlErrors.dup="Cannot be a URL already deployed"),!0===this.urlEditorDup&&(this.urlErrors.dup="Cannot be a URL already in use"),void 0!==e&&""!==e&&(this.folderExists=function(e){if(void 0===e)return!1;let o=!1;return $.ajax({type:"GET",async:!1,dataType:"json",url:"./uibuilder/admin/"+e,data:{cmd:"checkfolder"},success:function(e){o=e},error:function(e,t,i){"Not Found"!==i&&console.error("[uibuilder:queryFolderExists] Error "+t,i),o=!1}}),o}(e),!0===this.folderExists&&!0===this.urlChanged&&(l(">> folder already exists >>",this.url,this.id),RED.notify(`WARNING: The folder for the chosen URL (${e}) is already exists.
It will be adopted by this node.
You are renaming the url from ${this.url} to ${e}.
You MUST redeploy before doing anything else.
You are deleting a uibuilder instance with url ${this.url}.
Would you like to also delete the folder?
WARNING: This cannot be undone.
${window['uibuilder'].syntaxHighlight(val)}` + break + } + + case 'plain': + case 'html': + default: { + const t = typeof val + if (Array.isArray(val) || t === '[object Object]' || t === 'object') { + try { + this.shadow.innerHTML = JSON.stringify(val) + } catch (e) { + this.shadow.innerHTML = val + } + } else { + this.shadow.innerHTML = val + } + break + } + } + + this.shadow.appendChild(this.css) + // this.$('span').innerHTML = window['uibuilder'].sanitiseHTML(val) + // this.shadow.innerHTML = window['uibuilder'].sanitiseHTML(val) + } +} + +// Add the class as a new Custom Element to the window object +// customElements.define('uib-var', UibVar) diff --git a/src/editor/uib-element/editor.js b/src/editor/uib-element/editor.js index a9eba8de..21f1dc29 100644 --- a/src/editor/uib-element/editor.js +++ b/src/editor/uib-element/editor.js @@ -1,7 +1,7 @@ /* eslint-disable strict, sonarjs/no-duplicate-string, sonarjs/no-duplicated-branches */ // Isolate this code -(function () { +;(function () { 'use strict' /** Module name must match this nodes html file @constant {string} moduleName */ @@ -141,15 +141,44 @@ html: { value: 'html', label: 'HTML', - description: ` + description: /*html*/`
- Pass-through HTML from the input data. When sent to the uibuilder node, will be reproduced in your page(s). Docs.
+ Pass-through HTML from the input data. When sent to the uibuilder node, will be reproduced in your page(s).
+ Output is wrapped in a div
but the optional heading is ignored.
+ Docs.
May be used with the Node-RED core template
node.
- NOTE: Use with caution, no validity checking is currently done. + NOTE: Use with caution, no validity checking is currently done unless the optional + DOMPurify library + is loaded. +
+ `, + allowsParent: true, + allowsHead: false, + allowsPos: true, + }, + markdown: { + value: 'markdown', + label: 'Markdown', + description: /*html*/` +
+ Pass-through Markdown from the input data. When sent to the uibuilder node, will be reproduced as HTML in your page(s).
+ Output is wrapped in a div
but the optional heading is ignored.
+ Docs.
+
+ Markdown will not be rendered as HTML unless the optional + Markdown-IT library + is loaded. +
+
+ May be used with the Node-RED core template
node.
+
+ NOTE: Use with caution, no validity checking is currently done unless the optional DOMPurify library is loaded.
`, allowsParent: true, @@ -225,6 +254,25 @@ // Standard width for typed input fields const tiWidth = '68.5%' + /** Add jQuery UI formatted tooltips */ + function doTooltips() { + // Select our page elements + $('#uib-el').tooltip({ + items: 'img[alt], [aria-label], [title]', + track: true, + content: function() { + const element = $( this ) + if ( element.is( '[title]' ) ) { + return element.attr( 'title' ) + } else if ( element.is( '[aria-label]' ) ) { + return element.attr( 'aria-label' ) + } else if ( element.is( 'img[alt]' ) ) { + return element.attr( 'alt' ) + } else return '' + }, + }) + } + /** Prep for edit * @param {*} node A node instance as seen from the Node-RED Editor */ @@ -399,6 +447,8 @@ label: 'Element Config' }) + doTooltips() + } // ----- end of onEditPrepare() ----- // /** Prep for save diff --git a/src/editor/uib-element/main.html b/src/editor/uib-element/main.html index cbc40be6..d180b725 100644 --- a/src/editor/uib-element/main.html +++ b/src/editor/uib-element/main.html @@ -19,33 +19,26 @@
+ Converts uibuilder low-code UI description data into HTML. Send a msg._ui
object to the node, the output will be HTML in msg.payload
.
+
${e}
Created.`,{type:"success"}),b(),g(),"Create folder succeeded"}).fail(function(e,t,i){return RED.notify("uibuilder: Create Folder Error.${t}
deleted.`,{type:"success"}),b(),"Delete folder succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:deleteFolder:delete] Error "+t,i),RED.notify("uibuilder: Delete Folder Error.${t}/${i}
Deleted.`,{type:"success"}),b(i),"Delete file succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:deleteFile:delete] Error "+t,i),RED.notify("uibuilder: Delete File Error.${i}/${e}
Created.`,{type:"success"}),b(e),"Create file succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:createNewFile:post] Error "+t,i),RED.notify("uibuilder: Create File Error.${e}
Created.`,{type:"success"}),b(),g(),"Create folder succeeded"}).fail(function(e,t,i){return RED.notify("uibuilder: Create Folder Error.${t}
deleted.`,{type:"success"}),b(),"Delete folder succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:deleteFolder:delete] Error "+t,i),RED.notify("uibuilder: Delete Folder Error.${t}/${i}
Deleted.`,{type:"success"}),b(i),"Delete file succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:deleteFile:delete] Error "+t,i),RED.notify("uibuilder: Delete File Error.${i}/${e}
Created.`,{type:"success"}),b(e),"Create file succeeded"}).fail(function(e,t,i){return console.error("[uibuilder:createNewFile:post] Error "+t,i),RED.notify("uibuilder: Create File Error./
"),-1!==e.indexOf("\\")&&(this.urlErrors.bslash="Cannot contain \\
"),-1!==e.indexOf(" ")&&(this.urlErrors.sp="Cannot contain spaces"),"_"===e.substring(0,1)&&(this.urlErrors.strtU="Cannot start with _
(underscore)"),"."===e.substring(0,1)&&(this.urlErrors.strtDot="Cannot start with .
(dot)"),"templates"===e.toLowerCase().substring(0,9)&&(this.urlErrors.templ='Cannot be "templates"'),"uibuilder"===e.toLowerCase()&&(this.urlErrors.uibname='Cannot be "uibuilder" (since v5)')),!0===this.urlDeployedDup&&(this.urlErrors.dup="Cannot be a URL already deployed"),!0===this.urlEditorDup&&(this.urlErrors.dup="Cannot be a URL already in use"),void 0!==e&&""!==e&&(this.folderExists=function(e){if(void 0===e)return!1;let o=!1;return $.ajax({type:"GET",async:!1,dataType:"json",url:"./uibuilder/admin/"+e,data:{cmd:"checkfolder"},success:function(e){o=e},error:function(e,t,i){"Not Found"!==i&&console.error("[uibuilder:queryFolderExists] Error "+t,i),o=!1}}),o}(e),!0===this.folderExists&&!0===this.urlChanged&&(l(">> folder already exists >>",this.url,this.id),RED.notify(`WARNING: The folder for the chosen URL (${e}) is already exists.
It will be adopted by this node.
You are renaming the url from ${this.url} to ${e}.
You MUST redeploy before doing anything else.
You are deleting a uibuilder instance with url ${this.url}.
Would you like to also delete the folder?
WARNING: This cannot be undone.
/
"),-1!==e.indexOf("\\")&&(this.urlErrors.bslash="Cannot contain \\
"),-1!==e.indexOf(" ")&&(this.urlErrors.sp="Cannot contain spaces"),"_"===e.substring(0,1)&&(this.urlErrors.strtU="Cannot start with _
(underscore)"),"."===e.substring(0,1)&&(this.urlErrors.strtDot="Cannot start with .
(dot)"),"templates"===e.toLowerCase().substring(0,9)&&(this.urlErrors.templ='Cannot be "templates"'),"uibuilder"===e.toLowerCase()&&(this.urlErrors.uibname='Cannot be "uibuilder" (since v5)')),!0===this.urlDeployedDup&&(this.urlErrors.dup="Cannot be a URL already deployed"),!0===this.urlEditorDup&&(this.urlErrors.dup="Cannot be a URL already in use"),void 0!==e&&""!==e&&(this.folderExists=function(e){if(void 0===e)return!1;let o=!1;return $.ajax({type:"GET",async:!1,dataType:"json",url:"./uibuilder/admin/"+e,data:{cmd:"checkfolder"},success:function(e){o=e},error:function(e,t,i){"Not Found"!==i&&console.error("[uibuilder:queryFolderExists] Error "+t,i),o=!1}}),o}(e),!0===this.folderExists&&!0===this.urlChanged&&(l(">> folder already exists >>",this.url,this.id),RED.notify(`WARNING: The folder for the chosen URL (${e}) is already exists.
It will be adopted by this node.
You are renaming the url from ${this.url} to ${e}.
You MUST redeploy before doing anything else.
You are deleting a uibuilder instance with url ${this.url}.
Would you like to also delete the folder?
WARNING: This cannot be undone.
Provides a stand-alone web server that allows for interfacing with Node-RED, while giving you help and complete freedom to create custom web interfaces.
- You need at least one of these in order to make full use of all of uibuilder's features.
+ You need at least one of these in order to make full use of all of UIBUILDER's features.
It is this node that creates a custom web server. You can have many nodes if that best meets your needs. But each node can serve many pages.
It also creates a set of filing system folders and files on the Node-RED server. These define the front-end UI you see in the browser as well as providing some important configuration.
- This node is also where you configure much of uibuilder's web server such as installing helper libraries that + This node is also where you configure much of UIBUILDER's web server such as installing helper libraries that you may wish to use to support your interfaces (e.g. VueJS, jQuery, etc). You can also use it to edit your custom UI code.
@@ -17,7 +17,7 @@- More information on how to configure this node: uibuilder node configuration. + More information on how to configure this node: UIBUILDER node configuration.
@@ -26,7 +26,7 @@
- Each instance (node) of uibuilder has a status display. Normally, the icon is blue. + Each instance (node) of UIBUILDER has a status display. Normally, the icon is blue. When 1 or more clients are connected, the text will show how many clients are connected.
@@ -150,7 +150,7 @@<userDir>/
folder in the same place as custom nodes.
- uibuilder retains an internal list of front-end libraries loaded this way.
+ UIBUILDER retains an internal list of front-end libraries loaded this way.
Each library will be served so that you can use it in your front-end html.
@@ -224,14 +224,14 @@ msg.script
will be dynamically added to the scripts of the web page.
Turn off to prevent scripts from being dynamically added and executed.msg._ui
low-code features for passing scripts.
+ NOTE: It is better to use UIBUILDER's msg._ui
low-code features for passing scripts.
msg.style
will be dynamically added to the styles of the web page.
Turn off to prevent styles from being dynamically added.msg._ui
low-code features for passing styles.
+ NOTE: It is better to use UIBUILDER's msg._ui
low-code features for passing styles.
- For more information, see the uibuilder documentation. + For more information, see the UIBUILDER documentation.
- For more information, see the uibuilder documentation. + For more information, see the UIBUILDER documentation.
- There are also examples of how to use uibuilder in the Node-RED import library, on the , and in the GitHub WIKI. + There are also examples of how to use UIBUILDER in the Node-RED import library, on the , and in the GitHub WIKI.
- uibuilder can be discussed in the Node-RED Forum. Issues/bugs can be raised on GitHub. + UIBUILDER can be discussed in the Node-RED Forum. Issues/bugs can be raised on GitHub.
- The <admin url>/uibindex page lists all of the uibuilder endpoints and other details. You can use the following parameters: + The <admin url>/uibindex page lists all of the UIBUILDER endpoints and other details. You can use the following parameters:
@@ -322,8 +322,8 @@?check=uibuilder