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

foam.CLASS({
  package: 'foam.u2.detail',
  name: 'SectionedDetailView',
  extends: 'foam.u2.detail.AbstractSectionedDetailView',

  requires: [
    'foam.u2.detail.SectionView',
    'foam.u2.layout.Grid',
    'foam.u2.layout.GUnit',
    'foam.u2.borders.CardBorder'
  ],

  css: `
    .inner-card {
      padding: 24px 16px
    }

    ^ .foam-u2-view-ScrollTableView table {
      width: 100%;
    }

    ^ ^card-container + ^card-container {
      margin-top: 16px;
    }
  `,

  properties: [
    {
      name: 'border',
      value: 'foam.u2.borders.CardBorder'
    }
  ],

  methods: [
    function initE() {
      var self = this;

      this.SUPER();
      this
        .addClass(this.myClass())
        .add(this.slot(function(sections, data) {
          if ( ! data ) return;

          return self.E()
            .start(self.Grid)
              .forEach(sections, function(s) {
                this
                  .start(self.GUnit, { columns: s.gridColumns })
                    .addClass(self.myClass('card-container'))
                    .show(s.createIsAvailableFor(self.data$))
                    .start('h2')
                      .add(s.title$)
                      .show(s.title$)
                    .end()
                    .start({ class: self.border })
                      .addClass('inner-card')
                      .tag(self.SectionView, {
                        data$: self.data$,
                        section: s,
                        showTitle: false
                      })
                    .end()
                  .end();
              })
            .end();
        }));
    }
  ]
});<commit_msg>viewspec border on sectioneddetailview<commit_after>/**
 * @license
 * Copyright 2019 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.CLASS({
  package: 'foam.u2.detail',
  name: 'SectionedDetailView',
  extends: 'foam.u2.detail.AbstractSectionedDetailView',

  requires: [
    'foam.u2.detail.SectionView',
    'foam.u2.layout.Grid',
    'foam.u2.layout.GUnit',
    'foam.u2.borders.CardBorder'
  ],

  css: `
    .inner-card {
      padding: 24px 16px
    }

    ^ .foam-u2-view-ScrollTableView table {
      width: 100%;
    }

    ^ ^card-container + ^card-container {
      margin-top: 16px;
    }
  `,

  properties: [
    {
      class: 'foam.u2.ViewSpec',
      name: 'border',
      factory: function() {
        return this.CardBorder;
      }
    }
  ],

  methods: [
    function initE() {
      var self = this;

      this.SUPER();
      this
        .addClass(this.myClass())
        .add(this.slot(function(sections, data) {
          if ( ! data ) return;

          return self.E()
            .start(self.Grid)
              .forEach(sections, function(s) {
                this
                  .start(self.GUnit, { columns: s.gridColumns })
                    .addClass(self.myClass('card-container'))
                    .show(s.createIsAvailableFor(self.data$))
                    .start('h2')
                      .add(s.title$)
                      .show(s.title$)
                    .end()
                    .start(self.border)
                      .addClass('inner-card')
                      .tag(self.SectionView, {
                        data$: self.data$,
                        section: s,
                        showTitle: false
                      })
                    .end()
                  .end();
              })
            .end();
        }));
    }
  ]
});
{'fraction_non_alphanumeric': 0.13906378319189708, 'fraction_numerical': 0.013139885026006022, 'mean_word_length': 1.2823235477826358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '811900', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1086, 'n_words': 173}