@hywax/cms-console 1.0.0
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/.nuxt/cms-console/button-copy-text.ts +19 -0
- package/.nuxt/cms-console/button-delete-confirm.ts +5 -0
- package/.nuxt/cms-console/editor/index.ts +0 -0
- package/.nuxt/cms-console/form-panel-aside-section.ts +9 -0
- package/.nuxt/cms-console/form-panel-section.ts +8 -0
- package/.nuxt/cms-console/form-panel.ts +15 -0
- package/.nuxt/cms-console/index.ts +11 -0
- package/.nuxt/cms-console/input-seo.ts +5 -0
- package/.nuxt/cms-console/input-slug.ts +5 -0
- package/.nuxt/cms-console/input-uplora-image.ts +27 -0
- package/.nuxt/cms-console/modal-confirm.ts +5 -0
- package/.nuxt/cms-console/table-panel.ts +8 -0
- package/.nuxt/cms-console/table-search-input.ts +6 -0
- package/.nuxt/cms-console.css +31 -0
- package/dist/module.d.mts +11 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +387 -0
- package/dist/runtime/components/AutocompleteSelect.d.vue.ts +56 -0
- package/dist/runtime/components/AutocompleteSelect.vue +225 -0
- package/dist/runtime/components/AutocompleteSelect.vue.d.ts +56 -0
- package/dist/runtime/components/ButtonCopyText.d.vue.ts +28 -0
- package/dist/runtime/components/ButtonCopyText.vue +70 -0
- package/dist/runtime/components/ButtonCopyText.vue.d.ts +28 -0
- package/dist/runtime/components/ButtonDeleteConfirm.d.vue.ts +38 -0
- package/dist/runtime/components/ButtonDeleteConfirm.vue +62 -0
- package/dist/runtime/components/ButtonDeleteConfirm.vue.d.ts +38 -0
- package/dist/runtime/components/DatePicker.d.vue.ts +43 -0
- package/dist/runtime/components/DatePicker.vue +232 -0
- package/dist/runtime/components/DatePicker.vue.d.ts +43 -0
- package/dist/runtime/components/EditorFull.d.vue.ts +13 -0
- package/dist/runtime/components/EditorFull.vue +139 -0
- package/dist/runtime/components/EditorFull.vue.d.ts +13 -0
- package/dist/runtime/components/EditorLinkPopover.d.vue.ts +8 -0
- package/dist/runtime/components/EditorLinkPopover.vue +137 -0
- package/dist/runtime/components/EditorLinkPopover.vue.d.ts +8 -0
- package/dist/runtime/components/FormPanel.d.vue.ts +47 -0
- package/dist/runtime/components/FormPanel.vue +73 -0
- package/dist/runtime/components/FormPanel.vue.d.ts +47 -0
- package/dist/runtime/components/FormPanelAsideSection.d.vue.ts +24 -0
- package/dist/runtime/components/FormPanelAsideSection.vue +41 -0
- package/dist/runtime/components/FormPanelAsideSection.vue.d.ts +24 -0
- package/dist/runtime/components/FormPanelSection.d.vue.ts +21 -0
- package/dist/runtime/components/FormPanelSection.vue +31 -0
- package/dist/runtime/components/FormPanelSection.vue.d.ts +21 -0
- package/dist/runtime/components/InputSeo.d.vue.ts +21 -0
- package/dist/runtime/components/InputSeo.vue +73 -0
- package/dist/runtime/components/InputSeo.vue.d.ts +21 -0
- package/dist/runtime/components/InputSlug.d.vue.ts +30 -0
- package/dist/runtime/components/InputSlug.vue +70 -0
- package/dist/runtime/components/InputSlug.vue.d.ts +30 -0
- package/dist/runtime/components/InputUploraImage.d.vue.ts +39 -0
- package/dist/runtime/components/InputUploraImage.vue +163 -0
- package/dist/runtime/components/InputUploraImage.vue.d.ts +39 -0
- package/dist/runtime/components/Layout.d.vue.ts +30 -0
- package/dist/runtime/components/Layout.vue +82 -0
- package/dist/runtime/components/Layout.vue.d.ts +30 -0
- package/dist/runtime/components/ModalConfirm.d.vue.ts +33 -0
- package/dist/runtime/components/ModalConfirm.vue +97 -0
- package/dist/runtime/components/ModalConfirm.vue.d.ts +33 -0
- package/dist/runtime/components/TableColumnSorting.d.vue.ts +17 -0
- package/dist/runtime/components/TableColumnSorting.vue +81 -0
- package/dist/runtime/components/TableColumnSorting.vue.d.ts +17 -0
- package/dist/runtime/components/TableColumnVisibility.d.vue.ts +24 -0
- package/dist/runtime/components/TableColumnVisibility.vue +110 -0
- package/dist/runtime/components/TableColumnVisibility.vue.d.ts +24 -0
- package/dist/runtime/components/TableFilters.d.vue.ts +90 -0
- package/dist/runtime/components/TableFilters.vue +199 -0
- package/dist/runtime/components/TableFilters.vue.d.ts +90 -0
- package/dist/runtime/components/TablePanel.d.vue.ts +95 -0
- package/dist/runtime/components/TablePanel.vue +297 -0
- package/dist/runtime/components/TablePanel.vue.d.ts +95 -0
- package/dist/runtime/components/TableSearchInput.d.vue.ts +33 -0
- package/dist/runtime/components/TableSearchInput.vue +97 -0
- package/dist/runtime/components/TableSearchInput.vue.d.ts +33 -0
- package/dist/runtime/composables/useAdmin.d.ts +6 -0
- package/dist/runtime/composables/useAdmin.js +14 -0
- package/dist/runtime/composables/useEditorDragHandle.d.ts +17 -0
- package/dist/runtime/composables/useEditorDragHandle.js +95 -0
- package/dist/runtime/composables/useEditorSuggestions.d.ts +74 -0
- package/dist/runtime/composables/useEditorSuggestions.js +25 -0
- package/dist/runtime/composables/useEditorToolbar.d.ts +121 -0
- package/dist/runtime/composables/useEditorToolbar.js +87 -0
- package/dist/runtime/composables/useQueryState.d.ts +28 -0
- package/dist/runtime/composables/useQueryState.js +105 -0
- package/dist/runtime/composables/useRouteQuery.d.ts +37 -0
- package/dist/runtime/composables/useRouteQuery.js +81 -0
- package/dist/runtime/composables/useSeoStats.d.ts +12 -0
- package/dist/runtime/composables/useSeoStats.js +44 -0
- package/dist/runtime/composables/useTable.d.ts +25 -0
- package/dist/runtime/composables/useTable.js +84 -0
- package/dist/runtime/composables/useTableColumns.d.ts +28 -0
- package/dist/runtime/composables/useTableColumns.js +54 -0
- package/dist/runtime/editor/uplora-image/EditorUploraImage.d.ts +18 -0
- package/dist/runtime/editor/uplora-image/EditorUploraImage.js +42 -0
- package/dist/runtime/editor/uplora-image/EditorUploraImageNode.d.vue.ts +4 -0
- package/dist/runtime/editor/uplora-image/EditorUploraImageNode.vue +23 -0
- package/dist/runtime/editor/uplora-image/EditorUploraImageNode.vue.d.ts +4 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/tv.d.ts +1 -0
- package/dist/runtime/tv.js +4 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/date.d.ts +5 -0
- package/dist/runtime/types/date.js +0 -0
- package/dist/runtime/types/dictionaries.d.ts +1 -0
- package/dist/runtime/types/dictionaries.js +0 -0
- package/dist/runtime/types/index.d.ts +30 -0
- package/dist/runtime/types/index.js +30 -0
- package/dist/runtime/types/seo.d.ts +4 -0
- package/dist/runtime/types/seo.js +0 -0
- package/dist/runtime/utils/auth.d.ts +2 -0
- package/dist/runtime/utils/auth.js +5 -0
- package/dist/runtime/utils/date.d.ts +5 -0
- package/dist/runtime/utils/date.js +15 -0
- package/dist/runtime/utils/formatters.d.ts +5 -0
- package/dist/runtime/utils/formatters.js +24 -0
- package/dist/runtime/utils/index.d.ts +4 -0
- package/dist/runtime/utils/index.js +4 -0
- package/dist/runtime/utils/slugify.d.ts +1 -0
- package/dist/runtime/utils/slugify.js +11 -0
- package/dist/types.d.mts +11 -0
- package/package.json +89 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UPopover v-model:open="isOpen">
|
|
3
|
+
<UChip
|
|
4
|
+
:ui="{ base: 'z-1 size-3' }"
|
|
5
|
+
:show="hiddenColumnsCount > 0"
|
|
6
|
+
:text="hiddenColumnsCount"
|
|
7
|
+
size="xl"
|
|
8
|
+
>
|
|
9
|
+
<UButton
|
|
10
|
+
variant="subtle"
|
|
11
|
+
color="neutral"
|
|
12
|
+
label="Колонки"
|
|
13
|
+
:icon="appConfig.ui.icons.columns"
|
|
14
|
+
/>
|
|
15
|
+
</UChip>
|
|
16
|
+
|
|
17
|
+
<template #content>
|
|
18
|
+
<div class="p-3 min-w-64">
|
|
19
|
+
<h3 class="text-sm mb-2 text-muted">
|
|
20
|
+
Настройка колонок:
|
|
21
|
+
</h3>
|
|
22
|
+
|
|
23
|
+
<div ref="container">
|
|
24
|
+
<div
|
|
25
|
+
v-for="column in sortedItems"
|
|
26
|
+
v-show="column.label"
|
|
27
|
+
:key="column.id"
|
|
28
|
+
class="flex items-center gap-2 rounded hover:bg-elevated"
|
|
29
|
+
>
|
|
30
|
+
<UIcon
|
|
31
|
+
:name="appConfig.ui.icons.drag"
|
|
32
|
+
class="w-4 h-7 text-dimmed cursor-move shrink-0 handle"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<UCheckbox
|
|
36
|
+
class="flex-1 py-1"
|
|
37
|
+
:model-value="column.visible"
|
|
38
|
+
:label="column.label"
|
|
39
|
+
:disabled="!column.canHide"
|
|
40
|
+
@update:model-value="toggleColumnVisibility(column.id, $event)"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</UPopover>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
import { getCmsStorageKey, useAppConfig, useRoute } from "#imports";
|
|
51
|
+
import { syncRef, useLocalStorage } from "@vueuse/core";
|
|
52
|
+
import { useSortable } from "@vueuse/integrations/useSortable";
|
|
53
|
+
import { computed, ref, useTemplateRef, watch } from "vue";
|
|
54
|
+
const props = defineProps({
|
|
55
|
+
storageKey: { type: String, required: false, default: () => useRoute().name },
|
|
56
|
+
table: { type: Object, required: false }
|
|
57
|
+
});
|
|
58
|
+
const visibility = defineModel("visibility", { type: Object, ...{ default: {} } });
|
|
59
|
+
const storedVisibility = useLocalStorage(getCmsStorageKey(`column-visibility:${props.storageKey}`), visibility.value);
|
|
60
|
+
syncRef(storedVisibility, visibility, {
|
|
61
|
+
transform: { ltr: (value) => value }
|
|
62
|
+
});
|
|
63
|
+
const order = defineModel("order", { type: Array, ...{ default: [] } });
|
|
64
|
+
const storedOrder = useLocalStorage(getCmsStorageKey(`column-order:${props.storageKey}`), order.value);
|
|
65
|
+
syncRef(storedOrder, order, {
|
|
66
|
+
transform: { ltr: (value) => value }
|
|
67
|
+
});
|
|
68
|
+
const appConfig = useAppConfig();
|
|
69
|
+
const isOpen = ref(false);
|
|
70
|
+
const columns = computed(() => {
|
|
71
|
+
if (!props.table) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
return props.table.getAllColumns().map((column) => {
|
|
75
|
+
const label = column.columnDef.meta?.headerLabel ?? (typeof column.columnDef.header === "string" ? column.columnDef.header : void 0);
|
|
76
|
+
return {
|
|
77
|
+
id: column.id,
|
|
78
|
+
label,
|
|
79
|
+
visible: column.getIsVisible(),
|
|
80
|
+
canHide: column.getCanHide(),
|
|
81
|
+
onUpdateChecked: (checked) => toggleColumnVisibility(column.id, checked)
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const sortedItems = computed(() => {
|
|
86
|
+
const sortOrder = Object.fromEntries(order.value.map((id, index) => [id, index]));
|
|
87
|
+
return columns.value.toSorted((a, b) => sortOrder[a.id] - sortOrder[b.id]);
|
|
88
|
+
});
|
|
89
|
+
const hiddenColumnsCount = computed(() => {
|
|
90
|
+
return columns.value.filter((column) => !column.visible).length;
|
|
91
|
+
});
|
|
92
|
+
function toggleColumnVisibility(columnId, visible) {
|
|
93
|
+
visibility.value = { ...visibility.value, [columnId]: !!visible };
|
|
94
|
+
}
|
|
95
|
+
const containerRef = useTemplateRef("container");
|
|
96
|
+
const { start: startSortable, stop: stopSortable } = useSortable(containerRef, order, {
|
|
97
|
+
handle: ".handle",
|
|
98
|
+
animation: 150,
|
|
99
|
+
onUpdate: (e) => {
|
|
100
|
+
const newColumnOrder = order.value.length !== sortedItems.value.length ? sortedItems.value.map((column) => column.id) : [...order.value];
|
|
101
|
+
newColumnOrder.splice(
|
|
102
|
+
e.newIndex,
|
|
103
|
+
0,
|
|
104
|
+
newColumnOrder.splice(e.oldIndex, 1)[0]
|
|
105
|
+
);
|
|
106
|
+
order.value = newColumnOrder;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
watch(containerRef, (value) => value ? startSortable() : stopSortable());
|
|
110
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ColumnOrderState, Table, VisibilityState } from '@tanstack/vue-table';
|
|
2
|
+
export interface TableColumnVisibilityProps {
|
|
3
|
+
storageKey?: string;
|
|
4
|
+
table?: Table<any>;
|
|
5
|
+
}
|
|
6
|
+
export type TableColumnVisibilityModel = VisibilityState;
|
|
7
|
+
export type TableColumnVisibilityOrderModel = ColumnOrderState;
|
|
8
|
+
type __VLS_Props = TableColumnVisibilityProps;
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
'visibility'?: TableColumnVisibilityModel;
|
|
11
|
+
'order'?: TableColumnVisibilityOrderModel;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:visibility": (value: VisibilityState) => any;
|
|
16
|
+
"update:order": (value: ColumnOrderState) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:visibility"?: ((value: VisibilityState) => any) | undefined;
|
|
19
|
+
"onUpdate:order"?: ((value: ColumnOrderState) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
storageKey: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { KeysMatching } from '@hywax/cms-runtime';
|
|
2
|
+
import type { FormData, FormFieldProps, FormProps, FormSchema, SelectItem, SelectProps, SelectValue } from '@nuxt/ui';
|
|
3
|
+
import type { MaybeRef, VNode } from 'vue';
|
|
4
|
+
import type { DatePickerProps } from './DatePicker.vue';
|
|
5
|
+
type EnumSelectItem = SelectValue | Required<Pick<Extract<SelectItem, object>, 'value' | 'label'>>;
|
|
6
|
+
interface Presets {
|
|
7
|
+
Input: {
|
|
8
|
+
modelValue: string | undefined;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
};
|
|
11
|
+
InputNumber: {
|
|
12
|
+
modelValue: number | undefined;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
};
|
|
15
|
+
Date: {
|
|
16
|
+
modelValue: DatePickerProps<false>['modelValue'];
|
|
17
|
+
withTime?: DatePickerProps<false>['withTime'];
|
|
18
|
+
};
|
|
19
|
+
DateRange: {
|
|
20
|
+
modelValue: DatePickerProps<true>['modelValue'];
|
|
21
|
+
withTime?: DatePickerProps<true>['withTime'];
|
|
22
|
+
};
|
|
23
|
+
Select: Pick<SelectProps<EnumSelectItem[]>, 'modelValue' | 'items' | 'placeholder'>;
|
|
24
|
+
MultiSelect: Pick<SelectProps<EnumSelectItem[], 'value', true>, 'modelValue' | 'items' | 'placeholder'>;
|
|
25
|
+
Checkbox: {
|
|
26
|
+
modelValue: boolean | undefined;
|
|
27
|
+
};
|
|
28
|
+
Switch: {
|
|
29
|
+
modelValue: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
type GetPresetProps<K extends Presets[keyof Presets]> = {
|
|
33
|
+
[P in keyof Omit<K, 'modelValue'>]: MaybeRef<K[P]>;
|
|
34
|
+
};
|
|
35
|
+
type PresetField<S extends FormSchema = FormSchema> = {
|
|
36
|
+
[P in keyof Presets]: {
|
|
37
|
+
name: KeysMatching<FormData<S>, Presets[P]['modelValue']>;
|
|
38
|
+
render?: P;
|
|
39
|
+
} & GetPresetProps<Presets[P]>;
|
|
40
|
+
}[keyof Presets];
|
|
41
|
+
interface BaseField<S extends FormSchema = FormSchema> {
|
|
42
|
+
name: keyof FormData<S> & string;
|
|
43
|
+
render?: (state: FormData<S>, field: FiltersField<S>) => VNode;
|
|
44
|
+
}
|
|
45
|
+
export type FiltersField<S extends FormSchema = FormSchema> = Omit<FormFieldProps, 'name'> & (BaseField<S> | PresetField<S>);
|
|
46
|
+
export type TableFiltersModel<S extends FormSchema> = FormData<S>;
|
|
47
|
+
export interface TableFiltersProps<S extends FormSchema, F extends FiltersField<S>[] = FiltersField<S>[]> extends Omit<FormProps<S>, 'transform' | 'onSubmit' | 'id' | 'state' | 'nested' | 'name'> {
|
|
48
|
+
source: FormData<S>;
|
|
49
|
+
fields?: F;
|
|
50
|
+
}
|
|
51
|
+
export type TableFiltersSlots<S extends FormSchema> = {
|
|
52
|
+
[K in Extract<keyof FormData<S>, string>]: (props: {
|
|
53
|
+
model: FormData<S>[K];
|
|
54
|
+
state: FormData<S>;
|
|
55
|
+
updateModel: (value: FormData<S>[K]) => any;
|
|
56
|
+
}) => any;
|
|
57
|
+
};
|
|
58
|
+
export interface TableFiltersEmits<S extends FormSchema> {
|
|
59
|
+
submit: [TableFiltersModel<S>];
|
|
60
|
+
reset: [TableFiltersModel<S>];
|
|
61
|
+
}
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
64
|
+
declare const __VLS_export: <S extends FormSchema, F extends FiltersField<S>[] = FiltersField<S>[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
65
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(TableFiltersProps<S, F> & {
|
|
66
|
+
modelValue?: TableFiltersModel<S>;
|
|
67
|
+
}) & {
|
|
68
|
+
onReset?: ((args_0: import("@nuxt/ui").InferOutput<S>) => any) | undefined;
|
|
69
|
+
onSubmit?: ((args_0: import("@nuxt/ui").InferOutput<S>) => any) | undefined;
|
|
70
|
+
"onUpdate:modelValue"?: ((value: import("@nuxt/ui").InferOutput<S> | undefined) => any) | undefined;
|
|
71
|
+
}> & (typeof globalThis extends {
|
|
72
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
73
|
+
} ? P : {});
|
|
74
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
75
|
+
appliedFields: import("vue").ComputedRef<FiltersField<S>[]>;
|
|
76
|
+
clearField: (field: FiltersField<S>) => void;
|
|
77
|
+
reset: () => void;
|
|
78
|
+
submit: (data: TableFiltersModel<S>) => void;
|
|
79
|
+
}>) => void;
|
|
80
|
+
attrs: any;
|
|
81
|
+
slots: TableFiltersSlots<S>;
|
|
82
|
+
emit: (((evt: "reset", args_0: import("@nuxt/ui").InferOutput<S>) => void) & ((evt: "submit", args_0: import("@nuxt/ui").InferOutput<S>) => void)) & ((evt: "update:modelValue", value: import("@nuxt/ui").InferOutput<S> | undefined) => void);
|
|
83
|
+
}>) => import("vue").VNode & {
|
|
84
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
85
|
+
};
|
|
86
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
87
|
+
[K in keyof T]: T[K];
|
|
88
|
+
} : {
|
|
89
|
+
[K in keyof T as K]: T[K];
|
|
90
|
+
}) & {};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UPopover v-model:open="isOpen">
|
|
3
|
+
<UChip
|
|
4
|
+
:ui="{ base: 'z-1 size-3' }"
|
|
5
|
+
:show="appliedFields.length > 0"
|
|
6
|
+
:text="appliedFields.length"
|
|
7
|
+
size="xl"
|
|
8
|
+
>
|
|
9
|
+
<UButton
|
|
10
|
+
variant="subtle"
|
|
11
|
+
color="neutral"
|
|
12
|
+
label="Фильтры"
|
|
13
|
+
:icon="appConfig.ui.icons.filter"
|
|
14
|
+
/>
|
|
15
|
+
</UChip>
|
|
16
|
+
|
|
17
|
+
<template #content>
|
|
18
|
+
<UForm
|
|
19
|
+
:id="formId"
|
|
20
|
+
ref="filters-form"
|
|
21
|
+
class="p-4 w-xs max-h-[60vh] overflow-y-auto"
|
|
22
|
+
:state="models"
|
|
23
|
+
:schema="schema"
|
|
24
|
+
@submit="submit($event.data)"
|
|
25
|
+
>
|
|
26
|
+
<UFormField
|
|
27
|
+
v-for="field of fields"
|
|
28
|
+
:key="field.name"
|
|
29
|
+
v-bind="field"
|
|
30
|
+
>
|
|
31
|
+
<slot
|
|
32
|
+
:name="field.name"
|
|
33
|
+
:model="models[field.name]"
|
|
34
|
+
:state="models"
|
|
35
|
+
:update-model="(value) => models[field.name] = value"
|
|
36
|
+
>
|
|
37
|
+
<component
|
|
38
|
+
:is="presets[field.render]?.(models, field)"
|
|
39
|
+
v-if="typeof field.render === 'string'"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<component
|
|
43
|
+
:is="field.render(models, field)"
|
|
44
|
+
v-else-if="field.render"
|
|
45
|
+
/>
|
|
46
|
+
</slot>
|
|
47
|
+
</UFormField>
|
|
48
|
+
</UForm>
|
|
49
|
+
|
|
50
|
+
<USeparator class="mt-0" orientation="horizontal" />
|
|
51
|
+
|
|
52
|
+
<div class="flex justify-end space-x-2 p-4">
|
|
53
|
+
<UButton
|
|
54
|
+
color="neutral"
|
|
55
|
+
label="Сбросить"
|
|
56
|
+
variant="outline"
|
|
57
|
+
@click="reset"
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<UButton
|
|
61
|
+
type="submit"
|
|
62
|
+
label="Подтвердить"
|
|
63
|
+
:color="formRef && formRef.errors.length > 0 ? 'error' : 'primary'"
|
|
64
|
+
:form="formId"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</UPopover>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import { UCheckbox, UForm, UInput, USelect, USwitch } from "#components";
|
|
73
|
+
import { useAppConfig } from "#imports";
|
|
74
|
+
import { useCloned } from "@vueuse/core";
|
|
75
|
+
import copy from "fast-copy";
|
|
76
|
+
import { deepEqual } from "fast-equals";
|
|
77
|
+
import { computed, h, nextTick, ref, toValue, unref, useId, useTemplateRef, watch } from "vue";
|
|
78
|
+
import CDatePicker from "./DatePicker.vue";
|
|
79
|
+
const presets = {
|
|
80
|
+
Date: (state, field) => h(CDatePicker, {
|
|
81
|
+
"modelValue": state[field.name],
|
|
82
|
+
"withTime": toValue(field.withTime),
|
|
83
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
84
|
+
}),
|
|
85
|
+
DateRange: (state, field) => h(CDatePicker, {
|
|
86
|
+
"modelValue": state[field.name],
|
|
87
|
+
"range": true,
|
|
88
|
+
"withTime": unref(field.withTime),
|
|
89
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
90
|
+
}),
|
|
91
|
+
Input: (state, field) => h(UInput, {
|
|
92
|
+
"modelValue": state[field.name],
|
|
93
|
+
"modelModifiers": { trim: true, optional: true },
|
|
94
|
+
"placeholder": unref(field.placeholder) ?? `\u0412\u0432\u0435\u0434\u0438\u0442\u0435 ${field.label?.toLowerCase() ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"}`,
|
|
95
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
96
|
+
}, {}),
|
|
97
|
+
InputNumber: (state, field) => h(UInput, {
|
|
98
|
+
"modelValue": state[field.name],
|
|
99
|
+
"modelModifiers": { number: true, optional: true },
|
|
100
|
+
"placeholder": unref(field.placeholder) ?? `\u0412\u0432\u0435\u0434\u0438\u0442\u0435 ${field.label?.toLowerCase() ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"}`,
|
|
101
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
102
|
+
}, {}),
|
|
103
|
+
Select: (state, field) => h(USelect, {
|
|
104
|
+
"modelValue": state[field.name],
|
|
105
|
+
"items": unref(field.items),
|
|
106
|
+
"placeholder": unref(field.placeholder) ?? `\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ${field.label?.toLowerCase() ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"}`,
|
|
107
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
108
|
+
}, {}),
|
|
109
|
+
MultiSelect: (state, field) => h(USelect, {
|
|
110
|
+
"modelValue": state[field.name],
|
|
111
|
+
"items": unref(field.items),
|
|
112
|
+
"placeholder": unref(field.placeholder) ?? `\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ${field.label?.toLowerCase() ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"}`,
|
|
113
|
+
"multiple": true,
|
|
114
|
+
"onUpdate:modelValue": (value) => state[field.name] = value
|
|
115
|
+
}, {}),
|
|
116
|
+
Checkbox: (state, field) => h(UCheckbox, {
|
|
117
|
+
"modelValue": state[field.name],
|
|
118
|
+
"label": unref(field.label),
|
|
119
|
+
"onUpdate:modelValue": (value) => state[field.name] = Boolean(value) || void 0
|
|
120
|
+
}),
|
|
121
|
+
Switch: (state, field) => h(USwitch, {
|
|
122
|
+
"modelValue": state[field.name],
|
|
123
|
+
"label": unref(field.label),
|
|
124
|
+
"onUpdate:modelValue": (value) => state[field.name] = value || void 0
|
|
125
|
+
})
|
|
126
|
+
};
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<script setup>
|
|
130
|
+
const props = defineProps({
|
|
131
|
+
source: { type: null, required: true },
|
|
132
|
+
fields: { type: null, required: false },
|
|
133
|
+
schema: { type: null, required: false },
|
|
134
|
+
validate: { type: Function, required: false },
|
|
135
|
+
validateOn: { type: Array, required: false },
|
|
136
|
+
disabled: { type: Boolean, required: false },
|
|
137
|
+
validateOnInputDelay: { type: Number, required: false },
|
|
138
|
+
loadingAuto: { type: Boolean, required: false },
|
|
139
|
+
class: { type: null, required: false }
|
|
140
|
+
});
|
|
141
|
+
const emit = defineEmits(["submit", "reset"]);
|
|
142
|
+
defineSlots();
|
|
143
|
+
const appConfig = useAppConfig();
|
|
144
|
+
const filters = defineModel({ type: null });
|
|
145
|
+
const formId = `form-${useId()}`;
|
|
146
|
+
const formRef = useTemplateRef("filters-form");
|
|
147
|
+
const { cloned: models, sync: resetModels } = useCloned(() => props.source, {
|
|
148
|
+
clone: copy
|
|
149
|
+
});
|
|
150
|
+
const appliedFields = computed(() => {
|
|
151
|
+
return props.fields?.filter((field) => {
|
|
152
|
+
let value = filters.value?.[field.name];
|
|
153
|
+
let sourceValue = props.source?.[field.name];
|
|
154
|
+
if (value === "" || value === null || value === void 0 || Array.isArray(value) && value.length === 0) {
|
|
155
|
+
value = null;
|
|
156
|
+
}
|
|
157
|
+
if (sourceValue === "" || sourceValue === null || sourceValue === void 0 || Array.isArray(sourceValue) && sourceValue.length === 0) {
|
|
158
|
+
sourceValue = null;
|
|
159
|
+
}
|
|
160
|
+
return value !== sourceValue && !deepEqual(value, sourceValue);
|
|
161
|
+
}) ?? [];
|
|
162
|
+
});
|
|
163
|
+
let _isInternalUpdate = false;
|
|
164
|
+
watch(filters, (value) => {
|
|
165
|
+
if (!value) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (_isInternalUpdate) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
models.value = copy(value);
|
|
172
|
+
}, { immediate: true, deep: true });
|
|
173
|
+
const isOpen = ref(false);
|
|
174
|
+
function submit(data) {
|
|
175
|
+
filters.value = copy(data);
|
|
176
|
+
emit("submit", filters.value);
|
|
177
|
+
isOpen.value = false;
|
|
178
|
+
_isInternalUpdate = true;
|
|
179
|
+
nextTick(() => _isInternalUpdate = false);
|
|
180
|
+
}
|
|
181
|
+
function reset() {
|
|
182
|
+
resetModels();
|
|
183
|
+
filters.value = copy(models.value);
|
|
184
|
+
emit("reset", filters.value);
|
|
185
|
+
isOpen.value = false;
|
|
186
|
+
_isInternalUpdate = true;
|
|
187
|
+
nextTick(() => _isInternalUpdate = false);
|
|
188
|
+
}
|
|
189
|
+
function clearField(field) {
|
|
190
|
+
models.value = copy({ ...models.value, [field.name]: props.source[field.name] });
|
|
191
|
+
submit(models.value);
|
|
192
|
+
}
|
|
193
|
+
defineExpose({
|
|
194
|
+
appliedFields,
|
|
195
|
+
clearField,
|
|
196
|
+
reset,
|
|
197
|
+
submit
|
|
198
|
+
});
|
|
199
|
+
</script>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { KeysMatching } from '@hywax/cms-runtime';
|
|
2
|
+
import type { FormData, FormFieldProps, FormProps, FormSchema, SelectItem, SelectProps, SelectValue } from '@nuxt/ui';
|
|
3
|
+
import type { MaybeRef, VNode } from 'vue';
|
|
4
|
+
import type { DatePickerProps } from './DatePicker.vue';
|
|
5
|
+
type EnumSelectItem = SelectValue | Required<Pick<Extract<SelectItem, object>, 'value' | 'label'>>;
|
|
6
|
+
interface Presets {
|
|
7
|
+
Input: {
|
|
8
|
+
modelValue: string | undefined;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
};
|
|
11
|
+
InputNumber: {
|
|
12
|
+
modelValue: number | undefined;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
};
|
|
15
|
+
Date: {
|
|
16
|
+
modelValue: DatePickerProps<false>['modelValue'];
|
|
17
|
+
withTime?: DatePickerProps<false>['withTime'];
|
|
18
|
+
};
|
|
19
|
+
DateRange: {
|
|
20
|
+
modelValue: DatePickerProps<true>['modelValue'];
|
|
21
|
+
withTime?: DatePickerProps<true>['withTime'];
|
|
22
|
+
};
|
|
23
|
+
Select: Pick<SelectProps<EnumSelectItem[]>, 'modelValue' | 'items' | 'placeholder'>;
|
|
24
|
+
MultiSelect: Pick<SelectProps<EnumSelectItem[], 'value', true>, 'modelValue' | 'items' | 'placeholder'>;
|
|
25
|
+
Checkbox: {
|
|
26
|
+
modelValue: boolean | undefined;
|
|
27
|
+
};
|
|
28
|
+
Switch: {
|
|
29
|
+
modelValue: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
type GetPresetProps<K extends Presets[keyof Presets]> = {
|
|
33
|
+
[P in keyof Omit<K, 'modelValue'>]: MaybeRef<K[P]>;
|
|
34
|
+
};
|
|
35
|
+
type PresetField<S extends FormSchema = FormSchema> = {
|
|
36
|
+
[P in keyof Presets]: {
|
|
37
|
+
name: KeysMatching<FormData<S>, Presets[P]['modelValue']>;
|
|
38
|
+
render?: P;
|
|
39
|
+
} & GetPresetProps<Presets[P]>;
|
|
40
|
+
}[keyof Presets];
|
|
41
|
+
interface BaseField<S extends FormSchema = FormSchema> {
|
|
42
|
+
name: keyof FormData<S> & string;
|
|
43
|
+
render?: (state: FormData<S>, field: FiltersField<S>) => VNode;
|
|
44
|
+
}
|
|
45
|
+
export type FiltersField<S extends FormSchema = FormSchema> = Omit<FormFieldProps, 'name'> & (BaseField<S> | PresetField<S>);
|
|
46
|
+
export type TableFiltersModel<S extends FormSchema> = FormData<S>;
|
|
47
|
+
export interface TableFiltersProps<S extends FormSchema, F extends FiltersField<S>[] = FiltersField<S>[]> extends Omit<FormProps<S>, 'transform' | 'onSubmit' | 'id' | 'state' | 'nested' | 'name'> {
|
|
48
|
+
source: FormData<S>;
|
|
49
|
+
fields?: F;
|
|
50
|
+
}
|
|
51
|
+
export type TableFiltersSlots<S extends FormSchema> = {
|
|
52
|
+
[K in Extract<keyof FormData<S>, string>]: (props: {
|
|
53
|
+
model: FormData<S>[K];
|
|
54
|
+
state: FormData<S>;
|
|
55
|
+
updateModel: (value: FormData<S>[K]) => any;
|
|
56
|
+
}) => any;
|
|
57
|
+
};
|
|
58
|
+
export interface TableFiltersEmits<S extends FormSchema> {
|
|
59
|
+
submit: [TableFiltersModel<S>];
|
|
60
|
+
reset: [TableFiltersModel<S>];
|
|
61
|
+
}
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
64
|
+
declare const __VLS_export: <S extends FormSchema, F extends FiltersField<S>[] = FiltersField<S>[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
65
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(TableFiltersProps<S, F> & {
|
|
66
|
+
modelValue?: TableFiltersModel<S>;
|
|
67
|
+
}) & {
|
|
68
|
+
onReset?: ((args_0: import("@nuxt/ui").InferOutput<S>) => any) | undefined;
|
|
69
|
+
onSubmit?: ((args_0: import("@nuxt/ui").InferOutput<S>) => any) | undefined;
|
|
70
|
+
"onUpdate:modelValue"?: ((value: import("@nuxt/ui").InferOutput<S> | undefined) => any) | undefined;
|
|
71
|
+
}> & (typeof globalThis extends {
|
|
72
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
73
|
+
} ? P : {});
|
|
74
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
75
|
+
appliedFields: import("vue").ComputedRef<FiltersField<S>[]>;
|
|
76
|
+
clearField: (field: FiltersField<S>) => void;
|
|
77
|
+
reset: () => void;
|
|
78
|
+
submit: (data: TableFiltersModel<S>) => void;
|
|
79
|
+
}>) => void;
|
|
80
|
+
attrs: any;
|
|
81
|
+
slots: TableFiltersSlots<S>;
|
|
82
|
+
emit: (((evt: "reset", args_0: import("@nuxt/ui").InferOutput<S>) => void) & ((evt: "submit", args_0: import("@nuxt/ui").InferOutput<S>) => void)) & ((evt: "update:modelValue", value: import("@nuxt/ui").InferOutput<S> | undefined) => void);
|
|
83
|
+
}>) => import("vue").VNode & {
|
|
84
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
85
|
+
};
|
|
86
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
87
|
+
[K in keyof T]: T[K];
|
|
88
|
+
} : {
|
|
89
|
+
[K in keyof T as K]: T[K];
|
|
90
|
+
}) & {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { AsyncDataRequestStatus } from '#app';
|
|
2
|
+
import type { ComponentConfig, OptionalKeys } from '@hywax/cms-runtime';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import type { DropdownMenuItem, FormSchema, PaginationEmits, PaginationProps, TableData, TableProps, TableRow, TableSlots } from '@nuxt/ui';
|
|
5
|
+
import type { ColumnPinningState, GroupingState, RowSelectionState } from '@tanstack/vue-table';
|
|
6
|
+
import type { ModalConfirmProps } from './ModalConfirm.vue';
|
|
7
|
+
import type { TableColumnSortingModel } from './TableColumnSorting.vue';
|
|
8
|
+
import type { TableColumnVisibilityProps } from './TableColumnVisibility.vue';
|
|
9
|
+
import type { TableFiltersEmits, TableFiltersModel, TableFiltersProps, TableFiltersSlots } from './TableFilters.vue';
|
|
10
|
+
import theme from '#build/cms-console/table-panel';
|
|
11
|
+
type TablePanel = ComponentConfig<typeof theme, AppConfig, 'tablePanel'>;
|
|
12
|
+
export interface ActionMenuItem extends DropdownMenuItem {
|
|
13
|
+
confirm?: ModalConfirmProps;
|
|
14
|
+
delete?: OptionalKeys<ModalConfirmProps, 'message'>;
|
|
15
|
+
visibility?: () => boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface TablePanelProps<Data extends TableData, Schema extends FormSchema> {
|
|
18
|
+
title?: string;
|
|
19
|
+
status?: AsyncDataRequestStatus;
|
|
20
|
+
page?: PaginationProps['page'];
|
|
21
|
+
itemsPerPage?: PaginationProps['itemsPerPage'];
|
|
22
|
+
total?: PaginationProps['total'];
|
|
23
|
+
storageKey?: TableColumnVisibilityProps['storageKey'];
|
|
24
|
+
/** @default true */
|
|
25
|
+
columnVisibility?: boolean;
|
|
26
|
+
defaultHiddenColumns?: string[];
|
|
27
|
+
sorting?: TableColumnSortingModel;
|
|
28
|
+
columns?: TableProps<Data>['columns'];
|
|
29
|
+
data?: TableProps<Data>['data'];
|
|
30
|
+
/** @default true */
|
|
31
|
+
sticky?: TableProps<Data>['sticky'];
|
|
32
|
+
columnPinning?: ColumnPinningState;
|
|
33
|
+
getRowId?: TableProps<Data>['getRowId'];
|
|
34
|
+
rowSelection?: RowSelectionState;
|
|
35
|
+
rowSelectionOptions?: TableProps<Data>['rowSelectionOptions'];
|
|
36
|
+
/** @default true */
|
|
37
|
+
resetRowSelection?: boolean;
|
|
38
|
+
grouping?: GroupingState;
|
|
39
|
+
/** @default { getGroupedRowModel: getGroupedRowModel(), groupedColumnMode: false } */
|
|
40
|
+
groupingOptions?: TableProps<Data>['groupingOptions'];
|
|
41
|
+
hideSelectedFilters?: true;
|
|
42
|
+
filters?: TableFiltersModel<Schema>;
|
|
43
|
+
filtersSchema?: Schema;
|
|
44
|
+
filtersSource?: TableFiltersProps<Schema>['source'];
|
|
45
|
+
filtersFields?: TableFiltersProps<Schema>['fields'];
|
|
46
|
+
empty?: TableProps<Data>['empty'];
|
|
47
|
+
actions?: ((row: TableRow<Data>) => ActionMenuItem[] | undefined);
|
|
48
|
+
onSelect?: TableProps<Data>['onSelect'];
|
|
49
|
+
class?: any;
|
|
50
|
+
ui?: TablePanel['slots'];
|
|
51
|
+
}
|
|
52
|
+
export interface TablePanelEmits<Schema extends FormSchema> {
|
|
53
|
+
'update:page': PaginationEmits['update:page'];
|
|
54
|
+
'update:items-per-page': [value: number];
|
|
55
|
+
'update:sorting': [value: TableColumnSortingModel];
|
|
56
|
+
'update:row-selection': [value?: RowSelectionState];
|
|
57
|
+
'update:filters': [value: TableFiltersModel<Schema>];
|
|
58
|
+
'update:grouping': [value?: GroupingState];
|
|
59
|
+
'filtersReset': TableFiltersEmits<Schema>['reset'];
|
|
60
|
+
'filtersSubmit': TableFiltersEmits<Schema>['submit'];
|
|
61
|
+
}
|
|
62
|
+
export type TablePanelSlots<Data extends TableData, Schema extends FormSchema> = TableSlots<Data> & {
|
|
63
|
+
'toolbar-left'?: () => any;
|
|
64
|
+
'navbar-right'?: () => any;
|
|
65
|
+
'toolbar-right'?: () => any;
|
|
66
|
+
} & {
|
|
67
|
+
[P in keyof TableFiltersSlots<Schema> as `filter-${P}`]: TableFiltersSlots<Schema>[P];
|
|
68
|
+
};
|
|
69
|
+
declare const _default: typeof __VLS_export;
|
|
70
|
+
export default _default;
|
|
71
|
+
declare const __VLS_export: <Data extends TableData, Schema extends FormSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
72
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TablePanelProps<Data, Schema> & {
|
|
73
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
74
|
+
"onUpdate:items-per-page"?: ((value: number) => any) | undefined;
|
|
75
|
+
"onUpdate:sorting"?: ((value: import("@tanstack/table-core").SortingState) => any) | undefined;
|
|
76
|
+
"onUpdate:row-selection"?: ((value?: RowSelectionState | undefined) => any) | undefined;
|
|
77
|
+
"onUpdate:filters"?: ((value: import("@nuxt/ui").InferOutput<Schema>) => any) | undefined;
|
|
78
|
+
"onUpdate:grouping"?: ((value?: GroupingState | undefined) => any) | undefined;
|
|
79
|
+
onFiltersReset?: ((args_0: import("@nuxt/ui").InferOutput<Schema>) => any) | undefined;
|
|
80
|
+
onFiltersSubmit?: ((args_0: import("@nuxt/ui").InferOutput<Schema>) => any) | undefined;
|
|
81
|
+
}> & (typeof globalThis extends {
|
|
82
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
83
|
+
} ? P : {});
|
|
84
|
+
expose: (exposed: {}) => void;
|
|
85
|
+
attrs: any;
|
|
86
|
+
slots: TablePanelSlots<Data, Schema>;
|
|
87
|
+
emit: ((evt: "update:page", value: number) => void) & ((evt: "update:items-per-page", value: number) => void) & ((evt: "update:sorting", value: import("@tanstack/table-core").SortingState) => void) & ((evt: "update:row-selection", value?: RowSelectionState | undefined) => void) & ((evt: "update:filters", value: import("@nuxt/ui").InferOutput<Schema>) => void) & ((evt: "update:grouping", value?: GroupingState | undefined) => void) & ((evt: "filtersReset", args_0: import("@nuxt/ui").InferOutput<Schema>) => void) & ((evt: "filtersSubmit", args_0: import("@nuxt/ui").InferOutput<Schema>) => void);
|
|
88
|
+
}>) => import("vue").VNode & {
|
|
89
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
90
|
+
};
|
|
91
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
92
|
+
[K in keyof T]: T[K];
|
|
93
|
+
} : {
|
|
94
|
+
[K in keyof T as K]: T[K];
|
|
95
|
+
}) & {};
|