diff --git a/package-lock.json b/package-lock.json index b7f14def..29ca8213 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2908,35 +2908,60 @@ } } }, - "@octokit/openapi-types": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-9.4.0.tgz", - "integrity": "sha512-rKRkXikOJgDNImPl49IJuECLVXjj+t4qOXHhl8SBjMQCGGp1w4m5Ud/0kfdUx+zCpTvBN8vaOUDF4nnboZoOtQ==", - "dev": true - }, - "@octokit/plugin-paginate-rest": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.15.0.tgz", - "integrity": "sha512-/vjcb0w6ggVRtsb8OJBcRR9oEm+fpdo8RJk45khaWw/W0c8rlB2TLCLyZt/knmC17NkX7T9XdyQeEY7OHLSV1g==", + "@npmcli/disparity-colors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-1.0.1.tgz", + "integrity": "sha512-kQ1aCTTU45mPXN+pdAaRxlxr3OunkyztjbbxDY/aIcPS5CnCUrx+1+NvA6pTcYR7wmLZe37+Mi5v3nfbwPxq3A==", "dev": true, "requires": { - "@octokit/types": "^6.23.0" + "ansi-styles": "^4.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } } }, - "@octokit/plugin-request-log": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true - }, - "@octokit/plugin-rest-endpoint-methods": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.7.0.tgz", - "integrity": "sha512-G7sgccWRYQMwcHJXkDY/sDxbXeKiZkFQqUtzBCwmrzCNj2GQf3VygQ4T/BFL2crLVpIbenkE/c0ErhYOte2MPw==", + "@npmcli/fs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.0.tgz", + "integrity": "sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==", "dev": true, "requires": { - "@octokit/types": "^6.24.0", - "deprecation": "^2.3.1" + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@npmcli/git": { @@ -2982,6 +3007,258 @@ "npm-normalize-package-bin": "^1.0.1" } }, + "@npmcli/map-workspaces": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-1.0.4.tgz", + "integrity": "sha512-wVR8QxhyXsFcD/cORtJwGQodeeaDf0OxcHie8ema4VgFeqwYkFsDPnSrIRSytX8xR6nKPAH89WnwTcaU608b/Q==", + "dev": true, + "requires": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^7.1.6", + "minimatch": "^3.0.4", + "read-package-json-fast": "^2.0.1" + } + }, + "@npmcli/metavuln-calculator": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-1.1.1.tgz", + "integrity": "sha512-9xe+ZZ1iGVaUovBVFI9h3qW+UuECUzhvZPxK9RaEA2mjU26o5D0JloGYWwLYvQELJNmBdQB6rrpuN8jni6LwzQ==", + "dev": true, + "requires": { + "cacache": "^15.0.5", + "pacote": "^11.1.11", + "semver": "^7.3.2" + }, + "dependencies": { + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + } + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "@npmcli/name-from-folder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", + "integrity": "sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA==", + "dev": true + }, + "@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true + }, + "@npmcli/package-json": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-1.0.1.tgz", + "integrity": "sha512-y6jnu76E9C23osz8gEMBayZmaZ69vFOIk8vR1FJL/wbEJ54+9aVG9rLTjQKSXfgYZEr50nw1txBBFfBZZe+bYg==", + "dev": true, + "requires": { + "json-parse-even-better-errors": "^2.3.1" + } + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-1.8.6.tgz", + "integrity": "sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^1.0.2", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^7.1.0", + "read-package-json-fast": "^2.0.1" + } + }, + "@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3" + } + }, + "@octokit/core": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz", + "integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.0", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dev": true, + "requires": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/openapi-types": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-9.4.0.tgz", + "integrity": "sha512-rKRkXikOJgDNImPl49IJuECLVXjj+t4qOXHhl8SBjMQCGGp1w4m5Ud/0kfdUx+zCpTvBN8vaOUDF4nnboZoOtQ==", + "dev": true + }, + "@octokit/plugin-paginate-rest": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.15.0.tgz", + "integrity": "sha512-/vjcb0w6ggVRtsb8OJBcRR9oEm+fpdo8RJk45khaWw/W0c8rlB2TLCLyZt/knmC17NkX7T9XdyQeEY7OHLSV1g==", + "dev": true, + "requires": { + "@octokit/types": "^6.23.0" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.7.0.tgz", + "integrity": "sha512-G7sgccWRYQMwcHJXkDY/sDxbXeKiZkFQqUtzBCwmrzCNj2GQf3VygQ4T/BFL2crLVpIbenkE/c0ErhYOte2MPw==", + "dev": true, + "requires": { + "@octokit/types": "^6.24.0", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, "@octokit/rest": { "version": "18.9.0", "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.9.0.tgz", @@ -7456,6 +7733,18 @@ "postcss-value-parser": "^4.1.0" } }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, "axe-core": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.2.tgz", @@ -18631,6 +18920,88 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "dev": true, + "requires": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" + }, + "dependencies": { + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + } + } + }, "makeerror": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", @@ -19477,6 +19848,39 @@ "lodash.toarray": "^4.4.0" } }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } + }, "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", diff --git a/package.json b/package.json index 7e903438..1b9f5dc5 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "nuke-everything": "rm -rf ./dist && rm -rf ./node_modules && rm -f package-lock.json", "commit": "npx git-cz", "format": "npx prettier --write 'src/**/*.{js,ts,tsx}'", + "format.ci": "npx prettier --check './{pages,src}/**/*.{js,ts,tsx}'", "docs": "cd SQFormDocs && npm start", "build-docs": "cd SQFormDocs && npm ci && npm run build" }, diff --git a/src/components/SQForm/SQFormDatePickerWithCalendarInputOnly.tsx b/src/components/SQForm/SQFormDatePickerWithCalendarInputOnly.tsx index dedd14f0..4daeb558 100644 --- a/src/components/SQForm/SQFormDatePickerWithCalendarInputOnly.tsx +++ b/src/components/SQForm/SQFormDatePickerWithCalendarInputOnly.tsx @@ -6,7 +6,8 @@ import SQFormDatePicker, {SQFormDatePickerProps} from './SQFormDatePicker'; import {useForm} from './useForm'; import type {BaseFieldProps} from 'types'; -export interface SQFormDatePickerWithCalendarInputOnlyProps extends BaseFieldProps { +export interface SQFormDatePickerWithCalendarInputOnlyProps + extends BaseFieldProps { /** Disabled property to disable the input if true */ isDisabled?: boolean; /** Placeholder text used inside the input field to provide hints to the user */ diff --git a/src/components/SQForm/SQFormMaskedReadOnlyField.js b/src/components/SQForm/SQFormMaskedReadOnlyField.js deleted file mode 100644 index e13f0b67..00000000 --- a/src/components/SQForm/SQFormMaskedReadOnlyField.js +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import MaskedInput from 'react-text-mask'; -import SQFormReadOnlyField from './SQFormReadOnlyField'; - -function TextFieldMask({inputRef, mask, ...rest}) { - return ( - { - inputRef(ref ? ref.inputElement : null); - }} - mask={mask} - placeholderChar={'\u2000'} - showMask={false} - /> - ); -} - -function SQFormMaskedReadOnlyField({ - mask, - name, - label, - placeholder = '- -', - size = 'auto', - InputProps, - inputProps = {}, - muiFieldProps = {}, -}) { - return ( - - ); -} - -SQFormMaskedReadOnlyField.propTypes = { - /** Valid mask array; custom or from utils/masks.js */ - mask: PropTypes.oneOfType([ - PropTypes.object, - PropTypes.array, - PropTypes.func, - ]), - /** Name of the field will be the Object key of the key/value pair form payload */ - name: PropTypes.string.isRequired, - /** Descriptive label of the input */ - label: PropTypes.string.isRequired, - /** Placeholder text used inside the input field to provide hints to the user */ - placeholder: PropTypes.string, - /** Size of the input given full-width is 12. */ - size: PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), - /** Props applied to the Input element */ - InputProps: PropTypes.object, - /** Attributes applied to the `input` element */ - inputProps: PropTypes.object, - /** Any valid prop for material ui text input child component - https://material-ui.com/api/text-field/#props */ - muiFieldProps: PropTypes.object, -}; - -export default SQFormMaskedReadOnlyField; diff --git a/src/components/SQForm/SQFormMaskedReadOnlyField.tsx b/src/components/SQForm/SQFormMaskedReadOnlyField.tsx index 37ad399e..cdc8dc2e 100644 --- a/src/components/SQForm/SQFormMaskedReadOnlyField.tsx +++ b/src/components/SQForm/SQFormMaskedReadOnlyField.tsx @@ -10,7 +10,8 @@ interface TextFieldMaskProps extends React.HTMLAttributes { mask?: maskProp; } -export interface SQFormMaskedReadOnlyFieldProps extends SQFormReadOnlyFieldProps { +export interface SQFormMaskedReadOnlyFieldProps + extends SQFormReadOnlyFieldProps { /** Valid mask array; custom or from utils/masks.js */ mask?: maskProp; /** Placeholder text used inside the input field to provide hints to the user */ diff --git a/src/components/SQForm/SQFormMaskedTextField.js b/src/components/SQForm/SQFormMaskedTextField.js deleted file mode 100644 index 38ea429f..00000000 --- a/src/components/SQForm/SQFormMaskedTextField.js +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import MaskedInput from 'react-text-mask'; -import {useFormikContext} from 'formik'; -import SQFormTextField from './SQFormTextField'; -import {useForm} from './useForm'; - -function TextFieldMask({inputRef, mask, ...rest}) { - return ( - { - inputRef(ref ? ref.inputElement : null); - }} - mask={mask} - placeholderChar={'\u2000'} - showMask={false} - /> - ); -} - -function SQFormMaskedTextField({ - mask, - name, - label, - isDisabled = false, - placeholder, - size = 'auto', - onBlur, - onChange, - startAdornment, - endAdornment, - type = 'text', - InputProps, - inputProps = {}, - muiFieldProps = {}, - stripNonNumeric = false, -}) { - const { - fieldState: {isFieldRequired}, - fieldHelpers: {handleBlur, handleChange}, - } = useForm({ - name, - onBlur, - onChange, - }); - const {setFieldValue} = useFormikContext(); - - const handleChangeStripNonNumeric = (event) => { - onChange && onChange(event); - setFieldValue(name, event.target.value.replace(/[^\d]/g, '')); - }; - - return ( - - ); -} - -SQFormMaskedTextField.propTypes = { - /** Valid mask array; custom or from utils/masks.js */ - mask: PropTypes.oneOfType([ - PropTypes.object, - PropTypes.array, - PropTypes.func, - ]), - /** Name of the field will be the Object key of the key/value pair form payload */ - name: PropTypes.string.isRequired, - /** Descriptive label of the input */ - label: PropTypes.string.isRequired, - /** Placeholder text used inside the input field to provide hints to the user */ - placeholder: PropTypes.string, - /** Disabled property to disable the input if true */ - isDisabled: PropTypes.bool, - /** Size of the input given full-width is 12. */ - size: PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), - /** Custom onBlur event callback */ - onBlur: PropTypes.func, - /** Custom onChange event callback */ - onChange: PropTypes.func, - /** Adornment that appears at the start of the input */ - startAdornment: PropTypes.node, - /** Adornment that appears at the end of the input */ - endAdornment: PropTypes.node, - /** Defines the input type for the text field. Must be a valid HTML5 input type */ - type: PropTypes.string, - /** Props applied to the Input element */ - InputProps: PropTypes.object, - /** Attributes applied to the `input` element */ - inputProps: PropTypes.object, - /** Any valid prop for material ui text input child component - https://material-ui.com/api/text-field/#props */ - muiFieldProps: PropTypes.object, - /** The submitted value from the input will have all non-numeric charactes removed */ - stripNonNumeric: PropTypes.bool, -}; - -export default SQFormMaskedTextField; diff --git a/src/components/SQForm/SQFormReadOnlyField.js b/src/components/SQForm/SQFormReadOnlyField.js deleted file mode 100644 index 65d9db00..00000000 --- a/src/components/SQForm/SQFormReadOnlyField.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Grid from '@material-ui/core/Grid'; -import TextField from '@material-ui/core/TextField'; -import {useForm} from './useForm'; -import {toKebabCase} from '../../utils'; - -function SQFormReadOnlyField({ - label, - name, - size = 'auto', - InputProps = {}, - inputProps = {}, - muiFieldProps = {}, -}) { - const { - formikField: {field}, - } = useForm({name}); - - return ( - - - - ); -} - -SQFormReadOnlyField.propTypes = { - /** Descriptive label of the input */ - label: PropTypes.string.isRequired, - /** Name of the field will be the Object key of the key/value pair form payload */ - name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - /** Size of the input given full-width is 12. */ - size: PropTypes.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), - /** Props applied to the Input element */ - InputProps: PropTypes.object, - /** Attributes applied to the `input` element */ - inputProps: PropTypes.object, - /** Any valid prop for material ui text input child component - https://material-ui.com/api/text-field/#props */ - muiFieldProps: PropTypes.object, -}; - -export default SQFormReadOnlyField; diff --git a/src/components/SQForm/SQFormResetButtonWithConfirmation.tsx b/src/components/SQForm/SQFormResetButtonWithConfirmation.tsx index 5fd58d2f..a0157a57 100644 --- a/src/components/SQForm/SQFormResetButtonWithConfirmation.tsx +++ b/src/components/SQForm/SQFormResetButtonWithConfirmation.tsx @@ -27,13 +27,13 @@ function SQFormResetButtonWithConfirmation({ confirmationContent, confirmationTitle = 'Reset Form', variant = 'contained', - onReset + onReset, }: SQFormResetButtonWithConfirmationProps): JSX.Element { const {isDialogOpen, openDialog, closeDialog} = useDialog(); const {dirty, handleReset} = useFormButton({ isDisabled, buttonType: BUTTON_TYPES.RESET, - shouldRequireFieldUpdates: false + shouldRequireFieldUpdates: false, }); const handlePrimaryButtonClick = () => { diff --git a/src/components/SQForm/useFormButton.js b/src/components/SQForm/useFormButton.js deleted file mode 100644 index 4d34f57e..00000000 --- a/src/components/SQForm/useFormButton.js +++ /dev/null @@ -1,60 +0,0 @@ -import React from 'react'; -import {useFormikContext} from 'formik'; -import {useDebouncedCallback} from 'use-debounce'; - -export const BUTTON_TYPES = { - SUBMIT: 'submit', - RESET: 'reset', -}; - -export function useFormButton({ - isDisabled = false, - shouldRequireFieldUpdates = false, - onClick, - buttonType, -}) { - const {values, initialValues, isValid, dirty, ...rest} = useFormikContext(); - - const isButtonDisabled = React.useMemo(() => { - if (isDisabled) { - return true; - } - - if (buttonType === BUTTON_TYPES.SUBMIT) { - if (!isValid) { - return true; - } - - if (shouldRequireFieldUpdates && !dirty) { - return true; - } - } - - if (buttonType === BUTTON_TYPES.RESET) { - if (!dirty) { - return true; - } - } - - return false; - }, [isDisabled, isValid, shouldRequireFieldUpdates, buttonType, dirty]); - - const handleClick = useDebouncedCallback( - (...args) => onClick?.(...args), - 500, - { - leading: true, - trailing: false, - } - ); - - return { - isButtonDisabled, - values, - initialValues, - isValid, - handleClick, - dirty, - ...rest, - }; -} diff --git a/stories/__tests__/SQFormInclusionList.stories.test.js b/stories/__tests__/SQFormInclusionList.stories.test.js index a1647a80..fb1b278d 100644 --- a/stories/__tests__/SQFormInclusionList.stories.test.js +++ b/stories/__tests__/SQFormInclusionList.stories.test.js @@ -31,13 +31,13 @@ describe('SQFormInclusionList Tests', () => { }); it('does not have any checked boxes when initial value is empty', () => { - const SQFormProps = { + const sqFormProps = { initialValues: { friends: [], }, }; - render(); + render(); const checkboxes = screen.getAllByRole('checkbox'); @@ -98,8 +98,8 @@ describe('SQFormInclusionList Tests', () => { expect(noCheckboxesChecked).toHaveLength(0); }); - it('displays required when field is required', () => { - const SQFormProps = { + it('displays required when field is required', async () => { + const sqFormProps = { initialValues: { friends: [], }, @@ -108,16 +108,18 @@ describe('SQFormInclusionList Tests', () => { }, }; - render(); + render(); const submitButton = screen.getByRole('button', {name: /form submission/i}); - expect(submitButton).toBeDisabled(); + await waitFor(() => { + expect(submitButton).toBeDisabled(); + }); //TODO: Add in check for 'required' text when that issue is resolved }); it('displays as not required when field is filled out', async () => { - const SQFormProps = { + const sqFormProps = { initialValues: { friends: [], }, @@ -126,7 +128,7 @@ describe('SQFormInclusionList Tests', () => { }, }; - render(); + render(); const jim = screen.getByLabelText('Jim'); userEvent.click(jim);