@strapi/admin 5.0.0-beta.9 → 5.0.0-rc.1

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.
Files changed (305) hide show
  1. package/LICENSE +18 -3
  2. package/dist/admin/{AdminSeatInfo-cqB8nHFZ.js → AdminSeatInfo-E8azTFQY.js} +5 -5
  3. package/dist/admin/AdminSeatInfo-E8azTFQY.js.map +1 -0
  4. package/dist/admin/{AdminSeatInfo-_UxgNKbX.mjs → AdminSeatInfo-Q_hUNC5B.mjs} +5 -5
  5. package/dist/admin/AdminSeatInfo-Q_hUNC5B.mjs.map +1 -0
  6. package/dist/admin/{ApplicationInfoPage-6PD2owY8.mjs → ApplicationInfoPage-FvuI2dqs.mjs} +153 -158
  7. package/dist/admin/ApplicationInfoPage-FvuI2dqs.mjs.map +1 -0
  8. package/dist/admin/{ApplicationInfoPage-S18loXTF.js → ApplicationInfoPage-ODW6epX5.js} +161 -166
  9. package/dist/admin/ApplicationInfoPage-ODW6epX5.js.map +1 -0
  10. package/dist/admin/{AuthResponse-Y4lblDuD.mjs → AuthResponse-J8A48xdo.mjs} +9 -5
  11. package/dist/admin/AuthResponse-J8A48xdo.mjs.map +1 -0
  12. package/dist/admin/{AuthResponse-EiDRhJY8.js → AuthResponse-KlTDmm2i.js} +10 -6
  13. package/dist/admin/AuthResponse-KlTDmm2i.js.map +1 -0
  14. package/dist/admin/{AuthenticatedLayout-gOaUXjO8.mjs → AuthenticatedLayout-1zXrNSte.mjs} +177 -166
  15. package/dist/admin/AuthenticatedLayout-1zXrNSte.mjs.map +1 -0
  16. package/dist/admin/{AuthenticatedLayout-MDNNJRPg.js → AuthenticatedLayout-haMSd2JF.js} +192 -181
  17. package/dist/admin/AuthenticatedLayout-haMSd2JF.js.map +1 -0
  18. package/dist/admin/CreateActionEE-Yfp4hs7a.mjs +49 -0
  19. package/dist/admin/CreateActionEE-Yfp4hs7a.mjs.map +1 -0
  20. package/dist/admin/CreateActionEE-uqyKLxwI.js +76 -0
  21. package/dist/admin/CreateActionEE-uqyKLxwI.js.map +1 -0
  22. package/dist/admin/{CreatePage-puzZjQXr.mjs → CreatePage-UzCNaW8h.mjs} +13 -14
  23. package/dist/admin/CreatePage-UzCNaW8h.mjs.map +1 -0
  24. package/dist/admin/{CreatePage-Z_y-A5xj.js → CreatePage-X9rp03gy.js} +5 -5
  25. package/dist/admin/{CreatePage-Z_y-A5xj.js.map → CreatePage-X9rp03gy.js.map} +1 -1
  26. package/dist/admin/{CreatePage-GD7KENsP.mjs → CreatePage-embavU6j.mjs} +3 -3
  27. package/dist/admin/{CreatePage-GD7KENsP.mjs.map → CreatePage-embavU6j.mjs.map} +1 -1
  28. package/dist/admin/{CreatePage-5V60DKB0.js → CreatePage-zeisnPM2.js} +18 -19
  29. package/dist/admin/CreatePage-zeisnPM2.js.map +1 -0
  30. package/dist/admin/{CreateView-EjqRVjU_.mjs → CreateView-SQFk7zP8.mjs} +3 -3
  31. package/dist/admin/{CreateView-EjqRVjU_.mjs.map → CreateView-SQFk7zP8.mjs.map} +1 -1
  32. package/dist/admin/CreateView-Smkfwq2U.js +17 -0
  33. package/dist/admin/{CreateView-VYprogwB.js.map → CreateView-Smkfwq2U.js.map} +1 -1
  34. package/dist/admin/{CreateView-jM_w7R83.mjs → CreateView-phBO6q6q.mjs} +3 -3
  35. package/dist/admin/{CreateView-jM_w7R83.mjs.map → CreateView-phBO6q6q.mjs.map} +1 -1
  36. package/dist/admin/CreateView-yQvtXeP2.js +17 -0
  37. package/dist/admin/{CreateView-5V271zBl.js.map → CreateView-yQvtXeP2.js.map} +1 -1
  38. package/dist/admin/{EditPage-vRwS2OJZ.js → EditPage-1svcLlQN.js} +19 -19
  39. package/dist/admin/EditPage-1svcLlQN.js.map +1 -0
  40. package/dist/admin/{EditPage-HsLjcfgK.js → EditPage-GM7gM7Np.js} +15 -15
  41. package/dist/admin/EditPage-GM7gM7Np.js.map +1 -0
  42. package/dist/admin/{EditPage-W_qlhF-2.mjs → EditPage-QHC3cITE.mjs} +11 -11
  43. package/dist/admin/EditPage-QHC3cITE.mjs.map +1 -0
  44. package/dist/admin/{EditPage-WuJtih1X.js → EditPage-ix4Or3TO.js} +96 -91
  45. package/dist/admin/EditPage-ix4Or3TO.js.map +1 -0
  46. package/dist/admin/{EditPage-8_dXc9y1.mjs → EditPage-riE7hBMx.mjs} +9 -9
  47. package/dist/admin/EditPage-riE7hBMx.mjs.map +1 -0
  48. package/dist/admin/{EditPage-8fk5JEO7.mjs → EditPage-xDZwHLDD.mjs} +91 -86
  49. package/dist/admin/EditPage-xDZwHLDD.mjs.map +1 -0
  50. package/dist/admin/{EditView-Cac025JW.mjs → EditView-3TBDETCw.mjs} +10 -10
  51. package/dist/admin/EditView-3TBDETCw.mjs.map +1 -0
  52. package/dist/admin/{EditView-lhhZAQtN.js → EditView-z-CFelH2.js} +19 -19
  53. package/dist/admin/EditView-z-CFelH2.js.map +1 -0
  54. package/dist/admin/{EditViewPage-Q7N1TLU9.js → EditViewPage-Kw7Ezpay.js} +32 -32
  55. package/dist/admin/EditViewPage-Kw7Ezpay.js.map +1 -0
  56. package/dist/admin/{EditViewPage-f56oKqQ-.mjs → EditViewPage-M5Bto2f0.mjs} +23 -23
  57. package/dist/admin/EditViewPage-M5Bto2f0.mjs.map +1 -0
  58. package/dist/admin/{EventsTable-y6XT7dVi.js → EventsTable-ihsVS1kY.js} +2 -2
  59. package/dist/admin/{EventsTable-y6XT7dVi.js.map → EventsTable-ihsVS1kY.js.map} +1 -1
  60. package/dist/admin/{EventsTable-duSraBTj.mjs → EventsTable-xNALq0Xl.mjs} +2 -2
  61. package/dist/admin/{EventsTable-duSraBTj.mjs.map → EventsTable-xNALq0Xl.mjs.map} +1 -1
  62. package/dist/admin/{HomePage-UTLFs-4n.mjs → HomePage-1iC-u-RM.mjs} +3 -3
  63. package/dist/admin/{HomePage-UTLFs-4n.mjs.map → HomePage-1iC-u-RM.mjs.map} +1 -1
  64. package/dist/admin/{HomePage-vTms2gld.js → HomePage-5XpRwLIS.js} +3 -3
  65. package/dist/admin/{HomePage-vTms2gld.js.map → HomePage-5XpRwLIS.js.map} +1 -1
  66. package/dist/admin/{HomePage-4Hk9puW_.js → HomePage-6JeS-ulc.js} +18 -18
  67. package/dist/admin/HomePage-6JeS-ulc.js.map +1 -0
  68. package/dist/admin/{HomePage-d4h0KEnw.mjs → HomePage-pBVsiRLB.mjs} +12 -12
  69. package/dist/admin/HomePage-pBVsiRLB.mjs.map +1 -0
  70. package/dist/admin/{InstalledPluginsPage-9ooKCsS7.js → InstalledPluginsPage-QYeyWKla.js} +10 -10
  71. package/dist/admin/{InstalledPluginsPage-9ooKCsS7.js.map → InstalledPluginsPage-QYeyWKla.js.map} +1 -1
  72. package/dist/admin/{InstalledPluginsPage-nCdAsAAu.mjs → InstalledPluginsPage-wwA3VULI.mjs} +4 -4
  73. package/dist/admin/{InstalledPluginsPage-nCdAsAAu.mjs.map → InstalledPluginsPage-wwA3VULI.mjs.map} +1 -1
  74. package/dist/admin/{Layout-Ax9QtxH1.mjs → Layout-Dg3BpNCD.mjs} +22 -10
  75. package/dist/admin/Layout-Dg3BpNCD.mjs.map +1 -0
  76. package/dist/admin/{Layout-Bmmqv9h6.js → Layout-n5Z9I_69.js} +26 -14
  77. package/dist/admin/Layout-n5Z9I_69.js.map +1 -0
  78. package/dist/admin/{ListPage-4nzagne8.js → ListPage-8Tez014i.js} +79 -43
  79. package/dist/admin/ListPage-8Tez014i.js.map +1 -0
  80. package/dist/admin/{ListPage-10_h7FUt.js → ListPage-8iWYEe2_.js} +50 -49
  81. package/dist/admin/ListPage-8iWYEe2_.js.map +1 -0
  82. package/dist/admin/{ListPage-TWLqkRt6.js → ListPage-CxUAyot2.js} +27 -32
  83. package/dist/admin/ListPage-CxUAyot2.js.map +1 -0
  84. package/dist/admin/{ListPage-4n-Xb2aE.js → ListPage-KOIEopQN.js} +3 -3
  85. package/dist/admin/{ListPage-4n-Xb2aE.js.map → ListPage-KOIEopQN.js.map} +1 -1
  86. package/dist/admin/{ListPage-4kGSO2Ri.mjs → ListPage-Ka430VWJ.mjs} +40 -39
  87. package/dist/admin/ListPage-Ka430VWJ.mjs.map +1 -0
  88. package/dist/admin/{ListPage-OE9xQffQ.mjs → ListPage-P4Apgmd-.mjs} +18 -23
  89. package/dist/admin/ListPage-P4Apgmd-.mjs.map +1 -0
  90. package/dist/admin/{ListPage-EPIYY3Uf.mjs → ListPage-PfBDJtky.mjs} +71 -35
  91. package/dist/admin/ListPage-PfBDJtky.mjs.map +1 -0
  92. package/dist/admin/{ListPage-gbCO5Otz.mjs → ListPage-SnOw9EMq.mjs} +3 -3
  93. package/dist/admin/{ListPage-gbCO5Otz.mjs.map → ListPage-SnOw9EMq.mjs.map} +1 -1
  94. package/dist/admin/{ListPage-IgkmnCSY.js → ListPage-XYrZSP2n.js} +15 -22
  95. package/dist/admin/ListPage-XYrZSP2n.js.map +1 -0
  96. package/dist/admin/{ListPage-VGqEsiEA.mjs → ListPage-_sJsfVLq.mjs} +7 -14
  97. package/dist/admin/ListPage-_sJsfVLq.mjs.map +1 -0
  98. package/dist/admin/{ListView-uHb_Hgib.js → ListView-6U-6GqOi.js} +13 -13
  99. package/dist/admin/{ListView-uHb_Hgib.js.map → ListView-6U-6GqOi.js.map} +1 -1
  100. package/dist/admin/{ListView-Zvs5X2St.mjs → ListView-UKJyJnd2.mjs} +4 -4
  101. package/dist/admin/{ListView-Zvs5X2St.mjs.map → ListView-UKJyJnd2.mjs.map} +1 -1
  102. package/dist/admin/{ListView-pT2a-fdi.js → ListView-u3bQ6Jrd.js} +13 -13
  103. package/dist/admin/{ListView-pT2a-fdi.js.map → ListView-u3bQ6Jrd.js.map} +1 -1
  104. package/dist/admin/{ListView-gKrpPLEM.mjs → ListView-udsJ7zMT.mjs} +4 -4
  105. package/dist/admin/{ListView-gKrpPLEM.mjs.map → ListView-udsJ7zMT.mjs.map} +1 -1
  106. package/dist/admin/{Login-EcSP4AMG.js → Login-iUJs_YTe.js} +5 -5
  107. package/dist/admin/{Login-EcSP4AMG.js.map → Login-iUJs_YTe.js.map} +1 -1
  108. package/dist/admin/{Login-w4BUlNaE.mjs → Login-qOZJMFOX.mjs} +4 -4
  109. package/dist/admin/{Login-w4BUlNaE.mjs.map → Login-qOZJMFOX.mjs.map} +1 -1
  110. package/dist/admin/{MagicLinkEE-b9NK8XXY.mjs → MagicLinkEE--uHOs_Sh.mjs} +3 -3
  111. package/dist/admin/{MagicLinkEE-b9NK8XXY.mjs.map → MagicLinkEE--uHOs_Sh.mjs.map} +1 -1
  112. package/dist/admin/{MagicLinkEE-qT5OE9Pm.js → MagicLinkEE-ZHDAMHRp.js} +3 -3
  113. package/dist/admin/{MagicLinkEE-qT5OE9Pm.js.map → MagicLinkEE-ZHDAMHRp.js.map} +1 -1
  114. package/dist/admin/{MarketplacePage-MVRrpUSk.js → MarketplacePage-FLcrHGFN.js} +123 -150
  115. package/dist/admin/MarketplacePage-FLcrHGFN.js.map +1 -0
  116. package/dist/admin/{MarketplacePage-oGhZBKgX.mjs → MarketplacePage-KyupKstI.mjs} +111 -138
  117. package/dist/admin/MarketplacePage-KyupKstI.mjs.map +1 -0
  118. package/dist/admin/{Ornaments-h_LCCr5P.mjs → Ornaments-jAwgQeK0.mjs} +2 -2
  119. package/dist/admin/{Ornaments-h_LCCr5P.mjs.map → Ornaments-jAwgQeK0.mjs.map} +1 -1
  120. package/dist/admin/{Ornaments-UTssGzOw.js → Ornaments-sFPQPOtb.js} +2 -2
  121. package/dist/admin/{Ornaments-UTssGzOw.js.map → Ornaments-sFPQPOtb.js.map} +1 -1
  122. package/dist/admin/{Permissions-kNVZVLmu.js → Permissions-SuZE5tW3.js} +265 -277
  123. package/dist/admin/Permissions-SuZE5tW3.js.map +1 -0
  124. package/dist/admin/{Permissions-lf6dNG4S.mjs → Permissions-oxdduJgE.mjs} +256 -269
  125. package/dist/admin/Permissions-oxdduJgE.mjs.map +1 -0
  126. package/dist/admin/{PrivateRoute-1hyhztQM.mjs → PrivateRoute-4oRTB_tX.mjs} +2 -2
  127. package/dist/admin/{PrivateRoute-1hyhztQM.mjs.map → PrivateRoute-4oRTB_tX.mjs.map} +1 -1
  128. package/dist/admin/{PrivateRoute-wBE5vMxe.js → PrivateRoute-ndqg7K6H.js} +3 -3
  129. package/dist/admin/{PrivateRoute-wBE5vMxe.js.map → PrivateRoute-ndqg7K6H.js.map} +1 -1
  130. package/dist/admin/{ProfilePage-zk-Py9wt.mjs → ProfilePage-4dKn6UUc.mjs} +10 -10
  131. package/dist/admin/ProfilePage-4dKn6UUc.mjs.map +1 -0
  132. package/dist/admin/{ProfilePage-ZlpnTKEF.js → ProfilePage-Ryrm4G10.js} +23 -23
  133. package/dist/admin/ProfilePage-Ryrm4G10.js.map +1 -0
  134. package/dist/admin/{PurchaseAuditLogs-9reb0oGz.js → PurchaseAuditLogs-EDV5UGnG.js} +2 -2
  135. package/dist/admin/{PurchaseAuditLogs-9reb0oGz.js.map → PurchaseAuditLogs-EDV5UGnG.js.map} +1 -1
  136. package/dist/admin/{PurchaseAuditLogs-iOYsTJA-.mjs → PurchaseAuditLogs-K5ZTiR8K.mjs} +2 -2
  137. package/dist/admin/{PurchaseAuditLogs-iOYsTJA-.mjs.map → PurchaseAuditLogs-K5ZTiR8K.mjs.map} +1 -1
  138. package/dist/admin/{PurchaseSingleSignOn-S3xLiiv7.js → PurchaseSingleSignOn--Cb7M20e.js} +2 -2
  139. package/dist/admin/{PurchaseSingleSignOn-S3xLiiv7.js.map → PurchaseSingleSignOn--Cb7M20e.js.map} +1 -1
  140. package/dist/admin/{PurchaseSingleSignOn-X629iA7K.mjs → PurchaseSingleSignOn-c143s7mz.mjs} +2 -2
  141. package/dist/admin/{PurchaseSingleSignOn-X629iA7K.mjs.map → PurchaseSingleSignOn-c143s7mz.mjs.map} +1 -1
  142. package/dist/admin/{SSOProviders-AirHFyBl.js → SSOProviders-QBcyB9VI.js} +5 -5
  143. package/dist/admin/SSOProviders-QBcyB9VI.js.map +1 -0
  144. package/dist/admin/{SSOProviders-t8D-v8As.mjs → SSOProviders-nMmBLr8g.mjs} +6 -6
  145. package/dist/admin/SSOProviders-nMmBLr8g.mjs.map +1 -0
  146. package/dist/admin/{SelectRoles-yM-LT458.mjs → SelectRoles-psJuDrRF.mjs} +4 -4
  147. package/dist/admin/{SelectRoles-yM-LT458.mjs.map → SelectRoles-psJuDrRF.mjs.map} +1 -1
  148. package/dist/admin/{SelectRoles-hyiyvsCG.js → SelectRoles-x3GAhhSJ.js} +5 -5
  149. package/dist/admin/{SelectRoles-hyiyvsCG.js.map → SelectRoles-x3GAhhSJ.js.map} +1 -1
  150. package/dist/admin/{SingleSignOnPage-3Mfu4dgn.js → SingleSignOnPage-83q-C4t-.js} +17 -17
  151. package/dist/admin/SingleSignOnPage-83q-C4t-.js.map +1 -0
  152. package/dist/admin/{SingleSignOnPage-wPZ1tqEk.mjs → SingleSignOnPage-9l6JRqDd.mjs} +7 -7
  153. package/dist/admin/SingleSignOnPage-9l6JRqDd.mjs.map +1 -0
  154. package/dist/admin/{Table-OcYvBab7.mjs → Table-I-45hnM1.mjs} +11 -22
  155. package/dist/admin/Table-I-45hnM1.mjs.map +1 -0
  156. package/dist/admin/{Table-N9PZc6xL.js → Table-oO6QTH1W.js} +12 -23
  157. package/dist/admin/Table-oO6QTH1W.js.map +1 -0
  158. package/dist/admin/{rbac-5b9ylhpa.js → Theme-7W0we6BI.js} +147 -80
  159. package/dist/admin/Theme-7W0we6BI.js.map +1 -0
  160. package/dist/admin/{rbac-oJEkQdXG.mjs → Theme-PrUuuGtN.mjs} +140 -81
  161. package/dist/admin/Theme-PrUuuGtN.mjs.map +1 -0
  162. package/dist/admin/{TokenTypeSelect-dWn05yGP.js → TokenTypeSelect-26DfB0-O.js} +10 -12
  163. package/dist/admin/TokenTypeSelect-26DfB0-O.js.map +1 -0
  164. package/dist/admin/{TokenTypeSelect-v6IYPaBF.mjs → TokenTypeSelect-xCzuaMQo.mjs} +7 -9
  165. package/dist/admin/TokenTypeSelect-xCzuaMQo.mjs.map +1 -0
  166. package/dist/admin/{UseCasePage-ijq-Bur_.js → UseCasePage-WtuQk75n.js} +6 -6
  167. package/dist/admin/{UseCasePage-ijq-Bur_.js.map → UseCasePage-WtuQk75n.js.map} +1 -1
  168. package/dist/admin/{UseCasePage-P4AFdcDQ.mjs → UseCasePage-fXNd00ES.mjs} +4 -4
  169. package/dist/admin/{UseCasePage-P4AFdcDQ.mjs.map → UseCasePage-fXNd00ES.mjs.map} +1 -1
  170. package/dist/admin/{constants-sfZ2gFzJ.js → constants-GyaJoB7C.js} +5 -5
  171. package/dist/admin/{constants-sfZ2gFzJ.js.map → constants-GyaJoB7C.js.map} +1 -1
  172. package/dist/admin/{constants-Z-zrJ7Zs.mjs → constants-nzCvle10.mjs} +4 -4
  173. package/dist/admin/{constants-Z-zrJ7Zs.mjs.map → constants-nzCvle10.mjs.map} +1 -1
  174. package/dist/admin/{en-K35WIWVM.mjs → en-0Ld-ipyI.mjs} +3 -2
  175. package/dist/admin/{en-K35WIWVM.mjs.map → en-0Ld-ipyI.mjs.map} +1 -1
  176. package/dist/admin/{en-G-ukrF2h.js → en-TbnMBjZf.js} +3 -2
  177. package/dist/admin/{en-G-ukrF2h.js.map → en-TbnMBjZf.js.map} +1 -1
  178. package/dist/admin/{index-duYn5r8_.js → index-TG8-3711.js} +1524 -1425
  179. package/dist/admin/index-TG8-3711.js.map +1 -0
  180. package/dist/admin/{index-EQL2s09p.mjs → index-f6STHGSC.mjs} +1479 -1377
  181. package/dist/admin/index-f6STHGSC.mjs.map +1 -0
  182. package/dist/admin/index.js +12 -12
  183. package/dist/admin/index.mjs +2 -2
  184. package/dist/admin/{selectors-Ilww6FA-.mjs → selectors-ZpHhvPK4.mjs} +2 -2
  185. package/dist/admin/{selectors-Ilww6FA-.mjs.map → selectors-ZpHhvPK4.mjs.map} +1 -1
  186. package/dist/admin/selectors-zQKcCNuz.js +8 -0
  187. package/dist/admin/{selectors-NDEu6dJa.js.map → selectors-zQKcCNuz.js.map} +1 -1
  188. package/dist/admin/src/StrapiApp.d.ts +17 -45
  189. package/dist/admin/src/components/ConfirmDialog.d.ts +18 -8
  190. package/dist/admin/src/components/Filters.d.ts +4 -8
  191. package/dist/admin/src/components/Form.d.ts +6 -1
  192. package/dist/admin/src/components/FormInputs/Checkbox.d.ts +1 -1
  193. package/dist/admin/src/components/FormInputs/types.d.ts +1 -1
  194. package/dist/admin/src/components/Layouts/HeaderLayout.d.ts +1 -1
  195. package/dist/admin/src/components/Layouts/Layout.d.ts +1 -1
  196. package/dist/admin/src/components/MainNav/NavUser.d.ts +1 -1
  197. package/dist/admin/src/components/Table.d.ts +1 -1
  198. package/dist/admin/src/constants/filters.d.ts +2 -1
  199. package/dist/admin/src/constants.d.ts +3 -3
  200. package/dist/admin/src/core/apis/router.d.ts +73 -0
  201. package/dist/admin/src/features/Auth.d.ts +2 -2
  202. package/dist/admin/src/features/StrapiApp.d.ts +2 -1
  203. package/dist/admin/src/hooks/useSettingsMenu.d.ts +2 -2
  204. package/dist/admin/src/index.d.ts +2 -1
  205. package/dist/admin/src/pages/Settings/pages/Roles/components/CollapsePropertyMatrix.d.ts +0 -6
  206. package/dist/admin/src/pages/Settings/pages/Roles/components/ConditionsButton.d.ts +4 -2
  207. package/dist/admin/src/pages/Settings/pages/Roles/components/ConditionsModal.d.ts +2 -4
  208. package/dist/admin/src/pages/Settings/pages/Users/components/CreateActionCE.d.ts +2 -1
  209. package/dist/admin/src/reducer.d.ts +7 -2
  210. package/dist/admin/src/render.d.ts +1 -0
  211. package/dist/admin/src/router.d.ts +7 -0
  212. package/dist/admin/src/services/admin.d.ts +5 -5
  213. package/dist/admin/src/types/permissions.d.ts +1 -1
  214. package/dist/admin/test.js +17 -16
  215. package/dist/admin/test.js.map +1 -1
  216. package/dist/admin/test.mjs +10 -9
  217. package/dist/admin/test.mjs.map +1 -1
  218. package/dist/admin/tests/store.d.ts +2 -1
  219. package/dist/admin/tests/utils.d.ts +2 -1
  220. package/dist/admin/{useAdminRoles-cq3ZckdQ.mjs → useAdminRoles-Aj5B2oXT.mjs} +2 -2
  221. package/dist/admin/{useAdminRoles-cq3ZckdQ.mjs.map → useAdminRoles-Aj5B2oXT.mjs.map} +1 -1
  222. package/dist/admin/{useAdminRoles-2VDDweuC.js → useAdminRoles-JbwI6Lrm.js} +2 -2
  223. package/dist/admin/{useAdminRoles-2VDDweuC.js.map → useAdminRoles-JbwI6Lrm.js.map} +1 -1
  224. package/dist/admin/{useLicenseLimitNotification-1Xo24v-C.mjs → useLicenseLimitNotification-PaR7jmqd.mjs} +2 -2
  225. package/dist/admin/{useLicenseLimitNotification-1Xo24v-C.mjs.map → useLicenseLimitNotification-PaR7jmqd.mjs.map} +1 -1
  226. package/dist/admin/{useLicenseLimitNotification-9iq0TFuF.js → useLicenseLimitNotification-g1vq6nzk.js} +3 -3
  227. package/dist/admin/{useLicenseLimitNotification-9iq0TFuF.js.map → useLicenseLimitNotification-g1vq6nzk.js.map} +1 -1
  228. package/dist/admin/{useWebhooks-opYGugiT.js → useWebhooks-0RUEkKAV.js} +4 -4
  229. package/dist/admin/{useWebhooks-opYGugiT.js.map → useWebhooks-0RUEkKAV.js.map} +1 -1
  230. package/dist/admin/{useWebhooks-bgdpL7W6.mjs → useWebhooks-7thg-d57.mjs} +4 -4
  231. package/dist/admin/{useWebhooks-bgdpL7W6.mjs.map → useWebhooks-7thg-d57.mjs.map} +1 -1
  232. package/dist/admin/{validation-qUTUIssJ.mjs → validation-F0JQeiU1.mjs} +2 -2
  233. package/dist/admin/{validation-qUTUIssJ.mjs.map → validation-F0JQeiU1.mjs.map} +1 -1
  234. package/dist/admin/{validation-6PUPWFkz.js → validation-hzptxkSz.js} +2 -2
  235. package/dist/admin/{validation-6PUPWFkz.js.map → validation-hzptxkSz.js.map} +1 -1
  236. package/dist/ee/admin/src/constants.d.ts +10 -0
  237. package/dist/ee/admin/src/pages/SettingsPage/pages/Users/components/CreateActionEE.d.ts +2 -1
  238. package/dist/ee/server/index.js +1 -3
  239. package/dist/ee/server/index.js.map +1 -1
  240. package/dist/ee/server/index.mjs +1 -3
  241. package/dist/ee/server/index.mjs.map +1 -1
  242. package/dist/package.json.d.ts +13 -10
  243. package/dist/server/index.js +20 -1
  244. package/dist/server/index.js.map +1 -1
  245. package/dist/server/index.mjs +18 -1
  246. package/dist/server/index.mjs.map +1 -1
  247. package/dist/server/src/controllers/webhooks.d.ts.map +1 -1
  248. package/package.json +14 -11
  249. package/dist/admin/AdminSeatInfo-_UxgNKbX.mjs.map +0 -1
  250. package/dist/admin/AdminSeatInfo-cqB8nHFZ.js.map +0 -1
  251. package/dist/admin/ApplicationInfoPage-6PD2owY8.mjs.map +0 -1
  252. package/dist/admin/ApplicationInfoPage-S18loXTF.js.map +0 -1
  253. package/dist/admin/AuthResponse-EiDRhJY8.js.map +0 -1
  254. package/dist/admin/AuthResponse-Y4lblDuD.mjs.map +0 -1
  255. package/dist/admin/AuthenticatedLayout-MDNNJRPg.js.map +0 -1
  256. package/dist/admin/AuthenticatedLayout-gOaUXjO8.mjs.map +0 -1
  257. package/dist/admin/CreateActionEE-dGj-JbWV.js +0 -53
  258. package/dist/admin/CreateActionEE-dGj-JbWV.js.map +0 -1
  259. package/dist/admin/CreateActionEE-uBGAkLbn.mjs +0 -45
  260. package/dist/admin/CreateActionEE-uBGAkLbn.mjs.map +0 -1
  261. package/dist/admin/CreatePage-5V60DKB0.js.map +0 -1
  262. package/dist/admin/CreatePage-puzZjQXr.mjs.map +0 -1
  263. package/dist/admin/CreateView-5V271zBl.js +0 -17
  264. package/dist/admin/CreateView-VYprogwB.js +0 -17
  265. package/dist/admin/EditPage-8_dXc9y1.mjs.map +0 -1
  266. package/dist/admin/EditPage-8fk5JEO7.mjs.map +0 -1
  267. package/dist/admin/EditPage-HsLjcfgK.js.map +0 -1
  268. package/dist/admin/EditPage-W_qlhF-2.mjs.map +0 -1
  269. package/dist/admin/EditPage-WuJtih1X.js.map +0 -1
  270. package/dist/admin/EditPage-vRwS2OJZ.js.map +0 -1
  271. package/dist/admin/EditView-Cac025JW.mjs.map +0 -1
  272. package/dist/admin/EditView-lhhZAQtN.js.map +0 -1
  273. package/dist/admin/EditViewPage-Q7N1TLU9.js.map +0 -1
  274. package/dist/admin/EditViewPage-f56oKqQ-.mjs.map +0 -1
  275. package/dist/admin/HomePage-4Hk9puW_.js.map +0 -1
  276. package/dist/admin/HomePage-d4h0KEnw.mjs.map +0 -1
  277. package/dist/admin/Layout-Ax9QtxH1.mjs.map +0 -1
  278. package/dist/admin/Layout-Bmmqv9h6.js.map +0 -1
  279. package/dist/admin/ListPage-10_h7FUt.js.map +0 -1
  280. package/dist/admin/ListPage-4kGSO2Ri.mjs.map +0 -1
  281. package/dist/admin/ListPage-4nzagne8.js.map +0 -1
  282. package/dist/admin/ListPage-EPIYY3Uf.mjs.map +0 -1
  283. package/dist/admin/ListPage-IgkmnCSY.js.map +0 -1
  284. package/dist/admin/ListPage-OE9xQffQ.mjs.map +0 -1
  285. package/dist/admin/ListPage-TWLqkRt6.js.map +0 -1
  286. package/dist/admin/ListPage-VGqEsiEA.mjs.map +0 -1
  287. package/dist/admin/MarketplacePage-MVRrpUSk.js.map +0 -1
  288. package/dist/admin/MarketplacePage-oGhZBKgX.mjs.map +0 -1
  289. package/dist/admin/Permissions-kNVZVLmu.js.map +0 -1
  290. package/dist/admin/Permissions-lf6dNG4S.mjs.map +0 -1
  291. package/dist/admin/ProfilePage-ZlpnTKEF.js.map +0 -1
  292. package/dist/admin/ProfilePage-zk-Py9wt.mjs.map +0 -1
  293. package/dist/admin/SSOProviders-AirHFyBl.js.map +0 -1
  294. package/dist/admin/SSOProviders-t8D-v8As.mjs.map +0 -1
  295. package/dist/admin/SingleSignOnPage-3Mfu4dgn.js.map +0 -1
  296. package/dist/admin/SingleSignOnPage-wPZ1tqEk.mjs.map +0 -1
  297. package/dist/admin/Table-N9PZc6xL.js.map +0 -1
  298. package/dist/admin/Table-OcYvBab7.mjs.map +0 -1
  299. package/dist/admin/TokenTypeSelect-dWn05yGP.js.map +0 -1
  300. package/dist/admin/TokenTypeSelect-v6IYPaBF.mjs.map +0 -1
  301. package/dist/admin/index-EQL2s09p.mjs.map +0 -1
  302. package/dist/admin/index-duYn5r8_.js.map +0 -1
  303. package/dist/admin/rbac-5b9ylhpa.js.map +0 -1
  304. package/dist/admin/rbac-oJEkQdXG.mjs.map +0 -1
  305. package/dist/admin/selectors-NDEu6dJa.js +0 -8
