ethyca-fides 2.67.3b1__py2.py3-none-any.whl → 2.68.0rc1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (209) hide show
  1. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/RECORD +207 -206
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/2f3c1a2d6b10_disallow_dot_in_monitor_key_and_update_refs.py +439 -0
  5. fides/api/db/base_class.py +19 -1
  6. fides/api/models/db_cache.py +8 -0
  7. fides/api/models/detection_discovery/core.py +14 -1
  8. fides/ui-build/static/admin/404.html +1 -1
  9. fides/ui-build/static/admin/_next/static/chunks/{1817-b78b58ae3b75d75a.js → 1817-c90365325f8a3d75.js} +1 -1
  10. fides/ui-build/static/admin/_next/static/chunks/{1975.7d4634a0e823a02b.js → 1975.e5cc7a1ccd477671.js} +1 -1
  11. fides/ui-build/static/admin/_next/static/chunks/{203-cd78ea279cecba60.js → 203-0c6cadcda98bdd33.js} +1 -1
  12. fides/ui-build/static/admin/_next/static/chunks/{2921-86f1547ac40a5cdf.js → 2921-46f9465c2852a46b.js} +1 -1
  13. fides/ui-build/static/admin/_next/static/chunks/{3450-69f4e16978971bb8.js → 3450-9314e1b15df8a8da.js} +1 -1
  14. fides/ui-build/static/admin/_next/static/chunks/{3855-509ca7ac99b5eada.js → 3855-4267fd8193e7f525.js} +1 -1
  15. fides/ui-build/static/admin/_next/static/chunks/{3872-0a0f0032ca39a93f.js → 3872-ac5feefd40b61ae3.js} +1 -1
  16. fides/ui-build/static/admin/_next/static/chunks/{3923-13a6b4da2d51bf8f.js → 3923-a33633feba5e655e.js} +1 -1
  17. fides/ui-build/static/admin/_next/static/chunks/{401-3cc1fee61494e3bd.js → 401-741bb31b586b7c96.js} +1 -1
  18. fides/ui-build/static/admin/_next/static/chunks/{409-ea70638a59296659.js → 409-5bc4369b80a8c11d.js} +1 -1
  19. fides/ui-build/static/admin/_next/static/chunks/{4121-877e19d3fa078c7b.js → 4121-94354b50a41f8497.js} +1 -1
  20. fides/ui-build/static/admin/_next/static/chunks/{4230-114e31621c19ea69.js → 4230-1ebc8c0ab293a077.js} +1 -1
  21. fides/ui-build/static/admin/_next/static/chunks/{431-1db919f6569a4021.js → 431-a34d7ceff17c2169.js} +1 -1
  22. fides/ui-build/static/admin/_next/static/chunks/{4608-f16f281f2d05d963.js → 4608-557fb24665b2e4bf.js} +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/{5309-d9a488457898263b.js → 5309-ffdec884eec79d29.js} +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/{5574-9312f97b637d9ee2.js → 5574-831167a8da90e2e6.js} +1 -1
  25. fides/ui-build/static/admin/_next/static/chunks/{6084-ddbad3149364725d.js → 6084-02abe12327fc3dbc.js} +1 -1
  26. fides/ui-build/static/admin/_next/static/chunks/{6662-ef0edd3598b1d431.js → 6662-499c189f932a35aa.js} +1 -1
  27. fides/ui-build/static/admin/_next/static/chunks/{6780-b42a27e72707936d.js → 6780-7d28e030f6516e5d.js} +1 -1
  28. fides/ui-build/static/admin/_next/static/chunks/{6853-d0190d2cca9dbde2.js → 6853-270261ef5537a106.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{6882-59ea739e3616ce83.js → 6882-7cc1d14e27a80c10.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/{6954-ba98e778a5b45ebf.js → 6954-7784e8d5ad6b8110.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/{7476-cc0d9a94ed7aad53.js → 7476-4de465016d3433b4.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/{7630-b1c93688013ef013.js → 7630-2a5c57787632693d.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/{7725-539d3a906f627531.js → 7725-c79513b04113112b.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/{787-c57185ad89c4e288.js → 787-5ba991cad1f7664a.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/{79-2aab56be75e16187.js → 79-98cfab20bb831137.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{796-3bdda2a7868464af.js → 796-0b768155bf20505f.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{8735-40caf91800a3610c.js → 8735-f84afcc50885883c.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/{9046-7085a401297c5520.js → 9046-97a972cc8a8ed24d.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/{9226-2dcac54ab3fb94be.js → 9226-318dadf1c050ecda.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/{9676.7fbcb6b554cda098.js → 9676.9e6828b42ef05e06.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/{9826-3c578665c6d3b21d.js → 9826-8c81c97a72510fcf.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/{9951-7c6639e5d062779e.js → 9951-4df2b67e0def5500.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/pages/{404-2d803dab6a00f353.js → 404-9174cdb70126c2c5.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-750d6bd16c971bb9.js → _app-65723cd4b8fc36ac.js} +18 -18
  45. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-2a655ff3a97f2492.js → manual-621416493c89ef01.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-8ff7f37913ad736a.js → multiple-0b9908c3e1dfe49e.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-0902f0bb4080643e.js → add-systems-18e96ce81dab51a4.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-d00c9034cdeb0236.js → add-vendors-5bb1b31ae8752250.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-0e1ca0f4c8e7f4da.js → configure-54d7c7310763c66d.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-f22ddd9b48a5c418.js → [id]-4e4d9426743b5cb4.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-21f997c69fc3b4c2.js → privacy-experience-d72460348fadcab8.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-da4124b7600a2a1d.js → [id]-3e7ddc252da00c98.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-a57d251c88ce68ae.js → new-35a7c305beee9428.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-ad105181bc91209b.js → privacy-notices-6bc3b73a21576869.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-057cad65e7414a44.js → properties-ab96939421639153.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-b0c4235fe6d0b0c8.js → reporting-fe3d6887fecf0f86.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-e17c56eec8d91371.js → consent-13240e3ca77acfeb.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-80a6cc8e8573514a.js → [projectUrn]-bd37b407c80c6986.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-29784a11fe0fbd0a.js → projects-e4770acf7044e2f5.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-7770a8dc34bd0fc0.js → data-catalog-0db635c3483c9da8.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-3e5725cd06d7fe6c.js → [systemId]-0c0e0a7798345541.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-92b0bd97d8e79340.js → [monitorId]-3c56e5fe072a44c6.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-ee3c0a103346fc06.js → action-center-53a763e49ce34a74.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-ad6a84a6276f914c.js → activity-6a90131dcecd694c.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-d23b3ae139f0428b.js → datamap-8f88dc31c5144ea8.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-15301bd6bf7cf718.js → [...subfieldNames]-145fe9e4cfcb231d.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-0fa72873e464f581.js → [collectionName]-8a1e5d140785c1e9.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-a8e8b5f4ee7af86c.js → [datasetId]-227b5db4b472a6a7.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-0d50084fbdf9b84c.js → new-8401f17fe5d9a1dc.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-f3348d0a92543bab.js → dataset-7d77b3ad069be268.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-7d6027570d05c57f.js → [id]-67a7fe58b96ea739.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-c6614583b14dc9f2.js → new-90a8df230cb89877.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-3bd77864da523d41.js → datastore-connection-cfb25b02abb8da71.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/{index-fbf9b845bb901238.js → index-876bfd7210040cec.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-330475705adbd36f.js → [id]-766e57bcf38b5b1e.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-7f15cd8538cdc24d.js → integrations-3fdc55d4c129e618.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-5627d0d0668077f9.js → [id]-6e796c3fe632280b.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-feca66ad5c5fe54a.js → add-template-fa0f3841c5bdfdeb.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-1bae386d8c190348.js → messaging-8f9c006b6166f002.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-64a322d01aae5ca7.js → ant-components-6ba7ae4f26c06cb0.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-8bca16a7726e7eb2.js → AntForm-11503454a62d8d7b.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-b0f246fc3b67ebf7.js → FormikAntFormItem-a504941807bdb7f1.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-1a0852b090bfc392.js → FormikControlled-0119403c8ff97f83.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-11f3de1b45e36583.js → FormikField-94f6d57d6c94ddf7.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-1b73a1c2b6c6285f.js → forms-ed1a3ae09d72df89.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-05616e2ae20ff4f8.js → table-migration-e8db3ad525e7ddbd.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-c14dd24592369467.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-f1d818242d8550f8.js → messaging-100d7d03930629a8.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-d40a26bddb126c5c.js → storage-6f8d1b3ec83cfcf0.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-e551a860ec727802.js → configure-3ce15577435d47cb.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-96a08c4431b5462c.js → privacy-requests-f43a988542813110.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-dd99183f93763ae4.js → [id]-41976b28503623cd.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-0bdbc1fcbf553b8f.js → add-property-cb438d8f5ec6007a.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-e959378bb32b6b73.js → properties-b6db7036993709b3.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-9d1840f8309b706e.js → datamap-4bc3e281409265cc.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-1066f0c202ef744c.js → alpha-1ea40fcd6b4268bf.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-37ba24a72a06862e.js → about-65c7600fadc6e55a.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-e891d01ece59669e.js → [purpose_id]-33dab986141b3663.js} +1 -1
  99. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-f61b87e79367865b.js → consent-1195042727c399ed.js} +1 -1
  100. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-f8eea5d508c60c64.js → custom-fields-71b98858ecb4e097.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-51333dbd21cb37c8.js → domain-records-386368bf7cb31771.js} +1 -1
  102. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-bde86e5f6c09da5a.js → domains-cf427e04f862b5d2.js} +1 -1
  103. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-4f9a5cc8bea7725b.js → email-templates-eabeeec5bf2773c6.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-ed6a140b362c5baa.js → locations-b41fb5ad277088ab.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-ff9a34264d48c35f.js → organization-ee56698ae3a6a78b.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-102efd9199e87124.js → regulations-a94dfeea43fbca7d.js} +1 -1
  107. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-a4b6d41ca679298b.js → test-datasets-0e2e98cc38ee5499.js} +1 -1
  108. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-c8f5fbaa83dd9945.js → [id]-18b316e2dad73731.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-c05b49ddec1a1b4f.js → systems-c32589c86081b750.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-df0d88716578e295.js → taxonomy-a8f09bf8f3204ca7.js} +1 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-da68efc31998dc66.js → [id]-3237881945acc0ee.js} +1 -1
  112. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-e98dfc7d4f2a4e16.js → user-management-a3a50d9d79066935.js} +1 -1
  113. fides/ui-build/static/admin/_next/static/chunks/{webpack-90e8ec1fc5c6455b.js → webpack-69658aeaf6155d89.js} +1 -1
  114. fides/ui-build/static/admin/_next/static/css/{8bc1833f1fa53ff0.css → 073713cd1eddda79.css} +1 -1
  115. fides/ui-build/static/admin/_next/static/css/{ab65b8cc3144bfc8.css → 0b4b1b65cc874774.css} +1 -1
  116. fides/ui-build/static/admin/_next/static/css/{d9924caa849931b3.css → e1628f15dd5f019b.css} +1 -1
  117. fides/ui-build/static/admin/_next/static/nd386tKRkuP7h0W5NiKwd/_buildManifest.js +1 -0
  118. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  119. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  120. fides/ui-build/static/admin/add-systems.html +1 -1
  121. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  122. fides/ui-build/static/admin/consent/configure.html +1 -1
  123. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  124. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  125. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  126. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  127. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  128. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  129. fides/ui-build/static/admin/consent/properties.html +1 -1
  130. fides/ui-build/static/admin/consent/reporting.html +1 -1
  131. fides/ui-build/static/admin/consent.html +1 -1
  132. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  133. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  134. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  135. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  136. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  137. fides/ui-build/static/admin/data-catalog.html +1 -1
  138. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  139. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  140. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  141. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  142. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  143. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  144. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  145. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  146. fides/ui-build/static/admin/datamap.html +1 -1
  147. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  148. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  149. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  150. fides/ui-build/static/admin/dataset/new.html +1 -1
  151. fides/ui-build/static/admin/dataset.html +1 -1
  152. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  153. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  154. fides/ui-build/static/admin/datastore-connection.html +1 -1
  155. fides/ui-build/static/admin/index.html +1 -1
  156. fides/ui-build/static/admin/integrations/[id].html +1 -1
  157. fides/ui-build/static/admin/integrations.html +1 -1
  158. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  159. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  160. fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
  161. fides/ui-build/static/admin/lib/fides.js +3 -3
  162. fides/ui-build/static/admin/login/[provider].html +1 -1
  163. fides/ui-build/static/admin/login.html +1 -1
  164. fides/ui-build/static/admin/messaging/[id].html +1 -1
  165. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  166. fides/ui-build/static/admin/messaging.html +1 -1
  167. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  168. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  169. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  170. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  171. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  172. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  173. fides/ui-build/static/admin/poc/forms.html +1 -1
  174. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  175. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  176. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  177. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  178. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  179. fides/ui-build/static/admin/privacy-requests.html +1 -1
  180. fides/ui-build/static/admin/properties/[id].html +1 -1
  181. fides/ui-build/static/admin/properties/add-property.html +1 -1
  182. fides/ui-build/static/admin/properties.html +1 -1
  183. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  184. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  185. fides/ui-build/static/admin/settings/about.html +1 -1
  186. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  187. fides/ui-build/static/admin/settings/consent.html +1 -1
  188. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  189. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  190. fides/ui-build/static/admin/settings/domains.html +1 -1
  191. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  192. fides/ui-build/static/admin/settings/locations.html +1 -1
  193. fides/ui-build/static/admin/settings/organization.html +1 -1
  194. fides/ui-build/static/admin/settings/regulations.html +1 -1
  195. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  196. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  197. fides/ui-build/static/admin/systems.html +1 -1
  198. fides/ui-build/static/admin/taxonomy.html +1 -1
  199. fides/ui-build/static/admin/user-management/new.html +1 -1
  200. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  201. fides/ui-build/static/admin/user-management.html +1 -1
  202. fides/ui-build/static/admin/_next/static/KAV7vwBbSuOInfCyClBs2/_buildManifest.js +0 -1
  203. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-79f1576b1126975c.js +0 -1
  204. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/WHEEL +0 -0
  205. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/entry_points.txt +0 -0
  206. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/licenses/LICENSE +0 -0
  207. {ethyca_fides-2.67.3b1.dist-info → ethyca_fides-2.68.0rc1.dist-info}/top_level.txt +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/{5596-4378b2927dae65b2.js → 5596-bb601cbf40e47a0f.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/{KAV7vwBbSuOInfCyClBs2 → nd386tKRkuP7h0W5NiKwd}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2462],{40135:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/locations",function(){return n(36956)}])},36956:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i=n(24246),l=n(13577),s=n(16134),o=n(77213),a=n(58754),r=n(98784),d=n.n(r),c=n(86677),u=n(27378),h=n(812),g=n(58452),m=n(26917),x=n(46628),p=n(54682),j=n(31883),f=n(77830),v=n(26089),C=n(61524),y=n(46238),w=e=>{let{id:t,isChecked:n,onChange:s}=e;return(0,i.jsxs)(l.kCb,{alignItems:"center",gap:"8px",children:[(0,i.jsx)(l.rAg,{checked:n,size:"small",onChange:s,id:t,"data-testid":"regulated-toggle"}),(0,i.jsx)(l.lXp,{fontSize:"sm",m:0,htmlFor:t,children:"Regulated"}),(0,i.jsx)(y.b,{label:"Toggle on to see only locations in this region with privacy regulations supported by Fides"})]})},b=n(67991),k=n(12282),S=n(85759),_=e=>{let{groups:t,locations:n,isOpen:s,onClose:o,selected:a,onChange:r}=e,[d,c]=(0,u.useState)(a),[h,g]=(0,u.useState)(!1),{filteredLocations:m,locationsByGroup:x}=(0,u.useMemo)(()=>{let e=h?n.filter(e=>{var t;return null===(t=e.regulation)||void 0===t?void 0:t.length}):n;return{locationsByGroup:(0,S.VT)(e),filteredLocations:e}},[n,h]),{allSelected:p,handleToggleAll:j,handleToggleSelection:f}=(0,b.QZ)({items:m,selected:d,onChange:c}),v=d.filter(e=>!Object.keys(x).includes(e)).length,C=n[0].continent,y=Object.keys(x),_=!(1===y.length&&"Other"===y[0]);return(0,i.jsxs)(l.u_l,{size:"2xl",isOpen:s,onClose:o,isCentered:!0,children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{"data-testid":"subgroup-modal",children:[(0,i.jsx)(k.h4,{title:"Select locations"}),(0,i.jsxs)(l.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(k.x$,{title:C,allSelected:p,onToggleAll:j,numSelected:v,children:(0,i.jsx)(w,{id:"".concat(C,"-modal-regulated"),isChecked:h,onChange:()=>g(!h)})}),_?(0,i.jsx)(l.UQy,{allowToggle:!0,allowMultiple:!0,children:Object.entries(x).map(e=>{let[n,s]=e,o=t.find(e=>n===e.id),a=o?o.name:n;return(0,i.jsxs)(l.Qdk,{"data-testid":"".concat(a,"-accordion"),children:[(0,i.jsx)("h2",{children:(0,i.jsxs)(l.KFZ,{children:[(0,i.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",fontWeight:"semibold",fontSize:"sm",children:a}),(0,i.jsx)(l.XEm,{})]})}),(0,i.jsx)(l.Hk3,{pb:4,children:(0,i.jsx)(l.MIq,{columns:3,spacing:6,children:s.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})})]},n)})}):(0,i.jsx)(l.MIq,{columns:3,spacing:6,paddingInline:4,children:m.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(k.$_,{onApply:()=>{let e=new Set(d);Object.entries(x).forEach(t=>{let[n,i]=t;i.every(e=>d.includes(e.id))?e.add(n):e.delete(n)}),r(Array.from(e)),o()},onClose:o})]})]})};let O=(e,t)=>{var n;return null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase().includes(t.toLocaleLowerCase())};var E=e=>{let{title:t,groups:n,locations:s,selected:o,onChange:a,search:r}=e,d=(0,l.qY0)(),[c,h]=(0,u.useState)(!1),g=!!(null==r?void 0:r.length),m=n.length>0,x=s;n.length&&(x=n),g&&(x=[...s,...n].sort((e,t)=>e.name.localeCompare(t.name)));let p=c?x.filter(e=>(0,S.$q)(e,s)):x,j=r?p.filter(e=>O(e,r)):p,f=n.filter(e=>"checked"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),v=n.filter(e=>"indeterminate"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),y=m?[...f,...o]:o,b=o.length,k=e=>{a(s.map(t=>e.includes(t.id)?{...t,selected:!0}:{...t,selected:!1}))};return 0===j.length&&r?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.ZP,{title:t,items:j,selected:y,indeterminate:m?v:[],onChange:e=>{let t=new Set(e),i=new Set(y);e.forEach(e=>{!i.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.add(e.id)})}),i.forEach(e=>{!t.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.delete(e.id)})}),k(Array.from(t))},onViewMore:()=>{d.onOpen()},numSelected:b,toggle:(0,i.jsx)(w,{id:"".concat(t,"-regulated"),isChecked:c,onChange:()=>h(!c)})}),(0,i.jsx)(_,{groups:n,locations:s,isOpen:d.isOpen,onClose:d.onClose,selected:o,onChange:k},"subgroup-modal-selected-".concat(y.length))]})},L=n(64781),A=e=>{var t,n;let{data:s}=e,o=(0,l.pmc)(),a=(0,l.qY0)(),[r,C]=(0,u.useState)(null!==(n=null===(t=s.locations)||void 0===t?void 0:t.filter(e=>e.id!==p._F.GLOBAL))&&void 0!==n?n:[]),[y,w]=(0,u.useState)(""),[b,{isLoading:k}]=(0,L.WA)(),_=(0,u.useMemo)(()=>(0,S.Il)((s.locations||[]).filter(e=>e.id!==p._F.GLOBAL),s.location_groups||[]),[s]),O=!d().isEqual(r,s.locations),A=(0,c.useRouter)(),Z=()=>{A.push(f.vY).then(()=>{o.closeAll()})},F=async()=>{let e=await b({locations:r.map(e=>({id:e.id,selected:e.selected})),regulations:[]});(0,j.D4)(e)?o((0,x.Vo)((0,h.e$)(e.error))):o((0,x.t5)((0,i.jsxs)(l.xvT,{display:"inline",children:["Fides has automatically associated the relevant regulations with your location choices."," ",(0,i.jsx)(v.Z,{onClick:Z,children:"View regulations here."})]})))},M=e=>{C(r.map(t=>{let n=e.find(e=>e.id===t.id);return null!=n?n:t}))};return(0,i.jsxs)(l.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(l.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(m.Z,{onChange:w,placeholder:"Search",value:y,onClear:()=>w("")})}),(0,i.jsx)(l.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(_).map(e=>{let[t,n]=e;return(0,i.jsx)(E,{title:t,groups:n.locationGroups,locations:n.locations,selected:r.filter(e=>n.locations.find(t=>t.id===e.id)&&e.selected).map(e=>e.id),onChange:M,search:y},t)})}),(0,i.jsx)(g.Z,{isOpen:a.isOpen,onClose:a.onClose,onConfirm:()=>{F(),a.onClose()},title:"Regulation updates",message:"Modifications in your location settings may also affect your regulation settings to simplify management. You can override any Fides-initiated changes directly in the regulation settings.",isCentered:!0,icon:(0,i.jsx)(l.aNP,{color:"orange"})}),O?(0,i.jsx)(l.wpx,{type:"primary",onClick:a.onOpen,loading:k,"data-testid":"save-btn",children:"Save"}):null]})},Z=()=>{let{isLoading:e}=(0,L.QM)(),t=(0,s.C)(L.P8);return(0,i.jsx)(o.Z,{title:"Locations",children:(0,i.jsxs)(l.xuv,{"data-testid":"location-management",children:[(0,i.jsx)(a.Z,{heading:"Locations"}),(0,i.jsx)(l.xvT,{fontSize:"sm",maxWidth:"720px",pb:6,children:"Select the locations that you operate in and Fides will make sure that you are automatically presented with the relevant regulatory guidelines and global frameworks for your locations."}),(0,i.jsx)(l.xuv,{children:e?(0,i.jsx)(l.$jN,{}):(0,i.jsx)(A,{data:t})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2462],{40135:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/locations",function(){return n(36956)}])},36956:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i=n(24246),l=n(27824),s=n(16134),o=n(77213),a=n(58754),r=n(98784),d=n.n(r),c=n(86677),u=n(27378),h=n(812),g=n(58452),m=n(26917),x=n(46628),p=n(54682),j=n(31883),f=n(77830),v=n(26089),C=n(61524),y=n(46238),w=e=>{let{id:t,isChecked:n,onChange:s}=e;return(0,i.jsxs)(l.kCb,{alignItems:"center",gap:"8px",children:[(0,i.jsx)(l.rAg,{checked:n,size:"small",onChange:s,id:t,"data-testid":"regulated-toggle"}),(0,i.jsx)(l.lXp,{fontSize:"sm",m:0,htmlFor:t,children:"Regulated"}),(0,i.jsx)(y.b,{label:"Toggle on to see only locations in this region with privacy regulations supported by Fides"})]})},b=n(67991),k=n(12282),S=n(85759),_=e=>{let{groups:t,locations:n,isOpen:s,onClose:o,selected:a,onChange:r}=e,[d,c]=(0,u.useState)(a),[h,g]=(0,u.useState)(!1),{filteredLocations:m,locationsByGroup:x}=(0,u.useMemo)(()=>{let e=h?n.filter(e=>{var t;return null===(t=e.regulation)||void 0===t?void 0:t.length}):n;return{locationsByGroup:(0,S.VT)(e),filteredLocations:e}},[n,h]),{allSelected:p,handleToggleAll:j,handleToggleSelection:f}=(0,b.QZ)({items:m,selected:d,onChange:c}),v=d.filter(e=>!Object.keys(x).includes(e)).length,C=n[0].continent,y=Object.keys(x),_=!(1===y.length&&"Other"===y[0]);return(0,i.jsxs)(l.u_l,{size:"2xl",isOpen:s,onClose:o,isCentered:!0,children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{"data-testid":"subgroup-modal",children:[(0,i.jsx)(k.h4,{title:"Select locations"}),(0,i.jsxs)(l.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(k.x$,{title:C,allSelected:p,onToggleAll:j,numSelected:v,children:(0,i.jsx)(w,{id:"".concat(C,"-modal-regulated"),isChecked:h,onChange:()=>g(!h)})}),_?(0,i.jsx)(l.UQy,{allowToggle:!0,allowMultiple:!0,children:Object.entries(x).map(e=>{let[n,s]=e,o=t.find(e=>n===e.id),a=o?o.name:n;return(0,i.jsxs)(l.Qdk,{"data-testid":"".concat(a,"-accordion"),children:[(0,i.jsx)("h2",{children:(0,i.jsxs)(l.KFZ,{children:[(0,i.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",fontWeight:"semibold",fontSize:"sm",children:a}),(0,i.jsx)(l.XEm,{})]})}),(0,i.jsx)(l.Hk3,{pb:4,children:(0,i.jsx)(l.MIq,{columns:3,spacing:6,children:s.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})})]},n)})}):(0,i.jsx)(l.MIq,{columns:3,spacing:6,paddingInline:4,children:m.map(e=>(0,i.jsx)(l.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:d.includes(e.id),onChange:()=>f(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(k.$_,{onApply:()=>{let e=new Set(d);Object.entries(x).forEach(t=>{let[n,i]=t;i.every(e=>d.includes(e.id))?e.add(n):e.delete(n)}),r(Array.from(e)),o()},onClose:o})]})]})};let O=(e,t)=>{var n;return null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase().includes(t.toLocaleLowerCase())};var E=e=>{let{title:t,groups:n,locations:s,selected:o,onChange:a,search:r}=e,d=(0,l.qY0)(),[c,h]=(0,u.useState)(!1),g=!!(null==r?void 0:r.length),m=n.length>0,x=s;n.length&&(x=n),g&&(x=[...s,...n].sort((e,t)=>e.name.localeCompare(t.name)));let p=c?x.filter(e=>(0,S.$q)(e,s)):x,j=r?p.filter(e=>O(e,r)):p,f=n.filter(e=>"checked"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),v=n.filter(e=>"indeterminate"===(0,S.ji)({group:e,selected:o,locations:s})).map(e=>e.id),y=m?[...f,...o]:o,b=o.length,k=e=>{a(s.map(t=>e.includes(t.id)?{...t,selected:!0}:{...t,selected:!1}))};return 0===j.length&&r?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.ZP,{title:t,items:j,selected:y,indeterminate:m?v:[],onChange:e=>{let t=new Set(e),i=new Set(y);e.forEach(e=>{!i.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.add(e.id)})}),i.forEach(e=>{!t.has(e)&&n.find(t=>t.id===e)&&s.filter(t=>{var n;return null===(n=t.belongs_to)||void 0===n?void 0:n.includes(e)}).forEach(e=>{t.delete(e.id)})}),k(Array.from(t))},onViewMore:()=>{d.onOpen()},numSelected:b,toggle:(0,i.jsx)(w,{id:"".concat(t,"-regulated"),isChecked:c,onChange:()=>h(!c)})}),(0,i.jsx)(_,{groups:n,locations:s,isOpen:d.isOpen,onClose:d.onClose,selected:o,onChange:k},"subgroup-modal-selected-".concat(y.length))]})},L=n(64781),A=e=>{var t,n;let{data:s}=e,o=(0,l.pmc)(),a=(0,l.qY0)(),[r,C]=(0,u.useState)(null!==(n=null===(t=s.locations)||void 0===t?void 0:t.filter(e=>e.id!==p._F.GLOBAL))&&void 0!==n?n:[]),[y,w]=(0,u.useState)(""),[b,{isLoading:k}]=(0,L.WA)(),_=(0,u.useMemo)(()=>(0,S.Il)((s.locations||[]).filter(e=>e.id!==p._F.GLOBAL),s.location_groups||[]),[s]),O=!d().isEqual(r,s.locations),A=(0,c.useRouter)(),Z=()=>{A.push(f.vY).then(()=>{o.closeAll()})},F=async()=>{let e=await b({locations:r.map(e=>({id:e.id,selected:e.selected})),regulations:[]});(0,j.D4)(e)?o((0,x.Vo)((0,h.e$)(e.error))):o((0,x.t5)((0,i.jsxs)(l.xvT,{display:"inline",children:["Fides has automatically associated the relevant regulations with your location choices."," ",(0,i.jsx)(v.Z,{onClick:Z,children:"View regulations here."})]})))},M=e=>{C(r.map(t=>{let n=e.find(e=>e.id===t.id);return null!=n?n:t}))};return(0,i.jsxs)(l.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(l.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(m.Z,{onChange:w,placeholder:"Search",value:y,onClear:()=>w("")})}),(0,i.jsx)(l.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(_).map(e=>{let[t,n]=e;return(0,i.jsx)(E,{title:t,groups:n.locationGroups,locations:n.locations,selected:r.filter(e=>n.locations.find(t=>t.id===e.id)&&e.selected).map(e=>e.id),onChange:M,search:y},t)})}),(0,i.jsx)(g.Z,{isOpen:a.isOpen,onClose:a.onClose,onConfirm:()=>{F(),a.onClose()},title:"Regulation updates",message:"Modifications in your location settings may also affect your regulation settings to simplify management. You can override any Fides-initiated changes directly in the regulation settings.",isCentered:!0,icon:(0,i.jsx)(l.aNP,{color:"orange"})}),O?(0,i.jsx)(l.wpx,{type:"primary",onClick:a.onOpen,loading:k,"data-testid":"save-btn",children:"Save"}):null]})},Z=()=>{let{isLoading:e}=(0,L.QM)(),t=(0,s.C)(L.P8);return(0,i.jsx)(o.Z,{title:"Locations",children:(0,i.jsxs)(l.xuv,{"data-testid":"location-management",children:[(0,i.jsx)(a.Z,{heading:"Locations"}),(0,i.jsx)(l.xvT,{fontSize:"sm",maxWidth:"720px",pb:6,children:"Select the locations that you operate in and Fides will make sure that you are automatically presented with the relevant regulatory guidelines and global frameworks for your locations."}),(0,i.jsx)(l.xuv,{children:e?(0,i.jsx)(l.$jN,{}):(0,i.jsx)(A,{data:t})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=40135)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var r=t(24246),n=t(13577),a=t(88038),o=t.n(a),s=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,s.useRouter)();return(0,r.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(n.xuv,{children:[(0,r.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(n.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:i,title:t,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,s.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:v}=(0,d.JE)(void 0,{skip:h}),{data:j}=(0,d.PW)(void 0,{skip:h}),g=p.flags.privacyRequestsConfiguration&&(!v||!j)&&m;return(0,r.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,r.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var r=t(24246),n=t(13577),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:s,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{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,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,r.jsx)(n.lQT,{className:t||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,r.jsx)(a.m,{className:s?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return o}});var r=t(24246),n=t(16134),a=t(31793);let o=e=>(0,n.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return o(i)?(0,r.jsx)(r.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var r=t(24246),n=t(13577),a=t(34090),o=t(27378),s=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,v,{setValue:j}]=(0,a.U$)(i),g=!!(v.touched&&v.error),[f,b]=(0,o.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let y="tags"===m.mode?(e,i)=>e?e.value!==f||h.value.includes(f)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,k=e=>{b(e),m.onSearch&&m.onSearch(e)},C=(e,i)=>{j(e),m.onChange&&m.onChange(e,i)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,...d,children:t}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]}),(0,r.jsx)(s.b,{label:c,className:g?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,r.jsx)(s.b,{label:c})]}),(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]})})}},8133:function(e,i,t){"use strict";var r=t(24246),n=t(13577);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:o,modalContentProps:s,showCloseButton:l=!1,footer:d,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:a,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...s,children:[l&&(0,r.jsx)(n.olH,{}),(0,r.jsx)(n.xBx,{p:0,children:(0,r.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(n.X6q,{as:"h3",size:"sm",children:i})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:t}),d&&(0,r.jsx)(n.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var r=t(24246),n=t(13577),a=t(79894),o=t.n(a),s=t(27378);let{Text:l}=n.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,s.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:s.title})),d)?s.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[i]);return(0,r.jsx)(n.zrq,{items:a,...t})}},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return N}});var r=t(24246),n=t(19904),a=t(13577),o=t(25980),s=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),p=t(55484),x=t(40324),m=t(812),h=t(46628),v=t(76174),j=t(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},f=e=>({...e}),b=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var y=e=>{let{openIDProvider:i,onSuccess:t,onClose:n}=e,[o]=(0,v.Qc)(),[s]=(0,v.oP)(),l=(0,u.useMemo)(()=>i?f(i):g,[i]),d=(0,a.pmc)(),p=async(e,i)=>{(e=>{if((0,m.D4)(e)){let i=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,h.Vo)(i))}else d((0,h.t5)("SSO provider configuration saved.")),n(),i.resetForm({}),t&&t(e.data)})(l.id?await s(e):await o(e))},y=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,r.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,r.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:b,children:e=>{let{dirty:i,isValid:t,values:o}=e;return(0,r.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(j.d,{name:"provider",label:"Provider",options:y,layout:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===o.provider&&k(),"okta"===o.provider&&C(),"custom"===o.provider&&_(),(0,r.jsxs)(a.xuv,{textAlign:"right",children:[(0,r.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:n,children:"Cancel"}),(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:i,onClose:t}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,r.jsx)(y,{onClose:t})})},C=e=>{let{isOpen:i,onClose:t,openIDProvider:n}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,r.jsx)(y,{openIDProvider:n,onClose:t})})},_=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:n,onClose:o}=(0,a.qY0)(),{onOpen:s,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,v.rB)(),p=async()=>{let e=await u(i.identifier);if((0,m.D4)(e)){c((0,h.Vo)((0,m.e$)(e.error))),d();return}c((0,h.t5)("SSO provider deleted successfully")),d()};return(0,r.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,r.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,r.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,r.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,r.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,r.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,r.jsx)(a.wpx,{className:"mr-3",onClick:s,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,r.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,r.jsx)(C,{isOpen:n,onClose:o,openIDProvider:i}),(0,r.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,r.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:n}=(0,v.qv)();return(0,r.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,r.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",n&&n.length<5&&(0,r.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,r.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==n?void 0:n.map(e=>(0,r.jsx)(_,{openIDProvider:e},e.identifier)),(0,r.jsx)(k,{isOpen:i,onClose:t})]})},z=t(83265);let S={description:"",fides_key:z.Av,name:""},q=e=>({...e}),w=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),I=e=>{let{organization:i,onSuccess:t}=e,[n,o]=(0,z.$f)(),s=(0,u.useMemo)(()=>i?q(i):S,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let r=w(e);(n=>{if((0,m.D4)(n)){let e=(0,m.e$)(n.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,h.Vo)(e))}else l((0,h.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(r)})(await n(r))},p=!i||o.isLoading;return(0,r.jsx)(c.J9,{initialValues:s,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:i,isValid:t}=e;return(0,r.jsx)(c.l0,{"data-testid":"organization-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,r.jsx)(a.xuv,{textAlign:"right",children:(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!i||!t,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var P=t(54682),N=()=>{let{data:e}=(0,z.GQ)(z.Av),{plus:i,flags:{ssoAuthentication:t}}=(0,o.hz)();return(0,r.jsx)(s.Z,{title:"Organization",children:(0,r.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,r.jsx)(l.Z,{heading:"Organization Management"}),(0,r.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,r.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,r.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,r.jsx)(I,{organization:e})}),t&&i&&(0,r.jsx)(n.ZP,{scopes:[P.Sh.OPENID_PROVIDER_CREATE],children:(0,r.jsx)(R,{})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var r=t(24246),n=t(27824),a=t(88038),o=t.n(a),s=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,s.useRouter)();return(0,r.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(n.xuv,{children:[(0,r.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(n.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:i,title:t,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),x=(0,s.useRouter)(),m="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,h=!(p.flags.privacyRequestsConfiguration&&m),{data:v}=(0,d.JE)(void 0,{skip:h}),{data:j}=(0,d.PW)(void 0,{skip:h}),g=p.flags.privacyRequestsConfiguration&&(!v||!j)&&m;return(0,r.jsxs)(n.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,r.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var r=t(24246),n=t(27824),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:s,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{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,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof i?(0,r.jsx)(n.lQT,{className:t||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,r.jsx)(a.m,{className:s?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return o}});var r=t(24246),n=t(16134),a=t(31793);let o=e=>(0,n.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return o(i)?(0,r.jsx)(r.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var r=t(24246),n=t(27824),a=t(34090),o=t(27378),s=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:x,...m}=e,[h,v,{setValue:j}]=(0,a.U$)(i),g=!!(v.touched&&v.error),[f,b]=(0,o.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let y="tags"===m.mode?(e,i)=>e?e.value!==f||h.value.includes(f)?m.optionRender?m.optionRender(e,i):e.label:'Create "'.concat(f,'"'):void 0:m.optionRender||void 0,k=e=>{b(e),m.onSearch&&m.onSearch(e)},C=(e,i)=>{j(e),m.onChange&&m.onChange(e,i)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,...d,children:t}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]}),(0,r.jsx)(s.b,{label:c,className:g?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:g,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[t?(0,r.jsx)(l.__,{htmlFor:m.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,r.jsx)(s.b,{label:c})]}),(0,r.jsx)(n.WPr,{...h,id:m.id||i,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:y,onSearch:"tags"===m.mode?k:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),x&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:x}),(0,r.jsx)(l.Bc,{isInvalid:g,message:v.error,fieldName:h.name})]})})}},8133:function(e,i,t){"use strict";var r=t(24246),n=t(27824);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:o,modalContentProps:s,showCloseButton:l=!1,footer:d,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:a,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...s,children:[l&&(0,r.jsx)(n.olH,{}),(0,r.jsx)(n.xBx,{p:0,children:(0,r.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(n.X6q,{as:"h3",size:"sm",children:i})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:t}),d&&(0,r.jsx)(n.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var r=t(24246),n=t(27824),a=t(79894),o=t.n(a),s=t(27378);let{Text:l}=n.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,s.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:s.title})),d)?s.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[i]);return(0,r.jsx)(n.zrq,{items:a,...t})}},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return N}});var r=t(24246),n=t(19904),a=t(27824),o=t(25980),s=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),p=t(55484),x=t(40324),m=t(812),h=t(46628),v=t(76174),j=t(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},f=e=>({...e}),b=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var y=e=>{let{openIDProvider:i,onSuccess:t,onClose:n}=e,[o]=(0,v.Qc)(),[s]=(0,v.oP)(),l=(0,u.useMemo)(()=>i?f(i):g,[i]),d=(0,a.pmc)(),p=async(e,i)=>{(e=>{if((0,m.D4)(e)){let i=(0,m.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,h.Vo)(i))}else d((0,h.t5)("SSO provider configuration saved.")),n(),i.resetForm({}),t&&t(e.data)})(l.id?await s(e):await o(e))},y=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,r.jsx)(x.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,r.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:b,children:e=>{let{dirty:i,isValid:t,values:o}=e;return(0,r.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(j.d,{name:"provider",label:"Provider",options:y,layout:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,r.jsx)(x.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===o.provider&&k(),"okta"===o.provider&&C(),"custom"===o.provider&&_(),(0,r.jsxs)(a.xuv,{textAlign:"right",children:[(0,r.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:n,children:"Cancel"}),(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:i,onClose:t}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,r.jsx)(y,{onClose:t})})},C=e=>{let{isOpen:i,onClose:t,openIDProvider:n}=e;return(0,r.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,r.jsx)(y,{openIDProvider:n,onClose:t})})},_=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:n,onClose:o}=(0,a.qY0)(),{onOpen:s,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,v.rB)(),p=async()=>{let e=await u(i.identifier);if((0,m.D4)(e)){c((0,h.Vo)((0,m.e$)(e.error))),d();return}c((0,h.t5)("SSO provider deleted successfully")),d()};return(0,r.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,r.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,r.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,r.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,r.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,r.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,r.jsx)(a.wpx,{className:"mr-3",onClick:s,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,r.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,r.jsx)(C,{isOpen:n,onClose:o,openIDProvider:i}),(0,r.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,r.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:n}=(0,v.qv)();return(0,r.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,r.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",n&&n.length<5&&(0,r.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,r.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==n?void 0:n.map(e=>(0,r.jsx)(_,{openIDProvider:e},e.identifier)),(0,r.jsx)(k,{isOpen:i,onClose:t})]})},z=t(83265);let S={description:"",fides_key:z.Av,name:""},q=e=>({...e}),w=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),I=e=>{let{organization:i,onSuccess:t}=e,[n,o]=(0,z.$f)(),s=(0,u.useMemo)(()=>i?q(i):S,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let r=w(e);(n=>{if((0,m.D4)(n)){let e=(0,m.e$)(n.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,h.Vo)(e))}else l((0,h.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(r)})(await n(r))},p=!i||o.isLoading;return(0,r.jsx)(c.J9,{initialValues:s,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:i,isValid:t}=e;return(0,r.jsx)(c.l0,{"data-testid":"organization-form",children:(0,r.jsxs)(a.Kqy,{spacing:4,children:[(0,r.jsx)(x.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,r.jsx)(x.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,r.jsx)(a.xuv,{textAlign:"right",children:(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!i||!t,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var P=t(54682),N=()=>{let{data:e}=(0,z.GQ)(z.Av),{plus:i,flags:{ssoAuthentication:t}}=(0,o.hz)();return(0,r.jsx)(s.Z,{title:"Organization",children:(0,r.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,r.jsx)(l.Z,{heading:"Organization Management"}),(0,r.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,r.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,r.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,r.jsx)(I,{organization:e})}),t&&i&&(0,r.jsx)(n.ZP,{scopes:[P.Sh.OPENID_PROVIDER_CREATE],children:(0,r.jsx)(R,{})})]})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4650],{68523:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/regulations",function(){return t(66773)}])},66773:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return q}});var i=t(24246),s=t(13577),l=t(79894),o=t.n(l),a=t(16134),r=t(77213),c=t(77830),d=t(58754),u=t(64781),h=t(98784),g=t.n(h),m=t(86677),x=t(27378),p=t(812),j=t(58452),C=t(26917),v=t(46628),f=t(26089),y=t(31883),w=t(61524),_=t(67991),S=t(12282),k=e=>{let{regulations:n,isOpen:t,onClose:l,selected:o,onChange:a}=e,[r,c]=(0,x.useState)(o),{allSelected:d,handleToggleAll:u,handleToggleSelection:h}=(0,_.QZ)({items:n,selected:r,onChange:c}),g=r.length,m=n[0].continent;return(0,i.jsxs)(s.u_l,{size:"2xl",isOpen:t,onClose:l,isCentered:!0,children:[(0,i.jsx)(s.ZAr,{}),(0,i.jsxs)(s.hzk,{"data-testid":"regulation-modal",children:[(0,i.jsx)(S.h4,{title:"Select regulations"}),(0,i.jsxs)(s.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(S.x$,{title:m,allSelected:d,onToggleAll:u,numSelected:g}),(0,i.jsx)(s.MIq,{columns:3,spacing:6,paddingInline:4,children:n.map(e=>(0,i.jsx)(s.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:r.includes(e.id),onChange:()=>h(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(S.$_,{onApply:()=>{a(r),l()},onClose:l})]})]})},O=e=>{let{title:n,items:t,selected:l,onChange:o}=e,a=(0,s.qY0)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w.ZP,{title:n,items:t,selected:l,onChange:o,numSelected:l.length,indeterminate:[],onViewMore:t.length>w.I_?a.onOpen:void 0}),(0,i.jsx)(k,{regulations:t,isOpen:a.isOpen,onClose:a.onClose,selected:l,onChange:o},"regulation-modal-selected-".concat(l.length))]})},Z=t(85759);let b=(e,n)=>{var t;return null===(t=e.name)||void 0===t?void 0:t.toLocaleLowerCase().includes(n.toLocaleLowerCase())};var N=e=>{var n;let{data:t}=e,l=(0,s.pmc)(),o=(0,s.qY0)(),[a,r]=(0,x.useState)(null!==(n=t.regulations)&&void 0!==n?n:[]),[d,h]=(0,x.useState)(""),[w,{isLoading:_}]=(0,u.WA)(),S=(0,x.useMemo)(()=>{var e,n;let i=null!==(n=null===(e=t.regulations)||void 0===e?void 0:e.filter(e=>b(e,d)))&&void 0!==n?n:[];return(0,Z.F7)(i)},[t.regulations,d]),k=!g().isEqual(a,t.regulations),N=(0,m.useRouter)(),q=()=>{N.push(c.r5).then(()=>{l.closeAll()})},E=async()=>{let e=await w({regulations:a.map(e=>({id:e.id,selected:e.selected})),locations:[]});(0,y.D4)(e)?l((0,v.Vo)((0,p.e$)(e.error))):l((0,v.t5)((0,i.jsxs)(s.xvT,{display:"inline",children:["Fides has automatically associated the relevant locations with your regulation choices.",(0,i.jsx)(f.Z,{onClick:q,children:"View locations here."})]})))},L=e=>{r(a.map(n=>{let t=e.find(e=>e.id===n.id);return null!=t?t:n}))};return(0,i.jsxs)(s.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(s.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(C.Z,{onChange:h,placeholder:"Search",value:d,onClear:()=>h("")})}),(0,i.jsx)(s.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(S).map(e=>{let[n,t]=e,s=a.filter(e=>t.find(n=>n.id===e.id)&&e.selected).map(e=>e.id);return(0,i.jsx)(O,{title:n,items:t,selected:s,onChange:e=>{L(t.map(n=>e.includes(n.id)?{...n,selected:!0}:{...n,selected:!1}))}},n)})}),(0,i.jsx)(j.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{E(),o.onClose()},title:"Location updates",message:"Modifications in your regulation settings may also affect your location settings to simplify management. You can override any Fides-initiated changes directly in the location settings.",isCentered:!0,icon:(0,i.jsx)(s.aNP,{color:"orange"})}),k&&(0,i.jsx)(s.wpx,{type:"primary",onClick:o.onOpen,loading:_,"data-testid":"save-btn",children:"Save"})]})},q=()=>{let{isLoading:e}=(0,u.QM)(),n=(0,a.C)(u.P8);return(0,i.jsx)(r.Z,{title:"Regulations",children:(0,i.jsxs)(s.xuv,{"data-testid":"regulation-management",children:[(0,i.jsx)(d.Z,{heading:"Regulations"}),(0,i.jsxs)(s.xvT,{pb:6,fontSize:"sm",maxWidth:"600px",children:["Select the regulations that apply to your organizations compliance requirements. The selections you make here will automatically update your location selections."," ",(0,i.jsx)(s.rUS,{as:o(),href:c.r5,color:"complimentary.500",children:"You can view your location settings here."})]}),(0,i.jsx)(s.xuv,{children:e?(0,i.jsx)(s.$jN,{}):(0,i.jsx)(N,{data:n})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=68523)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4650],{68523:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/regulations",function(){return t(66773)}])},66773:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return q}});var i=t(24246),s=t(27824),l=t(79894),o=t.n(l),a=t(16134),r=t(77213),c=t(77830),d=t(58754),u=t(64781),h=t(98784),g=t.n(h),m=t(86677),x=t(27378),p=t(812),j=t(58452),C=t(26917),v=t(46628),f=t(26089),y=t(31883),w=t(61524),_=t(67991),S=t(12282),k=e=>{let{regulations:n,isOpen:t,onClose:l,selected:o,onChange:a}=e,[r,c]=(0,x.useState)(o),{allSelected:d,handleToggleAll:u,handleToggleSelection:h}=(0,_.QZ)({items:n,selected:r,onChange:c}),g=r.length,m=n[0].continent;return(0,i.jsxs)(s.u_l,{size:"2xl",isOpen:t,onClose:l,isCentered:!0,children:[(0,i.jsx)(s.ZAr,{}),(0,i.jsxs)(s.hzk,{"data-testid":"regulation-modal",children:[(0,i.jsx)(S.h4,{title:"Select regulations"}),(0,i.jsxs)(s.fef,{p:6,maxHeight:"70vh",overflowY:"auto",children:[(0,i.jsx)(S.x$,{title:m,allSelected:d,onToggleAll:u,numSelected:g}),(0,i.jsx)(s.MIq,{columns:3,spacing:6,paddingInline:4,children:n.map(e=>(0,i.jsx)(s.XZJ,{size:"sm",colorScheme:"complimentary",isChecked:r.includes(e.id),onChange:()=>h(e.id),"data-testid":"".concat(e.name,"-checkbox"),children:e.name},e.id))})]}),(0,i.jsx)(S.$_,{onApply:()=>{a(r),l()},onClose:l})]})]})},O=e=>{let{title:n,items:t,selected:l,onChange:o}=e,a=(0,s.qY0)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w.ZP,{title:n,items:t,selected:l,onChange:o,numSelected:l.length,indeterminate:[],onViewMore:t.length>w.I_?a.onOpen:void 0}),(0,i.jsx)(k,{regulations:t,isOpen:a.isOpen,onClose:a.onClose,selected:l,onChange:o},"regulation-modal-selected-".concat(l.length))]})},Z=t(85759);let b=(e,n)=>{var t;return null===(t=e.name)||void 0===t?void 0:t.toLocaleLowerCase().includes(n.toLocaleLowerCase())};var N=e=>{var n;let{data:t}=e,l=(0,s.pmc)(),o=(0,s.qY0)(),[a,r]=(0,x.useState)(null!==(n=t.regulations)&&void 0!==n?n:[]),[d,h]=(0,x.useState)(""),[w,{isLoading:_}]=(0,u.WA)(),S=(0,x.useMemo)(()=>{var e,n;let i=null!==(n=null===(e=t.regulations)||void 0===e?void 0:e.filter(e=>b(e,d)))&&void 0!==n?n:[];return(0,Z.F7)(i)},[t.regulations,d]),k=!g().isEqual(a,t.regulations),N=(0,m.useRouter)(),q=()=>{N.push(c.r5).then(()=>{l.closeAll()})},E=async()=>{let e=await w({regulations:a.map(e=>({id:e.id,selected:e.selected})),locations:[]});(0,y.D4)(e)?l((0,v.Vo)((0,p.e$)(e.error))):l((0,v.t5)((0,i.jsxs)(s.xvT,{display:"inline",children:["Fides has automatically associated the relevant locations with your regulation choices.",(0,i.jsx)(f.Z,{onClick:q,children:"View locations here."})]})))},L=e=>{r(a.map(n=>{let t=e.find(e=>e.id===n.id);return null!=t?t:n}))};return(0,i.jsxs)(s.gCW,{alignItems:"start",spacing:4,children:[(0,i.jsx)(s.xuv,{maxWidth:"510px",width:"100%",children:(0,i.jsx)(C.Z,{onChange:h,placeholder:"Search",value:d,onClear:()=>h("")})}),(0,i.jsx)(s.MIq,{columns:{base:1,md:2,xl:3},spacing:6,width:"100%",children:Object.entries(S).map(e=>{let[n,t]=e,s=a.filter(e=>t.find(n=>n.id===e.id)&&e.selected).map(e=>e.id);return(0,i.jsx)(O,{title:n,items:t,selected:s,onChange:e=>{L(t.map(n=>e.includes(n.id)?{...n,selected:!0}:{...n,selected:!1}))}},n)})}),(0,i.jsx)(j.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{E(),o.onClose()},title:"Location updates",message:"Modifications in your regulation settings may also affect your location settings to simplify management. You can override any Fides-initiated changes directly in the location settings.",isCentered:!0,icon:(0,i.jsx)(s.aNP,{color:"orange"})}),k&&(0,i.jsx)(s.wpx,{type:"primary",onClick:o.onOpen,loading:_,"data-testid":"save-btn",children:"Save"})]})},q=()=>{let{isLoading:e}=(0,u.QM)(),n=(0,a.C)(u.P8);return(0,i.jsx)(r.Z,{title:"Regulations",children:(0,i.jsxs)(s.xuv,{"data-testid":"regulation-management",children:[(0,i.jsx)(d.Z,{heading:"Regulations"}),(0,i.jsxs)(s.xvT,{pb:6,fontSize:"sm",maxWidth:"600px",children:["Select the regulations that apply to your organizations compliance requirements. The selections you make here will automatically update your location selections."," ",(0,i.jsx)(s.rUS,{as:o(),href:c.r5,color:"complimentary.500",children:"You can view your location settings here."})]}),(0,i.jsx)(s.xuv,{children:e?(0,i.jsx)(s.$jN,{}):(0,i.jsx)(N,{data:n})})]})})}}},function(e){e.O(0,[9826,2888,9774,179],function(){return e(e.s=68523)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var s=i(24246),n=i(13577);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,s.jsx)(n.kCb,{boxSize:"full",align:"center",justify:t,children:(0,s.jsx)(n.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var s=i(24246),n=i(13577),l=i(88038),r=i.n(l),a=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(77830),c=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:l=!0,mainProps:u}=e,f=(0,o.hz)(),h=(0,a.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(f.flags.privacyRequestsConfiguration&&p),{data:y}=(0,d.JE)(void 0,{skip:m}),{data:x}=(0,d.PW)(void 0,{skip:m}),v=f.flags.privacyRequestsConfiguration&&(!y||!x)&&p;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[v?(0,s.jsx)(c,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),n=i(13577),l=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:a,rightContent:o,style:d,...u}=e;return(0,s.jsxs)("div",{...u,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)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(l.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(13577),l=i(79894),r=i.n(l),a=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,l=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let l=i===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),d)?a.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(r(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,s.jsx)(n.zrq,{items:l,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return r},M:function(){return l}});var s=i(76649),n=i(65218);let l=i.n(n)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),r=e=>(0,s.Ln)({name:"string"},e)&&"YAMLException"===e.name},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return z}});var s=i(24246),n=i(13577),l=i(86677),r=i(27378),a=i(16134),o=i(18225),d=i(77213),u=i(77830),c=i(58754),f=i(1315),h=i(66527),p=i(88340),m=i(812),y=i(46628),x=i(41207),v=i(41966),g=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",s=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(s)}return e};var k=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),l=(0,a.T)(),[o]=(0,v.TG)(),[d,u]=(0,r.useState)(""),c=(0,a.C)(b.fD),f=(0,a.C)(b.lR),{data:k,isLoading:w,refetch:T}=(0,g.Eg)(t,{skip:!t}),{data:C,refetch:E}=(0,g.tW)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||"",policyKey:f},{skip:!t||!(null==c?void 0:c.fides_key)||!f});(0,r.useEffect)(()=>{C&&l((0,b.x0)(C.reachable))},[C,l]);let R=(0,r.useMemo)(()=>((null==k?void 0:k.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==k?void 0:k.items]);(0,r.useEffect)(()=>{if((null==k?void 0:k.items.length)&&(!c||!k.items.find(e=>e.fides_key===c.fides_key))){let e=k.items[0];l((0,b.w7)(e))}},[k,c,l]),(0,r.useEffect)(()=>{(null==c?void 0:c.ctl_dataset)&&u(h.ZP.dump(_(null==c?void 0:c.ctl_dataset)))},[c]),(0,r.useEffect)(()=>{f&&(null==c?void 0:c.fides_key)&&t&&E()},[f,null==c?void 0:c.fides_key,t,E]),(0,r.useEffect)(()=>{C&&l((0,b.x0)(C.reachable))},[C,l]);let S=async e=>{let t=null==k?void 0:k.items.find(t=>t.fides_key===e);t&&l((0,b.w7)(t))},O=async()=>{let e;if(!c)return;try{e=h.ZP.load(d)}catch(e){i((0,y.Vo)("YAML Parsing Error: ".concat(e instanceof h._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,m.D4)(t)){i((0,y.Vo)((0,m.e$)(t.error)));return}l((0,b.w7)({fides_key:c.fides_key,ctl_dataset:t.data})),i((0,y.t5)("Successfully modified dataset")),await T(),await E()},N=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==c?void 0:c.fides_key));(null==t?void 0:t.ctl_dataset)&&u(h.ZP.dump(_(t.ctl_dataset))),i((0,y.t5)("Successfully refreshed datasets"))}catch(e){i((0,y.Vo)((0,m.e$)(e)))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Edit dataset: "}),(0,s.jsx)(n.WPr,{id:"format","data-testid":"export-format-select",value:(null==c?void 0:c.fides_key)||"",options:R,onChange:S,className:"w-64"}),(0,s.jsx)(p.Z,{copyText:d})]}),(0,s.jsxs)(n.Ugi,{spacing:2,children:[(0,s.jsx)(n.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:N,loading:w,children:"Refresh"})}),(0,s.jsx)(n.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",onClick:O,children:"Save"})})]})]}),(0,s.jsx)(n.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,s.jsx)(x.M,{defaultLanguage:"yaml",value:d,height:"100%",onChange:e=>u(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),C&&(0,s.jsx)(n.Kqy,{backgroundColor:(null==C?void 0:C.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==C?void 0:C.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,s.jsx)(n.Ugi,{alignItems:"center",children:(0,s.jsxs)(n.Ugi,{flex:"1",children:[(null==C?void 0:C.reachable)?(0,s.jsx)(n.StI,{}):(0,s.jsx)(n.f9v,{}),(0,s.jsx)(n.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==C?void 0:C.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==C?void 0:C.details))})]})})})]})},w=i(54458),T=i(16125),C=i(99716);let E=e=>{let t=new Date(e);return(0,w.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},R=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},S=(0,r.memo)(e=>{let{log:t}=e;return(0,s.jsxs)(n.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,s.jsx)(n.xvT,{as:"span",color:"green.500",children:E(t.timestamp)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:R(t.level),children:t.level.padEnd(8)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,s.jsx)(n.xvT,{as:"span",children:" - "}),(0,s.jsx)(n.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?R(t.level):"gray.800",children:t.message})]})});S.displayName="LogLine";var O=(0,r.memo)(()=>{let e=(0,a.T)(),t=(0,r.useRef)(null),i=(0,T.v9)(b.HN),l=(0,T.v9)(b.pz),{data:o}=(0,C.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,r.useEffect)(()=>{o&&e((0,b.Hy)(o))},[o,e]);let d=(0,r.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,r.useEffect)(()=>{d()},[l,d]);let u=(0,r.useMemo)(()=>(null==l?void 0:l.map(e=>"".concat(E(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[l]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test logs"}),(0,s.jsx)(p.Z,{copyText:u})]})}),(0,s.jsx)(n.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==l?void 0:l.map(e=>(0,s.jsx)(S,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),N=i(46238);let{useGetPoliciesQuery:P}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var q=i(54682),I=i(31883),M=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),l=(0,a.T)(),[o]=(0,g.s7)(),d=(0,T.v9)(b.fD),u=(0,T.v9)(b.YS),c=(0,T.v9)(b.Af),f=(0,T.v9)(b.zn),h=(0,T.v9)(b.lR),x=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,r.useState)("{}");(0,r.useEffect)(()=>{d&&j(JSON.stringify(f,null,2))},[d,f]);let{data:k,error:w}=(0,C.Z2)({privacy_request_id:v},{skip:!v||!(null==d?void 0:d.fides_key),pollingInterval:2e3}),{refetch:E}=(0,C.fV)({privacy_request_id:v},{skip:!v}),{refetch:R}=(0,g.I1)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||""},{skip:!t||!(null==d?void 0:d.fides_key),refetchOnMountOrArgChange:!0}),{data:S}=P(),O=(0,r.useMemo)(()=>((null==S?void 0:S.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==S?void 0:S.items]);(0,r.useEffect)(()=>{let e=null==d?void 0:d.fides_key;t&&e&&R().then(t=>{t.data&&(null==d?void 0:d.fides_key)===e&&l((0,b.qD)({datasetKey:e,values:t.data}))})},[d,t,l,R]),(0,r.useEffect)(()=>{let e=null==d?void 0:d.fides_key;if(w&&"status"in w&&404===w.status){l((0,b.hT)()),i((0,y.Vo)("Test run failed"));return}if(!k||k.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(k,null,2)};k.status===q.q2.COMPLETE?x&&E().then(()=>{l((0,b.EO)(t)),l((0,b.hT)()),i((0,y.t5)("Test run completed successfully"))}):k.status===q.q2.ERROR&&E().then(()=>{l((0,b.EO)(t)),l((0,b.hT)()),i((0,y.Vo)("Test run failed"))})},[k,w,v,d,x,l,i,E]);let M=(0,r.useMemo)(()=>h&&(null==S?void 0:S.items)?h:null,[h,null==S?void 0:S.items]),D=async()=>{if((null==d?void 0:d.fides_key)&&h)try{let e;try{e=JSON.parse(_)}catch(e){i((0,y.Vo)("Invalid JSON in test input"));return}l((0,b.Vh)(d.fides_key)),i((0,y.t5)("Test run started"));let s=await o({connection_key:t,dataset_key:d.fides_key,identities:e,policy_key:h});(0,I.D4)(s)?(i((0,y.Vo)((0,m.e$)(s.error))),l((0,b.hT)())):"data"in s?l((0,b.eY)(s.data.privacy_request_id)):(l((0,b.hT)()),i((0,y.Vo)("No privacy request ID in response")))}catch(e){l((0,b.hT)()),i((0,y.Vo)("Failed to start test run"))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test inputs"}),(0,s.jsx)(p.Z,{copyText:_})]}),(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:M,options:O,onChange:e=>{l((0,b.kF)(e))},className:"w-64"}),(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:x?()=>{l((0,b.qU)()),i((0,y.t5)("Test manually stopped by user"))}:D,disabled:!h||!u,children:x?"Stop":"Run"}),(0,s.jsx)(N.b,{label:x?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,s.jsx)(n.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:x,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);d&&l((0,b.qD)({datasetKey:d.fides_key,values:e}))}catch(e){}}}),(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",children:["Test results ",(0,s.jsx)(p.Z,{copyText:c})]}),(0,s.jsx)(n.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:c})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var z=()=>{var e;let t=(0,l.useRouter)(),i=(0,a.T)(),h=D(t.query),{data:p,isLoading:m}=(0,f.rn)(h,{skip:!h}),y=(null==p?void 0:null===(e=p.connection_configs)||void 0===e?void 0:e.key)||"";return((0,r.useEffect)(()=>{i((0,f.db)(p))},[p,i]),m)?(0,s.jsx)(d.Z,{title:"Systems",children:(0,s.jsx)(o.Z,{})}):(0,s.jsxs)(d.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,s.jsx)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:u.So},{title:(null==p?void 0:p.name)||"",href:"/systems/configure/".concat(h,"#integrations")},{title:"Test datasets"}]}),(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,s.jsxs)(n.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,s.jsx)(k,{connectionKey:y}),(0,s.jsx)(M,{connectionKey:y})]}),(0,s.jsx)(n.xuv,{flex:"0 0 auto",children:(0,s.jsx)(O,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return a},noSSR:function(){return r}});let s=i(51538);i(24246),i(27378);let n=s._(i(21887));function l(e){return{default:(null==e?void 0:e.default)||e}}function r(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let i=n.default,s={loading:e=>{let{error:t,isLoading:i,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let a=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?i({...s,loader:()=>null!=a?a().then(l):Promise.resolve(l(()=>null))}):(delete s.webpack,delete s.modules,r(i,s))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let s=i(51538)._(i(27378)),n=i(28438),l=[],r=[],a=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function o(){if(!l){let t=new d(e,i);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!a){let e=i.webpack?i.webpack():i.modules;e&&r.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(n.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let r=s.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),s.default.useMemo(()=>{var t;return r.loading||r.error?s.default.createElement(i.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:l.retry}):r.loaded?s.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let s=e.pop();i.push(s(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(l).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(a=!0,t());c(r,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var s=i(24246),n=i(27824);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,s.jsx)(n.kCb,{boxSize:"full",align:"center",justify:t,children:(0,s.jsx)(n.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var s=i(24246),n=i(27824),l=i(88038),r=i.n(l),a=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(77830),c=()=>{let e=(0,a.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:l=!0,mainProps:u}=e,f=(0,o.hz)(),h=(0,a.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(f.flags.privacyRequestsConfiguration&&p),{data:y}=(0,d.JE)(void 0,{skip:m}),{data:x}=(0,d.PW)(void 0,{skip:m}),v=f.flags.privacyRequestsConfiguration&&(!y||!x)&&p;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[v?(0,s.jsx)(c,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),n=i(27824),l=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:a,rightContent:o,style:d,...u}=e;return(0,s.jsxs)("div",{...u,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)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(l.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(27824),l=i(79894),r=i.n(l),a=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,l=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let l=i===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:a.title})),d)?a.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,s.jsx)(r(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,s.jsx)(n.zrq,{items:l,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return r},M:function(){return l}});var s=i(76649),n=i(65218);let l=i.n(n)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),r=e=>(0,s.Ln)({name:"string"},e)&&"YAMLException"===e.name},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return z}});var s=i(24246),n=i(27824),l=i(86677),r=i(27378),a=i(16134),o=i(18225),d=i(77213),u=i(77830),c=i(58754),f=i(1315),h=i(66527),p=i(88340),m=i(812),y=i(46628),x=i(41207),v=i(41966),g=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",s=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(s)}return e};var k=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),l=(0,a.T)(),[o]=(0,v.TG)(),[d,u]=(0,r.useState)(""),c=(0,a.C)(b.fD),f=(0,a.C)(b.lR),{data:k,isLoading:w,refetch:T}=(0,g.Eg)(t,{skip:!t}),{data:C,refetch:E}=(0,g.tW)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||"",policyKey:f},{skip:!t||!(null==c?void 0:c.fides_key)||!f});(0,r.useEffect)(()=>{C&&l((0,b.x0)(C.reachable))},[C,l]);let R=(0,r.useMemo)(()=>((null==k?void 0:k.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==k?void 0:k.items]);(0,r.useEffect)(()=>{if((null==k?void 0:k.items.length)&&(!c||!k.items.find(e=>e.fides_key===c.fides_key))){let e=k.items[0];l((0,b.w7)(e))}},[k,c,l]),(0,r.useEffect)(()=>{(null==c?void 0:c.ctl_dataset)&&u(h.ZP.dump(_(null==c?void 0:c.ctl_dataset)))},[c]),(0,r.useEffect)(()=>{f&&(null==c?void 0:c.fides_key)&&t&&E()},[f,null==c?void 0:c.fides_key,t,E]),(0,r.useEffect)(()=>{C&&l((0,b.x0)(C.reachable))},[C,l]);let S=async e=>{let t=null==k?void 0:k.items.find(t=>t.fides_key===e);t&&l((0,b.w7)(t))},O=async()=>{let e;if(!c)return;try{e=h.ZP.load(d)}catch(e){i((0,y.Vo)("YAML Parsing Error: ".concat(e instanceof h._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,m.D4)(t)){i((0,y.Vo)((0,m.e$)(t.error)));return}l((0,b.w7)({fides_key:c.fides_key,ctl_dataset:t.data})),i((0,y.t5)("Successfully modified dataset")),await T(),await E()},N=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==c?void 0:c.fides_key));(null==t?void 0:t.ctl_dataset)&&u(h.ZP.dump(_(t.ctl_dataset))),i((0,y.t5)("Successfully refreshed datasets"))}catch(e){i((0,y.Vo)((0,m.e$)(e)))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Edit dataset: "}),(0,s.jsx)(n.WPr,{id:"format","data-testid":"export-format-select",value:(null==c?void 0:c.fides_key)||"",options:R,onChange:S,className:"w-64"}),(0,s.jsx)(p.Z,{copyText:d})]}),(0,s.jsxs)(n.Ugi,{spacing:2,children:[(0,s.jsx)(n.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:N,loading:w,children:"Refresh"})}),(0,s.jsx)(n.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",onClick:O,children:"Save"})})]})]}),(0,s.jsx)(n.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,s.jsx)(x.M,{defaultLanguage:"yaml",value:d,height:"100%",onChange:e=>u(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),C&&(0,s.jsx)(n.Kqy,{backgroundColor:(null==C?void 0:C.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==C?void 0:C.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,s.jsx)(n.Ugi,{alignItems:"center",children:(0,s.jsxs)(n.Ugi,{flex:"1",children:[(null==C?void 0:C.reachable)?(0,s.jsx)(n.StI,{}):(0,s.jsx)(n.f9v,{}),(0,s.jsx)(n.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==C?void 0:C.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==C?void 0:C.details))})]})})})]})},w=i(54458),T=i(16125),C=i(99716);let E=e=>{let t=new Date(e);return(0,w.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},R=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},S=(0,r.memo)(e=>{let{log:t}=e;return(0,s.jsxs)(n.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,s.jsx)(n.xvT,{as:"span",color:"green.500",children:E(t.timestamp)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:R(t.level),children:t.level.padEnd(8)}),(0,s.jsx)(n.xvT,{as:"span",children:" | "}),(0,s.jsx)(n.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,s.jsx)(n.xvT,{as:"span",children:" - "}),(0,s.jsx)(n.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?R(t.level):"gray.800",children:t.message})]})});S.displayName="LogLine";var O=(0,r.memo)(()=>{let e=(0,a.T)(),t=(0,r.useRef)(null),i=(0,T.v9)(b.HN),l=(0,T.v9)(b.pz),{data:o}=(0,C.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,r.useEffect)(()=>{o&&e((0,b.Hy)(o))},[o,e]);let d=(0,r.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,r.useEffect)(()=>{d()},[l,d]);let u=(0,r.useMemo)(()=>(null==l?void 0:l.map(e=>"".concat(E(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[l]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test logs"}),(0,s.jsx)(p.Z,{copyText:u})]})}),(0,s.jsx)(n.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==l?void 0:l.map(e=>(0,s.jsx)(S,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),N=i(46238);let{useGetPoliciesQuery:P}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var q=i(54682),I=i(31883),M=e=>{let{connectionKey:t}=e,i=(0,n.pmc)(),l=(0,a.T)(),[o]=(0,g.s7)(),d=(0,T.v9)(b.fD),u=(0,T.v9)(b.YS),c=(0,T.v9)(b.Af),f=(0,T.v9)(b.zn),h=(0,T.v9)(b.lR),x=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,r.useState)("{}");(0,r.useEffect)(()=>{d&&j(JSON.stringify(f,null,2))},[d,f]);let{data:k,error:w}=(0,C.Z2)({privacy_request_id:v},{skip:!v||!(null==d?void 0:d.fides_key),pollingInterval:2e3}),{refetch:E}=(0,C.fV)({privacy_request_id:v},{skip:!v}),{refetch:R}=(0,g.I1)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||""},{skip:!t||!(null==d?void 0:d.fides_key),refetchOnMountOrArgChange:!0}),{data:S}=P(),O=(0,r.useMemo)(()=>((null==S?void 0:S.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==S?void 0:S.items]);(0,r.useEffect)(()=>{let e=null==d?void 0:d.fides_key;t&&e&&R().then(t=>{t.data&&(null==d?void 0:d.fides_key)===e&&l((0,b.qD)({datasetKey:e,values:t.data}))})},[d,t,l,R]),(0,r.useEffect)(()=>{let e=null==d?void 0:d.fides_key;if(w&&"status"in w&&404===w.status){l((0,b.hT)()),i((0,y.Vo)("Test run failed"));return}if(!k||k.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(k,null,2)};k.status===q.q2.COMPLETE?x&&E().then(()=>{l((0,b.EO)(t)),l((0,b.hT)()),i((0,y.t5)("Test run completed successfully"))}):k.status===q.q2.ERROR&&E().then(()=>{l((0,b.EO)(t)),l((0,b.hT)()),i((0,y.Vo)("Test run failed"))})},[k,w,v,d,x,l,i,E]);let M=(0,r.useMemo)(()=>h&&(null==S?void 0:S.items)?h:null,[h,null==S?void 0:S.items]),D=async()=>{if((null==d?void 0:d.fides_key)&&h)try{let e;try{e=JSON.parse(_)}catch(e){i((0,y.Vo)("Invalid JSON in test input"));return}l((0,b.Vh)(d.fides_key)),i((0,y.t5)("Test run started"));let s=await o({connection_key:t,dataset_key:d.fides_key,identities:e,policy_key:h});(0,I.D4)(s)?(i((0,y.Vo)((0,m.e$)(s.error))),l((0,b.hT)())):"data"in s?l((0,b.eY)(s.data.privacy_request_id)):(l((0,b.hT)()),i((0,y.Vo)("No privacy request ID in response")))}catch(e){l((0,b.hT)()),i((0,y.Vo)("Failed to start test run"))}};return(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.xvT,{children:"Test inputs"}),(0,s.jsx)(p.Z,{copyText:_})]}),(0,s.jsxs)(n.Ugi,{children:[(0,s.jsx)(n.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:M,options:O,onChange:e=>{l((0,b.kF)(e))},className:"w-64"}),(0,s.jsx)(n.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:x?()=>{l((0,b.qU)()),i((0,y.t5)("Test manually stopped by user"))}:D,disabled:!h||!u,children:x?"Stop":"Run"}),(0,s.jsx)(N.b,{label:x?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,s.jsx)(n.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:x,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);d&&l((0,b.qD)({datasetKey:d.fides_key,values:e}))}catch(e){}}}),(0,s.jsxs)(n.X6q,{as:"h3",size:"sm",children:["Test results ",(0,s.jsx)(p.Z,{copyText:c})]}),(0,s.jsx)(n.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:c})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var z=()=>{var e;let t=(0,l.useRouter)(),i=(0,a.T)(),h=D(t.query),{data:p,isLoading:m}=(0,f.rn)(h,{skip:!h}),y=(null==p?void 0:null===(e=p.connection_configs)||void 0===e?void 0:e.key)||"";return((0,r.useEffect)(()=>{i((0,f.db)(p))},[p,i]),m)?(0,s.jsx)(d.Z,{title:"Systems",children:(0,s.jsx)(o.Z,{})}):(0,s.jsxs)(d.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,s.jsx)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:u.So},{title:(null==p?void 0:p.name)||"",href:"/systems/configure/".concat(h,"#integrations")},{title:"Test datasets"}]}),(0,s.jsxs)(n.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,s.jsxs)(n.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,s.jsx)(k,{connectionKey:y}),(0,s.jsx)(M,{connectionKey:y})]}),(0,s.jsx)(n.xuv,{flex:"0 0 auto",children:(0,s.jsx)(O,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return a},noSSR:function(){return r}});let s=i(51538);i(24246),i(27378);let n=s._(i(21887));function l(e){return{default:(null==e?void 0:e.default)||e}}function r(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let i=n.default,s={loading:e=>{let{error:t,isLoading:i,pastDelay:s}=e;return null}};e instanceof Promise?s.loader=()=>e:"function"==typeof e?s.loader=e:"object"==typeof e&&(s={...s,...e});let a=(s={...s,...t}).loader;return(s.loadableGenerated&&(s={...s,...s.loadableGenerated},delete s.loadableGenerated),"boolean"!=typeof s.ssr||s.ssr)?i({...s,loader:()=>null!=a?a().then(l):Promise.resolve(l(()=>null))}):(delete s.webpack,delete s.modules,r(i,s))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let s=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let s=i(51538)._(i(27378)),n=i(28438),l=[],r=[],a=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function o(){if(!l){let t=new d(e,i);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!a){let e=i.webpack?i.webpack():i.modules;e&&r.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=s.default.useContext(n.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let r=s.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return s.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),s.default.useMemo(()=>{var t;return r.loading||r.error?s.default.createElement(i.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:l.retry}):r.loaded?s.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return u.preload=()=>o(),u.displayName="LoadableComponent",s.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let s=e.pop();i.push(s(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(l).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(a=!0,t());c(r,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(13577);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(13577),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[8765,9278,5163,699,5277,409,401,9951,6780,3450,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3691],{8828:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]",function(){return s(82657)}])},18225:function(e,t,s){"use strict";var n=s(24246),i=s(27824);t.Z=e=>{let{alignment:t="center",...s}=e;return(0,n.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(i.$jN,{color:"primary",...s})})}},82657:function(e,t,s){"use strict";s.r(t);var n=s(24246),i=s(27824),r=s(86677),a=s(27378),l=s(16134),d=s(25980),u=s(18225),c=s(812),o=s(14048),f=s(77213),x=s(77830),h=s(58754),m=s(32885),y=s(1315),j=s(57865),g=s(72774),_=s(72250);t.default=()=>{let e=(0,r.useRouter)(),t=(0,l.T)(),s="";e.query.id&&(s=Array.isArray(e.query.id)?e.query.id[0]:e.query.id);let{data:p,isLoading:b}=(0,y.rn)(s,{skip:!s}),{error:v,isLoading:w}=(0,m.Rd)(),{tcf:C,plus:N}=(0,d.hz)(),Z=(0,l.C)(j.gU);(0,a.useEffect)(()=>{if(t((0,y.db)(p)),p){let e=C&&!!p.vendor_id&&(0,c.cj)(p.vendor_id)===c.c6.GVL;t((0,j.gQ)(e))}else(0,j.gQ)(!1)},[p,t,C]);let{tabData:k,activeKey:E,onTabChange:S}=(0,_.Z)({isCreate:!1});return(b||w)&&!v?(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsx)(u.Z,{})}):p?(0,n.jsxs)(f.Z,{title:"System inventory",mainProps:{w:"calc(100vw - 240px)"},children:[(0,n.jsx)(h.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems",href:x.So},{title:(null==p?void 0:p.name)||""}]}),(0,n.jsx)(i.A5g,{activeKey:E,onChange:S,items:k,className:"w-full",tabBarExtraContent:N&&(0,n.jsxs)(i.wpx,{size:"small",className:"absolute right-2 top-2","data-testid":"integration-page-btn",onClick:()=>e.push(x.KH),children:[(0,n.jsx)(i.xvT,{children:"Integrations"}),(0,n.jsx)(o.A5,{marginLeft:2})]}),renderTabBar:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t,{...e}),Z&&(0,n.jsx)(g.Z,{})]})})]}):(0,n.jsx)(f.Z,{title:"Systems",children:(0,n.jsxs)(i.xvT,{"data-testid":"system-not-found",children:["Could not find a system with id ",s]})})}}},function(e){e.O(0,[8765,9278,5163,699,5277,409,401,9951,6780,3450,2888,9774,179],function(){return e(e.s=8828)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{90988:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems",function(){return s(49465)}])},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return n}});var i=s(24246);let n=(0,s(13577).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,s){"use strict";s.d(t,{Z:function(){return m}});var i=s(24246),n=s(13577),a=s(88038),r=s.n(a),l=s(86677);s(27378);var o=s(25980),c=s(90867),d=s(77830),u=()=>{let e=(0,l.useRouter)();return(0,i.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:s,padded:a=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,l.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:g}=(0,c.JE)(void 0,{skip:h}),{data:f}=(0,c.PW)(void 0,{skip:h}),j=m.flags.privacyRequestsConfiguration&&(!g||!f)&&x;return(0,i.jsxs)(n.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,s){"use strict";var i=s(24246),n=s(13577),a=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:l,rightContent:o,style:c,...d}=e;return(0,i.jsxs)("div",{...d,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",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(n.lQT,{className:s||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,i.jsx)(a.m,{className:l?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),l]})}},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return r}});var i=s(24246),n=s(16134),a=s(31793);let r=e=>(0,n.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return r(t)?(0,i.jsx)(i.Fragment,{children:s}):null}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return c}});var i=s(24246),n=s(13577),a=s(79894),r=s.n(a),l=s(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:t,...s}=e,a=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let a=s===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:l.title})),c)?l.title=(0,i.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(n.zrq,{items:a,...s})}},49465:function(e,t,s){"use strict";s.r(t);var i=s(24246),n=s(92222),a=s(59003),r=s(13577),l=s(86677),o=s(27378),c=s(16134),d=s(812),u=s(56358),m=s(77213),p=s(77830),x=s(58754),h=s(19904),g=s(47935),f=s(46628),j=s(1315),C=s(54682),y=s(31883);let v=(0,n.Cl)(),b={items:[],total:0,page:1,size:25,pages:1},w=()=>(0,i.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:[(0,i.jsxs)(r.gCW,{children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No systems found."}),(0,i.jsx)(r.xvT,{fontSize:"sm",children:'Click "Add a system" to add your first system to Fides.'})]}),(0,i.jsx)(r.wpx,{href:p.xo,size:"small",type:"primary","data-testid":"add-privacy-notice-btn",children:"Add a system +"})]});t.default=()=>{let e=(0,l.useRouter)(),t=(0,c.T)(),s=(0,r.pmc)(),{isOpen:k,onOpen:R,onClose:_}=(0,r.qY0)(),[T]=(0,j.DW)(),[z,N]=o.useState(null),{PAGE_SIZES:H,pageSize:P,setPageSize:S,onPreviousPageClick:M,isPreviousPageDisabled:V,onNextPageClick:D,isNextPageDisabled:E,startRange:Z,endRange:q,pageIndex:F,setTotalPages:W,resetPageIndexToDefault:L}=(0,g.oi)(),[A,I]=(0,o.useState)(),O=(0,o.useCallback)(e=>{L(),I(e)},[L,I]),{data:B,isLoading:G,isFetching:Y}=(0,j.xF)({page:F,size:P,search:A}),{items:Q,total:U,pages:K}=(0,o.useMemo)(()=>null!=B?B:b,[B]);(0,o.useEffect)(()=>{W(K)},[K,W]);let X=e=>e.name&&""!==e.name?e.name:e.fides_key,$=(0,o.useCallback)(s=>{t((0,j.db)(s)),e.push({pathname:p.Dv,query:{id:s.fides_key},hash:"#information"})},[t,e]),J=async e=>{let t=await T(e.fides_key);(0,y.D4)(t)?s((0,f.Vo)((0,d.e$)(t.error))):s((0,f.t5)("Successfully deleted system")),_()},ee=(0,o.useMemo)(()=>[v.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(g.G3,{value:X(e.row.original)}),header:e=>(0,i.jsx)(g.Rr,{value:"System Name",...e}),size:200}),v.accessor(e=>e.description,{id:"description",header:e=>(0,i.jsx)(g.Rr,{value:"Description",...e}),cell:e=>(0,i.jsx)(g.G3,{value:e.getValue(),cellProps:e}),size:300,meta:{showHeaderMenu:!0}}),v.accessor(e=>e.administrating_department,{id:"department",cell:e=>(0,i.jsx)(g.G3,{value:e.getValue()}),header:e=>(0,i.jsx)(g.Rr,{value:"Department",...e}),size:200}),v.accessor(e=>e.processes_personal_data,{id:"processes_personal_data",cell:e=>(0,i.jsx)(g.G3,{value:e.getValue()?"Yes":"No"}),header:e=>(0,i.jsx)(g.Rr,{value:"Processes Personal Data",...e}),size:100}),v.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,s=t.original;return(0,i.jsxs)(r.Ugi,{spacing:0,"data-testid":"system-".concat(s.fides_key),children:[(0,i.jsx)(r.wpx,{"aria-label":"Edit property","data-testid":"edit-btn",size:"small",className:"mr-2",icon:(0,i.jsx)(r.dY8,{}),onClick:()=>$(s)}),(0,i.jsx)(h.ZP,{scopes:[C.Sh.SYSTEM_DELETE],children:(0,i.jsx)(r.wpx,{"aria-label":"Delete system","data-testid":"delete-btn",size:"small",className:"mr-2",icon:(0,i.jsx)(u.q,{}),onClick:()=>{N(s),R()}})})]})},meta:{disableRowClick:!0}})],[$,R]),et=(0,a.b7)({getCoreRowModel:(0,n.sC)(),getFilteredRowModel:(0,n.vL)(),getSortedRowModel:(0,n.tj)(),columnResizeMode:"onChange",columns:ee,data:Q});return(0,i.jsx)(m.Z,{title:"System inventory",children:(0,i.jsxs)(r.xuv,{"data-testid":"system-management",children:[(0,i.jsx)(x.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems"}]}),G?(0,i.jsx)(g.I4,{rowHeight:36,numRows:15}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Q$,{children:(0,i.jsx)(g.HO,{globalFilter:A,setGlobalFilter:O,placeholder:"Search",testid:"system-search"})}),(0,i.jsx)(g.ZK,{tableInstance:et,emptyTableNotice:(0,i.jsx)(w,{}),onRowClick:$})]}),(0,i.jsx)(g.s8,{totalRows:U||0,pageSizes:H,setPageSize:S,onPreviousPageClick:M,isPreviousPageDisabled:V||Y,onNextPageClick:D,isNextPageDisabled:E||Y,startRange:Z,endRange:q}),(0,i.jsx)(r.cVQ,{isOpen:k,onClose:_,onConfirm:()=>J(z),title:"Delete ".concat(z&&X(z)),message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.xvT,{children:["You are about to permanently delete the system"," ",(0,i.jsx)(r.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",whiteSpace:"nowrap",children:z&&X(z)}),"."]}),(0,i.jsx)(r.xvT,{children:"Are you sure you would like to continue?"})]})})]})})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=90988)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{90988:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems",function(){return s(49465)}])},56358:function(e,t,s){"use strict";s.d(t,{q:function(){return n}});var i=s(24246);let n=(0,s(27824).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,s){"use strict";s.d(t,{Z:function(){return m}});var i=s(24246),n=s(27824),a=s(88038),r=s.n(a),l=s(86677);s(27378);var o=s(25980),c=s(90867),d=s(77830),u=()=>{let e=(0,l.useRouter)();return(0,i.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(n.xuv,{children:[(0,i.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(n.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:s,padded:a=!0,mainProps:d}=e,m=(0,o.hz)(),p=(0,l.useRouter)(),x="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&x),{data:g}=(0,c.JE)(void 0,{skip:h}),{data:f}=(0,c.PW)(void 0,{skip:h}),j=m.flags.privacyRequestsConfiguration&&(!g||!f)&&x;return(0,i.jsxs)(n.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,s){"use strict";var i=s(24246),n=s(27824),a=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:l,rightContent:o,style:c,...d}=e;return(0,i.jsxs)("div",{...d,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",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(n.lQT,{className:s||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,i.jsx)(a.m,{className:l?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),l]})}},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return r}});var i=s(24246),n=s(16134),a=s(31793);let r=e=>(0,n.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return r(t)?(0,i.jsx)(i.Fragment,{children:s}):null}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return c}});var i=s(24246),n=s(27824),a=s(79894),r=s.n(a),l=s(27378);let{Text:o}=n.AntTypography,c=e=>{let{items:t,...s}=e,a=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let a=s===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:l.title})),c)?l.title=(0,i.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(n.zrq,{items:a,...s})}},49465:function(e,t,s){"use strict";s.r(t);var i=s(24246),n=s(92222),a=s(59003),r=s(27824),l=s(86677),o=s(27378),c=s(16134),d=s(812),u=s(56358),m=s(77213),p=s(77830),x=s(58754),h=s(19904),g=s(47935),f=s(46628),j=s(1315),C=s(54682),y=s(31883);let v=(0,n.Cl)(),b={items:[],total:0,page:1,size:25,pages:1},w=()=>(0,i.jsxs)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:[(0,i.jsxs)(r.gCW,{children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No systems found."}),(0,i.jsx)(r.xvT,{fontSize:"sm",children:'Click "Add a system" to add your first system to Fides.'})]}),(0,i.jsx)(r.wpx,{href:p.xo,size:"small",type:"primary","data-testid":"add-privacy-notice-btn",children:"Add a system +"})]});t.default=()=>{let e=(0,l.useRouter)(),t=(0,c.T)(),s=(0,r.pmc)(),{isOpen:k,onOpen:R,onClose:_}=(0,r.qY0)(),[T]=(0,j.DW)(),[z,N]=o.useState(null),{PAGE_SIZES:H,pageSize:P,setPageSize:S,onPreviousPageClick:M,isPreviousPageDisabled:V,onNextPageClick:D,isNextPageDisabled:E,startRange:Z,endRange:q,pageIndex:F,setTotalPages:W,resetPageIndexToDefault:L}=(0,g.oi)(),[A,I]=(0,o.useState)(),O=(0,o.useCallback)(e=>{L(),I(e)},[L,I]),{data:B,isLoading:G,isFetching:Y}=(0,j.xF)({page:F,size:P,search:A}),{items:Q,total:U,pages:K}=(0,o.useMemo)(()=>null!=B?B:b,[B]);(0,o.useEffect)(()=>{W(K)},[K,W]);let X=e=>e.name&&""!==e.name?e.name:e.fides_key,$=(0,o.useCallback)(s=>{t((0,j.db)(s)),e.push({pathname:p.Dv,query:{id:s.fides_key},hash:"#information"})},[t,e]),J=async e=>{let t=await T(e.fides_key);(0,y.D4)(t)?s((0,f.Vo)((0,d.e$)(t.error))):s((0,f.t5)("Successfully deleted system")),_()},ee=(0,o.useMemo)(()=>[v.accessor(e=>e.name,{id:"name",cell:e=>(0,i.jsx)(g.G3,{value:X(e.row.original)}),header:e=>(0,i.jsx)(g.Rr,{value:"System Name",...e}),size:200}),v.accessor(e=>e.description,{id:"description",header:e=>(0,i.jsx)(g.Rr,{value:"Description",...e}),cell:e=>(0,i.jsx)(g.G3,{value:e.getValue(),cellProps:e}),size:300,meta:{showHeaderMenu:!0}}),v.accessor(e=>e.administrating_department,{id:"department",cell:e=>(0,i.jsx)(g.G3,{value:e.getValue()}),header:e=>(0,i.jsx)(g.Rr,{value:"Department",...e}),size:200}),v.accessor(e=>e.processes_personal_data,{id:"processes_personal_data",cell:e=>(0,i.jsx)(g.G3,{value:e.getValue()?"Yes":"No"}),header:e=>(0,i.jsx)(g.Rr,{value:"Processes Personal Data",...e}),size:100}),v.display({id:"actions",header:"Actions",cell:e=>{let{row:t}=e,s=t.original;return(0,i.jsxs)(r.Ugi,{spacing:0,"data-testid":"system-".concat(s.fides_key),children:[(0,i.jsx)(r.wpx,{"aria-label":"Edit property","data-testid":"edit-btn",size:"small",className:"mr-2",icon:(0,i.jsx)(r.dY8,{}),onClick:()=>$(s)}),(0,i.jsx)(h.ZP,{scopes:[C.Sh.SYSTEM_DELETE],children:(0,i.jsx)(r.wpx,{"aria-label":"Delete system","data-testid":"delete-btn",size:"small",className:"mr-2",icon:(0,i.jsx)(u.q,{}),onClick:()=>{N(s),R()}})})]})},meta:{disableRowClick:!0}})],[$,R]),et=(0,a.b7)({getCoreRowModel:(0,n.sC)(),getFilteredRowModel:(0,n.vL)(),getSortedRowModel:(0,n.tj)(),columnResizeMode:"onChange",columns:ee,data:Q});return(0,i.jsx)(m.Z,{title:"System inventory",children:(0,i.jsxs)(r.xuv,{"data-testid":"system-management",children:[(0,i.jsx)(x.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems"}]}),G?(0,i.jsx)(g.I4,{rowHeight:36,numRows:15}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Q$,{children:(0,i.jsx)(g.HO,{globalFilter:A,setGlobalFilter:O,placeholder:"Search",testid:"system-search"})}),(0,i.jsx)(g.ZK,{tableInstance:et,emptyTableNotice:(0,i.jsx)(w,{}),onRowClick:$})]}),(0,i.jsx)(g.s8,{totalRows:U||0,pageSizes:H,setPageSize:S,onPreviousPageClick:M,isPreviousPageDisabled:V||Y,onNextPageClick:D,isNextPageDisabled:E||Y,startRange:Z,endRange:q}),(0,i.jsx)(r.cVQ,{isOpen:k,onClose:_,onConfirm:()=>J(z),title:"Delete ".concat(z&&X(z)),message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.xvT,{children:["You are about to permanently delete the system"," ",(0,i.jsx)(r.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",whiteSpace:"nowrap",children:z&&X(z)}),"."]}),(0,i.jsx)(r.xvT,{children:"Are you sure you would like to continue?"})]})})]})})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=90988)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{96586:function(e,t,n){var r=n(57753),i=n(82452),o=n(22115),a=n(38256),l=n(67426);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},36301:function(e,t,n){var r=n(69417),i=n(72470),o=n(66165),a=n(71873),l=n(52556);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},44538:function(e,t,n){var r=n(81822)(n(77400),"Map");e.exports=r},74554:function(e,t,n){var r=n(39448),i=n(7738),o=n(66575),a=n(7238),l=n(38738);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},46151:function(e,t,n){var r=n(81822)(n(77400),"Set");e.exports=r},52485:function(e,t,n){var r=n(74554),i=n(38639),o=n(88379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},93382:function(e,t,n){var r=n(85638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},46729:function(e,t,n){var r=n(28338),i=n(99678),o=n(11611),a=n(76532),l=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,c=s.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:l).test(a(e))}},75733:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},70830:function(e,t,n){var r=n(76747),i=n(31159),o=n(64373),a=n(37948);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},65581:function(e){e.exports=function(e,t){return e.has(t)}},64937:function(e,t,n){var r=n(77400)["__core-js_shared__"];e.exports=r},95899:function(e,t,n){var r=n(54479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81822:function(e,t,n){var r=n(46729),i=n(15371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},15371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},57753:function(e,t,n){var r=n(35718);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},82452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},22115:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},38256:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},67426:function(e,t,n){var r=n(35718);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},54479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},99678:function(e,t,n){var r,i=n(64937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},69417:function(e){e.exports=function(){this.__data__=[],this.size=0}},72470:function(e,t,n){var r=n(93382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},66165:function(e,t,n){var r=n(93382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},71873:function(e,t,n){var r=n(93382);e.exports=function(e){return r(this.__data__,e)>-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},39448:function(e,t,n){var r=n(96586),i=n(36301),o=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},64373:function(e,t,n){var r=n(79867),i=n(75733);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},38639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:function(e){e.exports=function(e){return this.__data__.has(e)}},43735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},28338:function(e,t,n){var r=n(99736),i=n(11611);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43551:function(e,t,n){var r=n(70830);e.exports=function(e,t){return null==e||r(e,t)}},71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(62e3)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return l},zR:function(){return a}});var r=n(24246),i=n(13577),o=n(56358);let a=e=>{let{title:t}=e;return(0,r.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,r.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},l=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:l}=e;return(0,r.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,r.jsx)(i.wpx,{"aria-label":"delete",icon:(0,r.jsx)(o.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,r.jsxs)("div",{className:"flex gap-2",children:[n&&(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:l,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:o,onClose:a,children:l,footer:s}=e;return(0,r.jsxs)(i.dys,{placement:"right",isOpen:o,onClose:a,size:"md",children:[(0,r.jsx)(i.P1B,{}),(0,r.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,r.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,r.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,r.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,r.jsx)(i.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,r.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,r.jsxs)(i.Ng0,{pt:1,children:[n?(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,l]}),s]})]})}},18225:function(e,t,n){"use strict";var r=n(24246),i=n(13577);t.Z=e=>{let{alignment:t="center",...n}=e;return(0,r.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,r.jsx)(i.$jN,{color:"primary",...n})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(24246);let i=(0,n(13577).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,r.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(24246),i=n(13577),o=n(88038),a=n.n(o),l=n(86677);n(27378);var s=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,l.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:o=!0,mainProps:c}=e,h=(0,s.hz)(),p=(0,l.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(h.flags.privacyRequestsConfiguration&&f),{data:m}=(0,u.JE)(void 0,{skip:x}),{data:v}=(0,u.PW)(void 0,{skip:x}),_=h.flags.privacyRequestsConfiguration&&(!m||!v)&&f;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[_?(0,r.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var r=n(24246),i=n(13577),o=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:s,style:u,...c}=e;return(0,r.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,s&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:s})]}),!!n&&(0,r.jsx)(o.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),o=n(31793);let a=e=>(0,i.C)(o.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76649);let i=e=>(0,r.Ln)({id:"string"},e),o=e=>(null!=e?e:[]).filter(i)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(27378),i=n(25980),o=n(14047),a=n(32885),l=n(94799);let s=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:s}=(0,o.V)(),{plus:u}=(0,i.hz)(),c=(0,r.useMemo)(()=>null!=t?t:"",[]),d=(0,a.YU)(!0,{skip:!u}),h=(0,a.VN)(n,{skip:!u}),{data:p,isLoading:f,error:x,isError:m}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(u&&c)}),[v]=(0,a._D)(),_=d.isLoading||h.isLoading||f,y=(0,r.useMemo)(()=>new Map((0,l.k)(d.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[d.data]),g=(0,r.useMemo)(()=>{var e;return null===(e=h.data)||void 0===e?void 0:e.filter(e=>e.active)},[h.data]),j=(0,r.useMemo)(()=>new Map((0,l.k)(g).map(e=>[e.id,e])),[g]),T=(0,r.useMemo)(()=>m&&(null==x?void 0:x.status)===404?new Map:new Map((0,l.k)(p).map(e=>[e.custom_field_definition_id,e])),[p,m,x]),E=(0,r.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),C=(0,r.useMemo)(()=>{let e={};return g&&T&&g.forEach(t=>{let n=T.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[g,T]),A=(0,r.useCallback)(async e=>{if(!u)return;let r="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!r)return;let{customFieldValues:i}=e;if(!i||0===Object.keys(i).length)return;let o=[],a=[];E.forEach(e=>{let t=T.get(e),n=i[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):o.push({custom_field_definition_id:e,resource_id:r,id:null==t?void 0:t.id,value:n})});try{await v({resource_type:n,resource_id:r,upsert:o,delete:a})}catch(e){s("One or more custom fields have failed to save, please try again."),console.error(e)}},[u,T,s,t,E,v,n]);return{customFieldValues:C,definitionIdToCustomField:T,idToAllowListWithOptions:y,idToCustomFieldDefinition:j,isEnabled:u,isLoading:_,sortedCustomFieldDefinitionIds:E,upsertCustomFields:A}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return v},Hn:function(){return s},Uv:function(){return a},C7:function(){return u},mZ:function(){return m.m}});var r,i,o,a,l=n(54682);(r=o||(o={}))[r.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",r[r.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",r[r.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",l.AL.STRING,l.AL.STRING_,(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.OPEN_TEXT="openText";let s=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],u=[{label:"taxonomy:".concat(l.P6.DATA_CATEGORY),value:l.P6.DATA_CATEGORY},{label:"taxonomy:".concat(l.P6.DATA_SUBJECT),value:l.P6.DATA_SUBJECT},{label:"taxonomy:".concat(l.P6.DATA_USE),value:l.P6.DATA_USE},{label:"".concat(l.P6.SYSTEM,":information"),value:l.P6.SYSTEM},{label:"system:data use",value:l.P6.PRIVACY_DECLARATION}];var c=n(24246),d=n(13577),h=n(34090),p=n(30234),f=n(97181),x=n(40324),m=n(30320);let v=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:r,idToCustomFieldDefinition:i,isEnabled:o,isLoading:a,sortedCustomFieldDefinitionIds:s}=(0,m.m)({resourceFidesKey:t,resourceType:n});return o&&0!==s.length?(0,c.jsx)(p.Z,{heading:"Custom fields",children:(0,c.jsx)(d.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(d.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(d.M5Y,{children:(0,c.jsx)(d.$jN,{})}):s.length>0&&(0,c.jsx)(d.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:s.map(e=>{let t=i.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===l.AL.STRING)return(0,c.jsx)(h.gN,{name:n,children:e=>{let{field:n}=e;return(0,c.jsx)(x.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let o=r.get(t.allow_list_id);if(!o)return null;let{options:a}=o;return(0,c.jsx)(f.d,{name:n,allowClear:!0,mode:t.field_type!==l.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(24246),i=n(13577),o=n(34090),a=n(27378),l=n(46238),s=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:h="inline",helperText:p,...f}=e,[x,m,{setValue:v}]=(0,o.U$)(t),_=!!(m.touched&&m.error),[y,g]=(0,a.useState)("");x.value||"tags"!==f.mode&&"multiple"!==f.mode||(x.value=[]),"tags"===f.mode&&"string"==typeof x.value&&(x.value=[x.value]);let j="tags"===f.mode?(e,t)=>e?e.value!==y||x.value.includes(y)?f.optionRender?f.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:f.optionRender||void 0,T=e=>{g(e),f.onSearch&&f.onSearch(e)},E=(e,t)=>{v(e),f.onChange&&f.onChange(e,t)};return"inline"===h?(0,r.jsx)(i.NIc,{isInvalid:_,isRequired:d,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(s.__,{htmlFor:f.id||t,...u,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...x,id:f.id||t,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:j,onSearch:"tags"===f.mode?T:void 0,onChange:E,value:x.value||void 0,status:_?"error":void 0}),p&&(0,r.jsx)(i.Q6r,{children:p}),(0,r.jsx)(s.Bc,{isInvalid:_,message:m.error,fieldName:x.name})]}),(0,r.jsx)(l.b,{label:c,className:_?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(i.NIc,{isInvalid:_,isRequired:d,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(s.__,{htmlFor:f.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,(0,r.jsx)(l.b,{label:c})]}),(0,r.jsx)(i.WPr,{...x,id:f.id||t,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:j,onSearch:"tags"===f.mode?T:void 0,onChange:E,value:x.value||void 0,status:_?"error":void 0}),p&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:p}),(0,r.jsx)(s.Bc,{isInvalid:_,message:m.error,fieldName:x.name})]})})}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return o},V:function(){return r.V}});var r=n(84306),i=n(812);let o=()=>{let{errorAlert:e}=(0,r.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)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var r=n(24246),i=n(13577);let o=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,o)=>{let a={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[n&&(0,r.jsx)(i.CdC,{children:n}),(0,r.jsx)(i.XaZ,{children:t})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,a):e(a)},successAlert:(t,n,o)=>{let a={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[n&&(0,r.jsx)(i.CdC,{children:n}),(0,r.jsx)(i.XaZ,{children:t})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var r=n(24246),i=n(13577),o=n(79894),a=n.n(o),l=n(27378);let{Text:s}=i.AntTypography,u=e=>{let{items:t,...n}=e,o=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let o=n===t.length-1,l={...e},u=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,r.jsx)(s,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,children:l.title})),u)?l.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,r.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,r.jsx)(i.zrq,{items:o,...n})}},30234:function(e,t,n){"use strict";var r=n(24246),i=n(13577);t.Z=e=>{let{heading:t,HeadingButton:n,children:o}=e;return(0,r.jsx)(i.Kqy,{spacing:4,children:(0,r.jsxs)(i.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,r.jsx)(i.X6q,{as:"h3",size:"xs",children:t}),n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.LZC,{}),(0,r.jsx)(n,{})]}):null]}),(0,r.jsx)(i.Kqy,{spacing:4,px:6,py:6,children:o})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return l},Lo:function(){return i}});var r,i,o=n(54682);let a="root";(r=i||(i={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects";let l=e=>{switch(e){case"Data categories":return{UPDATE:o.Sh.DATA_CATEGORY_UPDATE,CREATE:o.Sh.DATA_CATEGORY_CREATE,DELETE:o.Sh.DATA_CATEGORY_DELETE,READ:o.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:o.Sh.DATA_USE_UPDATE,CREATE:o.Sh.DATA_USE_CREATE,DELETE:o.Sh.DATA_USE_DELETE,READ:o.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:o.Sh.DATA_SUBJECT_UPDATE,CREATE:o.Sh.DATA_SUBJECT_CREATE,DELETE:o.Sh.DATA_SUBJECT_DELETE,READ:o.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return o},Xl:function(){return a}});var r=n(54682),i=n(59001);let o=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let r=null!=t?t:null;n=e.filter(e=>e.parent_key===r)}return n.map(t=>{var n,r;let i=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:o(e,i),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(r=t.active)&&void 0!==r&&r}})},a=e=>{switch(e){case i.Lo.DATA_CATEGORIES:return r.P6.DATA_CATEGORY;case i.Lo.DATA_SUBJECTS:return r.P6.DATA_SUBJECT;case i.Lo.DATA_USES:return r.P6.DATA_USE;default:return}}},62e3:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eg}});var r,i,o=n(24246),a=n(13577),l=n(69238),s=n.n(l),u=n(63662),c=n(27378),d=n(812),h=n(77213),p=n(58754),f=n(19904),x=n(46628),m=n(95346),v=n(56358),_=n(31883),y=n(79806),g=n(59001),j=n(90673),T=n(30002),E=n(28079),C=n(39864),A=e=>{let{taxonomyType:t}=e,[n,r]=(0,C.Vj)(),[i,o]=(0,T.nC)(),[a,l]=(0,E.dk)(),[s]=(0,C.Ti)(),[u]=(0,E.Ql)(),[c]=(0,T.wG)(),[d]=(0,C.jU)(),[h]=(0,E.LG)(),[p]=(0,T.h8)(),[f]=(0,C.K9)(),[x]=(0,E.gu)(),[m]=(0,T.Kv)();return t===g.Lo.DATA_SUBJECTS?{getAllTrigger:i,taxonomyItems:o.data||[],updateTrigger:p,deleteTrigger:m,createTrigger:c}:t===g.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:l.data||[],updateTrigger:h,deleteTrigger:x,createTrigger:u}:{getAllTrigger:n,taxonomyItems:r.data||[],updateTrigger:d,deleteTrigger:f,createTrigger:s}},b=n(90104),S=n.n(b),I=n(18225),k=n(54682),w=e=>{let{customFields:t,formId:n,form:r}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:l,isEnabled:s,isLoading:u,sortedCustomFieldDefinitionIds:c}=t;return s&&0!==c.length?(0,o.jsxs)(a.PPS,{form:r,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),u?(0,o.jsx)(I.Z,{}):(0,o.jsx)("div",{children:!S()(c)&&(0,o.jsx)("div",{children:c.map(e=>{let t=l.get(e);if(!t)return null;let{id:n,name:r,description:s,allow_list_id:u,field_type:c}=t;if(!u&&c===k.AL.STRING)return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.uFc,{})},e);let d=i.get(t.allow_list_id);if(!d)return null;let{options:h}=d;return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.WPr,{mode:"string"!==c?"multiple":void 0,allowClear:!0,options:h})},e)})})})]}):null},N=n(43551),R=n.n(N),D=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,o.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,o.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,o.jsx)(a.WPr,{mode:"multiple",options:(0,d.MM)(k.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,o.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,o.jsx)(a.WPr,{options:(0,d.MM)(k.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},O=e=>{let{initialValues:t,onSubmit:n,form:r,formId:i,taxonomyType:l,isDisabled:s}=e,u=l===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)(a.PPS,{name:i,initialValues:t,onFinish:e=>{var r,i;let o={...t,...e};(!(null==o?void 0:null===(r=o.rights)||void 0===r?void 0:r.values)||S()(null==o?void 0:null===(i=o.rights)||void 0===i?void 0:i.values))&&R()(o,"rights"),n(o)},layout:"vertical",form:r,children:[(0,o.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,o.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:s})}),(0,o.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,o.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:s})}),u&&(0,o.jsx)(D,{})]})},P=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:r}=e,i="edit-taxonomy-form",[l]=a.PPS.useForm(),[s]=a.PPS.useForm(),u=(0,a.pmc)(),{isOpen:c,onOpen:h,onClose:p}=(0,a.qY0)(),{updateTrigger:T}=A({taxonomyType:n}),E=(0,m.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,j.Xl)(n)}),C=(0,f.Tg)([(0,g.Hy)(n).UPDATE]),b=(0,f.Tg)([(0,g.Hy)(n).DELETE]),S=async e=>{let n=await T(e);if((0,_.D4)(n)){u((0,x.Vo)((0,d.e$)(n.error)));return}if(E.isEnabled){let e=s.getFieldsValue();await E.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}u((0,x.t5)("Taxonomy successfully updated")),r()},I=async()=>{await T({...t,active:!1}),p(),r()},k=async()=>{await T({...t,active:!0}),p(),r()};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.ZP,{isOpen:!!t,onClose:r,header:(0,o.jsx)(y.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,o.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&b&&(0,o.jsx)(a.esZ,{title:"Delete label",children:(0,o.jsx)(a.wpx,{"aria-label":"delete",icon:(0,o.jsx)(v.q,{fontSize:"small"}),onClick:h,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&C&&(0,o.jsx)(a.esZ,{title:"Enable label",children:(0,o.jsx)(a.wpx,{"aria-label":"enable",onClick:k,"data-testid":"enable-btn",icon:(0,o.jsx)(a.tEF,{fontSize:"small"})})}),(0,o.jsx)("div",{className:"flex gap-2",children:C&&(0,o.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:i,children:"Save"})})]}),children:[(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,o.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,o.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,o.jsx)(O,{initialValues:t,onSubmit:S,form:l,formId:i,taxonomyType:n,isDisabled:!C}),E.isEnabled&&!E.isLoading&&(0,o.jsx)(w,{form:s,formId:"custom-fields-form",customFields:E})]}),(0,o.jsx)(a.cVQ,{isOpen:c,onClose:p,onConfirm:I,title:"Delete ".concat(n),message:(0,o.jsx)(a.Kqy,{children:(0,o.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,o.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var L=n(86298),V=n(3124),F=n.n(V);(r=i||(i={})).DEFAULT="DEFAULT",r.ACTIVE_HOVER="ACTIVE_HOVER",r.PARENT_OF_HOVER="PARENT_OF_HOVER",r.CHILD_OF_HOVER="CHILD_OF_HOVER",r.SIBLING_OF_HOVER="SIBLING_OF_HOVER",r.INACTIVE="INACTIVE";let z=(0,c.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),U=e=>{let{children:t}=e,[n,r]=(0,c.useState)(null),i=(0,c.useCallback)(e=>{e!==n&&r(e)},[n]),a=(0,c.useCallback)(()=>{r(null)},[]),l=(0,c.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===g.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===g.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),s=(0,c.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:r,onMouseEnter:i,onMouseLeave:a,getNodeHoverStatus:l}),[n,r,i,a,l]);return(0,o.jsx)(z.Provider,{value:s,children:t})};function H(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function M(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Z)):void 0===t&&(t=B);for(var n,r,i,o,a,l=new W(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new W(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(G)}function B(e){return e.children}function Z(e){return Array.isArray(e)?e[1]:null}function q(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function G(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}function Y(e,t){return e.parent===t.parent?1:2}function K(e){var t=e.children;return t?t[0]:e.t}function J(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function X(e){return null==e?null:function(e){if("function"!=typeof e)throw Error();return e}(e)}W.prototype=M.prototype={constructor:W,count:function(){return this.eachAfter(H)},each:function(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return M(this).eachBefore(q)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);while(o.length)}},$.prototype=Object.create(W.prototype);var Q={depth:-1},ee={},et={};function en(e){return e.id}function er(e){return e.parentId}function ei(e){let t=e.length;if(t<2)return"";for(;--t>1&&!eo(e,t););return e.slice(0,t)}function eo(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if((1&n)==0)return!0}return!1}let ea=function(){var e=Y,t=1,n=1,r=null;function i(i){var s=function(e){for(var t,n,r,i,o,a=new $(e,0),l=[a];t=l.pop();)if(r=t._.children)for(t.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=t.children[i]=new $(r[i],i)),n.parent=t;return(a.parent=new $(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,d=i;i.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:e(u,c)/2,p=h-u.x,f=t/(c.x+h+p),x=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*f,e.y=e.depth*x})}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o,a,l=t,s=t,u=n,c=l.parent.children[0],d=l.m,h=s.m,p=u.m,f=c.m;u=J(u),l=K(l),u&&l;)c=K(c),(s=J(s)).a=t,(a=u.z+p-l.z-d+e(u._,l._))>0&&(function(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}((i=u,o=r,i.a.parent===t.parent?i.a:o),t,a),d+=a,h+=a),p+=u.m,d+=l.m,f+=c.m,h+=s.m;u&&!J(s)&&(s.t=u,s.m+=p-h),l&&!K(c)&&(c.t=l,c.m+=d-f,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}();var el=e=>{let{nodes:t,edges:n,options:r}=e;return(0,c.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(function(){var e,t=en,n=er;function r(r){var i,o,a,l,s,u,c,d,h=Array.from(r),p=t,f=n,x=new Map;if(null!=e){let t=h.map((t,n)=>{var i;let o;return i=e(t,n,r),o=(i=`${i}`).length,eo(i,o-1)&&!eo(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=t.map(ei),i=new Set(t).add("");for(let e of n)i.has(e)||(i.add(e),t.push(e),n.push(ei(e)),h.push(et));p=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,i=h.length;a<i;++a)o=h[a],u=h[a]=new W(o),null!=(c=p(o,a,r))&&(c+="")&&(d=u.id=c,x.set(d,x.has(d)?ee:u)),null!=(c=f(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=h[a]).parent){if(!(s=x.get(c)))throw Error("missing: "+c);if(s===ee)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=e){for(;l.data===et&&1===l.children.length;)l=l.children[0],--i;for(let e=h.length-1;e>=0&&(u=h[e]).data===et;--e)u.data=null}if(l.parent=Q,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(G),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(e){return arguments.length?(t=X(e),r):t},r.parentId=function(e){return arguments.length?(n=X(e),r):n},r.path=function(t){return arguments.length?(e=X(t),r):e},r})().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),i="LR"===r.direction?[35,320]:[320,35];return{nodes:ea.nodeSize(i).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===r.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,r])},es=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:r}=e,{setCenter:i,getZoom:o}=(0,L._K)();return{centerScreenOnNode:(0,c.useCallback)(()=>i(t+r/2,n,{duration:500,zoom:o()}),[o,t,n,r,i])}},eu=n(1945),ec=n.n(eu),ed=n(8335),eh=e=>{let{type:t,inactive:n=!1}=e;return(0,o.jsx)(L.HH,{type:t,position:"source"===t?ed.Ly.Right:ed.Ly.Left,style:{width:8,height:8,backgroundColor:n?F().FIDESUI_NEUTRAL_400:F().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},ep=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onCancel:i,onSubmit:l,parentKey:s}=t,u=(0,c.useRef)(null),[d,h]=(0,c.useState)(""),{centerScreenOnNode:p}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});return(0,c.useEffect)(()=>{h("");let e=()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await p(),e()})()},[s,p,n,r]),(0,o.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,o.jsx)(a.uFc,{placeholder:"Type label name...",ref:u,onBlur:i,onSubmit:()=>l(d),value:d,onChange:e=>h(e.target.value),onKeyUp:e=>{"Escape"===e.key&&i()},onPressEnter:()=>l(d),className:ec().input}),(0,o.jsx)(eh,{type:"target"})]})},ef=e=>{let{getNodeHoverStatus:t}=(0,c.useContext)(z),{target:n}=e,r=t(n),a=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return F().FIDESUI_MINOS;case i.INACTIVE:return F().NEUTRAL_400;default:return F().FIDESUI_SANDSTONE}},[r]),l=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return 2;default:return 1}},[r]);return(0,o.jsx)(L.Jd,{...e,style:{stroke:a(),strokeWidth:l(),transition:"stroke 0.3s ease 0s"}})},ex=n(34770),em=n.n(ex),ev=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onMouseEnter:l,onMouseLeave:s,getNodeHoverStatus:u}=(0,c.useContext)(z),{taxonomyType:d,taxonomyItem:h,onAddButtonClick:p,onTaxonomyItemClick:f,label:x,hasChildren:m,isLastCreatedItem:v,resetLastCreatedItemKey:_,userCanAddLabels:y}=t,{centerScreenOnNode:j}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});(0,c.useEffect)(()=>{let e=async()=>{await j(),l(null==h?void 0:h.fides_key)};v&&(e(),_())},[v,l,null==h?void 0:h.fides_key,_,j]);let T=u(null==h?void 0:h.fides_key),E=(0,c.useCallback)(()=>{switch(T){case i.ACTIVE_HOVER:return em()["button--hover"];case i.PARENT_OF_HOVER:return em()["button--parent-hover"];case i.INACTIVE:return em()["button--inactive"];case i.DEFAULT:case i.CHILD_OF_HOVER:case i.SIBLING_OF_HOVER:default:return""}},[T]),C=(null==h?void 0:h.fides_key)===g.Ch,A=d===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)("div",{className:em().container,onMouseEnter:()=>l(null==h?void 0:h.fides_key),onMouseLeave:()=>s(null==h?void 0:h.fides_key),"data-testid":"taxonomy-node-".concat(null==h?void 0:h.fides_key),children:[(0,o.jsx)(a.wpx,{className:"".concat(em().button," ").concat(E()),onClick:()=>null==f?void 0:f(h),disabled:!f,type:"text",children:(0,o.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==h?void 0:h.active)===!1?"(disabled) ":"",x]})}),!C&&(0,o.jsx)(eh,{type:"target",inactive:T===i.INACTIVE}),m&&(0,o.jsx)(eh,{type:"source",inactive:T===i.INACTIVE}),y&&(!A||C)&&(0,o.jsx)("div",{className:em()["add-button-container"],children:(0,o.jsx)(a.wpx,{type:"default",className:"".concat(em()["add-button"]," ").concat(T===i.ACTIVE_HOVER?em()["add-button--visible"]:""),icon:(0,o.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==p?void 0:p(h),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(x)})})]})};let e_=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:r,lastCreatedItemKey:i,resetLastCreatedItemKey:a,onTaxonomyItemClick:l,onAddButtonClick:s,onCancelDraftItem:u,onSubmitDraftItem:d,userCanAddLabels:h}=e,{fitView:p}=(0,L._K)();(0,c.useEffect)(()=>{setTimeout(()=>p(),150)},[p,t]);let f=[(0,c.useMemo)(()=>({id:g.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:g.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:s,hasChildren:0!==n.length,userCanAddLabels:h},type:"taxonomyTreeNode"}),[t,n.length,s,h])],x=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",r={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:l,onAddButtonClick:s,hasChildren:!1,isLastCreatedItem:i===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:h},type:"taxonomyTreeNode"};f.push(r);let o=e.parent_key?f.find(t=>t.id===e.parent_key):null,u=o?o.id:g.Ch,c=e.fides_key,d={id:"".concat(u,"-").concat(c),source:u,target:c,type:"taxonomyTreeEdge"};x.push(d),o&&(o.data.hasChildren=!0)}),r){let e=r.parent_key||g.Ch;f.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:u,onSubmit:d},hidden:!r}),x.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=f.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:m,edges:v}=el({nodes:f,edges:x,options:{direction:"LR"}}),_=(0,c.useMemo)(()=>({taxonomyTreeNode:ev,textInputNode:ep}),[]),y=(0,c.useMemo)(()=>({taxonomyTreeEdge:ef}),[]);return(0,o.jsx)("div",{className:"size-full",style:{backgroundColor:F().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,o.jsx)(U,{children:(0,o.jsxs)(L.x$,{nodes:m,edges:v,nodeTypes:_,edgeTypes:y,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,o.jsx)(L.Aq,{color:F().FIDESUI_NEUTRAL_100,variant:L.T7.Dots,size:3}),(0,o.jsx)(L.a9,{nodeStrokeWidth:3,pannable:!0}),(0,o.jsx)(L.ZX,{showInteractive:!1})]})})})};var ey=e=>(0,o.jsx)(L.tV,{children:(0,o.jsx)(e_,{...e})}),eg=()=>{let[e,t]=(0,c.useState)(g.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:r,taxonomyItems:i=[]}=A({taxonomyType:e}),l=(0,u.useSearchParams)(),m=(null==l?void 0:l.get("showDisabledItems"))==="true";(0,c.useEffect)(()=>{r()},[r,e]);let[v,_]=(0,c.useState)(null),[y,j]=(0,c.useState)(null),[T,E]=(0,c.useState)(null);(0,c.useEffect)(()=>{j(null),E(null),_(null)},[e]);let C=(0,a.pmc)(),b=(0,c.useCallback)(async e=>{if(!y)return;let t=(null==y?void 0:y.parent_key)===g.Ch,r={...y,name:e,parent_key:t?null:y.parent_key},i=await n(r);if((0,d.D4)(i)){C((0,x.Vo)((0,d.e$)(i.error)));return}E(i.data.fides_key),C((0,x.t5)("New label successfully created")),j(null)},[n,y,C]),S=s()(i,"active"),I=(0,f.Tg)([(0,g.Hy)(e).CREATE]);return(0,o.jsxs)(h.Z,{title:"Taxonomy",children:[(0,o.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(p.Z,{heading:"Taxonomy"}),(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("div",{className:"mb-5 flex justify-between",children:(0,o.jsxs)(a.vyj.Compact,{children:[(0,o.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,o.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,o.jsxs)("div",{className:"relative grow",children:[(0,o.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,o.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,d.MM)(g.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!i.length&&(0,o.jsx)(ey,{userCanAddLabels:I,taxonomyItems:m?i:S,draftNewItem:y,lastCreatedItemKey:T,resetLastCreatedItemKey:()=>E(null),onTaxonomyItemClick:e=>{_(e)},onAddButtonClick:e=>{var t;j({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>j(null),onSubmitDraftItem:b})]})]}),v&&(0,o.jsx)(P,{taxonomyItem:v,taxonomyType:e,onClose:()=>_(null)})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,8765,9278,3662,6148,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{96586:function(e,t,n){var r=n(57753),i=n(82452),o=n(22115),a=n(38256),l=n(67426);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},36301:function(e,t,n){var r=n(69417),i=n(72470),o=n(66165),a=n(71873),l=n(52556);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},44538:function(e,t,n){var r=n(81822)(n(77400),"Map");e.exports=r},74554:function(e,t,n){var r=n(39448),i=n(7738),o=n(66575),a=n(7238),l=n(38738);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=l,e.exports=s},46151:function(e,t,n){var r=n(81822)(n(77400),"Set");e.exports=r},52485:function(e,t,n){var r=n(74554),i=n(38639),o=n(88379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},93382:function(e,t,n){var r=n(85638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},46729:function(e,t,n){var r=n(28338),i=n(99678),o=n(11611),a=n(76532),l=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,c=s.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:l).test(a(e))}},75733:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},70830:function(e,t,n){var r=n(76747),i=n(31159),o=n(64373),a=n(37948);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},65581:function(e){e.exports=function(e,t){return e.has(t)}},64937:function(e,t,n){var r=n(77400)["__core-js_shared__"];e.exports=r},95899:function(e,t,n){var r=n(54479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81822:function(e,t,n){var r=n(46729),i=n(15371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},15371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},57753:function(e,t,n){var r=n(35718);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},82452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},22115:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},38256:function(e,t,n){var r=n(35718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},67426:function(e,t,n){var r=n(35718);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},54479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},99678:function(e,t,n){var r,i=n(64937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},69417:function(e){e.exports=function(){this.__data__=[],this.size=0}},72470:function(e,t,n){var r=n(93382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},66165:function(e,t,n){var r=n(93382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},71873:function(e,t,n){var r=n(93382);e.exports=function(e){return r(this.__data__,e)>-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},39448:function(e,t,n){var r=n(96586),i=n(36301),o=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},64373:function(e,t,n){var r=n(79867),i=n(75733);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},38639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:function(e){e.exports=function(e){return this.__data__.has(e)}},43735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},28338:function(e,t,n){var r=n(99736),i=n(11611);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43551:function(e,t,n){var r=n(70830);e.exports=function(e,t){return null==e||r(e,t)}},71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(62e3)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return l},zR:function(){return a}});var r=n(24246),i=n(27824),o=n(56358);let a=e=>{let{title:t}=e;return(0,r.jsx)(i.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,r.jsx)(i.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},l=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:l}=e;return(0,r.jsxs)(i.zeN,{justifyContent:"space-between",children:[t?(0,r.jsx)(i.wpx,{"aria-label":"delete",icon:(0,r.jsx)(o.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,r.jsxs)("div",{className:"flex gap-2",children:[n&&(0,r.jsx)(i.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:l,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:o,onClose:a,children:l,footer:s}=e;return(0,r.jsxs)(i.dys,{placement:"right",isOpen:o,onClose:a,size:"md",children:[(0,r.jsx)(i.P1B,{}),(0,r.jsxs)(i.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,r.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,r.jsx)(i.xuv,{flex:1,minH:8,children:t}),(0,r.jsx)(i.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,r.jsx)(i.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,r.jsx)(i.Two,{fontSize:"smaller"})})})]}),(0,r.jsxs)(i.Ng0,{pt:1,children:[n?(0,r.jsx)(i.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,l]}),s]})]})}},18225:function(e,t,n){"use strict";var r=n(24246),i=n(27824);t.Z=e=>{let{alignment:t="center",...n}=e;return(0,r.jsx)(i.kCb,{boxSize:"full",align:"center",justify:t,children:(0,r.jsx)(i.$jN,{color:"primary",...n})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(24246);let i=(0,n(27824).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,r.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(24246),i=n(27824),o=n(88038),a=n.n(o),l=n(86677);n(27378);var s=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,l.useRouter)();return(0,r.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,r.jsxs)(i.xuv,{children:[(0,r.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,r.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,r.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,r.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:o=!0,mainProps:c}=e,h=(0,s.hz)(),p=(0,l.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(h.flags.privacyRequestsConfiguration&&f),{data:m}=(0,u.JE)(void 0,{skip:x}),{data:v}=(0,u.PW)(void 0,{skip:x}),_=h.flags.privacyRequestsConfiguration&&(!m||!v)&&f;return(0,r.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,r.jsxs)(a(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)(i.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[_?(0,r.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var r=n(24246),i=n(27824),o=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:s,style:u,...c}=e;return(0,r.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,s&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:s})]}),!!n&&(0,r.jsx)(o.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var r=n(24246),i=n(16134),o=n(31793);let a=e=>(0,i.C)(o.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76649);let i=e=>(0,r.Ln)({id:"string"},e),o=e=>(null!=e?e:[]).filter(i)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(27378),i=n(25980),o=n(14047),a=n(32885),l=n(94799);let s=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:s}=(0,o.V)(),{plus:u}=(0,i.hz)(),c=(0,r.useMemo)(()=>null!=t?t:"",[]),d=(0,a.YU)(!0,{skip:!u}),h=(0,a.VN)(n,{skip:!u}),{data:p,isLoading:f,error:x,isError:m}=(0,a.PV)(null!=t?t:"",{skip:""!==c&&!(u&&c)}),[v]=(0,a._D)(),_=d.isLoading||h.isLoading||f,y=(0,r.useMemo)(()=>new Map((0,l.k)(d.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[d.data]),g=(0,r.useMemo)(()=>{var e;return null===(e=h.data)||void 0===e?void 0:e.filter(e=>e.active)},[h.data]),j=(0,r.useMemo)(()=>new Map((0,l.k)(g).map(e=>[e.id,e])),[g]),T=(0,r.useMemo)(()=>m&&(null==x?void 0:x.status)===404?new Map:new Map((0,l.k)(p).map(e=>[e.custom_field_definition_id,e])),[p,m,x]),E=(0,r.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),C=(0,r.useMemo)(()=>{let e={};return g&&T&&g.forEach(t=>{let n=T.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[g,T]),A=(0,r.useCallback)(async e=>{if(!u)return;let r="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!r)return;let{customFieldValues:i}=e;if(!i||0===Object.keys(i).length)return;let o=[],a=[];E.forEach(e=>{let t=T.get(e),n=i[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):o.push({custom_field_definition_id:e,resource_id:r,id:null==t?void 0:t.id,value:n})});try{await v({resource_type:n,resource_id:r,upsert:o,delete:a})}catch(e){s("One or more custom fields have failed to save, please try again."),console.error(e)}},[u,T,s,t,E,v,n]);return{customFieldValues:C,definitionIdToCustomField:T,idToAllowListWithOptions:y,idToCustomFieldDefinition:j,isEnabled:u,isLoading:_,sortedCustomFieldDefinitionIds:E,upsertCustomFields:A}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return v},Hn:function(){return s},Uv:function(){return a},C7:function(){return u},mZ:function(){return m.m}});var r,i,o,a,l=n(54682);(r=o||(o={}))[r.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",r[r.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",r[r.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",l.AL.STRING,l.AL.STRING_,(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.OPEN_TEXT="openText";let s=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],u=[{label:"taxonomy:".concat(l.P6.DATA_CATEGORY),value:l.P6.DATA_CATEGORY},{label:"taxonomy:".concat(l.P6.DATA_SUBJECT),value:l.P6.DATA_SUBJECT},{label:"taxonomy:".concat(l.P6.DATA_USE),value:l.P6.DATA_USE},{label:"".concat(l.P6.SYSTEM,":information"),value:l.P6.SYSTEM},{label:"system:data use",value:l.P6.PRIVACY_DECLARATION}];var c=n(24246),d=n(27824),h=n(34090),p=n(30234),f=n(97181),x=n(40324),m=n(30320);let v=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:r,idToCustomFieldDefinition:i,isEnabled:o,isLoading:a,sortedCustomFieldDefinitionIds:s}=(0,m.m)({resourceFidesKey:t,resourceType:n});return o&&0!==s.length?(0,c.jsx)(p.Z,{heading:"Custom fields",children:(0,c.jsx)(d.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,c.jsx)(d.kCb,{flexDir:"column",gap:"24px",children:a?(0,c.jsx)(d.M5Y,{children:(0,c.jsx)(d.$jN,{})}):s.length>0&&(0,c.jsx)(d.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:s.map(e=>{let t=i.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===l.AL.STRING)return(0,c.jsx)(h.gN,{name:n,children:e=>{let{field:n}=e;return(0,c.jsx)(x.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let o=r.get(t.allow_list_id);if(!o)return null;let{options:a}=o;return(0,c.jsx)(f.d,{name:n,allowClear:!0,mode:t.field_type!==l.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(24246),i=n(27824),o=n(34090),a=n(27378),l=n(46238),s=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:h="inline",helperText:p,...f}=e,[x,m,{setValue:v}]=(0,o.U$)(t),_=!!(m.touched&&m.error),[y,g]=(0,a.useState)("");x.value||"tags"!==f.mode&&"multiple"!==f.mode||(x.value=[]),"tags"===f.mode&&"string"==typeof x.value&&(x.value=[x.value]);let j="tags"===f.mode?(e,t)=>e?e.value!==y||x.value.includes(y)?f.optionRender?f.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:f.optionRender||void 0,T=e=>{g(e),f.onSearch&&f.onSearch(e)},E=(e,t)=>{v(e),f.onChange&&f.onChange(e,t)};return"inline"===h?(0,r.jsx)(i.NIc,{isInvalid:_,isRequired:d,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(s.__,{htmlFor:f.id||t,...u,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...x,id:f.id||t,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:j,onSearch:"tags"===f.mode?T:void 0,onChange:E,value:x.value||void 0,status:_?"error":void 0}),p&&(0,r.jsx)(i.Q6r,{children:p}),(0,r.jsx)(s.Bc,{isInvalid:_,message:m.error,fieldName:x.name})]}),(0,r.jsx)(l.b,{label:c,className:_?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(i.NIc,{isInvalid:_,isRequired:d,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(s.__,{htmlFor:f.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,(0,r.jsx)(l.b,{label:c})]}),(0,r.jsx)(i.WPr,{...x,id:f.id||t,"data-testid":"controlled-select-".concat(x.name),...f,optionRender:j,onSearch:"tags"===f.mode?T:void 0,onChange:E,value:x.value||void 0,status:_?"error":void 0}),p&&(0,r.jsx)(i.Q6r,{style:{marginTop:0},children:p}),(0,r.jsx)(s.Bc,{isInvalid:_,message:m.error,fieldName:x.name})]})})}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return o},V:function(){return r.V}});var r=n(84306),i=n(812);let o=()=>{let{errorAlert:e}=(0,r.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)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var r=n(24246),i=n(27824);let o=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,o)=>{let a={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[n&&(0,r.jsx)(i.CdC,{children:n}),(0,r.jsx)(i.XaZ,{children:t})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,a):e(a)},successAlert:(t,n,o)=>{let a={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[n&&(0,r.jsx)(i.CdC,{children:n}),(0,r.jsx)(i.XaZ,{children:t})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var r=n(24246),i=n(27824),o=n(79894),a=n.n(o),l=n(27378);let{Text:s}=i.AntTypography,u=e=>{let{items:t,...n}=e,o=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let o=n===t.length-1,l={...e},u=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,r.jsx)(s,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,children:l.title})),u)?l.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,r.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,r.jsx)(i.zrq,{items:o,...n})}},30234:function(e,t,n){"use strict";var r=n(24246),i=n(27824);t.Z=e=>{let{heading:t,HeadingButton:n,children:o}=e;return(0,r.jsx)(i.Kqy,{spacing:4,children:(0,r.jsxs)(i.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,r.jsxs)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,r.jsx)(i.X6q,{as:"h3",size:"xs",children:t}),n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.LZC,{}),(0,r.jsx)(n,{})]}):null]}),(0,r.jsx)(i.Kqy,{spacing:4,px:6,py:6,children:o})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return l},Lo:function(){return i}});var r,i,o=n(54682);let a="root";(r=i||(i={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects";let l=e=>{switch(e){case"Data categories":return{UPDATE:o.Sh.DATA_CATEGORY_UPDATE,CREATE:o.Sh.DATA_CATEGORY_CREATE,DELETE:o.Sh.DATA_CATEGORY_DELETE,READ:o.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:o.Sh.DATA_USE_UPDATE,CREATE:o.Sh.DATA_USE_CREATE,DELETE:o.Sh.DATA_USE_DELETE,READ:o.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:o.Sh.DATA_SUBJECT_UPDATE,CREATE:o.Sh.DATA_SUBJECT_CREATE,DELETE:o.Sh.DATA_SUBJECT_DELETE,READ:o.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return o},Xl:function(){return a}});var r=n(54682),i=n(59001);let o=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let r=null!=t?t:null;n=e.filter(e=>e.parent_key===r)}return n.map(t=>{var n,r;let i=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:o(e,i),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(r=t.active)&&void 0!==r&&r}})},a=e=>{switch(e){case i.Lo.DATA_CATEGORIES:return r.P6.DATA_CATEGORY;case i.Lo.DATA_SUBJECTS:return r.P6.DATA_SUBJECT;case i.Lo.DATA_USES:return r.P6.DATA_USE;default:return}}},62e3:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eg}});var r,i,o=n(24246),a=n(27824),l=n(69238),s=n.n(l),u=n(63662),c=n(27378),d=n(812),h=n(77213),p=n(58754),f=n(19904),x=n(46628),m=n(95346),v=n(56358),_=n(31883),y=n(79806),g=n(59001),j=n(90673),T=n(30002),E=n(28079),C=n(39864),A=e=>{let{taxonomyType:t}=e,[n,r]=(0,C.Vj)(),[i,o]=(0,T.nC)(),[a,l]=(0,E.dk)(),[s]=(0,C.Ti)(),[u]=(0,E.Ql)(),[c]=(0,T.wG)(),[d]=(0,C.jU)(),[h]=(0,E.LG)(),[p]=(0,T.h8)(),[f]=(0,C.K9)(),[x]=(0,E.gu)(),[m]=(0,T.Kv)();return t===g.Lo.DATA_SUBJECTS?{getAllTrigger:i,taxonomyItems:o.data||[],updateTrigger:p,deleteTrigger:m,createTrigger:c}:t===g.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:l.data||[],updateTrigger:h,deleteTrigger:x,createTrigger:u}:{getAllTrigger:n,taxonomyItems:r.data||[],updateTrigger:d,deleteTrigger:f,createTrigger:s}},b=n(90104),S=n.n(b),I=n(18225),k=n(54682),w=e=>{let{customFields:t,formId:n,form:r}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:l,isEnabled:s,isLoading:u,sortedCustomFieldDefinitionIds:c}=t;return s&&0!==c.length?(0,o.jsxs)(a.PPS,{form:r,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),u?(0,o.jsx)(I.Z,{}):(0,o.jsx)("div",{children:!S()(c)&&(0,o.jsx)("div",{children:c.map(e=>{let t=l.get(e);if(!t)return null;let{id:n,name:r,description:s,allow_list_id:u,field_type:c}=t;if(!u&&c===k.AL.STRING)return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.uFc,{})},e);let d=i.get(t.allow_list_id);if(!d)return null;let{options:h}=d;return(0,o.jsx)(a.PPS.Item,{name:n,label:r,tooltip:s,children:(0,o.jsx)(a.WPr,{mode:"string"!==c?"multiple":void 0,allowClear:!0,options:h})},e)})})})]}):null},N=n(43551),R=n.n(N),D=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,o.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,o.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,o.jsx)(a.WPr,{mode:"multiple",options:(0,d.MM)(k.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,o.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,o.jsx)(a.WPr,{options:(0,d.MM)(k.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},O=e=>{let{initialValues:t,onSubmit:n,form:r,formId:i,taxonomyType:l,isDisabled:s}=e,u=l===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)(a.PPS,{name:i,initialValues:t,onFinish:e=>{var r,i;let o={...t,...e};(!(null==o?void 0:null===(r=o.rights)||void 0===r?void 0:r.values)||S()(null==o?void 0:null===(i=o.rights)||void 0===i?void 0:i.values))&&R()(o,"rights"),n(o)},layout:"vertical",form:r,children:[(0,o.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,o.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:s})}),(0,o.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,o.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:s})}),u&&(0,o.jsx)(D,{})]})},P=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:r}=e,i="edit-taxonomy-form",[l]=a.PPS.useForm(),[s]=a.PPS.useForm(),u=(0,a.pmc)(),{isOpen:c,onOpen:h,onClose:p}=(0,a.qY0)(),{updateTrigger:T}=A({taxonomyType:n}),E=(0,m.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,j.Xl)(n)}),C=(0,f.Tg)([(0,g.Hy)(n).UPDATE]),b=(0,f.Tg)([(0,g.Hy)(n).DELETE]),S=async e=>{let n=await T(e);if((0,_.D4)(n)){u((0,x.Vo)((0,d.e$)(n.error)));return}if(E.isEnabled){let e=s.getFieldsValue();await E.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}u((0,x.t5)("Taxonomy successfully updated")),r()},I=async()=>{await T({...t,active:!1}),p(),r()},k=async()=>{await T({...t,active:!0}),p(),r()};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.ZP,{isOpen:!!t,onClose:r,header:(0,o.jsx)(y.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,o.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&b&&(0,o.jsx)(a.esZ,{title:"Delete label",children:(0,o.jsx)(a.wpx,{"aria-label":"delete",icon:(0,o.jsx)(v.q,{fontSize:"small"}),onClick:h,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&C&&(0,o.jsx)(a.esZ,{title:"Enable label",children:(0,o.jsx)(a.wpx,{"aria-label":"enable",onClick:k,"data-testid":"enable-btn",icon:(0,o.jsx)(a.tEF,{fontSize:"small"})})}),(0,o.jsx)("div",{className:"flex gap-2",children:C&&(0,o.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:i,children:"Save"})})]}),children:[(0,o.jsxs)("div",{className:"mb-4",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,o.jsxs)("div",{className:"flex",children:[(0,o.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,o.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,o.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,o.jsx)(O,{initialValues:t,onSubmit:S,form:l,formId:i,taxonomyType:n,isDisabled:!C}),E.isEnabled&&!E.isLoading&&(0,o.jsx)(w,{form:s,formId:"custom-fields-form",customFields:E})]}),(0,o.jsx)(a.cVQ,{isOpen:c,onClose:p,onConfirm:I,title:"Delete ".concat(n),message:(0,o.jsx)(a.Kqy,{children:(0,o.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,o.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var L=n(86298),V=n(3124),F=n.n(V);(r=i||(i={})).DEFAULT="DEFAULT",r.ACTIVE_HOVER="ACTIVE_HOVER",r.PARENT_OF_HOVER="PARENT_OF_HOVER",r.CHILD_OF_HOVER="CHILD_OF_HOVER",r.SIBLING_OF_HOVER="SIBLING_OF_HOVER",r.INACTIVE="INACTIVE";let z=(0,c.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),U=e=>{let{children:t}=e,[n,r]=(0,c.useState)(null),i=(0,c.useCallback)(e=>{e!==n&&r(e)},[n]),a=(0,c.useCallback)(()=>{r(null)},[]),l=(0,c.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===g.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===g.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),s=(0,c.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:r,onMouseEnter:i,onMouseLeave:a,getNodeHoverStatus:l}),[n,r,i,a,l]);return(0,o.jsx)(z.Provider,{value:s,children:t})};function H(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function M(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Z)):void 0===t&&(t=B);for(var n,r,i,o,a,l=new W(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new W(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(G)}function B(e){return e.children}function Z(e){return Array.isArray(e)?e[1]:null}function q(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function G(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}function Y(e,t){return e.parent===t.parent?1:2}function K(e){var t=e.children;return t?t[0]:e.t}function J(e){var t=e.children;return t?t[t.length-1]:e.t}function $(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function X(e){return null==e?null:function(e){if("function"!=typeof e)throw Error();return e}(e)}W.prototype=M.prototype={constructor:W,count:function(){return this.eachAfter(H)},each:function(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return M(this).eachBefore(q)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);while(o.length)}},$.prototype=Object.create(W.prototype);var Q={depth:-1},ee={},et={};function en(e){return e.id}function er(e){return e.parentId}function ei(e){let t=e.length;if(t<2)return"";for(;--t>1&&!eo(e,t););return e.slice(0,t)}function eo(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if((1&n)==0)return!0}return!1}let ea=function(){var e=Y,t=1,n=1,r=null;function i(i){var s=function(e){for(var t,n,r,i,o,a=new $(e,0),l=[a];t=l.pop();)if(r=t._.children)for(t.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=t.children[i]=new $(r[i],i)),n.parent=t;return(a.parent=new $(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,d=i;i.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:e(u,c)/2,p=h-u.x,f=t/(c.x+h+p),x=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*f,e.y=e.depth*x})}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o,a,l=t,s=t,u=n,c=l.parent.children[0],d=l.m,h=s.m,p=u.m,f=c.m;u=J(u),l=K(l),u&&l;)c=K(c),(s=J(s)).a=t,(a=u.z+p-l.z-d+e(u._,l._))>0&&(function(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}((i=u,o=r,i.a.parent===t.parent?i.a:o),t,a),d+=a,h+=a),p+=u.m,d+=l.m,f+=c.m,h+=s.m;u&&!J(s)&&(s.t=u,s.m+=p-h),l&&!K(c)&&(c.t=l,c.m+=d-f,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}();var el=e=>{let{nodes:t,edges:n,options:r}=e;return(0,c.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(function(){var e,t=en,n=er;function r(r){var i,o,a,l,s,u,c,d,h=Array.from(r),p=t,f=n,x=new Map;if(null!=e){let t=h.map((t,n)=>{var i;let o;return i=e(t,n,r),o=(i=`${i}`).length,eo(i,o-1)&&!eo(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=t.map(ei),i=new Set(t).add("");for(let e of n)i.has(e)||(i.add(e),t.push(e),n.push(ei(e)),h.push(et));p=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,i=h.length;a<i;++a)o=h[a],u=h[a]=new W(o),null!=(c=p(o,a,r))&&(c+="")&&(d=u.id=c,x.set(d,x.has(d)?ee:u)),null!=(c=f(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=h[a]).parent){if(!(s=x.get(c)))throw Error("missing: "+c);if(s===ee)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=e){for(;l.data===et&&1===l.children.length;)l=l.children[0],--i;for(let e=h.length-1;e>=0&&(u=h[e]).data===et;--e)u.data=null}if(l.parent=Q,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(G),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(e){return arguments.length?(t=X(e),r):t},r.parentId=function(e){return arguments.length?(n=X(e),r):n},r.path=function(t){return arguments.length?(e=X(t),r):e},r})().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),i="LR"===r.direction?[35,320]:[320,35];return{nodes:ea.nodeSize(i).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===r.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,r])},es=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:r}=e,{setCenter:i,getZoom:o}=(0,L._K)();return{centerScreenOnNode:(0,c.useCallback)(()=>i(t+r/2,n,{duration:500,zoom:o()}),[o,t,n,r,i])}},eu=n(1945),ec=n.n(eu),ed=n(8335),eh=e=>{let{type:t,inactive:n=!1}=e;return(0,o.jsx)(L.HH,{type:t,position:"source"===t?ed.Ly.Right:ed.Ly.Left,style:{width:8,height:8,backgroundColor:n?F().FIDESUI_NEUTRAL_400:F().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},ep=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onCancel:i,onSubmit:l,parentKey:s}=t,u=(0,c.useRef)(null),[d,h]=(0,c.useState)(""),{centerScreenOnNode:p}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});return(0,c.useEffect)(()=>{h("");let e=()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await p(),e()})()},[s,p,n,r]),(0,o.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,o.jsx)(a.uFc,{placeholder:"Type label name...",ref:u,onBlur:i,onSubmit:()=>l(d),value:d,onChange:e=>h(e.target.value),onKeyUp:e=>{"Escape"===e.key&&i()},onPressEnter:()=>l(d),className:ec().input}),(0,o.jsx)(eh,{type:"target"})]})},ef=e=>{let{getNodeHoverStatus:t}=(0,c.useContext)(z),{target:n}=e,r=t(n),a=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return F().FIDESUI_MINOS;case i.INACTIVE:return F().NEUTRAL_400;default:return F().FIDESUI_SANDSTONE}},[r]),l=(0,c.useCallback)(()=>{switch(r){case i.ACTIVE_HOVER:case i.PARENT_OF_HOVER:return 2;default:return 1}},[r]);return(0,o.jsx)(L.Jd,{...e,style:{stroke:a(),strokeWidth:l(),transition:"stroke 0.3s ease 0s"}})},ex=n(34770),em=n.n(ex),ev=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:r}=e,{onMouseEnter:l,onMouseLeave:s,getNodeHoverStatus:u}=(0,c.useContext)(z),{taxonomyType:d,taxonomyItem:h,onAddButtonClick:p,onTaxonomyItemClick:f,label:x,hasChildren:m,isLastCreatedItem:v,resetLastCreatedItemKey:_,userCanAddLabels:y}=t,{centerScreenOnNode:j}=es({positionAbsoluteX:n,positionAbsoluteY:r,nodeWidth:200});(0,c.useEffect)(()=>{let e=async()=>{await j(),l(null==h?void 0:h.fides_key)};v&&(e(),_())},[v,l,null==h?void 0:h.fides_key,_,j]);let T=u(null==h?void 0:h.fides_key),E=(0,c.useCallback)(()=>{switch(T){case i.ACTIVE_HOVER:return em()["button--hover"];case i.PARENT_OF_HOVER:return em()["button--parent-hover"];case i.INACTIVE:return em()["button--inactive"];case i.DEFAULT:case i.CHILD_OF_HOVER:case i.SIBLING_OF_HOVER:default:return""}},[T]),C=(null==h?void 0:h.fides_key)===g.Ch,A=d===g.Lo.DATA_SUBJECTS;return(0,o.jsxs)("div",{className:em().container,onMouseEnter:()=>l(null==h?void 0:h.fides_key),onMouseLeave:()=>s(null==h?void 0:h.fides_key),"data-testid":"taxonomy-node-".concat(null==h?void 0:h.fides_key),children:[(0,o.jsx)(a.wpx,{className:"".concat(em().button," ").concat(E()),onClick:()=>null==f?void 0:f(h),disabled:!f,type:"text",children:(0,o.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==h?void 0:h.active)===!1?"(disabled) ":"",x]})}),!C&&(0,o.jsx)(eh,{type:"target",inactive:T===i.INACTIVE}),m&&(0,o.jsx)(eh,{type:"source",inactive:T===i.INACTIVE}),y&&(!A||C)&&(0,o.jsx)("div",{className:em()["add-button-container"],children:(0,o.jsx)(a.wpx,{type:"default",className:"".concat(em()["add-button"]," ").concat(T===i.ACTIVE_HOVER?em()["add-button--visible"]:""),icon:(0,o.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==p?void 0:p(h),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(x)})})]})};let e_=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:r,lastCreatedItemKey:i,resetLastCreatedItemKey:a,onTaxonomyItemClick:l,onAddButtonClick:s,onCancelDraftItem:u,onSubmitDraftItem:d,userCanAddLabels:h}=e,{fitView:p}=(0,L._K)();(0,c.useEffect)(()=>{setTimeout(()=>p(),150)},[p,t]);let f=[(0,c.useMemo)(()=>({id:g.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:g.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:s,hasChildren:0!==n.length,userCanAddLabels:h},type:"taxonomyTreeNode"}),[t,n.length,s,h])],x=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",r={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:l,onAddButtonClick:s,hasChildren:!1,isLastCreatedItem:i===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:h},type:"taxonomyTreeNode"};f.push(r);let o=e.parent_key?f.find(t=>t.id===e.parent_key):null,u=o?o.id:g.Ch,c=e.fides_key,d={id:"".concat(u,"-").concat(c),source:u,target:c,type:"taxonomyTreeEdge"};x.push(d),o&&(o.data.hasChildren=!0)}),r){let e=r.parent_key||g.Ch;f.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:u,onSubmit:d},hidden:!r}),x.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=f.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:m,edges:v}=el({nodes:f,edges:x,options:{direction:"LR"}}),_=(0,c.useMemo)(()=>({taxonomyTreeNode:ev,textInputNode:ep}),[]),y=(0,c.useMemo)(()=>({taxonomyTreeEdge:ef}),[]);return(0,o.jsx)("div",{className:"size-full",style:{backgroundColor:F().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,o.jsx)(U,{children:(0,o.jsxs)(L.x$,{nodes:m,edges:v,nodeTypes:_,edgeTypes:y,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,o.jsx)(L.Aq,{color:F().FIDESUI_NEUTRAL_100,variant:L.T7.Dots,size:3}),(0,o.jsx)(L.a9,{nodeStrokeWidth:3,pannable:!0}),(0,o.jsx)(L.ZX,{showInteractive:!1})]})})})};var ey=e=>(0,o.jsx)(L.tV,{children:(0,o.jsx)(e_,{...e})}),eg=()=>{let[e,t]=(0,c.useState)(g.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:r,taxonomyItems:i=[]}=A({taxonomyType:e}),l=(0,u.useSearchParams)(),m=(null==l?void 0:l.get("showDisabledItems"))==="true";(0,c.useEffect)(()=>{r()},[r,e]);let[v,_]=(0,c.useState)(null),[y,j]=(0,c.useState)(null),[T,E]=(0,c.useState)(null);(0,c.useEffect)(()=>{j(null),E(null),_(null)},[e]);let C=(0,a.pmc)(),b=(0,c.useCallback)(async e=>{if(!y)return;let t=(null==y?void 0:y.parent_key)===g.Ch,r={...y,name:e,parent_key:t?null:y.parent_key},i=await n(r);if((0,d.D4)(i)){C((0,x.Vo)((0,d.e$)(i.error)));return}E(i.data.fides_key),C((0,x.t5)("New label successfully created")),j(null)},[n,y,C]),S=s()(i,"active"),I=(0,f.Tg)([(0,g.Hy)(e).CREATE]);return(0,o.jsxs)(h.Z,{title:"Taxonomy",children:[(0,o.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(p.Z,{heading:"Taxonomy"}),(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("div",{className:"mb-5 flex justify-between",children:(0,o.jsxs)(a.vyj.Compact,{children:[(0,o.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,o.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,o.jsxs)("div",{className:"relative grow",children:[(0,o.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,o.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,d.MM)(g.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!i.length&&(0,o.jsx)(ey,{userCanAddLabels:I,taxonomyItems:m?i:S,draftNewItem:y,lastCreatedItemKey:T,resetLastCreatedItemKey:()=>E(null),onTaxonomyItemClick:e=>{_(e)},onAddButtonClick:e=>{var t;j({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>j(null),onSubmitDraftItem:b})]})]}),v&&(0,o.jsx)(P,{taxonomyItem:v,taxonomyType:e,onClose:()=>_(null)})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,8765,9278,3662,6148,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{16967:function(e,s,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/profile/[id]",function(){return i(69404)}])},69404:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return y}});var r=i(24246),n=i(13577),t=i(86677),a=i(27378),d=i(16125),u=i(44121),l=i(91317),o=i(19904),c=i(54682),_=i(77830),f=i(58754),h=i(65497);let m=e=>{var s,i,r,n;let t=(0,d.v9)(l.dy),[a]=(0,h.Gl)(),u={username:null!==(s=e.username)&&void 0!==s?s:"",email_address:null!==(i=e.email_address)&&void 0!==i?i:"",first_name:null!==(r=e.first_name)&&void 0!==r?r:"",last_name:null!==(n=e.last_name)&&void 0!==n?n:"",password:"",password_login_enabled:!!e.password_login_enabled},_=async s=>a({...s,id:e.id}),f=!!t&&t.id===e.id,m=(0,o.Tg)([c.Sh.USER_UPDATE]);return{handleSubmit:_,isOwnProfile:f,canUpdateUser:!!f||m,initialValues:u}};var E=e=>{let{user:s}=e,{handleSubmit:i,canUpdateUser:n,initialValues:t}=m(s),a=(0,o.Tg)([c.Sh.USER_READ]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:a?_.e3:void 0},{title:t.username}]}),(0,r.jsx)(u.Z,{onSubmit:i,initialValues:t,canEditNames:n})]})},j=i(16134),p=i(77213),y=()=>{let e=(0,t.useRouter)(),s=(0,j.T)(),i="";i=e.query.id?Array.isArray(e.query.id)?e.query.id[0]:e.query.id:"";let{data:d,isLoading:u}=(0,h.Fk)(i),_=(0,j.C)(l.dy),f=!!_&&!!d&&_.id===d.id,m=(0,o.Tg)([c.Sh.USER_UPDATE])||f;return(0,a.useEffect)(()=>{d&&s((0,h.Vv)(d.id))},[s,d,m]),(0,a.useEffect)(()=>{d&&!m&&e.push("/")},[e,m,d]),(0,r.jsxs)(p.Z,{title:"Users - Edit a user",children:[u&&(0,r.jsx)(n.jqI,{justify:"center",align:"center",className:"h-full",children:(0,r.jsx)(n.$jN,{color:"primary.900"})}),!u&&!d&&(0,r.jsx)(n.jqI,{justify:"center",children:(0,r.jsx)(n.DUx,{message:"Could not find user with this profile ID.",type:"warning",showIcon:!0})}),!!d&&(0,r.jsx)(E,{user:d})]})}}},function(e){e.O(0,[7476,4121,2888,9774,179],function(){return e(e.s=16967)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{16967:function(e,s,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/profile/[id]",function(){return i(69404)}])},69404:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return y}});var r=i(24246),n=i(27824),t=i(86677),a=i(27378),d=i(16125),u=i(44121),l=i(91317),o=i(19904),c=i(54682),_=i(77830),f=i(58754),h=i(65497);let m=e=>{var s,i,r,n;let t=(0,d.v9)(l.dy),[a]=(0,h.Gl)(),u={username:null!==(s=e.username)&&void 0!==s?s:"",email_address:null!==(i=e.email_address)&&void 0!==i?i:"",first_name:null!==(r=e.first_name)&&void 0!==r?r:"",last_name:null!==(n=e.last_name)&&void 0!==n?n:"",password:"",password_login_enabled:!!e.password_login_enabled},_=async s=>a({...s,id:e.id}),f=!!t&&t.id===e.id,m=(0,o.Tg)([c.Sh.USER_UPDATE]);return{handleSubmit:_,isOwnProfile:f,canUpdateUser:!!f||m,initialValues:u}};var E=e=>{let{user:s}=e,{handleSubmit:i,canUpdateUser:n,initialValues:t}=m(s),a=(0,o.Tg)([c.Sh.USER_READ]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:a?_.e3:void 0},{title:t.username}]}),(0,r.jsx)(u.Z,{onSubmit:i,initialValues:t,canEditNames:n})]})},j=i(16134),p=i(77213),y=()=>{let e=(0,t.useRouter)(),s=(0,j.T)(),i="";i=e.query.id?Array.isArray(e.query.id)?e.query.id[0]:e.query.id:"";let{data:d,isLoading:u}=(0,h.Fk)(i),_=(0,j.C)(l.dy),f=!!_&&!!d&&_.id===d.id,m=(0,o.Tg)([c.Sh.USER_UPDATE])||f;return(0,a.useEffect)(()=>{d&&s((0,h.Vv)(d.id))},[s,d,m]),(0,a.useEffect)(()=>{d&&!m&&e.push("/")},[e,m,d]),(0,r.jsxs)(p.Z,{title:"Users - Edit a user",children:[u&&(0,r.jsx)(n.jqI,{justify:"center",align:"center",className:"h-full",children:(0,r.jsx)(n.$jN,{color:"primary.900"})}),!u&&!d&&(0,r.jsx)(n.jqI,{justify:"center",children:(0,r.jsx)(n.DUx,{message:"Could not find user with this profile ID.",type:"warning",showIcon:!0})}),!!d&&(0,r.jsx)(E,{user:d})]})}}},function(e){e.O(0,[7476,4121,2888,9774,179],function(){return e(e.s=16967)}),_N_E=e.O()}]);