@avakhula/ui 0.0.262 → 0.0.264
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/.storybook/preview.js +9 -0
- package/dist/index.js +1837 -1825
- package/dist/index.umd.cjs +50 -50
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +24 -11
- package/src/components/Pagination/Pagination.vue +22 -5
- package/src/components/Sorting/Sorting.vue +15 -1
- package/src/components/TreeSelect/Select.vue +5 -14
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
|
|
2
|
+
<div class="page">
|
|
3
|
+
|
|
4
|
+
<sorting view="table-sorting" toggle-tip-title="hello" :table-name="'table'" :title="'test'">
|
|
5
|
+
|
|
6
|
+
<!-- <template #toggleTipBody>
|
|
7
|
+
<p>
|
|
8
|
+
test
|
|
9
|
+
</p>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<template #toggleTipButtons>
|
|
13
|
+
<p>
|
|
14
|
+
test
|
|
15
|
+
</p>
|
|
16
|
+
</template> -->
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
</sorting>
|
|
4
20
|
</div>
|
|
5
21
|
</template>
|
|
6
22
|
|
|
7
23
|
<script>
|
|
8
|
-
import
|
|
24
|
+
import Sorting from './components/Sorting/Sorting.vue';
|
|
9
25
|
export default {
|
|
10
26
|
components: {
|
|
11
|
-
|
|
12
|
-
}
|
|
27
|
+
Sorting
|
|
28
|
+
}
|
|
13
29
|
}
|
|
14
30
|
</script>
|
|
15
31
|
|
|
16
|
-
|
|
17
32
|
<style lang="scss">
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: end;
|
|
33
|
+
.page {
|
|
34
|
+
padding: 200px;
|
|
22
35
|
}
|
|
23
|
-
</style>
|
|
36
|
+
</style>
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
></ib-limit-selector>
|
|
8
8
|
|
|
9
9
|
<div class="repot-pagination">
|
|
10
|
-
|
|
10
|
+
{{ displayPaginationInput }}
|
|
11
|
+
<template v-if="displayPaginationInput">
|
|
11
12
|
<ib-label>{{ labelInput }}</ib-label>
|
|
12
13
|
<div class="pagination-input">
|
|
13
14
|
<ib-input type="number" :debounce="500" @input="onInput"></ib-input>
|
|
@@ -22,13 +23,15 @@
|
|
|
22
23
|
size="m"
|
|
23
24
|
class="toggle-children button-prev"
|
|
24
25
|
:disabled="currentPage === 1"
|
|
26
|
+
v-tooltip="tooltipTextPrev"
|
|
25
27
|
@click="onSelect(currentPage - 1)"
|
|
26
28
|
>
|
|
27
29
|
<ib-icon name="chevron-back-outline"></ib-icon>
|
|
28
|
-
<ib-tooltip v-if="tooltipTextPrev" :text="tooltipTextPrev"></ib-tooltip>
|
|
30
|
+
<!-- <ib-tooltip v-if="tooltipTextPrev" :text="tooltipTextPrev"></ib-tooltip> -->
|
|
29
31
|
</ib-icon-button>
|
|
30
32
|
|
|
31
33
|
<ul class="pagination-wrapper">
|
|
34
|
+
<!-- here -->
|
|
32
35
|
<li
|
|
33
36
|
v-for="(item, index) of countPagePagination"
|
|
34
37
|
v-show="showItem(index + 1)"
|
|
@@ -52,10 +55,11 @@
|
|
|
52
55
|
size="m"
|
|
53
56
|
class="toggle-children button-next"
|
|
54
57
|
:disabled="currentPage === countPagePagination"
|
|
58
|
+
v-tooltip="tooltipTextNext"
|
|
55
59
|
@click="onSelect(currentPage + 1)"
|
|
56
60
|
>
|
|
57
61
|
<ib-icon name="chevron-forward-outline"></ib-icon>
|
|
58
|
-
<ib-tooltip v-if="tooltipTextNext" :text="tooltipTextNext"></ib-tooltip>
|
|
62
|
+
<!-- <ib-tooltip v-if="tooltipTextNext" :text="tooltipTextNext"></ib-tooltip> -->
|
|
59
63
|
</ib-icon-button>
|
|
60
64
|
</div>
|
|
61
65
|
</div>
|
|
@@ -67,15 +71,20 @@ import IbIconButton from "../IconButton/IconButton.vue";
|
|
|
67
71
|
import IbInput from "../Form/Input/Input.vue";
|
|
68
72
|
import IbLabel from "../Form/Label/Label.vue";
|
|
69
73
|
import IbIcon from "../Icon.vue";
|
|
70
|
-
import
|
|
74
|
+
import { TooltipDirective as Tooltip } from "../../directives/tooltip/tooltip";
|
|
75
|
+
// import IbTooltip from "../Tooltip/Tooltip.vue";
|
|
76
|
+
|
|
77
|
+
|
|
71
78
|
export default {
|
|
72
79
|
name: "IbPagination",
|
|
73
80
|
props: {
|
|
74
81
|
tooltipTextPrev: {
|
|
75
82
|
type: String,
|
|
83
|
+
default: lang('prev_page', this.langComponents?.COMPONENT_SYSTEM),
|
|
76
84
|
},
|
|
77
85
|
tooltipTextNext: {
|
|
78
86
|
type: String,
|
|
87
|
+
default: lang('next_page', this.langComponents?.COMPONENT_SYSTEM),
|
|
79
88
|
},
|
|
80
89
|
labelInput: {
|
|
81
90
|
type: String,
|
|
@@ -221,6 +230,14 @@ export default {
|
|
|
221
230
|
countPagePagination() {
|
|
222
231
|
return Math.ceil(this.countRows / this.limitValue);
|
|
223
232
|
},
|
|
233
|
+
displayPaginationInput() {
|
|
234
|
+
if(!this.showPaginationInput) return false;
|
|
235
|
+
|
|
236
|
+
return Boolean(this.countPagePagination >= 7);
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
directives: {
|
|
240
|
+
Tooltip
|
|
224
241
|
},
|
|
225
242
|
components: {
|
|
226
243
|
IbIconButton,
|
|
@@ -228,7 +245,7 @@ export default {
|
|
|
228
245
|
IbInput,
|
|
229
246
|
IbLabel,
|
|
230
247
|
IbLimitSelector,
|
|
231
|
-
IbTooltip,
|
|
248
|
+
// IbTooltip,
|
|
232
249
|
},
|
|
233
250
|
};
|
|
234
251
|
</script>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div>
|
|
12
12
|
<button
|
|
13
13
|
class="sorting-label"
|
|
14
|
-
v-tooltip:[
|
|
14
|
+
v-tooltip:[sortingTooltipPosition]="sortingTooltipContent"
|
|
15
15
|
:class="{
|
|
16
16
|
'sorting-label-active': isOpenToggleTip && hasToggleTip,
|
|
17
17
|
'has-action': tooltipText?.length || hasToggleTip
|
|
@@ -158,6 +158,20 @@ export default {
|
|
|
158
158
|
}
|
|
159
159
|
return null;
|
|
160
160
|
},
|
|
161
|
+
sortingTooltipPosition() {
|
|
162
|
+
if (this.hasToggleTip) {
|
|
163
|
+
return 'bottomCenter'
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return this.tooltipPosition;
|
|
167
|
+
},
|
|
168
|
+
sortingTooltipContent() {
|
|
169
|
+
if (this.hasToggleTip) {
|
|
170
|
+
return lang('click_to_view_details', this.langComponents?.COMPONENT_SYSTEM);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return this.tooltipContent;
|
|
174
|
+
},
|
|
161
175
|
tooltipIconText() {
|
|
162
176
|
if (this.currentTypeSort === this.sortingTypes.TYPE_ASC) {
|
|
163
177
|
return lang("sort_descending", this.langComponents?.COMPONENT_SELECT);
|
|
@@ -915,24 +915,15 @@ export default {
|
|
|
915
915
|
this.vertical = "bottom";
|
|
916
916
|
},
|
|
917
917
|
onOpen() {
|
|
918
|
-
|
|
919
|
-
const screenHeight = document.body.offsetHeight;
|
|
920
|
-
const screenScrollHeight = document.documentElement.scrollHeight;
|
|
918
|
+
const screenHeight = document.documentElement.scrollHeight;
|
|
921
919
|
this.isOpen = true;
|
|
922
920
|
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
console.log(screenScrollHeight, "screenScrollHeight")
|
|
928
|
-
console.log(screenHeight, "screenHeight")
|
|
929
|
-
console.log(newScreenScrollHeight, "newScreenScrollHeight")
|
|
930
|
-
console.log(newScreenHeight, "newScreenHeight")
|
|
931
|
-
if(newScreenHeight > screenHeight || newScreenScrollHeight > screenScrollHeight) {
|
|
932
|
-
console.log('test')
|
|
921
|
+
this.$nextTick(() => {
|
|
922
|
+
const newScreenHeight = document.documentElement.scrollHeight
|
|
923
|
+
if(newScreenHeight > screenHeight) {
|
|
933
924
|
this.vertical = "top";
|
|
934
925
|
}
|
|
935
|
-
}
|
|
926
|
+
})
|
|
936
927
|
}
|
|
937
928
|
},
|
|
938
929
|
computed: {
|