@everchron/ec-shards 5.0.9 → 5.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "5.0.9",
3
+ "version": "5.0.11",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -13,8 +13,8 @@
13
13
  <slot></slot>
14
14
  <button v-if="sortable" @click="sortBy" :class="[ 'sort-button', sorting ]" :title="sortTitle">
15
15
  <svg width="14" height="20" viewBox="0 0 14 20" fill="none" xmlns="http://www.w3.org/2000/svg">
16
- <path d="M3.99023 11.802L6.76923 14.722L9.54823 11.802" :stroke="sorting == 'descending' ? '#157EFB' : '#B9BCC2'" :stroke-width="sorting == 'descending' ? '1.5' : '1'" :opacity="sorting == 'descending' || sorting == 'none' ? '1' : '0.5'" stroke-linecap="round" stroke-linejoin="round"/>
17
- <path d="M3.99023 8.722L6.76923 5.802L9.54823 8.722" :stroke="sorting == 'ascending' ? '#157EFB' : '#B9BCC2'" :stroke-width="sorting == 'ascending' ? '1.5' : '1'" :opacity="sorting == 'ascending' || sorting == 'none' ? '1' : '0.5'" stroke-linecap="round" stroke-linejoin="round"/>
16
+ <path d="M3.99023 11.802L6.76923 14.722L9.54823 11.802" :stroke="sorting == 'desc' ? '#157EFB' : '#B9BCC2'" :stroke-width="sorting == 'desc' ? '1.5' : '1'" :opacity="sorting == 'desc' || sorting == 'none' ? '1' : '0.5'" stroke-linecap="round" stroke-linejoin="round"/>
17
+ <path d="M3.99023 8.722L6.76923 5.802L9.54823 8.722" :stroke="sorting == 'asc' ? '#157EFB' : '#B9BCC2'" :stroke-width="sorting == 'asc' ? '1.5' : '1'" :opacity="sorting == 'asc' || sorting == 'none' ? '1' : '0.5'" stroke-linecap="round" stroke-linejoin="round"/>
18
18
  </svg>
19
19
  </button>
20
20
  </div>
@@ -137,9 +137,9 @@
137
137
 
138
138
  sortTitle(){
139
139
  switch (this.sorting){
140
- case 'ascending':
140
+ case 'asc':
141
141
  return 'Sorting ' + this.name + ' ascending'
142
- case 'descending':
142
+ case 'desc':
143
143
  return 'Sorting ' + this.name + ' descending'
144
144
  default:
145
145
  return 'Sort by ' + this.name
@@ -182,7 +182,7 @@
182
182
  const currentColumnWidth = resizedEl.offsetWidth
183
183
 
184
184
  /** Emitted when the column has been resized. Returns the new width of the column in pixels. */
185
- this.$emit('resizedWidth', currentColumnWidth)
185
+ this.$emit('resizedWidth', { id: this.id, currentColumnWidth })
186
186
 
187
187
  let columnCells = document.querySelectorAll('[data-column="' + this.name.toLowerCase() + '-column-cell"]')
188
188
  columnCells.forEach(cell => {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-data-grid scrollbar" :class="$slots.empty ? 'empty' : ' '" ref="data-grid-scroller">
2
+ <div class="ecs-data-grid scrollbar" :class="$slots.empty ? 'empty' : ' '" ref="dataGridScroller">
3
3
  <div class="ecs-data-grid-head" :class="sidebarOverlay ? 'sidebar-space' : ''">
4
4
  <!-- @slot Slot for the table head row cells. -->
5
5
  <slot name="head"></slot>
@@ -46,7 +46,7 @@ export const headCellSorting = () => ({
46
46
  data() {
47
47
  return {
48
48
  columns: [
49
- { id: 'col-1', name: 'Column 1', width: 200, sortable: true, sorting: 'descending' },
49
+ { id: 'col-1', name: 'Column 1', width: 200, sortable: true, sorting: 'desc' },
50
50
  { id: 'col-2', name: 'Column 2', width: 200, sortable: true, sorting: 'none' },
51
51
  { id: 'col-3', name: 'Column 3', width: 200, sortable: true, sorting: 'none' },
52
52
  ]
@@ -9,8 +9,8 @@ export const sortbutton = () => ({
9
9
  components: { EcsSortbutton },
10
10
  template: `<div>
11
11
  <ecs-sortbutton>Null</ecs-sortbutton>
12
- <ecs-sortbutton sort="descending">Descending</ecs-sortbutton>
13
- <ecs-sortbutton sort="ascending">Ascending</ecs-sortbutton>
12
+ <ecs-sortbutton sort="desc">Descending</ecs-sortbutton>
13
+ <ecs-sortbutton sort="asc">Ascending</ecs-sortbutton>
14
14
  </div>`,
15
15
  });
16
16
 
@@ -18,7 +18,7 @@ export const sortbuttonInline = () => ({
18
18
  components: { EcsSortbutton },
19
19
  template: `<main>
20
20
  <ecs-sortbutton inline>Null</ecs-sortbutton>
21
- <ecs-sortbutton inline sort="descending">Descending</ecs-sortbutton>
22
- <ecs-sortbutton inline sort="ascending">Ascending</ecs-sortbutton>
21
+ <ecs-sortbutton inline sort="desc">Descending</ecs-sortbutton>
22
+ <ecs-sortbutton inline sort="asc">Ascending</ecs-sortbutton>
23
23
  </main>`,
24
24
  });