Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyInformation committed Apr 5, 2023
1 parent 1788909 commit a860ef5
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 29 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ Check the [roadmap](./docs/roadmap.md) for future developments.

----

## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.2.0...main)
## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.3.1...main)

<!-- Nothing currently. -->

## [v6.3.1](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.3.1...v6.3.0)

### Front-end library

* **BUG FIX** for [Issue #207](https://github.com/TotallyInformation/node-red-contrib-uibuilder/issues/207) - `eventSend` function failing when in a form and when using Svelte.

### `uib-element`

* **Bug Fix**: Adjust selector for type "Page Title" to avoid accidentally updating `<title>` tags in SVG's.
Expand All @@ -24,7 +30,6 @@ Check the [roadmap](./docs/roadmap.md) for future developments.

* Renamed `_sidebar.md` to `-sidebar.md` to stop npm publish from dropping it.


## [v6.3.0](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.3.0...v6.2.0)

### Client library changes
Expand Down
2 changes: 1 addition & 1 deletion front-end/uibuilder.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4877,7 +4877,7 @@ var Uib = (_a = class {
form.valid = target.form.checkValidity();
Object.values(target.form).forEach((frmEl, i2) => {
const id = frmEl.id !== "" ? frmEl.id : frmEl.name !== "" ? frmEl.name : `${i2}-${frmEl.type}`;
if (id !== "") {
if (id !== "" && frmEl.type) {
frmVals.push({ key: id, val: frmEl.value });
form[id] = {
"id": frmEl.id,
Expand Down
2 changes: 1 addition & 1 deletion front-end/uibuilder.esm.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions front-end/uibuilder.esm.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion front-end/uibuilder.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -4878,7 +4878,7 @@
form.valid = target.form.checkValidity();
Object.values(target.form).forEach((frmEl, i2) => {
const id = frmEl.id !== "" ? frmEl.id : frmEl.name !== "" ? frmEl.name : `${i2}-${frmEl.type}`;
if (id !== "") {
if (id !== "" && frmEl.type) {
frmVals.push({ key: id, val: frmEl.value });
form[id] = {
"id": frmEl.id,
Expand Down
2 changes: 1 addition & 1 deletion front-end/uibuilder.iife.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions front-end/uibuilder.iife.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion front-end/uibuilderfe.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if (typeof require !== 'undefined' && typeof io === 'undefined') { // eslint-d

//#region ++++++++++ Start of setup ++++++++++ //

self.version = '6.3.0-old'
self.version = '6.3.1-old'
self.moduleName = 'uibuilder' // Must match moduleName in uibuilder.js on the server
// @ts-expect-error ts(2345) Tests loaded ver of lib to see if minified
self.isUnminified = (/param/).test(function(param) {}) // eslint-disable-line no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion front-end/uibuilderfe.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const stdio = 'inherit'
const { version } = JSON.parse(fs.readFileSync('package.json'))

// npm version 4.2.1 --no-git-tag-version --allow-same-version
const release = '6.3.0'
const release = '6.3.1'

console.log(`Current Version: ${version}. Requested Version: ${release}`)

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-uibuilder",
"version": "6.3.0",
"version": "6.3.1",
"description": "Easily create data-driven web UI's for Node-RED using any (or no) front-end library.",
"scripts": {
"preinstall": "node ./bin/uibpreinstalljs",
Expand Down
18 changes: 5 additions & 13 deletions src/front-end-module/uibuilder.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import io from 'socket.io-client' // Note: Only works when using esbuild to bund
// if (!io) log('error', 'uibuilder.module.js', 'Socket.IO client failed to load')()
//#endregion -------- -------- -------- //

const version = '6.3.0-mod'
const version = '6.3.1-mod'

// TODO Add option to allow log events to be sent back to Node-RED as uib ctrl msgs
//#region --- Module-level utility functions --- //
Expand Down Expand Up @@ -2167,19 +2167,11 @@ export const Uib = class Uib {
form.valid = target.form.checkValidity()
Object.values(target.form).forEach( (frmEl, i) => {
const id = frmEl.id !== '' ? frmEl.id : (frmEl.name !== '' ? frmEl.name : `${i}-${frmEl.type}`)
// const attribs = Object.assign({},
// ...Array.from(frmEl.attributes,
// ( { name, value } ) => {
// if ( !ignoreAttribs.includes(name) ) {
// return ({ [name]: value })
// }
// return undefined
// }
// )
// )
if (id !== '') {

// We must have both an element id (we may have forced one above) AND
// the element type MUST be not undefined - to allow for the extra properties added by frameworks such as Svelte
if (id !== '' && frmEl.type) {
frmVals.push( { key: id, val: frmEl.value } ) // simplified for addition to msg.payload
// form[id] = frmEl.value
form[id] = {
'id': frmEl.id,
'name': frmEl.name,
Expand Down
2 changes: 1 addition & 1 deletion src/front-end/uibuilderfe.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if (typeof require !== 'undefined' && typeof io === 'undefined') { // eslint-d

//#region ++++++++++ Start of setup ++++++++++ //

self.version = '6.3.0-old'
self.version = '6.3.1-old'
self.moduleName = 'uibuilder' // Must match moduleName in uibuilder.js on the server
// @ts-expect-error ts(2345) Tests loaded ver of lib to see if minified
self.isUnminified = (/param/).test(function(param) {}) // eslint-disable-line no-unused-vars
Expand Down

0 comments on commit a860ef5

Please sign in to comment.