<commit_before>var domain =  {
  "DO_TEXT": {
    style: "do_text",
    type: "text",
    component: "PapaSinge",
    validation: [{
      type: "function",
      value: function() {
        return false;
      }
    }]
  },
  "DO_EMAIL": {
    style: "do_email",
    type: "email",
    component: "PapaMail",
    validation: [{
      type: "function",
      value: function() {
        return true;
      }
    }]
  }
};
focus.definition.domain.container.setAll(domain);
/*global focus*/
var entities ={
  "contact": {
    "firstName": {
      "domain": "DO_TEXT",
      "required": false,
      "validator": function(data){
        return data.length <= 3 ? "le champ doit dépasser la taille de 3" : true;
      }
    },
    "lastName": {
      "domain": "DO_TEXT",
      "required": true
    },
    "age": {
      "domain": "DO_NUMBER",
      "required": false,
      "type": "number"
    },
    "email": {
      "domain": "DO_EMAIL",
      "required": false
    },
    "bio": {
      "domain": "DO_EMAIL",
      "InputComponent": focusComponents.common.input.textarea.component
    },
    "isCool":{
      "domain": "DO_BOOLEAN",
      "FieldComponent": focusComponents.common.input.checkbox.component
    },
    "isNice":{
      "domain": "DO_BOOLEAN",
      "FieldComponent": focusComponents.common.input.toggle.component
    }
  }};
focus.definition.entity.container.setEntityConfiguration(entities);<commit_msg>[example] Add reference fake to load.<commit_after>var domain =  {
  "DO_TEXT": {
    style: "do_text",
    type: "text",
    component: "PapaSinge",
    validation: [{
      type: "function",
      value: function() {
        return false;
      }
    }]
  },
  "DO_EMAIL": {
    style: "do_email",
    type: "email",
    component: "PapaMail",
    validation: [{
      type: "function",
      value: function() {
        return true;
      }
    }]
  }
};
focus.definition.domain.container.setAll(domain);
/*global focus*/
var entities ={
  "contact": {
    "firstName": {
      "domain": "DO_TEXT",
      "required": false,
      "validator": function(data){
        return data.length <= 3 ? "le champ doit dépasser la taille de 3" : true;
      }
    },
    "lastName": {
      "domain": "DO_TEXT",
      "required": true
    },
    "age": {
      "domain": "DO_NUMBER",
      "required": false,
      "type": "number"
    },
    "email": {
      "domain": "DO_EMAIL",
      "required": false
    },
    "bio": {
      "domain": "DO_EMAIL",
      "InputComponent": focusComponents.common.input.textarea.component
    },
    "isCool":{
      "domain": "DO_BOOLEAN",
      "FieldComponent": focusComponents.common.input.checkbox.component
    },
    "isNice":{
      "domain": "DO_BOOLEAN",
      "FieldComponent": focusComponents.common.input.toggle.component
    }
  }};
focus.definition.entity.container.setEntityConfiguration(entities);

function loadRedList(name){
    return function loadRef(){
      var refLst = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(function(cd){
        return {
          code: cd,
          label: ('' + cd + ' ' + name)
        };
      });
    return Promise.resolve(refLst);
  };
}

  focus.reference.config.set({'papas': loadRedList('papas'), 'singe': loadRedList('singe')});
  focus.definition.entity.container.setEntityConfiguration(entities);
{'fraction_non_alphanumeric': 0.16838592233009708, 'fraction_numerical': 0.00424757281553398, 'mean_word_length': 2.463235294117647, 'pattern_counts': {'":': 52, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7623684', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1079, 'n_words': 210}