Skip to content

Commit

Permalink
Merge pull request #965 from dnum-mi/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ArnaudTA authored Oct 21, 2024
2 parents 84b6de9 + f828d01 commit cbc986a
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
VITE_APP_GIT_SHA: ${{github.sha}}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@iconify/vue": "^4.1.2",
"@playwright/test": "1.48.1",
"@storybook/addon-a11y": "^8.3.0",
"@storybook/addon-docs": "^8.3.0",
"@storybook/addon-essentials": "^8.3.0",
Expand Down Expand Up @@ -130,7 +131,6 @@
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"p-debounce": "^4.0.0",
"playwright": "^1.47.0",
"publint": "^0.2.10",
"regenerator-runtime": "^0.14.1",
"rimraf": "^6.0.1",
Expand Down
40 changes: 30 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/components/DsfrDataTable/DsfrDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ const pages = computed<Page[]>(() => props.pages ?? Array.from({ length: pageCou
const lowestLimit = computed(() => currentPage.value * rowsPerPage.value)
const highestLimit = computed(() => (currentPage.value + 1) * rowsPerPage.value)
const sortedBy = defineModel<string | undefined>('sortedBy', { default: undefined })
const sortedDesc = defineModel('sortedDesc', { default: false })
function defaultSortFn (a: string | DsfrDataTableRow, b: string | DsfrDataTableRow) {
const key = props.sorted as string
const key = sortedBy.value ?? props.sorted
// @ts-expect-error TS7015
if (((a as DsfrDataTableRow)[key] ?? a) < ((b as DsfrDataTableRow)[key] ?? b)) {
return -1
Expand All @@ -76,9 +78,6 @@ function defaultSortFn (a: string | DsfrDataTableRow, b: string | DsfrDataTableR
}
return 0
}
const sortedBy = defineModel<string | undefined>('sortedBy', { default: undefined })
const sortedDesc = defineModel('sortedDesc', { default: false })
function sortBy (key: string) {
if (!props.sortableRows || (Array.isArray(props.sortableRows) && !props.sortableRows.includes(key))) {
return
Expand Down
3 changes: 1 addition & 2 deletions src/components/DsfrHeader/DsfrHeader.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type DsfrHeaderMenuLinkProps = {
* @deprecated Use the prop `to` instead
*/
path?: string
class?: string | Record<string, string> | Array<string | Record<string, string>>
}

export type DsfrHeaderProps = {
Expand All @@ -34,7 +33,7 @@ export type DsfrHeaderProps = {
operatorImgSrc?: string
operatorImgStyle?: StyleValue
placeholder?: string
quickLinks?: DsfrHeaderMenuLinkProps[]
quickLinks?: (DsfrHeaderMenuLinkProps & HTMLAttributes)[]
languageSelector?: DsfrLanguageSelectorProps
searchLabel?: string
quickLinksAriaLabel?: string
Expand Down
16 changes: 7 additions & 9 deletions src/components/DsfrHeader/DsfrHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,13 @@ provide(registerNavigationLinkKey, () => {
@select="languageSelector.currentLanguage = $event.codeIso"
/>
</template>
<nav role="navigation">
<DsfrHeaderMenuLinks
v-if="menuOpened"
role="navigation"
:links="quickLinks"
:nav-aria-label="quickLinksAriaLabel"
@link-click="onQuickLinkClick"
/>
</nav>
<DsfrHeaderMenuLinks
v-if="menuOpened"
role="navigation"
:links="quickLinks"
:nav-aria-label="quickLinksAriaLabel"
@link-click="onQuickLinkClick"
/>
</div>
<template v-if="modalOpened">
Expand Down
2 changes: 1 addition & 1 deletion src/components/DsfrSelect/DsfrSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const messageType = computed(() => {
@change="$emit('update:modelValue', ($event.target as HTMLInputElement)?.value)"
>
<option
:selected="modelValue == null"
:selected="!options.some(option => typeof option !== 'object' || option === null ? option === modelValue : option.value === modelValue)"
disabled
hidden
>
Expand Down
1 change: 1 addition & 0 deletions src/components/DsfrTooltip/DsfrTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const onClick = () => {

<template>
<component
v-bind="$attrs"
:is="onHover ? 'a' : 'button'"
:id="`link-${id}`"
ref="source"
Expand Down

0 comments on commit cbc986a

Please sign in to comment.