<commit_before><html>
  <head>
    <link rel="stylesheet" href="dojo/resources/dojo.css" />    
    <link rel="stylesheet" href="dijit/themes/claro/claro.css" />
    <link rel="stylesheet" href="resources/dcomponent.css" />    
  </head>
  <body class="claro">
    <a href="index.html">Back</a>
    <script src="dojoConfig.js"></script>
    <script src="dojo/dojo.js"></script>
    <script>
      require([
        'dcomponent/Component',
        'dcomponent/core/Factory',
        'dojo/_base/declare',
        'dstore/Memory',
        'dstore/Trackable',
        'dijit/form/Button',
        'dijit/form/Textarea',
        'dijit/form/TextBox',
        'dijit/form/CheckBox',
        './StoreData.js',
        'dojo/domReady!'
      ], function(Component, Factory, declare, Memory, Trackable, Button, Textarea, TextBox, CheckBox, StoreData) {
        
        var TrackableMemory = declare([Memory, Trackable]);
        var count = 0;
        var data = StoreData.data.map(function(item) {
          item.id = count++;
          item.args.onChange = function(value) {
            console.log(item.label, value);
          }
          return item;
        });
        
        store = new TrackableMemory({ data: data });
        var factory = new Factory({
          registry: {
            textarea: Textarea,
            textbox: TextBox,
            checkbox: CheckBox,
            numberspinner: 'dijit/form/NumberSpinner'
          }
        });

        var textBoxComponent = new Component({
          baseClass: 'simpleComponent',
          store: store,
          factory: factory
        }, 'componentNode');
        textBoxComponent.startup();
      });
    </script>
    <div id="componentNode"></div>
  </body>
</html><commit_msg>adapt for store data changes<commit_after><html>
  <head>
    <link rel="stylesheet" href="dojo/resources/dojo.css" />    
    <link rel="stylesheet" href="dijit/themes/claro/claro.css" />
    <link rel="stylesheet" href="resources/dcomponent.css" />    
  </head>
  <body class="claro">
    <a href="index.html">Back</a>
    <script src="dojoConfig.js"></script>
    <script src="dojo/dojo.js"></script>
    <script>
      require([
        'dcomponent/Component',
        'dcomponent/core/Factory',
        'dojo/_base/declare',
        'dstore/Memory',
        'dstore/Trackable',
        'dijit/form/Button',
        'dijit/form/Textarea',
        'dijit/form/TextBox',
        'dijit/form/CheckBox',
        './StoreData.js',
        'dojo/domReady!'
      ], function(Component, Factory, declare, Memory, Trackable, Button, Textarea, TextBox, CheckBox, StoreData) {
        
        var TrackableMemory = declare([Memory, Trackable]);
        var count = 0;
        var data = StoreData.categories[0].elements.map(function(item) {
          item.id = count++;
          item.args.onChange = function(value) {
            console.log(item.label, value);
          }
          return item;
        });
        
        store = new TrackableMemory({ data: data });
        var factory = new Factory({
          registry: {
            textarea: Textarea,
            textbox: TextBox,
            checkbox: CheckBox,
            numberspinner: 'dijit/form/NumberSpinner'
          }
        });

        var textBoxComponent = new Component({
          store: store,
          factory: factory
        }, 'componentNode');
        textBoxComponent.startup();
      });
    </script>
    <div id="componentNode"></div>
  </body>
</html>
{'fraction_non_alphanumeric': 0.14114699331848551, 'fraction_numerical': 0.0008351893095768374, 'mean_word_length': 1.8538522637013504, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '1521862', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1024, 'n_words': 193}