@everchron/ec-shards 7.5.6 → 7.5.8

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": "7.5.6",
3
+ "version": "7.5.8",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -8,7 +8,7 @@
8
8
  {{ currentPage }}
9
9
  </div>
10
10
  <div class="total-pages">of {{ lastPage }}</div>
11
- <span v-if="isTranscriptMissingPages" style="color:tomato" title="This transcript has missing page gaps">*</span>
11
+ <span v-if="isTranscriptMissingPages" class="page-missing-gaps" title="This transcript has missing page gaps">*</span>
12
12
  </div>
13
13
  <div class="ecs-viewer-pages-pagination">
14
14
  <div class="total-pages-relative">{{ altPageNumber }}&nbsp;</div>
@@ -160,4 +160,12 @@
160
160
  color: $color-gray-8;
161
161
  margin-top: 4px;
162
162
  }
163
+
164
+ .page-missing-gaps{
165
+ color: $color-red-7;
166
+ font-size: $type-scale-5-font-size;
167
+ margin: -6px 0 0 0px;
168
+ padding: 2px;
169
+ cursor: help;
170
+ }
163
171
  </style>
@@ -8,7 +8,7 @@
8
8
  </ecs-flex-row>
9
9
  <ecs-flex-row :gap="4">
10
10
  <span>Page</span>
11
- <ecs-select v-model="updatedCurrentPage" @change="$emit('updatePage', Number(updatedCurrentPage))" :disabled="!totalPages" size="sml">
11
+ <ecs-select v-model="updatedCurrentPage" :disabled="!totalPages" size="sml">
12
12
  <option v-for="n in totalPages" :key="n" :value="n" :selected="n === currentPage">{{ n }}</option>
13
13
  </ecs-select>
14
14
  <span v-if="totalPages" class="total">of {{ totalPages }}</span>
@@ -151,6 +151,10 @@
151
151
  itemsPerPageSelected(newVal) {
152
152
  this.updatedItemsPerPageSelected = newVal;
153
153
  },
154
+
155
+ updatedCurrentPage(newVal) {
156
+ this.$emit('updatePage', Number(newVal))
157
+ },
154
158
  }
155
159
  }
156
160
  </script>
@@ -5,8 +5,6 @@
5
5
  @focus="$emit('focus', $event)"
6
6
  @blur="$emit('blur', $event)"
7
7
  v-bind="{ id, name, disabled, required }"
8
- :id="id"
9
- :name="name"
10
8
  v-model="currentValue">
11
9
  <slot></slot>
12
10
  </select>
@@ -56,8 +54,7 @@ export default {
56
54
  data() {
57
55
  return {
58
56
  hasPlaceholder: false,
59
- currentValue: this.value || '',
60
- setValue: this.value || ''
57
+ currentValue: this.value || ''
61
58
  }
62
59
  },
63
60
 
@@ -105,15 +102,14 @@ export default {
105
102
  watch: {
106
103
  value: function(newValue) {
107
104
  const select = this.$refs.select;
108
-
109
105
  const option = Array.from(select.options).find((option) => option.value === newValue);
106
+
110
107
  if (option) {
111
108
  option.selected = true
112
- if (newValue !== this.currentValue) {
113
- this.currentValue = newValue
114
- this.$emit('input', this.currentValue)
115
- this.$emit('change', { target: { value: newValue } });
116
- }
109
+ }
110
+
111
+ if (newValue !== this.currentValue) {
112
+ this.currentValue = newValue
117
113
  }
118
114
  }
119
115
  }
@@ -14,3 +14,8 @@ export const jumperPageRelative = () => ({
14
14
  components: { EcsJumperPage },
15
15
  template: `<ecs-jumper-page :current-page="2" :page-count="70" :relative-page="40" :last-page="80" />`,
16
16
  });
17
+
18
+ export const jumperPageRelativeWithPageMissing = () => ({
19
+ components: { EcsJumperPage },
20
+ template: `<ecs-jumper-page :current-page="2" :page-count="70" :relative-page="40" :last-page="80" isTranscriptMissingPages />`,
21
+ });
@@ -9,8 +9,24 @@ export default {
9
9
 
10
10
  export const floatingPagination = () => ({
11
11
  components: { EcsPagination },
12
+ data () {
13
+ return {
14
+ currentPage: 2,
15
+ totalPages: 10,
16
+ itemsPerPageSelected: 50,
17
+ };
18
+ },
12
19
  template: `<div style="display:flex;flex-direction:column;height: 200px;justify-content: flex-end;">
13
- <ecs-pagination floating :current-page="2" :total-pages="10" />
20
+ <ecs-pagination
21
+ @nextPage="currentPage++"
22
+ @prevPage="currentPage--"
23
+ @updatePage="currentPage = $event"
24
+ @itemsPerPage="itemsPerPageSelected = $event"
25
+ floating
26
+ :current-page="currentPage"
27
+ :total-pages="totalPages"
28
+ :items-per-page-selected="itemsPerPageSelected"
29
+ />
14
30
  </div>`,
15
31
  });
16
32