@itfin/components 1.3.57 → 1.3.58
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,49 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<nav aria-label="Page navigation example" class="d-flex">
|
|
4
|
-
<
|
|
5
|
-
<
|
|
3
|
+
<nav aria-label="Page navigation example" class="d-flex justify-content-between align-items-center">
|
|
4
|
+
<div class="d-flex gap-2 align-items-center">
|
|
5
|
+
<ul class="pagination itf-pagination ps-3 mb-0">
|
|
6
|
+
<li
|
|
6
7
|
v-for="(page, n) in pagesArr"
|
|
7
8
|
:key="n"
|
|
8
9
|
class="page-item"
|
|
9
10
|
:class="{'active': page.current, 'disabled': !page.active && !page.current }"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
>
|
|
12
|
+
<a v-if="page.type === 'prev'" href="" class="page-link" :aria-label="$t('components.pagination.previous')" @click.prevent="onPage(page.number)">
|
|
13
|
+
<itf-icon name="chevron_left" aria-hidden="true" />
|
|
14
|
+
<span class="sr-only">{{$t('components.pagination.previous')}}</span>
|
|
15
|
+
</a>
|
|
16
|
+
<a v-else-if="page.type === 'first'" class="page-link" href="" @click.prevent="onPage(page.number)">{{page.number}}</a>
|
|
17
|
+
<a v-else-if="page.type === 'page'" class="page-link" href="" @click.prevent="onPage(page.number)">{{page.number}}</a>
|
|
18
|
+
<a v-else-if="page.type === 'last'" class="page-link" href="" @click.prevent="onPage(page.number)">{{page.number}}</a>
|
|
19
|
+
<span v-else-if="page.type === 'more'" class="page-link">…</span>
|
|
20
|
+
<a v-if="page.type === 'next'" href="" class="page-link" :aria-label="$t('components.pagination.previous')" @click.prevent="onPage(page.number)">
|
|
21
|
+
<span class="sr-only">{{$t('components.pagination.next')}}</span>
|
|
22
|
+
<itf-icon name="chevron_right" aria-hidden="true" />
|
|
23
|
+
</a>
|
|
24
|
+
</li>
|
|
25
|
+
</ul>
|
|
26
|
+
<!--div>
|
|
27
|
+
1-25 of {{length}} items
|
|
28
|
+
</div-->
|
|
29
|
+
</div>
|
|
25
30
|
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
<div class="d-flex gap-2 align-items-center">
|
|
32
|
+
<span>{{$t('components.pagination.itemsPerPage')}}</span>
|
|
33
|
+
<itf-dropdown
|
|
34
|
+
toggle
|
|
35
|
+
:button-options="{ secondary: true, small: true }"
|
|
36
|
+
v-if="showSize"
|
|
37
|
+
class="itf-pagination-select"
|
|
38
|
+
:value="size"
|
|
39
|
+
>
|
|
40
|
+
<template #button>
|
|
41
|
+
<span>{{size}}</span>
|
|
42
|
+
</template>
|
|
43
|
+
<div class="dropdown-item" v-for="option in perPageOptions" :key="option.value" @click="onPerPage(option.value)">
|
|
44
|
+
{{option.title}}
|
|
45
|
+
</div>
|
|
46
|
+
</itf-dropdown>
|
|
47
|
+
</div>
|
|
36
48
|
</nav>
|
|
37
49
|
|
|
38
50
|
</template>
|
|
39
|
-
<style lang="scss" scoped>
|
|
40
|
-
.itf-pagination-select
|
|
41
|
-
{}
|
|
42
|
-
</style>
|
|
43
51
|
<script>
|
|
44
52
|
import { Vue, Component, Model, Prop } from 'vue-property-decorator';
|
|
45
53
|
import itfIcon from '../icon/Icon.vue';
|
|
46
|
-
import
|
|
54
|
+
import itfDropdown from "../dropdown/Dropdown.vue";
|
|
47
55
|
|
|
48
56
|
const MIN_PAGES_BLOCKS = 2;
|
|
49
57
|
const MAX_PAGES_BLOCKS = 6;
|
|
@@ -56,7 +64,7 @@ const PER_PAGE_OPTIONS = [
|
|
|
56
64
|
export default @Component({
|
|
57
65
|
name: 'itfPagination',
|
|
58
66
|
components: {
|
|
59
|
-
|
|
67
|
+
itfDropdown,
|
|
60
68
|
itfIcon
|
|
61
69
|
}
|
|
62
70
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<div class="itf-table2 scrollable scrollable-x" :class="{'permanent-checkboxes': selectedIds.length}" :style="{ '--indicator-area-width': `${indicatorType === 'none' ? 1 : indicatorWidth}px` }">
|
|
3
|
+
<div class="itf-table2 scrollable scrollable-x" :class="{'table-striped': striped, 'table-absolute': absolute, 'permanent-checkboxes': selectedIds.length}" :style="{ '--indicator-area-width': `${indicatorType === 'none' ? 1 : indicatorWidth}px` }">
|
|
4
4
|
<itf-checkbox-group v-model="selectedIds">
|
|
5
5
|
<template v-for="(group, index) in groups">
|
|
6
6
|
<div class="table-view-body">
|
|
@@ -100,6 +100,7 @@ class itfTable2 extends Vue {
|
|
|
100
100
|
@Prop(Boolean) editable;
|
|
101
101
|
@Prop(Boolean) expandedAll;
|
|
102
102
|
@Prop(Boolean) striped;
|
|
103
|
+
@Prop(Boolean) absolute;
|
|
103
104
|
|
|
104
105
|
state = {
|
|
105
106
|
selectedIds: [],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
--itf-table-border-color: #e1e1e1;
|
|
3
3
|
--itf-table-header-bg: #f8f8f8;
|
|
4
4
|
--itf-table-selected-bg: #f0f0f0;
|
|
5
|
+
--itf-table-alt-bg: #f9f9f9;
|
|
5
6
|
//--itf-table-border-color: #e1e1e1;
|
|
6
7
|
//--itf-table-header-bg: #f9faf5;
|
|
7
8
|
//--itf-table-selected-bg: #cbd6f4;
|
|
@@ -42,6 +43,18 @@ body[data-theme="dark"] {
|
|
|
42
43
|
overflow-x: scroll;
|
|
43
44
|
padding-right: 4px;
|
|
44
45
|
}
|
|
46
|
+
&.table-absolute {
|
|
47
|
+
position: absolute;
|
|
48
|
+
left: 0;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
}
|
|
53
|
+
&.table-striped {
|
|
54
|
+
.table-view-item:nth-child(odd) {
|
|
55
|
+
--itf-table2-row-bg: var(--itf-table-alt-bg);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
45
58
|
|
|
46
59
|
&__header {
|
|
47
60
|
background-color: var(--itf-table-header-bg);
|
|
@@ -207,11 +220,8 @@ body[data-theme="dark"] {
|
|
|
207
220
|
|
|
208
221
|
background-color: var(--itf-table2-row-bg);
|
|
209
222
|
|
|
210
|
-
&.selected {
|
|
211
|
-
--itf-table2-row-bg: var(--itf-table-selected-bg);
|
|
212
|
-
}
|
|
213
|
-
&:hover {
|
|
214
|
-
--itf-table2-row-bg: var(--itf-table-selected-bg);
|
|
223
|
+
&.selected, &:hover {
|
|
224
|
+
--itf-table2-row-bg: var(--itf-table-selected-bg) !important;
|
|
215
225
|
}
|
|
216
226
|
|
|
217
227
|
.indicator {
|
package/src/locales/en.js
CHANGED
|
@@ -120,5 +120,10 @@ module.exports = {
|
|
|
120
120
|
calculateCountNotEmpty: 'Count not empty',
|
|
121
121
|
calculatePercentEmpty: 'Percent empty',
|
|
122
122
|
calculatePercentNotEmpty: 'Percent not empty',
|
|
123
|
+
},
|
|
124
|
+
pagination: {
|
|
125
|
+
itemsPerPage: 'Items per page',
|
|
126
|
+
previous: 'Previous',
|
|
127
|
+
next: 'Next'
|
|
123
128
|
}
|
|
124
129
|
};
|
package/src/locales/uk.js
CHANGED
|
@@ -97,6 +97,11 @@ module.exports = {
|
|
|
97
97
|
copyToClipboard: {
|
|
98
98
|
copyingToClipboardWasSuccessful: 'Скопійовано в буфер',
|
|
99
99
|
},
|
|
100
|
+
pagination: {
|
|
101
|
+
itemsPerPage: 'К-ть на сторінці',
|
|
102
|
+
previous: 'Попередня',
|
|
103
|
+
next: 'Наступна',
|
|
104
|
+
},
|
|
100
105
|
table: {
|
|
101
106
|
new: 'Додати',
|
|
102
107
|
noResults: 'Немає записів',
|