From 8ad7697ca1124501981ce468e1e6a7b543a41d91 Mon Sep 17 00:00:00 2001 From: AndrewMusser Date: Wed, 22 Nov 2023 15:12:13 -0500 Subject: [PATCH] Update webHMI references to Lux / Loupe UX --- example/HMI/index.html | 8 +++---- example/HMI/index_public.html | 8 +++---- example/HMI/package.json | 2 +- example/HMI/src/app.js | 4 ++-- example/HMI/views/main.handlebars | 6 ++--- src/HMI/tmplits.js | 24 +++++++++---------- src/template-hmi/index.html | 8 +++---- src/template-hmi/index_public.html | 8 +++---- src/template-hmi/package-template.json | 2 +- src/template-hmi/src/app.js | 4 ++-- src/tmplits/tmplits-checkbox/module.js | 4 ++-- .../tmplits-directorybrowser/module.js | 2 +- .../tmplits-directorybrowserwindow/module.js | 2 +- src/tmplits/tmplits-dropdown/module.js | 8 +++---- src/tmplits/tmplits-dropdowntable/module.js | 6 ++--- src/tmplits/tmplits-globalclasses/module.js | 4 ++-- src/tmplits/tmplits-led/module.js | 4 ++-- src/tmplits/tmplits-multiselect/module.js | 4 ++-- src/tmplits/tmplits-numeric/module.js | 4 ++-- src/tmplits/tmplits-slider/module.js | 2 +- src/tmplits/tmplits-tableselect/module.js | 6 ++--- src/tmplits/tmplits-text/module.js | 4 ++-- src/tmplits/tmplits-utilities/module.js | 16 ++++++------- src/tmplits/tmplits-valueupdown/module.js | 2 +- 24 files changed, 71 insertions(+), 71 deletions(-) diff --git a/example/HMI/index.html b/example/HMI/index.html index 08c87cf..8cb1892 100644 --- a/example/HMI/index.html +++ b/example/HMI/index.html @@ -31,10 +31,10 @@ - - - - + + + + diff --git a/example/HMI/index_public.html b/example/HMI/index_public.html index 95641a8..37b4b61 100644 --- a/example/HMI/index_public.html +++ b/example/HMI/index_public.html @@ -30,10 +30,10 @@ - - - - + + + + diff --git a/example/HMI/package.json b/example/HMI/package.json index 499d219..205b04e 100644 --- a/example/HMI/package.json +++ b/example/HMI/package.json @@ -35,7 +35,7 @@ "@loupeteam/tmplits-text": "file:../../src/tmplits/tmplits-text/", "@loupeteam/tmplits-utilities": "file:../../src/tmplits/tmplits-utilities/", "@loupeteam/tmplits-valueupdown": "file:../../src/tmplits/tmplits-valueupdown/", - "@loupeteam/webhmi": "*", + "@loupeteam/loupe-ux": "*", "app": "file:./", "bootstrap": "^3.3.4", "handlebars": "*", diff --git a/example/HMI/src/app.js b/example/HMI/src/app.js index 96008af..8954eaf 100644 --- a/example/HMI/src/app.js +++ b/example/HMI/src/app.js @@ -1,6 +1,6 @@ -machine = new WEBHMI.Machine({ +machine = new LUX.Machine({ port: 8000, ipAddress: '127.0.0.1', maxReconnectCount: 5000 }); - setInterval(WEBHMI.updateHMI,30) + setInterval(LUX.updateHMI,30) diff --git a/example/HMI/views/main.handlebars b/example/HMI/views/main.handlebars index 28e5e31..51cdcff 100644 --- a/example/HMI/views/main.handlebars +++ b/example/HMI/views/main.handlebars @@ -4,19 +4,19 @@ Custom User Controls: {{> 'button-label' label=(Partial "custom-icon" img="app/assets/wireframe.png") data-var-name='tmplitTest:tmplit.SetButton' - class='webhmi-hide' + class='lux-hide' }} {{> 'button-icon' img="app/assets/wireframe.png" data-var-name='tmplitTest:tmplit.SetButton' - class='webhmi-hide' + class='lux-hide' }} {{> 'icon' img="app/assets/wireframe.png" data-var-name='tmplitTest:tmplit.SetButton' - class='webhmi-btn-set webhmi-hide' + class='lux-btn-set lux-hide' }} diff --git a/src/HMI/tmplits.js b/src/HMI/tmplits.js index 349e015..51ed71a 100644 --- a/src/HMI/tmplits.js +++ b/src/HMI/tmplits.js @@ -335,10 +335,10 @@ export class Tmplits { catch(e){ $(dom).html(`
Error loading the page '${pageName}' ${e}
` ) } - if( typeof WEBHMI !== 'undefined'){ + if( typeof LUX !== 'undefined'){ try { - WEBHMI.queryDom() - WEBHMI.updateHMI() + LUX.queryDom() + LUX.updateHMI() } catch (error) { } @@ -357,10 +357,10 @@ export class Tmplits { catch(e){ $(container).html(`
Error loading the template '${template}' ${e}
`) } - if( typeof WEBHMI !== 'undefined'){ + if( typeof LUX !== 'undefined'){ try { - WEBHMI.queryDom() - WEBHMI.updateHMI() + LUX.queryDom() + LUX.updateHMI() }catch{} } } @@ -584,11 +584,11 @@ export class Tmplits { export class viewDelegate { constructor() {} // static observer = new MutationObserver(function (mutations) { - // // Was a new webhmi element added to the DOM? - // // Use Array.some() instead of Array.forEach() for easy loop break when we find a webhmi element added or remove from DOM + // // Was a new lux element added to the DOM? + // // Use Array.some() instead of Array.forEach() for easy loop break when we find a lux element added or remove from DOM // let nodes = new Array() // mutations.forEach(function (mutation) { - // // check added nodes for webhmi changes + // // check added nodes for lux changes // mutation.addedNodes.forEach(function (node) { // if (node.nodeType == node.ELEMENT_NODE) { // // check elem, check descendants @@ -663,10 +663,10 @@ export class viewDelegate { el.forEach((el) => { let fn = e.fn() el.innerHTML = fn - if( typeof WEBHMI !== 'undefined'){ + if( typeof LUX !== 'undefined'){ try{ - WEBHMI.queryDom() - WEBHMI.updateHMI() + LUX.queryDom() + LUX.updateHMI() } catch{} } diff --git a/src/template-hmi/index.html b/src/template-hmi/index.html index 1d9bdd0..47737e6 100644 --- a/src/template-hmi/index.html +++ b/src/template-hmi/index.html @@ -41,10 +41,10 @@ - - - - + + + + diff --git a/src/template-hmi/index_public.html b/src/template-hmi/index_public.html index 27cd99d..881dcff 100644 --- a/src/template-hmi/index_public.html +++ b/src/template-hmi/index_public.html @@ -39,10 +39,10 @@ - - - - + + + + diff --git a/src/template-hmi/package-template.json b/src/template-hmi/package-template.json index eb81db5..7aa6386 100644 --- a/src/template-hmi/package-template.json +++ b/src/template-hmi/package-template.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@loupeteam/webhmi": "*", + "@loupeteam/loupe-ux": "*", "@loupeteam/tmplits": "*", "@loupeteam/tmplit-basic": "*", "app":"file:./", diff --git a/src/template-hmi/src/app.js b/src/template-hmi/src/app.js index e5ff296..3f61735 100644 --- a/src/template-hmi/src/app.js +++ b/src/template-hmi/src/app.js @@ -7,9 +7,9 @@ * */ -machine = new WEBHMI.Machine({ +machine = new LUX.Machine({ port: 8000, ipAddress: '127.0.0.1', maxReconnectCount: 5000 }); - setInterval(WEBHMI.updateHMI,30) + setInterval(LUX.updateHMI,30) diff --git a/src/tmplits/tmplits-checkbox/module.js b/src/tmplits/tmplits-checkbox/module.js index 47055e9..48afe6b 100644 --- a/src/tmplits/tmplits-checkbox/module.js +++ b/src/tmplits/tmplits-checkbox/module.js @@ -57,7 +57,7 @@ export function TmplitCheckBox(context, args) { if (buttonVarName == '') { buttonVarName = dataVarName classList.splice(classList.findIndex((e) => { - return e == 'webhmi-led' + return e == 'lux-led' }),1) } attr += `data-var-name='${buttonVarName}'` @@ -72,7 +72,7 @@ export function TmplitCheckBox(context, args) { return `
- + ${label}
` diff --git a/src/tmplits/tmplits-directorybrowser/module.js b/src/tmplits/tmplits-directorybrowser/module.js index 86ffe5c..4940411 100644 --- a/src/tmplits/tmplits-directorybrowser/module.js +++ b/src/tmplits/tmplits-directorybrowser/module.js @@ -43,7 +43,7 @@ export function TmplitDirectoryBrowser( context, args){ } delete args.hash['data-var-name'] args.hash.set = false - args.children += `` + args.children += `` return ` ${TmplitDropdownTable( context, args )} ` diff --git a/src/tmplits/tmplits-directorybrowserwindow/module.js b/src/tmplits/tmplits-directorybrowserwindow/module.js index caa0dc8..adb490b 100644 --- a/src/tmplits/tmplits-directorybrowserwindow/module.js +++ b/src/tmplits/tmplits-directorybrowserwindow/module.js @@ -42,7 +42,7 @@ export function TmplitDirectoryBrowserWindow( context, args){ } delete args.hash['data-var-name'] args.hash.set = false - args.children += `No Data` + args.children += `No Data` return `
${TmplitTableSelect( context, args )} diff --git a/src/tmplits/tmplits-dropdown/module.js b/src/tmplits/tmplits-dropdown/module.js index fd355c2..2910460 100644 --- a/src/tmplits/tmplits-dropdown/module.js +++ b/src/tmplits/tmplits-dropdown/module.js @@ -41,7 +41,7 @@ or we will assume one for you.. Example drop down usage: {{#tmplit 'dropdown' [set=false/true]}} - +
@@ -113,10 +113,10 @@ export function TmplitDropdown(context, args) { } } if (field == '') { - field = `` + field = `` } if( dataVarName ){ - field += `` + field += `` } let delegate = args.delegate ? `onclick="${args.delegate}?.willOpen?.();"` : '' @@ -134,7 +134,7 @@ export function TmplitDropdown(context, args) {