Skip to content

Commit 5a6d329

Browse files
authored
Merge pull request #1783 from opencloud-eu/renovate/dev-dependencies
chore(deps): update devdependencies (non-major)
2 parents 1c775a4 + d218ebe commit 5a6d329

File tree

27 files changed

+325
-329
lines changed

27 files changed

+325
-329
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"@babel/polyfill": "7.12.1",
4747
"@babel/preset-env": "7.28.5",
4848
"@babel/register": "7.28.3",
49-
"@cucumber/cucumber": "12.4.0",
50-
"@cucumber/messages": "31.0.1",
49+
"@cucumber/cucumber": "12.5.0",
50+
"@cucumber/messages": "31.2.0",
5151
"@cucumber/pretty-formatter": "2.4.1",
5252
"@noble/hashes": "2.0.1",
5353
"@opencloud-eu/babel-preset": "workspace:*",
@@ -72,11 +72,11 @@
7272
"eslint": "9.39.2",
7373
"franc-min": "^6.2.0",
7474
"glob": "13.0.0",
75-
"happy-dom": "20.0.11",
75+
"happy-dom": "20.1.0",
7676
"jsdom": "^27.0.0",
7777
"license-checker-rseidelsohn": "4.4.2",
7878
"node-fetch": "3.3.2",
79-
"pino": "10.1.0",
79+
"pino": "10.1.1",
8080
"pino-pretty": "13.1.3",
8181
"qs": "6.14.1",
8282
"requirejs": "2.3.8",
@@ -96,7 +96,7 @@
9696
"vitest-mock-extended": "3.1.0",
9797
"vue": "^3.5.23",
9898
"vue-demi": "0.14.10",
99-
"vue-tsc": "3.1.8",
99+
"vue-tsc": "3.2.2",
100100
"vue3-gettext": "2.4.0"
101101
},
102102
"engines": {

packages/design-system/docs/components/OcDatepicker/handler.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { ref } from 'vue'
1313
import { DateTime } from 'luxon'
1414
1515
const selectedDate = ref<DateTime>()
16-
const inputError = ref<Error>()
16+
const inputError = ref<boolean>()
1717
18-
const onExpiryDateChanged = ({ date, error }: { date: DateTime; error: Error }) => {
18+
const onExpiryDateChanged = ({ date, error }: { date: DateTime; error: boolean }) => {
1919
selectedDate.value = date
2020
inputError.value = error
2121
}

packages/design-system/docs/components/OcEmojiPicker/default.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
</template>
55

66
<script setup lang="ts">
7-
import { Emoji } from 'emoji-mart'
87
import { ref } from 'vue'
98
10-
const selectedEmoji = ref<Emoji>()
9+
const selectedEmoji = ref<string>()
1110
12-
const updateSelectedEmoji = (emoji: Emoji) => {
11+
const updateSelectedEmoji = (emoji: string) => {
1312
selectedEmoji.value = emoji
1413
}
1514
</script>

packages/design-system/docs/components/OcPageSize/default.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
<script setup lang="ts">
1111
import { ref } from 'vue'
12+
import { PageSizeOption } from '../../../src/helpers'
1213
1314
const options: number[] = [10, 20, 50]
1415
const currentSelection = ref(options[0])
1516
16-
const setItemsPerPage = (value: number) => {
17-
currentSelection.value = value
17+
const setItemsPerPage = (value: PageSizeOption) => {
18+
currentSelection.value = value as number
1819
}
1920
</script>

packages/design-system/src/components/OcAvatars/OcAvatars.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<template v-if="avatars.length > 0">
1818
<oc-avatar
1919
v-for="avatar in avatars"
20-
:key="avatar.username"
20+
:key="avatar.userName"
2121
:src="avatar.avatar"
2222
:user-name="avatar.displayName"
2323
:width="width"
@@ -56,7 +56,7 @@ type Item = {
5656
displayName?: string
5757
name?: string
5858
avatarType?: 'user' | 'link' | 'remote' | 'group' | 'guest' | string
59-
username?: string
59+
userName?: string
6060
avatar?: string
6161
userId?: string
6262
}
@@ -154,7 +154,7 @@ const otherItems = computed(() => {
154154
const avatarsAriaLabel = computed(() => {
155155
if (isTooltipDisplayed) return tooltip.value as string
156156
const names = (avatars.value || [])
157-
.map((a) => a?.displayName || a?.name || a?.username)
157+
.map((a) => a?.displayName || a?.name || a?.userName)
158158
.filter(Boolean)
159159
return names.length ? names.join(', ') : undefined
160160
})

packages/design-system/src/components/OcCheckbox/OcCheckbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const {
8080
8181
const emit = defineEmits<Emits>()
8282
83-
const model = defineModel<boolean | unknown[]>()
83+
const model = defineModel<boolean>()
8484
8585
const isChecked = computed(() => {
8686
const val = unref(model)

packages/design-system/src/components/OcPageSize/OcPageSize.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</template>
2424

2525
<script setup lang="ts">
26-
import { uniqueId } from '../../helpers'
26+
import { PageSizeOption, uniqueId } from '../../helpers'
2727
import OcSelect from '../OcSelect/OcSelect.vue'
2828
2929
export interface Props {
@@ -49,14 +49,14 @@ export interface Emits {
4949
/**
5050
* @docs Emitted when the value of the select has changed.
5151
*/
52-
(event: 'change', value: string | boolean): void
52+
(event: 'change', value: PageSizeOption): void
5353
}
5454
5555
const { label, options, selected, selectId = uniqueId('oc-page-size-') } = defineProps<Props>()
5656
5757
const emit = defineEmits<Emits>()
5858
59-
const emitChange = (value: string | boolean) => {
59+
const emitChange = (value: PageSizeOption) => {
6060
emit('change', value)
6161
}
6262
</script>

packages/design-system/src/components/OcSelect/OcSelect.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ export interface Emits {
229229
/**
230230
* @docs Emitted when the user has selected an option.
231231
*/
232-
(e: 'update:modelValue', value: unknown): void
232+
(e: 'update:modelValue', value: any): void
233233
}
234234
235235
export interface Slots {
236236
/**
237237
* @docs Slot for when an option is selected.
238238
*/
239-
'selected-option'?: () => unknown
239+
'selected-option'?: (option: any) => any
240240
241241
/**
242242
* @docs This component inherits all slots from `vue-select`. See https://vue-select.org/api/slots for more information.

packages/design-system/src/components/OcTable/OcTable.sort.spec.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defaultPlugins, mount } from '@opencloud-eu/web-test-helpers'
22
import Table from './OcTable.vue'
3+
import { SortDir } from '../../helpers'
34

45
const ASC = 'ascending'
56
const DESC = 'descending'
@@ -9,13 +10,13 @@ const tableFieldId = {
910
name: 'id',
1011
title: 'Id',
1112
sortable: true,
12-
sortDir: 'desc'
13+
sortDir: SortDir.Desc
1314
}
1415
const tableFieldResource = {
1516
name: 'resource',
1617
title: 'Resource',
1718
sortable: true,
18-
sortDir: 'asc'
19+
sortDir: SortDir.Asc
1920
}
2021
const tableFields: {
2122
name: string
@@ -86,23 +87,23 @@ describe('OcTable.sort', () => {
8687
ASC,
8788
{
8889
sortBy: tableFieldId.name,
89-
sortDir: 'asc',
90+
sortDir: SortDir.Asc,
9091
ariaSort: ASC
9192
}
9293
],
9394
[
9495
DESC,
9596
{
9697
sortBy: tableFieldId.name,
97-
sortDir: 'desc',
98+
sortDir: SortDir.Desc,
9899
ariaSort: DESC
99100
}
100101
],
101102
[
102103
NONE,
103104
{
104105
sortBy: tableFieldResource.name,
105-
sortDir: 'asc',
106+
sortDir: SortDir.Asc,
106107
ariaSort: NONE
107108
}
108109
]
@@ -111,7 +112,7 @@ describe('OcTable.sort', () => {
111112
async (name, { sortBy, sortDir, ariaSort }) => {
112113
await wrapper.setProps({
113114
sortBy,
114-
sortDir: sortDir as 'asc' | 'desc'
115+
sortDir: sortDir
115116
})
116117
expect(headers.at(1).attributes()['aria-sort']).toBe(ariaSort)
117118
}
@@ -124,7 +125,7 @@ describe('OcTable.sort', () => {
124125
props: {
125126
fields: tableFields,
126127
sortBy: tableFieldId.name,
127-
sortDir: tableFieldId.sortDir as 'asc' | 'desc',
128+
sortDir: tableFieldId.sortDir as SortDir,
128129
data
129130
},
130131
global: {
@@ -171,7 +172,7 @@ describe('OcTable.sort', () => {
171172
fields: tableFields,
172173
data,
173174
sortBy: sortByOld,
174-
sortDir: sortDirOld as 'asc' | 'desc'
175+
sortDir: sortDirOld as SortDir
175176
},
176177
global: {
177178
plugins: [...defaultPlugins()],

packages/design-system/src/components/OcTable/OcTable.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ import OcTr from '../OcTableTr/OcTableTr.vue'
121121
import OcTh from '../OcTableTh/OcTableTh.vue'
122122
import OcTd from '../OcTableTd/OcTableTd.vue'
123123
import OcButton from '../OcButton/OcButton.vue'
124-
import { Item as BaseItem, FieldType, SizeType } from '../../helpers'
124+
import { Item as BaseItem, FieldType, SizeType, SortDir } from '../../helpers'
125125
import {
126126
EVENT_THEAD_CLICKED,
127127
EVENT_TROW_CLICKED,
@@ -132,9 +132,6 @@ import {
132132
} from '../../helpers/constants'
133133
import { useGettext } from 'vue3-gettext'
134134
135-
const SORT_DIRECTION_ASC = 'asc' as const
136-
const SORT_DIRECTION_DESC = 'desc' as const
137-
138135
type Item = BaseItem & any
139136
140137
export interface Props {
@@ -200,7 +197,7 @@ export interface Props {
200197
/**
201198
* @docs The default sort direction.
202199
*/
203-
sortDir?: 'asc' | 'desc'
200+
sortDir?: SortDir
204201
/**
205202
* @docs Determines if the table header should be sticky. This is helpful when it should still be visible when scrolling.
206203
* @default false
@@ -247,7 +244,7 @@ export interface Emits {
247244
/**
248245
* @docs Emitted when a column has been sorted.
249246
*/
250-
(e: 'sort', sort: { sortBy: string; sortDir: 'asc' | 'desc' }): void
247+
(e: 'sort', sort: { sortBy: string; sortDir: SortDir }): void
251248
252249
/**
253250
* @docs Emitted when an element has entered a drop zone inside the table.
@@ -502,7 +499,7 @@ const extractSortThProps = (props: Record<string, string>, field: FieldType) =>
502499
503500
let sort = 'none'
504501
if (sortBy === field.name) {
505-
sort = sortDir === SORT_DIRECTION_ASC ? 'ascending' : 'descending'
502+
sort = sortDir === SortDir.Asc ? 'ascending' : 'descending'
506503
}
507504
props['aria-sort'] = sort
508505
}
@@ -519,11 +516,11 @@ const handleSort = (field: FieldType) => {
519516
let sortDirection = sortDir
520517
// toggle sortDir if already sorted by this column
521518
if (sortBy === field.name && sortDir !== undefined) {
522-
sortDirection = sortDir === SORT_DIRECTION_DESC ? SORT_DIRECTION_ASC : SORT_DIRECTION_DESC
519+
sortDirection = sortDir === SortDir.Desc ? SortDir.Asc : SortDir.Desc
523520
}
524521
// set default sortDir of the field when sortDir not set or sortBy changed
525522
if (sortBy !== field.name || sortDir === undefined) {
526-
sortDirection = (field.sortDir || SORT_DIRECTION_DESC) as 'asc' | 'desc'
523+
sortDirection = (field.sortDir || SortDir.Desc) as SortDir
527524
}
528525
529526
/**

0 commit comments

Comments
 (0)