@drax/crud-vue 3.2.1 → 3.4.0
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 +3 -3
- package/src/components/Crud.vue +11 -0
- package/src/components/CrudExportList.vue +20 -15
- package/src/components/CrudList.vue +5 -3
- package/src/components/CrudListGallery.vue +10 -1
- package/src/components/CrudListTable.vue +9 -1
- package/src/index.ts +1 -1
- /package/src/{EntityCrud.ts → cruds/EntityCrud.ts} +0 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.4.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@drax/common-front": "^3.0.0",
|
|
28
28
|
"@drax/crud-front": "^3.0.0",
|
|
29
29
|
"@drax/crud-share": "^3.2.0",
|
|
30
|
-
"@drax/media-vue": "^3.
|
|
30
|
+
"@drax/media-vue": "^3.4.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"pinia": "^3.0.4",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"vue-tsc": "^3.2.4",
|
|
51
51
|
"vuetify": "^3.11.8"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "437ac93168b1b2431112eedd1d62b3f4001143b6"
|
|
54
54
|
}
|
package/src/components/Crud.vue
CHANGED
|
@@ -64,6 +64,12 @@ const {xs} = useDisplay()
|
|
|
64
64
|
</slot>
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
|
+
|
|
68
|
+
<template v-slot:toolbar-right>
|
|
69
|
+
<slot name="toolbar-right">
|
|
70
|
+
</slot>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
67
73
|
<template v-slot:filters="{filters}" v-if="$slots.filters">
|
|
68
74
|
<slot name="filters" v-bind="{filters}">
|
|
69
75
|
</slot>
|
|
@@ -96,6 +102,11 @@ const {xs} = useDisplay()
|
|
|
96
102
|
</slot>
|
|
97
103
|
</template>
|
|
98
104
|
|
|
105
|
+
<template v-slot:export-table="{ exportFiles }">
|
|
106
|
+
<slot name="export-table" :exportFiles="exportFiles">
|
|
107
|
+
</slot>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
99
110
|
</component>
|
|
100
111
|
</v-card>
|
|
101
112
|
|
|
@@ -28,21 +28,26 @@ const {
|
|
|
28
28
|
<v-alert v-if="exportError" type="error">
|
|
29
29
|
{{ t('error.crud.export') }}
|
|
30
30
|
</v-alert>
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
<template v-else>
|
|
32
|
+
<slot name="export-table" :exportFiles="exportFiles">
|
|
33
|
+
<v-table density="compact">
|
|
34
|
+
<thead>
|
|
35
|
+
<tr>
|
|
36
|
+
<th>Link</th>
|
|
37
|
+
<th>Rows</th>
|
|
38
|
+
<th>Time</th>
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody>
|
|
42
|
+
<tr v-for="exportFile in exportFiles">
|
|
43
|
+
<td><a :href="exportFile.url" target="_blank">{{ exportFile.url }}</a></td>
|
|
44
|
+
<td>{{ exportFile.rowCount }}</td>
|
|
45
|
+
<td>{{ exportFile.time }}</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</tbody>
|
|
48
|
+
</v-table>
|
|
49
|
+
</slot>
|
|
50
|
+
</template>
|
|
46
51
|
</v-card-text>
|
|
47
52
|
|
|
48
53
|
<v-card-actions>
|
|
@@ -126,9 +126,11 @@ defineEmits(['import', 'export', 'create', 'update', 'delete', 'view', 'edit'])
|
|
|
126
126
|
|
|
127
127
|
</v-toolbar>
|
|
128
128
|
|
|
129
|
-
<crud-export-list
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
<crud-export-list :entity="entity">
|
|
130
|
+
<template #export-table="{ exportFiles }">
|
|
131
|
+
<slot name="export-table" :exportFiles="exportFiles" />
|
|
132
|
+
</template>
|
|
133
|
+
</crud-export-list>
|
|
132
134
|
|
|
133
135
|
<v-card variant="flat">
|
|
134
136
|
<v-card-text v-if="entity.searchEnable">
|
|
@@ -61,6 +61,7 @@ onMounted(() => {
|
|
|
61
61
|
<template v-slot:extension>
|
|
62
62
|
|
|
63
63
|
<v-row justify="end" class="px-2 border-t-sm" >
|
|
64
|
+
|
|
64
65
|
<slot name="toolbar">
|
|
65
66
|
</slot>
|
|
66
67
|
|
|
@@ -92,6 +93,10 @@ onMounted(() => {
|
|
|
92
93
|
:entity="entity"
|
|
93
94
|
@click="$emit('create')"
|
|
94
95
|
/>
|
|
96
|
+
|
|
97
|
+
<slot name="toolbar-right">
|
|
98
|
+
|
|
99
|
+
</slot>
|
|
95
100
|
</v-row>
|
|
96
101
|
|
|
97
102
|
</template>
|
|
@@ -101,7 +106,11 @@ onMounted(() => {
|
|
|
101
106
|
|
|
102
107
|
<crud-export-list
|
|
103
108
|
:entity="entity"
|
|
104
|
-
|
|
109
|
+
>
|
|
110
|
+
<template #export-table="{ exportFiles }">
|
|
111
|
+
<slot name="export-table" :exportFiles="exportFiles" />
|
|
112
|
+
</template>
|
|
113
|
+
</crud-export-list>
|
|
105
114
|
|
|
106
115
|
<v-card variant="flat">
|
|
107
116
|
<v-card-text v-if="entity.searchEnable">
|
|
@@ -124,11 +124,19 @@ defineEmits(['import', 'export', 'create', 'update', 'delete', 'view', 'edit'])
|
|
|
124
124
|
@click="$emit('create')"
|
|
125
125
|
/>
|
|
126
126
|
|
|
127
|
+
<slot name="toolbar-right">
|
|
128
|
+
|
|
129
|
+
</slot>
|
|
130
|
+
|
|
127
131
|
</v-toolbar>
|
|
128
132
|
|
|
129
133
|
<crud-export-list
|
|
130
134
|
:entity="entity"
|
|
131
|
-
|
|
135
|
+
>
|
|
136
|
+
<template #export-table="{ exportFiles }">
|
|
137
|
+
<slot name="export-table" :exportFiles="exportFiles" />
|
|
138
|
+
</template>
|
|
139
|
+
</crud-export-list>
|
|
132
140
|
|
|
133
141
|
<v-card variant="flat">
|
|
134
142
|
<v-card-text v-if="entity.searchEnable">
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {useCrud} from "./composables/UseCrud";
|
|
|
17
17
|
import {useFilterIcon} from "./composables/UseFilterIcon";
|
|
18
18
|
import {useFormUtils} from "./composables/UseFormUtils";
|
|
19
19
|
import {useInputErrorI18n} from "./composables/UseInputErrorI18n";
|
|
20
|
-
import {EntityCrud} from "./EntityCrud";
|
|
20
|
+
import {EntityCrud} from "./cruds/EntityCrud";
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
export {
|
|
File without changes
|