@fy-/fws-vue 2.2.68 → 2.2.70
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/components/fws/DataTable.vue +27 -20
- package/components/ui/DefaultPaging.vue +23 -23
- package/package.json +1 -1
|
@@ -206,37 +206,32 @@ onUnmounted(() => {
|
|
|
206
206
|
<div class="data-table-container bg-white dark:bg-fv-neutral-900 rounded-lg shadow-sm hover:shadow-md transition-all duration-300 overflow-hidden">
|
|
207
207
|
<!-- Table header with controls -->
|
|
208
208
|
<div class="table-controls p-4 border-b border-fv-neutral-200 dark:border-fv-neutral-800">
|
|
209
|
-
<div class="flex flex-wrap items-center justify-
|
|
210
|
-
<!--
|
|
211
|
-
<div
|
|
212
|
-
|
|
213
|
-
<!-- Export and per page settings -->
|
|
214
|
-
<div class="flex items-center gap-2">
|
|
209
|
+
<div v-if="hasExportableColumns && hasData" class="flex flex-wrap items-center justify-end gap-3">
|
|
210
|
+
<!-- Export button -->
|
|
211
|
+
<div class="flex items-center">
|
|
215
212
|
<button
|
|
216
|
-
v-if="hasExportableColumns && hasData"
|
|
217
213
|
class="export-btn flex items-center justify-center gap-2 px-3 py-2 bg-fv-neutral-100 hover:bg-fv-neutral-200 text-fv-neutral-800 rounded-lg text-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-fv-neutral-400 dark:bg-fv-neutral-800 dark:hover:bg-fv-neutral-700 dark:text-fv-neutral-200"
|
|
218
214
|
@click="exportToCsv"
|
|
219
215
|
>
|
|
220
216
|
<ArrowDownTrayIcon class="w-4 h-4" aria-hidden="true" />
|
|
221
217
|
<span class="hidden sm:inline">{{ $t("global_table_export") }}</span>
|
|
222
218
|
</button>
|
|
223
|
-
|
|
224
|
-
<div class="flex items-center">
|
|
225
|
-
<DefaultInput
|
|
226
|
-
id="perPageSelect"
|
|
227
|
-
v-model="perPage"
|
|
228
|
-
:options="perPageOptions"
|
|
229
|
-
:show-label="false"
|
|
230
|
-
type="select"
|
|
231
|
-
class="w-20"
|
|
232
|
-
/>
|
|
233
|
-
</div>
|
|
234
219
|
</div>
|
|
235
220
|
</div>
|
|
236
221
|
|
|
237
222
|
<!-- Pagination - top -->
|
|
238
|
-
<div v-if="hasPaging" class="mt-3">
|
|
223
|
+
<div v-if="hasPaging" class="mt-3 flex flex-wrap justify-between items-center gap-3">
|
|
239
224
|
<DefaultPaging :id="`${props.id}Pages`" :items="paging" />
|
|
225
|
+
<div class="flex items-center">
|
|
226
|
+
<DefaultInput
|
|
227
|
+
id="perPageSelectTop"
|
|
228
|
+
v-model="perPage"
|
|
229
|
+
:options="perPageOptions"
|
|
230
|
+
:show-label="false"
|
|
231
|
+
type="select"
|
|
232
|
+
class="w-20"
|
|
233
|
+
/>
|
|
234
|
+
</div>
|
|
240
235
|
</div>
|
|
241
236
|
</div>
|
|
242
237
|
|
|
@@ -335,7 +330,19 @@ onUnmounted(() => {
|
|
|
335
330
|
|
|
336
331
|
<!-- Pagination - bottom -->
|
|
337
332
|
<div v-if="hasPaging" class="px-4 py-3 border-t border-fv-neutral-200 dark:border-fv-neutral-800">
|
|
338
|
-
<
|
|
333
|
+
<div class="flex flex-wrap justify-between items-center gap-3">
|
|
334
|
+
<DefaultPaging :id="`${props.id}Pages`" :items="paging" />
|
|
335
|
+
<div class="flex items-center">
|
|
336
|
+
<DefaultInput
|
|
337
|
+
id="perPageSelectBottom"
|
|
338
|
+
v-model="perPage"
|
|
339
|
+
:options="perPageOptions"
|
|
340
|
+
:show-label="false"
|
|
341
|
+
type="select"
|
|
342
|
+
class="w-20"
|
|
343
|
+
/>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
339
346
|
</div>
|
|
340
347
|
</div>
|
|
341
348
|
</template>
|
|
@@ -18,7 +18,7 @@ const props = withDefaults(
|
|
|
18
18
|
showLegend?: boolean
|
|
19
19
|
}>(),
|
|
20
20
|
{
|
|
21
|
-
showLegend:
|
|
21
|
+
showLegend: false,
|
|
22
22
|
hash: '',
|
|
23
23
|
},
|
|
24
24
|
)
|
|
@@ -156,7 +156,7 @@ onMounted(() => {
|
|
|
156
156
|
class="flex flex-col items-center justify-center"
|
|
157
157
|
>
|
|
158
158
|
<div class="paging-container w-full">
|
|
159
|
-
<nav aria-label="Pagination" class="mb-
|
|
159
|
+
<nav aria-label="Pagination" class="mb-1 flex justify-center">
|
|
160
160
|
<ul class="pagination-list">
|
|
161
161
|
<!-- Previous Button -->
|
|
162
162
|
<li v-if="items.page_no >= 2" class="pagination-item md:block">
|
|
@@ -167,13 +167,13 @@ onMounted(() => {
|
|
|
167
167
|
title="Previous page"
|
|
168
168
|
@click="prev()"
|
|
169
169
|
>
|
|
170
|
-
<ChevronLeftIcon class="w-
|
|
170
|
+
<ChevronLeftIcon class="w-4 h-4" aria-hidden="true" />
|
|
171
171
|
<span class="sr-only">{{ $t("previous_paging") }}</span>
|
|
172
172
|
</button>
|
|
173
173
|
</li>
|
|
174
174
|
<li v-else class="pagination-item invisible md:hidden">
|
|
175
175
|
<div class="pagination-placeholder">
|
|
176
|
-
<ChevronLeftIcon class="w-
|
|
176
|
+
<ChevronLeftIcon class="w-4 h-4 invisible" aria-hidden="true" />
|
|
177
177
|
</div>
|
|
178
178
|
</li>
|
|
179
179
|
|
|
@@ -191,7 +191,7 @@ onMounted(() => {
|
|
|
191
191
|
<!-- Ellipsis after first page -->
|
|
192
192
|
<li v-if="items.page_no - 2 > 2" class="pagination-item hidden md:block" aria-hidden="true">
|
|
193
193
|
<div class="pagination-ellipsis">
|
|
194
|
-
<span
|
|
194
|
+
<span>•</span>
|
|
195
195
|
</div>
|
|
196
196
|
</li>
|
|
197
197
|
|
|
@@ -243,7 +243,7 @@ onMounted(() => {
|
|
|
243
243
|
<!-- Ellipsis before last page -->
|
|
244
244
|
<li v-if="items.page_no + 2 < items.page_max - 1" class="pagination-item hidden md:block" aria-hidden="true">
|
|
245
245
|
<div class="pagination-ellipsis">
|
|
246
|
-
<span
|
|
246
|
+
<span>•</span>
|
|
247
247
|
</div>
|
|
248
248
|
</li>
|
|
249
249
|
|
|
@@ -267,26 +267,26 @@ onMounted(() => {
|
|
|
267
267
|
title="Next page"
|
|
268
268
|
@click="next()"
|
|
269
269
|
>
|
|
270
|
-
<ChevronRightIcon class="w-
|
|
270
|
+
<ChevronRightIcon class="w-4 h-4" aria-hidden="true" />
|
|
271
271
|
<span class="sr-only">{{ $t("next_paging") }}</span>
|
|
272
272
|
</button>
|
|
273
273
|
</li>
|
|
274
274
|
<li v-else class="pagination-item invisible md:hidden">
|
|
275
275
|
<div class="pagination-placeholder">
|
|
276
|
-
<ChevronRightIcon class="w-
|
|
276
|
+
<ChevronRightIcon class="w-4 h-4 invisible" aria-hidden="true" />
|
|
277
277
|
</div>
|
|
278
278
|
</li>
|
|
279
279
|
</ul>
|
|
280
280
|
</nav>
|
|
281
281
|
|
|
282
282
|
<!-- Mobile page indication (x of y) -->
|
|
283
|
-
<div class="sm:hidden text-center mb-
|
|
284
|
-
<span class="text-
|
|
283
|
+
<div class="sm:hidden text-center mb-1">
|
|
284
|
+
<span class="text-xs font-medium text-fv-neutral-700 dark:text-fv-neutral-200">
|
|
285
285
|
Page {{ items.page_no }} of {{ items.page_max }}
|
|
286
286
|
</span>
|
|
287
287
|
</div>
|
|
288
288
|
|
|
289
|
-
<!-- Results summary -->
|
|
289
|
+
<!-- Results summary - Now defaults to not showing -->
|
|
290
290
|
<p
|
|
291
291
|
v-if="showLegend"
|
|
292
292
|
class="text-xs text-center text-fv-neutral-700 dark:text-fv-neutral-400"
|
|
@@ -306,7 +306,7 @@ onMounted(() => {
|
|
|
306
306
|
|
|
307
307
|
<style scoped>
|
|
308
308
|
.pagination-list {
|
|
309
|
-
@apply inline-flex items-center justify-center gap-
|
|
309
|
+
@apply inline-flex items-center justify-center gap-0.5 shadow-sm rounded-lg;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
.pagination-item {
|
|
@@ -319,14 +319,14 @@ onMounted(() => {
|
|
|
319
319
|
.pagination-ellipsis,
|
|
320
320
|
.pagination-placeholder {
|
|
321
321
|
@apply flex items-center justify-center;
|
|
322
|
-
min-width:
|
|
323
|
-
height:
|
|
322
|
+
min-width: 1.85rem;
|
|
323
|
+
height: 1.85rem;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
.pagination-link {
|
|
327
|
-
@apply px-
|
|
327
|
+
@apply px-2 py-1 rounded-md text-xs font-medium bg-white border border-fv-neutral-200
|
|
328
328
|
text-fv-neutral-700 hover:bg-fv-neutral-50 hover:text-fv-primary-600
|
|
329
|
-
focus:z-10 focus:outline-none focus:ring-
|
|
329
|
+
focus:z-10 focus:outline-none focus:ring-1 focus:ring-fv-primary-500 focus:ring-offset-1
|
|
330
330
|
transition-colors duration-200
|
|
331
331
|
dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-200
|
|
332
332
|
dark:hover:bg-fv-neutral-700 dark:hover:text-white
|
|
@@ -334,34 +334,34 @@ onMounted(() => {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
.pagination-current {
|
|
337
|
-
@apply px-
|
|
337
|
+
@apply px-2 py-1 rounded-md text-xs font-bold
|
|
338
338
|
bg-fv-primary-100 text-fv-primary-700 border border-fv-primary-300
|
|
339
339
|
dark:bg-fv-primary-900 dark:text-fv-primary-100 dark:border-fv-primary-700;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
.pagination-nav-button {
|
|
343
|
-
@apply p-
|
|
343
|
+
@apply p-1.5 rounded-md text-fv-neutral-600 bg-white border border-fv-neutral-200
|
|
344
344
|
hover:bg-fv-neutral-50 hover:text-fv-primary-600
|
|
345
|
-
focus:z-10 focus:outline-none focus:ring-
|
|
345
|
+
focus:z-10 focus:outline-none focus:ring-1 focus:ring-fv-primary-500 focus:ring-offset-1
|
|
346
346
|
transition-colors duration-200
|
|
347
347
|
dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-300
|
|
348
348
|
dark:hover:bg-fv-neutral-700 dark:hover:text-white;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
.pagination-ellipsis {
|
|
352
|
-
@apply px-
|
|
352
|
+
@apply px-1 py-0.5 text-fv-neutral-500 dark:text-fv-neutral-400;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
@media (max-width: 640px) {
|
|
356
356
|
.pagination-list {
|
|
357
|
-
@apply gap-
|
|
357
|
+
@apply gap-1;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.pagination-link,
|
|
361
361
|
.pagination-button,
|
|
362
362
|
.pagination-current {
|
|
363
|
-
min-width:
|
|
364
|
-
height:
|
|
363
|
+
min-width: 1.65rem;
|
|
364
|
+
height: 1.65rem;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
</style>
|