How to use the type.AppProfile 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 / index.js View on Github external
var Node = require('basis.ui').Node;
var RuntimeFile = require('type').RuntimeFile;
var appProfile = require('type').AppProfile();
var api = require('api');
var graphApi = require('../api.js');

graphApi.channel.link(this, RuntimeFile);
api.connected.link(this, function(connected){
  if (connected)
    graphApi.init(function(data){
      RuntimeFile.all.set(data.files);
    });
});

module.exports = Node.subclass({
  active: true,
  delegate: appProfile,

  template: resource('./template/view.tmpl'),
github basisjs / basisjs / src / devpanel / standalone / app-profile-button.js View on Github external
var STATE = require('basis.data').STATE;
var Value = require('basis.data').Value;
var Node = require('basis.ui').Node;
var appProfile = require('type').AppProfile();

module.exports = new Node({
  active: true,
  delegate: appProfile,
  disabled: Value.query('state').as(function(state){
    return state == STATE.PROCESSING;
  }),
  template: resource('./template/app-profile-button.tmpl'),
  binding: {
    processing: {
      events: 'stateChanged',
      getter: function(node){
        return node.state == STATE.PROCESSING;
      }
    },
    error: {