From 438b75c035b391c3644e9f6465441409e2af9ff2 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Mon, 9 Sep 2024 14:06:52 +0200 Subject: [PATCH 01/10] WIP: Eslint setup --- eslint.config.js | 13 + package-lock.json | 1974 ++++++++++++++++- package.json | 9 +- src/api/nyDialogWs.ts | 2 +- src/metrics/amplitude-utils.ts | 2 +- src/mock/Utils.ts | 2 +- src/utils/Fetch.ts | 2 +- src/view/DialogProvider.tsx | 2 +- src/view/EventHandler.tsx | 4 +- src/view/KladdProvider.ts | 2 +- src/view/aktivitet/Aktivitet.test.tsx | 12 +- src/view/aktivitet/MoteAktivitet.tsx | 2 +- .../aktivitet/SamtalereferatAktivitet.tsx | 2 +- src/view/aktivitet/TextUtils.tsx | 4 +- src/view/dialog/NyDialogForm.tsx | 2 +- src/view/dialogProvider/dialogStore.ts | 2 +- src/view/dialogliste/DialogPreview.tsx | 2 +- src/view/melding/Meldinger.tsx | 2 +- src/view/utils/utils.ts | 2 +- 19 files changed, 1894 insertions(+), 148 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..7085d2db --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,13 @@ +import globals from 'globals'; +import pluginJs from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import pluginReact from 'eslint-plugin-react'; + +export default [ + { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, + { languageOptions: { globals: globals.browser } }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + pluginReact.configs.flat.recommended, + { ignores: ['src/fellesikoner/'] } +]; diff --git a/package-lock.json b/package-lock.json index 6e9c8ce5..9db1aa83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,6 +43,7 @@ "devDependencies": { "@babel/cli": "^7.25.6", "@babel/core": "^7.25.2", + "@eslint/js": "^9.10.0", "@storybook/addon-essentials": "^8.0.9", "@storybook/addon-interactions": "^8.0.9", "@storybook/addon-links": "^8.0.9", @@ -65,6 +66,9 @@ "chromatic": "^7.2.0", "classnames": "^2.5.1", "cross-env": "^7.0.3", + "eslint": "^9.10.0", + "eslint-plugin-react": "^7.35.2", + "globals": "^15.9.0", "graphql": "^16.9.0", "husky": "^9.0.11", "import-sort-style-module": "^6.0.0", @@ -78,10 +82,11 @@ "storybook": "^7.6.12", "tailwindcss": "^3.4.3", "typescript": "^5.5.4", + "typescript-eslint": "^8.4.0", "vitest": "^2.0.5" }, "engines": { - "node": "20" + "node": "21" } }, "node_modules/@adobe/css-tools": { @@ -1209,6 +1214,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-classes/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", @@ -2240,6 +2254,14 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.25.6", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", @@ -2334,6 +2356,139 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "9.10.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz", + "integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.1.0.tgz", + "integrity": "sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@fal-works/esbuild-plugin-global-externals": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@fal-works/esbuild-plugin-global-externals/-/esbuild-plugin-global-externals-2.1.2.tgz", @@ -2415,6 +2570,32 @@ "react-hook-form": "^7.0.0" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@inquirer/confirm": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.7.tgz", @@ -6996,6 +7177,236 @@ "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.4.0.tgz", + "integrity": "sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/type-utils": "8.4.0", + "@typescript-eslint/utils": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.4.0.tgz", + "integrity": "sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", + "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.4.0.tgz", + "integrity": "sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.4.0", + "@typescript-eslint/utils": "8.4.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", + "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", + "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/visitor-keys": "8.4.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", + "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.4.0", + "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/typescript-estree": "8.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", + "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.4.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -7408,9 +7819,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -7461,6 +7872,22 @@ "node": ">=8" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -7558,13 +7985,16 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7576,6 +8006,26 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -7585,6 +8035,100 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/assert": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", @@ -7657,10 +8201,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -8015,13 +8562,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8917,6 +9470,57 @@ "node": ">=18" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/date-fns": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", @@ -9009,6 +9613,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/default-browser-id": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", @@ -9037,6 +9647,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -9047,11 +9674,12 @@ } }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -9564,6 +10192,87 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-get-iterator": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", @@ -9584,12 +10293,89 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/esbuild": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", @@ -9688,6 +10474,204 @@ "source-map": "~0.6.1" } }, + "node_modules/eslint": { + "version": "9.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.10.0.tgz", + "integrity": "sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.10.0", + "@eslint/plugin-kit": "^0.1.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.35.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz", + "integrity": "sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.19", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.0", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.11", + "string.prototype.repeat": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "dev": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -9701,6 +10685,30 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -9958,6 +10966,12 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -9973,6 +10987,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "node_modules/fastq": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", @@ -9996,6 +11022,18 @@ "integrity": "sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==", "dev": true }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/file-system-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/file-system-cache/-/file-system-cache-2.3.0.tgz", @@ -10235,6 +11273,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, "node_modules/flow-parser": { "version": "0.244.0", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.244.0.tgz", @@ -10403,6 +11460,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -10450,14 +11525,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10496,6 +11576,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/giget": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", @@ -10598,11 +11695,31 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "dev": true, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/globby": { @@ -10642,6 +11759,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/graphql": { "version": "16.9.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", @@ -10689,18 +11812,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -10719,12 +11830,24 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10743,12 +11866,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -11247,13 +12370,13 @@ "integrity": "sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==" }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -11320,14 +12443,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11338,6 +12463,21 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -11414,6 +12554,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -11476,6 +12631,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -11538,10 +12705,13 @@ } }, "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11562,6 +12732,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-node-process": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", @@ -11651,21 +12833,27 @@ } }, "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11714,16 +12902,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -11745,22 +12929,40 @@ } }, "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11909,6 +13111,19 @@ "node": ">=8" } }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", @@ -12087,6 +13302,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -12098,6 +13319,18 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -12120,6 +13353,30 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -12186,6 +13443,19 @@ "node": ">=6" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -13775,6 +15045,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/needle": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", @@ -14039,10 +15315,13 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14072,16 +15351,65 @@ "node": ">= 0.4" } }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -14158,6 +15486,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -14563,6 +15908,15 @@ "node": ">=10" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", @@ -14693,6 +16047,15 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", @@ -15534,6 +16897,27 @@ "node": ">=8" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -15568,14 +16952,15 @@ "dev": true }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -15902,12 +17287,47 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -16009,6 +17429,38 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -16049,14 +17501,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -16353,6 +17809,91 @@ "node": ">=8" } }, + "node_modules/string.prototype.matchall": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/stringify-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", @@ -16830,6 +18371,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -17016,6 +18563,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -17050,6 +18609,18 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -17083,6 +18654,79 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -17102,6 +18746,29 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.4.0.tgz", + "integrity": "sha512-67qoc3zQZe3CAkO0ua17+7aCLI0dU+sSQd1eKPGq06QE4rfQjstVXR6woHO5qQvGUa550NfGckT4tzh3b3c8Pw==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.4.0", + "@typescript-eslint/parser": "8.4.0", + "@typescript-eslint/utils": "8.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/ua-parser-js": { "version": "1.0.38", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.38.tgz", @@ -17143,6 +18810,21 @@ "node": ">=0.8.0" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -17351,6 +19033,15 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -17971,33 +19662,61 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-builtin-type": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", + "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18022,6 +19741,15 @@ "node": ">=8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 3a4e5545..5d0f6970 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "url": "git+https://github.com/navikt/arbeidsrettet-dialog.git" }, "engines": { - "node": "20" + "node": "21" }, "scripts": { "dev": "vite", @@ -24,7 +24,7 @@ "test:coverage": "npm test -- --coverage --watchAll=false", "format-all": "prettier --write 'src/'", "prettier-check": "prettier --check 'src/'", - "lint": "echo \"Not implemented\"", + "lint": "eslint src/", "lint-staged": "lint-staged", "storybook": "STORYBOOK_USE_HASH_ROUTER=true storybook dev -p 6006", "build-storybook": "STORYBOOK_USE_HASH_ROUTER=true storybook build", @@ -93,6 +93,7 @@ "devDependencies": { "@babel/cli": "^7.25.6", "@babel/core": "^7.25.2", + "@eslint/js": "^9.10.0", "@storybook/addon-essentials": "^8.0.9", "@storybook/addon-interactions": "^8.0.9", "@storybook/addon-links": "^8.0.9", @@ -115,6 +116,9 @@ "chromatic": "^7.2.0", "classnames": "^2.5.1", "cross-env": "^7.0.3", + "eslint": "^9.10.0", + "eslint-plugin-react": "^7.35.2", + "globals": "^15.9.0", "graphql": "^16.9.0", "husky": "^9.0.11", "import-sort-style-module": "^6.0.0", @@ -128,6 +132,7 @@ "storybook": "^7.6.12", "tailwindcss": "^3.4.3", "typescript": "^5.5.4", + "typescript-eslint": "^8.4.0", "vitest": "^2.0.5" }, "msw": { diff --git a/src/api/nyDialogWs.ts b/src/api/nyDialogWs.ts index d259f0d2..d6a653ad 100644 --- a/src/api/nyDialogWs.ts +++ b/src/api/nyDialogWs.ts @@ -90,7 +90,7 @@ const authenticate = (socket: WebSocket, ticket: string) => { }; const getTicketAndAuthenticate = async (body: SubscriptionPayload) => { - let ticket = await getTicket(body); + const ticket = await getTicket(body); if (!socketSingleton) return; authenticate(socketSingleton, ticket); }; diff --git a/src/metrics/amplitude-utils.ts b/src/metrics/amplitude-utils.ts index 89d68c27..946b6959 100644 --- a/src/metrics/amplitude-utils.ts +++ b/src/metrics/amplitude-utils.ts @@ -26,7 +26,7 @@ export const logAmplitudeEvent = (eventName: string, data?: { [key: string]: Eve try { track(eventName, data); } catch (error) { - // eslint-disable-next-line no-console + console.error(error); } }); diff --git a/src/mock/Utils.ts b/src/mock/Utils.ts index 917b5fa4..6dcf5503 100644 --- a/src/mock/Utils.ts +++ b/src/mock/Utils.ts @@ -2,7 +2,7 @@ import { USE_HASH_ROUTER } from '../constants'; export function rndId() { const crypto: Crypto = window.crypto; - let array = new Uint32Array(1); + const array = new Uint32Array(1); crypto.getRandomValues(array); return `${Math.floor(array[0] % 100_000_000)}`; diff --git a/src/utils/Fetch.ts b/src/utils/Fetch.ts index 6fc260b4..a9b8b656 100644 --- a/src/utils/Fetch.ts +++ b/src/utils/Fetch.ts @@ -9,7 +9,7 @@ function getHeaders() { return { 'Content-Type': 'application/json', 'Nav-Consumer-Id': 'arbeidsrettet-dialog', - NAV_CSRF_PROTECTION: getCookie('NAV_CSRF_PROTECTION') // eslint-disable-line quote-props + NAV_CSRF_PROTECTION: getCookie('NAV_CSRF_PROTECTION') }; } diff --git a/src/view/DialogProvider.tsx b/src/view/DialogProvider.tsx index 3c4adc88..c664bc00 100644 --- a/src/view/DialogProvider.tsx +++ b/src/view/DialogProvider.tsx @@ -84,7 +84,7 @@ export function useDialogDataProvider(): DialogDataProviderType { method: 'post', body: JSON.stringify(nyDialogData) }).then((dialog) => { - if (!!dialogId) { + if (dialogId) { updateDialogInDialoger(dialog); setOkStatus(); } else { diff --git a/src/view/EventHandler.tsx b/src/view/EventHandler.tsx index fce243b8..5e0f8a38 100644 --- a/src/view/EventHandler.tsx +++ b/src/view/EventHandler.tsx @@ -31,9 +31,9 @@ export function EventHandler() { const { dialogRoute, nyRoute } = useRoutes(); useEventListener('visDialog', (event) => { const { dialogId, aktivitetId } = event.detail; - if (!!dialogId) { + if (dialogId) { navigate(dialogRoute(dialogId), { state: { sistHandlingsType: HandlingsType.ingen } }); - } else if (!!aktivitetId) { + } else if (aktivitetId) { navigate(nyRoute(aktivitetId), { state: { sistHandlingsType: HandlingsType.ingen } }); } }); diff --git a/src/view/KladdProvider.ts b/src/view/KladdProvider.ts index 770d6448..f1f7f457 100644 --- a/src/view/KladdProvider.ts +++ b/src/view/KladdProvider.ts @@ -13,7 +13,7 @@ export function eqKladd(kladd: KladdData, dialogId?: StringOrNull, aktivitetId?: const dId = valueOrNull(dialogId); const aId = valueOrNull(aktivitetId); - if (!!dialogId) { + if (dialogId) { return kladd.dialogId === dId; } diff --git a/src/view/aktivitet/Aktivitet.test.tsx b/src/view/aktivitet/Aktivitet.test.tsx index 7357964c..9c62ca35 100644 --- a/src/view/aktivitet/Aktivitet.test.tsx +++ b/src/view/aktivitet/Aktivitet.test.tsx @@ -55,14 +55,14 @@ describe('aktivteter', () => { it('skal vise møteaktivitet', async () => { gitt.bruker().som.harDialogMedAktivitet(moteAktivitet); const { getAllByText } = await act(() => render()); - getAllByText(moteAktivitet.beskrivelse!!); - getAllByText(moteAktivitet.tittel!!); + getAllByText(moteAktivitet.beskrivelse!); + getAllByText(moteAktivitet.tittel!); }); it('skal vise samtalereferatAktivitet', async () => { gitt.bruker().som.harDialogMedAktivitet(samtalereferatAktivitet); const { getAllByText } = await act(() => render()); - getAllByText(getKanalTekst(samtalereferatAktivitet.kanal!!)); + getAllByText(getKanalTekst(samtalereferatAktivitet.kanal!)); getAllByText('Vi ble enige om at det skal søkes'); // Tekst er splittet opp getAllByText('minst 5 stillinger i uken den første perioden'); getAllByText(formaterDate(samtalereferatAktivitet.fraDato)); @@ -71,9 +71,9 @@ describe('aktivteter', () => { it('skal vise stilling fra nav aktivitet', async () => { gitt.bruker().som.harDialogMedAktivitet(stillingFraNav); const { getAllByText } = await act(() => render()); - getAllByText(stillingFraNav.stillingFraNavData!!.arbeidsgiver!!); - getAllByText(stillingFraNav.stillingFraNavData!!.arbeidssted!!); - getAllByText(formaterDate(stillingFraNav.stillingFraNavData!!.svarfrist)); + getAllByText(stillingFraNav.stillingFraNavData!.arbeidsgiver!); + getAllByText(stillingFraNav.stillingFraNavData!.arbeidssted!); + getAllByText(formaterDate(stillingFraNav.stillingFraNavData!.svarfrist)); getAllByText('Venter på å bli kontaktet'); }); }); diff --git a/src/view/aktivitet/MoteAktivitet.tsx b/src/view/aktivitet/MoteAktivitet.tsx index 25563e12..0a2aa6f3 100644 --- a/src/view/aktivitet/MoteAktivitet.tsx +++ b/src/view/aktivitet/MoteAktivitet.tsx @@ -14,7 +14,7 @@ export default function MoteAktivitet(props: PropTypes) { <> - + diff --git a/src/view/aktivitet/SamtalereferatAktivitet.tsx b/src/view/aktivitet/SamtalereferatAktivitet.tsx index aa0d5045..62aaf2ff 100644 --- a/src/view/aktivitet/SamtalereferatAktivitet.tsx +++ b/src/view/aktivitet/SamtalereferatAktivitet.tsx @@ -16,7 +16,7 @@ export default function SamtalereferatAktivitet(props: PropTypes) { return ( <> - + ); diff --git a/src/view/aktivitet/TextUtils.tsx b/src/view/aktivitet/TextUtils.tsx index 10566ebc..b8035c2c 100644 --- a/src/view/aktivitet/TextUtils.tsx +++ b/src/view/aktivitet/TextUtils.tsx @@ -25,7 +25,7 @@ export function getStatusText(status: AktivitetStatus): string { export function getTypeTextByAktivitet(aktivitet: Aktivitet | ArenaAktivitet): string { if (aktivitet.type === AktivitetTypes.EKSTERN_AKTIVITET) { - return getTypeText(aktivitet.eksternAktivitet?.type!!); + return getTypeText(aktivitet.eksternAktivitet?.type!); } return getTypeText(aktivitet.type); } @@ -96,7 +96,7 @@ export function getDialogTittel(aktivitet: Aktivitet | ArenaAktivitet | undefine case AktivitetTypes.MOTE: return `Møte: ${tittel}`; case AktivitetTypes.EKSTERN_AKTIVITET: - return `${getTypeText((aktivitet as Aktivitet).eksternAktivitet!!.type)}: ${tittel}`; + return `${getTypeText((aktivitet as Aktivitet).eksternAktivitet!.type)}: ${tittel}`; default: return `${getTypeText(type)}: ${tittel}`; } diff --git a/src/view/dialog/NyDialogForm.tsx b/src/view/dialog/NyDialogForm.tsx index 159567c5..6e7e1439 100644 --- a/src/view/dialog/NyDialogForm.tsx +++ b/src/view/dialog/NyDialogForm.tsx @@ -44,7 +44,7 @@ const NyDialogForm = (props: Props) => { const defaultValues: NyDialogFormValues = { tema: kladd?.overskrift ?? cutStringAtLength(defaultTema, 100, '...'), - melding: !!kladd?.tekst ? kladd.tekst : startTekst + melding: kladd?.tekst ? kladd.tekst : startTekst }; const maxMeldingsLengde = 5000; diff --git a/src/view/dialogProvider/dialogStore.ts b/src/view/dialogProvider/dialogStore.ts index 38076369..3cefd1c4 100644 --- a/src/view/dialogProvider/dialogStore.ts +++ b/src/view/dialogProvider/dialogStore.ts @@ -133,7 +133,7 @@ export const useDialogStore = create( }, pollForChanges: async (fnr) => { try { - let { sistOppdatert: remoteSistOppdatert } = await fetchData( + const { sistOppdatert: remoteSistOppdatert } = await fetchData( DialogApi.sistOppdatert, { method: 'POST', diff --git a/src/view/dialogliste/DialogPreview.tsx b/src/view/dialogliste/DialogPreview.tsx index 3fb88623..e05a4098 100644 --- a/src/view/dialogliste/DialogPreview.tsx +++ b/src/view/dialogliste/DialogPreview.tsx @@ -79,7 +79,7 @@ function DialogPreview(props: Props) { const aktivitetData = useAktivitetContext(); - const datoString = !!sisteDato ? formaterDate(sisteDato) : ''; + const datoString = sisteDato ? formaterDate(sisteDato) : ''; const aktivitet = findAktivitet(aktivitetData, aktivitetId); const navigate = useNavigate(); diff --git a/src/view/melding/Meldinger.tsx b/src/view/melding/Meldinger.tsx index 238dace5..670b5b32 100644 --- a/src/view/melding/Meldinger.tsx +++ b/src/view/melding/Meldinger.tsx @@ -24,7 +24,7 @@ function sisteLesteHenvendelse(lest: StringOrNull, henvendelser: MeldingsData[]) export function Meldinger(props: Props) { const { lestAvBrukerTidspunkt, henvendelser } = props.dialogData; const meldingListRef = useRef(null); - const sorterteHenvendelser = !!henvendelser ? henvendelser.sort((a, b) => compareDates(b.sendt, a.sendt)) : []; + const sorterteHenvendelser = henvendelser ? henvendelser.sort((a, b) => compareDates(b.sendt, a.sendt)) : []; useEffect(() => { requestAnimationFrame(() => { diff --git a/src/view/utils/utils.ts b/src/view/utils/utils.ts index 1df2e0d2..90d19e70 100644 --- a/src/view/utils/utils.ts +++ b/src/view/utils/utils.ts @@ -15,7 +15,7 @@ export const settSammenmedSlasher = (...ss: Array): string = export const getAktivitetType = (aktivitet: Aktivitet | ArenaAktivitet): AlleAktivitetTypes => { if (aktivitet.type === AktivitetTypes.EKSTERN_AKTIVITET) { - return aktivitet.eksternAktivitet!!.type; + return aktivitet.eksternAktivitet!.type; } return aktivitet.type; }; From 55dd36f961b304c19d46cb1699d4367d1ea40161 Mon Sep 17 00:00:00 2001 From: Mads Lee Giil Date: Mon, 9 Sep 2024 14:38:56 +0200 Subject: [PATCH 02/10] Fjern lint errors --- src/metrics/amplitude-utils.ts | 3 +-- src/utils/Fetch.ts | 2 +- src/view/dialog/meldingInput/inputUtils.ts | 11 +++++++---- src/view/dialogProvider/dialogStore.ts | 10 ++++------ src/view/dialogliste/DialogListe.tsx | 8 ++++++-- src/view/dialogliste/DialogPreview.tsx | 4 ++-- src/view/dialogliste/ikon/Ikon.test.tsx | 2 +- src/view/melding/Melding.tsx | 4 ++-- 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/metrics/amplitude-utils.ts b/src/metrics/amplitude-utils.ts index 946b6959..4f20cb39 100644 --- a/src/metrics/amplitude-utils.ts +++ b/src/metrics/amplitude-utils.ts @@ -1,7 +1,7 @@ import * as amplitude from '@amplitude/analytics-browser'; +import { track } from '@amplitude/analytics-browser'; import { APP_NAME, TEAM_NAME } from '../constants'; -import { track } from '@amplitude/analytics-browser'; type EventDataValue = string | boolean | number | null | undefined; @@ -26,7 +26,6 @@ export const logAmplitudeEvent = (eventName: string, data?: { [key: string]: Eve try { track(eventName, data); } catch (error) { - console.error(error); } }); diff --git a/src/utils/Fetch.ts b/src/utils/Fetch.ts index a9b8b656..44c94c3e 100644 --- a/src/utils/Fetch.ts +++ b/src/utils/Fetch.ts @@ -9,7 +9,7 @@ function getHeaders() { return { 'Content-Type': 'application/json', 'Nav-Consumer-Id': 'arbeidsrettet-dialog', - NAV_CSRF_PROTECTION: getCookie('NAV_CSRF_PROTECTION') + NAV_CSRF_PROTECTION: getCookie('NAV_CSRF_PROTECTION') }; } diff --git a/src/view/dialog/meldingInput/inputUtils.ts b/src/view/dialog/meldingInput/inputUtils.ts index 20904ba1..202e7c9a 100644 --- a/src/view/dialog/meldingInput/inputUtils.ts +++ b/src/view/dialog/meldingInput/inputUtils.ts @@ -4,6 +4,7 @@ import { HandlingsType, useViewContext } from '../../ViewState'; import { MeldingFormValues } from './MeldingInputBox'; import useMeldingStartTekst from '../UseMeldingStartTekst'; import { useFnrContext } from '../../Provider'; +import { KladdData } from '../../../utils/Typer'; export const maxMeldingsLengde = 5000; export const betterErrorMessage = (error: FieldError, melding: string): FieldError => { @@ -16,14 +17,16 @@ export const betterErrorMessage = (error: FieldError, melding: string): FieldErr }; }; +type KladdOppdateringData = KladdData & { fnr: string | undefined }; + export const debounced = ( - fn: T + fn: (data: KladdOppdateringData) => void ): { hasPendingTask: () => boolean; cleanup: () => void; invoke: T } => { - let timer: any | undefined; - const invoke = (...args: any): void => { + let timer: number | undefined; + const invoke = (data: KladdOppdateringData) => { clearTimeout(timer); timer = setTimeout(() => { - fn(...args); + fn(data); timer = undefined; }, 500); }; diff --git a/src/view/dialogProvider/dialogStore.ts b/src/view/dialogProvider/dialogStore.ts index 3cefd1c4..a5612eb6 100644 --- a/src/view/dialogProvider/dialogStore.ts +++ b/src/view/dialogProvider/dialogStore.ts @@ -6,7 +6,7 @@ import { fetchData, UnautorizedError } from '../../utils/Fetch'; import { DialogApi } from '../../api/UseApiBasePath'; import { isAfter } from 'date-fns'; import { devtools } from 'zustand/middleware'; -import { EventType, closeWebsocket, listenForNyDialogEvents } from '../../api/nyDialogWs'; +import { closeWebsocket, EventType, listenForNyDialogEvents } from '../../api/nyDialogWs'; import { useShallow } from 'zustand/react/shallow'; import { hentDialogerGraphql } from './dialogGraphql'; import { eqKladd, KladdStore } from '../KladdProvider'; @@ -107,7 +107,7 @@ export const useDialogStore = create( return listenForNyDialogEvents(() => silentlyHentDialoger(fnr), fnr, [ EventType.NY_DIALOGMELDING_FRA_BRUKER_TIL_NAV ]); - } catch (e) { + } catch { // Fallback to http-polling if anything fails return pollOnGivenFnr(); } @@ -145,8 +145,7 @@ export const useDialogStore = create( await silentlyHentDialoger(fnr); } } catch (e) { - if (e instanceof UnautorizedError) { - } else { + if (e! instanceof UnautorizedError) { console.error(e); } } @@ -194,8 +193,7 @@ export const useDialogStore = create( export const useHentDialoger = () => useDialogStore(useShallow((store) => store.hentDialoger)); const onIntervalWithCleanup = (pollForChanges: () => Promise) => { - let interval: NodeJS.Timeout; - interval = setInterval(() => { + const interval = setInterval(() => { pollForChanges().catch((e) => { console.error(e); clearInterval(interval); diff --git a/src/view/dialogliste/DialogListe.tsx b/src/view/dialogliste/DialogListe.tsx index f859461b..976c823e 100644 --- a/src/view/dialogliste/DialogListe.tsx +++ b/src/view/dialogliste/DialogListe.tsx @@ -6,7 +6,7 @@ import { DialogPreviewListe } from './DialogPreview'; import HistoriskeDialogerOversikt from './HistoriskDialogListe'; import { useRootLoaderData } from '../../routing/loaders'; import { Loader } from '@navikt/ds-react'; -import { isAfter, isBefore } from 'date-fns'; +import { isAfter } from 'date-fns'; interface Res { naaverende: DialogData[]; @@ -14,7 +14,11 @@ interface Res { } function splitHistoriske(acc: Res, cur: DialogData) { - cur.historisk ? acc.historiske.push(cur) : acc.naaverende.push(cur); + if (cur.historisk) { + acc.historiske.push(cur); + } else { + acc.naaverende.push(cur); + } return acc; } diff --git a/src/view/dialogliste/DialogPreview.tsx b/src/view/dialogliste/DialogPreview.tsx index e05a4098..da8e4643 100644 --- a/src/view/dialogliste/DialogPreview.tsx +++ b/src/view/dialogliste/DialogPreview.tsx @@ -1,6 +1,6 @@ import { BodyShort, Detail, Heading, LinkPanel } from '@navikt/ds-react'; import classNames from 'classnames'; -import React, { useDeferredValue, useEffect, useRef, useState } from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router'; import { useRoutes } from '../../routing/routes'; import { Aktivitet, ArenaAktivitet } from '../../utils/aktivitetTypes'; @@ -62,7 +62,7 @@ function DialogPreview(props: Props) { const [skalScrolle, setSkalScrolle] = useState(false); const { dialog, valgtDialogId } = props; - const { id, sisteDato, aktivitetId, lest, overskrift, historisk } = dialog; + const { id, sisteDato, aktivitetId, overskrift } = dialog; const detteErValgtDialog = id === valgtDialogId; useEventListener('veilarbpersonflatefs.tab-clicked', ({ detail: { tabId } }) => { diff --git a/src/view/dialogliste/ikon/Ikon.test.tsx b/src/view/dialogliste/ikon/Ikon.test.tsx index d2dba7fc..4f317ba3 100644 --- a/src/view/dialogliste/ikon/Ikon.test.tsx +++ b/src/view/dialogliste/ikon/Ikon.test.tsx @@ -23,7 +23,7 @@ const dialogUtenAktivitet: DialogData = { describe('Ikon (DialogPreviewIkon)', () => { it('dialog med aktivitet', () => { - const { getByLabelText } = render(); + render(); }); it('dialog uten aktivitet', () => { diff --git a/src/view/melding/Melding.tsx b/src/view/melding/Melding.tsx index 7784d732..14f9692c 100644 --- a/src/view/melding/Melding.tsx +++ b/src/view/melding/Melding.tsx @@ -1,5 +1,5 @@ import { ExternalLinkIcon, PersonIcon } from '@navikt/aksel-icons'; -import { BodyShort, Chat, HStack } from '@navikt/ds-react'; +import { BodyShort, Chat } from '@navikt/ds-react'; import React from 'react'; import { ViktigMelding } from '../../felleskomponenter/etiketer/Etikett'; @@ -51,7 +51,7 @@ export function Melding(props: Props) { ( + a: ({ node: _, ...props }) => ( Date: Mon, 9 Sep 2024 15:19:09 +0200 Subject: [PATCH 03/10] Fiks lint feil --- eslint.config.js | 2 +- src/mock/SistOppdatert.ts | 2 +- src/mock/Utils.ts | 2 -- src/test/mockUtils.ts | 2 +- src/utils/UpdateEvent.tsx | 2 +- src/view/AppBody.tsx | 2 +- src/view/BrukerProvider.tsx | 4 +--- src/view/DialogProvider.tsx | 15 +++------------ src/view/aktivitet/Aktivitet.test.tsx | 1 - src/view/aktivitet/DialogMedAktivitetHeader.tsx | 2 +- src/view/aktivitet/TextUtils.tsx | 2 +- src/view/dialog/DialogCheckboxes.tsx | 8 ++------ src/view/dialog/DialogTrad.tsx | 1 - src/view/dialog/IkkeValgtDialogMelding.tsx | 2 +- src/view/dialog/NyDialogForm.tsx | 14 +++++++++----- src/view/dialog/meldingInput/inputUtils.ts | 10 +++++----- 16 files changed, 28 insertions(+), 43 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 7085d2db..af8899a7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,5 +9,5 @@ export default [ pluginJs.configs.recommended, ...tseslint.configs.recommended, pluginReact.configs.flat.recommended, - { ignores: ['src/fellesikoner/'] } + { ignores: ['src/fellesikoner/', 'src/**/**.test.*'] } ]; diff --git a/src/mock/SistOppdatert.ts b/src/mock/SistOppdatert.ts index 2e8f7526..f9bc72cd 100644 --- a/src/mock/SistOppdatert.ts +++ b/src/mock/SistOppdatert.ts @@ -6,7 +6,7 @@ export const getSistOppdatert = (): ((req: StrictRequest) => { let timestamp = getTime(now); let oppdaterTimestamp = true; - return (req) => { + return () => { const respons = { sistOppdatert: timestamp }; if (oppdaterTimestamp) timestamp = getTime(new Date()); diff --git a/src/mock/Utils.ts b/src/mock/Utils.ts index 6dcf5503..51c047e8 100644 --- a/src/mock/Utils.ts +++ b/src/mock/Utils.ts @@ -1,5 +1,3 @@ -import { USE_HASH_ROUTER } from '../constants'; - export function rndId() { const crypto: Crypto = window.crypto; const array = new Uint32Array(1); diff --git a/src/test/mockUtils.ts b/src/test/mockUtils.ts index 862f7026..d9a3d76b 100644 --- a/src/test/mockUtils.ts +++ b/src/test/mockUtils.ts @@ -6,7 +6,7 @@ import { Status } from '../api/typer'; import * as Provider from '../view/Provider'; import { Aktivitet } from '../utils/aktivitetTypes'; import * as AktivitetProvider from '../view/AktivitetProvider'; -import { AktivitetDataProviderType, useAktivitetContext } from '../view/AktivitetProvider'; +import { AktivitetDataProviderType } from '../view/AktivitetProvider'; const testFnr = '01234567890'; const veilederUserInfo: Bruker = { id: '010101', erVeileder: true, erBruker: false }; diff --git a/src/utils/UpdateEvent.tsx b/src/utils/UpdateEvent.tsx index 4ece7b42..7741b79a 100644 --- a/src/utils/UpdateEvent.tsx +++ b/src/utils/UpdateEvent.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useAktivitetContext, useHentAktiviteter } from '../view/AktivitetProvider'; +import { useHentAktiviteter } from '../view/AktivitetProvider'; import { useOppfolgingContext } from '../view/OppfolgingProvider'; import { useEventListener } from '../view/utils/useEventListner'; import { useFnrContext } from '../view/Provider'; diff --git a/src/view/AppBody.tsx b/src/view/AppBody.tsx index a30817d2..edbe78e1 100644 --- a/src/view/AppBody.tsx +++ b/src/view/AppBody.tsx @@ -8,7 +8,7 @@ import { useUserInfoContext } from './BrukerProvider'; import DialogOversikt from './dialogliste/DialogOversikt'; import { EventHandler } from './EventHandler'; import { useOppfolgingContext } from './OppfolgingProvider'; -import { dataOrUndefined, useErVeileder } from './Provider'; +import { dataOrUndefined } from './Provider'; import { useRootLoaderData } from '../routing/loaders'; import { RouteIds } from '../routing/routes'; import classNames from 'classnames'; diff --git a/src/view/BrukerProvider.tsx b/src/view/BrukerProvider.tsx index 54df04a9..d58a460a 100644 --- a/src/view/BrukerProvider.tsx +++ b/src/view/BrukerProvider.tsx @@ -1,6 +1,4 @@ -import React, { useContext, useEffect, useState } from 'react'; - -import { Status, isReloading } from '../api/typer'; +import { Status } from '../api/typer'; import { OppfolgingsApi } from '../api/UseApiBasePath'; import { fetchData } from '../utils/Fetch'; import { Bruker } from '../utils/Typer'; diff --git a/src/view/DialogProvider.tsx b/src/view/DialogProvider.tsx index c664bc00..d8b2020c 100644 --- a/src/view/DialogProvider.tsx +++ b/src/view/DialogProvider.tsx @@ -8,17 +8,16 @@ import { initDialogState, useDialogStore } from './dialogProvider/dialogStore'; export const DialogContext = React.createContext({ status: Status.INITIAL, - nyDialog: (args) => Promise.resolve({} as any), + nyDialog: () => Promise.resolve({} as DialogData), nyMelding: ({ dialog }: NyMeldingArgs) => Promise.resolve(dialog), - lesDialog: (_dialogId: string) => Promise.resolve({} as any), + lesDialog: (_dialogId: string) => Promise.resolve({} as DialogData), setFerdigBehandlet: (dialog: DialogData, _ferdigBehandlet: boolean) => Promise.resolve(dialog), setVenterPaSvar: (dialog: DialogData, _venterPaSvar: boolean) => Promise.resolve(dialog) }); export const useDialogContext = () => useContext(DialogContext); export const useDialoger = () => { - const dialoger = useDialogStore((state) => state.dialoger); - return dialoger; + return useDialogStore((state) => state.dialoger); }; export interface NyTradArgs { @@ -147,11 +146,3 @@ export function useDialogDataProvider(): DialogDataProviderType { export function isDialogReloading(status: Status) { return status === Status.OK || status === Status.RELOADING; } - -export function isDialogPending(status: Status) { - return status === Status.PENDING; -} - -export function hasDialogError(status: Status) { - return status === Status.ERROR; -} diff --git a/src/view/aktivitet/Aktivitet.test.tsx b/src/view/aktivitet/Aktivitet.test.tsx index 9c62ca35..6c2a100d 100644 --- a/src/view/aktivitet/Aktivitet.test.tsx +++ b/src/view/aktivitet/Aktivitet.test.tsx @@ -5,7 +5,6 @@ import { ijobbAktivitet, moteAktivitet, samtalereferatAktivitet, - stilingAktivitet, stillingFraNav } from '../../mock/Aktivitet'; import { SimpleRouterWithoutProvider } from '../../test/integrationTestSetup'; diff --git a/src/view/aktivitet/DialogMedAktivitetHeader.tsx b/src/view/aktivitet/DialogMedAktivitetHeader.tsx index 88901e53..48c0d4b2 100644 --- a/src/view/aktivitet/DialogMedAktivitetHeader.tsx +++ b/src/view/aktivitet/DialogMedAktivitetHeader.tsx @@ -6,7 +6,7 @@ import { Aktivitet, AktivitetTypes, ArenaAktivitet, ArenaAktivitetTypes } from ' import { formaterDate, getKlokkeslett } from '../../utils/Date'; import { useVisAktivitetContext } from '../AktivitetToggleContext'; import { TilbakeKnapp } from '../dialog/TilbakeKnapp'; -import { useErVeileder, useFnrContext } from '../Provider'; +import { useErVeileder } from '../Provider'; import { useSelectedAktivitet } from '../utils/useAktivitetId'; import { aktivitetLenke, visAktivitetsplan } from './AktivitetskortLenke'; import { getTypeTextByAktivitet } from './TextUtils'; diff --git a/src/view/aktivitet/TextUtils.tsx b/src/view/aktivitet/TextUtils.tsx index b8035c2c..50a73c74 100644 --- a/src/view/aktivitet/TextUtils.tsx +++ b/src/view/aktivitet/TextUtils.tsx @@ -25,7 +25,7 @@ export function getStatusText(status: AktivitetStatus): string { export function getTypeTextByAktivitet(aktivitet: Aktivitet | ArenaAktivitet): string { if (aktivitet.type === AktivitetTypes.EKSTERN_AKTIVITET) { - return getTypeText(aktivitet.eksternAktivitet?.type!); + return aktivitet.eksternAktivitet?.type ? getTypeText(aktivitet.eksternAktivitet?.type) : 'Tiltak fra NAV'; } return getTypeText(aktivitet.type); } diff --git a/src/view/dialog/DialogCheckboxes.tsx b/src/view/dialog/DialogCheckboxes.tsx index 1b8fca22..d2a17231 100644 --- a/src/view/dialog/DialogCheckboxes.tsx +++ b/src/view/dialog/DialogCheckboxes.tsx @@ -1,12 +1,9 @@ import { Checkbox, CheckboxGroup } from '@navikt/ds-react'; -import React, { useEffect } from 'react'; +import React from 'react'; import { Status } from '../../api/typer'; import { notEmpty } from '../../utils/TypeHelper'; import { useDialogContext } from '../DialogProvider'; -import { useOppfolgingContext } from '../OppfolgingProvider'; -import { dataOrUndefined, useFnrContext } from '../Provider'; -import { useSelectedDialog } from '../utils/useAktivitetId'; -import { useUserInfoContext } from '../BrukerProvider'; +import { useFnrContext } from '../Provider'; import { useHentDialoger } from '../dialogProvider/dialogStore'; import useKansendeMelding from '../../utils/UseKanSendeMelding'; import { DialogData } from '../../utils/Typer'; @@ -61,7 +58,6 @@ const DialogCheckboxes = ({ }; const ManagedDialogCheckboxes = ({ dialog }: { dialog: DialogData }) => { - const visible = useUserInfoContext()?.erVeileder || false; const fnr = useFnrContext(); const hentDialoger = useHentDialoger(); const dialogContext = useDialogContext(); diff --git a/src/view/dialog/DialogTrad.tsx b/src/view/dialog/DialogTrad.tsx index 62e97077..fa84846c 100644 --- a/src/view/dialog/DialogTrad.tsx +++ b/src/view/dialog/DialogTrad.tsx @@ -42,7 +42,6 @@ export const DialogTrad = () => { } else if (navigationState.sistHandlingsType !== viewState.sistHandlingsType) { setViewState({ sistHandlingsType: navigationState.sistHandlingsType }); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [dialogId, setViewState, navigationState]); useEffect(() => { diff --git a/src/view/dialog/IkkeValgtDialogMelding.tsx b/src/view/dialog/IkkeValgtDialogMelding.tsx index c6a3a3f1..d3ed921c 100644 --- a/src/view/dialog/IkkeValgtDialogMelding.tsx +++ b/src/view/dialog/IkkeValgtDialogMelding.tsx @@ -3,7 +3,7 @@ import React, { Suspense } from 'react'; import { useDialoger } from '../DialogProvider'; import DialogIkkeValgt from '../info/DialogIkkeValgt'; import InfoVedIngenDialoger from '../info/InfoVedIngenDialoger'; -import { Await, useLoaderData, useRouteLoaderData } from 'react-router'; +import { Await } from 'react-router'; import { Loader } from '@navikt/ds-react'; import { useRootLoaderData } from '../../routing/loaders'; diff --git a/src/view/dialog/NyDialogForm.tsx b/src/view/dialog/NyDialogForm.tsx index 6e7e1439..17c6907f 100644 --- a/src/view/dialog/NyDialogForm.tsx +++ b/src/view/dialog/NyDialogForm.tsx @@ -77,12 +77,16 @@ const NyDialogForm = (props: Props) => { const tema = watch('tema'); const timer = useRef(); - const callback = useRef<() => any>(); + const callback = useRef<() => void>(); useEffect(() => { return () => { - timer.current && clearInterval(timer.current); - timer.current && callback.current && callback.current(); + if (timer.current) { + clearInterval(timer.current); + if (callback.current) { + callback.current(); + } + } }; }, []); @@ -95,7 +99,7 @@ const NyDialogForm = (props: Props) => { tema: string | undefined; melding: string | undefined; }) => { - timer.current && clearInterval(timer.current); + if (timer.current) clearInterval(timer.current); callback.current = () => { timer.current = undefined; oppdaterKladd({ @@ -139,7 +143,7 @@ const NyDialogForm = (props: Props) => { const onSubmit = (data: NyDialogFormValues) => { const { tema, melding } = data; - timer.current && clearInterval(timer.current); + if (timer.current) clearInterval(timer.current); timer.current = undefined; loggEvent('arbeidsrettet-dialog.ny.dialog', { paaAktivitet: !!aktivitetId }); diff --git a/src/view/dialog/meldingInput/inputUtils.ts b/src/view/dialog/meldingInput/inputUtils.ts index 202e7c9a..d18633b1 100644 --- a/src/view/dialog/meldingInput/inputUtils.ts +++ b/src/view/dialog/meldingInput/inputUtils.ts @@ -19,10 +19,10 @@ export const betterErrorMessage = (error: FieldError, melding: string): FieldErr type KladdOppdateringData = KladdData & { fnr: string | undefined }; -export const debounced = ( +export const debounced = ( fn: (data: KladdOppdateringData) => void ): { hasPendingTask: () => boolean; cleanup: () => void; invoke: T } => { - let timer: number | undefined; + let timer: NodeJS.Timeout | undefined; const invoke = (data: KladdOppdateringData) => { clearTimeout(timer); timer = setTimeout(() => { @@ -45,7 +45,7 @@ export interface MeldingInputArgs { kladdErLagret: boolean; } export const MeldingInputContext = React.createContext({ - onSubmit: (e) => Promise.resolve(), + onSubmit: () => Promise.resolve(), noeFeilet: false, kladdErLagret: false }); @@ -55,8 +55,8 @@ export const useFocusBeforeHilsen = (textAreaRef: MutableRefObject { if (textAreaRef.current === null) return; - const setHasFocusTrue = (ev: FocusEvent) => (hasFocus.current = true); - const setHasFocusFalse = (ev: FocusEvent) => (hasFocus.current = false); + const setHasFocusTrue = () => (hasFocus.current = true); + const setHasFocusFalse = () => (hasFocus.current = false); textAreaRef.current?.addEventListener('blur', setHasFocusFalse); textAreaRef.current?.addEventListener('focus', setHasFocusTrue); }, [textAreaRef.current]); From b4fa79a88c6101be0dbd74f6503bd6efd73da1db Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:01:35 +0200 Subject: [PATCH 04/10] Fiks mer lint feil --- src/api/nyDialogWs.ts | 2 +- src/featureToggle/FeatureToggleProvider.ts | 6 +----- src/felleskomponenter/InvertedLesMer.tsx | 4 +++- src/felleskomponenter/logging.ts | 8 +++++--- src/test/integrationTestSetup.tsx | 12 +++++++----- src/view/DialogProvider.tsx | 6 +++--- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/api/nyDialogWs.ts b/src/api/nyDialogWs.ts index d6a653ad..b184bf13 100644 --- a/src/api/nyDialogWs.ts +++ b/src/api/nyDialogWs.ts @@ -43,7 +43,7 @@ const handleMessage = (callback: () => void, body: SubscriptionPayload) => (even const maxRetries = 10; let retries = 0; -const handleClose = (callback: () => void, body: SubscriptionPayload) => (event: CloseEvent) => { +const handleClose = (callback: () => void, body: SubscriptionPayload) => () => { if (retries >= maxRetries) return; retries++; setTimeout(() => { diff --git a/src/featureToggle/FeatureToggleProvider.ts b/src/featureToggle/FeatureToggleProvider.ts index 9206aae0..4b625dc4 100644 --- a/src/featureToggle/FeatureToggleProvider.ts +++ b/src/featureToggle/FeatureToggleProvider.ts @@ -1,5 +1,3 @@ -import React from 'react'; - import { Status } from '../api/typer'; import { AktivitetApi } from '../api/UseApiBasePath'; import { fetchData } from '../utils/Fetch'; @@ -7,9 +5,7 @@ import { FeatureToggle } from './const'; import { createGenericStore } from '../utils/genericStore'; import { useShallow } from 'zustand/react/shallow'; -const ALL_TOGGLES = [FeatureToggle.USE_WEBSOCKETS] as const; -export type Feature = (typeof ALL_TOGGLES)[number]; -export type Features = Record; +export type Features = Record; export interface FeatureData { data: Features; diff --git a/src/felleskomponenter/InvertedLesMer.tsx b/src/felleskomponenter/InvertedLesMer.tsx index 95fa2a6a..8eca6f64 100644 --- a/src/felleskomponenter/InvertedLesMer.tsx +++ b/src/felleskomponenter/InvertedLesMer.tsx @@ -27,7 +27,9 @@ export default function InvertedLestMer(props: Props) { return (
- + + {null} +
{vis ? children : null}
diff --git a/src/felleskomponenter/logging.ts b/src/felleskomponenter/logging.ts index 225bc10e..78783e1c 100644 --- a/src/felleskomponenter/logging.ts +++ b/src/felleskomponenter/logging.ts @@ -2,13 +2,15 @@ import { DialogApi } from '../api/UseApiBasePath'; import { logAmplitudeEvent } from '../metrics/amplitude-utils'; import { DialogData } from '../utils/Typer'; +type UnknownRecord = Record; + interface FrontendEvent { name: string; - fields?: {}; - tags?: {}; + fields?: UnknownRecord; + tags?: UnknownRecord; } const url = DialogApi.logg; -export default function loggEvent(eventNavn: string, feltObjekt?: object, tagObjekt?: object) { +export default function loggEvent(eventNavn: string, feltObjekt?: UnknownRecord, tagObjekt?: UnknownRecord) { const event: FrontendEvent = { name: eventNavn, fields: feltObjekt, tags: tagObjekt }; const config = { headers: { diff --git a/src/test/integrationTestSetup.tsx b/src/test/integrationTestSetup.tsx index b4ea6d90..6a548bc2 100644 --- a/src/test/integrationTestSetup.tsx +++ b/src/test/integrationTestSetup.tsx @@ -14,11 +14,13 @@ export const setupIntegrationTest = (fnr: string | undefined) => { }; export const fullRouterAndProvider = (fnr: string | undefined, initialEntries: string[] | undefined = undefined) => { - return () => ( - - - - ); + return function RouterAndProvider() { + return ( + + + + ); + }; }; const AllRoutesInMemory = ({ diff --git a/src/view/DialogProvider.tsx b/src/view/DialogProvider.tsx index d8b2020c..6c50f665 100644 --- a/src/view/DialogProvider.tsx +++ b/src/view/DialogProvider.tsx @@ -10,9 +10,9 @@ export const DialogContext = React.createContext({ status: Status.INITIAL, nyDialog: () => Promise.resolve({} as DialogData), nyMelding: ({ dialog }: NyMeldingArgs) => Promise.resolve(dialog), - lesDialog: (_dialogId: string) => Promise.resolve({} as DialogData), - setFerdigBehandlet: (dialog: DialogData, _ferdigBehandlet: boolean) => Promise.resolve(dialog), - setVenterPaSvar: (dialog: DialogData, _venterPaSvar: boolean) => Promise.resolve(dialog) + lesDialog: () => Promise.resolve({} as DialogData), + setFerdigBehandlet: (dialog: DialogData) => Promise.resolve(dialog), + setVenterPaSvar: (dialog: DialogData) => Promise.resolve(dialog) }); export const useDialogContext = () => useContext(DialogContext); From 162bb86f5e455031173d23967aca7e76a4794494 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:12:27 +0200 Subject: [PATCH 05/10] Fikse enda mer lint --- src/mock/Dialog.ts | 2 +- src/mock/demo/DemoDashboard.tsx | 4 ++-- src/mock/demo/localstorage.ts | 2 +- src/mock/handlers.ts | 2 +- src/test/setup.tsx | 13 +++++++++++-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/mock/Dialog.ts b/src/mock/Dialog.ts index f7ac1d9c..66252279 100644 --- a/src/mock/Dialog.ts +++ b/src/mock/Dialog.ts @@ -639,7 +639,7 @@ const dialoger: DialogData[] = [ export const lesDialog: HttpResponseResolver<{ dialogId: string }, never, DialogData> = ({ params }) => { const dialogId = params.dialogId; - const dialog: any = dialoger.find((dlg) => dlg.id === dialogId); + const dialog = dialoger.find((dlg) => dlg.id === dialogId); if (dialog) { dialog.lest = true; return HttpResponse.json(dialog); diff --git a/src/mock/demo/DemoDashboard.tsx b/src/mock/demo/DemoDashboard.tsx index 54f14064..d6fddd5c 100644 --- a/src/mock/demo/DemoDashboard.tsx +++ b/src/mock/demo/DemoDashboard.tsx @@ -98,7 +98,7 @@ const DemoDashboard = (props: Props) => { const [failureRange, setFailureRange] = useState(getFailureRate()); const endreFeilureRate = (value: number) => { - settLocalStorage(LocalStorageElement.FAILURE_RATE, value); + settLocalStorage(LocalStorageElement.FAILURE_RATE, value.toString()); window.location.reload(); }; @@ -106,7 +106,7 @@ const DemoDashboard = (props: Props) => { const checkbox = e.currentTarget; const saveInSessionStorage = Object.values(LocalStorageElement).indexOf(checkbox.id) > -1; if (saveInSessionStorage) { - settLocalStorage(checkbox.id, checkbox.checked); + settLocalStorage(checkbox.id, checkbox.checked.toString()); window.location.reload(); } }; diff --git a/src/mock/demo/localstorage.ts b/src/mock/demo/localstorage.ts index da67c04e..df4faf13 100644 --- a/src/mock/demo/localstorage.ts +++ b/src/mock/demo/localstorage.ts @@ -18,7 +18,7 @@ export const BRUKER_TYPE = { EKSTERN: 'ekstern' }; -export const settLocalStorage = (key: string, value: any) => { +export const settLocalStorage = (key: string, value: string) => { window.localStorage.setItem(key, value); }; diff --git a/src/mock/handlers.ts b/src/mock/handlers.ts index 4e7c9860..1c12fed1 100644 --- a/src/mock/handlers.ts +++ b/src/mock/handlers.ts @@ -32,7 +32,7 @@ export const jsonResponse = ( const failOrGetResponse = ( shouldFail: () => boolean, - successFn: (req: StrictRequest) => Promise>, + successFn: (req: StrictRequest) => Promise>, delayMs = 0 ): HttpResponseResolver => { return async ({ request }) => { diff --git a/src/test/setup.tsx b/src/test/setup.tsx index ff4640fe..8167e4d2 100644 --- a/src/test/setup.tsx +++ b/src/test/setup.tsx @@ -6,5 +6,14 @@ vi.mock('../felleskomponenter/logging', () => ({ loggChangeInDialog: vi.fn() })); Element.prototype.scrollTo = () => {}; -// @ts-ignore -window.matchMedia = (): boolean => true; + +window.matchMedia = (): MediaQueryList => ({ + matches: false, + addListener: () => {}, + removeListener: () => {}, + addEventListener: () => {}, + removeEventListener: () => {}, + dispatchEvent: () => false, + onchange: null, + media: '' +}); From 3c05442e12233edd0d8db06a46dd8c04c381fda6 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:32:09 +0200 Subject: [PATCH 06/10] Fint resten av lint errors --- src/mock/handlers.ts | 2 +- src/routing/routes.tsx | 2 +- src/utils/genericStore.ts | 2 +- .../DialogMedAktivitetHeader.test.tsx | 20 +++++++++---------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mock/handlers.ts b/src/mock/handlers.ts index 1c12fed1..17ffe21a 100644 --- a/src/mock/handlers.ts +++ b/src/mock/handlers.ts @@ -99,7 +99,7 @@ export const handlers = [ '/veilarbdialog/graphql', failOrGetResponse( harDialogFeilerSkruddPa, - async (request) => { + async () => { const dialogerPayload = ingenOppfPerioder() ? [] : dialoger(); return { data: { dialoger: dialogerPayload, kladder: [] }, errors: [] }; }, diff --git a/src/routing/routes.tsx b/src/routing/routes.tsx index 40b001cc..53554f51 100644 --- a/src/routing/routes.tsx +++ b/src/routing/routes.tsx @@ -36,7 +36,7 @@ const RedirectToDialogWithoutFnr = () => { }; const RedirectToNyDialogWithoutFnr = () => { // Handle route /:fnr/ny?aktivitetId= -> /ny?aktivitetId= - const [queryParams, _] = useSearchParams(); + const [queryParams] = useSearchParams(); const aktivitetId = queryParams.get('aktivitetId'); const queryPart = aktivitetId ? '?aktivitetId=' + aktivitetId : ''; return ; diff --git a/src/utils/genericStore.ts b/src/utils/genericStore.ts index 01109d66..49c071d6 100644 --- a/src/utils/genericStore.ts +++ b/src/utils/genericStore.ts @@ -32,7 +32,7 @@ export const createGenericStore = { it('skal returnere korrekt tekst for stillingsaktivitet', () => { - const aktivitet: any = { + const aktivitet = { type: AktivitetTypes.STILLING, tilDato: '2019-10-24T15:44:21.993+02:00', arbeidsgiver: 'Testesen' - }; + } as Aktivitet; const text = getInfoText(aktivitet); expect(text).toEqual('Testesen'); }); it('skal returnere korrekt tekst for møteaktivitet', () => { - const aktivitet: any = { + const aktivitet = { type: AktivitetTypes.MOTE, fraDato: '2019-10-24T15:44:21.993+02:00' - }; + } as Aktivitet; const text = getInfoText(aktivitet); expect(text).toEqual('24.10.2019 / 15:44'); }); it('skal returnere korrekt tekst for søkeavtale', () => { - const aktivitet: any = { + const aktivitet = { type: AktivitetTypes.SOKEAVTALE, tilDato: '2019-10-25T15:44:21.993+02:00', fraDato: '2019-10-24T15:44:21.993+02:00' - }; + } as Aktivitet; const text = getInfoText(aktivitet); expect(text).toEqual('24.10.2019 - 25.10.2019'); }); it('skal returnere korrekt tekst for medisinsk behandling', () => { - const aktivitet: any = { + const aktivitet = { type: AktivitetTypes.BEHANDLING, behandlingType: 'Kiropraktor' - }; + } as Aktivitet; const text = getInfoText(aktivitet); expect(text).toEqual('Kiropraktor'); }); it('skal returnere korrekt tekst for møteaktivitet', () => { - const aktivitet: any = { + const aktivitet = { type: AktivitetTypes.SAMTALEREFERAT, fraDato: '2019-10-24T15:44:21.993+02:00' - }; + } as Aktivitet; const text = getInfoText(aktivitet); expect(text).toEqual('24.10.2019'); From 8215089f01646780ca06126514905173e0eeeca0 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:32:39 +0200 Subject: [PATCH 07/10] Ignorer args med navn _ --- eslint.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index af8899a7..4fe6cb24 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,5 +9,10 @@ export default [ pluginJs.configs.recommended, ...tseslint.configs.recommended, pluginReact.configs.flat.recommended, - { ignores: ['src/fellesikoner/', 'src/**/**.test.*'] } + { + // ignores: ['src/fellesikoner/', 'src/**/**.test.*'], + rules: { + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }] + } + } ]; From e3ab3724e96d4e3cd4ea123ce7d90432abff3248 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:44:36 +0200 Subject: [PATCH 08/10] Bump jsdom --- package-lock.json | 224 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 136 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9db1aa83..6349e51e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "date-fns": "^3.6.0", "less": "^4.2.0", "msw-storybook-addon": "^2.0.2", + "punycode": "^2.3.1", "query-string": "^9.0.0", "react": "^18.3.1", "react-collapse": "^5.1.1", @@ -72,7 +73,7 @@ "graphql": "^16.9.0", "husky": "^9.0.11", "import-sort-style-module": "^6.0.0", - "jsdom": "^24.0.0", + "jsdom": "^25.0.0", "lint-staged": "^15.2.2", "msw": "^2.3.5", "postcss": "^8.4.33", @@ -2917,15 +2918,15 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.29.1.tgz", - "integrity": "sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.35.0.tgz", + "integrity": "sha512-f5cHyIvm4m4g1I5x9EH1etGx0puaU0OaX2szqGRVBVgUC6aMASlOI5hbpe7tJ9l4/VWjCUu5OMraCazLZGI24A==", "dependencies": { "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", "is-node-process": "^1.2.0", - "outvariant": "^1.2.1", + "outvariant": "^1.4.3", "strict-event-emitter": "^0.5.1" }, "engines": { @@ -7848,9 +7849,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { "debug": "^4.3.4" @@ -8357,9 +8358,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -8370,7 +8371,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -8395,21 +8396,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -10831,37 +10817,37 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", + "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -10890,6 +10876,15 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -11769,7 +11764,6 @@ "version": "16.9.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -12085,9 +12079,9 @@ } }, "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -12098,9 +12092,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -13228,9 +13222,9 @@ } }, "node_modules/jsdom": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", - "integrity": "sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.0.tgz", + "integrity": "sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ==", "dev": true, "dependencies": { "cssstyle": "^4.0.1", @@ -13238,21 +13232,21 @@ "decimal.js": "^10.4.3", "form-data": "^4.0.0", "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", + "nwsapi": "^2.2.12", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.3", + "tough-cookie": "^4.1.4", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.16.0", + "ws": "^8.18.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -13291,6 +13285,12 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/jsdom/node_modules/rrweb-cssom": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", + "dev": true + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -14216,10 +14216,13 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -14950,20 +14953,21 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msw": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.4.0.tgz", - "integrity": "sha512-NqAjbDvJ66J/VS9KqLmY8ZF6ceQpYRy+s2yJYLl+3vUdNa4C7zouXVDl1TLast/o9gLzPMTrfaTJkeR7qJ41ew==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.4.4.tgz", + "integrity": "sha512-iuM0qGs4YmgYCLH+xqb07w2e/e4fYmsx3+WHVlIOUA34TW1sw+wRpNmOlXnLDkw/T7233Jnm6t+aNf4v2E3e2Q==", "hasInstallScript": true, "dependencies": { "@bundled-es-modules/cookie": "^2.0.0", "@bundled-es-modules/statuses": "^1.0.1", "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^3.0.0", - "@mswjs/interceptors": "^0.29.0", + "@mswjs/interceptors": "^0.35.0", "@open-draft/until": "^2.1.0", "@types/cookie": "^0.6.0", "@types/statuses": "^2.0.4", "chalk": "^4.1.2", + "graphql": "^16.8.1", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", "outvariant": "^1.4.2", @@ -14982,21 +14986,18 @@ "url": "https://github.com/sponsors/mswjs" }, "peerDependencies": { - "typescript": ">= 4.7.x" + "typescript": ">= 4.8.x" }, "peerDependenciesMeta": { - "graphql": { - "optional": true - }, "typescript": { "optional": true } } }, "node_modules/msw-storybook-addon": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/msw-storybook-addon/-/msw-storybook-addon-2.0.2.tgz", - "integrity": "sha512-sdw++X+AoUbaG2ku493ViVqCA/LfqnybXsKXyPUrF3ZS/x8BqGBnkBLmT/0SHCC5zIO3Vfm5zlclAxnhqOOikQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/msw-storybook-addon/-/msw-storybook-addon-2.0.3.tgz", + "integrity": "sha512-CzHmGO32JeOPnyUnRWnB0PFTXCY1HKfHiEB/6fYoUYiFm2NYosLjzs9aBd3XJUryYEN0avJqMNh7nCRDxE5JjQ==", "dependencies": { "is-node-process": "^1.0.1" }, @@ -15005,9 +15006,9 @@ } }, "node_modules/msw/node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==" }, "node_modules/mute-stream": { "version": "1.0.0", @@ -15256,9 +15257,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.12", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz", + "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==", "dev": true }, "node_modules/nypm": { @@ -15552,9 +15553,9 @@ } }, "node_modules/outvariant": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.2.tgz", - "integrity": "sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ==" + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==" }, "node_modules/p-locate": { "version": "5.0.0", @@ -15777,9 +15778,9 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", "dev": true }, "node_modules/path-type": { @@ -16415,12 +16416,12 @@ } }, "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -17370,9 +17371,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, "dependencies": { "debug": "2.6.9", @@ -17415,9 +17416,9 @@ "dev": true }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", + "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", "dev": true, "dependencies": { "encodeurl": "~1.0.2", @@ -17429,6 +17430,51 @@ "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-static/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/serve-static/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/serve-static/node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", diff --git a/package.json b/package.json index 5d0f6970..cb1f99b8 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "graphql": "^16.9.0", "husky": "^9.0.11", "import-sort-style-module": "^6.0.0", - "jsdom": "^24.0.0", + "jsdom": "^25.0.0", "lint-staged": "^15.2.2", "msw": "^2.3.5", "postcss": "^8.4.33", From c1e3615ffb121b82bec5056ece2cd659170d04cb Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 09:44:46 +0200 Subject: [PATCH 09/10] Fjern console.log --- src/view/aktivitet/DialogMedAktivitetHeader.tsx | 1 - src/view/dialog/meldingInput/MeldingBottomInput.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/view/aktivitet/DialogMedAktivitetHeader.tsx b/src/view/aktivitet/DialogMedAktivitetHeader.tsx index 48c0d4b2..e7bbdf10 100644 --- a/src/view/aktivitet/DialogMedAktivitetHeader.tsx +++ b/src/view/aktivitet/DialogMedAktivitetHeader.tsx @@ -18,7 +18,6 @@ export function DialogMedAktivitetHeader() { const erVeileder = useErVeileder(); if (!aktivitet) { - console.log({ aktivitet }); return null; } diff --git a/src/view/dialog/meldingInput/MeldingBottomInput.tsx b/src/view/dialog/meldingInput/MeldingBottomInput.tsx index e51342ce..f3e865c5 100644 --- a/src/view/dialog/meldingInput/MeldingBottomInput.tsx +++ b/src/view/dialog/meldingInput/MeldingBottomInput.tsx @@ -76,7 +76,6 @@ export const MeldingBottomInput = () => { const oppfolging = dataOrUndefined(oppfolgingContext); const dialog = useSelectedDialog(); if (!dialog) { - console.log('Invisble'); return null; } return ( From f3452f95360c66adf4278bd7b5016107b62903db Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 10 Sep 2024 10:11:45 +0200 Subject: [PATCH 10/10] Fjern logging som ikke funker, fix typer --- src/mock/handlers.ts | 4 +- src/view/AppBody.tsx | 69 +--------------------- src/view/dialog/meldingInput/inputUtils.ts | 7 ++- 3 files changed, 8 insertions(+), 72 deletions(-) diff --git a/src/mock/handlers.ts b/src/mock/handlers.ts index 17ffe21a..70d5c3b2 100644 --- a/src/mock/handlers.ts +++ b/src/mock/handlers.ts @@ -30,9 +30,9 @@ export const jsonResponse = ( }; }; -const failOrGetResponse = ( +const failOrGetResponse = ( shouldFail: () => boolean, - successFn: (req: StrictRequest) => Promise>, + successFn: (req: StrictRequest) => Promise, delayMs = 0 ): HttpResponseResolver => { return async ({ request }) => { diff --git a/src/view/AppBody.tsx b/src/view/AppBody.tsx index edbe78e1..ee48e679 100644 --- a/src/view/AppBody.tsx +++ b/src/view/AppBody.tsx @@ -1,52 +1,19 @@ -import React, { ReactElement, Suspense, useEffect, useMemo } from 'react'; -import { Await, Outlet, useMatches } from 'react-router'; -import { v4 as uuidv4 } from 'uuid'; +import React from 'react'; +import { Outlet, useMatches } from 'react-router'; -import loggEvent from '../felleskomponenter/logging'; -import { Bruker, OppfolgingData } from '../utils/Typer'; -import { useUserInfoContext } from './BrukerProvider'; import DialogOversikt from './dialogliste/DialogOversikt'; import { EventHandler } from './EventHandler'; -import { useOppfolgingContext } from './OppfolgingProvider'; -import { dataOrUndefined } from './Provider'; -import { useRootLoaderData } from '../routing/loaders'; import { RouteIds } from '../routing/routes'; import classNames from 'classnames'; import StatusAdvarsel from './statusAdvarsel/StatusAdvarsel'; import DialogHeaderFeil from './dialog/DialogHeaderFeil'; -function hash(val: string) { - const utf8 = new TextEncoder().encode(val); - return crypto.subtle.digest('SHA-256', utf8).then((hashBuffer) => { - const hashArray = Array.from(new Uint8Array(hashBuffer)); - const hashHex = hashArray.map((bytes) => bytes.toString(16).padStart(2, '0')).join(''); - return hashHex; - }); -} - -const useLogBruker = (brukerdata: Bruker | null, oppfolgingData?: OppfolgingData) => { - const underOppfolging = !!oppfolgingData?.underOppfolging; - const erBruker = !!brukerdata?.erBruker; - const aktorId = oppfolgingData?.aktorId; - - useEffect(() => { - const unik = underOppfolging && aktorId ? hash(aktorId) : 'ikke-' + uuidv4(); - loggEvent('arbeidsrettet-dialog.besok', { erBruker, underOppfolging, unik }); - }, []); -}; - const AppBody = () => { - const oppfolgingContext = useOppfolgingContext(); - const brukerdata = useUserInfoContext(); - const oppfolgingData = dataOrUndefined(oppfolgingContext); - - useLogBruker(brukerdata, oppfolgingData); const erDialogRoute = useMatches().some((match) => match.id === RouteIds.Dialog); return ( <> -
{ ); }; -const WaitForAllData = (): ReactElement => { - const loaderData = useRootLoaderData(); - const requiredData = useMemo( - () => - Promise.all([ - loaderData.dialoger, - loaderData.veilederNavn, - loaderData.oppfolging, - loaderData.features, - loaderData.me, - loaderData.aktiviteter, - loaderData.arenaAktiviteter - ]), - [] - ); - return ( - - - - - - ); -}; - -const LogVisit = () => { - const oppfolgingState = useOppfolgingContext(); - const brukerdata = useUserInfoContext(); - const oppfolgingData = dataOrUndefined(oppfolgingState); - useLogBruker(brukerdata, oppfolgingData); - return null; -}; - export default AppBody; diff --git a/src/view/dialog/meldingInput/inputUtils.ts b/src/view/dialog/meldingInput/inputUtils.ts index d18633b1..7439a995 100644 --- a/src/view/dialog/meldingInput/inputUtils.ts +++ b/src/view/dialog/meldingInput/inputUtils.ts @@ -19,9 +19,10 @@ export const betterErrorMessage = (error: FieldError, melding: string): FieldErr type KladdOppdateringData = KladdData & { fnr: string | undefined }; +type OppdaterKladd = (data: KladdOppdateringData) => void; export const debounced = ( - fn: (data: KladdOppdateringData) => void -): { hasPendingTask: () => boolean; cleanup: () => void; invoke: T } => { + fn: OppdaterKladd +): { hasPendingTask: () => boolean; cleanup: () => void; invoke: OppdaterKladd } => { let timer: NodeJS.Timeout | undefined; const invoke = (data: KladdOppdateringData) => { clearTimeout(timer); @@ -36,7 +37,7 @@ export const debounced = ( const hasPendingTask = () => { return timer !== undefined; }; - return { cleanup, invoke: invoke as unknown as T, hasPendingTask }; + return { cleanup, invoke: invoke, hasPendingTask }; }; export interface MeldingInputArgs {