@@ -2,15 +2,15 @@
2
2
 
3
3
  const client = require('react-dom/client');
4
4
  const jsxRuntime = require('react/jsx-runtime');
5
- const React = require('react');
6
5
  const designSystem = require('@strapi/design-system');
7
6
  const invariant = require('invariant');
8
7
  const isFunction = require('lodash/isFunction');
9
8
  const merge = require('lodash/merge');
10
9
  const pick = require('lodash/pick');
11
- const reactRedux = require('react-redux');
12
10
  const reactRouterDom = require('react-router-dom');
13
- const rbac = require('./rbac-5b9ylhpa.js');
11
+ const Theme = require('./Theme-7W0we6BI.js');
12
+ const reactRedux = require('react-redux');
13
+ const React = require('react');
14
14
  const reactQuery = require('react-query');
15
15
  const icons = require('@strapi/icons');
16
16
  const immer = require('immer');
@@ -18,18 +18,17 @@ const reactIntl = require('react-intl');
18
18
  const get = require('lodash/get');
19
19
  const set = require('lodash/set');
20
20
  const styledComponents = require('styled-components');
21
- const toolkit = require('@reduxjs/toolkit');
22
- const admin = require('./admin-p0djr5G6.js');
21
+ const symbols = require('@strapi/icons/symbols');
23
22
  const useEnterprise = require('./useEnterprise-DUs6BYlP.js');
23
+ const admin = require('./admin-p0djr5G6.js');
24
24
  const camelCase = require('lodash/camelCase');
25
25
  const yup = require('yup');
26
26
  const fractionalIndexing = require('fractional-indexing');
27
27
  const isEqual = require('lodash/isEqual');
28
- const clone = require('lodash/clone');
29
- const toPath = require('lodash/toPath');
28
+ const date = require('@internationalized/date');
30
29
  const omit = require('lodash/omit');
31
30
  const formik = require('formik');
32
- const symbols = require('@strapi/icons/symbols');
31
+ const toolkit = require('@reduxjs/toolkit');
33
32
  const throttle = require('lodash/throttle');
34
33
  const qs = require('qs');
35
34
 
@@ -53,18 +52,16 @@ function _interopNamespace(e) {
53
52
  return Object.freeze(n);
54
53
  }
55
54
 
56
- const React__namespace = /*#__PURE__*/_interopNamespace(React);
57
55
  const invariant__default = /*#__PURE__*/_interopDefault(invariant);
58
56
  const isFunction__default = /*#__PURE__*/_interopDefault(isFunction);
59
57
  const merge__default = /*#__PURE__*/_interopDefault(merge);
60
58
  const pick__default = /*#__PURE__*/_interopDefault(pick);
59
+ const React__namespace = /*#__PURE__*/_interopNamespace(React);
61
60
  const get__default = /*#__PURE__*/_interopDefault(get);
62
61
  const set__default = /*#__PURE__*/_interopDefault(set);
63
62
  const camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
64
63
  const yup__namespace = /*#__PURE__*/_interopNamespace(yup);
65
64
  const isEqual__default = /*#__PURE__*/_interopDefault(isEqual);
66
- const clone__default = /*#__PURE__*/_interopDefault(clone);
67
- const toPath__default = /*#__PURE__*/_interopDefault(toPath);
68
65
  const omit__default = /*#__PURE__*/_interopDefault(omit);
69
66
  const throttle__default = /*#__PURE__*/_interopDefault(throttle);
70
67
 
@@ -96,6 +93,20 @@ const ADMIN_PERMISSIONS_EE = {
96
93
  main: [{ action: "admin::provider-login.read", subject: null }],
97
94
  read: [{ action: "admin::provider-login.read", subject: null }],
98
95
  update: [{ action: "admin::provider-login.update", subject: null }]
96
+ },
97
+ releases: {
98
+ read: [
99
+ {
100
+ action: "plugin::content-releases.settings.read",
101
+ subject: null
102
+ }
103
+ ],
104
+ update: [
105
+ {
106
+ action: "plugin::content-releases.settings.update",
107
+ subject: null
108
+ }
109
+ ]
99
110
  }
100
111
  }
101
112
  };
@@ -103,7 +114,7 @@ const getEERoutes$1 = () => window.strapi.isEE ? [
103
114
  {
104
115
  path: "auth/login/:authResponse",
105
116
  lazy: async () => {
106
- const { AuthResponse } = await Promise.resolve().then(() => require('./AuthResponse-EiDRhJY8.js'));
117
+ const { AuthResponse } = await Promise.resolve().then(() => require('./AuthResponse-KlTDmm2i.js'));
107
118
  return {
108
119
  Component: AuthResponse
109
120
  };
@@ -138,245 +149,521 @@ const constants = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
138
149
  getEERoutes: getEERoutes$1
139
150
  }, Symbol.toStringTag, { value: 'Module' }));
140
151
 
