Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-ui_list

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-ui_list - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

3

locales/en-US/ui_list.json

@@ -20,4 +20,7 @@ {

"check" : "checkbox to send changed item"
},
"error": {
"no-group": "group not configured"
}
}
}

@@ -20,4 +20,7 @@ {

"check" : "チェック状態が変化した要素を送信"
},
"error": {
"no-group": "グループが設定されていません"
}
}
}

2

package.json
{
"name": "node-red-contrib-ui_list",
"version": "0.1.2",
"version": "0.1.3",
"description": "Node-RED UI widget node for simple list",

@@ -5,0 +5,0 @@ "author" : "Hiroyasu Nishiyama",

@@ -15,2 +15,4 @@ node-red-contrib-ui_list

*This node uses APIs that are supported from Node-RED 0.19 & Node-RED Dashboard 2.10.*
Usage

@@ -17,0 +19,0 @@ -----

@@ -24,2 +24,10 @@ /**

function checkConfig(node, conf) {
if (!conf || !conf.hasOwnProperty("group")) {
node.error(RED._("ui_list.error.no-group"));
return false;
}
return true;
}
function HTML(config) {

@@ -79,30 +87,33 @@ var actionType = config.actionType;

RED.nodes.createNode(this, config);
var html = HTML(config);
var done = ui.addWidget({
node: node,
width: config.width,
height: config.height,
format: html,
templateScope: "local",
group: config.group,
emitOnlyNewValues: false,
forwardInputMessages: false,
storeFrontEndInputAsState: false,
convertBack: function (value) {
return value;
},
beforeEmit: function(msg, value) {
return { msg: { items: value } };
},
beforeSend: function (msg, orig) {
if (orig) {
return orig.msg;
var done = null;
if (checkConfig(node, config)) {
var html = HTML(config);
done = ui.addWidget({
node: node,
width: config.width,
height: config.height,
format: html,
templateScope: "local",
group: config.group,
emitOnlyNewValues: false,
forwardInputMessages: false,
storeFrontEndInputAsState: false,
convertBack: function (value) {
return value;
},
beforeEmit: function(msg, value) {
return { msg: { items: value } };
},
beforeSend: function (msg, orig) {
if (orig) {
return orig.msg;
}
},
initController: function($scope, events) {
$scope.click = function(item) {
$scope.send({payload: item});
};
}
},
initController: function($scope, events) {
$scope.click = function(item) {
$scope.send({payload: item});
};
}
});
});
}
}

@@ -112,5 +123,9 @@ catch (e) {

}
node.on("close", done);
node.on("close", function() {
if (done) {
done();
}
});
}
RED.nodes.registerType('ui_list', ListNode);
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc