Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
source: RuntimeFile.all,
rule: 'data.resolved'
}),
map: function(runtimeFile){
return AppFile.getSlot(runtimeFile.data.filename);
}
});
var activatedFiles = new MapFilter({
source: activatedFilesSlots,
ruleEvents: 'targetChanged',
map: function(slot){
return slot.target;
}
});
var fileByType = new Split({
source: AppFile.files,
rule: 'data.type'
});
var Item = Node.subclass({
selected: Value.query(AppFile.matched, 'dataset').compute(function(node, dataset){
return (node.dataset || node.delegate) === dataset;
}),
template: resource('./template/type.tmpl'),
binding: {
type: function(node){
return node.caption || node.data.id;
},
count: function(node){
return count(node.dataset || node.delegate);
}
module.exports = new Node({
template: resource('./template/file-stat.tmpl'),
binding: {
activatedFiles: 'satellite:',
allFiles: 'satellite:'
},
dataSource: fileByType,
childClass: Item,
satellite: {
activatedFiles: new Item({
dataset: activatedFiles,
caption: 'activated files'
}),
allFiles: new Item({
dataset: AppFile.files,
caption: 'all files'
})
}
});