<commit_before>/**
 * @license
 * Copyright 2019 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.CLASS({
  package: 'foam.u2.view',
  name: 'EditColumnsView',
  extends: 'foam.u2.View',
  requires: [
    'foam.u2.DetailView',
    'foam.u2.view.ColumnConfigPropView',
    'foam.u2.view.ColumnOptionsSelectConfig',
    'foam.u2.view.SubColumnSelectConfig'
  ],
  properties: [
    {
      name: 'selectColumnsExpanded',
      class: 'Boolean' 
    },
    'parentId',
    'view'
  ],
  methods: [
    function closeDropDown(e) {
      e.stopPropagation();
      this.view.onClose();
      this.selectColumnsExpanded = ! this.selectColumnsExpanded;
    },

    function initE() {
      this.SUPER();

      var self = this;
      this.view = foam.u2.view.ColumnConfigPropView.create({data:self.data});
      this.start()
        .show(this.selectColumnsExpanded$)
        .style({
          'font-size': '12px',
          'position': 'fixed',
          'width': '100%',
          'height': '100%',
          'top': '0px',
          'left': '0px',
          'z-index': '3',
        })
        .start()
          .style({
            'border-radius': '5px',
            'border': '1px solid /*%GREY4%*/ #e7eaec',
            'background-color': '#f9f9f9',
            'left': self.parentId$.map((v) => v ? ( document.getElementById(v).getBoundingClientRect().x - 250 > 0 ? document.getElementById(v).getBoundingClientRect().x - 250 : document.getElementById(v).getBoundingClientRect().x ) : 0 + 'px'),
            'top': '40px',
            'position': 'fixed',
            'margin-bottom': '20px',
            'height': 'fix-content',
            'max-height': window.innerHeight - 100 > 0 ? window.innerHeight - 100 : window.innerHeight + 'px',
            'width': '300px'
          })
          .add(this.view)
        .end()
      .on('click', this.closeDropDown.bind(this))
      .end();
    }
  ]
});<commit_msg>fixing css<commit_after>/**
 * @license
 * Copyright 2019 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.CLASS({
  package: 'foam.u2.view',
  name: 'EditColumnsView',
  extends: 'foam.u2.View',
  requires: [
    'foam.u2.DetailView',
    'foam.u2.view.ColumnConfigPropView',
    'foam.u2.view.ColumnOptionsSelectConfig',
    'foam.u2.view.SubColumnSelectConfig'
  ],
  css: `
  ^drop-down-bg {
    font-size:        12px; 
    position:         fixed; 
    width:            100%; 
    height:           100%; 
    top:              0; 
    left:             0; 
    z-index:          100;
    background:       rgba(0, 0, 0, 0.4);
  }
  `,
  properties: [
    {
      name: 'selectColumnsExpanded',
      class: 'Boolean' 
    },
    'parentId',
    'view'
  ],
  methods: [
    function closeDropDown(e) {
      e.stopPropagation();
      this.view.onClose();
      this.selectColumnsExpanded = ! this.selectColumnsExpanded;
    },

    function initE() {
      this.SUPER();

      var self = this;
      this.view = foam.u2.view.ColumnConfigPropView.create({data:self.data});
      this.start()
        .show(this.selectColumnsExpanded$)
        .addClass(this.myClass('drop-down-bg'))
        .start()
          .style({
            'border-radius': '5px',
            'border': '1px solid /*%GREY4%*/ #e7eaec',
            'background-color': '#f9f9f9',
            'left': self.parentId$.map((v) => v ? ( document.getElementById(v).getBoundingClientRect().x - 250 > 0 ? document.getElementById(v).getBoundingClientRect().x - 250 : document.getElementById(v).getBoundingClientRect().x ) : 0 + 'px'),
            'top': '120px',
            'position': 'fixed',
            'margin-bottom': '20px',
            'height': 'fix-content',
            'max-height': window.innerHeight - 100 > 0 ? window.innerHeight - 100 : window.innerHeight + 'px',
            'width': '300px'
          })
          .add(this.view)
        .end()
      .on('click', this.closeDropDown.bind(this))
      .end();
    }
  ]
});
{'fraction_non_alphanumeric': 0.16965174129353233, 'fraction_numerical': 0.028358208955223882, 'mean_word_length': 2.0601217656012176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5611176', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1325, 'n_words': 222}