<commit_before><!--
    @license
    Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
    This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
    The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
    The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
    Code distributed by Google as part of the polymer project is also
    subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../bower_components/polymer/polymer.html">

<!--
Element providing solution to no problem in particular.

##### Example

    <contact-list></contact-list>

@element contact-list
@blurb Element providing solution to no problem in particular.
@status alpha
@homepage http://polymerlabs.github.io/seed-element
-->
<polymer-element name="contact-list" attributes="notitle author">

  <template>

    <link rel="stylesheet" href="contact-list.css">

    <h1>Hello from contact-list</h1>
    <content></content>

  </template>

  <script>

    Polymer({
      /**
       * The `author` attribute sets an initial author
       *
       * @attribute author
       * @type string
       * @default '<NAME>'
       */
      author: '<NAME>',

      /**
       * `fancy` is a property that does something fancy.
       *
       * @property fancy
       * @type bool
       * @default false
       */
      fancy: false,

      ready: function() {
        // Ready is a lifecycle callback.
        // You can do setup work in here.
        // More info: http://www.polymer-project.org/docs/polymer/polymer.html#lifecyclemethods
      },

      /**
       * The `sayHello` method will return a greeting.
       *
       * @method sayHello
       * @param {String} greeting Pass in a specific greeting.
       * @return {String} Returns a string greeting.
       */
      sayHello: function(greeting) {
        var response = greeting || 'Hello World!';
        return 'contact-list says, ' + response;
      },

      /**
       * The `contact-list-lasers-success` event is fired whenever we
       * call fireLasers.
       *
       * @event contact-list-lasers-success
       * @param {Object} detail
       *   @param {string} detail.sound An amazing sound.
       */
<commit_msg>a lot of stuff<commit_after><!--
    @license
    Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
    This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
    The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
    The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
    Code distributed by Google as part of the polymer project is also
    subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../bower_components/polymer/polymer.html">

<!--
Element providing solution to no problem in particular.

##### Example

    <contact-list></contact-list>

@element contact-list
@blurb Element providing solution to no problem in particular.
@status alpha
@homepage http://polymerlabs.github.io/seed-element
-->
<polymer-element name="contact-list" attributes="notitle author firstName lastName contactId">

  <template>

 	<link rel="stylesheet" href="../bower_components/foundation/css/normalize.css">
	<link rel="stylesheet" href="../bower_components/foundation/css/foundation.css">
	<!-- <link rel="stylesheet" href="contact-list.css"> -->

	<template if="{{contacts.length < 1}}">
		<div class="row">
			<div class="large-8 columns">
				<h2>Sorry. No data found.</h2>
				<h5 class="subheader">click the "seed client data" button</h5>
			</div>
		</div>
	</template>
	<template repeat="{{c in contacts}}">
		<div id="{{c.contactId}}" class="row">
			<div class="panel row">
				<div class="large-1 columns">
					<a href="/#/contact/{{c.contactId}}">
						<img width="64" src="http://placehold.it/64x64">
					</a>
				</div>
				<h5 class="large-11 columns">
					{{c.firstName}} {{c.lastName}}
					<br>
					<small>
						<span>{{c.contactCompany}}</span> |
						<a href="mailto:{{c.contactEmail}}">
							{{c.contactEmail}}
						</a> |
						<a href="tel:{{c.contactPhone}}">
							{{c.contactPhone}}
						</a>
					</small>
				</h5>
			</div>
		</div>
	</template>
  </template>

  <script>

    Polymer({
      /**
       * The `author` attribute sets an initial author
       *
       * @attribute author
       * @type string
       * @default '<NAME>'
       */
      author: '<NAME>',

	  publish: {
		contacts: []
	  },

	  attached: function() {
		  this.contacts = (function() {
			  return DataAccess.getInstance().getDataSource() || [];
		  })();
	  },

      /**
       * The `sayHello` method will return a greeting.
       *
       * @method sayHello
       * @param {String} greeting Pass in a specific greeting.
       * @return {String} Returns a string greeting.
       */
      sayHello: function(greeting) {
        var response = greeting || 'Hello World!';
        return 'contact-list says, ' + response;
      },

      /**
       * The `contact-list-lasers-success` event is fired whenever we
       * call fireLasers.
       *
       * @event contact-list-lasers-success
       * @param {Object} detail
       *   @param {string} detail.sound An amazing sound.
       */

{'fraction_non_alphanumeric': 0.13814584096738733, 'fraction_numerical': 0.004946866984243312, 'mean_word_length': 2.5379131561892416, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '3372104', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1570, 'n_words': 472}