adminforth 1.1.46 → 1.1.48
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/modules/codeInjector.js +13 -22
- package/dist/modules/styleGenerator.js +39 -0
- package/dist/modules/styles.js +84 -53
- package/dist/modules/utils.js +44 -0
- package/dist/plugins/AccessControl/index.js +66 -0
- package/dist/plugins/AccessControl/types.js +1 -0
- package/dist/spa/index.html +2 -2
- package/dist/spa/package-lock.json +4 -17
- package/dist/spa/package.json +1 -2
- package/dist/spa/public/favicon.ico +0 -0
- package/dist/spa/spa/index.html +1 -1
- package/dist/spa/spa/public/favicon.ico +0 -0
- package/dist/spa/spa/src/App.vue +16 -16
- package/dist/spa/spa/src/components/MenuLink.vue +3 -3
- package/dist/spa/spa/src/components/ResourceForm.vue +3 -3
- package/dist/spa/spa/src/components/ResourceListTable.vue +7 -64
- package/dist/spa/spa/src/components/SkeleteLoader.vue +23 -0
- package/dist/spa/spa/src/views/ListView.vue +1 -1
- package/dist/spa/spa/src/views/ShowView.vue +3 -3
- package/dist/spa/src/App.vue +45 -125
- package/dist/spa/src/assets/logo.svg +1 -19
- package/dist/spa/src/components/AcceptModal.vue +9 -2
- package/dist/spa/src/components/BreadcrumbsWithButtons.vue +1 -1
- package/dist/spa/src/components/CustomDatePicker.vue +3 -16
- package/dist/spa/src/components/CustomDateRangePicker.vue +2 -11
- package/dist/spa/src/components/Dropdown.vue +1 -6
- package/dist/spa/src/components/Filters.vue +19 -40
- package/dist/spa/src/components/ResourceForm.vue +24 -26
- package/dist/spa/src/components/ValueRenderer.vue +8 -14
- package/dist/spa/src/main.ts +1 -1
- package/dist/spa/src/router/index.ts +20 -30
- package/dist/spa/src/stores/core.ts +31 -48
- package/dist/spa/src/stores/modal.ts +3 -13
- package/dist/spa/src/utils.ts +7 -62
- package/dist/spa/src/views/CreateView.vue +15 -67
- package/dist/spa/src/views/EditView.vue +11 -45
- package/dist/spa/src/views/ListView.vue +366 -82
- package/dist/spa/src/views/LoginView.vue +4 -16
- package/dist/spa/src/views/ShowView.vue +21 -105
- package/dist/spa/tailwind.config.js +1 -1
- package/dist/spa/vite.config.ts +0 -6
- package/dist/types.js +30 -0
- package/modules/codeInjector.ts +10 -18
- package/modules/styleGenerator.ts +45 -0
- package/modules/styles.ts +95 -48
- package/modules/utils.ts +48 -0
- package/package.json +1 -1
- package/spa/index.html +1 -1
- package/spa/src/App.vue +16 -16
- package/spa/src/components/MenuLink.vue +3 -3
- package/spa/src/components/ResourceForm.vue +3 -3
- package/spa/src/components/ResourceListTable.vue +7 -64
- package/spa/src/components/SkeleteLoader.vue +23 -0
- package/spa/src/views/ListView.vue +1 -1
- package/spa/src/views/ShowView.vue +3 -3
- package/types/AdminForthConfig.ts +9 -7
- package/dist/spa/src/components/ResourceListTable.vue +0 -419
- package/dist/spa/src/components/Toast.vue +0 -66
- package/dist/spa/src/composables/useFrontendApi.ts +0 -26
- package/dist/spa/src/composables/useStores.ts +0 -113
- package/dist/spa/src/spa_types/core.ts +0 -51
- package/dist/spa/src/stores/filters.ts +0 -22
- package/dist/spa/src/stores/toast.ts +0 -15
- package/dist/spa/src/stores/user.ts +0 -54
- /package/dist/spa/{public/assets → spa/public}/favicon.png +0 -0
package/spa/src/App.vue
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav
|
|
3
3
|
v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady"
|
|
4
|
-
class="fixed h-14 top-0 z-20 w-full border-b shadow-sm bg-
|
|
4
|
+
class="fixed h-14 top-0 z-20 w-full border-b shadow-sm bg-lightNavbar shadow-headerShadow dark:bg-darkNavbar dark:border-darkSidebarDevider">
|
|
5
5
|
<div class="px-3 py-3 lg:px-5 lg:pl-3">
|
|
6
6
|
<div class="flex items-center justify-between">
|
|
7
7
|
<div class="flex items-center justify-start rtl:justify-end">
|
|
8
8
|
<button @click="sideBarOpen = !sideBarOpen"
|
|
9
|
-
type="button" class="inline-flex items-center p-2 text-sm rounded-lg sm:hidden hover:bg-
|
|
9
|
+
type="button" class="inline-flex items-center p-2 text-sm rounded-lg sm:hidden hover:bg-lightSidebarItemHover focus:outline-none focus:ring-2 focus:ring-lightSidebarDevider dark:text-darkSidebarIcons dark:hover:bg-darkSidebarHover dark:focus:ring-lightSidebarDevider">
|
|
10
10
|
<span class="sr-only">Open sidebar</span>
|
|
11
11
|
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<path clip-rule="evenodd" fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
|
|
@@ -17,25 +17,25 @@
|
|
|
17
17
|
<div class="flex items-center">
|
|
18
18
|
<div class="flex items-center ms-3 ">
|
|
19
19
|
<div>
|
|
20
|
-
<button type="button" class="flex text-sm bg-
|
|
20
|
+
<button type="button" class="flex text-sm bg- rounded-full focus:ring-4 focus:ring-lightSidebarDevider dark:focus:ring-darkSidebarDevider dark:bg-" aria-expanded="false" data-dropdown-toggle="dropdown-user">
|
|
21
21
|
<span class="sr-only">Open user menu</span>
|
|
22
|
-
<svg class="w-8 h-8 text-
|
|
22
|
+
<svg class="w-8 h-8 text-lightSidebarIcons dark:text-darkSidebarIcons" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
23
23
|
<path fill-rule="evenodd" d="M12 20a7.966 7.966 0 0 1-5.002-1.756l.002.001v-.683c0-1.794 1.492-3.25 3.333-3.25h3.334c1.84 0 3.333 1.456 3.333 3.25v.683A7.966 7.966 0 0 1 12 20ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.5-4.44 9.963-9.932 10h-.138C6.438 21.962 2 17.5 2 12Zm10-5c-1.84 0-3.333 1.455-3.333 3.25S10.159 13.5 12 13.5c1.84 0 3.333-1.455 3.333-3.25S13.841 7 12 7Z" clip-rule="evenodd"/>
|
|
24
24
|
</svg>
|
|
25
25
|
</button>
|
|
26
26
|
</div>
|
|
27
|
-
<div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:shadow-black dark:bg-
|
|
27
|
+
<div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:shadow-black dark:bg-darkSidebar dark:divide-darkSidebarDevider dark:shadow-black" id="dropdown-user">
|
|
28
28
|
<div class="px-4 py-3" role="none">
|
|
29
|
-
<p class="text-sm text-gray-900 dark:text-
|
|
29
|
+
<p class="text-sm text-gray-900 dark:text-darkNavbarText" role="none" v-if="coreStore.userFullname">
|
|
30
30
|
{{ coreStore.userFullname }}
|
|
31
31
|
</p>
|
|
32
|
-
<p class="text-sm font-medium text-gray-900 truncate dark:text-
|
|
32
|
+
<p class="text-sm font-medium text-gray-900 truncate dark:text-darkSidebarText" role="none">
|
|
33
33
|
{{ coreStore.username }}
|
|
34
34
|
</p>
|
|
35
35
|
</div>
|
|
36
36
|
<ul class="py-1" role="none">
|
|
37
37
|
<li>
|
|
38
|
-
<span @click="toggleTheme" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-
|
|
38
|
+
<span @click="toggleTheme" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-lightHtml dark:text-darkSidebarTextHover dark:hover:bg-darkHtml dark:hover:text-darkSidebarTextActive" role="menuitem">
|
|
39
39
|
{{ theme === 'dark' ? 'Light' : 'Dark' }}
|
|
40
40
|
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="theme !== 'dark'" />
|
|
41
41
|
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</span>
|
|
44
44
|
</li>
|
|
45
45
|
<li>
|
|
46
|
-
<button @click="logout" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-html
|
|
46
|
+
<button @click="logout" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-html dark:text-darkSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextActive w-full" role="menuitem">Sign out</button>
|
|
47
47
|
</li>
|
|
48
48
|
</ul>
|
|
49
49
|
</div>
|
|
@@ -59,30 +59,30 @@
|
|
|
59
59
|
|
|
60
60
|
v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady"
|
|
61
61
|
|
|
62
|
-
id="logo-
|
|
62
|
+
id="logo-lightSidebar" class="fixed bg-lightSidebar border-none top-0 left-0 z-20 w-64 h-screen transition-transform bg-lightSidebar dark:bg-darkSidebar border-r border-lightSidebarBorder sm:translate-x-0 dark:bg-darkSidebar dark:border-darkSidebarBorder"
|
|
63
63
|
:class="{ '-translate-x-full': !sideBarOpen, 'transform-none': sideBarOpen }"
|
|
64
64
|
aria-label="Sidebar"
|
|
65
65
|
>
|
|
66
|
-
<div class="h-full px-3 pb-4 overflow-y-auto bg-
|
|
66
|
+
<div class="h-full px-3 pb-4 overflow-y-auto bg-lightSidebar dark:bg-darkSidebar border-r dark:border-darkSidebarBorder">
|
|
67
67
|
<div class="flex ms-2 md:me-24 m-4 ">
|
|
68
68
|
<img :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')" :alt="`${ coreStore.config?.brandName } Logo`" class="h-8 me-3" />
|
|
69
|
-
<span class="self-center text-
|
|
69
|
+
<span class="self-center text-lightNavbarText-size font-semibold sm:text-lightNavbarText-size whitespace-nowrap dark:text-darkNavbarText text-lightNavbarLogo">
|
|
70
70
|
{{ coreStore.config?.brandName }}
|
|
71
71
|
</span>
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
74
|
<ul class="space-y-2 font-medium">
|
|
75
75
|
<template v-for="(item, i) in coreStore.menu" :key="`menu-${i}`">
|
|
76
|
-
<div v-if="item.type === 'divider'" class="border-t border-
|
|
76
|
+
<div v-if="item.type === 'divider'" class="border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
|
|
77
77
|
<div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-8"></div>
|
|
78
78
|
<div v-else-if="item.type === 'heading'" class="flex items-center justify-left pl-2 h-8 text-gray-400 dark:text-gray-400
|
|
79
79
|
">{{ item.label }}</div>
|
|
80
|
-
<li v-else-if="item.children">
|
|
81
|
-
<button @click="clickOnMenuItem(i)" type="button" class="flex items-center w-full p-2 text-base text-
|
|
80
|
+
<li v-else-if="item.children" class=" ">
|
|
81
|
+
<button @click="clickOnMenuItem(i)" type="button" class="flex items-center w-full p-2 text-base text-lightSidebarText rounded-default transition duration-75 group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarHover dark:hover:text-darkSidebarTextHover"
|
|
82
82
|
:aria-controls="`dropdown-example${i}`"
|
|
83
83
|
:data-collapse-toggle="`dropdown-example${i}`"
|
|
84
84
|
>
|
|
85
|
-
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-
|
|
85
|
+
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
|
|
86
86
|
|
|
87
87
|
<span class="flex-1 ms-3 text-left rtl:text-right whitespace-nowrap">{{ item.label }}</span>
|
|
88
88
|
<svg :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<RouterLink
|
|
3
3
|
:to="{name: item.resourceId ? 'resource-list' : item.path, params: item.resourceId ? { resourceId: item.resourceId }: {}}"
|
|
4
|
-
class="flex items-center py-2 text-
|
|
4
|
+
class="flex group items-center py-2 text-lightSidebarText dark:text-darkSidebarText rounded-default hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:hover:bg-darkSidebarHover dark:hover:text-darkSidebarTextHover active:bg-lightSidebarActive dark:active:bg-darkSidebarHover" role="menuitem"
|
|
5
5
|
:class="{
|
|
6
6
|
'px-4': isChild,
|
|
7
7
|
'px-2': !isChild,
|
|
8
|
-
'bg-
|
|
8
|
+
'bg-sidebarActive dark:bg-gray-700': item.resourceId ?
|
|
9
9
|
($route.params.resourceId === item.resourceId && $route.name === 'resource-list') :
|
|
10
10
|
($route.name === item.path)
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
|
-
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-
|
|
13
|
+
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons dark:text-darkSidebarIcons transition duration-75 group-hover:text-lightSidebarIconsHover dark:group-hover:text-darkSidebarIconsHover" ></component>
|
|
14
14
|
<span class="ms-3">{{ item.label }}</span>
|
|
15
15
|
</RouterLink>
|
|
16
16
|
</template>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="rounded-default">
|
|
3
3
|
|
|
4
4
|
<div
|
|
5
|
-
class="relative shadow-
|
|
5
|
+
class="relative shadow-resourseFormShadow sm:rounded-lg dark:shadow-2xl dark:shadow-black rounded-default"
|
|
6
6
|
>
|
|
7
7
|
<form autocomplete="off" @submit.prevent>
|
|
8
8
|
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 ">
|
|
9
|
-
<thead class="text-xs text-gray-700 uppercase bg-
|
|
9
|
+
<thead class="text-xs text-gray-700 uppercase bg-lightormHeading dark:bg-gray-700 dark:text-gray-400">
|
|
10
10
|
<tr>
|
|
11
11
|
<th scope="col" class="px-6 py-3">
|
|
12
12
|
Field
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</thead>
|
|
19
19
|
<tbody>
|
|
20
20
|
<tr v-for="column, i in editableColumns" :key="column.name"
|
|
21
|
-
class="bg-
|
|
21
|
+
class="bg-ligftForm dark:bg-gray-800 border-b dark:border-gray-700"
|
|
22
22
|
>
|
|
23
23
|
<!-- if column is in customComponentsPerColumn, use this component. If not, use this code -->
|
|
24
24
|
<template v-if="column?.components?.[props.source].file">
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- table -->
|
|
3
|
-
<div class="relative overflow-x-auto shadow-
|
|
3
|
+
<div class="relative overflow-x-auto shadow-listTableShadow dark:shadow-black overflow-y-hidden rounded-default">
|
|
4
4
|
|
|
5
5
|
<!-- skelet loader -->
|
|
6
6
|
<div role="status" v-if="!resource || !resource.columns"
|
|
7
7
|
class="max-w p-4 space-y-4 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700">
|
|
8
|
-
|
|
9
|
-
<div>
|
|
10
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
11
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="flex items-center justify-between h-16 pt-4" v-for="i in new Array(10)">
|
|
17
|
-
<div>
|
|
18
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
19
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
22
|
-
</div>
|
|
23
|
-
<span class="sr-only">Loading...</span>
|
|
8
|
+
|
|
24
9
|
</div>
|
|
25
10
|
|
|
26
11
|
<table v-else class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 rounded-default">
|
|
27
|
-
<thead class="text-xs text-view-table-heading-text bg-
|
|
12
|
+
<thead class="text-xs text-view-table-heading-text bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-gray-400">
|
|
28
13
|
<tr>
|
|
29
14
|
<th scope="col" class="p-4">
|
|
30
15
|
<div v-if="rows && rows.length" class="flex items-center">
|
|
@@ -69,51 +54,8 @@
|
|
|
69
54
|
</tr>
|
|
70
55
|
</thead>
|
|
71
56
|
<tbody>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<div role="status"
|
|
76
|
-
class="max-w p-4 space-y-4 divide-y divide-gray-200 rounded animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700">
|
|
77
|
-
<div class="flex items-center justify-between">
|
|
78
|
-
<div>
|
|
79
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
80
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="flex items-center justify-between pt-4">
|
|
85
|
-
<div>
|
|
86
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
87
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="flex items-center justify-between pt-4">
|
|
92
|
-
<div>
|
|
93
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
94
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
95
|
-
</div>
|
|
96
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="flex items-center justify-between pt-4">
|
|
99
|
-
<div>
|
|
100
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
101
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
102
|
-
</div>
|
|
103
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
104
|
-
</div>
|
|
105
|
-
<div class="flex items-center justify-between pt-4">
|
|
106
|
-
<div>
|
|
107
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"></div>
|
|
108
|
-
<div class="w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"></div>
|
|
111
|
-
</div>
|
|
112
|
-
<span class="sr-only">Loading...</span>
|
|
113
|
-
</div>
|
|
114
|
-
</td>
|
|
115
|
-
</tr>
|
|
116
|
-
<tr v-else-if="rows.length === 0" class="bg-list-view-table-bg border-b dark:bg-gray-800 dark:border-gray-700">
|
|
57
|
+
<SkeleteLoader v-if="!rows?.length" :columns="10" :rows="10"/>
|
|
58
|
+
<tr v-else-if="rows.length === 0" class="bg-lightListTable border-b dark:bg-darkListTable dark:border-darkListTableBorder">
|
|
117
59
|
<td :colspan="resource?.columns.length + 2">
|
|
118
60
|
|
|
119
61
|
<div id="toast-simple"
|
|
@@ -127,7 +69,7 @@
|
|
|
127
69
|
</tr>
|
|
128
70
|
|
|
129
71
|
<tr @click="onClick($event,row)" v-else v-for="(row, rowI) in rows" :key="row.id"
|
|
130
|
-
class="bg-
|
|
72
|
+
class="bg-lightListTable border-b dark:bg-darkListTable border-lightListBorder dark:border-gray-700 hover:bg-lightListTableRowHover dark:hover:bg-darkListTableRowHover cursor-pointer">
|
|
131
73
|
<td class="w-4 p-4 cursor-default" @click="(e)=>{e.stopPropagation()}">
|
|
132
74
|
<div class="flex items center ">
|
|
133
75
|
<input
|
|
@@ -287,6 +229,7 @@ import ValueRenderer from '@/components/ValueRenderer.vue';
|
|
|
287
229
|
import { getCustomComponent } from '@/utils';
|
|
288
230
|
import { useCoreStore } from '@/stores/core';
|
|
289
231
|
import { showSuccesTost } from '@/composables/useFrontendApi';
|
|
232
|
+
import SkeleteLoader from '@/components/SkeleteLoader.vue';
|
|
290
233
|
|
|
291
234
|
import {
|
|
292
235
|
IconInboxOutline,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr v-for="c in new Array(props.columns)" class="bg-lightListTable border-b dark:bg-darkListTable dark:border-darkListBorder">
|
|
3
|
+
<td v-for="r in new Array(props.rows)" class="items-center px-6 py-20 cursor-default" >
|
|
4
|
+
<div role="status" class="max-w-sm animate-pulse">
|
|
5
|
+
<div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"></div>
|
|
6
|
+
</div>
|
|
7
|
+
</td>
|
|
8
|
+
</tr>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
columns:Number,
|
|
15
|
+
rows:Number
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
v-if="checkboxes.length"
|
|
23
23
|
data-tooltip-target="tooltip-remove-all"
|
|
24
24
|
data-tooltip-placement="bottom"
|
|
25
|
-
class="flex gap-1 items-center py-1 px-3 me-2 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-
|
|
25
|
+
class="flex gap-1 items-center py-1 px-3 me-2 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-darkListTable dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 rounded-default"
|
|
26
26
|
>
|
|
27
27
|
<IconBanOutline class="w-5 h-5 "/>
|
|
28
28
|
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
<div
|
|
46
46
|
v-else
|
|
47
|
-
class="relative overflow-x-auto shadow-
|
|
47
|
+
class="relative overflow-x-auto shadow-resourseFormShadow "
|
|
48
48
|
>
|
|
49
49
|
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 rounded-default">
|
|
50
|
-
<thead class="text-xs text-gray-700 uppercase bg-
|
|
50
|
+
<thead class="text-xs text-gray-700 uppercase bg-lightormHeading dark:bg-gray-700 dark:text-gray-400">
|
|
51
51
|
<tr>
|
|
52
52
|
<th scope="col" class="px-6 py-3">
|
|
53
53
|
Field
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
</thead>
|
|
60
60
|
<tbody>
|
|
61
61
|
<tr v-for="column in coreStore.resource?.columns.filter(c => c.showIn.includes('show'))" :key="column.name"
|
|
62
|
-
class="bg-
|
|
62
|
+
class="bg-lightForm bg-darkForm odd:dark:bg-gray-900 even:dark:bg-gray-800 border-b dark:border-gray-700"
|
|
63
63
|
>
|
|
64
64
|
<component
|
|
65
65
|
v-if="column.components?.showRow"
|
|
@@ -382,7 +382,7 @@ export type AdminForthResourceColumn = {
|
|
|
382
382
|
*
|
|
383
383
|
* This field will be displayed in show and list views with custom component `CountryFlag.vue`. CountryFlag.vue should be placed in custom folder and can be next:
|
|
384
384
|
*
|
|
385
|
-
* ```
|
|
385
|
+
* ```html
|
|
386
386
|
* <template>
|
|
387
387
|
* {{ getFlagEmojiFromIso(record.ipCountry) }}
|
|
388
388
|
* </template>
|
|
@@ -818,6 +818,10 @@ export type AdminForthConfig = {
|
|
|
818
818
|
*
|
|
819
819
|
*/
|
|
820
820
|
vueUsesFile?: string,
|
|
821
|
+
/**
|
|
822
|
+
* Object to redefine default styles for AdminForth components. Use this file as reference for all possible adjustments https://github.com/devforth/adminforth/blob/main/adminforth/modules/styles.ts
|
|
823
|
+
*/
|
|
824
|
+
styles?: Object,
|
|
821
825
|
},
|
|
822
826
|
|
|
823
827
|
/**
|
|
@@ -832,10 +836,7 @@ export type AdminForthConfig = {
|
|
|
832
836
|
|
|
833
837
|
deleteConfirmation?: boolean,
|
|
834
838
|
|
|
835
|
-
|
|
836
|
-
* Object to redefine default styles for AdminForth components. Use this file as reference for all possible adjustments https://github.com/devforth/adminforth/blob/main/adminforth/modules/styles.ts
|
|
837
|
-
*/
|
|
838
|
-
styles?: Object,
|
|
839
|
+
|
|
839
840
|
}
|
|
840
841
|
|
|
841
842
|
|
|
@@ -952,7 +953,7 @@ export type AdminForthComponentDeclarationFull = {
|
|
|
952
953
|
*
|
|
953
954
|
* In Flag.vue you can access this meta object like this:
|
|
954
955
|
*
|
|
955
|
-
* ```
|
|
956
|
+
* ```html
|
|
956
957
|
* <template>
|
|
957
958
|
* <img :src="loadFile(`@@/flags/${meta.flagType}/${meta.flagType === 'country' ? record.countryIso : record.teamCode}.png`)" />
|
|
958
959
|
* </template>
|
|
@@ -966,6 +967,7 @@ export type AdminForthComponentDeclarationFull = {
|
|
|
966
967
|
meta?: any,
|
|
967
968
|
}
|
|
968
969
|
|
|
970
|
+
|
|
969
971
|
export type AdminForthComponentDeclaration = AdminForthComponentDeclarationFull | string;
|
|
970
972
|
|
|
971
973
|
export type AdminForthFieldComponents = {
|
|
@@ -975,7 +977,7 @@ export type AdminForthFieldComponents = {
|
|
|
975
977
|
*
|
|
976
978
|
* Example: `FullName.vue`
|
|
977
979
|
*
|
|
978
|
-
* ```
|
|
980
|
+
* ```html
|
|
979
981
|
* <template>
|
|
980
982
|
* {{ record.firstName }} {{ record.lastName }}
|
|
981
983
|
* </template>
|