ethyca-fides 2.55.5b2__py2.py3-none-any.whl → 2.56.1b0__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.
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/METADATA +4 -3
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/RECORD +159 -156
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/82883b0df5e4_add_aws_ses_email_provider.py +45 -0
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +11 -71
- fides/api/main.py +5 -0
- fides/api/models/messaging.py +3 -0
- fides/api/schemas/messaging/messaging.py +52 -7
- fides/api/schemas/messaging/messaging_secrets_docs_only.py +8 -0
- fides/api/service/connectors/query_configs/bigquery_query_config.py +59 -1
- fides/api/service/messaging/message_dispatch_service.py +59 -45
- fides/api/service/privacy_request/request_service.py +161 -0
- fides/api/service/saas_request/override_implementations/interruptible_request.py +34 -0
- fides/api/util/cache.py +9 -2
- fides/api/util/logger.py +1 -1
- fides/config/execution_settings.py +4 -0
- fides/config/notification_settings.py +1 -0
- fides/service/messaging/aws_ses_service.py +179 -0
- fides/service/privacy_request/privacy_request_service.py +86 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/AGm7Kcaqd5WP-C4WYHOus/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1241-d7c40de8423c8760.js → 1241-438935108aed21e7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1288-897a2144dd08e1e4.js → 1288-ba1df63e7fa2234a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1827-2d2f6eb59ebca43f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2163-bac6d1724f7d1272.js → 2163-4ea4bc558daae7b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3163-ac608e45959de7ed.js → 3163-7ebdab4fefa7e21f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3309-2a399a829bf330f3.js → 3309-d014168a94ed008b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3990-03de92ca90bc5858.js → 3990-d38bb0b12394ae4d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4321-0e44b6ad2a08957e.js → 4321-9c97c4e0d5cf38bd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4456-ccd587e01e39ebbb.js → 4456-87020c4b11dc6e0e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4981-d9c2bdc6d7754fef.js → 4981-c7710c0d9ff7f9cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{53-c44526e1b4a7bd80.js → 53-bd8367b6a28ef9b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5318-d81dc29254349932.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5632-6a150393937e52ea.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5728-32ce3e7a41d1fb9f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5973-c4b445daac890b57.js → 5973-7bbf7cd9475c070d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6182-7af868d4216f374c.js → 6182-87e468239a93f7e2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7548-35d61952347b70be.js → 7548-cdf0d184fa13ddaf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7871-292a090c09636039.js → 7871-69ffa5607b57cbcf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7996-5521a6949bfe4640.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8001-f142a2097615505a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{8986-709e5d06c57c24e0.js → 8986-b955f08aba857064.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9659-4757cc92c551432f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9822-e0b4ee48b9ca9d6c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-b1b0c4e42f66de5e.js → _app-817f3fe70282b855.js} +2 -2
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9c607b6e18129029.js → manual-227ad8dba69aadab.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-4c1017187ba6ff92.js → add-systems-500ee461301938a8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-d360021e4b0dc72f.js → privacy-experience-3eaec69fa89f74ce.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-68620d02ac8ee7d3.js → privacy-notices-363b22d7785b3820.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-de9cb3ef3428c7b3.js → data-catalog-11d772fe8b66f9b6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e3dbeac39e3ebd59.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-ca97d78d3e655a9d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-71ebd8e82ef87d20.js → action-center-6d6d0b3bd37434da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-bdb48de828181c14.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-d0aa66bf916563f1.js → new-72cdfa2ff1a4f38b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-cd7ba8475a99b5bc.js → dataset-6ab8c03b8baa93ca.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-9f1a9e0e2b443b2a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-c7de595cc7a42eba.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-06d70d3844eebe10.js → datastore-connection-9cafd280f2dff51b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-28ff267f50a4d920.js → index-f6c4817f3c27b16c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-3b3e9621a0d731a0.js → [id]-c431f92c941859c4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-232842bf74769e18.js → integrations-43234d749fbc0606.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-b3ac68659b5eb7fd.js → [id]-ae047733e540e0ef.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-69f5990c350073df.js → messaging-c6881c16a4058f20.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-6930012bad7f255b.js → storage-4b68311b85486f8c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-53d3041db8e1713b.js → privacy-requests-c0ee732681c1d4ef.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-7446940b5f984a24.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-bba905ab35a4341d.js → consent-92a19e7da38d3325.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-245b5a106f4c7c89.js → custom-fields-3bbbb1612eb447e9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-4b433227b1f7f4a3.js → organization-fc13f3473328020d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-f1fcda25a69195b5.js → test-datasets-0ee9dc1f37205410.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-5239524bf1bb3fae.js → [id]-15f55e6c399eed5e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-392f45d16c6cc2ab.js → systems-0b4f7a20fa248642.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-ad082f72d90bdfe2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-ec623a1640de5290.js → [id]-99490929267dbcef.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-591cc753cb40a031.js → user-management-2eedb806df4160b3.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/ant-poc.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/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.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/ITPgWS_zbjr6PIBu4Hi1-/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1827-e3f559a3ce35012a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1953-73cbcff096c858dc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5632-a043afda93b6d3b3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5728-661d0ea990f42f46.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5880-3d6238298be971b6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7996-3dff76a9e30e3e75.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8001-2dc7c089522951a8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9822-820b231f72d52967.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-c7bd418dd4ca6603.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-46b602da53941951.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-f068204bc5a4aaad.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-1200ff4e90f5e94b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-75c41e4c1df05640.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-379ff7ddffdd9014.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-6ddc8ffc3f5355ca.js +0 -1
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.55.5b2.dist-info → ethyca_fides-2.56.1b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{ITPgWS_zbjr6PIBu4Hi1- → AGm7Kcaqd5WP-C4WYHOus}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2017-88d15bd5b98230df.js → 2017-312ebd5e1ee3a4cc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2556-f7758772c5c5b816.js → 2556-a58aca0405c150e6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-1cd7e24d14d4fc37.js → [resourceUrn]-ef19223d2cdc1258.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-56c8e6833bbca0da.js → [projectUrn]-50b989ef31996157.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-1710564639a90ce4.js → projects-96f81e13cc52686f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-6adadf3c7ee11604.js → [resourceUrn]-fd3d508ab13ddb5b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-557c425e4e381de4.js → resources-71ce2e9dbf646ecd.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1953],{95189:function(e,s,t){var a=t(24246),i=t(96013);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},36848:function(e,s,t){t.d(s,{q:function(){return n}});var a=t(24246),i=t(96013);let n=e=>{let{label:s,isDisabled:t,...n}=e;return(0,a.jsx)(i.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:n.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,a.jsxs)(i.mQc,{colorScheme:"complimentary",...r,children:[(0,a.jsx)(i.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,a.jsx)(n,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,a.jsx)(i.nPR,{children:s.map(e=>(0,a.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},14838:function(e,s,t){var a=t(24246),i=t(96013);s.Z=e=>(0,a.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},33312:function(e,s,t){var a=t(24246),i=t(96013);s.Z=e=>{let{search:s,onChange:t,withIcon:n,onClear:r,placeholder:l,...o}=e;return(0,a.jsxs)(i.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,a.jsx)(i.uFc,{autoComplete:"off",value:s,onChange:e=>t(e.target.value),placeholder:l||"Search...",prefix:n?(0,a.jsx)(i.PTu,{boxSize:4}):void 0,...o}),r?(0,a.jsx)(i.wpx,{onClick:r,children:"Clear"}):null]})}},93595:function(e,s,t){var a=t(24246),i=t(96013);s.Z=e=>{let{onClick:s,children:t}=e;return(0,a.jsx)(i.wpx,{onClick:s,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:t})}},41498:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(11596),i=t(87162);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},77650:function(e,s,t){var a=t(24246),i=t(96013);s.Z=e=>{let{isOpen:s,onClose:t,onConfirm:n,onCancel:r,title:l,message:o,cancelButtonText:d,continueButtonText:c,isLoading:p,returnFocusOnClose:u,isCentered:h,testId:m="confirmation-modal",icon:x}=e;return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"lg",returnFocusOnClose:null==u||u,isCentered:h,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":m,children:[x?(0,a.jsx)(i.M5Y,{mb:2,children:x}):null,l?(0,a.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:l}):null,o?(0,a.jsx)(i.fef,{children:o}):null,(0,a.jsx)(i.mzw,{children:(0,a.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,a.jsx)(i.wpx,{onClick:()=>{r&&r(),t()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:p,children:d||"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",size:"large",onClick:n,"data-testid":"continue-btn",loading:p,children:c||"Continue"})]})})]})]})}},16921:function(e,s,t){var a=t(96013),i=t(60136),n=t(16781),r=t(22153),l=t(43073);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},91694:function(e,s,t){var a=t(24246),i=t(96013);t(27378);var n=t(46042),r=t(59461);let l=e=>void 0!==e.connection_type,o=e=>void 0!==e.encoded_icon;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(o(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(l(s))e=[...r.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(o(s)){let{identifier:t}=s;e=[...r.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?r.Ny+e[1]:r.VD})(),fallbackSrc:r.VD,alt:(()=>{if(l(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return o(s)?s.human_readable:s})(),...t})}},89671:function(e,s,t){var a=t(24246),i=t(96013);t(27378);var n=t(7564);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:p,onClose:u}=(0,i.qY0)(),[h,m]=(0,n.XX)(),x=async()=>{await h({key:s,name:r,disabled:!t,access:l,connection_type:o}),u()},g=()=>{m.isLoading||u()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>p()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:p,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:m.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},40415:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(96013),n=t(95189),r=t(36768);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},43894:function(e,s,t){t.d(s,{Sv:function(){return m},Yb:function(){return h},dQ:function(){return x},lm:function(){return g}});var a=t(24246),i=t(96013),n=t(34090),r=t(27378),l=t(44296),o=t(34803),d=t(39514),c=t(96878),p=t(62711);let u=(e,s,t)=>{var a,i;let[o,d,{setValue:u,setTouched:h}]=(0,n.U$)({name:e,type:t||void 0}),m=!!(d.touched&&d.error),{error:x}=d,g={...o,value:null!==(a=o.value)&&void 0!==a?a:""},[f,y]=(0,r.useState)(null!==(i=g.value)&&void 0!==i?i:""),{values:_}=(0,n.u6)(),{vendor_id:b}=_,v=(0,l.C)((0,c.$e)(b||"")),j=(0,l.C)(p.bN),k=(0,r.useRef)();return(0,r.useEffect)(()=>{"showing"===j&&y(g.value)},[j,y]),(0,r.useEffect)(()=>{if("showing"===j&&v){let t=s?s(v):v[e];g.value!==t&&(u(t),setTimeout(()=>{var e;h(!0),null===(e=k.current)||void 0===e||e.blur()},300))}},[j,u,v,k.current]),(0,r.useEffect)(()=>{"hiding"===j&&u(f)},[j,u,f]),{field:g,isInvalid:m,isShowingSuggestions:j,error:x,inputRef:k}},h=e=>{let{label:s,tooltip:t,disabled:n,isRequired:r=!1,dictField:l,name:c,placeholder:p,id:h}=e,{field:m,isInvalid:x,isShowingSuggestions:g,error:f,inputRef:y}=u(c,l);return(0,a.jsx)(i.NIc,{isInvalid:x,isRequired:r,children:(0,a.jsxs)(i.gCW,{alignItems:"start",children:[(0,a.jsxs)(i.kCb,{alignItems:"center",children:[(0,a.jsx)(o.__,{htmlFor:h||c,fontSize:"xs",my:0,mr:1,children:s}),t?(0,a.jsx)(d.Z,{label:t}):null]}),(0,a.jsx)(o.oi,{...m,ref:y,isRequired:r,isDisabled:n,"data-testid":"input-".concat(m.name),placeholder:p,isPassword:!1,color:"showing"===g?"complimentary.500":"gray.800"}),(0,a.jsx)(o.Bc,{isInvalid:x,message:f,fieldName:m.name})]})})},m=e=>{let{label:s,tooltip:t,disabled:n,isRequired:r=!1,dictField:l,name:c,id:p}=e,{field:h,isInvalid:m,isShowingSuggestions:x,error:g}=u(c,l);return(0,a.jsx)(i.NIc,{isInvalid:m,isRequired:r,children:(0,a.jsxs)(i.gCW,{alignItems:"start",children:[(0,a.jsxs)(i.kCb,{alignItems:"center",children:[(0,a.jsx)(o.__,{htmlFor:p||c,fontSize:"xs",my:0,mr:1,children:s}),t?(0,a.jsx)(d.Z,{label:t}):null]}),(0,a.jsx)(i.gxH,{...h,size:"sm","data-testid":"input-".concat(h.name),focusBorderColor:"primary.600",color:"showing"===x?"complimentary.500":"gray.800",isDisabled:n}),(0,a.jsx)(o.Bc,{isInvalid:m,message:g,fieldName:h.name})]})})},x=e=>{let{label:s,tooltip:t,dictField:r,name:l,id:c,disabled:p}=e,{field:h,isInvalid:m,error:x}=u(l,r,"checkbox");return(0,a.jsxs)(i.NIc,{isInvalid:m,width:"full",children:[(0,a.jsxs)(i.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,a.jsxs)(i.Ugi,{spacing:1,children:[(0,a.jsx)(o.__,{htmlFor:c||l,fontSize:"xs",my:0,mr:0,children:s}),t?(0,a.jsx)(d.Z,{label:t}):null]}),(0,a.jsx)(i.Ugi,{children:(0,a.jsx)(n.gN,{name:h.name,children:e=>{let{form:{setFieldValue:s}}=e;return(0,a.jsx)(i.rAg,{checked:h.checked,onChange:e=>{s(h.name,e)},disabled:p,className:"mr-2","data-testid":"input-".concat(h.name),size:"small"})}})})]}),(0,a.jsx)(o.Bc,{isInvalid:m,message:x,fieldName:h.name})]})},g=e=>{let{label:s,tooltip:t,dictField:r,name:l,id:c,disabled:p}=e,{field:h,isInvalid:m,error:x,isShowingSuggestions:g}=u(l,r,"numeric"),{setFieldValue:f}=(0,n.u6)();return(0,a.jsxs)(i.NIc,{isInvalid:m,width:"full",children:[(0,a.jsxs)(i.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,a.jsxs)(i.Ugi,{spacing:1,children:[(0,a.jsx)(o.__,{htmlFor:c||l,fontSize:"xs",my:0,mr:0,children:s}),t?(0,a.jsx)(d.Z,{label:t}):null]}),(0,a.jsx)(i.Ugi,{children:(0,a.jsxs)(i.Y2U,{value:h.value,name:h.name,size:"xs",onBlur:h.onBlur,onChange:e=>{f(h.name,e)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(h.name),color:"showing"===g?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:p,children:[(0,a.jsx)(i.zuI,{}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]})})]}),(0,a.jsx)(o.Bc,{isInvalid:m,message:x,fieldName:h.name})]})}},84404:function(e,s,t){t.d(s,{Z:function(){return s_}});var a=t(24246),i=t(93990),n=t(96013),r=t(79894),l=t.n(r),o=t(86677),d=t.n(o),c=t(27378),p=t(44296),u=t(11596),h=t(73269),m=t(41498),x=t(87162),g=t(16781),f=t(93595),y=t(38615),_=t(36768),b=t(69477),v=t(91694);let j=e=>{let{connectionConfig:s}=e,t=(0,p.C)(b.pw),{data:a}=(0,b.$I)(t),i=(0,c.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,c.useState)(),l=(0,c.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,c.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,c.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,c.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var k=e=>{var s;let{disabled:t,hasClear:i=!0,label:r,list:l,onChange:o,selectedValue:d}=e,p=(0,c.useRef)(null),[u,h]=(0,c.useState)(!1),[m,x]=(0,c.useState)(""),g=()=>{h(!1)},f=null===(s=[...l].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],y=(0,c.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.focus()},0))},[]),b=(0,c.useMemo)(()=>(0,_.Ds)(y,100),[y]),j=(0,c.useMemo)(()=>[...l].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[l,m]);return(0,a.jsxs)(n.v2r,{isLazy:!0,onClose:g,onOpen:()=>{h(!0)},strategy:"fixed",matchWidth:!0,children:[(0,a.jsx)(n.j2t,{"aria-label":null!=f?f:r,as:n.wpx,color:f?"complimentary.500":void 0,disabled:t,icon:(0,a.jsx)(n.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,a.jsx)(n.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=f?f:r})}),u?(0,a.jsxs)(n.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,a.jsx)(n.xuv,{px:"8px",mt:2,children:(0,a.jsxs)(n.BZy,{size:"sm",children:[(0,a.jsx)(n.Z8_,{pointerEvents:"none",children:(0,a.jsx)(n.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,a.jsx)(n.IIB,{"data-testid":"input-search-integrations",ref:p,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:b,placeholder:"Search integrations",size:"sm",type:"search"})]})}),i&&(0,a.jsx)(n.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,a.jsx)(n.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,a.jsx)(n.xuv,{overflowY:"auto",maxHeight:"272px",children:j.map(e=>{let[s,t]=e;return(0,a.jsx)(n.ua7,{"aria-label":t.toolTip,hasArrow:!0,label:t.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,children:(0,a.jsxs)(n.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,a.jsx)(v.Z,{data:t.value}),(0,a.jsx)(n.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},w=t(53359),C=t(22153),S=t(46042),D=t(75139),T=t(7564),A=t(14838),I=(0,n.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),z=t(52987);let E=e=>{var s,t,a;let{connectionConfig:i}=e,[n]=(0,T.S6)(),{data:r}=(0,T.Eg)(null!==(t=null==i?void 0:i.key)&&void 0!==t?t:""),l=null!==(a=null==r?void 0:null===(s=r.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==a?a:[],o=l.map(e=>({label:e,value:e})),{data:d}=(0,z.LH)({onlyUnlinkedDatasets:!0}),p=(0,c.useMemo)(()=>{var e;return null!==(e=null==d?void 0:d.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[d]),{errorAlert:u,successAlert:h}=(0,w.V)();return{dropdownOptions:[...o,...p],initialDatasets:l,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],o=await n({connection_key:s,dataset_pairs:l}).unwrap();(null===(a=o.failed)||void 0===a?void 0:a.length)>0?u(o.failed[0].message):r&&h("Dataset successfully updated!")}}};var F=e=>{let{status:s}=e;return(0,a.jsxs)(a.Fragment,{children:["success"===s&&(0,a.jsx)(n.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===s&&(0,a.jsx)(n.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},q=t(40415),L=t(96878),W=t(31374),R=t(34090),O=t(59389),Z=t(78973),N=t(47411),P=t(35249),U=t(9699);let B=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,a.jsxs)(n.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,a.jsx)(n.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,a.jsx)(n.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var M=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:i,onCancel:r}=e,{isLoading:l}=(0,N.MO)(),o=(0,p.C)(P.qb),{errorAlert:d}=(0,w.V)();return l?null:(0,a.jsx)(R.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}i(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:O.Ry({fields:O.IX().of(O.Ry().shape({pii_field:O.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:O.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:O.IX(O.Z_()).label("Data Categories")}))}),children:e=>(0,a.jsx)(R.l0,{style:{marginTop:0},noValidate:!0,children:(0,a.jsx)(n.gCW,{align:"stretch",children:(0,a.jsx)(R.F2,{name:"fields",render:s=>{let{fields:i}=e.values;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,a.jsx)(n.xuv,{w:"416px",children:"PII Field"}),(0,a.jsx)(n.xuv,{w:"416px",children:"DSR Package Label"}),(0,a.jsx)(n.xuv,{w:"416px",children:"Data Categories"}),(0,a.jsx)(n.xuv,{visibility:"hidden",children:(0,a.jsx)(n.lr0,{})})]}),(0,a.jsx)(n.xuv,{children:i&&i.length>0?i.map((e,t)=>(0,a.jsxs)(n.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,a.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,a.jsx)(U.Z,{autoFocus:0===t,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,a.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,a.jsx)(U.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,a.jsx)(n.xuv,{minH:"57px",w:"416px",children:(0,a.jsx)(Z.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,a.jsx)(n.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,a.jsx)(n.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,a.jsx)(n.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,a.jsx)(B,{isSubmitting:t,onCancelClick:r})]})}})})})})},V=e=>{let{connectionConfig:s}=e,t=(0,c.useRef)(!1),{successAlert:i}=(0,w.V)(),{handleError:r}=(0,w.H)(),[l,o]=(0,c.useState)(!1),[d,p]=(0,c.useState)([]),{isOpen:u,onOpen:h,onClose:m}=(0,n.qY0)(),{data:x,isFetching:g,isLoading:f,isSuccess:y}=(0,T.QV)(s?s.key:"",{skip:!s}),[_]=(0,T.jF)(),[b]=(0,T._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),i("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){r(e)}finally{o(!1)}};(0,c.useEffect)(()=>(t.current=!0,y&&x&&p(x.fields),()=>{t.current=!1}),[x,y]);let j=(0,a.jsx)(n.wpx,{disabled:!s||l,loading:l,onClick:h,children:"Customize DSR"});return(0,a.jsxs)(a.Fragment,{children:[s?j:(0,a.jsx)(n.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,a.jsxs)(n.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:m,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{minWidth:"775px",children:[(0,a.jsx)(n.xBx,{children:"Customize DSR"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{pb:6,children:(0,a.jsxs)(n.gCW,{align:"stretch",gap:"16px",children:[(0,a.jsx)(n.xuv,{color:"gray.700",fontSize:"14px",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."}),(g||f)&&(0,a.jsx)(n.M5Y,{children:(0,a.jsx)(n.$jN,{})}),t.current&&!f?(0,a.jsx)(M,{data:d,isSubmitting:l,onSaveClick:v,onCancel:m}):null]})})]})]})]})},H=t(98784),Y=t.n(H),K=t(89671),Q=e=>{let{options:s}=e,[t,{error:i},r]=(0,R.U$)("dataset"),{setValue:l}=r;return(0,a.jsxs)(n.NIc,{display:"flex",children:[(0,a.jsx)(n.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,a.jsxs)(n.gCW,{align:"flex-start",w:"100%",children:[(0,a.jsx)(n.xuv,{w:"full",children:(0,a.jsx)(n.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>l(e),mode:"multiple",className:"w-full"})}),(0,a.jsx)(n.J1D,{children:i})]}),(0,a.jsx)(n.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,a.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,a.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},G=t(20133),$=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:i,onOpen:r,onClose:l}=(0,n.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&l()};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.LZC,{}),(0,a.jsxs)(n.kCb,{alignItems:"center",children:[(0,a.jsx)(n.xvT,{fontSize:"sm",children:"Delete integration"}),(0,a.jsx)(n.wpx,{"aria-label":"Delete integration",icon:(0,a.jsx)(G.l,{}),disabled:t.isLoading,onClick:r,className:"ml-2"})]})]}),(0,a.jsxs)(n.u_l,{isCentered:!0,isOpen:i,onClose:o,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Delete integration"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{pb:6,children:(0,a.jsx)(n.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsx)(n.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,a.jsxs)(n.mzw,{children:[(0,a.jsx)(n.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,a.jsx)(n.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},X=t(17509);let J=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},ee=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===X.Z.SAAS&&(t+="_api"),t},es="#/definitions/FidesDatasetReference",et=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:i=!1,isAuthorizing:r=!1,onSaveClick:l,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:p="Test integration",connectionOption:h,connectionConfig:m,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:f,onDelete:y,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,T.h2)(),{plus:k}=(0,u.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===es&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,a.jsx)(n.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),D=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===es)return"Enter dataset.collection.field"},A=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},I=(e,s)=>(0,a.jsx)(R.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!A(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var i;let{field:r,form:l}=t,o=l.errors.secrets&&l.errors.secrets[e],d=!!l.touched.secrets&&l.touched.secrets[e],c="boolean"===s.type,p="integer"===s.type;return(0,a.jsxs)(n.NIc,{display:"flex",isRequired:A(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,a.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[!p&&!c&&(0,a.jsx)(n.IIB,{...r,type:s.sensitive?"password":"text",placeholder:D(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,a.jsx)(n.WPr,{value:!!r.value,onChange:e=>l.setFieldValue(r.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),p&&(0,a.jsxs)(n.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{l.setFieldValue(r.name,e)},value:null!==(i=r.value)&&void 0!==i?i:0,min:0,size:"sm",children:[(0,a.jsx)(n.zuI,{...r,autoComplete:"off"}),(0,a.jsxs)(n.FiK,{children:[(0,a.jsx)(n.WQu,{}),(0,a.jsx)(n.Y_d,{})]})]}),(0,a.jsx)(n.J1D,{children:o})]}),(0,a.jsx)(n.ua7,{"aria-label":s.description,hasArrow:!0,label:s.description,placement:"right-start",openDelay:500,children:(0,a.jsx)(n.kCb,{alignItems:"center",h:"32px",visibility:s.description?"visible":"hidden",children:(0,a.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"secrets.".concat(e)),z=e=>{let t=Y().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===es){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},E=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(z(e))},F=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(m.key))},q=(null==m?void 0:m.disabled)||!1;return(0,a.jsx)(R.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===S.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?Y().cloneDeep(m.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===es){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return Y().isEmpty(e.enabled_actions)&&(e.enabled_actions=h.supported_actions.map(e=>e.toString())),J(e,s)})(),onSubmit:(e,s)=>{l(z(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let l=!e.dirty&&(null==m?void 0:m.authorized);return(0,a.jsx)(R.l0,{noValidate:!0,children:(0,a.jsxs)(n.gCW,{align:"stretch",gap:"16px",children:[(0,a.jsxs)("div",{className:"flex flex-row",children:[m?(0,a.jsx)(K.Z,{connection_key:null==m?void 0:m.key,disabled:q,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,a.jsx)($,{onDelete:y,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,a.jsx)(R.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,a.jsxs)(n.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,a.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[(0,a.jsx)(n.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==m?void 0:m.key),placeholder:"A unique identifier for your new ".concat(h.human_readable," integration"),size:"sm"}),(0,a.jsx)(n.J1D,{children:e.errors.instance_key})]}),(0,a.jsx)(n.ua7,{"aria-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 integration.",hasArrow:!0,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 integration.",placement:"right-start",openDelay:500,children:(0,a.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,a.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),h.type!==S.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:I(s,t)}):null,k&&(0,a.jsx)(R.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:i}=s;return(0,a.jsxs)(n.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:i.touched.enabled_actions&&i.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,a.jsxs)(n.gCW,{align:"flex-start",w:"inherit",children:[(0,a.jsx)(n.WPr,{...t,placeholder:"Select...",mode:"multiple",options:h.supported_actions.map(e=>({label:Y().upperFirst(e),value:e})),onChange:e=>{i.setFieldValue(t.name,e)},disabled:1===h.supported_actions.length,className:"w-full"}),(0,a.jsx)(n.J1D,{children:e.errors.enabled_actions})]}),(0,a.jsx)(n.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,a.jsx)(n.kCb,{alignItems:"center",h:"32px",children:(0,a.jsx)(n.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),S.Zi.DATABASE===h.type&&!f&&(0,a.jsx)(Q,{options:g}),(0,a.jsxs)("div",{className:"flex gap-4",children:[!h.authorization_required||l?(0,a.jsx)(n.wpx,{disabled:!(null==m?void 0:m.key)||i||_.isLoading,loading:v||j,onClick:()=>F(e),"data-testid":"test-connection-button",children:p}):null,k&&S.Zi.DATABASE===h.type&&!Y().isEmpty(x)&&(0,a.jsx)(n.wpx,{onClick:()=>d(),children:"Test datasets"}),h.authorization_required&&!l?(0,a.jsx)(n.wpx,{loading:r,onClick:()=>E(e.values,e),children:"Authorize integration"}):null,h.type===S.Zi.MANUAL?(0,a.jsx)(V,{connectionConfig:m}):null,(0,a.jsx)(n.LZC,{}),(0,a.jsx)(n.wpx,{type:"primary",disabled:_.isLoading||i,loading:i,htmlType:"submit",children:"Save"})]})]})})}})},ea=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:ee(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ei=async(e,s,t,a,i)=>{var n;let r=a?a.key:ee(t,s),l={access:S.uv.WRITE,connection_type:s.type===S.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},en=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},er=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,D.V)(),{handleError:l}=(0,w.H)(),o=(0,p.T)(),[d,h]=(0,c.useState)(!1),[m,x]=(0,c.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:f,initialDatasets:y}=E({connectionConfig:i}),[_]=(0,T.NG)(),[b]=(0,L.IB)(),[v]=(0,T.rO)(),[j]=(0,W.Zh)(),[k]=(0,W.qd)(),[C]=(0,L.kg)(),[A,I]=(0,W._w)(),{plus:z}=(0,u.hz)(),F=(0,c.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),q=(0,p.C)(W.NC);return{isSubmitting:d,isAuthorizing:m,handleSubmit:async e=>{let n=!i;try{if(h(!0),a.type===S.Zi.SAAS&&n)i=(await ea(e,s,a,t,z?b:_)).connection;else{let n=await ei(e,a,t,i,z?C:k);i||a.type!==S.Zi.DATABASE||(i=n.succeeded[0]),a.type!==S.Zi.MANUAL&&await en(e,s,t,F,j)}i&&e.dataset&&a.type===S.Zi.DATABASE&&await f(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{h(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await ea(e,s,a,t,_)).connection:await en(e,s,t,F,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:y,handleDelete:async()=>{try{await A(t),o((0,W.db)({...q,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:I}},el=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:i,setSelectedConnectionOption:r}=e,[l,o]=(0,c.useState)(),p=(0,n.pmc)(),u=t.type===S.Zi.MANUAL,{data:h}=(0,b.n3)(t.identifier,{skip:u}),{isSubmitting:m,isAuthorizing:x,handleSubmit:f,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:v,handleDelete:j,deleteDatastoreConnectionResult:k}=er({secretsSchema:h,systemFidesKey:s,connectionOption:t,connectionConfig:i,setSelectedConnectionOption:r});return h||t.type===S.Zi.MANUAL?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,a.jsxs)("div",{children:["Connect to your ",t.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."]}),t.user_guide&&(0,a.jsx)("div",{style:{marginTop:"12px"},children:(0,a.jsxs)(A.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,a.jsx)(I,{})]})})]}),(0,a.jsx)(et,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,isAuthorizing:x,onSaveClick:f,onTestConnectionClick:e=>{var s;o(e);let t=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";p({...g.MA,status:t,description:(0,a.jsx)(F,{status:t})})},onTestDatasetsClick:()=>{d().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:i,datasetDropdownOptions:_,initialDatasets:v,isCreatingConnectionConfig:!i,onDelete:j,deleteResult:k}),i?(0,a.jsxs)(n.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[l&&l.data&&void 0!==l.fulfilledTimeStamp?(0,a.jsx)(q.s,{succeeded:"succeeded"===l.data.test_status,timestamp:l.fulfilledTimeStamp}):(0,a.jsx)(q.s,{succeeded:null==i?void 0:i.last_test_succeeded,timestamp:(null==i?void 0:i.last_test_timestamp)||""}),(0,a.jsx)(n.LZC,{})]}):null]}):null};var eo=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:i,onOpen:r,onClose:l}=(0,n.qY0)(),[o,d]=(0,c.useState)(null),{successAlert:u}=(0,w.V)(),[h,{isLoading:m}]=(0,C.qd)(),x=(0,p.C)(b.pw),{data:g}=(0,b.$I)(x),f=(0,c.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:y}=(0,w.H)(),_=()=>{m||(o&&d(null),l())},j=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===S.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=f.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await ei(s,a,t,o,h)).succeeded[0]&&u("Integration successfully linked!"),d(null),l()}}catch(e){y(e)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.wpx,{onClick:r,children:"Link integration"}),(0,a.jsxs)(n.u_l,{isCentered:!0,isOpen:i,size:"lg",onClose:_,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Unlinked Integrations"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{pb:6,children:(0,a.jsxs)(n.Kqy,{direction:"column",spacing:"15px",children:[(0,a.jsx)(n.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,a.jsx)(n.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,a.jsxs)(n.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,a.jsx)(v.Z,{data:e}),(0,a.jsx)(n.xvT,{children:e.name})]},e.key))})]})}),(0,a.jsxs)(n.mzw,{className:"flex gap-4",children:[(0,a.jsx)(n.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,a.jsx)(n.wpx,{onClick:j,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},ed=t(50204),ec=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:i,selectedValue:r,setSelectedValue:l}=j({connectionConfig:s}),o=(0,p.C)(T.dR),{data:d}=(0,T.AZ)({...o,orphaned_from_system:!0}),[u,h]=(0,c.useState)([]);(0,c.useEffect)(()=>{d&&h(d.items)},[d]);let m=(0,n.qY0)();return(0,a.jsxs)(n.xuv,{id:"con-wrapper",px:6,children:[(0,a.jsxs)(n.kCb,{py:5,children:[(0,a.jsxs)(n.Kqy,{direction:{base:"column",lg:"row"},children:[(0,a.jsx)(k,{list:i,label:"Integration type",selectedValue:r,onChange:l,disabled:!!(s&&null!==s)}),!s&&u.length>0?(0,a.jsx)(eo,{connectionConfigs:u,systemFidesKey:t}):null,(0,a.jsx)(y.ZP,{scopes:[S.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,a.jsx)(n.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,a.jsx)(ed.Z,{isOpen:m.isOpen,onClose:m.onClose})]}),(null==r?void 0:r.type)&&[S.Zi.DATABASE,S.Zi.DATA_CATALOG,S.Zi.SAAS,S.Zi.MANUAL,S.Zi.EMAIL].includes(r.type)?(0,a.jsx)(el,{connectionConfig:s,connectionOption:r,setSelectedConnectionOption:l,systemFidesKey:t}):null]})},ep=t(40793),eu=t(43073);let eh=e=>{let{item:s,options:t=[],onNoticeChange:i,isChild:r}=e,{external_id:l,name:o}=s,d="".concat(l,"-notice_id"),[c,,p]=(0,R.U$)(d),{setValue:u}=p;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{flexGrow:1,children:[r&&(0,a.jsx)(n.LqM,{}),(0,a.jsx)(n.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(r?"-child":""),m:0,fontSize:"14px",fontWeight:r?"normal":"semibold",children:o})]}),(0,a.jsx)(n.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{u(e),i(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},em=e=>{let{connectionKey:s,...t}=e,i=(0,n.pmc)(),{data:r,isLoading:l}=(0,L.EQ)(s),[o,{isLoading:d}]=(0,L.Am)(),u=(0,p.C)(ep.Zp),h=(0,p.C)(ep.G1),{data:m,isLoading:x}=(0,ep.J6)({page:u,size:h}),[f,y]=(0,c.useState)(),[_,b]=(0,c.useState)([]),v=(0,c.useMemo)(()=>null==f?void 0:f.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[f]),j=e=>{let s=e.notice_id;if(s){let e=null==m?void 0:m.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return _.filter(e=>s.includes(e.value))}}return _},k=async()=>{let e=await o({connectionKey:s,consentableItems:f});(0,eu.D4)(e)?i((0,g.Vo)("Failed to save consent automation")):i({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,a.jsx)(n.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,c.useEffect)(()=>{r&&y(r)},[r]),(0,c.useEffect)(()=>{m&&b(m.items.map(e=>({label:e.name,value:e.id})))},[m]),l||x)return(0,a.jsx)(n.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,a.jsx)(n.OdW,{height:"35px"})});if(!f||!f.length||!m)return null;let w=(e,s)=>{y(f.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,a.jsx)(n.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,a.jsx)(n.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,a.jsxs)(n.Qdk,{border:"none",children:[(0,a.jsxs)(n.KFZ,{children:[(0,a.jsx)(n.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,a.jsx)(n.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,a.jsx)(n.XEm,{})]}),(0,a.jsxs)(n.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,a.jsx)(n.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,a.jsx)(R.J9,{initialValues:v||{},onSubmit:k,children:(0,a.jsxs)(R.l0,{children:[(0,a.jsx)(n.MIq,{columns:2,spacing:3,children:f.map(e=>{var s;return(0,a.jsxs)(c.Fragment,{children:[(0,a.jsx)(eh,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,a.jsx)(eh,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,a.jsx)(n.Ugi,{justifyContent:"flex-end",mt:3,children:(0,a.jsx)(n.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ex=t(62711),eg=t(18121),ef=t.n(eg),ey=(0,n.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),e_=(0,n.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eb=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},ev=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ej=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ev(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((Y().isNil(l)||Y().isEmpty(l))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(l,o)||(Y().isNil(l)||Y().isEmpty(l)?a.push(r):Y().isNil(o)||Y().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},ek=e=>{let{edited_by:s,before:t,after:i,created_at:n}=e,r=[],l=[],o=[];t.custom_fields||i.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ej(t.custom_fields,i.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ej(t,i);let d=[];if(r.length>0&&d.push(["added ",(0,a.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,a.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,a.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let p=d.pop(),u=d.length>0?(0,a.jsxs)(a.Fragment,{children:[d.map((e,s)=>(0,a.jsxs)(c.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",p]}):p,{formattedTime:h,formattedDate:m}=eb(n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},ew=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eC=(e,s)=>{if(Y().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eS=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eD=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eT=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eA=(0,c.createContext)(null),eI=()=>(0,c.useContext)(eA);var ez=e=>{let{children:s,selectedHistory:t,formType:i}=e,n=(0,c.useMemo)(()=>({selectedHistory:t,formType:i}),[t,i]);return(0,a.jsx)(eA.Provider,{value:n,children:s})},eE=t(72573),eF=t(19535),eq=e=>{let{heading:s,children:t}=e,{selectedHistory:i}=eI(),r=c.Children.toArray(t).filter(e=>{if(c.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=Y().get(null==i?void 0:i.before,s),a=Y().get(null==i?void 0:i.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&Y().isEmpty(t),r="boolean"!=typeof a&&"number"!=typeof a&&Y().isEmpty(a);return!n||!r}return!1});return 0===r.length?null:(0,a.jsx)(n.Kqy,{marginTop:"0px !important",children:(0,a.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,a.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,a.jsx)(n.X6q,{as:"h3",size:"xs",children:s})}),(0,a.jsx)(n.Kqy,{children:r})]})})},eL=t(34803),eW=t(39514),eR=e=>{var s;let{label:t,tooltip:i,...r}=e,{selectedHistory:l,formType:o}=eI(),[d]=(0,R.U$)(r.name),p={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,c.useRef)(null),[h,m]=(0,c.useState)(null),[x,g]=(0,c.useState)([]),[f,y]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=Y().get(null==l?void 0:l.before,r.name)||[],s=Y().get(null==l?void 0:l.after,r.name)||[];y(!Y().isEqual(e,s)),g(e.length>s.length?e:s)},[l,r.name]),(0,c.useEffect)(()=>{u.current&&m(u.current.offsetHeight)},[x]);let _={};return f&&(_="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,a.jsx)(n.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,a.jsxs)(n.gCW,{alignItems:"start",children:[(0,a.jsxs)(n.kCb,{alignItems:"center",children:[(0,a.jsx)(eL.__,{htmlFor:r.name,fontSize:"xs",my:0,mr:1,children:t}),i?(0,a.jsx)(eW.Z,{label:i}):null]}),(0,a.jsx)(n.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(h,"px")},children:(h?p.value:x).map((e,s)=>(0,a.jsx)(n.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&f&&(0,a.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eO=e=>{var s;let{label:t,tooltip:i,...r}=e,{selectedHistory:l,formType:o}=eI(),[d]=(0,R.U$)(r),p={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,c.useRef)(null),[h,m]=(0,c.useState)(null),[x,g]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=Y().get(null==l?void 0:l.before,r.name)||"",s=Y().get(null==l?void 0:l.after,r.name)||"";g(!Y().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,m(u.current.offsetHeight),u.current.textContent=p.value)},[l,r.name,p.value]);let f={};return x&&(f="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,a.jsx)(n.NIc,{style:f,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,a.jsxs)(n.gCW,{alignItems:"start",children:[(0,a.jsxs)(n.kCb,{alignItems:"center",children:[(0,a.jsx)(eL.__,{htmlFor:r.id||r.name,fontSize:"xs",my:0,mr:1,children:t}),i?(0,a.jsx)(eW.Z,{label:i}):null]}),(0,a.jsx)(n.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(h,"px")},children:p.value}),"before"===o&&x&&(0,a.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eZ=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:i}=(0,eF.m)({resourceType:t}),n=e=>Array.from(i.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===S.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,a.jsx)(eq,{heading:"Custom fields",children:l.map(e=>n(e)?(0,a.jsx)(eR,{label:e,name:"".concat(r,".").concat(e)},e):(0,a.jsx)(eO,{label:e,name:"".concat(r,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...i}=e,{selectedHistory:r,formType:l}=eI(),[o]=(0,R.U$)(i),d={...o,value:o.value},[p,u]=(0,c.useState)(!1);(0,c.useEffect)(()=>{u(Y().get(null==r?void 0:r.before,i.name)!==Y().get(null==r?void 0:r.after,i.name))},[r,i.name,d.value]);let h={};return p&&(h="before"===l?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,a.jsx)(n.NIc,{style:h,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,a.jsxs)(n.gCW,{alignItems:"start",minHeight:"46px",children:[(0,a.jsxs)(n.kCb,{alignItems:"center",children:[(0,a.jsx)(eL.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,a.jsx)(eW.Z,{label:t}):null]}),void 0!==d.value&&(0,a.jsx)(n.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===l&&p&&(0,a.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{let{initialValues:s}=e,t=(0,eE.hz)();return(0,a.jsx)(R.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,a.jsx)(R.l0,{children:(0,a.jsxs)(n.Kqy,{children:[(0,a.jsxs)(eq,{heading:"System details",children:[t.dictionaryService?(0,a.jsx)(eO,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,a.jsx)(eO,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,a.jsx)(eO,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,a.jsx)(eO,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,a.jsx)(eR,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,a.jsx)(eq,{heading:"Dataset reference",children:(0,a.jsx)(eR,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,a.jsxs)(eq,{heading:"Data processing properties",children:[(0,a.jsx)(eN,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,a.jsx)(eN,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,a.jsx)(eO,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,a.jsx)(eN,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,a.jsx)(eR,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,a.jsx)(eN,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,a.jsx)(eR,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,a.jsx)(eN,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,a.jsx)(eO,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,a.jsxs)(eq,{heading:"Administrative properties",children:[(0,a.jsx)(eO,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,a.jsx)(eO,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,a.jsx)(eO,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,a.jsx)(eO,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,a.jsx)(eO,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,a.jsx)(eR,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,a.jsx)(eO,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,a.jsx)(eO,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,a.jsx)(eO,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,a.jsx)(eZ,{customFields:s.custom_fields,resourceType:S.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,a.jsxs)(c.Fragment,{children:[(0,a.jsxs)(eq,{heading:"Data use",children:[(0,a.jsx)(eO,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,a.jsx)(eR,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,a.jsx)(eR,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,a.jsx)(eq,{heading:"Features",children:(0,a.jsx)(eR,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,a.jsx)(eq,{heading:"Dataset reference",children:(0,a.jsx)(eR,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,a.jsxs)(eq,{heading:"Special category data",children:[(0,a.jsx)(eN,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,a.jsxs)(eq,{heading:"Third parties",children:[(0,a.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,a.jsx)(eO,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,a.jsx)(eR,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,a.jsx)(eZ,{customFields:s.privacy_declarations[0].custom_fields,resourceType:S.P6.PRIVACY_DECLARATION})]},t)),(0,a.jsxs)(eq,{heading:"Data flow",children:[(0,a.jsx)(eR,{name:"ingress",label:"Sources"}),(0,a.jsx)(eR,{name:"egress",label:"Destinations"})]})]})})})};let eU=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eB=e=>{let{selectedHistory:s,isOpen:t,onClose:i}=e;return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:i,size:"4xl",children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsxs)(n.xBx,{backgroundColor:ef().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,a.jsxs)(n.X6q,{size:"xs",children:[(0,a.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,a.jsx)(a.Fragment,{children:eU(s.before,s.after).map((e,s)=>(0,a.jsx)(n.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.LZC,{}),(0,a.jsx)(n.olH,{})]})]}),(0,a.jsx)(n.fef,{paddingTop:0,paddingBottom:6,children:(0,a.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,a.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,a.jsx)(ez,{selectedHistory:s,formType:"before",children:(0,a.jsx)(eP,{initialValues:null==s?void 0:s.before})})}),(0,a.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,a.jsx)(ez,{selectedHistory:s,formType:"after",children:(0,a.jsx)(eP,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eM=e=>{let{system:s}=e,[t,i]=(0,c.useState)(1),{data:r}=(0,L.Xc)({system_key:s.fides_key,page:t,size:10}),[l,o]=(0,c.useState)(!1),[d,u]=(0,c.useState)(null),h=(0,p.C)(L.o),{data:m=[]}=(0,W.K3)(),x=(null==r?void 0:r.items)||[],g=e=>{u(e=eT(e=eD(e=ew(e=eC(e=eS(e),h),m)))),o(!0)},{formattedTime:f,formattedDate:y}=eb(s.created_at),_=r&&r.total?Math.ceil(r.total/10):0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.iA_,{ml:"24px",children:[(0,a.jsx)(n.hrZ,{children:(0,a.jsx)(n.Tr,{children:(0,a.jsxs)(n.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ef().FIDESUI_NEUTRAL_50,children:["System created on ",y," at ",f]})})}),(0,a.jsx)(n.p3B,{children:x.map((e,s)=>{let t=ek(e);return t?(0,a.jsx)(n.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,a.jsx)(n.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==r?void 0:r.total)||0)>10&&(0,a.jsxs)(n.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,a.jsxs)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==r?void 0:r.total)||0)," of"," ",(null==r?void 0:r.total)||0]}),(0,a.jsx)(n.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&i(t-1)},disabled:1===t,icon:(0,a.jsx)(e_,{})}),(0,a.jsx)(n.wpx,{size:"small",onClick:()=>{t<_&&i(t+1)},disabled:t===_||0===_,icon:(0,a.jsx)(ey,{})})]}),(0,a.jsx)(eB,{selectedHistory:d,isOpen:l,onClose:()=>{o(!1),u(null)}})]})},eV=t(70810),eH=t(16921),eY=e=>{let{title:s,description:t,handleAdd:i}=e;return(0,a.jsx)(n.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,a.jsxs)(n.Ugi,{children:[(0,a.jsx)(n.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(n.xuv,{children:[(0,a.jsx)(n.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(n.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,a.jsx)(n.Ugi,{mt:4,children:(0,a.jsx)(n.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:i,icon:(0,a.jsx)(n.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eK=t(77650);let eQ=e=>{let{declaration:s,title:t,handleDelete:i,handleEdit:r}=e,{isOpen:l,onOpen:o,onClose:d}=(0,n.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,a.jsx)(n.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,a.jsxs)(n.Ugi,{children:[(0,a.jsx)(n.AB5,{onClick:()=>r(s),role:"button",tabIndex:0,children:(0,a.jsx)(n.xvT,{children:t||s.data_use})}),(0,a.jsx)(n.LZC,{}),i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,a.jsx)(n.pJl,{})}),(0,a.jsx)(eK.Z,{isOpen:l,onClose:d,onConfirm:()=>i(s),title:"Delete data use declaration",message:(0,a.jsxs)(n.xvT,{children:["You are about to delete the data use declaration"," ",(0,a.jsx)(n.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,a.jsx)(n.izJ,{})]})},eG=e=>{let{heading:s,children:t,headerButton:i,footerButton:r}=e;return(0,a.jsx)(n.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,a.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,a.jsxs)(n.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,a.jsx)(n.X6q,{as:"h3",size:"xs",children:s}),(0,a.jsx)(n.LZC,{}),i||null]}),(0,a.jsx)(n.Kqy,{spacing:0,children:t}),(0,a.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:r||null})]})})},e$=e=>{let{heading:s,declarations:t,handleAdd:i,handleDelete:r,handleEdit:l,allDataUses:o}=e,d=e=>{let s=o.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,p.C)(ex.gU);return(0,a.jsx)(eG,{heading:s,footerButton:c?null:(0,a.jsx)(n.wpx,{onClick:i,size:"small",icon:(0,a.jsx)(n.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,a.jsx)(eQ,{declaration:e,title:d(e),handleDelete:c?void 0:r,handleEdit:l},e.id))})};var eX=t(79356),eJ=t(84794),e0=t(64829),e1=t(90982);let e4=O.Ry().shape({data_categories:O.IX(O.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:O.Z_().required().label("Data use")}),e2={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},cookies:[],id:""},e6=e=>{var s;let t=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0,cookies:t}},e9=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:i,allDatasets:r,cookies:l,values:o,includeCustomFields:d,privacyDeclarationId:p,lockedForGVL:u}=e,h=!!p,{legalBasisOptions:m}=(0,eJ.Z)(),{specialCategoryLegalBasisOptions:x}=(0,e0.Z)(),g=(0,c.useMemo)(()=>r?r.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[r]);return(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsxs)(e1.Z,{heading:"Data use declaration",children:[(0,a.jsx)(eL.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:h||u,variant:"stacked"}),(0,a.jsx)(Z.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:h||u}),(0,a.jsx)(Z.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:u,layout:"stacked"}),(0,a.jsx)(Z.d,{name:"data_subjects",label:"Data subjects",options:i.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:u,layout:"stacked"}),(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(Z.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:u}),(0,a.jsx)(n.UO1,{in:"Legitimate interests"===o.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(eL.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:u})})})]}),(0,a.jsx)(n.xuv,{mt:5,pl:4,children:(0,a.jsx)(eL.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:u})}),(0,a.jsx)(eL.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:u})]}),(0,a.jsx)(e1.Z,{heading:"Features",children:(0,a.jsx)(Z.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:u,mode:"tags"})}),(0,a.jsx)(e1.Z,{heading:"Dataset reference",children:(0,a.jsx)(Z.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:u})}),(0,a.jsx)(e1.Z,{heading:"Special category data",children:(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(eL.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked",isDisabled:u}),(0,a.jsx)(n.UO1,{in:o.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(Z.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:x,isRequired:o.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:u})})})]})}),(0,a.jsx)(e1.Z,{heading:"Third parties",children:(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(eL.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked",isDisabled:u}),(0,a.jsx)(n.UO1,{in:o.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsxs)(n.Kqy,{mt:4,spacing:4,children:[(0,a.jsx)(eL.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:u}),(0,a.jsx)(Z.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:u})]})})]})}),(0,a.jsx)(e1.Z,{heading:"Cookies",children:(0,a.jsx)(Z.d,{name:"cookies",label:"Cookies",options:l&&l.length?l.map(e=>({label:e.name,value:e.name})):[],mode:"tags",tooltip:"Which cookies are placed on consumer domains for this purpose?",layout:"stacked",disabled:u})}),d?(0,a.jsx)(eX.uc,{resourceType:S.P6.PRIVACY_DECLARATION,resourceFidesKey:p}):null]})},e3=(e,s)=>{if(e){let t=e.cookies&&e.cookies.length>0?e.cookies.map(e=>e.name):void 0;return{...e,customFieldValues:s||{},cookies:t}}return e2},e5=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:S.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e6(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,c.useMemo)(()=>e3(t,i),[t,i])}},e8=e=>{let{onSubmit:s,onCancel:t,initialValues:i,...r}=e,l=null==i?void 0:i.id,{handleSubmit:o,initialValues:d}=e5({onSubmit:s,onCancel:t,initialValues:i,allDataUses:r.allDataUses,privacyDeclarationId:l}),c=(0,p.C)(ex.gU);return(0,a.jsx)(R.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e4,children:e=>{let{dirty:s,values:i}=e;return(0,a.jsxs)(R.l0,{"data-testid":"declaration-form",children:[(0,a.jsx)(h.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(e9,{values:i,lockedForGVL:c,privacyDeclarationId:l,...r}),(0,a.jsxs)(n.kCb,{w:"100%",children:[(0,a.jsx)(n.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.LZC,{}),(0,a.jsx)(n.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},e7=e=>{let{isOpen:s,onClose:t,heading:i,isCentered:r=!1,testId:l="privacy-declaration-modal",children:o}=e;return(0,a.jsxs)(n.u_l,{isOpen:s,onClose:t,isCentered:r,scrollBehavior:"inside",size:"3xl",children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":l,children:[(0,a.jsx)(n.xBx,{p:0,children:(0,a.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,a.jsx)(n.X6q,{as:"h3",size:"sm",children:i})})}),(0,a.jsx)(n.fef,{pb:4,children:o})]})]})};var se=e=>{let{system:s,addButtonProps:t,includeCustomFields:i,includeCookies:r,...l}=e,{isOpen:o,onClose:d,onOpen:p}=(0,n.qY0)(),[u,h]=(0,c.useState)(void 0),{createDataUse:m,updateDataUse:x,deleteDataUse:g}=(0,eH.Z)(s),f=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],y=s.cookies?s.cookies.filter(e=>0===f.filter(s=>s&&s.name===e.name).length):void 0,_=()=>{d(),h(void 0)},b=()=>{p(),h(void 0)},v=async e=>(_(),u)?x(u,e):m(e);return(0,c.useEffect)(()=>{d()},[d,s.fides_key]),(0,a.jsxs)(n.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,a.jsx)(eY,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:b}):(0,a.jsx)(e$,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:b,handleEdit:e=>{p(),h(e)},handleDelete:g,allDataUses:l.allDataUses}),y&&y.length>0?(0,a.jsx)(eG,{heading:"Unassigned cookies",children:y.map(e=>(0,a.jsxs)(c.Fragment,{children:[(0,a.jsx)(n.xuv,{px:6,py:4,children:(0,a.jsx)(n.xvT,{children:e.name})}),(0,a.jsx)(n.izJ,{})]},e.name))}):null,(0,a.jsx)(e7,{isOpen:o,onClose:_,heading:"Configure data use",children:(0,a.jsx)(e8,{initialValues:u,onSubmit:v,onCancel:_,includeCustomFields:i,...l})})]})},ss=e=>{let{system:s}=e,{isLoading:t,...i}=(0,eV.f)({includeDatasets:!0,includeDisabled:!1}),r=i.allDataCategories.filter(e=>e.active),o=i.allDataUses.filter(e=>e.active),d=i.allDataSubjects.filter(e=>e.active),c={...i,allDataCategories:r,allDataUses:o,allDataSubject:d,cookies:s.cookies};return(0,a.jsxs)(n.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,a.jsx)(n.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,a.jsxs)(n.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,a.jsx)(n.rUS,{as:l(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,a.jsx)(n.$jN,{}):(0,a.jsx)(se,{system:s,includeCustomFields:!0,includeCookies:!0,...c})]})},st=t(60136),sa=t(43894),si=t(94180),sn=t(55827);let sr={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},sl=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},so=e=>{let s=e.fides_key?e.fides_key:(0,sn.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookies:e.cookies,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a};var sd=t(56048);let sc=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sp=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],su=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sh=e=>{var s;let{system:t}=e,i=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,a.jsxs)(n.X6q,{as:"h3",size:"lg",children:["Describe ",i]})};var sm=e=>{let{onSuccess:s,system:t,withHeader:i,children:r}=e,{data:l=[]}=(0,W.K3)(),o=(0,p.T)(),d=(0,eX.mZ)({resourceType:S.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...u}=(0,eV.f)({includeDatasets:!0,includeDisabled:!1}),m=(0,c.useMemo)(()=>t?sl(t,d.customFieldValues):sr,[t,d.customFieldValues]),[x]=(0,W.in)(),g=(0,c.useMemo)(()=>O.Ry().shape({name:O.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await x({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==m.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:O.Z_().min(1).url().nullable()}),[x,m.name]),f=(0,eE.hz)(),[y,_]=(0,W.f7)(),[b,v]=(0,W.qQ)();(0,L.Rd)(void 0,{skip:!f.dictionaryService});let[j]=(0,L.qz)(),k=(0,p.C)(L.o),w=(0,p.C)(ex.gU),C=(0,c.useMemo)(()=>!!(t&&(null==l?void 0:l.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,l]),D=(0,c.useMemo)(()=>u.allDatasets?u.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[u.allDatasets]),T=(0,n.pmc)(),A=async(e,t)=>{let a,i;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await j({vendor_id:e.vendor_id});s.isError?(0,st.fn)(s.error)&&404===s.error.status||T({status:"error",description:(0,st.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.")}):s.data&&s.data.items.length>0&&(a=s.data.items.map(e=>{var s;return{...(0,si.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let n=so({...e,privacy_declarations:null!=a?a:e.privacy_declarations});i=C?await b(n):await y(n),await d.upsertCustomFields(e),(0,st.D4)(i)?T({status:"error",description:(0,st.e$)(i.error,"An unexpected error occurred while ".concat(C?"editing":"creating"," the system. Please try again."))}):(T.closeAll(),t.resetForm({values:e}),s(i.data),o((0,ex.b3)("initial")))},I=e=>{if(f.dictionaryService){if(!e){o((0,ex.b3)("hiding")),o((0,ex.gQ)(!1));return}o((0,ex.b3)("showing")),f.tcf&&(0,st.cj)(e)===st.c6.GVL?o((0,ex.gQ)(!0)):o((0,ex.gQ)(!1))}},z=v.isLoading||_.isLoading||d.isLoading;return(0,a.jsx)(R.J9,{initialValues:m,enableReinitialize:!0,onSubmit:A,validationSchema:g,children:e=>{let{dirty:s,values:l,isValid:o}=e;return(0,a.jsxs)(R.l0,{children:[(0,a.jsx)(h.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,a.jsxs)(n.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[i?(0,a.jsx)(sh,{system:t}):null,(0,a.jsx)(n.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),i?(0,a.jsx)(sh,{system:t}):null,(0,a.jsxs)(e1.Z,{heading:"System details",children:[f.dictionaryService?(0,a.jsx)(sd.Z,{label:"System name",options:k,onVendorSelected:I,isCreate:!t,lockedForGVL:w}):(0,a.jsx)(eL.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,a.jsx)(eL.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,a.jsx)(sa.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,a.jsx)(Z.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:m.tags?m.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,a.jsx)(e1.Z,{heading:"Dataset reference",children:(0,a.jsx)(Z.d,{name:"dataset_references",label:"Dataset references",options:D,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:w})}),(0,a.jsx)(e1.Z,{heading:"Data processing properties",children:(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(n.xuv,{mb:4,children:(0,a.jsx)(sa.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:w})}),(0,a.jsx)(n.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(sa.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!l.processes_personal_data||w}),(0,a.jsx)(n.UO1,{in:l.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(eL.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:l.exempt_from_privacy_regulations,disabled:w})})})]})}),(0,a.jsx)(n.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,a.jsxs)(n.Kqy,{spacing:4,mt:4,children:[(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(sa.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:w}),(0,a.jsx)(n.UO1,{in:l.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(Z.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sc,tooltip:"What is the legal basis under which profiling is performed?",disabled:w,isRequired:l.uses_profiling})})})]}),(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(sa.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:w}),(0,a.jsx)(n.UO1,{in:l.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(Z.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sp,tooltip:"What is the legal basis under which the data is transferred?",isRequired:l.does_international_transfers,disabled:w})})})]}),(0,a.jsxs)(n.Kqy,{spacing:0,children:[(0,a.jsx)(eL.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:w}),(0,a.jsx)(n.UO1,{in:l.requires_data_protection_assessments,animateOpacity:!0,children:(0,a.jsx)(n.xuv,{mt:4,children:(0,a.jsx)(eL.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:w,isRequired:l.requires_data_protection_assessments})})})]})]})})]})}),(0,a.jsxs)(n.UO1,{in:l.processes_personal_data&&!l.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,a.jsxs)(e1.Z,{heading:"Cookie properties",children:[(0,a.jsx)(sa.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:w}),(0,a.jsx)(sa.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:w}),(0,a.jsx)(sa.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:w}),(0,a.jsx)(sa.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:w})]}),(0,a.jsxs)(e1.Z,{heading:"Administrative properties",children:[(0,a.jsx)(eL.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,a.jsx)(sa.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:w}),(0,a.jsx)(sa.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:w}),(0,a.jsx)(sa.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:w}),(0,a.jsx)(eL.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||w}),(0,a.jsx)(Z.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:su,tooltip:"What is the role of the business with regard to data processing?",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||w}),(0,a.jsx)(sa.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:w}),(0,a.jsx)(eL.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!l.processes_personal_data||l.exempt_from_privacy_regulations||w}),(0,a.jsx)(sa.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?",disabled:w}),(0,a.jsx)(sa.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:w}),(0,a.jsx)(sa.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),l.fides_key?(0,a.jsx)(eX.uc,{resourceType:S.P6.SYSTEM,resourceFidesKey:l.fides_key}):null]})]}),(0,a.jsx)(n.xuv,{mt:6,children:(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:z||!s||!o,loading:z,"data-testid":"save-btn",children:"Save"})}),r]})}})};let sx={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},HISTORY:{index:4,hash:"#history"}},sg=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sx).find(e=>e.hash===s)},sf=e=>Object.values(sx).find(s=>s.index===e),sy=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,a.jsxs)(n.xuv,{children:[(0,a.jsx)(n.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,a.jsxs)(n.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,a.jsx)(f.Z,{onClick:s,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,a.jsx)(f.Z,{onClick:t,children:"adding your privacy declarations in the next tab"}),"."]})]})};var s_=e=>{var s,t;let{isCreate:r}=e,d=(0,o.useRouter)(),[f,y]=(0,c.useState)((()=>{var e,s;let t=d.asPath.split("#")[1];return t&&null!==(s=null===(e=sg(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sx.INFORMATION.index})()),[_,b]=(0,c.useState)(!1),{systemOrDatamapRoute:v}=(0,m.V)(),j=(0,n.pmc)(),k=(0,p.T)(),w=(0,p.C)(W.NC),[C,S]=(0,c.useState)(void 0),{plus:D}=(0,u.hz)(),{flags:{dataDiscoveryAndDetection:T}}=(0,u.Vb)(),{plus:A}=(0,u.hz)(),{data:I}=(0,W.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,c.useEffect)(()=>{k((0,W.db)(I))},[I,k]),(0,c.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let z=(0,c.useCallback)(e=>{void 0===w&&b(!0),k((0,W.db)(e)),d.push({pathname:x.Dv,query:{id:e.fides_key}});let s={...g.MA,description:(0,a.jsx)(sy,{onViewDatamap:()=>{d.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{y(1),j.closeAll()}})};j({...s})},[w,k,d,v,j]);(0,c.useEffect)(()=>(r&&(k((0,W.db)(void 0)),k((0,ex.b3)("initial")),k((0,ex.gQ)(!1))),()=>{k((0,W.db)(void 0))}),[k,r]);let{attemptAction:E}=(0,h.oI)(),F=(0,c.useCallback)(e=>{E().then(async s=>{if(s){let{status:s}=d.query;if(s&&("succeeded"===s?j((0,g.t5)("Integration successfully authorized.")):j((0,g.Vo)("Failed to authorize integration."))),y(e),d.isReady){let s=sf(e);if(s){let e={...d.query};delete e.status,await d.replace({pathname:d.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[E,d,j]);(0,c.useEffect)(()=>{let{status:e}=d.query;e&&F(sx.INTEGRATIONS.index)},[d.query,F]);let q=[{label:"Information",content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.xuv,{px:6,mb:9,children:[(0,a.jsx)(h.eB,{}),(0,a.jsx)(sm,{onSuccess:z,system:w})]}),_?(0,a.jsx)(n.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,a.jsxs)(n.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,a.jsx)(n.rUS,{as:l(),href:v,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",content:w?(0,a.jsx)(n.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,a.jsx)(ss,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,a.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,a.jsxs)(n.xuv,{px:6,paddingBottom:2,children:[(0,a.jsx)(n.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,a.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,a.jsx)(i.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,a.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,a.jsx)(n.xuv,{px:6,paddingBottom:2,children:(0,a.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,children:A&&T?(0,a.jsxs)(a.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,a.jsx)(n.rUS,{href:x.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,a.jsx)(ec,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,a.jsx)(em,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&q.push({label:"History",content:w?(0,a.jsxs)(n.xuv,{width:{base:"100%",lg:"70%"},children:[(0,a.jsx)(n.xuv,{px:6,paddingBottom:6,children:(0,a.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,a.jsx)(eM,{system:w})]}):null,isDisabled:!w}),{tabData:q,tabIndex:f,onTabChange:F}}},84794:function(e,s,t){var a=t(27378),i=t(46042);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},64829:function(e,s,t){var a=t(27378),i=t(46042);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5632],{95372:function(e){e.exports=function(e,t,n,i){for(var a=e.length,r=n+(i?1:-1);i?r--:++r<a;)if(t(e[r],r,e))return r;return -1}},56632:function(e,t,n){var i=n(89278),a=n(80068),r=n(50098);e.exports=function(e){return function(t,n,o){var s=Object(t);if(!a(t)){var l=i(n,3);t=r(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,o);return c>-1?s[l?t[c]:c]:void 0}}},64925:function(e,t,n){var i=n(56632)(n(66259));e.exports=i},66259:function(e,t,n){var i=n(95372),a=n(89278),r=n(47991),o=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return -1;var l=null==n?0:r(n);return l<0&&(l=o(s+l,0)),i(e,a(t,3),l)}},94919:function(e,t,n){var i=n(91936),a=1/0;e.exports=function(e){return e?(e=i(e))===a||e===-a?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var i=n(94919);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},66857:function(e,t,n){"use strict";var i=n(24246),a=n(74588),r=n(19310);t.Z=e=>{let{selectedTaxonomies:t,showDisabled:n=!1,...o}=e,{getDataCategoryDisplayNameProps:s,getDataCategories:l}=(0,r.Z)(),c=(n?l():l().filter(e=>e.active)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:n}=s(e.fides_key);return{value:e.fides_key,name:t,primaryName:n,description:e.description||""}});return(0,i.jsx)(a.l,{options:c,...o})}},74588:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var i=n(24246),a=n(96013),r=n(55372),o=n.n(r);let s=e=>{let{data:t}=e;return(0,i.jsxs)(a.jqI,{gap:12,title:"".concat(t.primaryName||"").concat(t.primaryName?": ":"").concat(t.name," - ").concat(t.description),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:t.primaryName||t.name}),t.primaryName&&": ".concat(t.name)]}),(0,i.jsx)("em",{children:t.description})]})},l=e=>{let{options:t,...n}=e,r=null==t?void 0:t.map(e=>({...e,className:o().option}));return(0,i.jsx)(a.WPr,{options:r,autoFocus:!0,variant:"borderless",optionRender:s,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},19310:function(e,t,n){"use strict";var i=n(24246),a=n(64925),r=n.n(a),o=n(27378),s=n(44296),l=n(91650),c=n(79851),u=n(47411);let d=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,s.C)(c.U3),{isLoading:n}=(0,u.MO)(),i=(0,s.C)(u.qb),{isLoading:a}=(0,l.te)();return{dataUses:t,dataSubjects:(0,s.C)(l.ZL),dataCategories:i,isLoading:e||n||a}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:n,isLoading:a}=d(),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=t(e);if(!i)return{};let a=t(s(e,n)),r=!!i.parent_key;return{name:i.name||void 0,primaryName:r&&(null==a?void 0:a.name)!==i.name&&(null==a?void 0:a.name)||void 0}},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:a,primaryName:r}=l(e,t,n);return a?r?(0,i.jsxs)(o.Fragment,{children:[(0,i.jsxs)("strong",{children:[r,":"]})," ",a]},e):(0,i.jsx)("strong",{children:a},e):e},u=t=>r()(e,{fides_key:t}),f=e=>r()(t,{fides_key:e}),v=e=>r()(n,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:u,getDataUseDisplayName:e=>c(e,u,1),getDataUseDisplayNameProps:e=>l(e,u,1),getDataCategories:()=>t,getDataCategoryByKey:f,getDataCategoryDisplayName:e=>c(e,f,2),getDataCategoryDisplayNameProps:e=>l(e,f,2),getDataSubjects:()=>n,getDataSubjectByKey:v,getDataSubjectDisplayName:e=>{let t=v(e);return t?t.name:e},getPrimaryKey:s,isLoading:a}}},52810:function(e,t,n){"use strict";var i=n(24246),a=n(96013),r=n(27378),o=n(66857),s=n(19310),l=n(74473),c=n(6111);t.Z=e=>{var t,n,u;let{resource:d}=e,[f,v]=(0,r.useState)(!1),{getDataCategoryDisplayName:p}=(0,s.Z)(),[g]=(0,c.NA)(),m=(null===(t=d.classifications)||void 0===t?void 0:t.length)?d.classifications[0].label:null,_=null!==(u=d.user_assigned_data_categories)&&void 0!==u?u:[],h=!m&&!(null==_?void 0:_.length),x=null===(n=d.sub_field_urns)||void 0===n?void 0:n.length,j=e=>{g({staged_resource_urn:d.urn,monitor_config_id:d.monitor_config_id,user_assigned_data_categories:[..._,e]})},y=e=>{var t;g({staged_resource_urn:d.urn,monitor_config_id:d.monitor_config_id,user_assigned_data_categories:null!==(t=null==_?void 0:_.filter(t=>t!==e))&&void 0!==t?t:[]})},b=!f&&!!_.length,N=!f&&!!m&&!_.length;return(0,i.jsxs)(l.Z,{"data-testid":"edit-category-cell",children:[h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.j8w,{"data-testid":"no-classifications",color:"white",children:"None"}),!x&&(0,i.jsx)(a.j8w,{onClick:()=>v(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),b&&(0,i.jsxs)(i.Fragment,{children:[_.map(e=>(0,i.jsx)(a.j8w,{"data-testid":"user-classification-".concat(e),color:"white",closable:!0,onClose:()=>y(e),closeButtonLabel:"Remove category",children:p(e)},e)),(0,i.jsx)(a.j8w,{onClick:()=>v(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),N&&(0,i.jsxs)(a.j8w,{onClick:()=>v(!0),color:"white","data-testid":"classification-".concat(m),hasSparkle:!0,children:[p(m),(0,i.jsx)(a.PJP.I8b,{size:10})]}),f&&(0,i.jsx)(a.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,i.jsx)(o.Z,{selectedTaxonomies:_,onChange:e=>{v(!1),j(e)},onBlur:()=>v(!1),open:!0})})]})}},74473:function(e,t,n){"use strict";var i=n(24246);n(27378),t.Z=e=>{let{children:t,className:n,...a}=e;return(0,i.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(n||""),...a,children:t})}},59104:function(e,t,n){"use strict";var i,a;n.d(t,{X:function(){return i}}),(a=i||(i={})).DATABASE="Database",a.SCHEMA="Schema",a.TABLE="Table",a.FIELD="Field",a.NONE="none"},52962:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var i=n(59104);let a=e=>{var t,n,a;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?i.X.DATABASE:(null===(n=e.tables)||void 0===n?void 0:n.length)?i.X.SCHEMA:(null===(a=e.fields)||void 0===a?void 0:a.length)?i.X.TABLE:i.X.FIELD:i.X.NONE}},90049:function(e,t){"use strict";t.Z=e=>{let{name:t,urn:n,monitor_config_id:i,database_name:a,schema_name:r,table_name:o,top_level_field_name:s,top_level_field_urn:l}=e;if(!s)return t;let c=n.split(".");return l?n.replace("".concat(l).concat("."),""):([i,a,r,o,s].forEach(e=>{if(e){let t=c.indexOf(e);t>-1&&c.splice(t,1)}}),c.join("."))}},2053:function(e,t){"use strict";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}},6170:function(e,t,n){"use strict";var i=n(59104),a=n(52962),r=n(2053);t.Z=e=>(0,a.G)(e)!==i.X.FIELD||(0,r.Z)(e)},55372:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5728],{36848:function(e,t,a){a.d(t,{q:function(){return r}});var l=a(24246),i=a(96013);let r=e=>{let{label:t,isDisabled:a,...r}=e;return(0,l.jsx)(i.OK9,{"data-testid":"tab-".concat(t),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:r.fontSize,fontWeight:"500",color:"gray.500",isDisabled:a||!1,children:t})};t.Z=e=>{let{data:t,border:a="partial",...s}=e;return(0,l.jsxs)(i.mQc,{colorScheme:"complimentary",...s,children:[(0,l.jsx)(i.tdY,{width:"partial"===a?"max-content":void 0,children:t.map(e=>(0,l.jsx)(r,{label:e.label,isDisabled:e.isDisabled,fontSize:s.fontSize},e.label))}),(0,l.jsx)(i.nPR,{children:t.map(e=>(0,l.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},11574:function(e,t,a){var l=a(24246),i=a(96013),r=a(36848);t.Z=e=>{let{data:t,border:a="partial",borderWidth:s=2,...n}=e;return(0,l.jsx)(i.mQc,{colorScheme:"complimentary",...n,children:(0,l.jsx)(i.tdY,{width:"partial"===a?"max-content":void 0,borderBottomWidth:s,children:t.map(e=>(0,l.jsx)(r.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:n.fontSize},e.label))})})}},76552:function(e,t,a){var l=a(24246),i=a(11574);t.Z=e=>{let{filterTabs:t,onChange:a,filterTabIndex:r}=e;return(0,l.jsx)(i.Z,{border:"full-width",mb:5,size:"sm",data:t,borderWidth:1,index:r,onChange:a})}},8339:function(e,t,a){a.d(t,{Y:function(){return s}});var l=a(24246),i=a(96013),r=a(53614);let s=[(0,l.jsx)(i.PJP.S9g,{},"layers"),(0,l.jsx)(i.PJP.ehp,{},"dataset"),(0,l.jsx)(i.PJP.iA_,{},"table"),(0,l.jsx)(i.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:a,onPathClick:i=()=>{}}=e,n=[];if(t||n.push({title:"All activity"}),t){n.push({title:"All activity",href:a});let e=t.split(".");e.forEach((t,a)=>{0!==a&&n.push({title:t,icon:s[a-1],onClick:t=>{t.preventDefault(),i(e.slice(0,a+1).join("."))}})})}return(0,l.jsx)(r.m,{"data-testid":"results-breadcrumb",items:n})}},79620:function(e,t,a){a.d(t,{Z:function(){return _}});var l=a(24246),i=a(59003),r=a(92222),s=a(96013),n=a(86677),o=a(27378),c=a(8540),d=a(76552),u=a(6111),h=a(98320),x=a(64900),m=a(61934),g=a(62448),j=a(38575),p=a(51557),v=a(59104),f=a(15025),b=e=>{let{resourceType:t,changeTypeOverride:a}=e,i=(0,r.Cl)(),s=[];return t?t===v.X.SCHEMA?{columns:[i.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(g.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Name",...e})}),i.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(c.G3,{value:(0,f.Z)(e.getValue())}),header:e=>(0,l.jsx)(c.Rr,{value:"Project",...e})}),i.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),i.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"System",...e})}),i.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),i.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),i.display({id:"actions",cell:e=>(0,l.jsx)(x.Z,{ignoreChildActions:a===p.E.MONITORED||a===p.E.MUTED,resource:e.row.original}),header:"Actions",size:180})]}:t===v.X.TABLE?{columns:[i.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(g.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Table name",...e})}),i.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),i.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),i.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),i.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),i.display({id:"actions",cell:e=>(0,l.jsx)(x.Z,{resource:e.row.original}),header:"Actions"})]}:t===v.X.FIELD?{columns:[i.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(g.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Field name",...e})}),i.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Data type",...e})}),i.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),i.display({id:"status",cell:e=>(0,l.jsx)(j.Z,{changeTypeOverride:a,result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),i.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),i.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),i.display({id:"actions",cell:e=>(0,l.jsx)(x.Z,{resource:e.row.original}),header:"Actions"})]}:{columns:s}:{columns:s}},y=a(46042),R=e=>{let{initialFilterTabIndex:t=0}=e,[a,l]=(0,o.useState)(t),i=(0,o.useMemo)(()=>[{label:"Action Required",filters:[y.LL.ADDITION,y.LL.REMOVAL],childFilters:[y.LL.ADDITION,y.LL.REMOVAL]},{label:"Monitored",filters:[y.LL.MONITORED],childFilters:[],changeTypeOverride:p.E.MONITORED},{label:"Unmonitored",filters:[y.LL.MUTED],childFilters:[],changeTypeOverride:p.E.MUTED}],[]);return{filterTabs:i,filterTabIndex:a,setFilterTabIndex:l,activeDiffFilters:i[a].filters,activeChildDiffFilters:i[a].childFilters,activeChangeTypeOverride:i[a].changeTypeOverride}},w=a(38637),T=a(87573),C=a(52962),D=a(71329),Z=a(2053),E=a(22770);let O={items:[],total:0,page:1,size:50,pages:1},S=()=>(0,l.jsx)(s.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(s.gCW,{children:[(0,l.jsx)(s.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(s.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var _=e=>{var t,a;let{resourceUrn:h}=e,x=(0,n.useRouter)(),[m,g]=(0,o.useState)(""),{filterTabs:j,setFilterTabIndex:p,filterTabIndex:f,activeDiffFilters:y,activeChildDiffFilters:_,activeChangeTypeOverride:M}=R({initialFilterTabIndex:(null===(t=x.query)||void 0===t?void 0:t.filterTabIndex)?Number(null===(a=x.query)||void 0===a?void 0:a.filterTabIndex):void 0}),{PAGE_SIZES:P,pageSize:I,setPageSize:L,onPreviousPageClick:z,isPreviousPageDisabled:A,onNextPageClick:V,isNextPageDisabled:k,startRange:N,endRange:F,pageIndex:W,setTotalPages:G,resetPageIndexToDefault:q}=(0,c.oi)();(0,o.useEffect)(()=>{q()},[h,m,q,y,_]);let{isFetching:U,isLoading:H,data:J}=(0,u.z8)({staged_resource_urn:h,page:W,size:I,child_diff_status:_,diff_status:y,search:m}),X=(0,C.G)(null==J?void 0:J.items[0]),{columns:Y}=b({resourceType:X,changeTypeOverride:M}),{items:Q,total:B,pages:K}=(0,o.useMemo)(()=>null!=J?J:O,[J]);(0,o.useEffect)(()=>{G(K)},[K,G]);let $=(0,o.useMemo)(()=>Y,[Y]),{navigateToDetectionResults:ee}=(0,w.Z)(),et=(0,i.b7)({getCoreRowModel:(0,r.sC)(),getGroupedRowModel:(0,r.qe)(),getExpandedRowModel:(0,r.rV)(),getRowId:D.Z,columns:$,manualPagination:!0,data:Q,columnResizeMode:"onChange"});return H?(0,l.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.Z,{filterTabs:j,filterTabIndex:f,onChange:p}),(0,l.jsx)(c.Q$,{children:(0,l.jsx)(s.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,l.jsxs)(s.kCb,{gap:6,align:"center",children:[(0,l.jsx)(s.xuv,{flexShrink:0,children:(0,l.jsx)(E.M,{value:m,onChange:g})}),(0,l.jsx)(T.Z,{})]})})}),(0,l.jsx)(c.ZK,{tableInstance:et,onRowClick:e=>ee({resourceUrn:e.urn,filterTabIndex:f}),getRowIsClickable:e=>X!==v.X.FIELD||(0,Z.Z)(e),emptyTableNotice:(0,l.jsx)(S,{})}),(0,l.jsx)(c.s8,{totalRows:B||0,pageSizes:P,setPageSize:L,onPreviousPageClick:z,isPreviousPageDisabled:A||U,onNextPageClick:V,isNextPageDisabled:k||U,startRange:N,endRange:F})]})}},61934:function(e,t,a){var l=a(24246),i=a(96013);t.Z=e=>{let{type:t}=e;return(0,l.jsx)(i.kCb,{align:"center",h:"full",children:!!t&&(0,l.jsx)(i.j8w,{children:t})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5880],{38615:function(e,t,n){n.d(t,{Tg:function(){return s}});var r=n(24246),i=n(44296),a=n(96451);let s=e=>(0,i.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return s(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},60136:function(e,t,n){n.d(t,{D4:function(){return a.D4},MM:function(){return f},Ot:function(){return u},c6:function(){return i},cj:function(){return g},e$:function(){return l},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var r,i,a=n(41164);let s="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},f=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(r=i||(i={})).GVL="gvl",r.AC="gacp",r.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},16781:function(e,t,n){n.d(t,{MA:function(){return l},Vo:function(){return u},t5:function(){return o}});var r=n(24246),i=n(96013);let a=e=>{let{children:t}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-success-msg",children:[(0,r.jsx)("strong",{children:"Success:"})," ",t]})},s=e=>{let{children:t}=e;return(0,r.jsxs)(i.xvT,{"data-testid":"toast-error-msg",children:[(0,r.jsx)("strong",{children:"Error:"})," ",t]})},l={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},o=e=>{let t=(0,r.jsx)(a,{children:e});return{...l,description:t}},u=e=>{let t=(0,r.jsx)(s,{children:e});return{...l,description:t,status:"error"}}},50204:function(e,t,n){n.d(t,{Z:function(){return x}});var r=n(24246),i=n(96013),a=n(27378),s=n(44833),l=n(45007),o=n(60136),u=n(16781),c=n(69477),d=n(89319),f=n(52020),p=n(21618);let{reducer:g}=(0,d.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:m}=p.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let t=new FormData;return t.append("file",e),{url:"".concat(f.o4,"/register"),method:"POST",body:t}},invalidatesTags:()=>["Connection Type"]})})});var x=e=>{let{isOpen:t,onClose:n,testId:d="connector-template-modal"}=e,f=(0,l.I0)(),[p,g]=(0,a.useState)(null),x=(0,i.pmc)(),{getRootProps:h,getInputProps:y,isDragActive:j}=(0,s.uI)({onDrop:e=>{var t;if("zip"!==(null===(t=e[0].name.split(".").pop())||void 0===t?void 0:t.toLowerCase())){x((0,u.Vo)("Only zip files are allowed."));return}g(e[0])}}),[v,{isLoading:b}]=m(),{refetch:C}=(0,c.$I)({search:""},{skip:!1}),w=async()=>{if(p)try{var e;await v(p).unwrap(),x((0,u.t5)("Integration template uploaded successfully."));let{data:t}=await C();f((0,c.fP)(null!==(e=null==t?void 0:t.items)&&void 0!==e?e:[])),n()}catch(e){x((0,u.Vo)((0,o.e$)(e)))}finally{g(null)}};return(0,r.jsxs)(i.u_l,{isOpen:t,onClose:n,size:"2xl",children:[(0,r.jsx)(i.ZAr,{}),(0,r.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":d,children:[(0,r.jsx)(i.xBx,{children:"Upload integration template"}),(0,r.jsxs)(i.fef,{children:[(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,r.jsxs)(i.xuv,{...h(),bg:j?"gray.100":"gray.50",border:"2px dashed",borderColor:j?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,r.jsx)("input",{...y()}),p?(0,r.jsx)(i.xvT,{children:p.name}):j?(0,r.jsx)(i.xvT,{children:"Drop the file here..."}):(0,r.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,r.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,r.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"cancel-btn",disabled:b,children:"Cancel"}),(0,r.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!p||b,onClick:w,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},9699:function(e,t,n){var r=n(24246),i=n(96013),a=n(34090);t.Z=e=>{let{disabled:t=!1,displayHelpIcon:n=!0,helpIconVisibility:s=!1,isRequired:l=!1,label:o,placeholder:u,type:c="text",...d}=e,{id:f,autoFocus:p}=d,[g,m]=(0,a.U$)(d);return(0,r.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(m.error&&m.touched),children:[o&&(0,r.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:f,minWidth:"150px",children:o}),(0,r.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,r.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,r.jsx)(i.zuI,{...g,autoComplete:"off",autoFocus:p}),(0,r.jsxs)(i.FiK,{children:[(0,r.jsx)(i.WQu,{}),(0,r.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,r.jsx)(i.IIB,{...g,autoComplete:"off",autoFocus:p,color:"gray.700",isDisabled:t,placeholder:u,size:"sm"}),"textarea"===c&&(0,r.jsx)(i.gxH,{...g,autoComplete:"off",autoFocus:p,color:"gray.700",placeholder:u,resize:"none",size:"sm",value:g.value||""}),(0,r.jsx)(i.J1D,{children:m.error})]}),n&&(0,r.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:s?"visible":"hidden",children:(0,r.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},41164:function(e,t,n){n.d(t,{Bw:function(){return s},D4:function(){return i},Dy:function(){return o},XD:function(){return u},cz:function(){return c},hE:function(){return l},oK:function(){return a}});var r=n(76649);let i=e=>"error"in e,a=e=>(0,r.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,r.Ln)({status:"number",data:{}},e),l=e=>(0,r.Ln)({detail:"string"},e),o=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,r.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,r.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>a(e,t),i=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>a(n,t[e]));class s{static narrow(e){return new s(t=>r(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof s?e.NF:e instanceof Function?e:t=>r(e,t);return new s(e=>t(e)&&n(e))}}new s(e=>!0)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7996],{96539:function(e,t,n){var i=n(77400).Symbol;e.exports=i},99736:function(e,t,n){var i=n(96539),o=n(34840),r=n(21258),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):r(e)}},39120:function(e,t,n){var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},34840:function(e,t,n){var i=n(96539),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var o=s.call(e);return i&&(t?e[a]=n:delete e[a]),o}},21258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},77400:function(e,t,n){var i=n(39120),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();e.exports=r},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},92360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},55193:function(e,t,n){var i=n(99736),o=n(92360);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==i(e)}},35682:function(e,t,n){"use strict";var i=n(24246),o=n(96013);t.Z=e=>{let{title:t,icon:n,type:r,...s}=e;return(0,i.jsx)(o.wpx,{size:"small",type:r,"data-testid":"action-".concat(t),icon:n,iconPosition:"start",...s,children:t})}},87573:function(e,t,n){"use strict";var i=n(24246),o=n(96013),r=n(2686);t.Z=()=>(0,i.jsxs)(o.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(o.xol,{children:(0,i.jsx)(o.UOT,{color:"gray.400"})}),(0,i.jsxs)(o.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(o.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(o.QHN,{bgColor:"gray.800"}),(0,i.jsx)(o.baG,{border:"none",children:(0,i.jsxs)(o.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.Rv,{})," Change detected"]}),(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.$P,{})," Data labeled"]}),(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.zj,{})," Monitoring"]}),(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.dK,{})," Addition detected"]}),(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.Kr,{})," Unmonitored"]}),(0,i.jsxs)(o.xuv,{children:[(0,i.jsx)(r.q1,{})," Removal detected"]})]})})]})]})},38637:function(e,t,n){"use strict";var i=n(86677),o=n(87162);t.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:n,filterTabIndex:i}=t;e.push({pathname:o.dS,query:{resourceUrn:n,filterTabIndex:i}})},navigateToDiscoveryResults:t=>{let{resourceUrn:n,filterTabIndex:i}=t;e.push({pathname:o.Sj,query:{resourceUrn:n,filterTabIndex:i}})}}}},64900:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var i=n(24246),o=n(96013),r=n(53359),s=n(46042);let a=(0,o.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"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,i.jsx)("g",{"clip-path":"url(#clip0_341_3102)",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_341_3102",children:(0,i.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),l=(0,o.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,i.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 c=n(35682),d=n(6111),u=n(59104),L=n(52962),f=e=>{let{resource:t,ignoreChildActions:n=!1}=e,f=(0,L.G)(t),[h,{isLoading:v}]=(0,d.v8)(),[_,{isLoading:g}]=(0,d.vi)(),{successAlert:x}=(0,r.V)(),[j,{isLoading:I}]=(0,d.Tl)(),p=v||g||I,{diff_status:E,child_diff_statuses:b}=t,m=f===u.X.SCHEMA,T=f===u.X.FIELD,A=m&&void 0===E||!T&&E===s.LL.ADDITION,O=E!==s.LL.MUTED,y=E===s.LL.MUTED&&!T,D=E===s.LL.MUTED&&T,S=b&&(b[s.LL.ADDITION]||b[s.LL.REMOVAL]),H=E===s.LL.MONITORED&&!n&&S;return(0,i.jsxs)(o.Ugi,{onClick:e=>e.stopPropagation(),children:[A&&(0,i.jsx)(c.Z,{title:"Monitor",icon:(0,i.jsx)(l,{}),onClick:async()=>{await h({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id}),x("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."))},disabled:p,loading:v}),D&&(0,i.jsx)(c.Z,{title:"Un-Mute",icon:(0,i.jsx)(l,{}),onClick:async()=>{await j({staged_resource_urn:t.urn}),x("The resource has been un-muted.","".concat(t.name||"The resource"," is now un-muted."))},disabled:p,loading:v}),y&&(0,i.jsx)(c.Z,{title:"Monitor",icon:(0,i.jsx)(l,{}),onClick:async()=>{await h({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0}),x("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."))},disabled:p,loading:v}),H&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(o.nQG,{}),onClick:async()=>{await h({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id}),x('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},disabled:p,loading:v}),O&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(a,{}),onClick:async()=>{await _({staged_resource_urn:t.urn}),x("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},disabled:p,loading:g})]})}},62448:function(e,t,n){"use strict";var i=n(24246),o=n(96013),r=n(2686),s=n(58525),a=n(90049),l=n(6170);t.Z=e=>{let{result:t,changeTypeOverride:n}=e,c=null!=n?n:(0,s.Z)(t);return(0,i.jsxs)(o.kCb,{alignItems:"center",height:"100%",children:[(0,i.jsx)(o.ua7,{label:c,children:(0,i.jsx)("span",{children:r.QL[c]})}),(0,i.jsx)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,l.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,a.Z)(t)})]})}},38575:function(e,t,n){"use strict";var i=n(24246),o=n(8540),r=n(51557),s=n(58525);let a={[r.E.MUTED]:{color:"marble",label:"Unmonitored"},[r.E.MONITORED]:{color:"success",label:"Monitoring"},[r.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,n,r,l,c;let{result:d,changeTypeOverride:u}=e;if(null===(t=d.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,i.jsx)(o.A4,{color:"success",value:"Reviewed"});let L=null!=u?u:(0,s.Z)(d);return(0,i.jsx)(o.A4,{color:null!==(l=null===(n=a[L])||void 0===n?void 0:n.color)&&void 0!==l?l:"warning",value:null!==(c=null===(r=a[L])||void 0===r?void 0:r.label)&&void 0!==c?c:"Pending review"})}},59104:function(e,t,n){"use strict";var i,o;n.d(t,{X:function(){return i}}),(o=i||(i={})).DATABASE="Database",o.SCHEMA="Schema",o.TABLE="Table",o.FIELD="Field",o.NONE="none"},15025:function(e,t){"use strict";t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},58525:function(e,t,n){"use strict";var i=n(51557),o=n(46042);t.Z=e=>e.diff_status===o.LL.ADDITION?i.E.ADDITION:e.diff_status===o.LL.REMOVAL?i.E.REMOVAL:e.diff_status===o.LL.CLASSIFYING||e.diff_status===o.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===o.LL.CLASSIFICATION_ADDITION||e.diff_status===o.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[o.LL.CLASSIFYING]||e.child_diff_statuses[o.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[o.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[o.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[o.LL.ADDITION]||e.child_diff_statuses[o.LL.REMOVAL]?i.E.CHANGE:e.diff_status===o.LL.MONITORED?i.E.MONITORED:e.diff_status===o.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},52962:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var i=n(59104);let o=e=>{var t,n,o;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?i.X.DATABASE:(null===(n=e.tables)||void 0===n?void 0:n.length)?i.X.SCHEMA:(null===(o=e.fields)||void 0===o?void 0:o.length)?i.X.TABLE:i.X.FIELD:i.X.NONE}},90049:function(e,t){"use strict";t.Z=e=>{let{name:t,urn:n,monitor_config_id:i,database_name:o,schema_name:r,table_name:s,top_level_field_name:a,top_level_field_urn:l}=e;if(!a)return t;let c=n.split(".");return l?n.replace("".concat(l).concat("."),""):([i,o,r,s,a].forEach(e=>{if(e){let t=c.indexOf(e);t>-1&&c.splice(t,1)}}),c.join("."))}},71329:function(e,t){"use strict";t.Z=e=>e.urn},2053:function(e,t){"use strict";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}},6170:function(e,t,n){"use strict";var i=n(59104),o=n(52962),r=n(2053);t.Z=e=>(0,o.G)(e)!==i.X.FIELD||(0,r.Z)(e)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8001],{36848:function(e,s,t){t.d(s,{q:function(){return l}});var i=t(24246),a=t(96013);let l=e=>{let{label:s,isDisabled:t,...l}=e;return(0,i.jsx)(a.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:l.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,i.jsxs)(a.mQc,{colorScheme:"complimentary",...r,children:[(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,i.jsx)(l,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,i.jsx)(a.nPR,{children:s.map(e=>(0,i.jsx)(a.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},11574:function(e,s,t){var i=t(24246),a=t(96013),l=t(36848);s.Z=e=>{let{data:s,border:t="partial",borderWidth:r=2,...n}=e;return(0,i.jsx)(a.mQc,{colorScheme:"complimentary",...n,children:(0,i.jsx)(a.tdY,{width:"partial"===t?"max-content":void 0,borderBottomWidth:r,children:s.map(e=>(0,i.jsx)(l.q,{label:e.label,"data-testid":e.label,isDisabled:e.isDisabled,fontSize:n.fontSize},e.label))})})}},35682:function(e,s,t){var i=t(24246),a=t(96013);s.Z=e=>{let{title:s,icon:t,type:l,...r}=e;return(0,i.jsx)(a.wpx,{size:"small",type:l,"data-testid":"action-".concat(s),icon:t,iconPosition:"start",...r,children:s})}},76552:function(e,s,t){var i=t(24246),a=t(11574);s.Z=e=>{let{filterTabs:s,onChange:t,filterTabIndex:l}=e;return(0,i.jsx)(a.Z,{border:"full-width",mb:5,size:"sm",data:s,borderWidth:1,index:l,onChange:t})}},8339:function(e,s,t){t.d(s,{Y:function(){return r}});var i=t(24246),a=t(96013),l=t(53614);let r=[(0,i.jsx)(a.PJP.S9g,{},"layers"),(0,i.jsx)(a.PJP.ehp,{},"dataset"),(0,i.jsx)(a.PJP.iA_,{},"table"),(0,i.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:t,onPathClick:a=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:t});let e=s.split(".");e.forEach((s,t)=>{0!==t&&n.push({title:s,icon:r[t-1],onClick:s=>{s.preventDefault(),a(e.slice(0,t+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},87573:function(e,s,t){var i=t(24246),a=t(96013),l=t(2686);s.Z=()=>(0,i.jsxs)(a.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(a.xol,{children:(0,i.jsx)(a.UOT,{color:"gray.400"})}),(0,i.jsxs)(a.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(a.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(a.QHN,{bgColor:"gray.800"}),(0,i.jsx)(a.baG,{border:"none",children:(0,i.jsxs)(a.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Rv,{})," Change detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.$P,{})," Data labeled"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.zj,{})," Monitoring"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.dK,{})," Addition detected"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.Kr,{})," Unmonitored"]}),(0,i.jsxs)(a.xuv,{children:[(0,i.jsx)(l.q1,{})," Removal detected"]})]})})]})]})},38637:function(e,s,t){var i=t(86677),a=t(87162);s.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.dS,query:{resourceUrn:t,filterTabIndex:i}})},navigateToDiscoveryResults:s=>{let{resourceUrn:t,filterTabIndex:i}=s;e.push({pathname:a.Sj,query:{resourceUrn:t,filterTabIndex:i}})}}}},21917:function(e,s,t){t.d(s,{Z:function(){return P}});var i,a,l=t(24246),r=t(59003),n=t(92222),o=t(96013),d=t(86677),c=t(27378),u=t(8540),x=t(76552),g=t(6111),h=t(98320),j=t(61934),f=t(38575),I=t(51557),m=t(59104),v=t(15025),L=t(46042),p=t(33890),C=t(52810),S=t(62448),_=e=>{let{resourceType:s}=e,t=(0,n.Cl)();return s===m.X.SCHEMA?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(S.Z,{result:e.row.original,changeTypeOverride:I.E.CLASSIFICATION}),header:e=>(0,l.jsx)(u.Rr,{value:"Name",...e})}),t.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(u.G3,{value:(0,v.Z)(e.getValue())}),header:e=>(0,l.jsx)(u.Rr,{value:"Project",...e})}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"System",...e})}),t.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Detected by",...e})}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"action",cell:e=>e.row.original.diff_status!==L.LL.MUTED?(0,l.jsx)(p.Z,{resource:e.row.original}):(0,l.jsx)(u.G3,{value:"--"}),header:"Actions",meta:{width:"auto"}})]}:s===m.X.TABLE?{columns:[t.display({id:"select",cell:e=>{var s;let{row:t}=e;return(0,l.jsx)(h.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=t.original.name)&&void 0!==s?s:t.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(h.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),t.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(S.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Table name",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Table"}),header:"Type"}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:"Time"}),t.display({id:"actions",cell:e=>(0,l.jsx)(p.Z,{resource:e.row.original}),header:"Actions",meta:{width:"auto"}})]}:s===m.X.FIELD?{columns:[t.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(S.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Field name",...e})}),t.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(j.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"Data type",...e})}),t.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(u.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(u.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),t.display({id:"status",cell:e=>(0,l.jsx)(f.Z,{result:e.row.original}),header:e=>(0,l.jsx)(u.Rr,{value:"Status",...e})}),t.display({id:"type",cell:()=>(0,l.jsx)(u.G3,{value:"Field"}),header:"Type"}),t.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(C.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),t.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(u.Rr,{value:"When",...e})}),t.display({id:"actions",cell:e=>(0,l.jsx)(p.Z,{resource:e.row.original}),header:"Actions",meta:{width:"auto"}})]}:{columns:[]}};(i=a||(a={}))[i.ACTION_REQUIRED=0]="ACTION_REQUIRED",i[i.UNMONITORED=1]="UNMONITORED";var b=e=>{let{initialFilterTabIndex:s=0}=e,[t,i]=(0,c.useState)(s),a=(0,c.useMemo)(()=>[{label:"Action Required",filters:[L.LL.CLASSIFICATION_ADDITION,L.LL.CLASSIFICATION_UPDATE],childFilters:[L.LL.CLASSIFICATION_ADDITION,L.LL.CLASSIFICATION_UPDATE]},{label:"In progress",filters:[L.LL.CLASSIFYING,L.LL.CLASSIFICATION_QUEUED],childFilters:[L.LL.CLASSIFYING,L.LL.CLASSIFICATION_QUEUED]},{label:"Unmonitored",filters:[L.LL.MUTED],childFilters:[]}],[]);return{filterTabs:a,filterTabIndex:t,setFilterTabIndex:i,activeDiffFilters:a[t].filters,activeChildDiffFilters:a[t].childFilters}},A=t(38637),y=t(87573),T=t(35682),E=e=>{let{resourceUrn:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(T.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(T.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},N=e=>{let{selectedUrns:s}=e,[t,{isLoading:i}]=(0,g.Hf)(),[a,{isLoading:r}]=(0,g.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(T.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(T.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},D=t(52962),R=t(71329),w=t(2053),O=t(22770);let Z={items:[],total:0,page:1,size:50,pages:1},F=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var P=e=>{var s,t;let{resourceUrn:i}=e,h=(0,d.useRouter)(),[j,f]=(0,c.useState)(""),{filterTabs:I,setFilterTabIndex:v,filterTabIndex:L,activeDiffFilters:p,activeChildDiffFilters:C}=b({initialFilterTabIndex:(null===(s=h.query)||void 0===s?void 0:s.filterTabIndex)?Number(null===(t=h.query)||void 0===t?void 0:t.filterTabIndex):void 0}),[S,T]=(0,c.useState)({}),{PAGE_SIZES:P,pageSize:U,setPageSize:k,onPreviousPageClick:z,isPreviousPageDisabled:M,onNextPageClick:G,isNextPageDisabled:q,startRange:V,endRange:Q,pageIndex:W,setTotalPages:H,resetPageIndexToDefault:Y}=(0,u.oi)();(0,c.useEffect)(()=>{Y()},[i,j,Y,p,C]);let{isFetching:X,isLoading:J,data:K}=(0,g.z8)({staged_resource_urn:i,page:W,size:U,child_diff_status:C,diff_status:p,search:j}),B=(0,D.G)(null==K?void 0:K.items[0]),{items:$,total:ee,pages:es}=(0,c.useMemo)(()=>null!=K?K:Z,[K]);(0,c.useEffect)(()=>{H(es)},[es,H]);let{columns:et}=_({resourceType:B}),ei=(0,c.useMemo)(()=>et,[et]),{navigateToDiscoveryResults:ea}=(0,A.Z)(),el=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:ei,manualPagination:!0,onRowSelectionChange:T,state:{rowSelection:S},getRowId:R.Z,data:$,columnResizeMode:"onChange"}),er=Object.keys(S).filter(e=>S[e]);return J?(0,l.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.Z,{filterTabs:I,filterTabIndex:L,onChange:v}),(0,l.jsxs)(u.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(O.M,{value:j,onChange:f})}),(0,l.jsx)(y.Z,{})]}),B===m.X.TABLE&&!!er.length&&(0,l.jsx)(N,{selectedUrns:er}),B===m.X.FIELD&&L!==a.UNMONITORED&&(0,l.jsx)(E,{resourceUrn:i})]}),(0,l.jsx)(u.ZK,{tableInstance:el,onRowClick:e=>ea({resourceUrn:e.urn,filterTabIndex:L}),getRowIsClickable:e=>B!==m.X.FIELD||(0,w.Z)(e),emptyTableNotice:(0,l.jsx)(F,{})}),(0,l.jsx)(u.s8,{totalRows:ee||0,pageSizes:P,setPageSize:k,onPreviousPageClick:z,isPreviousPageDisabled:M||X,onNextPageClick:G,isNextPageDisabled:q||X,startRange:V,endRange:Q})]})}},33890:function(e,s,t){var i=t(24246),a=t(96013),l=t(53359),r=t(90049),n=t(46042),o=t(35682),d=t(6111);s.Z=e=>{let{resource:s}=e,[t,{isLoading:c}]=(0,d.v8)(),[u,{isLoading:x}]=(0,d.cM)(),[g,{isLoading:h}]=(0,d.vi)(),j=x||h||c,{diff_status:f,child_diff_statuses:I,top_level_field_name:m}=s,{successAlert:v}=(0,l.V)(),L=f===n.LL.CLASSIFICATION_ADDITION||f===n.LL.CLASSIFICATION_UPDATE,p=I&&(I[n.LL.CLASSIFICATION_ADDITION]||I[n.LL.CLASSIFICATION_UPDATE]),C=(L||p)&&!m,S=L||p,_=C&&S,b=async()=>{await u({staged_resource_urn:s.urn}),v('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},A=async()=>{await g({staged_resource_urn:s.urn}),v("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},y=async()=>{await t({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0}),v("Reclassification of ".concat((0,r.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(a.Ugi,{onClick:e=>e.stopPropagation(),gap:2,children:[C&&(0,i.jsx)(o.Z,{title:"Confirm",icon:(0,i.jsx)(a.nQG,{}),onClick:b,disabled:j,loading:x}),S&&(0,i.jsx)(o.Z,{title:"Ignore",icon:(0,i.jsx)(a.tpL,{}),onClick:A,disabled:j,loading:h}),!_&&(0,i.jsx)(o.Z,{title:"Reclassify",icon:(0,i.jsx)(a.nyI,{}),onClick:y,disabled:j,loading:c}),(0,i.jsx)(a.LZC,{}),_&&(0,i.jsxs)(a.v2r,{children:[(0,i.jsx)(a.j2t,{as:a.wpx,size:"small",type:"text",icon:(0,i.jsx)(a.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(a.qyq,{children:(0,i.jsx)(a.sNh,{onClick:y,icon:(0,i.jsx)(a.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})}},61934:function(e,s,t){var i=t(24246),a=t(96013);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(a.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(a.j8w,{children:s})})}},62448:function(e,s,t){var i=t(24246),a=t(96013),l=t(2686),r=t(58525),n=t(90049),o=t(6170);s.Z=e=>{let{result:s,changeTypeOverride:t}=e,d=null!=t?t:(0,r.Z)(s);return(0,i.jsxs)(a.kCb,{alignItems:"center",height:"100%",children:[(0,i.jsx)(a.ua7,{label:d,children:(0,i.jsx)("span",{children:l.QL[d]})}),(0,i.jsx)(a.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,o.Z)(s)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,n.Z)(s)})]})}},38575:function(e,s,t){var i=t(24246),a=t(8540),l=t(51557),r=t(58525);let n={[l.E.MUTED]:{color:"marble",label:"Unmonitored"},[l.E.MONITORED]:{color:"success",label:"Monitoring"},[l.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};s.Z=e=>{var s,t,l,o,d;let{result:c,changeTypeOverride:u}=e;if(null===(s=c.user_assigned_data_categories)||void 0===s?void 0:s.length)return(0,i.jsx)(a.A4,{color:"success",value:"Reviewed"});let x=null!=u?u:(0,r.Z)(c);return(0,i.jsx)(a.A4,{color:null!==(o=null===(t=n[x])||void 0===t?void 0:t.color)&&void 0!==o?o:"warning",value:null!==(d=null===(l=n[x])||void 0===l?void 0:l.label)&&void 0!==d?d:"Pending review"})}},15025:function(e,s){s.Z=e=>{let s=e.split(".");return s.length>1?s[1]:""}},58525:function(e,s,t){var i=t(51557),a=t(46042);s.Z=e=>e.diff_status===a.LL.ADDITION?i.E.ADDITION:e.diff_status===a.LL.REMOVAL?i.E.REMOVAL:e.diff_status===a.LL.CLASSIFYING||e.diff_status===a.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===a.LL.CLASSIFICATION_ADDITION||e.diff_status===a.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[a.LL.CLASSIFYING]||e.child_diff_statuses[a.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[a.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[a.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[a.LL.ADDITION]||e.child_diff_statuses[a.LL.REMOVAL]?i.E.CHANGE:e.diff_status===a.LL.MONITORED?i.E.MONITORED:e.diff_status===a.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},71329:function(e,s){s.Z=e=>e.urn}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9822],{53359:function(e,i,t){t.d(i,{H:function(){return r},V:function(){return n.V}});var n=t(75139),s=t(60136);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:i=>{let t="An unexpected error occurred. Please try again.";(0,s.Ot)(i)?t=i.data.detail:(0,s.tB)(i)&&(t=i.data.detail[0].msg),e(t)}}}},75139:function(e,i,t){t.d(i,{V:function(){return r}});var n=t(24246),s=t(96013);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(i,t,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[t&&(0,n.jsx)(s.CdC,{children:t}),(0,n.jsx)(s.XaZ,{children:i})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(i,t,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[t&&(0,n.jsx)(s.CdC,{children:t}),(0,n.jsx)(s.XaZ,{children:i})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},50558:function(e,i,t){var n=t(24246),s=t(96013);t(27378),i.Z=e=>{let{isEmptyState:i,yamlError:t}=e;return(0,n.jsx)(s.Rg9,{in:!0,children:(0,n.jsxs)(s.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),i&&(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),t&&(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.message}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:t.reason}),(0,n.jsxs)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:t.mark.line}),", Col"," ",(0,n.jsx)("b",{children:t.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:t.mark.position})]})]})]})})]})})}},12719:function(e,i,t){t.d(i,{F:function(){return a},M:function(){return r}});var n=t(76649),s=t(65218);let r=t.n(s)()(()=>t.e(7088).then(t.bind(t,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},73025:function(e,i,t){var n=t(24246);t(27378);var s=t(43124);i.Z=e=>{let{children:i}=e;return(0,n.jsx)(s.Z,{title:"Connections",children:i})}},59201:function(e,i,t){t.d(i,{s:function(){return W}});var n=t(24246),s=t(69728),r=t(96013),a=t(86677),l=t(27378),o=t(44296),d=t(87162),c=t(46042),u=t(53359),h=t(75139),x=t(7564),p=t(45007),m=t(34090);let f=(e,i)=>{let t={...e};return Object.entries(i.properties).forEach(i=>{let[n,s]=i;if("integer"===s.type){let i=s.default?Number(s.default):e[n];t[n]=i||0}else{var r;let i=null!==(r=s.default)&&void 0!==r?r:e[n];t[n]=null!=i?i:null}}),t},g="#/definitions/FidesDatasetReference";var j=e=>{let{data:i,defaultValues:t,isSubmitting:a=!1,onSaveClick:d,onTestConnectionClick:h,testButtonLabel:p="Test integration"}=e,j=(0,l.useRef)(!1),{handleError:y}=(0,u.H)(),{connection:v,connectionOption:b}=(0,o.C)(s.ZZ),[k,C]=(0,x.h2)(),_=e=>{let i;return(void 0===e||""===e)&&(i="Connection Identifier is required"),e&&(0,r.kEn)(e)&&(i="Connection Identifier must be an alphanumeric value"),i},S=(e,i,t)=>{let n;return(void 0===i||""===i)&&(n="".concat(e," is required")),t===g&&(i.includes(".")?i.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},w=(e,i)=>(0,n.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:i}),I=e=>{var i;if((null===(i=e.allOf)||void 0===i?void 0:i[0].$ref)===g)return"Enter dataset.collection.field"},z=(e,t)=>{var s;return(0,n.jsx)(m.gN,{id:e,name:e,validate:(null!==(s=i.required)&&void 0!==s&&!!s.includes(e)||"integer"===t.type)&&(e=>{var i;return S(t.title,e,null===(i=t.allOf)||void 0===i?void 0:i[0].$ref)}),children:s=>{var a;let{field:l,form:o}=s;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:null===(a=i.required)||void 0===a?void 0:a.includes(e),isInvalid:o.errors[e]&&o.touched[e],children:[w(e,t.title),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:["integer"!==t.type&&(0,n.jsx)(r.IIB,{...l,value:l.value||"",placeholder:I(t),autoComplete:"off",color:"gray.700",size:"sm"}),"integer"===t.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.ua7,{"aria-label":t.description,hasArrow:!0,label:t.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(r.kCb,{alignItems:"center",h:"32px",visibility:t.description?"visible":"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},e)},R=async()=>{try{await k(v.key).unwrap()}catch(e){y(e)}};return(0,l.useEffect)(()=>(j.current=!0,C.isSuccess&&h(C),()=>{j.current=!1}),[h,C]),(0,n.jsx)(m.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==v?void 0:v.key){var n,s;e.name=null!==(s=v.name)&&void 0!==s?s:"",e.description=v.description,e.instance_key=v.connection_type===c.Rj.SAAS?null===(n=v.saas_config)||void 0===n?void 0:n.fides_key:v.key}return f(e,i)})(),onSubmit:(e,t)=>{let n={...e};Object.keys(i.properties).forEach(t=>{var s;if((null===(s=i.properties[t].allOf)||void 0===s?void 0:s[0].$ref)===g){let i=e[t].split(".");n[t]={dataset:i.shift(),field:i.join("."),direction:"from"}}}),d(n,t)},validateOnBlur:!1,validateOnChange:!1,children:e=>(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(m.gN,{id:"name",name:"name",validate:e=>S("Name",e),children:i=>{let{field:t}=i;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.name&&e.touched.name,children:[w("name","Name"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.IIB,{...t,autoComplete:"off",autoFocus:!0,color:"gray.700",placeholder:"Enter a friendly name for your new ".concat(b.human_readable," connection"),size:"sm","data-testid":"input-name"}),(0,n.jsx)(r.J1D,{children:e.errors.name})]}),(0,n.jsx)(r.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"description",name:"description",children:e=>{let{field:i}=e;return(0,n.jsxs)(r.NIc,{display:"flex",children:[w("description","Description"),(0,n.jsx)(r.gxH,{...i,color:"gray.700",placeholder:"Enter a description for your new ".concat(b.human_readable," connection"),resize:"none",size:"sm",value:i.value||""}),(0,n.jsx)(r.kCb,{alignItems:"center",h:"32px",visibility:"hidden",children:(0,n.jsx)(r.ITP,{marginLeft:"8px"})})]})}}),(0,n.jsx)(m.gN,{id:"instance_key",name:"instance_key",validate:_,children:i=>{let{field:t}=i;return(0,n.jsxs)(r.NIc,{display:"flex",isRequired:!0,isInvalid:e.errors.instance_key&&e.touched.instance_key,children:[w("instance_key","Connection Identifier"),(0,n.jsxs)(r.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(r.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==v?void 0:v.key),placeholder:"A unique identifier for your new ".concat(b.human_readable," connection"),size:"sm"}),(0,n.jsx)(r.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(r.ua7,{"aria-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.",hasArrow:!0,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.",placement:"right-start",openDelay:500,children:(0,n.jsx)(r.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(r.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),Object.entries(i.properties).map(e=>{let[i,t]=e;return"advanced_settings"===i?null:z(i,t)}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(r.wpx,{disabled:!(null==v?void 0:v.key),loading:C.isLoading||C.isFetching,onClick:R,"data-testid":"test-connection-button",children:p}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:a,loading:a,children:"Save"})]})]})})})},y=t(99377);let v=e=>{let{onConnectionCreated:i,data:t}=e,r=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:j,connectionOption:v}=(0,o.C)(s.ZZ),[b]=(0,x.pH)(),[k]=(0,x.Du)();return{isSubmitting:f,handleSubmit:async e=>{try{var l;g(!0);let o={access:c.uv.WRITE,connection_type:null==v?void 0:v.identifier,description:e.description,disabled:!1,key:(0,y.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)a(u.failed[0].message);else{let l={connection_key:u.succeeded[0].key,secrets:{}};Object.entries(t.properties).forEach(i=>{l.secrets[i[0]]=e[i[0]]});let o=await k(l).unwrap();"failed"===o.test_status?a((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,s.lm)(u.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!i||i())}}catch(e){m(e)}finally{g(!1)}},connectionOption:v}},b=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:s}=e,{isSubmitting:a,handleSubmit:l,connectionOption:o}=v({onConnectionCreated:t,data:i});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:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:a,onSaveClick:l,onTestConnectionClick:s})]})},k={description:"",instance_key:"",name:""},C=e=>{let{data:i,onConnectionCreated:t,onTestEmail:s}=e,{connectionOption:a,isSubmitting:l,handleSubmit:o}=v({onConnectionCreated:t,data:i});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xuv,{color:"gray.700",fontSize:"14px",h:"80px",children:["Configure your ",a.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:i,defaultValues:k,isSubmitting:l,onSaveClick:e=>{o(e)},onTestConnectionClick:s,testButtonLabel:"Test email"})]})};var _=t(59389),S=t(9699),w=t(47418),I=e=>{let{defaultValues:i,isSubmitting:t=!1,onSaveClick:l}=e,c=(0,a.useRouter)(),{connection:u,connectionOption:h}=(0,o.C)(s.ZZ);return(0,n.jsx)(m.J9,{initialValues:(()=>{if(null==u?void 0:u.key){var e;i.name=null!==(e=u.name)&&void 0!==e?e:"",i.description=u.description}return i})(),onSubmit:(e,i)=>{l(e,i)},validateOnBlur:!1,validateOnChange:!1,validationSchema:_.Ry().shape({name:_.Z_().required("Name is required")}),children:(0,n.jsx)(m.l0,{noValidate:!0,children:(0,n.jsxs)(r.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(S.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)(S.Z,{label:"Description",name:"description",placeholder:"Enter a description for your new ".concat(h.human_readable," connection"),type:"textarea"}),(0,n.jsx)(w.h,{isSubmitting:t,onCancelClick:()=>{c.push(d.JR)}})]})})})};let z=e=>{let{onConnectionCreated:i}=e,t=(0,p.I0)(),{errorAlert:a,successAlert:d}=(0,h.V)(),{handleError:m}=(0,u.H)(),[f,g]=(0,l.useState)(!1),{connection:j,connectionOption:y}=(0,o.C)(s.ZZ),[v]=(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==j?void 0:j.key},l=await v(n).unwrap();(null===(r=l.failed)||void 0===r?void 0:r.length)>0?a(l.failed[0].message):(t((0,s.lm)(l.succeeded[0])),d("Connector successfully ".concat((null==j?void 0:j.key)?"updated":"added","!")),(null==j?void 0:j.key)||!i||i())}catch(e){m(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)(I,{defaultValues:{description:"",name:""},isSubmitting:f,onSaveClick:b})]})},R=e=>{let{data:i,onConnectionCreated:t,onTestConnectionClick:a}=e,d=(0,p.I0)(),{errorAlert:m,successAlert:f}=(0,h.V)(),{handleError:g}=(0,u.H)(),[v,b]=(0,l.useState)(!1),{connection:k,connectionOption:C}=(0,o.C)(s.ZZ),[_]=(0,x.pL)(),[S]=(0,x.pH)(),[w]=(0,x.Du)(),I=async(e,r)=>{try{if(b(!0),k){var a;let t={access:c.uv.WRITE,connection_type:k.connection_type,description:e.description,disabled:!1,key:k.key,name:e.name},r=await S(t).unwrap();if((null===(a=r.failed)||void 0===a?void 0:a.length)>0)m(r.failed[0].message);else{d((0,s.lm)(r.succeeded[0]));let t={connection_key:k.key,secrets:{}};Object.entries(i.properties).forEach(i=>{t.secrets[i[0]]=e[i[0]]});let a=await w(t).unwrap();"failed"===a.test_status?m((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:"Message:"})," ",a.msg,(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Failure Reason:"})," ",a.failure_reason]})):f("Connector successfully updated!")}}else{let n={description:e.description,name:e.name,instance_key:(0,y.E)(e.instance_key),saas_connector_type:C.identifier,secrets:{}};Object.entries(i.properties).forEach(i=>{n.secrets[i[0]]=e[i[0]]});let r=await _(n).unwrap();d((0,s.lm)(r.connection)),f("Connector successfully added!"),null==t||t()}}catch(e){g(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 ",C.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:i,defaultValues:{description:"",instance_key:"",name:""},isSubmitting:v,onSaveClick:I,onTestConnectionClick:a})]})};var Z=t(36768);let T=e=>{var i,t;let{response:a}=e,{connectionOption:l}=(0,o.C)(s.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===(i=a.data)||void 0===i?void 0:i.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)(a.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:a.data.msg})]})]})})]}),(null===(t=a.data)||void 0===t?void 0:t.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)(a.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:a.data.failure_reason}),(0,n.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:a.data.msg})]})]})})]})]})]})},W=e=>{let{onConnectionCreated:i}=e,t=(0,a.useRouter)(),{connectionOption:u}=(0,o.C)(s.ZZ),h=u&&u.type===c.Zi.MANUAL,{data:x,isFetching:p,isLoading:m,isSuccess:f}=(0,s.n3)(u.identifier,{skip:h}),[g,j]=(0,l.useState)(),y=e=>{j(e)},v=(0,l.useCallback)(()=>{t.push(d.JR)},[t]),k=(0,l.useCallback)(()=>{switch(null==u?void 0:u.type){case c.Zi.DATABASE:if(f&&x)return(0,n.jsx)(b,{data:x,onConnectionCreated:i,onTestConnectionClick:y});break;case c.Zi.MANUAL:return(0,n.jsx)(z,{onConnectionCreated:i});case c.Zi.SAAS:if(f&&x)return(0,n.jsx)(R,{data:x,onConnectionCreated:i,onTestConnectionClick:y});break;case c.Zi.EMAIL:if(f&&x)return(0,n.jsx)(C,{data:x,onConnectionCreated:v,onTestEmail:y})}},[null==u?void 0:u.type,x,f,i,v]);return(0,n.jsxs)(r.kCb,{gap:"97px",children:[(0,n.jsxs)(r.gCW,{w:"579px",gap:"16px",align:"stretch",children:[(p||m)&&(0,n.jsx)(r.M5Y,{children:(0,n.jsx)(r.$jN,{})}),k()]}),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)(T,{response:g})})]})]})}},4894:function(e,i,t){t.d(i,{Z:function(){return v}});var n=t(24246),s=t(53359),r=t(69728),a=t(7564),l=t(96013),o=t(86677),d=t(27378),c=t(44296),u=t(60136),h=t(87162),x=t(52987),p=t(75139),m=t(66527),f=t(12719),g=t(50558),j=e=>{let{data:i=[],isSubmitting:t=!1,onSubmit:s,onCancel:r,disabled:a}=e,o=(0,d.useRef)(null),{errorAlert:c}=(0,p.V)(),u=i.length>0?m.ZP.dump(i):void 0,[h,j]=(0,d.useState)(void 0),[y,v]=(0,d.useState)(!1),[b,k]=(0,d.useState)(!u),C=(0,l.qY0)(),{data:_}=(0,x.NR)(),[S,w]=(0,d.useState)([]),I=e=>{m.ZP.load(e,{json:!0}),j(void 0)},z=()=>{let e=o.current.getValue();s(m.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{v(!0),I(e),k(!!(!e||""===e.trim()))}catch(e){(0,f.F)(e)?j(e):c("Could not parse the supplied YAML")}},onMount:(e,i)=>{o.current=e,o.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0},readOnly:a},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:a||b||!!h||t,loading:t,onClick:()=>{if(_&&_.length){let e=o.current.getValue(),i=_.filter(i=>e.includes("fides_key: ".concat(i.fides_key,"\n"))).map(e=>e.fides_key);if(w(i),i.length){C.onOpen();return}}z()},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:C.isOpen,onClose:C.onClose,onConfirm:()=>{z(),C.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,i)=>{let t=i===S.length-1;return(0,n.jsxs)(d.Fragment,{children:[(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:e}),t?".":", "]},e)})]}),(0,n.jsx)(l.xvT,{children:"Are you sure you would like to continue?"})]})})]})};let y=e=>{let{children:i,...t}=e;return(0,n.jsx)(l.xvT,{color:"gray.700",fontSize:"14px",...t,children:i})};var v=()=>{let e=(0,o.useRouter)(),{errorAlert:i,successAlert:t}=(0,s.V)(),{handleError:p}=(0,s.H)(),[m,f]=(0,d.useState)(!1),{connection:g}=(0,c.C)(r.ZZ),{data:v,isFetching:b,isLoading:k,isSuccess:C}=(0,a.Eg)(g.key),[_]=(0,a.Lz)(),[S]=(0,x.EG)(),{data:w,isLoading:I,error:z}=(0,x.NR)(),[R,Z]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v&&v.items.length&&Z(v.items[0].ctl_dataset.fides_key)},[v]);let T=async n=>{var s;let r={connection_key:null==g?void 0:g.key,dataset_pairs:n},a=await _(r).unwrap();(null===(s=a.failed)||void 0===s?void 0:s.length)>0?i(a.failed[0].message):t("Dataset successfully updated!"),e.push(h.JR)},W=async()=>{if(R)try{let e=R;v&&v.items.length&&(e=v.items[0].fides_key);let i=[{fides_key:e,ctl_dataset_fides_key:R}];T(i)}catch(e){p(e)}},E=async e=>{try{f(!0);let t=Array.isArray(e)?e:[e],n=await S(t);if("error"in n){let e=(0,u.e$)(n.error);i(e);return}let s=t.map(e=>({fides_key:e.fides_key,ctl_dataset_fides_key:e.fides_key}));if(v&&v.items.length){let{items:e}=v;s=e.map((e,i)=>({fides_key:e.fides_key,ctl_dataset_fides_key:t[i].fides_key}))}T(s)}catch(e){p(e)}finally{f(!1)}},q=""!==R&&void 0!==R;if(b||k||I&&!z)return(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})});let F=w&&w.length;return(0,n.jsxs)(l.gCW,{alignItems:"left",gap:4,children:[z&&(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:[F&&(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=>Z(e),value:R,"data-testid":"dataset-selector"}),(0,n.jsx)(l.wpx,{onClick:W,type:"primary",className:"self-start",disabled:!q,"data-testid":"save-dataset-link-btn",children:"Save"})]})]})})}),F&&C&&(null==v?void 0:v.items)&&(0,n.jsx)(l.htM,{plain:!0,children:"or"}),C&&(null==v?void 0:v.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)(j,{data:v.items.map(e=>e.ctl_dataset),isSubmitting:m,onSubmit:E,disabled:q})]})]})]})}},47418:function(e,i,t){t.d(i,{h:function(){return r}});var n=t(24246),s=t(96013);t(27378);let r=e=>{let{isSubmitting:i=!1,onCancelClick:t}=e;return(0,n.jsxs)(s.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(s.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(s.zxk,{bg:"primary.800",color:"white",isDisabled:i,isLoading:i,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})}},89468:function(e,i,t){t.d(i,{Z:function(){return v}});var n=t(24246),s=t(53359),r=t(69728),a=t(7564),l=t(96013),o=t(86677),d=t(27378),c=t(44296),u=t(87162),h=t(34090),x=t(59389),p=t(78973),m=t(47411),f=t(35249),g=t(9699),j=t(47418),y=e=>{let{data:i=[],isSubmitting:t=!1,onSaveClick:r}=e,{isLoading:a}=(0,m.MO)(),d=(0,c.C)(f.qb),y=(0,o.useRouter)(),{errorAlert:v}=(0,s.V)(),b=()=>{y.push(u.JR)};return a?null:(0,n.jsx)(h.J9,{enableReinitialize:!0,initialValues:{fields:i.length>0?i:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,i)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){v("PII Field must be unique");return}r(e,i)},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:i=>{let{fields:s}=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:s&&s.length>0?s.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>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===t,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(g.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(p.d,{name:"fields.".concat(t,".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:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>i.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{i.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(j.h,{isSubmitting:t,onCancelClick:b})]})}})})})})},v=()=>{let e=(0,d.useRef)(!1),i=(0,o.useRouter)(),{successAlert:t}=(0,s.V)(),{handleError:h}=(0,s.H)(),[x,p]=(0,d.useState)(!1),[m,f]=(0,d.useState)([]),{connection:g}=(0,c.C)(r.ZZ),{data:j,isFetching:v,isLoading:b,isSuccess:k}=(0,a.QV)(g.key),[C]=(0,a.jF)(),[_]=(0,a._d)(),S=async(e,n)=>{try{p(!0);let n={connection_key:null==g?void 0:g.key,body:{...e}};m.length>0?await _(n).unwrap():await C(n).unwrap(),t("DSR customization ".concat(m.length>0?"updated":"added","!")),i.push(u.JR)}catch(e){h(e)}finally{p(!1)}};return(0,d.useEffect)(()=>(e.current=!0,k&&j&&f(j.fields),()=>{e.current=!1}),[j,k]),(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."}),(v||b)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),e.current&&!b?(0,n.jsx)(y,{data:m,isSubmitting:x,onSaveClick:S}):null]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4154],{58095:function(e,t,n){var s=n(8817);e.exports=function(e,t){return!!(null==e?0:e.length)&&s(e,t,0)>-1}},21796:function(e){e.exports=function(e,t,n){for(var s=-1,i=null==e?0:e.length;++s<i;)if(n(t,e[s]))return!0;return!1}},95372:function(e){e.exports=function(e,t,n,s){for(var i=e.length,a=n+(s?1:-1);s?a--:++a<i;)if(t(e[a],a,e))return a;return -1}},8817:function(e,t,n){var s=n(95372),i=n(1129),a=n(58263);e.exports=function(e,t,n){return t==t?a(e,t,n):s(e,i,n)}},1129:function(e){e.exports=function(e){return e!=e}},74833:function(e,t,n){var s=n(56127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(i,""):e}},92198:function(e,t,n){var s=n(52485),i=n(58095),a=n(21796),r=n(65581),o=n(47111),l=n(43735);e.exports=function(e,t,n){var d=-1,c=i,u=e.length,m=!0,h=[],v=h;if(n)m=!1,c=a;else if(u>=200){var g=t?null:o(e);if(g)return l(g);m=!1,c=r,v=new s}else v=t?[]:h;e:for(;++d<u;){var p=e[d],f=t?t(p):p;if(p=n||0!==p?p:0,m&&f==f){for(var x=v.length;x--;)if(v[x]===f)continue e;t&&v.push(f),h.push(p)}else c(v,f,n)||(v!==h&&v.push(f),h.push(p))}return h}},56632:function(e,t,n){var s=n(89278),i=n(80068),a=n(50098);e.exports=function(e){return function(t,n,r){var o=Object(t);if(!i(t)){var l=s(n,3);t=a(t),n=function(e){return l(o[e],e,o)}}var d=e(t,n,r);return d>-1?o[l?t[d]:d]:void 0}}},47111:function(e,t,n){var s=n(46151),i=n(50344),a=n(43735),r=s&&1/a(new s([,-0]))[1]==1/0?function(e){return new s(e)}:i;e.exports=r},58263:function(e){e.exports=function(e,t,n){for(var s=n-1,i=e.length;++s<i;)if(e[s]===t)return s;return -1}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},66726:function(e,t,n){var s=n(11611),i=n(82846),a=n(91936),r=Math.max,o=Math.min;e.exports=function(e,t,n){var l,d,c,u,m,h,v=0,g=!1,p=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var n=l,s=d;return l=d=void 0,v=t,u=e.apply(s,n)}function y(e){var n=e-h,s=e-v;return void 0===h||n>=t||n<0||p&&s>=c}function j(){var e,n,s,a=i();if(y(a))return b(a);m=setTimeout(j,(e=a-h,n=a-v,s=t-e,p?o(s,c-n):s))}function b(e){return(m=void 0,f&&l)?x(e):(l=d=void 0,u)}function C(){var e,n=i(),s=y(n);if(l=arguments,d=this,h=n,s){if(void 0===m)return v=e=h,m=setTimeout(j,t),g?x(e):u;if(p)return clearTimeout(m),m=setTimeout(j,t),x(h)}return void 0===m&&(m=setTimeout(j,t)),u}return t=a(t)||0,s(n)&&(g=!!n.leading,c=(p="maxWait"in n)?r(a(n.maxWait)||0,t):c,f="trailing"in n?!!n.trailing:f),C.cancel=function(){void 0!==m&&clearTimeout(m),v=0,l=h=d=m=void 0},C.flush=function(){return void 0===m?u:b(i())},C}},64925:function(e,t,n){var s=n(56632)(n(66259));e.exports=s},66259:function(e,t,n){var s=n(95372),i=n(89278),a=n(47991),r=Math.max;e.exports=function(e,t,n){var o=null==e?0:e.length;if(!o)return -1;var l=null==n?0:a(n);return l<0&&(l=r(o+l,0)),s(e,i(t,3),l)}},50344:function(e){e.exports=function(){}},82846:function(e,t,n){var s=n(77400);e.exports=function(){return s.Date.now()}},94919:function(e,t,n){var s=n(91936),i=1/0;e.exports=function(e){return e?(e=s(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var s=n(94919);e.exports=function(e){var t=s(e),n=t%1;return t==t?n?t-n:t:0}},91936:function(e,t,n){var s=n(74833),i=n(11611),a=n(55193),r=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return r;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var n=l.test(e);return n||d.test(e)?c(e.slice(2),n?2:8):o.test(e)?r:+e}},83766:function(e,t,n){var s=n(92198);e.exports=function(e){return e&&e.length?s(e):[]}},25654:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]/[systemId]",function(){return n(95103)}])},65464:function(e,t,n){"use strict";var s=n(24246),i=n(96013),a=n(88038),r=n.n(a);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:a}=e;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},37541:function(e,t,n){"use strict";var s=n(24246),i=n(96013),a=n(53614);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:r=!0,children:o,rightContent:l,style:d,...c}=e;return(0,s.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",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,s.jsx)(a.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},74588:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var s=n(24246),i=n(96013),a=n(55372),r=n.n(a);let o=e=>{let{data:t}=e;return(0,s.jsxs)(i.jqI,{gap:12,title:"".concat(t.primaryName||"").concat(t.primaryName?": ":"").concat(t.name," - ").concat(t.description),children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:t.primaryName||t.name}),t.primaryName&&": ".concat(t.name)]}),(0,s.jsx)("em",{children:t.description})]})},l=e=>{let{options:t,...n}=e,a=null==t?void 0:t.map(e=>({...e,className:r().option}));return(0,s.jsx)(i.WPr,{options:a,autoFocus:!0,variant:"borderless",optionRender:o,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},78973:function(e,t,n){"use strict";n.d(t,{d:function(){return d}});var s=n(24246),i=n(96013),a=n(34090),r=n(27378),o=n(39514),l=n(34803);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:c,isRequired:u,layout:m="inline",...h}=e,[v,g,{setValue:p}]=(0,a.U$)(t),f=!!(g.touched&&g.error),[x,y]=(0,r.useState)("");v.value||"tags"!==h.mode&&"multiple"!==h.mode||(v.value=[]),"tags"===h.mode&&"string"==typeof v.value&&(v.value=[v.value]);let j="tags"===h.mode?(e,t)=>e?e.value!==x||v.value.includes(x)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:h.optionRender||void 0,b=e=>{y(e),h.onSearch&&h.onSearch(e)},C=(e,t)=>{p(e),h.onChange&&h.onChange(e,t)};return"inline"===m?(0,s.jsx)(i.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,s.jsx)(l.__,{htmlFor:h.id||t,...d,children:n}):null,(0,s.jsxs)(i.jqI,{align:"center",children:[(0,s.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(i.WPr,{...v,id:h.id||t,"data-testid":"controlled-select-".concat(v.name),...h,optionRender:j,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:v.value||void 0}),(0,s.jsx)(l.Bc,{isInvalid:f,message:g.error,fieldName:v.name})]}),c?(0,s.jsx)(o.Z,{label:c}):null]})]})}):(0,s.jsx)(i.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.jqI,{align:"center",children:[n?(0,s.jsx)(l.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,s.jsx)(o.Z,{label:c}):null]}),(0,s.jsx)(i.WPr,{...v,id:h.id||t,"data-testid":"controlled-select-".concat(v.name),...h,optionRender:j,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:v.value||void 0}),(0,s.jsx)(l.Bc,{isInvalid:f,message:g.error,fieldName:v.name})]})})}},53359:function(e,t,n){"use strict";n.d(t,{H:function(){return a},V:function(){return s.V}});var s=n(75139),i=n(60136);let a=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,i.Ot)(t)?n=t.data.detail:(0,i.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},75139:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var s=n(24246),i=n(96013);let a=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.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,r):e(r)},successAlert:(t,n,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.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,r):e(r)}}}},73269:function(e,t,n){"use strict";n.d(t,{Gt:function(){return m},eB:function(){return h},oI:function(){return u}});var s=n(24246),i=n(34090),a=n(27378),r=n(44296),o=n(3073),l=n(77650);let d=(0,a.createRef)(),c=(0,a.createRef)(),u=()=>{let e=(0,r.T)(),t=(0,r.C)(o.DB),n=(0,a.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),s=(0,a.useCallback)(()=>{e((0,o.Mr)()),c.current&&(c.current(!0),n())},[e,n]),i=(0,a.useCallback)(()=>{e((0,o.Mr)()),c.current&&(c.current(!1),n())},[e,n]);return{attemptAction:(0,a.useCallback)(()=>t?(e((0,o.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:s,onClose:i}},m=e=>{let{id:t,name:n}=e,{dirty:s}=(0,i.u6)(),l=(0,r.T)();return(0,a.useEffect)(()=>(l((0,o.Zu)({id:t,name:n})),()=>{l((0,o.dz)({id:t}))}),[l,t,n]),(0,a.useEffect)(()=>{l((0,o.$p)({id:t,isDirty:s}))},[s,l,t]),null},h=()=>{let{onConfirm:e,onClose:t}=u(),n=(0,r.C)(o.uv);return(0,s.jsx)(l.Z,{isOpen:n,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},19310:function(e,t,n){"use strict";var s=n(24246),i=n(64925),a=n.n(i),r=n(27378),o=n(44296),l=n(91650),d=n(79851),c=n(47411);let u=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,o.C)(d.U3),{isLoading:n}=(0,c.MO)(),s=(0,o.C)(c.qb),{isLoading:i}=(0,l.te)();return{dataUses:t,dataSubjects:(0,o.C)(l.ZL),dataCategories:s,isLoading:e||n||i}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:n,isLoading:i}=u(),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let i=t(o(e,n)),a=!!s.parent_key;return{name:s.name||void 0,primaryName:a&&(null==i?void 0:i.name)!==s.name&&(null==i?void 0:i.name)||void 0}},d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:i,primaryName:a}=l(e,t,n);return i?a?(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)("strong",{children:[a,":"]})," ",i]},e):(0,s.jsx)("strong",{children:i},e):e},c=t=>a()(e,{fides_key:t}),m=e=>a()(t,{fides_key:e}),h=e=>a()(n,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:c,getDataUseDisplayName:e=>d(e,c,1),getDataUseDisplayNameProps:e=>l(e,c,1),getDataCategories:()=>t,getDataCategoryByKey:m,getDataCategoryDisplayName:e=>d(e,m,2),getDataCategoryDisplayNameProps:e=>l(e,m,2),getDataSubjects:()=>n,getDataSubjectByKey:h,getDataSubjectDisplayName:e=>{let t=h(e);return t?t.name:e},getPrimaryKey:o,isLoading:i}}},98198:function(e,t,n){"use strict";var s=n(24246),i=n(96013);t.Z=e=>{let{title:t,children:n,isOpen:a,onClose:r,...o}=e;return(0,s.jsxs)(i.u_l,{isOpen:a,onClose:r,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,s.jsx)(i.ZAr,{}),(0,s.jsxs)(i.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,s.jsx)(i.xBx,{p:0,children:(0,s.jsx)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(i.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(i.fef,{pb:4,overflow:"auto",children:n})]})]})}},53614:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var s=n(24246),i=n(96013),a=n(79894),r=n.n(a),o=n(27378);let{Text:l}=i.AntTypography,d=e=>{let{items:t,...n}=e,a=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let a=n===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,s.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:o.title})),d)?o.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,s.jsx)(r(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,s.jsx)(i.zrq,{items:a,...n})}},22770:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var s=n(24246),i=n(66726),a=n.n(i),r=n(27378),o=n(33312);let l=e=>{let{value:t,onChange:n}=e,[i,l]=(0,r.useState)(t),d=a()(n,500),c=(0,r.useCallback)(e=>{l(e),d(e)},[]);return(0,s.jsx)(o.Z,{search:i,onChange:c,onClear:()=>{l(""),n("")}})}},83543:function(e,t,n){"use strict";n.d(t,{Ak:function(){return h},EY:function(){return c},Ud:function(){return a},Vr:function(){return v},WJ:function(){return o},nP:function(){return d},nS:function(){return u},rs:function(){return l},sX:function(){return m},wi:function(){return r}});var s=n(21618),i=n(36768);let{useGetAggregateMonitorResultsQuery:a,useGetDiscoveredSystemAggregateQuery:r,useGetDiscoveredAssetsQuery:o,useAddMonitorResultSystemsMutation:l,useIgnoreMonitorResultSystemsMutation:d,useAddMonitorResultAssetsMutation:c,useIgnoreMonitorResultAssetsMutation:u,useUpdateAssetsSystemMutation:m,useUpdateAssetsDataUseMutation:h,useUpdateAssetsMutation:v}=s.u.injectEndpoints({endpoints:e=>({getAggregateMonitorResults:e.query({query:e=>{let{page:t=1,size:n=20,search:s}=e;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:t,size:n,search:s,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:e.query({query:e=>{let{key:t,page:n=1,size:s=20,search:i}=e;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:t,page:n,size:s,search:i,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:e.query({query:e=>{let{key:t,system:n,page:s=1,size:i=20,search:a}=e;return{url:"/plus/discovery-monitor/".concat(t,"/results"),params:{resolved_system_id:n,page:s,size:i,search:a,diff_status:"addition"}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:n}=e,s=(0,i.du)(n,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(t,"/promote?").concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:n}=e,s=(0,i.du)(n,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(t,"/mute?").concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:e.mutation({query:e=>{var t;let n=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>n.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:e.mutation({query:e=>{var t;let n=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>n.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,system_key:e.systemKey}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssetsDataUse:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,data_uses:e.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.assets}),invalidatesTags:["Discovery Monitor Results"]})})})},89721:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});let s=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];t.Z=e=>s.includes(e)},74473:function(e,t,n){"use strict";var s=n(24246);n(27378),t.Z=e=>{let{children:t,className:n,...i}=e;return(0,s.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(n||""),...i,children:t})}},55827:function(e,t,n){"use strict";n.d(t,{E:function(){return s}});let s=e=>e.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9._<>-]/g,"")},56048:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var s=n(24246),i=n(96013),a=n(34090),r=n(27378),o=n(44296),l=n(34803);let d=(0,i.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,s.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=n(39514),u=n(62711);let{Text:m}=i.AntTypography,h=e=>{let{searchText:t,suggestion:n,...i}=e;return t&&n?(0,s.jsxs)(m,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...i,children:[(0,s.jsx)(m,{className:"text-transparent",children:t}),(0,s.jsx)(m,{type:"secondary",children:n.substring(t.length)})]}):null},v="Create new system",g=e=>{let{active:t,disabled:n,onRefreshSuggestions:a}=e,r={bg:t?"complimentary.500":"gray.100"};return(0,s.jsxs)(i.gCW,{children:[(0,s.jsx)(i.LZC,{minHeight:"18px"}),(0,s.jsxs)(i.v2r,{children:[(0,s.jsx)(i.j2t,{as:i.hU,size:"sm",isDisabled:n,icon:(0,s.jsx)(d,{color:t?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:r},...r}),(0,s.jsx)(i.qyq,{children:(0,s.jsx)(i.sNh,{onClick:a,children:(0,s.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var p=e=>{var t,n;let{label:d,isCreate:m,lockedForGVL:p,options:f,isLoading:x,onVendorSelected:y}=e,j=(0,o.C)(u.bN),[b,C,{setValue:w}]=(0,a.U$)("name"),S=!!(C.touched&&C.error),_={...b,value:null!==(t=b.value)&&void 0!==t?t:""},{touched:k,values:I,setTouched:R,setFieldValue:N,validateForm:T}=(0,a.u6)(),[A,D]=(0,r.useState)(!0),z=null!==(n=f.find(e=>e.value===_.value))&&void 0!==n?n:{label:_.value,value:_.value,description:""},P=(e,t)=>!!(null==t?void 0:t.label.toLowerCase().startsWith(e.toLowerCase())),[q,Z]=(0,r.useState)(""),M=(0,r.useMemo)(()=>f.filter(e=>P(q,e)),[f,q]),E=(0,r.useMemo)(()=>{let e=f;return m&&q&&(e=[...f,{label:"".concat(v,' "').concat(q,'"...'),value:q}]),e},[m,f,q]),L=!!q&&M.length>0,U=p&&!m;(0,r.useEffect)(()=>{D(!_.value&&!I.vendor_id)},[_.value,I.vendor_id,D]),(0,r.useEffect)(()=>{T()},[A,T]);let W=async()=>{Z(""),N("vendor_id",void 0),await w(""),R({...k,vendor_id:!1,name:!1}),y(void 0)},B=async e=>{if(e){let t=f.some(t=>t.value===e.value)?e.value:void 0;N("vendor_id",t),await w(e.label.startsWith(v)?e.value:e.label),R({...k,vendor_id:!0,name:!0}),y(t)}},F=async e=>{_.onBlur(e),q&&await w(q),R({...k,name:!0})},O=async e=>{M.length>0&&q!==M[0].label?(e.preventDefault(),Z(M[0].label),N("vendor_id",M[0].value),await w(M[0].label),y(M[0].value)):(N("vendor_id",void 0),await w(q)),R({...k,name:!0})},V=(0,s.jsx)(i.NIc,{isInvalid:S,isRequired:!0,width:"100%",children:(0,s.jsxs)(i.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,s.jsxs)(i.Ugi,{spacing:1,children:[(0,s.jsx)(l.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,s.jsx)(c.Z,{label:"Enter the system name"})]}),(0,s.jsxs)(i.xuv,{width:"100%",className:"relative",children:[(0,s.jsx)(i.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:E,loading:x,filterOption:(e,t)=>P(e,t)||!!(null==t?void 0:t.label.startsWith(v)),optionFilterProp:"label",value:z,placeholder:"Enter system name...",disabled:U,onChange:B,onSearch:Z,onClear:W,onBlur:F,onInputKeyDown:e=>{q&&"Tab"===e.key&&O(e)},status:S?"error":void 0,"data-testid":"vendor-name-select"}),(0,s.jsx)(h,{searchText:q,suggestion:M.length?M[0].label:""})]}),(0,s.jsx)(l.Bc,{isInvalid:S,message:C.error,fieldName:"name"})]})});return(0,s.jsxs)(i.Ugi,{alignItems:"flex-start",width:"full",children:[A?V:(0,s.jsx)(l.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:U,isRequired:!0,inputRightElement:U?null:(0,s.jsx)(i.PZ7,{onClick:W,size:"sm","data-testid":"clear-btn"})}),(0,s.jsx)(g,{active:!!I.vendor_id||L,disabled:!I.vendor_id||"showing"===j,onRefreshSuggestions:()=>y(I.vendor_id)})]})}},43894:function(e,t,n){"use strict";n.d(t,{Sv:function(){return v},Yb:function(){return h},dQ:function(){return g},lm:function(){return p}});var s=n(24246),i=n(96013),a=n(34090),r=n(27378),o=n(44296),l=n(34803),d=n(39514),c=n(96878),u=n(62711);let m=(e,t,n)=>{var s,i;let[l,d,{setValue:m,setTouched:h}]=(0,a.U$)({name:e,type:n||void 0}),v=!!(d.touched&&d.error),{error:g}=d,p={...l,value:null!==(s=l.value)&&void 0!==s?s:""},[f,x]=(0,r.useState)(null!==(i=p.value)&&void 0!==i?i:""),{values:y}=(0,a.u6)(),{vendor_id:j}=y,b=(0,o.C)((0,c.$e)(j||"")),C=(0,o.C)(u.bN),w=(0,r.useRef)();return(0,r.useEffect)(()=>{"showing"===C&&x(p.value)},[C,x]),(0,r.useEffect)(()=>{if("showing"===C&&b){let n=t?t(b):b[e];p.value!==n&&(m(n),setTimeout(()=>{var e;h(!0),null===(e=w.current)||void 0===e||e.blur()},300))}},[C,m,b,w.current]),(0,r.useEffect)(()=>{"hiding"===C&&m(f)},[C,m,f]),{field:p,isInvalid:v,isShowingSuggestions:C,error:g,inputRef:w}},h=e=>{let{label:t,tooltip:n,disabled:a,isRequired:r=!1,dictField:o,name:c,placeholder:u,id:h}=e,{field:v,isInvalid:g,isShowingSuggestions:p,error:f,inputRef:x}=m(c,o);return(0,s.jsx)(i.NIc,{isInvalid:g,isRequired:r,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.kCb,{alignItems:"center",children:[(0,s.jsx)(l.__,{htmlFor:h||c,fontSize:"xs",my:0,mr:1,children:t}),n?(0,s.jsx)(d.Z,{label:n}):null]}),(0,s.jsx)(l.oi,{...v,ref:x,isRequired:r,isDisabled:a,"data-testid":"input-".concat(v.name),placeholder:u,isPassword:!1,color:"showing"===p?"complimentary.500":"gray.800"}),(0,s.jsx)(l.Bc,{isInvalid:g,message:f,fieldName:v.name})]})})},v=e=>{let{label:t,tooltip:n,disabled:a,isRequired:r=!1,dictField:o,name:c,id:u}=e,{field:h,isInvalid:v,isShowingSuggestions:g,error:p}=m(c,o);return(0,s.jsx)(i.NIc,{isInvalid:v,isRequired:r,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.kCb,{alignItems:"center",children:[(0,s.jsx)(l.__,{htmlFor:u||c,fontSize:"xs",my:0,mr:1,children:t}),n?(0,s.jsx)(d.Z,{label:n}):null]}),(0,s.jsx)(i.gxH,{...h,size:"sm","data-testid":"input-".concat(h.name),focusBorderColor:"primary.600",color:"showing"===g?"complimentary.500":"gray.800",isDisabled:a}),(0,s.jsx)(l.Bc,{isInvalid:v,message:p,fieldName:h.name})]})})},g=e=>{let{label:t,tooltip:n,dictField:r,name:o,id:c,disabled:u}=e,{field:h,isInvalid:v,error:g}=m(o,r,"checkbox");return(0,s.jsxs)(i.NIc,{isInvalid:v,width:"full",children:[(0,s.jsxs)(i.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(i.Ugi,{spacing:1,children:[(0,s.jsx)(l.__,{htmlFor:c||o,fontSize:"xs",my:0,mr:0,children:t}),n?(0,s.jsx)(d.Z,{label:n}):null]}),(0,s.jsx)(i.Ugi,{children:(0,s.jsx)(a.gN,{name:h.name,children:e=>{let{form:{setFieldValue:t}}=e;return(0,s.jsx)(i.rAg,{checked:h.checked,onChange:e=>{t(h.name,e)},disabled:u,className:"mr-2","data-testid":"input-".concat(h.name),size:"small"})}})})]}),(0,s.jsx)(l.Bc,{isInvalid:v,message:g,fieldName:h.name})]})},p=e=>{let{label:t,tooltip:n,dictField:r,name:o,id:c,disabled:u}=e,{field:h,isInvalid:v,error:g,isShowingSuggestions:p}=m(o,r,"numeric"),{setFieldValue:f}=(0,a.u6)();return(0,s.jsxs)(i.NIc,{isInvalid:v,width:"full",children:[(0,s.jsxs)(i.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(i.Ugi,{spacing:1,children:[(0,s.jsx)(l.__,{htmlFor:c||o,fontSize:"xs",my:0,mr:0,children:t}),n?(0,s.jsx)(d.Z,{label:n}):null]}),(0,s.jsx)(i.Ugi,{children:(0,s.jsxs)(i.Y2U,{value:h.value,name:h.name,size:"xs",onBlur:h.onBlur,onChange:e=>{f(h.name,e)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(h.name),color:"showing"===p?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:u,children:[(0,s.jsx)(i.zuI,{}),(0,s.jsxs)(i.FiK,{children:[(0,s.jsx)(i.WQu,{}),(0,s.jsx)(i.Y_d,{})]})]})})]}),(0,s.jsx)(l.Bc,{isInvalid:v,message:g,fieldName:h.name})]})}},95103:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return es}});var s=n(24246),i=n(86677),a=n(27378),r=n(65464),o=n(87162),l=n(37541),d=n(59003),c=n(92222),u=n(96013),m=n(83766),h=n.n(m),v=n(60136),g=n(53359),p=n(8540),f=n(83543),x=n(98198),y=n(74588),j=n(19310),b=n(89721),C=e=>{let{selectedTaxonomies:t,...n}=e,{getDataUseDisplayNameProps:i,getDataUses:a}=(0,j.Z)(),r=a().filter(e=>e.active&&b.g.includes(e.fides_key)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:n}=i(e.fides_key);return{value:e.fides_key,name:t,primaryName:n,description:e.description||""}});return(0,s.jsx)(y.l,{options:r,...n})};let{Text:w}=u.AntTypography;var S=e=>{let{onSave:t,isSaving:n,onClose:i,...r}=e,[o,l]=(0,a.useState)([]),d=()=>{l([]),i()};return(0,s.jsxs)(x.Z,{title:"Add consent category",...r,onClose:d,children:[(0,s.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,s.jsx)(w,{children:"Assign consent categories to selected assets. This configures the system for consent management. Consent categories apply to both individual assets and the system."}),(0,s.jsx)(C,{mode:"tags",selectedTaxonomies:o,onSelect:(e,t)=>l([...o,t.value]),variant:"outlined"})]}),(0,s.jsxs)(u.jqI,{justify:"space-between",children:[(0,s.jsx)(u.wpx,{htmlType:"reset",onClick:d,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:!o.length,loading:n,onClick:()=>t(o),"data-testid":"save-btn",children:"Save"})]})]})},_=n(22770),k=n(31374);let I=e=>{let{children:t,className:n,style:i,...a}=e;return(0,s.jsx)(u.wpx,{...a,type:"text",className:"w-full justify-start ".concat(n),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...i},children:t})};var R=n(36768);let N=(e,t)=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(I,{onClick:t,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),e]}),T=e=>{var t;let{onAddSystem:n,...i}=e,[r,o]=(0,a.useState)(),{data:l,isFetching:d}=(0,k.xF)({page:1,size:25,search:r||void 0}),c=null==l?void 0:null===(t=l.items)||void 0===t?void 0:t.map(e=>({value:e.fides_key,label:e.name})),m=(0,a.useCallback)(e=>{(null==e?void 0:e.length)>1&&o(e),(null==e?void 0:e.length)===0&&o(void 0)},[o]),h=(0,a.useMemo)(()=>(0,R.Ds)(m,300),[m]);return(0,s.jsx)(u.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",dropdownStyle:{minWidth:"500px"},dropdownRender:n?e=>N(e,n):void 0,"data-testid":"system-select",...i,filterOption:!1,options:c,onSearch:h,loading:i.loading||d})};var A=n(34090),D=n(59389),z=n(44296),P=n(11596),q=n(78973),Z=n(34803),M=n(73269),E=n(55827),L=n(96878),U=n(62711),W=n(43894),B=n(56048);let{Text:F}=u.AntTypography,O={name:"",vendor_id:void 0,description:"",tags:[]},V=e=>{let{onSuccessfulSubmit:t,toastOnSuccess:n,...i}=e,[r,o]=(0,a.useState)(!1),l=(0,z.T)(),{tcf:d,dictionaryService:c}=(0,P.hz)(),{isLoading:m}=(0,L.Rd)(void 0,{skip:!c}),h=(0,z.C)(L.o),p=(0,z.C)(U.gU),[f]=(0,k.in)(),[y]=(0,L.Qk)(),[j]=(0,k.f7)(),{successAlert:b,errorAlert:C}=(0,g.V)(),{setSuggestions:w,setLockedForGVL:S}=U.dictSuggestionsSlice.actions,_=(0,a.useRef)(null),I=(0,a.useMemo)(()=>D.Ry().shape({name:D.Z_().required().label("System name").test("is-unique","",async(e,t)=>{let{data:n}=await f({page:1,size:10,search:e});return!((null==n?void 0:n.items)||[]).filter(t=>t.name===e).some(t=>t.name===e)||t.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})})}),[f]),R=e=>{if(c){if(!e){l(w("hiding")),l(S(!1));return}l(w("showing")),d&&(0,v.cj)(e)===v.c6.GVL?l(S(!0)):l(S(!1))}},N=()=>{i.onClose(),l(w("initial")),l(S(!1))},T=async e=>{if(o(!0),e.vendor_id){let s=await y([e.vendor_id]);if((0,v.D4)(s))C((0,v.e$)(s.error));else{let{data:e}=s,i=e.systems[0];null==t||t(i.fides_key,i.name),n&&b("".concat(e.name," has been added to your system inventory."))}}else{let s={...e,fides_key:(0,E.E)(e.name),system_type:"",body:"",privacy_declarations:[]},i=await j(s);if((0,v.D4)(i))C((0,v.e$)(i.error));else{let{fides_key:s,name:a}=i.data;null==t||t(s,a),n&&b("".concat(e.name," has been added to your system inventory."))}N()}o(!1)};return(0,s.jsx)(x.Z,{title:"Add New System",...i,onClose:N,children:(0,s.jsx)(A.J9,{initialValues:O,onSubmit:T,validationSchema:I,innerRef:_,children:e=>{let{dirty:t,isValid:n}=e;return(0,s.jsxs)(A.l0,{children:[(0,s.jsx)(M.Gt,{id:"new-system-modal",name:"Add New System"}),(0,s.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,s.jsx)(F,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),c?(0,s.jsx)(B.Z,{label:"System name",options:h,onVendorSelected:R,isCreate:!0,lockedForGVL:p,isLoading:m}):(0,s.jsx)(Z.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(0,s.jsx)(W.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:p}),(0,s.jsx)(q.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:p})]}),(0,s.jsxs)(u.jqI,{justify:"space-between",children:[(0,s.jsx)(u.wpx,{htmlType:"reset",onClick:N,disabled:m||!t||!n,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:m||!t||!n,loading:r,"data-testid":"save-btn",children:"Save"})]})]})}})})},{Text:$}=u.AntTypography,H=e=>{let{onSave:t,isSaving:n,...i}=e,[r,o]=(0,a.useState)(),[l,d]=(0,a.useState)(!1),c=(0,a.useCallback)(e=>{e.preventDefault(),d(!0)},[]),m=()=>{d(!1)},h=()=>{o(void 0),i.onClose()};return(0,s.jsxs)(x.Z,{title:"Assign system",...i,onClose:h,children:[(0,s.jsxs)(u.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,s.jsx)($,{children:"Assign a system to the selected assets. If no system exists, select 'Add new system' to create one."}),(0,s.jsx)(T,{placeholder:"Search or select...",onSelect:(e,t)=>{o(t)},onAddSystem:c,value:r})]})," ",(0,s.jsxs)(u.jqI,{justify:"space-between",children:[(0,s.jsx)(u.wpx,{htmlType:"reset",onClick:h,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(u.wpx,{htmlType:"submit",type:"primary",disabled:!r,loading:n,onClick:()=>{t(r)},"data-testid":"save-btn",children:"Save"})]}),l&&(0,s.jsx)(V,{isOpen:!0,onClose:m,onSuccessfulSubmit:(e,t)=>{m(),o({label:t,value:e})},toastOnSuccess:!0})]})};var G=n(74473),Y=n(43073),K=e=>{var t;let{asset:n}=e,[i,r]=(0,a.useState)(!1),[o]=(0,f.Ak)(),{successAlert:l,errorAlert:d}=(0,g.V)(),{getDataUseDisplayName:c}=(0,j.Z)(),m=async e=>{let t=n.data_uses||[],s=await o({monitorId:n.monitor_config_id,urnList:[n.urn],dataUses:[...t,e]});(0,Y.D4)(s)?d((0,v.e$)(s.error)):l("Consent category added to ".concat(n.resource_type,' "').concat(n.name,'" .'),"Confirmed"),r(!1)},h=async e=>{let t=n.data_uses||[],s=await o({monitorId:n.monitor_config_id,urnList:[n.urn],dataUses:t.filter(t=>t!==e)});(0,Y.D4)(s)?d((0,v.e$)(s.error)):l("Consent category removed from ".concat(n.resource_type,' "').concat(n.name,'".'),"Confirmed")},p=null===(t=n.data_uses)||void 0===t?void 0:t.filter(e=>(0,b.Z)(e));return(0,s.jsxs)(G.Z,{children:[!i&&(0,s.jsxs)(s.Fragment,{children:[null==p?void 0:p.map(e=>(0,s.jsx)(u.j8w,{"data-testid":"data-use-".concat(e),color:"white",closable:!0,onClose:()=>h(e),closeButtonLabel:"Remove data use",children:c(e)},e)),(0,s.jsx)(u.j8w,{onClick:()=>r(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),i&&(0,s.jsx)(u.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,s.jsx)(C,{selectedTaxonomies:p||[],onSelect:m,onBlur:()=>r(!1),open:!0})})]})};let X=e=>{let{asset:t}=e,[n,{isLoading:i}]=(0,f.EY)(),[a,{isLoading:r}]=(0,f.nS)(),{successAlert:o,errorAlert:l}=(0,g.V)(),d=i||r,{urn:c,name:m,resource_type:h}=t,p=async()=>{let e=await n({urnList:[c]});(0,v.D4)(e)?l((0,v.e$)(e.error)):o("".concat(h,' "').concat(m,'" has been added to the system inventory.'),"Confirmed")},x=async()=>{let e=await a({urnList:[c]});(0,v.D4)(e)?l((0,v.e$)(e.error)):o("".concat(h,' "').concat(m,'" has been ignored and will not appear in future scans.'),"Ignored")};return(0,s.jsxs)(u.vyj,{children:[(0,s.jsx)(u.esZ,{title:t.system?void 0:"This asset requires a system before you can add it to the inventory.",children:(0,s.jsx)(u.wpx,{"data-testid":"add-btn",size:"small",onClick:p,disabled:!t.system||d,loading:i,children:"Add"})}),(0,s.jsx)(u.wpx,{"data-testid":"ignore-btn",size:"small",onClick:x,disabled:d,loading:r,children:"Ignore"})]})};var J=n(71533),Q=n(6111);let ee=e=>{let{aggregateSystem:t,monitorConfigId:n}=e,{resource_type:i,name:r,urn:o,system:l}=t,[d,c]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),[p,{isLoading:f}]=(0,Q.NA)(),{successAlert:x,errorAlert:y}=(0,g.V)(),j=(0,a.useCallback)(e=>{e.preventDefault(),h(!0)},[]),b=async(e,t,s)=>{let a=await p({staged_resource_urn:o,monitor_config_id:n,system_key:e});(0,v.D4)(a)?y((0,v.e$)(a.error)):x(s?"".concat(t," has been added to your system inventory and the ").concat(i,' "').concat(r,'" has been assigned to that system.'):"".concat(i,' "').concat(r,'" has been assigned to ').concat(t,"."),"Confirmed"),c(!1)};return(0,s.jsxs)(s.Fragment,{children:[!d&&(0,s.jsx)("div",{style:(0,J.J9)(),children:l?(0,s.jsxs)(u.j8w,{onClick:()=>c(!0),"data-testid":"system-badge",children:[l,(0,s.jsx)(u.PJP.I8b,{})]}):(0,s.jsx)(u.j8w,{onClick:()=>c(!0),"data-testid":"add-system-btn",addable:!0})}),!!d&&(0,s.jsx)(T,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,onBlur:e=>{var t;(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("id"))!=="add-new-system"&&c(!1)},onAddSystem:j,onSelect:(e,t)=>b(e,t.label),loading:f}),m&&(0,s.jsx)(V,{isOpen:!0,onClose:()=>{h(!1)},onSuccessfulSubmit:(e,t)=>b(e,t,!0)})]})},et=()=>{let e=(0,c.Cl)();return{columns:[e.display({id:"select",cell:e=>{let{row:t}=e;return(0,s.jsx)(p.k,{isChecked:t.getIsSelected(),onChange:t.getToggleSelectedHandler(),dataTestId:"select-".concat(t.original.name||t.id)})},header:e=>{let{table:t}=e;return(0,s.jsx)(p.k,{isChecked:t.getIsAllPageRowsSelected(),isIndeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),e.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(p.G3,{value:e.getValue()}),header:"Asset"}),e.accessor(e=>e.resource_type,{id:"resource_type",cell:e=>(0,s.jsx)(p.G3,{value:e.getValue()}),header:"Type"}),e.accessor(e=>e.system,{id:"system",cell:e=>!!e.row.original.monitor_config_id&&(0,s.jsx)(ee,{aggregateSystem:e.row.original,monitorConfigId:e.row.original.monitor_config_id}),header:"System",meta:{noPadding:!0,width:"auto"}}),e.display({id:"data_use",cell:e=>(0,s.jsx)(K,{asset:e.row.original}),header:"Categories of consent",meta:{width:"auto",disableRowClick:!0}}),e.accessor(e=>e.locations,{id:"locations",cell:e=>(0,s.jsx)(p.G3,{value:e.getValue().length>1?"".concat(e.getValue().length," locations"):e.getValue()[0]}),header:"Locations"}),e.accessor(e=>e.domain,{id:"domain",cell:e=>(0,s.jsx)(p.G3,{value:e.getValue()}),header:"Domain"}),e.display({id:"actions",cell:e=>(0,s.jsx)(X,{asset:e.row.original}),header:"Actions",meta:{width:"auto",disableRowClick:!0}})]}},en=e=>{let{monitorId:t,systemId:n,onSystemName:r}=e,l=(0,i.useRouter)(),[m,x]=(0,a.useState)(n),[y,j]=(0,a.useState)({}),[b,C]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),[I,{isLoading:R}]=(0,f.EY)(),[N,{isLoading:T}]=(0,f.nS)(),[A,{isLoading:D}]=(0,f.rs)(),[z,{isLoading:P}]=(0,f.sX)(),[q,{isLoading:Z}]=(0,f.Vr)(),M=R||T||D||P,E=M||n===o.Kl,{PAGE_SIZES:L,pageSize:U,setPageSize:W,onPreviousPageClick:B,isPreviousPageDisabled:F,onNextPageClick:O,isNextPageDisabled:V,startRange:$,endRange:G,pageIndex:Y,setTotalPages:K,resetPageIndexToDefault:X}=(0,p.oi)(),[J,Q]=(0,a.useState)(""),{successAlert:ee,errorAlert:en}=(0,g.V)();(0,a.useEffect)(()=>{X()},[t,J,X]);let{data:es,isLoading:ei,isFetching:ea}=(0,f.WJ)({key:t,system:n,page:Y,size:U,search:J});(0,a.useEffect)(()=>{if(es){var e;let t=(null===(e=es.items[0])||void 0===e?void 0:e.system)||n||"";K(es.pages||1),x(t),null==r||r(t)}},[es,n,r,K]);let{columns:er}=et(),eo=(0,d.b7)({getCoreRowModel:(0,c.sC)(),columns:er,manualPagination:!0,data:(null==es?void 0:es.items)||[],columnResizeMode:"onChange",onRowSelectionChange:j,state:{rowSelection:y}}),el=eo.getSelectedRowModel().rows.map(e=>e.original.urn),ed=async()=>{let e=await I({urnList:el});(0,v.D4)(e)?en((0,v.e$)(e.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets from ").concat(m," have been added to the system inventory."),"Confirmed"))},ec=async e=>{if("string"==typeof(null==e?void 0:e.value)){let n=await z({monitorId:t,urnList:el,systemKey:e.value});(0,v.D4)(n)?en((0,v.e$)(n.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets have been assigned to ").concat(e.label,"."),"Confirmed"))}C(!1)},eu=async e=>{let n=null==es?void 0:es.items.filter(e=>el.includes(e.urn));if(!n)return;let s=n.map(t=>{let n=h()([...t.data_uses||[],...e]);return{urn:t.urn,data_uses:n}}),i=await q({monitorId:t,assets:s});(0,v.D4)(i)?en((0,v.e$)(i.error)):(eo.resetRowSelection(),ee("Consent categories added to ".concat(el.length," assets from ").concat(m,"."),"Confirmed"))},em=async()=>{let e=await N({urnList:el});(0,v.D4)(e)?en((0,v.e$)(e.error)):(eo.resetRowSelection(),ee("".concat(el.length," assets from ").concat(m," have been ignored and will not appear in future scans."),"Confirmed"))},eh=async()=>{let e=(null==es?void 0:es.items.length)||0,s=await A({monitor_config_key:t,resolved_system_ids:[n]});(0,v.D4)(s)?en((0,v.e$)(s.error)):(l.push("".concat(o.vi,"/").concat(t)),ee("".concat(e," assets from ").concat(m," have been added to the system inventory."),"Confirmed"))};return t&&n?ei?(0,s.jsx)(p.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(p.Q$,{children:[(0,s.jsx)(_.M,{value:J,onChange:Q}),(0,s.jsxs)(u.kCb,{alignItems:"center",children:[!!el.length&&(0,s.jsx)(u.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:6,"data-testid":"selected-count",children:"".concat(el.length," selected")}),(0,s.jsxs)(u.Ugi,{children:[(0,s.jsxs)(u.v2r,{children:[(0,s.jsx)(u.j2t,{as:u.wpx,icon:(0,s.jsx)(u.PJP._ME,{}),iconPosition:"end",loading:M,"data-testid":"bulk-actions-menu",disabled:!el.length||M,type:"primary",children:"Actions"}),(0,s.jsxs)(u.qyq,{children:[(0,s.jsx)(u.sNh,{fontSize:"small",onClick:ed,"data-testid":"bulk-add",children:"Add"}),(0,s.jsx)(u.sNh,{fontSize:"small",onClick:()=>k(!0),"data-testid":"bulk-add-data-use",children:"Add consent category"}),(0,s.jsx)(u.sNh,{fontSize:"small",onClick:()=>{C(!0)},"data-testid":"bulk-assign-system",children:"Assign system"}),(0,s.jsx)(u.RaW,{}),(0,s.jsx)(u.sNh,{fontSize:"small",onClick:em,"data-testid":"bulk-ignore",children:"Ignore"})]})]}),(0,s.jsx)(u.esZ,{title:E?"These assets require a system before you can add them to the inventory.":void 0,children:(0,s.jsx)(u.wpx,{onClick:eh,disabled:E,loading:D,type:"primary",icon:(0,s.jsx)(u.PJP.MCw,{}),iconPosition:"end","data-testid":"add-all",children:"Add all"})})]})]})]}),(0,s.jsx)(p.ZK,{tableInstance:eo,emptyTableNotice:(0,s.jsx)(u.oj8,{image:u.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})}),(0,s.jsx)(p.s8,{totalRows:(null==es?void 0:es.items.length)||0,pageSizes:L,setPageSize:W,onPreviousPageClick:B,isPreviousPageDisabled:F||ea,onNextPageClick:O,isNextPageDisabled:V||ea,startRange:$,endRange:G}),(0,s.jsx)(H,{isOpen:b,onClose:()=>{C(!1)},onSave:ec,isSaving:P}),(0,s.jsx)(S,{isOpen:w,onClose:()=>{k(!1)},onSave:eu,isSaving:Z})]}):null};var es=()=>{let e=(0,i.useRouter)(),t=decodeURIComponent(e.query.monitorId),n=decodeURIComponent(e.query.systemId),[d,c]=(0,a.useState)(n===o.Kl?"Uncategorized assets":n);return(0,s.jsxs)(r.Z,{title:"Action center - Discovered assets",children:[(0,s.jsx)(l.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:o.vi},{title:t,href:"".concat(o.vi,"/").concat(t)},{title:n===o.Kl?"Uncategorized assets":d}]}),(0,s.jsx)(en,{monitorId:t,systemId:n,onSystemName:c})]})}},43073:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=n(41164)},55372:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}},function(e){e.O(0,[8033,5559,4554,2866,9278,8540,2888,9774,179],function(){return e(e.s=25654)}),_N_E=e.O()}]);
|