adminforth 1.3.56-next.9 → 1.3.56
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/auth.d.ts.map +1 -1
- package/dist/auth.js +8 -4
- package/dist/auth.js.map +1 -1
- package/dist/basePlugin.d.ts +4 -0
- package/dist/basePlugin.d.ts.map +1 -1
- package/dist/basePlugin.js +4 -0
- package/dist/basePlugin.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/codeInjector.d.ts.map +1 -1
- package/dist/modules/codeInjector.js +3 -1
- package/dist/modules/codeInjector.js.map +1 -1
- package/dist/modules/configValidator.d.ts.map +1 -1
- package/dist/modules/configValidator.js +15 -2
- package/dist/modules/configValidator.js.map +1 -1
- package/dist/modules/styles.js +2 -2
- package/dist/modules/styles.js.map +1 -1
- package/dist/servers/express.js +2 -1
- package/dist/servers/express.js.map +1 -1
- package/dist/spa/index.html +2 -2
- package/dist/spa/package-lock.json +16 -0
- package/dist/spa/package.json +1 -0
- package/dist/spa/src/App.vue +13 -31
- package/dist/spa/src/components/AfTooltip.vue +43 -0
- package/dist/spa/src/components/BreadcrumbsWithButtons.vue +3 -4
- package/dist/spa/src/components/CustomDatePicker.vue +2 -2
- package/dist/spa/src/components/Dropdown.vue +2 -2
- package/dist/spa/src/components/GroupsTable.vue +170 -0
- package/dist/spa/src/components/ResourceForm.vue +70 -156
- package/dist/spa/src/components/ResourceListTable.vue +121 -124
- package/dist/spa/src/renderers/CompactField.vue +45 -0
- package/dist/spa/src/renderers/CompactUUID.vue +12 -15
- package/dist/spa/src/renderers/CountryFlag.vue +16 -21
- package/dist/spa/src/renderers/HumanNumber.vue +11 -16
- package/dist/spa/src/renderers/RelativeTime.vue +41 -0
- package/dist/spa/src/renderers/URL.vue +18 -0
- package/dist/spa/src/stores/user.ts +0 -5
- package/dist/spa/src/types/AdminForthConfig.ts +25 -11
- package/dist/spa/src/views/CreateView.vue +1 -1
- package/dist/spa/src/views/EditView.vue +1 -1
- package/dist/spa/src/views/ListView.vue +3 -8
- package/dist/spa/src/views/ResourceParent.vue +36 -2
- package/dist/spa/src/views/ShowView.vue +16 -15
- package/dist/types/AdminForthConfig.d.ts +24 -11
- package/dist/types/AdminForthConfig.d.ts.map +1 -1
- package/dist/types/AdminForthConfig.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express.js","sourceRoot":"","sources":["../../servers/express.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,OAAO,KAAK,MAAM,YAAY,CAAC;AAI/B,SAAS,cAAc,CAAC,MAAM,EAAE,SAAS;IACvC,IAAI,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,OAAO,CAAC,GAAG,EAAE,GAAG;IAC7B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,KAAK,UAAU,kBAAkB,CAAC,GAAG;IAMnC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;IACnC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAG,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AC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5G,CAAC;CAEF;AAED,eAAe,aAAa,CAAC"}
|
package/dist/spa/index.html
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
</script> -->
|
|
17
17
|
|
|
18
18
|
</head>
|
|
19
|
-
<body class="min-h-screen flex flex-
|
|
20
|
-
<div id="app" class="grow bg-lightHtml dark:bg-darkHtml"></div>
|
|
19
|
+
<body class="min-h-screen flex flex-col">
|
|
20
|
+
<div id="app" class="grow bg-lightHtml dark:bg-darkHtml w-full"></div>
|
|
21
21
|
<script type="module" src="/src/main.ts"></script>
|
|
22
22
|
</body>
|
|
23
23
|
</html>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"debounce": "^2.1.0",
|
|
16
16
|
"flowbite": "^2.3.0",
|
|
17
17
|
"flowbite-datepicker": "^1.2.6",
|
|
18
|
+
"javascript-time-ago": "^2.5.11",
|
|
18
19
|
"pinia": "^2.1.7",
|
|
19
20
|
"sanitize-html": "^2.13.0",
|
|
20
21
|
"unhead": "^1.9.12",
|
|
@@ -2841,6 +2842,15 @@
|
|
|
2841
2842
|
"@pkgjs/parseargs": "^0.11.0"
|
|
2842
2843
|
}
|
|
2843
2844
|
},
|
|
2845
|
+
"node_modules/javascript-time-ago": {
|
|
2846
|
+
"version": "2.5.11",
|
|
2847
|
+
"resolved": "https://registry.npmjs.org/javascript-time-ago/-/javascript-time-ago-2.5.11.tgz",
|
|
2848
|
+
"integrity": "sha512-Zeyf5R7oM1fSMW9zsU3YgAYwE0bimEeF54Udn2ixGd8PUwu+z1Yc5t4Y8YScJDMHD6uCx6giLt3VJR5K4CMwbg==",
|
|
2849
|
+
"license": "MIT",
|
|
2850
|
+
"dependencies": {
|
|
2851
|
+
"relative-time-format": "^1.1.6"
|
|
2852
|
+
}
|
|
2853
|
+
},
|
|
2844
2854
|
"node_modules/jiti": {
|
|
2845
2855
|
"version": "1.21.0",
|
|
2846
2856
|
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
|
|
@@ -3633,6 +3643,12 @@
|
|
|
3633
3643
|
"node": ">=8.10.0"
|
|
3634
3644
|
}
|
|
3635
3645
|
},
|
|
3646
|
+
"node_modules/relative-time-format": {
|
|
3647
|
+
"version": "1.1.6",
|
|
3648
|
+
"resolved": "https://registry.npmjs.org/relative-time-format/-/relative-time-format-1.1.6.tgz",
|
|
3649
|
+
"integrity": "sha512-aCv3juQw4hT1/P/OrVltKWLlp15eW1GRcwP1XdxHrPdZE9MtgqFpegjnTjLhi2m2WI9MT/hQQtE+tjEWG1hgkQ==",
|
|
3650
|
+
"license": "MIT"
|
|
3651
|
+
},
|
|
3636
3652
|
"node_modules/resolve": {
|
|
3637
3653
|
"version": "1.22.8",
|
|
3638
3654
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
package/dist/spa/package.json
CHANGED
package/dist/spa/src/App.vue
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="defaultLayout" >
|
|
3
|
-
|
|
4
3
|
<nav
|
|
5
4
|
v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady"
|
|
6
|
-
class="fixed h-14 top-0 z-20 w-full
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
class="fixed h-14 top-0 z-20 w-full border-b shadow-sm bg-lightNavbar shadow-headerShadow dark:bg-darkNavbar dark:border-darkSidebarDevider"
|
|
6
|
+
>
|
|
7
|
+
<div class="px-3 lg:px-5 lg:pl-3 flex items-center justify-between h-full w-full" >
|
|
9
8
|
<div class="flex items-center justify-start rtl:justify-end">
|
|
10
9
|
<button @click="sideBarOpen = !sideBarOpen"
|
|
11
10
|
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">
|
|
@@ -14,10 +13,8 @@
|
|
|
14
13
|
<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>
|
|
15
14
|
</svg>
|
|
16
15
|
</button>
|
|
17
|
-
|
|
18
16
|
</div>
|
|
19
17
|
<div class="flex items-center">
|
|
20
|
-
|
|
21
18
|
<component
|
|
22
19
|
v-for="c in coreStore?.config?.globalInjections?.header || []"
|
|
23
20
|
:is="getCustomComponent(c)"
|
|
@@ -26,16 +23,12 @@
|
|
|
26
23
|
/>
|
|
27
24
|
|
|
28
25
|
<div class="flex items-center ms-3 ">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
26
|
<span
|
|
33
27
|
@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">
|
|
34
28
|
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="coreStore.theme !== 'dark'" />
|
|
35
29
|
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
36
30
|
</span>
|
|
37
31
|
<div>
|
|
38
|
-
|
|
39
32
|
<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">
|
|
40
33
|
<span class="sr-only">Open user menu</span>
|
|
41
34
|
<svg class="w-8 h-8 text-lightNavbarIcons dark:text-darkNavbarIcons" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
@@ -43,6 +36,7 @@
|
|
|
43
36
|
</svg>
|
|
44
37
|
</button>
|
|
45
38
|
</div>
|
|
39
|
+
|
|
46
40
|
<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">
|
|
47
41
|
<div class="px-4 py-3" role="none">
|
|
48
42
|
<p class="text-sm text-gray-900 dark:text-darkNavbarText" role="none" v-if="coreStore.userFullname">
|
|
@@ -52,8 +46,8 @@
|
|
|
52
46
|
{{ coreStore.username }}
|
|
53
47
|
</p>
|
|
54
48
|
</div>
|
|
49
|
+
|
|
55
50
|
<ul class="py-1" role="none">
|
|
56
|
-
|
|
57
51
|
<li v-for="c in coreStore?.config?.globalInjections?.userMenu || []" >
|
|
58
52
|
<component
|
|
59
53
|
:is="getCustomComponent(c)"
|
|
@@ -67,18 +61,15 @@
|
|
|
67
61
|
</ul>
|
|
68
62
|
</div>
|
|
69
63
|
</div>
|
|
70
|
-
</div>
|
|
71
64
|
</div>
|
|
72
65
|
</div>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
</nav>
|
|
76
67
|
|
|
77
68
|
<aside
|
|
78
69
|
|
|
79
70
|
v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady"
|
|
80
71
|
|
|
81
|
-
id="logo-lightSidebar" class="fixed
|
|
72
|
+
id="logo-lightSidebar" class="fixed 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"
|
|
82
73
|
:class="{ '-translate-x-full': !sideBarOpen, 'transform-none': sideBarOpen }"
|
|
83
74
|
aria-label="Sidebar"
|
|
84
75
|
>
|
|
@@ -173,7 +164,8 @@
|
|
|
173
164
|
</aside>
|
|
174
165
|
|
|
175
166
|
|
|
176
|
-
<div class="sm:ml-64 max-w-[100vw]
|
|
167
|
+
<div class="sm:ml-64 max-w-[100vw] sm:max-w-[calc(100%-16rem)]"
|
|
168
|
+
v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady">
|
|
177
169
|
<div class="p-0 dark:border-gray-700 mt-14">
|
|
178
170
|
<RouterView/>
|
|
179
171
|
</div>
|
|
@@ -244,9 +236,9 @@
|
|
|
244
236
|
</style>
|
|
245
237
|
|
|
246
238
|
<script setup lang="ts">
|
|
247
|
-
import { computed, onMounted, ref, watch,
|
|
248
|
-
import {
|
|
249
|
-
import {
|
|
239
|
+
import { computed, onMounted, ref, watch, onBeforeMount } from 'vue';
|
|
240
|
+
import { RouterView } from 'vue-router';
|
|
241
|
+
import { Dropdown } from 'flowbite'
|
|
250
242
|
import './index.scss'
|
|
251
243
|
import { useCoreStore } from '@/stores/core';
|
|
252
244
|
import { useUserStore } from '@/stores/user';
|
|
@@ -271,10 +263,7 @@ const toastStore = useToastStore();
|
|
|
271
263
|
const userStore = useUserStore();
|
|
272
264
|
const frontendApi = new FrontendAPI();
|
|
273
265
|
frontendApi.init();
|
|
274
|
-
|
|
275
|
-
const index = str.lastIndexOf(separator);
|
|
276
|
-
return [str.slice(0, index), str.slice(index + 1)];
|
|
277
|
-
}
|
|
266
|
+
|
|
278
267
|
createHead()
|
|
279
268
|
const sideBarOpen = ref(false);
|
|
280
269
|
const defaultLayout = ref(true);
|
|
@@ -312,9 +301,6 @@ async function logout() {
|
|
|
312
301
|
router.push({ name: 'login' })
|
|
313
302
|
}
|
|
314
303
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
304
|
async function initRouter() {
|
|
319
305
|
await router.isReady();
|
|
320
306
|
routerIsReady.value = true;
|
|
@@ -365,8 +351,6 @@ watch (()=>coreStore.menu, () => {
|
|
|
365
351
|
watch([loggedIn, routerIsReady, loginRedirectCheckIsReady], ([l,r,lr]) => {
|
|
366
352
|
if (l && r && lr) {
|
|
367
353
|
setTimeout(() => {
|
|
368
|
-
initFlowbite();
|
|
369
|
-
|
|
370
354
|
const dd = new Dropdown(
|
|
371
355
|
document.querySelector('#dropdown-user') as HTMLElement,
|
|
372
356
|
document.querySelector('[data-dropdown-toggle="dropdown-user"]') as HTMLElement,
|
|
@@ -411,6 +395,4 @@ function closeCTA() {
|
|
|
411
395
|
}
|
|
412
396
|
|
|
413
397
|
|
|
414
|
-
|
|
415
|
-
|
|
416
398
|
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="triggerEl" class="inline-flex items-center">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
<div
|
|
6
|
+
role="tooltip"
|
|
7
|
+
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
|
|
8
|
+
ref="tooltip"
|
|
9
|
+
>
|
|
10
|
+
<slot name="tooltip"></slot>
|
|
11
|
+
<div class="tooltip-arrow" data-popper-arrow></div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { ref, onMounted, nextTick, onUnmounted, type Ref } from 'vue';
|
|
18
|
+
import { Tooltip } from 'flowbite';
|
|
19
|
+
|
|
20
|
+
const triggerEl = ref(null);
|
|
21
|
+
const tooltip = ref(null);
|
|
22
|
+
|
|
23
|
+
const tp: Ref<Tooltip|null> = ref(null);
|
|
24
|
+
|
|
25
|
+
onMounted(async () => {
|
|
26
|
+
//await one tick when all is mounted
|
|
27
|
+
await nextTick();
|
|
28
|
+
tp.value = new Tooltip(
|
|
29
|
+
tooltip.value,
|
|
30
|
+
triggerEl.value,
|
|
31
|
+
{
|
|
32
|
+
placement: 'bottom',
|
|
33
|
+
triggerType: 'hover',
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
onUnmounted(() => {
|
|
40
|
+
//destroy tooltip
|
|
41
|
+
tp.value?.destroy();
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="flex items-center justify-between mb-3 flex-wrap gap-y-2">
|
|
3
|
+
<div class="flex items-center justify-between mb-3 flex-wrap gap-y-2 gap-2">
|
|
4
4
|
<Breadcrumbs />
|
|
5
5
|
<div class="flex items-center space-x-1 flex-wrap gap-y-1">
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="flex items-center justify-between mb-3 flex-wrap gap-y-2">
|
|
10
|
-
<div class="p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400" role="alert"
|
|
11
|
-
v-if="coreStore.resourceColumnsError">
|
|
9
|
+
<div class="flex items-center justify-between mb-3 flex-wrap gap-y-2 gap-2" v-if="coreStore.resourceColumnsError">
|
|
10
|
+
<div class="p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400" role="alert">
|
|
12
11
|
<span class="font-medium">Error!</span> {{ coreStore.resourceColumnsError }}
|
|
13
12
|
</div>
|
|
14
13
|
</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
</template>
|
|
47
47
|
<script setup>
|
|
48
|
-
import {ref, computed, onMounted, watch, onBeforeUnmount} from 'vue';
|
|
48
|
+
import {ref, computed, onMounted, watch, onBeforeUnmount, nextTick} from 'vue';
|
|
49
49
|
import dayjs from 'dayjs';
|
|
50
50
|
import utc from 'dayjs/plugin/utc';
|
|
51
51
|
|
|
@@ -105,7 +105,7 @@ async function updateFromProps() {
|
|
|
105
105
|
startTime.value = '';
|
|
106
106
|
} else {
|
|
107
107
|
// wait ref to initialize
|
|
108
|
-
await (
|
|
108
|
+
await nextTick();
|
|
109
109
|
datepickerObject.value.setDate(dayjs(props.valueStart).format('DD MMM YYYY'));
|
|
110
110
|
startTime.value = dayjs(props.valueStart).format('HH:mm:ss')
|
|
111
111
|
}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
<IconCaretUpSolid v-else class="h-5 w-5 text-gray-400" />
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
|
-
<div v-if="showDropdown" class="absolute z-10 mt-1 w-full bg-white shadow-lg dark:shadow-black rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm">
|
|
38
|
+
<div v-if="showDropdown" class="absolute z-10 mt-1 w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700 dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm">
|
|
39
39
|
<div
|
|
40
40
|
v-for="item in filteredItems"
|
|
41
41
|
:key="item.value"
|
|
42
|
-
class="px-4 py-2 cursor-pointer hover:bg-gray-100"
|
|
42
|
+
class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
43
43
|
:class="{ 'bg-lightPrimaryOpacity': selectedItems.includes(item) }"
|
|
44
44
|
@click="toogleItem(item)"
|
|
45
45
|
>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="shadow-resourseFormShadow dark:shadow-darkResourseFormShadow dark:shadow-2xl">
|
|
3
|
+
<div v-if="group.groupName" class="text-md font-semibold px-6 py-3 flex flex-1 items-center dark:border-gray-600 text-gray-700 bg-lightFormHeading dark:bg-gray-700 dark:text-gray-400 rounded-t-lg">
|
|
4
|
+
{{ group.groupName }}
|
|
5
|
+
</div>
|
|
6
|
+
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
|
7
|
+
<thead class="text-xs text-gray-700 uppercase dark:text-gray-400 bg-lightFormHeading dark:bg-gray-700 block md:table-row-group ">
|
|
8
|
+
<tr>
|
|
9
|
+
<th scope="col" class="px-6 py-3 hidden md:w-52 md:table-cell">
|
|
10
|
+
Field
|
|
11
|
+
</th>
|
|
12
|
+
<th scope="col" class="px-6 py-3 hidden md:table-cell">
|
|
13
|
+
Value
|
|
14
|
+
</th>
|
|
15
|
+
</tr>
|
|
16
|
+
</thead>
|
|
17
|
+
<tbody>
|
|
18
|
+
<tr
|
|
19
|
+
v-for="(column, i) in group.columns"
|
|
20
|
+
:key="column.name"
|
|
21
|
+
v-if="currentValues !== null"
|
|
22
|
+
class="bg-ligftForm dark:bg-gray-800 dark:border-gray-700 block md:table-row"
|
|
23
|
+
:class="{ 'border-b': i !== group.columns.length - 1 }"
|
|
24
|
+
>
|
|
25
|
+
<td class="px-6 py-4 flex items-center block md:table-cell pb-0 md:pb-4"
|
|
26
|
+
:class="{'rounded-bl-lg border-b-none': i === group.columns.length - 1}"> <!--align-top-->
|
|
27
|
+
<span class="flex items-center gap-1">
|
|
28
|
+
{{ column.label }}
|
|
29
|
+
<AfTooltip v-if="column.required[mode]">
|
|
30
|
+
|
|
31
|
+
<IconExclamationCircleSolid v-if="column.required[mode]" class="w-4 h-4"
|
|
32
|
+
:class="(columnError(column) && validating) ? 'text-red-500 dark:text-red-400' : 'text-gray-400 dark:text-gray-500'"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<template #tooltip>
|
|
36
|
+
Required field
|
|
37
|
+
</template>
|
|
38
|
+
</AfTooltip>
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
</td>
|
|
43
|
+
<td class="px-6 py-4 whitespace-pre-wrap relative block md:table-cell rounded-br-lg "
|
|
44
|
+
:class="{'rounded-br-lg': i === group.columns.length - 1}">
|
|
45
|
+
<template v-if="column?.components?.[props.source]?.file">
|
|
46
|
+
<component
|
|
47
|
+
:is="getCustomComponent(column.components[props.source])"
|
|
48
|
+
:column="column"
|
|
49
|
+
:value="currentValues[column.name]"
|
|
50
|
+
@update:value="setCurrentValue(column.name, $event)"
|
|
51
|
+
:meta="column.components[props.source].meta"
|
|
52
|
+
:record="currentValues"
|
|
53
|
+
@update:inValidity="customComponentsInValidity[column.name] = $event"
|
|
54
|
+
@update:emptiness="customComponentsEmptiness[column.name] = $event"
|
|
55
|
+
/>
|
|
56
|
+
</template>
|
|
57
|
+
<template v-else>
|
|
58
|
+
<Dropdown
|
|
59
|
+
single
|
|
60
|
+
v-if="column.foreignResource"
|
|
61
|
+
:options="columnOptions[column.name] || []"
|
|
62
|
+
:placeholder = "columnOptions[column.name]?.length ?'Select...': 'There are no options available'"
|
|
63
|
+
:modelValue="currentValues[column.name]"
|
|
64
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
65
|
+
></Dropdown>
|
|
66
|
+
<Dropdown
|
|
67
|
+
single
|
|
68
|
+
v-else-if="column.enum"
|
|
69
|
+
:options="column.enum"
|
|
70
|
+
:modelValue="currentValues[column.name]"
|
|
71
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
72
|
+
/>
|
|
73
|
+
<Dropdown
|
|
74
|
+
single
|
|
75
|
+
v-else-if="column.type === 'boolean'"
|
|
76
|
+
:options="[{ label: 'Yes', value: true }, { label: 'No', value: false }, { label: 'Unset', value: null }]"
|
|
77
|
+
:modelValue="currentValues[column.name]"
|
|
78
|
+
@update:modelValue="setCurrentValue(column.name, $event)"
|
|
79
|
+
/>
|
|
80
|
+
<input
|
|
81
|
+
v-else-if="['integer'].includes(column.type)"
|
|
82
|
+
type="number"
|
|
83
|
+
step="1"
|
|
84
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
85
|
+
placeholder="0"
|
|
86
|
+
:value="currentValues[column.name]"
|
|
87
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
88
|
+
>
|
|
89
|
+
<CustomDatePicker
|
|
90
|
+
v-else-if="['datetime'].includes(column.type)"
|
|
91
|
+
:column="column"
|
|
92
|
+
:valueStart="currentValues[column.name]"
|
|
93
|
+
auto-hide
|
|
94
|
+
@update:valueStart="setCurrentValue(column.name, $event)"
|
|
95
|
+
/>
|
|
96
|
+
<input
|
|
97
|
+
v-else-if="['decimal', 'float'].includes(column.type)"
|
|
98
|
+
type="number"
|
|
99
|
+
step="0.1"
|
|
100
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-40 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
101
|
+
placeholder="0.0"
|
|
102
|
+
:value="currentValues[column.name]"
|
|
103
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
104
|
+
/>
|
|
105
|
+
<textarea
|
|
106
|
+
v-else-if="['text', 'richtext'].includes(column.type)"
|
|
107
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
108
|
+
placeholder="Text"
|
|
109
|
+
:value="currentValues[column.name]"
|
|
110
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
111
|
+
>
|
|
112
|
+
</textarea>
|
|
113
|
+
<textarea
|
|
114
|
+
v-else-if="['json'].includes(column.type)"
|
|
115
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
116
|
+
placeholder="Text"
|
|
117
|
+
:value="currentValues[column.name]"
|
|
118
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
119
|
+
>
|
|
120
|
+
</textarea>
|
|
121
|
+
<input
|
|
122
|
+
v-else
|
|
123
|
+
:type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
|
|
124
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
125
|
+
placeholder="Text"
|
|
126
|
+
:value="currentValues[column.name]"
|
|
127
|
+
@input="setCurrentValue(column.name, $event.target.value)"
|
|
128
|
+
autocomplete="false"
|
|
129
|
+
data-lpignore="true"
|
|
130
|
+
readonly
|
|
131
|
+
onfocus="this.removeAttribute('readonly');"
|
|
132
|
+
>
|
|
133
|
+
|
|
134
|
+
<button
|
|
135
|
+
v-if="column.masked"
|
|
136
|
+
type="button"
|
|
137
|
+
@click="unmasked[column.name] = !unmasked[column.name]"
|
|
138
|
+
class="h-6 absolute inset-y-2 top-6 right-6 flex items-center pr-2 z-index-100 focus:outline-none"
|
|
139
|
+
>
|
|
140
|
+
<IconEyeSolid class="w-6 h-6 text-gray-400" v-if="!unmasked[column.name]" />
|
|
141
|
+
<IconEyeSlashSolid class="w-6 h-6 text-gray-400" v-else />
|
|
142
|
+
</button>
|
|
143
|
+
</template>
|
|
144
|
+
<div v-if="columnError(column) && validating" class="mt-1 text-xs text-red-500 dark:text-red-400">{{ columnError(column) }}</div>
|
|
145
|
+
<div v-if="column.editingNote && column.editingNote[mode]" class="mt-1 text-xs text-gray-400 dark:text-gray-500">{{ column.editingNote[mode] }}</div>
|
|
146
|
+
</td>
|
|
147
|
+
</tr>
|
|
148
|
+
</tbody>
|
|
149
|
+
</table>
|
|
150
|
+
</div>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<script setup>
|
|
154
|
+
import { defineProps } from 'vue';
|
|
155
|
+
import { IconExclamationCircleSolid, IconEyeSlashSolid, IconEyeSolid } from '@iconify-prerendered/vue-flowbite';
|
|
156
|
+
import CustomDatePicker from "@/components/CustomDatePicker.vue";
|
|
157
|
+
import Dropdown from '@/components/Dropdown.vue';
|
|
158
|
+
import AfTooltip from "./AfTooltip.vue";
|
|
159
|
+
|
|
160
|
+
const props = defineProps({
|
|
161
|
+
group: Object,
|
|
162
|
+
mode: String,
|
|
163
|
+
validating: Boolean,
|
|
164
|
+
currentValues: Object,
|
|
165
|
+
unmasked: Object,
|
|
166
|
+
columnError: Function,
|
|
167
|
+
setCurrentValue: Function,
|
|
168
|
+
columnOptions: Object
|
|
169
|
+
});
|
|
170
|
+
</script>
|