chore: improve type imports
This commit is contained in:
@ -60,7 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {watch, computed, shallowRef, watchEffect, VNode, h} from 'vue'
|
||||
import {watch, computed, shallowRef, watchEffect, type VNode, h} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {useEventListener} from '@vueuse/core'
|
||||
|
@ -143,7 +143,7 @@
|
||||
import {ref, computed, onMounted, onBeforeMount} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
import draggable from 'zhyswan-vuedraggable'
|
||||
import {SortableEvent} from 'sortablejs'
|
||||
import type {SortableEvent} from 'sortablejs'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue'
|
||||
@ -154,9 +154,10 @@ import Logo from '@/components/home/Logo.vue'
|
||||
import {MENU_ACTIVE} from '@/store/mutation-types'
|
||||
import {calculateItemPosition} from '@/helpers/calculateItemPosition'
|
||||
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||
import {getListTitle} from '@/helpers/getListTitle'
|
||||
import {useEventListener} from '@vueuse/core'
|
||||
import NamespaceModel from '@/models/namespace'
|
||||
import ListModel from '@/models/list'
|
||||
import type NamespaceModel from '@/models/namespace'
|
||||
import type ListModel from '@/models/list'
|
||||
|
||||
const drag = ref(false)
|
||||
const dragOptions = {
|
||||
|
@ -26,7 +26,7 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {computed, useSlots, PropType} from 'vue'
|
||||
import {computed, useSlots, type PropType} from 'vue'
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
|
||||
const BUTTON_TYPES_MAP = Object.freeze({
|
||||
|
@ -84,7 +84,7 @@ import Dropdown from '@/components/misc/dropdown.vue'
|
||||
import DropdownItem from '@/components/misc/dropdown-item.vue'
|
||||
import TaskSubscription from '@/components/misc/subscription.vue'
|
||||
import ListModel from '@/models/list'
|
||||
import SubscriptionModel from '@/models/subscription'
|
||||
import type SubscriptionModel from '@/models/subscription'
|
||||
|
||||
const props = defineProps({
|
||||
list: {
|
||||
|
@ -186,8 +186,8 @@
|
||||
<script lang="ts">
|
||||
import {defineComponent} from 'vue'
|
||||
|
||||
import DatepickerWithRange from '@/components/date/datepickerWithRange'
|
||||
import Fancycheckbox from '../../input/fancycheckbox'
|
||||
import DatepickerWithRange from '@/components/date/datepickerWithRange.vue'
|
||||
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
|
||||
|
||||
import {includesById} from '@/helpers/utils'
|
||||
import PrioritySelect from '@/components/tasks/partials/prioritySelect.vue'
|
||||
|
@ -36,14 +36,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {PropType, ref, watch} from 'vue'
|
||||
import {type PropType, ref, watch} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
|
||||
import ListService from '@/services/list'
|
||||
import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash'
|
||||
|
||||
import {colorIsDark} from '@/helpers/color/colorIsDark'
|
||||
import ListModel from '@/models/list'
|
||||
import type ListModel from '@/models/list'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {PropType} from 'vue'
|
||||
import type {PropType} from 'vue'
|
||||
type Variants = 'default' | 'small'
|
||||
|
||||
defineProps({
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {computed, PropType} from 'vue'
|
||||
import {computed, type PropType} from 'vue'
|
||||
|
||||
const TEXT_ALIGN_MAP = Object.freeze({
|
||||
left: '',
|
||||
|
@ -32,7 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {computed, shallowRef} from 'vue'
|
||||
import {computed, shallowRef, type PropType} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
@ -43,16 +43,21 @@ import SubscriptionModel from '@/models/subscription'
|
||||
|
||||
import {success} from '@/message'
|
||||
|
||||
interface Props {
|
||||
entity: string
|
||||
entityId: number
|
||||
subscription: SubscriptionModel | null
|
||||
type?: 'button' | 'dropdown' | null
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
subscription: null,
|
||||
type: 'button',
|
||||
const props = defineProps({
|
||||
entity: String,
|
||||
entityId: Number,
|
||||
isButton: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
subscription: {
|
||||
type: Object as PropType<SubscriptionModel>,
|
||||
default: null,
|
||||
},
|
||||
type: {
|
||||
type: String as PropType<'button' | 'dropdown' | 'null'>,
|
||||
default: 'button',
|
||||
},
|
||||
})
|
||||
|
||||
const subscriptionEntity = computed<string | null>(() => props.subscription?.entity ?? null)
|
||||
|
@ -139,7 +139,7 @@ export default defineComponent({name: 'userTeamShare'})
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, computed, shallowReactive, ShallowReactive, Ref} from 'vue'
|
||||
import {ref, reactive, computed, shallowReactive, type ShallowReactive, type Ref} from 'vue'
|
||||
import type {PropType} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
@ -44,7 +44,7 @@
|
||||
import {ref, watch, unref, shallowReactive} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {useStore} from 'vuex'
|
||||
import {tryOnMounted, debouncedWatch, useWindowSize, MaybeRef} from '@vueuse/core'
|
||||
import {tryOnMounted, debouncedWatch, useWindowSize, type MaybeRef} from '@vueuse/core'
|
||||
|
||||
import TaskService from '@/services/task'
|
||||
import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue'
|
||||
|
@ -175,12 +175,12 @@
|
||||
import {defineComponent} from 'vue'
|
||||
|
||||
import VueDragResize from 'vue-drag-resize'
|
||||
import EditTask from './edit-task'
|
||||
import EditTask from './edit-task.vue'
|
||||
|
||||
import TaskService from '../../services/task'
|
||||
import TaskModel from '../../models/task'
|
||||
import priorities from '../../models/constants/priorities'
|
||||
import PriorityLabel from './partials/priorityLabel'
|
||||
import PriorityLabel from './partials/priorityLabel.vue'
|
||||
import TaskCollectionService from '../../services/taskCollection'
|
||||
import {mapState} from 'vuex'
|
||||
import Rights from '../../models/constants/rights.json'
|
||||
|
@ -148,7 +148,7 @@ import {defineComponent} from 'vue'
|
||||
|
||||
import AttachmentService from '../../../services/attachment'
|
||||
import AttachmentModel from '../../../models/attachment'
|
||||
import User from '../../misc/user'
|
||||
import User from '@/components/misc/user.vue'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
|
||||
|
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, shallowReactive, watch, PropType} from 'vue'
|
||||
import {ref, shallowReactive, watch, type PropType} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
@ -37,7 +37,7 @@ import Multiselect from '@/components/input/multiselect.vue'
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
|
||||
import {includesById} from '@/helpers/utils'
|
||||
import UserModel from '@/models/user'
|
||||
import type UserModel from '@/models/user'
|
||||
import ListUserService from '@/services/listUsers'
|
||||
import {success} from '@/message'
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {PropType, ref, computed, shallowReactive, watch} from 'vue'
|
||||
import {type PropType, ref, computed, shallowReactive, watch} from 'vue'
|
||||
import {useStore} from 'vuex'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
|
@ -66,15 +66,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent} from 'vue'
|
||||
import {defineComponent, type PropType} from 'vue'
|
||||
|
||||
import {playPop} from '../../../helpers/playPop'
|
||||
import PriorityLabel from '../../../components/tasks/partials/priorityLabel'
|
||||
import User from '../../../components/misc/user'
|
||||
import PriorityLabel from '../../../components/tasks/partials/priorityLabel.vue'
|
||||
import User from '../../../components/misc/user.vue'
|
||||
import Done from '@/components/misc/Done.vue'
|
||||
import Labels from '../../../components/tasks/partials/labels'
|
||||
import ChecklistSummary from './checklist-summary'
|
||||
import {TASK_DEFAULT_COLOR} from '@/models/task'
|
||||
import Labels from '../../../components/tasks/partials/labels.vue'
|
||||
import ChecklistSummary from './checklist-summary.vue'
|
||||
import TaskModel, {TASK_DEFAULT_COLOR} from '@/models/task'
|
||||
|
||||
import {colorIsDark} from '@/helpers/color/colorIsDark'
|
||||
|
||||
@ -95,6 +95,7 @@ export default defineComponent({
|
||||
},
|
||||
props: {
|
||||
task: {
|
||||
type: Object as PropType<TaskModel>,
|
||||
required: true,
|
||||
},
|
||||
loading: {
|
||||
@ -112,7 +113,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
colorIsDark,
|
||||
async toggleTaskDone(task) {
|
||||
async toggleTaskDone(task: TaskModel) {
|
||||
this.loadingInternal = true
|
||||
try {
|
||||
const done = !task.done
|
||||
|
@ -11,8 +11,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type LabelModel from '@/models/label'
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
defineProps({
|
||||
labels: {
|
||||
type: Array as PropType<LabelModel[]>,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
@ -26,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {PropType, ref, onMounted, watch} from 'vue'
|
||||
import {type PropType, ref, onMounted, watch} from 'vue'
|
||||
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import Datepicker from '@/components/input/datepicker.vue'
|
||||
|
@ -99,16 +99,14 @@
|
||||
import {defineComponent} from 'vue'
|
||||
|
||||
import TaskModel from '../../../models/task'
|
||||
import PriorityLabel from './priorityLabel'
|
||||
import PriorityLabel from './priorityLabel.vue'
|
||||
import TaskService from '../../../services/task'
|
||||
import Labels from './labels'
|
||||
import User from '../../misc/user'
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
import Fancycheckbox from '../../input/fancycheckbox'
|
||||
import DeferTask from './defer-task'
|
||||
import Fancycheckbox from '../../input/fancycheckbox.vue'
|
||||
import DeferTask from './defer-task.vue'
|
||||
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
|
||||
import {playPop} from '@/helpers/playPop'
|
||||
import ChecklistSummary from './checklist-summary'
|
||||
import ChecklistSummary from './checklist-summary.vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'singleTaskInList',
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {PropType} from 'vue'
|
||||
import type {PropType} from 'vue'
|
||||
import BaseButton from '@/components/base/BaseButton.vue'
|
||||
|
||||
type Order = 'asc' | 'desc' | 'none'
|
||||
|
Reference in New Issue
Block a user