diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b16e479e..5b606b28 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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 diff --git a/package.json b/package.json index c7ad69fe..6ab477e0 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9daf33a3..512f374f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,9 @@ importers: '@iconify/vue': specifier: ^4.1.2 version: 4.1.2(vue@3.5.4(typescript@5.5.4)) + '@playwright/test': + specifier: 1.48.1 + version: 1.48.1 '@storybook/addon-a11y': specifier: ^8.3.0 version: 8.3.0(storybook@8.3.0) @@ -168,9 +171,6 @@ importers: p-debounce: specifier: ^4.0.0 version: 4.0.0 - playwright: - specifier: ^1.47.0 - version: 1.47.0 publint: specifier: ^0.2.10 version: 0.2.10 @@ -1322,6 +1322,11 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@playwright/test@1.48.1': + resolution: {integrity: sha512-s9RtWoxkOLmRJdw3oFvhFbs9OJS0BzrLUc8Hf6l2UdCNd1rqeEyD4BhCJkvzeEoD1FsK4mirsWwGerhVmYKtZg==} + engines: {node: '>=18'} + hasBin: true + '@pnpm/config.env-replace@1.1.0': resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} @@ -6164,13 +6169,13 @@ packages: pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} - playwright-core@1.45.1: - resolution: {integrity: sha512-LF4CUUtrUu2TCpDw4mcrAIuYrEjVDfT1cHbJMfwnE2+1b8PZcFzPNgvZCvq2JfQ4aTjRCCHw5EJ2tmr2NSzdPg==} + playwright-core@1.47.0: + resolution: {integrity: sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==} engines: {node: '>=18'} hasBin: true - playwright-core@1.47.0: - resolution: {integrity: sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==} + playwright-core@1.48.1: + resolution: {integrity: sha512-Yw/t4VAFX/bBr1OzwCuOMZkY1Cnb4z/doAFSwf4huqAGWmf9eMNjmK7NiOljCdLmxeRYcGPPmcDgU0zOlzP0YA==} engines: {node: '>=18'} hasBin: true @@ -6179,6 +6184,11 @@ packages: engines: {node: '>=18'} hasBin: true + playwright@1.48.1: + resolution: {integrity: sha512-j8CiHW/V6HxmbntOfyB4+T/uk08tBy6ph0MpBXwuoofkSnLmlfdYNNkFTYD6ofzzlSqLA1fwH4vwvVFvJgLN0w==} + engines: {node: '>=18'} + hasBin: true + pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -9129,6 +9139,10 @@ snapshots: '@pkgr/core@0.1.1': {} + '@playwright/test@1.48.1': + dependencies: + playwright: 1.48.1 + '@pnpm/config.env-replace@1.1.0': {} '@pnpm/network.ca-file@1.0.2': @@ -13586,7 +13600,7 @@ snapshots: jest-process-manager: 0.4.0 jest-runner: 29.7.0 nyc: 15.1.0 - playwright-core: 1.45.1 + playwright-core: 1.47.0 rimraf: 3.0.2 uuid: 8.3.2 transitivePeerDependencies: @@ -14970,16 +14984,22 @@ snapshots: mlly: 1.5.0 pathe: 1.1.2 - playwright-core@1.45.1: {} - playwright-core@1.47.0: {} + playwright-core@1.48.1: {} + playwright@1.47.0: dependencies: playwright-core: 1.47.0 optionalDependencies: fsevents: 2.3.2 + playwright@1.48.1: + dependencies: + playwright-core: 1.48.1 + optionalDependencies: + fsevents: 2.3.2 + pluralize@8.0.0: {} pnpm@9.10.0: {} diff --git a/src/components/DsfrDataTable/DsfrDataTable.vue b/src/components/DsfrDataTable/DsfrDataTable.vue index 37fb42fa..879a8e28 100644 --- a/src/components/DsfrDataTable/DsfrDataTable.vue +++ b/src/components/DsfrDataTable/DsfrDataTable.vue @@ -64,8 +64,10 @@ const pages = computed(() => props.pages ?? Array.from({ length: pageCou const lowestLimit = computed(() => currentPage.value * rowsPerPage.value) const highestLimit = computed(() => (currentPage.value + 1) * rowsPerPage.value) +const sortedBy = defineModel('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 @@ -76,9 +78,6 @@ function defaultSortFn (a: string | DsfrDataTableRow, b: string | DsfrDataTableR } return 0 } - -const sortedBy = defineModel('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 diff --git a/src/components/DsfrHeader/DsfrHeader.types.ts b/src/components/DsfrHeader/DsfrHeader.types.ts index 18f4b001..cf143d5f 100644 --- a/src/components/DsfrHeader/DsfrHeader.types.ts +++ b/src/components/DsfrHeader/DsfrHeader.types.ts @@ -20,7 +20,6 @@ export type DsfrHeaderMenuLinkProps = { * @deprecated Use the prop `to` instead */ path?: string - class?: string | Record | Array> } export type DsfrHeaderProps = { @@ -34,7 +33,7 @@ export type DsfrHeaderProps = { operatorImgSrc?: string operatorImgStyle?: StyleValue placeholder?: string - quickLinks?: DsfrHeaderMenuLinkProps[] + quickLinks?: (DsfrHeaderMenuLinkProps & HTMLAttributes)[] languageSelector?: DsfrLanguageSelectorProps searchLabel?: string quickLinksAriaLabel?: string diff --git a/src/components/DsfrHeader/DsfrHeader.vue b/src/components/DsfrHeader/DsfrHeader.vue index a06c4803..caeae1b7 100644 --- a/src/components/DsfrHeader/DsfrHeader.vue +++ b/src/components/DsfrHeader/DsfrHeader.vue @@ -242,15 +242,13 @@ provide(registerNavigationLinkKey, () => { @select="languageSelector.currentLanguage = $event.codeIso" /> - +