@everchron/ec-shards 7.5.5 → 7.5.7
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/dist/ec-shards.common.js +61 -67
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +61 -67
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/.DS_Store +0 -0
- package/src/assets/icons/.DS_Store +0 -0
- package/src/assets/images/.DS_Store +0 -0
- package/src/components/pagination/pagination.vue +6 -2
- package/src/components/select/select.vue +6 -10
- package/src/stories/pagination/pagination.stories.js +17 -1
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</ecs-flex-row>
|
|
9
9
|
<ecs-flex-row :gap="4">
|
|
10
10
|
<span>Page</span>
|
|
11
|
-
<ecs-select
|
|
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>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<ecs-flex-row v-if="showItemsPerPage && type == 'paginated'" :gap="4" class="ecs-pagination-items">
|
|
38
38
|
<span>Items per page</span>
|
|
39
|
-
<ecs-select
|
|
39
|
+
<ecs-select v-model="updatedItemsPerPageSelected" @change="$emit('itemsPerPage', Number(updatedItemsPerPageSelected))" :disabled="loading" size="sml">
|
|
40
40
|
<option v-for="n in itemsPerPage" :key="n" :value="n" :selected="n === itemsPerPageSelected">{{ n }}</option>
|
|
41
41
|
</ecs-select>
|
|
42
42
|
</ecs-flex-row>
|
|
@@ -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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (newValue !== this.currentValue) {
|
|
112
|
+
this.currentValue = newValue
|
|
117
113
|
}
|
|
118
114
|
}
|
|
119
115
|
}
|
|
@@ -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
|
|
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
|
|