adminforth 2.27.0-next.11 → 2.27.0-next.13
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.js
CHANGED
|
@@ -72,7 +72,7 @@ export const styles = () => ({
|
|
|
72
72
|
lightShowTableUnderHeadingText: "#374151",
|
|
73
73
|
lightShowTablesBodyBackground: "alias:lightForm",
|
|
74
74
|
lightShowTableBodyText: "#6B7280",
|
|
75
|
-
lightShowTableBodyBorder: "#
|
|
75
|
+
lightShowTableBodyBorder: "#E5E7EB",
|
|
76
76
|
/* Show View buttons*/
|
|
77
77
|
lightShowViewButtonBackground: "#FFFFFF",
|
|
78
78
|
lightShowViewButtonBackgroundHover: "#F3F4F6",
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
:min="getFilterMinValue(c.name)"
|
|
124
124
|
:max="getFilterMaxValue(c.name)"
|
|
125
125
|
:valueStart="getFilterItem({ column: c, operator: 'gte' })"
|
|
126
|
-
@update:valueStart="
|
|
126
|
+
@update:valueStart="(val) => rangeChangeHandler((val !== '' && val !== null) ? (c.type === 'decimal' ? String(val) : val) : undefined, c, 'gte')"
|
|
127
127
|
:valueEnd="getFilterItem({ column: c, operator: 'lte' })"
|
|
128
|
-
@update:valueEnd="
|
|
128
|
+
@update:valueEnd="(val) => rangeChangeHandler((val !== '' && val !== null) ? (c.type === 'decimal' ? String(val) : val) : undefined, c, 'lte')"
|
|
129
129
|
/>
|
|
130
130
|
|
|
131
131
|
<div v-else-if="['integer', 'decimal', 'float'].includes(c.type)" class="flex gap-2">
|
|
@@ -275,6 +275,27 @@ const onFilterInput = computed(() => {
|
|
|
275
275
|
}, {});
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
+
// rangeState is used for cutom range picker, because if we change two values very quickly
|
|
279
|
+
// in filters writes only the last one, because of debounce
|
|
280
|
+
const rangeState = reactive({});
|
|
281
|
+
|
|
282
|
+
const updateRange = (column) => {
|
|
283
|
+
debounce(() => {
|
|
284
|
+
const { gte, lte } = rangeState[column.name];
|
|
285
|
+
|
|
286
|
+
setFilterItem({ column, operator: 'gte', value: gte });
|
|
287
|
+
setFilterItem({ column, operator: 'lte', value: lte });
|
|
288
|
+
}, column?.filterOptions?.debounceTimeMs || 10)();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function rangeChangeHandler(value, column, operator) {
|
|
292
|
+
if (!rangeState[column.name]) {
|
|
293
|
+
rangeState[column.name] = { gte: null, lte: null };
|
|
294
|
+
}
|
|
295
|
+
rangeState[column.name][operator] = value;
|
|
296
|
+
updateRange(column);
|
|
297
|
+
}
|
|
298
|
+
|
|
278
299
|
const onSearchInput = computed(() => {
|
|
279
300
|
return createSearchInputHandlers(
|
|
280
301
|
props.columns,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="rounded-lg shadow-resourseFormShadow dark:shadow-darkResourseFormShadow dark:shadow-2xl">
|
|
2
|
+
<div class="rounded-lg shadow-resourseFormShadow dark:shadow-darkResourseFormShadow dark:shadow-2xl border dark:border-darkFormBorder">
|
|
3
3
|
<div v-if="group.groupName && !group.noTitle" class="text-md font-semibold px-6 py-3 flex flex-1 items-center dark:border-darkFormBorder text-lightListTableHeadingText bg-lightFormHeading dark:bg-darkFormHeading dark:text-darkListTableHeadingText rounded-t-lg">
|
|
4
4
|
{{ group.groupName }}
|
|
5
5
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="overflow-x-auto shadow-resourseFormShadow dark:shadow-darkResourseFormShadow"
|
|
2
|
+
<div class="overflow-x-auto shadow-resourseFormShadow dark:shadow-darkResourseFormShadow border dark:border-gray-700"
|
|
3
3
|
:class="{'rounded-default' : isRounded}"
|
|
4
4
|
>
|
|
5
5
|
<div v-if="groupName && !noTitle" class="text-md font-semibold px-6 py-3 flex flex-1 items-center text-lightShowTableHeadingText bg-lightShowTableHeadingBackground dark:bg-darkShowTableHeadingBackground dark:text-darkShowTableHeadingText rounded-t-lg">
|