Compare commits

..

260 Commits

Author SHA1 Message Date
Alejandro Celaya
b747e63d51 Merge pull request #1524 from shlinkio/develop
Release 4.4.0
2025-04-20 17:07:11 +02:00
Alejandro Celaya
557cd4f7e2 Merge pull request #1523 from acelaya-forks/feature/server-credentials
Add advanced options to servers
2025-04-20 17:02:24 +02:00
Alejandro Celaya
b0189c6457 Update changelog 2025-04-20 13:27:57 +02:00
Alejandro Celaya
8da630e149 Support SHLINK_SERVER_FORWARD_CREDENTIALS in docker image 2025-04-20 13:22:35 +02:00
Alejandro Celaya
d65eafd37f Update ServersImporter so that it takes into consideration forwardCredentials 2025-04-20 13:13:42 +02:00
Alejandro Celaya
4895cbb9dc Ensure forwardCredentials is included when exporting servers as CSV 2025-04-20 12:45:33 +02:00
Alejandro Celaya
1467c8e416 Test api client builder when credentials are forwarded 2025-04-20 12:28:51 +02:00
Alejandro Celaya
e12cd68010 Update server-related tests to cover forwardCredentials option 2025-04-20 11:55:34 +02:00
Alejandro Celaya
e997d11c2c Add advanced options to servers 2025-04-20 11:18:18 +02:00
Alejandro Celaya
4947e0490a Merge pull request #1520 from shlinkio/dependabot/npm_and_yarn/reduxjs/toolkit-2.7.0
Bump @reduxjs/toolkit from 2.6.1 to 2.7.0
2025-04-19 09:37:49 +02:00
Alejandro Celaya
c68a7ee22a Merge pull request #1522 from shlinkio/dependabot/docker/playwright-v1.52.0-noble
Bump playwright from v1.51.1-noble to v1.52.0-noble
2025-04-19 09:37:40 +02:00
dependabot[bot]
c4d99606cb Bump playwright from v1.51.1-noble to v1.52.0-noble
Bumps playwright from v1.51.1-noble to v1.52.0-noble.

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: v1.52.0-noble
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:34:10 +00:00
dependabot[bot]
5e3e70454d Bump @reduxjs/toolkit from 2.6.1 to 2.7.0
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.6.1 to 2.7.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-version: 2.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:32:48 +00:00
Alejandro Celaya
860808a654 Merge pull request #1521 from shlinkio/revert-1483-dependabot/npm_and_yarn/react-549425c6c9
Revert "Bump the react group with 4 updates"
2025-04-19 09:32:08 +02:00
Alejandro Celaya
476c98d4f3 Revert "Bump the react group with 4 updates" 2025-04-19 09:31:47 +02:00
Alejandro Celaya
35a3224f70 Merge pull request #1483 from shlinkio/dependabot/npm_and_yarn/react-549425c6c9
Bump the react group with 4 updates
2025-04-19 09:30:49 +02:00
Alejandro Celaya
0c001a6d81 Merge pull request #1515 from shlinkio/dependabot/npm_and_yarn/eslint-8e6c94e842
Bump the eslint group with 3 updates
2025-04-19 09:30:40 +02:00
dependabot[bot]
7a9ab1c803 Bump the eslint group with 3 updates
Bumps the eslint group with 3 updates: [eslint](https://github.com/eslint/eslint), [eslint-plugin-react-compiler](https://github.com/facebook/react/tree/HEAD/compiler/packages/eslint-plugin-react-compiler) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.24.0 to 9.25.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.24.0...v9.25.0)

Updates `eslint-plugin-react-compiler` from 19.0.0-beta-e993439-20250405 to 19.0.0-beta-ebf51a3-20250411
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/compiler/packages/eslint-plugin-react-compiler)

Updates `typescript-eslint` from 8.29.1 to 8.30.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.30.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.25.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-react-compiler
  dependency-version: 19.0.0-beta-ebf51a3-20250411
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-version: 8.30.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:14:34 +00:00
dependabot[bot]
eb6ba5f15d Bump the react group with 4 updates
Bumps the react group with 4 updates: [react](https://github.com/facebook/react/tree/HEAD/packages/react), [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react), [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom).


Updates `react` from 18.3.1 to 19.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react)

Updates `@types/react` from 18.3.12 to 19.0.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `react-dom` from 18.3.1 to 19.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react-dom)

Updates `@types/react-dom` from 18.3.1 to 19.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `@types/react` from 18.3.12 to 19.0.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@types/react-dom` from 18.3.1 to 19.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: react
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: react
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: react
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: react
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: react
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:14:20 +00:00
Alejandro Celaya
52cde329d7 Merge pull request #1513 from shlinkio/dependabot/npm_and_yarn/babel/runtime-7.27.0
Bump @babel/runtime from 7.24.7 to 7.27.0
2025-04-19 09:12:01 +02:00
Alejandro Celaya
aae2cd6866 Merge pull request #1516 from shlinkio/dependabot/npm_and_yarn/vite-a24716d957
Bump the vite group with 2 updates
2025-04-19 09:11:46 +02:00
Alejandro Celaya
becdf04acf Merge pull request #1517 from shlinkio/dependabot/npm_and_yarn/tailwindcss-8262cf427e
Bump the tailwindcss group with 2 updates
2025-04-19 09:11:33 +02:00
Alejandro Celaya
e3c853361d Merge pull request #1518 from shlinkio/dependabot/npm_and_yarn/react-router-7.5.1
Bump react-router from 7.5.0 to 7.5.1
2025-04-19 09:11:23 +02:00
Alejandro Celaya
385fc839b5 Merge pull request #1519 from shlinkio/dependabot/npm_and_yarn/playwright-1.52.0
Bump playwright from 1.51.1 to 1.52.0
2025-04-19 09:10:29 +02:00
dependabot[bot]
5d72d36c20 Bump playwright from 1.51.1 to 1.52.0
Bumps [playwright](https://github.com/microsoft/playwright) from 1.51.1 to 1.52.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.51.1...v1.52.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.52.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:03:35 +00:00
dependabot[bot]
1fcd2fffd0 Bump react-router from 7.5.0 to 7.5.1
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.5.0 to 7.5.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.5.1/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:03:18 +00:00
dependabot[bot]
7cdc84b45d Bump the tailwindcss group with 2 updates
Bumps the tailwindcss group with 2 updates: [@tailwindcss/vite](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-vite) and [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss).


Updates `@tailwindcss/vite` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.4/packages/@tailwindcss-vite)

Updates `tailwindcss` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.4/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@tailwindcss/vite"
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: tailwindcss
- dependency-name: tailwindcss
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: tailwindcss
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:03:05 +00:00
dependabot[bot]
3f317d2559 Bump the vite group with 2 updates
Bumps the vite group with 2 updates: [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `@vitejs/plugin-react` from 4.3.4 to 4.4.0
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@4.4.0/packages/plugin-react)

Updates `vite` from 6.2.6 to 6.3.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.2/packages/vite)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 4.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vite
- dependency-name: vite
  dependency-version: 6.3.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-19 07:02:40 +00:00
Alejandro Celaya
788df59ae1 Merge pull request #1514 from acelaya-forks/feature/update-web.component
Update to shlink-web-component 0.13.3
2025-04-18 20:39:08 +02:00
Alejandro Celaya
d57188addf Update to shlink-web-component 0.13.3 2025-04-18 20:36:25 +02:00
Alejandro Celaya
778f7cedbb Merge pull request #1511 from stouset/push-svqnkrnomyxo
Pass HTTP credentials through to the API server
2025-04-17 08:54:58 +02:00
Alejandro Celaya
f71218998f Update to @shlinkio/shlink-js-sdk 2.1.0 2025-04-17 08:52:56 +02:00
Stephen Touset
d1d6a6b373 Pass HTTP credentials through to the API server when appropriate CORS headers are set 2025-04-17 08:50:39 +02:00
dependabot[bot]
41de28c15f Bump @babel/runtime from 7.24.7 to 7.27.0
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.24.7 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-17 06:49:56 +00:00
Alejandro Celaya
c1bbeeb6ac Merge pull request #1512 from acelaya-forks/feature/dev-improvements
Update shlink-web-client with support for client-side generated QRs
2025-04-17 08:48:48 +02:00
Alejandro Celaya
9f3d7df5cd Update shlink-web-client with support for client-side generated QRs 2025-04-17 08:46:31 +02:00
Alejandro Celaya
a7d6637a81 Merge pull request #1507 from shlinkio/dependabot/npm_and_yarn/shlink-adac1902f5
Bump @shlinkio/shlink-frontend-kit from 0.8.7 to 0.8.10 in the shlink group
2025-04-12 11:02:19 +02:00
Alejandro Celaya
14fa2e32ea Update tests 2025-04-12 10:58:48 +02:00
dependabot[bot]
c08f0dad8b Bump @shlinkio/shlink-frontend-kit in the shlink group
Bumps the shlink group with 1 update: [@shlinkio/shlink-frontend-kit](https://github.com/shlinkio/shlink-frontend-kit).


Updates `@shlinkio/shlink-frontend-kit` from 0.8.7 to 0.8.10
- [Release notes](https://github.com/shlinkio/shlink-frontend-kit/releases)
- [Changelog](https://github.com/shlinkio/shlink-frontend-kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-frontend-kit/compare/v0.8.7...v0.8.10)

---
updated-dependencies:
- dependency-name: "@shlinkio/shlink-frontend-kit"
  dependency-version: 0.8.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 08:52:09 +00:00
Alejandro Celaya
43853ef14f Merge pull request #1505 from shlinkio/dependabot/npm_and_yarn/vite-6.2.6
Bump vite from 6.2.5 to 6.2.6
2025-04-12 10:35:40 +02:00
Alejandro Celaya
b831c6c3bd Merge pull request #1508 from shlinkio/dependabot/npm_and_yarn/tailwindcss/vite-4.1.3
Bump @tailwindcss/vite from 4.0.17 to 4.1.3
2025-04-12 10:35:31 +02:00
dependabot[bot]
1f51d60ed2 Bump vite from 6.2.5 to 6.2.6
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 08:28:15 +00:00
Alejandro Celaya
600a3e2045 Merge pull request #1506 from shlinkio/dependabot/npm_and_yarn/eslint-8aa5377087
Bump the eslint group with 2 updates
2025-04-12 10:27:00 +02:00
dependabot[bot]
5458657c8b Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint-plugin-react-compiler](https://github.com/facebook/react/tree/HEAD/compiler/packages/eslint-plugin-react-compiler) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint-plugin-react-compiler` from 19.0.0-beta-e993439-20250328 to 19.0.0-beta-e993439-20250405
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/compiler/packages/eslint-plugin-react-compiler)

Updates `typescript-eslint` from 8.29.0 to 8.29.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-compiler
  dependency-version: 19.0.0-beta-e993439-20250405
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-version: 8.29.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 08:26:53 +00:00
dependabot[bot]
603ee9d6bf Bump @tailwindcss/vite from 4.0.17 to 4.1.3
Bumps [@tailwindcss/vite](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-vite) from 4.0.17 to 4.1.3.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.3/packages/@tailwindcss-vite)

---
updated-dependencies:
- dependency-name: "@tailwindcss/vite"
  dependency-version: 4.1.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 08:26:04 +00:00
