forked from vikunja/frontend
Compare commits
2 Commits
main
...
renovate/e
Author | SHA1 | Date |
---|---|---|
kolaente | 6da6c6eb20 | |
renovate | c1fa64afc7 |
|
@ -120,7 +120,7 @@
|
|||
"cypress": "12.13.0",
|
||||
"esbuild": "0.17.19",
|
||||
"eslint": "8.41.0",
|
||||
"eslint-plugin-vue": "9.13.0",
|
||||
"eslint-plugin-vue": "9.14.0",
|
||||
"happy-dom": "9.20.1",
|
||||
"histoire": "0.16.1",
|
||||
"postcss": "8.4.23",
|
||||
|
|
|
@ -196,7 +196,7 @@ devDependencies:
|
|||
version: 4.2.3(vite@4.3.8)(vue@3.2.47)
|
||||
'@vue/eslint-config-typescript':
|
||||
specifier: 11.0.3
|
||||
version: 11.0.3(eslint-plugin-vue@9.13.0)(eslint@8.41.0)(typescript@5.0.4)
|
||||
version: 11.0.3(eslint-plugin-vue@9.14.0)(eslint@8.41.0)(typescript@5.0.4)
|
||||
'@vue/test-utils':
|
||||
specifier: 2.3.2
|
||||
version: 2.3.2(vue@3.2.47)
|
||||
|
@ -228,8 +228,8 @@ devDependencies:
|
|||
specifier: 8.41.0
|
||||
version: 8.41.0
|
||||
eslint-plugin-vue:
|
||||
specifier: 9.13.0
|
||||
version: 9.13.0(eslint@8.41.0)
|
||||
specifier: 9.14.0
|
||||
version: 9.14.0(eslint@8.41.0)
|
||||
happy-dom:
|
||||
specifier: 9.20.1
|
||||
version: 9.20.1
|
||||
|
@ -3361,7 +3361,7 @@ packages:
|
|||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
dev: false
|
||||
|
||||
/@vue/eslint-config-typescript@11.0.3(eslint-plugin-vue@9.13.0)(eslint@8.41.0)(typescript@5.0.4):
|
||||
/@vue/eslint-config-typescript@11.0.3(eslint-plugin-vue@9.14.0)(eslint@8.41.0)(typescript@5.0.4):
|
||||
resolution: {integrity: sha512-dkt6W0PX6H/4Xuxg/BlFj5xHvksjpSlVjtkQCpaYJBIEuKj2hOVU7r+TIe+ysCwRYFz/lGqvklntRkCAibsbPw==}
|
||||
engines: {node: ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
|
@ -3375,7 +3375,7 @@ packages:
|
|||
'@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7)(eslint@8.41.0)(typescript@5.0.4)
|
||||
'@typescript-eslint/parser': 5.59.7(eslint@8.41.0)(typescript@5.0.4)
|
||||
eslint: 8.41.0
|
||||
eslint-plugin-vue: 9.13.0(eslint@8.41.0)
|
||||
eslint-plugin-vue: 9.14.0(eslint@8.41.0)
|
||||
typescript: 5.0.4
|
||||
vue-eslint-parser: 9.1.1(eslint@8.41.0)
|
||||
transitivePeerDependencies:
|
||||
|
@ -4958,8 +4958,8 @@ packages:
|
|||
optionalDependencies:
|
||||
source-map: 0.6.1
|
||||
|
||||
/eslint-plugin-vue@9.13.0(eslint@8.41.0):
|
||||
resolution: {integrity: sha512-aBz9A8WB4wmpnVv0pYUt86cmH9EkcwWzgEwecBxMoRNhQjTL5i4sqadnwShv/hOdr8Hbl8XANGV7dtX9UQIAyA==}
|
||||
/eslint-plugin-vue@9.14.0(eslint@8.41.0):
|
||||
resolution: {integrity: sha512-4O7EuiqPGVQA1wYCzLvCzsBTv9JIPHLHhrf0k55DLzbwtmJbSw2TKS0G/l7pOwi9RWMSkjIT7ftChU5gZpgnJw==}
|
||||
engines: {node: ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
|
||||
|
|
|
@ -74,6 +74,7 @@ export interface BaseButtonEmits {
|
|||
(e: 'click', payload: MouseEvent): void
|
||||
}
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const {
|
||||
type = BASE_BUTTON_TYPES_MAP.BUTTON,
|
||||
disabled = false,
|
||||
|
|
|
@ -66,9 +66,9 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const modelValue = toRef(props, 'modelValue')
|
||||
const modelValueRef = toRef(props, 'modelValue')
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
(newValue) => {
|
||||
color.value = newValue
|
||||
},
|
||||
|
|
|
@ -56,6 +56,7 @@ export interface ButtonProps extends BaseButtonProps {
|
|||
wrap?: boolean
|
||||
}
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const {
|
||||
variant = 'primary',
|
||||
icon = '',
|
||||
|
|
|
@ -134,9 +134,9 @@ const changed = ref(false)
|
|||
onMounted(() => document.addEventListener('click', hideDatePopup))
|
||||
onBeforeUnmount(() =>document.removeEventListener('click', hideDatePopup))
|
||||
|
||||
const modelValue = toRef(props, 'modelValue')
|
||||
const modelValueRef = toRef(props, 'modelValue')
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
setDateValue,
|
||||
{immediate: true},
|
||||
)
|
||||
|
|
|
@ -157,10 +157,10 @@ const config = ref(createEasyMDEConfig({
|
|||
|
||||
const checkboxId = ref(createRandomID())
|
||||
|
||||
const {modelValue} = toRefs(props)
|
||||
const {modelValue: modelValueRef} = toRefs(props)
|
||||
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
async (value) => {
|
||||
text.value = value
|
||||
await nextTick()
|
||||
|
@ -172,7 +172,7 @@ watch(
|
|||
text,
|
||||
(newVal, oldVal) => {
|
||||
// Only bubble the new value if it actually changed, but not if the component just got mounted and the text changed from the outside.
|
||||
if (oldVal === '' && text.value === modelValue.value) {
|
||||
if (oldVal === '' && text.value === modelValueRef.value) {
|
||||
return
|
||||
}
|
||||
bubble()
|
||||
|
@ -181,8 +181,8 @@ watch(
|
|||
|
||||
|
||||
onMounted(() => {
|
||||
if (modelValue.value !== '') {
|
||||
text.value = modelValue.value
|
||||
if (modelValueRef.value !== '') {
|
||||
text.value = modelValueRef.value
|
||||
}
|
||||
|
||||
if (props.previewIsDefault && props.hasPreview) {
|
||||
|
|
|
@ -227,10 +227,10 @@ const internalValue = ref<string | {[key: string]: any} | any[] | null>(null)
|
|||
onMounted(() => document.addEventListener('click', hideSearchResultsHandler))
|
||||
onBeforeUnmount(() => document.removeEventListener('click', hideSearchResultsHandler))
|
||||
|
||||
const {modelValue, searchResults} = toRefs(props)
|
||||
const {modelValue: modelValueRef, searchResults: searchResultsRef} = toRefs(props)
|
||||
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
(value) => setSelectedObject(value),
|
||||
{
|
||||
immediate: true,
|
||||
|
@ -261,10 +261,10 @@ const creatableAvailable = computed(() => {
|
|||
const filteredSearchResults = computed(() => {
|
||||
const currentInternal = internalValue.value
|
||||
if (props.multiple && currentInternal !== null && Array.isArray(currentInternal)) {
|
||||
return searchResults.value.filter((item: any) => !currentInternal.some(e => e === item))
|
||||
return searchResultsRef.value.filter((item: any) => !currentInternal.some(e => e === item))
|
||||
}
|
||||
|
||||
return searchResults.value
|
||||
return searchResultsRef.value
|
||||
})
|
||||
|
||||
const hasMultiple = computed(() => {
|
||||
|
@ -392,8 +392,8 @@ function create() {
|
|||
}
|
||||
|
||||
function createOrSelectOnEnter() {
|
||||
if (!creatableAvailable.value && searchResults.value.length === 1) {
|
||||
select(searchResults.value[0])
|
||||
if (!creatableAvailable.value && searchResultsRef.value.length === 1) {
|
||||
select(searchResultsRef.value[0])
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ const emit = defineEmits([
|
|||
...allEvents.map(camelToKebab),
|
||||
])
|
||||
|
||||
const {modelValue, config, disabled} = toRefs(props)
|
||||
const {modelValue: modelValueRef, config: configRef, disabled: disabledRef} = toRefs(props)
|
||||
|
||||
// bind listener like onBlur
|
||||
const attrs = useAttrs()
|
||||
|
@ -159,7 +159,7 @@ onMounted(() => {
|
|||
})
|
||||
onBeforeUnmount(() => fp.value?.destroy())
|
||||
|
||||
watch(config, () => {
|
||||
watch(configRef, () => {
|
||||
if (!fp.value) return
|
||||
// Workaround: Don't pass hooks to configs again otherwise
|
||||
// previously registered hooks will stop working
|
||||
|
@ -201,7 +201,7 @@ onBeforeUnmount(() => fpInput.value?.removeEventListener('blur', onBlur))
|
|||
* Watch for the disabled property and sets the value to the real input.
|
||||
*/
|
||||
watchEffect(() => {
|
||||
if (disabled.value) {
|
||||
if (disabledRef.value) {
|
||||
fpInput.value?.setAttribute('disabled', '')
|
||||
} else {
|
||||
fpInput.value?.removeAttribute('disabled')
|
||||
|
@ -212,7 +212,7 @@ watchEffect(() => {
|
|||
* Watch for changes from parent component and update DOM
|
||||
*/
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
newValue => {
|
||||
// Prevent updates if v-model value is same as input's current value
|
||||
if (!root.value || newValue === nullify(root.value.value)) return
|
||||
|
|
|
@ -255,7 +255,7 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const {modelValue} = toRefs(props)
|
||||
const {modelValue: modelValueRef} = toRefs(props)
|
||||
|
||||
const labelStore = useLabelStore()
|
||||
|
||||
|
@ -289,7 +289,7 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
watch(
|
||||
modelValue,
|
||||
modelValueRef,
|
||||
(value) => {
|
||||
// FIXME: filters should only be converted to snake case in
|
||||
// the last moment
|
||||
|
|
|
@ -78,7 +78,7 @@ const emit = defineEmits<{
|
|||
(e: 'update:task', task: ITaskPartialWithId): void
|
||||
}>()
|
||||
|
||||
const {tasks, filters} = toRefs(props)
|
||||
const {tasks: tasksRef, filters: filtersRef} = toRefs(props)
|
||||
|
||||
// setup dayjs for vue-ganttastic
|
||||
const dayjsLanguageLoading = ref(false)
|
||||
|
@ -87,8 +87,8 @@ extendDayjs()
|
|||
|
||||
const router = useRouter()
|
||||
|
||||
const dateFromDate = computed(() => new Date(new Date(filters.value.dateFrom).setHours(0,0,0,0)))
|
||||
const dateToDate = computed(() => new Date(new Date(filters.value.dateTo).setHours(23,59,0,0)))
|
||||
const dateFromDate = computed(() => new Date(new Date(filtersRef.value.dateFrom).setHours(0,0,0,0)))
|
||||
const dateToDate = computed(() => new Date(new Date(filtersRef.value.dateTo).setHours(23,59,0,0)))
|
||||
|
||||
const DAY_WIDTH_PIXELS = 30
|
||||
const ganttChartWidth = computed(() => {
|
||||
|
@ -103,10 +103,10 @@ const ganttBars = ref<GanttBarObject[][]>([])
|
|||
* Update ganttBars when tasks change
|
||||
*/
|
||||
watch(
|
||||
tasks,
|
||||
tasksRef,
|
||||
() => {
|
||||
ganttBars.value = []
|
||||
tasks.value.forEach(t => ganttBars.value.push(transformTaskToGanttBar(t)))
|
||||
tasksRef.value.forEach(t => ganttBars.value.push(transformTaskToGanttBar(t)))
|
||||
},
|
||||
{deep: true, immediate: true},
|
||||
)
|
||||
|
|
|
@ -39,12 +39,12 @@ const props = defineProps({
|
|||
},
|
||||
})
|
||||
|
||||
const {task} = toRefs(props)
|
||||
const {task: taskRef} = toRefs(props)
|
||||
|
||||
const updatedSince = computed(() => formatDateSince(task.value.updated))
|
||||
const updatedFormatted = computed(() => formatDateLong(task.value.updated))
|
||||
const doneSince = computed(() => formatDateSince(task.value.doneAt))
|
||||
const doneFormatted = computed(() => formatDateLong(task.value.doneAt))
|
||||
const updatedSince = computed(() => formatDateSince(taskRef.value.updated))
|
||||
const updatedFormatted = computed(() => formatDateLong(taskRef.value.updated))
|
||||
const doneSince = computed(() => formatDateSince(taskRef.value.doneAt))
|
||||
const doneFormatted = computed(() => formatDateLong(taskRef.value.doneAt))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -188,17 +188,17 @@ const taskService = shallowReactive(new TaskService())
|
|||
const task = ref<ITask>(new TaskModel())
|
||||
const showDefer = ref(false)
|
||||
|
||||
const theTask = toRef(props, 'theTask')
|
||||
const theTaskRef = toRef(props, 'theTask')
|
||||
|
||||
watch(
|
||||
theTask,
|
||||
theTaskRef,
|
||||
newVal => {
|
||||
task.value = newVal
|
||||
},
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
task.value = theTask.value
|
||||
task.value = theTaskRef.value
|
||||
document.addEventListener('click', hideDeferDueDatePopup)
|
||||
})
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ const props = defineProps<{route: RouteLocationNormalized}>()
|
|||
const baseStore = useBaseStore()
|
||||
const canWrite = computed(() => baseStore.currentProject.maxRight > RIGHTS.READ)
|
||||
|
||||
const {route} = toRefs(props)
|
||||
const {route: routeRef} = toRefs(props)
|
||||
const {
|
||||
filters,
|
||||
hasDefaultFilters,
|
||||
|
@ -86,7 +86,7 @@ const {
|
|||
isLoading,
|
||||
addTask,
|
||||
updateTask,
|
||||
} = useGanttFilters(route)
|
||||
} = useGanttFilters(routeRef)
|
||||
|
||||
const DEFAULT_DATE_RANGE_DAYS = 7
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ setTimeout(() => showNothingToDo.value = true, 100)
|
|||
|
||||
// Linting disabled because we explicitely enabled destructuring in vite's config, this will work.
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const {
|
||||
dateFrom,
|
||||
dateTo,
|
||||
|
|
|
@ -536,7 +536,7 @@ const taskColor = ref<ITask['hexColor']>('')
|
|||
// Used to avoid flashing of empty elements if the task content is not yet loaded.
|
||||
const visible = ref(false)
|
||||
|
||||
const taskId = toRef(props, 'taskId')
|
||||
const taskIdRef = toRef(props, 'taskId')
|
||||
|
||||
const parent = computed(() => {
|
||||
if (!task.projectId) {
|
||||
|
@ -584,7 +584,7 @@ const hasAttachments = computed(() => attachmentStore.attachments.length > 0)
|
|||
const isModal = computed(() => Boolean(props.backdropView))
|
||||
|
||||
function attachmentUpload(file: File, onSuccess?: (url: string) => void) {
|
||||
return uploadFile(taskId.value, file, onSuccess)
|
||||
return uploadFile(taskIdRef.value, file, onSuccess)
|
||||
}
|
||||
|
||||
const heading = ref<HTMLElement | null>(null)
|
||||
|
@ -595,7 +595,7 @@ async function scrollToHeading() {
|
|||
const taskService = shallowReactive(new TaskService())
|
||||
|
||||
// load task
|
||||
watch(taskId, async (id) => {
|
||||
watch(taskIdRef, async (id) => {
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue