grantthomas-nuxt 1.0.22 → 1.0.23
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 +1 -1
- package/dist/runtime/components/CrudCountLoader.d.vue.ts +1 -1
- package/dist/runtime/components/CrudCountLoader.vue.d.ts +1 -1
- package/dist/runtime/components/CrudListLoader.d.vue.ts +1 -1
- package/dist/runtime/components/CrudListLoader.vue.d.ts +1 -1
- package/dist/runtime/components/CrudPaginatedLoader.d.vue.ts +8 -0
- package/dist/runtime/components/CrudPaginatedLoader.vue +32 -4
- package/dist/runtime/components/CrudPaginatedLoader.vue.d.ts +8 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -4,8 +4,8 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
-
debounced: boolean;
|
|
8
7
|
path: string;
|
|
8
|
+
debounced: boolean;
|
|
9
9
|
await: boolean;
|
|
10
10
|
listeners: unknown[];
|
|
11
11
|
customFilters?: Record<string, any> | undefined;
|
|
@@ -4,8 +4,8 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
-
debounced: boolean;
|
|
8
7
|
path: string;
|
|
8
|
+
debounced: boolean;
|
|
9
9
|
await: boolean;
|
|
10
10
|
listeners: unknown[];
|
|
11
11
|
customFilters?: Record<string, any> | undefined;
|
|
@@ -4,10 +4,10 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
path: string;
|
|
7
8
|
page: number;
|
|
8
9
|
debounced: boolean;
|
|
9
10
|
disableNoResults: boolean;
|
|
10
|
-
path: string;
|
|
11
11
|
perPage: number;
|
|
12
12
|
await: boolean;
|
|
13
13
|
listeners: unknown[];
|
|
@@ -4,10 +4,10 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
4
4
|
$slots: S;
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
path: string;
|
|
7
8
|
page: number;
|
|
8
9
|
debounced: boolean;
|
|
9
10
|
disableNoResults: boolean;
|
|
10
|
-
path: string;
|
|
11
11
|
perPage: number;
|
|
12
12
|
await: boolean;
|
|
13
13
|
listeners: unknown[];
|
|
@@ -15,6 +15,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
|
15
15
|
deleteTitle: string;
|
|
16
16
|
allowCreate: boolean;
|
|
17
17
|
hideFilters: boolean;
|
|
18
|
+
hideActionsOnSave: boolean;
|
|
19
|
+
closeOnSave: boolean;
|
|
18
20
|
fullScreenDialog: boolean;
|
|
19
21
|
contentClasses: string;
|
|
20
22
|
showPerPageSelector: boolean;
|
|
@@ -45,6 +47,7 @@ type __VLS_Slots = {
|
|
|
45
47
|
totalItems: any;
|
|
46
48
|
currentPage: any;
|
|
47
49
|
totalPages: any;
|
|
50
|
+
closeAction: any;
|
|
48
51
|
}) => any) | undefined;
|
|
49
52
|
} & {
|
|
50
53
|
filters?: ((props: {
|
|
@@ -68,12 +71,17 @@ type __VLS_Slots = {
|
|
|
68
71
|
totalItems: any;
|
|
69
72
|
currentPage: any;
|
|
70
73
|
totalPages: any;
|
|
74
|
+
closeAction: any;
|
|
71
75
|
}) => any) | undefined;
|
|
72
76
|
} & {
|
|
73
77
|
form?: ((props: {
|
|
74
78
|
action: any;
|
|
75
79
|
item: any;
|
|
80
|
+
closeAction: any;
|
|
76
81
|
originalItem: any;
|
|
77
82
|
errors: any;
|
|
83
|
+
totalItems: any;
|
|
84
|
+
currentPage: any;
|
|
85
|
+
totalPages: any;
|
|
78
86
|
}) => any) | undefined;
|
|
79
87
|
};
|
|
@@ -11,7 +11,18 @@ import CrudFormDialog from "./CrudFormDialog.vue";
|
|
|
11
11
|
import CrudErrorDisplay from "./CrudErrorDisplay.vue";
|
|
12
12
|
const { parseQuery, stringifyQuery, cloneDeep } = useCrudConverters();
|
|
13
13
|
const props = defineProps({
|
|
14
|
+
hideActionsOnSave: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: false,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
closeOnSave: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: false,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
14
24
|
fullScreenDialog: {
|
|
25
|
+
type: Boolean,
|
|
15
26
|
type: Boolean,
|
|
16
27
|
required: false,
|
|
17
28
|
default: false
|
|
@@ -165,6 +176,7 @@ perPage.value = props.perPage;
|
|
|
165
176
|
const route = useRoute();
|
|
166
177
|
const router = useRouter();
|
|
167
178
|
const previousRoute = usePreviousRoute();
|
|
179
|
+
const hideActions = ref(false);
|
|
168
180
|
const action = computed(() => route.query[(props.loaderKey ?? "") + "action"]);
|
|
169
181
|
const actionId = computed(() => route.query[(props.loaderKey ?? "") + "actionId"]);
|
|
170
182
|
const dialogOpen = computed({
|
|
@@ -308,7 +320,12 @@ const saveAction = async () => {
|
|
|
308
320
|
const savedPath = props.path;
|
|
309
321
|
const savedAction = action.value;
|
|
310
322
|
const savedItem = item.value;
|
|
311
|
-
|
|
323
|
+
if (props.closeOnSave) {
|
|
324
|
+
dialogOpen.value = false;
|
|
325
|
+
}
|
|
326
|
+
if (props.hideActionsOnSave) {
|
|
327
|
+
hideActions.value = true;
|
|
328
|
+
}
|
|
312
329
|
await getItems(Number.parseInt(page.value) ?? null, null, filterValues.value);
|
|
313
330
|
notify(savedPath + ":" + savedAction, savedItem);
|
|
314
331
|
}
|
|
@@ -350,6 +367,9 @@ const exportAction = async () => {
|
|
|
350
367
|
window.open(exportUrl.value, "_blank");
|
|
351
368
|
}
|
|
352
369
|
};
|
|
370
|
+
const closeAction = () => {
|
|
371
|
+
dialogOpen.value = false;
|
|
372
|
+
};
|
|
353
373
|
</script>
|
|
354
374
|
|
|
355
375
|
<template>
|
|
@@ -368,6 +388,7 @@ const exportAction = async () => {
|
|
|
368
388
|
:total-items="totalItems"
|
|
369
389
|
:current-page="currentPage"
|
|
370
390
|
:total-pages="totalPages"
|
|
391
|
+
:close-action="closeAction"
|
|
371
392
|
>
|
|
372
393
|
</slot>
|
|
373
394
|
<div :class="contentClasses">
|
|
@@ -400,6 +421,7 @@ const exportAction = async () => {
|
|
|
400
421
|
:total-items="totalItems"
|
|
401
422
|
:current-page="currentPage"
|
|
402
423
|
:total-pages="totalPages"
|
|
424
|
+
:close-action="closeAction"
|
|
403
425
|
>
|
|
404
426
|
</slot>
|
|
405
427
|
</div>
|
|
@@ -432,6 +454,7 @@ const exportAction = async () => {
|
|
|
432
454
|
<crud-form-dialog
|
|
433
455
|
v-model:dialog="dialogOpen"
|
|
434
456
|
v-model="item"
|
|
457
|
+
:hide-actions="hideActions"
|
|
435
458
|
:original-item="originalItem"
|
|
436
459
|
:action="action"
|
|
437
460
|
:form-errors="formErrors"
|
|
@@ -445,11 +468,16 @@ const exportAction = async () => {
|
|
|
445
468
|
:full-screen="fullScreenDialog"
|
|
446
469
|
>
|
|
447
470
|
<slot
|
|
448
|
-
name="form"
|
|
471
|
+
name="form"
|
|
472
|
+
:action="action"
|
|
449
473
|
:item="item"
|
|
474
|
+
:close-action="closeAction"
|
|
450
475
|
:original-item="originalItem"
|
|
451
|
-
:errors="formErrors"
|
|
452
|
-
|
|
476
|
+
:errors="formErrors"
|
|
477
|
+
:total-items="totalItems"
|
|
478
|
+
:current-page="currentPage"
|
|
479
|
+
:total-pages="totalPages"
|
|
480
|
+
>
|
|
453
481
|
</slot>
|
|
454
482
|
</crud-form-dialog>
|
|
455
483
|
|
|
@@ -15,6 +15,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
|
15
15
|
deleteTitle: string;
|
|
16
16
|
allowCreate: boolean;
|
|
17
17
|
hideFilters: boolean;
|
|
18
|
+
hideActionsOnSave: boolean;
|
|
19
|
+
closeOnSave: boolean;
|
|
18
20
|
fullScreenDialog: boolean;
|
|
19
21
|
contentClasses: string;
|
|
20
22
|
showPerPageSelector: boolean;
|
|
@@ -45,6 +47,7 @@ type __VLS_Slots = {
|
|
|
45
47
|
totalItems: any;
|
|
46
48
|
currentPage: any;
|
|
47
49
|
totalPages: any;
|
|
50
|
+
closeAction: any;
|
|
48
51
|
}) => any) | undefined;
|
|
49
52
|
} & {
|
|
50
53
|
filters?: ((props: {
|
|
@@ -68,12 +71,17 @@ type __VLS_Slots = {
|
|
|
68
71
|
totalItems: any;
|
|
69
72
|
currentPage: any;
|
|
70
73
|
totalPages: any;
|
|
74
|
+
closeAction: any;
|
|
71
75
|
}) => any) | undefined;
|
|
72
76
|
} & {
|
|
73
77
|
form?: ((props: {
|
|
74
78
|
action: any;
|
|
75
79
|
item: any;
|
|
80
|
+
closeAction: any;
|
|
76
81
|
originalItem: any;
|
|
77
82
|
errors: any;
|
|
83
|
+
totalItems: any;
|
|
84
|
+
currentPage: any;
|
|
85
|
+
totalPages: any;
|
|
78
86
|
}) => any) | undefined;
|
|
79
87
|
};
|