adminforth 2.4.0-next.69 → 2.4.0-next.70
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/styles.d.ts +28 -0
- package/dist/modules/styles.d.ts.map +1 -1
- package/dist/modules/styles.js +33 -5
- package/dist/modules/styles.js.map +1 -1
- package/dist/spa/src/afcl/Checkbox.vue +21 -13
- package/dist/spa/src/afcl/Toggle.vue +32 -0
- package/dist/spa/src/afcl/index.ts +1 -1
- package/dist/spa/src/components/ResourceListTable.vue +15 -30
- package/dist/spa/src/components/ResourceListTableVirtual.vue +16 -30
- package/dist/spa/src/controls/BoolToggle.vue +34 -0
- package/package.json +1 -1
package/dist/modules/styles.d.ts
CHANGED
|
@@ -50,6 +50,20 @@ export declare const styles: () => {
|
|
|
50
50
|
lightDropdownOptionsBackground: string;
|
|
51
51
|
lightDropdownOptionsHoverBackground: string;
|
|
52
52
|
lightDropdownOptionsText: string;
|
|
53
|
+
lightCheckboxBgUnchecked: string;
|
|
54
|
+
lightCheckboxBgChecked: string;
|
|
55
|
+
lightCheckboxIconColor: string;
|
|
56
|
+
lightCheckboxBorderColor: string;
|
|
57
|
+
lightFocusRing: string;
|
|
58
|
+
lightTextLabel: string;
|
|
59
|
+
lightToggleBgUnactive: string;
|
|
60
|
+
lightToggleBgActive: string;
|
|
61
|
+
lightToggleCircleUnactive: string;
|
|
62
|
+
lightToggleCircleActive: string;
|
|
63
|
+
lightToggleRing: string;
|
|
64
|
+
lightToggleText: string;
|
|
65
|
+
lightToggleBorderUnactive: string;
|
|
66
|
+
lightToggleBorderActive: string;
|
|
53
67
|
darkHtml: string;
|
|
54
68
|
darkPrimary: string;
|
|
55
69
|
darkPrimaryContrast: string;
|
|
@@ -91,6 +105,20 @@ export declare const styles: () => {
|
|
|
91
105
|
darkDropdownOptionsBackground: string;
|
|
92
106
|
darkDropdownOptionsHoverBackground: string;
|
|
93
107
|
darkDropdownOptionsText: string;
|
|
108
|
+
darkCheckboxBgUnchecked: string;
|
|
109
|
+
darkCheckboxBgChecked: string;
|
|
110
|
+
darkCheckboxIconColor: string;
|
|
111
|
+
darkCheckboxBorderColor: string;
|
|
112
|
+
darkFocusRing: string;
|
|
113
|
+
darkTextLabel: string;
|
|
114
|
+
darkToggleBgUnactive: string;
|
|
115
|
+
darkToggleBgActive: string;
|
|
116
|
+
darkToggleCircleUnactive: string;
|
|
117
|
+
darkToggleCircleActive: string;
|
|
118
|
+
darkToggleRing: string;
|
|
119
|
+
darkToggleText: string;
|
|
120
|
+
darkToggleBorderUnactive: string;
|
|
121
|
+
darkToggleBorderActive: string;
|
|
94
122
|
};
|
|
95
123
|
boxShadow: {
|
|
96
124
|
customLight: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../modules/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../modules/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKjB,CAAC"}
|
package/dist/modules/styles.js
CHANGED
|
@@ -58,11 +58,25 @@ export const styles = () => ({
|
|
|
58
58
|
lightDropdownOptionsBackground: "#FFFFFF", //dropdown menu background color
|
|
59
59
|
lightDropdownOptionsHoverBackground: "#f3f4f6", //dropdown menu hover background color
|
|
60
60
|
lightDropdownOptionsText: "#000000", //dropdown menu hover background color
|
|
61
|
+
lightCheckboxBgUnchecked: "alias:lightPrimaryContrast lighten", //checkbox unchecked state bg
|
|
62
|
+
lightCheckboxBgChecked: "alias:lightPrimary", //cheched state bg
|
|
63
|
+
lightCheckboxIconColor: "alias:lightPrimaryContrast lighten", //checked icon color
|
|
64
|
+
lightCheckboxBorderColor: "alias:lightPrimary darken", //border color
|
|
65
|
+
lightFocusRing: "alias:lightPrimary lighten", //focus ring color
|
|
66
|
+
lightTextLabel: "black", //text color of checkbox label
|
|
67
|
+
lightToggleBgUnactive: "#F9FAFB",
|
|
68
|
+
lightToggleBgActive: "alias:lightPrimary darken",
|
|
69
|
+
lightToggleCircleUnactive: "alias:lightPrimary",
|
|
70
|
+
lightToggleCircleActive: "#F9FAFB",
|
|
71
|
+
lightToggleRing: "alias:lightPrimary lighten",
|
|
72
|
+
lightToggleText: "black",
|
|
73
|
+
lightToggleBorderUnactive: "#E5E7EB",
|
|
74
|
+
lightToggleBorderActive: "alias:lightPrimary darken",
|
|
61
75
|
// colors for dark theme
|
|
62
76
|
darkHtml: "#111827",
|
|
63
77
|
darkPrimary: "rgb(130 172 255)", // primary color
|
|
64
78
|
darkPrimaryContrast: "alias:darkPrimary inverse", // primary color contrast
|
|
65
|
-
darkPrimaryOpacity: "
|
|
79
|
+
darkPrimaryOpacity: "alias:darkPrimary opacity:0.2", // primary color opacity
|
|
66
80
|
darkNavbar: "#111827",
|
|
67
81
|
darkNavbarBorder: "#e5e7eb",
|
|
68
82
|
darkNavbarText: "#9ca3af",
|
|
@@ -93,13 +107,27 @@ export const styles = () => ({
|
|
|
93
107
|
darkForm: "#111111",
|
|
94
108
|
darkFormBorder: "#222222",
|
|
95
109
|
darkFormHeading: "alias:darkListTableHeading",
|
|
96
|
-
darkDropdownButtonsBackground: "
|
|
97
|
-
darkDropownButtonsBorder: "
|
|
110
|
+
darkDropdownButtonsBackground: "alias:darkForm darken",
|
|
111
|
+
darkDropownButtonsBorder: "alias:darkForm lighten",
|
|
98
112
|
darkDropdownButtonsText: "#ffffff",
|
|
99
113
|
darkDropdownButtonsPlaceholderText: "#9ca3af",
|
|
100
|
-
darkDropdownOptionsBackground: "#
|
|
101
|
-
darkDropdownOptionsHoverBackground: "
|
|
114
|
+
darkDropdownOptionsBackground: "#alias:darkForm lighten",
|
|
115
|
+
darkDropdownOptionsHoverBackground: "alias:darkForm",
|
|
102
116
|
darkDropdownOptionsText: "#9ca3af",
|
|
117
|
+
darkCheckboxBgUnchecked: "alias:darkPrimaryContrast lighten", //checkbox unchecked state bg
|
|
118
|
+
darkCheckboxBgChecked: "alias:darkPrimary", //cheched state bg
|
|
119
|
+
darkCheckboxIconColor: "alias:darkPrimaryContrast lighten", //checked icon color
|
|
120
|
+
darkCheckboxBorderColor: "alias:darkPrimary darken", //border color
|
|
121
|
+
darkFocusRing: "alias:darkPrimary lighten",
|
|
122
|
+
darkTextLabel: "white",
|
|
123
|
+
darkToggleBgUnactive: "#F9FAFB",
|
|
124
|
+
darkToggleBgActive: "alias:darkPrimary darken",
|
|
125
|
+
darkToggleCircleUnactive: "alias:darkPrimary",
|
|
126
|
+
darkToggleCircleActive: "#F9FAFB",
|
|
127
|
+
darkToggleRing: "alias:darkPrimary lighten",
|
|
128
|
+
darkToggleText: "alias:darkPrimaryContrast lighten",
|
|
129
|
+
darkToggleBorderUnactive: "alias:darkPrimary lighten",
|
|
130
|
+
darkToggleBorderActive: "alias:darkPrimary darken",
|
|
103
131
|
},
|
|
104
132
|
boxShadow: {
|
|
105
133
|
customLight: "0 4px 8px rgba(0, 0, 0, 0.1)", // Lighter shadow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../modules/styles.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3B,MAAM,EAAE;QACN,SAAS,EAAE,SAAS,EAAE,kBAAkB;QAExC,YAAY,EAAE,SAAS,EAAE,gBAAgB;QACzC,oBAAoB,EAAE,4BAA4B,EAAE,yBAAyB;QAC7E,mBAAmB,EAAE,iCAAiC,EAAE,wBAAwB;QAEhF,WAAW,EAAE,SAAS,EAAE,oBAAoB;QAC5C,iBAAiB,EAAE,kBAAkB,EAAE,SAAS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AqB,EAAE,mBAAmB,EAAS,kBAAkB;QACrE,qBAAqB,EAAE,mCAAmC,EAAQ,oBAAoB;QACtF,uBAAuB,EAAE,0BAA0B,EAAG,cAAc;QACpE,aAAa,EAAE,2BAA2B;QAC1C,aAAa,EAAE,OAAO;QAEtB,oBAAoB,EAAE,SAAS;QAC/B,kBAAkB,EAAE,0BAA0B;QAC9C,wBAAwB,EAAE,mBAAmB;QAC7C,sBAAsB,EAAE,SAAS;QACjC,cAAc,EAAE,2BAA2B;QAC3C,cAAc,EAAE,mCAAmC;QACnD,wBAAwB,EAAE,2BAA2B;QACrD,sBAAsB,EAAE,0BAA0B;KACnD;IACD,SAAS,EAAE;QACT,WAAW,EAAE,8BAA8B,EAAE,iBAAiB;QAC9D,YAAY,EAAE,8BAA8B,EAAE,iBAAiB;QAC/D,eAAe,EAAE,8BAA8B,EAAE,iBAAiB;QAClE,mBAAmB,EAAE,8BAA8B,EAAE,iBAAiB;QACtE,kBAAkB,EAAE,8BAA8B,EAAE,iBAAiB;QACrE,sBAAsB,EAAE,8BAA8B,EAAE,iBAAiB;KAE1E;IACD,QAAQ,EAAE;QACR,iBAAiB,EAAE,MAAM;KAC1B;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,OAAO;KACnB;CACF,CAAC,CAAC"}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="afcl-checkbox flex items-center h-5" :class="{'opacity-50' : props.disabled}">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<div class="afcl-checkbox flex items-center relative h-5" :class="{'opacity-50' : props.disabled}">
|
|
3
|
+
<div class="flex items-center justify-center">
|
|
4
|
+
<input :id="id"
|
|
5
|
+
ref="rememberInput"
|
|
6
|
+
type="checkbox"
|
|
7
|
+
:checked="props.modelValue"
|
|
8
|
+
:disabled="props.disabled"
|
|
9
|
+
@change="$emit('update:modelValue', $event.target.checked)"
|
|
10
|
+
class="peer appearance-none min-w-4 min-h-4 bg-lightCheckboxBgUnchecked border border-lightCheckboxBorderColor rounded-sm checked:bg-lightCheckboxBgChecked
|
|
11
|
+
focus:ring-lightFocusRing dark:focus:ring-darkFocusRing dark:focus:ring-darkFocusRing
|
|
12
|
+
focus:ring-2 dark:bg-darkCheckboxBgUnchecked dark:border-darkCheckboxBorderColor dark:checked:bg-darkCheckboxBgChecked cursor-pointer"
|
|
13
|
+
>
|
|
14
|
+
<div class="pointer-events-none absolute text-lightCheckboxIconColor dark:text-darkCheckboxIconColor leading-none peer-checked:block hidden">
|
|
15
|
+
<IconCheckOutline width="18" height="18" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<label :for="id" class="ms-2 text-sm font-medium text-lightTextLabel dark:text-darkTextLabel">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</label>
|
|
21
|
+
|
|
11
22
|
</div>
|
|
12
|
-
<label :for="id" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300">
|
|
13
|
-
<slot></slot>
|
|
14
|
-
</label>
|
|
15
23
|
</template>
|
|
16
24
|
|
|
17
25
|
<script setup lang="ts">
|
|
18
|
-
|
|
26
|
+
import { IconCheckOutline } from '@iconify-prerendered/vue-flowbite';
|
|
19
27
|
const props = defineProps({
|
|
20
28
|
modelValue: Boolean,
|
|
21
29
|
disabled: Boolean,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label class="inline-flex items-center cursor-pointer bor" :class="{'opacity-50' : props.disabled}">
|
|
3
|
+
<input :id="id"
|
|
4
|
+
type="checkbox"
|
|
5
|
+
value="" class="sr-only peer"
|
|
6
|
+
:disabled="props.disabled"
|
|
7
|
+
:checked="props.modelValue"
|
|
8
|
+
@change="$emit('update:modelValue', $event.target.checked)"
|
|
9
|
+
>
|
|
10
|
+
<div class="border border-lightToggleBorderUnactive relative min-w-11 min-h-6 bg-lightToggleBgUnactive peer-focus:outline-none peer-focus:ring-4
|
|
11
|
+
peer-focus:ring-lightToggleRing dark:peer-focus:ring-darkToggleRing rounded-full peer dark:bg-darkToggleBgUnactive
|
|
12
|
+
peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:top-[2px] peer-checked:border-none
|
|
13
|
+
peer-checked:after:border-lightToggleBorderActive after:content-[''] after:absolute after:top-[1px]
|
|
14
|
+
after:start-[2px] after:bg-lightToggleCircleUnactive peer-checked:after:bg-lightToggleCircleActive dark:after:bg-darkToggleCircleUnactive after:border-lightToggleBgUnactive dark:after:border-darkToggleBgUnactive after:border after:rounded-full
|
|
15
|
+
after:h-5 after:w-5 after:transition-all dark:border-darkToggleBorderUnactive peer-checked:bg-lightToggleBgActive
|
|
16
|
+
dark:peer-checked:bg-darkToggleBgActive dark:peer-checked:after:border-darkToggleBorderActive dark:peer-checked:after:bg-darkToggleCircleActive">
|
|
17
|
+
</div>
|
|
18
|
+
<label :for="id" class="cursor-pointer ms-3 text-sm font-medium text-lightToggleText dark:text-darkToggleText">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</label>
|
|
21
|
+
</label>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
modelValue: Boolean,
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
defineEmits(['update:modelValue']);
|
|
31
|
+
const id = `afcb-${Math.random().toString(36).substring(7)}`
|
|
32
|
+
</script>
|
|
@@ -20,5 +20,5 @@ export { default as Dialog } from './Dialog.vue';
|
|
|
20
20
|
export { default as MixedChart } from './MixedChart.vue';
|
|
21
21
|
export { default as CountryFlag } from './CountryFlag.vue';
|
|
22
22
|
export { default as JsonViewer } from './JsonViewer.vue';
|
|
23
|
-
|
|
23
|
+
export { default as Toggle } from './Toggle.vue';
|
|
24
24
|
|
|
@@ -16,17 +16,13 @@
|
|
|
16
16
|
<!-- table header -->
|
|
17
17
|
<tr class="t-header sticky z-10 top-0 text-xs bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-gray-400">
|
|
18
18
|
<td scope="col" class="p-4">
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden">
|
|
27
|
-
<IconCheckOutline width="18" height="18" />
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
19
|
+
<Checkbox
|
|
20
|
+
:modelValue="allFromThisPageChecked"
|
|
21
|
+
:disabled="!rows || !rows.length"
|
|
22
|
+
@update:modelValue="selectAll"
|
|
23
|
+
>
|
|
24
|
+
<span class="sr-only">{{ $t('checkbox') }}</span>
|
|
25
|
+
</Checkbox>
|
|
30
26
|
</td>
|
|
31
27
|
|
|
32
28
|
<td v-for="c in columnsListed" ref="headerRefs" scope="col" class="px-2 md:px-3 lg:px-6 py-3">
|
|
@@ -95,24 +91,13 @@
|
|
|
95
91
|
:class="{'border-b': rowI !== rows.length - 1, 'cursor-pointer': row._clickUrl !== null}"
|
|
96
92
|
>
|
|
97
93
|
<td class="w-4 p-4 cursor-default" @click="(e)=>e.stopPropagation()">
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
class="peer appearance-none w-4 h-4 text-blue-600 bg-light-primary border border-gray-500 rounded-sm checked:bg-blue-500
|
|
106
|
-
focus:ring-blue-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800
|
|
107
|
-
focus:ring-2 dark:bg-dark-primary dark:border-gray-600 dark:checked:bg-blue-500 cursor-pointer"
|
|
108
|
-
/>
|
|
109
|
-
<label for="checkbox-table-search-1" class="sr-only">
|
|
110
|
-
{{ $t('checkbox') }}
|
|
111
|
-
</label>
|
|
112
|
-
<div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden">
|
|
113
|
-
<IconCheckOutline width="18" height="18" />
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
94
|
+
<Checkbox
|
|
95
|
+
:model-value="checkboxesInternal.includes(row._primaryKeyValue)"
|
|
96
|
+
@change="(e)=>{addToCheckedValues(row._primaryKeyValue)}"
|
|
97
|
+
@click="(e)=>e.stopPropagation()"
|
|
98
|
+
>
|
|
99
|
+
<span class="sr-only">{{ $t('checkbox') }}</span>
|
|
100
|
+
</Checkbox>
|
|
116
101
|
</td>
|
|
117
102
|
|
|
118
103
|
<td v-for="c in columnsListed" class="px-2 md:px-3 lg:px-6 py-4">
|
|
@@ -320,12 +305,12 @@ import {
|
|
|
320
305
|
IconEyeSolid,
|
|
321
306
|
IconPenSolid,
|
|
322
307
|
IconTrashBinSolid,
|
|
323
|
-
IconCheckOutline
|
|
324
308
|
} from '@iconify-prerendered/vue-flowbite';
|
|
325
309
|
import router from '@/router';
|
|
326
310
|
import { Tooltip } from '@/afcl';
|
|
327
311
|
import type { AdminForthResourceCommon } from '@/types/Common';
|
|
328
312
|
import adminforth from '@/adminforth';
|
|
313
|
+
import Checkbox from '@/afcl/Checkbox.vue';
|
|
329
314
|
|
|
330
315
|
const coreStore = useCoreStore();
|
|
331
316
|
const { t } = useI18n();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:style="`height: ${containerHeight}px; will-change: transform;`"
|
|
6
6
|
@scroll="handleScroll"
|
|
7
7
|
ref="containerRef"
|
|
8
|
-
>
|
|
8
|
+
>
|
|
9
9
|
<!-- skelet loader -->
|
|
10
10
|
<div role="status" v-if="!resource || !resource.columns"
|
|
11
11
|
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">
|
|
@@ -20,17 +20,13 @@
|
|
|
20
20
|
<!-- table header -->
|
|
21
21
|
<tr class="t-header sticky z-10 top-0 text-xs bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-gray-400">
|
|
22
22
|
<td scope="col" class="p-4">
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden">
|
|
31
|
-
<IconCheckOutline width="18" height="18" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
23
|
+
<Checkbox
|
|
24
|
+
:modelValue="allFromThisPageChecked"
|
|
25
|
+
:disabled="!rows || !rows.length"
|
|
26
|
+
@update:modelValue="selectAll"
|
|
27
|
+
>
|
|
28
|
+
<span class="sr-only">{{ $t('checkbox') }}</span>
|
|
29
|
+
</Checkbox>
|
|
34
30
|
</td>
|
|
35
31
|
|
|
36
32
|
<td v-for="c in columnsListed" ref="headerRefs" scope="col" class="px-2 md:px-3 lg:px-6 py-3">
|
|
@@ -106,24 +102,13 @@
|
|
|
106
102
|
@mounted="(el) => updateRowHeight(`row_${row._primaryKeyValue}`, el.offsetHeight)"
|
|
107
103
|
>
|
|
108
104
|
<td class="w-4 p-4 cursor-default" @click="(e)=>e.stopPropagation()">
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class="peer appearance-none w-4 h-4 text-blue-600 bg-gray-50 border border-gray-500 rounded-sm checked:bg-blue-500
|
|
117
|
-
focus:ring-blue-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800
|
|
118
|
-
focus:ring-2 dark:bg-gray-700 dark:border-gray-600 dark:checked:bg-blue-500 cursor-pointer"
|
|
119
|
-
/>
|
|
120
|
-
<label for="checkbox-table-search-1" class="sr-only">
|
|
121
|
-
{{ $t('checkbox') }}
|
|
122
|
-
</label>
|
|
123
|
-
<div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden">
|
|
124
|
-
<IconCheckOutline width="18" height="18" />
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
105
|
+
<Checkbox
|
|
106
|
+
:model-value="checkboxesInternal.includes(row._primaryKeyValue)"
|
|
107
|
+
@change="(e)=>{addToCheckedValues(row._primaryKeyValue)}"
|
|
108
|
+
@click="(e)=>e.stopPropagation()"
|
|
109
|
+
>
|
|
110
|
+
<span class="sr-only">{{ $t('checkbox') }}</span>
|
|
111
|
+
</Checkbox>
|
|
127
112
|
</td>
|
|
128
113
|
<td v-for="c in columnsListed" class="px-2 md:px-3 lg:px-6 py-4">
|
|
129
114
|
<!-- if c.name in listComponentsPerColumn, render it. If not, render ValueRenderer -->
|
|
@@ -342,6 +327,7 @@ import router from '@/router';
|
|
|
342
327
|
import { Tooltip } from '@/afcl';
|
|
343
328
|
import type { AdminForthResourceCommon } from '@/types/Common';
|
|
344
329
|
import adminforth from '@/adminforth';
|
|
330
|
+
import Checkbox from '@/afcl/Checkbox.vue';
|
|
345
331
|
|
|
346
332
|
const coreStore = useCoreStore();
|
|
347
333
|
const { t } = useI18n();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Toggle
|
|
3
|
+
:disabled="readonly"
|
|
4
|
+
@update:modelValue="$emit('update:value', $event)"
|
|
5
|
+
:modelValue="valueFromRecord"
|
|
6
|
+
>
|
|
7
|
+
<p>{{text}}</p>
|
|
8
|
+
</Toggle>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import Toggle from '@/afcl/Toggle.vue';
|
|
13
|
+
import type {
|
|
14
|
+
AdminForthResourceColumnCommon,
|
|
15
|
+
AdminForthResourceCommon,
|
|
16
|
+
AdminUser,
|
|
17
|
+
} from "@/types/Common";
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{
|
|
20
|
+
value: boolean,
|
|
21
|
+
text: string,
|
|
22
|
+
column: AdminForthResourceColumnCommon,
|
|
23
|
+
record: any,
|
|
24
|
+
meta: any,
|
|
25
|
+
resource: AdminForthResourceCommon,
|
|
26
|
+
adminUser: AdminUser,
|
|
27
|
+
readonly: boolean
|
|
28
|
+
}>();
|
|
29
|
+
console.log(JSON.stringify(props));
|
|
30
|
+
console.log("Current mode:", props.meta?.mode)
|
|
31
|
+
defineEmits(['update:value']);
|
|
32
|
+
const valueFromRecord = props.record[props.column.name]
|
|
33
|
+
const editReadOnly = props.column.editReadonly;
|
|
34
|
+
</script>
|