Alejandro Celaya
3405f524df Update dependabot.yml with tailwind group 2025-04-12 10:25:40 +02:00
Alejandro Celaya
1fbbef41a7 Merge pull request #1509 from shlinkio/dependabot/npm_and_yarn/tailwindcss-4.1.3
Bump tailwindcss from 4.0.17 to 4.1.3
2025-04-12 10:24:09 +02:00
dependabot[bot]
eef04075a5 Bump tailwindcss from 4.0.17 to 4.1.3
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.0.17 to 4.1.3.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.3/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-version: 4.1.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 07:24:48 +00:00
Alejandro Celaya
7880bb4abe Merge pull request #1504 from acelaya-forks/feature/browser-tests
Run tests in a headless browser with vitest browser mode and playwright
2025-04-08 17:39:59 +02:00
Alejandro Celaya
ac0c6aa729 Update changelog 2025-04-08 17:37:11 +02:00
Alejandro Celaya
691e6c1afb Run tests in a headless browser with vitest browser mode and playwright 2025-04-08 11:51:07 +02:00
Alejandro Celaya
09559c78af Merge pull request #1503 from acelaya-forks/feature/revealable-api-key
Use RevealablePasswordInput for server API keys
2025-04-05 14:11:23 +02:00
Alejandro Celaya
3d6ea5cf7c Set submit type in submit buttons 2025-04-05 14:09:57 +02:00
Alejandro Celaya
0a7a606541 Use RevealablePasswordInput for server API keys 2025-04-05 14:07:01 +02:00
Alejandro Celaya
61cc6c8d26 Merge pull request #1491 from acelaya-forks/feature/initial-tailwind-components
Initial tailwind components
2025-04-05 13:12:05 +02:00
Alejandro Celaya
5e0db07ef3 Replace all remaining bootstrap utility classes with tailwind classes 2025-04-05 12:15:24 +02:00
Alejandro Celaya
d188d67c5a Replace some bootstrap utility classes with tailwind ones 2025-04-05 11:48:24 +02:00
Alejandro Celaya
bd034c11b6 Fix App test 2025-04-05 11:41:50 +02:00
Alejandro Celaya
0ec867b185 Migrate App stylesheets to tailwind 2025-04-05 11:37:44 +02:00
Alejandro Celaya
c29b077e93 Fix some buttons acting like submits 2025-04-05 11:23:35 +02:00
Alejandro Celaya
d8a42b4c3a Migrate DuplicatedServersModal to tailwind 2025-04-05 11:15:42 +02:00
Alejandro Celaya
7879476739 Migrate DeleteServerModal to tailwind components 2025-04-05 10:39:47 +02:00
Alejandro Celaya
fd40e2b7bc Replace most stylesheets with tailwind styles 2025-04-05 10:39:47 +02:00
Alejandro Celaya
aefe5e0848 Migrate ServersListGroup to tailwind components 2025-04-05 10:39:47 +02:00
Alejandro Celaya
fd7bfd845e Update browsers list 2025-04-05 10:39:47 +02:00
Alejandro Celaya
01ca369388 Migrate DeleteServerModal to tailwind components 2025-04-05 10:39:47 +02:00
Alejandro Celaya
15ef29ecea Migrated NoMenuLayout to tailwind 2025-04-05 10:39:11 +02:00
Alejandro Celaya
b19162ce91 Migrate Home component to tailwind 2025-04-05 10:39:11 +02:00
Alejandro Celaya
7c31b210bd Fix tests after initial tailwind components migration 2025-04-05 10:39:11 +02:00
Alejandro Celaya
a63c214d8d Use tailwind-based components in AppUpdateBanner 2025-04-05 10:39:11 +02:00
Alejandro Celaya
c9ada8f41d Migrate servers table to a tailwind-based Table component 2025-04-05 10:39:11 +02:00
Alejandro Celaya
06fac716d1 Migrate server-related components to tailwind 2025-04-05 10:39:11 +02:00
Alejandro Celaya
c462bc30e1 Migrate ErrorHandler component to tailwind 2025-04-05 10:39:11 +02:00
Alejandro Celaya
ad00e54df8 Migrate NotFound component to tailwind 2025-04-05 10:39:10 +02:00
Alejandro Celaya
ca4543b227 Merge pull request #1501 from shlinkio/dependabot/npm_and_yarn/vite-plugin-pwa-1.0.0
Bump vite-plugin-pwa from 0.21.2 to 1.0.0
2025-04-05 10:21:30 +02:00
dependabot[bot]
ddca307001 Bump vite-plugin-pwa from 0.21.2 to 1.0.0
Bumps [vite-plugin-pwa](https://github.com/vite-pwa/vite-plugin-pwa) from 0.21.2 to 1.0.0.
- [Release notes](https://github.com/vite-pwa/vite-plugin-pwa/releases)
- [Commits](https://github.com/vite-pwa/vite-plugin-pwa/compare/v0.21.2...v1.0.0)

---
updated-dependencies:
- dependency-name: vite-plugin-pwa
  dependency-version: 1.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 08:13:59 +00:00
Alejandro Celaya
dd651eb324 Merge pull request #1494 from shlinkio/dependabot/npm_and_yarn/eslint-466e2eef68
Bump the eslint group with 4 updates
2025-04-05 10:13:12 +02:00
Alejandro Celaya
6ea7347ae1 Merge pull request #1499 from shlinkio/dependabot/npm_and_yarn/sass-1.86.3
Bump sass from 1.86.0 to 1.86.3
2025-04-05 10:13:04 +02:00
Alejandro Celaya
b4810aa4cd Merge pull request #1502 from shlinkio/dependabot/npm_and_yarn/react-router-7.5.0
Bump react-router from 7.4.1 to 7.5.0
2025-04-05 10:12:50 +02:00
dependabot[bot]
8a99076a21 Bump react-router from 7.4.1 to 7.5.0
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.4.1 to 7.5.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.5.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 08:04:36 +00:00
dependabot[bot]
432bbcb4ac Bump the eslint group with 4 updates
Bumps the eslint group with 4 updates: [eslint](https://github.com/eslint/eslint), [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react), [eslint-plugin-react-compiler](https://github.com/facebook/react/tree/HEAD/compiler/packages/eslint-plugin-react-compiler) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.23.0 to 9.24.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.24.0)

Updates `eslint-plugin-react` from 7.37.4 to 7.37.5
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.4...v7.37.5)

Updates `eslint-plugin-react-compiler` from 19.0.0-beta-aeaed83-20250323 to 19.0.0-beta-e993439-20250328
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/compiler/packages/eslint-plugin-react-compiler)

Updates `typescript-eslint` from 8.28.0 to 8.29.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-react
  dependency-version: 7.37.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint-plugin-react-compiler
  dependency-version: 19.0.0-beta-e993439-20250328
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-version: 8.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:58:39 +00:00
dependabot[bot]
0f006a737f Bump sass from 1.86.0 to 1.86.3
Bumps [sass](https://github.com/sass/dart-sass) from 1.86.0 to 1.86.3.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.86.0...1.86.3)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.86.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:57:20 +00:00
Alejandro Celaya
73d9a535bc Merge pull request #1492 from shlinkio/dependabot/npm_and_yarn/vite-6.2.5
Bump vite from 6.2.3 to 6.2.5
2025-04-05 09:57:06 +02:00
Alejandro Celaya
da5eddaa6a Merge pull request #1493 from shlinkio/dependabot/docker/node-23.11-alpine
Bump node from 23.10-alpine to 23.11-alpine
2025-04-05 09:56:57 +02:00
Alejandro Celaya
d2362d4ddd Merge pull request #1495 from shlinkio/dependabot/npm_and_yarn/shlink-990afa2a50
Bump @shlinkio/shlink-frontend-kit from 0.8.2 to 0.8.5 in the shlink group
2025-04-05 09:56:41 +02:00
dependabot[bot]
18e41b3064 Bump vite from 6.2.3 to 6.2.5
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:56:38 +00:00
Alejandro Celaya
148dff996c Merge pull request #1496 from shlinkio/dependabot/npm_and_yarn/testing-323d949c2e
Bump @testing-library/react from 16.2.0 to 16.3.0 in the testing group
2025-04-05 09:56:14 +02:00
Alejandro Celaya
20d12c4d7c Merge pull request #1497 from shlinkio/dependabot/npm_and_yarn/vitest-45f529ea32
Bump the vitest group with 2 updates
2025-04-05 09:55:53 +02:00
Alejandro Celaya
f25389a638 Merge pull request #1498 from shlinkio/dependabot/npm_and_yarn/react-external-link-2.5.0
Bump react-external-link from 2.4.0 to 2.5.0
2025-04-05 09:55:44 +02:00
Alejandro Celaya
a10e9646e6 Merge pull request #1500 from shlinkio/dependabot/npm_and_yarn/typescript-5.8.3
Bump typescript from 5.8.2 to 5.8.3
2025-04-05 09:55:23 +02:00
dependabot[bot]
8a697bb7d2 Bump typescript from 5.8.2 to 5.8.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.2 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:41:39 +00:00
dependabot[bot]
834eca8461 Bump react-external-link from 2.4.0 to 2.5.0
Bumps [react-external-link](https://github.com/acelaya/react-external-link) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/acelaya/react-external-link/releases)
- [Changelog](https://github.com/acelaya/react-external-link/blob/main/CHANGELOG.md)
- [Commits](https://github.com/acelaya/react-external-link/compare/v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: react-external-link
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:41:22 +00:00
dependabot[bot]
b5347b1801 Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.9 to 3.1.1
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.1.1/packages/coverage-v8)

Updates `vitest` from 3.0.9 to 3.1.1
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.1.1/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 3.1.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 3.1.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:41:09 +00:00
dependabot[bot]
939d9d4463 Bump @testing-library/react from 16.2.0 to 16.3.0 in the testing group
Bumps the testing group with 1 update: [@testing-library/react](https://github.com/testing-library/react-testing-library).


Updates `@testing-library/react` from 16.2.0 to 16.3.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.2.0...v16.3.0)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: testing
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:40:39 +00:00
dependabot[bot]
56aee7e96e Bump @shlinkio/shlink-frontend-kit in the shlink group
Bumps the shlink group with 1 update: [@shlinkio/shlink-frontend-kit](https://github.com/shlinkio/shlink-frontend-kit).


Updates `@shlinkio/shlink-frontend-kit` from 0.8.2 to 0.8.5
- [Release notes](https://github.com/shlinkio/shlink-frontend-kit/releases)
- [Changelog](https://github.com/shlinkio/shlink-frontend-kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-frontend-kit/compare/v0.8.2...v0.8.5)

---
updated-dependencies:
- dependency-name: "@shlinkio/shlink-frontend-kit"
  dependency-version: 0.8.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:40:28 +00:00
dependabot[bot]
49ab0d425d Bump node from 23.10-alpine to 23.11-alpine
Bumps node from 23.10-alpine to 23.11-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 23.11-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 07:14:53 +00:00
Alejandro Celaya
9227b00d1a Merge pull request #1488 from acelaya-forks/feature/update-coding-standard
Update to latest coding standard
2025-03-29 12:00:20 +01:00
Alejandro Celaya
a736bb3b21 Update to latest coding standard 2025-03-29 11:58:44 +01:00
Alejandro Celaya
ecbc0f64d6 Merge pull request #1485 from shlinkio/dependabot/npm_and_yarn/shlink-9268acf158
Bump the shlink group with 2 updates
2025-03-29 10:34:01 +01:00
Alejandro Celaya
a522a74199 Merge pull request #1486 from shlinkio/dependabot/npm_and_yarn/vite-14f44f5325
Bump vite from 6.2.2 to 6.2.3 in the vite group
2025-03-29 10:32:47 +01:00
Alejandro Celaya
bee4094b84 Merge pull request #1487 from shlinkio/dependabot/npm_and_yarn/react-router-7.4.1
Bump react-router from 7.4.0 to 7.4.1
2025-03-29 10:32:37 +01:00
dependabot[bot]
e3e909a023 Bump react-router from 7.4.0 to 7.4.1
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.4.0 to 7.4.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.4.1/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 08:11:16 +00:00
dependabot[bot]
d91d341bbf Bump vite from 6.2.2 to 6.2.3 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.2 to 6.2.3
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 08:10:57 +00:00
dependabot[bot]
a3d85a7454 Bump the shlink group with 2 updates
Bumps the shlink group with 2 updates: [@shlinkio/shlink-frontend-kit](https://github.com/shlinkio/shlink-frontend-kit) and [@shlinkio/shlink-web-component](https://github.com/shlinkio/shlink-web-component).


Updates `@shlinkio/shlink-frontend-kit` from 0.7.3 to 0.8.2
- [Release notes](https://github.com/shlinkio/shlink-frontend-kit/releases)
- [Changelog](https://github.com/shlinkio/shlink-frontend-kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-frontend-kit/compare/v0.7.3...v0.8.2)

Updates `@shlinkio/shlink-web-component` from 0.13.0 to 0.13.1
- [Release notes](https://github.com/shlinkio/shlink-web-component/releases)
- [Changelog](https://github.com/shlinkio/shlink-web-component/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-web-component/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: "@shlinkio/shlink-frontend-kit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: shlink
- dependency-name: "@shlinkio/shlink-web-component"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 08:10:40 +00:00
Alejandro Celaya
a5a5b0c3a4 Replace types group with react 2025-03-22 12:56:13 +01:00
Alejandro Celaya
50e7204a4f Merge pull request #1480 from shlinkio/dependabot/npm_and_yarn/vite-plugin-pwa-0.21.2
Bump vite-plugin-pwa from 0.21.1 to 0.21.2
2025-03-22 09:51:56 +01:00
Alejandro Celaya
0c60b8710e Merge pull request #1478 from shlinkio/dependabot/npm_and_yarn/eslint-cbaef95697
Bump the eslint group with 2 updates
2025-03-22 09:51:34 +01:00
Alejandro Celaya
bb92930116 Merge pull request #1479 from shlinkio/dependabot/npm_and_yarn/vitest-cdf93bb811
Bump the vitest group with 2 updates
2025-03-22 09:51:26 +01:00
Alejandro Celaya
c1483d4c99 Merge pull request #1482 from shlinkio/dependabot/npm_and_yarn/sass-1.86.0
Bump sass from 1.85.1 to 1.86.0
2025-03-22 09:50:36 +01:00
Alejandro Celaya
aeedd45bb6 Merge pull request #1481 from shlinkio/dependabot/npm_and_yarn/react-router-7.4.0
Bump react-router from 7.3.0 to 7.4.0
2025-03-22 09:50:23 +01:00
dependabot[bot]
861cb6efc6 Bump sass from 1.85.1 to 1.86.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.85.1 to 1.86.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.85.1...1.86.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 08:14:35 +00:00
dependabot[bot]
a8f4b47803 Bump react-router from 7.3.0 to 7.4.0
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.3.0 to 7.4.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.4.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 08:14:20 +00:00
dependabot[bot]
437d769527 Bump vite-plugin-pwa from 0.21.1 to 0.21.2
Bumps [vite-plugin-pwa](https://github.com/vite-pwa/vite-plugin-pwa) from 0.21.1 to 0.21.2.
- [Release notes](https://github.com/vite-pwa/vite-plugin-pwa/releases)
- [Commits](https://github.com/vite-pwa/vite-plugin-pwa/compare/v0.21.1...v0.21.2)

---
updated-dependencies:
- dependency-name: vite-plugin-pwa
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 08:14:11 +00:00
dependabot[bot]
8dfed49dcf Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.8 to 3.0.9
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.9/packages/coverage-v8)

Updates `vitest` from 3.0.8 to 3.0.9
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.9/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 08:13:58 +00:00
dependabot[bot]
794a0a1b14 Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.22.0 to 9.23.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.22.0...v9.23.0)

Updates `typescript-eslint` from 8.26.1 to 8.27.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.27.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 08:13:24 +00:00
Alejandro Celaya
86bd650213 Merge pull request #1477 from acelaya-forks/feature/remove-stylelint
Remove stylelint
2025-03-16 09:47:01 +01:00
Alejandro Celaya
c4cb462a5e Remove stylelint 2025-03-16 09:44:12 +01:00
Alejandro Celaya
3aecc4fd5b Merge pull request #1474 from shlinkio/dependabot/npm_and_yarn/eslint-fba15697ea
Bump the eslint group with 2 updates
2025-03-15 10:17:19 +01:00
dependabot[bot]
7c550af923 Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint-plugin-react-compiler](https://github.com/facebook/react/tree/HEAD/compiler/packages/eslint-plugin-react-compiler) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint-plugin-react-compiler` from 19.0.0-beta-40c6c23-20250301 to 19.0.0-beta-714736e-20250131
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/compiler/packages/eslint-plugin-react-compiler)

Updates `typescript-eslint` from 8.26.0 to 8.26.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.26.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-compiler
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 09:15:44 +00:00
Alejandro Celaya
6588a0eede Merge pull request #1475 from shlinkio/dependabot/npm_and_yarn/vite-4427a9e5cd
Bump vite from 6.2.1 to 6.2.2 in the vite group
2025-03-15 10:14:16 +01:00
dependabot[bot]
7b219158e1 Bump vite from 6.2.1 to 6.2.2 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 08:59:13 +00:00
Alejandro Celaya
1c7ab0e1ea Merge pull request #1473 from shlinkio/dependabot/docker/node-23.10-alpine
Bump node from 23.9-alpine to 23.10-alpine
2025-03-15 09:31:27 +01:00
dependabot[bot]
148aa30915 Bump node from 23.9-alpine to 23.10-alpine
Bumps node from 23.9-alpine to 23.10-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 08:19:43 +00:00
Alejandro Celaya
781d9a0355 Merge pull request #1468 from shlinkio/dependabot/npm_and_yarn/vitest-1c77d7164e
Bump the vitest group with 2 updates
2025-03-08 10:06:38 +01:00
Alejandro Celaya
6a5c6817d0 Merge pull request #1459 from shlinkio/dependabot/npm_and_yarn/typescript-5.8.2
Bump typescript from 5.7.3 to 5.8.2
2025-03-08 10:06:29 +01:00
Alejandro Celaya
3d3a292284 Merge pull request #1466 from shlinkio/dependabot/npm_and_yarn/shlink-0fe11e8291
Bump @shlinkio/shlink-frontend-kit from 0.7.2 to 0.7.3 in the shlink group
2025-03-08 10:06:18 +01:00
Alejandro Celaya
5bf9547e55 Merge pull request #1467 from shlinkio/dependabot/npm_and_yarn/vite-015fd670ef
Bump vite from 6.2.0 to 6.2.1 in the vite group
2025-03-08 10:06:07 +01:00
Alejandro Celaya
45078bb632 Merge pull request #1469 from shlinkio/dependabot/npm_and_yarn/axe-core-4.10.3
Bump axe-core from 4.10.2 to 4.10.3
2025-03-08 10:05:57 +01:00
Alejandro Celaya
87060410b5 Merge pull request #1470 from shlinkio/dependabot/npm_and_yarn/reduxjs/toolkit-2.6.1
Bump @reduxjs/toolkit from 2.6.0 to 2.6.1
2025-03-08 10:05:47 +01:00
Alejandro Celaya
0bc898c999 Merge pull request #1471 from shlinkio/dependabot/npm_and_yarn/react-router-7.3.0
Bump react-router from 7.2.0 to 7.3.0
2025-03-08 10:05:37 +01:00
dependabot[bot]
94e188c6c0 Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.7 to 3.0.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.8/packages/coverage-v8)

Updates `vitest` from 3.0.7 to 3.0.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.8/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 09:01:55 +00:00
dependabot[bot]
8a74b3d736 Bump axe-core from 4.10.2 to 4.10.3
Bumps [axe-core](https://github.com/dequelabs/axe-core) from 4.10.2 to 4.10.3.
- [Release notes](https://github.com/dequelabs/axe-core/releases)
- [Changelog](https://github.com/dequelabs/axe-core/blob/v4.10.3/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core/compare/v4.10.2...v4.10.3)

---
updated-dependencies:
- dependency-name: axe-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 09:01:51 +00:00
dependabot[bot]
897d93b9ab Bump vite from 6.2.0 to 6.2.1 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.2.0 to 6.2.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.2.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 09:01:49 +00:00
dependabot[bot]
f7b0f692d9 Bump typescript from 5.7.3 to 5.8.2
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.3 to 5.8.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 09:01:44 +00:00
Alejandro Celaya
80c0b84785 Merge pull request #1465 from shlinkio/dependabot/npm_and_yarn/eslint-0d777aa326
Bump the eslint group with 3 updates
2025-03-08 10:00:25 +01:00
dependabot[bot]
dc685084d1 Bump react-router from 7.2.0 to 7.3.0
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.3.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 08:26:33 +00:00
dependabot[bot]
763c767286 Bump @reduxjs/toolkit from 2.6.0 to 2.6.1
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 08:26:20 +00:00
dependabot[bot]
01302cf25e Bump @shlinkio/shlink-frontend-kit in the shlink group
Bumps the shlink group with 1 update: [@shlinkio/shlink-frontend-kit](https://github.com/shlinkio/shlink-frontend-kit).


Updates `@shlinkio/shlink-frontend-kit` from 0.7.2 to 0.7.3
- [Release notes](https://github.com/shlinkio/shlink-frontend-kit/releases)
- [Changelog](https://github.com/shlinkio/shlink-frontend-kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-frontend-kit/compare/v0.7.2...v0.7.3)

---
updated-dependencies:
- dependency-name: "@shlinkio/shlink-frontend-kit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 08:25:11 +00:00
dependabot[bot]
6dee9260c1 Bump the eslint group with 3 updates
Bumps the eslint group with 3 updates: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v4.2.0/packages/eslint-plugin)

Updates `eslint` from 9.21.0 to 9.22.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.21.0...v9.22.0)

Updates `typescript-eslint` from 8.25.0 to 8.26.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.26.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 08:24:54 +00:00
Alejandro Celaya
8f1847e38b Merge pull request #1464 from acelaya-forks/feature/react-compiler-eslint
Add eslint-plugin-react-compiler
2025-03-07 09:39:38 +01:00
Alejandro Celaya
176e0b4961 Add eslint-plugin-react-compiler 2025-03-07 09:37:12 +01:00
Alejandro Celaya
de9be5fcf4 Fix typo 2025-03-07 09:34:26 +01:00
Alejandro Celaya
b46db36a1f Merge pull request #1456 from shlinkio/dependabot/npm_and_yarn/eslint-4b4bdc4453
Bump the eslint group with 3 updates
2025-03-01 09:49:18 +01:00
Alejandro Celaya
8dd9287eaf Merge pull request #1463 from shlinkio/dependabot/docker/node-23.9-alpine
Bump node from 23.8-alpine to 23.9-alpine
2025-03-01 09:49:08 +01:00
dependabot[bot]
ab784515c0 Bump node from 23.8-alpine to 23.9-alpine
Bumps node from 23.8-alpine to 23.9-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:30:13 +00:00
dependabot[bot]
337c8c1ee2 Bump the eslint group with 3 updates
Bumps the eslint group with 3 updates: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 4.0.1 to 4.1.0
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v4.1.0/packages/eslint-plugin)

Updates `eslint-plugin-react-hooks` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

Updates `typescript-eslint` from 8.24.1 to 8.25.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.25.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-react-hooks
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:20:53 +00:00
Alejandro Celaya
b46e637a64 Merge pull request #1457 from shlinkio/dependabot/npm_and_yarn/vite-b440395291
Bump vite from 6.1.1 to 6.2.0 in the vite group
2025-03-01 09:19:37 +01:00
Alejandro Celaya
b2d8cdb43f Merge pull request #1458 from shlinkio/dependabot/npm_and_yarn/vitest-ee01e65f68
Bump the vitest group with 2 updates
2025-03-01 09:19:29 +01:00
Alejandro Celaya
23ae01d34d Merge pull request #1460 from shlinkio/dependabot/npm_and_yarn/sass-1.85.1
Bump sass from 1.85.0 to 1.85.1
2025-03-01 09:19:13 +01:00
Alejandro Celaya
306c496489 Merge pull request #1462 from shlinkio/dependabot/npm_and_yarn/reduxjs/toolkit-2.6.0
Bump @reduxjs/toolkit from 2.5.1 to 2.6.0
2025-03-01 09:19:03 +01:00
dependabot[bot]
13e57eb2ae Bump @reduxjs/toolkit from 2.5.1 to 2.6.0
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.5.1...v2.6.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:09:39 +00:00
dependabot[bot]
c4ecdc9175 Bump sass from 1.85.0 to 1.85.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.85.0 to 1.85.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.85.0...1.85.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:09:19 +00:00
dependabot[bot]
2e99ee43ce Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.6 to 3.0.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.7/packages/coverage-v8)

Updates `vitest` from 3.0.6 to 3.0.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.7/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:08:51 +00:00
dependabot[bot]
4c7c457839 Bump vite from 6.1.1 to 6.2.0 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.1.1 to 6.2.0
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.2.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 08:08:37 +00:00
Alejandro Celaya
9b84df6774 Merge pull request #1454 from shlinkio/dependabot/npm_and_yarn/eslint-6f95c012c8
Bump the eslint group across 1 directory with 4 updates
2025-02-22 11:15:16 +01:00
dependabot[bot]
9d010f8996 Bump the eslint group across 1 directory with 4 updates
Bumps the eslint group with 4 updates in the / directory: [@shlinkio/eslint-config-js-coding-standard](https://github.com/shlinkio/js-coding-standard), [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@shlinkio/eslint-config-js-coding-standard` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/shlinkio/js-coding-standard/releases)
- [Changelog](https://github.com/shlinkio/js-coding-standard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/js-coding-standard/compare/v3.3.0...v3.4.0)

Updates `@stylistic/eslint-plugin` from 3.1.0 to 4.0.1
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v4.0.1/packages/eslint-plugin)

Updates `eslint` from 9.20.1 to 9.21.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.20.1...v9.21.0)

Updates `typescript-eslint` from 8.24.0 to 8.24.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@shlinkio/eslint-config-js-coding-standard"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 10:12:21 +00:00
Alejandro Celaya
21b7ca1a0a Merge pull request #1451 from shlinkio/dependabot/npm_and_yarn/vite-d69725c68b
Bump vite from 6.1.0 to 6.1.1 in the vite group
2025-02-22 11:10:40 +01:00
Alejandro Celaya
26578ed55d Merge pull request #1452 from shlinkio/dependabot/npm_and_yarn/vitest-28acf833c7
Bump the vitest group with 2 updates
2025-02-22 11:10:31 +01:00
Alejandro Celaya
1b6369264b Merge pull request #1453 from shlinkio/dependabot/npm_and_yarn/react-router-7.2.0
Bump react-router from 7.1.5 to 7.2.0
2025-02-22 11:09:31 +01:00
dependabot[bot]
7c0033397b Bump react-router from 7.1.5 to 7.2.0
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.1.5 to 7.2.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.2.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 08:11:14 +00:00
dependabot[bot]
49a75a08aa Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.5 to 3.0.6
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.6/packages/coverage-v8)

Updates `vitest` from 3.0.5 to 3.0.6
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.6/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 08:10:52 +00:00
dependabot[bot]
4dad18e45f Bump vite from 6.1.0 to 6.1.1 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.1.0 to 6.1.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.1.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 08:10:38 +00:00
Alejandro Celaya
0016333972 Merge pull request #1447 from shlinkio/dependabot/docker/node-23.8-alpine
Bump node from 23.7-alpine to 23.8-alpine
2025-02-15 09:39:13 +01:00
Alejandro Celaya
b65291bb01 Merge pull request #1448 from shlinkio/dependabot/npm_and_yarn/eslint-aeeda62d4e
Bump the eslint group with 2 updates
2025-02-15 09:38:42 +01:00
Alejandro Celaya
dac8a08fd2 Merge pull request #1449 from shlinkio/dependabot/npm_and_yarn/sass-1.85.0
Bump sass from 1.84.0 to 1.85.0
2025-02-15 09:38:34 +01:00
dependabot[bot]
c18808503c Bump sass from 1.84.0 to 1.85.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.84.0 to 1.85.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.84.0...1.85.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 08:25:41 +00:00
dependabot[bot]
06563feffc Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.20.0 to 9.20.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.20.0...v9.20.1)

Updates `typescript-eslint` from 8.23.0 to 8.24.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 08:24:58 +00:00
dependabot[bot]
468a529f94 Bump node from 23.7-alpine to 23.8-alpine
Bumps node from 23.7-alpine to 23.8-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 08:12:37 +00:00
Alejandro Celaya
0c568a327f Merge pull request #1446 from acelaya-forks/feature/sass-imports
Replace sass imports with sass use
2025-02-11 09:16:54 +01:00
Alejandro Celaya
2e9db77b00 Replace sass imports with sass use 2025-02-11 09:15:20 +01:00
Alejandro Celaya
c85917e378 Merge pull request #1445 from acelaya-forks/feature/js-sdk-2.0
Update to JS SDK 2.0 and shlink-web-component 0.13
2025-02-11 08:43:16 +01:00
Alejandro Celaya
d2d9810afd Update to JS SDK 2.0 and shlink-web-component 0.13 2025-02-11 08:41:29 +01:00
Alejandro Celaya
db13d43f99 Merge pull request #1442 from shlinkio/dependabot/npm_and_yarn/eslint-0e79b492a9
Bump the eslint group with 3 updates
2025-02-08 10:07:15 +01:00
dependabot[bot]
1acc64c074 Bump the eslint group with 3 updates
Bumps the eslint group with 3 updates: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 3.0.1 to 3.1.0
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v3.1.0/packages/eslint-plugin)

Updates `eslint` from 9.19.0 to 9.20.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.19.0...v9.20.0)

Updates `typescript-eslint` from 8.22.0 to 8.23.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.23.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 09:05:50 +00:00
Alejandro Celaya
32c4cd40d3 Merge pull request #1443 from shlinkio/dependabot/npm_and_yarn/vite-df52692fc7
Bump vite from 6.0.11 to 6.1.0 in the vite group
2025-02-08 10:04:21 +01:00
Alejandro Celaya
abf02ddbac Merge pull request #1444 from shlinkio/dependabot/npm_and_yarn/sass-1.84.0
Bump sass from 1.83.4 to 1.84.0
2025-02-08 10:04:14 +01:00
dependabot[bot]
552cfcf805 Bump sass from 1.83.4 to 1.84.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.83.4 to 1.84.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.4...1.84.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 09:00:31 +00:00
dependabot[bot]
4198ad73de Bump vite from 6.0.11 to 6.1.0 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.0.11 to 6.1.0
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.1.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 09:00:09 +00:00
Alejandro Celaya
b6a49e3b11 Merge pull request #1441 from shlinkio/dependabot/npm_and_yarn/multi-7d4cb18f35
Bump vitest and @vitest/coverage-v8
2025-02-08 09:56:31 +01:00
dependabot[bot]
e716624a3f Bump vitest and @vitest/coverage-v8
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) and [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8). These dependencies needed to be updated together.

Updates `vitest` from 3.0.4 to 3.0.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.5/packages/vitest)

Updates `@vitest/coverage-v8` from 3.0.4 to 3.0.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.5/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-06 08:44:38 +00:00
Alejandro Celaya
6a8825ecb7 Merge pull request #1440 from acelaya-forks/feature/react-router-tests
Work around issue with react-router + vitest in node >22.10
2025-02-06 09:43:17 +01:00
Alejandro Celaya
e171866226 Work around issue with react-router + vitest in node >22.10 2025-02-06 09:41:11 +01:00
Alejandro Celaya
c98616234f Merge pull request #1438 from shlinkio/dependabot/npm_and_yarn/shlink-d5058f2f6d
Bump the shlink group across 1 directory with 3 updates
2025-02-01 10:14:52 +01:00
Alejandro Celaya
4fa9f8967b Silence type error temporarily 2025-02-01 10:13:35 +01:00
dependabot[bot]
5ea42b6c15 Bump the shlink group across 1 directory with 3 updates
Bumps the shlink group with 3 updates in the / directory: [@shlinkio/shlink-frontend-kit](https://github.com/shlinkio/shlink-frontend-kit), [@shlinkio/shlink-js-sdk](https://shlink.io) and [@shlinkio/shlink-web-component](https://github.com/shlinkio/shlink-web-component).


Updates `@shlinkio/shlink-frontend-kit` from 0.7.0 to 0.7.2
- [Release notes](https://github.com/shlinkio/shlink-frontend-kit/releases)
- [Changelog](https://github.com/shlinkio/shlink-frontend-kit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-frontend-kit/compare/v0.7.0...v0.7.2)

Updates `@shlinkio/shlink-js-sdk` from 1.3.0 to 1.4.0

Updates `@shlinkio/shlink-web-component` from 0.12.0 to 0.12.1
- [Release notes](https://github.com/shlinkio/shlink-web-component/releases)
- [Changelog](https://github.com/shlinkio/shlink-web-component/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shlinkio/shlink-web-component/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: "@shlinkio/shlink-frontend-kit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
- dependency-name: "@shlinkio/shlink-js-sdk"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: shlink
- dependency-name: "@shlinkio/shlink-web-component"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: shlink
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 09:06:54 +00:00
Alejandro Celaya
d0bc6610b1 Merge pull request #1433 from shlinkio/dependabot/npm_and_yarn/eslint-e61a3236ab
Bump the eslint group with 2 updates
2025-02-01 10:05:09 +01:00
Alejandro Celaya
995769de27 Update to Shlink coding standard 3.3.0 2025-02-01 10:03:18 +01:00
Alejandro Celaya
aeb4f8ed9a Merge pull request #1439 from shlinkio/dependabot/docker/node-23.7-alpine
Bump node from 23.6-alpine to 23.7-alpine
2025-02-01 09:43:20 +01:00
dependabot[bot]
44e1bef29b Bump node from 23.6-alpine to 23.7-alpine
Bumps node from 23.6-alpine to 23.7-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 08:39:30 +00:00
Alejandro Celaya
b472b44c5b Merge pull request #1435 from shlinkio/dependabot/npm_and_yarn/reduxjs/toolkit-2.5.1
Bump @reduxjs/toolkit from 2.5.0 to 2.5.1
2025-02-01 09:37:47 +01:00
Alejandro Celaya
227b762740 Merge pull request #1437 from shlinkio/dependabot/npm_and_yarn/react-router-7.1.5
Bump react-router from 7.1.3 to 7.1.5
2025-02-01 09:37:17 +01:00
dependabot[bot]
c0765eeb92 Bump react-router from 7.1.3 to 7.1.5
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.1.3 to 7.1.5.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.1.5/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 08:14:12 +00:00
dependabot[bot]
da1b727788 Bump @reduxjs/toolkit from 2.5.0 to 2.5.1
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.5.0...v2.5.1)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 08:13:47 +00:00
dependabot[bot]
2875a857a5 Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 2.13.0 to 3.0.1
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v3.0.1/packages/eslint-plugin)

Updates `typescript-eslint` from 8.21.0 to 8.22.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.22.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 08:13:13 +00:00
Alejandro Celaya
81952acb84 Merge pull request #1427 from shlinkio/dependabot/npm_and_yarn/eslint-f129fbd6a6
Bump the eslint group with 2 updates
2025-01-25 09:57:32 +01:00
Alejandro Celaya
33fd901552 Merge pull request #1428 from shlinkio/dependabot/npm_and_yarn/testing-f3501c7be5
Bump @testing-library/user-event from 14.6.0 to 14.6.1 in the testing group
2025-01-25 09:57:23 +01:00
Alejandro Celaya
394ae44401 Merge pull request #1429 from shlinkio/dependabot/npm_and_yarn/vitest-bce4a882f7
Bump the vitest group with 2 updates
2025-01-25 09:57:11 +01:00
dependabot[bot]
5e3aaca8d8 Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.4/packages/coverage-v8)

Updates `vitest` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.4/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-25 08:42:45 +00:00
dependabot[bot]
1647ee023a Bump @testing-library/user-event in the testing group
Bumps the testing group with 1 update: [@testing-library/user-event](https://github.com/testing-library/user-event).


Updates `@testing-library/user-event` from 14.6.0 to 14.6.1
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.6...v14.6.1)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: testing
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-25 08:42:25 +00:00
dependabot[bot]
a95451d12c Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.18.0 to 9.19.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.19.0)

Updates `typescript-eslint` from 8.20.0 to 8.21.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.21.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-25 08:42:07 +00:00
Alejandro Celaya
c6c1caa420 Merge pull request #1426 from shlinkio/dependabot/npm_and_yarn/vite-6.0.11
Bump vite from 6.0.7 to 6.0.11
2025-01-22 11:42:49 +01:00
dependabot[bot]
14b2f3a9f6 Bump vite from 6.0.7 to 6.0.11
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.0.7 to 6.0.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 20:42:59 +00:00
Alejandro Celaya
022fe6af3a Merge pull request #1423 from shlinkio/dependabot/npm_and_yarn/vitest-53642b8677
Bump the vitest group with 2 updates
2025-01-18 10:02:29 +01:00
Alejandro Celaya
ed827c279a Merge pull request #1421 from shlinkio/dependabot/npm_and_yarn/eslint-4009f63520
Bump the eslint group with 3 updates
2025-01-18 09:50:29 +01:00
Alejandro Celaya
aede99b709 Remove no longer needed type error supression from vite config 2025-01-18 09:50:03 +01:00
Alejandro Celaya
281fa9ebdd Merge pull request #1422 from shlinkio/dependabot/npm_and_yarn/testing-76c18a7ea9
Bump the testing group with 2 updates
2025-01-18 09:49:21 +01:00
Alejandro Celaya
b7c2a423c8 Merge pull request #1424 from shlinkio/dependabot/npm_and_yarn/sass-1.83.4
Bump sass from 1.83.1 to 1.83.4
2025-01-18 09:49:04 +01:00
Alejandro Celaya
a39e841af2 Merge pull request #1425 from shlinkio/dependabot/npm_and_yarn/react-router-7.1.3
Bump react-router from 7.1.1 to 7.1.3
2025-01-18 09:48:50 +01:00
dependabot[bot]
00384abe9c Bump react-router from 7.1.1 to 7.1.3
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.1.1 to 7.1.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.1.3/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:46:23 +00:00
dependabot[bot]
4b1b107f44 Bump sass from 1.83.1 to 1.83.4
Bumps [sass](https://github.com/sass/dart-sass) from 1.83.1 to 1.83.4.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.1...1.83.4)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:46:05 +00:00
dependabot[bot]
4175bd3a5e Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 2.1.8 to 3.0.2
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.2/packages/coverage-v8)

Updates `vitest` from 2.1.8 to 3.0.2
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.2/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:45:47 +00:00
dependabot[bot]
15aeb5c922 Bump the testing group with 2 updates
Bumps the testing group with 2 updates: [@testing-library/react](https://github.com/testing-library/react-testing-library) and [@testing-library/user-event](https://github.com/testing-library/user-event).


Updates `@testing-library/react` from 16.1.0 to 16.2.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.1.0...v16.2.0)

Updates `@testing-library/user-event` from 14.5.2 to 14.6.0
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.5.2...v14.6)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: testing
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: testing
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:45:25 +00:00
dependabot[bot]
168f8d85ce Bump the eslint group with 3 updates
Bumps the eslint group with 3 updates: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 2.12.1 to 2.13.0
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v2.13.0/packages/eslint-plugin)

Updates `eslint-plugin-react` from 7.37.3 to 7.37.4
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.3...v7.37.4)

Updates `typescript-eslint` from 8.19.1 to 8.20.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.20.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:45:00 +00:00
Alejandro Celaya
5fc42d3850 Merge pull request #1418 from shlinkio/dependabot/npm_and_yarn/eslint-e98c3825a8
Bump the eslint group with 2 updates
2025-01-11 09:43:48 +01:00
dependabot[bot]
64d7d16ea2 Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 9.17.0 to 9.18.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.18.0)

Updates `typescript-eslint` from 8.19.0 to 8.19.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.19.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-11 08:40:25 +00:00
Alejandro Celaya
fa9de43123 Merge pull request #1417 from shlinkio/dependabot/docker/node-23.6-alpine
Bump node from 23.5-alpine to 23.6-alpine
2025-01-11 09:39:57 +01:00
Alejandro Celaya
87618181ab Merge pull request #1419 from shlinkio/dependabot/npm_and_yarn/typescript-5.7.3
Bump typescript from 5.7.2 to 5.7.3
2025-01-11 09:39:37 +01:00
Alejandro Celaya
03cf9dbe79 Merge pull request #1420 from shlinkio/dependabot/npm_and_yarn/jsdom-26.0.0
Bump jsdom from 25.0.1 to 26.0.0
2025-01-11 09:39:00 +01:00
dependabot[bot]
4afc621d10 Bump jsdom from 25.0.1 to 26.0.0
Bumps [jsdom](https://github.com/jsdom/jsdom) from 25.0.1 to 26.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/25.0.1...26.0.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-11 08:11:12 +00:00
dependabot[bot]
4f1d7fbd5f Bump typescript from 5.7.2 to 5.7.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-11 08:11:01 +00:00
dependabot[bot]
c5b7116992 Bump node from 23.5-alpine to 23.6-alpine
Bumps node from 23.5-alpine to 23.6-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-11 08:05:12 +00:00
Alejandro Celaya
b08610196c Merge pull request #1414 from shlinkio/dependabot/npm_and_yarn/vite-64c44d4a77
Bump vite from 6.0.6 to 6.0.7 in the vite group
2025-01-04 09:50:39 +01:00
Alejandro Celaya
3ad070ea18 Merge pull request #1415 from shlinkio/dependabot/npm_and_yarn/sass-1.83.1
Bump sass from 1.83.0 to 1.83.1
2025-01-04 09:50:30 +01:00
dependabot[bot]
94bc49a0b3 Bump sass from 1.83.0 to 1.83.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.83.0 to 1.83.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.0...1.83.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-04 08:32:37 +00:00
dependabot[bot]
9269593c46 Bump vite from 6.0.6 to 6.0.7 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.0.6 to 6.0.7
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-04 08:32:08 +00:00
Alejandro Celaya
baa19b5c4c Merge pull request #1392 from shlinkio/dependabot/npm_and_yarn/vitest-4ff847a748
Bump the vitest group with 2 updates
2025-01-02 20:01:21 +01:00
Alejandro Celaya
4fc48d3259 Merge pull request #1403 from shlinkio/dependabot/npm_and_yarn/fontawesome-2044f20233
Bump the fontawesome group with 5 updates
2025-01-02 20:00:43 +01:00
Alejandro Celaya
03c0f4649f Silenced type error in vite config 2025-01-02 20:00:09 +01:00
dependabot[bot]
0280fc0f59 Bump the vitest group with 2 updates
Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 2.1.6 to 2.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.8/packages/coverage-v8)

Updates `vitest` from 2.1.6 to 2.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.8/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:55:11 +00:00
dependabot[bot]
d0b48c90a6 Bump the fontawesome group with 5 updates
Bumps the fontawesome group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) | `6.7.1` | `6.7.2` |
| [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) | `6.7.1` | `6.7.2` |
| [@fortawesome/free-brands-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `6.7.1` | `6.7.2` |
| [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `6.7.1` | `6.7.2` |
| [@fortawesome/free-solid-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `6.7.1` | `6.7.2` |


Updates `@fortawesome/fontawesome-free` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

Updates `@fortawesome/fontawesome-svg-core` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

Updates `@fortawesome/free-brands-svg-icons` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

Updates `@fortawesome/free-regular-svg-icons` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

Updates `@fortawesome/free-solid-svg-icons` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fontawesome
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fontawesome
- dependency-name: "@fortawesome/free-brands-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fontawesome
- dependency-name: "@fortawesome/free-regular-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fontawesome
- dependency-name: "@fortawesome/free-solid-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: fontawesome
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:54:44 +00:00
Alejandro Celaya
e90ec0b27c Merge pull request #1412 from shlinkio/dependabot/npm_and_yarn/eslint-c560062209
Bump the eslint group across 1 directory with 4 updates
2025-01-02 19:53:57 +01:00
Alejandro Celaya
fc66171a09 Merge pull request #1399 from shlinkio/dependabot/npm_and_yarn/reduxjs/toolkit-2.5.0
Bump @reduxjs/toolkit from 2.4.0 to 2.5.0
2025-01-02 19:53:08 +01:00
dependabot[bot]
769f7f45ee Bump the eslint group across 1 directory with 4 updates
Bumps the eslint group with 4 updates in the / directory: [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin), [eslint](https://github.com/eslint/eslint), [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@stylistic/eslint-plugin` from 2.11.0 to 2.12.1
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v2.12.1/packages/eslint-plugin)

Updates `eslint` from 9.16.0 to 9.17.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.16.0...v9.17.0)

Updates `eslint-plugin-react` from 7.37.2 to 7.37.3
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.2...v7.37.3)

Updates `typescript-eslint` from 8.17.0 to 8.19.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.19.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@stylistic/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:52:55 +00:00
Alejandro Celaya
ca89e8e4f9 Merge pull request #1401 from shlinkio/dependabot/docker/node-23.5-alpine
Bump node from 23.3-alpine to 23.5-alpine
2025-01-02 19:51:08 +01:00
Alejandro Celaya
d7dda228b6 Merge pull request #1398 from shlinkio/dependabot/npm_and_yarn/sass-1.83.0
Bump sass from 1.82.0 to 1.83.0
2025-01-02 19:50:57 +01:00
Alejandro Celaya
28136a656f Merge pull request #1407 from shlinkio/dependabot/npm_and_yarn/vite-8aabc1763d
Bump vite from 6.0.3 to 6.0.6 in the vite group across 1 directory
2025-01-02 19:50:29 +01:00
Alejandro Celaya
4502ca5543 Merge pull request #1409 from shlinkio/dependabot/npm_and_yarn/chalk-5.4.1
Bump chalk from 5.3.0 to 5.4.1
2025-01-02 19:50:18 +01:00
Alejandro Celaya
b4decf9124 Merge pull request #1400 from shlinkio/dependabot/npm_and_yarn/react-redux-9.2.0
Bump react-redux from 9.1.2 to 9.2.0
2025-01-02 19:50:02 +01:00
dependabot[bot]
c5d12a49f4 Bump sass from 1.82.0 to 1.83.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.82.0 to 1.83.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.82.0...1.83.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:48:21 +00:00
dependabot[bot]
dcab31b30c Bump @reduxjs/toolkit from 2.4.0 to 2.5.0
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:48:17 +00:00
dependabot[bot]
c917d643d2 Bump react-redux from 9.1.2 to 9.2.0
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 9.1.2 to 9.2.0.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v9.1.2...v9.2.0)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:48:17 +00:00
dependabot[bot]
8c2ca8656b Bump vite from 6.0.3 to 6.0.6 in the vite group across 1 directory
Bumps the vite group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.0.3 to 6.0.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:48:10 +00:00
dependabot[bot]
9a22d51996 Bump node from 23.3-alpine to 23.5-alpine
Bumps node from 23.3-alpine to 23.5-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:47:58 +00:00
dependabot[bot]
d95352f467 Bump chalk from 5.3.0 to 5.4.1
Bumps [chalk](https://github.com/chalk/chalk) from 5.3.0 to 5.4.1.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v5.3.0...v5.4.1)

---
updated-dependencies:
- dependency-name: chalk
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:47:50 +00:00
Alejandro Celaya
8dbfffc383 Merge pull request #1410 from shlinkio/dependabot/npm_and_yarn/react-router-7.1.1
Bump react-router from 7.0.2 to 7.1.1
2025-01-02 19:47:42 +01:00
dependabot[bot]
1606ce357e Bump react-router from 7.0.2 to 7.1.1
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.0.2 to 7.1.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.1.1/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 18:46:28 +00:00
Alejandro Celaya
096d27f107 Merge pull request #1411 from acelaya-forks/feature/node-22-10-ci
Downgrade to node 22.10 in CI to work around a bug in react-router 7
2025-01-02 19:44:23 +01:00
Alejandro Celaya
8cc03a973f Downgrade to node 22.10 in CI to work around a bug in react-router 7 2025-01-02 19:42:49 +01:00
Alejandro Celaya
f4c4f408e2 Merge pull request #1395 from acelaya-forks/feature/react-router-7
Update to react-router 7
2024-12-09 11:55:28 +01:00
Alejandro Celaya
a65c7171c1 Update to react-router 7 2024-12-09 11:52:58 +01:00
Alejandro Celaya
d14c4fa606 Merge pull request #1388 from shlinkio/dependabot/npm_and_yarn/eslint-70533c04c4
Bump the eslint group with 2 updates
2024-12-07 10:36:15 +01:00
Alejandro Celaya
7e4c915b0b Merge pull request #1390 from shlinkio/dependabot/npm_and_yarn/testing-ad7bed71c3
Bump @testing-library/react from 16.0.1 to 16.1.0 in the testing group
2024-12-07 10:34:45 +01:00
dependabot[bot]
a5a15963b8 Bump the eslint group with 2 updates
Bumps the eslint group with 2 updates: [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint-plugin-react-hooks` from 5.0.0 to 5.1.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

Updates `typescript-eslint` from 8.16.0 to 8.17.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.17.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-hooks
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 09:26:37 +00:00
Alejandro Celaya
88515fc571 Merge pull request #1391 from shlinkio/dependabot/npm_and_yarn/vite-d4fe43cea2
Bump vite from 6.0.1 to 6.0.3 in the vite group
2024-12-07 10:25:52 +01:00
Alejandro Celaya
b20e8ae528 Merge pull request #1393 from shlinkio/dependabot/npm_and_yarn/react-external-link-2.4.0
Bump react-external-link from 2.3.1 to 2.4.0
2024-12-07 10:25:42 +01:00
Alejandro Celaya
dcbbe9a9a6 Merge pull request #1394 from shlinkio/dependabot/npm_and_yarn/sass-1.82.0
Bump sass from 1.81.0 to 1.82.0
2024-12-07 10:25:33 +01:00
dependabot[bot]
61cabaa356 Bump sass from 1.81.0 to 1.82.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.81.0 to 1.82.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.81.0...1.82.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 08:31:11 +00:00
dependabot[bot]
30f0df5a10 Bump react-external-link from 2.3.1 to 2.4.0
Bumps [react-external-link](https://github.com/acelaya/react-external-link) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/acelaya/react-external-link/releases)
- [Changelog](https://github.com/acelaya/react-external-link/blob/main/CHANGELOG.md)
- [Commits](https://github.com/acelaya/react-external-link/compare/v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: react-external-link
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 08:30:59 +00:00
dependabot[bot]
37562c06ec Bump vite from 6.0.1 to 6.0.3 in the vite group
Bumps the vite group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.0.1 to 6.0.3
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vite
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 08:30:05 +00:00
dependabot[bot]
478fc2c274 Bump @testing-library/react from 16.0.1 to 16.1.0 in the testing group
Bumps the testing group with 1 update: [@testing-library/react](https://github.com/testing-library/react-testing-library).


Updates `@testing-library/react` from 16.0.1 to 16.1.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.0.1...v16.1.0)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: testing
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 08:29:48 +00:00
91 changed files with 5921 additions and 6826 deletions

View File

@@ -21,9 +21,12 @@ updates:
shlink:
patterns:
- '@shlinkio/*'
types:
react:
patterns:
- '@types/*'
- 'react'
- 'react-dom'
- '@types/react'
- '@types/react-dom'
testing:
patterns:
- '@testing-library/*'
@@ -38,6 +41,10 @@ updates:
workbox:
patterns:
- 'workbox*'
tailwindcss:
patterns:
- 'tailwindcss'
- '@tailwindcss/*'
ignore:
# Bootstrap can introduce visual breaking changes on styles
# Ignore it, since the plan is to remove it anyway

View File

@@ -13,3 +13,4 @@ jobs:
with:
node-version: 22.x
publish-coverage: true
install-playwright: true

View File

@@ -5,7 +5,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- name: Checkout code
@@ -16,7 +16,7 @@ jobs:
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: 22.10
- name: Build
run: |
npm ci && \

View File

@@ -7,14 +7,14 @@ on:
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: 22.10
- name: Generate release assets
run: npm ci && VERSION=${GITHUB_REF#refs/tags/v} npm run build:dist
- name: Publish release with assets

View File

@@ -1,5 +0,0 @@
{
"extends": [
"@shlinkio/stylelint-config-css-coding-standard"
]
}

View File

@@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
## [4.4.0] - 2025-04-20
### Added
* [#1510](https://github.com/shlinkio/shlink-web-client/issues/1510) Existing HTTP credentials (cookies, TLS certs, authentication headers) can now be forwarded to the API server if appropriate [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Credentials) are set
* [shlink-web-component#637](https://github.com/shlinkio/shlink-web-component/pull/637) QR codes are now generated client-side, without hitting Shlink.
* [shlink-web-component#641](https://github.com/shlinkio/shlink-web-component/issues/641) It is now possible to provide any logo to be used with QR codes.
* [shlink-web-component#640](https://github.com/shlinkio/shlink-web-component/issues/640) Allow default QR code settings to be handled via app settings.
### Changed
* Update to `react-router` 7.0
* Update to `@shlinkio/shlink-frontend-kit` 0.8.x
* Update to `@shlinkio/shlink-web-component` 0.13.x
* Update to `@shlinkio/shlink-js-sdk` 2.0.0
* Add `eslint-plugin-react-compiler`
* Run unit tests in a headless browser using vitest browser mode and playwright.
### Deprecated
* *Nothing*
### Removed
* *Nothing*
### Fixed
* *Nothing*
## [4.3.0] - 2024-11-30
### Added
* [#1360](https://github.com/shlinkio/shlink-web-client/issues/1360) Added ability for server IDs to be generated based on the server name and URL, instead of generating a random UUID.
@@ -298,7 +323,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* [#774](https://github.com/shlinkio/shlink-web-client/issues/774) Dropped support for Shlink older than 2.8.0.
### Fixed
* [#715](https://github.com/shlinkio/shlink-web-client/issues/715) Fixed connection still failing on miss-configured servers, after editing their params to set proper values.
* [#715](https://github.com/shlinkio/shlink-web-client/issues/715) Fixed connection still failing on misconfigured servers, after editing their params to set proper values.
## [3.8.2] - 2022-12-17

View File

@@ -45,11 +45,8 @@ shlink-web-client
> Note: The `indocker` shell script is a helper used to run commands inside the docker container.
* `./indocker node --run lint`: Checks coding styles are fulfilled, both in JS/TS files and in stylesheets.
* `./indocker node --run lint:js`: Checks coding styles are fulfilled in JS/TS files.
* `./indocker node --run lint:css`: Checks coding styles are fulfilled in stylesheets.
* `./indocker node --run lint:js:fix`: Fixes coding styles in JS/TS files.
* `./indocker node --run lint:css:fix`: Fixes coding styles in stylesheets.
* `./indocker node --run lint`: Checks coding styles are fulfilled in JS/TS files.
* `./indocker node --run lint:fix`: Fixes coding styles in JS/TS files.
* `./indocker node --run test`: Runs unit tests with Jest.
## Building the project

View File

@@ -1,4 +1,4 @@
FROM node:23.3-alpine AS node
FROM node:23.11-alpine AS node
COPY . /shlink-web-client
ARG VERSION="latest"
ENV VERSION=${VERSION}

View File

@@ -1,24 +1,9 @@
import '@testing-library/jest-dom/vitest';
import { cleanup } from '@testing-library/react';
import axe from 'axe-core';
import { afterEach } from 'vitest';
axe.configure({
checks: [
{
// Disable color contrast checking, as it doesn't work in jsdom
id: 'color-contrast',
enabled: false,
},
],
});
// Clear all mocks and cleanup DOM after every test
afterEach(() => {
vi.clearAllMocks();
cleanup();
});
HTMLCanvasElement.prototype.getContext = (() => {}) as any;
(global as any).scrollTo = () => {};
(global as any).matchMedia = () => ({ matches: false });

15
dev.Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/playwright:v1.52.0-noble
ENV NODE_VERSION 22.14
ENV TINI_VERSION v0.19.0
# Install Node.js
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash && \
\. "$HOME/.nvm/nvm.sh" && \
nvm install ${NODE_VERSION}
# Install tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
RUN chmod +x /sbin/tini
# Set tini as the entry point, as node does not properly handle signals
ENTRYPOINT ["/sbin/tini", "--"]

View File

@@ -2,7 +2,9 @@ services:
shlink_web_client_node:
container_name: shlink_web_client_node
user: 1000:1000 # With this, files created via `indocker` script will belong to the host user
image: node:22.10-alpine
build:
context: .
dockerfile: ./dev.Dockerfile
command: /bin/sh -c "cd /home/shlink/www && npm install && npm run start"
volumes:
- ./:/home/shlink/www

10473
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,12 +7,8 @@
"license": "MIT",
"type": "module",
"scripts": {
"lint": "node --run lint:css && node --run lint:js",
"lint:css": "stylelint src/*.scss src/**/*.scss",
"lint:js": "eslint src test config/test",
"lint:fix": "node --run lint:css:fix && node --run lint:js:fix",
"lint:css:fix": "node --run lint:css -- --fix",
"lint:js:fix": "node --run lint:js -- --fix",
"lint": "eslint src test config/test",
"lint:fix": "node --run lint -- --fix",
"types": "tsc",
"start": "vite serve --host=0.0.0.0",
"preview": "vite preview --host=0.0.0.0",
@@ -24,18 +20,18 @@
"test:verbose": "node --run test -- --verbose"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.7.1",
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/free-brands-svg-icons": "^6.7.1",
"@fortawesome/free-regular-svg-icons": "^6.7.1",
"@fortawesome/free-solid-svg-icons": "^6.7.1",
"@fortawesome/fontawesome-free": "^6.7.2",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-regular-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@json2csv/plainjs": "^7.0.6",
"@reduxjs/toolkit": "^2.4.0",
"@reduxjs/toolkit": "^2.7.0",
"@shlinkio/data-manipulation": "^1.0.3",
"@shlinkio/shlink-frontend-kit": "^0.6.0",
"@shlinkio/shlink-js-sdk": "^1.3.0",
"@shlinkio/shlink-web-component": "^0.11.0",
"@shlinkio/shlink-frontend-kit": "^0.8.12",
"@shlinkio/shlink-js-sdk": "^2.1.0",
"@shlinkio/shlink-web-component": "^0.13.3",
"bootstrap": "5.2.3",
"bottlejs": "^2.0.1",
"clsx": "^2.1.1",
@@ -44,9 +40,9 @@
"date-fns": "^4.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-external-link": "^2.3.1",
"react-redux": "^9.1.2",
"react-router-dom": "^6.28.0",
"react-external-link": "^2.5.0",
"react-redux": "^9.2.0",
"react-router": "^7.5.1",
"reactstrap": "^9.2.3",
"redux-localstorage-simple": "^2.5.1",
"workbox-core": "^7.3.0",
@@ -56,35 +52,37 @@
"workbox-strategies": "^7.3.0"
},
"devDependencies": {
"@shlinkio/eslint-config-js-coding-standard": "~3.2.1",
"@shlinkio/stylelint-config-css-coding-standard": "~1.1.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@shlinkio/eslint-config-js-coding-standard": "~3.5.0",
"@stylistic/eslint-plugin": "^4.2.0",
"@tailwindcss/vite": "^4.1.4",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@total-typescript/shoehorn": "^0.1.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^10.0.0",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/coverage-v8": "^2.1.6",
"@vitejs/plugin-react": "^4.4.0",
"@vitest/browser": "^3.1.1",
"@vitest/coverage-v8": "^3.1.1",
"adm-zip": "^0.5.16",
"axe-core": "^4.10.2",
"chalk": "^5.3.0",
"eslint": "^9.16.0",
"axe-core": "^4.10.3",
"chalk": "^5.4.1",
"eslint": "^9.25.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-compiler": "^19.0.0-beta-ebf51a3-20250411",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"history": "^5.3.0",
"jsdom": "^25.0.1",
"sass": "^1.81.0",
"stylelint": "^15.11.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"vite": "^6.0.1",
"vite-plugin-pwa": "^0.21.1",
"vitest": "^2.0.2"
"playwright": "^1.52.0",
"sass": "^1.86.3",
"tailwindcss": "^4.1.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.30.1",
"vite": "^6.3.2",
"vite-plugin-pwa": "^1.0.0",
"vitest": "^3.0.5"
},
"browserslist": [
">0.2%",

View File

@@ -10,7 +10,8 @@ setup_single_shlink_server() {
[ -n "$SHLINK_SERVER_URL" ] || return 0
[ -n "$SHLINK_SERVER_API_KEY" ] || return 0
local name="${SHLINK_SERVER_NAME:-Shlink}"
echo "[{\"name\":\"${name}\",\"url\":\"${SHLINK_SERVER_URL}\",\"apiKey\":\"${SHLINK_SERVER_API_KEY}\"}]" > /usr/share/nginx/html/servers.json
local forwardCredentials="${SHLINK_SERVER_FORWARD_CREDENTIALS:-false}"
echo "[{\"name\":\"${name}\",\"url\":\"${SHLINK_SERVER_URL}\",\"apiKey\":\"${SHLINK_SERVER_API_KEY}\",\"forwardCredentials\":${forwardCredentials}}]" > /usr/share/nginx/html/servers.json
}
setup_single_shlink_server

View File

@@ -4,7 +4,7 @@ import type { GetState } from '../../container/types';
import type { ServerWithId } from '../../servers/data';
import { hasServerData } from '../../servers/data';
const apiClients: Record<string, ShlinkApiClient> = {};
const apiClients: Map<string, ShlinkApiClient> = new Map();
const isGetState = (getStateOrSelectedServer: GetState | ServerWithId): getStateOrSelectedServer is GetState =>
typeof getStateOrSelectedServer === 'function';
@@ -18,14 +18,22 @@ const getSelectedServerFromState = (getState: GetState): ServerWithId => {
};
export const buildShlinkApiClient = (httpClient: HttpClient) => (getStateOrSelectedServer: GetState | ServerWithId) => {
const { url: baseUrl, apiKey } = isGetState(getStateOrSelectedServer)
const { url: baseUrl, apiKey, forwardCredentials } = isGetState(getStateOrSelectedServer)
? getSelectedServerFromState(getStateOrSelectedServer)
: getStateOrSelectedServer;
const serverKey = `${apiKey}_${baseUrl}`;
const serverKey = `${apiKey}_${baseUrl}_${forwardCredentials ? 'forward' : 'no-forward'}`;
const existingApiClient = apiClients.get(serverKey);
const apiClient = apiClients[serverKey] ?? new ShlinkApiClient(httpClient, { apiKey, baseUrl });
apiClients[serverKey] = apiClient;
if (existingApiClient) {
return existingApiClient;
}
const apiClient = new ShlinkApiClient(
httpClient,
{ apiKey, baseUrl },
{ requestCredentials: forwardCredentials ? 'include' : undefined },
);
apiClients.set(serverKey, apiClient);
return apiClient;
};

View File

@@ -1,26 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.app-container {
height: 100%;
}
.app {
padding-top: $headerHeight;
height: 100%;
}
.shlink-wrapper {
min-height: 100%;
padding-bottom: $footer-height + $footer-margin;
margin-bottom: -($footer-height + $footer-margin);
}
.shlink-footer {
height: $footer-height;
margin-top: $footer-margin;
padding: 0;
@media (min-width: $mdMin) {
padding: 0 15px;
}
}

View File

@@ -3,14 +3,13 @@ import type { Settings } from '@shlinkio/shlink-web-component/settings';
import { clsx } from 'clsx';
import type { FC } from 'react';
import { useEffect, useRef } from 'react';
import { Route, Routes, useLocation } from 'react-router-dom';
import { Route, Routes, useLocation } from 'react-router';
import { AppUpdateBanner } from '../common/AppUpdateBanner';
import { NotFound } from '../common/NotFound';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
import type { ServersMap } from '../servers/data';
import { forceUpdate } from '../utils/helpers/sw';
import './App.scss';
type AppProps = {
fetchServers: () => void;
@@ -62,28 +61,38 @@ const App: FCWithDeps<AppProps, AppDeps> = (
}, [settings.ui?.theme]);
return (
<div className="container-fluid app-container">
<div className="tw:px-3 tw:h-full">
<MainHeader />
<div className="app">
<div className={clsx('shlink-wrapper', { 'd-flex align-items-center pt-3': isHome })}>
<div className="tw:h-full tw:pt-(--header-height)">
<div
data-testid="shlink-wrapper"
className={clsx(
'tw:min-h-full tw:pb-[calc(var(--footer-height)+var(--footer-margin))] tw:-mb-[calc(var(--footer-height)+var(--footer-margin))]',
{ 'tw:flex tw:items-center tw:pt-4': isHome },
)}
>
<Routes>
<Route index element={<Home />} />
<Route path="/settings/*" element={<Settings />} />
<Route path="/settings">
{['', '*'].map((path) => <Route key={path} path={path} element={<Settings />} />)}
</Route>
<Route path="/manage-servers" element={<ManageServers />} />
<Route path="/server/create" element={<CreateServer />} />
<Route path="/server/:serverId/edit" element={<EditServer />} />
<Route path="/server/:serverId/*" element={<ShlinkWebComponentContainer />} />
<Route path="/server/:serverId">
{['', '*'].map((path) => <Route key={path} path={path} element={<ShlinkWebComponentContainer />} />)}
</Route>
<Route path="*" element={<NotFound />} />
</Routes>
</div>
<div className="shlink-footer">
<div className="tw:h-(--footer-height) tw:mt-(--footer-margin) tw:md:px-4">
<ShlinkVersionsContainer />
</div>
</div>
<AppUpdateBanner isOpen={appUpdated} toggle={resetAppUpdate} forceUpdate={forceUpdate} />
<AppUpdateBanner isOpen={appUpdated} onClose={resetAppUpdate} forceUpdate={forceUpdate} />
</div>
);
};

View File

@@ -1,17 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
@import '../utils/mixins/horizontal-align';
.app-update-banner.app-update-banner {
@include horizontal-align();
position: fixed;
top: $headerHeight - 25px;
padding: 0 4rem 0 0;
z-index: 1040;
margin: 0;
color: var(--text-color);
text-align: center;
width: 700px;
max-width: calc(100% - 30px);
box-shadow: 0 0 1rem var(--brand-color);
}

View File

@@ -1,34 +1,47 @@
import { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { SimpleCard, useToggle } from '@shlinkio/shlink-frontend-kit';
import type { MouseEventHandler } from 'react';
import { forwardRef, useCallback } from 'react';
import { Alert, Button } from 'reactstrap';
import './AppUpdateBanner.scss';
import { useToggle } from '@shlinkio/shlink-frontend-kit';
import { Button, Card, CloseButton } from '@shlinkio/shlink-frontend-kit/tailwind';
import { clsx } from 'clsx';
import type { FC } from 'react';
import { useCallback } from 'react';
interface AppUpdateBannerProps {
isOpen: boolean;
toggle: MouseEventHandler<any>;
onClose: () => void;
forceUpdate: () => void;
}
export const AppUpdateBanner = forwardRef<HTMLElement, AppUpdateBannerProps>(({ isOpen, toggle, forceUpdate }, ref) => {
export const AppUpdateBanner: FC<AppUpdateBannerProps> = ({ isOpen, onClose, forceUpdate }) => {
const [isUpdating,, setUpdating] = useToggle();
const update = useCallback(() => {
setUpdating();
forceUpdate();
}, [forceUpdate, setUpdating]);
if (!isOpen) {
return null;
}
return (
<Alert className="app-update-banner" isOpen={isOpen} toggle={toggle} tag={SimpleCard} color="secondary" innerRef={ref}>
<h4 className="mb-4">This app has just been updated!</h4>
<p className="mb-0">
<Card
role="alert"
className={clsx(
'tw:w-[700px] tw:max-w-[calc(100%-30px)]',
'tw:fixed tw:top-[35px] tw:left-[50%] tw:translate-x-[-50%] tw:z-[1040]',
)}
>
<Card.Header className="tw:flex tw:items-center tw:justify-between">
<h5>This app has just been updated!</h5>
<CloseButton onClick={onClose} />
</Card.Header>
<Card.Body className="tw:flex tw:gap-4 tw:items-center tw:justify-between tw:max-md:flex-col">
Restart it to enjoy the new features.
<Button role="button" disabled={isUpdating} className="ms-2" color="secondary" size="sm" onClick={update}>
{!isUpdating && <>Restart now <FontAwesomeIcon icon={reloadIcon} className="ms-1" /></>}
<Button disabled={isUpdating} variant="secondary" solid onClick={update}>
{!isUpdating && <>Restart now <FontAwesomeIcon icon={reloadIcon} /></>}
{isUpdating && <>Restarting...</>}
</Button>
</p>
</Alert>
</Card.Body>
</Card>
);
});
};

View File

@@ -1,7 +1,7 @@
import { SimpleCard } from '@shlinkio/shlink-frontend-kit';
import { Button } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { PropsWithChildren, ReactNode } from 'react';
import { Component } from 'react';
import { Button } from 'reactstrap';
import { ErrorLayout } from './ErrorLayout';
type ErrorHandlerProps = PropsWithChildren<{
location?: typeof window.location;
@@ -33,14 +33,11 @@ export class ErrorHandler extends Component<ErrorHandlerProps, ErrorHandlerState
if (hasError) {
return (
<div className="home">
<SimpleCard className="p-4">
<h1>Oops! This is awkward :S</h1>
<p>It seems that something went wrong. Try refreshing the page or just click this button.</p>
<br />
<Button outline color="primary" onClick={() => location.reload()}>Take me back</Button>
</SimpleCard>
</div>
<ErrorLayout title="Oops! This is awkward :S">
<p>It seems that something went wrong. Try refreshing the page or just click this button.</p>
<br />
<Button size="lg" onClick={() => location.reload()}>Take me back</Button>
</ErrorLayout>
);
}

View File

@@ -0,0 +1,15 @@
import { SimpleCard } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC, PropsWithChildren } from 'react';
export type ErrorLayoutProps = PropsWithChildren<{
title: string;
}>;
export const ErrorLayout: FC<ErrorLayoutProps> = ({ children, title }) => (
<div className="tw:pt-4">
<SimpleCard className="tw:p-4 tw:w-full tw:lg:w-[65%] tw:m-auto">
<h2>{title}</h2>
{children}
</SimpleCard>
</div>
);

View File

@@ -1,15 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.home__title {
font-size: 1.75rem;
@media (min-width: $mdMin) {
font-size: 2.2rem;
}
}
.home__servers-container {
@media (min-width: $mdMin) {
border-left: 1px solid var(--border-color);
}
}

View File

@@ -1,18 +1,17 @@
import { faExternalLinkAlt, faPlus } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Button, Card } from '@shlinkio/shlink-frontend-kit/tailwind';
import { clsx } from 'clsx';
import { useEffect } from 'react';
import { ExternalLink } from 'react-external-link';
import { Link, useNavigate } from 'react-router-dom';
import { Card } from 'reactstrap';
import { useNavigate } from 'react-router';
import type { ServersMap } from '../servers/data';
import { ServersListGroup } from '../servers/ServersListGroup';
import { ShlinkLogo } from './img/ShlinkLogo';
import './Home.scss';
interface HomeProps {
export type HomeProps = {
servers: ServersMap;
}
};
export const Home = ({ servers }: HomeProps) => {
const navigate = useNavigate();
@@ -28,42 +27,42 @@ export const Home = ({ servers }: HomeProps) => {
}, [serversList, navigate]);
return (
<div className="w-100">
<Card className="mx-auto" style={{ maxWidth: '720px' }}>
<div className="d-flex flex-column flex-md-row">
<div className="p-4 d-none d-md-flex align-items-center" style={{ width: '40%' }}>
<div className="w-100">
<div className="tw:w-full">
<Card className="tw:mx-auto tw:max-w-[720px] tw:overflow-hidden">
<div className="tw:flex tw:flex-col tw:md:flex-row">
<div className="tw:p-6 tw:hidden tw:md:flex tw:items-center tw:w-[40%]">
<div className="tw:w-full">
<ShlinkLogo />
</div>
</div>
<div className="home__servers-container flex-grow-1">
<div className="tw:md:border-l tw:border-lm-border tw:dark:border-dm-border tw:flex-grow">
<h1
className={clsx('home__title p-4 text-center m-0', { 'border-bottom': !hasServers })}
style={{ borderColor: 'var(--border-color) !important' }}
className={clsx(
'tw:p-4 tw:text-center tw:border-lm-border tw:dark:border-dm-border',
{ 'tw:border-b': !hasServers },
)}
>
Welcome!
</h1>
<ServersListGroup embedded servers={serversList}>
{!hasServers && (
<div className="p-4 text-center d-flex flex-column gap-5">
<p className="mb-0">This application will help you manage your Shlink servers.</p>
<p className="mb-0">
<Link to="/server/create" className="btn btn-outline-primary btn-lg me-2">
<FontAwesomeIcon icon={faPlus}/> <span className="ms-1">Add a server</span>
</Link>
</p>
<p className="mb-0">
<ExternalLink href="https://shlink.io/documentation">
<small>
<span className="me-2">Learn more about Shlink</span>
<FontAwesomeIcon icon={faExternalLinkAlt}/>
</small>
</ExternalLink>
</p>
</div>
)}
</ServersListGroup>
{hasServers ? <ServersListGroup servers={serversList} /> : (
<div className="tw:p-6 tw:text-center tw:flex tw:flex-col tw:gap-12 tw:text-xl">
<p>This application will help you manage your Shlink servers.</p>
<p>
<Button to="/server/create" size="lg" inline>
<FontAwesomeIcon icon={faPlus} /> Add a server
</Button>
</p>
<p>
<ExternalLink href="https://shlink.io/documentation">
<small>
<span className="tw:mr-2">Learn more about Shlink</span>
<FontAwesomeIcon icon={faExternalLinkAlt} />
</small>
</ExternalLink>
</p>
</div>
)}
</div>
</div>
</Card>

View File

@@ -1,24 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.main-header.main-header {
color: white;
background-color: var(--brand-color) !important;
.navbar-brand {
color: inherit !important;
}
}
.main-header__brand-logo {
width: 26px;
margin-right: 5px;
}
.main-header__toggle-icon {
width: 20px;
transition: transform 300ms;
}
.main-header__toggle-icon--opened {
transform: rotate(180deg);
}

View File

@@ -4,12 +4,11 @@ import { useToggle } from '@shlinkio/shlink-frontend-kit';
import { clsx } from 'clsx';
import type { FC } from 'react';
import { useEffect } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { Link, useLocation } from 'react-router';
import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
import { ShlinkLogo } from './img/ShlinkLogo';
import './MainHeader.scss';
type MainHeaderDeps = {
ServersDropdown: FC;
@@ -25,20 +24,22 @@ const MainHeader: FCWithDeps<unknown, MainHeaderDeps> = () => {
useEffect(collapse, [location, collapse]);
const settingsPath = '/settings';
const toggleClass = clsx('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isNotCollapsed });
return (
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
<Navbar color="primary" dark fixed="top" expand="md" className="tw:text-white tw:bg-lm-brand tw:dark:bg-dm-brand">
<NavbarBrand tag={Link} to="/">
<ShlinkLogo className="main-header__brand-logo" color="white" /> Shlink
<ShlinkLogo className="tw:inline tw:w-7 tw:mr-1" color="white" /> Shlink
</NavbarBrand>
<NavbarToggler onClick={toggleCollapse}>
<FontAwesomeIcon icon={arrowIcon} className={toggleClass} />
<FontAwesomeIcon
icon={arrowIcon}
className={clsx('tw:transition-transform tw:duration-300', { 'tw:rotate-180': isNotCollapsed })}
/>
</NavbarToggler>
<Collapse navbar isOpen={isNotCollapsed}>
<Nav navbar className="ms-auto">
<Nav navbar className="tw:ml-auto">
<NavItem>
<NavLink tag={Link} to={settingsPath} active={pathname.startsWith(settingsPath)}>
<FontAwesomeIcon icon={cogsIcon} />&nbsp; Settings

View File

@@ -1,9 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.no-menu-wrapper {
padding: 15px 0 0;
@media (min-width: $mdMin) {
padding: 30px 20px 20px;
}
}

View File

@@ -1,11 +1,12 @@
import { clsx } from 'clsx';
import type { FC, PropsWithChildren } from 'react';
import './NoMenuLayout.scss';
export type NoMenuLayoutProps = PropsWithChildren & {
className?: string;
};
export const NoMenuLayout: FC<NoMenuLayoutProps> = ({ children, className }) => (
<div className={clsx('no-menu-wrapper container-xl', className)}>{children}</div>
<div className={clsx('tw:container tw:mx-auto tw:p-5 tw:pt-8 tw:max-md:p-0 tw:max-md:py-4', className)}>
{children}
</div>
);

View File

@@ -1,19 +1,16 @@
import { SimpleCard } from '@shlinkio/shlink-frontend-kit';
import { Button } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC, PropsWithChildren } from 'react';
import { Link } from 'react-router-dom';
import { ErrorLayout } from './ErrorLayout';
type NotFoundProps = PropsWithChildren<{ to?: string }>;
export const NotFound: FC<NotFoundProps> = ({ to = '/', children = 'Home' }) => (
<div className="home">
<SimpleCard className="p-4">
<h2>Oops! We could not find requested route.</h2>
<p>
Use your browser&apos;s back button to navigate to the page you have previously come from, or just press this
button.
</p>
<br />
<Link to={to} className="btn btn-outline-primary btn-lg">{children}</Link>
</SimpleCard>
</div>
<ErrorLayout title="Oops! We could not find requested route.">
<p>
Use your browser&apos;s back button to navigate to the page you have previously come from, or just press this
button.
</p>
<br />
<Button inline to={to} size="lg">{children}</Button>
</ErrorLayout>
);

View File

@@ -1,6 +1,6 @@
import type { FC, PropsWithChildren } from 'react';
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
import { useLocation } from 'react-router';
export const ScrollToTop: FC<PropsWithChildren> = ({ children }) => {
const location = useLocation();

View File

@@ -12,7 +12,7 @@ export interface ShlinkVersionsProps {
}
const VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (
<ExternalLink href={`https://github.com/shlinkio/${project}/releases/${version}`} className="text-muted">
<ExternalLink href={`https://github.com/shlinkio/${project}/releases/${version}`} className="tw:text-gray-500">
<b>{version}</b>
</ExternalLink>
);
@@ -21,7 +21,7 @@ export const ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIE
const normalizedClientVersion = normalizeVersion(clientVersion);
return (
<small className="text-muted">
<small className="tw:text-gray-500">
{isReachableServer(selectedServer) && (
<>Server: <VersionLink project="shlink" version={selectedServer.printableVersion} /> - </>
)}

View File

@@ -1,9 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.shlink-versions-container--with-sidebar {
margin-left: 0;
@media (min-width: $mdMin) {
margin-left: $asideMenuWidth;
}
}

View File

@@ -2,7 +2,6 @@ import { clsx } from 'clsx';
import type { SelectedServer } from '../servers/data';
import { isReachableServer } from '../servers/data';
import { ShlinkVersions } from './ShlinkVersions';
import './ShlinkVersionsContainer.scss';
export type ShlinkVersionsContainerProps = {
selectedServer: SelectedServer;
@@ -10,9 +9,7 @@ export type ShlinkVersionsContainerProps = {
export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => (
<div
className={clsx('text-center', {
'shlink-versions-container--with-sidebar': isReachableServer(selectedServer),
})}
className={clsx('tw:text-center', { 'tw:md:ml-(--aside-menu-width)': isReachableServer(selectedServer) })}
>
<ShlinkVersions selectedServer={selectedServer} />
</div>

View File

@@ -1,4 +1,4 @@
import { FetchHttpClient } from '@shlinkio/shlink-js-sdk/browser';
import { FetchHttpClient } from '@shlinkio/shlink-js-sdk/fetch';
import { ShlinkWebComponent } from '@shlinkio/shlink-web-component';
import type Bottle from 'bottlejs';
import type { ConnectDecorator } from '../../container/types';

View File

@@ -1,12 +1,11 @@
import type { IContainer } from 'bottlejs';
import type { FC } from 'react';
import { useRef } from 'react';
import { useMemo } from 'react';
export type FCWithDeps<Props, Deps> = FC<Props> & Partial<Deps>;
export function useDependencies<Deps>(obj: Deps): Omit<Required<Deps>, keyof FC> {
const depsRef = useRef(obj as Omit<Required<Deps>, keyof FC>);
return depsRef.current;
return useMemo(() => obj as Omit<Required<Deps>, keyof FC>, [obj]);
}
export function componentFactory<Deps, CompType = Omit<Partial<Deps>, keyof FC>>(

View File

@@ -1,4 +1,6 @@
@import '../node_modules/@shlinkio/shlink-frontend-kit/dist/base'; // Before bootstrap stylesheet. Includes SASS var overrides
@import '../node_modules/bootstrap/scss/bootstrap.scss';
@import '../node_modules/@shlinkio/shlink-frontend-kit/dist/index'; // After bootstrap. Includes CSS overwrites
@import '../node_modules/@shlinkio/shlink-web-component/dist/index';
@use '../node_modules/@shlinkio/shlink-frontend-kit/dist/base'; // Before bootstrap stylesheet
@use '../node_modules/bootstrap/scss/bootstrap.scss' with (
$primary: base.$mainColor // Override bootstrap's primary color
);
@use '../node_modules/@shlinkio/shlink-frontend-kit/dist/index'; // After bootstrap. Includes CSS overrides
@use '../node_modules/@shlinkio/shlink-web-component/dist/index' as c-index;

View File

@@ -1,10 +1,11 @@
import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import { BrowserRouter } from 'react-router';
import pack from '../package.json';
import { container } from './container';
import { setUpStore } from './container/store';
import { register as registerServiceWorker } from './serviceWorkerRegistration';
import './tailwind.css';
import './index.scss';
const store = setUpStore(container);

View File

@@ -1,9 +1,10 @@
import type { TimeoutToggle } from '@shlinkio/shlink-frontend-kit';
import { Result, useToggle } from '@shlinkio/shlink-frontend-kit';
import { useToggle } from '@shlinkio/shlink-frontend-kit';
import type { ResultProps } from '@shlinkio/shlink-frontend-kit/tailwind';
import { Button, Result } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { useCallback, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Button } from 'reactstrap';
import { useNavigate } from 'react-router';
import { NoMenuLayout } from '../common/NoMenuLayout';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
@@ -26,11 +27,11 @@ type CreateServerDeps = {
useTimeoutToggle: TimeoutToggle;
};
const ImportResult = ({ type }: { type: 'error' | 'success' }) => (
<div className="mt-3">
<Result type={type}>
{type === 'success' && 'Servers properly imported. You can now select one from the list :)'}
{type === 'error' && 'The servers could not be imported. Make sure the format is correct.'}
const ImportResult = ({ variant }: Pick<ResultProps, 'variant'>) => (
<div className="tw:mt-4">
<Result variant={variant}>
{variant === 'success' && 'Servers properly imported. You can now select one from the list :)'}
{variant === 'error' && 'The servers could not be imported. Make sure the format is correct.'}
</Result>
</div>
);
@@ -40,7 +41,9 @@ const CreateServer: FCWithDeps<CreateServerProps, CreateServerDeps> = ({ servers
const navigate = useNavigate();
const goBack = useGoBack();
const hasServers = !!Object.keys(servers).length;
// eslint-disable-next-line react-compiler/react-compiler
const [serversImported, setServersImported] = useTimeoutToggle(false, SHOW_IMPORT_MSG_TIME);
// eslint-disable-next-line react-compiler/react-compiler
const [errorImporting, setErrorImporting] = useTimeoutToggle(false, SHOW_IMPORT_MSG_TIME);
const [isConfirmModalOpen, toggleConfirmModal] = useToggle();
const [serverData, setServerData] = useState<ServerData>();
@@ -66,22 +69,22 @@ const CreateServer: FCWithDeps<CreateServerProps, CreateServerDeps> = ({ servers
return (
<NoMenuLayout>
<ServerForm title={<h5 className="mb-0">Add new server</h5>} onSubmit={onSubmit}>
<ServerForm title="Add new server" onSubmit={onSubmit}>
{!hasServers && (
<ImportServersBtn tooltipPlacement="top" onImport={setServersImported} onImportError={setErrorImporting} />
<ImportServersBtn tooltipPlacement="top" onImport={setServersImported} onError={setErrorImporting} />
)}
{hasServers && <Button outline onClick={goBack}>Cancel</Button>}
<Button outline color="primary" className="ms-2">Create server</Button>
{hasServers && <Button variant="secondary" onClick={goBack}>Cancel</Button>}
<Button type="submit">Create server</Button>
</ServerForm>
{serversImported && <ImportResult type="success" />}
{errorImporting && <ImportResult type="error" />}
{serversImported && <ImportResult variant="success" />}
{errorImporting && <ImportResult variant="error" />}
<DuplicatedServersModal
isOpen={isConfirmModalOpen}
open={isConfirmModalOpen}
duplicatedServers={serverData ? [serverData] : []}
onDiscard={goBack}
onSave={() => serverData && saveNewServer(serverData)}
onClose={goBack}
onConfirm={() => serverData && saveNewServer(serverData)}
/>
</NoMenuLayout>
);

View File

@@ -1,8 +1,7 @@
import { faMinusCircle as deleteIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useToggle } from '@shlinkio/shlink-frontend-kit';
import { clsx } from 'clsx';
import type { FC, PropsWithChildren } from 'react';
import { useCallback } from 'react';
import { useNavigate } from 'react-router';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
import type { ServerWithId } from './data';
@@ -10,28 +9,29 @@ import type { DeleteServerModalProps } from './DeleteServerModal';
export type DeleteServerButtonProps = PropsWithChildren<{
server: ServerWithId;
className?: string;
textClassName?: string;
}>;
type DeleteServerButtonDeps = {
DeleteServerModal: FC<DeleteServerModalProps>;
};
const DeleteServerButton: FCWithDeps<DeleteServerButtonProps, DeleteServerButtonDeps> = (
{ server, className, children, textClassName },
) => {
const DeleteServerButton: FCWithDeps<DeleteServerButtonProps, DeleteServerButtonDeps> = ({ server, children }) => {
const { DeleteServerModal } = useDependencies(DeleteServerButton);
const [isModalOpen, , showModal, hideModal] = useToggle();
const navigate = useNavigate();
const onClose = useCallback((confirmed: boolean) => {
hideModal();
if (confirmed) {
navigate('/');
}
}, [hideModal, navigate]);
return (
<>
<button type="button" className={clsx(className, 'p-0 bg-transparent border-0')} onClick={showModal}>
{!children && <FontAwesomeIcon fixedWidth icon={deleteIcon} />}
<span className={textClassName}>{children ?? 'Remove this server'}</span>
<button type="button" className="tw:text-danger tw:hover:underline" onClick={showModal}>
{children}
</button>
<DeleteServerModal server={server} isOpen={isModalOpen} toggle={hideModal} />
<DeleteServerModal server={server} open={isModalOpen} onClose={onClose} />
</>
);
};

View File

@@ -1,44 +1,37 @@
import type { ExitAction } from '@shlinkio/shlink-frontend-kit/tailwind';
import { CardModal } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { useRef } from 'react';
import { useNavigate } from 'react-router-dom';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import { useCallback } from 'react';
import type { ServerWithId } from './data';
export interface DeleteServerModalProps {
export type DeleteServerModalProps = {
server: ServerWithId;
toggle: () => void;
isOpen: boolean;
redirectHome?: boolean;
}
onClose: (confirmed: boolean) => void;
open: boolean;
};
interface DeleteServerModalConnectProps extends DeleteServerModalProps {
type DeleteServerModalConnectProps = DeleteServerModalProps & {
deleteServer: (server: ServerWithId) => void;
}
};
export const DeleteServerModal: FC<DeleteServerModalConnectProps> = (
{ server, toggle, isOpen, deleteServer, redirectHome = true },
) => {
const navigate = useNavigate();
const doDelete = useRef<boolean>(false);
const toggleAndDelete = () => {
doDelete.current = true;
toggle();
};
const onClosed = () => {
if (!doDelete.current) {
return;
export const DeleteServerModal: FC<DeleteServerModalConnectProps> = ({ server, onClose, open, deleteServer }) => {
const onClosed = useCallback((exitAction: ExitAction) => {
if (exitAction === 'confirm') {
deleteServer(server);
}
deleteServer(server);
if (redirectHome) {
navigate('/');
}
};
}, [deleteServer, server]);
return (
<Modal isOpen={isOpen} toggle={toggle} centered onClosed={onClosed}>
<ModalHeader toggle={toggle} className="text-danger">Remove server</ModalHeader>
<ModalBody>
<CardModal
open={open}
title="Remove server"
variant="danger"
onClose={() => onClose(false)}
onConfirm={() => onClose(true)}
onClosed={onClosed}
confirmText="Delete"
>
<div className="tw:flex tw:flex-col tw:gap-y-4">
<p>Are you sure you want to remove <b>{server ? server.name : ''}</b>?</p>
<p>
<i>
@@ -46,11 +39,7 @@ export const DeleteServerModal: FC<DeleteServerModalConnectProps> = (
You can create it again at any moment.
</i>
</p>
</ModalBody>
<ModalFooter>
<Button color="link" onClick={toggle}>Cancel</Button>
<Button color="danger" onClick={toggleAndDelete}>Delete</Button>
</ModalFooter>
</Modal>
</div>
</CardModal>
);
};

View File

@@ -1,6 +1,6 @@
import { useParsedQuery } from '@shlinkio/shlink-frontend-kit';
import { Button } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { Button } from 'reactstrap';
import { NoMenuLayout } from '../common/NoMenuLayout';
import type { FCWithDeps } from '../container/utils';
import { componentFactory } from '../container/utils';
@@ -40,12 +40,12 @@ const EditServer: FCWithDeps<EditServerProps, EditServerDeps> = withSelectedServ
return (
<NoMenuLayout>
<ServerForm
title={<h5 className="mb-0">Edit &quot;{selectedServer.name}&quot;</h5>}
title={<>Edit &quot;{selectedServer.name}&quot;</>}
initialValues={selectedServer}
onSubmit={handleSubmit}
>
<Button outline className="me-2" onClick={goBack}>Cancel</Button>
<Button outline color="primary">Save</Button>
<Button variant="secondary" onClick={goBack}>Cancel</Button>
<Button type="submit">Save</Button>
</ServerForm>
</NoMenuLayout>
);

View File

@@ -1,11 +1,9 @@
import { faFileDownload as exportIcon, faPlus as plusIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { TimeoutToggle } from '@shlinkio/shlink-frontend-kit';
import { Result, SearchField, SimpleCard } from '@shlinkio/shlink-frontend-kit';
import { Button, Result, SearchInput, SimpleCard, Table } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
import { Button } from 'reactstrap';
import { NoMenuLayout } from '../common/NoMenuLayout';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
@@ -41,48 +39,50 @@ const ManageServers: FCWithDeps<ManageServersProps, ManageServersDeps> = ({ serv
[allServers, searchTerm],
);
const hasAutoConnect = allServers.some(({ autoConnect }) => !!autoConnect);
// eslint-disable-next-line react-compiler/react-compiler
const [errorImporting, setErrorImporting] = useTimeoutToggle(false, SHOW_IMPORT_MSG_TIME);
return (
<NoMenuLayout className="d-flex flex-column gap-3">
<SearchField onChange={setSearchTerm} />
<NoMenuLayout className="tw:flex tw:flex-col tw:gap-y-4">
<SearchInput onChange={setSearchTerm} />
<div className="d-flex flex-column flex-md-row gap-2">
<div className="d-flex gap-2">
<ImportServersBtn className="flex-fill" onImportError={setErrorImporting}>Import servers</ImportServersBtn>
<div className="tw:flex tw:flex-col tw:md:flex-row tw:gap-2">
<div className="tw:flex tw:gap-2">
<ImportServersBtn className="tw:flex-grow" onError={setErrorImporting}>Import servers</ImportServersBtn>
{filteredServers.length > 0 && (
<Button outline className="flex-fill" onClick={async () => serversExporter.exportServers()}>
<FontAwesomeIcon icon={exportIcon} fixedWidth /> Export servers
<Button variant="secondary" className="tw:flex-grow" onClick={async () => serversExporter.exportServers()}>
<FontAwesomeIcon icon={exportIcon} /> Export servers
</Button>
)}
</div>
<Button outline color="primary" className="ms-md-auto" tag={Link} to="/server/create">
<FontAwesomeIcon icon={plusIcon} fixedWidth /> Add a server
<Button className="tw:md:ml-auto" to="/server/create">
<FontAwesomeIcon icon={plusIcon} /> Add a server
</Button>
</div>
<SimpleCard>
<table className="table table-hover responsive-table mb-0">
<thead className="responsive-table__header">
<tr>
{hasAutoConnect && <th style={{ width: '50px' }}><span className="sr-only">Auto-connect</span></th>}
<th>Name</th>
<th>Base URL</th>
<th><span className="sr-only">Options</span></th>
</tr>
</thead>
<tbody>
{!filteredServers.length && <tr className="text-center"><td colSpan={4}>No servers found.</td></tr>}
{filteredServers.map((server) => (
<ManageServersRow key={server.id} server={server} hasAutoConnect={hasAutoConnect} />
))}
</tbody>
</table>
<SimpleCard className="card">
<Table header={(
<Table.Row>
{hasAutoConnect && (
<Table.Cell className="tw:w-[35px]"><span className="tw:sr-only">Auto-connect</span></Table.Cell>
)}
<Table.Cell>Name</Table.Cell>
<Table.Cell>Base URL</Table.Cell>
<Table.Cell><span className="sr-only">Options</span></Table.Cell>
</Table.Row>
)}>
{!filteredServers.length && (
<Table.Row className="tw:text-center"><Table.Cell colSpan={4}>No servers found.</Table.Cell></Table.Row>
)}
{filteredServers.map((server) => (
<ManageServersRow key={server.id} server={server} hasAutoConnect={hasAutoConnect} />
))}
</Table>
</SimpleCard>
{errorImporting && (
<div>
<Result type="error">The servers could not be imported. Make sure the format is correct.</Result>
<Result variant="error">The servers could not be imported. Make sure the format is correct.</Result>
</div>
)}
</NoMenuLayout>

View File

@@ -1,7 +1,8 @@
import { faCheck as checkIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Table } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import { UncontrolledTooltip } from 'reactstrap';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
@@ -21,27 +22,27 @@ const ManageServersRow: FCWithDeps<ManageServersRowProps, ManageServersRowDeps>
const { ManageServersRowDropdown } = useDependencies(ManageServersRow);
return (
<tr className="responsive-table__row">
<Table.Row className="tw:relative">
{hasAutoConnect && (
<td className="responsive-table__cell" data-th="Auto-connect">
<Table.Cell columnName="Auto-connect">
{server.autoConnect && (
<>
<FontAwesomeIcon icon={checkIcon} className="text-primary" id="autoConnectIcon" />
<FontAwesomeIcon icon={checkIcon} className="tw:text-brand" id="autoConnectIcon" />
<UncontrolledTooltip target="autoConnectIcon" placement="right">
Auto-connect to this server
</UncontrolledTooltip>
</>
)}
</td>
</Table.Cell>
)}
<th className="responsive-table__cell" data-th="Name">
<Table.Cell className="tw:font-bold" columnName="Name">
<Link to={`/server/${server.id}`}>{server.name}</Link>
</th>
<td className="responsive-table__cell" data-th="Base URL">{server.url}</td>
<td className="responsive-table__cell text-end">
</Table.Cell>
<Table.Cell columnName="Base URL" className="tw:max-lg:border-b-0">{server.url}</Table.Cell>
<Table.Cell className="tw:text-right tw:max-lg:absolute tw:right-0 tw:-top-1 tw:mx-lg:pt-0">
<ManageServersRowDropdown server={server} />
</td>
</tr>
</Table.Cell>
</Table.Row>
);
};

View File

@@ -8,7 +8,7 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { RowDropdownBtn, useToggle } from '@shlinkio/shlink-frontend-kit';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import { DropdownItem } from 'reactstrap';
import type { FCWithDeps } from '../container/utils';
import { componentFactory, useDependencies } from '../container/utils';
@@ -37,23 +37,25 @@ const ManageServersRowDropdown: FCWithDeps<ManageServersRowDropdownConnectProps,
const autoConnectIcon = isAutoConnect ? toggleOffIcon : toggleOnIcon;
return (
<RowDropdownBtn minWidth={isAutoConnect ? 210 : 170}>
<DropdownItem tag={Link} to={serverUrl}>
<FontAwesomeIcon icon={connectIcon} fixedWidth /> Connect
</DropdownItem>
<DropdownItem tag={Link} to={`${serverUrl}/edit`}>
<FontAwesomeIcon icon={editIcon} fixedWidth /> Edit server
</DropdownItem>
<DropdownItem onClick={() => setAutoConnect(server, !isAutoConnect)}>
<FontAwesomeIcon icon={autoConnectIcon} fixedWidth /> {isAutoConnect ? 'Do not a' : 'A'}uto-connect
</DropdownItem>
<DropdownItem divider tag="hr" />
<DropdownItem className="dropdown-item--danger" onClick={showModal}>
<FontAwesomeIcon icon={deleteIcon} fixedWidth /> Remove server
</DropdownItem>
<>
<RowDropdownBtn minWidth={isAutoConnect ? 210 : 170}>
<DropdownItem tag={Link} to={serverUrl}>
<FontAwesomeIcon icon={connectIcon} fixedWidth /> Connect
</DropdownItem>
<DropdownItem tag={Link} to={`${serverUrl}/edit`}>
<FontAwesomeIcon icon={editIcon} fixedWidth /> Edit server
</DropdownItem>
<DropdownItem onClick={() => setAutoConnect(server, !isAutoConnect)}>
<FontAwesomeIcon icon={autoConnectIcon} fixedWidth /> {isAutoConnect ? 'Do not a' : 'A'}uto-connect
</DropdownItem>
<DropdownItem divider tag="hr" />
<DropdownItem className="tw:text-danger" onClick={showModal}>
<FontAwesomeIcon icon={deleteIcon} fixedWidth /> Remove server
</DropdownItem>
</RowDropdownBtn>
<DeleteServerModal redirectHome={false} server={server} isOpen={isModalOpen} toggle={hideModal} />
</RowDropdownBtn>
<DeleteServerModal server={server} open={isModalOpen} onClose={hideModal} />
</>
);
};

View File

@@ -1,6 +1,6 @@
import { faPlus as plusIcon, faServer as serverIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import { DropdownItem, DropdownMenu, DropdownToggle, UncontrolledDropdown } from 'reactstrap';
import type { SelectedServer, ServersMap } from './data';
import { getServerId } from './data';
@@ -13,36 +13,30 @@ export interface ServersDropdownProps {
export const ServersDropdown = ({ servers, selectedServer }: ServersDropdownProps) => {
const serversList = Object.values(servers);
const renderServers = () => {
if (serversList.length === 0) {
return (
<DropdownItem tag={Link} to="/server/create">
<FontAwesomeIcon icon={plusIcon} /> <span className="ms-1">Add a server</span>
</DropdownItem>
);
}
return (
<>
{serversList.map(({ name, id }) => (
<DropdownItem key={id} tag={Link} to={`/server/${id}`} active={getServerId(selectedServer) === id}>
{name}
</DropdownItem>
))}
<DropdownItem divider tag="hr" />
<DropdownItem tag={Link} to="/manage-servers">
<FontAwesomeIcon icon={serverIcon} /> <span className="ms-1">Manage servers</span>
</DropdownItem>
</>
);
};
return (
<UncontrolledDropdown nav inNavbar>
<DropdownToggle nav caret>
<FontAwesomeIcon icon={serverIcon} /> <span className="ms-1">Servers</span>
<FontAwesomeIcon icon={serverIcon} /> <span className="tw:ml-1">Servers</span>
</DropdownToggle>
<DropdownMenu end style={{ right: 0 }}>{renderServers()}</DropdownMenu>
<DropdownMenu end className="tw:right-0">
{serversList.length === 0 ? (
<DropdownItem tag={Link} to="/server/create">
<FontAwesomeIcon icon={plusIcon} /> <span className="tw:ml-1">Add a server</span>
</DropdownItem>
) : (
<>
{serversList.map(({ name, id }) => (
<DropdownItem key={id} tag={Link} to={`/server/${id}`} active={getServerId(selectedServer) === id}>
{name}
</DropdownItem>
))}
<DropdownItem divider tag="hr" />
<DropdownItem tag={Link} to="/manage-servers">
<FontAwesomeIcon icon={serverIcon} /> <span className="tw:ml-1">Manage servers</span>
</DropdownItem>
</>
)}
</DropdownMenu>
</UncontrolledDropdown>
);
};

View File

@@ -1,49 +0,0 @@
@import '../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
@import '../utils/mixins/vertical-align';
@import '../utils/mixins/thin-scroll';
.servers-list__list-group.servers-list__list-group {
width: 100%;
}
.servers-list__list-group:not(.servers-list__list-group--embedded) {
max-width: 400px;
box-shadow: 0 .125rem .25rem rgb(0 0 0 / .075);
}
.servers-list__server-item.servers-list__server-item {
text-align: left;
position: relative;
padding: .75rem 2.5rem .75rem 1rem;
}
.servers-list__server-item:not(:hover) {
color: $mainColor;
}
.servers-list__server-item:hover {
background-color: var(--secondary-color);
}
.servers-list__server-item-icon {
@include vertical-align();
right: 1rem;
}
.servers-list__list-group--embedded.servers-list__list-group--embedded {
border-radius: 0;
border-top: 1px solid var(--border-color);
@media (min-width: $mdMin) {
max-height: 220px;
overflow-x: auto;
@include thin-scroll();
}
.servers-list__server-item {
border: none;
border-bottom: 1px solid var(--border-color);
}
}

View File

@@ -1,35 +1,43 @@
import { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { clsx } from 'clsx';
import type { FC, PropsWithChildren } from 'react';
import { Link } from 'react-router-dom';
import { ListGroup, ListGroupItem } from 'reactstrap';
import type { FC } from 'react';
import { Link } from 'react-router';
import type { ServerWithId } from './data';
import './ServersListGroup.scss';
type ServersListGroupProps = PropsWithChildren<{
type ServersListGroupProps = {
servers: ServerWithId[];
embedded?: boolean;
}>;
borderless?: boolean;
};
const ServerListItem = ({ id, name }: { id: string; name: string }) => (
<ListGroupItem tag={Link} to={`/server/${id}`} className="servers-list__server-item">
{name}
<FontAwesomeIcon icon={chevronIcon} className="servers-list__server-item-icon" />
</ListGroupItem>
<Link
to={`/server/${id}`}
className={clsx(
'servers-list__server-item',
'tw:flex tw:items-center tw:justify-between tw:gap-x-2 tw:px-4 tw:py-3',
'tw:rounded-none tw:hover:bg-lm-secondary tw:hover:dark:bg-dm-secondary',
'tw:border-b tw:last:border-0 tw:border-lm-border tw:dark:border-dm-border',
)}
>
<span className="tw:truncate">{name}</span>
<FontAwesomeIcon icon={chevronIcon} />
</Link>
);
export const ServersListGroup: FC<ServersListGroupProps> = ({ servers, children, embedded = false }) => (
export const ServersListGroup: FC<ServersListGroupProps> = ({ servers, borderless }) => (
<>
{children && <div data-testid="title" className="mb-0 fs-5 fw-normal lh-sm">{children}</div>}
{servers.length > 0 && (
<ListGroup
<div
data-testid="list"
tag="div"
className={clsx('servers-list__list-group', { 'servers-list__list-group--embedded': embedded })}
className={clsx(
'tw:w-full tw:border-lm-border tw:dark:border-dm-border',
'tw:md:max-h-56 tw:md:overflow-y-auto tw:-mb-1 tw:scroll-thin',
{ 'tw:border-y': !borderless },
)}
>
{servers.map(({ id, name }) => <ServerListItem key={id} id={id} name={name} />)}
</ListGroup>
</div>
)}
</>
);

View File

@@ -4,6 +4,7 @@ export interface ServerData {
name: string;
url: string;
apiKey: string;
forwardCredentials?: boolean;
}
export interface ServerWithId extends ServerData {
@@ -44,4 +45,31 @@ export const isNotFoundServer = (server: SelectedServer): server is NotFoundServ
export const getServerId = (server: SelectedServer) => (isServerWithId(server) ? server.id : '');
export const serverWithIdToServerData = ({ name, url, apiKey }: ServerWithId): ServerData => ({ name, url, apiKey });
/**
* Expose values that represent provided server, in a way that can be serialized in JSON or CSV strings.
*/
export const serializeServer = ({ name, url, apiKey, forwardCredentials }: ServerData): Record<string, string> => ({
name,
url,
apiKey,
forwardCredentials: forwardCredentials ? 'true' : 'false',
});
const validateServerData = (server: any): server is ServerData =>
typeof server.url === 'string' && typeof server.apiKey === 'string' && typeof server.name === 'string';
/**
* Provided a record, it picks the right properties to build a ServerData object.
* @throws Error If any of the required ServerData properties is missing.
*/
export const deserializeServer = (potentialServer: Record<string, unknown>): ServerData => {
const { forwardCredentials, ...serverData } = potentialServer;
if (!validateServerData(serverData)) {
throw new Error('Server is missing required "url", "apiKey" and/or "name" properties');
}
return {
...serverData,
forwardCredentials: forwardCredentials === 'true',
};
};

View File

@@ -1,41 +1,42 @@
import { CardModal } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { Fragment } from 'react';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import type { ServerData } from '../data';
interface DuplicatedServersModalProps {
export type DuplicatedServersModalProps = {
duplicatedServers: ServerData[];
isOpen: boolean;
onDiscard: () => void;
onSave: () => void;
}
open: boolean;
onClose: () => void;
onConfirm: () => void;
};
export const DuplicatedServersModal: FC<DuplicatedServersModalProps> = (
{ isOpen, duplicatedServers, onDiscard, onSave },
{ open, duplicatedServers, onClose, onConfirm },
) => {
const hasMultipleServers = duplicatedServers.length > 1;
return (
<Modal centered isOpen={isOpen}>
<ModalHeader>Duplicated server{hasMultipleServers && 's'}</ModalHeader>
<ModalBody>
<p>{hasMultipleServers ? 'The next servers already exist:' : 'There is already a server with:'}</p>
<ul>
{duplicatedServers.map(({ url, apiKey }, index) => (!hasMultipleServers ? (
<Fragment key={index}>
<li>URL: <b>{url}</b></li>
<li>API key: <b>{apiKey}</b></li>
</Fragment>
) : <li key={index}><b>{url}</b> - <b>{apiKey}</b></li>))}
</ul>
<span>
{hasMultipleServers ? 'Do you want to ignore duplicated servers' : 'Do you want to save this server anyway'}?
</span>
</ModalBody>
<ModalFooter>
<Button color="link" onClick={onDiscard}>{hasMultipleServers ? 'Ignore duplicates' : 'Discard'}</Button>
<Button color="primary" onClick={onSave}>Save anyway</Button>
</ModalFooter>
</Modal>
<CardModal
size="lg"
title={`Duplicated server${hasMultipleServers ? 's' : ''}`}
open={open}
onClose={onClose}
onConfirm={onConfirm}
confirmText={`Save duplicate${hasMultipleServers ? 's' : ''}`}
cancelText={hasMultipleServers ? 'Ignore duplicates' : 'Discard'}
>
<p>{hasMultipleServers ? 'The next servers already exist:' : 'There is already a server with:'}</p>
<ul className="tw:list-disc tw:mt-4">
{duplicatedServers.map(({ url, apiKey }, index) => (!hasMultipleServers ? (
<Fragment key={index}>
<li>URL: <b>{url}</b></li>
<li>API key: <b>{apiKey}</b></li>
</Fragment>
) : <li key={index}><b>{url}</b> - <b>{apiKey}</b></li>))}
</ul>
<span>
{hasMultipleServers ? 'Do you want to save duplicated servers' : 'Do you want to save this server'}?
</span>
</CardModal>
);
};

View File

@@ -1,9 +1,10 @@
import { faFileUpload as importIcon } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useElementRef, useToggle } from '@shlinkio/shlink-frontend-kit';
import { Button } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { ChangeEvent, PropsWithChildren } from 'react';
import { useCallback, useRef, useState } from 'react';
import { Button, UncontrolledTooltip } from 'reactstrap';
import { useCallback, useRef , useState } from 'react';
import { UncontrolledTooltip } from 'reactstrap';
import type { FCWithDeps } from '../../container/utils';
import { componentFactory, useDependencies } from '../../container/utils';
import type { ServerData, ServersMap, ServerWithId } from '../data';
@@ -13,7 +14,7 @@ import { dedupServers, ensureUniqueIds } from './index';
export type ImportServersBtnProps = PropsWithChildren<{
onImport?: () => void;
onImportError?: (error: Error) => void;
onError?: (error: Error) => void;
tooltipPlacement?: 'top' | 'bottom';
className?: string;
}>;
@@ -31,8 +32,8 @@ const ImportServersBtn: FCWithDeps<ImportServersBtnConnectProps, ImportServersBt
createServers,
servers,
children,
onImport = () => {},
onImportError = () => {},
onImport,
onError = () => {},
tooltipPlacement = 'bottom',
className = '',
}) => {
@@ -40,50 +41,50 @@ const ImportServersBtn: FCWithDeps<ImportServersBtnConnectProps, ImportServersBt
const ref = useElementRef<HTMLInputElement>();
const [duplicatedServers, setDuplicatedServers] = useState<ServerData[]>([]);
const [isModalOpen,, showModal, hideModal] = useToggle();
const newServersCreatedRef = useRef(false);
const importedServersRef = useRef<ServerWithId[]>([]);
const newServersRef = useRef<ServerWithId[]>([]);
const create = useCallback((serversData: ServerWithId[]) => {
createServers(serversData);
onImport();
}, [createServers, onImport]);
const onFile = useCallback(
async ({ target }: ChangeEvent<HTMLInputElement>) =>
serversImporter.importServersFromFile(target.files?.[0])
.then((importedServers) => {
const { duplicatedServers, newServers } = dedupServers(servers, importedServers);
importedServersRef.current = ensureUniqueIds(servers, importedServers);
newServersRef.current = ensureUniqueIds(servers, newServers);
// Immediately create new servers
newServersCreatedRef.current = newServers.length > 0;
createServers(ensureUniqueIds(servers, newServers));
if (duplicatedServers.length === 0) {
create(importedServersRef.current);
} else {
// For duplicated servers, ask for confirmation
if (duplicatedServers.length > 0) {
setDuplicatedServers(duplicatedServers);
showModal();
} else {
onImport?.();
}
})
.then(() => {
// Reset file input after processing file
(target as { value: string | null }).value = null;
})
.catch(onImportError),
[create, onImportError, servers, serversImporter, showModal],
.catch(onError),
[createServers, onError, onImport, servers, serversImporter, showModal],
);
const createAllServers = useCallback(() => {
create(importedServersRef.current);
const createDuplicatedServers = useCallback(() => {
createServers(ensureUniqueIds(servers, duplicatedServers));
hideModal();
}, [create, hideModal]);
const createNonDuplicatedServers = useCallback(() => {
create(newServersRef.current);
onImport?.();
}, [createServers, duplicatedServers, hideModal, onImport, servers]);
const discardDuplicatedServers = useCallback(() => {
hideModal();
}, [create, hideModal]);
// If duplicated servers were discarded but some non-duplicated servers were created, call onImport
if (newServersCreatedRef.current) {
onImport?.();
}
}, [hideModal, onImport]);
return (
<>
<Button outline id="importBtn" className={className} onClick={() => ref.current?.click()}>
<Button variant="secondary" id="importBtn" className={className} onClick={() => ref.current?.click()}>
<FontAwesomeIcon icon={importIcon} fixedWidth /> {children ?? 'Import from file'}
</Button>
<UncontrolledTooltip placement={tooltipPlacement} target="importBtn">
@@ -93,18 +94,19 @@ const ImportServersBtn: FCWithDeps<ImportServersBtnConnectProps, ImportServersBt
<input
type="file"
accept=".csv"
className="d-none"
className="tw:hidden"
aria-hidden
ref={ref}
tabIndex={-1}
ref={ref as any /* TODO Remove After updating to React 19 */}
onChange={onFile}
data-testid="csv-file-input"
/>
<DuplicatedServersModal
isOpen={isModalOpen}
open={isModalOpen}
duplicatedServers={duplicatedServers}
onDiscard={createNonDuplicatedServers}
onSave={createAllServers}
onClose={discardDuplicatedServers}
onConfirm={createDuplicatedServers}
/>
</>
);

View File

@@ -1,17 +0,0 @@
@import '../../../node_modules/@shlinkio/shlink-frontend-kit/dist/base';
.server-error__container {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.server-error__delete-btn {
color: $dangerColor;
font-weight: inherit;
}
.server-error__delete-btn:hover {
text-decoration: underline;
}

View File

@@ -1,6 +1,6 @@
import { Message } from '@shlinkio/shlink-frontend-kit';
import { Card, Message } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import { NoMenuLayout } from '../../common/NoMenuLayout';
import type { FCWithDeps } from '../../container/utils';
import { componentFactory, useDependencies } from '../../container/utils';
@@ -8,7 +8,6 @@ import type { SelectedServer, ServersMap } from '../data';
import { isServerWithId } from '../data';
import type { DeleteServerButtonProps } from '../DeleteServerButton';
import { ServersListGroup } from '../ServersListGroup';
import './ServerError.scss';
type ServerErrorProps = {
servers: ServersMap;
@@ -24,8 +23,8 @@ const ServerError: FCWithDeps<ServerErrorProps, ServerErrorDeps> = ({ servers, s
return (
<NoMenuLayout>
<div className="server-error__container flex-column">
<Message className="w-100 mb-3 mb-md-5" type="error" fullWidth>
<div className="tw:flex tw:flex-col tw:items-center tw:gap-y-4 tw:md:gap-y-8">
<Message className="tw:w-full tw:lg:w-[80%]" variant="error">
{!isServerWithId(selectedServer) && 'Could not find this Shlink server.'}
{isServerWithId(selectedServer) && (
<>
@@ -35,21 +34,21 @@ const ServerError: FCWithDeps<ServerErrorProps, ServerErrorDeps> = ({ servers, s
)}
</Message>
<ServersListGroup servers={Object.values(servers)}>
<p className="mb-md-3">
These are the Shlink servers currently configured. Choose one of
them or <Link to="/server/create">add a new one</Link>.
</p>
</ServersListGroup>
<p className="tw:text-xl">
These are the Shlink servers currently configured. Choose one of
them or <Link to="/server/create">add a new one</Link>.
</p>
<Card className="tw:w-full tw:max-w-100 tw:overflow-hidden">
<ServersListGroup borderless servers={Object.values(servers)} />
</Card>
{isServerWithId(selectedServer) && (
<div className="container mt-3 mt-md-5">
<p className="fs-5 fw-normal lh-sm">
Alternatively, if you think you may have miss-configured this server, you
can <DeleteServerButton server={selectedServer} className="server-error__delete-btn">remove it</DeleteServerButton> or&nbsp;
<Link to={`/server/${selectedServer.id}/edit?reconnect=true`}>edit it</Link>.
</p>
</div>
<p className="tw:text-xl">
Alternatively, if you think you may have misconfigured this server, you
can <DeleteServerButton server={selectedServer}>remove
it</DeleteServerButton> or&nbsp;
<Link to={`/server/${selectedServer.id}/edit?reconnect=true`}>edit it</Link>.
</p>
)}
</div>
</NoMenuLayout>

View File

@@ -1,7 +1,15 @@
import { InputFormGroup, SimpleCard } from '@shlinkio/shlink-frontend-kit';
import { useToggle } from '@shlinkio/shlink-frontend-kit';
import {
Checkbox,
Details,
Label,
LabelledInput,
LabelledRevealablePasswordInput,
SimpleCard,
} from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC, PropsWithChildren, ReactNode } from 'react';
import { useState } from 'react';
import { handleEventPreventingDefault } from '../../utils/utils';
import { usePreventDefault } from '../../utils/utils';
import type { ServerData } from '../data';
type ServerFormProps = PropsWithChildren<{
@@ -14,17 +22,43 @@ export const ServerForm: FC<ServerFormProps> = ({ onSubmit, initialValues, child
const [name, setName] = useState(initialValues?.name ?? '');
const [url, setUrl] = useState(initialValues?.url ?? '');
const [apiKey, setApiKey] = useState(initialValues?.apiKey ?? '');
const handleSubmit = handleEventPreventingDefault(() => onSubmit({ name, url, apiKey }));
const { flag: forwardCredentials, toggle: toggleForwardCredentials } = useToggle(
initialValues?.forwardCredentials ?? false,
true,
);
const handleSubmit = usePreventDefault(() => onSubmit({ name, url, apiKey, forwardCredentials }));
return (
<form className="server-form" name="serverForm" onSubmit={handleSubmit}>
<SimpleCard className="mb-3" title={title}>
<InputFormGroup value={name} onChange={setName}>Name</InputFormGroup>
<InputFormGroup type="url" value={url} onChange={setUrl}>URL</InputFormGroup>
<InputFormGroup value={apiKey} onChange={setApiKey}>API key</InputFormGroup>
<form name="serverForm" onSubmit={handleSubmit}>
<SimpleCard className="tw:mb-4" bodyClassName="tw:flex tw:flex-col tw:gap-y-3" title={title}>
<LabelledInput label="Name" value={name} onChange={(e) => setName(e.target.value)} required />
<LabelledInput label="URL" type="url" value={url} onChange={(e) => setUrl(e.target.value)} required />
<LabelledRevealablePasswordInput
label="API key"
value={apiKey}
onChange={(e) => setApiKey(e.target.value)}
required
/>
<Details summary="Advanced options">
<div className="tw:flex tw:flex-col tw:gap-0.5">
<Label className="tw:flex tw:items-center tw:gap-x-1.5 tw:cursor-pointer">
<Checkbox onChange={toggleForwardCredentials} checked={forwardCredentials} />
Forward credentials to this server on every request.
</Label>
<small className="tw:pl-5.5 tw:text-gray-600 tw:dark:text-gray-400 tw:mt-0.5">
{'"'}Credentials{'"'} here means cookies, TLS client certificates, or authentication headers containing a username
and password.
</small>
<small className="tw:pl-5.5 tw:text-gray-600 tw:dark:text-gray-400">
<b>Important!</b> If you are not sure what this means, leave it unchecked. Enabling this option will
make all requests fail for Shlink older than v4.5.0, as it requires the server to set a more strict
value for <code className="tw:whitespace-nowrap">Access-Control-Allow-Origin</code> than <code>*</code>.
</small>
</div>
</Details>
</SimpleCard>
<div className="text-end">{children}</div>
<div className="tw:flex tw:items-center tw:justify-end tw:gap-x-2">{children}</div>
</form>
);
};

View File

@@ -1,7 +1,7 @@
import { Message } from '@shlinkio/shlink-frontend-kit';
import { Message } from '@shlinkio/shlink-frontend-kit/tailwind';
import type { FC } from 'react';
import { useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { useParams } from 'react-router';
import { NoMenuLayout } from '../../common/NoMenuLayout';
import type { FCWithDeps } from '../../container/utils';
import { useDependencies } from '../../container/utils';

View File

@@ -2,24 +2,27 @@ import type { JsonToCsv } from '../../utils/helpers/csvjson';
import { saveCsv } from '../../utils/helpers/files';
import type { LocalStorage } from '../../utils/services/LocalStorage';
import type { ServersMap } from '../data';
import { serverWithIdToServerData } from '../data';
import { serializeServer } from '../data';
const SERVERS_FILENAME = 'shlink-servers.csv';
export class ServersExporter {
public constructor(
private readonly storage: LocalStorage,
private readonly window: Window,
private readonly jsonToCsv: JsonToCsv,
) {}
readonly #storage: LocalStorage;
readonly #window: Window;
readonly #jsonToCsv: JsonToCsv;
public constructor(storage: LocalStorage, window: Window, jsonToCsv: JsonToCsv) {
this.#storage = storage;
this.#window = window;
this.#jsonToCsv = jsonToCsv;
}
public readonly exportServers = async () => {
const servers = Object.values(this.storage.get<ServersMap>('servers') ?? {}).map(serverWithIdToServerData);
const servers = Object.values(this.#storage.get<ServersMap>('servers') ?? {}).map(serializeServer);
try {
const csv = this.jsonToCsv(servers);
saveCsv(this.window, csv, SERVERS_FILENAME);
const csv = this.#jsonToCsv(servers);
saveCsv(this.#window, csv, SERVERS_FILENAME);
} catch (e) {
// FIXME Handle error
console.error(e);

View File

@@ -1,14 +1,20 @@
import type { CsvToJson } from '../../utils/helpers/csvjson';
import type { ServerData } from '../data';
import { deserializeServer } from '../data';
const validateServer = (server: any): server is ServerData =>
typeof server.url === 'string' && typeof server.apiKey === 'string' && typeof server.name === 'string';
const validateServers = (servers: any): servers is ServerData[] =>
Array.isArray(servers) && servers.every(validateServer);
const validateAndDeserializeServers = (servers: unknown): ServerData[] => {
if (!Array.isArray(servers)) {
throw new Error('Provided file does not have the right format.');
}
return servers.map(deserializeServer);
};
export class ServersImporter {
public constructor(private readonly csvToJson: CsvToJson) {}
readonly #csvToJson: CsvToJson;
public constructor(csvToJson: CsvToJson) {
this.#csvToJson = csvToJson;
}
public async importServersFromFile(file: File | null | undefined): Promise<ServerData[]> {
if (!file) {
@@ -16,12 +22,8 @@ export class ServersImporter {
}
const content = await file.text();
const servers = await this.csvToJson(content);
const servers = await this.#csvToJson(content);
if (!validateServers(servers)) {
throw new Error('Provided file does not have the right format.');
}
return servers;
return validateAndDeserializeServers(servers);
}
}

23
src/tailwind.css Normal file
View File

@@ -0,0 +1,23 @@
@import 'tailwindcss' prefix(tw) important;
@source '../node_modules/@shlinkio/shlink-frontend-kit';
@import '@shlinkio/shlink-frontend-kit/tailwind.preset.css';
@theme {
/* Override breakpoints with the values from bootstrap, to keep sizing until fully migrated */
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--breakpoint-2xl: 1400px;
}
@layer base {
:root {
--header-height: 56px;
--footer-height: 2.3rem;
--footer-margin: .8rem;
/* Width of ShlinkWebComponent's side menu when not collapsed */
--aside-menu-width: 260px;
}
}

View File

@@ -1,46 +0,0 @@
import { DropdownBtn } from '@shlinkio/shlink-frontend-kit';
import type { VisitsSettings } from '@shlinkio/shlink-web-component/settings';
import type { FC } from 'react';
import { DropdownItem } from 'reactstrap';
export type DateInterval = VisitsSettings['defaultInterval'];
export interface DateIntervalSelectorProps {
active?: DateInterval;
allText: string;
onChange: (interval: DateInterval) => void;
}
export const INTERVAL_TO_STRING_MAP: Record<Exclude<DateInterval, 'all'>, string> = {
today: 'Today',
yesterday: 'Yesterday',
last7Days: 'Last 7 days',
last30Days: 'Last 30 days',
last90Days: 'Last 90 days',
last180Days: 'Last 180 days',
last365Days: 'Last 365 days',
};
const intervalToString = (interval: DateInterval | undefined, fallback: string): string => {
if (!interval || interval === 'all') {
return fallback;
}
return INTERVAL_TO_STRING_MAP[interval];
};
export const DateIntervalSelector: FC<DateIntervalSelectorProps> = ({ onChange, active, allText }) => (
<DropdownBtn text={intervalToString(active, allText)}>
<DropdownItem active={active === 'all'} onClick={() => onChange('all')}>
{allText}
</DropdownItem>
<DropdownItem divider />
{Object.entries(INTERVAL_TO_STRING_MAP).map(
([interval, name]) => (
<DropdownItem key={interval} active={active === interval} onClick={() => onChange(interval as DateInterval)}>
{name}
</DropdownItem>
),
)}
</DropdownBtn>
);

View File

@@ -1,5 +1,5 @@
import { useCallback } from 'react';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';
export const useGoBack = () => {
const navigate = useNavigate();

View File

@@ -1,5 +0,0 @@
@mixin horizontal-align {
position: absolute;
left: 50%;
transform: translateX(-50%);
}

View File

@@ -1,16 +0,0 @@
@mixin thin-scroll() {
/* Forefox scrollbar */
scrollbar-color: rgba(0, 0, 0, .2) #f5f5f5;
scrollbar-width: thin;
/* Chrome webkit scrollbar */
&::-webkit-scrollbar {
width: 6px;
background-color: #f5f5f5;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .2);
border-radius: .5rem;
}
}

View File

@@ -1,5 +0,0 @@
@mixin vertical-align($extraTransforms: null) {
position: absolute;
top: 50%;
transform: translateY(-50%) $extraTransforms;
}

View File

@@ -1,6 +1,11 @@
import type { SyntheticEvent } from 'react';
import { useCallback } from 'react';
export const handleEventPreventingDefault = <T>(handler: () => T) => (e: SyntheticEvent) => {
e.preventDefault();
handler();
};
/**
* Wraps an event handler so that it calls e.preventDefault() before invoking the event handler
*/
export const usePreventDefault = <Event extends SyntheticEvent = SyntheticEvent>(handler: (e: Event) => void) =>
useCallback((e: Event) => {
e.preventDefault();
handler(e);
}, [handler]);

View File

@@ -1,6 +1,6 @@
import type { FC, PropsWithChildren } from 'react';
import { useMemo } from 'react';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { MemoryRouter, Route, Routes } from 'react-router';
export type MemoryRouterWithParamsProps = PropsWithChildren<{
params: Record<string, string>;

View File

@@ -1,14 +1,24 @@
import { useToggle } from '@shlinkio/shlink-frontend-kit';
import type { FC, ReactElement } from 'react';
import { useCallback, useEffect , useState } from 'react';
interface RenderModalArgs {
isOpen: boolean;
toggle: () => void;
}
export type RenderModalArgs = {
open: boolean;
onClose: () => void;
};
export const TestModalWrapper: FC<{ renderModal: (args: RenderModalArgs) => ReactElement }> = (
{ renderModal },
) => {
const [isOpen, toggle] = useToggle(true);
return renderModal({ isOpen, toggle });
const [open, setOpen] = useState(true);
const onClose = useCallback(() => setOpen(false), []);
// Workaround to ensure CardModals from shlink-frontend-shared can be closed, as they depend on CSS transitions
// Since JSDOM does not support them, this dispatches the event right after the listener has been set-up
useEffect(() => {
if (!open) {
document.querySelector('[data-testid="transition-container"]')?.dispatchEvent(new Event('transitionend'));
}
}, [open]);
return renderModal({ open, onClose });
};

View File

@@ -1,3 +1,4 @@
import type { HttpClient } from '@shlinkio/shlink-js-sdk';
import { fromPartial } from '@total-typescript/shoehorn';
import { buildShlinkApiClient } from '../../../src/api/services/ShlinkApiClientBuilder';
import type { ReachableServer, SelectedServer } from '../../../src/servers/data';
@@ -5,8 +6,8 @@ import type { ReachableServer, SelectedServer } from '../../../src/servers/data'
describe('ShlinkApiClientBuilder', () => {
const server = fromPartial<ReachableServer>;
const createBuilder = () => {
const builder = buildShlinkApiClient(fromPartial({}));
const createBuilder = (httpClient: HttpClient = fromPartial({})) => {
const builder = buildShlinkApiClient(httpClient);
return (selectedServer: SelectedServer) => builder(() => fromPartial({ selectedServer }));
};
@@ -16,9 +17,9 @@ describe('ShlinkApiClientBuilder', () => {
const secondApiClient = builder(server({ url: 'bar', apiKey: 'bar' }));
const thirdApiClient = builder(server({ url: 'bar', apiKey: 'foo' }));
expect(firstApiClient === secondApiClient).toEqual(false);
expect(firstApiClient === thirdApiClient).toEqual(false);
expect(secondApiClient === thirdApiClient).toEqual(false);
expect(firstApiClient).not.toBe(secondApiClient);
expect(firstApiClient).not.toBe(thirdApiClient);
expect(secondApiClient).not.toBe(thirdApiClient);
});
it('returns existing instances when provided params are the same', () => {
@@ -29,17 +30,42 @@ describe('ShlinkApiClientBuilder', () => {
const secondApiClient = builder(selectedServer);
const thirdApiClient = builder(selectedServer);
expect(firstApiClient === secondApiClient).toEqual(true);
expect(firstApiClient === thirdApiClient).toEqual(true);
expect(secondApiClient === thirdApiClient).toEqual(true);
expect(firstApiClient).toBe(secondApiClient);
expect(firstApiClient).toBe(thirdApiClient);
expect(secondApiClient).toBe(thirdApiClient);
});
it('does not fetch from state when provided param is already selected server', () => {
const url = 'url';
const apiKey = 'apiKey';
const apiClient = buildShlinkApiClient(fromPartial({}))(server({ url, apiKey }));
it('does not fetch from state when provided param is already a server', async () => {
const url = 'the_url';
const apiKey = 'the_api_key';
const jsonRequest = vi.fn();
const httpClient = fromPartial<HttpClient>({ jsonRequest });
const apiClient = createBuilder(httpClient)(server({ url, apiKey }));
expect(apiClient['serverInfo'].baseUrl).toEqual(url);
expect(apiClient['serverInfo'].apiKey).toEqual(apiKey);
await apiClient.health();
expect(jsonRequest).toHaveBeenCalledWith(expect.stringMatching(new RegExp(`^${url}`)), expect.objectContaining({
credentials: undefined,
headers: {
'X-Api-Key': apiKey,
},
}));
});
it('includes credentials when forwarding is enabled', async () => {
const url = 'the_url';
const apiKey = 'the_api_key';
const jsonRequest = vi.fn();
const httpClient = fromPartial<HttpClient>({ jsonRequest });
const apiClient = createBuilder(httpClient)(server({ url, apiKey, forwardCredentials: true }));
await apiClient.health();
expect(jsonRequest).toHaveBeenCalledWith(expect.stringMatching(new RegExp(`^${url}`)), expect.objectContaining({
credentials: 'include',
headers: {
'X-Api-Key': apiKey,
},
}));
});
});

View File

@@ -1,6 +1,6 @@
import { act, render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import { AppFactory } from '../../src/app/App';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -54,13 +54,17 @@ describe('<App />', () => {
});
it.each([
['/foo', 'shlink-wrapper'],
['/bar', 'shlink-wrapper'],
['/', 'shlink-wrapper d-flex align-items-center pt-3'],
])('renders expected classes on shlink-wrapper based on current pathname', async (pathname, expectedClasses) => {
const { container } = await setUp(pathname);
const shlinkWrapper = container.querySelector('.shlink-wrapper');
['/foo', false],
['/bar', false],
['/', true],
])('renders expected classes on shlink-wrapper based on current pathname', async (pathname, isFlex) => {
await setUp(pathname);
const shlinkWrapper = screen.getByTestId('shlink-wrapper');
expect(shlinkWrapper).toHaveAttribute('class', expectedClasses);
if (isFlex) {
expect(shlinkWrapper).toHaveClass('tw:flex');
} else {
expect(shlinkWrapper).not.toHaveClass('tw:flex');
}
});
});

View File

@@ -4,11 +4,11 @@ import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithEvents } from '../__helpers__/setUpTest';
describe('<AppUpdateBanner />', () => {
const toggle = vi.fn();
const onClose = vi.fn();
const forceUpdate = vi.fn();
const setUp = async () => {
const result = await act(
() => renderWithEvents(<AppUpdateBanner isOpen toggle={toggle} forceUpdate={forceUpdate} />),
() => renderWithEvents(<AppUpdateBanner isOpen onClose={onClose} forceUpdate={forceUpdate} />),
);
await waitFor(() => screen.getByRole('alert'));
@@ -28,9 +28,9 @@ describe('<AppUpdateBanner />', () => {
it('invokes toggle when alert is closed', async () => {
const { user } = await setUp();
expect(toggle).not.toHaveBeenCalled();
expect(onClose).not.toHaveBeenCalled();
await user.click(screen.getByLabelText('Close'));
expect(toggle).toHaveBeenCalled();
expect(onClose).toHaveBeenCalled();
});
it('triggers the update when clicking the button', async () => {

View File

@@ -1,7 +1,7 @@
import { screen, waitFor } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import { Router } from 'react-router-dom';
import { Router } from 'react-router';
import { MainHeaderFactory } from '../../src/common/MainHeader';
import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithEvents } from '../__helpers__/setUpTest';
@@ -51,14 +51,12 @@ describe('<MainHeader />', () => {
const toggle = screen.getByLabelText('Toggle navigation');
const icon = toggle.firstChild;
expect(icon).toHaveAttribute('class', expect.stringMatching(/main-header__toggle-icon$/));
expect(icon).not.toHaveClass('tw:rotate-180');
await user.click(toggle);
expect(icon).toHaveAttribute(
'class',
expect.stringMatching(/main-header__toggle-icon main-header__toggle-icon--opened$/),
);
expect(icon).toHaveClass('tw:rotate-180');
await user.click(toggle);
expect(icon).toHaveAttribute('class', expect.stringMatching(/main-header__toggle-icon$/));
expect(icon).not.toHaveClass('tw:rotate-180');
});
it('opens Collapse when clicking toggle', async () => {

View File

@@ -30,6 +30,5 @@ describe('<NotFound />', () => {
expect(link).toHaveAttribute('href', expectedLink);
expect(link).toHaveTextContent(expectedText);
expect(link).toHaveAttribute('class', 'btn btn-outline-primary btn-lg');
});
});

View File

@@ -16,11 +16,16 @@ describe('<ShlinkVersionsContainer />', () => {
])('passes a11y checks', (selectedServer) => checkAccessibility(setUp(selectedServer)));
it.each([
[null, 'text-center'],
[fromPartial<SelectedServer>({}), 'text-center'],
[fromPartial<ReachableServer>({ version: '1.0.0' }), 'text-center shlink-versions-container--with-sidebar'],
])('renders proper col classes based on sidebar status', (selectedServer, expectedClasses) => {
[null, false],
[fromPartial<SelectedServer>({}), false],
[fromPartial<ReachableServer>({ version: '1.0.0' }), true],
])('renders proper col classes based on sidebar status', (selectedServer, shouldAddMargin) => {
const { container } = setUp(selectedServer);
expect(container.firstChild).toHaveAttribute('class', `${expectedClasses}`);
if (shouldAddMargin) {
expect(container.firstChild).toHaveClass('tw:md:ml-(--aside-menu-width)');
} else {
expect(container.firstChild).not.toHaveClass('tw:md:ml-(--aside-menu-width)');
}
});
});

View File

@@ -1,7 +1,7 @@
import { fireEvent, screen, waitFor } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import { Router } from 'react-router-dom';
import { Router } from 'react-router';
import { CreateServerFactory } from '../../src/servers/CreateServer';
import type { ServersMap } from '../../src/servers/data';
import { checkAccessibility } from '../__helpers__/accessibility';

View File

@@ -1,18 +1,28 @@
import { screen, waitFor } from '@testing-library/react';
import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import type { ReactNode } from 'react';
import { Router } from 'react-router';
import { DeleteServerButtonFactory } from '../../src/servers/DeleteServerButton';
import type { DeleteServerModalProps } from '../../src/servers/DeleteServerModal';
import { DeleteServerModal } from '../../src/servers/DeleteServerModal';
import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithEvents } from '../__helpers__/setUpTest';
describe('<DeleteServerButton />', () => {
const DeleteServerButton = DeleteServerButtonFactory(fromPartial({
DeleteServerModal: ({ isOpen }: DeleteServerModalProps) => <>DeleteServerModal {isOpen ? '[Open]' : '[Closed]'}</>,
DeleteServerModal: (props: DeleteServerModalProps) => <DeleteServerModal {...props} deleteServer={vi.fn()} />,
}));
const setUp = (children?: ReactNode) => renderWithEvents(
<DeleteServerButton server={fromPartial({})} textClassName="button">{children}</DeleteServerButton>,
);
const setUp = (children: ReactNode = 'Remove this server') => {
const history = createMemoryHistory({ initialEntries: ['/foo'] });
const result = renderWithEvents(
<Router location={history.location} navigator={history}>
<DeleteServerButton server={fromPartial({})}>{children}</DeleteServerButton>
</Router>,
);
return { history, ...result };
};
it('passes a11y checks', () => checkAccessibility(setUp('Delete me')));
@@ -20,7 +30,6 @@ describe('<DeleteServerButton />', () => {
['Foo bar'],
['baz'],
['something'],
[undefined],
])('renders expected content', (children) => {
const { container } = setUp(children);
expect(container.firstChild).toBeTruthy();
@@ -28,14 +37,21 @@ describe('<DeleteServerButton />', () => {
});
it('displays modal when button is clicked', async () => {
const { user, container } = setUp();
const { user } = setUp();
expect(screen.getByText(/DeleteServerModal/)).toHaveTextContent(/Closed/);
expect(screen.getByText(/DeleteServerModal/)).not.toHaveTextContent(/Open/);
if (container.firstElementChild) {
await user.click(container.firstElementChild);
}
expect(screen.queryByText(/Are you sure you want to remove/)).not.toBeInTheDocument();
await user.click(screen.getByText('Remove this server'));
expect(screen.getByText(/Are you sure you want to remove/)).toBeInTheDocument();
});
await waitFor(() => expect(screen.getByText(/DeleteServerModal/)).toHaveTextContent(/Open/));
it('navigates to home when deletion is confirmed', async () => {
const { user, history } = setUp();
// Open modal
await user.click(screen.getByText('Remove this server'));
expect(history.location.pathname).toEqual('/foo');
await user.click(screen.getByRole('button', { name: 'Delete' }));
expect(history.location.pathname).toEqual('/');
});
});

View File

@@ -1,7 +1,5 @@
import { act, screen, waitFor } from '@testing-library/react';
import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import { Router } from 'react-router-dom';
import { DeleteServerModal } from '../../src/servers/DeleteServerModal';
import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithEvents } from '../__helpers__/setUpTest';
@@ -10,36 +8,29 @@ import { TestModalWrapper } from '../__helpers__/TestModalWrapper';
describe('<DeleteServerModal />', () => {
const deleteServerMock = vi.fn();
const serverName = 'the_server_name';
const setUp = async () => {
const history = createMemoryHistory({ initialEntries: ['/foo'] });
const result = await act(() => renderWithEvents(
<Router location={history.location} navigator={history}>
<TestModalWrapper
renderModal={(args) => (
<DeleteServerModal
{...args}
server={fromPartial({ name: serverName })}
deleteServer={deleteServerMock}
/>
)}
const setUp = () => renderWithEvents(
<TestModalWrapper
renderModal={(args) => (
<DeleteServerModal
{...args}
server={fromPartial({ name: serverName })}
deleteServer={deleteServerMock}
/>
</Router>,
));
return { history, ...result };
};
)}
/>,
);
it('passes a11y checks', () => checkAccessibility(setUp()));
it('renders a modal window', async () => {
await setUp();
it('renders a modal window', () => {
setUp();
expect(screen.getByRole('dialog')).toBeInTheDocument();
expect(screen.getByRole('heading')).toHaveTextContent('Remove server');
});
it('displays the name of the server as part of the content', async () => {
await setUp();
it('displays the name of the server as part of the content', () => {
setUp();
expect(screen.getByText(/^Are you sure you want to remove/)).toBeInTheDocument();
expect(screen.getByText(serverName)).toBeInTheDocument();
@@ -47,25 +38,21 @@ describe('<DeleteServerModal />', () => {
it.each([
[() => screen.getByRole('button', { name: 'Cancel' })],
[() => screen.getByLabelText('Close')],
])('toggles when clicking cancel button', async (getButton) => {
const { user, history } = await setUp();
[() => screen.getByLabelText('Close dialog')],
])('closes dialog when clicking cancel button', async (getButton) => {
const { user } = setUp();
expect(history.location.pathname).toEqual('/foo');
expect(screen.getByRole('dialog')).toBeInTheDocument();
await user.click(getButton());
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
expect(deleteServerMock).not.toHaveBeenCalled();
expect(history.location.pathname).toEqual('/foo'); // No navigation happens, keeping initial pathname
});
it('deletes server when clicking accept button', async () => {
const { user, history } = await setUp();
const { user } = setUp();
expect(deleteServerMock).not.toHaveBeenCalled();
expect(history.location.pathname).toEqual('/foo');
await user.click(screen.getByRole('button', { name: 'Delete' }));
await waitFor(() => expect(deleteServerMock).toHaveBeenCalledTimes(1));
await waitFor(() => expect(history.location.pathname).toEqual('/'));
expect(deleteServerMock).toHaveBeenCalledOnce();
});
});

View File

@@ -1,7 +1,7 @@
import { fireEvent, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import { Router } from 'react-router-dom';
import { Router } from 'react-router';
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
import { EditServerFactory } from '../../src/servers/EditServer';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -47,16 +47,16 @@ describe('<EditServer />', () => {
it('display the server info in the form components', () => {
setUp();
expect(screen.getByDisplayValue('the_name')).toBeInTheDocument();
expect(screen.getByDisplayValue('the_url')).toBeInTheDocument();
expect(screen.getByDisplayValue('the_api_key')).toBeInTheDocument();
expect(screen.getByLabelText(/^Name/)).toBeInTheDocument();
expect(screen.getByLabelText(/^URL/)).toBeInTheDocument();
expect(screen.getByLabelText(/^API key/)).toBeInTheDocument();
});
it('edits server and redirects to it when form is submitted', async () => {
const { user, history } = setUp();
await user.type(screen.getByDisplayValue('the_name'), ' edited');
await user.type(screen.getByDisplayValue('the_url'), ' edited');
await user.type(screen.getByLabelText(/^Name/), ' edited');
await user.type(screen.getByLabelText(/^URL/), ' edited');
// TODO Using fire event because userEvent.click on the Submit button does not submit the form
// await user.click(screen.getByRole('button', { name: 'Save' }));
fireEvent.submit(screen.getByRole('form'));
@@ -65,9 +65,26 @@ describe('<EditServer />', () => {
name: 'the_name edited',
url: 'the_url edited',
apiKey: 'the_api_key',
forwardCredentials: false,
});
// After saving we go back, to the first route from history's initialEntries
expect(history.location.pathname).toEqual('/foo');
});
it.each([
{ forwardCredentials: true },
{ forwardCredentials: false },
])('edits advanced options - forward credentials', async (serverPartial) => {
const { user } = setUp({ ...defaultSelectedServer, ...serverPartial });
await user.click(screen.getByText('Advanced options'));
await user.click(screen.getByLabelText('Forward credentials to this server on every request.'));
fireEvent.submit(screen.getByRole('form'));
expect(editServerMock).toHaveBeenCalledWith('abc123', expect.objectContaining({
forwardCredentials: !serverPartial.forwardCredentials,
}));
});
});

View File

@@ -1,6 +1,6 @@
import { screen, waitFor } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { ServersMap, ServerWithId } from '../../src/servers/data';
import { ManageServersFactory } from '../../src/servers/ManageServers';
import type { ServersExporter } from '../../src/servers/services/ServersExporter';

View File

@@ -1,6 +1,7 @@
import { Table } from '@shlinkio/shlink-frontend-kit/tailwind';
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { ServerWithId } from '../../src/servers/data';
import { ManageServersRowFactory } from '../../src/servers/ManageServersRow';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -17,11 +18,9 @@ describe('<ManageServersRow />', () => {
};
const setUp = (hasAutoConnect = false, autoConnect = false) => render(
<MemoryRouter>
<table>
<tbody>
<ManageServersRow server={{ ...server, autoConnect }} hasAutoConnect={hasAutoConnect} />
</tbody>
</table>
<Table header={<Table.Row />}>
<ManageServersRow server={{ ...server, autoConnect }} hasAutoConnect={hasAutoConnect} />
</Table>
</MemoryRouter>,
);
@@ -32,11 +31,7 @@ describe('<ManageServersRow />', () => {
[false, 3],
])('renders expected amount of columns', (hasAutoConnect, expectedCols) => {
setUp(hasAutoConnect);
const td = screen.getAllByRole('cell');
const th = screen.getAllByRole('columnheader');
expect(td.length + th.length).toEqual(expectedCols);
expect(screen.getAllByRole('cell')).toHaveLength(expectedCols);
});
it('renders a dropdown', () => {

View File

@@ -1,7 +1,7 @@
import { screen } from '@testing-library/react';
import type { UserEvent } from '@testing-library/user-event';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { ServerWithId } from '../../src/servers/data';
import { ManageServersRowDropdownFactory } from '../../src/servers/ManageServersRowDropdown';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -9,8 +9,8 @@ import { renderWithEvents } from '../__helpers__/setUpTest';
describe('<ManageServersRowDropdown />', () => {
const ManageServersRowDropdown = ManageServersRowDropdownFactory(fromPartial({
DeleteServerModal: ({ isOpen }: { isOpen: boolean }) => (
<span>DeleteServerModal {isOpen ? '[OPEN]' : '[CLOSED]'}</span>
DeleteServerModal: ({ open }: { open: boolean }) => (
<span>DeleteServerModal {open ? '[OPEN]' : '[CLOSED]'}</span>
),
}));
const setAutoConnect = vi.fn();
@@ -24,15 +24,13 @@ describe('<ManageServersRowDropdown />', () => {
};
const toggleDropdown = (user: UserEvent) => user.click(screen.getByRole('button'));
it.each([
[setUp],
[async () => {
const { user, container } = setUp();
await toggleDropdown(user);
it('passes a11y checks', async () => {
const { user, container } = setUp();
// Open menu
await toggleDropdown(user);
return { container };
}],
])('passes a11y checks', (setUp) => checkAccessibility(setUp()));
return checkAccessibility({ container });
});
it('renders expected amount of dropdown items', async () => {
const { user } = setUp();

View File

@@ -1,6 +1,6 @@
import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { ServersMap } from '../../src/servers/data';
import { ServersDropdown } from '../../src/servers/ServersDropdown';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -20,7 +20,13 @@ describe('<ServersDropdown />', () => {
</MemoryRouter>,
);
it('passes a11y checks', () => checkAccessibility(setUp()));
it('passes a11y checks', async () => {
const { user, ...rest } = setUp();
// Open menu
await user.click(screen.getByText('Servers'));
return checkAccessibility(rest);
});
it('contains the list of servers and the "mange servers" button', async () => {
const { user } = setUp();

View File

@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { ServerWithId } from '../../src/servers/data';
import { ServersListGroup } from '../../src/servers/ServersListGroup';
import { checkAccessibility } from '../__helpers__/accessibility';
@@ -10,30 +10,18 @@ describe('<ServersListGroup />', () => {
fromPartial({ name: 'foo', id: '123' }),
fromPartial({ name: 'bar', id: '456' }),
];
const setUp = (params: { servers?: ServerWithId[]; withChildren?: boolean; embedded?: boolean } = {}) => {
const { servers = [], withChildren = true, embedded } = params;
const setUp = (params: { servers?: ServerWithId[]; borderless?: boolean } = {}) => {
const { servers = [], borderless } = params;
return render(
<MemoryRouter>
<ServersListGroup servers={servers} embedded={embedded}>
{withChildren ? 'The list of servers' : undefined}
</ServersListGroup>
<ServersListGroup servers={servers} borderless={borderless} />
</MemoryRouter>,
);
};
it('passes a11y checks', () => checkAccessibility(setUp()));
it('renders title', () => {
setUp({});
expect(screen.getByTestId('title')).toHaveTextContent('The list of servers');
});
it('does not render title when children is not provided', () => {
setUp({ withChildren: false });
expect(screen.queryByTestId('title')).not.toBeInTheDocument();
});
it.each([
[servers],
[[]],
@@ -45,11 +33,17 @@ describe('<ServersListGroup />', () => {
});
it.each([
[true, 'servers-list__list-group servers-list__list-group--embedded'],
[false, 'servers-list__list-group'],
[undefined, 'servers-list__list-group'],
])('renders proper classes for embedded', (embedded, expectedClasses) => {
setUp({ servers, embedded });
expect(screen.getByTestId('list')).toHaveAttribute('class', `${expectedClasses} list-group`);
[true],
[false],
[undefined],
])('renders proper classes for embedded', (borderless) => {
setUp({ servers, borderless });
const list = screen.getByTestId('list');
if (!borderless) {
expect(list).toHaveClass('tw:border-y');
} else {
expect(list).not.toHaveClass('tw:border-y');
}
});
});

View File

@@ -2,67 +2,27 @@
exports[`<DeleteServerButton /> > renders expected content 1`] = `
<button
class="p-0 bg-transparent border-0"
class="tw:text-danger tw:hover:underline"
type="button"
>
<span
class="button"
>
Foo bar
</span>
Foo bar
</button>
`;
exports[`<DeleteServerButton /> > renders expected content 2`] = `
<button
class="p-0 bg-transparent border-0"
class="tw:text-danger tw:hover:underline"
type="button"
>
<span
class="button"
>
baz
</span>
baz
</button>
`;
exports[`<DeleteServerButton /> > renders expected content 3`] = `
<button
class="p-0 bg-transparent border-0"
class="tw:text-danger tw:hover:underline"
type="button"
>
<span
class="button"
>
something
</span>
</button>
`;
exports[`<DeleteServerButton /> > renders expected content 4`] = `
<button
class="p-0 bg-transparent border-0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-circle-minus fa-fw "
data-icon="circle-minus"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"
fill="currentColor"
/>
</svg>
<span
class="button"
>
Remove this server
</span>
something
</button>
`;

View File

@@ -2,18 +2,29 @@
exports[`<ManageServersRow /> > renders auto-connect icon only if server is autoConnect 1`] = `
<div>
<table>
<tbody>
<table
class="tw:w-full"
>
<thead
class="tw:hidden tw:lg:table-header-group"
>
<tr
class="responsive-table__row"
class="tw:group tw:lg:table-row tw:flex tw:flex-col tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border"
/>
</thead>
<tbody
class="tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3"
>
<tr
class="tw:group tw:lg:table-row tw:flex tw:flex-col tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border tw:hover:bg-lm-primary tw:dark:hover:bg-dm-primary tw:group-[&]/card:hover:bg-lm-secondary tw:dark:group-[&]/card:hover:bg-dm-secondary tw:relative"
>
<td
class="responsive-table__cell"
data-th="Auto-connect"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1"
data-column="Auto-connect"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-check text-primary"
class="svg-inline--fa fa-check tw:text-brand"
data-icon="check"
data-prefix="fas"
focusable="false"
@@ -28,24 +39,25 @@ exports[`<ManageServersRow /> > renders auto-connect icon only if server is auto
/>
</svg>
</td>
<th
class="responsive-table__cell"
data-th="Name"
<td
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:font-bold"
data-column="Name"
>
<a
data-discover="true"
href="/server/abc"
>
My server
</a>
</th>
</td>
<td
class="responsive-table__cell"
data-th="Base URL"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:max-lg:border-b-0"
data-column="Base URL"
>
https://example.com
</td>
<td
class="responsive-table__cell text-end"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:text-right tw:max-lg:absolute tw:right-0 tw:-top-1 tw:mx-lg:pt-0"
>
<span>
ManageServersRowDropdown
@@ -59,33 +71,45 @@ exports[`<ManageServersRow /> > renders auto-connect icon only if server is auto
exports[`<ManageServersRow /> > renders auto-connect icon only if server is autoConnect 2`] = `
<div>
<table>
<tbody>
<table
class="tw:w-full"
>
<thead
class="tw:hidden tw:lg:table-header-group"
>
<tr
class="responsive-table__row"
class="tw:group tw:lg:table-row tw:flex tw:flex-col tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border"
/>
</thead>
<tbody
class="tw:lg:table-row-group tw:flex tw:flex-col tw:gap-y-3"
>
<tr
class="tw:group tw:lg:table-row tw:flex tw:flex-col tw:lg:border-0 tw:border-y-2 tw:border-lm-border tw:dark:border-dm-border tw:hover:bg-lm-primary tw:dark:hover:bg-dm-primary tw:group-[&]/card:hover:bg-lm-secondary tw:dark:group-[&]/card:hover:bg-dm-secondary tw:relative"
>
<td
class="responsive-table__cell"
data-th="Auto-connect"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1"
data-column="Auto-connect"
/>
<th
class="responsive-table__cell"
data-th="Name"
<td
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:font-bold"
data-column="Name"
>
<a
data-discover="true"
href="/server/abc"
>
My server
</a>
</th>
</td>
<td
class="responsive-table__cell"
data-th="Base URL"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:max-lg:border-b-0"
data-column="Base URL"
>
https://example.com
</td>
<td
class="responsive-table__cell text-end"
class="tw:p-2 tw:border-lm-border tw:dark:border-dm-border tw:block tw:lg:table-cell tw:not-last:border-b-1 tw:lg:border-b-1 tw:before:lg:hidden tw:before:content-[attr(data-column)] tw:before:font-bold tw:before:mr-1 tw:text-right tw:max-lg:absolute tw:right-0 tw:-top-1 tw:mx-lg:pt-0"
>
<span>
ManageServersRowDropdown

View File

@@ -35,111 +35,12 @@ exports[`<ManageServersRowDropdown /> > renders expected size and icon 1`] = `
role="menu"
style="min-width: 210px;"
tabindex="-1"
>
<a
class="dropdown-item"
href="/server/abc123"
role="menuitem"
tabindex="0"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-plug fa-fw "
data-icon="plug"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"
fill="currentColor"
/>
</svg>
Connect
</a>
<a
class="dropdown-item"
href="/server/abc123/edit"
role="menuitem"
tabindex="0"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-pen-to-square fa-fw "
data-icon="pen-to-square"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"
fill="currentColor"
/>
</svg>
Edit server
</a>
<button
class="dropdown-item"
role="menuitem"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-ban fa-fw "
data-icon="ban"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"
fill="currentColor"
/>
</svg>
Do not a
uto-connect
</button>
<hr
class="dropdown-divider"
tabindex="-1"
/>
<button
class="dropdown-item--danger dropdown-item"
role="menuitem"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-circle-minus fa-fw "
data-icon="circle-minus"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"
fill="currentColor"
/>
</svg>
Remove server
</button>
<span>
DeleteServerModal
[CLOSED]
</span>
</div>
/>
</div>
<span>
DeleteServerModal
[CLOSED]
</span>
</div>
`;
@@ -178,110 +79,11 @@ exports[`<ManageServersRowDropdown /> > renders expected size and icon 2`] = `
role="menu"
style="min-width: 170px;"
tabindex="-1"
>
<a
class="dropdown-item"
href="/server/abc123"
role="menuitem"
tabindex="0"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-plug fa-fw "
data-icon="plug"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"
fill="currentColor"
/>
</svg>
Connect
</a>
<a
class="dropdown-item"
href="/server/abc123/edit"
role="menuitem"
tabindex="0"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-pen-to-square fa-fw "
data-icon="pen-to-square"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"
fill="currentColor"
/>
</svg>
Edit server
</a>
<button
class="dropdown-item"
role="menuitem"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-circle fa-fw "
data-icon="circle"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"
fill="currentColor"
/>
</svg>
A
uto-connect
</button>
<hr
class="dropdown-divider"
tabindex="-1"
/>
<button
class="dropdown-item--danger dropdown-item"
role="menuitem"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-circle-minus fa-fw "
data-icon="circle-minus"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"
fill="currentColor"
/>
</svg>
Remove server
</button>
<span>
DeleteServerModal
[CLOSED]
</span>
</div>
/>
</div>
<span>
DeleteServerModal
[CLOSED]
</span>
</div>
`;

View File

@@ -6,10 +6,10 @@ import { checkAccessibility } from '../../__helpers__/accessibility';
import { renderWithEvents } from '../../__helpers__/setUpTest';
describe('<DuplicatedServersModal />', () => {
const onDiscard = vi.fn();
const onSave = vi.fn();
const onClose = vi.fn();
const onConfirm = vi.fn();
const setUp = (duplicatedServers: ServerData[] = []) => act(() => renderWithEvents(
<DuplicatedServersModal isOpen duplicatedServers={duplicatedServers} onDiscard={onDiscard} onSave={onSave} />,
<DuplicatedServersModal open duplicatedServers={duplicatedServers} onClose={onClose} onConfirm={onConfirm} />,
));
const mockServer = (data: Partial<ServerData> = {}) => fromPartial<ServerData>(data);
@@ -32,8 +32,9 @@ describe('<DuplicatedServersModal />', () => {
{
header: 'Duplicated server',
firstParagraph: 'There is already a server with:',
lastParagraph: 'Do you want to save this server anyway?',
lastParagraph: 'Do you want to save this server?',
discardBtn: 'Discard',
confirmButton: 'Save duplicate',
},
],
[
@@ -41,8 +42,9 @@ describe('<DuplicatedServersModal />', () => {
{
header: 'Duplicated servers',
firstParagraph: 'The next servers already exist:',
lastParagraph: 'Do you want to ignore duplicated servers?',
lastParagraph: 'Do you want to save duplicated servers?',
discardBtn: 'Ignore duplicates',
confirmButton: 'Save duplicates',
},
],
])('renders expected texts based on amount of servers', async (duplicatedServers, assertions) => {
@@ -52,6 +54,7 @@ describe('<DuplicatedServersModal />', () => {
expect(screen.getByText(assertions.firstParagraph)).toBeInTheDocument();
expect(screen.getByText(assertions.lastParagraph)).toBeInTheDocument();
expect(screen.getByRole('button', { name: assertions.discardBtn })).toBeInTheDocument();
expect(screen.getByRole('button', { name: assertions.confirmButton })).toBeInTheDocument();
});
it.each([
@@ -80,19 +83,19 @@ describe('<DuplicatedServersModal />', () => {
}
});
it('invokes onDiscard when appropriate button is clicked', async () => {
it('invokes onClose when appropriate button is clicked', async () => {
const { user } = await setUp();
expect(onDiscard).not.toHaveBeenCalled();
expect(onClose).not.toHaveBeenCalled();
await user.click(screen.getByRole('button', { name: 'Discard' }));
expect(onDiscard).toHaveBeenCalled();
expect(onClose).toHaveBeenCalled();
});
it('invokes onSave when appropriate button is clicked', async () => {
it('invokes onConfirm when appropriate button is clicked', async () => {
const { user } = await setUp();
expect(onSave).not.toHaveBeenCalled();
await user.click(screen.getByRole('button', { name: 'Save anyway' }));
expect(onSave).toHaveBeenCalled();
expect(onConfirm).not.toHaveBeenCalled();
await user.click(screen.getByRole('button', { name: 'Save duplicate' }));
expect(onConfirm).toHaveBeenCalled();
});
});

View File

@@ -65,9 +65,9 @@ describe('<ImportServersBtn />', () => {
});
it.each([
{ btnName: 'Save anyway',savesDuplicatedServers: true },
{ btnName: 'Save duplicate', savesDuplicatedServers: true },
{ btnName: 'Discard', savesDuplicatedServers: false },
])('creates expected servers depending on selected option in modal', async ({ btnName, savesDuplicatedServers }) => {
])('creates duplicated servers depending on selected option in modal', async ({ btnName, savesDuplicatedServers }) => {
const existingServerData: ServerData = {
name: 'existingServer',
url: 'http://s.test/existingUrl',
@@ -84,14 +84,20 @@ describe('<ImportServersBtn />', () => {
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
await user.upload(screen.getByTestId('csv-file-input'), csvFile);
// Once the file is uploaded, non-duplicated servers are immediately created
expect(createServersMock).toHaveBeenCalledExactlyOnceWith([expect.objectContaining(newServer)]);
expect(screen.getByRole('dialog')).toBeInTheDocument();
await user.click(screen.getByRole('button', { name: btnName }));
expect(createServersMock).toHaveBeenCalledWith(
savesDuplicatedServers
? [expect.objectContaining(existingServerData), expect.objectContaining(newServer)]
: [expect.objectContaining(newServer)],
);
expect(onImportMock).toHaveBeenCalledTimes(1);
// If duplicated servers are saved, there's one extra call
if (savesDuplicatedServers) {
expect(createServersMock).toHaveBeenLastCalledWith([expect.objectContaining(existingServerData)]);
}
// On import is called only once, no matter what
expect(onImportMock).toHaveBeenCalledOnce();
expect(createServersMock).toHaveBeenCalledTimes(savesDuplicatedServers ? 2 : 1);
});
});

View File

@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import type { NonReachableServer, NotFoundServer, SelectedServer } from '../../../src/servers/data';
import { ServerErrorFactory } from '../../../src/servers/helpers/ServerError';
import { checkAccessibility } from '../../__helpers__/accessibility';
@@ -26,7 +26,7 @@ describe('<ServerError />', () => {
notFound: [
'Oops! Could not connect to this Shlink server.',
'Make sure you have internet connection, and the server is properly configured and on-line.',
/^Alternatively, if you think you may have miss-configured this server/,
/^Alternatively, if you think you may have misconfigured this server/,
],
},
],
@@ -36,7 +36,7 @@ describe('<ServerError />', () => {
found: [
'Oops! Could not connect to this Shlink server.',
'Make sure you have internet connection, and the server is properly configured and on-line.',
/^Alternatively, if you think you may have miss-configured this server/,
/^Alternatively, if you think you may have misconfigured this server/,
],
notFound: ['Could not find this Shlink server.'],
},

View File

@@ -1,18 +1,22 @@
import { fireEvent, render, screen } from '@testing-library/react';
import { fireEvent, screen } from '@testing-library/react';
import { ServerForm } from '../../../src/servers/helpers/ServerForm';
import { checkAccessibility } from '../../__helpers__/accessibility';
import { renderWithEvents } from '../../__helpers__/setUpTest';
describe('<ServerForm />', () => {
const onSubmit = vi.fn();
const setUp = () => render(<ServerForm onSubmit={onSubmit}>Something</ServerForm>);
const setUp = () => renderWithEvents(<ServerForm onSubmit={onSubmit}>Something</ServerForm>);
it('passes a11y checks', () => checkAccessibility(setUp()));
it('renders components', () => {
it('renders inputs', () => {
setUp();
expect(screen.getAllByRole('textbox')).toHaveLength(3);
expect(screen.getByLabelText(/^Name/)).toBeInTheDocument();
expect(screen.getByLabelText(/^URL/)).toBeInTheDocument();
expect(screen.getByLabelText(/^API key/)).toBeInTheDocument();
expect(screen.getByText('Something')).toBeInTheDocument();
expect(screen.getByText('Advanced options')).toBeInTheDocument();
});
it('invokes submit callback when submit event is triggered', async () => {
@@ -22,4 +26,13 @@ describe('<ServerForm />', () => {
fireEvent.submit(screen.getByRole('form'), { preventDefault: vi.fn() });
expect(onSubmit).toHaveBeenCalled();
});
it('shows advanced options', async () => {
const { user } = setUp();
const forwardCredentialsLabel = 'Forward credentials to this server on every request.';
expect(screen.queryByLabelText(forwardCredentialsLabel)).not.toBeInTheDocument();
await user.click(screen.getByText('Advanced options'));
expect(screen.getByLabelText(forwardCredentialsLabel)).toBeInTheDocument();
});
});

View File

@@ -1,45 +1,49 @@
import { fromPartial } from '@total-typescript/shoehorn';
import type { ServersMap } from '../../../src/servers/data';
import { serializeServer } from '../../../src/servers/data';
import { ServersExporter } from '../../../src/servers/services/ServersExporter';
import type { LocalStorage } from '../../../src/utils/services/LocalStorage';
import { appendChild, removeChild, windowMock } from '../../__mocks__/Window.mock';
describe('ServersExporter', () => {
const servers: ServersMap = {
abc123: {
id: 'abc123',
name: 'foo',
url: 'https://foo.com',
apiKey: 'foo_api_key',
autoConnect: true,
},
def456: {
id: 'def456',
name: 'bar',
url: 'https://bar.com',
apiKey: 'bar_api_key',
forwardCredentials: true,
autoConnect: false,
},
};
const storageMock = fromPartial<LocalStorage>({
get: vi.fn(() => ({
abc123: {
id: 'abc123',
name: 'foo',
autoConnect: true,
},
def456: {
id: 'def456',
name: 'bar',
autoConnect: false,
},
} as any)),
get: vi.fn(() => servers as any),
});
const erroneousToCsv = vi.fn(() => {
throw new Error('');
});
const createCsvjsonMock = (throwError = false) => (throwError ? erroneousToCsv : vi.fn(() => ''));
const createJsonToCsvMock = (throwError = false) => (throwError ? erroneousToCsv : vi.fn(() => ''));
describe('exportServers', () => {
let originalConsole: Console;
const error = vi.fn();
beforeEach(() => {
originalConsole = global.console;
global.console = fromPartial<Console>({ error });
(global as any).Blob = class Blob {};
(global as any).URL = { createObjectURL: () => '' };
vi.stubGlobal('console', fromPartial<Console>({ error }));
});
afterEach(() => {
global.console = originalConsole;
vi.unstubAllGlobals();
});
it('logs an error if something fails', () => {
const csvjsonMock = createCsvjsonMock(true);
const exporter = new ServersExporter(storageMock, windowMock, csvjsonMock);
const jsonToCsvMock = createJsonToCsvMock(true);
const exporter = new ServersExporter(storageMock, windowMock, jsonToCsvMock);
exporter.exportServers();
@@ -48,7 +52,8 @@ describe('ServersExporter', () => {
});
it('makes use of download link API', () => {
const exporter = new ServersExporter(storageMock, windowMock, createCsvjsonMock());
const jsonToCsvMock = createJsonToCsvMock();
const exporter = new ServersExporter(storageMock, windowMock, jsonToCsvMock);
const { document: { createElement } } = windowMock;
exporter.exportServers();
@@ -57,6 +62,7 @@ describe('ServersExporter', () => {
expect(createElement).toHaveBeenCalledTimes(1);
expect(appendChild).toHaveBeenCalledTimes(1);
expect(removeChild).toHaveBeenCalledTimes(1);
expect(jsonToCsvMock).toHaveBeenCalledWith(Object.values(servers).map(serializeServer));
});
});
});

View File

@@ -1,5 +1,5 @@
import { fromPartial } from '@total-typescript/shoehorn';
import type { RegularServer } from '../../../src/servers/data';
import type { RegularServer, ServerData } from '../../../src/servers/data';
import { ServersImporter } from '../../../src/servers/services/ServersImporter';
describe('ServersImporter', () => {
@@ -25,20 +25,24 @@ describe('ServersImporter', () => {
});
it.each([
[{}],
[undefined],
[[{ foo: 'bar' }]],
[
[
{ parsedObject: {}, expectedError: 'Provided file does not have the right format.' },
{ parsedObject: undefined, expectedError: 'Provided file does not have the right format.' },
{
parsedObject: [{ foo: 'bar' }],
expectedError: 'Server is missing required "url", "apiKey" and/or "name" properties',
},
{
parsedObject: [
{
url: 1,
apiKey: 1,
name: 1,
},
],
],
[
[
expectedError: 'Server is missing required "url", "apiKey" and/or "name" properties',
},
{
parsedObject: [
{
url: 'foo',
apiKey: 'foo',
@@ -46,26 +50,29 @@ describe('ServersImporter', () => {
},
{ bar: 'foo' },
],
],
])('rejects with error if provided file does not parse to valid list of servers', async (parsedObject) => {
expectedError: 'Server is missing required "url", "apiKey" and/or "name" properties',
},
])('rejects with error if provided file does not parse to valid list of servers', async ({
parsedObject,
expectedError,
}) => {
csvjsonMock.mockResolvedValue(parsedObject);
await expect(importer.importServersFromFile(fileMock())).rejects.toEqual(
new Error('Provided file does not have the right format.'),
);
await expect(importer.importServersFromFile(fileMock())).rejects.toEqual(new Error(expectedError));
});
it('reads file when a CSV containing valid servers is provided', async () => {
const expectedServers = [
const expectedServers: Required<ServerData>[] = [
{
url: 'foo',
apiKey: 'foo',
name: 'foo',
forwardCredentials: false,
},
{
url: 'bar',
apiKey: 'bar',
name: 'bar',
forwardCredentials: false,
},
];

View File

@@ -1,5 +1,5 @@
import { render } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';
import { MemoryRouter } from 'react-router';
import { Settings } from '../../src/settings/Settings';
import { checkAccessibility } from '../__helpers__/accessibility';

View File

@@ -1,28 +0,0 @@
import { screen, waitFor } from '@testing-library/react';
import type { DateInterval } from '../../../src/utils/dates/DateIntervalSelector';
import { DateIntervalSelector, INTERVAL_TO_STRING_MAP } from '../../../src/utils/dates/DateIntervalSelector';
import { checkAccessibility } from '../../__helpers__/accessibility';
import { renderWithEvents } from '../../__helpers__/setUpTest';
describe('<DateIntervalSelector />', () => {
const activeInterval: DateInterval = 'last7Days';
const onChange = vi.fn();
const setUp = () => renderWithEvents(
<DateIntervalSelector allText="All text" active={activeInterval} onChange={onChange} />,
);
it('passes a11y checks', () => checkAccessibility(setUp()));
it('passes props down to nested DateIntervalDropdownItems', async () => {
const { user } = setUp();
const btn = screen.getByRole('button');
await user.click(btn);
await waitFor(() => expect(screen.getByRole('menu')).toBeInTheDocument());
const items = screen.getAllByRole('menuitem');
expect(btn).toHaveTextContent(INTERVAL_TO_STRING_MAP[activeInterval] ?? '');
expect(items).toHaveLength(8);
});
});

View File

@@ -1,14 +1,18 @@
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import { VitePWA } from 'vite-plugin-pwa';
import { defineConfig } from 'vitest/config';
import { manifest } from './manifest';
import pack from './package.json';
import pack from './package.json' with { type: 'json' };
const DEFAULT_NODE_VERSION = 'v22.10.0';
const nodeVersion = process.version ?? DEFAULT_NODE_VERSION;
const homepage = pack.homepage?.trim();
/* eslint-disable-next-line no-restricted-exports */
export default defineConfig({
plugins: [react(), VitePWA({
plugins: [react(), tailwindcss(), VitePWA({
mode: process.env.NODE_ENV === 'development' ? 'development' : 'production',
strategies: 'injectManifest',
srcDir: './src',
@@ -22,14 +26,24 @@ export default defineConfig({
},
server: {
port: 3000,
watch: {
// Do not watch test files or generated files, avoiding the dev server to constantly reload when not needed
ignored: ['**/.idea/**', '**/.git/**', '**/build/**', '**/coverage/**', '**/test/**'],
},
},
base: !homepage ? undefined : homepage, // Not using just homepage because empty string should be discarded
// Vitest config
test: {
// Run tests in an actual browser
browser: {
provider: 'playwright',
enabled: true,
headless: true,
screenshotFailures: false,
instances: [{ browser: 'chromium' }],
},
globals: true,
allowOnly: true,
environment: 'jsdom',
setupFiles: './config/test/setupTests.ts',
coverage: {
provider: 'v8',
@@ -46,10 +60,23 @@ export default defineConfig({
// Required code coverage. Lower than this will make the check fail
thresholds: {
statements: 95,
branches: 90,
functions: 90,
branches: 95,
functions: 95,
lines: 95,
},
},
// Silent warnings triggered by reactstrap components, as it's getting removed
onConsoleLog: (log) => !log.includes('`transition.timeout` is marked as required'),
// Workaround for bug in react-router (or vitest module resolution) which causes different react-router versions to
// be resolved for the main package and dependencies who have a peer dependency in react-router.
// This ensures always the same version is resolved.
// See https://github.com/remix-run/react-router/issues/12785 for details
alias: nodeVersion > DEFAULT_NODE_VERSION
? {
'react-router': resolve(__dirname, 'node_modules/react-router/dist/development/index.mjs'),
}
: undefined,
},
});