7.0.3 • Published 12 months ago

@unicef-polymer/etools-data-table v7.0.3

Weekly downloads
35
License
Apache-2.0
Repository
github
Last release
12 months ago

\<etools-data-table>

Etools data table UI

Usage

<etools-data-table-header
  id="listHeader"
  label="[[visibleRange.0]]-[[visibleRange.1]] of [[totalResults]] results to show"
>
  <etools-data-table-column class="col-2" field="number" sortable> Reference # </etools-data-table-column>
  <etools-data-table-column class="col-4" field="partner_name" sortable> Government Partner </etools-data-table-column>
  <etools-data-table-column class="flex-c" field="created_at"> Years </etools-data-table-column>
</etools-data-table-header>

<template id="rows" is="dom-repeat" items="[[governments]]" as="entry">
  <etools-data-table-row details-opened="[[detailsOpened]]">
    <div slot="row-data">
      <span class="col-data"> [[entry.number]] </span>
      <span class="col-data"> [[entry.partner_name]] </span>
      <span class="col-data"> [[entry.years]] </span>
    </div>
    <div slot="row-data-details">
      <div class="row-details-content">
        <span class="rdc-title">Unicef Focal Point</span>
        <span>[[entry.unicef_focal_point_names]]</span>
      </div>
      <div class="row-details-content">
        <span class="rdc-title">Sectors</span>
        <span>[[entry.sectors]]</span>
      </div>
    </div>
  </etools-data-table-row>
</template>

<etools-data-table-footer
  page-size="[[pageSize]]"
  page-number="[[pageNumber]]"
  total-results="[[totalResults]]"
  visible-range="{{visibleRange}}"
  on-page-size-changed="_pageSizeSelected"
  on-page-number-changed="_pageNumberChanged"
>
</etools-data-table-footer>

Styling

Custom propertyDescriptionDefault
--list-primary-colorColor of links and button texts#40c4ff
--list-secondary-colorColor of dropdown selected element background#ffffff
--list-divider-colorColor of borders and dividers#9D9D9D
--list-bg-colorPrimary background color#ffffff
--list-second-bg-colorBackground on hover and of details box#eeeeee
--list-text-colorPrimary text color#2b2b2b
--list-secondary-text-colorText color for the titles#757575
--list-icon-colorIcon color#2b2b2b
--list-icon-hover-colorIcon hover colorrgba(0, 0, 0, 0.87)
--list-disabled-icon-colorDisabled icon colorrgba(0, 0, 0, 0.64)
etools-data-table-row::part(edt-list-row-collapse-wrapper)Row collapsible details shadow part{}
etools-data-table-row::part(edt-list-row-wrapper)Row wrapper shadow part{}
etools-data-table-row::part(edt-icon-wrapper)Icon wrapper shadow part{}
etools-data-table-header::part(edt-data-table-header)Data table header shadow part{}
etools-data-table-header::part(edt-header-title)Header title shadow part{}
etools-data-table-header::part(edt-header-columns)Header columns shadow part{}
etools-data-table-column::part(edt-list-column-label)List columns shadow part{}
--list-row-wrapper-padding-inlineStart-End padding0 24px

Install

TODO: create npm package

$ npm i --save @unicef-polymer/etools-data-table

Preview element locally

Install needed dependencies by running: $ npm install. Make sure you have the Polymer CLI installed. Then run $ polymer serve to serve your element application locally.

Update demo interface: $ polymer analyze demo/index.html > analysis.json

Linting the code

Install local npm packages (run npm install) Then just run the linting task

$ npm run lint

Running Tests

TODO: improve and add more tests

$ polymer test

Circle CI

Package will be automatically published after tag push (git tag 1.2.3 , git push --tags). Tag name must correspond to SemVer (Semantic Versioning) rules.
Examples:

Version matchResult
1.2.3match
1.2.3-prematch
1.2.3+buildmatch
1.2.3-pre+buildmatch
v1.2.3-pre+buildmatch
1.2no match

You can see more details here

7.0.0

1 year ago

7.0.3

12 months ago

7.0.2

1 year ago

7.0.1

1 year ago

6.2.1-rc1

1 year ago

6.2.0

1 year ago

6.1.3

1 year ago

6.2.0-rc.1

1 year ago

6.2.0-rc.2

1 year ago

6.1.2

1 year ago

6.1.2-rc.1

2 years ago

6.1.0

2 years ago

6.1.1

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

5.1.4

2 years ago

6.0.0-rc.2

2 years ago

6.0.0-rc.1

2 years ago

5.1.3

3 years ago

5.2.0-rc.1

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

4.1.0-rc.2

3 years ago

5.0.0-rc.1

3 years ago

5.0.0-rc.2

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.0.4-rc.3

3 years ago

3.0.4-rc.2

3 years ago

3.0.4-rc.1

3 years ago

3.0.3-rc.2

3 years ago

3.0.3-rc.1

3 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

3.0.0-rc.1

5 years ago