141
- const getEERoutes = () => [
142
- ...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) ? [
143
- {
144
- path: "audit-logs",
145
- lazy: async () => {
146
- const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-TWLqkRt6.js'));
147
- return {
148
- Component: ProtectedListPage
149
- };
152
+ const StrapiLogo = "data:image/svg+xml,%3csvg%20width='800'%20height='800'%20viewBox='0%200%20800%20800'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M39%20282c0-118%200-176.9%2036.6-213.5C112.2%2032%20171.1%2032%20288.9%2032h221.2c117.8%200%20176.7%200%20213.3%2036.6C760%20105.2%20760%20164.1%20760%20281.9v221.2c0%20117.8%200%20176.7-36.6%20213.3C686.8%20753%20627.9%20753%20510.1%20753H288.9c-117.8%200-176.7%200-213.3-36.6C39%20679.8%2039%20620.9%2039%20503.1V281.9Z'%20fill='%234945FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M536.4%20250.7H293.7v123.8h123.8v123.7h123.8V255.5c0-2.6-2.2-4.8-4.9-4.8Z'%20fill='%23fff'/%3e%3cpath%20fill='%23fff'%20d='M412.7%20374.5h4.8v4.8h-4.8z'/%3e%3cpath%20d='M293.8%20374.5h119c2.6%200%204.8%202.1%204.8%204.8v119h-119a4.8%204.8%200%200%201-4.8-4.9v-119Z'%20fill='%239593FF'/%3e%3cpath%20d='M417.5%20498.2h123.8L421.6%20618a2.4%202.4%200%200%201-4-1.7v-118ZM293.8%20374.5h-118a2.4%202.4%200%200%201-1.7-4.1l119.7-119.7v123.8Z'%20fill='%239593FF'/%3e%3c/svg%3e";
153
+
154
+ const ADMIN_PERMISSIONS_CE = {
155
+ contentManager: {
156
+ main: [],
157
+ collectionTypesConfigurations: [
158
+ {
159
+ action: "plugin::content-manager.collection-types.configure-view",
160
+ subject: null
150
161
  }
151
- }
152
- ] : [],
153
- ...window.strapi.features.isEnabled(window.strapi.features.SSO) ? [
154
- {
155
- path: "single-sign-on",
156
- lazy: async () => {
157
- const { ProtectedSSO } = await Promise.resolve().then(() => require('./SingleSignOnPage-3Mfu4dgn.js'));
158
- return {
159
- Component: ProtectedSSO
160
- };
162
+ ],
163
+ componentsConfigurations: [
164
+ {
165
+ action: "plugin::content-manager.components.configure-layout",
166
+ subject: null
161
167
  }
162
- }
163
- ] : []
164
- ];
165
-
166
- const [Provider, useHistory] = rbac.createContext("History", {
167
- history: [],
168
- currentLocationIndex: 0,
169
- currentLocation: "",
170
- canGoBack: false,
171
- pushState: () => {
172
- throw new Error("You must use the `HistoryProvider` to access the `pushState` function.");
173
- },
174
- goBack: () => {
175
- throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
176
- }
177
- });
178
- const HistoryProvider = ({ children }) => {
179
- const location = reactRouterDom.useLocation();
180
- const navigate = reactRouterDom.useNavigate();
181
- const [state, dispatch] = React__namespace.useReducer(reducer$2, {
182
- history: [],
183
- currentLocationIndex: 0,
184
- currentLocation: "",
185
- canGoBack: false
186
- });
187
- const isGoingBack = React__namespace.useRef(false);
188
- const pushState = React__namespace.useCallback((path) => {
189
- dispatch({
190
- type: "PUSH_STATE",
191
- payload: typeof path === "string" ? { to: path, search: "" } : path
192
- });
193
- }, []);
194
- const goBack = React__namespace.useCallback(() => {
195
- navigate(-1);
196
- dispatch({ type: "GO_BACK" });
197
- isGoingBack.current = true;
198
- }, [navigate]);
199
- const prevIndex = React__namespace.useRef(state.currentLocationIndex);
200
- React__namespace.useEffect(() => {
201
- if (state.currentLocationIndex !== prevIndex.current) {
202
- dispatch({
203
- type: "SET_CAN_GO_BACK",
204
- payload: state.currentLocationIndex > 1 && state.history.length > 1
205
- });
206
- prevIndex.current = state.currentLocationIndex;
207
- }
208
- }, [prevIndex, state.currentLocationIndex, state.history.length]);
209
- React__namespace.useLayoutEffect(() => {
210
- if (isGoingBack.current) {
211
- isGoingBack.current = false;
212
- } else {
213
- dispatch({
214
- type: "PUSH_STATE",
215
- payload: { to: location.pathname, search: location.search }
216
- });
217
- }
218
- }, [dispatch, location.pathname, location.search]);
219
- return /* @__PURE__ */ jsxRuntime.jsx(Provider, { pushState, goBack, ...state, children });
220
- };
221
- const reducer$2 = (state, action) => immer.produce(state, (draft) => {
222
- switch (action.type) {
223
- case "PUSH_STATE": {
224
- const path = `${action.payload.to}${action.payload.search}`;
225
- if (state.currentLocationIndex === state.history.length) {
226
- draft.history = [...state.history, path];
227
- } else {
228
- draft.history = [...state.history.slice(0, state.currentLocationIndex), path];
168
+ ],
169
+ singleTypesConfigurations: [
170
+ {
171
+ action: "plugin::content-manager.single-types.configure-view",
172
+ subject: null
229
173
  }
230
- draft.currentLocation = path;
231
- draft.currentLocationIndex += 1;
232
- break;
233
- }
234
- case "GO_BACK": {
235
- const newIndex = state.currentLocationIndex - 1;
236
- draft.currentLocation = state.history[newIndex - 1];
237
- draft.currentLocationIndex = newIndex;
238
- break;
239
- }
240
- case "SET_CAN_GO_BACK": {
241
- draft.canGoBack = action.payload;
242
- break;
174
+ ]
175
+ },
176
+ marketplace: {
177
+ main: [{ action: "admin::marketplace.read", subject: null }],
178
+ read: [{ action: "admin::marketplace.read", subject: null }]
179
+ },
180
+ settings: {
181
+ roles: {
182
+ main: [
183
+ { action: "admin::roles.create", subject: null },
184
+ { action: "admin::roles.update", subject: null },
185
+ { action: "admin::roles.read", subject: null },
186
+ { action: "admin::roles.delete", subject: null }
187
+ ],
188
+ create: [{ action: "admin::roles.create", subject: null }],
189
+ delete: [{ action: "admin::roles.delete", subject: null }],
190
+ read: [{ action: "admin::roles.read", subject: null }],
191
+ update: [{ action: "admin::roles.update", subject: null }]
192
+ },
193
+ users: {
194
+ main: [
195
+ { action: "admin::users.create", subject: null },
196
+ { action: "admin::users.read", subject: null },
197
+ { action: "admin::users.update", subject: null },
198
+ { action: "admin::users.delete", subject: null }
199
+ ],
200
+ create: [{ action: "admin::users.create", subject: null }],
201
+ delete: [{ action: "admin::users.delete", subject: null }],
202
+ read: [{ action: "admin::users.read", subject: null }],
203
+ update: [{ action: "admin::users.update", subject: null }]
204
+ },
205
+ webhooks: {
206
+ main: [
207
+ { action: "admin::webhooks.create", subject: null },
208
+ { action: "admin::webhooks.read", subject: null },
209
+ { action: "admin::webhooks.update", subject: null },
210
+ { action: "admin::webhooks.delete", subject: null }
211
+ ],
212
+ create: [{ action: "admin::webhooks.create", subject: null }],
213
+ delete: [{ action: "admin::webhooks.delete", subject: null }],
214
+ read: [
215
+ { action: "admin::webhooks.read", subject: null },
216
+ // NOTE: We need to check with the API
217
+ { action: "admin::webhooks.update", subject: null },
218
+ { action: "admin::webhooks.delete", subject: null }
219
+ ],
220
+ update: [{ action: "admin::webhooks.update", subject: null }]
221
+ },
222
+ "api-tokens": {
223
+ main: [{ action: "admin::api-tokens.access", subject: null }],
224
+ create: [{ action: "admin::api-tokens.create", subject: null }],
225
+ delete: [{ action: "admin::api-tokens.delete", subject: null }],
226
+ read: [{ action: "admin::api-tokens.read", subject: null }],
227
+ update: [{ action: "admin::api-tokens.update", subject: null }],
228
+ regenerate: [{ action: "admin::api-tokens.regenerate", subject: null }]
229
+ },
230
+ "transfer-tokens": {
231
+ main: [{ action: "admin::transfer.tokens.access", subject: null }],
232
+ create: [{ action: "admin::transfer.tokens.create", subject: null }],
233
+ delete: [{ action: "admin::transfer.tokens.delete", subject: null }],
234
+ read: [{ action: "admin::transfer.tokens.read", subject: null }],
235
+ update: [{ action: "admin::transfer.tokens.update", subject: null }],
236
+ regenerate: [{ action: "admin::transfer.tokens.regenerate", subject: null }]
237
+ },
238
+ "project-settings": {
239
+ read: [{ action: "admin::project-settings.read", subject: null }],
240
+ update: [{ action: "admin::project-settings.update", subject: null }]
243
241
  }
244
242
  }
245
- });
246
- const BackButton = React__namespace.forwardRef(({ disabled }, ref) => {
247
- const { formatMessage } = reactIntl.useIntl();
248
- const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
249
- const goBack = useHistory("BackButton", (state) => state.goBack);
250
- const history = useHistory("BackButton", (state) => state.history);
251
- const handleClick = (e) => {
252
- e.preventDefault();
253
- goBack();
254
- };
255
- return /* @__PURE__ */ jsxRuntime.jsx(
256
- designSystem.Link,
243
+ };
244
+ const HOOKS = {
245
+ /**
246
+ * Hook that allows to mutate the displayed headers of the list view table
247
+ * @constant
248
+ * @type {string}
249
+ */
250
+ INJECT_COLUMN_IN_TABLE: "Admin/CM/pages/ListView/inject-column-in-table",
251
+ /**
252
+ * Hook that allows to mutate the CM's collection types links pre-set filters
253
+ * @constant
254
+ * @type {string}
255
+ */
256
+ MUTATE_COLLECTION_TYPES_LINKS: "Admin/CM/pages/App/mutate-collection-types-links",
257
+ /**
258
+ * Hook that allows to mutate the CM's edit view layout
259
+ * @constant
260
+ * @type {string}
261
+ */
262
+ MUTATE_EDIT_VIEW_LAYOUT: "Admin/CM/pages/EditView/mutate-edit-view-layout",
263
+ /**
264
+ * Hook that allows to mutate the CM's single types links pre-set filters
265
+ * @constant
266
+ * @type {string}
267
+ */
268
+ MUTATE_SINGLE_TYPES_LINKS: "Admin/CM/pages/App/mutate-single-types-links"
269
+ };
270
+ const SETTINGS_LINKS_CE = () => ({
271
+ global: [
257
272
  {
258
- ref,
259
- tag: reactRouterDom.NavLink,
260
- to: history.at(-1) ?? "",
261
- onClick: handleClick,
262
- disabled: disabled || !canGoBack,
263
- "aria-disabled": disabled || !canGoBack,
264
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
265
- children: formatMessage({
266
- id: "global.back",
267
- defaultMessage: "Back"
268
- })
269
- }
270
- );
273
+ intlLabel: { id: "Settings.application.title", defaultMessage: "Overview" },
274
+ to: "/settings/application-infos",
275
+ id: "000-application-infos"
276
+ },
277
+ {
278
+ intlLabel: { id: "Settings.webhooks.title", defaultMessage: "Webhooks" },
279
+ to: "/settings/webhooks",
280
+ id: "webhooks"
281
+ },
282
+ {
283
+ intlLabel: { id: "Settings.apiTokens.title", defaultMessage: "API Tokens" },
284
+ to: "/settings/api-tokens?sort=name:ASC",
285
+ id: "api-tokens"
286
+ },
287
+ {
288
+ intlLabel: { id: "Settings.transferTokens.title", defaultMessage: "Transfer Tokens" },
289
+ to: "/settings/transfer-tokens?sort=name:ASC",
290
+ id: "transfer-tokens"
291
+ },
292
+ // If the Enterprise/Cloud feature is not enabled and if the config doesn't disable it, we promote the Enterprise/Cloud feature by displaying them in the settings menu.
293
+ // Disable this by adding "promoteEE: false" to your `./config/admin.js` file
294
+ ...!window.strapi.features.isEnabled(window.strapi.features.SSO) && window.strapi?.flags?.promoteEE ? [
295
+ {
296
+ intlLabel: { id: "Settings.sso.title", defaultMessage: "Single Sign-On" },
297
+ to: "/settings/purchase-single-sign-on",
298
+ id: "sso-purchase-page",
299
+ licenseOnly: true
300
+ }
301
+ ] : []
302
+ ],
303
+ admin: [
304
+ {
305
+ intlLabel: { id: "global.roles", defaultMessage: "Roles" },
306
+ to: "/settings/roles",
307
+ id: "roles"
308
+ },
309
+ {
310
+ intlLabel: { id: "global.users", defaultMessage: "Users" },
311
+ // Init the search params directly
312
+ to: "/settings/users?pageSize=10&page=1&sort=firstname",
313
+ id: "users"
314
+ },
315
+ ...!window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) && window.strapi?.flags?.promoteEE ? [
316
+ {
317
+ intlLabel: { id: "global.auditLogs", defaultMessage: "Audit Logs" },
318
+ to: "/settings/purchase-audit-logs",
319
+ id: "auditLogs-purchase-page",
320
+ licenseOnly: true
321
+ }
322
+ ] : []
323
+ ]
271
324
  });
272
325
 
273
- const GUIDED_TOUR_COMPLETED_STEPS = "GUIDED_TOUR_COMPLETED_STEPS";
274
- const GUIDED_TOUR_CURRENT_STEP = "GUIDED_TOUR_CURRENT_STEP";
275
- const GUIDED_TOUR_SKIPPED = "GUIDED_TOUR_SKIPPED";
276
- const [GuidedTourProviderImpl, useGuidedTour] = rbac.createContext("GuidedTour");
277
- const GuidedTourProvider = ({ children }) => {
278
- const [{ currentStep, guidedTourState, isGuidedTourVisible, isSkipped }, dispatch] = React__namespace.useReducer(reducer$1, initialState, initialiseState);
279
- const setCurrentStep = (step) => {
280
- if (step !== null) {
281
- const isStepAlreadyDone = get__default.default(guidedTourState, step);
282
- const [sectionName, stepName] = step.split(".");
283
- const sectionArray = Object.entries(guidedTourState[sectionName]);
284
- const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName);
285
- const previousSteps = sectionArray.slice(0, currentStepIndex);
286
- const isStepToShow = previousSteps.every(([, sectionValue]) => sectionValue);
287
- if (isStepAlreadyDone || isSkipped || !isStepToShow) {
288
- return null;
326
+ const ALLOWED_TYPES = [
327
+ "biginteger",
328
+ "boolean",
329
+ "date",
330
+ "datetime",
331
+ "decimal",
332
+ "email",
333
+ "enumeration",
334
+ "float",
335
+ "integer",
336
+ "json",
337
+ "password",
338
+ "richtext",
339
+ "string",
340
+ "text",
341
+ "time",
342
+ "uid"
343
+ ];
344
+ const ALLOWED_ROOT_LEVEL_OPTIONS = [
345
+ "min",
346
+ "minLength",
347
+ "max",
348
+ "maxLength",
349
+ "required",
350
+ "regex",
351
+ "enum",
352
+ "unique",
353
+ "private",
354
+ "default"
355
+ ];
356
+ class CustomFields {
357
+ customFields;
358
+ constructor() {
359
+ this.customFields = {};
360
+ }
361
+ register = (customFields) => {
362
+ if (Array.isArray(customFields)) {
363
+ customFields.forEach((customField) => {
364
+ this.register(customField);
365
+ });
366
+ } else {
367
+ const { name, pluginId, type, intlLabel, intlDescription, components, options } = customFields;
368
+ invariant__default.default(name, "A name must be provided");
369
+ invariant__default.default(type, "A type must be provided");
370
+ invariant__default.default(intlLabel, "An intlLabel must be provided");
371
+ invariant__default.default(intlDescription, "An intlDescription must be provided");
372
+ invariant__default.default(components, "A components object must be provided");
373
+ invariant__default.default(components.Input, "An Input component must be provided");
374
+ invariant__default.default(
375
+ ALLOWED_TYPES.includes(type),
376
+ `Custom field type: '${type}' is not a valid Strapi type or it can't be used with a Custom Field`
377
+ );
378
+ const isValidObjectKey = /^(?![0-9])[a-zA-Z0-9$_-]+$/g;
379
+ invariant__default.default(
380
+ isValidObjectKey.test(name),
381
+ `Custom field name: '${name}' is not a valid object key`
382
+ );
383
+ const allFormOptions = [...options?.base || [], ...options?.advanced || []];
384
+ if (allFormOptions.length) {
385
+ const optionPathValidations = allFormOptions.reduce(optionsValidationReducer, []);
386
+ optionPathValidations.forEach(({ isValidOptionPath, errorMessage }) => {
387
+ invariant__default.default(isValidOptionPath, errorMessage);
388
+ });
289
389
  }
390
+ const uid = pluginId ? `plugin::${pluginId}.${name}` : `global::${name}`;
391
+ const uidAlreadyUsed = Object.prototype.hasOwnProperty.call(this.customFields, uid);
392
+ invariant__default.default(!uidAlreadyUsed, `Custom field: '${uid}' has already been registered`);
393
+ this.customFields[uid] = customFields;
290
394
  }
291
- window.localStorage.setItem(GUIDED_TOUR_CURRENT_STEP, JSON.stringify(null));
292
- return dispatch({
293
- type: "SET_CURRENT_STEP",
294
- step
295
- });
296
395
  };
297
- const setGuidedTourVisibility = (value) => {
298
- dispatch({
299
- type: "SET_GUIDED_TOUR_VISIBILITY",
300
- value
301
- });
302
- };
303
- const setStepState = (currentStep2, value) => {
304
- addCompletedStep(currentStep2);
305
- dispatch({
306
- type: "SET_STEP_STATE",
307
- currentStep: currentStep2,
308
- value
309
- });
396
+ getAll = () => {
397
+ return this.customFields;
310
398
  };
311
- const startSection = (sectionName) => {
312
- const sectionSteps = guidedTourState[sectionName];
313
- if (sectionSteps) {
314
- const guidedTourArray = Object.entries(guidedTourState);
315
- const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName);
316
- const previousSections = guidedTourArray.slice(0, currentSectionIndex);
317
- const isSectionToShow = previousSections.every(
318
- ([, sectionValue]) => Object.values(sectionValue).every(Boolean)
319
- );
320
- const [firstStep] = Object.keys(sectionSteps);
321
- const isFirstStepDone = sectionSteps[firstStep];
322
- if (isSectionToShow && !currentStep && !isFirstStepDone) {
323
- setCurrentStep(`${sectionName}.${firstStep}`);
324
- }
325
- }
399
+ get = (uid) => {
400
+ return this.customFields[uid];
326
401
  };
327
- const setSkipped = (value) => {
328
- window.localStorage.setItem(GUIDED_TOUR_SKIPPED, JSON.stringify(value));
329
- dispatch({
330
- type: "SET_SKIPPED",
331
- value
402
+ }
403
+ const optionsValidationReducer = (acc, option) => {
404
+ if ("items" in option) {
405
+ return option.items.reduce(optionsValidationReducer, acc);
406
+ }
407
+ if (!option.name) {
408
+ acc.push({
409
+ isValidOptionPath: false,
410
+ errorMessage: "The 'name' property is required on an options object"
332
411
  });
333
- };
334
- return /* @__PURE__ */ jsxRuntime.jsx(
335
- GuidedTourProviderImpl,
336
- {
337
- guidedTourState,
338
- currentStep,
339
- setCurrentStep,
340
- setGuidedTourVisibility,
341
- setSkipped,
342
- setStepState,
343
- startSection,
344
- isGuidedTourVisible,
345
- isSkipped,
346
- children
347
- }
348
- );
349
- };
350
- const initialState = {
351
- currentStep: null,
352
- guidedTourState: {
353
- contentTypeBuilder: {
354
- create: false,
355
- success: false
356
- },
357
- contentManager: {
358
- create: false,
359
- success: false
360
- },
361
- apiTokens: {
362
- create: false,
363
- success: false
364
- },
365
- transferTokens: {
366
- create: false,
367
- success: false
368
- }
369
- },
370
- isGuidedTourVisible: false,
371
- isSkipped: false
412
+ } else {
413
+ acc.push({
414
+ isValidOptionPath: option.name.startsWith("options") || ALLOWED_ROOT_LEVEL_OPTIONS.includes(option.name),
415
+ errorMessage: `'${option.name}' must be prefixed with 'options.'`
416
+ });
417
+ }
418
+ return acc;
372
419
  };
373
- const reducer$1 = (state = initialState, action) => immer.produce(state, (draftState) => {
374
- switch (action.type) {
375
- case "SET_CURRENT_STEP": {
376
- draftState.currentStep = action.step;
377
- break;
420
+
421
+ class Plugin {
422
+ apis;
423
+ initializer;
424
+ injectionZones;
425
+ isReady;
426
+ name;
427
+ pluginId;
428
+ constructor(pluginConf) {
429
+ this.apis = pluginConf.apis || {};
430
+ this.initializer = pluginConf.initializer || null;
431
+ this.injectionZones = pluginConf.injectionZones || {};
432
+ this.isReady = pluginConf.isReady !== void 0 ? pluginConf.isReady : true;
433
+ this.name = pluginConf.name;
434
+ this.pluginId = pluginConf.id;
435
+ }
436
+ getInjectedComponents(containerName, blockName) {
437
+ try {
438
+ return this.injectionZones[containerName][blockName] || [];
439
+ } catch (err) {
440
+ console.error("Cannot get injected component", err);
441
+ return [];
378
442
  }
379
- case "SET_STEP_STATE": {
443
+ }
444
+ injectComponent(containerName, blockName, component) {
445
+ try {
446
+ this.injectionZones[containerName][blockName].push(component);
447
+ } catch (err) {
448
+ console.error("Cannot inject component", err);
449
+ }
450
+ }
451
+ }
452
+
453
+ const [Provider, useHistory] = Theme.createContext("History", {
454
+ history: [],
455
+ currentLocationIndex: 0,
456
+ currentLocation: "",
457
+ canGoBack: false,
458
+ pushState: () => {
459
+ throw new Error("You must use the `HistoryProvider` to access the `pushState` function.");
460
+ },
461
+ goBack: () => {
462
+ throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
463
+ }
464
+ });
465
+ const HistoryProvider = ({ children }) => {
466
+ const location = reactRouterDom.useLocation();
467
+ const navigate = reactRouterDom.useNavigate();
468
+ const [state, dispatch] = React__namespace.useReducer(reducer$2, {
469
+ history: [],
470
+ currentLocationIndex: 0,
471
+ currentLocation: "",
472
+ canGoBack: false
473
+ });
474
+ const isGoingBack = React__namespace.useRef(false);
475
+ const pushState = React__namespace.useCallback((path) => {
476
+ dispatch({
477
+ type: "PUSH_STATE",
478
+ payload: typeof path === "string" ? { to: path, search: "" } : path
479
+ });
480
+ }, []);
481
+ const goBack = React__namespace.useCallback(() => {
482
+ navigate(-1);
483
+ dispatch({ type: "GO_BACK" });
484
+ isGoingBack.current = true;
485
+ }, [navigate]);
486
+ const prevIndex = React__namespace.useRef(state.currentLocationIndex);
487
+ React__namespace.useEffect(() => {
488
+ if (state.currentLocationIndex !== prevIndex.current) {
489
+ dispatch({
490
+ type: "SET_CAN_GO_BACK",
491
+ payload: state.currentLocationIndex > 1 && state.history.length > 1
492
+ });
493
+ prevIndex.current = state.currentLocationIndex;
494
+ }
495
+ }, [prevIndex, state.currentLocationIndex, state.history.length]);
496
+ React__namespace.useLayoutEffect(() => {
497
+ if (isGoingBack.current) {
498
+ isGoingBack.current = false;
499
+ } else {
500
+ dispatch({
501
+ type: "PUSH_STATE",
502
+ payload: { to: location.pathname, search: location.search }
503
+ });
504
+ }
505
+ }, [dispatch, location.pathname, location.search]);
506
+ return /* @__PURE__ */ jsxRuntime.jsx(Provider, { pushState, goBack, ...state, children });
507
+ };
508
+ const reducer$2 = (state, action) => immer.produce(state, (draft) => {
509
+ switch (action.type) {
510
+ case "PUSH_STATE": {
511
+ const path = `${action.payload.to}${action.payload.search}`;
512
+ if (state.currentLocationIndex === state.history.length) {
513
+ draft.history = [...state.history, path];
514
+ } else {
515
+ draft.history = [...state.history.slice(0, state.currentLocationIndex), path];
516
+ }
517
+ draft.currentLocation = path;
518
+ draft.currentLocationIndex += 1;
519
+ break;
520
+ }
521
+ case "GO_BACK": {
522
+ const newIndex = state.currentLocationIndex - 1;
523
+ draft.currentLocation = state.history[newIndex - 1];
524
+ draft.currentLocationIndex = newIndex;
525
+ break;
526
+ }
527
+ case "SET_CAN_GO_BACK": {
528
+ draft.canGoBack = action.payload;
529
+ break;
530
+ }
531
+ }
532
+ });
533
+ const BackButton = React__namespace.forwardRef(({ disabled }, ref) => {
534
+ const { formatMessage } = reactIntl.useIntl();
535
+ const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
536
+ const goBack = useHistory("BackButton", (state) => state.goBack);
537
+ const history = useHistory("BackButton", (state) => state.history);
538
+ const handleClick = (e) => {
539
+ e.preventDefault();
540
+ goBack();
541
+ };
542
+ return /* @__PURE__ */ jsxRuntime.jsx(
543
+ designSystem.Link,
544
+ {
545
+ ref,
546
+ tag: reactRouterDom.NavLink,
547
+ to: history.at(-1) ?? "",
548
+ onClick: handleClick,
549
+ disabled: disabled || !canGoBack,
550
+ "aria-disabled": disabled || !canGoBack,
551
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
552
+ children: formatMessage({
553
+ id: "global.back",
554
+ defaultMessage: "Back"
555
+ })
556
+ }
557
+ );
558
+ });
559
+
560
+ const GUIDED_TOUR_COMPLETED_STEPS = "GUIDED_TOUR_COMPLETED_STEPS";
561
+ const GUIDED_TOUR_CURRENT_STEP = "GUIDED_TOUR_CURRENT_STEP";
562
+ const GUIDED_TOUR_SKIPPED = "GUIDED_TOUR_SKIPPED";
563
+ const [GuidedTourProviderImpl, useGuidedTour] = Theme.createContext("GuidedTour");
564
+ const GuidedTourProvider = ({ children }) => {
565
+ const [{ currentStep, guidedTourState, isGuidedTourVisible, isSkipped }, dispatch] = React__namespace.useReducer(reducer$1, initialState, initialiseState);
566
+ const setCurrentStep = (step) => {
567
+ if (step !== null) {
568
+ const isStepAlreadyDone = get__default.default(guidedTourState, step);
569
+ const [sectionName, stepName] = step.split(".");
570
+ const sectionArray = Object.entries(guidedTourState[sectionName]);
571
+ const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName);
572
+ const previousSteps = sectionArray.slice(0, currentStepIndex);
573
+ const isStepToShow = previousSteps.every(([, sectionValue]) => sectionValue);
574
+ if (isStepAlreadyDone || isSkipped || !isStepToShow) {
575
+ return null;
576
+ }
577
+ }
578
+ window.localStorage.setItem(GUIDED_TOUR_CURRENT_STEP, JSON.stringify(null));
579
+ return dispatch({
580
+ type: "SET_CURRENT_STEP",
581
+ step
582
+ });
583
+ };
584
+ const setGuidedTourVisibility = (value) => {
585
+ dispatch({
586
+ type: "SET_GUIDED_TOUR_VISIBILITY",
587
+ value
588
+ });
589
+ };
590
+ const setStepState = (currentStep2, value) => {
591
+ addCompletedStep(currentStep2);
592
+ dispatch({
593
+ type: "SET_STEP_STATE",
594
+ currentStep: currentStep2,
595
+ value
596
+ });
597
+ };
598
+ const startSection = (sectionName) => {
599
+ const sectionSteps = guidedTourState[sectionName];
600
+ if (sectionSteps) {
601
+ const guidedTourArray = Object.entries(guidedTourState);
602
+ const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName);
603
+ const previousSections = guidedTourArray.slice(0, currentSectionIndex);
604
+ const isSectionToShow = previousSections.every(
605
+ ([, sectionValue]) => Object.values(sectionValue).every(Boolean)
606
+ );
607
+ const [firstStep] = Object.keys(sectionSteps);
608
+ const isFirstStepDone = sectionSteps[firstStep];
609
+ if (isSectionToShow && !currentStep && !isFirstStepDone) {
610
+ setCurrentStep(`${sectionName}.${firstStep}`);
611
+ }
612
+ }
613
+ };
614
+ const setSkipped = (value) => {
615
+ window.localStorage.setItem(GUIDED_TOUR_SKIPPED, JSON.stringify(value));
616
+ dispatch({
617
+ type: "SET_SKIPPED",
618
+ value
619
+ });
620
+ };
621
+ return /* @__PURE__ */ jsxRuntime.jsx(
622
+ GuidedTourProviderImpl,
623
+ {
624
+ guidedTourState,
625
+ currentStep,
626
+ setCurrentStep,
627
+ setGuidedTourVisibility,
628
+ setSkipped,
629
+ setStepState,
630
+ startSection,
631
+ isGuidedTourVisible,
632
+ isSkipped,
633
+ children
634
+ }
635
+ );
636
+ };
637
+ const initialState = {
638
+ currentStep: null,
639
+ guidedTourState: {
640
+ contentTypeBuilder: {
641
+ create: false,
642
+ success: false
643
+ },
644
+ contentManager: {
645
+ create: false,
646
+ success: false
647
+ },
648
+ apiTokens: {
649
+ create: false,
650
+ success: false
651
+ },
652
+ transferTokens: {
653
+ create: false,
654
+ success: false
655
+ }
656
+ },
657
+ isGuidedTourVisible: false,
658
+ isSkipped: false
659
+ };
660
+ const reducer$1 = (state = initialState, action) => immer.produce(state, (draftState) => {
661
+ switch (action.type) {
662
+ case "SET_CURRENT_STEP": {
663
+ draftState.currentStep = action.step;
664
+ break;
665
+ }
666
+ case "SET_STEP_STATE": {
380
667
  const [section, step] = action.currentStep.split(".");
381
668
  draftState.guidedTourState[section][step] = action.value;
382
669
  break;
@@ -446,12 +733,12 @@ const queryClient = new reactQuery.QueryClient({
446
733
  });
447
734
  const Providers = ({ children, strapi, store }) => {
448
735
  return /* @__PURE__ */ jsxRuntime.jsx(
449
- rbac.StrapiAppProvider,
736
+ Theme.StrapiAppProvider,
450
737
  {
451
738
  components: strapi.library.components,
452
739
  customFields: strapi.customFields,
453
740
  fields: strapi.library.fields,
454
- menu: strapi.menu,
741
+ menu: strapi.router.menu,
455
742
  getAdminInjectedComponents: strapi.getAdminInjectedComponents,
456
743
  getPlugin: strapi.getPlugin,
457
744
  plugins: strapi.plugins,
@@ -459,9 +746,9 @@ const Providers = ({ children, strapi, store }) => {
459
746
  runHookParallel: strapi.runHookParallel,
460
747
  runHookWaterfall: (name, initialValue) => strapi.runHookWaterfall(name, initialValue, store),
461
748
  runHookSeries: strapi.runHookSeries,
462
- settings: strapi.settings,
463
- children: /* @__PURE__ */ jsxRuntime.jsx(reactRedux.Provider, { store, children: /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(rbac.AuthProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(HistoryProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(rbac.LanguageProvider, { messages: strapi.configurations.translations, children: /* @__PURE__ */ jsxRuntime.jsx(rbac.Theme, { themes: strapi.configurations.themes, children: /* @__PURE__ */ jsxRuntime.jsx(rbac.NotificationsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(rbac.TrackingProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(GuidedTourProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
464
- rbac.ConfigurationProvider,
749
+ settings: strapi.router.settings,
750
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactRedux.Provider, { store, children: /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(Theme.AuthProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(HistoryProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Theme.LanguageProvider, { messages: strapi.configurations.translations, children: /* @__PURE__ */ jsxRuntime.jsx(Theme.Theme, { themes: strapi.configurations.themes, children: /* @__PURE__ */ jsxRuntime.jsx(Theme.NotificationsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Theme.TrackingProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(GuidedTourProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
751
+ Theme.ConfigurationProvider,
465
752
  {
466
753
  defaultAuthLogo: strapi.configurations.authLogo,
467
754
  defaultMenuLogo: strapi.configurations.menuLogo,
@@ -476,16 +763,14 @@ const Providers = ({ children, strapi, store }) => {
476
763
 
477
764
  const App = ({ strapi, store }) => {
478
765
  React.useEffect(() => {
479
- const language = localStorage.getItem(rbac.LANGUAGE_LOCAL_STORAGE_KEY) || "en";
766
+ const language = localStorage.getItem(Theme.LANGUAGE_LOCAL_STORAGE_KEY) || "en";
480
767
  if (language) {
481
768
  document.documentElement.lang = language;
482
769
  }
483
770
  }, []);
484
- return /* @__PURE__ */ jsxRuntime.jsx(Providers, { strapi, store, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(rbac.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {}) }) });
771
+ return /* @__PURE__ */ jsxRuntime.jsx(Providers, { strapi, store, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(Theme.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {}) }) });
485
772
  };
486
773
 
487
- const StrapiLogo = "data:image/svg+xml,%3csvg%20width='800'%20height='800'%20viewBox='0%200%20800%20800'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M39%20282c0-118%200-176.9%2036.6-213.5C112.2%2032%20171.1%2032%20288.9%2032h221.2c117.8%200%20176.7%200%20213.3%2036.6C760%20105.2%20760%20164.1%20760%20281.9v221.2c0%20117.8%200%20176.7-36.6%20213.3C686.8%20753%20627.9%20753%20510.1%20753H288.9c-117.8%200-176.7%200-213.3-36.6C39%20679.8%2039%20620.9%2039%20503.1V281.9Z'%20fill='%234945FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M536.4%20250.7H293.7v123.8h123.8v123.7h123.8V255.5c0-2.6-2.2-4.8-4.9-4.8Z'%20fill='%23fff'/%3e%3cpath%20fill='%23fff'%20d='M412.7%20374.5h4.8v4.8h-4.8z'/%3e%3cpath%20d='M293.8%20374.5h119c2.6%200%204.8%202.1%204.8%204.8v119h-119a4.8%204.8%200%200%201-4.8-4.9v-119Z'%20fill='%239593FF'/%3e%3cpath%20d='M417.5%20498.2h123.8L421.6%20618a2.4%202.4%200%200%201-4-1.7v-118ZM293.8%20374.5h-118a2.4%202.4%200%200%201-1.7-4.1l119.7-119.7v123.8Z'%20fill='%239593FF'/%3e%3c/svg%3e";
488
-
489
774
  const useClipboard = () => {
490
775
  const copy = React.useCallback(async (value) => {
491
776
  try {
@@ -587,434 +872,248 @@ const ErrorType = styledComponents.styled(designSystem.Typography)`
587
872
  color: ${({ theme }) => theme.colors.danger600};
588
873
  `;
589
874
 
590
- const ADMIN_PERMISSIONS_CE = {
591
- contentManager: {
592
- main: [],
593
- collectionTypesConfigurations: [
594
- {
595
- action: "plugin::content-manager.collection-types.configure-view",
596
- subject: null
597
- }
598
- ],
599
- componentsConfigurations: [
600
- {
601
- action: "plugin::content-manager.components.configure-layout",
602
- subject: null
603
- }
604
- ],
605
- singleTypesConfigurations: [
606
- {
607
- action: "plugin::content-manager.single-types.configure-view",
608
- subject: null
609
- }
610
- ]
611
- },
612
- marketplace: {
613
- main: [{ action: "admin::marketplace.read", subject: null }],
614
- read: [{ action: "admin::marketplace.read", subject: null }]
615
- },
616
- settings: {
617
- roles: {
618
- main: [
619
- { action: "admin::roles.create", subject: null },
620
- { action: "admin::roles.update", subject: null },
621
- { action: "admin::roles.read", subject: null },
622
- { action: "admin::roles.delete", subject: null }
623
- ],
624
- create: [{ action: "admin::roles.create", subject: null }],
625
- delete: [{ action: "admin::roles.delete", subject: null }],
626
- read: [{ action: "admin::roles.read", subject: null }],
627
- update: [{ action: "admin::roles.update", subject: null }]
628
- },
629
- users: {
630
- main: [
631
- { action: "admin::users.create", subject: null },
632
- { action: "admin::users.read", subject: null },
633
- { action: "admin::users.update", subject: null },
634
- { action: "admin::users.delete", subject: null }
635
- ],
636
- create: [{ action: "admin::users.create", subject: null }],
637
- delete: [{ action: "admin::users.delete", subject: null }],
638
- read: [{ action: "admin::users.read", subject: null }],
639
- update: [{ action: "admin::users.update", subject: null }]
640
- },
641
- webhooks: {
642
- main: [
643
- { action: "admin::webhooks.create", subject: null },
644
- { action: "admin::webhooks.read", subject: null },
645
- { action: "admin::webhooks.update", subject: null },
646
- { action: "admin::webhooks.delete", subject: null }
647
- ],
648
- create: [{ action: "admin::webhooks.create", subject: null }],
649
- delete: [{ action: "admin::webhooks.delete", subject: null }],
650
- read: [
651
- { action: "admin::webhooks.read", subject: null },
652
- // NOTE: We need to check with the API
653
- { action: "admin::webhooks.update", subject: null },
654
- { action: "admin::webhooks.delete", subject: null }
655
- ],
656
- update: [{ action: "admin::webhooks.update", subject: null }]
657
- },
658
- "api-tokens": {
659
- main: [{ action: "admin::api-tokens.access", subject: null }],
660
- create: [{ action: "admin::api-tokens.create", subject: null }],
661
- delete: [{ action: "admin::api-tokens.delete", subject: null }],
662
- read: [{ action: "admin::api-tokens.read", subject: null }],
663
- update: [{ action: "admin::api-tokens.update", subject: null }],
664
- regenerate: [{ action: "admin::api-tokens.regenerate", subject: null }]
665
- },
666
- "transfer-tokens": {
667
- main: [{ action: "admin::transfer.tokens.access", subject: null }],
668
- create: [{ action: "admin::transfer.tokens.create", subject: null }],
669
- delete: [{ action: "admin::transfer.tokens.delete", subject: null }],
670
- read: [{ action: "admin::transfer.tokens.read", subject: null }],
671
- update: [{ action: "admin::transfer.tokens.update", subject: null }],
672
- regenerate: [{ action: "admin::transfer.tokens.regenerate", subject: null }]
673
- },
674
- "project-settings": {
675
- read: [{ action: "admin::project-settings.read", subject: null }],
676
- update: [{ action: "admin::project-settings.update", subject: null }]
677
- }
875
+ const ActionLayout = ({ startActions, endActions }) => {
876
+ if (!startActions && !endActions) {
877
+ return null;
678
878
  }
879
+ return /* @__PURE__ */ jsxRuntime.jsxs(
880
+ designSystem.Flex,
881
+ {
882
+ justifyContent: "space-between",
883
+ alignItems: "flex-start",
884
+ paddingBottom: 4,
885
+ paddingLeft: 10,
886
+ paddingRight: 10,
887
+ children: [
888
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, wrap: "wrap", children: startActions }),
889
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
890
+ ]
891
+ }
892
+ );
679
893
  };
680
- const HOOKS = {
681
- /**
682
- * Hook that allows to mutate the displayed headers of the list view table
683
- * @constant
684
- * @type {string}
685
- */
686
- INJECT_COLUMN_IN_TABLE: "Admin/CM/pages/ListView/inject-column-in-table",
687
- /**
688
- * Hook that allows to mutate the CM's collection types links pre-set filters
689
- * @constant
690
- * @type {string}
691
- */
692
- MUTATE_COLLECTION_TYPES_LINKS: "Admin/CM/pages/App/mutate-collection-types-links",
693
- /**
694
- * Hook that allows to mutate the CM's edit view layout
695
- * @constant
696
- * @type {string}
697
- */
698
- MUTATE_EDIT_VIEW_LAYOUT: "Admin/CM/pages/EditView/mutate-edit-view-layout",
699
- /**
700
- * Hook that allows to mutate the CM's single types links pre-set filters
701
- * @constant
702
- * @type {string}
703
- */
704
- MUTATE_SINGLE_TYPES_LINKS: "Admin/CM/pages/App/mutate-single-types-links"
894
+
895
+ const ContentLayout = ({ children }) => {
896
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 10, paddingRight: 10, children });
705
897
  };
706
- const SETTINGS_LINKS_CE = () => ({
707
- global: [
708
- {
709
- intlLabel: { id: "Settings.application.title", defaultMessage: "Overview" },
710
- to: "/settings/application-infos",
711
- id: "000-application-infos"
712
- },
713
- {
714
- intlLabel: { id: "Settings.webhooks.title", defaultMessage: "Webhooks" },
715
- to: "/settings/webhooks",
716
- id: "webhooks"
717
- },
718
- {
719
- intlLabel: { id: "Settings.apiTokens.title", defaultMessage: "API Tokens" },
720
- to: "/settings/api-tokens?sort=name:ASC",
721
- id: "api-tokens"
722
- },
723
- {
724
- intlLabel: { id: "Settings.transferTokens.title", defaultMessage: "Transfer Tokens" },
725
- to: "/settings/transfer-tokens?sort=name:ASC",
726
- id: "transfer-tokens"
727
- },
728
- // If the Enterprise/Cloud feature is not enabled and if the config doesn't disable it, we promote the Enterprise/Cloud feature by displaying them in the settings menu.
729
- // Disable this by adding "promoteEE: false" to your `./config/admin.js` file
730
- ...!window.strapi.features.isEnabled(window.strapi.features.SSO) && window.strapi?.flags?.promoteEE ? [
731
- {
732
- intlLabel: { id: "Settings.sso.title", defaultMessage: "Single Sign-On" },
733
- to: "/settings/purchase-single-sign-on",
734
- id: "sso-purchase-page",
735
- lockIcon: true
736
- }
737
- ] : []
738
- ],
739
- admin: [
740
- {
741
- intlLabel: { id: "global.roles", defaultMessage: "Roles" },
742
- to: "/settings/roles",
743
- id: "roles"
744
- },
745
- {
746
- intlLabel: { id: "global.users", defaultMessage: "Users" },
747
- // Init the search params directly
748
- to: "/settings/users?pageSize=10&page=1&sort=firstname",
749
- id: "users"
750
- },
751
- ...!window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) && window.strapi?.flags?.promoteEE ? [
752
- {
753
- intlLabel: { id: "global.auditLogs", defaultMessage: "Audit Logs" },
754
- to: "/settings/purchase-audit-logs",
755
- id: "auditLogs-purchase-page",
756
- lockIcon: true
757
- }
758
- ] : []
759
- ]
760
- });
761
898
 
762
- const ALLOWED_TYPES = [
763
- "biginteger",
764
- "boolean",
765
- "date",
766
- "datetime",
767
- "decimal",
768
- "email",
769
- "enumeration",
770
- "float",
771
- "integer",
772
- "json",
773
- "password",
774
- "richtext",
775
- "string",
776
- "text",
777
- "time",
778
- "uid"
779
- ];
780
- const ALLOWED_ROOT_LEVEL_OPTIONS = [
781
- "min",
782
- "minLength",
783
- "max",
784
- "maxLength",
785
- "required",
786
- "regex",
787
- "enum",
788
- "unique",
789
- "private",
790
- "default"
791
- ];
792
- class CustomFields {
793
- customFields;
794
- constructor() {
795
- this.customFields = {};
796
- }
797
- register = (customFields) => {
798
- if (Array.isArray(customFields)) {
799
- customFields.forEach((customField) => {
800
- this.register(customField);
801
- });
802
- } else {
803
- const { name, pluginId, type, intlLabel, intlDescription, components, options } = customFields;
804
- invariant__default.default(name, "A name must be provided");
805
- invariant__default.default(type, "A type must be provided");
806
- invariant__default.default(intlLabel, "An intlLabel must be provided");
807
- invariant__default.default(intlDescription, "An intlDescription must be provided");
808
- invariant__default.default(components, "A components object must be provided");
809
- invariant__default.default(components.Input, "An Input component must be provided");
810
- invariant__default.default(
811
- ALLOWED_TYPES.includes(type),
812
- `Custom field type: '${type}' is not a valid Strapi type or it can't be used with a Custom Field`
813
- );
814
- const isValidObjectKey = /^(?![0-9])[a-zA-Z0-9$_-]+$/g;
815
- invariant__default.default(
816
- isValidObjectKey.test(name),
817
- `Custom field name: '${name}' is not a valid object key`
818
- );
819
- const allFormOptions = [...options?.base || [], ...options?.advanced || []];
820
- if (allFormOptions.length) {
821
- const optionPathValidations = allFormOptions.reduce(optionsValidationReducer, []);
822
- optionPathValidations.forEach(({ isValidOptionPath, errorMessage }) => {
823
- invariant__default.default(isValidOptionPath, errorMessage);
824
- });
825
- }
826
- const uid = pluginId ? `plugin::${pluginId}.${name}` : `global::${name}`;
827
- const uidAlreadyUsed = Object.prototype.hasOwnProperty.call(this.customFields, uid);
828
- invariant__default.default(!uidAlreadyUsed, `Custom field: '${uid}' has already been registered`);
829
- this.customFields[uid] = customFields;
830
- }
831
- };
832
- getAll = () => {
833
- return this.customFields;
834
- };
835
- get = (uid) => {
836
- return this.customFields[uid];
837
- };
838
- }
839
- const optionsValidationReducer = (acc, option) => {
840
- if ("items" in option) {
841
- return option.items.reduce(optionsValidationReducer, acc);
842
- }
843
- if (!option.name) {
844
- acc.push({
845
- isValidOptionPath: false,
846
- errorMessage: "The 'name' property is required on an options object"
847
- });
848
- } else {
849
- acc.push({
850
- isValidOptionPath: option.name.startsWith("options") || ALLOWED_ROOT_LEVEL_OPTIONS.includes(option.name),
851
- errorMessage: `'${option.name}' must be prefixed with 'options.'`
852
- });
853
- }
854
- return acc;
899
+ const GridColSize = {
900
+ S: 180,
901
+ M: 250
902
+ };
903
+ const StyledGrid = styledComponents.styled(designSystem.Box)`
904
+ display: grid;
905
+ grid-template-columns: repeat(
906
+ auto-fit,
907
+ minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
908
+ );
909
+ grid-gap: ${({ theme }) => theme.spaces[4]};
910
+ `;
911
+ const GridLayout = ({ size, children }) => {
912
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledGrid, { $size: size, children });
855
913
  };
856
914
 
857
- class Plugin {
858
- apis;
859
- initializer;
860
- injectionZones;
861
- isReady;
862
- name;
863
- pluginId;
864
- constructor(pluginConf) {
865
- this.apis = pluginConf.apis || {};
866
- this.initializer = pluginConf.initializer || null;
867
- this.injectionZones = pluginConf.injectionZones || {};
868
- this.isReady = pluginConf.isReady !== void 0 ? pluginConf.isReady : true;
869
- this.name = pluginConf.name;
870
- this.pluginId = pluginConf.id;
871
- }
872
- getInjectedComponents(containerName, blockName) {
873
- try {
874
- return this.injectionZones[containerName][blockName] || [];
875
- } catch (err) {
876
- console.error("Cannot get injected component", err);
877
- return [];
915
+ const BaseHeaderLayout = React__namespace.forwardRef(
916
+ ({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
917
+ const isSubtitleString = typeof subtitle === "string";
918
+ if (sticky) {
919
+ return /* @__PURE__ */ jsxRuntime.jsx(
920
+ designSystem.Box,
921
+ {
922
+ paddingLeft: 6,
923
+ paddingRight: 6,
924
+ paddingTop: 3,
925
+ paddingBottom: 3,
926
+ position: "fixed",
927
+ top: 0,
928
+ right: 0,
929
+ background: "neutral0",
930
+ shadow: "tableShadow",
931
+ width: `${width}rem`,
932
+ zIndex: 1,
933
+ "data-strapi-header-sticky": true,
934
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
935
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
936
+ navigationAction && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingRight: 3, children: navigationAction }),
937
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
938
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "h1", ...props, children: title }),
939
+ isSubtitleString ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
940
+ ] }),
941
+ secondaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 4, children: secondaryAction }) : null
942
+ ] }),
943
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: primaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
944
+ ] })
945
+ }
946
+ );
878
947
  }
948
+ return /* @__PURE__ */ jsxRuntime.jsxs(
949
+ designSystem.Box,
950
+ {
951
+ ref,
952
+ paddingLeft: 10,
953
+ paddingRight: 10,
954
+ paddingBottom: 8,
955
+ paddingTop: navigationAction ? 6 : 8,
956
+ background: "neutral100",
957
+ "data-strapi-header": true,
958
+ children: [
959
+ navigationAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, children: navigationAction }) : null,
960
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
961
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { minWidth: 0, children: [
962
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
963
+ secondaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 4, children: secondaryAction }) : null
964
+ ] }),
965
+ primaryAction
966
+ ] }),
967
+ isSubtitleString ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
968
+ ]
969
+ }
970
+ );
879
971
  }
880
- injectComponent(containerName, blockName, component) {
881
- try {
882
- this.injectionZones[containerName][blockName].push(component);
883
- } catch (err) {
884
- console.error("Cannot inject component", err);
972
+ );
973
+ const HeaderLayout = (props) => {
974
+ const baseHeaderLayoutRef = React__namespace.useRef(null);
975
+ const [headerSize, setHeaderSize] = React__namespace.useState(null);
976
+ const [containerRef, isVisible] = useElementOnScreen({
977
+ root: null,
978
+ rootMargin: "0px",
979
+ threshold: 0
980
+ });
981
+ useResizeObserver(containerRef, () => {
982
+ if (containerRef.current) {
983
+ setHeaderSize(containerRef.current.getBoundingClientRect());
885
984
  }
886
- }
887
- }
888
-
889
- const staticReducers = {
890
- [admin.adminApi.reducerPath]: admin.adminApi.reducer,
891
- admin_app: rbac.reducer
892
- };
893
- const injectReducerStoreEnhancer = (appReducers) => (next) => (...args) => {
894
- const store = next(...args);
895
- const asyncReducers = {};
896
- return {
897
- ...store,
898
- asyncReducers,
899
- injectReducer: (key, asyncReducer) => {
900
- asyncReducers[key] = asyncReducer;
901
- store.replaceReducer(
902
- // @ts-expect-error we dynamically add reducers which makes the types uncomfortable.
903
- toolkit.combineReducers({
904
- ...appReducers,
905
- ...asyncReducers
906
- })
907
- );
985
+ });
986
+ React__namespace.useEffect(() => {
987
+ if (baseHeaderLayoutRef.current) {
988
+ setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
908
989
  }
990
+ }, [baseHeaderLayoutRef]);
991
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
992
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsxRuntime.jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
993
+ !isVisible && /* @__PURE__ */ jsxRuntime.jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
994
+ ] });
995
+ };
996
+ HeaderLayout.displayName = "HeaderLayout";
997
+ const useElementOnScreen = (options) => {
998
+ const containerRef = React__namespace.useRef(null);
999
+ const [isVisible, setIsVisible] = React__namespace.useState(true);
1000
+ const callback = ([entry]) => {
1001
+ setIsVisible(entry.isIntersecting);
909
1002
  };
1003
+ React__namespace.useEffect(() => {
1004
+ const containerEl = containerRef.current;
1005
+ const observer = new IntersectionObserver(callback, options);
1006
+ if (containerEl) {
1007
+ observer.observe(containerRef.current);
1008
+ }
1009
+ return () => {
1010
+ if (containerEl) {
1011
+ observer.disconnect();
1012
+ }
1013
+ };
1014
+ }, [containerRef, options]);
1015
+ return [containerRef, isVisible];
910
1016
  };
911
- const configureStoreImpl = (preloadedState = {}, appMiddlewares = [], injectedReducers = {}) => {
912
- const coreReducers = { ...staticReducers, ...injectedReducers };
913
- const defaultMiddlewareOptions = {};
914
- if (process.env.NODE_ENV === "test") {
915
- defaultMiddlewareOptions.serializableCheck = false;
916
- defaultMiddlewareOptions.immutableCheck = false;
917
- }
918
- const store = toolkit.configureStore({
919
- preloadedState: {
920
- admin_app: preloadedState.admin_app
921
- },
922
- reducer: coreReducers,
923
- devTools: process.env.NODE_ENV !== "production",
924
- middleware: (getDefaultMiddleware) => [
925
- ...getDefaultMiddleware(defaultMiddlewareOptions),
926
- admin.adminApi.middleware,
927
- ...appMiddlewares.map((m) => m())
928
- ],
929
- enhancers: [injectReducerStoreEnhancer(coreReducers)]
930
- });
931
- return store;
1017
+ const useResizeObserver = (sources, onResize) => {
1018
+ const handleResize = designSystem.useCallbackRef(onResize);
1019
+ React__namespace.useLayoutEffect(() => {
1020
+ const resizeObs = new ResizeObserver(handleResize);
1021
+ if (Array.isArray(sources)) {
1022
+ sources.forEach((source) => {
1023
+ if (source.current) {
1024
+ resizeObs.observe(source.current);
1025
+ }
1026
+ });
1027
+ } else if (sources.current) {
1028
+ resizeObs.observe(sources.current);
1029
+ }
1030
+ return () => {
1031
+ resizeObs.disconnect();
1032
+ };
1033
+ }, [sources, handleResize]);
932
1034
  };
933
1035
 
934
- const getBasename = () => (process.env.ADMIN_PATH ?? "").replace(window.location.origin, "");
1036
+ const GridContainer = styledComponents.styled(designSystem.Box)`
1037
+ display: grid;
1038
+ grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
1039
+ `;
1040
+ const OverflowingItem = styledComponents.styled(designSystem.Box)`
1041
+ overflow-x: hidden;
1042
+ `;
1043
+ const RootLayout = ({ sideNav, children }) => {
1044
+ return /* @__PURE__ */ jsxRuntime.jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
1045
+ sideNav,
1046
+ /* @__PURE__ */ jsxRuntime.jsx(OverflowingItem, { paddingBottom: 10, children })
1047
+ ] });
1048
+ };
1049
+ const Layouts = {
1050
+ Root: RootLayout,
1051
+ Header: HeaderLayout,
1052
+ BaseHeader: BaseHeaderLayout,
1053
+ Grid: GridLayout,
1054
+ Action: ActionLayout,
1055
+ Content: ContentLayout
1056
+ };
935
1057
 
936
- const createHook = () => {
937
- const _handlers = [];
938
- return {
939
- register(fn) {
940
- _handlers.push(fn);
941
- },
942
- delete(handler) {
943
- _handlers.splice(_handlers.indexOf(handler), 1);
944
- },
945
- runWaterfall(args, store) {
946
- return _handlers.reduce((acc, fn) => fn(acc, store), args);
947
- },
948
- async runWaterfallAsync(args, store) {
949
- let result = args;
950
- for (const fn of _handlers) {
951
- result = await fn(result, store);
1058
+ const NotFoundPage = () => {
1059
+ const { formatMessage } = reactIntl.useIntl();
1060
+ return /* @__PURE__ */ jsxRuntime.jsxs(Theme.Page.Main, { labelledBy: "title", children: [
1061
+ /* @__PURE__ */ jsxRuntime.jsx(
1062
+ Layouts.Header,
1063
+ {
1064
+ id: "title",
1065
+ title: formatMessage({
1066
+ id: "content-manager.pageNotFound",
1067
+ defaultMessage: "Page not found"
1068
+ })
952
1069
  }
953
- return result;
954
- },
955
- runSeries(...args) {
956
- return _handlers.map((fn) => fn(...args));
957
- },
958
- async runSeriesAsync(...args) {
959
- const result = [];
960
- for (const fn of _handlers) {
961
- result.push(await fn(...args));
1070
+ ),
1071
+ /* @__PURE__ */ jsxRuntime.jsx(Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
1072
+ designSystem.EmptyStateLayout,
1073
+ {
1074
+ action: /* @__PURE__ */ jsxRuntime.jsx(designSystem.LinkButton, { tag: reactRouterDom.Link, variant: "secondary", endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRight, {}), to: "/", children: formatMessage({
1075
+ id: "app.components.NotFoundPage.back",
1076
+ defaultMessage: "Back to homepage"
1077
+ }) }),
1078
+ content: formatMessage({
1079
+ id: "app.page.not.found",
1080
+ defaultMessage: "Oops! We can't seem to find the page you're looging for..."
1081
+ }),
1082
+ hasRadius: true,
1083
+ icon: /* @__PURE__ */ jsxRuntime.jsx(symbols.EmptyPictures, { width: "16rem" }),
1084
+ shadow: "tableShadow"
962
1085
  }
963
- return result;
964
- },
965
- runParallel(...args) {
966
- return Promise.all(
967
- _handlers.map((fn) => {
968
- return fn(...args);
969
- })
970
- );
971
- }
972
- };
1086
+ ) })
1087
+ ] });
973
1088
  };
974
1089
 
975
- function getIn(obj, key, def, pathStartIndex = 0) {
976
- const path = toPath__default.default(key);
977
- while (obj && pathStartIndex < path.length) {
978
- obj = obj[path[pathStartIndex++]];
979
- }
980
- if (pathStartIndex !== path.length && !obj) {
981
- return def;
982
- }
983
- return obj === void 0 ? def : obj;
984
- }
985
- const isObject = (obj) => obj !== null && typeof obj === "object" && !Array.isArray(obj);
986
- const isInteger = (obj) => String(Math.floor(Number(obj))) === obj;
987
- function setIn(obj, path, value) {
988
- const res = clone__default.default(obj);
989
- let resVal = res;
990
- let i = 0;
991
- const pathArray = toPath__default.default(path);
992
- for (; i < pathArray.length - 1; i++) {
993
- const currentPath = pathArray[i];
994
- const currentObj = getIn(obj, pathArray.slice(0, i + 1));
995
- if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {
996
- resVal = resVal[currentPath] = clone__default.default(currentObj);
997
- } else {
998
- const nextPath = pathArray[i + 1];
999
- resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
1090
+ const getEERoutes = () => [
1091
+ ...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) ? [
1092
+ {
1093
+ path: "audit-logs",
1094
+ lazy: async () => {
1095
+ const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-CxUAyot2.js'));
1096
+ return {
1097
+ Component: ProtectedListPage
1098
+ };
1099
+ }
1000
1100
  }
1001
- }
1002
- if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {
1003
- return obj;
1004
- }
1005
- if (value === void 0) {
1006
- delete resVal[pathArray[i]];
1007
- } else {
1008
- resVal[pathArray[i]] = value;
1009
- }
1010
- if (i === 0 && value === void 0) {
1011
- delete res[pathArray[i]];
1012
- }
1013
- return res;
1014
- }
1101
+ ] : [],
1102
+ ...window.strapi.features.isEnabled(window.strapi.features.SSO) ? [
1103
+ {
1104
+ path: "single-sign-on",
1105
+ lazy: async () => {
1106
+ const { ProtectedSSO } = await Promise.resolve().then(() => require('./SingleSignOnPage-83q-C4t-.js'));
1107
+ return {
1108
+ Component: ProtectedSSO
1109
+ };
1110
+ }
1111
+ }
1112
+ ] : []
1113
+ ];
1015
1114
 
1016
1115
  const ERR_MSG = "The Form Component has not been initialised, ensure you are using this hook within a Form component";
1017
- const [FormProvider, useForm] = rbac.createContext("Form", {
1116
+ const [FormProvider, useForm] = Theme.createContext("Form", {
1018
1117
  disabled: false,
1019
1118
  errors: {},
1020
1119
  initialValues: {},
@@ -1050,11 +1149,11 @@ const [FormProvider, useForm] = rbac.createContext("Form", {
1050
1149
  values: {}
1051
1150
  });
1052
1151
  const Form = React__namespace.forwardRef(
1053
- ({ disabled = false, method, onSubmit, ...props }, ref) => {
1152
+ ({ disabled = false, method, onSubmit, initialErrors, ...props }, ref) => {
1054
1153
  const formRef = React__namespace.useRef(null);
1055
1154
  const initialValues = React__namespace.useRef(props.initialValues ?? {});
1056
1155
  const [state, dispatch] = React__namespace.useReducer(reducer, {
1057
- errors: {},
1156
+ errors: initialErrors ?? {},
1058
1157
  isSubmitting: false,
1059
1158
  values: props.initialValues ?? {}
1060
1159
  });
@@ -1185,7 +1284,7 @@ const Form = React__namespace.forwardRef(
1185
1284
  const parsed = parseFloat(value);
1186
1285
  val = isNaN(parsed) ? "" : parsed;
1187
1286
  } else if (/checkbox/.test(type)) {
1188
- val = !getIn(state.values, field);
1287
+ val = !Theme.getIn(state.values, field);
1189
1288
  } else if (options && multiple) {
1190
1289
  val = Array.from(options).filter((el) => el.selected).map((el) => el.value);
1191
1290
  } else {
@@ -1286,11 +1385,11 @@ const getYupValidationErrors = (err) => {
1286
1385
  let errors = {};
1287
1386
  if (err.inner) {
1288
1387
  if (err.inner.length === 0) {
1289
- return setIn(errors, err.path, err.message);
1388
+ return Theme.setIn(errors, err.path, err.message);
1290
1389
  }
1291
1390
  for (const error of err.inner) {
1292
- if (!getIn(errors, error.path)) {
1293
- errors = setIn(errors, error.path, error.message);
1391
+ if (!Theme.getIn(errors, error.path)) {
1392
+ errors = Theme.setIn(errors, error.path, error.message);
1294
1393
  }
1295
1394
  }
1296
1395
  }
@@ -1314,10 +1413,10 @@ const reducer = (state, action) => immer.produce(state, (draft) => {
1314
1413
  draft.isSubmitting = false;
1315
1414
  break;
1316
1415
  case "SET_FIELD_VALUE":
1317
- draft.values = setIn(state.values, action.payload.field, action.payload.value);
1416
+ draft.values = Theme.setIn(state.values, action.payload.field, action.payload.value);
1318
1417
  break;
1319
1418
  case "ADD_FIELD_ROW": {
1320
- const currentField = getIn(state.values, action.payload.field, []);
1419
+ const currentField = Theme.getIn(state.values, action.payload.field, []);
1321
1420
  let position = action.payload.addAtIndex;
1322
1421
  if (position === void 0) {
1323
1422
  position = currentField.length;
@@ -1329,40 +1428,40 @@ const reducer = (state, action) => immer.produce(state, (draft) => {
1329
1428
  currentField.at(position)?.__temp_key__,
1330
1429
  1
1331
1430
  );
1332
- draft.values = setIn(
1431
+ draft.values = Theme.setIn(
1333
1432
  state.values,
1334
1433
  action.payload.field,
1335
- setIn(currentField, position.toString(), { ...action.payload.value, __temp_key__: key })
1434
+ Theme.setIn(currentField, position.toString(), { ...action.payload.value, __temp_key__: key })
1336
1435
  );
1337
1436
  break;
1338
1437
  }
1339
1438
  case "MOVE_FIELD_ROW": {
1340
1439
  const { field, fromIndex, toIndex } = action.payload;
1341
- const currentField = [...getIn(state.values, field, [])];
1440
+ const currentField = [...Theme.getIn(state.values, field, [])];
1342
1441
  const currentRow = currentField[fromIndex];
1343
1442
  const startKey = fromIndex > toIndex ? currentField[toIndex - 1]?.__temp_key__ : currentField[toIndex]?.__temp_key__;
1344
1443
  const endKey = fromIndex > toIndex ? currentField[toIndex]?.__temp_key__ : currentField[toIndex + 1]?.__temp_key__;
1345
1444
  const [newKey] = fractionalIndexing.generateNKeysBetween(startKey, endKey, 1);
1346
1445
  currentField.splice(fromIndex, 1);
1347
1446
  currentField.splice(toIndex, 0, { ...currentRow, __temp_key__: newKey });
1348
- draft.values = setIn(state.values, field, currentField);
1447
+ draft.values = Theme.setIn(state.values, field, currentField);
1349
1448
  break;
1350
1449
  }
1351
1450
  case "REMOVE_FIELD_ROW": {
1352
- const currentField = getIn(state.values, action.payload.field, []);
1451
+ const currentField = Theme.getIn(state.values, action.payload.field, []);
1353
1452
  let position = action.payload.removeAtIndex;
1354
1453
  if (position === void 0) {
1355
1454
  position = currentField.length - 1;
1356
1455
  } else if (position < 0) {
1357
1456
  position = 0;
1358
1457
  }
1359
- const newValue = setIn(currentField, position.toString(), void 0).filter(
1458
+ const newValue = Theme.setIn(currentField, position.toString(), void 0).filter(
1360
1459
  (val) => val
1361
1460
  );
1362
- draft.values = setIn(
1461
+ draft.values = Theme.setIn(
1363
1462
  state.values,
1364
1463
  action.payload.field,
1365
- newValue.length > 0 ? newValue : void 0
1464
+ newValue.length > 0 ? newValue : []
1366
1465
  );
1367
1466
  break;
1368
1467
  }
@@ -1385,18 +1484,25 @@ const useField = (path) => {
1385
1484
  const { formatMessage } = reactIntl.useIntl();
1386
1485
  const initialValue = useForm(
1387
1486
  "useField",
1388
- (state) => getIn(state.initialValues, path)
1487
+ (state) => Theme.getIn(state.initialValues, path)
1389
1488
  );
1390
1489
  const value = useForm(
1391
1490
  "useField",
1392
- (state) => getIn(state.values, path)
1491
+ (state) => Theme.getIn(state.values, path)
1393
1492
  );
1394
1493
  const handleChange = useForm("useField", (state) => state.onChange);
1395
- const error = useForm("useField", (state) => getIn(state.errors, path));
1494
+ const error = useForm("useField", (state) => {
1495
+ const error2 = Theme.getIn(state.errors, path);
1496
+ if (isErrorMessageDescriptor(error2)) {
1497
+ const { values, ...message } = error2;
1498
+ return formatMessage(message, values);
1499
+ }
1500
+ return error2;
1501
+ });
1396
1502
  return {
1397
1503
  initialValue,
1398
1504
  /**
1399
- * Errors can be a string, or a MesaageDescriptor, so we need to handle both cases.
1505
+ * Errors can be a string, or a MessageDescriptor, so we need to handle both cases.
1400
1506
  * If it's anything else, we don't return it.
1401
1507
  */
1402
1508
  error: isErrorMessageDescriptor(error) ? formatMessage(
@@ -1411,7 +1517,7 @@ const useField = (path) => {
1411
1517
  };
1412
1518
  };
1413
1519
  const isErrorMessageDescriptor = (object) => {
1414
- return typeof object === "object" && object !== null && "id" in object && "defaultMessage" in object;
1520
+ return typeof object === "object" && object !== null && !Array.isArray(object) && "id" in object && "defaultMessage" in object;
1415
1521
  };
1416
1522
  const Blocker = ({ onProceed = () => {
1417
1523
  }, onCancel = () => {
@@ -1423,53 +1529,42 @@ const Blocker = ({ onProceed = () => {
1423
1529
  return !isSubmitting && modified && (currentLocation.pathname !== nextLocation.pathname || currentLocation.search !== nextLocation.search);
1424
1530
  });
1425
1531
  if (blocker.state === "blocked") {
1426
- const handleCancel = () => {
1427
- onCancel();
1428
- blocker.reset();
1429
- };
1430
- return /* @__PURE__ */ jsxRuntime.jsxs(
1431
- designSystem.Dialog,
1432
- {
1433
- isOpen: true,
1434
- title: formatMessage({
1435
- id: "app.components.ConfirmDialog.title",
1436
- defaultMessage: "Confirmation"
1437
- }),
1438
- onClose: handleCancel,
1439
- children: [
1440
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
1441
- /* @__PURE__ */ jsxRuntime.jsx(icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }),
1442
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "omega", textAlign: "center", children: formatMessage({
1443
- id: "global.prompt.unsaved",
1444
- defaultMessage: "You have unsaved changes, are you sure you want to leave?"
1445
- }) })
1446
- ] }) }),
1447
- /* @__PURE__ */ jsxRuntime.jsx(
1448
- designSystem.DialogFooter,
1449
- {
1450
- startAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleCancel, variant: "tertiary", children: formatMessage({
1451
- id: "app.components.Button.cancel",
1452
- defaultMessage: "Cancel"
1453
- }) }),
1454
- endAction: /* @__PURE__ */ jsxRuntime.jsx(
1455
- designSystem.Button,
1456
- {
1457
- onClick: () => {
1458
- onProceed();
1459
- blocker.proceed();
1460
- },
1461
- variant: "danger",
1462
- children: formatMessage({
1463
- id: "app.components.Button.confirm",
1464
- defaultMessage: "Confirm"
1465
- })
1466
- }
1467
- )
1468
- }
1469
- )
1470
- ]
1532
+ const handleCancel = (isOpen) => {
1533
+ if (!isOpen) {
1534
+ onCancel();
1535
+ blocker.reset();
1471
1536
  }
1472
- );
1537
+ };
1538
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: true, onOpenChange: handleCancel, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
1539
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: formatMessage({
1540
+ id: "app.components.ConfirmDialog.title",
1541
+ defaultMessage: "Confirmation"
1542
+ }) }),
1543
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }), children: formatMessage({
1544
+ id: "global.prompt.unsaved",
1545
+ defaultMessage: "You have unsaved changes, are you sure you want to leave?"
1546
+ }) }),
1547
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
1548
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
1549
+ id: "app.components.Button.cancel",
1550
+ defaultMessage: "Cancel"
1551
+ }) }) }),
1552
+ /* @__PURE__ */ jsxRuntime.jsx(
1553
+ designSystem.Button,
1554
+ {
1555
+ onClick: () => {
1556
+ onProceed();
1557
+ blocker.proceed();
1558
+ },
1559
+ variant: "danger",
1560
+ children: formatMessage({
1561
+ id: "app.components.Button.confirm",
1562
+ defaultMessage: "Confirm"
1563
+ })
1564
+ }
1565
+ )
1566
+ ] })
1567
+ ] }) });
1473
1568
  }
1474
1569
  return null;
1475
1570
  };
@@ -1522,7 +1617,7 @@ const BooleanInput = React.forwardRef(
1522
1617
  const MemoizedBooleanInput = React.memo(BooleanInput);
1523
1618
 
1524
1619
  const CheckboxInput = React.forwardRef(
1525
- ({ name, required, label, hint, ...props }, ref) => {
1620
+ ({ name, required, label, hint, type: _type, ...props }, ref) => {
1526
1621
  const field = useField(name);
1527
1622
  const fieldRef = useFocusInputField(name);
1528
1623
  const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
@@ -1530,9 +1625,9 @@ const CheckboxInput = React.forwardRef(
1530
1625
  /* @__PURE__ */ jsxRuntime.jsx(
1531
1626
  designSystem.Checkbox,
1532
1627
  {
1533
- onValueChange: (checked) => field.onChange(name, checked),
1628
+ onCheckedChange: (checked) => field.onChange(name, !!checked),
1534
1629
  ref: composedRefs,
1535
- value: field.value,
1630
+ checked: field.value,
1536
1631
  ...props,
1537
1632
  children: label || props["aria-label"]
1538
1633
  }
@@ -1559,10 +1654,10 @@ const DateInput = React.forwardRef(
1559
1654
  ref: composedRefs,
1560
1655
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
1561
1656
  onChange: (date) => {
1562
- field.onChange(name, date);
1657
+ field.onChange(name, date ? convertLocalDateToUTCDate(date) : null);
1563
1658
  },
1564
- onClear: () => field.onChange(name, void 0),
1565
- value,
1659
+ onClear: () => field.onChange(name, null),
1660
+ value: value ? convertLocalDateToUTCDate(value) : value,
1566
1661
  ...props
1567
1662
  }
1568
1663
  ),
@@ -1571,6 +1666,12 @@ const DateInput = React.forwardRef(
1571
1666
  ] });
1572
1667
  }
1573
1668
  );
1669
+ const convertLocalDateToUTCDate = (date$1) => {
1670
+ const utcDateString = date$1.toISOString();
1671
+ const timeZone = date.getLocalTimeZone();
1672
+ const zonedDateTime = date.parseAbsolute(utcDateString, timeZone);
1673
+ return date.toCalendarDate(zonedDateTime).toDate("UTC");
1674
+ };
1574
1675
  const MemoizedDateInput = React.memo(DateInput);
1575
1676
 
1576
1677
  const DateTimeInput = React.forwardRef(
@@ -1588,9 +1689,9 @@ const DateTimeInput = React.forwardRef(
1588
1689
  ref: composedRefs,
1589
1690
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
1590
1691
  onChange: (date) => {
1591
- field.onChange(name, date);
1692
+ field.onChange(name, date ? date : null);
1592
1693
  },
1593
- onClear: () => field.onChange(name, void 0),
1694
+ onClear: () => field.onChange(name, null),
1594
1695
  value,
1595
1696
  ...props
1596
1697
  }
@@ -1820,7 +1921,7 @@ const TimeInput = React.forwardRef(
1820
1921
  ref: composedRefs,
1821
1922
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
1822
1923
  onChange: (time) => {
1823
- field.onChange(name, time);
1924
+ field.onChange(name, `${time}:00.000`);
1824
1925
  },
1825
1926
  onClear: () => field.onChange(name, void 0),
1826
1927
  value: field.value ?? "",
@@ -1840,6 +1941,7 @@ const InputRenderer = React.memo(
1840
1941
  case "biginteger":
1841
1942
  case "timestamp":
1842
1943
  case "string":
1944
+ case "uid":
1843
1945
  return /* @__PURE__ */ jsxRuntime.jsx(MemoizedStringInput, { ref: forwardRef2, ...props });
1844
1946
  case "boolean":
1845
1947
  return /* @__PURE__ */ jsxRuntime.jsx(MemoizedBooleanInput, { ref: forwardRef2, ...props });
@@ -1901,7 +2003,7 @@ const Img = styledComponents.styled.img`
1901
2003
  const Logo = () => {
1902
2004
  const {
1903
2005
  logos: { auth }
1904
- } = rbac.useConfiguration("UnauthenticatedLogo");
2006
+ } = Theme.useConfiguration("UnauthenticatedLogo");
1905
2007
  return /* @__PURE__ */ jsxRuntime.jsx(Img, { src: auth?.custom?.url || auth.default, "aria-hidden": true, alt: "" });
1906
2008
  };
1907
2009
 
@@ -1913,8 +2015,8 @@ const Column = styledComponents.styled(designSystem.Flex)`
1913
2015
  flex-direction: column;
1914
2016
  `;
1915
2017
  const LocaleToggle = () => {
1916
- const localeNames = rbac.useTypedSelector((state) => state.admin_app.language.localeNames);
1917
- const dispatch = rbac.useTypedDispatch();
2018
+ const localeNames = Theme.useTypedSelector((state) => state.admin_app.language.localeNames);
2019
+ const dispatch = Theme.useTypedDispatch();
1918
2020
  const { formatMessage, locale } = reactIntl.useIntl();
1919
2021
  return /* @__PURE__ */ jsxRuntime.jsx(
1920
2022
  designSystem.SingleSelect,
@@ -1925,7 +2027,7 @@ const LocaleToggle = () => {
1925
2027
  }),
1926
2028
  value: locale,
1927
2029
  onChange: (language) => {
1928
- dispatch(rbac.setLocale(language));
2030
+ dispatch(Theme.setLocale(language));
1929
2031
  },
1930
2032
  children: Object.entries(localeNames).map(([language, name]) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: language, children: name }, language))
1931
2033
  }
@@ -2016,7 +2118,7 @@ const Login = ({ children }) => {
2016
2118
  const { search: searchString } = reactRouterDom.useLocation();
2017
2119
  const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
2018
2120
  const navigate = reactRouterDom.useNavigate();
2019
- const { login } = rbac.useAuth("Login", (auth) => auth);
2121
+ const { login } = Theme.useAuth("Login", (auth) => auth);
2020
2122
  const handleLogin = async (body) => {
2021
2123
  setApiError(void 0);
2022
2124
  const res = await login(body);
@@ -2106,8 +2208,8 @@ const Login = ({ children }) => {
2106
2208
  const ForgotPassword = () => {
2107
2209
  const navigate = reactRouterDom.useNavigate();
2108
2210
  const { formatMessage } = reactIntl.useIntl();
2109
- const { _unstableFormatAPIError: formatAPIError } = rbac.useAPIErrorHandler();
2110
- const [forgotPassword, { error }] = rbac.useForgotPasswordMutation();
2211
+ const { _unstableFormatAPIError: formatAPIError } = Theme.useAPIErrorHandler();
2212
+ const [forgotPassword, { error }] = Theme.useForgotPasswordMutation();
2111
2213
  return /* @__PURE__ */ jsxRuntime.jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { children: [
2112
2214
  /* @__PURE__ */ jsxRuntime.jsxs(LayoutContent, { children: [
2113
2215
  /* @__PURE__ */ jsxRuntime.jsxs(Column, { children: [
@@ -2264,12 +2366,12 @@ const FieldWrapper = styledComponents.styled(designSystem.Field.Root)`
2264
2366
  const delays = {
2265
2367
  postResponse: 90 * 24 * 60 * 60 * 1e3,
2266
2368
  // 90 days in ms
2267
- postFirstDismissal: 7 * 24 * 60 * 60 * 1e3,
2268
- // 7 days in ms
2369
+ postFirstDismissal: 14 * 24 * 60 * 60 * 1e3,
2370
+ // 14 days in ms
2269
2371
  postSubsequentDismissal: 90 * 24 * 60 * 60 * 1e3,
2270
2372
  // 90 days in ms
2271
- display: 5 * 60 * 1e3
2272
- // 5 minutes in ms
2373
+ display: 30 * 60 * 1e3
2374
+ // 30 minutes in ms
2273
2375
  };
2274
2376
  const ratingArray = [...Array(11).keys()];
2275
2377
  const checkIfShouldShowSurvey = (settings) => {
@@ -2307,9 +2409,9 @@ const NpsSurvey = () => {
2307
2409
  const { formatMessage } = reactIntl.useIntl();
2308
2410
  const { npsSurveySettings, setNpsSurveySettings } = useNpsSurveySettings();
2309
2411
  const [isFeedbackResponse, setIsFeedbackResponse] = React__namespace.useState(false);
2310
- const { toggleNotification } = rbac.useNotification();
2311
- const currentEnvironment = rbac.useAppInfo("NpsSurvey", (state) => state.currentEnvironment);
2312
- const strapiVersion = rbac.useAppInfo("NpsSurvey", (state) => state.strapiVersion);
2412
+ const { toggleNotification } = Theme.useNotification();
2413
+ const currentEnvironment = Theme.useAppInfo("NpsSurvey", (state) => state.currentEnvironment);
2414
+ const strapiVersion = Theme.useAppInfo("NpsSurvey", (state) => state.strapiVersion);
2313
2415
  const [surveyIsShown, setSurveyIsShown] = React__namespace.useState(
2314
2416
  checkIfShouldShowSurvey(npsSurveySettings)
2315
2417
  );
@@ -2322,7 +2424,7 @@ const NpsSurvey = () => {
2322
2424
  clearTimeout(displayTime);
2323
2425
  };
2324
2426
  }, []);
2325
- const { user } = rbac.useAuth("NpsSurvey", (auth) => auth);
2427
+ const { user } = Theme.useAuth("NpsSurvey", (auth) => auth);
2326
2428
  if (!displaySurvey) {
2327
2429
  return null;
2328
2430
  }
@@ -2406,7 +2508,7 @@ const NpsSurvey = () => {
2406
2508
  bottom: 0,
2407
2509
  left: "50%",
2408
2510
  transform: "translateX(-50%)",
2409
- zIndex: "popover",
2511
+ zIndex: "200",
2410
2512
  width: "50%",
2411
2513
  children: isFeedbackResponse ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", children: formatMessage({
2412
2514
  id: "app.components.NpsSurvey.feedback-response",
@@ -2592,11 +2694,11 @@ const REGISTER_ADMIN_SCHEMA = yup__namespace.object().shape({
2592
2694
  })
2593
2695
  });
2594
2696
  const Register = ({ hasAdmin }) => {
2595
- const { toggleNotification } = rbac.useNotification();
2697
+ const { toggleNotification } = Theme.useNotification();
2596
2698
  const navigate = reactRouterDom.useNavigate();
2597
2699
  const [submitCount, setSubmitCount] = React__namespace.useState(0);
2598
2700
  const [apiError, setApiError] = React__namespace.useState();
2599
- const { trackUsage } = rbac.useTracking();
2701
+ const { trackUsage } = Theme.useTracking();
2600
2702
  const { formatMessage } = reactIntl.useIntl();
2601
2703
  const setSkipped = useGuidedTour("Register", (state) => state.setSkipped);
2602
2704
  const { search: searchString } = reactRouterDom.useLocation();
@@ -2605,10 +2707,10 @@ const Register = ({ hasAdmin }) => {
2605
2707
  const {
2606
2708
  _unstableFormatAPIError: formatAPIError,
2607
2709
  _unstableFormatValidationErrors: formatValidationErrors
2608
- } = rbac.useAPIErrorHandler();
2710
+ } = Theme.useAPIErrorHandler();
2609
2711
  const { setNpsSurveySettings } = useNpsSurveySettings();
2610
2712
  const registrationToken = query.get("registrationToken");
2611
- const { data: userInfo, error } = rbac.useGetRegistrationInfoQuery(registrationToken, {
2713
+ const { data: userInfo, error } = Theme.useGetRegistrationInfoQuery(registrationToken, {
2612
2714
  skip: !registrationToken
2613
2715
  });
2614
2716
  React__namespace.useEffect(() => {
@@ -2621,13 +2723,13 @@ const Register = ({ hasAdmin }) => {
2621
2723
  navigate(`/auth/oops?info=${encodeURIComponent(message)}`);
2622
2724
  }
2623
2725
  }, [error, formatAPIError, navigate, toggleNotification]);
2624
- const [registerAdmin] = rbac.useRegisterAdminMutation();
2625
- const [registerUser] = rbac.useRegisterUserMutation();
2626
- const { setToken } = rbac.useAuth("Register", (auth) => auth);
2726
+ const [registerAdmin] = Theme.useRegisterAdminMutation();
2727
+ const [registerUser] = Theme.useRegisterUserMutation();
2728
+ const dispatch = Theme.useTypedDispatch();
2627
2729
  const handleRegisterAdmin = async ({ news, ...body }, setFormErrors) => {
2628
2730
  const res = await registerAdmin(body);
2629
2731
  if ("data" in res) {
2630
- setToken(res.data.token);
2732
+ dispatch(Theme.login({ token: res.data.token }));
2631
2733
  const { roles } = res.data.user;
2632
2734
  if (roles) {
2633
2735
  const isUserSuperAdmin = roles.find(({ code }) => code === "strapi-super-admin");
@@ -2660,7 +2762,7 @@ const Register = ({ hasAdmin }) => {
2660
2762
  const handleRegisterUser = async ({ news, ...body }, setFormErrors) => {
2661
2763
  const res = await registerUser(body);
2662
2764
  if ("data" in res) {
2663
- setToken(res.data.token);
2765
+ dispatch(Theme.login({ token: res.data.token }));
2664
2766
  if (news) {
2665
2767
  setNpsSurveySettings((s) => ({ ...s, enabled: true }));
2666
2768
  navigate({
@@ -2754,7 +2856,7 @@ const Register = ({ hasAdmin }) => {
2754
2856
  }
2755
2857
  },
2756
2858
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, marginTop: 7, children: [
2757
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: [
2859
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: [
2758
2860
  {
2759
2861
  label: formatMessage({
2760
2862
  id: "Auth.form.firstname.label",
@@ -2830,7 +2932,7 @@ const Register = ({ hasAdmin }) => {
2830
2932
  size: 12,
2831
2933
  type: "checkbox"
2832
2934
  }
2833
- ].map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field }) }, field.name)) }),
2935
+ ].map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field }) }, field.name)) }),
2834
2936
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { fullWidth: true, size: "L", type: "submit", children: formatMessage({
2835
2937
  id: "Auth.form.button.register",
2836
2938
  defaultMessage: "Let's start"
@@ -2898,16 +3000,16 @@ const RESET_PASSWORD_SCHEMA = yup__namespace.object().shape({
2898
3000
  });
2899
3001
  const ResetPassword = () => {
2900
3002
  const { formatMessage } = reactIntl.useIntl();
3003
+ const dispatch = Theme.useTypedDispatch();
2901
3004
  const navigate = reactRouterDom.useNavigate();
2902
3005
  const { search: searchString } = reactRouterDom.useLocation();
2903
3006
  const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
2904
- const { _unstableFormatAPIError: formatAPIError } = rbac.useAPIErrorHandler();
2905
- const { setToken } = rbac.useAuth("ResetPassword", (auth) => auth);
2906
- const [resetPassword, { error }] = rbac.useResetPasswordMutation();
3007
+ const { _unstableFormatAPIError: formatAPIError } = Theme.useAPIErrorHandler();
3008
+ const [resetPassword, { error }] = Theme.useResetPasswordMutation();
2907
3009
  const handleSubmit = async (body) => {
2908
3010
  const res = await resetPassword(body);
2909
3011
  if ("data" in res) {
2910
- setToken(res.data.token);
3012
+ dispatch(Theme.login({ token: res.data.token }));
2911
3013
  navigate("/");
2912
3014
  }
2913
3015
  };
@@ -2997,11 +3099,11 @@ const AuthPage = () => {
2997
3099
  const { hasAdmin } = data ?? {};
2998
3100
  const Login$1 = useEnterprise.useEnterprise(
2999
3101
  Login,
3000
- async () => (await Promise.resolve().then(() => require('./Login-EcSP4AMG.js'))).LoginEE
3102
+ async () => (await Promise.resolve().then(() => require('./Login-iUJs_YTe.js'))).LoginEE
3001
3103
  );
3002
3104
  const forms = useEnterprise.useEnterprise(
3003
3105
  FORMS,
3004
- async () => (await Promise.resolve().then(() => require('./constants-sfZ2gFzJ.js'))).FORMS,
3106
+ async () => (await Promise.resolve().then(() => require('./constants-GyaJoB7C.js'))).FORMS,
3005
3107
  {
3006
3108
  combine(ceForms, eeForms) {
3007
3109
  return {
@@ -3012,7 +3114,7 @@ const AuthPage = () => {
3012
3114
  defaultValue: FORMS
3013
3115
  }
3014
3116
  );
3015
- const { token } = rbac.useAuth("AuthPage", (auth) => auth);
3117
+ const { token } = Theme.useAuth("AuthPage", (auth) => auth);
3016
3118
  if (!authType || !forms) {
3017
3119
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/" });
3018
3120
  }
@@ -3037,229 +3139,14 @@ const AuthPage = () => {
3037
3139
  return /* @__PURE__ */ jsxRuntime.jsx(Login$1, {});
3038
3140
  } else if (authType === "login" && !Login$1) {
3039
3141
  return null;
3040
- }
3041
- return /* @__PURE__ */ jsxRuntime.jsx(Component, { hasAdmin });
3042
- };
3043
-
3044
- const ActionLayout = ({ startActions, endActions }) => {
3045
- if (!startActions && !endActions) {
3046
- return null;
3047
- }
3048
- return /* @__PURE__ */ jsxRuntime.jsxs(
3049
- designSystem.Flex,
3050
- {
3051
- justifyContent: "space-between",
3052
- alignItems: "flex-start",
3053
- paddingBottom: 4,
3054
- paddingLeft: 10,
3055
- paddingRight: 10,
3056
- children: [
3057
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, wrap: "wrap", children: startActions }),
3058
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
3059
- ]
3060
- }
3061
- );
3062
- };
3063
-
3064
- const ContentLayout = ({ children }) => {
3065
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 10, paddingRight: 10, children });
3066
- };
3067
-
3068
- const GridColSize = {
3069
- S: 180,
3070
- M: 250
3071
- };
3072
- const StyledGrid = styledComponents.styled(designSystem.Box)`
3073
- display: grid;
3074
- grid-template-columns: repeat(
3075
- auto-fit,
3076
- minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
3077
- );
3078
- grid-gap: ${({ theme }) => theme.spaces[4]};
3079
- `;
3080
- const GridLayout = ({ size, children }) => {
3081
- return /* @__PURE__ */ jsxRuntime.jsx(StyledGrid, { $size: size, children });
3082
- };
3083
-
3084
- const BaseHeaderLayout = React__namespace.forwardRef(
3085
- ({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
3086
- const isSubtitleString = typeof subtitle === "string";
3087
- if (sticky) {
3088
- return /* @__PURE__ */ jsxRuntime.jsx(
3089
- designSystem.Box,
3090
- {
3091
- paddingLeft: 6,
3092
- paddingRight: 6,
3093
- paddingTop: 3,
3094
- paddingBottom: 3,
3095
- position: "fixed",
3096
- top: 0,
3097
- right: 0,
3098
- background: "neutral0",
3099
- shadow: "tableShadow",
3100
- width: `${width}rem`,
3101
- zIndex: 1,
3102
- "data-strapi-header-sticky": true,
3103
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
3104
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
3105
- navigationAction && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingRight: 3, children: navigationAction }),
3106
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
3107
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "h1", ...props, children: title }),
3108
- isSubtitleString ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
3109
- ] }),
3110
- secondaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 4, children: secondaryAction }) : null
3111
- ] }),
3112
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: primaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
3113
- ] })
3114
- }
3115
- );
3116
- }
3117
- return /* @__PURE__ */ jsxRuntime.jsxs(
3118
- designSystem.Box,
3119
- {
3120
- ref,
3121
- paddingLeft: 10,
3122
- paddingRight: 10,
3123
- paddingBottom: 8,
3124
- paddingTop: navigationAction ? 6 : 8,
3125
- background: "neutral100",
3126
- "data-strapi-header": true,
3127
- children: [
3128
- navigationAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, children: navigationAction }) : null,
3129
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
3130
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { minWidth: 0, children: [
3131
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
3132
- secondaryAction ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 4, children: secondaryAction }) : null
3133
- ] }),
3134
- primaryAction
3135
- ] }),
3136
- isSubtitleString ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
3137
- ]
3138
- }
3139
- );
3140
- }
3141
- );
3142
- const HeaderLayout = (props) => {
3143
- const baseHeaderLayoutRef = React__namespace.useRef(null);
3144
- const [headerSize, setHeaderSize] = React__namespace.useState(null);
3145
- const [containerRef, isVisible] = useElementOnScreen({
3146
- root: null,
3147
- rootMargin: "0px",
3148
- threshold: 0
3149
- });
3150
- useResizeObserver(containerRef, () => {
3151
- if (containerRef.current) {
3152
- setHeaderSize(containerRef.current.getBoundingClientRect());
3153
- }
3154
- });
3155
- React__namespace.useEffect(() => {
3156
- if (baseHeaderLayoutRef.current) {
3157
- setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
3158
- }
3159
- }, [baseHeaderLayoutRef]);
3160
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3161
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsxRuntime.jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
3162
- !isVisible && /* @__PURE__ */ jsxRuntime.jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
3163
- ] });
3164
- };
3165
- HeaderLayout.displayName = "HeaderLayout";
3166
- const useElementOnScreen = (options) => {
3167
- const containerRef = React__namespace.useRef(null);
3168
- const [isVisible, setIsVisible] = React__namespace.useState(true);
3169
- const callback = ([entry]) => {
3170
- setIsVisible(entry.isIntersecting);
3171
- };
3172
- React__namespace.useEffect(() => {
3173
- const containerEl = containerRef.current;
3174
- const observer = new IntersectionObserver(callback, options);
3175
- if (containerEl) {
3176
- observer.observe(containerRef.current);
3177
- }
3178
- return () => {
3179
- if (containerEl) {
3180
- observer.disconnect();
3181
- }
3182
- };
3183
- }, [containerRef, options]);
3184
- return [containerRef, isVisible];
3185
- };
3186
- const useResizeObserver = (sources, onResize) => {
3187
- const handleResize = designSystem.useCallbackRef(onResize);
3188
- React__namespace.useLayoutEffect(() => {
3189
- const resizeObs = new ResizeObserver(handleResize);
3190
- if (Array.isArray(sources)) {
3191
- sources.forEach((source) => {
3192
- if (source.current) {
3193
- resizeObs.observe(source.current);
3194
- }
3195
- });
3196
- } else if (sources.current) {
3197
- resizeObs.observe(sources.current);
3198
- }
3199
- return () => {
3200
- resizeObs.disconnect();
3201
- };
3202
- }, [sources, handleResize]);
3203
- };
3204
-
3205
- const GridContainer = styledComponents.styled(designSystem.Box)`
3206
- display: grid;
3207
- grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
3208
- `;
3209
- const OverflowingItem = styledComponents.styled(designSystem.Box)`
3210
- overflow-x: hidden;
3211
- `;
3212
- const RootLayout = ({ sideNav, children }) => {
3213
- return /* @__PURE__ */ jsxRuntime.jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
3214
- sideNav,
3215
- /* @__PURE__ */ jsxRuntime.jsx(OverflowingItem, { paddingBottom: 10, children })
3216
- ] });
3217
- };
3218
- const Layouts = {
3219
- Root: RootLayout,
3220
- Header: HeaderLayout,
3221
- BaseHeader: BaseHeaderLayout,
3222
- Grid: GridLayout,
3223
- Action: ActionLayout,
3224
- Content: ContentLayout
3225
- };
3226
-
3227
- const NotFoundPage = () => {
3228
- const { formatMessage } = reactIntl.useIntl();
3229
- return /* @__PURE__ */ jsxRuntime.jsxs(rbac.Page.Main, { labelledBy: "title", children: [
3230
- /* @__PURE__ */ jsxRuntime.jsx(
3231
- Layouts.Header,
3232
- {
3233
- id: "title",
3234
- title: formatMessage({
3235
- id: "content-manager.pageNotFound",
3236
- defaultMessage: "Page not found"
3237
- })
3238
- }
3239
- ),
3240
- /* @__PURE__ */ jsxRuntime.jsx(Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
3241
- designSystem.EmptyStateLayout,
3242
- {
3243
- action: /* @__PURE__ */ jsxRuntime.jsx(designSystem.LinkButton, { tag: reactRouterDom.Link, variant: "secondary", endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRight, {}), to: "/", children: formatMessage({
3244
- id: "app.components.NotFoundPage.back",
3245
- defaultMessage: "Back to homepage"
3246
- }) }),
3247
- content: formatMessage({
3248
- id: "app.page.not.found",
3249
- defaultMessage: "Oops! We can't seem to find the page you're looging for..."
3250
- }),
3251
- hasRadius: true,
3252
- icon: /* @__PURE__ */ jsxRuntime.jsx(symbols.EmptyPictures, { width: "16rem" }),
3253
- shadow: "tableShadow"
3254
- }
3255
- ) })
3256
- ] });
3142
+ }
3143
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { hasAdmin });
3257
3144
  };
