adminforth 2.27.0-next.7 → 2.27.0-next.8

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.
@@ -47,10 +47,10 @@
47
47
  <div class="wrapper">
48
48
  <component
49
49
  :is="(action.customComponent && getCustomComponent(formatComponent(action.customComponent))) || CallActionWrapper"
50
- :meta="formatComponent(action.customComponent as AdminForthComponentDeclarationFull).meta || {}"
50
+ :meta="formatComponent(action.customComponent).meta"
51
51
  @callAction="(payload? : Object) => handleActionClick(action, payload)"
52
52
  >
53
- <a @click.prevent class="block px-4 py-2 hover:text-lightThreeDotsMenuBodyTextHover hover:bg-lightThreeDotsMenuBodyBackgroundHover dark:hover:bg-darkThreeDotsMenuBodyBackgroundHover dark:hover:text-darkThreeDotsMenuBodyTextHover">
53
+ <a @click.prevent class="block">
54
54
  <div class="flex items-center gap-2">
55
55
  <component
56
56
  v-if="action.icon"
@@ -196,7 +196,10 @@ onUnmounted(() => {
196
196
 
197
197
  <style lang="scss" scoped>
198
198
  .wrapper > * {
199
- @apply px-4 py-2;
199
+ @apply px-4 py-2
200
+ hover:text-lightThreeDotsMenuBodyTextHover hover:bg-lightThreeDotsMenuBodyBackgroundHover
201
+ dark:hover:bg-darkThreeDotsMenuBodyBackgroundHover dark:hover:text-darkThreeDotsMenuBodyTextHover
202
+ cursor-pointer;
200
203
  }
201
204
  </style>
202
205
 
@@ -101,11 +101,13 @@ export async function callAdminForthApi(
101
101
  }
102
102
  }
103
103
 
104
- export function formatComponent(component: AdminForthComponentDeclaration): AdminForthComponentDeclarationFull {
104
+ export function formatComponent(component: AdminForthComponentDeclaration | undefined): AdminForthComponentDeclarationFull {
105
105
  if (typeof component === 'string') {
106
106
  return { file: component, meta: {} };
107
- } else {
107
+ } else if (typeof component === 'object') {
108
108
  return { file: component.file, meta: component.meta };
109
+ } else {
110
+ return { file: '', meta: {} };
109
111
  }
110
112
  }
111
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.7",
3
+ "version": "2.27.0-next.8",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",