edvoyui-component-library-test-flight 0.0.232 → 0.0.234
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/components/table/EUIDashboardTable.vue +2 -0
- package/dist/components/table/EUIPageLimit.d.ts +9 -0
- package/dist/components/table/EUIPageLimit.vue +12 -2
- package/dist/components/table/EUIPagination.d.ts +9 -0
- package/dist/components/table/EUIPagination.vue +17 -5
- package/dist/components/table/EUIStudentPagination.d.ts +9 -0
- package/dist/components/table/EUIStudentPagination.vue +17 -5
- package/dist/components/table/EUITable.vue +2 -0
- package/dist/components/table/GrowthTable.vue +2 -0
- package/dist/components/table/UTable.vue +11 -4
- package/dist/edvoy-ui.cjs.js +11 -11
- package/dist/edvoy-ui.css +1 -1
- package/dist/edvoy-ui.es.js +5966 -5936
- package/dist/edvoy-ui.umd.js +13 -13
- package/package.json +1 -1
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
>
|
|
173
173
|
<EUIPageLimit
|
|
174
174
|
:page-limit="limit"
|
|
175
|
+
:disabled="loading"
|
|
175
176
|
@update-limit="changeLimit($event)"
|
|
176
177
|
@refetch="searchData($event)"
|
|
177
178
|
/>
|
|
@@ -189,6 +190,7 @@
|
|
|
189
190
|
:activePage="newCurrentPage"
|
|
190
191
|
:pageLimit="limit"
|
|
191
192
|
:totalCount="total"
|
|
193
|
+
:disabled="loading"
|
|
192
194
|
@change-page="pageChanged($event)"
|
|
193
195
|
/>
|
|
194
196
|
</slot>
|
|
@@ -8,6 +8,10 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
8
8
|
type: BooleanConstructor;
|
|
9
9
|
default: boolean;
|
|
10
10
|
};
|
|
11
|
+
disabled: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
11
15
|
}>, {}, {}, {}, {}, import('../../../node_modules/vue').ComponentOptionsMixin, import('../../../node_modules/vue').ComponentOptionsMixin, {
|
|
12
16
|
updateLimit: (...args: any[]) => void;
|
|
13
17
|
refetch: (...args: any[]) => void;
|
|
@@ -20,10 +24,15 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
20
24
|
type: BooleanConstructor;
|
|
21
25
|
default: boolean;
|
|
22
26
|
};
|
|
27
|
+
disabled: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
23
31
|
}>> & Readonly<{
|
|
24
32
|
onUpdateLimit?: ((...args: any[]) => any) | undefined;
|
|
25
33
|
onRefetch?: ((...args: any[]) => any) | undefined;
|
|
26
34
|
}>, {
|
|
35
|
+
disabled: boolean;
|
|
27
36
|
pageLimit: number;
|
|
28
37
|
iconStyle: boolean;
|
|
29
38
|
}, {}, {}, {}, string, import('../../../node_modules/vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
:class="{ 'pointer-events-none opacity-50 cursor-not-allowed': disabled }"
|
|
4
|
+
:aria-disabled="disabled"
|
|
5
|
+
:inert="disabled"
|
|
6
|
+
>
|
|
3
7
|
<EUIPopover
|
|
4
8
|
v-model:visible="popoverVisible"
|
|
5
9
|
trigger="click"
|
|
@@ -57,12 +61,18 @@ const props = defineProps({
|
|
|
57
61
|
type: Boolean,
|
|
58
62
|
default: false,
|
|
59
63
|
},
|
|
64
|
+
disabled: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false,
|
|
67
|
+
},
|
|
60
68
|
});
|
|
61
|
-
const { pageLimit } = toRefs(props);
|
|
69
|
+
const { pageLimit, disabled } = toRefs(props);
|
|
62
70
|
const emit = defineEmits(["updateLimit", "refetch"]);
|
|
63
71
|
const pageList = ref([5, 10, 20, 30, 40, 50, 100]);
|
|
64
72
|
const popoverVisible = ref(false);
|
|
65
73
|
const changePageLimit = (data: any) => {
|
|
74
|
+
if (disabled.value) return;
|
|
75
|
+
|
|
66
76
|
emit("updateLimit", data);
|
|
67
77
|
emit("refetch");
|
|
68
78
|
popoverVisible.value = false;
|
|
@@ -13,6 +13,10 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
13
13
|
type: NumberConstructor;
|
|
14
14
|
default: number;
|
|
15
15
|
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
divider: {
|
|
17
21
|
type: StringConstructor;
|
|
18
22
|
default: string;
|
|
@@ -39,6 +43,10 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
39
43
|
type: NumberConstructor;
|
|
40
44
|
default: number;
|
|
41
45
|
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
42
50
|
divider: {
|
|
43
51
|
type: StringConstructor;
|
|
44
52
|
default: string;
|
|
@@ -51,6 +59,7 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
51
59
|
}>> & Readonly<{
|
|
52
60
|
onChangePage?: ((...args: any[]) => any) | undefined;
|
|
53
61
|
}>, {
|
|
62
|
+
disabled: boolean;
|
|
54
63
|
max: number;
|
|
55
64
|
pageLimit: number;
|
|
56
65
|
totalCount: number;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<button
|
|
5
5
|
:class="[
|
|
6
6
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-2 items-center transition duration-150 ease-in-out bg-white text-black cursor-pointer text-sm font-medium px-3 py-2',
|
|
7
|
-
currentPage === 1 && 'opacity-50 pointer-events-none',
|
|
7
|
+
(disabled || currentPage === 1) && 'opacity-50 pointer-events-none cursor-not-allowed',
|
|
8
8
|
]"
|
|
9
|
-
:disabled="currentPage === 1
|
|
9
|
+
:disabled="disabled || currentPage === 1"
|
|
10
10
|
@click="prev()"
|
|
11
11
|
>
|
|
12
12
|
<ChevronDownStroke class="text-current transform rotate-90 size-6" />
|
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-2 items-center transition duration-150 ease-in-out cursor-pointer text-sm font-medium px-3 py-2',
|
|
20
20
|
i == '…'
|
|
21
21
|
? 'select-none pointer-events-none'
|
|
22
|
+
: disabled
|
|
23
|
+
? 'opacity-50 pointer-events-none cursor-not-allowed'
|
|
22
24
|
: currentPage == i
|
|
23
25
|
? 'text-white bg-violet-600'
|
|
24
26
|
: 'bg-white text-black',
|
|
25
27
|
]"
|
|
28
|
+
:disabled="disabled || i === '…'"
|
|
26
29
|
@click="typeof i === 'number' && changePage(i - 1)"
|
|
27
30
|
>
|
|
28
31
|
{{ i }}
|
|
@@ -32,9 +35,9 @@
|
|
|
32
35
|
<button
|
|
33
36
|
:class="[
|
|
34
37
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-2 items-center transition duration-150 ease-in-out bg-white text-black cursor-pointer text-sm font-medium px-3 py-2',
|
|
35
|
-
totalPages === currentPage && 'opacity-50 pointer-events-none',
|
|
38
|
+
(disabled || totalPages === currentPage) && 'opacity-50 pointer-events-none cursor-not-allowed',
|
|
36
39
|
]"
|
|
37
|
-
:disabled="totalPages === currentPage
|
|
40
|
+
:disabled="disabled || totalPages === currentPage"
|
|
38
41
|
@click="next()"
|
|
39
42
|
>
|
|
40
43
|
<span class="hidden md:block">Next</span>
|
|
@@ -58,6 +61,9 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
58
61
|
activePage: {
|
|
59
62
|
type: Number, default: 0
|
|
60
63
|
},
|
|
64
|
+
disabled: {
|
|
65
|
+
type: Boolean, default: false
|
|
66
|
+
},
|
|
61
67
|
divider: {
|
|
62
68
|
type: String, default: '…'
|
|
63
69
|
},
|
|
@@ -76,6 +82,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
76
82
|
});
|
|
77
83
|
|
|
78
84
|
const prev = () => {
|
|
85
|
+
if (props.disabled) return
|
|
86
|
+
|
|
79
87
|
if (props.activePage > 0) {
|
|
80
88
|
const prevPage = props.activePage - 1
|
|
81
89
|
changePage(prevPage)
|
|
@@ -83,6 +91,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
const next = () => {
|
|
94
|
+
if (props.disabled) return
|
|
95
|
+
|
|
86
96
|
if (props.activePage < totalPages.value - 1) {
|
|
87
97
|
const nextPage = props.activePage + 1
|
|
88
98
|
changePage(nextPage)
|
|
@@ -90,6 +100,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
const changePage = (page: Number) => {
|
|
103
|
+
if (props.disabled) return
|
|
104
|
+
|
|
93
105
|
emit('changePage', page)
|
|
94
106
|
}
|
|
95
107
|
|
|
@@ -169,4 +181,4 @@ const displayedPages = computed(() => {
|
|
|
169
181
|
|
|
170
182
|
<style scoped>
|
|
171
183
|
|
|
172
|
-
</style>
|
|
184
|
+
</style>
|
|
@@ -13,6 +13,10 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
13
13
|
type: NumberConstructor;
|
|
14
14
|
default: number;
|
|
15
15
|
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
divider: {
|
|
17
21
|
type: StringConstructor;
|
|
18
22
|
default: string;
|
|
@@ -39,6 +43,10 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
39
43
|
type: NumberConstructor;
|
|
40
44
|
default: number;
|
|
41
45
|
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
42
50
|
divider: {
|
|
43
51
|
type: StringConstructor;
|
|
44
52
|
default: string;
|
|
@@ -51,6 +59,7 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
51
59
|
}>> & Readonly<{
|
|
52
60
|
onChangePage?: ((...args: any[]) => any) | undefined;
|
|
53
61
|
}>, {
|
|
62
|
+
disabled: boolean;
|
|
54
63
|
max: number;
|
|
55
64
|
pageLimit: number;
|
|
56
65
|
totalCount: number;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<button
|
|
5
5
|
:class="[
|
|
6
6
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-2 items-center transition duration-150 ease-in-out bg-white text-black cursor-pointer text-sm font-medium px-3 py-1 leading-6',
|
|
7
|
-
currentPage === 1 && 'opacity-50 pointer-events-none',
|
|
7
|
+
(disabled || currentPage === 1) && 'opacity-50 pointer-events-none cursor-not-allowed',
|
|
8
8
|
]"
|
|
9
|
-
:disabled="currentPage === 1
|
|
9
|
+
:disabled="disabled || currentPage === 1"
|
|
10
10
|
@click="prev()"
|
|
11
11
|
>
|
|
12
12
|
<ChevronDownStroke class="text-current transform rotate-90 size-6" />
|
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-1 items-center transition-transform duration-100 ease-in-out cursor-pointer text-sm font-medium leading-6 px-3 py-1',
|
|
20
20
|
i === '…'
|
|
21
21
|
? 'select-none pointer-events-none'
|
|
22
|
+
: disabled
|
|
23
|
+
? 'opacity-50 pointer-events-none cursor-not-allowed'
|
|
22
24
|
: currentPage === i
|
|
23
25
|
? 'text-black bg-purple-50 ring-2 ring-inset ring-purple-600'
|
|
24
26
|
: 'bg-white text-black',
|
|
25
27
|
]"
|
|
28
|
+
:disabled="disabled || i === '…'"
|
|
26
29
|
@click="typeof i === 'number' && changePage(i - 1)"
|
|
27
30
|
>
|
|
28
31
|
{{ i }}
|
|
@@ -32,9 +35,9 @@
|
|
|
32
35
|
<button
|
|
33
36
|
:class="[
|
|
34
37
|
'rounded-md capitalize box-border border-none focus:outline-none inline-flex flex-row gap-x-2 items-center transition duration-150 ease-in-out bg-white text-black cursor-pointer text-sm font-medium px-3 py-1 leading-6',
|
|
35
|
-
totalPages === currentPage && 'opacity-50 pointer-events-none',
|
|
38
|
+
(disabled || totalPages === currentPage) && 'opacity-50 pointer-events-none cursor-not-allowed',
|
|
36
39
|
]"
|
|
37
|
-
:disabled="totalPages === currentPage
|
|
40
|
+
:disabled="disabled || totalPages === currentPage"
|
|
38
41
|
@click="next()"
|
|
39
42
|
>
|
|
40
43
|
<span class="hidden md:block">Next</span>
|
|
@@ -58,6 +61,9 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
58
61
|
activePage: {
|
|
59
62
|
type: Number, default: 0
|
|
60
63
|
},
|
|
64
|
+
disabled: {
|
|
65
|
+
type: Boolean, default: false
|
|
66
|
+
},
|
|
61
67
|
divider: {
|
|
62
68
|
type: String, default: '…'
|
|
63
69
|
},
|
|
@@ -77,6 +83,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
77
83
|
});
|
|
78
84
|
|
|
79
85
|
const prev = () => {
|
|
86
|
+
if (props.disabled) return
|
|
87
|
+
|
|
80
88
|
if (props.activePage > 0) {
|
|
81
89
|
const prevPage = props.activePage - 1
|
|
82
90
|
changePage(prevPage)
|
|
@@ -84,6 +92,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
const next = () => {
|
|
95
|
+
if (props.disabled) return
|
|
96
|
+
|
|
87
97
|
if (props.activePage < totalPages.value - 1) {
|
|
88
98
|
const nextPage = props.activePage + 1
|
|
89
99
|
changePage(nextPage)
|
|
@@ -91,6 +101,8 @@ import ChevronDownStroke from '../../assets/svg/ChevronDownStroke.vue';
|
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
const changePage = (page: Number) => {
|
|
104
|
+
if (props.disabled) return
|
|
105
|
+
|
|
94
106
|
emit('changePage', page)
|
|
95
107
|
}
|
|
96
108
|
|
|
@@ -169,4 +181,4 @@ const displayedPages = computed(() => {
|
|
|
169
181
|
</script>
|
|
170
182
|
|
|
171
183
|
<style scoped>
|
|
172
|
-
</style>
|
|
184
|
+
</style>
|
|
@@ -213,6 +213,7 @@
|
|
|
213
213
|
<span class="text-sm font-medium text-gray-900">Per page</span>
|
|
214
214
|
<EUIPageLimit
|
|
215
215
|
:page-limit="limit"
|
|
216
|
+
:disabled="loading"
|
|
216
217
|
@update-limit="changeLimit($event)"
|
|
217
218
|
@refetch="searchData($event)"
|
|
218
219
|
:iconStyle="false"
|
|
@@ -226,6 +227,7 @@
|
|
|
226
227
|
:activePage="newCurrentPage"
|
|
227
228
|
:pageLimit="limit"
|
|
228
229
|
:totalCount="total"
|
|
230
|
+
:disabled="loading"
|
|
229
231
|
@change-page="pageChanged($event)"
|
|
230
232
|
/>
|
|
231
233
|
</slot>
|
|
@@ -246,6 +246,7 @@
|
|
|
246
246
|
>
|
|
247
247
|
<EUIPageLimit
|
|
248
248
|
:page-limit="limit"
|
|
249
|
+
:disabled="loading"
|
|
249
250
|
@update-limit="changeLimit($event)"
|
|
250
251
|
@refetch="searchData($event)"
|
|
251
252
|
/>
|
|
@@ -258,6 +259,7 @@
|
|
|
258
259
|
:activePage="newCurrentPage"
|
|
259
260
|
:pageLimit="limit"
|
|
260
261
|
:totalCount="total"
|
|
262
|
+
:disabled="loading"
|
|
261
263
|
@change-page="pageChanged($event)"
|
|
262
264
|
/>
|
|
263
265
|
</slot>
|
|
@@ -279,13 +279,12 @@
|
|
|
279
279
|
<slot
|
|
280
280
|
name="tableCount"
|
|
281
281
|
:currentPage="newCurrentPage"
|
|
282
|
-
:from="
|
|
283
|
-
:to="
|
|
282
|
+
:from="rangeFrom"
|
|
283
|
+
:to="rangeTo"
|
|
284
284
|
>
|
|
285
285
|
<div class="inline-flex items-center self-stretch gap-x-3">
|
|
286
286
|
<div class="text-sm font-normal text-gray-600">
|
|
287
|
-
{{
|
|
288
|
-
{{ (newCurrentPage + 1) * limit }} of {{ total }}
|
|
287
|
+
{{ rangeFrom }} - {{ rangeTo }} of {{ total }}
|
|
289
288
|
</div>
|
|
290
289
|
<div class="self-stretch w-px h-4 my-auto bg-gray-300"></div>
|
|
291
290
|
<div class="inline-flex items-center gap-0">
|
|
@@ -293,6 +292,7 @@
|
|
|
293
292
|
> Items per page:</span>
|
|
294
293
|
<EUIPageLimit
|
|
295
294
|
:page-limit="limit"
|
|
295
|
+
:disabled="loading"
|
|
296
296
|
@update-limit="changeLimit($event)"
|
|
297
297
|
@refetch="searchData($event)"
|
|
298
298
|
/>
|
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
:activePage="newCurrentPage"
|
|
306
306
|
:pageLimit="limit"
|
|
307
307
|
:totalCount="total"
|
|
308
|
+
:disabled="loading"
|
|
308
309
|
@change-page="pageChanged($event)"
|
|
309
310
|
/>
|
|
310
311
|
</slot>
|
|
@@ -418,6 +419,12 @@ const newCheckedRows = ref([...checkedRows.value]);
|
|
|
418
419
|
const newCurrentPage = ref(currentPage.value);
|
|
419
420
|
const limit = ref(props.perPage);
|
|
420
421
|
const loading = computed(() => props.tableLoading);
|
|
422
|
+
const rangeFrom = computed(() =>
|
|
423
|
+
total.value > 0 ? newCurrentPage.value * limit.value + 1 : 0
|
|
424
|
+
);
|
|
425
|
+
const rangeTo = computed(() =>
|
|
426
|
+
Math.min((newCurrentPage.value + 1) * limit.value, total.value)
|
|
427
|
+
);
|
|
421
428
|
|
|
422
429
|
// Computed Property
|
|
423
430
|
|