3258
3145
 
3259
3146
  const ROUTES_CE = [
3260
3147
  {
3261
3148
  lazy: async () => {
3262
- const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-IgkmnCSY.js'));
3149
+ const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-XYrZSP2n.js'));
3263
3150
  return {
3264
3151
  Component: ProtectedListPage
3265
3152
  };
@@ -3268,7 +3155,7 @@ const ROUTES_CE = [
3268
3155
  },
3269
3156
  {
3270
3157
  lazy: async () => {
3271
- const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-5V60DKB0.js'));
3158
+ const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-zeisnPM2.js'));
3272
3159
  return {
3273
3160
  Component: ProtectedCreatePage
3274
3161
  };
@@ -3277,7 +3164,7 @@ const ROUTES_CE = [
3277
3164
  },
3278
3165
  {
3279
3166
  lazy: async () => {
3280
- const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-5V60DKB0.js'));
3167
+ const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-zeisnPM2.js'));
3281
3168
  return {
3282
3169
  Component: ProtectedCreatePage
3283
3170
  };
@@ -3286,7 +3173,7 @@ const ROUTES_CE = [
3286
3173
  },
3287
3174
  {
3288
3175
  lazy: async () => {
3289
- const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-HsLjcfgK.js'));
3176
+ const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-GM7gM7Np.js'));
3290
3177
  return {
3291
3178
  Component: ProtectedEditPage
3292
3179
  };
@@ -3295,7 +3182,7 @@ const ROUTES_CE = [
3295
3182
  },
3296
3183
  {
3297
3184
  lazy: async () => {
3298
- const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-10_h7FUt.js'));
3185
+ const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-8iWYEe2_.js'));
3299
3186
  return {
3300
3187
  Component: ProtectedListPage
3301
3188
  };
@@ -3304,7 +3191,7 @@ const ROUTES_CE = [
3304
3191
  },
3305
3192
  {
3306
3193
  lazy: async () => {
3307
- const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-vRwS2OJZ.js'));
3194
+ const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-1svcLlQN.js'));
3308
3195
  return {
3309
3196
  Component: ProtectedEditPage
3310
3197
  };
@@ -3313,7 +3200,7 @@ const ROUTES_CE = [
3313
3200
  },
3314
3201
  {
3315
3202
  lazy: async () => {
3316
- const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-Z_y-A5xj.js'));
3203
+ const { ProtectedCreatePage } = await Promise.resolve().then(() => require('./CreatePage-X9rp03gy.js'));
3317
3204
  return {
3318
3205
  Component: ProtectedCreatePage
3319
3206
  };
@@ -3322,7 +3209,7 @@ const ROUTES_CE = [
3322
3209
  },
3323
3210
  {
3324
3211
  lazy: async () => {
3325
- const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-WuJtih1X.js')).then(n => n.EditPage$1);
3212
+ const { ProtectedEditPage } = await Promise.resolve().then(() => require('./EditPage-ix4Or3TO.js')).then(n => n.EditPage$1);
3326
3213
  return {
3327
3214
  Component: ProtectedEditPage
3328
3215
  };
@@ -3331,7 +3218,7 @@ const ROUTES_CE = [
3331
3218
  },
3332
3219
  {
3333
3220
  lazy: async () => {
3334
- const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-4nzagne8.js'));
3221
+ const { ProtectedListPage } = await Promise.resolve().then(() => require('./ListPage-8Tez014i.js'));
3335
3222
  return {
3336
3223
  Component: ProtectedListPage
3337
3224
  };
@@ -3340,7 +3227,7 @@ const ROUTES_CE = [
3340
3227
  },
3341
3228
  {
3342
3229
  lazy: async () => {
3343
- const { ProtectedListView } = await Promise.resolve().then(() => require('./ListView-uHb_Hgib.js'));
3230
+ const { ProtectedListView } = await Promise.resolve().then(() => require('./ListView-6U-6GqOi.js'));
3344
3231
  return {
3345
3232
  Component: ProtectedListView
3346
3233
  };
@@ -3349,7 +3236,7 @@ const ROUTES_CE = [
3349
3236
  },
3350
3237
  {
3351
3238
  lazy: async () => {
3352
- const { ProtectedCreateView } = await Promise.resolve().then(() => require('./CreateView-VYprogwB.js'));
3239
+ const { ProtectedCreateView } = await Promise.resolve().then(() => require('./CreateView-Smkfwq2U.js'));
3353
3240
  return {
3354
3241
  Component: ProtectedCreateView
3355
3242
  };
@@ -3358,7 +3245,7 @@ const ROUTES_CE = [
3358
3245
  },
3359
3246
  {
3360
3247
  lazy: async () => {
3361
- const { ProtectedEditView } = await Promise.resolve().then(() => require('./EditViewPage-Q7N1TLU9.js'));
3248
+ const { ProtectedEditView } = await Promise.resolve().then(() => require('./EditViewPage-Kw7Ezpay.js'));
3362
3249
  return {
3363
3250
  Component: ProtectedEditView
3364
3251
  };
@@ -3367,7 +3254,7 @@ const ROUTES_CE = [
3367
3254
  },
3368
3255
  {
3369
3256
  lazy: async () => {
3370
- const { ProtectedCreateView } = await Promise.resolve().then(() => require('./CreateView-5V271zBl.js'));
3257
+ const { ProtectedCreateView } = await Promise.resolve().then(() => require('./CreateView-yQvtXeP2.js'));
3371
3258
  return {
3372
3259
  Component: ProtectedCreateView
3373
3260
  };
@@ -3376,7 +3263,7 @@ const ROUTES_CE = [
3376
3263
  },
3377
3264
  {
3378
3265
  lazy: async () => {
3379
- const { ProtectedListView } = await Promise.resolve().then(() => require('./ListView-pT2a-fdi.js'));
3266
+ const { ProtectedListView } = await Promise.resolve().then(() => require('./ListView-u3bQ6Jrd.js'));
3380
3267
  return {
3381
3268
  Component: ProtectedListView
3382
3269
  };
@@ -3385,32 +3272,455 @@ const ROUTES_CE = [
3385
3272
  },
3386
3273
  {
3387
3274
  lazy: async () => {
3388
- const { ProtectedEditView } = await Promise.resolve().then(() => require('./EditView-lhhZAQtN.js'));
3275
+ const { ProtectedEditView } = await Promise.resolve().then(() => require('./EditView-z-CFelH2.js'));
3389
3276
  return {
3390
3277
  Component: ProtectedEditView
3391
3278
  };
3392
3279
  },
3393
- path: "transfer-tokens/:id"
3394
- },
3395
- {
3396
- lazy: async () => {
3397
- const { PurchaseAuditLogs } = await Promise.resolve().then(() => require('./PurchaseAuditLogs-9reb0oGz.js'));
3398
- return {
3399
- Component: PurchaseAuditLogs
3400
- };
3280
+ path: "transfer-tokens/:id"
3281
+ },
3282
+ {
3283
+ lazy: async () => {
3284
+ const { PurchaseAuditLogs } = await Promise.resolve().then(() => require('./PurchaseAuditLogs-EDV5UGnG.js'));
3285
+ return {
3286
+ Component: PurchaseAuditLogs
3287
+ };
3288
+ },
3289
+ path: "purchase-audit-logs"
3290
+ },
3291
+ {
3292
+ lazy: async () => {
3293
+ const { PurchaseSingleSignOn } = await Promise.resolve().then(() => require('./PurchaseSingleSignOn--Cb7M20e.js'));
3294
+ return {
3295
+ Component: PurchaseSingleSignOn
3296
+ };
3297
+ },
3298
+ path: "purchase-single-sign-on"
3299
+ }
3300
+ ];
3301
+
3302
+ const getImmutableRoutes = () => [
3303
+ {
3304
+ path: "usecase",
3305
+ lazy: async () => {
3306
+ const { PrivateUseCasePage } = await Promise.resolve().then(() => require('./UseCasePage-WtuQk75n.js'));
3307
+ return {
3308
+ Component: PrivateUseCasePage
3309
+ };
3310
+ }
3311
+ },
3312
+ // this needs to go before auth/:authType because otherwise it won't match the route
3313
+ ...getEERoutes$1(),
3314
+ {
3315
+ path: "auth/:authType",
3316
+ element: /* @__PURE__ */ jsxRuntime.jsx(AuthPage, {})
3317
+ }
3318
+ ];
3319
+ const getInitialRoutes = () => [
3320
+ {
3321
+ index: true,
3322
+ lazy: async () => {
3323
+ const { HomePage } = await Promise.resolve().then(() => require('./HomePage-6JeS-ulc.js'));
3324
+ return {
3325
+ Component: HomePage
3326
+ };
3327
+ }
3328
+ },
3329
+ {
3330
+ path: "me",
3331
+ lazy: async () => {
3332
+ const { ProfilePage } = await Promise.resolve().then(() => require('./ProfilePage-Ryrm4G10.js'));
3333
+ return {
3334
+ Component: ProfilePage
3335
+ };
3336
+ }
3337
+ },
3338
+ {
3339
+ path: "list-plugins",
3340
+ lazy: async () => {
3341
+ const { ProtectedInstalledPluginsPage } = await Promise.resolve().then(() => require('./InstalledPluginsPage-QYeyWKla.js'));
3342
+ return {
3343
+ Component: ProtectedInstalledPluginsPage
3344
+ };
3345
+ }
3346
+ },
3347
+ {
3348
+ path: "marketplace",
3349
+ lazy: async () => {
3350
+ const { ProtectedMarketplacePage } = await Promise.resolve().then(() => require('./MarketplacePage-FLcrHGFN.js'));
3351
+ return {
3352
+ Component: ProtectedMarketplacePage
3353
+ };
3354
+ }
3355
+ },
3356
+ {
3357
+ path: "settings/*",
3358
+ lazy: async () => {
3359
+ const { Layout } = await Promise.resolve().then(() => require('./Layout-n5Z9I_69.js'));
3360
+ return {
3361
+ Component: Layout
3362
+ };
3363
+ },
3364
+ children: [
3365
+ {
3366
+ path: "application-infos",
3367
+ lazy: async () => {
3368
+ const { ApplicationInfoPage } = await Promise.resolve().then(() => require('./ApplicationInfoPage-ODW6epX5.js'));
3369
+ return {
3370
+ Component: ApplicationInfoPage
3371
+ };
3372
+ }
3373
+ },
3374
+ // ...Object.values(this.settings).flatMap(({ links }) =>
3375
+ // links.map(({ to, Component }) => ({
3376
+ // path: `${to}/*`,
3377
+ // element: (
3378
+ // <React.Suspense fallback={<Page.Loading />}>
3379
+ // <Component />
3380
+ // </React.Suspense>
3381
+ // ),
3382
+ // }))
3383
+ // ),
3384
+ ...[...getEERoutes(), ...ROUTES_CE].filter(
3385
+ (route, index, refArray) => refArray.findIndex((obj) => obj.path === route.path) === index
3386
+ )
3387
+ ]
3388
+ }
3389
+ ];
3390
+
3391
+ class Router {
3392
+ _routes = [];
3393
+ router = null;
3394
+ _menu = [];
3395
+ _settings = {
3396
+ global: {
3397
+ id: "global",
3398
+ intlLabel: {
3399
+ id: "Settings.global",
3400
+ defaultMessage: "Global Settings"
3401
+ },
3402
+ links: []
3403
+ }
3404
+ };
3405
+ constructor(initialRoutes) {
3406
+ this._routes = initialRoutes;
3407
+ }
3408
+ get routes() {
3409
+ return this._routes;
3410
+ }
3411
+ get menu() {
3412
+ return this._menu;
3413
+ }
3414
+ get settings() {
3415
+ return this._settings;
3416
+ }
3417
+ /**
3418
+ * @internal This method is used internally by Strapi to create the router.
3419
+ * It should not be used by plugins, doing so will likely break the application.
3420
+ */
3421
+ createRouter(strapi, { memory, ...opts } = {}) {
3422
+ const routes = [
3423
+ {
3424
+ path: "/*",
3425
+ errorElement: /* @__PURE__ */ jsxRuntime.jsx(reactRedux.Provider, { store: strapi.store, children: /* @__PURE__ */ jsxRuntime.jsx(Theme.LanguageProvider, { messages: strapi.configurations.translations, children: /* @__PURE__ */ jsxRuntime.jsx(Theme.Theme, { themes: strapi.configurations.themes, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {}) }) }) }),
3426
+ element: /* @__PURE__ */ jsxRuntime.jsx(App, { strapi, store: strapi.store }),
3427
+ children: [
3428
+ ...getImmutableRoutes(),
3429
+ {
3430
+ path: "/*",
3431
+ lazy: async () => {
3432
+ const { PrivateAdminLayout } = await Promise.resolve().then(() => require('./AuthenticatedLayout-haMSd2JF.js'));
3433
+ return {
3434
+ Component: PrivateAdminLayout
3435
+ };
3436
+ },
3437
+ children: [
3438
+ ...this.routes,
3439
+ {
3440
+ path: "*",
3441
+ element: /* @__PURE__ */ jsxRuntime.jsx(NotFoundPage, {})
3442
+ }
3443
+ ]
3444
+ }
3445
+ ]
3446
+ }
3447
+ ];
3448
+ if (memory) {
3449
+ this.router = reactRouterDom.createMemoryRouter(routes, opts);
3450
+ } else {
3451
+ this.router = reactRouterDom.createBrowserRouter(routes, opts);
3452
+ }
3453
+ return this.router;
3454
+ }
3455
+ addMenuLink = (link) => {
3456
+ invariant__default.default(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3457
+ invariant__default.default(
3458
+ typeof link.to === "string",
3459
+ `[${link.intlLabel.defaultMessage}]: Expected link.to to be a string instead received ${typeof link.to}`
3460
+ );
3461
+ invariant__default.default(
3462
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3463
+ `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage should be defined`
3464
+ );
3465
+ invariant__default.default(
3466
+ !link.Component || link.Component && typeof link.Component === "function",
3467
+ `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise that returns a default component. Please use: \`Component: () => import(path)\` instead.`
3468
+ );
3469
+ if (!link.Component || link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3470
+ link.Component[Symbol.toStringTag] === "AsyncFunction") {
3471
+ console.warn(
3472
+ `
3473
+ [${link.intlLabel.defaultMessage}]: [deprecated] addMenuLink() was called with an async Component from the plugin "${link.intlLabel.defaultMessage}". This will be removed in the future. Please use: \`Component: () => import(path)\` ensuring you return a default export instead.
3474
+ `.trim()
3475
+ );
3476
+ }
3477
+ if (link.to.startsWith("/")) {
3478
+ console.warn(
3479
+ `[${link.intlLabel.defaultMessage}]: the \`to\` property of your menu link is an absolute path, it should be relative to the root of the application. This has been corrected for you but will be removed in a future version of Strapi.`
3480
+ );
3481
+ link.to = link.to.slice(1);
3482
+ }
3483
+ const { Component, ...restLink } = link;
3484
+ if (Component) {
3485
+ this._routes.push({
3486
+ path: `${link.to}/*`,
3487
+ lazy: async () => {
3488
+ const mod = await Component();
3489
+ if ("default" in mod) {
3490
+ return { Component: mod.default };
3491
+ } else {
3492
+ return { Component: mod };
3493
+ }
3494
+ }
3495
+ });
3496
+ }
3497
+ this.menu.push(restLink);
3498
+ };
3499
+ addSettingsLink(section, link) {
3500
+ if (typeof section === "object" && "links" in section) {
3501
+ invariant__default.default(section.id, "section.id should be defined");
3502
+ invariant__default.default(
3503
+ section.intlLabel?.id && section.intlLabel?.defaultMessage,
3504
+ "section.intlLabel should be defined"
3505
+ );
3506
+ invariant__default.default(this.settings[section.id] === void 0, "A similar section already exists");
3507
+ invariant__default.default(Array.isArray(section.links), "TypeError expected links to be an array");
3508
+ this.settings[section.id] = { ...section, links: [] };
3509
+ section.links.forEach((link2) => {
3510
+ this.createSettingsLink(section.id, link2);
3511
+ });
3512
+ } else if (typeof section === "object" && link) {
3513
+ invariant__default.default(section.id, "section.id should be defined");
3514
+ invariant__default.default(
3515
+ section.intlLabel?.id && section.intlLabel?.defaultMessage,
3516
+ "section.intlLabel should be defined"
3517
+ );
3518
+ invariant__default.default(this.settings[section.id] === void 0, "A similar section already exists");
3519
+ this.settings[section.id] = { ...section, links: [] };
3520
+ if (Array.isArray(link)) {
3521
+ link.forEach((l) => this.createSettingsLink(section.id, l));
3522
+ } else {
3523
+ this.createSettingsLink(section.id, link);
3524
+ }
3525
+ } else if (typeof section === "string" && link) {
3526
+ if (Array.isArray(link)) {
3527
+ link.forEach((l) => this.createSettingsLink(section, l));
3528
+ } else {
3529
+ this.createSettingsLink(section, link);
3530
+ }
3531
+ } else {
3532
+ throw new Error(
3533
+ "Invalid arguments provided to addSettingsLink, at minimum a sectionId and link are required."
3534
+ );
3535
+ }
3536
+ }
3537
+ createSettingsLink = (sectionId, link) => {
3538
+ invariant__default.default(this._settings[sectionId], "The section does not exist");
3539
+ invariant__default.default(link.id, `[${link.intlLabel.defaultMessage}]: link.id should be defined`);
3540
+ invariant__default.default(
3541
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3542
+ `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage`
3543
+ );
3544
+ invariant__default.default(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3545
+ invariant__default.default(
3546
+ !link.Component || link.Component && typeof link.Component === "function",
3547
+ `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise. Please use: \`Component: () => import(path)\` instead.`
3548
+ );
3549
+ if (!link.Component || link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3550
+ link.Component[Symbol.toStringTag] === "AsyncFunction") {
3551
+ console.warn(
3552
+ `
3553
+ [${link.intlLabel.defaultMessage}]: [deprecated] addSettingsLink() was called with an async Component from the plugin "${link.intlLabel.defaultMessage}". This will be removed in the future. Please use: \`Component: () => import(path)\` ensuring you return a default export instead.
3554
+ `.trim()
3555
+ );
3556
+ }
3557
+ if (link.to.startsWith("/")) {
3558
+ console.warn(
3559
+ `[${link.intlLabel.defaultMessage}]: the \`to\` property of your settings link is an absolute path. It should be relative to \`/settings\`. This has been corrected for you but will be removed in a future version of Strapi.`
3560
+ );
3561
+ link.to = link.to.slice(1);
3562
+ }
3563
+ if (link.to.split("/")[0] === "settings") {
3564
+ console.warn(
3565
+ `[${link.intlLabel.defaultMessage}]: the \`to\` property of your settings link has \`settings\` as the first part of it's path. It should be relative to \`settings\` and therefore, not include it. This has been corrected for you but will be removed in a future version of Strapi.`
3566
+ );
3567
+ link.to = link.to.split("/").slice(1).join("/");
3568
+ }
3569
+ const { Component, ...restLink } = link;
3570
+ const settingsIndex = this._routes.findIndex((route) => route.path === "settings/*");
3571
+ if (!settingsIndex) {
3572
+ console.warn(
3573
+ "A third party plugin has removed the settings section, the settings link cannot be added."
3574
+ );
3575
+ return;
3576
+ } else if (!this._routes[settingsIndex].children) {
3577
+ this._routes[settingsIndex].children = [];
3578
+ }
3579
+ if (Component) {
3580
+ this._routes[settingsIndex].children.push({
3581
+ path: `${link.to}/*`,
3582
+ lazy: async () => {
3583
+ const mod = await Component();
3584
+ if ("default" in mod) {
3585
+ return { Component: mod.default };
3586
+ } else {
3587
+ return { Component: mod };
3588
+ }
3589
+ }
3590
+ });
3591
+ }
3592
+ this._settings[sectionId].links.push(restLink);
3593
+ };
3594
+ /**
3595
+ * @alpha
3596
+ * @description Adds a route or an array of routes to the router.
3597
+ * Otherwise, pass a function that receives the current routes and
3598
+ * returns the new routes in a reducer like fashion.
3599
+ */
3600
+ addRoute(route) {
3601
+ if (Array.isArray(route)) {
3602
+ this._routes = [...this._routes, ...route];
3603
+ } else if (typeof route === "object" && route !== null) {
3604
+ this._routes.push(route);
3605
+ } else if (typeof route === "function") {
3606
+ this._routes = route(this._routes);
3607
+ } else {
3608
+ throw new Error(
3609
+ `Expected the \`route\` passed to \`addRoute\` to be an array or a function, but received ${getPrintableType(
3610
+ route
3611
+ )}`
3612
+ );
3613
+ }
3614
+ }
3615
+ }
3616
+ const getPrintableType = (value) => {
3617
+ const nativeType = typeof value;
3618
+ if (nativeType === "object") {
3619
+ if (value === null)
3620
+ return "null";
3621
+ if (Array.isArray(value))
3622
+ return "array";
3623
+ if (value instanceof Object && value.constructor.name !== "Object") {
3624
+ return value.constructor.name;
3625
+ }
3626
+ }
3627
+ return nativeType;
3628
+ };
3629
+
3630
+ const staticReducers = {
3631
+ [admin.adminApi.reducerPath]: admin.adminApi.reducer,
3632
+ admin_app: Theme.reducer
3633
+ };
3634
+ const injectReducerStoreEnhancer = (appReducers) => (next) => (...args) => {
3635
+ const store = next(...args);
3636
+ const asyncReducers = {};
3637
+ return {
3638
+ ...store,
3639
+ asyncReducers,
3640
+ injectReducer: (key, asyncReducer) => {
3641
+ asyncReducers[key] = asyncReducer;
3642
+ store.replaceReducer(
3643
+ // @ts-expect-error we dynamically add reducers which makes the types uncomfortable.
3644
+ toolkit.combineReducers({
3645
+ ...appReducers,
3646
+ ...asyncReducers
3647
+ })
3648
+ );
3649
+ }
3650
+ };
3651
+ };
3652
+ const configureStoreImpl = (preloadedState = {}, appMiddlewares = [], injectedReducers = {}) => {
3653
+ const coreReducers = { ...staticReducers, ...injectedReducers };
3654
+ const defaultMiddlewareOptions = {};
3655
+ if (process.env.NODE_ENV === "test") {
3656
+ defaultMiddlewareOptions.serializableCheck = false;
3657
+ defaultMiddlewareOptions.immutableCheck = false;
3658
+ }
3659
+ const store = toolkit.configureStore({
3660
+ preloadedState: {
3661
+ admin_app: preloadedState.admin_app
3662
+ },
3663
+ reducer: coreReducers,
3664
+ devTools: process.env.NODE_ENV !== "production",
3665
+ middleware: (getDefaultMiddleware) => [
3666
+ ...getDefaultMiddleware(defaultMiddlewareOptions),
3667
+ rtkQueryUnauthorizedMiddleware,
3668
+ admin.adminApi.middleware,
3669
+ ...appMiddlewares.map((m) => m())
3670
+ ],
3671
+ enhancers: [injectReducerStoreEnhancer(coreReducers)]
3672
+ });
3673
+ return store;
3674
+ };
3675
+ const rtkQueryUnauthorizedMiddleware = ({ dispatch }) => (next) => (action) => {
3676
+ if (toolkit.isRejected(action) && action.payload?.status === 401) {
3677
+ dispatch(Theme.logout());
3678
+ window.location.href = "/admin/auth/login";
3679
+ return;
3680
+ }
3681
+ return next(action);
3682
+ };
3683
+
3684
+ const getBasename = () => (process.env.ADMIN_PATH ?? "").replace(window.location.origin, "");
3685
+
3686
+ const createHook = () => {
3687
+ const _handlers = [];
3688
+ return {
3689
+ register(fn) {
3690
+ _handlers.push(fn);
3691
+ },
3692
+ delete(handler) {
3693
+ _handlers.splice(_handlers.indexOf(handler), 1);
3694
+ },
3695
+ runWaterfall(args, store) {
3696
+ return _handlers.reduce((acc, fn) => fn(acc, store), args);
3697
+ },
3698
+ async runWaterfallAsync(args, store) {
3699
+ let result = args;
3700
+ for (const fn of _handlers) {
3701
+ result = await fn(result, store);
3702
+ }
3703
+ return result;
3704
+ },
3705
+ runSeries(...args) {
3706
+ return _handlers.map((fn) => fn(...args));
3401
3707
  },
3402
- path: "purchase-audit-logs"
3403
- },
3404
- {
3405
- lazy: async () => {
3406
- const { PurchaseSingleSignOn } = await Promise.resolve().then(() => require('./PurchaseSingleSignOn-S3xLiiv7.js'));
3407
- return {
3408
- Component: PurchaseSingleSignOn
3409
- };
3708
+ async runSeriesAsync(...args) {
3709
+ const result = [];
3710
+ for (const fn of _handlers) {
3711
+ result.push(await fn(...args));
3712
+ }
3713
+ return result;
3410
3714
  },
3411
- path: "purchase-single-sign-on"
3412
- }
3413
- ];
3715
+ runParallel(...args) {
3716
+ return Promise.all(
3717
+ _handlers.map((fn) => {
3718
+ return fn(...args);
3719
+ })
3720
+ );
3721
+ }
3722
+ };
3723
+ };
3414
3724
 
3415
3725
  const languageNativeNames = {
3416
3726
  ar: "العربية",
@@ -3463,20 +3773,6 @@ class StrapiApp {
3463
3773
  injectionZones: {}
3464
3774
  };
3465
3775
  translations = {};
3466
- /**
3467
- * MENU API
3468
- */
3469
- menu = [];
3470
- settings = {
3471
- global: {
3472
- id: "global",
3473
- intlLabel: {
3474
- id: "Settings.global",
3475
- defaultMessage: "Global Settings"
3476
- },
3477
- links: []
3478
- }
3479
- };
3480
3776
  configurations = {
3481
3777
  authLogo: StrapiLogo,
3482
3778
  head: { favicon: "" },
@@ -3490,13 +3786,15 @@ class StrapiApp {
3490
3786
  /**
3491
3787
  * APIs
3492
3788
  */
3493
- rbac = new rbac.RBAC();
3789
+ rbac = new Theme.RBAC();
3790
+ router;
3494
3791
  library = {
3495
3792
  components: {},
3496
3793
  fields: {}
3497
3794
  };
3498
3795
  middlewares = [];
3499
3796
  reducers = {};
3797
+ store = null;
3500
3798
  customFields = new CustomFields();
3501
3799
  constructor({ config, appPlugins } = {}) {
3502
3800
  this.appPlugins = appPlugins || {};
@@ -3505,6 +3803,7 @@ class StrapiApp {
3505
3803
  this.createHook(MUTATE_COLLECTION_TYPES_LINKS);
3506
3804
  this.createHook(MUTATE_SINGLE_TYPES_LINKS);
3507
3805
  this.createHook(MUTATE_EDIT_VIEW_LAYOUT);
3806
+ this.router = new Router(getInitialRoutes());
3508
3807
  }
3509
3808
  addComponents = (components) => {
3510
3809
  if (Array.isArray(components)) {
@@ -3532,46 +3831,6 @@ class StrapiApp {
3532
3831
  this.library.fields[fields.type] = fields.Component;
3533
3832
  }
3534
3833
  };
3535
- addMenuLink = (link) => {
3536
- invariant__default.default(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3537
- invariant__default.default(
3538
- typeof link.to === "string",
3539
- `[${link.intlLabel.defaultMessage}]: Expected link.to to be a string instead received ${typeof link.to}`
3540
- );
3541
- invariant__default.default(
3542
- link.intlLabel?.id && link.intlLabel?.defaultMessage,
3543
- `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage should be defined`
3544
- );
3545
- invariant__default.default(
3546
- link.Component && typeof link.Component === "function",
3547
- `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise that returns a default component. Please use: \`Component: () => import(path)\` instead.`
3548
- );
3549
- if (link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3550
- link.Component[Symbol.toStringTag] === "AsyncFunction") {
3551
- console.warn(
3552
- `
3553
- [${link.intlLabel.defaultMessage}]: [deprecated] addMenuLink() was called with an async Component from the plugin "${link.intlLabel.defaultMessage}". This will be removed in the future. Please use: \`Component: () => import(path)\` ensuring you return a default export instead.
3554
- `.trim()
3555
- );
3556
- }
3557
- if (link.to.startsWith("/")) {
3558
- console.warn(
3559
- `[${link.intlLabel.defaultMessage}]: the \`to\` property of your menu link is an absolute path, it should be relative to the root of the application. This has been corrected for you but will be removed in a future version of Strapi.`
3560
- );
3561
- link.to = link.to.slice(1);
3562
- }
3563
- this.menu.push({
3564
- ...link,
3565
- Component: React__namespace.lazy(async () => {
3566
- const mod = await link.Component();
3567
- if ("default" in mod) {
3568
- return mod;
3569
- } else {
3570
- return { default: mod };
3571
- }
3572
- })
3573
- });
3574
- };
3575
3834
  addMiddlewares = (middlewares) => {
3576
3835
  middlewares.forEach((middleware) => {
3577
3836
  this.middlewares.push(middleware);
@@ -3589,56 +3848,22 @@ class StrapiApp {
3589
3848
  this.reducers[name] = reducer;
3590
3849
  });
3591
3850
  };
3592
- addSettingsLink = (sectionId, link) => {
3593
- invariant__default.default(this.settings[sectionId], "The section does not exist");
3594
- invariant__default.default(link.id, `[${link.intlLabel.defaultMessage}]: link.id should be defined`);
3595
- invariant__default.default(
3596
- link.intlLabel?.id && link.intlLabel?.defaultMessage,
3597
- `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage`
3598
- );
3599
- invariant__default.default(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3600
- invariant__default.default(
3601
- link.Component && typeof link.Component === "function",
3602
- `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise. Please use: \`Component: () => import(path)\` instead.`
3603
- );
3604
- if (link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3605
- link.Component[Symbol.toStringTag] === "AsyncFunction") {
3606
- console.warn(
3607
- `
3608
- [${link.intlLabel.defaultMessage}]: [deprecated] addSettingsLink() was called with an async Component from the plugin "${link.intlLabel.defaultMessage}". This will be removed in the future. Please use: \`Component: () => import(path)\` ensuring you return a default export instead.
3609
- `.trim()
3610
- );
3611
- }
3612
- if (link.to.startsWith("/")) {
3613
- console.warn(
3614
- `[${link.intlLabel.defaultMessage}]: the \`to\` property of your settings link is an absolute path. It should be relative to \`/settings\`. This has been corrected for you but will be removed in a future version of Strapi.`
3615
- );
3616
- link.to = link.to.slice(1);
3617
- }
3618
- if (link.to.split("/")[0] === "settings") {
3619
- console.warn(
3620
- `[${link.intlLabel.defaultMessage}]: the \`to\` property of your settings link has \`settings\` as the first part of it's path. It should be relative to \`settings\` and therefore, not include it. This has been corrected for you but will be removed in a future version of Strapi.`
3621
- );
3622
- link.to = link.to.split("/").slice(1).join("/");
3623
- }
3624
- this.settings[sectionId].links.push({
3625
- ...link,
3626
- Component: React__namespace.lazy(async () => {
3627
- const mod = await link.Component();
3628
- if ("default" in mod) {
3629
- return mod;
3630
- } else {
3631
- return { default: mod };
3632
- }
3633
- })
3634
- });
3635
- };
3851
+ addMenuLink = (link) => this.router.addMenuLink(link);
3852
+ /**
3853
+ * @deprecated use `addSettingsLink` instead, it internally supports
3854
+ * adding multiple links at once.
3855
+ */
3636
3856
  addSettingsLinks = (sectionId, links) => {
3637
- invariant__default.default(this.settings[sectionId], "The section does not exist");
3638
3857
  invariant__default.default(Array.isArray(links), "TypeError expected links to be an array");
3639
- links.forEach((link) => {
3640
- this.addSettingsLink(sectionId, link);
3641
- });
3858
+ this.router.addSettingsLink(sectionId, links);
3859
+ };
3860
+ /**
3861
+ * @deprecated use `addSettingsLink` instead, you can pass a section object to
3862
+ * create the section and links at the same time.
3863
+ */
3864
+ createSettingSection = (section, links) => this.router.addSettingsLink(section, links);
3865
+ addSettingsLink = (sectionId, link) => {
3866
+ this.router.addSettingsLink(sectionId, link);
3642
3867
  };
3643
3868
  async bootstrap(customBootstrap) {
3644
3869
  Object.keys(this.appPlugins).forEach((plugin) => {
@@ -3705,19 +3930,6 @@ class StrapiApp {
3705
3930
  createHook = (name) => {
3706
3931
  this.hooksDict[name] = createHook();
3707
3932
  };
3708
- createSettingSection = (section, links) => {
3709
- invariant__default.default(section.id, "section.id should be defined");
3710
- invariant__default.default(
3711
- section.intlLabel?.id && section.intlLabel?.defaultMessage,
3712
- "section.intlLabel should be defined"
3713
- );
3714
- invariant__default.default(Array.isArray(links), "TypeError expected links to be an array");
3715
- invariant__default.default(this.settings[section.id] === void 0, "A similar section already exists");
3716
- this.settings[section.id] = { ...section, links: [] };
3717
- links.forEach((link) => {
3718
- this.addSettingsLink(section.id, link);
3719
- });
3720
- };
3721
3933
  getAdminInjectedComponents = (moduleName, containerName, blockName) => {
3722
3934
  try {
3723
3935
  return this.admin.injectionZones[moduleName][containerName][blockName] || [];
@@ -3727,16 +3939,19 @@ class StrapiApp {
3727
3939
  }
3728
3940
  };
3729
3941
  getPlugin = (pluginId) => this.plugins[pluginId];
3730
- async register() {
3942
+ async register(customRegister) {
3731
3943
  Object.keys(this.appPlugins).forEach((plugin) => {
3732
3944
  this.appPlugins[plugin].register(this);
3733
3945
  });
3946
+ if (isFunction__default.default(customRegister)) {
3947
+ customRegister(this);
3948
+ }
3734
3949
  }
3735
3950
  async loadAdminTrads() {
3736
3951
  const adminLocales = await Promise.all(
3737
3952
  this.configurations.locales.map(async (locale) => {
3738
3953
  try {
3739
- const { default: data } = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"./translations/ar.json": () => Promise.resolve().then(() => require('./ar-74XpZHjA.js')),"./translations/ca.json": () => Promise.resolve().then(() => require('./ca-tfhzbe_0.js')),"./translations/cs.json": () => Promise.resolve().then(() => require('./cs-sS-228vY.js')),"./translations/de.json": () => Promise.resolve().then(() => require('./de-og0YSnla.js')),"./translations/dk.json": () => Promise.resolve().then(() => require('./dk-GtDhDxRc.js')),"./translations/en.json": () => Promise.resolve().then(() => require('./en-G-ukrF2h.js')),"./translations/es.json": () => Promise.resolve().then(() => require('./es-TQtY4G8X.js')),"./translations/eu.json": () => Promise.resolve().then(() => require('./eu-SRdPRyQu.js')),"./translations/fr.json": () => Promise.resolve().then(() => require('./fr-GW5-kEO9.js')),"./translations/gu.json": () => Promise.resolve().then(() => require('./gu-z6qqOLRh.js')),"./translations/he.json": () => Promise.resolve().then(() => require('./he-CLdZZ_n1.js')),"./translations/hi.json": () => Promise.resolve().then(() => require('./hi-3pMoYe6q.js')),"./translations/hu.json": () => Promise.resolve().then(() => require('./hu-VxIqV1X0.js')),"./translations/id.json": () => Promise.resolve().then(() => require('./id-cUUpuxZO.js')),"./translations/it.json": () => Promise.resolve().then(() => require('./it-m8H0rXTP.js')),"./translations/ja.json": () => Promise.resolve().then(() => require('./ja-jhqUhh7F.js')),"./translations/ko.json": () => Promise.resolve().then(() => require('./ko-Fq49QS3z.js')),"./translations/ml.json": () => Promise.resolve().then(() => require('./ml-mLJM4sQP.js')),"./translations/ms.json": () => Promise.resolve().then(() => require('./ms-NDmpSkMY.js')),"./translations/nl.json": () => Promise.resolve().then(() => require('./nl-RREi1JAg.js')),"./translations/no.json": () => Promise.resolve().then(() => require('./no-2wT9Jd9n.js')),"./translations/pl.json": () => Promise.resolve().then(() => require('./pl-kU2npCRO.js')),"./translations/pt-BR.json": () => Promise.resolve().then(() => require('./pt-BR-R-dMJxPL.js')),"./translations/pt.json": () => Promise.resolve().then(() => require('./pt-IygqsPYv.js')),"./translations/ru.json": () => Promise.resolve().then(() => require('./ru-5TBoMH_2.js')),"./translations/sa.json": () => Promise.resolve().then(() => require('./sa-KmwTiEO5.js')),"./translations/sk.json": () => Promise.resolve().then(() => require('./sk-IV2uPmXo.js')),"./translations/sv.json": () => Promise.resolve().then(() => require('./sv-Uv9nW9cN.js')),"./translations/th.json": () => Promise.resolve().then(() => require('./th-SXQwWjv6.js')),"./translations/tr.json": () => Promise.resolve().then(() => require('./tr-RBQM-Vq5.js')),"./translations/uk.json": () => Promise.resolve().then(() => require('./uk-5T4XFIKm.js')),"./translations/vi.json": () => Promise.resolve().then(() => require('./vi-mj-Smy3d.js')),"./translations/zh-Hans.json": () => Promise.resolve().then(() => require('./zh-Hans-eWSoi9-X.js')),"./translations/zh.json": () => Promise.resolve().then(() => require('./zh-6qF5HCOo.js'))})), `./translations/${locale}.json`);
3954
+ const { default: data } = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"./translations/ar.json": () => Promise.resolve().then(() => require('./ar-74XpZHjA.js')),"./translations/ca.json": () => Promise.resolve().then(() => require('./ca-tfhzbe_0.js')),"./translations/cs.json": () => Promise.resolve().then(() => require('./cs-sS-228vY.js')),"./translations/de.json": () => Promise.resolve().then(() => require('./de-og0YSnla.js')),"./translations/dk.json": () => Promise.resolve().then(() => require('./dk-GtDhDxRc.js')),"./translations/en.json": () => Promise.resolve().then(() => require('./en-TbnMBjZf.js')),"./translations/es.json": () => Promise.resolve().then(() => require('./es-TQtY4G8X.js')),"./translations/eu.json": () => Promise.resolve().then(() => require('./eu-SRdPRyQu.js')),"./translations/fr.json": () => Promise.resolve().then(() => require('./fr-GW5-kEO9.js')),"./translations/gu.json": () => Promise.resolve().then(() => require('./gu-z6qqOLRh.js')),"./translations/he.json": () => Promise.resolve().then(() => require('./he-CLdZZ_n1.js')),"./translations/hi.json": () => Promise.resolve().then(() => require('./hi-3pMoYe6q.js')),"./translations/hu.json": () => Promise.resolve().then(() => require('./hu-VxIqV1X0.js')),"./translations/id.json": () => Promise.resolve().then(() => require('./id-cUUpuxZO.js')),"./translations/it.json": () => Promise.resolve().then(() => require('./it-m8H0rXTP.js')),"./translations/ja.json": () => Promise.resolve().then(() => require('./ja-jhqUhh7F.js')),"./translations/ko.json": () => Promise.resolve().then(() => require('./ko-Fq49QS3z.js')),"./translations/ml.json": () => Promise.resolve().then(() => require('./ml-mLJM4sQP.js')),"./translations/ms.json": () => Promise.resolve().then(() => require('./ms-NDmpSkMY.js')),"./translations/nl.json": () => Promise.resolve().then(() => require('./nl-RREi1JAg.js')),"./translations/no.json": () => Promise.resolve().then(() => require('./no-2wT9Jd9n.js')),"./translations/pl.json": () => Promise.resolve().then(() => require('./pl-kU2npCRO.js')),"./translations/pt-BR.json": () => Promise.resolve().then(() => require('./pt-BR-R-dMJxPL.js')),"./translations/pt.json": () => Promise.resolve().then(() => require('./pt-IygqsPYv.js')),"./translations/ru.json": () => Promise.resolve().then(() => require('./ru-5TBoMH_2.js')),"./translations/sa.json": () => Promise.resolve().then(() => require('./sa-KmwTiEO5.js')),"./translations/sk.json": () => Promise.resolve().then(() => require('./sk-IV2uPmXo.js')),"./translations/sv.json": () => Promise.resolve().then(() => require('./sv-Uv9nW9cN.js')),"./translations/th.json": () => Promise.resolve().then(() => require('./th-SXQwWjv6.js')),"./translations/tr.json": () => Promise.resolve().then(() => require('./tr-RBQM-Vq5.js')),"./translations/uk.json": () => Promise.resolve().then(() => require('./uk-5T4XFIKm.js')),"./translations/vi.json": () => Promise.resolve().then(() => require('./vi-mj-Smy3d.js')),"./translations/zh-Hans.json": () => Promise.resolve().then(() => require('./zh-Hans-eWSoi9-X.js')),"./translations/zh.json": () => Promise.resolve().then(() => require('./zh-6qF5HCOo.js'))})), `./translations/${locale}.json`);
3740
3955
  return { data, locale };
3741
3956
  } catch {
3742
3957
  return { data: null, locale };
@@ -3809,138 +4024,28 @@ class StrapiApp {
3809
4024
  runHookParallel = (name) => this.hooksDict[name].runParallel();
3810
4025
  render() {
3811
4026
  const localeNames = pick__default.default(languageNativeNames, this.configurations.locales || []);
3812
- const locale = localStorage.getItem(rbac.LANGUAGE_LOCAL_STORAGE_KEY) || "en";
3813
- const store = configureStoreImpl(
4027
+ const locale = localStorage.getItem(Theme.LANGUAGE_LOCAL_STORAGE_KEY) || "en";
4028
+ this.store = configureStoreImpl(
3814
4029
  {
3815
4030
  admin_app: {
3816
4031
  permissions: merge__default.default({}, ADMIN_PERMISSIONS_CE, ADMIN_PERMISSIONS_EE),
3817
4032
  theme: {
3818
4033
  availableThemes: [],
3819
- currentTheme: localStorage.getItem(rbac.THEME_LOCAL_STORAGE_KEY) || "system"
4034
+ currentTheme: localStorage.getItem(Theme.THEME_LOCAL_STORAGE_KEY) || "system"
3820
4035
  },
3821
4036
  language: {
3822
4037
  locale: localeNames[locale] ? locale : "en",
3823
4038
  localeNames
3824
- }
4039
+ },
4040
+ token: Theme.getStoredToken()
3825
4041
  }
3826
4042
  },
3827
4043
  this.middlewares,
3828
4044
  this.reducers
3829
4045
  );
3830
- const settingsRoutes = [...getEERoutes(), ...ROUTES_CE].filter(
3831
- (route, index, refArray) => refArray.findIndex((obj) => obj.path === route.path) === index
3832
- );
3833
- const router = reactRouterDom.createBrowserRouter(
3834
- [
3835
- {
3836
- path: "/*",
3837
- errorElement: /* @__PURE__ */ jsxRuntime.jsx(reactRedux.Provider, { store, children: /* @__PURE__ */ jsxRuntime.jsx(rbac.LanguageProvider, { messages: this.configurations.translations, children: /* @__PURE__ */ jsxRuntime.jsx(rbac.Theme, { themes: this.configurations.themes, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {}) }) }) }),
3838
- element: /* @__PURE__ */ jsxRuntime.jsx(App, { strapi: this, store }),
3839
- children: [
3840
- {
3841
- path: "usecase",
3842
- lazy: async () => {
3843
- const { PrivateUseCasePage } = await Promise.resolve().then(() => require('./UseCasePage-ijq-Bur_.js'));
3844
- return {
3845
- Component: PrivateUseCasePage
3846
- };
3847
- }
3848
- },
3849
- // this needs to go before auth/:authType because otherwise it won't match the route
3850
- ...getEERoutes$1(),
3851
- {
3852
- path: "auth/:authType",
3853
- element: /* @__PURE__ */ jsxRuntime.jsx(AuthPage, {})
3854
- },
3855
- {
3856
- path: "/*",
3857
- lazy: async () => {
3858
- const { PrivateAdminLayout } = await Promise.resolve().then(() => require('./AuthenticatedLayout-MDNNJRPg.js'));
3859
- return {
3860
- Component: PrivateAdminLayout
3861
- };
3862
- },
3863
- children: [
3864
- {
3865
- index: true,
3866
- lazy: async () => {
3867
- const { HomePage } = await Promise.resolve().then(() => require('./HomePage-4Hk9puW_.js'));
3868
- return {
3869
- Component: HomePage
3870
- };
3871
- }
3872
- },
3873
- {
3874
- path: "me",
3875
- lazy: async () => {
3876
- const { ProfilePage } = await Promise.resolve().then(() => require('./ProfilePage-ZlpnTKEF.js'));
3877
- return {
3878
- Component: ProfilePage
3879
- };
3880
- }
3881
- },
3882
- {
3883
- path: "list-plugins",
3884
- lazy: async () => {
3885
- const { ProtectedInstalledPluginsPage } = await Promise.resolve().then(() => require('./InstalledPluginsPage-9ooKCsS7.js'));
3886
- return {
3887
- Component: ProtectedInstalledPluginsPage
3888
- };
3889
- }
3890
- },
3891
- {
3892
- path: "marketplace",
3893
- lazy: async () => {
3894
- const { ProtectedMarketplacePage } = await Promise.resolve().then(() => require('./MarketplacePage-MVRrpUSk.js'));
3895
- return {
3896
- Component: ProtectedMarketplacePage
3897
- };
3898
- }
3899
- },
3900
- {
3901
- path: "settings/*",
3902
- lazy: async () => {
3903
- const { Layout } = await Promise.resolve().then(() => require('./Layout-Bmmqv9h6.js'));
3904
- return {
3905
- Component: Layout
3906
- };
3907
- },
3908
- children: [
3909
- {
3910
- path: "application-infos",
3911
- lazy: async () => {
3912
- const { ApplicationInfoPage } = await Promise.resolve().then(() => require('./ApplicationInfoPage-S18loXTF.js'));
3913
- return {
3914
- Component: ApplicationInfoPage
3915
- };
3916
- }
3917
- },
3918
- ...Object.values(this.settings).flatMap(
3919
- ({ links }) => links.map(({ to, Component }) => ({
3920
- path: `${to}/*`,
3921
- element: /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(rbac.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(Component, {}) })
3922
- }))
3923
- ),
3924
- ...settingsRoutes
3925
- ]
3926
- },
3927
- ...this.menu.map(({ to, Component }) => ({
3928
- path: `${to}/*`,
3929
- element: /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(rbac.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(Component, {}) })
3930
- })),
3931
- {
3932
- path: "*",
3933
- element: /* @__PURE__ */ jsxRuntime.jsx(NotFoundPage, {})
3934
- }
3935
- ]
3936
- }
3937
- ]
3938
- }
3939
- ],
3940
- {
3941
- basename: getBasename()
3942
- }
3943
- );
4046
+ const router = this.router.createRouter(this, {
4047
+ basename: getBasename()
4048
+ });
3944
4049
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.RouterProvider, { router });
3945
4050
  }
3946
4051
  }
@@ -4002,7 +4107,7 @@ const renderAdmin = async (mountNode, { plugins, customisations, features }) =>
4002
4107
  config: customisations?.config,
4003
4108
  appPlugins: plugins
4004
4109
  });
4005
- await app.register();
4110
+ await app.register(customisations?.register);
4006
4111
  await app.bootstrap(customisations?.bootstrap);
4007
4112
  await app.loadTrads(customisations?.config?.translations);
4008
4113
  client.createRoot(mountNode).render(app.render());
@@ -4013,13 +4118,12 @@ const renderAdmin = async (mountNode, { plugins, customisations, features }) =>
4013
4118
 
4014
4119
  const ConfirmDialog = ({
4015
4120
  children,
4016
- icon = /* @__PURE__ */ jsxRuntime.jsx(icons.WarningCircle, {}),
4017
- onClose,
4121
+ icon = /* @__PURE__ */ jsxRuntime.jsx(StyledWarning, {}),
4018
4122
  onConfirm,
4019
- variant = "danger",
4123
+ variant = "danger-light",
4020
4124
  startAction,
4021
4125
  endAction,
4022
- ...props
4126
+ title
4023
4127
  }) => {
4024
4128
  const { formatMessage } = reactIntl.useIntl();
4025
4129
  const [isConfirming, setIsConfirming] = React__namespace.useState(false);
@@ -4027,49 +4131,53 @@ const ConfirmDialog = ({
4027
4131
  id: "app.confirm.body",
4028
4132
  defaultMessage: "Are you sure?"
4029
4133
  });
4030
- const handleConfirm = async () => {
4134
+ const handleConfirm = async (e) => {
4031
4135
  if (!onConfirm) {
4032
4136
  return;
4033
4137
  }
4034
4138
  try {
4035
4139
  setIsConfirming(true);
4036
- await onConfirm();
4037
- onClose();
4140
+ await onConfirm(e);
4038
4141
  } finally {
4039
4142
  setIsConfirming(false);
4040
4143
  }
4041
4144
  };
4042
- return /* @__PURE__ */ jsxRuntime.jsxs(
4043
- designSystem.Dialog,
4044
- {
4045
- title: formatMessage({
4046
- id: "app.components.ConfirmDialog.title",
4047
- defaultMessage: "Confirmation"
4048
- }),
4049
- onClose,
4050
- ...props,
4051
- children: [
4052
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { icon, children: typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(DefaultBodyWrapper, { children: content }) : content }),
4053
- /* @__PURE__ */ jsxRuntime.jsx(
4054
- designSystem.DialogFooter,
4055
- {
4056
- startAction: startAction || /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onClose, variant: "tertiary", children: formatMessage({
4057
- id: "app.components.Button.cancel",
4058
- defaultMessage: "Cancel"
4059
- }) }),
4060
- endAction: endAction || /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, loading: isConfirming, children: formatMessage({
4061
- id: "app.components.Button.confirm",
4062
- defaultMessage: "Confirm"
4063
- }) })
4064
- }
4065
- )
4066
- ]
4067
- }
4068
- );
4069
- };
4070
- const DefaultBodyWrapper = ({ children }) => {
4071
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", children }) }) });
4145
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
4146
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title || formatMessage({
4147
+ id: "app.components.ConfirmDialog.title",
4148
+ defaultMessage: "Confirmation"
4149
+ }) }),
4150
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { icon, children: content }),
4151
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
4152
+ startAction || /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(
4153
+ designSystem.Button,
4154
+ {
4155
+ fullWidth: true,
4156
+ variant: "tertiary",
4157
+ onClick: (e) => {
4158
+ e.stopPropagation();
4159
+ },
4160
+ children: formatMessage({
4161
+ id: "app.components.Button.cancel",
4162
+ defaultMessage: "Cancel"
4163
+ })
4164
+ }
4165
+ ) }),
4166
+ endAction || /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Action, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { fullWidth: true, onClick: handleConfirm, variant, loading: isConfirming, children: formatMessage({
4167
+ id: "app.components.Button.confirm",
4168
+ defaultMessage: "Confirm"
4169
+ }) }) })
4170
+ ] })
4171
+ ] });
4072
4172
  };
4173
+ const StyledWarning = styledComponents.styled(icons.WarningCircle)`
4174
+ width: 24px;
4175
+ height: 24px;
4176
+
4177
+ path {
4178
+ fill: ${({ theme }) => theme.colors.danger600};
4179
+ }
4180
+ `;
4073
4181
 
4074
4182
  const useIsMounted = () => {
4075
4183
  const isMounted = React__namespace.useRef(false);
@@ -4334,6 +4442,7 @@ const STRING_PARSE_FILTERS = [
4334
4442
  value: "$endsWithi"
4335
4443
  }
4336
4444
  ];
4445
+ const FILTERS_WITH_NO_VALUE = ["$null", "$notNull"];
4337
4446
 
4338
4447
  function useControllableState({
4339
4448
  prop,
@@ -4406,95 +4515,83 @@ const useQueryParams = (initialParams) => {
4406
4515
  return [{ query, rawQuery: search }, setQuery];
4407
4516
  };
4408
4517
 
4409
- const [FiltersProvider, useFilters] = rbac.createContext("Filters");
4518
+ const [FiltersProvider, useFilters] = Theme.createContext("Filters");
4410
4519
  const Root$2 = ({
4411
4520
  children,
4412
4521
  disabled = false,
4413
4522
  onChange,
4523
+ options = [],
4414
4524
  onOpenChange,
4415
4525
  open: openProp,
4416
4526
  defaultOpen,
4417
- options = []
4527
+ ...restProps
4418
4528
  }) => {
4419
- const [triggerNode, setTriggerNode] = React__namespace.useState(null);
4420
- const [open = false, setOpen] = useControllableState({
4421
- prop: openProp,
4422
- defaultProp: defaultOpen,
4423
- onChange: onOpenChange
4424
- });
4425
4529
  const handleChange = (data) => {
4426
4530
  if (onChange) {
4427
4531
  onChange(data);
4428
4532
  }
4429
4533
  };
4430
- return /* @__PURE__ */ jsxRuntime.jsx(
4534
+ const [open = false, setOpen] = useControllableState({
4535
+ prop: openProp,
4536
+ defaultProp: defaultOpen,
4537
+ onChange: onOpenChange
4538
+ });
4539
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Root, { open, onOpenChange: setOpen, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(
4431
4540
  FiltersProvider,
4432
4541
  {
4542
+ setOpen,
4433
4543
  disabled,
4434
4544
  onChange: handleChange,
4435
- open,
4436
4545
  options,
4437
- setOpen,
4438
- setTriggerNode,
4439
- triggerNode,
4440
4546
  children
4441
4547
  }
4442
- );
4548
+ ) });
4443
4549
  };
4444
4550
  const Trigger = React__namespace.forwardRef(
4445
4551
  ({ label }, forwardedRef) => {
4446
4552
  const { formatMessage } = reactIntl.useIntl();
4447
- const { setTriggerNode, setOpen } = useFilters("Trigger", ({ setTriggerNode: setTriggerNode2, setOpen: setOpen2 }) => ({
4448
- setTriggerNode: setTriggerNode2,
4449
- setOpen: setOpen2
4450
- }));
4451
4553
  const disabled = useFilters("Trigger", ({ disabled: disabled2 }) => disabled2);
4452
- const open = useFilters("Trigger", ({ open: open2 }) => open2);
4453
- const composedRefs = designSystem.useComposedRefs(forwardedRef, setTriggerNode);
4454
- const handleClick = () => setOpen(!open);
4455
- return /* @__PURE__ */ jsxRuntime.jsx(
4554
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
4456
4555
  designSystem.Button,
4457
4556
  {
4458
4557
  variant: "tertiary",
4459
- ref: composedRefs,
4558
+ ref: forwardedRef,
4460
4559
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Filter, {}),
4461
- onClick: handleClick,
4462
4560
  size: "S",
4463
4561
  disabled,
4464
4562
  children: label || formatMessage({ id: "app.utils.filters", defaultMessage: "Filters" })
4465
4563
  }
4466
- );
4564
+ ) });
4467
4565
  }
4468
4566
  );
4469
4567
  const PopoverImpl = () => {
4470
4568
  const [{ query }, setQuery] = useQueryParams();
4471
4569
  const { formatMessage } = reactIntl.useIntl();
4472
- const open = useFilters("Popover", ({ open: open2 }) => open2);
4473
4570
  const options = useFilters("Popover", ({ options: options2 }) => options2);
4474
- const triggerNode = useFilters("Popover", ({ triggerNode: triggerNode2 }) => triggerNode2);
4475
- const setOpen = useFilters("Popover", ({ setOpen: setOpen2 }) => setOpen2);
4476
4571
  const onChange = useFilters("Popover", ({ onChange: onChange2 }) => onChange2);
4477
- if (!open || options.length === 0 || !triggerNode) {
4572
+ const setOpen = useFilters("Popover", ({ setOpen: setOpen2 }) => setOpen2);
4573
+ if (options.length === 0) {
4478
4574
  return null;
4479
4575
  }
4480
4576
  const handleSubmit = (data) => {
4481
- if (!data.value) {
4577
+ const value = FILTERS_WITH_NO_VALUE.includes(data.filter) ? "true" : data.value;
4578
+ if (!value) {
4482
4579
  return;
4483
4580
  }
4484
4581
  if (onChange) {
4485
4582
  onChange(data);
4486
4583
  }
4487
- const filterType = options.find((filter) => filter.name === data.name).type;
4584
+ const fieldOptions = options.find((filter) => filter.name === data.name);
4488
4585
  const operatorValuePairing = {
4489
- [data.filter]: data.value
4586
+ [data.filter]: value
4490
4587
  };
4491
4588
  const newFilterQuery = {
4492
4589
  ...query.filters,
4493
4590
  $and: [
4494
4591
  ...query.filters?.$and ?? [],
4495
4592
  {
4496
- [data.name]: filterType === "relation" ? {
4497
- id: operatorValuePairing
4593
+ [data.name]: fieldOptions.type === "relation" ? {
4594
+ [fieldOptions.mainField?.name ?? "id"]: operatorValuePairing
4498
4595
  } : operatorValuePairing
4499
4596
  }
4500
4597
  ]
@@ -4502,89 +4599,79 @@ const PopoverImpl = () => {
4502
4599
  setQuery({ filters: newFilterQuery, page: 1 });
4503
4600
  setOpen(false);
4504
4601
  };
4505
- return /* @__PURE__ */ jsxRuntime.jsx(
4506
- designSystem.PopoverPrimitives.Content,
4602
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, children: /* @__PURE__ */ jsxRuntime.jsx(
4603
+ Form,
4507
4604
  {
4508
- source: { current: triggerNode },
4509
- onDismiss: () => setOpen(false),
4510
- padding: 3,
4511
- spacing: 4,
4512
- maxHeight: "unset",
4513
- children: /* @__PURE__ */ jsxRuntime.jsx(
4514
- Form,
4515
- {
4516
- method: "POST",
4517
- initialValues: {
4518
- name: options[0]?.name,
4519
- filter: BASE_FILTERS[0].value
4520
- },
4521
- onSubmit: handleSubmit,
4522
- children: ({ values: formValues, modified, isSubmitting }) => {
4523
- const filter = options.find((filter2) => filter2.name === formValues.name);
4524
- const Input = filter?.input || MemoizedInputRenderer;
4525
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, style: { minWidth: 184 }, children: [
4526
- [
4527
- {
4528
- ["aria-label"]: formatMessage({
4529
- id: "app.utils.select-field",
4530
- defaultMessage: "Select field"
4531
- }),
4532
- name: "name",
4533
- options: options.map((filter2) => ({
4534
- label: filter2.label,
4535
- value: filter2.name
4536
- })),
4537
- placholder: formatMessage({
4538
- id: "app.utils.select-field",
4539
- defaultMessage: "Select field"
4540
- }),
4541
- type: "enumeration"
4542
- },
4543
- {
4544
- ["aria-label"]: formatMessage({
4545
- id: "app.utils.select-filter",
4546
- defaultMessage: "Select filter"
4547
- }),
4548
- name: "filter",
4549
- options: filter?.operators || getFilterList(filter).map((opt) => ({
4550
- label: formatMessage(opt.label),
4551
- value: opt.value
4552
- })),
4553
- placeholder: formatMessage({
4554
- id: "app.utils.select-filter",
4555
- defaultMessage: "Select filter"
4556
- }),
4557
- type: "enumeration"
4558
- }
4559
- ].map((field) => /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field }, field.name)),
4560
- filter && formValues.filter && formValues.filter !== "$null" && formValues.filter !== "$notNull" ? /* @__PURE__ */ jsxRuntime.jsx(
4561
- Input,
4562
- {
4563
- ...filter,
4564
- label: null,
4565
- "aria-label": filter.label,
4566
- name: "value",
4567
- type: filter.mainField?.type ?? filter.type
4568
- }
4569
- ) : null,
4570
- /* @__PURE__ */ jsxRuntime.jsx(
4571
- designSystem.Button,
4572
- {
4573
- disabled: !modified || isSubmitting,
4574
- size: "L",
4575
- variant: "secondary",
4576
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
4577
- type: "submit",
4578
- fullWidth: true,
4579
- children: formatMessage({ id: "app.utils.add-filter", defaultMessage: "Add filter" })
4580
- }
4581
- )
4582
- ] });
4583
- }
4584
- }
4585
- )
4605
+ method: "POST",
4606
+ initialValues: {
4607
+ name: options[0]?.name,
4608
+ filter: BASE_FILTERS[0].value
4609
+ },
4610
+ onSubmit: handleSubmit,
4611
+ children: ({ values: formValues, modified, isSubmitting }) => {
4612
+ const filter = options.find((filter2) => filter2.name === formValues.name);
4613
+ const Input = filter?.input || MemoizedInputRenderer;
4614
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, style: { minWidth: 184 }, children: [
4615
+ [
4616
+ {
4617
+ ["aria-label"]: formatMessage({
4618
+ id: "app.utils.select-field",
4619
+ defaultMessage: "Select field"
4620
+ }),
4621
+ name: "name",
4622
+ options: options.map((filter2) => ({
4623
+ label: filter2.label,
4624
+ value: filter2.name
4625
+ })),
4626
+ placholder: formatMessage({
4627
+ id: "app.utils.select-field",
4628
+ defaultMessage: "Select field"
4629
+ }),
4630
+ type: "enumeration"
4631
+ },
4632
+ {
4633
+ ["aria-label"]: formatMessage({
4634
+ id: "app.utils.select-filter",
4635
+ defaultMessage: "Select filter"
4636
+ }),
4637
+ name: "filter",
4638
+ options: filter?.operators || getFilterList(filter).map((opt) => ({
4639
+ label: formatMessage(opt.label),
4640
+ value: opt.value
4641
+ })),
4642
+ placeholder: formatMessage({
4643
+ id: "app.utils.select-filter",
4644
+ defaultMessage: "Select filter"
4645
+ }),
4646
+ type: "enumeration"
4647
+ }
4648
+ ].map((field) => /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field }, field.name)),
4649
+ filter && formValues.filter && formValues.filter !== "$null" && formValues.filter !== "$notNull" ? /* @__PURE__ */ jsxRuntime.jsx(
4650
+ Input,
4651
+ {
4652
+ ...filter,
4653
+ label: null,
4654
+ "aria-label": filter.label,
4655
+ name: "value",
4656
+ type: filter.mainField?.type ?? filter.type
4657
+ }
4658
+ ) : null,
4659
+ /* @__PURE__ */ jsxRuntime.jsx(
4660
+ designSystem.Button,
4661
+ {
4662
+ disabled: !modified || isSubmitting,
4663
+ size: "L",
4664
+ variant: "secondary",
4665
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
4666
+ type: "submit",
4667
+ fullWidth: true,
4668
+ children: formatMessage({ id: "app.utils.add-filter", defaultMessage: "Add filter" })
4669
+ }
4670
+ )
4671
+ ] });
4672
+ }
4586
4673
  }
4587
- );
4674
+ ) }) });
4588
4675
  };
4589
4676
  const getFilterList = (filter) => {
4590
4677
  if (!filter) {
@@ -4594,7 +4681,6 @@ const getFilterList = (filter) => {
4594
4681
  switch (type) {
4595
4682
  case "email":
4596
4683
  case "text":
4597
- case "enumeration":
4598
4684
  case "string": {
4599
4685
  return [
4600
4686
  ...BASE_FILTERS,
@@ -4616,6 +4702,9 @@ const getFilterList = (filter) => {
4616
4702
  case "datetime": {
4617
4703
  return [...BASE_FILTERS, ...NUMERIC_FILTERS];
4618
4704
  }
4705
+ case "enumeration": {
4706
+ return BASE_FILTERS;
4707
+ }
4619
4708
  default:
4620
4709
  return [...BASE_FILTERS, ...IS_SENSITIVE_FILTERS];
4621
4710
  }
@@ -4753,7 +4842,7 @@ const Filters = {
4753
4842
  Trigger
4754
4843
  };
4755
4844
 
4756
- const [PaginationProvider, usePagination] = rbac.createContext("Pagination");
4845
+ const [PaginationProvider, usePagination] = Theme.createContext("Pagination");
4757
4846
  const Root$1 = React__namespace.forwardRef(
4758
4847
  ({ children, defaultPageSize = 10, pageCount = 0, defaultPage = 1, onPageSizeChange, total = 0 }, forwardedRef) => {
4759
4848
  const [{ query }, setQuery] = useQueryParams(
@@ -4768,18 +4857,28 @@ const Root$1 = React__namespace.forwardRef(
4768
4857
  onPageSizeChange(pageSize);
4769
4858
  }
4770
4859
  };
4771
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { ref: forwardedRef, paddingTop: 4, alignItems: "flex-end", justifyContent: "space-between", children: /* @__PURE__ */ jsxRuntime.jsx(
4772
- PaginationProvider,
4860
+ return /* @__PURE__ */ jsxRuntime.jsx(
4861
+ designSystem.Flex,
4773
4862
  {
4774
- currentQuery: query,
4775
- page: query.page,
4776
- pageSize: query.pageSize,
4777
- pageCount: pageCount.toString(),
4778
- setPageSize,
4779
- total,
4780
- children
4863
+ ref: forwardedRef,
4864
+ paddingTop: 4,
4865
+ paddingBottom: 4,
4866
+ alignItems: "flex-end",
4867
+ justifyContent: "space-between",
4868
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4869
+ PaginationProvider,
4870
+ {
4871
+ currentQuery: query,
4872
+ page: query.page,
4873
+ pageSize: query.pageSize,
4874
+ pageCount: pageCount.toString(),
4875
+ setPageSize,
4876
+ total,
4877
+ children
4878
+ }
4879
+ )
4781
4880
  }
4782
- ) });
4881
+ );
4783
4882
  }
4784
4883
  );
4785
4884
  const PageSize = ({ options = ["10", "20", "50", "100"] }) => {
@@ -4910,7 +5009,7 @@ const SearchInput = ({
4910
5009
  const [value, setValue] = React__namespace.useState(query?._q || "");
4911
5010
  const [isOpen, setIsOpen] = React__namespace.useState(!!value);
4912
5011
  const { formatMessage } = reactIntl.useIntl();
4913
- const { trackUsage } = rbac.useTracking();
5012
+ const { trackUsage } = Theme.useTracking();
4914
5013
  const handleToggle = () => setIsOpen((prev) => !prev);
4915
5014
  React__namespace.useLayoutEffect(() => {
4916
5015
  if (isOpen && inputRef.current) {
@@ -4955,12 +5054,12 @@ const SearchInput = ({
4955
5054
  disabled,
4956
5055
  label: formatMessage({ id: "global.search", defaultMessage: "Search" }),
4957
5056
  onClick: handleToggle,
4958
- children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, { fill: "neutral800" })
5057
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {})
4959
5058
  }
4960
5059
  );
4961
5060
  };
4962
5061
 
4963
- const [TableProvider, useTable] = rbac.createContext("Table");
5062
+ const [TableProvider, useTable] = Theme.createContext("Table");
4964
5063
  const Root = ({
4965
5064
  children,
4966
5065
  defaultSelectedRows,
@@ -5094,16 +5193,15 @@ const HeaderCheckboxCell = () => {
5094
5193
  }
5095
5194
  };
5096
5195
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(
5097
- designSystem.BaseCheckbox,
5196
+ designSystem.Checkbox,
5098
5197
  {
5099
5198
  "aria-label": formatMessage({
5100
5199
  id: "global.select-all-entries",
5101
5200
  defaultMessage: "Select all entries"
5102
5201
  }),
5103
5202
  disabled: rows.length === 0,
5104
- checked: areAllEntriesSelected,
5105
- indeterminate: isIndeterminate,
5106
- onChange: handleSelectAll
5203
+ checked: isIndeterminate ? "indeterminate" : areAllEntriesSelected,
5204
+ onCheckedChange: handleSelectAll
5107
5205
  }
5108
5206
  ) });
5109
5207
  };
@@ -5147,7 +5245,9 @@ const Body = ({ children }) => {
5147
5245
  const Row = (props) => {
5148
5246
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tr, { ...props });
5149
5247
  };
5150
- const Cell = designSystem.Td;
5248
+ const Cell = (props) => {
5249
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { ...props });
5250
+ };
5151
5251
  const CheckboxCell = ({ id, ...props }) => {
5152
5252
  const rows = useTable("CheckboxCell", (state) => state.rows);
5153
5253
  const selectedRows = useTable("CheckboxCell", (state) => state.selectedRows);
@@ -5158,7 +5258,7 @@ const CheckboxCell = ({ id, ...props }) => {
5158
5258
  };
5159
5259
  const isChecked = selectedRows.findIndex((row) => row.id === id) > -1;
5160
5260
  return /* @__PURE__ */ jsxRuntime.jsx(Cell, { ...props, onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
5161
- designSystem.BaseCheckbox,
5261
+ designSystem.Checkbox,
5162
5262
  {
5163
5263
  "aria-label": formatMessage(
5164
5264
  {
@@ -5169,7 +5269,7 @@ const CheckboxCell = ({ id, ...props }) => {
5169
5269
  ),
5170
5270
  disabled: rows.length === 0,
5171
5271
  checked: isChecked,
5172
- onChange: handleSelectRow
5272
+ onCheckedChange: handleSelectRow
5173
5273
  }
5174
5274
  ) });
5175
5275
  };
@@ -5189,7 +5289,7 @@ const Table = {
5189
5289
  };
5190
5290
 
5191
5291
  function useInjectReducer(namespace, reducer) {
5192
- const store = rbac.useTypedStore();
5292
+ const store = Theme.useTypedStore();
5193
5293
  React.useEffect(() => {
5194
5294
  store.injectReducer(namespace, reducer);
5195
5295
  }, [store, namespace, reducer]);
@@ -5409,7 +5509,6 @@ exports.constants = constants;
5409
5509
  exports.errorsTrads = errorsTrads;
5410
5510
  exports.getBasename = getBasename;
5411
5511
  exports.getYupValidationErrors = getYupValidationErrors;
5412
- exports.isObject = isObject;
5413
5512
  exports.renderAdmin = renderAdmin;
5414
5513
  exports.useAdminUsers = useAdminUsers;
5415
5514
  exports.useClipboard = useClipboard;
@@ -5430,4 +5529,4 @@ exports.useTable = useTable;
5430
5529
  exports.useUpdateRoleMutation = useUpdateRoleMutation;
5431
5530
  exports.useUpdateRolePermissionsMutation = useUpdateRolePermissionsMutation;
5432
5531
  exports.useUpdateUserMutation = useUpdateUserMutation;
5433
- //# sourceMappingURL=index-duYn5r8_.js.map
5532
+ //# sourceMappingURL=index-TG8-3711.js.map