ethyca-fides 2.65.3b1__py2.py3-none-any.whl → 2.65.3b2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/METADATA +1 -1
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/RECORD +155 -155
- fides/_version.py +3 -3
- fides/api/models/fides_user.py +11 -7
- fides/api/models/fides_user_permissions.py +6 -10
- fides/api/service/privacy_request/request_runner_service.py +1 -3
- fides/api/task/manual/manual_task_graph_task.py +23 -0
- fides/api/task/manual/manual_task_utils.py +5 -34
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1817-e2c599fb2c47dbc4.js → 1817-34bd629bf34328ec.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/203-9e86242bde459a43.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3450-ebcffdd4fb437a2e.js → 3450-b7af9fec12e66f7f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3855-a0783ba28c644d09.js → 3855-b914c1a3124f44ea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-18e5da8bda649ddb.js → 3872-140c8bf8bdb5d511.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4121-23ac086c1aa6a43a.js → 4121-91ab0fdde5204f41.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4230-c4c596fb5534e1b1.js → 4230-d91fc4db148387bc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{431-24380873201c3e1b.js → 431-2a9adafa2689a0f4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4608-0cd97892fd0b0e41.js → 4608-52674906c7d6a22e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5309-c8b5165efcc5469f.js → 5309-90d555ba13edaf08.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6084-5bfa390a4c8fad43.js → 6084-1ae40620e79e0cf9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6662-79eee0bf18775b40.js → 6662-5fa8a1b20b0d3e3c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6780-8b5772a3a2ef1ca6.js → 6780-4db9fe1ee8860870.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-7a089a9fad286bb8.js → 6853-02be83ef65e8853b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6882-5a251351689ea74b.js → 6882-6f755ee046c9d70a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-3a7b166c8f3b66b4.js → 6954-b242eebbe7c52e5a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7476-c4ccb87fb8dbe2c0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{787-cb0154eaf6114c7e.js → 787-a1674f4d14753677.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-f08e91084d10d6dc.js → 79-056947276803332e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-d4c806aa81ab0bad.js → 9046-f5b180534b2637c3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9226-f4e70e6f9619e9a9.js → 9226-ce9c651c6ed829dd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9951-5e744e8addb6e090.js → 9951-e572cda021343eb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-9a878b14373eec2e.js → _app-5de7e675bc2f3bd1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-e5ef5be6566f9432.js → add-systems-f068a00278624bc9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-5f2d060952814353.js → privacy-experience-799d2a4a9dd68eea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-232e9ef135b838cf.js → privacy-notices-55d0f8505a7f8692.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-5fcacc8e4baf3d03.js → reporting-1103b69bcd90ed6c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-29cde3b7d27b22cf.js → data-catalog-6d6584fd49026ec2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-caf0c55830fc91b3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5c0b1f15873c90fa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-a81165ca06b7c404.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-f79ec067d906e67f.js → activity-bf3627895c102ae0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-403dc361bffe644d.js → new-17caa948d13ac81c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-52506e743c73fc7d.js → dataset-06d5b6944e2de262.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-7d492050fc33a57a.js → [id]-a980e69a921a0dfb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-6f68e65f01beb8af.js → new-d7160806386bc7e0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-e92db8bb8c719abc.js → index-7430cfb2a1bf1442.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-c245f0b0fd7810c0.js → [id]-e039acfdefb0986e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-61e32a7b8ef6569c.js → [id]-29643fbd5745ac0e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-1f57e4d5715dd5cf.js → messaging-3062ca1a95ede1a3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-378db5585b89ab5e.js → storage-a67feed389719f52.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-1b9c48484ea70264.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-dc3afcf514d7219a.js → datamap-218f88a99e7f0c04.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-aaa2d02b9be2acb1.js → [purpose_id]-738e9c5dd7a4d8f5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-bed42ecfab4896af.js → consent-d0c5a07b57b6adae.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-82882bc16052ae5b.js → custom-fields-7945aad419e1ba8b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-068724e9c574974d.js → locations-694ae08fdc73b92b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-f556688c5fb35f41.js → organization-26db0a2e4ffe2892.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-7ce5dbabf7f1026b.js → test-datasets-ec7efe4e1f09ecb7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-b5f68d37abaa8844.js → systems-8045ae1289ef8ebc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-103618fab50dfd0d.js → taxonomy-0d17e0de9adb27f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-564f87da93e398d0.js → [id]-fe32284ce419e921.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-f552cb870f8a6a17.js → user-management-9c8200fc2f8b9346.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/10994e916bc9a00a.css +1 -0
- fides/ui-build/static/admin/_next/static/css/304c6f148886a8d4.css +1 -0
- fides/ui-build/static/admin/_next/static/css/4383759407e86f7a.css +1 -0
- fides/ui-build/static/admin/_next/static/css/{81642473e38c67a5.css → 5bfb2473e5701527.css} +1 -1
- fides/ui-build/static/admin/_next/static/{779-bFyN2mfyVfR0Jqdxw → zKPvcJ5_1YpLm35m0Fl47}/_buildManifest.js +1 -1
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3988-839f18f04d5144f2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7476-d7071697bc665a4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-3ae1ae3844a6e03a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-e8dc8320e826e91c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-22fe027966edb092.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-26a48fa6707708af.js +0 -1
- fides/ui-build/static/admin/_next/static/css/62867c995b516a24.css +0 -1
- fides/ui-build/static/admin/_next/static/css/92fc10cc7ed1aba3.css +0 -1
- fides/ui-build/static/admin/_next/static/css/eb46b504bb5d980d.css +0 -1
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.65.3b1.dist-info → ethyca_fides-2.65.3b2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-12073578f764815e.js → manual-9c25673536d3f2cc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-3ddf2001f4605949.js → regulations-c304e080c391f254.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-ed809e0961891c0c.js → [id]-25589319be47ee83.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{779-bFyN2mfyVfR0Jqdxw → zKPvcJ5_1YpLm35m0Fl47}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,f=0,x=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,f=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-f;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-f,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return f=e=g,p=setTimeout(C,t),x?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(x=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),f=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},30952:function(e,t,i){"use strict";i.d(t,{f:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(26917);let o=e=>{let{value:t,onChange:i,placeholder:n,...o}=e,[c,u]=(0,s.useState)(t),d=a()(i,500),p=(0,s.useCallback)(e=>{u(e),d(e)},[]);return(0,r.jsx)(l.Z,{value:c,onChange:p,onClear:()=>{u(""),i("")},placeholder:n,...o})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(13577);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(13577);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(13577),l=i(27378),o=i(30952),c=i(47935),u=i(81406),d=i(99763),p=i(72625),g=i(14047),f=i(28976),x=i(8151),h=i(70675),v=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,g.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,h.v8)(),[c,{isLoading:u}]=(0,h.cM)(),[d,{isLoading:p}]=(0,h.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||p;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(f.Z,{onHideClick:m,onDetailClick:i})]})},j=i(89200),m=i(5945),C=i(61099),y=i(79947),I=i(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3855],{66726:function(e,t,i){var r=i(11611),n=i(82846),a=i(91936),s=Math.max,l=Math.min;e.exports=function(e,t,i){var o,c,u,d,p,g,f=0,x=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var i=o,r=c;return o=c=void 0,f=t,d=e.apply(r,i)}function m(e){var i=e-g,r=e-f;return void 0===g||i>=t||i<0||h&&r>=u}function C(){var e,i,r,a=n();if(m(a))return y(a);p=setTimeout(C,(e=a-g,i=a-f,r=t-e,h?l(r,u-i):r))}function y(e){return(p=void 0,v&&o)?j(e):(o=c=void 0,d)}function I(){var e,i=n(),r=m(i);if(o=arguments,c=this,g=i,r){if(void 0===p)return f=e=g,p=setTimeout(C,t),x?j(e):d;if(h)return clearTimeout(p),p=setTimeout(C,t),j(g)}return void 0===p&&(p=setTimeout(C,t)),d}return t=a(t)||0,r(i)&&(x=!!i.leading,u=(h="maxWait"in i)?s(a(i.maxWait)||0,t):u,v="trailing"in i?!!i.trailing:v),I.cancel=function(){void 0!==p&&clearTimeout(p),f=0,o=g=c=p=void 0},I.flush=function(){return void 0===p?d:y(n())},I}},82846:function(e,t,i){var r=i(77400);e.exports=function(){return r.Date.now()}},30952:function(e,t,i){"use strict";i.d(t,{f:function(){return o}});var r=i(24246),n=i(66726),a=i.n(n),s=i(27378),l=i(26917);let o=e=>{let{value:t,onChange:i,placeholder:n,...o}=e,[c,u]=(0,s.useState)(t),d=a()(i,500),p=(0,s.useCallback)(e=>{u(e),d(e)},[]);return(0,r.jsx)(l.Z,{value:c,onChange:p,onClear:()=>{u(""),i("")},placeholder:n,...o})}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return a},V:function(){return r.V}});var r=i(84306),n=i(812);let a=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,n.Ot)(t)?i=t.data.detail:(0,n.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var r=i(24246),n=i(13577);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)},successAlert:(t,i,a)=>{let s={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,s):e(s)}}}},81406:function(e,t,i){"use strict";var r=i(24246),n=i(13577);t.Z=()=>(0,r.jsxs)(n.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,r.jsx)(n.xvT,{fontSize:"sm",children:"You're up to date!"})]})},25077:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var r=i(24246),n=i(59003),a=i(92222),s=i(13577),l=i(27378),o=i(30952),c=i(47935),u=i(81406),d=i(99763),p=i(72625),g=i(14047),f=i(28976),x=i(8151),h=i(70675),v=e=>{let{resource:t,onDetailClick:i}=e,{successAlert:n}=(0,g.V)(),a=(0,x.u)(t),[l,{isLoading:o}]=(0,h.v8)(),[c,{isLoading:u}]=(0,h.cM)(),[d,{isLoading:p}]=(0,h.vi)(),v=async()=>{var e;await l({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),n("Started classification on ".concat(null!==(e=t.name)&&void 0!==e?e:"this resource"))},j=async()=>{var e;await c({staged_resource_urn:t.urn}),n("Approved ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},m=async()=>{var e;await d({staged_resource_urn:t.urn}),n("Hid ".concat(null!==(e=t.name)&&void 0!==e?e:" resource"))},C=o||u||p;return(0,r.jsxs)(s.kCb,{gap:2,justify:"space-between",children:[a===x.e.ATTENTION_REQUIRED&&(0,r.jsx)(s.wpx,{size:"small",onClick:v,loading:o,disabled:C,"data-testid":"classify-btn",children:"Classify"}),a===x.e.IN_REVIEW&&(0,r.jsx)(s.wpx,{size:"small",onClick:j,loading:u,disabled:C,"data-testid":"approve-btn",children:"Approve"}),(0,r.jsx)(s.LZC,{}),(0,r.jsx)(f.Z,{onHideClick:m,onDetailClick:i})]})},j=i(89200),m=i(5945),C=i(61099),y=i(79947),I=i(73825);let L=(0,a.Cl)();var _=(e,t)=>{let i=[];return e?e===I.D$.TABLE?[L.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{resource:t.original})},header:"Table"}),L.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{status:(0,x.u)(t.original)})},header:"Status"}),L.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(C.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:"Description"}),L.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(p.Cy,{time:e.getValue()}),header:"Updated"}),L.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(v,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:e===I.D$.FIELD?[L.display({id:"name",cell:e=>{let{row:t}=e;return(0,r.jsx)(j.Z,{resource:t.original})},header:"Field"}),L.display({id:"status",cell:e=>{let{row:t}=e;return(0,r.jsx)(m.Z,{status:(0,x.u)(t.original)})},header:"Status"}),L.accessor(e=>e.data_type,{id:"dataType",cell:e=>(0,r.jsx)(y.Z,{type:e.getValue()}),header:"Data type"}),L.display({id:"category",cell:e=>{let{row:t}=e;return(0,r.jsx)(C.Z,{resource:t.original})},header:"Data categories",minSize:280,meta:{disableRowClick:!0}}),L.accessor(e=>e.description,{id:"description",cell:e=>(0,r.jsx)(c.G3,{value:e.getValue()}),header:"Description"}),L.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,r.jsx)(p.Cy,{time:e.getValue()}),header:"Updated"}),L.display({id:"actions",cell:e=>{let{row:i}=e;return(0,r.jsx)(v,{resource:i.original,onDetailClick:()=>t(i.original)})},header:"Actions",meta:{disableRowClick:!0}})]:i:i},b=i(7940),k=i(80356);let w=[I.LL.ADDITION,I.LL.CLASSIFYING,I.LL.CLASSIFICATION_ADDITION,I.LL.CLASSIFICATION_QUEUED,I.LL.CLASSIFICATION_UPDATE,I.LL.MONITORED,I.LL.PROMOTING,I.LL.REMOVAL,I.LL.REMOVING],T={items:[],total:0,page:1,size:50,pages:1};var A=e=>{let{resourceUrn:t,onRowClick:i}=e,{PAGE_SIZES:p,pageSize:g,setPageSize:f,onPreviousPageClick:x,isPreviousPageDisabled:v,onNextPageClick:j,isNextPageDisabled:m,startRange:C,endRange:y,pageIndex:I,setTotalPages:L,resetPageIndexToDefault:A}=(0,c.oi)(),[R,S]=(0,l.useState)("");(0,l.useEffect)(()=>{A()},[t,A]);let{isFetching:Z,isLoading:D,data:E}=(0,h.z8)({staged_resource_urn:t,page:I,size:g,diff_status:w,search:R}),{items:P,total:N,pages:z}=(0,l.useMemo)(()=>null!=E?E:T,[E]);(0,l.useEffect)(()=>{L(z)},[z,L]);let[M,V]=(0,l.useState)(void 0),O=_((0,b.G)(P[0]),V),U=(0,n.b7)({getCoreRowModel:(0,a.sC)(),getGroupedRowModel:(0,a.qe)(),getExpandedRowModel:(0,a.rV)(),columns:O,manualPagination:!0,data:P,columnResizeMode:"onChange",getRowId:e=>e.urn});return D||Z?(0,r.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Q$,{children:(0,r.jsx)(s.kCb,{gap:6,align:"center",children:(0,r.jsx)(s.xuv,{flexShrink:0,children:(0,r.jsx)(o.f,{value:R,onChange:S})})})}),(0,r.jsx)(c.ZK,{tableInstance:U,emptyTableNotice:(0,r.jsx)(u.Z,{}),getRowIsClickable:e=>(0,k.Z)(e),onRowClick:i}),(0,r.jsx)(c.s8,{totalRows:N||0,pageSizes:p,setPageSize:f,onPreviousPageClick:x,isPreviousPageDisabled:v,onNextPageClick:j,isNextPageDisabled:m,startRange:C,endRange:y}),(0,r.jsx)(d.Z,{resource:M,onClose:()=>V(void 0)})]})}},94780:function(e,t,i){"use strict";i.d(t,{X5:function(){return l},pN:function(){return o},sv:function(){return a}});var r=i(24246),n=i(13577);let a=e=>e.split(".")[1],s=[(0,r.jsx)(n.PJP.S9g,{},"layers"),(0,r.jsx)(n.PJP.iA_,{},"table"),(0,r.jsx)(n.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")],l=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let l=i.splice(0,2).join("."),o=[];return i.reduce((e,r,n)=>{let a=n===i.length-1,c="".concat(e).concat(".").concat(r);return o.push({title:r,href:a?void 0:"".concat(t,"/").concat(l,"/").concat(c),icon:s[n]}),c},l),[{title:a(l),href:"".concat(t,"/").concat(l),icon:(0,r.jsx)(n.PJP.ehp,{})},...o]},o=(e,t)=>{if(!e)return[];let i=e.split(".");if(i.length<2)return[];let r=i.shift(),n=[];return i.reduce((e,r,a)=>{let l=a===i.length-1,o="".concat(e).concat(".").concat(r);return n.push({title:r,href:l?void 0:"".concat(t,"/").concat(o),icon:s[a]}),o},r),n}},79947:function(e,t,i){"use strict";var r=i(24246),n=i(13577);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(n.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(n.j8w,{children:t})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{77213:function(e,t,i){i.d(t,{Z:function(){return f}});var n=i(24246),r=i(13577),s=i(88038),l=i.n(s),d=i(86677);i(27378);var a=i(25980),o=i(90867),c=i(77830),u=()=>{let e=(0,d.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,f=(0,a.hz)(),x=(0,d.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(f.flags.privacyRequestsConfiguration&&h),{data:m}=(0,o.JE)(void 0,{skip:p}),{data:j}=(0,o.PW)(void 0,{skip:p}),v=f.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),r=i(13577),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:d,rightContent:a,style:o,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},79789:function(e,t,i){i.d(t,{Hn:function(){return d},XU:function(){return l},Z5:function(){return a},aG:function(){return u},cB:function(){return s},hX:function(){return c},vQ:function(){return o}});var n=i(24246),r=i(13577);let s=e=>{let{text:t,...i}=e;return(0,n.jsx)(r.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:t})},l=e=>{let{children:t}=e;return(0,n.jsx)(r.xvT,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t,href:i}=e;return(0,n.jsx)(r.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:t})},a=e=>{let{children:t}=e;return(0,n.jsx)(r.QI$,{fontSize:"14px",mb:4,children:t})},o=e=>{let{children:t}=e;return(0,n.jsx)(r.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,n.jsx)(r.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,n.jsxs)(r.iA_,{fontSize:"14px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Th,{children:"Permission"}),(0,n.jsx)(r.Th,{children:"Description"})]})}),(0,n.jsx)(r.p3B,{children:t.map(e=>(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Td,{children:(0,n.jsx)(r.Vp9,{children:e.permission})}),(0,n.jsx)(r.Td,{children:e.description})]},e.permission))})]})}},70788:function(e,t,i){i.d(t,{m:function(){return o}});var n=i(24246),r=i(13577),s=i(79894),l=i.n(s),d=i(27378);let{Text:a}=r.AntTypography,o=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},o=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),o)?d.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,n.jsx)(l(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},89200:function(e,t,i){var n=i(24246),r=i(47935),s=i(98559),l=i(80356);t.Z=e=>{let{resource:t}=e;return(0,n.jsx)(r.G3,{value:(0,s.Z)(t),fontWeight:(0,l.Z)(t)?"semibold":"normal"})}},5945:function(e,t,i){var n=i(24246),r=i(47935),s=i(8151);let l={[s.e.ATTENTION_REQUIRED]:"error",[s.e.APPROVED]:"success",[s.e.IN_REVIEW]:"warning",[s.e.CLASSIFYING]:"info",[s.e.NONE]:"marble"};t.Z=e=>{let{status:t}=e;return(0,n.jsx)(r.A4,{color:l[t],value:t})}},98800:function(e,t,i){var n=i(24246),r=i(13577),s=i(79789);t.Z=e=>{var t;let{dataset:i,onClose:l}=e;return(0,n.jsxs)(r.dys,{isOpen:!!i,onClose:l,size:"md",children:[(0,n.jsx)(r.P1B,{}),(0,n.jsxs)(r.scA,{children:[(0,n.jsx)(r.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,n.jsx)(r.cCv,{}),(0,n.jsxs)(r.Ng0,{children:[(0,n.jsx)(s.cB,{text:"Title",mt:0}),(0,n.jsx)(s.XU,{children:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.cB,{text:"Description"}),(0,n.jsx)(s.XU,{children:null==i?void 0:i.description})]})]})]})]})}},81406:function(e,t,i){var n=i(24246),r=i(13577);t.Z=()=>(0,n.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,n.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,n.jsx)(r.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,i){var n=i(24246),r=i(92222),s=i(13577),l=i(27378),d=i(47935),a=i(72625),o=i(89200),c=i(5945),u=i(8151);let f=(0,r.Cl)(),x=e=>{let{onDetailClick:t}=e;return(0,n.jsxs)(s.v2r,{children:[(0,n.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,n.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,n.jsx)(s.qyq,{children:(0,n.jsx)(s.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,l.useMemo)(()=>[f.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(o.Z,{resource:e.row.original}),header:"Dataset"}),f.display({id:"status",cell:e=>{let{row:t}=e;return(0,n.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),f.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(d.G3,{value:e.getValue()}),header:"Description"}),f.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,n.jsx)(a.Cy,{time:e.getValue()}),header:"Updated"}),f.display({id:"actions",cell:e=>{let{row:i}=e;return(0,n.jsx)(x,{onDetailClick:()=>t(i.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},8151:function(e,t,i){i.d(t,{e:function(){return r},u:function(){return l}});var n,r,s=i(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{77213:function(e,t,i){i.d(t,{Z:function(){return f}});var n=i(24246),r=i(13577),s=i(88038),l=i.n(s),d=i(86677);i(27378);var a=i(25980),o=i(90867),c=i(77830),u=()=>{let e=(0,d.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,f=(0,a.hz)(),x=(0,d.useRouter)(),h="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,p=!(f.flags.privacyRequestsConfiguration&&h),{data:m}=(0,o.JE)(void 0,{skip:p}),{data:j}=(0,o.PW)(void 0,{skip:p}),v=f.flags.privacyRequestsConfiguration&&(!m||!j)&&h;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[v?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){var n=i(24246),r=i(13577),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:d,rightContent:a,style:o,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},79789:function(e,t,i){i.d(t,{Hn:function(){return d},XU:function(){return l},Z5:function(){return a},aG:function(){return u},cB:function(){return s},hX:function(){return c},vQ:function(){return o}});var n=i(24246),r=i(13577);let s=e=>{let{text:t,...i}=e;return(0,n.jsx)(r.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:t})},l=e=>{let{children:t}=e;return(0,n.jsx)(r.xvT,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t,href:i}=e;return(0,n.jsx)(r.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:t})},a=e=>{let{children:t}=e;return(0,n.jsx)(r.QI$,{fontSize:"14px",mb:4,children:t})},o=e=>{let{children:t}=e;return(0,n.jsx)(r.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,n.jsx)(r.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,n.jsxs)(r.iA_,{fontSize:"14px",children:[(0,n.jsx)(r.hrZ,{children:(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Th,{children:"Permission"}),(0,n.jsx)(r.Th,{children:"Description"})]})}),(0,n.jsx)(r.p3B,{children:t.map(e=>(0,n.jsxs)(r.Tr,{children:[(0,n.jsx)(r.Td,{children:(0,n.jsx)(r.Vp9,{children:e.permission})}),(0,n.jsx)(r.Td,{children:e.description})]},e.permission))})]})}},70788:function(e,t,i){i.d(t,{m:function(){return o}});var n=i(24246),r=i(13577),s=i(79894),l=i.n(s),d=i(27378);let{Text:a}=r.AntTypography,o=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},o=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:d.title})),o)?d.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,n.jsx)(l(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},89200:function(e,t,i){var n=i(24246),r=i(47935),s=i(98559),l=i(80356);t.Z=e=>{let{resource:t}=e;return(0,n.jsx)(r.G3,{value:(0,s.Z)(t),fontWeight:(0,l.Z)(t)?"semibold":"normal"})}},5945:function(e,t,i){var n=i(24246),r=i(47935),s=i(8151);let l={[s.e.ATTENTION_REQUIRED]:"error",[s.e.APPROVED]:"success",[s.e.IN_REVIEW]:"warning",[s.e.CLASSIFYING]:"info",[s.e.NONE]:"marble"};t.Z=e=>{let{status:t}=e;return(0,n.jsx)(r.A4,{color:l[t],value:t})}},98800:function(e,t,i){var n=i(24246),r=i(13577),s=i(79789);t.Z=e=>{var t;let{dataset:i,onClose:l}=e;return(0,n.jsxs)(r.dys,{isOpen:!!i,onClose:l,size:"md",children:[(0,n.jsx)(r.P1B,{}),(0,n.jsxs)(r.scA,{children:[(0,n.jsx)(r.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,n.jsx)(r.cCv,{}),(0,n.jsxs)(r.Ng0,{children:[(0,n.jsx)(s.cB,{text:"Title",mt:0}),(0,n.jsx)(s.XU,{children:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.cB,{text:"Description"}),(0,n.jsx)(s.XU,{children:null==i?void 0:i.description})]})]})]})]})}},81406:function(e,t,i){var n=i(24246),r=i(13577);t.Z=()=>(0,n.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,n.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,n.jsx)(r.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,i){var n=i(24246),r=i(92222),s=i(13577),l=i(27378),d=i(47935),a=i(72625),o=i(89200),c=i(5945),u=i(8151);let f=(0,r.Cl)(),x=e=>{let{onDetailClick:t}=e;return(0,n.jsxs)(s.v2r,{children:[(0,n.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,n.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,n.jsx)(s.qyq,{children:(0,n.jsx)(s.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,l.useMemo)(()=>[f.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(o.Z,{resource:e.row.original}),header:"Dataset"}),f.display({id:"status",cell:e=>{let{row:t}=e;return(0,n.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),f.accessor(e=>e.description,{id:"description",cell:e=>(0,n.jsx)(d.G3,{value:e.getValue()}),header:"Description"}),f.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,n.jsx)(a.Cy,{time:e.getValue()}),header:"Updated"}),f.display({id:"actions",cell:e=>{let{row:i}=e;return(0,n.jsx)(x,{onDetailClick:()=>t(i.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},8151:function(e,t,i){i.d(t,{e:function(){return r},u:function(){return l}});var n,r,s=i(73825);(n=r||(r={})).ATTENTION_REQUIRED="Attention required",n.IN_REVIEW="In review",n.APPROVED="Approved",n.CLASSIFYING="Classifying",n.NONE="None";let l=e=>{if(!e)return"Approved";let t=e.diff_status===s.LL.ADDITION||e.diff_status===s.LL.REMOVAL,i=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.ADDITION]||e.child_diff_statuses[s.LL.REMOVAL]);if(t||i)return"Attention required";let n=e.diff_status===s.LL.CLASSIFICATION_QUEUED||e.diff_status===s.LL.CLASSIFYING,r=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_QUEUED]||e.child_diff_statuses[s.LL.CLASSIFYING]);if(n||r)return"Classifying";let l=e.diff_status===s.LL.CLASSIFICATION_ADDITION||e.diff_status===s.LL.CLASSIFICATION_UPDATE,d=e.child_diff_statuses&&(e.child_diff_statuses[s.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[s.LL.CLASSIFICATION_UPDATE]);return l||d?"In review":"Approved"}},7940:function(e,t,i){i.d(t,{G:function(){return r}});var n=i(73825);let r=e=>{var t,i,r;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?n.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=e.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(e,t){t.Z=e=>{let{name:t,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:l,top_level_field_name:d,top_level_field_urn:a}=e;if(!d)return t;let o=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,l,d].forEach(e=>{if(e){let t=o.indexOf(e);t>-1&&o.splice(t,1)}}),o.join("."))}},36168:function(e,t){t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,i){var n=i(7940),r=i(36168),s=i(73825);t.Z=e=>(0,n.G)(e)!==s.D$.FIELD||(0,r.Z)(e)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4121],{44121:function(e,s,a){a.d(s,{Z:function(){return Q}});var t=a(24246),n=a(13577),i=a(91437),l=()=>(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,t.jsx)(n.gCW,{spacing:4,children:i.K.map(e=>(0,t.jsxs)(n.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,t.jsx)(n.xuv,{fontWeight:"semibold",children:e.label}),(0,t.jsx)(n.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=a(16134),d=a(68309),o=a(19904),c=a(34090),h=a(86677),m=a(27378),p=a(812),u=a(46238),x=a(58452),j=a(77830),w=a(46628),g=a(26917),b=a(1315),f=a(95492),y=a(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:a}=e,i=(0,r.C)(y.Ux);if((0,y.d6)(i,{skip:!i}),0===s.length)return null;let l=e=>{a(s.filter(s=>s.fides_key!==e.fides_key))};return(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{textAlign:"end",children:(0,t.jsx)(n.wpx,{"aria-label":"Unassign system from user",icon:(0,t.jsx)(f.l,{}),onClick:()=>l(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var _=e=>{let{allSystems:s,assignedSystems:a,onChange:i}=e,l=e=>{a.find(s=>s.fides_key===e.fides_key)?i(a.filter(s=>s.fides_key!==e.fides_key)):i([...a,e])};return(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,t.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{children:"Assign"})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>{let s=!!a.find(s=>s.fides_key===e.fides_key);return(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{children:(0,t.jsx)(n.rAg,{checked:s,onChange:()=>l(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let C=(e,s)=>{var a,t;return(null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(t=e.description)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var S=e=>{let{isOpen:s,onClose:a,assignedSystems:i,onAssignedSystemChange:l}=e,{data:r}=(0,b.K3)(),[d,o]=(0,m.useState)(""),[c,h]=(0,m.useState)(i),p=async()=>{l(c),a()},u=!r||0===r.length,x=(0,m.useMemo)(()=>r?r.filter(e=>C(e,d)):[],[r,d]),j=(0,m.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:a,size:"2xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,t.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(n.xvT,{children:"Assign systems"}),(0,t.jsxs)(n.j8w,{color:"success",children:["Assigned to ",i.length," systems"]})]}),(0,t.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:u?(0,t.jsx)(n.xvT,{children:"No systems found"}):(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,t.jsx)(n.xuv,{children:(0,t.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,t.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,t.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:j,onChange:e=>{e&&r?h(x):h(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,t.jsx)(g.Z,{value:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,t.jsx)(_,{allSystems:x,assignedSystems:c,onChange:h})]})}),(0,t.jsx)(n.mzw,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:a,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),u?null:(0,t.jsx)(n.wpx,{type:"primary",onClick:p,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},k=e=>{let{label:s,roleKey:a,isSelected:i,isDisabled:l,assignedSystems:r,onAssignedSystemChange:o}=e,{setFieldValue:h}=(0,c.u6)(),m=(0,n.qY0)(),p=l?"You do not have sufficient permissions to assign this role.":void 0;return i?(0,t.jsxs)(n.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,t.jsx)(n.StI,{})]}),a!==d.A7.APPROVER&&a!==d.A7.RESPONDENT&&a!==d.A7.EXTERNAL_RESPONDENT?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,t.jsx)(u.b,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,t.jsx)(n.wpx,{disabled:l,title:p,type:"primary",size:"small",onClick:m.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,t.jsx)(v,{assignedSystems:r,onAssignedSystemChange:o}),m.isOpen?(0,t.jsx)(S,{isOpen:m.isOpen,onClose:m.onClose,assignedSystems:r,onAssignedSystemChange:o}):null]}):null]}):(0,t.jsx)(n.wpx,{onClick:()=>{h("roles",[a])},"data-testid":"role-option-".concat(s),title:p,disabled:l,children:s})};let E={roles:[]};var A=()=>{var e,s;let a=(0,n.pmc)(),l=(0,h.useRouter)(),g=(0,r.C)(y.Ux);(0,y.d6)(g,{skip:!g});let{isOpen:b,onOpen:f,onClose:v}=(0,n.qY0)(),_=(0,r.C)(y.R$),[C,S]=(0,m.useState)(_),[A]=(0,y.G$)();(0,m.useEffect)(()=>{S(_)},[_]);let{data:T,isLoading:P}=(0,y.gU)(null!=g?g:"",{skip:!g}),[R]=(0,y.lD)(),N=!!(null==T?void 0:null===(e=T.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT)),O=async e=>{if(b&&v(),!g)return;let s=e.roles.includes(d.A7.APPROVER),t=await R({user_id:g,payload:{roles:e.roles}});if((0,p.D4)(t)){a((0,w.Vo)((0,p.e$)(t.error)));return}if(!s){let e=C.map(e=>e.fides_key),s=await A({userId:g,fidesKeys:e});if((0,p.D4)(s)){a((0,w.Vo)((0,p.e$)(s.error)));return}}a((0,w.t5)("Permissions updated"))},I=async e=>{g&&(C.length>0&&e.roles.includes(d.A7.APPROVER)?f():await O(e))},z=(0,o.Tg)([d.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!g)return null;if(P)return(0,t.jsx)(n.$jN,{});if(!z&&(null==T?void 0:null===(s=T.roles)||void 0===s?void 0:s.includes(d.A7.OWNER)))return(0,t.jsx)(n.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let q=(null==T?void 0:T.roles)?{roles:T.roles}:E,U=i.K.filter(e=>N?e.roleKey===d.A7.EXTERNAL_RESPONDENT:e.roleKey!==d.A7.EXTERNAL_RESPONDENT),D=N?"External respondent role cannot be changed":void 0;return(0,t.jsx)(c.J9,{onSubmit:I,initialValues:q,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:a,dirty:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsxs)(n.Kqy,{spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,t.jsx)(u.b,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),U.map(e=>{let a=s.roles.indexOf(e.roleKey)>=0,n=e.roleKey===d.A7.OWNER?!z:N;return(0,t.jsx)(k,{isSelected:a,isDisabled:n,assignedSystems:C,onAssignedSystemChange:S,...e},e.roleKey)}),!N&&(0,t.jsx)(n.esZ,{title:"To invite a new External respondent user, create a manual task integration and then click on the 'Manage secure access' button",children:(0,t.jsx)(n.wpx,{disabled:!0,"data-testid":"role-option-External respondent",children:"External respondent"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),children:"Cancel"}),(0,t.jsx)(n.esZ,{title:D,children:(0,t.jsx)(n.wpx,{className:"ml-2",type:"primary",htmlType:"submit",loading:a,disabled:!i&&C===_||N,"data-testid":"save-btn",children:"Save"})})]})]}),(0,t.jsx)(x.Z,{isOpen:b,onClose:v,onConfirm:()=>O(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,t.jsx)(n.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},T=a(61038),P=a(55484),R=a(25980),N=a(40324),O=a(96006),I=a(7426);let{useGetEmailInviteStatusQuery:z}=a(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var q=a(76174),U=a(91317),D=a(31883);let Z=P.Ry().shape({password:O.a.label("Password"),passwordConfirmation:P.Z_().required().oneOf([P.iH("password")],"Passwords must match").label("Password confirmation")}),W={password:"",passwordConfirmation:""},K=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t]=(0,y.ls)(),i=async n=>{let i=await t({id:e,new_password:n.password});(0,D.D4)(i)?a((0,w.Vo)((0,p.e$)(i.error))):(a((0,w.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose())};return{...s,handleResetPassword:i}};var L=e=>{let{id:s}=e,{handleResetPassword:a,isOpen:i,onClose:l,onOpen:r}=K(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:l,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsx)(n.hzk,{children:(0,t.jsx)(c.J9,{initialValues:W,validationSchema:Z,onSubmit:a,children:e=>{let{isSubmitting:s,dirty:a,isValid:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsx)(n.xBx,{children:"Reset Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:4,children:[(0,t.jsx)(n.xvT,{mb:2,children:"Choose a new password for this user."}),(0,t.jsx)(N.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,t.jsx)(N.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,t.jsx)(n.mzw,{children:(0,t.jsxs)("div",{className:"w-full gap-2",children:[(0,t.jsx)(n.wpx,{onClick:l,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a||!i,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let V=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t,i]=(0,m.useState)(""),[l,r]=(0,m.useState)(""),[d,{isLoading:o}]=(0,y.ev)(),c=!!(e&&l&&t),h=async()=>{c&&d({id:e,old_password:t,new_password:l}).unwrap().then(()=>{a((0,w.t5)("Password updated")),s.onClose()})};return{...s,changePasswordValidation:c,handleChange:e=>{"oldPassword"===e.target.name?i(e.target.value):r(e.target.value)},handleChangePassword:h,isLoading:o,newPasswordValue:l,oldPasswordValue:t}};var B=e=>{let{id:s}=e,{changePasswordValidation:a,handleChange:i,handleChangePassword:l,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:h,onOpen:m}=V(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:m,"data-testid":"update-password-btn",children:"Update password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:d,onClose:h,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Update Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"oldPassword",onChange:i,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"newPassword",onChange:i,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:h,className:"mr-2 w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a,loading:r,onClick:l,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},Y=()=>{var e;let s=(0,r.C)(y.Ux),a=(0,r.C)(U.dy),i=!!a&&a.id===s,{data:l}=(0,y.gU)(null!=s?s:"",{skip:!s});return(null==l?void 0:null===(e=l.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT))?null:(0,t.jsx)(n.xuv,{children:s?(0,t.jsxs)(n.Ugi,{children:[i?(0,t.jsx)(B,{id:s}):null,(0,t.jsx)(o.ZP,{scopes:[d.Sh.USER_PASSWORD_RESET],children:(0,t.jsx)(L,{id:s})})]}):null})};let F=(e,s,a,t)=>!e||e&&!s||e&&s&&!0===a&&!!t,$=(e,s,a)=>!!(e&&s&&a),M=(e,s,a,t,n,i)=>!!e&&!s&&F(a,t,n,i),X=(e,s,a,t)=>F(e,s,a,t),H={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},G=(e,s,a,t,n)=>P.Ry().shape({username:P.Z_().required().label("Username"),email_address:P.Z_().email().required().label("Email address"),first_name:P.Z_().label("First name"),last_name:P.Z_().label("Last name"),password:P.Z_().when(["password_login_enabled"],{is:i=>M(e,s,a,t,n,i),then:()=>O.a.label("Password"),otherwise:()=>P.Z_().optional().label("Password")}),password_login_enabled:P.O7().label("Allow password login")});var J=e=>{let{onSubmit:s,initialValues:a,canEditNames:i}=e,l=(0,h.useRouter)(),d=(0,n.pmc)(),o=(0,r.T)(),m=(0,n.qY0)(),{data:u}=z(),{data:x}=(0,q.qv)();(0,I.tB)({api_set:!1});let g=(0,r.C)(y.ZC),b=(0,r.C)(I.iR),{plus:v}=(0,R.hz)(),_=(null==u?void 0:u.enabled)||!1,C=(null==b?void 0:b.allow_username_password_login)||!1,S=!g,k=!S&&!i,E=x&&x.length>0||!1,A=$(v,E,C),P=null!=a?a:H;g&&"password_login_enabled"in g&&(P={...P,password_login_enabled:!!g.password_login_enabled});let O=G(S,_,v,E,C),U=async e=>{let a=M(S,_,v,E,C,e.password_login_enabled),t={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};A&&(t.password_login_enabled=e.password_login_enabled),a&&e.password&&(t.password=e.password);let n=await s(t);if((0,p.D4)(n)){d((0,w.Vo)((0,p.e$)(n.error)));return}d((0,w.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==n?void 0:n.data)&&o((0,y.Vv)(n.data.id))};return(0,t.jsx)(c.J9,{onSubmit:U,initialValues:P,validationSchema:O,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:a,isValid:i,values:r}=e;return(0,t.jsx)(c.l0,{children:(0,t.jsxs)(n.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:6,maxWidth:"55%",children:[(0,t.jsxs)(n.kCb,{children:[(0,t.jsxs)(n.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==g?void 0:g.disabled)&&(0,t.jsx)(n.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,t.jsx)(n.xuv,{marginLeft:"auto",children:(0,t.jsxs)(n.Ugi,{children:[X(v,E,C||!1,r.password_login_enabled)&&(0,t.jsx)(Y,{"data-testid":"password-management"}),S?null:(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete",icon:(0,t.jsx)(f.l,{}),onClick:m.onOpen,"data-testid":"delete-user-btn"}),(0,t.jsx)(T.Z,{user:g,...m})]})]})})]}),(0,t.jsx)(N.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,t.jsx)(N.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,t.jsx)(N.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,t.jsx)(N.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),A&&(0,t.jsx)(N.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),M(S,_,v,E,C,r.password_login_enabled)&&(0,t.jsx)(N.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!s||!i,loading:a,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},Q=e=>{let{onSubmit:s,initialValues:a,...i}=e,c=(0,r.C)(y.Ux);(0,y.Fk)(c,{skip:!c});let h=(0,o.Tg)([d.Sh.USER_PERMISSION_UPDATE]),m=!c||!h,p=[{label:"Profile",key:"profile",children:(0,t.jsx)(J,{onSubmit:s,initialValues:a,...i})},{label:"Permissions",key:"permissions",children:(0,t.jsxs)(n.kCb,{gap:"97px",children:[(0,t.jsx)(n.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,t.jsx)(A,{})}),(0,t.jsx)(n.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,t.jsx)(l,{})})]}),disabled:m,forceRender:!m}];return(0,t.jsx)(n.A5g,{items:p})}},31883:function(e,s,a){a.d(s,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=a(19043)}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4121],{44121:function(e,s,a){a.d(s,{Z:function(){return Q}});var t=a(24246),n=a(13577),i=a(91437),l=()=>(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.xuv,{pb:4,fontSize:"18px",fontWeight:"semibold",children:"Role Description"}),(0,t.jsx)(n.gCW,{spacing:4,children:i.K.map(e=>(0,t.jsxs)(n.xuv,{width:"100%",padding:4,borderRadius:"md",backgroundColor:"gray.75",fontSize:"14px",children:[(0,t.jsx)(n.xuv,{fontWeight:"semibold",children:e.label}),(0,t.jsx)(n.xuv,{color:"gray.700",children:e.description})]},e.roleKey))})]}),r=a(16134),d=a(73825),o=a(19904),c=a(34090),h=a(86677),m=a(27378),p=a(812),u=a(46238),x=a(58452),j=a(77830),w=a(46628),g=a(26917),b=a(1315),f=a(95492),y=a(65497);let v=e=>{let{assignedSystems:s,onAssignedSystemChange:a}=e,i=(0,r.C)(y.Ux);if((0,y.d6)(i,{skip:!i}),0===s.length)return null;let l=e=>{a(s.filter(s=>s.fides_key!==e.fides_key))};return(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,t.jsx)(n.hrZ,{children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{textAlign:"end",children:(0,t.jsx)(n.wpx,{"aria-label":"Unassign system from user",icon:(0,t.jsx)(f.l,{}),onClick:()=>l(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var _=e=>{let{allSystems:s,assignedSystems:a,onChange:i}=e,l=e=>{a.find(s=>s.fides_key===e.fides_key)?i(a.filter(s=>s.fides_key!==e.fides_key)):i([...a,e])};return(0,t.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,t.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,t.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,t.jsxs)(n.Tr,{children:[(0,t.jsx)(n.Th,{children:"System"}),(0,t.jsx)(n.Th,{children:"Assign"})]})}),(0,t.jsx)(n.p3B,{children:s.map(e=>{let s=!!a.find(s=>s.fides_key===e.fides_key);return(0,t.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,t.jsx)(n.Td,{children:e.name}),(0,t.jsx)(n.Td,{children:(0,t.jsx)(n.rAg,{checked:s,onChange:()=>l(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let C=(e,s)=>{var a,t;return(null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(t=e.description)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var S=e=>{let{isOpen:s,onClose:a,assignedSystems:i,onAssignedSystemChange:l}=e,{data:r}=(0,b.K3)(),[d,o]=(0,m.useState)(""),[c,h]=(0,m.useState)(i),p=async()=>{l(c),a()},u=!r||0===r.length,x=(0,m.useMemo)(()=>r?r.filter(e=>C(e,d)):[],[r,d]),j=(0,m.useMemo)(()=>{let e=new Set(c.map(e=>e.fides_key));return x.every(s=>e.has(s.fides_key))},[x,c]);return(0,t.jsxs)(n.u_l,{isOpen:s,onClose:a,size:"2xl",children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,t.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsx)(n.xvT,{children:"Assign systems"}),(0,t.jsxs)(n.j8w,{color:"success",children:["Assigned to ",i.length," systems"]})]}),(0,t.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:u?(0,t.jsx)(n.xvT,{children:"No systems found"}):(0,t.jsxs)(n.Kqy,{spacing:4,children:[(0,t.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Assign systems in your organization to this user"}),(0,t.jsx)(n.xuv,{children:(0,t.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,t.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,t.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:j,onChange:e=>{e&&r?h(x):h(r?r.filter(e=>!x.includes(e)):[])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,t.jsx)(g.Z,{value:d,onChange:o,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,t.jsx)(_,{allSystems:x,assignedSystems:c,onChange:h})]})}),(0,t.jsx)(n.mzw,{justifyContent:"flex-start",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:a,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),u?null:(0,t.jsx)(n.wpx,{type:"primary",onClick:p,"data-testid":"confirm-btn",children:"Confirm"})]})})]})]})},k=e=>{let{label:s,roleKey:a,isSelected:i,isDisabled:l,assignedSystems:r,onAssignedSystemChange:o}=e,{setFieldValue:h}=(0,c.u6)(),m=(0,n.qY0)(),p=l?"You do not have sufficient permissions to assign this role.":void 0;return i?(0,t.jsxs)(n.Kqy,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",p:4,backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:s}),(0,t.jsx)(n.StI,{})]}),a!==d.A7.APPROVER&&a!==d.A7.RESPONDENT&&a!==d.A7.EXTERNAL_RESPONDENT?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"Assigned systems"}),(0,t.jsx)(u.b,{label:"Assigned systems refer to those systems that have been specifically allocated to a user for management purposes. Users assigned to a system possess full edit permissions and are listed as the Data Steward for the respective system."})]}),(0,t.jsx)(n.wpx,{disabled:l,title:p,type:"primary",size:"small",onClick:m.onOpen,"data-testid":"assign-systems-btn",children:"Assign systems +"}),(0,t.jsx)(v,{assignedSystems:r,onAssignedSystemChange:o}),m.isOpen?(0,t.jsx)(S,{isOpen:m.isOpen,onClose:m.onClose,assignedSystems:r,onAssignedSystemChange:o}):null]}):null]}):(0,t.jsx)(n.wpx,{onClick:()=>{h("roles",[a])},"data-testid":"role-option-".concat(s),title:p,disabled:l,children:s})};let E={roles:[]};var A=()=>{var e,s;let a=(0,n.pmc)(),l=(0,h.useRouter)(),g=(0,r.C)(y.Ux);(0,y.d6)(g,{skip:!g});let{isOpen:b,onOpen:f,onClose:v}=(0,n.qY0)(),_=(0,r.C)(y.R$),[C,S]=(0,m.useState)(_),[A]=(0,y.G$)();(0,m.useEffect)(()=>{S(_)},[_]);let{data:T,isLoading:P}=(0,y.gU)(null!=g?g:"",{skip:!g}),[R]=(0,y.lD)(),N=!!(null==T?void 0:null===(e=T.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT)),O=async e=>{if(b&&v(),!g)return;let s=e.roles.includes(d.A7.APPROVER),t=await R({user_id:g,payload:{roles:e.roles}});if((0,p.D4)(t)){a((0,w.Vo)((0,p.e$)(t.error)));return}if(!s){let e=C.map(e=>e.fides_key),s=await A({userId:g,fidesKeys:e});if((0,p.D4)(s)){a((0,w.Vo)((0,p.e$)(s.error)));return}}a((0,w.t5)("Permissions updated"))},I=async e=>{g&&(C.length>0&&e.roles.includes(d.A7.APPROVER)?f():await O(e))},z=(0,o.Tg)([d.Sh.USER_PERMISSION_ASSIGN_OWNERS]);if(!g)return null;if(P)return(0,t.jsx)(n.$jN,{});if(!z&&(null==T?void 0:null===(s=T.roles)||void 0===s?void 0:s.includes(d.A7.OWNER)))return(0,t.jsx)(n.xvT,{"data-testid":"insufficient-access",children:"You do not have sufficient access to change this user's permissions."});let q=(null==T?void 0:T.roles)?{roles:T.roles}:E,U=i.K.filter(e=>N?e.roleKey===d.A7.EXTERNAL_RESPONDENT:e.roleKey!==d.A7.EXTERNAL_RESPONDENT),D=N?"External respondent role cannot be changed":void 0;return(0,t.jsx)(c.J9,{onSubmit:I,initialValues:q,enableReinitialize:!0,children:e=>{let{values:s,isSubmitting:a,dirty:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsxs)(n.Kqy,{spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:3,"data-testid":"role-options",children:[(0,t.jsxs)(n.kCb,{alignItems:"center",children:[(0,t.jsx)(n.xvT,{fontSize:"sm",fontWeight:"semibold",mr:1,children:"User role"}),(0,t.jsx)(u.b,{label:"A user's role in the organization determines what parts of the UI they can access and which functions are available to them."})]}),U.map(e=>{let a=s.roles.indexOf(e.roleKey)>=0,n=e.roleKey===d.A7.OWNER?!z:N;return(0,t.jsx)(k,{isSelected:a,isDisabled:n,assignedSystems:C,onAssignedSystemChange:S,...e},e.roleKey)}),!N&&(0,t.jsx)(n.esZ,{title:"To invite a new External respondent user, create a manual task integration and then click on the 'Manage secure access' button",children:(0,t.jsx)(n.wpx,{disabled:!0,"data-testid":"role-option-External respondent",children:"External respondent"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),children:"Cancel"}),(0,t.jsx)(n.esZ,{title:D,children:(0,t.jsx)(n.wpx,{className:"ml-2",type:"primary",htmlType:"submit",loading:a,disabled:!i&&C===_||N,"data-testid":"save-btn",children:"Save"})})]})]}),(0,t.jsx)(x.Z,{isOpen:b,onClose:v,onConfirm:()=>O(s),title:"Change role to Approver",testId:"downgrade-to-approver-confirmation-modal",continueButtonText:"Yes",message:(0,t.jsx)(n.xvT,{children:"Switching to an approver role will remove all assigned systems. Do you wish to proceed?"})})]})}})},T=a(61038),P=a(55484),R=a(25980),N=a(40324),O=a(96006),I=a(7426);let{useGetEmailInviteStatusQuery:z}=a(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]})})});var q=a(76174),U=a(91317),D=a(31883);let Z=P.Ry().shape({password:O.a.label("Password"),passwordConfirmation:P.Z_().required().oneOf([P.iH("password")],"Passwords must match").label("Password confirmation")}),W={password:"",passwordConfirmation:""},K=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t]=(0,y.ls)(),i=async n=>{let i=await t({id:e,new_password:n.password});(0,D.D4)(i)?a((0,w.Vo)((0,p.e$)(i.error))):(a((0,w.t5)("Successfully reset user's password. Please inform the user of their new password.")),s.onClose())};return{...s,handleResetPassword:i}};var L=e=>{let{id:s}=e,{handleResetPassword:a,isOpen:i,onClose:l,onOpen:r}=K(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:r,"data-testid":"reset-password-btn",children:"Reset password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:l,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsx)(n.hzk,{children:(0,t.jsx)(c.J9,{initialValues:W,validationSchema:Z,onSubmit:a,children:e=>{let{isSubmitting:s,dirty:a,isValid:i}=e;return(0,t.jsxs)(c.l0,{children:[(0,t.jsx)(n.xBx,{children:"Reset Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:4,children:[(0,t.jsx)(n.xvT,{mb:2,children:"Choose a new password for this user."}),(0,t.jsx)(N.j0,{name:"password",label:"Password",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",autoComplete:"new-password"}),(0,t.jsx)(N.j0,{name:"passwordConfirmation",label:"Confirm Password",placeholder:"********",type:"password",tooltip:"Must match above password.",autoComplete:"confirm-password"})]})}),(0,t.jsx)(n.mzw,{children:(0,t.jsxs)("div",{className:"w-full gap-2",children:[(0,t.jsx)(n.wpx,{onClick:l,className:"w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a||!i,loading:s,htmlType:"submit",className:"w-1/2","data-testid":"submit-btn",children:"Change Password"})]})})]})}})})]})]})};let V=e=>{let s=(0,n.qY0)(),a=(0,n.pmc)(),[t,i]=(0,m.useState)(""),[l,r]=(0,m.useState)(""),[d,{isLoading:o}]=(0,y.ev)(),c=!!(e&&l&&t),h=async()=>{c&&d({id:e,old_password:t,new_password:l}).unwrap().then(()=>{a((0,w.t5)("Password updated")),s.onClose()})};return{...s,changePasswordValidation:c,handleChange:e=>{"oldPassword"===e.target.name?i(e.target.value):r(e.target.value)},handleChangePassword:h,isLoading:o,newPasswordValue:l,oldPasswordValue:t}};var B=e=>{let{id:s}=e,{changePasswordValidation:a,handleChange:i,handleChangePassword:l,isLoading:r,isOpen:d,newPasswordValue:o,oldPasswordValue:c,onClose:h,onOpen:m}=V(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.wpx,{onClick:m,"data-testid":"update-password-btn",children:"Update password"}),(0,t.jsxs)(n.u_l,{isCentered:!0,isOpen:d,onClose:h,children:[(0,t.jsx)(n.ZAr,{}),(0,t.jsxs)(n.hzk,{children:[(0,t.jsx)(n.xBx,{children:"Update Password"}),(0,t.jsx)(n.olH,{}),(0,t.jsx)(n.fef,{pb:6,children:(0,t.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"oldPassword",onChange:i,placeholder:"Old Password",type:"password",value:c,"data-testid":"input-oldPassword"})}),(0,t.jsx)(n.NIc,{children:(0,t.jsx)(n.IIB,{isRequired:!0,name:"newPassword",onChange:i,placeholder:"New Password",type:"password",value:o,"data-testid":"input-newPassword"})})]})}),(0,t.jsxs)(n.mzw,{children:[(0,t.jsx)(n.wpx,{onClick:h,className:"mr-2 w-1/2",children:"Cancel"}),(0,t.jsx)(n.wpx,{type:"primary",disabled:!a,loading:r,onClick:l,htmlType:"submit",className:"mr-3 w-1/2","data-testid":"submit-btn",children:"Change Password"})]})]})]})]})},Y=()=>{var e;let s=(0,r.C)(y.Ux),a=(0,r.C)(U.dy),i=!!a&&a.id===s,{data:l}=(0,y.gU)(null!=s?s:"",{skip:!s});return(null==l?void 0:null===(e=l.roles)||void 0===e?void 0:e.includes(d.A7.EXTERNAL_RESPONDENT))?null:(0,t.jsx)(n.xuv,{children:s?(0,t.jsxs)(n.Ugi,{children:[i?(0,t.jsx)(B,{id:s}):null,(0,t.jsx)(o.ZP,{scopes:[d.Sh.USER_PASSWORD_RESET],children:(0,t.jsx)(L,{id:s})})]}):null})};let F=(e,s,a,t)=>!e||e&&!s||e&&s&&!0===a&&!!t,$=(e,s,a)=>!!(e&&s&&a),M=(e,s,a,t,n,i)=>!!e&&!s&&F(a,t,n,i),X=(e,s,a,t)=>F(e,s,a,t),H={username:"",first_name:"",email_address:"",last_name:"",password:"",password_login_enabled:!1},G=(e,s,a,t,n)=>P.Ry().shape({username:P.Z_().required().label("Username"),email_address:P.Z_().email().required().label("Email address"),first_name:P.Z_().label("First name"),last_name:P.Z_().label("Last name"),password:P.Z_().when(["password_login_enabled"],{is:i=>M(e,s,a,t,n,i),then:()=>O.a.label("Password"),otherwise:()=>P.Z_().optional().label("Password")}),password_login_enabled:P.O7().label("Allow password login")});var J=e=>{let{onSubmit:s,initialValues:a,canEditNames:i}=e,l=(0,h.useRouter)(),d=(0,n.pmc)(),o=(0,r.T)(),m=(0,n.qY0)(),{data:u}=z(),{data:x}=(0,q.qv)();(0,I.tB)({api_set:!1});let g=(0,r.C)(y.ZC),b=(0,r.C)(I.iR),{plus:v}=(0,R.hz)(),_=(null==u?void 0:u.enabled)||!1,C=(null==b?void 0:b.allow_username_password_login)||!1,S=!g,k=!S&&!i,E=x&&x.length>0||!1,A=$(v,E,C),P=null!=a?a:H;g&&"password_login_enabled"in g&&(P={...P,password_login_enabled:!!g.password_login_enabled});let O=G(S,_,v,E,C),U=async e=>{let a=M(S,_,v,E,C,e.password_login_enabled),t={username:e.username,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name};A&&(t.password_login_enabled=e.password_login_enabled),a&&e.password&&(t.password=e.password);let n=await s(t);if((0,p.D4)(n)){d((0,w.Vo)((0,p.e$)(n.error)));return}d((0,w.t5)("".concat(S?"User created. By default, new users are set to the Viewer role. To change the role, please go to the Permissions tab.":"User updated."))),(null==n?void 0:n.data)&&o((0,y.Vv)(n.data.id))};return(0,t.jsx)(c.J9,{onSubmit:U,initialValues:P,validationSchema:O,"data-testid":"user-form",children:e=>{let{dirty:s,isSubmitting:a,isValid:i,values:r}=e;return(0,t.jsx)(c.l0,{children:(0,t.jsxs)(n.Kqy,{maxW:["xs","xs","100%"],width:"100%",spacing:7,children:[(0,t.jsxs)(n.Kqy,{spacing:6,maxWidth:"55%",children:[(0,t.jsxs)(n.kCb,{children:[(0,t.jsxs)(n.xvT,{display:"flex",alignItems:"center",fontSize:"sm",fontWeight:"semibold",children:["Profile"," ",(null==g?void 0:g.disabled)&&(0,t.jsx)(n.j8w,{color:"success",className:"ml-2","data-testid":"invite-sent-badge",children:"Invite sent"})]}),(0,t.jsx)(n.xuv,{marginLeft:"auto",children:(0,t.jsxs)(n.Ugi,{children:[X(v,E,C||!1,r.password_login_enabled)&&(0,t.jsx)(Y,{"data-testid":"password-management"}),S?null:(0,t.jsxs)(n.xuv,{children:[(0,t.jsx)(n.wpx,{"aria-label":"delete",icon:(0,t.jsx)(f.l,{}),onClick:m.onOpen,"data-testid":"delete-user-btn"}),(0,t.jsx)(T.Z,{user:g,...m})]})]})})]}),(0,t.jsx)(N.j0,{name:"username",label:"Username",variant:"block",placeholder:"Enter new username",disabled:!S,isRequired:!0,"data-testid":"input-username"}),(0,t.jsx)(N.j0,{name:"email_address",label:"Email address",variant:"block",placeholder:"Enter email of user",isRequired:!0,"data-testid":"input-email-address"}),(0,t.jsx)(N.j0,{name:"first_name",label:"First name",variant:"block",placeholder:"Enter first name of user",disabled:k,"data-testid":"input-first-name"}),(0,t.jsx)(N.j0,{name:"last_name",label:"Last name",variant:"block",placeholder:"Enter last name of user",disabled:k,"data-testid":"input-last-name"}),A&&(0,t.jsx)(N.w8,{name:"password_login_enabled",label:"Allow password login",tooltip:"When enabled, user can log in with username and password. When disabled, user must use SSO.",variant:"stacked",isDisabled:!S,"data-testid":"toggle-allow-password-login",size:"default"}),M(S,_,v,E,C,r.password_login_enabled)&&(0,t.jsx)(N.j0,{name:"password",label:"Password",variant:"block",placeholder:"********",type:"password",tooltip:"Password must contain at least 8 characters, 1 number, 1 capital letter, 1 lowercase letter, and at least 1 symbol.",isRequired:!0,"data-testid":"input-password"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.wpx,{onClick:()=>l.push(j.e3),className:"mr-3","data-testid":"cancel-btn",children:"Cancel"}),(0,t.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!s||!i,loading:a,"data-testid":"save-user-btn",children:"Save"})]})]})})}})},Q=e=>{let{onSubmit:s,initialValues:a,...i}=e,c=(0,r.C)(y.Ux);(0,y.Fk)(c,{skip:!c});let h=(0,o.Tg)([d.Sh.USER_PERMISSION_UPDATE]),m=!c||!h,p=[{label:"Profile",key:"profile",children:(0,t.jsx)(J,{onSubmit:s,initialValues:a,...i})},{label:"Permissions",key:"permissions",children:(0,t.jsxs)(n.kCb,{gap:"97px",children:[(0,t.jsx)(n.xuv,{w:{base:"100%",md:"50%",xl:"50%"},children:(0,t.jsx)(A,{})}),(0,t.jsx)(n.xuv,{position:"absolute",top:"96px",right:6,height:"calc(100% + 100px)",overflowY:"scroll",padding:6,w:"35%",borderLeftWidth:"1px",children:(0,t.jsx)(l,{})})]}),disabled:m,forceRender:!m}];return(0,t.jsx)(n.A5g,{items:p})}},31883:function(e,s,a){a.d(s,{Bw:function(){return t.Bw},D4:function(){return t.D4}});var t=a(19043)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4230],{58754:function(e,t,a){var i=a(24246),s=a(13577),n=a(70788);t.Z=e=>{let{heading:t,breadcrumbItems:a,isSticky:r=!0,children:l,rightContent:d,style:o,...c}=e;return(0,i.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,i.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.lQT,{className:a||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,d&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!a&&(0,i.jsx)(n.m,{className:l?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,a){a.d(t,{d:function(){return o}});var i=a(24246),s=a(13577),n=a(34090),r=a(27378),l=a(46238),d=a(40324);let o=e=>{let{name:t,label:a,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:p,...x}=e,[h,y,{setValue:g}]=(0,n.U$)(t),j=!!(y.touched&&y.error),[v,b]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===x.mode?(e,t)=>e?e.value!==v||h.value.includes(v)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(v,'"'):void 0:x.optionRender||void 0,_=e=>{b(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{g(e),x.onChange&&x.onChange(e,t)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:a?"1fr 3fr":"1fr",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:a}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{children:p}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(l.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:a}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:p}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},70788:function(e,t,a){a.d(t,{m:function(){return o}});var i=a(24246),s=a(13577),n=a(79894),r=a.n(n),l=a(27378);let{Text:d}=s.AntTypography,o=e=>{let{items:t,...a}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,a)=>{let n=a===t.length-1,l={...e},o=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:l.title})),o)?l.title=(0,i.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(s.zrq,{items:n,...a})}},35258:function(e,t,a){a.d(t,{Z:function(){return q}});var i=a(24246),s=a(84720),n=a(13577),r=a(27378),l=a(52368),d=a(812),o=a(46628),c=a(65450),u=a(31883),m=a(34090),p=a(45938),x=a(95346),h=a(55484),y=a(97181),g=a(40324),j=a(68309);let v=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),b={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:""},f=e=>{var t;let{customFieldValues:a,...i}=e;return{...i,name:null!==(t=e.name)&&void 0!==t?t:""}},_=e=>{let{allDataUses:t,allDataCategories:a,allDataSubjects:s,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var t;return{label:null!==(t=e.name)&&void 0!==t?t:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(g.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(x.uc,{resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,t)=>e?{...e,customFieldValues:t||{}}:b,C=e=>{let{onSubmit:t,initialValues:a,allDataUses:s,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,x.mZ)({resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,r.useMemo)(()=>k(a,d),[a,d]),[u,m]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>{let e=s.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[s,c]);return{handleSubmit:async(e,a)=>{let{customFieldValues:i}=e,s=f(e),n=await t(s,a);if(n){let t=n.filter(t=>t.data_use===e.data_use&&(!t.name||t.name===e.name));t.length>0&&await o({customFieldValues:i,fides_key:t[0].id}),a.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:t,boxProps:a,hideSaved:s}=e;return(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...a,children:[p?(0,i.jsx)(n.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:p}):null,!s&&u&&!t&&c.data_use?(0,i.jsxs)(n.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(n.StI,{})," Saved"]}):null]})},initialValues:c}},w=e=>{let{onSubmit:t,initialValues:a,onDelete:s,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=C({onSubmit:t,initialValues:a,allDataUses:r.allDataUses,privacyDeclarationId:null==a?void 0:a.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:v,children:e=>{let{dirty:t}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(n.xuv,{"data-testid":"header",children:d({dirty:t})}),(0,i.jsx)(_,{onDelete:s,...r})]})]})}})},S=e=>{let{privacyDeclaration:t,onEdit:a,onDelete:s,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=C({initialValues:t,onSubmit:e=>a(t,e),privacyDeclarationId:t.id,...l});return(0,i.jsx)(n.Qdk,{children:e=>{let{isExpanded:a}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:v,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(t.data_use,"-form"),children:[(0,i.jsx)(p.Gt,{id:"".concat(t.id,"-form"),name:t.id}),(0,i.jsxs)(n.KFZ,{py:4,borderBottomWidth:a?"0px":"1px",backgroundColor:a?"gray.50":void 0,"data-testid":"accordion-header-".concat(t.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!a}),(0,i.jsx)(n.XEm,{})]}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:t.id,onDelete:s,includeCustomFields:r,...l})})})]})}})}})};var D=e=>{let{privacyDeclarations:t,...a}=e;return(0,i.jsx)(n.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:t.map(e=>(0,i.jsx)(S,{privacyDeclaration:e,...a},e.id))})},I=e=>{let{system:t,includeCustomFields:a,onSave:s,...l}=e,m=(0,n.pmc)(),[p]=(0,c.qQ)(),[x,h]=(0,r.useState)(!1),[y,g]=(0,r.useState)(void 0),j=(0,r.useMemo)(()=>y?t.privacy_declarations.filter(e=>e.id!==y.id):t.privacy_declarations,[y,t]),v=e=>j.filter(t=>t.data_use===e.data_use&&t.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),b=async(e,a)=>{let i=e.map(e=>{var t;return{...e,name:null!==(t=e.name)&&void 0!==t?t:""}}),n={...t,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(t));return}return m.closeAll(),m((0,o.t5)(a?"Data use deleted":"Data use saved")),s&&s(e.data),e.data.privacy_declarations})(await p(n))},f=async(e,a)=>{if(!(a.id!==e.id&&v(a)))return b(t.privacy_declarations.map(t=>t.id===e.id?a:t))},_=async e=>{if(v(e))return;m.closeAll();let t=[...j,e],a=await b(t);return a&&g(a.filter(t=>(!t.name||t.name===e.name)&&t.data_use===e.data_use)[0]),a},k=async e=>b(t.privacy_declarations.filter(t=>t.id!==e.id),!0),C=async e=>{let t=await k(e);return t&&(h(!1),g(void 0)),t};return(0,r.useEffect)(()=>{h(!1)},[t.fides_key]),(0,i.jsxs)(n.Kqy,{spacing:3,children:[(0,i.jsx)(D,{privacyDeclarations:j,onEdit:f,onDelete:k,includeCustomFields:a,...l}),x?(0,i.jsx)(n.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(w,{initialValues:y,onSubmit:_,onDelete:C,includeCustomFields:a,...l})}):null,0===t.privacy_declarations.length?(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=a(19043);let R=e=>{let[t]=(0,c.dB)(),a=(0,n.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await t(n);(0,T.D4)(r)?a((0,o.Vo)((0,d.e$)(r.error))):(a((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},N={name:"",description:""};var V=e=>{let{system:t}=e,a="/systems/configure/".concat(t.fides_key),{handleUpsertSystem:s,validationSchema:r}=R(t);return(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(n.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(n.LZC,{}),(0,i.jsxs)(n._pl,{color:"complimentary.500",href:a,children:["View more",(0,i.jsx)(n.h0n,{ml:2})]})]}),(0,i.jsx)(n.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=t?t:N,validationSchema:r,onSubmit:s,children:e=>{let{isSubmitting:t,dirty:a,isValid:s}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(g.j0,{label:"System name",name:"name",variant:"stacked"})}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(g.Ks,{label:"System description",name:"description",variant:"stacked"})}),(0,i.jsx)(n.kCb,{marginTop:6,justifyContent:"flex-end",children:(0,i.jsx)(n.wpx,{htmlType:"submit",disabled:!a||!s,loading:t,type:"primary",children:"Save"})})]})}})})]})},q=e=>{var t;let{selectedSystemId:a,resetSelectedSystemId:d}=e,o=(0,r.useMemo)(()=>!!a,[a]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:p}=(0,c.rn)(a,{skip:!a});return(0,i.jsx)(n.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(n.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(n.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:a?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(n.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(n.kCb,{children:[(0,i.jsx)(n.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(n.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(t=null==p?void 0:p.name)&&void 0!==t?t:"System Information"})}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.kCb,{alignItems:"center",children:(0,i.jsx)(n.wpx,{icon:(0,i.jsx)(n.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(n.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(V,{system:p}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(n.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(n.xuv,{pb:3,children:(0,i.jsx)(I,{system:p,...m})})}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(s.q,{system:p})]}):null})]})})})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4230],{58754:function(e,t,a){var i=a(24246),s=a(13577),n=a(70788);t.Z=e=>{let{heading:t,breadcrumbItems:a,isSticky:r=!0,children:l,rightContent:d,style:o,...c}=e;return(0,i.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,i.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.lQT,{className:a||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,d&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!a&&(0,i.jsx)(n.m,{className:l?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,a){a.d(t,{d:function(){return o}});var i=a(24246),s=a(13577),n=a(34090),r=a(27378),l=a(46238),d=a(40324);let o=e=>{let{name:t,label:a,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:p,...x}=e,[h,y,{setValue:g}]=(0,n.U$)(t),j=!!(y.touched&&y.error),[v,b]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===x.mode?(e,t)=>e?e.value!==v||h.value.includes(v)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(v,'"'):void 0:x.optionRender||void 0,_=e=>{b(e),x.onSearch&&x.onSearch(e)},k=(e,t)=>{g(e),x.onChange&&x.onChange(e,t)};return"inline"===m?(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.rjZ,{templateColumns:a?"1fr 3fr":"1fr",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:a}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{children:p}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(l.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(s.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[a?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:a}):null,(0,i.jsx)(l.b,{label:c})]}),(0,i.jsx)(s.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?_:void 0,onChange:k,value:h.value||void 0,status:j?"error":void 0}),p&&(0,i.jsx)(s.Q6r,{style:{marginTop:0},children:p}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},70788:function(e,t,a){a.d(t,{m:function(){return o}});var i=a(24246),s=a(13577),n=a(79894),r=a.n(n),l=a(27378);let{Text:d}=s.AntTypography,o=e=>{let{items:t,...a}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,a)=>{let n=a===t.length-1,l={...e},o=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,children:l.title})),o)?l.title=(0,i.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(s.zrq,{items:n,...a})}},35258:function(e,t,a){a.d(t,{Z:function(){return q}});var i=a(24246),s=a(84720),n=a(13577),r=a(27378),l=a(52368),d=a(812),o=a(46628),c=a(65450),u=a(31883),m=a(34090),p=a(45938),x=a(95346),h=a(55484),y=a(97181),g=a(40324),j=a(73825);let v=h.Ry().shape({data_categories:h.IX(h.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:h.Z_().required().label("Data use"),data_subjects:h.IX(h.Z_()).min(1,"Must assign at least one data subject").label("Data subjects")}),b={data_categories:[],data_subjects:[],data_use:"",dataset_references:[],customFieldValues:{},id:""},f=e=>{var t;let{customFieldValues:a,...i}=e;return{...i,name:null!==(t=e.name)&&void 0!==t?t:""}},_=e=>{let{allDataUses:t,allDataCategories:a,allDataSubjects:s,allDatasets:r,privacyDeclarationId:l,includeCustomFields:d}=e,o=r?r.map(e=>{var t;return{label:null!==(t=e.name)&&void 0!==t?t:e.fides_key,value:e.fides_key}}):[];return(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(y.d,{id:"data_use",label:"Data use",name:"data_use",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What is the system using the data for. For example, is it for third party advertising or perhaps simply providing system operations.",layout:"stacked",disabled:!!l}),(0,i.jsx)(g.j0,{id:"name",label:"Processing Activity",name:"name",variant:"stacked",tooltip:"The personal data processing activity or activities associated with this data use.",disabled:!!l}),(0,i.jsx)(y.d,{name:"data_categories",label:"Data categories",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"What type of data is your system processing? This could be various types of user or system data.",mode:"multiple",layout:"stacked",disabled:!0}),(0,i.jsx)(y.d,{name:"data_subjects",label:"Data subjects",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Whose data are you processing? This could be customers, employees or any other type of user in your system.",mode:"multiple",layout:"stacked",disabled:!0}),r?(0,i.jsx)(y.d,{name:"dataset_references",label:"Dataset references",options:o,tooltip:"Referenced Dataset fides keys used by the system.",mode:"multiple",layout:"stacked"}):null,d?(0,i.jsx)(x.uc,{resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}):null]})},k=(e,t)=>e?{...e,customFieldValues:t||{}}:b,C=e=>{let{onSubmit:t,initialValues:a,allDataUses:s,privacyDeclarationId:l}=e,{customFieldValues:d,upsertCustomFields:o}=(0,x.mZ)({resourceType:j.P6.PRIVACY_DECLARATION,resourceFidesKey:l}),c=(0,r.useMemo)(()=>k(a,d),[a,d]),[u,m]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>{let e=s.filter(e=>e.fides_key===c.data_use)[0];if(e)return c.name?"".concat(e.name," - ").concat(c.name):e.name},[s,c]);return{handleSubmit:async(e,a)=>{let{customFieldValues:i}=e,s=f(e),n=await t(s,a);if(n){let t=n.filter(t=>t.data_use===e.data_use&&(!t.name||t.name===e.name));t.length>0&&await o({customFieldValues:i,fides_key:t[0].id}),a.resetForm({values:e}),m(!0)}},renderHeader:e=>{let{dirty:t,boxProps:a,hideSaved:s}=e;return(0,i.jsxs)(n.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",...a,children:[p?(0,i.jsx)(n.X6q,{as:"h4",size:"xs",fontWeight:"medium",mr:4,children:p}):null,!s&&u&&!t&&c.data_use?(0,i.jsxs)(n.xvT,{fontSize:"sm","data-testid":"saved-indicator",children:[(0,i.jsx)(n.StI,{})," Saved"]}):null]})},initialValues:c}},w=e=>{let{onSubmit:t,initialValues:a,onDelete:s,...r}=e,{handleSubmit:l,renderHeader:d,initialValues:o}=C({onSubmit:t,initialValues:a,allDataUses:r.allDataUses,privacyDeclarationId:null==a?void 0:a.id});return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:o,onSubmit:l,validationSchema:v,children:e=>{let{dirty:t}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsx)(n.xuv,{"data-testid":"header",children:d({dirty:t})}),(0,i.jsx)(_,{onDelete:s,...r})]})]})}})},S=e=>{let{privacyDeclaration:t,onEdit:a,onDelete:s,includeCustomFields:r,...l}=e,{initialValues:d,renderHeader:o,handleSubmit:c}=C({initialValues:t,onSubmit:e=>a(t,e),privacyDeclarationId:t.id,...l});return(0,i.jsx)(n.Qdk,{children:e=>{let{isExpanded:a}=e;return(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:d,onSubmit:c,validationSchema:v,children:e=>{let{dirty:d}=e;return(0,i.jsxs)(m.l0,{"data-testid":"".concat(t.data_use,"-form"),children:[(0,i.jsx)(p.Gt,{id:"".concat(t.id,"-form"),name:t.id}),(0,i.jsxs)(n.KFZ,{py:4,borderBottomWidth:a?"0px":"1px",backgroundColor:a?"gray.50":void 0,"data-testid":"accordion-header-".concat(t.data_use),children:[o({dirty:d,boxProps:{flex:"1",textAlign:"left"},hideSaved:!a}),(0,i.jsx)(n.XEm,{})]}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",pt:0,children:(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsx)(_,{privacyDeclarationId:t.id,onDelete:s,includeCustomFields:r,...l})})})]})}})}})};var D=e=>{let{privacyDeclarations:t,...a}=e;return(0,i.jsx)(n.UQy,{allowToggle:!0,border:"transparent","data-testid":"privacy-declaration-accordion",children:t.map(e=>(0,i.jsx)(S,{privacyDeclaration:e,...a},e.id))})},I=e=>{let{system:t,includeCustomFields:a,onSave:s,...l}=e,m=(0,n.pmc)(),[p]=(0,c.qQ)(),[x,h]=(0,r.useState)(!1),[y,g]=(0,r.useState)(void 0),j=(0,r.useMemo)(()=>y?t.privacy_declarations.filter(e=>e.id!==y.id):t.privacy_declarations,[y,t]),v=e=>j.filter(t=>t.data_use===e.data_use&&t.name===e.name).length>0&&(m((0,o.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),b=async(e,a)=>{let i=e.map(e=>{var t;return{...e,name:null!==(t=e.name)&&void 0!==t?t:""}}),n={...t,privacy_declarations:i};return(e=>{if((0,u.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");m((0,o.Vo)(t));return}return m.closeAll(),m((0,o.t5)(a?"Data use deleted":"Data use saved")),s&&s(e.data),e.data.privacy_declarations})(await p(n))},f=async(e,a)=>{if(!(a.id!==e.id&&v(a)))return b(t.privacy_declarations.map(t=>t.id===e.id?a:t))},_=async e=>{if(v(e))return;m.closeAll();let t=[...j,e],a=await b(t);return a&&g(a.filter(t=>(!t.name||t.name===e.name)&&t.data_use===e.data_use)[0]),a},k=async e=>b(t.privacy_declarations.filter(t=>t.id!==e.id),!0),C=async e=>{let t=await k(e);return t&&(h(!1),g(void 0)),t};return(0,r.useEffect)(()=>{h(!1)},[t.fides_key]),(0,i.jsxs)(n.Kqy,{spacing:3,children:[(0,i.jsx)(D,{privacyDeclarations:j,onEdit:f,onDelete:k,includeCustomFields:a,...l}),x?(0,i.jsx)(n.xuv,{backgroundColor:"gray.50",p:4,"data-testid":"new-declaration-form",children:(0,i.jsx)(w,{initialValues:y,onSubmit:_,onDelete:C,includeCustomFields:a,...l})}):null,0===t.privacy_declarations.length?(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",pl:2,children:"No data uses"}):null]})},T=a(19043);let R=e=>{let[t]=(0,c.dB)(),a=(0,n.pmc)();return{handleUpsertSystem:async(i,s)=>{let n=[{...e,name:i.name,description:i.description}],r=await t(n);(0,T.D4)(r)?a((0,o.Vo)((0,d.e$)(r.error))):(a((0,o.t5)("Successfully saved system info")),s.resetForm({values:i}))},validationSchema:h.Ry().shape({name:h.Z_().required().label("Name"),description:h.Z_().required().label("Description")})}},N={name:"",description:""};var V=e=>{let{system:t}=e,a="/systems/configure/".concat(t.fides_key),{handleUpsertSystem:s,validationSchema:r}=R(t);return(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.kCb,{alignItems:"center",children:[(0,i.jsx)(n.xvT,{color:"gray.600",size:"md",lineHeight:6,fontWeight:"semibold",marginBottom:2,children:"System details"}),(0,i.jsx)(n.LZC,{}),(0,i.jsxs)(n._pl,{color:"complimentary.500",href:a,children:["View more",(0,i.jsx)(n.h0n,{ml:2})]})]}),(0,i.jsx)(n.xuv,{width:"100%",padding:4,borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(m.J9,{enableReinitialize:!0,initialValues:null!=t?t:N,validationSchema:r,onSubmit:s,children:e=>{let{isSubmitting:t,dirty:a,isValid:s}=e;return(0,i.jsxs)(m.l0,{children:[(0,i.jsx)(p.Gt,{id:"SystemInfoDrawer",name:"System Info"}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(g.j0,{label:"System name",name:"name",variant:"stacked"})}),(0,i.jsx)(n.xuv,{marginTop:3,children:(0,i.jsx)(g.Ks,{label:"System description",name:"description",variant:"stacked"})}),(0,i.jsx)(n.kCb,{marginTop:6,justifyContent:"flex-end",children:(0,i.jsx)(n.wpx,{htmlType:"submit",disabled:!a||!s,loading:t,type:"primary",children:"Save"})})]})}})})]})},q=e=>{var t;let{selectedSystemId:a,resetSelectedSystemId:d}=e,o=(0,r.useMemo)(()=>!!a,[a]),{isLoading:u,...m}=(0,l.f)({includeDatasets:!1,includeDisabled:!1}),{data:p}=(0,c.rn)(a,{skip:!a});return(0,i.jsx)(n.xuv,{position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,overflow:"hidden",children:(0,i.jsx)(n.Mi4,{transition:{enter:{ease:"easeInOut",duration:.5},exit:{ease:"easeInOut",duration:.5}},direction:"right",in:o,unmountOnExit:!0,style:{zIndex:11,pointerEvents:"none",position:"absolute"},children:(0,i.jsxs)(n.xuv,{position:"absolute",right:"0px",height:"100%",width:"100%",maxWidth:"480px",pointerEvents:"auto",borderWidth:0,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)",display:a?"unset":"none",backgroundColor:"white","data-testid":"datamap-drawer",children:[(0,i.jsx)(n.xuv,{id:"drawer-header",borderBottomWidth:1,paddingX:6,paddingY:3,children:(0,i.jsxs)(n.kCb,{children:[(0,i.jsx)(n.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:(0,i.jsx)(n.xvT,{fontWeight:"semibold",fontSize:"lg",lineHeight:"7",color:"gray.900",children:null!==(t=null==p?void 0:p.name)&&void 0!==t?t:"System Information"})}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.kCb,{alignItems:"center",children:(0,i.jsx)(n.wpx,{icon:(0,i.jsx)(n.Two,{}),"aria-label":"Close error message",type:"text",onClick:d,"data-testid":"datamap-drawer-close"})})]})}),(0,i.jsx)(n.xuv,{id:"drawer-body",height:"calc(100% - 46px)",overflowY:"auto",padding:6,style:{scrollbarGutter:"stable"},children:p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(V,{system:p}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,children:"Data uses"}),(0,i.jsx)(n.xuv,{borderTop:"1px solid",borderColor:"gray.200",children:(0,i.jsx)(n.xuv,{pb:3,children:(0,i.jsx)(I,{system:p,...m})})}),(0,i.jsx)(n.xvT,{size:"md",color:"gray.600",lineHeight:6,fontWeight:"semibold",mt:"10px",mb:2,paddingBottom:2,children:"Data flow"}),(0,i.jsx)(s.q,{system:p})]}):null})]})})})}}}]);
|
fides/ui-build/static/admin/_next/static/chunks/{431-24380873201c3e1b.js → 431-2a9adafa2689a0f4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{66726:function(t,e,i){var n=i(11611),r=i(82846),s=i(91936),o=Math.max,l=Math.min;t.exports=function(t,e,i){var a,c,u,d,f,x,v=0,h=!1,I=!1,j=!0;if("function"!=typeof t)throw TypeError("Expected a function");function E(e){var i=a,n=c;return a=c=void 0,v=e,d=t.apply(n,i)}function p(t){var i=t-x,n=t-v;return void 0===x||i>=e||i<0||I&&n>=u}function L(){var t,i,n,s=r();if(p(s))return m(s);f=setTimeout(L,(t=s-x,i=s-v,n=e-t,I?l(n,u-i):n))}function m(t){return(f=void 0,j&&a)?E(t):(a=c=void 0,d)}function C(){var t,i=r(),n=p(i);if(a=arguments,c=this,x=i,n){if(void 0===f)return v=t=x,f=setTimeout(L,e),h?E(t):d;if(I)return clearTimeout(f),f=setTimeout(L,e),E(x)}return void 0===f&&(f=setTimeout(L,e)),d}return e=s(e)||0,n(i)&&(h=!!i.leading,u=(I="maxWait"in i)?o(s(i.maxWait)||0,e):u,j="trailing"in i?!!i.trailing:j),C.cancel=function(){void 0!==f&&clearTimeout(f),v=0,a=x=c=f=void 0},C.flush=function(){return void 0===f?d:m(r())},C}},82846:function(t,e,i){var n=i(77400);t.exports=function(){return n.Date.now()}},30952:function(t,e,i){"use strict";i.d(e,{f:function(){return a}});var n=i(24246),r=i(66726),s=i.n(r),o=i(27378),l=i(26917);let a=t=>{let{value:e,onChange:i,placeholder:r,...a}=t,[c,u]=(0,o.useState)(e),d=s()(i,500),f=(0,o.useCallback)(t=>{u(t),d(t)},[]);return(0,n.jsx)(l.Z,{value:c,onChange:f,onClear:()=>{u(""),i("")},placeholder:r,...a})}},35287:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(88038),o=i.n(s);i(27378),e.Z=t=>{let{children:e,title:i,mainProps:s}=t;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:e})]})}},14047:function(t,e,i){"use strict";i.d(e,{H:function(){return s},V:function(){return n.V}});var n=i(84306),r=i(812);let s=()=>{let{errorAlert:t}=(0,n.V)();return{handleError:e=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(e)?i=e.data.detail:(0,r.tB)(e)&&(i=e.data.detail[0].msg),t(i)}}}},84306:function(t,e,i){"use strict";i.d(e,{V:function(){return s}});var n=i(24246),r=i(13577);let s=()=>{let t=(0,r.pmc)();return{errorAlert:(e,i,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:t=>{let{onClose:s}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&t.isActive(s.id)?t.update(s.id,o):t(o)},successAlert:(e,i,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:t=>{let{onClose:s}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&t.isActive(s.id)?t.update(s.id,o):t(o)}}}},79494:function(t,e,i){"use strict";var n=i(24246),r=i(13577);e.Z=t=>{let{title:e,icon:i,type:s,...o}=t;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(e),icon:i,iconPosition:"start",...o,children:e})}},38347:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(56839);e.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(t,e,i){"use strict";var n=i(86677),r=i(77830);e.Z=()=>{let t=(0,n.useRouter)();return{monitorId:t.query.monitorId,resourceUrn:t.query.resourceUrn,navigateToDetectionResults:e=>{let{resourceUrn:i,filterTab:n}=e;t.push({pathname:r.dS,query:{resourceUrn:i},hash:n})},navigateToDiscoveryResults:e=>{let{resourceUrn:i,filterTab:n}=e;t.push({pathname:r.Sj,query:{resourceUrn:i},hash:n})}}}},56839:function(t,e,i){"use strict";i.d(e,{dK:function(){return u},Rv:function(){return x},$P:function(){return f},zj:function(){return v},Kr:function(){return h},q1:function(){return d},QL:function(){return I}});var n=i(24246),r=i(13577);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var c=i(28278);let u=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),d=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),f=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),x=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),v=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),h=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),I={[c.E.ADDITION]:(0,n.jsx)(u,{}),[c.E.REMOVAL]:(0,n.jsx)(d,{}),[c.E.CLASSIFICATION]:(0,n.jsx)(f,{}),[c.E.CHANGE]:(0,n.jsx)(x,{}),[c.E.MONITORED]:(0,n.jsx)(v,{}),[c.E.MUTED]:(0,n.jsx)(h,{}),[c.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[c.E.NONE]:null}},87667:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(56839),o=i(20449),l=i(98559),a=i(80356);e.Z=t=>{let{result:e,changeTypeOverride:i}=t,c=null!=i?i:(0,o.Z)(e);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.esZ,{title:c,children:(0,n.jsx)("span",{children:s.QL[c]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(e)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(e)})]})}},50169:function(t,e,i){"use strict";var n=i(24246),r=i(47935),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};e.Z=t=>{var e,i,s,a,c;let{result:u,changeTypeOverride:d}=t;if(null===(e=u.user_assigned_data_categories)||void 0===e?void 0:e.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let f=null!=d?d:(0,o.Z)(u);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[f])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(c=null===(s=l[f])||void 0===s?void 0:s.label)&&void 0!==c?c:"Pending review"})}},28278:function(t,e,i){"use strict";var n,r;i.d(e,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(t,e){"use strict";e.Z=t=>{let e=t.split(".");return e.length>1?e[1]:""}},20449:function(t,e,i){"use strict";var n=i(28278),r=i(68309);e.Z=t=>t.diff_status===r.LL.ADDITION?n.E.ADDITION:t.diff_status===r.LL.REMOVAL?n.E.REMOVAL:t.diff_status===r.LL.CLASSIFYING||t.diff_status===r.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:t.diff_status===r.LL.CLASSIFICATION_ADDITION||t.diff_status===r.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:t.child_diff_statuses?t.child_diff_statuses[r.LL.CLASSIFYING]||t.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:t.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||t.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:t.child_diff_statuses[r.LL.ADDITION]||t.child_diff_statuses[r.LL.REMOVAL]?n.E.CHANGE:t.diff_status===r.LL.MONITORED?n.E.MONITORED:t.diff_status===r.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},7940:function(t,e,i){"use strict";i.d(e,{G:function(){return r}});var n=i(68309);let r=t=>{var e,i,r;return t?t.resource_type?t.resource_type:(null===(e=t.schemas)||void 0===e?void 0:e.length)?n.D$.DATABASE:(null===(i=t.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=t.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(t,e){"use strict";e.Z=t=>{let{name:e,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:o,top_level_field_name:l,top_level_field_urn:a}=t;if(!l)return e;let c=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,o,l].forEach(t=>{if(t){let e=c.indexOf(t);e>-1&&c.splice(e,1)}}),c.join("."))}},80285:function(t,e){"use strict";e.Z=t=>t.urn},36168:function(t,e){"use strict";e.Z=t=>{var e;return!!t.parent_table_urn&&null!==(e=t.sub_field_urns)&&void 0!==e&&!!e.length&&!t.top_level_field_name}},80356:function(t,e,i){"use strict";var n=i(7940),r=i(36168),s=i(68309);e.Z=t=>(0,n.G)(t)!==s.D$.FIELD||(0,r.Z)(t)}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{66726:function(t,e,i){var n=i(11611),r=i(82846),s=i(91936),o=Math.max,l=Math.min;t.exports=function(t,e,i){var a,c,u,d,f,x,v=0,h=!1,I=!1,j=!0;if("function"!=typeof t)throw TypeError("Expected a function");function E(e){var i=a,n=c;return a=c=void 0,v=e,d=t.apply(n,i)}function p(t){var i=t-x,n=t-v;return void 0===x||i>=e||i<0||I&&n>=u}function L(){var t,i,n,s=r();if(p(s))return m(s);f=setTimeout(L,(t=s-x,i=s-v,n=e-t,I?l(n,u-i):n))}function m(t){return(f=void 0,j&&a)?E(t):(a=c=void 0,d)}function C(){var t,i=r(),n=p(i);if(a=arguments,c=this,x=i,n){if(void 0===f)return v=t=x,f=setTimeout(L,e),h?E(t):d;if(I)return clearTimeout(f),f=setTimeout(L,e),E(x)}return void 0===f&&(f=setTimeout(L,e)),d}return e=s(e)||0,n(i)&&(h=!!i.leading,u=(I="maxWait"in i)?o(s(i.maxWait)||0,e):u,j="trailing"in i?!!i.trailing:j),C.cancel=function(){void 0!==f&&clearTimeout(f),v=0,a=x=c=f=void 0},C.flush=function(){return void 0===f?d:m(r())},C}},82846:function(t,e,i){var n=i(77400);t.exports=function(){return n.Date.now()}},30952:function(t,e,i){"use strict";i.d(e,{f:function(){return a}});var n=i(24246),r=i(66726),s=i.n(r),o=i(27378),l=i(26917);let a=t=>{let{value:e,onChange:i,placeholder:r,...a}=t,[c,u]=(0,o.useState)(e),d=s()(i,500),f=(0,o.useCallback)(t=>{u(t),d(t)},[]);return(0,n.jsx)(l.Z,{value:c,onChange:f,onClear:()=>{u(""),i("")},placeholder:r,...a})}},35287:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(88038),o=i.n(s);i(27378),e.Z=t=>{let{children:e,title:i,mainProps:s}=t;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:e})]})}},14047:function(t,e,i){"use strict";i.d(e,{H:function(){return s},V:function(){return n.V}});var n=i(84306),r=i(812);let s=()=>{let{errorAlert:t}=(0,n.V)();return{handleError:e=>{let i="An unexpected error occurred. Please try again.";(0,r.Ot)(e)?i=e.data.detail:(0,r.tB)(e)&&(i=e.data.detail[0].msg),t(i)}}}},84306:function(t,e,i){"use strict";i.d(e,{V:function(){return s}});var n=i(24246),r=i(13577);let s=()=>{let t=(0,r.pmc)();return{errorAlert:(e,i,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:t=>{let{onClose:s}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&t.isActive(s.id)?t.update(s.id,o):t(o)},successAlert:(e,i,s)=>{let o={...s,position:(null==s?void 0:s.position)||"top",render:t=>{let{onClose:s}=t;return(0,n.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(r.zMQ,{}),(0,n.jsxs)(r.xuv,{children:[i&&(0,n.jsx)(r.CdC,{children:i}),(0,n.jsx)(r.XaZ,{children:e})]}),(0,n.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&t.isActive(s.id)?t.update(s.id,o):t(o)}}}},79494:function(t,e,i){"use strict";var n=i(24246),r=i(13577);e.Z=t=>{let{title:e,icon:i,type:s,...o}=t;return(0,n.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(e),icon:i,iconPosition:"start",...o,children:e})}},38347:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(56839);e.Z=()=>(0,n.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,n.jsx)(r.xol,{children:(0,n.jsx)(r.UOT,{color:"gray.400"})}),(0,n.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,n.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,n.jsx)(r.QHN,{bgColor:"gray.800"}),(0,n.jsx)(r.baG,{border:"none",children:(0,n.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Rv,{})," Change detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.$P,{})," Data labeled"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.zj,{})," Monitoring"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.dK,{})," Addition detected"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.Kr,{})," Unmonitored"]}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(s.q1,{})," Removal detected"]})]})})]})]})},47182:function(t,e,i){"use strict";var n=i(86677),r=i(77830);e.Z=()=>{let t=(0,n.useRouter)();return{monitorId:t.query.monitorId,resourceUrn:t.query.resourceUrn,navigateToDetectionResults:e=>{let{resourceUrn:i,filterTab:n}=e;t.push({pathname:r.dS,query:{resourceUrn:i},hash:n})},navigateToDiscoveryResults:e=>{let{resourceUrn:i,filterTab:n}=e;t.push({pathname:r.Sj,query:{resourceUrn:i},hash:n})}}}},56839:function(t,e,i){"use strict";i.d(e,{dK:function(){return u},Rv:function(){return x},$P:function(){return f},zj:function(){return v},Kr:function(){return h},q1:function(){return d},QL:function(){return I}});var n=i(24246),r=i(13577);let s=(0,r.IUT)({displayName:"CircleIcon",viewBox:"0 0 200 200",path:(0,n.jsx)("path",{fill:"currentColor",d:"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"})}),o=(0,r.IUT)({displayName:"RightDownArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})}),l=(0,r.IUT)({displayName:"RightUpArrowIcon",viewBox:"0 0 8 8",path:(0,n.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})}),a=(0,r.IUT)({displayName:"TagIcon",viewBox:"0 0 9 10",path:(0,n.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})});var c=i(28278);let u=()=>(0,n.jsx)(l,{color:"green.400",boxSize:2,mr:2,"data-testid":"add-icon"}),d=()=>(0,n.jsx)(o,{color:"red.400",boxSize:2,mr:2,"data-testid":"remove-icon"}),f=()=>(0,n.jsx)(a,{color:"orange.400",boxSize:3,mr:1,"data-testid":"classify-icon"}),x=()=>(0,n.jsx)(s,{color:"blue.400",boxSize:2.5,mb:"2px",mr:"6px","data-testid":"change-icon"}),v=()=>(0,n.jsx)(s,{color:"green.400",boxSize:2,mr:2,"data-testid":"monitored-icon"}),h=()=>(0,n.jsx)(s,{color:"red.400",boxSize:2,mr:2,"data-testid":"muted-icon"}),I={[c.E.ADDITION]:(0,n.jsx)(u,{}),[c.E.REMOVAL]:(0,n.jsx)(d,{}),[c.E.CLASSIFICATION]:(0,n.jsx)(f,{}),[c.E.CHANGE]:(0,n.jsx)(x,{}),[c.E.MONITORED]:(0,n.jsx)(v,{}),[c.E.MUTED]:(0,n.jsx)(h,{}),[c.E.IN_PROGRESS]:(0,n.jsx)(()=>(0,n.jsx)(s,{color:"orange.400",boxSize:2,mr:2,"data-testid":"in-progress-icon"}),{}),[c.E.NONE]:null}},87667:function(t,e,i){"use strict";var n=i(24246),r=i(13577),s=i(56839),o=i(20449),l=i(98559),a=i(80356);e.Z=t=>{let{result:e,changeTypeOverride:i}=t,c=null!=i?i:(0,o.Z)(e);return(0,n.jsxs)(r.kCb,{alignItems:"center",height:"100%",children:[(0,n.jsx)(r.esZ,{title:c,children:(0,n.jsx)("span",{children:s.QL[c]})}),(0,n.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,a.Z)(e)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(e)})]})}},50169:function(t,e,i){"use strict";var n=i(24246),r=i(47935),s=i(28278),o=i(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};e.Z=t=>{var e,i,s,a,c;let{result:u,changeTypeOverride:d}=t;if(null===(e=u.user_assigned_data_categories)||void 0===e?void 0:e.length)return(0,n.jsx)(r.A4,{color:"success",value:"Reviewed"});let f=null!=d?d:(0,o.Z)(u);return(0,n.jsx)(r.A4,{color:null!==(a=null===(i=l[f])||void 0===i?void 0:i.color)&&void 0!==a?a:"warning",value:null!==(c=null===(s=l[f])||void 0===s?void 0:s.label)&&void 0!==c?c:"Pending review"})}},28278:function(t,e,i){"use strict";var n,r;i.d(e,{E:function(){return n}}),(r=n||(n={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(t,e){"use strict";e.Z=t=>{let e=t.split(".");return e.length>1?e[1]:""}},20449:function(t,e,i){"use strict";var n=i(28278),r=i(73825);e.Z=t=>t.diff_status===r.LL.ADDITION?n.E.ADDITION:t.diff_status===r.LL.REMOVAL?n.E.REMOVAL:t.diff_status===r.LL.CLASSIFYING||t.diff_status===r.LL.CLASSIFICATION_QUEUED?n.E.IN_PROGRESS:t.diff_status===r.LL.CLASSIFICATION_ADDITION||t.diff_status===r.LL.CLASSIFICATION_UPDATE?n.E.CLASSIFICATION:t.child_diff_statuses?t.child_diff_statuses[r.LL.CLASSIFYING]||t.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?n.E.IN_PROGRESS:t.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||t.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?n.E.CLASSIFICATION:t.child_diff_statuses[r.LL.ADDITION]||t.child_diff_statuses[r.LL.REMOVAL]?n.E.CHANGE:t.diff_status===r.LL.MONITORED?n.E.MONITORED:t.diff_status===r.LL.MUTED?n.E.MUTED:n.E.NONE:n.E.NONE},7940:function(t,e,i){"use strict";i.d(e,{G:function(){return r}});var n=i(73825);let r=t=>{var e,i,r;return t?t.resource_type?t.resource_type:(null===(e=t.schemas)||void 0===e?void 0:e.length)?n.D$.DATABASE:(null===(i=t.tables)||void 0===i?void 0:i.length)?n.D$.SCHEMA:(null===(r=t.fields)||void 0===r?void 0:r.length)?n.D$.TABLE:n.D$.FIELD:void 0}},98559:function(t,e){"use strict";e.Z=t=>{let{name:e,urn:i,monitor_config_id:n,database_name:r,schema_name:s,table_name:o,top_level_field_name:l,top_level_field_urn:a}=t;if(!l)return e;let c=i.split(".");return a?i.replace("".concat(a).concat("."),""):([n,r,s,o,l].forEach(t=>{if(t){let e=c.indexOf(t);e>-1&&c.splice(e,1)}}),c.join("."))}},80285:function(t,e){"use strict";e.Z=t=>t.urn},36168:function(t,e){"use strict";e.Z=t=>{var e;return!!t.parent_table_urn&&null!==(e=t.sub_field_urns)&&void 0!==e&&!!e.length&&!t.top_level_field_name}},80356:function(t,e,i){"use strict";var n=i(7940),r=i(36168),s=i(73825);e.Z=t=>(0,n.G)(t)!==s.D$.FIELD||(0,r.Z)(t)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4608],{97181:function(e,t,i){i.d(t,{d:function(){return d}});var n=i(24246),a=i(13577),r=i(34090),s=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,f,{setValue:g}]=(0,r.U$)(t),v=!!(f.touched&&f.error),[y,j]=(0,s.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,_=e=>{j(e),m.onSearch&&m.onSearch(e)},k=(e,t)=>{g(e),m.onChange&&m.onChange(e,t)};return"inline"===h?(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,...d,children:i}):null,(0,n.jsxs)(a.jqI,{align:"center",children:[(0,n.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,n.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.gCW,{alignItems:"start",children:[(0,n.jsxs)(a.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{style:{marginTop:0},children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},46782:function(e,t,i){i.d(t,{j:function(){return r},l:function(){return s}});var n=i(30454),a=i.n(n);let r="#/definitions/FidesDatasetReference",s=e=>{let t=(e,t,i)=>{let n;return(void 0===t||""===t||void 0===t)&&(n="".concat(e," is required")),i===r&&((null==t?void 0:t.includes("."))?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},i=t=>{var i,n;return null!==(n=null==e?void 0:null===(i=e.required)||void 0===i?void 0:i.includes(t))&&void 0!==n&&n};return{validateField:t,isRequiredField:i,getFieldValidation:(e,n)=>{if(i(e))return e=>{var i;return t(n.title,e,null===(i=n.allOf)||void 0===i?void 0:i[0].$ref)}},preprocessValues:t=>{let i=a()(t);return e&&Object.keys(e.properties).forEach(t=>{var n,a;if((null===(n=e.properties[t].allOf)||void 0===n?void 0:n[0].$ref)===r){let e=null===(a=i.secrets[t])||void 0===a?void 0:a.split(".");e&&(i.secrets[t]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[t].title||i.secrets[t].startsWith("http://")||i.secrets[t].startsWith("https://")||(i.secrets[t]="https://".concat(i.secrets[t]))}),i}}}},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},41337:function(e,t,i){var n=i(24246),a=i(13577);i(27378);var r=i(88337),s=i(16394),l=i(14746);let o=l.Ny+l.iW.get(r.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===r.R.WEBSITE,h=e=>(null==e?void 0:e.connection_type)===r.R.SAAS;t.Z=e=>{let{data:t,...i}=e;return(0,n.jsx)(a.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,i;let n;if(c(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){let i=null===(e=t.secrets)||void 0===e?void 0:e.url;if(!i)return o;let n=(0,s.ge)(i);return(0,s.tl)(n,100)}if(d(t)){if(h(t)&&(null===(i=t.saas_config)||void 0===i?void 0:i.type)){let e=t.saas_config.type,i=l.LN.get(e);return i?l.Ny+i:l.Ny+l.iW.get(r.R.SAAS)}n=[...l.iW].find(e=>{let[i]=e;return t.connection_type.toString()===i.toString()})}else if(c(t)){let{identifier:e}=t;n=[...l.iW].find(t=>{let[i]=t;return i.toLowerCase()===e.toLowerCase()})}return n?l.Ny+n[1]:l.VD})(),fallbackSrc:u(t)?o:l.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return c(t)?t.human_readable:t})(),...i})}},1226:function(e,t,i){var n=i(24246);i(27378);var a=i(77213);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(a.Z,{title:"Connections",children:t})}},11274:function(e,t,i){i.d(t,{s:function(){return F}});var n=i(24246),a=i(96356),r=i(13577),s=i(86677),l=i(27378),o=i(16134),d=i(77830),c=i(68309),u=i(14047),h=i(84306),x=i(14207),m=i(16125),p=i(33335),f=i(34090),g=i(46782),v=i(46238);let y=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,a]=t;if("integer"===a.type){let t=a.default?Number(a.default):e[n];i[n]=t||0}else{var r;let t=null!==(r=a.default)&&void 0!==r?r:e[n];i[n]=null!=t?t:null}}),i};var j=e=>{let{data:t,defaultValues:i,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:b,connectionOption:_}=(0,o.C)(a.ZZ),[k,C]=(0,x.h2)(),S=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,r.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},w=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g.j&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},I=(e,t)=>(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),R=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g.j)return"Enter dataset.collection.field"},z=(e,i)=>{var a;return(0,n.jsx)(f.gN,{id:e,name:e,validate:(null!==(a=t.required)&&void 0!==a&&!!a.includes(e)||"integer"===i.type)&&(e=>{var t;return w(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:a=>{var s;let{field:l,form:o}=a;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,i.title),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(r.IIB,{...l,value:l.value||"",placeholder:R(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),(0,n.jsx)(r.J1D,{children:o.errors[e]})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:i.description})})]})}},e)},W=async()=>{try{await k(b.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(p.current=!0,C.isSuccess&&h(C),()=>{p.current=!1}),[h,C]),(0,n.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==b?void 0:b.key){var n,a;e.name=null!==(a=b.name)&&void 0!==a?a:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(n=b.saas_config)||void 0===n?void 0:n.fides_key:b.key}return y(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var a;if((null===(a=t.properties[i].allOf)||void 0===a?void 0:a[0].$ref)===g.j){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(_.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(r.J1D,{children:e.errors.name})]})]})}}),(0,n.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(r.NIc,{display:"flex",children:[I("description","Description"),(0,n.jsx)(r.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(_.human_readable," connection"),resize:"none",size:"sm",value:t.value||"",mr:"6"})]})}}),(0,n.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(_.human_readable," connection"),size:"sm"}),(0,n.jsx)(r.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)(r.kCb,{gap:2,children:[(0,n.jsx)(r.wpx,{disabled:!(null==b?void 0:b.key),loading:C.isLoading||C.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:t,data:i}=e,r=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:f}=(0,u.H)(),[g,v]=(0,l.useState)(!1),{connection:y,connectionOption:j}=(0,o.C)(a.ZZ),[b]=(0,x.pH)(),[_]=(0,x.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await _(l).unwrap();"failed"===o.test_status?s((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(r((0,a.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}}catch(e){f(e)}finally{v(!1)}},connectionOption:j}},_=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:a}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:a})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:t,onConnectionCreated:i,onTestEmail:a}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(j,{data:t,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:a,testButtonLabel:"Test email"})]})};var S=i(55484),w=i(27259),I=i(67762),R=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(a.ZZ);return(0,n.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(I.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:p}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:y}=(0,o.C)(a.ZZ),[j]=(0,x.pH)(),b=async(e,n)=>{try{var r;g(!0);let n={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await j(n).unwrap();(null===(r=l.failed)||void 0===r?void 0:r.length)>0?s(l.failed[0].message):(i((0,a.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){p(e)}finally{g(!1)}};return(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",y.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(r.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(R,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:s}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,h.V)(),{handleError:v}=(0,u.H)(),[y,b]=(0,l.useState)(!1),{connection:_,connectionOption:k}=(0,o.C)(a.ZZ),[C]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,r)=>{try{if(b(!0),_){var s;let i={access:c.uv.WRITE,connection_type:_.connection_type,description:e.description,disabled:!1,key:_.key,name:e.name},r=await S(i).unwrap();if((null===(s=r.failed)||void 0===s?void 0:s.length)>0)f(r.failed[0].message);else{d((0,a.lm)(r.succeeded[0]));let i={connection_key:_.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let s=await w(i).unwrap();"failed"===s.test_status?f((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",s.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):g("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:k.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let r=await C(n).unwrap();d((0,a.lm)(r.connection)),g("Connector successfully added!"),null==i||i()}}catch(e){v(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",k.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:y,onSaveClick:I,onTestConnectionClick:s})]})};var Z=i(16394);let E=e=>{var t,i;let{response:s}=e,{connectionOption:l}=(0,o.C)(a.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.100"}),(0,n.jsxs)(r.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.StI,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(i=s.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,i=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(a.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:m,isLoading:p,isSuccess:f}=(0,a.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),y=e=>{v(e)},j=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(W,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:j,onTestEmail:y})}},[null==u?void 0:u.type,x,f,t,j]);return(0,n.jsxs)(r.kCb,{gap:"97px",children:[(0,n.jsxs)(r.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,n.jsx)(r.M5Y,{children:(0,n.jsx)(r.$jN,{})}),b()]}),g&&(0,n.jsxs)(r.Rg9,{in:!0,children:[" ",(0,n.jsx)(r.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(E,{response:g})})]})]})}},38212:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(13577),o=i(86677),d=i(27378),c=i(16134),u=i(812),h=i(77830),x=i(41966),m=i(84306),p=i(66527),f=i(41207),g=i(39715),v=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:a,onCancel:r,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=t.length>0?p.ZP.dump(t):void 0,[h,v]=(0,d.useState)(void 0),[y,j]=(0,d.useState)(!1),[b,_]=(0,d.useState)(!u),k=(0,l.qY0)(),{data:C}=(0,x.LH)({minimal:!0}),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},R=()=>{let e=o.current.getValue();a(p.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{j(!0),I(e),_(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:s},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[r&&(0,n.jsx)(l.wpx,{onClick:r,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:s||b||!!h||i,loading:i,onClick:()=>{if(C&&C.length){let e=o.current.getValue(),t=C.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){k.onOpen();return}}R()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),y&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:k.isOpen,onClose:k.onClose,onConfirm:()=>{R(),k.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let y=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var j=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,a.V)(),{handleError:m}=(0,a.H)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(r.ZZ),{data:j,isFetching:b,isLoading:_,isSuccess:k}=(0,s.Eg)(g.key),[C]=(0,s.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:R}=(0,x.LH)({minimal:!0}),[z,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{j&&j.items.length&&W(j.items[0].ctl_dataset.fides_key)},[j]);let Z=async n=>{var a;let r={connection_key:null==g?void 0:g.key,dataset_pairs:n},s=await C(r).unwrap();(null===(a=s.failed)||void 0===a?void 0:a.length)>0?t(s.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},E=async()=>{if(z)try{let e=z;j&&j.items.length&&(e=j.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:z}];Z(t)}catch(e){m(e)}},F=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);t(e);return}let a=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(j&&j.items.length){let{items:e}=j;a=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}Z(a)}catch(e){m(e)}finally{f(!1)}},T=""!==z&&void 0!==z;if(b||_||I&&!R)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let q=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[R&&(0,n.jsx)(y,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[q&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(y,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:z,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:E,type:"primary",className:"self-start",disabled:!T,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),q&&k&&(null==j?void 0:j.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),k&&(null==j?void 0:j.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(y,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:j.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:F,disabled:T})]})]})]})}},27259:function(e,t,i){var n=i(24246),a=i(13577),r=i(34090);t.Z=e=>{let{disabled:t=!1,isRequired:i=!1,label:s,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[h,x]=(0,r.U$)(d);return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:i,isInvalid:!!(x.error&&x.touched),children:[s&&(0,n.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:s}),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,n.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(a.zuI,{...h,autoComplete:"off",autoFocus:u}),(0,n.jsxs)(a.FiK,{children:[(0,n.jsx)(a.WQu,{}),(0,n.jsx)(a.Y_d,{})]})]}),"text"===o&&(0,n.jsx)(a.IIB,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:t,placeholder:l,size:"sm"}),"textarea"===o&&(0,n.jsx)(a.gxH,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:h.value||""}),(0,n.jsx)(a.J1D,{children:x.error})]})]})}},67762:function(e,t,i){i.d(t,{h:function(){return r}});var n=i(24246),a=i(13577);i(27378);let r=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(a.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(a.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(a.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(13577),o=i(86677),d=i(27378),c=i(16134),u=i(77830),h=i(34090),x=i(55484),m=i(97181),p=i(57072),f=i(39864),g=i(27259),v=i(67762),y=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:r}=e,{isLoading:s}=(0,p.MO)(),d=(0,c.C)(f.qb),y=(0,o.useRouter)(),{errorAlert:j}=(0,a.V)(),b=()=>{y.push(u.JR)};return s?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){j("PII Field must be unique");return}r(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(m.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},j=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,a.V)(),{handleError:h}=(0,a.H)(),[x,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(r.ZZ),{data:v,isFetching:j,isLoading:b,isSuccess:_}=(0,s.QV)(g.key),[k]=(0,s.jF)(),[C]=(0,s._d)(),S=async(e,n)=>{try{m(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await C(n).unwrap():await k(n).unwrap(),i("DSR customization ".concat(p.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,_&&v&&f(v.fields),()=>{e.current=!1}),[v,_]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(j||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(y,{data:p,isSubmitting:x,onSaveClick:S}):null]})}},33335:function(e,t,i){i.d(t,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4608],{97181:function(e,t,i){i.d(t,{d:function(){return d}});var n=i(24246),a=i(13577),r=i(34090),s=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:c,isRequired:u,layout:h="inline",helperText:x,...m}=e,[p,f,{setValue:g}]=(0,r.U$)(t),v=!!(f.touched&&f.error),[y,j]=(0,s.useState)("");p.value||"tags"!==m.mode&&"multiple"!==m.mode||(p.value=[]),"tags"===m.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===m.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,_=e=>{j(e),m.onSearch&&m.onSearch(e)},k=(e,t)=>{g(e),m.onChange&&m.onChange(e,t)};return"inline"===h?(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,...d,children:i}):null,(0,n.jsxs)(a.jqI,{align:"center",children:[(0,n.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]}),(0,n.jsx)(l.b,{label:c,className:v?"mt-2 self-start":void 0})]})]})}):(0,n.jsx)(a.NIc,{isInvalid:v,isRequired:u,children:(0,n.jsxs)(a.gCW,{alignItems:"start",children:[(0,n.jsxs)(a.jqI,{align:"center",children:[i?(0,n.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,n.jsx)(l.b,{label:c})]}),(0,n.jsx)(a.WPr,{...p,id:m.id||t,"data-testid":"controlled-select-".concat(p.name),...m,optionRender:b,onSearch:"tags"===m.mode?_:void 0,onChange:k,value:p.value||void 0,status:v?"error":void 0}),x&&(0,n.jsx)(a.Q6r,{style:{marginTop:0},children:x}),(0,n.jsx)(o.Bc,{isInvalid:v,message:f.error,fieldName:p.name})]})})}},46782:function(e,t,i){i.d(t,{j:function(){return r},l:function(){return s}});var n=i(30454),a=i.n(n);let r="#/definitions/FidesDatasetReference",s=e=>{let t=(e,t,i)=>{let n;return(void 0===t||""===t||void 0===t)&&(n="".concat(e," is required")),i===r&&((null==t?void 0:t.includes("."))?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},i=t=>{var i,n;return null!==(n=null==e?void 0:null===(i=e.required)||void 0===i?void 0:i.includes(t))&&void 0!==n&&n};return{validateField:t,isRequiredField:i,getFieldValidation:(e,n)=>{if(i(e))return e=>{var i;return t(n.title,e,null===(i=n.allOf)||void 0===i?void 0:i[0].$ref)}},preprocessValues:t=>{let i=a()(t);return e&&Object.keys(e.properties).forEach(t=>{var n,a;if((null===(n=e.properties[t].allOf)||void 0===n?void 0:n[0].$ref)===r){let e=null===(a=i.secrets[t])||void 0===a?void 0:a.split(".");e&&(i.secrets[t]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[t].title||i.secrets[t].startsWith("http://")||i.secrets[t].startsWith("https://")||(i.secrets[t]="https://".concat(i.secrets[t]))}),i}}}},14047:function(e,t,i){i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},41337:function(e,t,i){var n=i(24246),a=i(13577);i(27378);var r=i(88337),s=i(16394),l=i(14746);let o=l.Ny+l.iW.get(r.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===r.R.WEBSITE,h=e=>(null==e?void 0:e.connection_type)===r.R.SAAS;t.Z=e=>{let{data:t,...i}=e;return(0,n.jsx)(a.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,i;let n;if(c(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(u(t)){let i=null===(e=t.secrets)||void 0===e?void 0:e.url;if(!i)return o;let n=(0,s.ge)(i);return(0,s.tl)(n,100)}if(d(t)){if(h(t)&&(null===(i=t.saas_config)||void 0===i?void 0:i.type)){let e=t.saas_config.type,i=l.LN.get(e);return i?l.Ny+i:l.Ny+l.iW.get(r.R.SAAS)}n=[...l.iW].find(e=>{let[i]=e;return t.connection_type.toString()===i.toString()})}else if(c(t)){let{identifier:e}=t;n=[...l.iW].find(t=>{let[i]=t;return i.toLowerCase()===e.toLowerCase()})}return n?l.Ny+n[1]:l.VD})(),fallbackSrc:u(t)?o:l.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return c(t)?t.human_readable:t})(),...i})}},1226:function(e,t,i){var n=i(24246);i(27378);var a=i(77213);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(a.Z,{title:"Connections",children:t})}},11274:function(e,t,i){i.d(t,{s:function(){return F}});var n=i(24246),a=i(96356),r=i(13577),s=i(86677),l=i(27378),o=i(16134),d=i(77830),c=i(73825),u=i(14047),h=i(84306),x=i(14207),m=i(16125),p=i(33335),f=i(34090),g=i(46782),v=i(46238);let y=(e,t)=>{let i={...e};return Object.entries(t.properties).forEach(t=>{let[n,a]=t;if("integer"===a.type){let t=a.default?Number(a.default):e[n];i[n]=t||0}else{var r;let t=null!==(r=a.default)&&void 0!==r?r:e[n];i[n]=null!=t?t:null}}),i};var j=e=>{let{data:t,defaultValues:i,isSubmitting:s=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:m="Test integration"}=e,p=(0,l.useRef)(!1),{handleError:j}=(0,u.H)(),{connection:b,connectionOption:_}=(0,o.C)(a.ZZ),[k,C]=(0,x.h2)(),S=e=>{let t;return(void 0===e||""===e)&&(t="Connection Identifier is required"),e&&(0,r.kEn)(e)&&(t="Connection Identifier must be an alphanumeric value"),t},w=(e,t,i)=>{let n;return(void 0===t||""===t)&&(n="".concat(e," is required")),i===g.j&&(t.includes(".")?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},I=(e,t)=>(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:t}),R=e=>{var t;if((null===(t=e.allOf)||void 0===t?void 0:t[0].$ref)===g.j)return"Enter dataset.collection.field"},z=(e,i)=>{var a;return(0,n.jsx)(f.gN,{id:e,name:e,validate:(null!==(a=t.required)&&void 0!==a&&!!a.includes(e)||"integer"===i.type)&&(e=>{var t;return w(i.title,e,null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)}),children:a=>{var s;let{field:l,form:o}=a;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:null===(s=t.required)||void 0===s?void 0:s.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[I(e,i.title),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["integer"!==i.type&&(0,n.jsx)(r.IIB,{...l,value:l.value||"",placeholder:R(i),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===i.type&&(0,n.jsxs)(r.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(r.zuI,{...l,autoComplete:"off"}),(0,n.jsxs)(r.FiK,{children:[(0,n.jsx)(r.WQu,{}),(0,n.jsx)(r.Y_d,{})]})]}),(0,n.jsx)(r.J1D,{children:o.errors[e]})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:i.description})})]})}},e)},W=async()=>{try{await k(b.key).unwrap()}catch(e){j(e)}};return(0,l.useEffect)(()=>(p.current=!0,C.isSuccess&&h(C),()=>{p.current=!1}),[h,C]),(0,n.jsx)(f.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...i};if(null==b?void 0:b.key){var n,a;e.name=null!==(a=b.name)&&void 0!==a?a:"",e.description=b.description,e.instance_key=b.connection_type===c.Rj.SAAS?null===(n=b.saas_config)||void 0===n?void 0:n.fides_key:b.key}return y(e,t)})(),onSubmit:(e,i)=>{let n={...e};Object.keys(t.properties).forEach(i=>{var a;if((null===(a=t.properties[i].allOf)||void 0===a?void 0:a[0].$ref)===g.j){let t=e[i].split(".");n[i]={dataset:t.shift(),field:t.join("."),direction:"from"}}}),d(n,i)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(f.gN,{id:"name",name:"name",validate:e=>w("Name",e),children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[I("name","Name"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",mr:"6",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(_.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(r.J1D,{children:e.errors.name})]})]})}}),(0,n.jsx)(f.gN,{id:"description",name:"description",children:e=>{let{field:t}=e;return(0,n.jsxs)(r.NIc,{display:"flex",children:[I("description","Description"),(0,n.jsx)(r.gxH,{...t,color:"gray.700",placeholder:"Enter a description for your new ".concat(_.human_readable," connection"),resize:"none",size:"sm",value:t.value||"",mr:"6"})]})}}),(0,n.jsx)(f.gN,{id:"instance_key",name:"instance_key",validate:S,children:t=>{let{field:i}=t;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[I("instance_key","Connection Identifier"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",isDisabled:!!(null==b?void 0:b.key),placeholder:"A unique identifier for your new ".concat(_.human_readable," connection"),size:"sm"}),(0,n.jsx)(r.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:8,ml:2,children:(0,n.jsx)(v.b,{label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this connection."})})]})}}),Object.entries(t.properties).map(e=>{let[t,i]=e;return"advanced_settings"===t?null:z(t,i)}),(0,n.jsxs)(r.kCb,{gap:2,children:[(0,n.jsx)(r.wpx,{disabled:!(null==b?void 0:b.key),loading:C.isLoading||C.isFetching,onClick:W,"data-testid":"test-connection-button",children:m}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:s,loading:s,children:"Save"})]})]})})})};let b=e=>{let{onConnectionCreated:t,data:i}=e,r=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:f}=(0,u.H)(),[g,v]=(0,l.useState)(!1),{connection:y,connectionOption:j}=(0,o.C)(a.ZZ),[b]=(0,x.pH)(),[_]=(0,x.Du)();return{isSubmitting:g,handleSubmit:async e=>{try{var l;v(!0);let o={access:c.uv.WRITE,connection_type:null==j?void 0:j.identifier,description:e.description,disabled:!1,key:(0,p.E)(e.instance_key),name:e.name},u=await b(o).unwrap();if((null===(l=u.failed)||void 0===l?void 0:l.length)>0)s(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(i.properties).forEach(t=>{l.secrets[t[0]]=e[t[0]]});let o=await _(l).unwrap();"failed"===o.test_status?s((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",o.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",o.failure_reason]})):(r((0,a.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==y?void 0:y.key)?"updated":"added","!")),(null==y?void 0:y.key)||!t||t())}}catch(e){f(e)}finally{v(!1)}},connectionOption:j}},_=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:a}=e,{isSubmitting:s,handleSubmit:l,connectionOption:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",o.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:s,onSaveClick:l,onTestConnectionClick:a})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:t,onConnectionCreated:i,onTestEmail:a}=e,{connectionOption:s,isSubmitting:l,handleSubmit:o}=b({onConnectionCreated:i,data:t});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",s.human_readable," connector by providing the connector name, description and a test email address. Once you have saved the details, you can click test email to check the format of the email."]}),(0,n.jsx)(j,{data:t,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:a,testButtonLabel:"Test email"})]})};var S=i(55484),w=i(27259),I=i(67762),R=e=>{let{defaultValues:t,isSubmitting:i=!1,onSaveClick:l}=e,c=(0,s.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(a.ZZ);return(0,n.jsx)(f.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;t.name=null!==(e=u.name)&&void 0!==e?e:"",t.description=u.description}return t})(),onSubmit:(e,t)=>{l(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:S.Ry().shape({name:S.Z_().required("Name is required")}),children:(0,n.jsx)(f.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(w.Z,{autoFocus:!0,disabled:!!(null==u?void 0:u.key),isRequired:!0,label:"Name",name:"name",placeholder:"Enter a friendly name for your new ".concat(h.human_readable," connection")}),(0,n.jsx)(w.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(I.h,{isSubmitting:i,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:t}=e,i=(0,m.I0)(),{errorAlert:s,successAlert:d}=(0,h.V)(),{handleError:p}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:v,connectionOption:y}=(0,o.C)(a.ZZ),[j]=(0,x.pH)(),b=async(e,n)=>{try{var r;g(!0);let n={access:c.uv.WRITE,connection_type:null==y?void 0:y.identifier,description:e.description,disabled:!1,name:e.name,key:null==v?void 0:v.key},l=await j(n).unwrap();(null===(r=l.failed)||void 0===r?void 0:r.length)>0?s(l.failed[0].message):(i((0,a.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==v?void 0:v.key)?"updated":"added","!")),(null==v?void 0:v.key)||!t||t())}catch(e){p(e)}finally{g(!1)}};return(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",children:["To begin setting up your new ",y.human_readable," ","connector you must first assign a name to the connector and a description.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Once you have completed this section you can then progress onto"," ",(0,n.jsx)(r.xvT,{display:"inline-block",fontWeight:"700",children:"DSR customization"})," ","using the menu on the left hand side."]}),(0,n.jsx)(R,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},W=e=>{let{data:t,onConnectionCreated:i,onTestConnectionClick:s}=e,d=(0,m.I0)(),{errorAlert:f,successAlert:g}=(0,h.V)(),{handleError:v}=(0,u.H)(),[y,b]=(0,l.useState)(!1),{connection:_,connectionOption:k}=(0,o.C)(a.ZZ),[C]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,r)=>{try{if(b(!0),_){var s;let i={access:c.uv.WRITE,connection_type:_.connection_type,description:e.description,disabled:!1,key:_.key,name:e.name},r=await S(i).unwrap();if((null===(s=r.failed)||void 0===s?void 0:s.length)>0)f(r.failed[0].message);else{d((0,a.lm)(r.succeeded[0]));let i={connection_key:_.key,secrets:{}};Object.entries(t.properties).forEach(t=>{i.secrets[t[0]]=e[t[0]]});let s=await w(i).unwrap();"failed"===s.test_status?f((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",s.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",s.failure_reason]})):g("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,p.E)(e.instance_key),saas_connector_type:k.identifier,secrets:{}};Object.entries(t.properties).forEach(t=>{n.secrets[t[0]]=e[t[0]]});let r=await C(n).unwrap();d((0,a.lm)(r.connection)),g("Connector successfully added!"),null==i||i()}}catch(e){v(e)}finally{b(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Connect to your ",k.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),(0,n.jsx)(j,{data:t,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:y,onSaveClick:I,onTestConnectionClick:s})]})};var Z=i(16394);let E=e=>{var t,i;let{response:s}=e,{connectionOption:l}=(0,o.C)(a.ZZ);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.100"}),(0,n.jsxs)(r.gCW,{align:"flex-start",mt:"16px",children:[(null===(t=s.data)||void 0===t?void 0:t.test_status)==="succeeded"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Successfully connected to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"green",size:"sm",variant:"solid",children:"Success"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"green.100",border:"1px solid",borderColor:"green.300",color:"green.700",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.StI,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"green.500",fontWeight:"semibold",size:"xs",children:"Success message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]}),(null===(i=s.data)||void 0===i?void 0:i.test_status)==="failed"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.Ugi,{children:[(0,n.jsxs)(r.X6q,{as:"h5",color:"gray.700",size:"xs",children:["Output error to ",l.human_readable]}),(0,n.jsx)(r.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(r.xvT,{color:"gray.500",fontSize:"sm",mt:"12px !important",children:(0,Z.p6)(s.fulfilledTimeStamp)}),(0,n.jsx)(r.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(r.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(r.f9v,{}),(0,n.jsxs)(r.xuv,{children:[(0,n.jsx)(r.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.failure_reason}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:s.data.msg})]})]})})]})]})]})},F=e=>{let{onConnectionCreated:t}=e,i=(0,s.useRouter)(),{connectionOption:u}=(0,o.C)(a.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:m,isLoading:p,isSuccess:f}=(0,a.n3)(u.identifier,{skip:h}),[g,v]=(0,l.useState)(),y=e=>{v(e)},j=(0,l.useCallback)(()=>{i.push(d.JR)},[i]),b=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(_,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:t});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(W,{data:x,onConnectionCreated:t,onTestConnectionClick:y});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:j,onTestEmail:y})}},[null==u?void 0:u.type,x,f,t,j]);return(0,n.jsxs)(r.kCb,{gap:"97px",children:[(0,n.jsxs)(r.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(m||p)&&(0,n.jsx)(r.M5Y,{children:(0,n.jsx)(r.$jN,{})}),b()]}),g&&(0,n.jsxs)(r.Rg9,{in:!0,children:[" ",(0,n.jsx)(r.xuv,{mt:"16px",maxW:"528px",w:"fit-content",children:(0,n.jsx)(E,{response:g})})]})]})}},38212:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(13577),o=i(86677),d=i(27378),c=i(16134),u=i(812),h=i(77830),x=i(41966),m=i(84306),p=i(66527),f=i(41207),g=i(39715),v=e=>{let{data:t=[],isSubmitting:i=!1,onSubmit:a,onCancel:r,disabled:s}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,m.V)(),u=t.length>0?p.ZP.dump(t):void 0,[h,v]=(0,d.useState)(void 0),[y,j]=(0,d.useState)(!1),[b,_]=(0,d.useState)(!u),k=(0,l.qY0)(),{data:C}=(0,x.LH)({minimal:!0}),[S,w]=(0,d.useState)([]),I=e=>{p.ZP.load(e,{json:!0}),v(void 0)},R=()=>{let e=o.current.getValue();a(p.ZP.load(e,{json:!0})),w([])};return(0,n.jsxs)(l.kCb,{gap:"97px",children:[(0,n.jsxs)(l.gCW,{align:"stretch",w:"800px",children:[(0,n.jsx)(f.M,{defaultLanguage:"yaml",defaultValue:u,height:"calc(100vh - 526px)",onChange:e=>{try{j(!0),I(e),_(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?v(e):c("Could not parse the supplied YAML")}},onMount:(e,t)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:s},theme:"light"}),(0,n.jsxs)(l.Ugi,{justifyContent:"flex-end",pr:6,children:[r&&(0,n.jsx)(l.wpx,{onClick:r,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",disabled:s||b||!!h||i,loading:i,onClick:()=>{if(C&&C.length){let e=o.current.getValue(),t=C.filter(t=>e.includes("fides_key: ".concat(t.fides_key,"\n"))).map(e=>e.fides_key);if(w(t),t.length){k.onOpen();return}}R()},htmlType:"submit","data-testid":"save-yaml-btn",children:"Save"})]})]}),y&&(b||h)&&(0,n.jsx)(g.Z,{isEmptyState:b,yamlError:h}),(0,n.jsx)(l.cVQ,{isOpen:k.isOpen,onClose:k.onClose,onConfirm:()=>{R(),k.onClose()},title:"Overwrite dataset",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xvT,{children:["You are about to overwrite the dataset",S.length>1?"s":""," ",S.map((e,t)=>{let i=t===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),i?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let y=e=>{let{children:t,...i}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...i,children:t})};var j=()=>{let e=(0,o.useRouter)(),{errorAlert:t,successAlert:i}=(0,a.V)(),{handleError:m}=(0,a.H)(),[p,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(r.ZZ),{data:j,isFetching:b,isLoading:_,isSuccess:k}=(0,s.Eg)(g.key),[C]=(0,s.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:R}=(0,x.LH)({minimal:!0}),[z,W]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{j&&j.items.length&&W(j.items[0].ctl_dataset.fides_key)},[j]);let Z=async n=>{var a;let r={connection_key:null==g?void 0:g.key,dataset_pairs:n},s=await C(r).unwrap();(null===(a=s.failed)||void 0===a?void 0:a.length)>0?t(s.failed[0].message):i("Dataset successfully updated!"),e.push(h.JR)},E=async()=>{if(z)try{let e=z;j&&j.items.length&&(e=j.items[0].fides_key);let t=[{fides_key:e,ctl_dataset_fides_key:z}];Z(t)}catch(e){m(e)}},F=async e=>{try{f(!0);let i=Array.isArray(e)?e:[e],n=await S(i);if((0,u.D4)(n)){let e=(0,u.e$)(n.error);t(e);return}let a=i.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(j&&j.items.length){let{items:e}=j;a=e.map((e,t)=>({fides_key:e.fides_key,ctl_dataset_fides_key:i[t].fides_key}))}Z(a)}catch(e){m(e)}finally{f(!1)}},T=""!==z&&void 0!==z;if(b||_||I&&!R)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let q=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[R&&(0,n.jsx)(y,{color:"red",children:"There was a problem loading existing datasets, please try again."}),(0,n.jsxs)(l.gCW,{alignItems:"flex-start",children:[q&&(0,n.jsx)("div",{children:(0,n.jsx)(l.gCW,{alignSelf:"start",gap:4,children:(0,n.jsxs)(l.xuv,{"data-testid":"dataset-selector-section",children:[(0,n.jsx)(y,{mb:4,children:"Choose a dataset to associate with this connector."}),(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.WPr,{allowClear:!0,options:w.map(e=>({label:e.fides_key,value:e.fides_key})),className:"w-full",placeholder:"Select",onChange:e=>W(e),value:z,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:E,type:"primary",className:"self-start",disabled:!T,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),q&&k&&(null==j?void 0:j.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),k&&(null==j?void 0:j.items)&&(0,n.jsxs)(l.xuv,{"data-testid":"yaml-editor-section",children:[(0,n.jsx)(y,{mb:4,children:"View your dataset YAML below!"}),(0,n.jsx)(v,{data:j.items.map(e=>e.ctl_dataset),isSubmitting:p,onSubmit:F,disabled:T})]})]})]})}},27259:function(e,t,i){var n=i(24246),a=i(13577),r=i(34090);t.Z=e=>{let{disabled:t=!1,isRequired:i=!1,label:s,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[h,x]=(0,r.U$)(d);return(0,n.jsxs)(a.NIc,{display:"flex",isRequired:i,isInvalid:!!(x.error&&x.touched),children:[s&&(0,n.jsx)(a.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:s}),(0,n.jsxs)(a.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,n.jsxs)(a.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,n.jsx)(a.zuI,{...h,autoComplete:"off",autoFocus:u}),(0,n.jsxs)(a.FiK,{children:[(0,n.jsx)(a.WQu,{}),(0,n.jsx)(a.Y_d,{})]})]}),"text"===o&&(0,n.jsx)(a.IIB,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:t,placeholder:l,size:"sm"}),"textarea"===o&&(0,n.jsx)(a.gxH,{...h,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:h.value||""}),(0,n.jsx)(a.J1D,{children:x.error})]})]})}},67762:function(e,t,i){i.d(t,{h:function(){return r}});var n=i(24246),a=i(13577);i(27378);let r=e=>{let{isSubmitting:t=!1,onCancelClick:i}=e;return(0,n.jsxs)(a.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(a.zxk,{onClick:i,variant:"outline",children:"Cancel"}),(0,n.jsx)(a.zxk,{bg:"primary.800",color:"white",isDisabled:t,isLoading:t,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},50881:function(e,t,i){i.d(t,{Z:function(){return j}});var n=i(24246),a=i(14047),r=i(96356),s=i(14207),l=i(13577),o=i(86677),d=i(27378),c=i(16134),u=i(77830),h=i(34090),x=i(55484),m=i(97181),p=i(57072),f=i(39864),g=i(27259),v=i(67762),y=e=>{let{data:t=[],isSubmitting:i=!1,onSaveClick:r}=e,{isLoading:s}=(0,p.MO)(),d=(0,c.C)(f.qb),y=(0,o.useRouter)(),{errorAlert:j}=(0,a.V)(),b=()=>{y.push(u.JR)};return s?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:t.length>0?t:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,t)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){j("PII Field must be unique");return}r(e,t)},validateOnBlur:!1,validateOnChange:!1,validationSchema:x.Ry({fields:x.IX().of(x.Ry().shape({pii_field:x.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:x.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:x.IX(x.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(h.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(h.F2,{name:"fields",render:t=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,i)=>(0,n.jsxs)(l.Ugi,{mt:i>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{autoFocus:0===i,isRequired:!0,name:"fields.".concat(i,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{isRequired:!0,name:"fields.".concat(i,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(m.d,{name:"fields.".concat(i,".data_categories"),options:d.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:i>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>t.remove(i),_hover:{cursor:"pointer"}})})]},i)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{t.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(v.h,{isSubmitting:i,onCancelClick:b})]})}})})})})},j=()=>{let e=(0,d.useRef)(!1),t=(0,o.useRouter)(),{successAlert:i}=(0,a.V)(),{handleError:h}=(0,a.H)(),[x,m]=(0,d.useState)(!1),[p,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(r.ZZ),{data:v,isFetching:j,isLoading:b,isSuccess:_}=(0,s.QV)(g.key),[k]=(0,s.jF)(),[C]=(0,s._d)(),S=async(e,n)=>{try{m(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};p.length>0?await C(n).unwrap():await k(n).unwrap(),i("DSR customization ".concat(p.length>0?"updated":"added","!")),t.push(u.JR)}catch(e){h(e)}finally{m(!1)}};return(0,d.useEffect)(()=>(e.current=!0,_&&v&&f(v.fields),()=>{e.current=!1}),[v,_]),(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",w:"572px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(j||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(y,{data:p,isSubmitting:x,onSaveClick:S}):null]})}},33335:function(e,t,i){i.d(t,{E:function(){return n}});let n=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5309],{74833:function(e,t,i){var r=i(56127),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,i){var r=i(99736),a=i(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},91936:function(e,t,i){var r=i(74833),a=i(11611),s=i(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return l;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=o.test(e);return i||c.test(e)?d(e.slice(2),i?2:8):n.test(e)?l:+e}},58754:function(e,t,i){"use strict";var r=i(24246),a=i(13577),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:c,...d}=e;return(0,r.jsxs)("div",{...d,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,r.jsx)(s.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var r=i(24246),a=i(13577),s=i(79894),l=i.n(s),n=i(27378);let{Text:o}=a.AntTypography,c=e=>{let{items:t,...i}=e,s=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,n={...e},c=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,r.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:n.title})),c)?n.title=(0,r.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,r.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,r.jsx)(a.zrq,{items:s,...i})}},14908:function(e,t,i){"use strict";var r=i(86677),a=i(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:i}=e,l=(0,r.useRouter)(),n=l.asPath.split("#")[1],[o,c]=(0,a.useState)(n);return(0,a.useEffect)(()=>{i&&t.includes(i)&&c(i)},[i,t,l.isReady]),{activeTab:o,onTabChange:(0,a.useCallback)(async e=>{if(!t.includes(e)){c(t[0]),await l.replace({pathname:l.pathname,query:l.query,hash:void 0});return}c(e),l.isReady&&await l.replace({pathname:l.pathname,query:l.query,hash:s(e)},void 0,{shallow:!0})},[l,t])}}},69828:function(e,t,i){"use strict";i.d(t,{Y:function(){return l}});var r=i(24246),a=i(13577),s=i(70788);let l=[(0,r.jsx)(a.PJP.S9g,{},"layers"),(0,r.jsx)(a.PJP.ehp,{},"dataset"),(0,r.jsx)(a.PJP.iA_,{},"table"),(0,r.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:a=()=>{}}=e,n=[];if(t||n.push({title:"All activity"}),t){n.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&n.push({title:t,icon:l[i-1],onClick:t=>{t.preventDefault(),a(e.slice(0,i+1).join("."))}})})}return(0,r.jsx)(s.m,{"data-testid":"results-breadcrumb",items:n})}},1039:function(e,t,i){"use strict";i.d(t,{Z:function(){return M}});var r,a,s=i(24246),l=i(59003),n=i(92222),o=i(13577),c=i(27378),d=i(47935),u=i(70675),h=i(72625),p=i(54409),m=i(79947),g=i(87667),x=i(50169),f=i(28278),v=i(68309),j=i(74241),L=e=>{let{resourceType:t,changeTypeOverride:i}=e,r=(0,n.Cl)(),a=[];return t?t===v.D$.SCHEMA?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Name",...e}),size:300}),r.accessor(e=>e.urn,{id:"project",cell:e=>(0,s.jsx)(d.G3,{value:(0,j.Z)(e.getValue())}),header:e=>(0,s.jsx)(d.Rr,{value:"Project",...e})}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.system,{id:"system",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"System",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{ignoreChildActions:i===f.E.MONITORED||i===f.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.TABLE?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Table name",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.FIELD?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Field name",...e}),size:300}),r.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,s.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Data type",...e})}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.ENDPOINT?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Object",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:a}:{columns:a}},y=i(14908);(r=a||(a={})).ACTION_REQUIRED="action-required",r.MONITORED="monitored",r.UNMONITORED="unmonitored";let b={"action-required":{label:"Action Required",key:"action-required",filters:[v.LL.ADDITION,v.LL.REMOVAL],childFilters:[v.LL.ADDITION,v.LL.REMOVAL]},monitored:{label:"Monitored",key:"monitored",filters:[v.LL.MONITORED],childFilters:[],changeTypeOverride:f.E.MONITORED},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[v.LL.MUTED],childFilters:[],changeTypeOverride:f.E.MUTED}};var R=()=>{var e,t,i;let{activeTab:r,onTabChange:s}=(0,y.Z)({tabKeys:Object.values(a)});return{filterTabs:Object.values(b),activeTabKey:r,onTabChange:s,activeDiffFilters:null===(e=b[r])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(t=b[r])||void 0===t?void 0:t.childFilters,activeChangeTypeOverride:null===(i=b[r])||void 0===i?void 0:i.changeTypeOverride}},D=i(47182),T=i(38347),w=i(7940),_=i(80285),C=i(36168),O=i(30952);let I={items:[],total:0,page:1,size:50,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,s.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var M=e=>{let{resourceUrn:t}=e,[i,r]=(0,c.useState)(""),{filterTabs:a,activeTabKey:h,onTabChange:p,activeDiffFilters:m,activeChildDiffFilters:g,activeChangeTypeOverride:x}=R(),{PAGE_SIZES:f,pageSize:j,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M,onNextPageClick:Z,isNextPageDisabled:k,startRange:E,endRange:N,pageIndex:A,setTotalPages:P,resetPageIndexToDefault:V}=(0,d.oi)();(0,c.useEffect)(()=>{V()},[t,i,V,m,g]);let{isFetching:S,isLoading:F,data:z}=(0,u.z8)({staged_resource_urn:t,page:A,size:j,child_diff_status:g,diff_status:m,search:i}),$=(0,w.G)(null==z?void 0:z.items[0]),{columns:U}=L({resourceType:$,changeTypeOverride:x}),{items:G,total:q,pages:W}=(0,c.useMemo)(()=>null!=z?z:I,[z]);(0,c.useEffect)(()=>{P(W)},[W,P]);let B=(0,c.useMemo)(()=>U,[U]),{navigateToDetectionResults:J}=(0,D.Z)(),K=(0,l.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),getRowId:_.Z,columns:B,manualPagination:!0,data:G,columnResizeMode:"onChange"});return F?(0,s.jsx)(d.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A5g,{items:a.map(e=>({key:e.key,label:e.label})),activeKey:h,onChange:e=>p(e)}),(0,s.jsx)(d.Q$,{children:(0,s.jsx)(o.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,s.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,s.jsx)(o.xuv,{flexShrink:0,children:(0,s.jsx)(O.f,{value:i,onChange:r})}),(0,s.jsx)(T.Z,{})]})})}),(0,s.jsx)(d.ZK,{tableInstance:K,onRowClick:e=>J({resourceUrn:e.urn,filterTab:h}),getRowIsClickable:e=>$!==v.D$.FIELD||(0,C.Z)(e),emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(d.s8,{totalRows:q||0,pageSizes:f,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M||S,onNextPageClick:Z,isNextPageDisabled:k||S,startRange:E,endRange:N})]})}},54409:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var r=i(24246),a=i(13577),s=i(812),l=i(14047),n=i(68309),o=i(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{clipPath:"url(#clip0_341_3102)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=i(79494),h=i(70675),p=i(7940),m=e=>{let{resource:t,ignoreChildActions:i=!1}=e,m=(0,p.G)(t),[g,{isLoading:x}]=(0,h.v8)(),[f,{isLoading:v}]=(0,h.vi)(),[j,{isLoading:L}]=(0,h.Tl)(),{successAlert:y,errorAlert:b}=(0,l.V)(),R=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id});(0,o.D4)(e)?b((0,s.e$)(e.error,"Failed to confirm resource")):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},D=async()=>{let e=await j({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("".concat(t.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},w=async()=>{let e=await f({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to mute resource"):y("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},_=x||v||L,{diff_status:C,child_diff_statuses:O}=t,I=m===n.D$.SCHEMA,H=m===n.D$.FIELD,M=O&&(O[n.LL.CLASSIFICATION_ADDITION]||O[n.LL.CLASSIFICATION_UPDATE]),Z=I&&void 0===C||!H&&C===n.LL.ADDITION||M,k=C!==n.LL.MUTED,E=C===n.LL.MUTED&&!H,N=C===n.LL.MUTED&&H,A=O&&(O[n.LL.ADDITION]||O[n.LL.REMOVAL]),P=C===n.LL.MONITORED&&!i&&A&&!M;return(0,r.jsxs)(a.Ugi,{children:[(Z||P)&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:R,disabled:_,loading:x}),N&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:D,disabled:_,loading:x}),E&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:_,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:w,disabled:_,loading:v})]})}},79947:function(e,t,i){"use strict";var r=i(24246),a=i(13577);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(a.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(a.j8w,{children:t})})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=i(19043)}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5309],{74833:function(e,t,i){var r=i(56127),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,i){var r=i(99736),a=i(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},91936:function(e,t,i){var r=i(74833),a=i(11611),s=i(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return l;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=o.test(e);return i||c.test(e)?d(e.slice(2),i?2:8):n.test(e)?l:+e}},58754:function(e,t,i){"use strict";var r=i(24246),a=i(13577),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:c,...d}=e;return(0,r.jsxs)("div",{...d,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,r.jsx)(s.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var r=i(24246),a=i(13577),s=i(79894),l=i.n(s),n=i(27378);let{Text:o}=a.AntTypography,c=e=>{let{items:t,...i}=e,s=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,n={...e},c=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,r.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:n.title})),c)?n.title=(0,r.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,r.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,r.jsx)(a.zrq,{items:s,...i})}},14908:function(e,t,i){"use strict";var r=i(86677),a=i(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:i}=e,l=(0,r.useRouter)(),n=l.asPath.split("#")[1],[o,c]=(0,a.useState)(n);return(0,a.useEffect)(()=>{i&&t.includes(i)&&c(i)},[i,t,l.isReady]),{activeTab:o,onTabChange:(0,a.useCallback)(async e=>{if(!t.includes(e)){c(t[0]),await l.replace({pathname:l.pathname,query:l.query,hash:void 0});return}c(e),l.isReady&&await l.replace({pathname:l.pathname,query:l.query,hash:s(e)},void 0,{shallow:!0})},[l,t])}}},69828:function(e,t,i){"use strict";i.d(t,{Y:function(){return l}});var r=i(24246),a=i(13577),s=i(70788);let l=[(0,r.jsx)(a.PJP.S9g,{},"layers"),(0,r.jsx)(a.PJP.ehp,{},"dataset"),(0,r.jsx)(a.PJP.iA_,{},"table"),(0,r.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:a=()=>{}}=e,n=[];if(t||n.push({title:"All activity"}),t){n.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&n.push({title:t,icon:l[i-1],onClick:t=>{t.preventDefault(),a(e.slice(0,i+1).join("."))}})})}return(0,r.jsx)(s.m,{"data-testid":"results-breadcrumb",items:n})}},1039:function(e,t,i){"use strict";i.d(t,{Z:function(){return M}});var r,a,s=i(24246),l=i(59003),n=i(92222),o=i(13577),c=i(27378),d=i(47935),u=i(70675),h=i(72625),p=i(54409),m=i(79947),g=i(87667),x=i(50169),f=i(28278),v=i(73825),j=i(74241),L=e=>{let{resourceType:t,changeTypeOverride:i}=e,r=(0,n.Cl)(),a=[];return t?t===v.D$.SCHEMA?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Name",...e}),size:300}),r.accessor(e=>e.urn,{id:"project",cell:e=>(0,s.jsx)(d.G3,{value:(0,j.Z)(e.getValue())}),header:e=>(0,s.jsx)(d.Rr,{value:"Project",...e})}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.system,{id:"system",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"System",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{ignoreChildActions:i===f.E.MONITORED||i===f.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.TABLE?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Table name",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.FIELD?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Field name",...e}),size:300}),r.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,s.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Data type",...e})}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.ENDPOINT?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Object",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:a}:{columns:a}},y=i(14908);(r=a||(a={})).ACTION_REQUIRED="action-required",r.MONITORED="monitored",r.UNMONITORED="unmonitored";let b={"action-required":{label:"Action Required",key:"action-required",filters:[v.LL.ADDITION,v.LL.REMOVAL],childFilters:[v.LL.ADDITION,v.LL.REMOVAL]},monitored:{label:"Monitored",key:"monitored",filters:[v.LL.MONITORED],childFilters:[],changeTypeOverride:f.E.MONITORED},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[v.LL.MUTED],childFilters:[],changeTypeOverride:f.E.MUTED}};var R=()=>{var e,t,i;let{activeTab:r,onTabChange:s}=(0,y.Z)({tabKeys:Object.values(a)});return{filterTabs:Object.values(b),activeTabKey:r,onTabChange:s,activeDiffFilters:null===(e=b[r])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(t=b[r])||void 0===t?void 0:t.childFilters,activeChangeTypeOverride:null===(i=b[r])||void 0===i?void 0:i.changeTypeOverride}},D=i(47182),T=i(38347),w=i(7940),_=i(80285),C=i(36168),O=i(30952);let I={items:[],total:0,page:1,size:50,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,s.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var M=e=>{let{resourceUrn:t}=e,[i,r]=(0,c.useState)(""),{filterTabs:a,activeTabKey:h,onTabChange:p,activeDiffFilters:m,activeChildDiffFilters:g,activeChangeTypeOverride:x}=R(),{PAGE_SIZES:f,pageSize:j,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M,onNextPageClick:Z,isNextPageDisabled:k,startRange:E,endRange:N,pageIndex:A,setTotalPages:P,resetPageIndexToDefault:V}=(0,d.oi)();(0,c.useEffect)(()=>{V()},[t,i,V,m,g]);let{isFetching:S,isLoading:F,data:z}=(0,u.z8)({staged_resource_urn:t,page:A,size:j,child_diff_status:g,diff_status:m,search:i}),$=(0,w.G)(null==z?void 0:z.items[0]),{columns:U}=L({resourceType:$,changeTypeOverride:x}),{items:G,total:q,pages:W}=(0,c.useMemo)(()=>null!=z?z:I,[z]);(0,c.useEffect)(()=>{P(W)},[W,P]);let B=(0,c.useMemo)(()=>U,[U]),{navigateToDetectionResults:J}=(0,D.Z)(),K=(0,l.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),getRowId:_.Z,columns:B,manualPagination:!0,data:G,columnResizeMode:"onChange"});return F?(0,s.jsx)(d.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A5g,{items:a.map(e=>({key:e.key,label:e.label})),activeKey:h,onChange:e=>p(e)}),(0,s.jsx)(d.Q$,{children:(0,s.jsx)(o.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,s.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,s.jsx)(o.xuv,{flexShrink:0,children:(0,s.jsx)(O.f,{value:i,onChange:r})}),(0,s.jsx)(T.Z,{})]})})}),(0,s.jsx)(d.ZK,{tableInstance:K,onRowClick:e=>J({resourceUrn:e.urn,filterTab:h}),getRowIsClickable:e=>$!==v.D$.FIELD||(0,C.Z)(e),emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(d.s8,{totalRows:q||0,pageSizes:f,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M||S,onNextPageClick:Z,isNextPageDisabled:k||S,startRange:E,endRange:N})]})}},54409:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var r=i(24246),a=i(13577),s=i(812),l=i(14047),n=i(73825),o=i(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{clipPath:"url(#clip0_341_3102)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=i(79494),h=i(70675),p=i(7940),m=e=>{let{resource:t,ignoreChildActions:i=!1}=e,m=(0,p.G)(t),[g,{isLoading:x}]=(0,h.v8)(),[f,{isLoading:v}]=(0,h.vi)(),[j,{isLoading:L}]=(0,h.Tl)(),{successAlert:y,errorAlert:b}=(0,l.V)(),R=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id});(0,o.D4)(e)?b((0,s.e$)(e.error,"Failed to confirm resource")):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},D=async()=>{let e=await j({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("".concat(t.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},w=async()=>{let e=await f({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to mute resource"):y("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},_=x||v||L,{diff_status:C,child_diff_statuses:O}=t,I=m===n.D$.SCHEMA,H=m===n.D$.FIELD,M=O&&(O[n.LL.CLASSIFICATION_ADDITION]||O[n.LL.CLASSIFICATION_UPDATE]),Z=I&&void 0===C||!H&&C===n.LL.ADDITION||M,k=C!==n.LL.MUTED,E=C===n.LL.MUTED&&!H,N=C===n.LL.MUTED&&H,A=O&&(O[n.LL.ADDITION]||O[n.LL.REMOVAL]),P=C===n.LL.MONITORED&&!i&&A&&!M;return(0,r.jsxs)(a.Ugi,{children:[(Z||P)&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:R,disabled:_,loading:x}),N&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:D,disabled:_,loading:x}),E&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:_,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:w,disabled:_,loading:v})]})}},79947:function(e,t,i){"use strict";var r=i(24246),a=i(13577);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(a.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(a.j8w,{children:t})})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=i(19043)}}]);
|