diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..08ee2536 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +node_modules/ +build/ +.prettierrc.js +.eslintrc.js +vite.config.ts \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..bf21420e --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,36 @@ +module.exports = { + extends: [ + // By extending from a plugin config, we can get recommended rules without having to add them manually. + 'eslint:recommended', + 'plugin:react/recommended', + 'plugin:import/recommended', + // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. + // Make sure it's always the last config, so it gets the chance to override other configs. + 'eslint-config-prettier', + ], + settings: { + react: { + // Tells eslint-plugin-react to automatically detect the version of React to use. + version: 'detect', + }, + // Tells eslint how to resolve imports + 'import/resolver': { + node: { + paths: ['src'], + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + }, + }, + parserOptions: { + ecmaVersion: 2020 + }, + env: { + browser: true, + node: true, + es6: true, + }, + rules: { + // Add your own rules here to override ones from the extended configs. + 'react/prop-types': 0, + }, + }; \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..08ee2536 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +node_modules/ +build/ +.prettierrc.js +.eslintrc.js +vite.config.ts \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000..51bd6e1d --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,8 @@ +module.exports = { + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "printWidth": 100, + "bracketSpacing": true +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 94e18f96..fa9007c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,10 @@ "bson": "^4.2.3", "connected-react-router": "^6.9.1", "env-cmd": "^10.1.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-react": "^7.33.2", "formik": "^2.2.6", "graphql": "^15.3.0", "graphql-request": "^4.2.0", @@ -51,6 +55,7 @@ "moment-timezone": "^0.5.34", "mongodb-query-parser": "^2.4.3", "npm-force-resolutions": "^0.0.10", + "prettier": "^3.2.5", "react": "^16.13.1", "react-dates": "^21.8.0", "react-dom": "^16.13.1", @@ -84,8 +89,6 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -223,6 +226,155 @@ "zen-observable-ts": "0.8.19" } }, + "node_modules/@aws-amplify/core/node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "peer": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@aws-amplify/core/node_modules/@react-native/virtualized-lists": { + "version": "0.73.4", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.73.4.tgz", + "integrity": "sha512-HpmLg1FrEiDtrtAbXiwCgXFYyloK/dOIPIuWW3fsqukwJEWAiTzm1nXGJ7xPU5XTHiWZ4sKup5Ebaj8z7iyWog==", + "peer": true, + "dependencies": { + "invariant": "^2.2.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react-native": "*" + } + }, + "node_modules/@aws-amplify/core/node_modules/@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", + "peer": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@aws-amplify/core/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@aws-amplify/core/node_modules/memoize-one": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", + "peer": true + }, + "node_modules/@aws-amplify/core/node_modules/pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "peer": true, + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@aws-amplify/core/node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@aws-amplify/core/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "peer": true + }, + "node_modules/@aws-amplify/core/node_modules/react-native": { + "version": "0.73.4", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.73.4.tgz", + "integrity": "sha512-VtS+Yr6OOTIuJGDECIYWzNU8QpJjASQYvMtfa/Hvm/2/h5GdB6W9H9TOmh13x07Lj4AOhNMx3XSsz6TdrO4jIg==", + "peer": true, + "dependencies": { + "@jest/create-cache-key-function": "^29.6.3", + "@react-native-community/cli": "12.3.2", + "@react-native-community/cli-platform-android": "12.3.2", + "@react-native-community/cli-platform-ios": "12.3.2", + "@react-native/assets-registry": "0.73.1", + "@react-native/codegen": "0.73.3", + "@react-native/community-cli-plugin": "0.73.16", + "@react-native/gradle-plugin": "0.73.4", + "@react-native/js-polyfills": "0.73.1", + "@react-native/normalize-colors": "0.73.2", + "@react-native/virtualized-lists": "0.73.4", + "abort-controller": "^3.0.0", + "anser": "^1.4.9", + "ansi-regex": "^5.0.0", + "base64-js": "^1.5.1", + "chalk": "^4.0.0", + "deprecated-react-native-prop-types": "^5.0.0", + "event-target-shim": "^5.0.1", + "flow-enums-runtime": "^0.0.6", + "invariant": "^2.2.4", + "jest-environment-node": "^29.6.3", + "jsc-android": "^250231.0.0", + "memoize-one": "^5.0.0", + "metro-runtime": "^0.80.3", + "metro-source-map": "^0.80.3", + "mkdirp": "^0.5.1", + "nullthrows": "^1.1.1", + "pretty-format": "^26.5.2", + "promise": "^8.3.0", + "react-devtools-core": "^4.27.7", + "react-refresh": "^0.14.0", + "react-shallow-renderer": "^16.15.0", + "regenerator-runtime": "^0.13.2", + "scheduler": "0.24.0-canary-efb381bbf-20230505", + "stacktrace-parser": "^0.1.10", + "whatwg-fetch": "^3.0.0", + "ws": "^6.2.2", + "yargs": "^17.6.2" + }, + "bin": { + "react-native": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "18.2.0" + } + }, "node_modules/@aws-amplify/core/node_modules/react-native-url-polyfill": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz", @@ -234,11 +386,79 @@ "react-native": "*" } }, + "node_modules/@aws-amplify/core/node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "peer": true + }, + "node_modules/@aws-amplify/core/node_modules/scheduler": { + "version": "0.24.0-canary-efb381bbf-20230505", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz", + "integrity": "sha512-ABvovCDe/k9IluqSh4/ISoq8tIJnW8euVAWYt5j/bg6dRnqwQwiGO1F/V4AyK96NGF/FB04FhOUDuWj8IKfABA==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/@aws-amplify/core/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/@aws-amplify/core/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@aws-amplify/core/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@aws-amplify/core/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "peer": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@aws-amplify/core/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "peer": true, + "engines": { + "node": ">=12" + } + }, "node_modules/@aws-amplify/datastore": { "version": "4.7.9", "resolved": "https://registry.npmjs.org/@aws-amplify/datastore/-/datastore-4.7.9.tgz", @@ -8773,8 +8993,6 @@ "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, - "peer": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -8789,8 +9007,6 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, - "peer": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -8799,8 +9015,6 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -8823,8 +9037,6 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "peer": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -8839,8 +9051,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -8852,8 +9062,6 @@ "version": "8.56.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", - "dev": true, - "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -8968,8 +9176,6 @@ "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "peer": true, "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", "debug": "^4.3.1", @@ -8983,8 +9189,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "peer": true, "engines": { "node": ">=12.22" }, @@ -8996,9 +9200,7 @@ "node_modules/@humanwhocodes/object-schema": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true, - "peer": true + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -9233,8 +9435,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "peer": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -9247,8 +9447,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "peer": true, "engines": { "node": ">= 8" } @@ -9257,8 +9455,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "peer": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -15824,6 +16020,11 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -16015,9 +16216,7 @@ "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "peer": true + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/@vitejs/plugin-react": { "version": "4.2.1", @@ -16105,8 +16304,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -16137,8 +16334,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -16280,8 +16475,7 @@ "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 + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/aria-hidden": { "version": "1.2.3", @@ -16317,29 +16511,34 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.find": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.2.2.tgz", - "integrity": "sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg==", + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "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==", + "node_modules/array.prototype.filter": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", + "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" }, "engines": { "node": ">= 0.4" @@ -16348,12 +16547,90 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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==", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", + "node_modules/array.prototype.find": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.2.2.tgz", + "integrity": "sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", + "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.3.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==", + "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==", + "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.3", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", + "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.1.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "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==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", "define-properties": "^1.2.1", "es-abstract": "^1.22.3", @@ -16402,6 +16679,14 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "peer": true }, + "node_modules/asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dependencies": { + "has-symbols": "^1.0.3" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -16614,7 +16899,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -17304,8 +17588,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "peer": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/connect": { "version": "3.7.0", @@ -17750,9 +18033,7 @@ "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, - "peer": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { "version": "4.2.2", @@ -17917,8 +18198,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "peer": true, "dependencies": { "esutils": "^2.0.2" }, @@ -18156,6 +18435,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -18199,6 +18483,31 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "node_modules/es-iterator-helpers": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", + "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", + "dependencies": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.4", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", @@ -18367,8 +18676,6 @@ "version": "8.56.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", - "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -18419,6 +18726,137 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.4", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.8" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, "node_modules/eslint-plugin-react-refresh": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", @@ -18428,12 +18866,37 @@ "eslint": ">=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==", + "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==", + "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-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -18449,8 +18912,6 @@ "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, - "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -18462,8 +18923,6 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "peer": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -18478,8 +18937,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -18504,8 +18961,6 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "peer": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -18535,8 +18990,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "peer": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -18548,8 +19001,6 @@ "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, - "peer": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -18561,8 +19012,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true, "engines": { "node": ">=4.0" } @@ -18577,7 +19026,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -18720,23 +19168,17 @@ "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, - "peer": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "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, - "peer": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "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, - "peer": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fast-xml-parser": { "version": "4.3.4", @@ -18763,8 +19205,6 @@ "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "peer": true, "dependencies": { "reusify": "^1.0.4" } @@ -18820,8 +19260,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "peer": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -18984,7 +19422,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "peer": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -19000,8 +19437,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "peer": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -19014,9 +19449,7 @@ "node_modules/flatted": { "version": "3.2.9", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true, - "peer": true + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "node_modules/flow-enums-runtime": { "version": "0.0.6", @@ -19162,8 +19595,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "peer": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fs2": { "version": "0.3.9", @@ -19302,7 +19734,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -19322,8 +19753,6 @@ "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, - "peer": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -19409,9 +19838,7 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "peer": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/graphql": { "version": "15.8.0", @@ -19687,7 +20114,6 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, "engines": { "node": ">= 4" } @@ -19757,7 +20183,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "peer": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -19875,6 +20300,20 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "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==", + "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", @@ -19964,12 +20403,21 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "peer": true, "engines": { "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==", + "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", @@ -19978,12 +20426,24 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "peer": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -20056,8 +20516,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -20260,6 +20718,18 @@ "unfetch": "^4.2.0" } }, + "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==", + "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": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", @@ -20777,7 +21247,6 @@ "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" }, @@ -20855,8 +21324,7 @@ "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 + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, "node_modules/json-format": { "version": "1.0.1", @@ -20877,16 +21345,12 @@ "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, - "peer": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "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, - "peer": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "node_modules/json5": { "version": "2.2.3", @@ -20915,6 +21379,20 @@ "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==", + "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/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -20925,7 +21403,6 @@ "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" } @@ -20961,8 +21438,6 @@ "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, - "peer": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -21005,7 +21480,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "peer": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -21040,9 +21514,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "peer": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.throttle": { "version": "4.1.1", @@ -21878,7 +22350,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -21890,7 +22361,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -21993,9 +22463,7 @@ "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, - "peer": true + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/ncjsm": { "version": "4.3.2", @@ -22243,6 +22711,46 @@ "node": ">= 0.4" } }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", + "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", + "dependencies": { + "array.prototype.filter": "^1.0.3", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.0.0" + } + }, + "node_modules/object.hasown": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", + "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", + "dependencies": { + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object.values": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", @@ -22323,8 +22831,6 @@ "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "peer": true, "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -22405,7 +22911,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -22420,7 +22925,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "peer": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -22532,7 +23036,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -22786,12 +23289,24 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", @@ -22950,7 +23465,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -22964,8 +23478,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "peer": true + ] }, "node_modules/quick-lru": { "version": "4.0.1", @@ -23572,6 +24085,26 @@ "lodash": "^4.16.3" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", + "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.0.0", + "get-intrinsic": "^1.2.3", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/reflect.ownkeys": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", @@ -23751,8 +24284,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "peer": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -23762,7 +24293,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "peer": true, "dependencies": { "glob": "^7.1.3" }, @@ -23802,7 +24332,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -23817,7 +24346,6 @@ "url": "https://feross.org/support" } ], - "peer": true, "dependencies": { "queue-microtask": "^1.2.2" } @@ -24447,6 +24975,25 @@ "node": ">=8" } }, + "node_modules/string.prototype.matchall": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", + "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "regexp.prototype.flags": "^1.5.0", + "set-function-name": "^2.0.0", + "side-channel": "^1.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", @@ -24512,6 +25059,14 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "engines": { + "node": ">=4" + } + }, "node_modules/strip-dirs": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", @@ -24545,8 +25100,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "peer": true, "engines": { "node": ">=8" }, @@ -24827,9 +25380,7 @@ "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, - "peer": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/throat": { "version": "5.0.0", @@ -25009,6 +25560,28 @@ "node": ">=0.8.0" } }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", @@ -25024,8 +25597,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "peer": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -25305,8 +25876,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "peer": true, "dependencies": { "punycode": "^2.1.0" } @@ -25659,6 +26228,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "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.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/which-collection": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", @@ -25891,7 +26490,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "peer": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index a49481f1..608f397f 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,10 @@ "bson": "^4.2.3", "connected-react-router": "^6.9.1", "env-cmd": "^10.1.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-react": "^7.33.2", "formik": "^2.2.6", "graphql": "^15.3.0", "graphql-request": "^4.2.0", @@ -45,6 +49,7 @@ "moment-timezone": "^0.5.34", "mongodb-query-parser": "^2.4.3", "npm-force-resolutions": "^0.0.10", + "prettier": "^3.2.5", "react": "^16.13.1", "react-dates": "^21.8.0", "react-dom": "^16.13.1", @@ -71,6 +76,7 @@ "build": "vite build", "build:staging": "env-cmd -f .env.staging npm run build", "serve": "vite preview", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "deploy-dev": "npm run build:staging && sls client deploy --no-confirm --stage dev", "deploy-prod": "npm run build && sls client deploy --no-confirm --stage prod" }, diff --git a/src/api/buildQuery.js b/src/api/buildQuery.js index 243f35fe..dfaf560f 100644 --- a/src/api/buildQuery.js +++ b/src/api/buildQuery.js @@ -73,6 +73,7 @@ const pageInfoFields = ` const batchFields = ` _id projectId + created uploadComplete ingestionComplete processingStart @@ -169,10 +170,9 @@ const projectFields = ` ${projectLabelFields} } availableMLModels -` +`; const queries = { - getProjects: (input) => ({ template: ` query GetProjects($input: QueryProjectsInput) { @@ -181,7 +181,7 @@ const queries = { } } `, - variables: { input: input } + variables: { input: input }, }), createProject: (input) => ({ @@ -194,10 +194,10 @@ const queries = { } } `, - variables: { input: input } + variables: { input: input }, }), - getViews: (input) => ({ + getViews: () => ({ template: ` { views { @@ -217,9 +217,9 @@ const queries = { } `, variables: { - input: { imageId } - } - } + input: { imageId }, + }, + }; }, deleteImages: (input) => { @@ -232,9 +232,9 @@ const queries = { } `, variables: { - input - } - } + input, + }, + }; }, getImages: ({ filters, pageInfo, page }) => ({ @@ -258,7 +258,7 @@ const queries = { sortAscending: pageInfo.sortAscending, limit: pageInfo.limit, filters, - } + }, }, }), @@ -283,7 +283,7 @@ const queries = { }), getModels: (input) => ({ - template: ` + template: ` query GetMLModels($input: QueryMLModelsInput) { mlModels(input: $input) { _id @@ -297,7 +297,7 @@ const queries = { } } `, - variables: { input: input } + variables: { input: input }, }), getStats: ({ filters }) => ({ @@ -319,7 +319,7 @@ const queries = { } `, variables: { - input: { filters } + input: { filters }, }, }), @@ -333,7 +333,7 @@ const queries = { } `, variables: { - input: { format, filters } + input: { format, filters }, }, }), @@ -346,7 +346,7 @@ const queries = { } `, variables: { - input: { filters } + input: { filters }, }, }), @@ -365,7 +365,7 @@ const queries = { } `, variables: { - input: { documentId } + input: { documentId }, }, }), @@ -646,7 +646,7 @@ const queries = { } } `, - variables: { input } + variables: { input }, }), closeUpload: (input) => ({ @@ -657,7 +657,7 @@ const queries = { } } `, - variables: { input } + variables: { input }, }), updateBatch: (input) => ({ @@ -670,7 +670,7 @@ const queries = { } } `, - variables: { input } + variables: { input }, }), getBatches: ({ filter, pageInfo, page }) => ({ @@ -689,19 +689,21 @@ const queries = { } } `, - variables: { input: { - ...(page === 'next' && { next: pageInfo.next }), - ...(page === 'previous' && { previous: pageInfo.previous }), - filter: filter, - paginatedField: 'uploadComplete', - // TODO: sortAscending should be false to show in order of newest -> oldest, - // but for newly created batches, batch.processingStart is not yet set and - // gets put at the bottom of the returned array b/c of that. Figure out how - // to return the batches in reverse chronological order but surface newly - // created batches at the top - sortAscending: false, - limit: 5, - } } + variables: { + input: { + ...(page === 'next' && { next: pageInfo.next }), + ...(page === 'previous' && { previous: pageInfo.previous }), + filter: filter, + paginatedField: 'uploadComplete', + // TODO: sortAscending should be false to show in order of newest -> oldest, + // but for newly created batches, batch.processingStart is not yet set and + // gets put at the bottom of the returned array b/c of that. Figure out how + // to return the batches in reverse chronological order but surface newly + // created batches at the top + sortAscending: false, + limit: 5, + }, + }, }), getBatch: ({ id }) => ({ @@ -712,7 +714,7 @@ const queries = { } } `, - variables: { id } + variables: { id }, }), stopBatch: ({ id }) => ({ @@ -723,7 +725,7 @@ const queries = { } } `, - variables: { input: { batch: id } } + variables: { input: { batch: id } }, }), redriveBatch: ({ id }) => ({ @@ -734,7 +736,7 @@ const queries = { } } `, - variables: { input: { batch: id } } + variables: { input: { batch: id } }, }), getUsers: () => ({ @@ -753,7 +755,7 @@ const queries = { } } `, - variables: { input: {}} + variables: { input: {} }, }), updateUser: (input) => ({ @@ -764,7 +766,7 @@ const queries = { } } `, - variables: { input } + variables: { input }, }), createUser: (input) => ({ @@ -775,7 +777,7 @@ const queries = { } } `, - variables: { input } + variables: { input }, }), }; diff --git a/src/api/index.js b/src/api/index.js index 48302197..82dac456 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,11 +1,9 @@ import { GraphQLClient, gql } from 'graphql-request'; import { Auth } from 'aws-amplify'; -// import parseLink, { Links } from 'parse-link-header' import buildQuery from './buildQuery'; import { API_URL } from '../config'; export async function call({ projId, request, input }) { - let token; try { const currentUser = await Auth.currentAuthenticatedUser(); @@ -18,19 +16,17 @@ export async function call({ projId, request, input }) { const params = buildQuery[request](input); const graphQLClient = new GraphQLClient(API_URL, { headers: { - 'authorization': `Bearer ${token}`, + authorization: `Bearer ${token}`, ...(projId && { 'x-selected-project': projId }), }, }); - const query = gql`${params.template}`; - return params.variables - ? await graphQLClient.request(query, params.variables) - : await graphQLClient.request(query) - + const query = gql` + ${params.template} + `; + return params.variables ? await graphQLClient.request(query, params.variables) : await graphQLClient.request(query); } catch (err) { - console.log('err in call() catch block: ', err) // https://github.com/prisma-labs/graphql-request/issues/201 - throw JSON.parse(JSON.stringify(err)).response.errors; + throw JSON.parse(JSON.stringify(err)).response?.errors || err; } -}; +} diff --git a/src/app/App.jsx b/src/app/App.jsx index a1ecb094..87942f2f 100644 --- a/src/app/App.jsx +++ b/src/app/App.jsx @@ -40,8 +40,8 @@ const MainenanceMessage = styled('div', { '&::after': { content: '\\1F9EC', paddingLeft: '$2', - fontSize: '30px' - } + fontSize: '30px', + }, }); const StyledMaintenanceAlert = styled('div', { @@ -54,14 +54,8 @@ const StyledMaintenanceAlert = styled('div', { const MaintenanceAlert = () => ( - Animl - - Animl is undergoing evolution. Check back soon! - + Animl + Animl is undergoing evolution. Check back soon! ); @@ -71,15 +65,15 @@ const App = () => { // check for maintenance mode const router = useSelector(selectRouterLocation); - const [ maintenanceMode, setMaintenanceMode ] = useState(IN_MAINTENANCE_MODE); + const [maintenanceMode, setMaintenanceMode] = useState(IN_MAINTENANCE_MODE); useEffect(() => { - if ('maintenance-mode' in router.query){ + if ('maintenance-mode' in router.query) { setMaintenanceMode(router.query['maintenance-mode']); } - }, [ router ]); + }, [router]); - const { authStatus } = useAuthenticator(context => [context.authStatus]); - const { user } = useAuthenticator(context => [context.user]); + const { authStatus } = useAuthenticator((context) => [context.authStatus]); + const { user } = useAuthenticator((context) => [context.user]); useEffect(() => { const payload = { authStatus }; if (user && authStatus === 'authenticated') { @@ -108,60 +102,64 @@ const App = () => { // Monitor connection loss useEffect(() => { - const handleOffline = (e) => { + const handleOffline = () => { const now = new Date(); console.log(`Lost internet connection at ${now.toISOString()}`); - } + }; window.addEventListener('offline', handleOffline); - return () => { window.removeEventListener('offline', handleOffline) } + return () => { + window.removeEventListener('offline', handleOffline); + }; }, []); useEffect(() => { - const handleOnline = (e) => { + const handleOnline = () => { const now = new Date(); console.log(`Regained internet connection at ${now.toISOString()}`); - } + }; window.addEventListener('online', handleOnline); - return () => { window.removeEventListener('online', handleOnline) } + return () => { + window.removeEventListener('online', handleOnline); + }; }, []); useEffect(() => { dispatch(initTracking(GA_CONFIG)); - }, [ dispatch ]); + }, [dispatch]); const isDrawingBbox = useSelector(selectIsDrawingBbox); const handleMouseUp = () => { - if (isDrawingBbox) dispatch(mouseEventDetected({ event: 'mouse-up'})); + if (isDrawingBbox) dispatch(mouseEventDetected({ event: 'mouse-up' })); }; const handleMouseDown = () => { - if (isDrawingBbox) dispatch(mouseEventDetected({ event: 'mouse-down'})); - } + if (isDrawingBbox) dispatch(mouseEventDetected({ event: 'mouse-down' })); + }; return ( <> - {maintenanceMode === true - ? () - : ( - - - - - - - - - - {/**/} - - - - ) - } - + {maintenanceMode === true ? ( + + ) : ( + + + + + + + + + + {/**/} + + + + + )} + ); }; diff --git a/src/app/rootReducer.js b/src/app/rootReducer.js index b10acc68..5190d05d 100644 --- a/src/app/rootReducer.js +++ b/src/app/rootReducer.js @@ -1,7 +1,7 @@ import { combineReducers } from '@reduxjs/toolkit'; import { connectRouter } from 'connected-react-router'; import { undoHistoryReducer } from 'redux-undo-redo'; -import authSlice from '../features/auth/authSlice'; +import authReducer from '../features/auth/authSlice'; import filtersReducer from '../features/filters/filtersSlice'; import imagesReducer from '../features/images/imagesSlice'; import wirelessCamerasReducer from '../features/cameras/wirelessCamerasSlice'; @@ -12,19 +12,20 @@ import usersReducer from '../features/projects/usersSlice'; import trackingReducer from '../features/tracking/trackingSlice'; import uploadReducer from '../features/upload/uploadSlice'; -const createRootReducer = (history) => combineReducers({ - router: connectRouter(history), - auth: authSlice, - projects: projectReducer, - users: usersReducer, - filters: filtersReducer, - images: imagesReducer, - wirelessCameras: wirelessCamerasReducer, - review: reviewReducer, - loupe: loupeReducer, - undoHistory: undoHistoryReducer, - tracking: trackingReducer, - uploads: uploadReducer, -}); +const createRootReducer = (history) => + combineReducers({ + router: connectRouter(history), + auth: authReducer, + projects: projectReducer, + users: usersReducer, + filters: filtersReducer, + images: imagesReducer, + wirelessCameras: wirelessCamerasReducer, + review: reviewReducer, + loupe: loupeReducer, + undoHistory: undoHistoryReducer, + tracking: trackingReducer, + uploads: uploadReducer, + }); export default createRootReducer; diff --git a/src/app/utils.js b/src/app/utils.js index 36828ece..82fd219b 100644 --- a/src/app/utils.js +++ b/src/app/utils.js @@ -1,25 +1,24 @@ import { useState, useEffect, useRef } from 'react'; -import { ResizeObserver } from '@juggle/resize-observer' +import { ResizeObserver } from '@juggle/resize-observer'; /* * Hook for skiping the useEffect run on a component's initial render - * From: https://stackoverflow.com/questions/53179075/with-useeffect-how-can-i-skip-applying-an-effect-upon-the-initial-render + * From: https://stackoverflow.com/questions/53179075/with-useeffect-how-can-i-skip-applying-an-effect-upon-the-initial-render */ export function useEffectAfterMount(fn, inputs) { const didMountRef = useRef(false); useEffect(() => { if (didMountRef.current) { return fn(); - } - else { + } else { didMountRef.current = true; } }, inputs); -}; +} /* * Hook for watching resize events - */ + */ export const useResizeObserver = (ref) => { const [width, setWidth] = useState(0); const [height, setHeight] = useState(0); @@ -28,7 +27,7 @@ export const useResizeObserver = (ref) => { useEffect(() => { const element = ref.current; - const resizeObserver = new ResizeObserver(entries => { + const resizeObserver = new ResizeObserver((entries) => { if (!Array.isArray(entries)) return; if (!entries.length) return; const entry = entries[0]; @@ -38,15 +37,15 @@ export const useResizeObserver = (ref) => { if (height !== entry.contentRect.height) { setHeight(entry.contentRect.height); } - }) + }); resizeObserver.observe(element); return () => resizeObserver.disconnect(element); }, [ref, height, width]); - // NOTE: Resize Observer entry's contentRect top/x left/y don't behave the + // NOTE: Resize Observer entry's contentRect top/x left/y don't behave the // same as getBoundingClientRect() (they're always 0), // so use getBoundingClientRect() instead - useEffect(() => { + useEffect(() => { const element = ref.current; const container = element.getBoundingClientRect(); if (top !== container.top) setTop(container.top); @@ -56,17 +55,14 @@ export const useResizeObserver = (ref) => { return { width, height, top, left }; }; - /* * find an image objects from array of images - */ -export const findImage = (images, imgId) => ( - images.find((img) => img._id === imgId) -); + */ +export const findImage = (images, imgId) => images.find((img) => img._id === imgId); /* * find specific object from array of images - */ + */ export const findObject = (images, imgId, objId) => { const image = findImage(images, imgId); return image.objects.find((obj) => obj._id === objId); @@ -74,7 +70,7 @@ export const findObject = (images, imgId, objId) => { /* * find specific object from array of images - */ + */ export const findLabel = (images, imgId, objId, lblId) => { const object = findObject(images, imgId, objId); return object.labels.find((lbl) => lbl._id === lblId); @@ -82,10 +78,8 @@ export const findLabel = (images, imgId, objId, lblId) => { /* * truncate string and add ellipsis - */ -export const truncateString = (str, n) => ( - (str.length > n) ? `${str.substring(0, n)}...` : str -); + */ +export const truncateString = (str, n) => (str.length > n ? `${str.substring(0, n)}...` : str); /* * convert bbox in absolute vals ([left, top, width, height]) @@ -130,7 +124,7 @@ export const getTextColor = (bgColor) => { return '$textDark'; } - const threshold = 0.6 + const threshold = 0.6; const [red, green, blue] = [0, 2, 4].map((i) => parseInt(bgColor.slice(i + 1, i + 3), 16)); const l = (red * 0.299 + green * 0.587 + blue * 0.114) / 255; return l < threshold ? '$loContrast' : '$textDark'; @@ -141,10 +135,22 @@ export const getRandomColor = () => { const green = Math.floor(Math.random() * (255 - 0) + 0); const blue = Math.floor(Math.random() * (255 - 0) + 0); - const integer = ((Math.round(red) & 0xFF) << 16) - + ((Math.round(green) & 0xFF) << 8) - + (Math.round(blue) & 0xFF); + const integer = ((Math.round(red) & 0xff) << 16) + ((Math.round(green) & 0xff) << 8) + (Math.round(blue) & 0xff); const string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; -} +}; + +/* + * normalize non-graphql errors + */ +export const normalizeErrors = (error, code) => { + let errs = error; + if (!Array.isArray(error)) { + // if the error is thrown on the client side rather than returned by the API + // (e.g., we lost internet connection and exhausted upload retries) + // we need to re-format the error to match GraphQL errors array and error objects + errs = [{ message: error.message, extensions: { code } }]; + } + return errs; +}; diff --git a/src/components/AlertDialog.jsx b/src/components/AlertDialog.jsx index 64eaf0a2..48ae4a00 100644 --- a/src/components/AlertDialog.jsx +++ b/src/components/AlertDialog.jsx @@ -1,14 +1,14 @@ import React from 'react'; import * as AD from '@radix-ui/react-alert-dialog'; -import {blackA, mauve, red, violet } from '@radix-ui/colors'; -import { styled, keyframes } from '@stitches/react'; +import { blackA } from '@radix-ui/colors'; +import { styled } from '@stitches/react'; const AlertDialogOverlay = styled(AD.AlertDialogOverlay, { backgroundColor: blackA.blackA9, position: 'fixed', zIndex: 1000, inset: 0, - animation: 'overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)' + animation: 'overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)', }); const AlertDialogContent = styled(AD.AlertDialogContent, { @@ -28,7 +28,7 @@ const AlertDialogContent = styled(AD.AlertDialogContent, { '&:focus': { outline: 'none', - } + }, }); const AlertDialogTitle = styled(AD.AlertDialogTitle, { @@ -88,10 +88,11 @@ const AlertDialogDescription = styled(AD.AlertDialogDescription, { // .Button.mauve:focus { // box-shadow: 0 0 0 2px var(--mauve-7); // } -const overlayShow = keyframes({ - '0%': { opacity: 0 }, - '100%': { opacity: 1 }, -}); + +// const overlayShow = keyframes({ +// '0%': { opacity: 0 }, +// '100%': { opacity: 1 }, +// }); // @keyframes overlayShow { // from { @@ -102,10 +103,10 @@ const overlayShow = keyframes({ // } // } -const contentShow = keyframes({ - '0%': { opacity: 0 , transform: 'translate(-50%, -48%) scale(0.96)' }, - '100%': { opacity: 1, transform: 'translate(-50%, -50%) scale(1)' }, -}); +// const contentShow = keyframes({ +// '0%': { opacity: 0 , transform: 'translate(-50%, -48%) scale(0.96)' }, +// '100%': { opacity: 1, transform: 'translate(-50%, -50%) scale(1)' }, +// }); // @keyframes contentShow { // from { @@ -136,8 +137,7 @@ export const AlertDialog = () => ( Are you absolutely sure? - This action cannot be undone. This will permanently delete your account and remove your - data from our servers. + This action cannot be undone. This will permanently delete your account and remove your data from our servers.
diff --git a/src/components/CategorySelector.jsx b/src/components/CategorySelector.jsx index b298417b..a75021d4 100644 --- a/src/components/CategorySelector.jsx +++ b/src/components/CategorySelector.jsx @@ -1,12 +1,13 @@ import React, { forwardRef } from 'react'; import { styled } from '../theme/stitches.config.js'; import { useSelector, useDispatch } from 'react-redux'; -import Select from 'react-select'; -import { createFilter } from 'react-select'; -import { selectSelectedProject, selectProjectLabelsLoading } from '../features/projects/projectsSlice.js'; +import Select, { createFilter } from 'react-select'; +import { + selectSelectedProject, + selectProjectLabelsLoading, +} from '../features/projects/projectsSlice.js'; import { addLabelEnd } from '../features/loupe/loupeSlice.js'; - const StyledCategorySelector = styled(Select, { width: '155px', fontFamily: '$mono', @@ -54,25 +55,31 @@ const StyledCategorySelector = styled(Select, { '.react-select__option--is-focused': { backgroundColor: '$gray3', }, - } + }, }); - -const CategorySelector = forwardRef(({ - css, - handleCategoryChange, - handleCategorySelectorBlur, - menuPlacement='top' -}, ref) => { - +const CategorySelector = forwardRef(function CategorySelector( + { + css, + handleCategoryChange, + handleCategorySelectorBlur, + menuPlacement = 'top', + }, + ref, +) { // update selector options when new labels become available const labelsLoading = useSelector(selectProjectLabelsLoading); - const createOption = (category) => ({ value: category._id, label: category.name }); - const enabledLabels = useSelector(selectSelectedProject).labels.filter((lbl) => lbl.reviewerEnabled ); + const createOption = (category) => ({ + value: category._id, + label: category.name, + }); + const enabledLabels = useSelector(selectSelectedProject).labels.filter( + (lbl) => lbl.reviewerEnabled, + ); const options = enabledLabels.map(createOption); const dispatch = useDispatch(); - const defaultHandleBlur = (e) => dispatch(addLabelEnd()); + const defaultHandleBlur = () => dispatch(addLabelEnd()); return ( { const [focusedInput, setFocusedInput] = useState(null); @@ -41,12 +37,12 @@ const DatePickerWithFormik = ({ date = moment(date).startOf('day'); setFieldValue('startDate', date.toISOString()); } else { - setFieldError('startDate', 'Enter date as MM/DD/YYYY') + setFieldError('startDate', 'Enter date as MM/DD/YYYY'); } }} focused={focusedInput} onFocusChange={onFocusChange} - id='startDate' + id="startDate" small={true} hideKeyboardShortcutsPanel={true} enableOutsideDays={true} diff --git a/src/components/Dropdown.jsx b/src/components/Dropdown.jsx index 704f09c7..2a744c64 100644 --- a/src/components/Dropdown.jsx +++ b/src/components/Dropdown.jsx @@ -1,12 +1,5 @@ -import React from 'react'; import { styled, keyframes } from '@stitches/react'; -import { violet, mauve, blackA, indigo } from '@radix-ui/colors'; -import { - HamburgerMenuIcon, - DotFilledIcon, - CheckIcon, - ChevronRightIcon, -} from '@radix-ui/react-icons'; +import { violet, mauve, indigo } from '@radix-ui/colors'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; const slideUpAndFade = keyframes({ @@ -89,8 +82,12 @@ const itemStyles = { }; const StyledItem = styled(DropdownMenuPrimitive.Item, { ...itemStyles }); -const StyledCheckboxItem = styled(DropdownMenuPrimitive.CheckboxItem, { ...itemStyles }); -const StyledRadioItem = styled(DropdownMenuPrimitive.RadioItem, { ...itemStyles }); +const StyledCheckboxItem = styled(DropdownMenuPrimitive.CheckboxItem, { + ...itemStyles, +}); +const StyledRadioItem = styled(DropdownMenuPrimitive.RadioItem, { + ...itemStyles, +}); const StyledTriggerItem = styled(DropdownMenuPrimitive.TriggerItem, { '&[data-state="open"]': { backgroundColor: indigo.indigo4, @@ -138,69 +135,3 @@ export const DropdownMenuTriggerItem = StyledTriggerItem; export const DropdownMenuLabel = StyledLabel; export const DropdownMenuSeparator = StyledSeparator; export const DropdownMenuArrow = StyledArrow; - -// Your app... -const Box = styled('div', {}); - -const RightSlot = styled('div', { - marginLeft: 'auto', - paddingLeft: 20, - color: mauve.mauve11, - ':focus > &': { color: 'white' }, - '[data-disabled] &': { color: mauve.mauve8 }, -}); - -const IconButton = styled('button', { - all: 'unset', - fontFamily: 'inherit', - borderRadius: '100%', - height: 35, - width: 35, - display: 'inline-flex', - alignItems: 'center', - justifyContent: 'center', - color: violet.violet11, - backgroundColor: 'white', - boxShadow: `0 2px 10px ${blackA.blackA7}`, - '&:hover': { backgroundColor: violet.violet3 }, - '&:focus': { boxShadow: `0 0 0 2px black` }, -}); - -export const DropdownMenuDemo = () => { - const [bookmarksChecked, setBookmarksChecked] = React.useState(true); - const [urlsChecked, setUrlsChecked] = React.useState(false); - const [person, setPerson] = React.useState('pedro'); - - return ( - - - - - - - - - Projects - - - - - - Pedro Duarte - - - - - - Colm Tuite - - - - - - - ); -}; - -export default DropdownMenuDemo; - diff --git a/src/components/ErrorAlerts.jsx b/src/components/ErrorAlerts.jsx index 100cc113..70a312b0 100644 --- a/src/components/ErrorAlerts.jsx +++ b/src/components/ErrorAlerts.jsx @@ -2,20 +2,14 @@ import React, { useState, useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { Cross2Icon } from '@radix-ui/react-icons'; import IconButton from './IconButton'; -import { - Toast, - ToastTitle, - ToastDescription, - ToastAction, - ToastViewport -} from './Toast'; +import { Toast, ToastTitle, ToastDescription, ToastAction, ToastViewport } from './Toast'; import { selectLabelsErrors, dismissLabelsError, selectCommentsErrors, - dismissCommentsError + dismissCommentsError, } from '../features/review/reviewSlice'; -import { +import { selectProjectsErrors, dismissProjectsError, selectViewsErrors, @@ -26,11 +20,10 @@ import { dismissModelsError, selectCreateProjectsErrors, dismissCreateProjectError, + selectManageLabelsErrors, + dismissManageLabelsError, } from '../features/projects/projectsSlice'; -import { - selectWirelessCamerasErrors, - dismissWirelessCamerasError, -} from '../features/cameras/wirelessCamerasSlice'; +import { selectWirelessCamerasErrors, dismissWirelessCamerasError } from '../features/cameras/wirelessCamerasSlice'; import { selectImagesErrors, dismissImagesError, @@ -45,11 +38,12 @@ import { selectExportImageErrorsErrors, dismissExportErrorsError, selectRedriveBatchErrors, - dismissRedriveBatchError + dismissRedriveBatchError, + selectUploadErrors, + dismissUploadError, } from '../features/upload/uploadSlice'; import getErrorContent from '../content/Errors'; import { selectManageUserErrors, dismissManageUsersError } from '../features/projects/usersSlice'; -import { selectManageLabelsErrors, dismissManageLabelsError } from '../features/projects/projectsSlice'; // TODO: add updateAutomationRules errors @@ -71,7 +65,8 @@ const ErrorAlerts = () => { const manageUserErrors = useSelector(selectManageUserErrors); const createProjectErrors = useSelector(selectCreateProjectsErrors); const manageLabelsErrors = useSelector(selectManageLabelsErrors); - + const uploadErrors = useSelector(selectUploadErrors); + const enrichedErrors = [ enrichErrors(labelsErrors, 'Label Error', 'labels'), enrichErrors(commentsErrors, 'Comment Error', 'comments'), @@ -84,16 +79,15 @@ const ErrorAlerts = () => { enrichErrors(imageContextErrors, 'Image Error', 'imageContext'), enrichErrors(statsErrors, 'Error Getting Stats', 'stats'), enrichErrors(exportDataErrors, 'Error Exporting Data', 'data'), - enrichErrors(exportImageErrorsErrors, 'Error downloading errors CSV', 'uploadImageErrors'), - enrichErrors(redriveBatchErrors, 'Error retrying failed images in batch', 'redriveBatch'), - enrichErrors(manageUserErrors, 'Manage user error', 'manageUsers'), + enrichErrors(exportImageErrorsErrors, 'Error Downloading Errors CSV', 'uploadImageErrors'), + enrichErrors(redriveBatchErrors, 'Error Retrying Failed Images in Batch', 'redriveBatch'), + enrichErrors(manageUserErrors, 'Manage User Error', 'manageUsers'), enrichErrors(createProjectErrors, 'Error Creating Project', 'createProject'), enrichErrors(manageLabelsErrors, 'Error Updating Label', 'manageLabels'), + enrichErrors(uploadErrors, 'Error Uploading Images', 'upload'), ]; - const errors = enrichedErrors.reduce((acc, curr) => ( - (curr && curr.length) ? acc.concat(curr) : acc - ), []); + const errors = enrichedErrors.reduce((acc, curr) => (curr && curr.length ? acc.concat(curr) : acc), []); const [open, setOpen] = useState(errors && errors.length); useEffect(() => { @@ -106,51 +100,50 @@ const ErrorAlerts = () => { return ( <> - {errors && errors.map((err, i) => ( - { - if (!errors) setOpen(e); - }} - > - {err.title} - -
{err.usrMsg}
-
- - handleDismissError(err.index, err.entity)} - > - - - -
- ))} + {errors && + errors.map((err, i) => ( + { + if (!errors) setOpen(e); + }} + > + {err.title} + +
{err.usrMsg}
+
+ + handleDismissError(err.index, err.entity)}> + + + +
+ ))} ); }; const dismissErrorActions = { - 'labels': (i) => dismissLabelsError(i), - 'comments': (i) => dismissCommentsError(i), - 'projects': (i) => dismissProjectsError(i), - 'createProject': (i) => dismissCreateProjectError(i), - 'views': (i) => dismissViewsError(i), - 'deployments': (i) => dismissDeploymentsError(i), - 'models': (i) => dismissModelsError(i), - 'cameras': (i) => dismissWirelessCamerasError(i), - 'images': (i) => dismissImagesError(i), - 'imageContext': (i) => dismissImageContextError(i), - 'stats': (i) => dismissStatsError(i), - 'data': (i) => dismissExportError(i), - 'uploadImageErrors': (i) => dismissExportErrorsError(i), - 'redriveBatch': (i) => dismissRedriveBatchError(i), - 'manageUsers': (i) => dismissManageUsersError(i), - 'manageLabels': (i) => dismissManageLabelsError(i), + labels: (i) => dismissLabelsError(i), + comments: (i) => dismissCommentsError(i), + projects: (i) => dismissProjectsError(i), + createProject: (i) => dismissCreateProjectError(i), + views: (i) => dismissViewsError(i), + deployments: (i) => dismissDeploymentsError(i), + models: (i) => dismissModelsError(i), + cameras: (i) => dismissWirelessCamerasError(i), + images: (i) => dismissImagesError(i), + imageContext: (i) => dismissImageContextError(i), + stats: (i) => dismissStatsError(i), + data: (i) => dismissExportError(i), + uploadImageErrors: (i) => dismissExportErrorsError(i), + redriveBatch: (i) => dismissRedriveBatchError(i), + manageUsers: (i) => dismissManageUsersError(i), + manageLabels: (i) => dismissManageLabelsError(i), + upload: (i) => dismissUploadError(i), }; function enrichErrors(errors, title, entity) { @@ -166,5 +159,4 @@ function enrichErrors(errors, title, entity) { })); } - export default ErrorAlerts; diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 064160c9..ded24721 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -1,4 +1,4 @@ - +import React from 'react'; import { styled } from '../theme/stitches.config.js'; import logo from '../assets/tnc-logo-black.svg'; import { Container } from './Container.jsx'; @@ -8,38 +8,41 @@ const StyledFooter = styled(Container, { textAlign: 'center', fontSize: '$4', fontWeight: '$2', - color:'$textLight', -}) + color: '$textLight', +}); const Footer = () => { const year = new Date().getFullYear(); return ( - - The Nature Conservancy + The Nature Conservancy

- Questions? Feedback? Interested in using Animl for your camera trapping projects? Contact us + Questions? Feedback? Interested in using Animl for your camera + trapping projects?{' '} + + Contact us +

© Copyright {year} The Nature Conservancy

+ href="https://www.nature.org/en-us/about-us/who-we-are/accountability/privacy-policy/" + target="_blank" + rel="noopener noreferrer" + > Privacy Policy - + + href="https://docs.animl.camera/terms-of-service" + target="_blank" + rel="noopener noreferrer" + > Terms of Service diff --git a/src/components/LabelPill.jsx b/src/components/LabelPill.jsx index bc34fd60..149edbc5 100644 --- a/src/components/LabelPill.jsx +++ b/src/components/LabelPill.jsx @@ -1,5 +1,5 @@ +import React from 'react'; import { styled } from '../theme/stitches.config.js'; -import { getTextColor } from '../app/utils.js'; const Pill = styled('div', { fontSize: '$2', @@ -18,10 +18,10 @@ const Pill = styled('div', { true: { outline: 'none', boxShadow: '0 0 0 3px $blue200', - borderColor: '$blue500', - } - } - } + borderColor: '$blue500', + }, + }, + }, }); const LabelPill = ({ color, name, css, ...props }) => { @@ -31,13 +31,13 @@ const LabelPill = ({ color, name, css, ...props }) => { backgroundColor: `${color}1A`, borderColor: color, color: '$textDark', // getTextColor(color), - ...css + ...css, }} {...props} > {name} ); -} +}; export default LabelPill; diff --git a/src/components/Modal.jsx b/src/components/Modal.jsx index 46f25c0e..990f8430 100644 --- a/src/components/Modal.jsx +++ b/src/components/Modal.jsx @@ -7,7 +7,7 @@ import PanelHeader from './PanelHeader'; const ModalBody = styled('div', { padding: '$3', maxHeight: 'calc(85vh - $7)', - overflowY: 'scroll' + overflowY: 'scroll', }); const overlayShow = keyframes({ @@ -15,10 +15,10 @@ const overlayShow = keyframes({ '100%': { opacity: 1 }, }); -const contentShow = keyframes({ - '0%': { opacity: 0, transform: 'translate(-50%, -48%) scale(.96)' }, - '100%': { opacity: 1, transform: 'translate(-50%, -50%) scale(1)' }, -}); +// const contentShow = keyframes({ +// '0%': { opacity: 0, transform: 'translate(-50%, -48%) scale(.96)' }, +// '100%': { opacity: 1, transform: 'translate(-50%, -50%) scale(1)' }, +// }); const StyledOverlay = styled(DialogPrimitive.Overlay, { zIndex: '$4', @@ -34,7 +34,8 @@ const StyledContent = styled(DialogPrimitive.Content, { zIndex: '$5', backgroundColor: '$backgroundLight', borderRadius: '$2', - boxShadow: 'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px', + boxShadow: + 'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px', position: 'fixed', top: '50%', left: '50%', @@ -56,14 +57,14 @@ const StyledContent = styled(DialogPrimitive.Content, { width: '95vw', // height: '95vh', }, - } - } + }, + }, }); function Content({ children, ...props }) { return ( - + {children} ); @@ -92,19 +93,15 @@ export const DialogDescription = StyledDescription; export const DialogClose = DialogPrimitive.Close; export const Modal = ({ open, handleModalToggle, size, title, children }) => ( - handleModalToggle()} - > + handleModalToggle()}> - {React.Children.map( - children, - (child) => React.cloneElement(child, { + {React.Children.map(children, (child) => + React.cloneElement(child, { open: open, - handleClose: handleModalToggle - }) + handleClose: handleModalToggle, + }), )} diff --git a/src/components/NavigationMenu.jsx b/src/components/NavigationMenu.jsx index ec2ffd1a..9a63042e 100644 --- a/src/components/NavigationMenu.jsx +++ b/src/components/NavigationMenu.jsx @@ -4,7 +4,6 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'; import { CaretDownIcon } from '@radix-ui/react-icons'; import { violet, indigo } from '@radix-ui/colors'; - const enterFromRight = keyframes({ from: { transform: 'translateX(200px)', opacity: 0 }, to: { transform: 'translateX(0)', opacity: 1 }, @@ -102,13 +101,17 @@ const StyledCaret = styled(CaretDownIcon, { }, }); -const StyledTriggerWithCaret = React.forwardRef( - ({ children, ...props }, forwardedRef) => ( +const StyledTriggerWithCaret = React.forwardRef(function StyledTriggerWithCaret( + { children, ...props }, + forwardedRef, +) { + return ( {children} -)); + ); +}); const StyledLink = styled(NavigationMenuPrimitive.Link, { ...itemStyles, @@ -124,8 +127,8 @@ const StyledLink = styled(NavigationMenuPrimitive.Link, { backgroundColor: '$gray4', '&:hover': { backgroundColor: '$gray5' }, }, - } - } + }, + }, }); const StyledContent = styled(NavigationMenuPrimitive.Content, { @@ -170,11 +173,15 @@ const StyledArrow = styled('div', { borderTopLeftRadius: 2, }); -const StyledIndicatorWithArrow = React.forwardRef((props, forwardedRef) => ( - - - -)); +const StyledIndicatorWithArrow = React.forwardRef( + function StyledIndicatorWithArrow(props, forwardedRef) { + return ( + + + + ); + }, +); const StyledViewport = styled(NavigationMenuPrimitive.Viewport, { position: 'relative', @@ -184,7 +191,8 @@ const StyledViewport = styled(NavigationMenuPrimitive.Viewport, { backgroundColor: '$backgroundLight', borderRadius: '$2', overflow: 'hidden', - boxShadow: 'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px', + boxShadow: + 'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px', height: 'var(--radix-navigation-menu-viewport-height)', '@media only screen and (min-width: 600px)': { diff --git a/src/components/NotFound.jsx b/src/components/NotFound.jsx index 722700b5..0e142523 100644 --- a/src/components/NotFound.jsx +++ b/src/components/NotFound.jsx @@ -1,3 +1,4 @@ +import React from 'react'; import { styled } from '../theme/stitches.config'; import { Box } from './Box'; @@ -6,9 +7,9 @@ const Header = styled('div', { fontWeight: '$5', fontFamily: '$roboto', color: '$textDark', - textAlign: 'center', + textAlign: 'center', paddingTop: '$8', - paddingBottom: '$8' + paddingBottom: '$8', }); export const NotFound = () => { @@ -16,5 +17,5 @@ export const NotFound = () => {
Page not found
- ) -} + ); +}; diff --git a/src/components/ScrollArea.jsx b/src/components/ScrollArea.jsx index 15aa8216..b519e8f2 100644 --- a/src/components/ScrollArea.jsx +++ b/src/components/ScrollArea.jsx @@ -1,6 +1,6 @@ import React from 'react'; import * as ScrollArea from '@radix-ui/react-scroll-area'; -import { blackA, mauve, violet } from '@radix-ui/colors'; +import { blackA, mauve } from '@radix-ui/colors'; import { styled } from '../theme/stitches.config'; const StyledScrollAreaRoot = styled(ScrollArea.Root, { @@ -11,14 +11,14 @@ const StyledScrollAreaRoot = styled(ScrollArea.Root, { overflow: 'hidden', // boxShadow: `0 2px 10px ${blackA.blackA7})`, // backgroundColor: '$loContrast', - '--scrollbar-size': '10px' + '--scrollbar-size': '10px', }); const StyledScrollAreaViewport = styled(ScrollArea.Viewport, { width: '100%', height: '100%', borderRadius: 'inherit', - position: 'absolute' + position: 'absolute', }); const StyledScrollAreaScrollbar = styled(ScrollArea.Scrollbar, { @@ -36,13 +36,13 @@ const StyledScrollAreaScrollbar = styled(ScrollArea.Scrollbar, { }, '&[data-orientation="vertical"]': { - width: 'var(--scrollbar-size)' + width: 'var(--scrollbar-size)', }, - + '&[data-orientation="horizontal"]': { flexDirection: 'column', - height: 'var(--scrollbar-size)' - } + height: 'var(--scrollbar-size)', + }, }); const StyledScrollAreaThumb = styled(ScrollArea.Thumb, { @@ -85,14 +85,10 @@ const StyledScrollAreaCorner = styled(ScrollArea.Corner, { // padding-top: 10px; // } - - const StyledScrollArea = ({ children }) => ( - - {children} - - + {children} + diff --git a/src/components/SelectField.jsx b/src/components/SelectField.jsx index 6b81ed75..62de705b 100644 --- a/src/components/SelectField.jsx +++ b/src/components/SelectField.jsx @@ -1,6 +1,5 @@ import React from 'react'; import _ from 'lodash'; -import { styled } from '../theme/stitches.config'; import Select from 'react-select'; import { FormError } from './Form'; @@ -24,16 +23,16 @@ const customStyles = { boxShadow: '0 0 0 3px var(--colors-blue200)', borderColor: 'var(--colors-blue500)', }, - }) + }), }), - valueContainer: (provided, state) => ({ + valueContainer: (provided) => ({ ...provided, padding: '0px 16px', fontSize: 'var(--fontSizes-3)', fontFamily: 'var(--fonts-sourceSansPro)', color: 'var(--colors-gray7)', }), - menu: (provided, state) => ({ + menu: (provided) => ({ ...provided, color: 'var(--colors-hiContrast)', fontSize: 'var(--fontSizes-3)', @@ -47,8 +46,8 @@ const customStyles = { }), ...(state.isFocused && { backgroundColor: 'var(--colors-gray3)', - }) - }) + }), + }), }; const SelectField = ({ @@ -62,9 +61,8 @@ const SelectField = ({ touched, isSearchable, isMulti, - menuPlacement='bottom' + menuPlacement = 'bottom', }) => { - const handleChange = (value) => { onChange(name, value); }; @@ -78,24 +76,19 @@ const SelectField = ({ {label && }