<commit_before>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 */


CLASS({
  name: 'FOAMByExample',
  package: 'foam.flow',
  extendsModel: 'foam.flow.Section',

  requires: [
    'foam.flow.AceCodeView',
    'foam.flow.Aside',
    'foam.flow.CodeSample',
    'foam.flow.CodeSnippet',
    'foam.flow.CodeSnippetRef',
    'foam.flow.CodeView',
    // 'foam.flow.ExpandableSection',
    'foam.flow.QuoteCode',
    'foam.flow.Section',
    'foam.graphics.ActionButtonCView',
    'foam.input.touch.GestureManager',
    'foam.input.touch.TouchManager',
    // 'foam.ui.md.SectionView'
  ],
  exports: [
    'codeSnippets',
    'codeViewName',
    'actionButtonName',
    'aceScript$'
  ],

  properties: [
    {
      model_: 'DAOProperty',
      name: 'codeSnippets',
      factory: function() { return []; }
    },
    {
      model_: 'StringProperty',
      name: 'codeViewName',
      factory: function() {
        this.X.registerElement('code-view', 'foam.flow.AceCodeView');
        return 'foam.flow.AceCodeView';
      }
    },
    {
      name: 'aceScript'
    },
    {
      name: 'actionButtonName',
      factory: function() {
        this.X.registerModel(this.ActionButtonCView.xbind({
          haloColor: 'rgb(240,147,0)'
        }), 'foam.ui.ActionButton');
        return 'foam.ui.ActionButton';
      }
    }
  ],

  imports: [
    'FOAMWindow'
  ],

  methods: {
    init: function() {
      this.SUPER.apply(this, arguments);
      this.X.registerModel(this.CodeView.xbind({
        readOnlyMinLines: 1,
        readOnlyMaxLines: 100
      }), 'foam.flow.CodeView');
      // this.X.registerModel(this.SectionView.xbind({
      //   expandedIconUrl: 'https://www.gstatic.com/images/icons/material/system/1x/expand_less_black_36dp.png'
      // }), 'foam.ui.md.SectionView');
      this.X.registerModel(this.Aside.xbind({
        extraClassName: 'full'
      }), 'foam.flow.Aside');
      this.X.registerModel(this.CodeSample.xbind({
        openSnippets: [-1]
      }), 'foam.flow.CodeSample');

      // TODO: Remove this stuff once the template parser understand unknown tags
      // better
      this.FOAMWindow.installModel(this.AceCodeView);
      this.FOAMWindow.installModel(this.Aside);
      this.FOAMWindow.installModel(this.CodeSample);
      this.FOAMWindow.installModel(this.CodeSnippet);
      this.FOAMWindow.installModel(this.CodeSnippetRef);
      this.FOAMWindow.installModel(this.QuoteCode);
      this.FOAMWindow.installModel(this.Section);

      // TODO(markdittmer): Switch from Section to SectionView/ExpandableSection
      // once expandable contents renders properly with FLOW contents.
      // this.FOAMWindow.installModel(this.SectionView);
      // this.FOAMWindow.installModel(this.ExpandableSection);
    }
  },

  templates: [
    { name: 'toHTML' },
    { name: 'CSS' }
  ]
});<commit_msg>Remove unused models from FOAMByExample<commit_after>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 */


CLASS({
  name: 'FOAMByExample',
  package: 'foam.flow',
  extendsModel: 'foam.flow.Section',

  requires: [
    'foam.flow.AceCodeView',
    'foam.flow.Aside',
    'foam.flow.CodeSample',
    'foam.flow.CodeSnippet',
    'foam.flow.CodeView',
    // 'foam.flow.ExpandableSection',
    'foam.flow.QuoteCode',
    'foam.flow.Section',
    'foam.graphics.ActionButtonCView',
    'foam.input.touch.GestureManager',
    'foam.input.touch.TouchManager',
    // 'foam.ui.md.SectionView'
  ],
  exports: [
    'codeSnippets',
    'codeViewName',
    'actionButtonName',
    'aceScript$'
  ],

  properties: [
    {
      model_: 'DAOProperty',
      name: 'codeSnippets',
      factory: function() { return []; }
    },
    {
      model_: 'StringProperty',
      name: 'codeViewName',
      factory: function() {
        this.X.registerElement('code-view', 'foam.flow.AceCodeView');
        return 'foam.flow.AceCodeView';
      }
    },
    {
      name: 'aceScript'
    },
    {
      name: 'actionButtonName',
      factory: function() {
        this.X.registerModel(this.ActionButtonCView.xbind({
          haloColor: 'rgb(240,147,0)'
        }), 'foam.ui.ActionButton');
        return 'foam.ui.ActionButton';
      }
    }
  ],

  imports: [
    'FOAMWindow'
  ],

  methods: {
    init: function() {
      this.SUPER.apply(this, arguments);
      this.X.registerModel(this.CodeView.xbind({
        readOnlyMinLines: 1,
        readOnlyMaxLines: 100
      }), 'foam.flow.CodeView');
      // this.X.registerModel(this.SectionView.xbind({
      //   expandedIconUrl: 'https://www.gstatic.com/images/icons/material/system/1x/expand_less_black_36dp.png'
      // }), 'foam.ui.md.SectionView');
      this.X.registerModel(this.Aside.xbind({
        extraClassName: 'full'
      }), 'foam.flow.Aside');
      this.X.registerModel(this.CodeSample.xbind({
        openSnippets: [-1]
      }), 'foam.flow.CodeSample');

      // TODO: Remove this stuff once the template parser understand unknown tags
      // better
      this.FOAMWindow.installModel(this.AceCodeView);
      this.FOAMWindow.installModel(this.Aside);
      this.FOAMWindow.installModel(this.CodeSample);
      this.FOAMWindow.installModel(this.CodeSnippet);
      this.FOAMWindow.installModel(this.QuoteCode);
      this.FOAMWindow.installModel(this.Section);

      // TODO(markdittmer): Switch from Section to SectionView/ExpandableSection
      // once expandable contents renders properly with FLOW contents.
      // this.FOAMWindow.installModel(this.SectionView);
      // this.FOAMWindow.installModel(this.ExpandableSection);
    }
  },

  templates: [
    { name: 'toHTML' },
    { name: 'CSS' }
  ]
});
{'fraction_non_alphanumeric': 0.14574832707687285, 'fraction_numerical': 0.007507752570589195, 'mean_word_length': 2.7184466019417477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '3924890', 'n_tokens_mistral': 2073, 'n_tokens_neox': 2012, 'n_words': 324}