atom-nuxt 1.4.3 → 1.4.5
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/module.json
CHANGED
|
@@ -193,41 +193,7 @@ const displayForChip = (item) => {
|
|
|
193
193
|
></v-autocomplete>
|
|
194
194
|
</template>
|
|
195
195
|
<template v-else-if="filter.type === 'multiOption'">
|
|
196
|
-
<div v-if="filter.options.length < 10" class="pa-3 rounded border bg-white" style="border-color: #999!important;">
|
|
197
|
-
<div class="d-flex justify-space-between border-b pb-3 align-center mb-2" style="border-color: #999!important;">
|
|
198
|
-
<span class="text-grey-darken-2"><small>{{ filter.label }}</small></span>
|
|
199
|
-
<v-chip size="x-small" v-if="selectedValue.length === 0">Showing all</v-chip>
|
|
200
|
-
<v-chip size="x-small" color="error" @click="selectedValue = []"
|
|
201
|
-
v-if="selectedValue.length > 0">
|
|
202
|
-
<span class="mr-1">{{ selectedValue.length }} of {{ filter.options.length }}</span>
|
|
203
|
-
<v-icon size="14">mdi-close</v-icon>
|
|
204
|
-
</v-chip>
|
|
205
|
-
</div>
|
|
206
|
-
<v-chip-group
|
|
207
|
-
dense
|
|
208
|
-
:id="filter.key"
|
|
209
|
-
:column="true"
|
|
210
|
-
:disabled="disabled"
|
|
211
|
-
:label="filter.label"
|
|
212
|
-
:clearable="true"
|
|
213
|
-
:multiple="true"
|
|
214
|
-
clear-icon="mdi-backspace"
|
|
215
|
-
v-model="selectedValue"
|
|
216
|
-
:hint="filter.description"
|
|
217
|
-
>
|
|
218
|
-
<v-chip
|
|
219
|
-
v-for="(option, index) in filter.options"
|
|
220
|
-
:key="filter.key+'-'+index"
|
|
221
|
-
size="small"
|
|
222
|
-
color="success"
|
|
223
|
-
:value="option.value"
|
|
224
|
-
>
|
|
225
|
-
{{ option.label }}
|
|
226
|
-
</v-chip>
|
|
227
|
-
</v-chip-group>
|
|
228
|
-
</div>
|
|
229
196
|
<v-autocomplete
|
|
230
|
-
v-else
|
|
231
197
|
dense
|
|
232
198
|
:id="filter.key"
|
|
233
199
|
:disabled="disabled"
|
|
@@ -246,6 +246,7 @@ const dialogOpen = computed({
|
|
|
246
246
|
});
|
|
247
247
|
const page = computed(() => props.loaderKey ? parseQuery(route.query[props.loaderKey])?.page ?? 1 : route.query.page ?? 1);
|
|
248
248
|
const filterValues = props.loaderKey ? ref({ ...props.customFilters, ...parseQuery(route.query[props.loaderKey]) }) : ref({ ...props.customFilters, ...route.query });
|
|
249
|
+
const isInitialLoad = ref(true);
|
|
249
250
|
const onQueryChange = (page2) => {
|
|
250
251
|
console.error("QUERY CHANGED");
|
|
251
252
|
const newQuery = {};
|
|
@@ -289,6 +290,11 @@ watch(() => filterValues, () => {
|
|
|
289
290
|
console.error("ROUTE CHANGED");
|
|
290
291
|
debouncedGet();
|
|
291
292
|
}, { deep: true });
|
|
293
|
+
watch(listPending, (isPending) => {
|
|
294
|
+
if (!isPending && isInitialLoad.value) {
|
|
295
|
+
isInitialLoad.value = false;
|
|
296
|
+
}
|
|
297
|
+
});
|
|
292
298
|
const debouncedGet = useDebounceFn(() => {
|
|
293
299
|
console.error("DEBOUNCED GET");
|
|
294
300
|
getItems(Number.parseInt(page.value) ?? null, null, filterValues.value);
|
|
@@ -464,45 +470,61 @@ const exportAction = async () => {
|
|
|
464
470
|
>
|
|
465
471
|
</slot>
|
|
466
472
|
<div :class="contentClasses">
|
|
467
|
-
<v-progress-linear :active="listPending" indeterminate color="primary"></v-progress-linear>
|
|
473
|
+
<v-progress-linear :active="listPending && !isInitialLoad" indeterminate color="primary"></v-progress-linear>
|
|
468
474
|
<v-row>
|
|
469
|
-
<v-col v-if="!hideFilters && filters.length > 0" cols="12" md="3">
|
|
475
|
+
<v-col v-if="!hideFilters && (filters.length > 0 || isInitialLoad)" cols="12" md="3">
|
|
470
476
|
<div>
|
|
471
|
-
<
|
|
472
|
-
<
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
<div v-if="isInitialLoad">
|
|
478
|
+
<v-skeleton-loader
|
|
479
|
+
type="heading, list-item, list-item, list-item"
|
|
480
|
+
class="mb-3"
|
|
481
|
+
></v-skeleton-loader>
|
|
482
|
+
</div>
|
|
483
|
+
<template v-else>
|
|
484
|
+
<slot name="filtersTitle">
|
|
485
|
+
<h3 v-if="filtersTitle" class="mb-2">{{ filtersTitle }}</h3>
|
|
486
|
+
</slot>
|
|
487
|
+
<slot name="filters" :filters="filters">
|
|
488
|
+
<div :class="filterClasses">
|
|
489
|
+
<crud-filter-list v-model="filterValues" :filters="filters"></crud-filter-list>
|
|
490
|
+
</div>
|
|
491
|
+
</slot>
|
|
492
|
+
</template>
|
|
479
493
|
</div>
|
|
480
494
|
</v-col>
|
|
481
|
-
<v-col cols="12" :md="hideFilters || filters.length === 0 ? '12' : '9'">
|
|
495
|
+
<v-col cols="12" :md="hideFilters || (filters.length === 0 && !isInitialLoad) ? '12' : '9'">
|
|
482
496
|
<div class="">
|
|
483
|
-
<
|
|
484
|
-
<
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
{{ noResultsText }}
|
|
489
|
-
</v-alert>
|
|
490
|
-
</slot>
|
|
491
|
-
<slot v-if="hasListErrors" name="error" :errors="listErrors">
|
|
492
|
-
<crud-error-display :errors="listErrors"></crud-error-display>
|
|
493
|
-
</slot>
|
|
494
|
-
<div :class="resultClasses">
|
|
495
|
-
<slot
|
|
496
|
-
v-if="totalItems > 0"
|
|
497
|
-
:items="items"
|
|
498
|
-
:pending="listPending"
|
|
499
|
-
:update-action="updateForm"
|
|
500
|
-
:view-action="viewForm"
|
|
501
|
-
:delete-action="deleteForm"
|
|
502
|
-
:form-pending="formPending"
|
|
503
|
-
>
|
|
504
|
-
</slot>
|
|
497
|
+
<div v-if="isInitialLoad">
|
|
498
|
+
<v-skeleton-loader
|
|
499
|
+
type="heading, card, card, card"
|
|
500
|
+
class="mb-3"
|
|
501
|
+
></v-skeleton-loader>
|
|
505
502
|
</div>
|
|
503
|
+
<template v-else>
|
|
504
|
+
<slot name="resultsTitle">
|
|
505
|
+
<h3 v-if="resultsTitle" class="mb-2">{{ resultsTitle }}</h3>
|
|
506
|
+
</slot>
|
|
507
|
+
<slot v-if="!listPending && totalItems === 0 && !hasListErrors" name="empty" :create-action="createForm">
|
|
508
|
+
<v-alert icon="mdi-playlist-remove" type="info" class="pa-5">
|
|
509
|
+
{{ noResultsText }}
|
|
510
|
+
</v-alert>
|
|
511
|
+
</slot>
|
|
512
|
+
<slot v-if="hasListErrors" name="error" :errors="listErrors">
|
|
513
|
+
<crud-error-display :errors="listErrors"></crud-error-display>
|
|
514
|
+
</slot>
|
|
515
|
+
<div :class="resultClasses">
|
|
516
|
+
<slot
|
|
517
|
+
v-if="totalItems > 0"
|
|
518
|
+
:items="items"
|
|
519
|
+
:pending="listPending"
|
|
520
|
+
:update-action="updateForm"
|
|
521
|
+
:view-action="viewForm"
|
|
522
|
+
:delete-action="deleteForm"
|
|
523
|
+
:form-pending="formPending"
|
|
524
|
+
>
|
|
525
|
+
</slot>
|
|
526
|
+
</div>
|
|
527
|
+
</template>
|
|
506
528
|
</div>
|
|
507
529
|
<div v-if="totalItems > 0 && totalPages > 1" class="pa-3">
|
|
508
530
|
<span class="d-none d-md-block pa-3">Page {{ currentPage }} of {{ totalPages }} pages with {{ totalItems }} items</span>
|