edvoyui-component-library-test-flight 0.0.27 → 0.0.28
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="relative w-full mx-auto overflow-hidden">
|
|
4
4
|
<div
|
|
5
5
|
id="dashboard-table"
|
|
6
|
-
class="overflow-auto
|
|
6
|
+
:class="['overflow-auto scrollbar--thin overscroll-none', tableHeight ? tableHeight : 'h-[calc(100svh-13rem)] max-h-[calc(100svh-13rem)]']"
|
|
7
7
|
ref="tableContainer"
|
|
8
8
|
@scroll="handleScroll"
|
|
9
9
|
>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<tr class="norecords">
|
|
64
64
|
<td :colspan="headers.length">
|
|
65
65
|
<div
|
|
66
|
-
class="flex items-center justify-center
|
|
66
|
+
class="flex items-center justify-center min-h-96"
|
|
67
67
|
>
|
|
68
68
|
<EUICircleLoader />
|
|
69
69
|
</div>
|
|
@@ -114,10 +114,9 @@
|
|
|
114
114
|
<slot name="expanded" :row="row" :rowIndex="rowIndex"></slot>
|
|
115
115
|
</template>
|
|
116
116
|
</template>
|
|
117
|
-
|
|
118
|
-
<template v-if="computedItems.length === 0">
|
|
117
|
+
<template v-else-if="computedItems.length === 0">
|
|
119
118
|
<tr class="norecords">
|
|
120
|
-
<td :colspan="headers.length">
|
|
119
|
+
<td :colspan="checkable === true ? headers.length + 1 : headers.length">
|
|
121
120
|
<div
|
|
122
121
|
class="flex items-center justify-center text-xl font-medium text-gray-500 min-h-96"
|
|
123
122
|
>
|
|
@@ -216,7 +215,12 @@ const props = defineProps({
|
|
|
216
215
|
default: () => () => false,
|
|
217
216
|
},
|
|
218
217
|
isRowCheckable: { type: Function, default: () => true },
|
|
219
|
-
|
|
218
|
+
tableHeight: {
|
|
219
|
+
type: String,
|
|
220
|
+
required: false,
|
|
221
|
+
default: ""
|
|
222
|
+
},
|
|
223
|
+
tableLoading: { type: Boolean, default: false },
|
|
220
224
|
});
|
|
221
225
|
const {
|
|
222
226
|
defaultSort,
|
|
@@ -238,9 +242,7 @@ const currentSortDir = ref(defaultSortDirection.value);
|
|
|
238
242
|
const newCheckedRows = ref([...checkedRows.value]);
|
|
239
243
|
const newCurrentPage = ref(currentPage.value);
|
|
240
244
|
const lastCheckedRowIndex = ref();
|
|
241
|
-
|
|
242
245
|
const limit = ref(props.perPage);
|
|
243
|
-
|
|
244
246
|
const loading = computed(() => props.tableLoading);
|
|
245
247
|
|
|
246
248
|
// Computed Property
|
|
@@ -88,7 +88,20 @@
|
|
|
88
88
|
</tr>
|
|
89
89
|
</thead>
|
|
90
90
|
<tbody>
|
|
91
|
+
<template v-if="loading">
|
|
92
|
+
<tr class="norecords">
|
|
93
|
+
<td :colspan="headers.length">
|
|
94
|
+
<div
|
|
95
|
+
class="flex items-center justify-center min-h-96"
|
|
96
|
+
>
|
|
97
|
+
<EUICircleLoader />
|
|
98
|
+
</div>
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
91
103
|
<template
|
|
104
|
+
v-else-if="computedItems.length > 0"
|
|
92
105
|
v-for="(row, rowIndex) in computedItems"
|
|
93
106
|
:key="`table-row-${rowIndex}`"
|
|
94
107
|
>
|
|
@@ -123,9 +136,8 @@
|
|
|
123
136
|
<slot name="expanded" :row="row" :rowIndex="rowIndex"></slot>
|
|
124
137
|
</template>
|
|
125
138
|
</template>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<tr class="norecords">
|
|
139
|
+
<template v-else-if="computedItems.length === 0">
|
|
140
|
+
<tr class="norecords">
|
|
129
141
|
<td :colspan="checkable === true ? headers.length + 1 : headers.length">
|
|
130
142
|
<div
|
|
131
143
|
class="flex items-center justify-center text-xl font-medium text-gray-500 min-h-96"
|
|
@@ -134,7 +146,9 @@
|
|
|
134
146
|
</div>
|
|
135
147
|
</td>
|
|
136
148
|
</tr>
|
|
149
|
+
</template>
|
|
137
150
|
</tbody>
|
|
151
|
+
|
|
138
152
|
</table>
|
|
139
153
|
</div>
|
|
140
154
|
<div
|
|
@@ -179,6 +193,7 @@ import EUITableCheckbox from "./EUITableCheckbox.vue";
|
|
|
179
193
|
import EUIPageLimit from "./EUIPageLimit.vue";
|
|
180
194
|
import EUIStudentPagination from "./EUIStudentPagination.vue";
|
|
181
195
|
import { capitalizeText } from "../../utils/lodash";
|
|
196
|
+
import EUICircleLoader from "../loader/EUICircleLoader.vue";
|
|
182
197
|
|
|
183
198
|
interface Header {
|
|
184
199
|
value: string;
|
|
@@ -216,6 +231,7 @@ const props = defineProps({
|
|
|
216
231
|
required: false,
|
|
217
232
|
default: ""
|
|
218
233
|
},
|
|
234
|
+
tableLoading: { type: Boolean, default: false },
|
|
219
235
|
});
|
|
220
236
|
|
|
221
237
|
const {
|
|
@@ -233,14 +249,13 @@ const {
|
|
|
233
249
|
customIsChecked,
|
|
234
250
|
} = toRefs(props);
|
|
235
251
|
|
|
236
|
-
|
|
237
|
-
|
|
238
252
|
const currentSort = ref(defaultSort.value);
|
|
239
253
|
const currentSortDir = ref(defaultSortDirection.value);
|
|
240
254
|
const newCheckedRows = ref([...checkedRows.value]);
|
|
241
255
|
const newCurrentPage = ref(currentPage.value);
|
|
242
256
|
const lastCheckedRowIndex = ref();
|
|
243
257
|
const limit = ref(props.perPage);
|
|
258
|
+
const loading = computed(() => props.tableLoading);
|
|
244
259
|
|
|
245
260
|
// Computed Property
|
|
246
261
|
const filteredItems = computed(() => {
|