diff --git a/.vscode/launch.json b/.vscode/launch.json index d47906f142..20a4d8e896 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,14 +5,14 @@ "version": "0.2.0", "configurations": [ { - "name": "Launch Chrome", + "name": "Launch Chrome: Admin UI", "request": "launch", "type": "chrome", "url": "http://localhost:3000", "webRoot": "${workspaceFolder}/clients/admin-ui" }, { - "name": "Attach to Chrome", + "name": "Attach to Chrome: Admin UI", "port": 9222, "request": "attach", "type": "chrome", diff --git a/CHANGELOG.md b/CHANGELOG.md index 3646299396..13161d3b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,9 @@ The types of changes are: * Dataset generation enhancements using Fides Classify for Plus users: * Integrate Fides Plus API into placeholder features introduced in 1.9.0. [#1194](https://github.com/ethyca/fides/pull/1194) +* Fides Admin UI: + * Configure Connector after creation [#1204](https://github.com/ethyca/fides/pull/1356) + ### Fixed * Privacy Center: * Handle error on startup if server isn't running [#1239](https://github.com/ethyca/fides/pull/1239) diff --git a/clients/admin-ui/.eslintrc.json b/clients/admin-ui/.eslintrc.json index 4ad04f5aa8..df4e3a22eb 100644 --- a/clients/admin-ui/.eslintrc.json +++ b/clients/admin-ui/.eslintrc.json @@ -12,6 +12,8 @@ "tsconfigRootDir": "./" }, "rules": { + "curly": ["error", "all"], + "nonblock-statement-body-position": ["error", "below"], // causes bug in re-exporting default exports, see // https://github.com/eslint/eslint/issues/15617 "no-restricted-exports": [0], diff --git a/clients/admin-ui/package-lock.json b/clients/admin-ui/package-lock.json index 901a4d6d2f..af800076f1 100644 --- a/clients/admin-ui/package-lock.json +++ b/clients/admin-ui/package-lock.json @@ -25,7 +25,7 @@ "immer": "^9.0.15", "js-yaml": "^4.1.0", "lodash.debounce": "^4.0.8", - "msw": "^0.43.0", + "msw": "^0.47.4", "narrow-minded": "^1.1.1", "next": "12.1.0", "next-redux-wrapper": "^7.0.5", @@ -3798,8 +3798,9 @@ } }, "node_modules/@mswjs/cookies": { - "version": "0.2.1", - "license": "MIT", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz", + "integrity": "sha512-mlN83YSrcFgk7Dm1Mys40DLssI1KdJji2CMKN8eOlBqsTADYzj2+jWzsANsUTFbxDMWPD5e9bfA1RGqBpS3O1g==", "dependencies": { "@types/set-cookie-parser": "^2.4.0", "set-cookie-parser": "^2.4.6" @@ -3809,15 +3810,18 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.16.4", - "license": "MIT", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.6.tgz", + "integrity": "sha512-201pBIWehTURb6q8Gheu4Zhvd3Ox1U4BJq5KiOQsYzkWyfiOG4pwcz5hPZIEryztgrf8/sdwABpvY757xMmfrQ==", "dependencies": { "@open-draft/until": "^1.0.3", - "@xmldom/xmldom": "^0.7.5", + "@types/debug": "^4.1.7", + "@xmldom/xmldom": "^0.8.3", "debug": "^4.3.3", - "headers-polyfill": "^3.0.4", + "headers-polyfill": "^3.1.0", "outvariant": "^1.2.1", - "strict-event-emitter": "^0.2.4" + "strict-event-emitter": "^0.2.4", + "web-encoding": "^1.1.5" }, "engines": { "node": ">=14" @@ -3910,7 +3914,8 @@ }, "node_modules/@open-draft/until": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-1.0.3.tgz", + "integrity": "sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==" }, "node_modules/@polka/url": { "version": "1.0.0-next.21", @@ -4174,6 +4179,14 @@ "version": "0.4.1", "license": "MIT" }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/eslint": { "version": "8.4.6", "license": "MIT", @@ -4309,6 +4322,11 @@ "@types/lodash": "*" } }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "node_modules/@types/node": { "version": "17.0.10", "license": "MIT" @@ -4366,7 +4384,8 @@ }, "node_modules/@types/set-cookie-parser": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/set-cookie-parser/-/set-cookie-parser-2.4.2.tgz", + "integrity": "sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==", "dependencies": { "@types/node": "*" } @@ -4776,8 +4795,9 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.7.5", - "license": "MIT", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.3.tgz", + "integrity": "sha512-Lv2vySXypg4nfa51LY1nU8yDAGo/5YwF+EY/rUZgIbfvwVARcd67ttCM8SMsTeJy51YhHYavEq+FS6R0hW9PFQ==", "engines": { "node": ">=10.0.0" } @@ -4792,6 +4812,12 @@ "license": "Apache-2.0", "peer": true }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "node_modules/abab": { "version": "2.0.5", "dev": true, @@ -5130,6 +5156,17 @@ "node": ">= 4.5.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "dev": true, @@ -5441,7 +5478,6 @@ }, "node_modules/call-bind": { "version": "1.0.2", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.1", @@ -6149,14 +6185,18 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "dev": true, - "license": "MIT", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/delayed-stream": { @@ -6325,30 +6365,34 @@ } }, "node_modules/es-abstract": { - "version": "1.19.1", - "dev": true, - "license": "MIT", + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6364,7 +6408,6 @@ }, "node_modules/es-to-primitive": { "version": "1.2.1", - "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.1.4", @@ -7227,6 +7270,14 @@ "node": ">=10" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "dev": true, @@ -7364,11 +7415,36 @@ "version": "1.1.1", "license": "MIT" }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "dev": true, "license": "MIT" }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "license": "MIT", @@ -7384,13 +7460,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "dev": true, - "license": "MIT", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7424,7 +7500,6 @@ }, "node_modules/get-symbol-description": { "version": "1.0.0", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -7604,9 +7679,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "dev": true, - "license": "MIT", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7618,10 +7693,21 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { - "version": "1.0.2", - "dev": true, - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -7631,7 +7717,6 @@ }, "node_modules/has-tostringtag": { "version": "1.0.0", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" @@ -7644,8 +7729,9 @@ } }, "node_modules/headers-polyfill": { - "version": "3.0.7", - "license": "MIT" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", + "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==" }, "node_modules/hey-listen": { "version": "1.0.8", @@ -7880,7 +7966,6 @@ }, "node_modules/internal-slot": { "version": "1.0.3", - "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.0", @@ -7898,14 +7983,29 @@ "loose-envify": "^1.0.0" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "license": "MIT" }, "node_modules/is-bigint": { "version": "1.0.4", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dependencies": { "has-bigints": "^1.0.1" }, @@ -7925,8 +8025,8 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -7939,9 +8039,9 @@ } }, "node_modules/is-callable": { - "version": "1.2.4", - "dev": true, - "license": "MIT", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "engines": { "node": ">= 0.4" }, @@ -7972,7 +8072,6 @@ }, "node_modules/is-date-object": { "version": "1.0.5", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -8006,6 +8105,20 @@ "node": ">=6" } }, + "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", "license": "MIT", @@ -8040,7 +8153,6 @@ }, "node_modules/is-negative-zero": { "version": "2.0.2", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -8061,9 +8173,9 @@ } }, "node_modules/is-number-object": { - "version": "1.0.6", - "dev": true, - "license": "MIT", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8089,7 +8201,6 @@ }, "node_modules/is-regex": { "version": "1.1.4", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -8103,9 +8214,12 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "dev": true, - "license": "MIT", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8123,7 +8237,6 @@ }, "node_modules/is-string": { "version": "1.0.7", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -8137,7 +8250,6 @@ }, "node_modules/is-symbol": { "version": "1.0.4", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" @@ -8149,6 +8261,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "dev": true, @@ -8166,7 +8296,6 @@ }, "node_modules/is-weakref": { "version": "1.0.2", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2" @@ -9675,20 +9804,21 @@ "license": "MIT" }, "node_modules/msw": { - "version": "0.43.1", + "version": "0.47.4", + "resolved": "https://registry.npmjs.org/msw/-/msw-0.47.4.tgz", + "integrity": "sha512-Psftt8Yfl0+l+qqg9OlmKEsxF8S/vtda0CmlR6y8wTaWrMMzuCDa55n2hEGC0ZRDwuV6FFWc/4CjoDsBpATKBw==", "hasInstallScript": true, - "license": "MIT", "dependencies": { - "@mswjs/cookies": "^0.2.0", - "@mswjs/interceptors": "^0.16.3", + "@mswjs/cookies": "^0.2.2", + "@mswjs/interceptors": "^0.17.5", "@open-draft/until": "^1.0.3", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", "chalk": "4.1.1", "chokidar": "^3.4.2", "cookie": "^0.4.2", - "graphql": "^16.3.0", - "headers-polyfill": "^3.0.4", + "graphql": "^15.0.0 || ^16.0.0", + "headers-polyfill": "^3.1.0", "inquirer": "^8.2.0", "is-node-process": "^1.0.1", "js-levenshtein": "^1.1.6", @@ -9696,8 +9826,8 @@ "outvariant": "^1.3.0", "path-to-regexp": "^6.2.0", "statuses": "^2.0.0", - "strict-event-emitter": "^0.2.0", - "type-fest": "^1.2.2", + "strict-event-emitter": "^0.2.6", + "type-fest": "^2.19.0", "yargs": "^17.3.1" }, "bin": { @@ -9711,7 +9841,7 @@ "url": "https://opencollective.com/mswjs" }, "peerDependencies": { - "typescript": ">= 4.2.x <= 4.7.x" + "typescript": ">= 4.2.x <= 4.8.x" }, "peerDependenciesMeta": { "typescript": { @@ -9756,10 +9886,11 @@ "license": "MIT" }, "node_modules/msw/node_modules/type-fest": { - "version": "1.4.0", - "license": "(MIT OR CC0-1.0)", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9942,29 +10073,28 @@ } }, "node_modules/object-inspect": { - "version": "1.12.0", - "dev": true, - "license": "MIT", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.2", - "dev": true, - "license": "MIT", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -10144,7 +10274,8 @@ }, "node_modules/outvariant": { "version": "1.3.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.3.0.tgz", + "integrity": "sha512-yeWM9k6UPfG/nzxdaPlJkB2p08hCg4xP6Lx99F+vP8YF7xyZVfTmJjrrNalkmzudD4WFvNLVudQikqUmF8zhVQ==" }, "node_modules/p-limit": { "version": "1.3.0", @@ -10798,12 +10929,13 @@ "license": "MIT" }, "node_modules/regexp.prototype.flags": { - "version": "1.4.1", - "dev": true, - "license": "MIT", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -10970,6 +11102,19 @@ "version": "5.1.2", "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "license": "MIT" @@ -11025,8 +11170,9 @@ } }, "node_modules/set-cookie-parser": { - "version": "2.4.8", - "license": "MIT" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz", + "integrity": "sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -11049,7 +11195,6 @@ }, "node_modules/side-channel": { "version": "1.0.4", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.0", @@ -11202,8 +11347,9 @@ } }, "node_modules/strict-event-emitter": { - "version": "0.2.4", - "license": "MIT", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.2.7.tgz", + "integrity": "sha512-TavbHJ87WD2tDbKI7bTrmc6U4J4Qjh8E9fVvFkIFw2gCu34Wxstn2Yas0+4D78FJN8DOTEzxiT+udBdraRk4UQ==", "dependencies": { "events": "^3.3.0" } @@ -11280,24 +11426,26 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "dev": true, - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "dev": true, - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11738,13 +11886,13 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "dev": true, - "license": "MIT", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -11818,6 +11966,19 @@ "react": "^16.8.0 || ^17.0.0" } }, + "node_modules/util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "license": "MIT" @@ -11914,6 +12075,17 @@ "defaults": "^1.0.3" } }, + "node_modules/web-encoding": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/web-encoding/-/web-encoding-1.1.5.tgz", + "integrity": "sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==", + "dependencies": { + "util": "^0.12.3" + }, + "optionalDependencies": { + "@zxing/text-encoding": "0.9.0" + } + }, "node_modules/webidl-conversions": { "version": "6.1.0", "dev": true, @@ -12081,8 +12253,8 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -12094,6 +12266,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "dev": true, @@ -14948,21 +15139,27 @@ } }, "@mswjs/cookies": { - "version": "0.2.1", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz", + "integrity": "sha512-mlN83YSrcFgk7Dm1Mys40DLssI1KdJji2CMKN8eOlBqsTADYzj2+jWzsANsUTFbxDMWPD5e9bfA1RGqBpS3O1g==", "requires": { "@types/set-cookie-parser": "^2.4.0", "set-cookie-parser": "^2.4.6" } }, "@mswjs/interceptors": { - "version": "0.16.4", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.6.tgz", + "integrity": "sha512-201pBIWehTURb6q8Gheu4Zhvd3Ox1U4BJq5KiOQsYzkWyfiOG4pwcz5hPZIEryztgrf8/sdwABpvY757xMmfrQ==", "requires": { "@open-draft/until": "^1.0.3", - "@xmldom/xmldom": "^0.7.5", + "@types/debug": "^4.1.7", + "@xmldom/xmldom": "^0.8.3", "debug": "^4.3.3", - "headers-polyfill": "^3.0.4", + "headers-polyfill": "^3.1.0", "outvariant": "^1.2.1", - "strict-event-emitter": "^0.2.4" + "strict-event-emitter": "^0.2.4", + "web-encoding": "^1.1.5" } }, "@next/bundle-analyzer": { @@ -15021,7 +15218,9 @@ } }, "@open-draft/until": { - "version": "1.0.3" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-1.0.3.tgz", + "integrity": "sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==" }, "@polka/url": { "version": "1.0.0-next.21", @@ -15200,6 +15399,14 @@ "@types/cookie": { "version": "0.4.1" }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "requires": { + "@types/ms": "*" + } + }, "@types/eslint": { "version": "8.4.6", "peer": true, @@ -15309,6 +15516,11 @@ "@types/lodash": "*" } }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "@types/node": { "version": "17.0.10" }, @@ -15357,6 +15569,8 @@ }, "@types/set-cookie-parser": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/set-cookie-parser/-/set-cookie-parser-2.4.2.tgz", + "integrity": "sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==", "requires": { "@types/node": "*" } @@ -15630,7 +15844,9 @@ } }, "@xmldom/xmldom": { - "version": "0.7.5" + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.3.tgz", + "integrity": "sha512-Lv2vySXypg4nfa51LY1nU8yDAGo/5YwF+EY/rUZgIbfvwVARcd67ttCM8SMsTeJy51YhHYavEq+FS6R0hW9PFQ==" }, "@xtuc/ieee754": { "version": "1.2.0", @@ -15640,6 +15856,12 @@ "version": "4.2.2", "peer": true }, + "@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "abab": { "version": "2.0.5", "dev": true @@ -15832,6 +16054,11 @@ "version": "2.1.2", "dev": true }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, "aws-sign2": { "version": "0.7.0", "dev": true @@ -16021,7 +16248,6 @@ }, "call-bind": { "version": "1.0.2", - "dev": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -16466,10 +16692,12 @@ } }, "define-properties": { - "version": "1.1.3", - "dev": true, + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "requires": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "delayed-stream": { @@ -16583,29 +16811,34 @@ } }, "es-abstract": { - "version": "1.19.1", - "dev": true, + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" } }, "es-module-lexer": { @@ -16614,7 +16847,6 @@ }, "es-to-primitive": { "version": "1.2.1", - "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -17181,6 +17413,14 @@ "tslib": "^2.0.3" } }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "forever-agent": { "version": "0.6.1", "dev": true @@ -17268,10 +17508,26 @@ "function-bind": { "version": "1.1.1" }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, "functional-red-black-tree": { "version": "1.0.1", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, "gensync": { "version": "1.0.0-beta.2" }, @@ -17279,12 +17535,13 @@ "version": "2.0.5" }, "get-intrinsic": { - "version": "1.1.1", - "dev": true, + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" } }, "get-nonce": { @@ -17300,7 +17557,6 @@ }, "get-symbol-description": { "version": "1.0.0", - "dev": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -17410,25 +17666,36 @@ } }, "has-bigints": { - "version": "1.0.1", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" }, "has-flag": { "version": "4.0.0" }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { - "version": "1.0.2", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { "version": "1.0.0", - "dev": true, "requires": { "has-symbols": "^1.0.2" } }, "headers-polyfill": { - "version": "3.0.7" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", + "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==" }, "hey-listen": { "version": "1.0.8" @@ -17570,7 +17837,6 @@ }, "internal-slot": { "version": "1.0.3", - "dev": true, "requires": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -17583,12 +17849,22 @@ "loose-envify": "^1.0.0" } }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1" }, "is-bigint": { "version": "1.0.4", - "dev": true, + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "requires": { "has-bigints": "^1.0.1" } @@ -17601,15 +17877,17 @@ }, "is-boolean-object": { "version": "1.1.2", - "dev": true, + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" } }, "is-callable": { - "version": "1.2.4", - "dev": true + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" }, "is-ci": { "version": "3.0.1", @@ -17626,7 +17904,6 @@ }, "is-date-object": { "version": "1.0.5", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -17641,6 +17918,14 @@ "version": "2.1.0", "dev": true }, + "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==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "requires": { @@ -17659,8 +17944,7 @@ "version": "1.0.0" }, "is-negative-zero": { - "version": "2.0.2", - "dev": true + "version": "2.0.2" }, "is-node-process": { "version": "1.0.1" @@ -17669,8 +17953,9 @@ "version": "7.0.0" }, "is-number-object": { - "version": "1.0.6", - "dev": true, + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "requires": { "has-tostringtag": "^1.0.0" } @@ -17685,15 +17970,18 @@ }, "is-regex": { "version": "1.1.4", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" } }, "is-shared-array-buffer": { - "version": "1.0.1", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "requires": { + "call-bind": "^1.0.2" + } }, "is-stream": { "version": "2.0.1", @@ -17701,18 +17989,28 @@ }, "is-string": { "version": "1.0.7", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } }, "is-symbol": { "version": "1.0.4", - "dev": true, "requires": { "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "dev": true @@ -17722,7 +18020,6 @@ }, "is-weakref": { "version": "1.0.2", - "dev": true, "requires": { "call-bind": "^1.0.2" } @@ -18734,18 +19031,20 @@ "version": "2.1.2" }, "msw": { - "version": "0.43.1", + "version": "0.47.4", + "resolved": "https://registry.npmjs.org/msw/-/msw-0.47.4.tgz", + "integrity": "sha512-Psftt8Yfl0+l+qqg9OlmKEsxF8S/vtda0CmlR6y8wTaWrMMzuCDa55n2hEGC0ZRDwuV6FFWc/4CjoDsBpATKBw==", "requires": { - "@mswjs/cookies": "^0.2.0", - "@mswjs/interceptors": "^0.16.3", + "@mswjs/cookies": "^0.2.2", + "@mswjs/interceptors": "^0.17.5", "@open-draft/until": "^1.0.3", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", "chalk": "4.1.1", "chokidar": "^3.4.2", "cookie": "^0.4.2", - "graphql": "^16.3.0", - "headers-polyfill": "^3.0.4", + "graphql": "^15.0.0 || ^16.0.0", + "headers-polyfill": "^3.1.0", "inquirer": "^8.2.0", "is-node-process": "^1.0.1", "js-levenshtein": "^1.1.6", @@ -18753,8 +19052,8 @@ "outvariant": "^1.3.0", "path-to-regexp": "^6.2.0", "statuses": "^2.0.0", - "strict-event-emitter": "^0.2.0", - "type-fest": "^1.2.2", + "strict-event-emitter": "^0.2.6", + "type-fest": "^2.19.0", "yargs": "^17.3.1" }, "dependencies": { @@ -18775,7 +19074,9 @@ "version": "0.0.3" }, "type-fest": { - "version": "1.4.0" + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" }, "webidl-conversions": { "version": "3.0.1" @@ -18883,20 +19184,21 @@ "version": "4.1.1" }, "object-inspect": { - "version": "1.12.0", - "dev": true + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" }, "object-keys": { - "version": "1.1.1", - "dev": true + "version": "1.1.1" }, "object.assign": { - "version": "4.1.2", - "dev": true, + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, @@ -19006,7 +19308,9 @@ "dev": true }, "outvariant": { - "version": "1.3.0" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.3.0.tgz", + "integrity": "sha512-yeWM9k6UPfG/nzxdaPlJkB2p08hCg4xP6Lx99F+vP8YF7xyZVfTmJjrrNalkmzudD4WFvNLVudQikqUmF8zhVQ==" }, "p-limit": { "version": "1.3.0", @@ -19392,11 +19696,13 @@ "version": "0.13.9" }, "regexp.prototype.flags": { - "version": "1.4.1", - "dev": true, + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" } }, "regexpp": { @@ -19485,6 +19791,16 @@ "safe-buffer": { "version": "5.1.2" }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2" }, @@ -19521,7 +19837,9 @@ } }, "set-cookie-parser": { - "version": "2.4.8" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz", + "integrity": "sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==" }, "shebang-command": { "version": "2.0.0", @@ -19536,7 +19854,6 @@ }, "side-channel": { "version": "1.0.4", - "dev": true, "requires": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -19638,7 +19955,9 @@ "version": "2.0.1" }, "strict-event-emitter": { - "version": "0.2.4", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.2.7.tgz", + "integrity": "sha512-TavbHJ87WD2tDbKI7bTrmc6U4J4Qjh8E9fVvFkIFw2gCu34Wxstn2Yas0+4D78FJN8DOTEzxiT+udBdraRk4UQ==", "requires": { "events": "^3.3.0" } @@ -19690,19 +20009,23 @@ } }, "string.prototype.trimend": { - "version": "1.0.4", - "dev": true, + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "string.prototype.trimstart": { - "version": "1.0.4", - "dev": true, + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "strip-ansi": { @@ -19959,12 +20282,13 @@ "optional": true }, "unbox-primitive": { - "version": "1.0.1", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, @@ -20004,6 +20328,19 @@ "object-assign": "^4.1.1" } }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2" }, @@ -20074,6 +20411,15 @@ "defaults": "^1.0.3" } }, + "web-encoding": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/web-encoding/-/web-encoding-1.1.5.tgz", + "integrity": "sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==", + "requires": { + "@zxing/text-encoding": "0.9.0", + "util": "^0.12.3" + } + }, "webidl-conversions": { "version": "6.1.0", "dev": true @@ -20182,7 +20528,8 @@ }, "which-boxed-primitive": { "version": "1.0.2", - "dev": true, + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "requires": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -20191,6 +20538,19 @@ "is-symbol": "^1.0.3" } }, + "which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + } + }, "word-wrap": { "version": "1.2.3", "dev": true diff --git a/clients/admin-ui/package.json b/clients/admin-ui/package.json index 2ede6c5d7f..343a841905 100644 --- a/clients/admin-ui/package.json +++ b/clients/admin-ui/package.json @@ -44,11 +44,11 @@ "immer": "^9.0.15", "js-yaml": "^4.1.0", "lodash.debounce": "^4.0.8", - "msw": "^0.43.0", + "msw": "^0.47.4", "narrow-minded": "^1.1.1", "next": "12.1.0", - "next-remove-imports": "^1.0.7", "next-redux-wrapper": "^7.0.5", + "next-remove-imports": "^1.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", "react-feature-flags": "^1.0.0", diff --git a/clients/admin-ui/src/app/store.ts b/clients/admin-ui/src/app/store.ts index 4e9b2d4386..92384a8737 100644 --- a/clients/admin-ui/src/app/store.ts +++ b/clients/admin-ui/src/app/store.ts @@ -58,7 +58,6 @@ import { reducer as systemReducer, systemApi } from "~/features/system"; import { reducer as taxonomyReducer, taxonomyApi } from "~/features/taxonomy"; import { reducer as userReducer } from "~/features/user"; -// import { createWrapper } from "next-redux-wrapper"; import { authApi, AuthState, reducer as authReducer } from "../features/auth"; /** @@ -84,36 +83,36 @@ const storage = : createNoopStorage(); const reducer = { - [privacyRequestApi.reducerPath]: privacyRequestApi.reducer, - subjectRequests: privacyRequestsReducer, - [userApi.reducerPath]: userApi.reducer, [authApi.reducerPath]: authApi.reducer, - userManagement: userManagementReducer, + [connectionTypeApi.reducerPath]: connectionTypeApi.reducer, + [dataQualifierApi.reducerPath]: dataQualifierApi.reducer, + [dataSubjectsApi.reducerPath]: dataSubjectsApi.reducer, + [dataUseApi.reducerPath]: dataUseApi.reducer, + [datasetApi.reducerPath]: datasetApi.reducer, [datastoreConnectionApi.reducerPath]: datastoreConnectionApi.reducer, - datastoreConnections: datastoreConnectionReducer, + [datastoreConnectionApi.reducerPath]: datastoreConnectionApi.reducer, + [organizationApi.reducerPath]: organizationApi.reducer, + [plusApi.reducerPath]: plusApi.reducer, + [privacyRequestApi.reducerPath]: privacyRequestApi.reducer, + [scannerApi.reducerPath]: scannerApi.reducer, + [systemApi.reducerPath]: systemApi.reducer, + [taxonomyApi.reducerPath]: taxonomyApi.reducer, + [userApi.reducerPath]: userApi.reducer, + [userApi.reducerPath]: userApi.reducer, auth: authReducer, - [connectionTypeApi.reducerPath]: connectionTypeApi.reducer, - connectionType: connectionTypeReducer, configWizard: configWizardReducer, - user: userReducer, - dataset: datasetReducer, - taxonomy: taxonomyReducer, + connectionType: connectionTypeReducer, dataQualifier: dataQualifierReducer, dataSubjects: dataSubjectsReducer, dataUse: dataUseReducer, + dataset: datasetReducer, + datastoreConnections: datastoreConnectionReducer, organization: organizationReducer, + subjectRequests: privacyRequestsReducer, system: systemReducer, - [datasetApi.reducerPath]: datasetApi.reducer, - [organizationApi.reducerPath]: organizationApi.reducer, - [scannerApi.reducerPath]: scannerApi.reducer, - [systemApi.reducerPath]: systemApi.reducer, - [taxonomyApi.reducerPath]: taxonomyApi.reducer, - [dataQualifierApi.reducerPath]: dataQualifierApi.reducer, - [dataSubjectsApi.reducerPath]: dataSubjectsApi.reducer, - [dataUseApi.reducerPath]: dataUseApi.reducer, - [plusApi.reducerPath]: plusApi.reducer, - [datastoreConnectionApi.reducerPath]: datastoreConnectionApi.reducer, - [userApi.reducerPath]: userApi.reducer, + taxonomy: taxonomyReducer, + user: userReducer, + userManagement: userManagementReducer, }; const allReducers = combineReducers(reducer); @@ -140,10 +139,10 @@ const persistConfig = { authApi.reducerPath, connectionTypeApi.reducerPath, dataQualifierApi.reducerPath, - datasetApi.reducerPath, - datastoreConnectionApi.reducerPath, dataSubjectsApi.reducerPath, dataUseApi.reducerPath, + datasetApi.reducerPath, + datastoreConnectionApi.reducerPath, organizationApi.reducerPath, plusApi.reducerPath, privacyRequestApi.reducerPath, @@ -167,20 +166,20 @@ export const makeStore = (preloadedState?: Partial) => ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], }, }).concat( - privacyRequestApi.middleware, - userApi.middleware, authApi.middleware, - datastoreConnectionApi.middleware, connectionTypeApi.middleware, + dataQualifierApi.middleware, + dataSubjectsApi.middleware, + dataUseApi.middleware, datasetApi.middleware, + datastoreConnectionApi.middleware, organizationApi.middleware, + plusApi.middleware, + privacyRequestApi.middleware, scannerApi.middleware, systemApi.middleware, taxonomyApi.middleware, - dataQualifierApi.middleware, - dataSubjectsApi.middleware, - dataUseApi.middleware, - plusApi.middleware + userApi.middleware ), devTools: true, preloadedState, @@ -212,4 +211,3 @@ export const persistor = persistStore(store); setupListeners(store.dispatch); export default store; -// export const wrapper = createWrapper(makeStore); diff --git a/clients/admin-ui/src/features/common/dropdown/MultiSelectDropdownList.tsx b/clients/admin-ui/src/features/common/dropdown/MultiSelectDropdownList.tsx index e6e8561b85..7f4d372585 100644 --- a/clients/admin-ui/src/features/common/dropdown/MultiSelectDropdownList.tsx +++ b/clients/admin-ui/src/features/common/dropdown/MultiSelectDropdownList.tsx @@ -1,4 +1,5 @@ import { + Box, Button, Checkbox, CheckboxGroup, @@ -76,34 +77,36 @@ const MultiSelectDropdownList: React.FC = ({ {/* MenuItems are not rendered unless Menu is open */} - - {[...items].sort().map(([key]) => ( - - + + {[...items].sort().map(([key]) => ( + - {key} - - - ))} - + + {key} + + + ))} + + ); }; diff --git a/clients/admin-ui/src/features/connection-type/connection-type.slice.ts b/clients/admin-ui/src/features/connection-type/connection-type.slice.ts index 97b0ac7b2e..a5fc2a880d 100644 --- a/clients/admin-ui/src/features/connection-type/connection-type.slice.ts +++ b/clients/admin-ui/src/features/connection-type/connection-type.slice.ts @@ -1,17 +1,20 @@ -import { createSlice, PayloadAction } from "@reduxjs/toolkit"; +import { createSelector, createSlice, PayloadAction } from "@reduxjs/toolkit"; import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/dist/query/react"; import { addCommonHeaders } from "common/CommonHeaders"; import { STEPS } from "datastore-connections/add-connection/constants"; import { AddConnectionStep } from "datastore-connections/add-connection/types"; -import { SystemType } from "datastore-connections/constants"; import { DatastoreConnection } from "datastore-connections/types"; +import { + ConnectionSystemTypeMap, + Page_ConnectionSystemTypeMap_, + SystemType, +} from "~/types/api"; + import type { RootState } from "../../app/store"; import { BASE_URL, CONNECTION_TYPE_ROUTE } from "../../constants"; import { selectToken } from "../auth"; import { - AllConnectionTypesResponse, - ConnectionOption, ConnectionTypeParams, ConnectionTypeSecretSchemaReponse, ConnectionTypeState, @@ -37,6 +40,7 @@ const mapFiltersToSearchParams = ({ const initialState: ConnectionTypeState = { connection: undefined, connectionOption: undefined, + connectionOptions: [], search: "", step: STEPS.find((step) => step.stepId === 1)!, system_type: undefined, @@ -46,6 +50,7 @@ export const connectionTypeSlice = createSlice({ name: "connectionType", initialState, reducers: { + reset: () => initialState, setConnection: ( state, action: PayloadAction @@ -55,11 +60,18 @@ export const connectionTypeSlice = createSlice({ }), setConnectionOption: ( state, - action: PayloadAction + action: PayloadAction ) => ({ ...state, connectionOption: action.payload, }), + setConnectionOptions: ( + state, + action: PayloadAction + ) => ({ + ...state, + connectionOptions: action.payload, + }), setSearch: (state, action: PayloadAction) => ({ ...state, search: action.payload, @@ -76,8 +88,10 @@ export const connectionTypeSlice = createSlice({ }); export const { + reset, setConnection, setConnectionOption, + setConnectionOptions, setSearch, setStep, setSystemType, @@ -107,7 +121,7 @@ export const connectionTypeApi = createApi({ tagTypes: ["ConnectionType"], endpoints: (build) => ({ getAllConnectionTypes: build.query< - AllConnectionTypesResponse, + Page_ConnectionSystemTypeMap_, Partial >({ query: (filters) => ({ @@ -131,3 +145,10 @@ export const { useGetAllConnectionTypesQuery, useGetConnectionTypeSecretSchemaQuery, } = connectionTypeApi; + +export const selectConnectionTypes = createSelector( + connectionTypeApi.endpoints.getAllConnectionTypes.select({ + search: "", + }), + ({ data }) => data?.items ?? [] +); diff --git a/clients/admin-ui/src/features/connection-type/types.ts b/clients/admin-ui/src/features/connection-type/types.ts index 4df0c94bd5..1dd3044354 100644 --- a/clients/admin-ui/src/features/connection-type/types.ts +++ b/clients/admin-ui/src/features/connection-type/types.ts @@ -1,23 +1,7 @@ import { AddConnectionStep } from "datastore-connections/add-connection/types"; -import { - ConnectionType, - SaasType, - SystemType, -} from "datastore-connections/constants"; import { DatastoreConnection } from "datastore-connections/types"; -export type AllConnectionTypesResponse = { - items: ConnectionOption[]; - total: number; - page: number; - size: number; -}; - -export type ConnectionOption = { - identifier: ConnectionType | SaasType; - human_readable: string; - type: SystemType; -}; +import { ConnectionSystemTypeMap, SystemType } from "~/types/api"; export type ConnectionTypeParams = { search: string; @@ -45,6 +29,7 @@ export type ConnectionTypeSecretSchemaReponse = { export type ConnectionTypeState = ConnectionTypeParams & { connection?: DatastoreConnection; - connectionOption?: ConnectionOption; + connectionOption?: ConnectionSystemTypeMap; + connectionOptions: ConnectionSystemTypeMap[]; step: AddConnectionStep; }; diff --git a/clients/admin-ui/src/features/datastore-connections/ConnectionGridItem.tsx b/clients/admin-ui/src/features/datastore-connections/ConnectionGridItem.tsx index 9a14623dd3..5f6e8d11f3 100644 --- a/clients/admin-ui/src/features/datastore-connections/ConnectionGridItem.tsx +++ b/clients/admin-ui/src/features/datastore-connections/ConnectionGridItem.tsx @@ -1,11 +1,10 @@ import { Box, Button, Flex, Spacer, Text } from "@fidesui/react"; -import { capitalize, formatDate } from "common/utils"; +import { formatDate } from "common/utils"; import React from "react"; import ConnectionMenu from "./ConnectionMenu"; import ConnectionStatusBadge from "./ConnectionStatusBadge"; import ConnectionTypeLogo from "./ConnectionTypeLogo"; -import { ConnectionType } from "./constants"; import { useLazyGetDatastoreConnectionStatusQuery } from "./datastore-connection.slice"; import { DatastoreConnection } from "./types"; @@ -46,36 +45,6 @@ const TestData: React.FC = ({ succeeded, timestamp }) => { ); }; -const useConnectionGridItem = () => { - const getConnectorDisplayName = (connectionType: ConnectionType): string => { - if (Object.values(ConnectionType).includes(connectionType)) { - return `${capitalize(connectionType)} Database Connector`; - } - - let value: string; - switch (connectionType) { - case ConnectionType.HTTPS: - value = "HTTPS Connector"; - break; - case ConnectionType.MANUAL_WEBHOOK: - value = "Manual Connector"; - break; - case ConnectionType.SAAS: - value = "Saas Connector"; - break; - default: - value = "Unknown Connector"; - break; - } - - return value; - }; - - return { - getConnectorDisplayName, - }; -}; - type ConnectionGridItemProps = { connectionData: DatastoreConnection; }; @@ -84,7 +53,6 @@ const ConnectionGridItem: React.FC = ({ connectionData, }) => { const [trigger, result] = useLazyGetDatastoreConnectionStatusQuery(); - const { getConnectorDisplayName } = useConnectionGridItem(); return ( @@ -112,9 +80,8 @@ const ConnectionGridItem: React.FC = ({ /> - {getConnectorDisplayName( - connectionData.connection_type as ConnectionType - )} + {/* If description is empty display empty placeholder */} + {connectionData.description ? connectionData.description :
}
Edited on {formatDate(connectionData.updated_at!)} diff --git a/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx b/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx index 61845890ae..66085ccce2 100644 --- a/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx +++ b/clients/admin-ui/src/features/datastore-connections/ConnectionMenu.tsx @@ -1,8 +1,19 @@ -import { Button, Menu, MenuButton, MenuList, Portal } from "@fidesui/react"; +import { + Button, + Menu, + MenuButton, + MenuItem, + MenuList, + Portal, +} from "@fidesui/react"; import { MoreIcon } from "common/Icon"; +import NextLink from "next/link"; import React from "react"; -import { AccessLevel, ConnectionType } from "./constants"; +import { DATASTORE_CONNECTION_ROUTE } from "~/constants"; +import { ConnectionType } from "~/types/api"; + +import { AccessLevel } from "./constants"; import DeleteConnectionModal from "./DeleteConnectionModal"; import DisableConnectionModal from "./DisableConnectionModal"; @@ -26,7 +37,16 @@ const ConnectionMenu: React.FC = ({ - + + + + Configure + + { + const mounted = useRef(false); + const dispatch = useAppDispatch(); + const { connectionOptions } = useAppSelector(selectConnectionTypeState); const filters = useAppSelector(selectDatastoreConnectionFilters); const [cachedFilters, setCachedFilters] = useState(filters); - const mounted = useRef(false); const updateCachedFilters = useRef( debounce( (updatedFilters: React.SetStateAction) => @@ -25,18 +32,32 @@ const ConnectionsContainer: React.FC = () => { ) ); + const { data: connectionTypesData } = useGetAllConnectionTypesQuery( + { + search: "", + }, + { skip: connectionOptions.length > 0 } + ); + + const { + data: datastoreConnectionsData, + isFetching, + isLoading, + isSuccess, + } = useGetAllDatastoreConnectionsQuery(cachedFilters); + + const hasData = datastoreConnectionsData!?.items?.length > 0; + useEffect(() => { mounted.current = true; + if (connectionOptions.length === 0 && connectionTypesData?.items) { + dispatch(setConnectionOptions(connectionTypesData.items)); + } updateCachedFilters.current(filters); return () => { mounted.current = false; }; - }, [setCachedFilters, filters]); - - const { data, isFetching, isLoading, isSuccess } = - useGetAllDatastoreConnectionsQuery(cachedFilters); - - const hasData = data!?.items?.length > 0; + }, [connectionOptions.length, connectionTypesData?.items, dispatch, filters]); return ( <> @@ -50,7 +71,10 @@ const ConnectionsContainer: React.FC = () => { {mounted.current && isSuccess && (hasData ? ( - + ) : ( ))} diff --git a/clients/admin-ui/src/features/datastore-connections/DisableConnectionModal.tsx b/clients/admin-ui/src/features/datastore-connections/DisableConnectionModal.tsx index aec4cf806d..f61b25a354 100644 --- a/clients/admin-ui/src/features/datastore-connections/DisableConnectionModal.tsx +++ b/clients/admin-ui/src/features/datastore-connections/DisableConnectionModal.tsx @@ -14,7 +14,9 @@ import { } from "@fidesui/react"; import React from "react"; -import { AccessLevel, ConnectionType } from "./constants"; +import { ConnectionType } from "~/types/api"; + +import { AccessLevel } from "./constants"; import { usePatchDatastoreConnectionsMutation } from "./datastore-connection.slice"; type DataConnectionProps = { diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx index 7e975645c6..38b4d2306a 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnection.tsx @@ -14,6 +14,7 @@ import { useAppSelector } from "~/app/hooks"; import ChooseConnection from "./ChooseConnection"; import ConfigureConnector from "./ConfigureConnector"; import { STEPS } from "./constants"; +import { replaceURL } from "./helpers"; import { AddConnectionStep } from "./types"; const AddConnection: React.FC = () => { @@ -21,7 +22,9 @@ const AddConnection: React.FC = () => { const router = useRouter(); const { connectorType, step: currentStep } = router.query; - const { connectionOption, step } = useAppSelector(selectConnectionTypeState); + const { connection, connectionOption, step } = useAppSelector( + selectConnectionTypeState + ); useEffect(() => { if (connectorType) { @@ -31,8 +34,19 @@ const AddConnection: React.FC = () => { const item = STEPS.find((s) => s.stepId === Number(currentStep)); dispatch(setStep(item || STEPS[1])); } + if (!router.query.id && connection?.key) { + replaceURL(connection.key, step.href); + } return () => {}; - }, [connectorType, currentStep, dispatch, router.query.step]); + }, [ + connection?.key, + connectorType, + currentStep, + dispatch, + router.query.id, + router.query.step, + step.href, + ]); const getLabel = useCallback( (s: AddConnectionStep): string => { diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnectionButton.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnectionButton.tsx index 9f09efff32..81a03bd8f3 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnectionButton.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/AddConnectionButton.tsx @@ -1,52 +1,23 @@ -import { Button, Tooltip } from "@fidesui/react"; +import { Button } from "@fidesui/react"; import NextLink from "next/link"; import React from "react"; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { Flags } from "react-feature-flags"; import { STEPS } from "./constants"; const AddConnectionButton: React.FC = () => ( - ( - - - - )} - renderOff={() => ( - - - - )} - /> + + + ); export default AddConnectionButton; diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/Breadcrumb.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/Breadcrumb.tsx index 392a6b204c..8977b42559 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/Breadcrumb.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/Breadcrumb.tsx @@ -5,6 +5,7 @@ import { BreadcrumbLink, } from "@fidesui/react"; import { selectConnectionTypeState } from "connection-type/connection-type.slice"; +import NextLink from "next/link"; import React, { useCallback } from "react"; import { useAppSelector } from "~/app/hooks"; @@ -44,7 +45,9 @@ const Breadcrumb: React.FC = ({ steps }) => { {steps.map((s) => ( {s !== step && ( - {getLabel(s)} + + {getLabel(s)} + )} {s === step && ( { mounted.current = true; return () => { mounted.current = false; - // Reset the connection state when the component is unmounted - dispatch(setConnection(undefined)); + // Reset the connection type slice to its initial state + dispatch(reset()); }; }, [dispatch]); @@ -75,13 +75,15 @@ const ConfigureConnector: React.FC = () => { } // If a connection has been initially created, then auto redirect the user accordingly. - if (connection?.key && canRedirect) { + if (connection?.key) { handleNavChange( connectionOption?.type !== SystemType.MANUAL ? ConfigurationSettings.DATASET_CONFIGURATION : ConfigurationSettings.DSR_CUSTOMIZATION ); - setCanRedirect(false); + if (canRedirect) { + setCanRedirect(false); + } } }, [ canRedirect, diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectionTypeList.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectionTypeList.tsx index f31099aede..1c1f5a9781 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectionTypeList.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectionTypeList.tsx @@ -1,11 +1,12 @@ import { Box, Center, SimpleGrid, Text } from "@fidesui/react"; -import { ConnectionOption } from "connection-type/types"; import ConnectionTypeLogo from "datastore-connections/ConnectionTypeLogo"; import Link from "next/link"; import React from "react"; +import { ConnectionSystemTypeMap } from "~/types/api"; + type ConnectionTypeListProps = { - items: ConnectionOption[]; + items: ConnectionSystemTypeMap[]; }; const ConnectionTypeList: React.FC = ({ items }) => ( diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx index 0e05271bce..e0022cd1a3 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/ConnectorParameters.tsx @@ -3,19 +3,18 @@ import { selectConnectionTypeState, useGetConnectionTypeSecretSchemaQuery, } from "connection-type/connection-type.slice"; -import { SystemType } from "datastore-connections/constants"; import React, { useCallback, useEffect, useRef, useState } from "react"; import { useAppSelector } from "~/app/hooks"; +import { SystemType } from "~/types/api"; import { ConnectorParameters as DatabaseConnectorParameters } from "./database/ConnectorParameters"; -import { replaceURL } from "./helpers"; import { ConnectorParameters as ManualConnectorParameters } from "./manual/ConnectorParameters"; import { ConnectorParameters as SassConnectorParameters } from "./sass/ConnectorParameters"; import TestConnection from "./TestConnection"; type ConnectorParametersProp = { - onConnectionCreated: () => void; + onConnectionCreated?: () => void; }; export const ConnectorParameters: React.FC = ({ @@ -23,9 +22,7 @@ export const ConnectorParameters: React.FC = ({ }) => { const mounted = useRef(false); const [skip, setSkip] = useState(true); - const { connection, connectionOption, step } = useAppSelector( - selectConnectionTypeState - ); + const { connectionOption } = useAppSelector(selectConnectionTypeState); const { data, isFetching, isLoading, isSuccess } = useGetConnectionTypeSecretSchemaQuery(connectionOption!.identifier, { @@ -75,16 +72,13 @@ export const ConnectorParameters: React.FC = ({ useEffect(() => { mounted.current = true; - if (connection?.key) { - replaceURL(connection.key, step.href); - } if (connectionOption?.type !== SystemType.MANUAL) { setSkip(false); } return () => { mounted.current = false; }; - }, [connection?.key, connectionOption?.type, step.href]); + }, [connectionOption?.type]); return ( diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx index 382b68ff2a..acdc7ae63f 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/DatasetConfiguration.tsx @@ -7,21 +7,19 @@ import { } from "datastore-connections/datastore-connection.slice"; import { PatchDatasetsRequest } from "datastore-connections/types"; import { useRouter } from "next/router"; -import React, { useEffect, useRef, useState } from "react"; +import React, { useState } from "react"; import { DATASTORE_CONNECTION_ROUTE } from "src/constants"; import { useAppSelector } from "~/app/hooks"; import YamlEditorForm from "./forms/YamlEditorForm"; -import { replaceURL } from "./helpers"; const DatasetConfiguration: React.FC = () => { - const mounted = useRef(false); const router = useRouter(); const { errorAlert, successAlert } = useAlert(); const { handleError } = useAPIHelper(); const [isSubmitting, setIsSubmitting] = useState(false); - const { connection, step } = useAppSelector(selectConnectionTypeState); + const { connection } = useAppSelector(selectConnectionTypeState); const { data, isFetching, isLoading, isSuccess } = useGetDatasetsQuery( connection!.key ); @@ -48,16 +46,6 @@ const DatasetConfiguration: React.FC = () => { } }; - useEffect(() => { - mounted.current = true; - if (connection?.key) { - replaceURL(connection.key, step.href); - } - return () => { - mounted.current = false; - }; - }, [connection?.key, step.href]); - return ( diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts b/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts index c2075fbcd2..5cfc728bb8 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/constants.ts @@ -1,5 +1,6 @@ import { ItemOption } from "common/dropdown/types"; -import { SystemType } from "datastore-connections/constants"; + +import { SystemType } from "~/types/api"; import { DATASTORE_CONNECTION_ROUTE } from "../../../constants"; import { AddConnectionStep, ConnectorParameterOption } from "./types"; diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/database/ConnectorParameters.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/database/ConnectorParameters.tsx index 74aa4edb16..003e9726ca 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/database/ConnectorParameters.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/database/ConnectorParameters.tsx @@ -6,7 +6,6 @@ import { setConnection, } from "connection-type/connection-type.slice"; import { ConnectionTypeSecretSchemaReponse } from "connection-type/types"; -import { ConnectionType } from "datastore-connections/constants"; import { usePatchDatastoreConnectionMutation, useUpdateDatastoreConnectionSecretsMutation, @@ -19,6 +18,7 @@ import { useState } from "react"; import { useDispatch } from "react-redux"; import { useAppSelector } from "~/app/hooks"; +import { ConnectionType } from "~/types/api"; import ConnectorParametersForm from "../forms/ConnectorParametersForm"; import { formatKey } from "../helpers"; @@ -29,7 +29,7 @@ type ConnectorParametersProps = { /** * Parent callback invoked when a connection is initially created */ - onConnectionCreated: () => void; + onConnectionCreated?: () => void; /** * Parent callback when Test Connection is clicked */ @@ -75,7 +75,6 @@ export const ConnectorParameters: React.FC = ({ if (payload.failed?.length > 0) { errorAlert(payload.failed[0].message); } else { - dispatch(setConnection(payload.succeeded[0])); const params2: DatastoreConnectionSecretsRequest = { connection_key: payload.succeeded[0].key, secrets: {}, @@ -95,10 +94,11 @@ export const ConnectorParameters: React.FC = ({ ); } else { + dispatch(setConnection(payload.succeeded[0])); successAlert( `Connector successfully ${connection?.key ? "updated" : "added"}!` ); - if (!connection?.key) { + if (!connection?.key && onConnectionCreated) { onConnectionCreated(); } } diff --git a/clients/admin-ui/src/features/datastore-connections/add-connection/forms/ConnectorParametersForm.tsx b/clients/admin-ui/src/features/datastore-connections/add-connection/forms/ConnectorParametersForm.tsx index 6652c57efc..cd0957ceb0 100644 --- a/clients/admin-ui/src/features/datastore-connections/add-connection/forms/ConnectorParametersForm.tsx +++ b/clients/admin-ui/src/features/datastore-connections/add-connection/forms/ConnectorParametersForm.tsx @@ -23,12 +23,12 @@ import { ConnectionTypeSecretSchemaProperty, ConnectionTypeSecretSchemaReponse, } from "connection-type/types"; -import { ConnectionType } from "datastore-connections/constants"; import { useLazyGetDatastoreConnectionStatusQuery } from "datastore-connections/datastore-connection.slice"; import { Field, Form, Formik, FormikProps } from "formik"; import React, { useEffect, useRef } from "react"; import { useAppSelector } from "~/app/hooks"; +import { ConnectionType } from "~/types/api"; import { DatabaseConnectorParametersFormFields, @@ -250,6 +250,7 @@ const ConnectorParametersForm: React.FC = ({ return ( = ({