adminforth 2.27.0-next.18 → 2.27.0-next.19

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.
@@ -85,14 +85,52 @@
85
85
  :adminUser="coreStore.adminUser"
86
86
  />
87
87
 
88
- <div v-if="loading" role="status" class="max-w-sm animate-pulse">
89
- <div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div>
90
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px] mb-2.5"></div>
91
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div>
92
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[330px] mb-2.5"></div>
93
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[300px] mb-2.5"></div>
94
- <div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"></div>
95
- <span class="sr-only">{{ $t('Loading...') }}</span>
88
+ <div
89
+ v-if="loading"
90
+ role="status"
91
+ class="animate-pulse overflow-x-auto shadow-resourseFormShadow dark:shadow-darkResourseFormShadow"
92
+ >
93
+ <div
94
+ v-if="groups && groups.length > 0"
95
+ class="text-md font-semibold px-6 py-3 flex flex-1 items-center bg-lightShowTableHeadingBackground dark:bg-darkShowTableHeadingBackground dark:text-darkShowTableHeadingText rounded-t-lg border-b border-lightShowTableBodyBorder dark:border-darkShowTableBodyBorder"
96
+ >
97
+ <div class="h-4 bg-gray-300 dark:bg-gray-600 rounded-full w-32"></div>
98
+ </div>
99
+
100
+ <table class="w-full text-sm text-left table-fixed">
101
+ <thead class="bg-lightShowTableUnderHeadingBackground dark:bg-darkShowTableUnderHeadingBackground block md:table-row-group">
102
+ <tr>
103
+ <th scope="col" class="px-6 py-3 text-xs uppercase hidden md:w-52 md:table-cell text-lightShowTableUnderHeadingText dark:text-darkShowTableUnderHeadingText">
104
+ {{ $t('Field') }}
105
+ </th>
106
+ <th scope="col" class="px-6 py-3 text-xs uppercase hidden md:table-cell text-lightShowTableUnderHeadingText dark:text-darkShowTableUnderHeadingText">
107
+ {{ $t('Value') }}
108
+ </th>
109
+ </tr>
110
+ </thead>
111
+
112
+ <tbody>
113
+ <tr
114
+ v-for="i in skeletonRowsCount"
115
+ :key="i"
116
+ class="bg-lightShowTablesBodyBackground border-t border-lightShowTableBodyBorder dark:bg-darkShowTablesBodyBackground dark:border-darkShowTableBodyBorder block md:table-row"
117
+ >
118
+ <td class="px-6 py-[15.5px] relative block md:table-cell pb-0 md:pb-[15.5px]">
119
+ <div class="md:absolute md:inset-0 flex items-center px-6 py-[15.5px]">
120
+ <div class="h-2.5 bg-gray-200 dark:bg-gray-700 rounded-full w-24"></div>
121
+ </div>
122
+ </td>
123
+
124
+ <td class="px-6 py-[15.5px] whitespace-pre-wrap block md:table-cell">
125
+ <div class="flex items-center h-full min-h-[21px]">
126
+ <div class="h-2.5 bg-gray-200 dark:bg-gray-700 rounded-full w-full max-w-[280px]"></div>
127
+ </div>
128
+ </td>
129
+ </tr>
130
+ </tbody>
131
+ </table>
132
+
133
+ <span class="sr-only">{{ $t('Loading...') }}</span>
96
134
  </div>
97
135
  <div
98
136
  v-else-if="coreStore.record"
@@ -177,6 +215,18 @@ const customActions = computed(() => {
177
215
  return coreStore.resource?.options?.actions?.filter((a: any) => a.showIn?.showThreeDotsMenu) || [];
178
216
  });
179
217
 
218
+ const skeletonRowsCount = computed(() => {
219
+ const allCols = coreStore.resource?.columns || [];
220
+
221
+ const isEnabledInConfig = (col: any) => {
222
+ return col.showIn?.list !== false;
223
+ };
224
+
225
+ const finalCount = allCols.filter(isEnabledInConfig).length;
226
+
227
+ return finalCount > 0 ? finalCount : 10;
228
+ });
229
+
180
230
  onMounted(async () => {
181
231
  loading.value = true;
182
232
  await coreStore.fetchResourceFull({
@@ -216,7 +266,7 @@ const groups = computed(() => {
216
266
  });
217
267
 
218
268
  const allColumns = computed(() => {
219
- return coreStore.resource?.columns.filter(col => col.showIn?.show);
269
+ return coreStore.resource?.columns?.filter(col => col.showIn?.show);
220
270
  });
221
271
 
222
272
  const otherColumns = computed(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.18",
3
+ "version": "2.27.0-next.19",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",