How to use the type.AppFile.files function in type

To help you get started, we’ve selected a few type examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github basisjs / basisjs / src / devpanel / view / file-graph / view / file-stat / index.js View on Github external
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);
    }
github basisjs / basisjs / src / devpanel / view / file-graph / view / file-stat / index.js View on Github external
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'
    })
  }
});