|
|
@ -26,7 +26,6 @@ import { |
|
|
|
useProject, |
|
|
|
useProject, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import type { Filter } from '~/lib' |
|
|
|
import type { Filter } from '~/lib' |
|
|
|
import SingleSelect from '~/components/cell/SingleSelect.vue' |
|
|
|
|
|
|
|
import MultiSelect from '~/components/cell/MultiSelect.vue' |
|
|
|
import MultiSelect from '~/components/cell/MultiSelect.vue' |
|
|
|
import DatePicker from '~/components/cell/DatePicker.vue' |
|
|
|
import DatePicker from '~/components/cell/DatePicker.vue' |
|
|
|
import YearPicker from '~/components/cell/YearPicker.vue' |
|
|
|
import YearPicker from '~/components/cell/YearPicker.vue' |
|
|
@ -51,13 +50,17 @@ interface Emits { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Props>() |
|
|
|
const props = defineProps<Props>() |
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits<Emits>() |
|
|
|
const emit = defineEmits<Emits>() |
|
|
|
|
|
|
|
|
|
|
|
const column = toRef(props, 'column') |
|
|
|
const column = toRef(props, 'column') |
|
|
|
|
|
|
|
|
|
|
|
const editEnabled = ref(true) |
|
|
|
const editEnabled = ref(true) |
|
|
|
|
|
|
|
|
|
|
|
provide(ColumnInj, column) |
|
|
|
provide(ColumnInj, column) |
|
|
|
|
|
|
|
|
|
|
|
provide(EditModeInj, readonly(editEnabled)) |
|
|
|
provide(EditModeInj, readonly(editEnabled)) |
|
|
|
|
|
|
|
|
|
|
|
provide(ReadonlyInj, ref(false)) |
|
|
|
provide(ReadonlyInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const checkTypeFunctions = { |
|
|
|
const checkTypeFunctions = { |
|
|
@ -109,7 +112,8 @@ const booleanOptions = [ |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
const componentMap: Partial<Record<FilterType, any>> = { |
|
|
|
const componentMap: Partial<Record<FilterType, any>> = { |
|
|
|
isSingleSelect: SingleSelect, |
|
|
|
// use MultiSelect for SingleSelect columns for anyof / nanyof filters |
|
|
|
|
|
|
|
isSingleSelect: MultiSelect, |
|
|
|
isMultiSelect: MultiSelect, |
|
|
|
isMultiSelect: MultiSelect, |
|
|
|
isDate: DatePicker, |
|
|
|
isDate: DatePicker, |
|
|
|
isYear: YearPicker, |
|
|
|
isYear: YearPicker, |
|
|
|