@strapi/admin 5.0.0-beta.10 → 5.0.0-beta.11

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 (205) hide show
  1. package/dist/admin/{AdminSeatInfo-Bbq8UNek.mjs → AdminSeatInfo-88MFOtJf.mjs} +3 -3
  2. package/dist/admin/{AdminSeatInfo-Bbq8UNek.mjs.map → AdminSeatInfo-88MFOtJf.mjs.map} +1 -1
  3. package/dist/admin/{AdminSeatInfo-pe7_J25t.js → AdminSeatInfo-bN561B3v.js} +4 -4
  4. package/dist/admin/{AdminSeatInfo-pe7_J25t.js.map → AdminSeatInfo-bN561B3v.js.map} +1 -1
  5. package/dist/admin/{ApplicationInfoPage-S_AoXyUe.js → ApplicationInfoPage-QuYJM0kA.js} +15 -15
  6. package/dist/admin/{ApplicationInfoPage-S_AoXyUe.js.map → ApplicationInfoPage-QuYJM0kA.js.map} +1 -1
  7. package/dist/admin/{ApplicationInfoPage-bfXW7lrq.mjs → ApplicationInfoPage-e-khXcZQ.mjs} +5 -5
  8. package/dist/admin/{ApplicationInfoPage-bfXW7lrq.mjs.map → ApplicationInfoPage-e-khXcZQ.mjs.map} +1 -1
  9. package/dist/admin/{AuthResponse-BJbG4S2h.js → AuthResponse-PxLid1A-.js} +4 -4
  10. package/dist/admin/{AuthResponse-BJbG4S2h.js.map → AuthResponse-PxLid1A-.js.map} +1 -1
  11. package/dist/admin/{AuthResponse-CTQ0fh3I.mjs → AuthResponse-pxi-Fo2T.mjs} +2 -2
  12. package/dist/admin/{AuthResponse-CTQ0fh3I.mjs.map → AuthResponse-pxi-Fo2T.mjs.map} +1 -1
  13. package/dist/admin/{AuthenticatedLayout-s7jnYVG9.js → AuthenticatedLayout-040fsD08.js} +30 -29
  14. package/dist/admin/{AuthenticatedLayout-s7jnYVG9.js.map → AuthenticatedLayout-040fsD08.js.map} +1 -1
  15. package/dist/admin/{AuthenticatedLayout-lXbF2KKJ.mjs → AuthenticatedLayout-Ou5qhSr4.mjs} +13 -12
  16. package/dist/admin/{AuthenticatedLayout-lXbF2KKJ.mjs.map → AuthenticatedLayout-Ou5qhSr4.mjs.map} +1 -1
  17. package/dist/admin/{CreatePage-4gOQVUMq.mjs → CreatePage-P0Nz_ayl.mjs} +3 -3
  18. package/dist/admin/{CreatePage-4gOQVUMq.mjs.map → CreatePage-P0Nz_ayl.mjs.map} +1 -1
  19. package/dist/admin/{CreatePage-6pIItf4z.mjs → CreatePage-SkKjFqP6.mjs} +4 -4
  20. package/dist/admin/{CreatePage-6pIItf4z.mjs.map → CreatePage-SkKjFqP6.mjs.map} +1 -1
  21. package/dist/admin/{CreatePage-s23BIVXe.js → CreatePage-mQUbZZJv.js} +5 -5
  22. package/dist/admin/{CreatePage-s23BIVXe.js.map → CreatePage-mQUbZZJv.js.map} +1 -1
  23. package/dist/admin/{CreatePage-uWZ7dxp6.js → CreatePage-taYHLGep.js} +11 -11
  24. package/dist/admin/{CreatePage-uWZ7dxp6.js.map → CreatePage-taYHLGep.js.map} +1 -1
  25. package/dist/admin/{CreateView-3cLNRlgO.mjs → CreateView-ClT1OHUe.mjs} +3 -3
  26. package/dist/admin/{CreateView-3cLNRlgO.mjs.map → CreateView-ClT1OHUe.mjs.map} +1 -1
  27. package/dist/admin/{CreateView-aMz4KfSZ.mjs → CreateView-PuVH0YQf.mjs} +3 -3
  28. package/dist/admin/{CreateView-aMz4KfSZ.mjs.map → CreateView-PuVH0YQf.mjs.map} +1 -1
  29. package/dist/admin/CreateView-iUA3lEYs.js +17 -0
  30. package/dist/admin/{CreateView-JQYIo77z.js.map → CreateView-iUA3lEYs.js.map} +1 -1
  31. package/dist/admin/CreateView-oRYdhduP.js +17 -0
  32. package/dist/admin/{CreateView-DNHRcJsj.js.map → CreateView-oRYdhduP.js.map} +1 -1
  33. package/dist/admin/{EditPage-tmpterlY.mjs → EditPage-SVzJI-dH.mjs} +5 -5
  34. package/dist/admin/{EditPage-tmpterlY.mjs.map → EditPage-SVzJI-dH.mjs.map} +1 -1
  35. package/dist/admin/{EditPage-24cGvUbV.js → EditPage-_caeCOYK.js} +12 -12
  36. package/dist/admin/{EditPage-24cGvUbV.js.map → EditPage-_caeCOYK.js.map} +1 -1
  37. package/dist/admin/{EditPage-JPZ7c-8x.mjs → EditPage-arCsYBox.mjs} +5 -5
  38. package/dist/admin/{EditPage-JPZ7c-8x.mjs.map → EditPage-arCsYBox.mjs.map} +1 -1
  39. package/dist/admin/{EditPage-tUvaZzFe.mjs → EditPage-bDO4OJc8.mjs} +7 -7
  40. package/dist/admin/{EditPage-tUvaZzFe.mjs.map → EditPage-bDO4OJc8.mjs.map} +1 -1
  41. package/dist/admin/{EditPage-Wpz4YmVY.js → EditPage-q_7kn0JT.js} +16 -16
  42. package/dist/admin/{EditPage-Wpz4YmVY.js.map → EditPage-q_7kn0JT.js.map} +1 -1
  43. package/dist/admin/{EditPage-wGJLuMsP.js → EditPage-rxs9-apI.js} +11 -11
  44. package/dist/admin/{EditPage-wGJLuMsP.js.map → EditPage-rxs9-apI.js.map} +1 -1
  45. package/dist/admin/{EditView-HjYkw6Y_.mjs → EditView-nfJOf2A4.mjs} +4 -4
  46. package/dist/admin/{EditView-HjYkw6Y_.mjs.map → EditView-nfJOf2A4.mjs.map} +1 -1
  47. package/dist/admin/{EditView-ul5nHrFh.js → EditView-tAF5eQf_.js} +14 -14
  48. package/dist/admin/{EditView-ul5nHrFh.js.map → EditView-tAF5eQf_.js.map} +1 -1
  49. package/dist/admin/{EditViewPage-bnTbQJ_O.mjs → EditViewPage-KAIuwIw2.mjs} +4 -4
  50. package/dist/admin/{EditViewPage-bnTbQJ_O.mjs.map → EditViewPage-KAIuwIw2.mjs.map} +1 -1
  51. package/dist/admin/{EditViewPage-c3DI4uzU.js → EditViewPage-O3dTB0ur.js} +14 -14
  52. package/dist/admin/{EditViewPage-c3DI4uzU.js.map → EditViewPage-O3dTB0ur.js.map} +1 -1
  53. package/dist/admin/{EventsTable-7--SHloR.js → EventsTable-726AT6mO.js} +2 -2
  54. package/dist/admin/{EventsTable-7--SHloR.js.map → EventsTable-726AT6mO.js.map} +1 -1
  55. package/dist/admin/{EventsTable-XUKqJdnX.mjs → EventsTable-Bv-PH0PC.mjs} +2 -2
  56. package/dist/admin/{EventsTable-XUKqJdnX.mjs.map → EventsTable-Bv-PH0PC.mjs.map} +1 -1
  57. package/dist/admin/{HomePage-fBY17m1h.js → HomePage-3JDMO4LG.js} +3 -3
  58. package/dist/admin/{HomePage-fBY17m1h.js.map → HomePage-3JDMO4LG.js.map} +1 -1
  59. package/dist/admin/{HomePage-Xrg1dR_D.js → HomePage-QFIF1udT.js} +11 -11
  60. package/dist/admin/{HomePage-Xrg1dR_D.js.map → HomePage-QFIF1udT.js.map} +1 -1
  61. package/dist/admin/{HomePage--Mskxb9Z.mjs → HomePage-pgsuFIh7.mjs} +4 -4
  62. package/dist/admin/{HomePage--Mskxb9Z.mjs.map → HomePage-pgsuFIh7.mjs.map} +1 -1
  63. package/dist/admin/{HomePage-ppJpMP9G.mjs → HomePage-rPlX1rrg.mjs} +3 -3
  64. package/dist/admin/{HomePage-ppJpMP9G.mjs.map → HomePage-rPlX1rrg.mjs.map} +1 -1
  65. package/dist/admin/{InstalledPluginsPage-alfcy8jO.js → InstalledPluginsPage-XP8i3w5T.js} +10 -10
  66. package/dist/admin/{InstalledPluginsPage-alfcy8jO.js.map → InstalledPluginsPage-XP8i3w5T.js.map} +1 -1
  67. package/dist/admin/{InstalledPluginsPage-EtnkMG0G.mjs → InstalledPluginsPage-uHFuUx41.mjs} +4 -4
  68. package/dist/admin/{InstalledPluginsPage-EtnkMG0G.mjs.map → InstalledPluginsPage-uHFuUx41.mjs.map} +1 -1
  69. package/dist/admin/{Layout-9EvJq4Gc.mjs → Layout-6zLg6LxH.mjs} +5 -5
  70. package/dist/admin/Layout-6zLg6LxH.mjs.map +1 -0
  71. package/dist/admin/{Layout-RKjEsOtu.js → Layout-PemM8Wd3.js} +11 -11
  72. package/dist/admin/Layout-PemM8Wd3.js.map +1 -0
  73. package/dist/admin/{ListPage-gl3tUWS8.mjs → ListPage-2nnKxEVE.mjs} +3 -3
  74. package/dist/admin/{ListPage-gl3tUWS8.mjs.map → ListPage-2nnKxEVE.mjs.map} +1 -1
  75. package/dist/admin/{ListPage-D8Ih2axK.js → ListPage-43lsZ_Bp.js} +14 -14
  76. package/dist/admin/{ListPage-D8Ih2axK.js.map → ListPage-43lsZ_Bp.js.map} +1 -1
  77. package/dist/admin/{ListPage-TkJa9Qcz.js → ListPage-6iZqugjj.js} +12 -12
  78. package/dist/admin/{ListPage-TkJa9Qcz.js.map → ListPage-6iZqugjj.js.map} +1 -1
  79. package/dist/admin/{ListPage-Ur-kwyVv.mjs → ListPage-SY0bk22Q.mjs} +6 -6
  80. package/dist/admin/{ListPage-Ur-kwyVv.mjs.map → ListPage-SY0bk22Q.mjs.map} +1 -1
  81. package/dist/admin/{ListPage-MJlQ5gGq.js → ListPage-Tra1QVDy.js} +14 -14
  82. package/dist/admin/{ListPage-MJlQ5gGq.js.map → ListPage-Tra1QVDy.js.map} +1 -1
  83. package/dist/admin/{ListPage-21q8_YN7.mjs → ListPage-WvDXi585.mjs} +3 -3
  84. package/dist/admin/{ListPage-21q8_YN7.mjs.map → ListPage-WvDXi585.mjs.map} +1 -1
  85. package/dist/admin/{ListPage-Z0mmlysk.js → ListPage-c83R7AzC.js} +3 -3
  86. package/dist/admin/{ListPage-Z0mmlysk.js.map → ListPage-c83R7AzC.js.map} +1 -1
  87. package/dist/admin/{ListPage-xQbMtUpV.mjs → ListPage-jhOQGhI7.mjs} +5 -5
  88. package/dist/admin/{ListPage-xQbMtUpV.mjs.map → ListPage-jhOQGhI7.mjs.map} +1 -1
  89. package/dist/admin/{ListPage-nbTQdpBX.mjs → ListPage-liMIiZMU.mjs} +3 -3
  90. package/dist/admin/{ListPage-nbTQdpBX.mjs.map → ListPage-liMIiZMU.mjs.map} +1 -1
  91. package/dist/admin/{ListPage-CRyM6NXF.js → ListPage-lpSNR8MY.js} +17 -17
  92. package/dist/admin/{ListPage-CRyM6NXF.js.map → ListPage-lpSNR8MY.js.map} +1 -1
  93. package/dist/admin/{ListView-nRGxAwIh.js → ListView-QVoBfZkP.js} +13 -13
  94. package/dist/admin/{ListView-nRGxAwIh.js.map → ListView-QVoBfZkP.js.map} +1 -1
  95. package/dist/admin/{ListView-geMTlhDN.mjs → ListView-QlFkFf_V.mjs} +4 -4
  96. package/dist/admin/{ListView-geMTlhDN.mjs.map → ListView-QlFkFf_V.mjs.map} +1 -1
  97. package/dist/admin/{ListView-Drn22JZ1.mjs → ListView-mObmenTh.mjs} +4 -4
  98. package/dist/admin/{ListView-Drn22JZ1.mjs.map → ListView-mObmenTh.mjs.map} +1 -1
  99. package/dist/admin/{ListView-qAX3ZO28.js → ListView-wx2Wg7AQ.js} +13 -13
  100. package/dist/admin/{ListView-qAX3ZO28.js.map → ListView-wx2Wg7AQ.js.map} +1 -1
  101. package/dist/admin/{Login-Hn_q1QSn.js → Login-9bc4EDrd.js} +4 -4
  102. package/dist/admin/{Login-Hn_q1QSn.js.map → Login-9bc4EDrd.js.map} +1 -1
  103. package/dist/admin/{Login-ngKWBSD4.mjs → Login-qvyDXOZp.mjs} +3 -3
  104. package/dist/admin/{Login-ngKWBSD4.mjs.map → Login-qvyDXOZp.mjs.map} +1 -1
  105. package/dist/admin/{MagicLinkEE-JWmJRiBS.mjs → MagicLinkEE-gwhEOSq0.mjs} +3 -3
  106. package/dist/admin/{MagicLinkEE-JWmJRiBS.mjs.map → MagicLinkEE-gwhEOSq0.mjs.map} +1 -1
  107. package/dist/admin/{MagicLinkEE-B5NOEO47.js → MagicLinkEE-wa0KdGZM.js} +3 -3
  108. package/dist/admin/{MagicLinkEE-B5NOEO47.js.map → MagicLinkEE-wa0KdGZM.js.map} +1 -1
  109. package/dist/admin/{MarketplacePage-Pk9USes6.mjs → MarketplacePage-3Z3e-oDS.mjs} +3 -3
  110. package/dist/admin/{MarketplacePage-Pk9USes6.mjs.map → MarketplacePage-3Z3e-oDS.mjs.map} +1 -1
  111. package/dist/admin/{MarketplacePage-vQaaicxu.js → MarketplacePage-e9h-T9Yf.js} +17 -17
  112. package/dist/admin/{MarketplacePage-vQaaicxu.js.map → MarketplacePage-e9h-T9Yf.js.map} +1 -1
  113. package/dist/admin/{Permissions-GCSY8mIm.js → Permissions-CE17oEnM.js} +7 -7
  114. package/dist/admin/{Permissions-GCSY8mIm.js.map → Permissions-CE17oEnM.js.map} +1 -1
  115. package/dist/admin/{Permissions-2GKZ2IjP.mjs → Permissions-VlgWwFsK.mjs} +3 -3
  116. package/dist/admin/{Permissions-2GKZ2IjP.mjs.map → Permissions-VlgWwFsK.mjs.map} +1 -1
  117. package/dist/admin/{PrivateRoute-KfrFibGN.js → PrivateRoute-SKQvazOx.js} +3 -3
  118. package/dist/admin/{PrivateRoute-KfrFibGN.js.map → PrivateRoute-SKQvazOx.js.map} +1 -1
  119. package/dist/admin/{PrivateRoute-xkGBbDbU.mjs → PrivateRoute-nUWu4Q7I.mjs} +2 -2
  120. package/dist/admin/{PrivateRoute-xkGBbDbU.mjs.map → PrivateRoute-nUWu4Q7I.mjs.map} +1 -1
  121. package/dist/admin/{ProfilePage-Q5UpeDjs.mjs → ProfilePage-oTScHwyK.mjs} +4 -4
  122. package/dist/admin/{ProfilePage-Q5UpeDjs.mjs.map → ProfilePage-oTScHwyK.mjs.map} +1 -1
  123. package/dist/admin/{ProfilePage-o028o7JD.js → ProfilePage-pllDh5dd.js} +18 -18
  124. package/dist/admin/{ProfilePage-o028o7JD.js.map → ProfilePage-pllDh5dd.js.map} +1 -1
  125. package/dist/admin/{PurchaseAuditLogs-tpXbhCx-.mjs → PurchaseAuditLogs-6_ie0YzN.mjs} +2 -2
  126. package/dist/admin/{PurchaseAuditLogs-tpXbhCx-.mjs.map → PurchaseAuditLogs-6_ie0YzN.mjs.map} +1 -1
  127. package/dist/admin/{PurchaseAuditLogs-Vur69JZB.js → PurchaseAuditLogs-I3m6LuoA.js} +2 -2
  128. package/dist/admin/{PurchaseAuditLogs-Vur69JZB.js.map → PurchaseAuditLogs-I3m6LuoA.js.map} +1 -1
  129. package/dist/admin/{PurchaseSingleSignOn-6VTPjJVO.mjs → PurchaseSingleSignOn--iKPscMp.mjs} +2 -2
  130. package/dist/admin/{PurchaseSingleSignOn-6VTPjJVO.mjs.map → PurchaseSingleSignOn--iKPscMp.mjs.map} +1 -1
  131. package/dist/admin/{PurchaseSingleSignOn-7NMcihzT.js → PurchaseSingleSignOn-HBKmhjTH.js} +2 -2
  132. package/dist/admin/{PurchaseSingleSignOn-7NMcihzT.js.map → PurchaseSingleSignOn-HBKmhjTH.js.map} +1 -1
  133. package/dist/admin/{SelectRoles-q8vaxqfL.js → SelectRoles-ZAZ-5C7_.js} +5 -5
  134. package/dist/admin/{SelectRoles-q8vaxqfL.js.map → SelectRoles-ZAZ-5C7_.js.map} +1 -1
  135. package/dist/admin/{SelectRoles-BtQp5Va-.mjs → SelectRoles-nihoDXHG.mjs} +4 -4
  136. package/dist/admin/{SelectRoles-BtQp5Va-.mjs.map → SelectRoles-nihoDXHG.mjs.map} +1 -1
  137. package/dist/admin/{SingleSignOnPage-X1OAuyhO.mjs → SingleSignOnPage-WY9MZfnN.mjs} +4 -4
  138. package/dist/admin/{SingleSignOnPage-X1OAuyhO.mjs.map → SingleSignOnPage-WY9MZfnN.mjs.map} +1 -1
  139. package/dist/admin/{SingleSignOnPage-_l9MyJvN.js → SingleSignOnPage-tOX6gKDJ.js} +15 -15
  140. package/dist/admin/{SingleSignOnPage-_l9MyJvN.js.map → SingleSignOnPage-tOX6gKDJ.js.map} +1 -1
  141. package/dist/admin/{Table-V5-qnRte.mjs → Table-S0UNrz__.mjs} +3 -3
  142. package/dist/admin/{Table-V5-qnRte.mjs.map → Table-S0UNrz__.mjs.map} +1 -1
  143. package/dist/admin/{Table-z6l5BFoH.js → Table-YODk-_Dd.js} +5 -5
  144. package/dist/admin/{Table-z6l5BFoH.js.map → Table-YODk-_Dd.js.map} +1 -1
  145. package/dist/admin/{rbac-c6QPc6s7.js → Theme-QO8ntQqL.js} +25 -25
  146. package/dist/admin/Theme-QO8ntQqL.js.map +1 -0
  147. package/dist/admin/{rbac-A_QIXvpC.mjs → Theme-vNSAMTAv.mjs} +26 -26
  148. package/dist/admin/Theme-vNSAMTAv.mjs.map +1 -0
  149. package/dist/admin/{TokenTypeSelect-2iXEz7zs.js → TokenTypeSelect-0lJpg-Og.js} +7 -7
  150. package/dist/admin/{TokenTypeSelect-2iXEz7zs.js.map → TokenTypeSelect-0lJpg-Og.js.map} +1 -1
  151. package/dist/admin/{TokenTypeSelect-crPtoLFc.mjs → TokenTypeSelect-TLOZ5MAR.mjs} +3 -3
  152. package/dist/admin/{TokenTypeSelect-crPtoLFc.mjs.map → TokenTypeSelect-TLOZ5MAR.mjs.map} +1 -1
  153. package/dist/admin/{UseCasePage-QsvlJAQD.mjs → UseCasePage-ehZx7Rwd.mjs} +4 -4
  154. package/dist/admin/{UseCasePage-QsvlJAQD.mjs.map → UseCasePage-ehZx7Rwd.mjs.map} +1 -1
  155. package/dist/admin/{UseCasePage-26Y6U1DU.js → UseCasePage-uJRpPeQz.js} +6 -6
  156. package/dist/admin/{UseCasePage-26Y6U1DU.js.map → UseCasePage-uJRpPeQz.js.map} +1 -1
  157. package/dist/admin/{constants-ThodPHfR.mjs → constants-lyc5iHQ_.mjs} +3 -3
  158. package/dist/admin/{constants-ThodPHfR.mjs.map → constants-lyc5iHQ_.mjs.map} +1 -1
  159. package/dist/admin/{constants-Maq_tQvu.js → constants-qyti_7np.js} +4 -4
  160. package/dist/admin/{constants-Maq_tQvu.js.map → constants-qyti_7np.js.map} +1 -1
  161. package/dist/admin/{index-jwAq-BX-.mjs → index-7Wlj8eA7.mjs} +1292 -1153
  162. package/dist/admin/index-7Wlj8eA7.mjs.map +1 -0
  163. package/dist/admin/{index-Ncrnmg5a.js → index-PPLoirnr.js} +1502 -1363
  164. package/dist/admin/index-PPLoirnr.js.map +1 -0
  165. package/dist/admin/index.js +12 -12
  166. package/dist/admin/index.mjs +2 -2
  167. package/dist/admin/selectors-RspXIUtJ.js +8 -0
  168. package/dist/admin/{selectors-yGCxM4Rk.js.map → selectors-RspXIUtJ.js.map} +1 -1
  169. package/dist/admin/{selectors-s8oNaHXK.mjs → selectors-jiFpk43E.mjs} +2 -2
  170. package/dist/admin/{selectors-s8oNaHXK.mjs.map → selectors-jiFpk43E.mjs.map} +1 -1
  171. package/dist/admin/src/StrapiApp.d.ts +17 -45
  172. package/dist/admin/src/constants.d.ts +1 -1
  173. package/dist/admin/src/core/apis/router.d.ts +73 -0
  174. package/dist/admin/src/features/StrapiApp.d.ts +2 -1
  175. package/dist/admin/src/hooks/useSettingsMenu.d.ts +1 -1
  176. package/dist/admin/src/index.d.ts +2 -1
  177. package/dist/admin/src/render.d.ts +1 -0
  178. package/dist/admin/src/router.d.ts +7 -0
  179. package/dist/admin/src/services/admin.d.ts +5 -5
  180. package/dist/admin/test.js +9 -9
  181. package/dist/admin/test.js.map +1 -1
  182. package/dist/admin/test.mjs +1 -1
  183. package/dist/admin/{useAdminRoles-gMNUnVWO.mjs → useAdminRoles-dbTJQETQ.mjs} +2 -2
  184. package/dist/admin/{useAdminRoles-gMNUnVWO.mjs.map → useAdminRoles-dbTJQETQ.mjs.map} +1 -1
  185. package/dist/admin/{useAdminRoles-zEk0tBhE.js → useAdminRoles-pDH2JAWH.js} +2 -2
  186. package/dist/admin/{useAdminRoles-zEk0tBhE.js.map → useAdminRoles-pDH2JAWH.js.map} +1 -1
  187. package/dist/admin/{useLicenseLimitNotification-AUg5DyS9.mjs → useLicenseLimitNotification-Nh_v-hN2.mjs} +2 -2
  188. package/dist/admin/{useLicenseLimitNotification-AUg5DyS9.mjs.map → useLicenseLimitNotification-Nh_v-hN2.mjs.map} +1 -1
  189. package/dist/admin/{useLicenseLimitNotification-ItNGgex2.js → useLicenseLimitNotification-ZwMojvCa.js} +3 -3
  190. package/dist/admin/{useLicenseLimitNotification-ItNGgex2.js.map → useLicenseLimitNotification-ZwMojvCa.js.map} +1 -1
  191. package/dist/admin/{validation-F0JMLUkr.mjs → validation-208-EpBG.mjs} +2 -2
  192. package/dist/admin/{validation-F0JMLUkr.mjs.map → validation-208-EpBG.mjs.map} +1 -1
  193. package/dist/admin/{validation-cP2hBbZm.js → validation-YRSMzskg.js} +2 -2
  194. package/dist/admin/{validation-cP2hBbZm.js.map → validation-YRSMzskg.js.map} +1 -1
  195. package/dist/package.json.d.ts +8 -7
  196. package/package.json +9 -8
  197. package/dist/admin/CreateView-DNHRcJsj.js +0 -17
  198. package/dist/admin/CreateView-JQYIo77z.js +0 -17
  199. package/dist/admin/Layout-9EvJq4Gc.mjs.map +0 -1
  200. package/dist/admin/Layout-RKjEsOtu.js.map +0 -1
  201. package/dist/admin/index-Ncrnmg5a.js.map +0 -1
  202. package/dist/admin/index-jwAq-BX-.mjs.map +0 -1
  203. package/dist/admin/rbac-A_QIXvpC.mjs.map +0 -1
  204. package/dist/admin/rbac-c6QPc6s7.js.map +0 -1
  205. package/dist/admin/selectors-yGCxM4Rk.js +0 -8
@@ -1,25 +1,25 @@
1
1
  import { createRoot } from 'react-dom/client';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import * as React from 'react';
4
- import { useEffect, Suspense, useCallback, useMemo, useState, forwardRef, memo } from 'react';
5
- import { Link, Alert, Typography, Main, Flex, Button, useCallbackRef, useComposedRefs, Dialog, Field, Toggle, Checkbox, DatePicker, DateTimePicker, TextInput, SingleSelect, SingleSelectOption, JSONInput, NumberInput, Textarea, TimePicker, Box, Portal, IconButton, VisuallyHidden, Grid, EmptyStateLayout, LinkButton, lightTheme, darkTheme, Popover, Tag, Pagination as Pagination$1, PreviousLink, PageLink, Dots, NextLink, SearchForm, Searchbar, Table as Table$1, Thead, Tr, Th, Tooltip, Tbody, Td, Loader } from '@strapi/design-system';
3
+ import { Link, Alert, Typography, Main, Flex, Button, Box, useCallbackRef, EmptyStateLayout, LinkButton, useComposedRefs, Dialog, Field, Toggle, Checkbox, DatePicker, DateTimePicker, TextInput, SingleSelect, SingleSelectOption, JSONInput, NumberInput, Textarea, TimePicker, Portal, IconButton, VisuallyHidden, Grid, lightTheme, darkTheme, Popover, Tag, Pagination as Pagination$1, PreviousLink, PageLink, Dots, NextLink, SearchForm, Searchbar, Table as Table$1, Thead, Tr, Th, Tooltip, Tbody, Td, Loader } from '@strapi/design-system';
6
4
  import invariant from 'invariant';
7
5
  import isFunction from 'lodash/isFunction';
8
6
  import merge from 'lodash/merge';
9
7
  import pick from 'lodash/pick';
8
+ import { NavLink, useLocation, useNavigate, Outlet, useRouteError, Link as Link$1, useBlocker, useMatch, Navigate, createMemoryRouter, createBrowserRouter, RouterProvider } from 'react-router-dom';
9
+ import { t as createContext, S as StrapiAppProvider, A as AuthProvider, L as LanguageProvider, T as Theme, N as NotificationsProvider, v as TrackingProvider, w as ConfigurationProvider, x as LANGUAGE_LOCAL_STORAGE_KEY, P as Page, o as useConfiguration, b as useTypedSelector, e as useTypedDispatch, y as setLocale, u as useAuth, f as useAPIErrorHandler, z as useForgotPasswordMutation, a as useNotification, m as useAppInfo, d as useTracking, B as useGetRegistrationInfoQuery, D as useRegisterAdminMutation, E as useRegisterUserMutation, F as useResetPasswordMutation, r as reducer$3, R as RBAC, G as THEME_LOCAL_STORAGE_KEY, H as useTypedStore } from './Theme-vNSAMTAv.mjs';
10
10
  import { Provider as Provider$1 } from 'react-redux';
11
- import { NavLink, useLocation, useNavigate, Outlet, useRouteError, useBlocker, useMatch, Navigate, Link as Link$1, createBrowserRouter, RouterProvider } from 'react-router-dom';
12
- import { t as createContext, S as StrapiAppProvider, A as AuthProvider, L as LanguageProvider, T as Theme, N as NotificationsProvider, v as TrackingProvider, w as ConfigurationProvider, x as LANGUAGE_LOCAL_STORAGE_KEY, P as Page, r as reducer$3, o as useConfiguration, b as useTypedSelector, e as useTypedDispatch, y as setLocale, a as useAuth, f as useAPIErrorHandler, z as useForgotPasswordMutation, u as useNotification, m as useAppInfo, d as useTracking, B as useGetRegistrationInfoQuery, D as useRegisterAdminMutation, E as useRegisterUserMutation, F as useResetPasswordMutation, R as RBAC, G as THEME_LOCAL_STORAGE_KEY, H as useTypedStore } from './rbac-A_QIXvpC.mjs';
11
+ import * as React from 'react';
12
+ import { useEffect, Suspense, useCallback, useMemo, useState, forwardRef, memo } from 'react';
13
13
  import { QueryClient, QueryClientProvider } from 'react-query';
14
- import { ArrowLeft, WarningCircle, Duplicate, Eye, EyeStriked, Cross, ArrowRight, Filter, Plus, Search, CaretDown } from '@strapi/icons';
14
+ import { ArrowLeft, WarningCircle, Duplicate, ArrowRight, Eye, EyeStriked, Cross, Filter, Plus, Search, CaretDown } from '@strapi/icons';
15
15
  import { produce } from 'immer';
16
16
  import { useIntl } from 'react-intl';
17
17
  import get from 'lodash/get';
18
18
  import set from 'lodash/set';
19
19
  import { styled } from 'styled-components';
20
- import { configureStore, combineReducers } from '@reduxjs/toolkit';
21
- import { b as adminApi, i as isBaseQueryError, e as useInitQuery, j as createAbsoluteUrl, k as getFetchClient } from './admin-B6AW0Kov.mjs';
20
+ import { EmptyPictures, EmptyDocuments } from '@strapi/icons/symbols';
22
21
  import { u as useEnterprise } from './useEnterprise-jpsYZWzn.mjs';
22
+ import { i as isBaseQueryError, e as useInitQuery, b as adminApi, j as createAbsoluteUrl, k as getFetchClient } from './admin-B6AW0Kov.mjs';
23
23
  import camelCase from 'lodash/camelCase';
24
24
  import * as yup from 'yup';
25
25
  import { ValidationError } from 'yup';
@@ -27,9 +27,10 @@ import { generateNKeysBetween } from 'fractional-indexing';
27
27
  import isEqual from 'lodash/isEqual';
28
28
  import clone from 'lodash/clone';
29
29
  import toPath from 'lodash/toPath';
30
+ import { getLocalTimeZone, parseAbsolute, toCalendarDate } from '@internationalized/date';
30
31
  import omit from 'lodash/omit';
31
32
  import { Formik, Form as Form$1 } from 'formik';
32
- import { EmptyPictures, EmptyDocuments } from '@strapi/icons/symbols';
33
+ import { configureStore, combineReducers } from '@reduxjs/toolkit';
33
34
  import throttle from 'lodash/throttle';
34
35
  import { parse, stringify } from 'qs';
35
36
 
@@ -68,7 +69,7 @@ const getEERoutes$1 = () => window.strapi.isEE ? [
68
69
  {
69
70
  path: "auth/login/:authResponse",
70
71
  lazy: async () => {
71
- const { AuthResponse } = await import('./AuthResponse-CTQ0fh3I.mjs');
72
+ const { AuthResponse } = await import('./AuthResponse-pxi-Fo2T.mjs');
72
73
  return {
73
74
  Component: AuthResponse
74
75
  };
@@ -103,243 +104,519 @@ const constants = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
103
104
  getEERoutes: getEERoutes$1
104
105
  }, Symbol.toStringTag, { value: 'Module' }));
105
106
 
106
- const getEERoutes = () => [
107
- ...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) ? [
108
- {
109
- path: "audit-logs",
110
- lazy: async () => {
111
- const { ProtectedListPage } = await import('./ListPage-21q8_YN7.mjs');
112
- return {
113
- Component: ProtectedListPage
114
- };
107
+ 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";
108
+
109
+ const ADMIN_PERMISSIONS_CE = {
110
+ contentManager: {
111
+ main: [],
112
+ collectionTypesConfigurations: [
113
+ {
114
+ action: "plugin::content-manager.collection-types.configure-view",
115
+ subject: null
115
116
  }
116
- }
117
- ] : [],
118
- ...window.strapi.features.isEnabled(window.strapi.features.SSO) ? [
119
- {
120
- path: "single-sign-on",
121
- lazy: async () => {
122
- const { ProtectedSSO } = await import('./SingleSignOnPage-X1OAuyhO.mjs');
123
- return {
124
- Component: ProtectedSSO
125
- };
117
+ ],
118
+ componentsConfigurations: [
119
+ {
120
+ action: "plugin::content-manager.components.configure-layout",
121
+ subject: null
126
122
  }
127
- }
128
- ] : []
129
- ];
130
-
131
- const [Provider, useHistory] = createContext("History", {
132
- history: [],
133
- currentLocationIndex: 0,
134
- currentLocation: "",
135
- canGoBack: false,
136
- pushState: () => {
137
- throw new Error("You must use the `HistoryProvider` to access the `pushState` function.");
138
- },
139
- goBack: () => {
140
- throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
141
- }
142
- });
143
- const HistoryProvider = ({ children }) => {
144
- const location = useLocation();
145
- const navigate = useNavigate();
146
- const [state, dispatch] = React.useReducer(reducer$2, {
147
- history: [],
148
- currentLocationIndex: 0,
149
- currentLocation: "",
150
- canGoBack: false
151
- });
152
- const isGoingBack = React.useRef(false);
153
- const pushState = React.useCallback((path) => {
154
- dispatch({
155
- type: "PUSH_STATE",
156
- payload: typeof path === "string" ? { to: path, search: "" } : path
157
- });
158
- }, []);
159
- const goBack = React.useCallback(() => {
160
- navigate(-1);
161
- dispatch({ type: "GO_BACK" });
162
- isGoingBack.current = true;
163
- }, [navigate]);
164
- const prevIndex = React.useRef(state.currentLocationIndex);
165
- React.useEffect(() => {
166
- if (state.currentLocationIndex !== prevIndex.current) {
167
- dispatch({
168
- type: "SET_CAN_GO_BACK",
169
- payload: state.currentLocationIndex > 1 && state.history.length > 1
170
- });
171
- prevIndex.current = state.currentLocationIndex;
172
- }
173
- }, [prevIndex, state.currentLocationIndex, state.history.length]);
174
- React.useLayoutEffect(() => {
175
- if (isGoingBack.current) {
176
- isGoingBack.current = false;
177
- } else {
178
- dispatch({
179
- type: "PUSH_STATE",
180
- payload: { to: location.pathname, search: location.search }
181
- });
182
- }
183
- }, [dispatch, location.pathname, location.search]);
184
- return /* @__PURE__ */ jsx(Provider, { pushState, goBack, ...state, children });
185
- };
186
- const reducer$2 = (state, action) => produce(state, (draft) => {
187
- switch (action.type) {
188
- case "PUSH_STATE": {
189
- const path = `${action.payload.to}${action.payload.search}`;
190
- if (state.currentLocationIndex === state.history.length) {
191
- draft.history = [...state.history, path];
192
- } else {
193
- draft.history = [...state.history.slice(0, state.currentLocationIndex), path];
123
+ ],
124
+ singleTypesConfigurations: [
125
+ {
126
+ action: "plugin::content-manager.single-types.configure-view",
127
+ subject: null
194
128
  }
195
- draft.currentLocation = path;
196
- draft.currentLocationIndex += 1;
197
- break;
198
- }
199
- case "GO_BACK": {
200
- const newIndex = state.currentLocationIndex - 1;
201
- draft.currentLocation = state.history[newIndex - 1];
202
- draft.currentLocationIndex = newIndex;
203
- break;
204
- }
205
- case "SET_CAN_GO_BACK": {
206
- draft.canGoBack = action.payload;
207
- break;
129
+ ]
130
+ },
131
+ marketplace: {
132
+ main: [{ action: "admin::marketplace.read", subject: null }],
133
+ read: [{ action: "admin::marketplace.read", subject: null }]
134
+ },
135
+ settings: {
136
+ roles: {
137
+ main: [
138
+ { action: "admin::roles.create", subject: null },
139
+ { action: "admin::roles.update", subject: null },
140
+ { action: "admin::roles.read", subject: null },
141
+ { action: "admin::roles.delete", subject: null }
142
+ ],
143
+ create: [{ action: "admin::roles.create", subject: null }],
144
+ delete: [{ action: "admin::roles.delete", subject: null }],
145
+ read: [{ action: "admin::roles.read", subject: null }],
146
+ update: [{ action: "admin::roles.update", subject: null }]
147
+ },
148
+ users: {
149
+ main: [
150
+ { action: "admin::users.create", subject: null },
151
+ { action: "admin::users.read", subject: null },
152
+ { action: "admin::users.update", subject: null },
153
+ { action: "admin::users.delete", subject: null }
154
+ ],
155
+ create: [{ action: "admin::users.create", subject: null }],
156
+ delete: [{ action: "admin::users.delete", subject: null }],
157
+ read: [{ action: "admin::users.read", subject: null }],
158
+ update: [{ action: "admin::users.update", subject: null }]
159
+ },
160
+ webhooks: {
161
+ main: [
162
+ { action: "admin::webhooks.create", subject: null },
163
+ { action: "admin::webhooks.read", subject: null },
164
+ { action: "admin::webhooks.update", subject: null },
165
+ { action: "admin::webhooks.delete", subject: null }
166
+ ],
167
+ create: [{ action: "admin::webhooks.create", subject: null }],
168
+ delete: [{ action: "admin::webhooks.delete", subject: null }],
169
+ read: [
170
+ { action: "admin::webhooks.read", subject: null },
171
+ // NOTE: We need to check with the API
172
+ { action: "admin::webhooks.update", subject: null },
173
+ { action: "admin::webhooks.delete", subject: null }
174
+ ],
175
+ update: [{ action: "admin::webhooks.update", subject: null }]
176
+ },
177
+ "api-tokens": {
178
+ main: [{ action: "admin::api-tokens.access", subject: null }],
179
+ create: [{ action: "admin::api-tokens.create", subject: null }],
180
+ delete: [{ action: "admin::api-tokens.delete", subject: null }],
181
+ read: [{ action: "admin::api-tokens.read", subject: null }],
182
+ update: [{ action: "admin::api-tokens.update", subject: null }],
183
+ regenerate: [{ action: "admin::api-tokens.regenerate", subject: null }]
184
+ },
185
+ "transfer-tokens": {
186
+ main: [{ action: "admin::transfer.tokens.access", subject: null }],
187
+ create: [{ action: "admin::transfer.tokens.create", subject: null }],
188
+ delete: [{ action: "admin::transfer.tokens.delete", subject: null }],
189
+ read: [{ action: "admin::transfer.tokens.read", subject: null }],
190
+ update: [{ action: "admin::transfer.tokens.update", subject: null }],
191
+ regenerate: [{ action: "admin::transfer.tokens.regenerate", subject: null }]
192
+ },
193
+ "project-settings": {
194
+ read: [{ action: "admin::project-settings.read", subject: null }],
195
+ update: [{ action: "admin::project-settings.update", subject: null }]
208
196
  }
209
197
  }
210
- });
211
- const BackButton = React.forwardRef(({ disabled }, ref) => {
212
- const { formatMessage } = useIntl();
213
- const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
214
- const goBack = useHistory("BackButton", (state) => state.goBack);
215
- const history = useHistory("BackButton", (state) => state.history);
216
- const handleClick = (e) => {
217
- e.preventDefault();
218
- goBack();
219
- };
220
- return /* @__PURE__ */ jsx(
221
- Link,
198
+ };
199
+ const HOOKS = {
200
+ /**
201
+ * Hook that allows to mutate the displayed headers of the list view table
202
+ * @constant
203
+ * @type {string}
204
+ */
205
+ INJECT_COLUMN_IN_TABLE: "Admin/CM/pages/ListView/inject-column-in-table",
206
+ /**
207
+ * Hook that allows to mutate the CM's collection types links pre-set filters
208
+ * @constant
209
+ * @type {string}
210
+ */
211
+ MUTATE_COLLECTION_TYPES_LINKS: "Admin/CM/pages/App/mutate-collection-types-links",
212
+ /**
213
+ * Hook that allows to mutate the CM's edit view layout
214
+ * @constant
215
+ * @type {string}
216
+ */
217
+ MUTATE_EDIT_VIEW_LAYOUT: "Admin/CM/pages/EditView/mutate-edit-view-layout",
218
+ /**
219
+ * Hook that allows to mutate the CM's single types links pre-set filters
220
+ * @constant
221
+ * @type {string}
222
+ */
223
+ MUTATE_SINGLE_TYPES_LINKS: "Admin/CM/pages/App/mutate-single-types-links"
224
+ };
225
+ const SETTINGS_LINKS_CE = () => ({
226
+ global: [
222
227
  {
223
- ref,
224
- tag: NavLink,
225
- to: history.at(-1) ?? "",
226
- onClick: handleClick,
227
- disabled: disabled || !canGoBack,
228
- "aria-disabled": disabled || !canGoBack,
229
- startIcon: /* @__PURE__ */ jsx(ArrowLeft, {}),
230
- children: formatMessage({
231
- id: "global.back",
232
- defaultMessage: "Back"
233
- })
234
- }
235
- );
236
- });
237
-
238
- const GUIDED_TOUR_COMPLETED_STEPS = "GUIDED_TOUR_COMPLETED_STEPS";
239
- const GUIDED_TOUR_CURRENT_STEP = "GUIDED_TOUR_CURRENT_STEP";
240
- const GUIDED_TOUR_SKIPPED = "GUIDED_TOUR_SKIPPED";
241
- const [GuidedTourProviderImpl, useGuidedTour] = createContext("GuidedTour");
242
- const GuidedTourProvider = ({ children }) => {
243
- const [{ currentStep, guidedTourState, isGuidedTourVisible, isSkipped }, dispatch] = React.useReducer(reducer$1, initialState, initialiseState);
244
- const setCurrentStep = (step) => {
245
- if (step !== null) {
246
- const isStepAlreadyDone = get(guidedTourState, step);
247
- const [sectionName, stepName] = step.split(".");
248
- const sectionArray = Object.entries(guidedTourState[sectionName]);
249
- const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName);
250
- const previousSteps = sectionArray.slice(0, currentStepIndex);
251
- const isStepToShow = previousSteps.every(([, sectionValue]) => sectionValue);
252
- if (isStepAlreadyDone || isSkipped || !isStepToShow) {
253
- return null;
228
+ intlLabel: { id: "Settings.application.title", defaultMessage: "Overview" },
229
+ to: "/settings/application-infos",
230
+ id: "000-application-infos"
231
+ },
232
+ {
233
+ intlLabel: { id: "Settings.webhooks.title", defaultMessage: "Webhooks" },
234
+ to: "/settings/webhooks",
235
+ id: "webhooks"
236
+ },
237
+ {
238
+ intlLabel: { id: "Settings.apiTokens.title", defaultMessage: "API Tokens" },
239
+ to: "/settings/api-tokens?sort=name:ASC",
240
+ id: "api-tokens"
241
+ },
242
+ {
243
+ intlLabel: { id: "Settings.transferTokens.title", defaultMessage: "Transfer Tokens" },
244
+ to: "/settings/transfer-tokens?sort=name:ASC",
245
+ id: "transfer-tokens"
246
+ },
247
+ // 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.
248
+ // Disable this by adding "promoteEE: false" to your `./config/admin.js` file
249
+ ...!window.strapi.features.isEnabled(window.strapi.features.SSO) && window.strapi?.flags?.promoteEE ? [
250
+ {
251
+ intlLabel: { id: "Settings.sso.title", defaultMessage: "Single Sign-On" },
252
+ to: "/settings/purchase-single-sign-on",
253
+ id: "sso-purchase-page",
254
+ licenseOnly: true
254
255
  }
255
- }
256
- window.localStorage.setItem(GUIDED_TOUR_CURRENT_STEP, JSON.stringify(null));
257
- return dispatch({
258
- type: "SET_CURRENT_STEP",
259
- step
260
- });
261
- };
262
- const setGuidedTourVisibility = (value) => {
263
- dispatch({
264
- type: "SET_GUIDED_TOUR_VISIBILITY",
265
- value
266
- });
267
- };
268
- const setStepState = (currentStep2, value) => {
269
- addCompletedStep(currentStep2);
270
- dispatch({
271
- type: "SET_STEP_STATE",
272
- currentStep: currentStep2,
273
- value
274
- });
275
- };
276
- const startSection = (sectionName) => {
277
- const sectionSteps = guidedTourState[sectionName];
278
- if (sectionSteps) {
279
- const guidedTourArray = Object.entries(guidedTourState);
280
- const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName);
281
- const previousSections = guidedTourArray.slice(0, currentSectionIndex);
282
- const isSectionToShow = previousSections.every(
283
- ([, sectionValue]) => Object.values(sectionValue).every(Boolean)
256
+ ] : []
257
+ ],
258
+ admin: [
259
+ {
260
+ intlLabel: { id: "global.roles", defaultMessage: "Roles" },
261
+ to: "/settings/roles",
262
+ id: "roles"
263
+ },
264
+ {
265
+ intlLabel: { id: "global.users", defaultMessage: "Users" },
266
+ // Init the search params directly
267
+ to: "/settings/users?pageSize=10&page=1&sort=firstname",
268
+ id: "users"
269
+ },
270
+ ...!window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) && window.strapi?.flags?.promoteEE ? [
271
+ {
272
+ intlLabel: { id: "global.auditLogs", defaultMessage: "Audit Logs" },
273
+ to: "/settings/purchase-audit-logs",
274
+ id: "auditLogs-purchase-page",
275
+ licenseOnly: true
276
+ }
277
+ ] : []
278
+ ]
279
+ });
280
+
281
+ const ALLOWED_TYPES = [
282
+ "biginteger",
283
+ "boolean",
284
+ "date",
285
+ "datetime",
286
+ "decimal",
287
+ "email",
288
+ "enumeration",
289
+ "float",
290
+ "integer",
291
+ "json",
292
+ "password",
293
+ "richtext",
294
+ "string",
295
+ "text",
296
+ "time",
297
+ "uid"
298
+ ];
299
+ const ALLOWED_ROOT_LEVEL_OPTIONS = [
300
+ "min",
301
+ "minLength",
302
+ "max",
303
+ "maxLength",
304
+ "required",
305
+ "regex",
306
+ "enum",
307
+ "unique",
308
+ "private",
309
+ "default"
310
+ ];
311
+ class CustomFields {
312
+ customFields;
313
+ constructor() {
314
+ this.customFields = {};
315
+ }
316
+ register = (customFields) => {
317
+ if (Array.isArray(customFields)) {
318
+ customFields.forEach((customField) => {
319
+ this.register(customField);
320
+ });
321
+ } else {
322
+ const { name, pluginId, type, intlLabel, intlDescription, components, options } = customFields;
323
+ invariant(name, "A name must be provided");
324
+ invariant(type, "A type must be provided");
325
+ invariant(intlLabel, "An intlLabel must be provided");
326
+ invariant(intlDescription, "An intlDescription must be provided");
327
+ invariant(components, "A components object must be provided");
328
+ invariant(components.Input, "An Input component must be provided");
329
+ invariant(
330
+ ALLOWED_TYPES.includes(type),
331
+ `Custom field type: '${type}' is not a valid Strapi type or it can't be used with a Custom Field`
284
332
  );
285
- const [firstStep] = Object.keys(sectionSteps);
286
- const isFirstStepDone = sectionSteps[firstStep];
287
- if (isSectionToShow && !currentStep && !isFirstStepDone) {
288
- setCurrentStep(`${sectionName}.${firstStep}`);
333
+ const isValidObjectKey = /^(?![0-9])[a-zA-Z0-9$_-]+$/g;
334
+ invariant(
335
+ isValidObjectKey.test(name),
336
+ `Custom field name: '${name}' is not a valid object key`
337
+ );
338
+ const allFormOptions = [...options?.base || [], ...options?.advanced || []];
339
+ if (allFormOptions.length) {
340
+ const optionPathValidations = allFormOptions.reduce(optionsValidationReducer, []);
341
+ optionPathValidations.forEach(({ isValidOptionPath, errorMessage }) => {
342
+ invariant(isValidOptionPath, errorMessage);
343
+ });
289
344
  }
345
+ const uid = pluginId ? `plugin::${pluginId}.${name}` : `global::${name}`;
346
+ const uidAlreadyUsed = Object.prototype.hasOwnProperty.call(this.customFields, uid);
347
+ invariant(!uidAlreadyUsed, `Custom field: '${uid}' has already been registered`);
348
+ this.customFields[uid] = customFields;
290
349
  }
291
350
  };
292
- const setSkipped = (value) => {
293
- window.localStorage.setItem(GUIDED_TOUR_SKIPPED, JSON.stringify(value));
294
- dispatch({
295
- type: "SET_SKIPPED",
296
- value
297
- });
351
+ getAll = () => {
352
+ return this.customFields;
298
353
  };
299
- return /* @__PURE__ */ jsx(
300
- GuidedTourProviderImpl,
301
- {
302
- guidedTourState,
303
- currentStep,
304
- setCurrentStep,
305
- setGuidedTourVisibility,
306
- setSkipped,
307
- setStepState,
308
- startSection,
309
- isGuidedTourVisible,
310
- isSkipped,
311
- children
312
- }
313
- );
354
+ get = (uid) => {
355
+ return this.customFields[uid];
356
+ };
357
+ }
358
+ const optionsValidationReducer = (acc, option) => {
359
+ if ("items" in option) {
360
+ return option.items.reduce(optionsValidationReducer, acc);
361
+ }
362
+ if (!option.name) {
363
+ acc.push({
364
+ isValidOptionPath: false,
365
+ errorMessage: "The 'name' property is required on an options object"
366
+ });
367
+ } else {
368
+ acc.push({
369
+ isValidOptionPath: option.name.startsWith("options") || ALLOWED_ROOT_LEVEL_OPTIONS.includes(option.name),
370
+ errorMessage: `'${option.name}' must be prefixed with 'options.'`
371
+ });
372
+ }
373
+ return acc;
314
374
  };
315
- const initialState = {
316
- currentStep: null,
317
- guidedTourState: {
318
- contentTypeBuilder: {
319
- create: false,
320
- success: false
321
- },
322
- contentManager: {
323
- create: false,
324
- success: false
325
- },
326
- apiTokens: {
327
- create: false,
328
- success: false
329
- },
330
- transferTokens: {
331
- create: false,
332
- success: false
375
+
376
+ class Plugin {
377
+ apis;
378
+ initializer;
379
+ injectionZones;
380
+ isReady;
381
+ name;
382
+ pluginId;
383
+ constructor(pluginConf) {
384
+ this.apis = pluginConf.apis || {};
385
+ this.initializer = pluginConf.initializer || null;
386
+ this.injectionZones = pluginConf.injectionZones || {};
387
+ this.isReady = pluginConf.isReady !== void 0 ? pluginConf.isReady : true;
388
+ this.name = pluginConf.name;
389
+ this.pluginId = pluginConf.id;
390
+ }
391
+ getInjectedComponents(containerName, blockName) {
392
+ try {
393
+ return this.injectionZones[containerName][blockName] || [];
394
+ } catch (err) {
395
+ console.error("Cannot get injected component", err);
396
+ return [];
333
397
  }
334
- },
335
- isGuidedTourVisible: false,
336
- isSkipped: false
337
- };
338
- const reducer$1 = (state = initialState, action) => produce(state, (draftState) => {
339
- switch (action.type) {
340
- case "SET_CURRENT_STEP": {
341
- draftState.currentStep = action.step;
342
- break;
398
+ }
399
+ injectComponent(containerName, blockName, component) {
400
+ try {
401
+ this.injectionZones[containerName][blockName].push(component);
402
+ } catch (err) {
403
+ console.error("Cannot inject component", err);
404
+ }
405
+ }
406
+ }
407
+
408
+ const [Provider, useHistory] = createContext("History", {
409
+ history: [],
410
+ currentLocationIndex: 0,
411
+ currentLocation: "",
412
+ canGoBack: false,
413
+ pushState: () => {
414
+ throw new Error("You must use the `HistoryProvider` to access the `pushState` function.");
415
+ },
416
+ goBack: () => {
417
+ throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
418
+ }
419
+ });
420
+ const HistoryProvider = ({ children }) => {
421
+ const location = useLocation();
422
+ const navigate = useNavigate();
423
+ const [state, dispatch] = React.useReducer(reducer$2, {
424
+ history: [],
425
+ currentLocationIndex: 0,
426
+ currentLocation: "",
427
+ canGoBack: false
428
+ });
429
+ const isGoingBack = React.useRef(false);
430
+ const pushState = React.useCallback((path) => {
431
+ dispatch({
432
+ type: "PUSH_STATE",
433
+ payload: typeof path === "string" ? { to: path, search: "" } : path
434
+ });
435
+ }, []);
436
+ const goBack = React.useCallback(() => {
437
+ navigate(-1);
438
+ dispatch({ type: "GO_BACK" });
439
+ isGoingBack.current = true;
440
+ }, [navigate]);
441
+ const prevIndex = React.useRef(state.currentLocationIndex);
442
+ React.useEffect(() => {
443
+ if (state.currentLocationIndex !== prevIndex.current) {
444
+ dispatch({
445
+ type: "SET_CAN_GO_BACK",
446
+ payload: state.currentLocationIndex > 1 && state.history.length > 1
447
+ });
448
+ prevIndex.current = state.currentLocationIndex;
449
+ }
450
+ }, [prevIndex, state.currentLocationIndex, state.history.length]);
451
+ React.useLayoutEffect(() => {
452
+ if (isGoingBack.current) {
453
+ isGoingBack.current = false;
454
+ } else {
455
+ dispatch({
456
+ type: "PUSH_STATE",
457
+ payload: { to: location.pathname, search: location.search }
458
+ });
459
+ }
460
+ }, [dispatch, location.pathname, location.search]);
461
+ return /* @__PURE__ */ jsx(Provider, { pushState, goBack, ...state, children });
462
+ };
463
+ const reducer$2 = (state, action) => produce(state, (draft) => {
464
+ switch (action.type) {
465
+ case "PUSH_STATE": {
466
+ const path = `${action.payload.to}${action.payload.search}`;
467
+ if (state.currentLocationIndex === state.history.length) {
468
+ draft.history = [...state.history, path];
469
+ } else {
470
+ draft.history = [...state.history.slice(0, state.currentLocationIndex), path];
471
+ }
472
+ draft.currentLocation = path;
473
+ draft.currentLocationIndex += 1;
474
+ break;
475
+ }
476
+ case "GO_BACK": {
477
+ const newIndex = state.currentLocationIndex - 1;
478
+ draft.currentLocation = state.history[newIndex - 1];
479
+ draft.currentLocationIndex = newIndex;
480
+ break;
481
+ }
482
+ case "SET_CAN_GO_BACK": {
483
+ draft.canGoBack = action.payload;
484
+ break;
485
+ }
486
+ }
487
+ });
488
+ const BackButton = React.forwardRef(({ disabled }, ref) => {
489
+ const { formatMessage } = useIntl();
490
+ const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
491
+ const goBack = useHistory("BackButton", (state) => state.goBack);
492
+ const history = useHistory("BackButton", (state) => state.history);
493
+ const handleClick = (e) => {
494
+ e.preventDefault();
495
+ goBack();
496
+ };
497
+ return /* @__PURE__ */ jsx(
498
+ Link,
499
+ {
500
+ ref,
501
+ tag: NavLink,
502
+ to: history.at(-1) ?? "",
503
+ onClick: handleClick,
504
+ disabled: disabled || !canGoBack,
505
+ "aria-disabled": disabled || !canGoBack,
506
+ startIcon: /* @__PURE__ */ jsx(ArrowLeft, {}),
507
+ children: formatMessage({
508
+ id: "global.back",
509
+ defaultMessage: "Back"
510
+ })
511
+ }
512
+ );
513
+ });
514
+
515
+ const GUIDED_TOUR_COMPLETED_STEPS = "GUIDED_TOUR_COMPLETED_STEPS";
516
+ const GUIDED_TOUR_CURRENT_STEP = "GUIDED_TOUR_CURRENT_STEP";
517
+ const GUIDED_TOUR_SKIPPED = "GUIDED_TOUR_SKIPPED";
518
+ const [GuidedTourProviderImpl, useGuidedTour] = createContext("GuidedTour");
519
+ const GuidedTourProvider = ({ children }) => {
520
+ const [{ currentStep, guidedTourState, isGuidedTourVisible, isSkipped }, dispatch] = React.useReducer(reducer$1, initialState, initialiseState);
521
+ const setCurrentStep = (step) => {
522
+ if (step !== null) {
523
+ const isStepAlreadyDone = get(guidedTourState, step);
524
+ const [sectionName, stepName] = step.split(".");
525
+ const sectionArray = Object.entries(guidedTourState[sectionName]);
526
+ const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName);
527
+ const previousSteps = sectionArray.slice(0, currentStepIndex);
528
+ const isStepToShow = previousSteps.every(([, sectionValue]) => sectionValue);
529
+ if (isStepAlreadyDone || isSkipped || !isStepToShow) {
530
+ return null;
531
+ }
532
+ }
533
+ window.localStorage.setItem(GUIDED_TOUR_CURRENT_STEP, JSON.stringify(null));
534
+ return dispatch({
535
+ type: "SET_CURRENT_STEP",
536
+ step
537
+ });
538
+ };
539
+ const setGuidedTourVisibility = (value) => {
540
+ dispatch({
541
+ type: "SET_GUIDED_TOUR_VISIBILITY",
542
+ value
543
+ });
544
+ };
545
+ const setStepState = (currentStep2, value) => {
546
+ addCompletedStep(currentStep2);
547
+ dispatch({
548
+ type: "SET_STEP_STATE",
549
+ currentStep: currentStep2,
550
+ value
551
+ });
552
+ };
553
+ const startSection = (sectionName) => {
554
+ const sectionSteps = guidedTourState[sectionName];
555
+ if (sectionSteps) {
556
+ const guidedTourArray = Object.entries(guidedTourState);
557
+ const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName);
558
+ const previousSections = guidedTourArray.slice(0, currentSectionIndex);
559
+ const isSectionToShow = previousSections.every(
560
+ ([, sectionValue]) => Object.values(sectionValue).every(Boolean)
561
+ );
562
+ const [firstStep] = Object.keys(sectionSteps);
563
+ const isFirstStepDone = sectionSteps[firstStep];
564
+ if (isSectionToShow && !currentStep && !isFirstStepDone) {
565
+ setCurrentStep(`${sectionName}.${firstStep}`);
566
+ }
567
+ }
568
+ };
569
+ const setSkipped = (value) => {
570
+ window.localStorage.setItem(GUIDED_TOUR_SKIPPED, JSON.stringify(value));
571
+ dispatch({
572
+ type: "SET_SKIPPED",
573
+ value
574
+ });
575
+ };
576
+ return /* @__PURE__ */ jsx(
577
+ GuidedTourProviderImpl,
578
+ {
579
+ guidedTourState,
580
+ currentStep,
581
+ setCurrentStep,
582
+ setGuidedTourVisibility,
583
+ setSkipped,
584
+ setStepState,
585
+ startSection,
586
+ isGuidedTourVisible,
587
+ isSkipped,
588
+ children
589
+ }
590
+ );
591
+ };
592
+ const initialState = {
593
+ currentStep: null,
594
+ guidedTourState: {
595
+ contentTypeBuilder: {
596
+ create: false,
597
+ success: false
598
+ },
599
+ contentManager: {
600
+ create: false,
601
+ success: false
602
+ },
603
+ apiTokens: {
604
+ create: false,
605
+ success: false
606
+ },
607
+ transferTokens: {
608
+ create: false,
609
+ success: false
610
+ }
611
+ },
612
+ isGuidedTourVisible: false,
613
+ isSkipped: false
614
+ };
615
+ const reducer$1 = (state = initialState, action) => produce(state, (draftState) => {
616
+ switch (action.type) {
617
+ case "SET_CURRENT_STEP": {
618
+ draftState.currentStep = action.step;
619
+ break;
343
620
  }
344
621
  case "SET_STEP_STATE": {
345
622
  const [section, step] = action.currentStep.split(".");
@@ -416,7 +693,7 @@ const Providers = ({ children, strapi, store }) => {
416
693
  components: strapi.library.components,
417
694
  customFields: strapi.customFields,
418
695
  fields: strapi.library.fields,
419
- menu: strapi.menu,
696
+ menu: strapi.router.menu,
420
697
  getAdminInjectedComponents: strapi.getAdminInjectedComponents,
421
698
  getPlugin: strapi.getPlugin,
422
699
  plugins: strapi.plugins,
@@ -424,7 +701,7 @@ const Providers = ({ children, strapi, store }) => {
424
701
  runHookParallel: strapi.runHookParallel,
425
702
  runHookWaterfall: (name, initialValue) => strapi.runHookWaterfall(name, initialValue, store),
426
703
  runHookSeries: strapi.runHookSeries,
427
- settings: strapi.settings,
704
+ settings: strapi.router.settings,
428
705
  children: /* @__PURE__ */ jsx(Provider$1, { store, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(AuthProvider, { children: /* @__PURE__ */ jsx(HistoryProvider, { children: /* @__PURE__ */ jsx(LanguageProvider, { messages: strapi.configurations.translations, children: /* @__PURE__ */ jsx(Theme, { themes: strapi.configurations.themes, children: /* @__PURE__ */ jsx(NotificationsProvider, { children: /* @__PURE__ */ jsx(TrackingProvider, { children: /* @__PURE__ */ jsx(GuidedTourProvider, { children: /* @__PURE__ */ jsx(
429
706
  ConfigurationProvider,
430
707
  {
@@ -449,8 +726,6 @@ const App = ({ strapi, store }) => {
449
726
  return /* @__PURE__ */ jsx(Providers, { strapi, store, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Outlet, {}) }) });
450
727
  };
451
728
 
452
- 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";
453
-
454
729
  const useClipboard = () => {
455
730
  const copy = useCallback(async (value) => {
456
731
  try {
@@ -552,390 +827,245 @@ const ErrorType = styled(Typography)`
552
827
  color: ${({ theme }) => theme.colors.danger600};
553
828
  `;
554
829
 
555
- const ADMIN_PERMISSIONS_CE = {
556
- contentManager: {
557
- main: [],
558
- collectionTypesConfigurations: [
559
- {
560
- action: "plugin::content-manager.collection-types.configure-view",
561
- subject: null
562
- }
563
- ],
564
- componentsConfigurations: [
565
- {
566
- action: "plugin::content-manager.components.configure-layout",
567
- subject: null
568
- }
569
- ],
570
- singleTypesConfigurations: [
571
- {
572
- action: "plugin::content-manager.single-types.configure-view",
573
- subject: null
574
- }
575
- ]
576
- },
577
- marketplace: {
578
- main: [{ action: "admin::marketplace.read", subject: null }],
579
- read: [{ action: "admin::marketplace.read", subject: null }]
580
- },
581
- settings: {
582
- roles: {
583
- main: [
584
- { action: "admin::roles.create", subject: null },
585
- { action: "admin::roles.update", subject: null },
586
- { action: "admin::roles.read", subject: null },
587
- { action: "admin::roles.delete", subject: null }
588
- ],
589
- create: [{ action: "admin::roles.create", subject: null }],
590
- delete: [{ action: "admin::roles.delete", subject: null }],
591
- read: [{ action: "admin::roles.read", subject: null }],
592
- update: [{ action: "admin::roles.update", subject: null }]
593
- },
594
- users: {
595
- main: [
596
- { action: "admin::users.create", subject: null },
597
- { action: "admin::users.read", subject: null },
598
- { action: "admin::users.update", subject: null },
599
- { action: "admin::users.delete", subject: null }
600
- ],
601
- create: [{ action: "admin::users.create", subject: null }],
602
- delete: [{ action: "admin::users.delete", subject: null }],
603
- read: [{ action: "admin::users.read", subject: null }],
604
- update: [{ action: "admin::users.update", subject: null }]
605
- },
606
- webhooks: {
607
- main: [
608
- { action: "admin::webhooks.create", subject: null },
609
- { action: "admin::webhooks.read", subject: null },
610
- { action: "admin::webhooks.update", subject: null },
611
- { action: "admin::webhooks.delete", subject: null }
612
- ],
613
- create: [{ action: "admin::webhooks.create", subject: null }],
614
- delete: [{ action: "admin::webhooks.delete", subject: null }],
615
- read: [
616
- { action: "admin::webhooks.read", subject: null },
617
- // NOTE: We need to check with the API
618
- { action: "admin::webhooks.update", subject: null },
619
- { action: "admin::webhooks.delete", subject: null }
620
- ],
621
- update: [{ action: "admin::webhooks.update", subject: null }]
622
- },
623
- "api-tokens": {
624
- main: [{ action: "admin::api-tokens.access", subject: null }],
625
- create: [{ action: "admin::api-tokens.create", subject: null }],
626
- delete: [{ action: "admin::api-tokens.delete", subject: null }],
627
- read: [{ action: "admin::api-tokens.read", subject: null }],
628
- update: [{ action: "admin::api-tokens.update", subject: null }],
629
- regenerate: [{ action: "admin::api-tokens.regenerate", subject: null }]
630
- },
631
- "transfer-tokens": {
632
- main: [{ action: "admin::transfer.tokens.access", subject: null }],
633
- create: [{ action: "admin::transfer.tokens.create", subject: null }],
634
- delete: [{ action: "admin::transfer.tokens.delete", subject: null }],
635
- read: [{ action: "admin::transfer.tokens.read", subject: null }],
636
- update: [{ action: "admin::transfer.tokens.update", subject: null }],
637
- regenerate: [{ action: "admin::transfer.tokens.regenerate", subject: null }]
638
- },
639
- "project-settings": {
640
- read: [{ action: "admin::project-settings.read", subject: null }],
641
- update: [{ action: "admin::project-settings.update", subject: null }]
642
- }
830
+ const ActionLayout = ({ startActions, endActions }) => {
831
+ if (!startActions && !endActions) {
832
+ return null;
643
833
  }
834
+ return /* @__PURE__ */ jsxs(
835
+ Flex,
836
+ {
837
+ justifyContent: "space-between",
838
+ alignItems: "flex-start",
839
+ paddingBottom: 4,
840
+ paddingLeft: 10,
841
+ paddingRight: 10,
842
+ children: [
843
+ /* @__PURE__ */ jsx(Flex, { gap: 2, wrap: "wrap", children: startActions }),
844
+ /* @__PURE__ */ jsx(Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
845
+ ]
846
+ }
847
+ );
644
848
  };
645
- const HOOKS = {
646
- /**
647
- * Hook that allows to mutate the displayed headers of the list view table
648
- * @constant
649
- * @type {string}
650
- */
651
- INJECT_COLUMN_IN_TABLE: "Admin/CM/pages/ListView/inject-column-in-table",
652
- /**
653
- * Hook that allows to mutate the CM's collection types links pre-set filters
654
- * @constant
655
- * @type {string}
656
- */
657
- MUTATE_COLLECTION_TYPES_LINKS: "Admin/CM/pages/App/mutate-collection-types-links",
658
- /**
659
- * Hook that allows to mutate the CM's edit view layout
660
- * @constant
661
- * @type {string}
662
- */
663
- MUTATE_EDIT_VIEW_LAYOUT: "Admin/CM/pages/EditView/mutate-edit-view-layout",
664
- /**
665
- * Hook that allows to mutate the CM's single types links pre-set filters
666
- * @constant
667
- * @type {string}
668
- */
669
- MUTATE_SINGLE_TYPES_LINKS: "Admin/CM/pages/App/mutate-single-types-links"
849
+
850
+ const ContentLayout = ({ children }) => {
851
+ return /* @__PURE__ */ jsx(Box, { paddingLeft: 10, paddingRight: 10, children });
670
852
  };
671
- const SETTINGS_LINKS_CE = () => ({
672
- global: [
673
- {
674
- intlLabel: { id: "Settings.application.title", defaultMessage: "Overview" },
675
- to: "/settings/application-infos",
676
- id: "000-application-infos"
677
- },
678
- {
679
- intlLabel: { id: "Settings.webhooks.title", defaultMessage: "Webhooks" },
680
- to: "/settings/webhooks",
681
- id: "webhooks"
682
- },
683
- {
684
- intlLabel: { id: "Settings.apiTokens.title", defaultMessage: "API Tokens" },
685
- to: "/settings/api-tokens?sort=name:ASC",
686
- id: "api-tokens"
687
- },
688
- {
689
- intlLabel: { id: "Settings.transferTokens.title", defaultMessage: "Transfer Tokens" },
690
- to: "/settings/transfer-tokens?sort=name:ASC",
691
- id: "transfer-tokens"
692
- },
693
- // 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.
694
- // Disable this by adding "promoteEE: false" to your `./config/admin.js` file
695
- ...!window.strapi.features.isEnabled(window.strapi.features.SSO) && window.strapi?.flags?.promoteEE ? [
696
- {
697
- intlLabel: { id: "Settings.sso.title", defaultMessage: "Single Sign-On" },
698
- to: "/settings/purchase-single-sign-on",
699
- id: "sso-purchase-page",
700
- licenseOnly: true
701
- }
702
- ] : []
703
- ],
704
- admin: [
705
- {
706
- intlLabel: { id: "global.roles", defaultMessage: "Roles" },
707
- to: "/settings/roles",
708
- id: "roles"
709
- },
710
- {
711
- intlLabel: { id: "global.users", defaultMessage: "Users" },
712
- // Init the search params directly
713
- to: "/settings/users?pageSize=10&page=1&sort=firstname",
714
- id: "users"
715
- },
716
- ...!window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) && window.strapi?.flags?.promoteEE ? [
717
- {
718
- intlLabel: { id: "global.auditLogs", defaultMessage: "Audit Logs" },
719
- to: "/settings/purchase-audit-logs",
720
- id: "auditLogs-purchase-page",
721
- licenseOnly: true
722
- }
723
- ] : []
724
- ]
725
- });
726
853
 
727
- const ALLOWED_TYPES = [
728
- "biginteger",
729
- "boolean",
730
- "date",
731
- "datetime",
732
- "decimal",
733
- "email",
734
- "enumeration",
735
- "float",
736
- "integer",
737
- "json",
738
- "password",
739
- "richtext",
740
- "string",
741
- "text",
742
- "time",
743
- "uid"
744
- ];
745
- const ALLOWED_ROOT_LEVEL_OPTIONS = [
746
- "min",
747
- "minLength",
748
- "max",
749
- "maxLength",
750
- "required",
751
- "regex",
752
- "enum",
753
- "unique",
754
- "private",
755
- "default"
756
- ];
757
- class CustomFields {
758
- customFields;
759
- constructor() {
760
- this.customFields = {};
761
- }
762
- register = (customFields) => {
763
- if (Array.isArray(customFields)) {
764
- customFields.forEach((customField) => {
765
- this.register(customField);
766
- });
767
- } else {
768
- const { name, pluginId, type, intlLabel, intlDescription, components, options } = customFields;
769
- invariant(name, "A name must be provided");
770
- invariant(type, "A type must be provided");
771
- invariant(intlLabel, "An intlLabel must be provided");
772
- invariant(intlDescription, "An intlDescription must be provided");
773
- invariant(components, "A components object must be provided");
774
- invariant(components.Input, "An Input component must be provided");
775
- invariant(
776
- ALLOWED_TYPES.includes(type),
777
- `Custom field type: '${type}' is not a valid Strapi type or it can't be used with a Custom Field`
778
- );
779
- const isValidObjectKey = /^(?![0-9])[a-zA-Z0-9$_-]+$/g;
780
- invariant(
781
- isValidObjectKey.test(name),
782
- `Custom field name: '${name}' is not a valid object key`
854
+ const GridColSize = {
855
+ S: 180,
856
+ M: 250
857
+ };
858
+ const StyledGrid = styled(Box)`
859
+ display: grid;
860
+ grid-template-columns: repeat(
861
+ auto-fit,
862
+ minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
863
+ );
864
+ grid-gap: ${({ theme }) => theme.spaces[4]};
865
+ `;
866
+ const GridLayout = ({ size, children }) => {
867
+ return /* @__PURE__ */ jsx(StyledGrid, { $size: size, children });
868
+ };
869
+
870
+ const BaseHeaderLayout = React.forwardRef(
871
+ ({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
872
+ const isSubtitleString = typeof subtitle === "string";
873
+ if (sticky) {
874
+ return /* @__PURE__ */ jsx(
875
+ Box,
876
+ {
877
+ paddingLeft: 6,
878
+ paddingRight: 6,
879
+ paddingTop: 3,
880
+ paddingBottom: 3,
881
+ position: "fixed",
882
+ top: 0,
883
+ right: 0,
884
+ background: "neutral0",
885
+ shadow: "tableShadow",
886
+ width: `${width}rem`,
887
+ zIndex: 1,
888
+ "data-strapi-header-sticky": true,
889
+ children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
890
+ /* @__PURE__ */ jsxs(Flex, { children: [
891
+ navigationAction && /* @__PURE__ */ jsx(Box, { paddingRight: 3, children: navigationAction }),
892
+ /* @__PURE__ */ jsxs(Box, { children: [
893
+ /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "h1", ...props, children: title }),
894
+ isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
895
+ ] }),
896
+ secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
897
+ ] }),
898
+ /* @__PURE__ */ jsx(Flex, { children: primaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
899
+ ] })
900
+ }
783
901
  );
784
- const allFormOptions = [...options?.base || [], ...options?.advanced || []];
785
- if (allFormOptions.length) {
786
- const optionPathValidations = allFormOptions.reduce(optionsValidationReducer, []);
787
- optionPathValidations.forEach(({ isValidOptionPath, errorMessage }) => {
788
- invariant(isValidOptionPath, errorMessage);
789
- });
902
+ }
903
+ return /* @__PURE__ */ jsxs(
904
+ Box,
905
+ {
906
+ ref,
907
+ paddingLeft: 10,
908
+ paddingRight: 10,
909
+ paddingBottom: 8,
910
+ paddingTop: navigationAction ? 6 : 8,
911
+ background: "neutral100",
912
+ "data-strapi-header": true,
913
+ children: [
914
+ navigationAction ? /* @__PURE__ */ jsx(Box, { paddingBottom: 2, children: navigationAction }) : null,
915
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
916
+ /* @__PURE__ */ jsxs(Flex, { minWidth: 0, children: [
917
+ /* @__PURE__ */ jsx(Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
918
+ secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
919
+ ] }),
920
+ primaryAction
921
+ ] }),
922
+ isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
923
+ ]
790
924
  }
791
- const uid = pluginId ? `plugin::${pluginId}.${name}` : `global::${name}`;
792
- const uidAlreadyUsed = Object.prototype.hasOwnProperty.call(this.customFields, uid);
793
- invariant(!uidAlreadyUsed, `Custom field: '${uid}' has already been registered`);
794
- this.customFields[uid] = customFields;
795
- }
796
- };
797
- getAll = () => {
798
- return this.customFields;
799
- };
800
- get = (uid) => {
801
- return this.customFields[uid];
802
- };
803
- }
804
- const optionsValidationReducer = (acc, option) => {
805
- if ("items" in option) {
806
- return option.items.reduce(optionsValidationReducer, acc);
807
- }
808
- if (!option.name) {
809
- acc.push({
810
- isValidOptionPath: false,
811
- errorMessage: "The 'name' property is required on an options object"
812
- });
813
- } else {
814
- acc.push({
815
- isValidOptionPath: option.name.startsWith("options") || ALLOWED_ROOT_LEVEL_OPTIONS.includes(option.name),
816
- errorMessage: `'${option.name}' must be prefixed with 'options.'`
817
- });
818
- }
819
- return acc;
820
- };
821
-
822
- class Plugin {
823
- apis;
824
- initializer;
825
- injectionZones;
826
- isReady;
827
- name;
828
- pluginId;
829
- constructor(pluginConf) {
830
- this.apis = pluginConf.apis || {};
831
- this.initializer = pluginConf.initializer || null;
832
- this.injectionZones = pluginConf.injectionZones || {};
833
- this.isReady = pluginConf.isReady !== void 0 ? pluginConf.isReady : true;
834
- this.name = pluginConf.name;
835
- this.pluginId = pluginConf.id;
925
+ );
836
926
  }
837
- getInjectedComponents(containerName, blockName) {
838
- try {
839
- return this.injectionZones[containerName][blockName] || [];
840
- } catch (err) {
841
- console.error("Cannot get injected component", err);
842
- return [];
927
+ );
928
+ const HeaderLayout = (props) => {
929
+ const baseHeaderLayoutRef = React.useRef(null);
930
+ const [headerSize, setHeaderSize] = React.useState(null);
931
+ const [containerRef, isVisible] = useElementOnScreen({
932
+ root: null,
933
+ rootMargin: "0px",
934
+ threshold: 0
935
+ });
936
+ useResizeObserver(containerRef, () => {
937
+ if (containerRef.current) {
938
+ setHeaderSize(containerRef.current.getBoundingClientRect());
843
939
  }
844
- }
845
- injectComponent(containerName, blockName, component) {
846
- try {
847
- this.injectionZones[containerName][blockName].push(component);
848
- } catch (err) {
849
- console.error("Cannot inject component", err);
940
+ });
941
+ React.useEffect(() => {
942
+ if (baseHeaderLayoutRef.current) {
943
+ setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
850
944
  }
851
- }
852
- }
853
-
854
- const staticReducers = {
855
- [adminApi.reducerPath]: adminApi.reducer,
856
- admin_app: reducer$3
945
+ }, [baseHeaderLayoutRef]);
946
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
947
+ /* @__PURE__ */ jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
948
+ !isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
949
+ ] });
857
950
  };
858
- const injectReducerStoreEnhancer = (appReducers) => (next) => (...args) => {
859
- const store = next(...args);
860
- const asyncReducers = {};
861
- return {
862
- ...store,
863
- asyncReducers,
864
- injectReducer: (key, asyncReducer) => {
865
- asyncReducers[key] = asyncReducer;
866
- store.replaceReducer(
867
- // @ts-expect-error we dynamically add reducers which makes the types uncomfortable.
868
- combineReducers({
869
- ...appReducers,
870
- ...asyncReducers
871
- })
872
- );
873
- }
951
+ HeaderLayout.displayName = "HeaderLayout";
952
+ const useElementOnScreen = (options) => {
953
+ const containerRef = React.useRef(null);
954
+ const [isVisible, setIsVisible] = React.useState(true);
955
+ const callback = ([entry]) => {
956
+ setIsVisible(entry.isIntersecting);
874
957
  };
958
+ React.useEffect(() => {
959
+ const containerEl = containerRef.current;
960
+ const observer = new IntersectionObserver(callback, options);
961
+ if (containerEl) {
962
+ observer.observe(containerRef.current);
963
+ }
964
+ return () => {
965
+ if (containerEl) {
966
+ observer.disconnect();
967
+ }
968
+ };
969
+ }, [containerRef, options]);
970
+ return [containerRef, isVisible];
875
971
  };
876
- const configureStoreImpl = (preloadedState = {}, appMiddlewares = [], injectedReducers = {}) => {
877
- const coreReducers = { ...staticReducers, ...injectedReducers };
878
- const defaultMiddlewareOptions = {};
879
- if (process.env.NODE_ENV === "test") {
880
- defaultMiddlewareOptions.serializableCheck = false;
881
- defaultMiddlewareOptions.immutableCheck = false;
882
- }
883
- const store = configureStore({
884
- preloadedState: {
885
- admin_app: preloadedState.admin_app
886
- },
887
- reducer: coreReducers,
888
- devTools: process.env.NODE_ENV !== "production",
889
- middleware: (getDefaultMiddleware) => [
890
- ...getDefaultMiddleware(defaultMiddlewareOptions),
891
- adminApi.middleware,
892
- ...appMiddlewares.map((m) => m())
893
- ],
894
- enhancers: [injectReducerStoreEnhancer(coreReducers)]
895
- });
896
- return store;
972
+ const useResizeObserver = (sources, onResize) => {
973
+ const handleResize = useCallbackRef(onResize);
974
+ React.useLayoutEffect(() => {
975
+ const resizeObs = new ResizeObserver(handleResize);
976
+ if (Array.isArray(sources)) {
977
+ sources.forEach((source) => {
978
+ if (source.current) {
979
+ resizeObs.observe(source.current);
980
+ }
981
+ });
982
+ } else if (sources.current) {
983
+ resizeObs.observe(sources.current);
984
+ }
985
+ return () => {
986
+ resizeObs.disconnect();
987
+ };
988
+ }, [sources, handleResize]);
897
989
  };
898
990
 
899
- const getBasename = () => (process.env.ADMIN_PATH ?? "").replace(window.location.origin, "");
991
+ const GridContainer = styled(Box)`
992
+ display: grid;
993
+ grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
994
+ `;
995
+ const OverflowingItem = styled(Box)`
996
+ overflow-x: hidden;
997
+ `;
998
+ const RootLayout = ({ sideNav, children }) => {
999
+ return /* @__PURE__ */ jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
1000
+ sideNav,
1001
+ /* @__PURE__ */ jsx(OverflowingItem, { paddingBottom: 10, children })
1002
+ ] });
1003
+ };
1004
+ const Layouts = {
1005
+ Root: RootLayout,
1006
+ Header: HeaderLayout,
1007
+ BaseHeader: BaseHeaderLayout,
1008
+ Grid: GridLayout,
1009
+ Action: ActionLayout,
1010
+ Content: ContentLayout
1011
+ };
900
1012
 
901
- const createHook = () => {
902
- const _handlers = [];
903
- return {
904
- register(fn) {
905
- _handlers.push(fn);
906
- },
907
- delete(handler) {
908
- _handlers.splice(_handlers.indexOf(handler), 1);
909
- },
910
- runWaterfall(args, store) {
911
- return _handlers.reduce((acc, fn) => fn(acc, store), args);
912
- },
913
- async runWaterfallAsync(args, store) {
914
- let result = args;
915
- for (const fn of _handlers) {
916
- result = await fn(result, store);
1013
+ const NotFoundPage = () => {
1014
+ const { formatMessage } = useIntl();
1015
+ return /* @__PURE__ */ jsxs(Page.Main, { labelledBy: "title", children: [
1016
+ /* @__PURE__ */ jsx(
1017
+ Layouts.Header,
1018
+ {
1019
+ id: "title",
1020
+ title: formatMessage({
1021
+ id: "content-manager.pageNotFound",
1022
+ defaultMessage: "Page not found"
1023
+ })
917
1024
  }
918
- return result;
919
- },
920
- runSeries(...args) {
921
- return _handlers.map((fn) => fn(...args));
922
- },
923
- async runSeriesAsync(...args) {
924
- const result = [];
925
- for (const fn of _handlers) {
926
- result.push(await fn(...args));
1025
+ ),
1026
+ /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsx(
1027
+ EmptyStateLayout,
1028
+ {
1029
+ action: /* @__PURE__ */ jsx(LinkButton, { tag: Link$1, variant: "secondary", endIcon: /* @__PURE__ */ jsx(ArrowRight, {}), to: "/", children: formatMessage({
1030
+ id: "app.components.NotFoundPage.back",
1031
+ defaultMessage: "Back to homepage"
1032
+ }) }),
1033
+ content: formatMessage({
1034
+ id: "app.page.not.found",
1035
+ defaultMessage: "Oops! We can't seem to find the page you're looging for..."
1036
+ }),
1037
+ hasRadius: true,
1038
+ icon: /* @__PURE__ */ jsx(EmptyPictures, { width: "16rem" }),
1039
+ shadow: "tableShadow"
1040
+ }
1041
+ ) })
1042
+ ] });
1043
+ };
1044
+
1045
+ const getEERoutes = () => [
1046
+ ...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) ? [
1047
+ {
1048
+ path: "audit-logs",
1049
+ lazy: async () => {
1050
+ const { ProtectedListPage } = await import('./ListPage-WvDXi585.mjs');
1051
+ return {
1052
+ Component: ProtectedListPage
1053
+ };
927
1054
  }
928
- return result;
929
- },
930
- runParallel(...args) {
931
- return Promise.all(
932
- _handlers.map((fn) => {
933
- return fn(...args);
934
- })
935
- );
936
1055
  }
937
- };
938
- };
1056
+ ] : [],
1057
+ ...window.strapi.features.isEnabled(window.strapi.features.SSO) ? [
1058
+ {
1059
+ path: "single-sign-on",
1060
+ lazy: async () => {
1061
+ const { ProtectedSSO } = await import('./SingleSignOnPage-WY9MZfnN.mjs');
1062
+ return {
1063
+ Component: ProtectedSSO
1064
+ };
1065
+ }
1066
+ }
1067
+ ] : []
1068
+ ];
939
1069
 
940
1070
  function getIn(obj, key, def, pathStartIndex = 0) {
941
1071
  const path = toPath(key);
@@ -1516,7 +1646,7 @@ const DateInput = forwardRef(
1516
1646
  field.onChange(name, date);
1517
1647
  },
1518
1648
  onClear: () => field.onChange(name, void 0),
1519
- value,
1649
+ value: value ? convertLocalDateToUTCDate(value) : void 0,
1520
1650
  ...props
1521
1651
  }
1522
1652
  ),
@@ -1525,6 +1655,12 @@ const DateInput = forwardRef(
1525
1655
  ] });
1526
1656
  }
1527
1657
  );
1658
+ const convertLocalDateToUTCDate = (date) => {
1659
+ const utcDateString = date.toISOString();
1660
+ const timeZone = getLocalTimeZone();
1661
+ const zonedDateTime = parseAbsolute(utcDateString, timeZone);
1662
+ return toCalendarDate(zonedDateTime).toDate("UTC");
1663
+ };
1528
1664
  const MemoizedDateInput = memo(DateInput);
1529
1665
 
1530
1666
  const DateTimeInput = forwardRef(
@@ -1774,7 +1910,7 @@ const TimeInput = forwardRef(
1774
1910
  ref: composedRefs,
1775
1911
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
1776
1912
  onChange: (time) => {
1777
- field.onChange(name, time);
1913
+ field.onChange(name, `${time}:00.000`);
1778
1914
  },
1779
1915
  onClear: () => field.onChange(name, void 0),
1780
1916
  value: field.value ?? "",
@@ -2951,11 +3087,11 @@ const AuthPage = () => {
2951
3087
  const { hasAdmin } = data ?? {};
2952
3088
  const Login$1 = useEnterprise(
2953
3089
  Login,
2954
- async () => (await import('./Login-ngKWBSD4.mjs')).LoginEE
3090
+ async () => (await import('./Login-qvyDXOZp.mjs')).LoginEE
2955
3091
  );
2956
3092
  const forms = useEnterprise(
2957
3093
  FORMS,
2958
- async () => (await import('./constants-ThodPHfR.mjs')).FORMS,
3094
+ async () => (await import('./constants-lyc5iHQ_.mjs')).FORMS,
2959
3095
  {
2960
3096
  combine(ceForms, eeForms) {
2961
3097
  return {
@@ -2965,255 +3101,40 @@ const AuthPage = () => {
2965
3101
  },
2966
3102
  defaultValue: FORMS
2967
3103
  }
2968
- );
2969
- const { token } = useAuth("AuthPage", (auth) => auth);
2970
- if (!authType || !forms) {
2971
- return /* @__PURE__ */ jsx(Navigate, { to: "/" });
2972
- }
2973
- const Component = forms[authType];
2974
- if (!Component || hasAdmin && authType === "register-admin" || token) {
2975
- return /* @__PURE__ */ jsx(Navigate, { to: "/" });
2976
- }
2977
- if (!hasAdmin && authType !== "register-admin") {
2978
- return /* @__PURE__ */ jsx(
2979
- Navigate,
2980
- {
2981
- to: {
2982
- pathname: "/auth/register-admin",
2983
- // Forward the `?redirectTo` from /auth/login
2984
- // /abc => /auth/login?redirectTo=%2Fabc => /auth/register-admin?redirectTo=%2Fabc
2985
- search
2986
- }
2987
- }
2988
- );
2989
- }
2990
- if (Login$1 && authType === "login") {
2991
- return /* @__PURE__ */ jsx(Login$1, {});
2992
- } else if (authType === "login" && !Login$1) {
2993
- return null;
2994
- }
2995
- return /* @__PURE__ */ jsx(Component, { hasAdmin });
2996
- };
2997
-
2998
- const ActionLayout = ({ startActions, endActions }) => {
2999
- if (!startActions && !endActions) {
3000
- return null;
3001
- }
3002
- return /* @__PURE__ */ jsxs(
3003
- Flex,
3004
- {
3005
- justifyContent: "space-between",
3006
- alignItems: "flex-start",
3007
- paddingBottom: 4,
3008
- paddingLeft: 10,
3009
- paddingRight: 10,
3010
- children: [
3011
- /* @__PURE__ */ jsx(Flex, { gap: 2, wrap: "wrap", children: startActions }),
3012
- /* @__PURE__ */ jsx(Flex, { gap: 2, shrink: 0, wrap: "wrap", children: endActions })
3013
- ]
3014
- }
3015
- );
3016
- };
3017
-
3018
- const ContentLayout = ({ children }) => {
3019
- return /* @__PURE__ */ jsx(Box, { paddingLeft: 10, paddingRight: 10, children });
3020
- };
3021
-
3022
- const GridColSize = {
3023
- S: 180,
3024
- M: 250
3025
- };
3026
- const StyledGrid = styled(Box)`
3027
- display: grid;
3028
- grid-template-columns: repeat(
3029
- auto-fit,
3030
- minmax(${({ $size }) => `${GridColSize[$size]}px`}, 1fr)
3031
- );
3032
- grid-gap: ${({ theme }) => theme.spaces[4]};
3033
- `;
3034
- const GridLayout = ({ size, children }) => {
3035
- return /* @__PURE__ */ jsx(StyledGrid, { $size: size, children });
3036
- };
3037
-
3038
- const BaseHeaderLayout = React.forwardRef(
3039
- ({ navigationAction, primaryAction, secondaryAction, subtitle, title, sticky, width, ...props }, ref) => {
3040
- const isSubtitleString = typeof subtitle === "string";
3041
- if (sticky) {
3042
- return /* @__PURE__ */ jsx(
3043
- Box,
3044
- {
3045
- paddingLeft: 6,
3046
- paddingRight: 6,
3047
- paddingTop: 3,
3048
- paddingBottom: 3,
3049
- position: "fixed",
3050
- top: 0,
3051
- right: 0,
3052
- background: "neutral0",
3053
- shadow: "tableShadow",
3054
- width: `${width}rem`,
3055
- zIndex: 1,
3056
- "data-strapi-header-sticky": true,
3057
- children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
3058
- /* @__PURE__ */ jsxs(Flex, { children: [
3059
- navigationAction && /* @__PURE__ */ jsx(Box, { paddingRight: 3, children: navigationAction }),
3060
- /* @__PURE__ */ jsxs(Box, { children: [
3061
- /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "h1", ...props, children: title }),
3062
- isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: subtitle }) : subtitle
3063
- ] }),
3064
- secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
3065
- ] }),
3066
- /* @__PURE__ */ jsx(Flex, { children: primaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 2, children: primaryAction }) : void 0 })
3067
- ] })
3068
- }
3069
- );
3070
- }
3071
- return /* @__PURE__ */ jsxs(
3072
- Box,
3073
- {
3074
- ref,
3075
- paddingLeft: 10,
3076
- paddingRight: 10,
3077
- paddingBottom: 8,
3078
- paddingTop: navigationAction ? 6 : 8,
3079
- background: "neutral100",
3080
- "data-strapi-header": true,
3081
- children: [
3082
- navigationAction ? /* @__PURE__ */ jsx(Box, { paddingBottom: 2, children: navigationAction }) : null,
3083
- /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
3084
- /* @__PURE__ */ jsxs(Flex, { minWidth: 0, children: [
3085
- /* @__PURE__ */ jsx(Typography, { tag: "h1", variant: "alpha", ...props, children: title }),
3086
- secondaryAction ? /* @__PURE__ */ jsx(Box, { paddingLeft: 4, children: secondaryAction }) : null
3087
- ] }),
3088
- primaryAction
3089
- ] }),
3090
- isSubtitleString ? /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", tag: "p", children: subtitle }) : subtitle
3091
- ]
3092
- }
3093
- );
3094
- }
3095
- );
3096
- const HeaderLayout = (props) => {
3097
- const baseHeaderLayoutRef = React.useRef(null);
3098
- const [headerSize, setHeaderSize] = React.useState(null);
3099
- const [containerRef, isVisible] = useElementOnScreen({
3100
- root: null,
3101
- rootMargin: "0px",
3102
- threshold: 0
3103
- });
3104
- useResizeObserver(containerRef, () => {
3105
- if (containerRef.current) {
3106
- setHeaderSize(containerRef.current.getBoundingClientRect());
3107
- }
3108
- });
3109
- React.useEffect(() => {
3110
- if (baseHeaderLayoutRef.current) {
3111
- setHeaderSize(baseHeaderLayoutRef.current.getBoundingClientRect());
3112
- }
3113
- }, [baseHeaderLayoutRef]);
3114
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3115
- /* @__PURE__ */ jsx("div", { style: { height: headerSize?.height }, ref: containerRef, children: isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ref: baseHeaderLayoutRef, ...props }) }),
3116
- !isVisible && /* @__PURE__ */ jsx(BaseHeaderLayout, { ...props, sticky: true, width: headerSize?.width })
3117
- ] });
3118
- };
3119
- HeaderLayout.displayName = "HeaderLayout";
3120
- const useElementOnScreen = (options) => {
3121
- const containerRef = React.useRef(null);
3122
- const [isVisible, setIsVisible] = React.useState(true);
3123
- const callback = ([entry]) => {
3124
- setIsVisible(entry.isIntersecting);
3125
- };
3126
- React.useEffect(() => {
3127
- const containerEl = containerRef.current;
3128
- const observer = new IntersectionObserver(callback, options);
3129
- if (containerEl) {
3130
- observer.observe(containerRef.current);
3131
- }
3132
- return () => {
3133
- if (containerEl) {
3134
- observer.disconnect();
3135
- }
3136
- };
3137
- }, [containerRef, options]);
3138
- return [containerRef, isVisible];
3139
- };
3140
- const useResizeObserver = (sources, onResize) => {
3141
- const handleResize = useCallbackRef(onResize);
3142
- React.useLayoutEffect(() => {
3143
- const resizeObs = new ResizeObserver(handleResize);
3144
- if (Array.isArray(sources)) {
3145
- sources.forEach((source) => {
3146
- if (source.current) {
3147
- resizeObs.observe(source.current);
3148
- }
3149
- });
3150
- } else if (sources.current) {
3151
- resizeObs.observe(sources.current);
3152
- }
3153
- return () => {
3154
- resizeObs.disconnect();
3155
- };
3156
- }, [sources, handleResize]);
3157
- };
3158
-
3159
- const GridContainer = styled(Box)`
3160
- display: grid;
3161
- grid-template-columns: ${({ $hasSideNav }) => $hasSideNav ? `auto 1fr` : "1fr"};
3162
- `;
3163
- const OverflowingItem = styled(Box)`
3164
- overflow-x: hidden;
3165
- `;
3166
- const RootLayout = ({ sideNav, children }) => {
3167
- return /* @__PURE__ */ jsxs(GridContainer, { $hasSideNav: Boolean(sideNav), children: [
3168
- sideNav,
3169
- /* @__PURE__ */ jsx(OverflowingItem, { paddingBottom: 10, children })
3170
- ] });
3171
- };
3172
- const Layouts = {
3173
- Root: RootLayout,
3174
- Header: HeaderLayout,
3175
- BaseHeader: BaseHeaderLayout,
3176
- Grid: GridLayout,
3177
- Action: ActionLayout,
3178
- Content: ContentLayout
3179
- };
3180
-
3181
- const NotFoundPage = () => {
3182
- const { formatMessage } = useIntl();
3183
- return /* @__PURE__ */ jsxs(Page.Main, { labelledBy: "title", children: [
3184
- /* @__PURE__ */ jsx(
3185
- Layouts.Header,
3186
- {
3187
- id: "title",
3188
- title: formatMessage({
3189
- id: "content-manager.pageNotFound",
3190
- defaultMessage: "Page not found"
3191
- })
3192
- }
3193
- ),
3194
- /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsx(
3195
- EmptyStateLayout,
3104
+ );
3105
+ const { token } = useAuth("AuthPage", (auth) => auth);
3106
+ if (!authType || !forms) {
3107
+ return /* @__PURE__ */ jsx(Navigate, { to: "/" });
3108
+ }
3109
+ const Component = forms[authType];
3110
+ if (!Component || hasAdmin && authType === "register-admin" || token) {
3111
+ return /* @__PURE__ */ jsx(Navigate, { to: "/" });
3112
+ }
3113
+ if (!hasAdmin && authType !== "register-admin") {
3114
+ return /* @__PURE__ */ jsx(
3115
+ Navigate,
3196
3116
  {
3197
- action: /* @__PURE__ */ jsx(LinkButton, { tag: Link$1, variant: "secondary", endIcon: /* @__PURE__ */ jsx(ArrowRight, {}), to: "/", children: formatMessage({
3198
- id: "app.components.NotFoundPage.back",
3199
- defaultMessage: "Back to homepage"
3200
- }) }),
3201
- content: formatMessage({
3202
- id: "app.page.not.found",
3203
- defaultMessage: "Oops! We can't seem to find the page you're looging for..."
3204
- }),
3205
- hasRadius: true,
3206
- icon: /* @__PURE__ */ jsx(EmptyPictures, { width: "16rem" }),
3207
- shadow: "tableShadow"
3117
+ to: {
3118
+ pathname: "/auth/register-admin",
3119
+ // Forward the `?redirectTo` from /auth/login
3120
+ // /abc => /auth/login?redirectTo=%2Fabc => /auth/register-admin?redirectTo=%2Fabc
3121
+ search
3122
+ }
3208
3123
  }
3209
- ) })
3210
- ] });
3124
+ );
3125
+ }
3126
+ if (Login$1 && authType === "login") {
3127
+ return /* @__PURE__ */ jsx(Login$1, {});
3128
+ } else if (authType === "login" && !Login$1) {
3129
+ return null;
3130
+ }
3131
+ return /* @__PURE__ */ jsx(Component, { hasAdmin });
3211
3132
  };
3212
3133
 
3213
3134
  const ROUTES_CE = [
3214
3135
  {
3215
3136
  lazy: async () => {
3216
- const { ProtectedListPage } = await import('./ListPage-xQbMtUpV.mjs');
3137
+ const { ProtectedListPage } = await import('./ListPage-jhOQGhI7.mjs');
3217
3138
  return {
3218
3139
  Component: ProtectedListPage
3219
3140
  };
@@ -3222,7 +3143,7 @@ const ROUTES_CE = [
3222
3143
  },
3223
3144
  {
3224
3145
  lazy: async () => {
3225
- const { ProtectedCreatePage } = await import('./CreatePage-6pIItf4z.mjs');
3146
+ const { ProtectedCreatePage } = await import('./CreatePage-SkKjFqP6.mjs');
3226
3147
  return {
3227
3148
  Component: ProtectedCreatePage
3228
3149
  };
@@ -3231,7 +3152,7 @@ const ROUTES_CE = [
3231
3152
  },
3232
3153
  {
3233
3154
  lazy: async () => {
3234
- const { ProtectedCreatePage } = await import('./CreatePage-6pIItf4z.mjs');
3155
+ const { ProtectedCreatePage } = await import('./CreatePage-SkKjFqP6.mjs');
3235
3156
  return {
3236
3157
  Component: ProtectedCreatePage
3237
3158
  };
@@ -3240,7 +3161,7 @@ const ROUTES_CE = [
3240
3161
  },
3241
3162
  {
3242
3163
  lazy: async () => {
3243
- const { ProtectedEditPage } = await import('./EditPage-tmpterlY.mjs');
3164
+ const { ProtectedEditPage } = await import('./EditPage-SVzJI-dH.mjs');
3244
3165
  return {
3245
3166
  Component: ProtectedEditPage
3246
3167
  };
@@ -3249,7 +3170,7 @@ const ROUTES_CE = [
3249
3170
  },
3250
3171
  {
3251
3172
  lazy: async () => {
3252
- const { ProtectedListPage } = await import('./ListPage-Ur-kwyVv.mjs');
3173
+ const { ProtectedListPage } = await import('./ListPage-SY0bk22Q.mjs');
3253
3174
  return {
3254
3175
  Component: ProtectedListPage
3255
3176
  };
@@ -3258,7 +3179,7 @@ const ROUTES_CE = [
3258
3179
  },
3259
3180
  {
3260
3181
  lazy: async () => {
3261
- const { ProtectedEditPage } = await import('./EditPage-tUvaZzFe.mjs');
3182
+ const { ProtectedEditPage } = await import('./EditPage-bDO4OJc8.mjs');
3262
3183
  return {
3263
3184
  Component: ProtectedEditPage
3264
3185
  };
@@ -3267,7 +3188,7 @@ const ROUTES_CE = [
3267
3188
  },
3268
3189
  {
3269
3190
  lazy: async () => {
3270
- const { ProtectedCreatePage } = await import('./CreatePage-4gOQVUMq.mjs');
3191
+ const { ProtectedCreatePage } = await import('./CreatePage-P0Nz_ayl.mjs');
3271
3192
  return {
3272
3193
  Component: ProtectedCreatePage
3273
3194
  };
@@ -3276,7 +3197,7 @@ const ROUTES_CE = [
3276
3197
  },
3277
3198
  {
3278
3199
  lazy: async () => {
3279
- const { ProtectedEditPage } = await import('./EditPage-JPZ7c-8x.mjs').then(n => n.b);
3200
+ const { ProtectedEditPage } = await import('./EditPage-arCsYBox.mjs').then(n => n.b);
3280
3201
  return {
3281
3202
  Component: ProtectedEditPage
3282
3203
  };
@@ -3285,7 +3206,7 @@ const ROUTES_CE = [
3285
3206
  },
3286
3207
  {
3287
3208
  lazy: async () => {
3288
- const { ProtectedListPage } = await import('./ListPage-gl3tUWS8.mjs');
3209
+ const { ProtectedListPage } = await import('./ListPage-2nnKxEVE.mjs');
3289
3210
  return {
3290
3211
  Component: ProtectedListPage
3291
3212
  };
@@ -3294,7 +3215,7 @@ const ROUTES_CE = [
3294
3215
  },
3295
3216
  {
3296
3217
  lazy: async () => {
3297
- const { ProtectedListView } = await import('./ListView-Drn22JZ1.mjs');
3218
+ const { ProtectedListView } = await import('./ListView-mObmenTh.mjs');
3298
3219
  return {
3299
3220
  Component: ProtectedListView
3300
3221
  };
@@ -3303,68 +3224,482 @@ const ROUTES_CE = [
3303
3224
  },
3304
3225
  {
3305
3226
  lazy: async () => {
3306
- const { ProtectedCreateView } = await import('./CreateView-3cLNRlgO.mjs');
3227
+ const { ProtectedCreateView } = await import('./CreateView-ClT1OHUe.mjs');
3228
+ return {
3229
+ Component: ProtectedCreateView
3230
+ };
3231
+ },
3232
+ path: "api-tokens/create"
3233
+ },
3234
+ {
3235
+ lazy: async () => {
3236
+ const { ProtectedEditView } = await import('./EditViewPage-KAIuwIw2.mjs');
3237
+ return {
3238
+ Component: ProtectedEditView
3239
+ };
3240
+ },
3241
+ path: "api-tokens/:id"
3242
+ },
3243
+ {
3244
+ lazy: async () => {
3245
+ const { ProtectedCreateView } = await import('./CreateView-PuVH0YQf.mjs');
3307
3246
  return {
3308
3247
  Component: ProtectedCreateView
3309
3248
  };
3310
3249
  },
3311
- path: "api-tokens/create"
3312
- },
3313
- {
3314
- lazy: async () => {
3315
- const { ProtectedEditView } = await import('./EditViewPage-bnTbQJ_O.mjs');
3316
- return {
3317
- Component: ProtectedEditView
3318
- };
3250
+ path: "transfer-tokens/create"
3251
+ },
3252
+ {
3253
+ lazy: async () => {
3254
+ const { ProtectedListView } = await import('./ListView-QlFkFf_V.mjs');
3255
+ return {
3256
+ Component: ProtectedListView
3257
+ };
3258
+ },
3259
+ path: "transfer-tokens"
3260
+ },
3261
+ {
3262
+ lazy: async () => {
3263
+ const { ProtectedEditView } = await import('./EditView-nfJOf2A4.mjs');
3264
+ return {
3265
+ Component: ProtectedEditView
3266
+ };
3267
+ },
3268
+ path: "transfer-tokens/:id"
3269
+ },
3270
+ {
3271
+ lazy: async () => {
3272
+ const { PurchaseAuditLogs } = await import('./PurchaseAuditLogs-6_ie0YzN.mjs');
3273
+ return {
3274
+ Component: PurchaseAuditLogs
3275
+ };
3276
+ },
3277
+ path: "purchase-audit-logs"
3278
+ },
3279
+ {
3280
+ lazy: async () => {
3281
+ const { PurchaseSingleSignOn } = await import('./PurchaseSingleSignOn--iKPscMp.mjs');
3282
+ return {
3283
+ Component: PurchaseSingleSignOn
3284
+ };
3285
+ },
3286
+ path: "purchase-single-sign-on"
3287
+ }
3288
+ ];
3289
+
3290
+ const getImmutableRoutes = () => [
3291
+ {
3292
+ path: "usecase",
3293
+ lazy: async () => {
3294
+ const { PrivateUseCasePage } = await import('./UseCasePage-ehZx7Rwd.mjs');
3295
+ return {
3296
+ Component: PrivateUseCasePage
3297
+ };
3298
+ }
3299
+ },
3300
+ // this needs to go before auth/:authType because otherwise it won't match the route
3301
+ ...getEERoutes$1(),
3302
+ {
3303
+ path: "auth/:authType",
3304
+ element: /* @__PURE__ */ jsx(AuthPage, {})
3305
+ }
3306
+ ];
3307
+ const getInitialRoutes = () => [
3308
+ {
3309
+ index: true,
3310
+ lazy: async () => {
3311
+ const { HomePage } = await import('./HomePage-pgsuFIh7.mjs');
3312
+ return {
3313
+ Component: HomePage
3314
+ };
3315
+ }
3316
+ },
3317
+ {
3318
+ path: "me",
3319
+ lazy: async () => {
3320
+ const { ProfilePage } = await import('./ProfilePage-oTScHwyK.mjs');
3321
+ return {
3322
+ Component: ProfilePage
3323
+ };
3324
+ }
3325
+ },
3326
+ {
3327
+ path: "list-plugins",
3328
+ lazy: async () => {
3329
+ const { ProtectedInstalledPluginsPage } = await import('./InstalledPluginsPage-uHFuUx41.mjs');
3330
+ return {
3331
+ Component: ProtectedInstalledPluginsPage
3332
+ };
3333
+ }
3334
+ },
3335
+ {
3336
+ path: "marketplace",
3337
+ lazy: async () => {
3338
+ const { ProtectedMarketplacePage } = await import('./MarketplacePage-3Z3e-oDS.mjs');
3339
+ return {
3340
+ Component: ProtectedMarketplacePage
3341
+ };
3342
+ }
3343
+ },
3344
+ {
3345
+ path: "settings/*",
3346
+ lazy: async () => {
3347
+ const { Layout } = await import('./Layout-6zLg6LxH.mjs');
3348
+ return {
3349
+ Component: Layout
3350
+ };
3351
+ },
3352
+ children: [
3353
+ {
3354
+ path: "application-infos",
3355
+ lazy: async () => {
3356
+ const { ApplicationInfoPage } = await import('./ApplicationInfoPage-e-khXcZQ.mjs');
3357
+ return {
3358
+ Component: ApplicationInfoPage
3359
+ };
3360
+ }
3361
+ },
3362
+ // ...Object.values(this.settings).flatMap(({ links }) =>
3363
+ // links.map(({ to, Component }) => ({
3364
+ // path: `${to}/*`,
3365
+ // element: (
3366
+ // <React.Suspense fallback={<Page.Loading />}>
3367
+ // <Component />
3368
+ // </React.Suspense>
3369
+ // ),
3370
+ // }))
3371
+ // ),
3372
+ ...[...getEERoutes(), ...ROUTES_CE].filter(
3373
+ (route, index, refArray) => refArray.findIndex((obj) => obj.path === route.path) === index
3374
+ )
3375
+ ]
3376
+ }
3377
+ ];
3378
+
3379
+ class Router {
3380
+ _routes = [];
3381
+ router = null;
3382
+ _menu = [];
3383
+ _settings = {
3384
+ global: {
3385
+ id: "global",
3386
+ intlLabel: {
3387
+ id: "Settings.global",
3388
+ defaultMessage: "Global Settings"
3389
+ },
3390
+ links: []
3391
+ }
3392
+ };
3393
+ constructor(initialRoutes) {
3394
+ this._routes = initialRoutes;
3395
+ }
3396
+ get routes() {
3397
+ return this._routes;
3398
+ }
3399
+ get menu() {
3400
+ return this._menu;
3401
+ }
3402
+ get settings() {
3403
+ return this._settings;
3404
+ }
3405
+ /**
3406
+ * @internal This method is used internally by Strapi to create the router.
3407
+ * It should not be used by plugins, doing so will likely break the application.
3408
+ */
3409
+ createRouter(strapi, { memory, ...opts } = {}) {
3410
+ const routes = [
3411
+ {
3412
+ path: "/*",
3413
+ errorElement: /* @__PURE__ */ jsx(Provider$1, { store: strapi.store, children: /* @__PURE__ */ jsx(LanguageProvider, { messages: strapi.configurations.translations, children: /* @__PURE__ */ jsx(Theme, { themes: strapi.configurations.themes, children: /* @__PURE__ */ jsx(ErrorElement, {}) }) }) }),
3414
+ element: /* @__PURE__ */ jsx(App, { strapi, store: strapi.store }),
3415
+ children: [
3416
+ ...getImmutableRoutes(),
3417
+ {
3418
+ path: "/*",
3419
+ lazy: async () => {
3420
+ const { PrivateAdminLayout } = await import('./AuthenticatedLayout-Ou5qhSr4.mjs');
3421
+ return {
3422
+ Component: PrivateAdminLayout
3423
+ };
3424
+ },
3425
+ children: [
3426
+ ...this.routes,
3427
+ {
3428
+ path: "*",
3429
+ element: /* @__PURE__ */ jsx(NotFoundPage, {})
3430
+ }
3431
+ ]
3432
+ }
3433
+ ]
3434
+ }
3435
+ ];
3436
+ if (memory) {
3437
+ this.router = createMemoryRouter(routes, opts);
3438
+ } else {
3439
+ this.router = createBrowserRouter(routes, opts);
3440
+ }
3441
+ return this.router;
3442
+ }
3443
+ addMenuLink = (link) => {
3444
+ invariant(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3445
+ invariant(
3446
+ typeof link.to === "string",
3447
+ `[${link.intlLabel.defaultMessage}]: Expected link.to to be a string instead received ${typeof link.to}`
3448
+ );
3449
+ invariant(
3450
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3451
+ `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage should be defined`
3452
+ );
3453
+ invariant(
3454
+ !link.Component || link.Component && typeof link.Component === "function",
3455
+ `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise that returns a default component. Please use: \`Component: () => import(path)\` instead.`
3456
+ );
3457
+ if (!link.Component || link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3458
+ link.Component[Symbol.toStringTag] === "AsyncFunction") {
3459
+ console.warn(
3460
+ `
3461
+ [${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.
3462
+ `.trim()
3463
+ );
3464
+ }
3465
+ if (link.to.startsWith("/")) {
3466
+ console.warn(
3467
+ `[${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.`
3468
+ );
3469
+ link.to = link.to.slice(1);
3470
+ }
3471
+ const { Component, ...restLink } = link;
3472
+ if (Component) {
3473
+ this._routes.push({
3474
+ path: `${link.to}/*`,
3475
+ lazy: async () => {
3476
+ const mod = await Component();
3477
+ if ("default" in mod) {
3478
+ return { Component: mod.default };
3479
+ } else {
3480
+ return { Component: mod };
3481
+ }
3482
+ }
3483
+ });
3484
+ }
3485
+ this.menu.push(restLink);
3486
+ };
3487
+ addSettingsLink(section, link) {
3488
+ if (typeof section === "object" && "links" in section) {
3489
+ invariant(section.id, "section.id should be defined");
3490
+ invariant(
3491
+ section.intlLabel?.id && section.intlLabel?.defaultMessage,
3492
+ "section.intlLabel should be defined"
3493
+ );
3494
+ invariant(this.settings[section.id] === void 0, "A similar section already exists");
3495
+ invariant(Array.isArray(section.links), "TypeError expected links to be an array");
3496
+ this.settings[section.id] = { ...section, links: [] };
3497
+ section.links.forEach((link2) => {
3498
+ this.createSettingsLink(section.id, link2);
3499
+ });
3500
+ } else if (typeof section === "object" && link) {
3501
+ invariant(section.id, "section.id should be defined");
3502
+ invariant(
3503
+ section.intlLabel?.id && section.intlLabel?.defaultMessage,
3504
+ "section.intlLabel should be defined"
3505
+ );
3506
+ invariant(this.settings[section.id] === void 0, "A similar section already exists");
3507
+ this.settings[section.id] = { ...section, links: [] };
3508
+ if (Array.isArray(link)) {
3509
+ link.forEach((l) => this.createSettingsLink(section.id, l));
3510
+ } else {
3511
+ this.createSettingsLink(section.id, link);
3512
+ }
3513
+ } else if (typeof section === "string" && link) {
3514
+ if (Array.isArray(link)) {
3515
+ link.forEach((l) => this.createSettingsLink(section, l));
3516
+ } else {
3517
+ this.createSettingsLink(section, link);
3518
+ }
3519
+ } else {
3520
+ throw new Error(
3521
+ "Invalid arguments provided to addSettingsLink, at minimum a sectionId and link are required."
3522
+ );
3523
+ }
3524
+ }
3525
+ createSettingsLink = (sectionId, link) => {
3526
+ invariant(this._settings[sectionId], "The section does not exist");
3527
+ invariant(link.id, `[${link.intlLabel.defaultMessage}]: link.id should be defined`);
3528
+ invariant(
3529
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3530
+ `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage`
3531
+ );
3532
+ invariant(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3533
+ invariant(
3534
+ !link.Component || link.Component && typeof link.Component === "function",
3535
+ `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise. Please use: \`Component: () => import(path)\` instead.`
3536
+ );
3537
+ if (!link.Component || link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3538
+ link.Component[Symbol.toStringTag] === "AsyncFunction") {
3539
+ console.warn(
3540
+ `
3541
+ [${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.
3542
+ `.trim()
3543
+ );
3544
+ }
3545
+ if (link.to.startsWith("/")) {
3546
+ console.warn(
3547
+ `[${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.`
3548
+ );
3549
+ link.to = link.to.slice(1);
3550
+ }
3551
+ if (link.to.split("/")[0] === "settings") {
3552
+ console.warn(
3553
+ `[${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.`
3554
+ );
3555
+ link.to = link.to.split("/").slice(1).join("/");
3556
+ }
3557
+ const { Component, ...restLink } = link;
3558
+ const settingsIndex = this._routes.findIndex((route) => route.path === "settings/*");
3559
+ if (!settingsIndex) {
3560
+ console.warn(
3561
+ "A third party plugin has removed the settings section, the settings link cannot be added."
3562
+ );
3563
+ return;
3564
+ } else if (!this._routes[settingsIndex].children) {
3565
+ this._routes[settingsIndex].children = [];
3566
+ }
3567
+ if (Component) {
3568
+ this._routes[settingsIndex].children.push({
3569
+ path: `${link.to}/*`,
3570
+ lazy: async () => {
3571
+ const mod = await Component();
3572
+ if ("default" in mod) {
3573
+ return { Component: mod.default };
3574
+ } else {
3575
+ return { Component: mod };
3576
+ }
3577
+ }
3578
+ });
3579
+ }
3580
+ this._settings[sectionId].links.push(restLink);
3581
+ };
3582
+ /**
3583
+ * @alpha
3584
+ * @description Adds a route or an array of routes to the router.
3585
+ * Otherwise, pass a function that receives the current routes and
3586
+ * returns the new routes in a reducer like fashion.
3587
+ */
3588
+ addRoute(route) {
3589
+ if (Array.isArray(route)) {
3590
+ this._routes = [...this._routes, ...route];
3591
+ } else if (typeof route === "object" && route !== null) {
3592
+ this._routes.push(route);
3593
+ } else if (typeof route === "function") {
3594
+ this._routes = route(this._routes);
3595
+ } else {
3596
+ throw new Error(
3597
+ `Expected the \`route\` passed to \`addRoute\` to be an array or a function, but received ${getPrintableType(
3598
+ route
3599
+ )}`
3600
+ );
3601
+ }
3602
+ }
3603
+ }
3604
+ const getPrintableType = (value) => {
3605
+ const nativeType = typeof value;
3606
+ if (nativeType === "object") {
3607
+ if (value === null)
3608
+ return "null";
3609
+ if (Array.isArray(value))
3610
+ return "array";
3611
+ if (value instanceof Object && value.constructor.name !== "Object") {
3612
+ return value.constructor.name;
3613
+ }
3614
+ }
3615
+ return nativeType;
3616
+ };
3617
+
3618
+ const staticReducers = {
3619
+ [adminApi.reducerPath]: adminApi.reducer,
3620
+ admin_app: reducer$3
3621
+ };
3622
+ const injectReducerStoreEnhancer = (appReducers) => (next) => (...args) => {
3623
+ const store = next(...args);
3624
+ const asyncReducers = {};
3625
+ return {
3626
+ ...store,
3627
+ asyncReducers,
3628
+ injectReducer: (key, asyncReducer) => {
3629
+ asyncReducers[key] = asyncReducer;
3630
+ store.replaceReducer(
3631
+ // @ts-expect-error we dynamically add reducers which makes the types uncomfortable.
3632
+ combineReducers({
3633
+ ...appReducers,
3634
+ ...asyncReducers
3635
+ })
3636
+ );
3637
+ }
3638
+ };
3639
+ };
3640
+ const configureStoreImpl = (preloadedState = {}, appMiddlewares = [], injectedReducers = {}) => {
3641
+ const coreReducers = { ...staticReducers, ...injectedReducers };
3642
+ const defaultMiddlewareOptions = {};
3643
+ if (process.env.NODE_ENV === "test") {
3644
+ defaultMiddlewareOptions.serializableCheck = false;
3645
+ defaultMiddlewareOptions.immutableCheck = false;
3646
+ }
3647
+ const store = configureStore({
3648
+ preloadedState: {
3649
+ admin_app: preloadedState.admin_app
3650
+ },
3651
+ reducer: coreReducers,
3652
+ devTools: process.env.NODE_ENV !== "production",
3653
+ middleware: (getDefaultMiddleware) => [
3654
+ ...getDefaultMiddleware(defaultMiddlewareOptions),
3655
+ adminApi.middleware,
3656
+ ...appMiddlewares.map((m) => m())
3657
+ ],
3658
+ enhancers: [injectReducerStoreEnhancer(coreReducers)]
3659
+ });
3660
+ return store;
3661
+ };
3662
+
3663
+ const getBasename = () => (process.env.ADMIN_PATH ?? "").replace(window.location.origin, "");
3664
+
3665
+ const createHook = () => {
3666
+ const _handlers = [];
3667
+ return {
3668
+ register(fn) {
3669
+ _handlers.push(fn);
3319
3670
  },
3320
- path: "api-tokens/:id"
3321
- },
3322
- {
3323
- lazy: async () => {
3324
- const { ProtectedCreateView } = await import('./CreateView-aMz4KfSZ.mjs');
3325
- return {
3326
- Component: ProtectedCreateView
3327
- };
3671
+ delete(handler) {
3672
+ _handlers.splice(_handlers.indexOf(handler), 1);
3328
3673
  },
3329
- path: "transfer-tokens/create"
3330
- },
3331
- {
3332
- lazy: async () => {
3333
- const { ProtectedListView } = await import('./ListView-geMTlhDN.mjs');
3334
- return {
3335
- Component: ProtectedListView
3336
- };
3674
+ runWaterfall(args, store) {
3675
+ return _handlers.reduce((acc, fn) => fn(acc, store), args);
3337
3676
  },
3338
- path: "transfer-tokens"
3339
- },
3340
- {
3341
- lazy: async () => {
3342
- const { ProtectedEditView } = await import('./EditView-HjYkw6Y_.mjs');
3343
- return {
3344
- Component: ProtectedEditView
3345
- };
3677
+ async runWaterfallAsync(args, store) {
3678
+ let result = args;
3679
+ for (const fn of _handlers) {
3680
+ result = await fn(result, store);
3681
+ }
3682
+ return result;
3346
3683
  },
3347
- path: "transfer-tokens/:id"
3348
- },
3349
- {
3350
- lazy: async () => {
3351
- const { PurchaseAuditLogs } = await import('./PurchaseAuditLogs-tpXbhCx-.mjs');
3352
- return {
3353
- Component: PurchaseAuditLogs
3354
- };
3684
+ runSeries(...args) {
3685
+ return _handlers.map((fn) => fn(...args));
3355
3686
  },
3356
- path: "purchase-audit-logs"
3357
- },
3358
- {
3359
- lazy: async () => {
3360
- const { PurchaseSingleSignOn } = await import('./PurchaseSingleSignOn-6VTPjJVO.mjs');
3361
- return {
3362
- Component: PurchaseSingleSignOn
3363
- };
3687
+ async runSeriesAsync(...args) {
3688
+ const result = [];
3689
+ for (const fn of _handlers) {
3690
+ result.push(await fn(...args));
3691
+ }
3692
+ return result;
3364
3693
  },
3365
- path: "purchase-single-sign-on"
3366
- }
3367
- ];
3694
+ runParallel(...args) {
3695
+ return Promise.all(
3696
+ _handlers.map((fn) => {
3697
+ return fn(...args);
3698
+ })
3699
+ );
3700
+ }
3701
+ };
3702
+ };
3368
3703
 
3369
3704
  const languageNativeNames = {
3370
3705
  ar: "العربية",
@@ -3417,20 +3752,6 @@ class StrapiApp {
3417
3752
  injectionZones: {}
3418
3753
  };
3419
3754
  translations = {};
3420
- /**
3421
- * MENU API
3422
- */
3423
- menu = [];
3424
- settings = {
3425
- global: {
3426
- id: "global",
3427
- intlLabel: {
3428
- id: "Settings.global",
3429
- defaultMessage: "Global Settings"
3430
- },
3431
- links: []
3432
- }
3433
- };
3434
3755
  configurations = {
3435
3756
  authLogo: StrapiLogo,
3436
3757
  head: { favicon: "" },
@@ -3445,12 +3766,14 @@ class StrapiApp {
3445
3766
  * APIs
3446
3767
  */
3447
3768
  rbac = new RBAC();
3769
+ router;
3448
3770
  library = {
3449
3771
  components: {},
3450
3772
  fields: {}
3451
3773
  };
3452
3774
  middlewares = [];
3453
3775
  reducers = {};
3776
+ store = null;
3454
3777
  customFields = new CustomFields();
3455
3778
  constructor({ config, appPlugins } = {}) {
3456
3779
  this.appPlugins = appPlugins || {};
@@ -3459,6 +3782,7 @@ class StrapiApp {
3459
3782
  this.createHook(MUTATE_COLLECTION_TYPES_LINKS);
3460
3783
  this.createHook(MUTATE_SINGLE_TYPES_LINKS);
3461
3784
  this.createHook(MUTATE_EDIT_VIEW_LAYOUT);
3785
+ this.router = new Router(getInitialRoutes());
3462
3786
  }
3463
3787
  addComponents = (components) => {
3464
3788
  if (Array.isArray(components)) {
@@ -3486,46 +3810,6 @@ class StrapiApp {
3486
3810
  this.library.fields[fields.type] = fields.Component;
3487
3811
  }
3488
3812
  };
3489
- addMenuLink = (link) => {
3490
- invariant(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3491
- invariant(
3492
- typeof link.to === "string",
3493
- `[${link.intlLabel.defaultMessage}]: Expected link.to to be a string instead received ${typeof link.to}`
3494
- );
3495
- invariant(
3496
- link.intlLabel?.id && link.intlLabel?.defaultMessage,
3497
- `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage should be defined`
3498
- );
3499
- invariant(
3500
- link.Component && typeof link.Component === "function",
3501
- `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise that returns a default component. Please use: \`Component: () => import(path)\` instead.`
3502
- );
3503
- if (link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3504
- link.Component[Symbol.toStringTag] === "AsyncFunction") {
3505
- console.warn(
3506
- `
3507
- [${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.
3508
- `.trim()
3509
- );
3510
- }
3511
- if (link.to.startsWith("/")) {
3512
- console.warn(
3513
- `[${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.`
3514
- );
3515
- link.to = link.to.slice(1);
3516
- }
3517
- this.menu.push({
3518
- ...link,
3519
- Component: React.lazy(async () => {
3520
- const mod = await link.Component();
3521
- if ("default" in mod) {
3522
- return mod;
3523
- } else {
3524
- return { default: mod };
3525
- }
3526
- })
3527
- });
3528
- };
3529
3813
  addMiddlewares = (middlewares) => {
3530
3814
  middlewares.forEach((middleware) => {
3531
3815
  this.middlewares.push(middleware);
@@ -3543,56 +3827,22 @@ class StrapiApp {
3543
3827
  this.reducers[name] = reducer;
3544
3828
  });
3545
3829
  };
3546
- addSettingsLink = (sectionId, link) => {
3547
- invariant(this.settings[sectionId], "The section does not exist");
3548
- invariant(link.id, `[${link.intlLabel.defaultMessage}]: link.id should be defined`);
3549
- invariant(
3550
- link.intlLabel?.id && link.intlLabel?.defaultMessage,
3551
- `[${link.intlLabel.defaultMessage}]: link.intlLabel.id & link.intlLabel.defaultMessage`
3552
- );
3553
- invariant(link.to, `[${link.intlLabel.defaultMessage}]: link.to should be defined`);
3554
- invariant(
3555
- link.Component && typeof link.Component === "function",
3556
- `[${link.intlLabel.defaultMessage}]: link.Component must be a function returning a Promise. Please use: \`Component: () => import(path)\` instead.`
3557
- );
3558
- if (link.Component && typeof link.Component === "function" && // @ts-expect-error – shh
3559
- link.Component[Symbol.toStringTag] === "AsyncFunction") {
3560
- console.warn(
3561
- `
3562
- [${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.
3563
- `.trim()
3564
- );
3565
- }
3566
- if (link.to.startsWith("/")) {
3567
- console.warn(
3568
- `[${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.`
3569
- );
3570
- link.to = link.to.slice(1);
3571
- }
3572
- if (link.to.split("/")[0] === "settings") {
3573
- console.warn(
3574
- `[${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.`
3575
- );
3576
- link.to = link.to.split("/").slice(1).join("/");
3577
- }
3578
- this.settings[sectionId].links.push({
3579
- ...link,
3580
- Component: React.lazy(async () => {
3581
- const mod = await link.Component();
3582
- if ("default" in mod) {
3583
- return mod;
3584
- } else {
3585
- return { default: mod };
3586
- }
3587
- })
3588
- });
3589
- };
3830
+ addMenuLink = (link) => this.router.addMenuLink(link);
3831
+ /**
3832
+ * @deprecated use `addSettingsLink` instead, it internally supports
3833
+ * adding multiple links at once.
3834
+ */
3590
3835
  addSettingsLinks = (sectionId, links) => {
3591
- invariant(this.settings[sectionId], "The section does not exist");
3592
3836
  invariant(Array.isArray(links), "TypeError expected links to be an array");
3593
- links.forEach((link) => {
3594
- this.addSettingsLink(sectionId, link);
3595
- });
3837
+ this.router.addSettingsLink(sectionId, links);
3838
+ };
3839
+ /**
3840
+ * @deprecated use `addSettingsLink` instead, you can pass a section object to
3841
+ * create the section and links at the same time.
3842
+ */
3843
+ createSettingSection = (section, links) => this.router.addSettingsLink(section, links);
3844
+ addSettingsLink = (sectionId, link) => {
3845
+ this.router.addSettingsLink(sectionId, link);
3596
3846
  };
3597
3847
  async bootstrap(customBootstrap) {
3598
3848
  Object.keys(this.appPlugins).forEach((plugin) => {
@@ -3659,19 +3909,6 @@ class StrapiApp {
3659
3909
  createHook = (name) => {
3660
3910
  this.hooksDict[name] = createHook();
3661
3911
  };
3662
- createSettingSection = (section, links) => {
3663
- invariant(section.id, "section.id should be defined");
3664
- invariant(
3665
- section.intlLabel?.id && section.intlLabel?.defaultMessage,
3666
- "section.intlLabel should be defined"
3667
- );
3668
- invariant(Array.isArray(links), "TypeError expected links to be an array");
3669
- invariant(this.settings[section.id] === void 0, "A similar section already exists");
3670
- this.settings[section.id] = { ...section, links: [] };
3671
- links.forEach((link) => {
3672
- this.addSettingsLink(section.id, link);
3673
- });
3674
- };
3675
3912
  getAdminInjectedComponents = (moduleName, containerName, blockName) => {
3676
3913
  try {
3677
3914
  return this.admin.injectionZones[moduleName][containerName][blockName] || [];
@@ -3681,10 +3918,13 @@ class StrapiApp {
3681
3918
  }
3682
3919
  };
3683
3920
  getPlugin = (pluginId) => this.plugins[pluginId];
3684
- async register() {
3921
+ async register(customRegister) {
3685
3922
  Object.keys(this.appPlugins).forEach((plugin) => {
3686
3923
  this.appPlugins[plugin].register(this);
3687
3924
  });
3925
+ if (isFunction(customRegister)) {
3926
+ customRegister(this);
3927
+ }
3688
3928
  }
3689
3929
  async loadAdminTrads() {
3690
3930
  const adminLocales = await Promise.all(
@@ -3764,7 +4004,7 @@ class StrapiApp {
3764
4004
  render() {
3765
4005
  const localeNames = pick(languageNativeNames, this.configurations.locales || []);
3766
4006
  const locale = localStorage.getItem(LANGUAGE_LOCAL_STORAGE_KEY) || "en";
3767
- const store = configureStoreImpl(
4007
+ this.store = configureStoreImpl(
3768
4008
  {
3769
4009
  admin_app: {
3770
4010
  permissions: merge({}, ADMIN_PERMISSIONS_CE, ADMIN_PERMISSIONS_EE),
@@ -3781,120 +4021,9 @@ class StrapiApp {
3781
4021
  this.middlewares,
3782
4022
  this.reducers
3783
4023
  );
3784
- const settingsRoutes = [...getEERoutes(), ...ROUTES_CE].filter(
3785
- (route, index, refArray) => refArray.findIndex((obj) => obj.path === route.path) === index
3786
- );
3787
- const router = createBrowserRouter(
3788
- [
3789
- {
3790
- path: "/*",
3791
- errorElement: /* @__PURE__ */ jsx(Provider$1, { store, children: /* @__PURE__ */ jsx(LanguageProvider, { messages: this.configurations.translations, children: /* @__PURE__ */ jsx(Theme, { themes: this.configurations.themes, children: /* @__PURE__ */ jsx(ErrorElement, {}) }) }) }),
3792
- element: /* @__PURE__ */ jsx(App, { strapi: this, store }),
3793
- children: [
3794
- {
3795
- path: "usecase",
3796
- lazy: async () => {
3797
- const { PrivateUseCasePage } = await import('./UseCasePage-QsvlJAQD.mjs');
3798
- return {
3799
- Component: PrivateUseCasePage
3800
- };
3801
- }
3802
- },
3803
- // this needs to go before auth/:authType because otherwise it won't match the route
3804
- ...getEERoutes$1(),
3805
- {
3806
- path: "auth/:authType",
3807
- element: /* @__PURE__ */ jsx(AuthPage, {})
3808
- },
3809
- {
3810
- path: "/*",
3811
- lazy: async () => {
3812
- const { PrivateAdminLayout } = await import('./AuthenticatedLayout-lXbF2KKJ.mjs');
3813
- return {
3814
- Component: PrivateAdminLayout
3815
- };
3816
- },
3817
- children: [
3818
- {
3819
- index: true,
3820
- lazy: async () => {
3821
- const { HomePage } = await import('./HomePage--Mskxb9Z.mjs');
3822
- return {
3823
- Component: HomePage
3824
- };
3825
- }
3826
- },
3827
- {
3828
- path: "me",
3829
- lazy: async () => {
3830
- const { ProfilePage } = await import('./ProfilePage-Q5UpeDjs.mjs');
3831
- return {
3832
- Component: ProfilePage
3833
- };
3834
- }
3835
- },
3836
- {
3837
- path: "list-plugins",
3838
- lazy: async () => {
3839
- const { ProtectedInstalledPluginsPage } = await import('./InstalledPluginsPage-EtnkMG0G.mjs');
3840
- return {
3841
- Component: ProtectedInstalledPluginsPage
3842
- };
3843
- }
3844
- },
3845
- {
3846
- path: "marketplace",
3847
- lazy: async () => {
3848
- const { ProtectedMarketplacePage } = await import('./MarketplacePage-Pk9USes6.mjs');
3849
- return {
3850
- Component: ProtectedMarketplacePage
3851
- };
3852
- }
3853
- },
3854
- {
3855
- path: "settings/*",
3856
- lazy: async () => {
3857
- const { Layout } = await import('./Layout-9EvJq4Gc.mjs');
3858
- return {
3859
- Component: Layout
3860
- };
3861
- },
3862
- children: [
3863
- {
3864
- path: "application-infos",
3865
- lazy: async () => {
3866
- const { ApplicationInfoPage } = await import('./ApplicationInfoPage-bfXW7lrq.mjs');
3867
- return {
3868
- Component: ApplicationInfoPage
3869
- };
3870
- }
3871
- },
3872
- ...Object.values(this.settings).flatMap(
3873
- ({ links }) => links.map(({ to, Component }) => ({
3874
- path: `${to}/*`,
3875
- element: /* @__PURE__ */ jsx(React.Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Component, {}) })
3876
- }))
3877
- ),
3878
- ...settingsRoutes
3879
- ]
3880
- },
3881
- ...this.menu.map(({ to, Component }) => ({
3882
- path: `${to}/*`,
3883
- element: /* @__PURE__ */ jsx(React.Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Component, {}) })
3884
- })),
3885
- {
3886
- path: "*",
3887
- element: /* @__PURE__ */ jsx(NotFoundPage, {})
3888
- }
3889
- ]
3890
- }
3891
- ]
3892
- }
3893
- ],
3894
- {
3895
- basename: getBasename()
3896
- }
3897
- );
4024
+ const router = this.router.createRouter(this, {
4025
+ basename: getBasename()
4026
+ });
3898
4027
  return /* @__PURE__ */ jsx(RouterProvider, { router });
3899
4028
  }
3900
4029
  }
@@ -3956,7 +4085,7 @@ const renderAdmin = async (mountNode, { plugins, customisations, features }) =>
3956
4085
  config: customisations?.config,
3957
4086
  appPlugins: plugins
3958
4087
  });
3959
- await app.register();
4088
+ await app.register(customisations?.register);
3960
4089
  await app.bootstrap(customisations?.bootstrap);
3961
4090
  await app.loadTrads(customisations?.config?.translations);
3962
4091
  createRoot(mountNode).render(app.render());
@@ -4684,18 +4813,28 @@ const Root$1 = React.forwardRef(
4684
4813
  onPageSizeChange(pageSize);
4685
4814
  }
4686
4815
  };
4687
- return /* @__PURE__ */ jsx(Flex, { ref: forwardedRef, paddingTop: 4, alignItems: "flex-end", justifyContent: "space-between", children: /* @__PURE__ */ jsx(
4688
- PaginationProvider,
4816
+ return /* @__PURE__ */ jsx(
4817
+ Flex,
4689
4818
  {
4690
- currentQuery: query,
4691
- page: query.page,
4692
- pageSize: query.pageSize,
4693
- pageCount: pageCount.toString(),
4694
- setPageSize,
4695
- total,
4696
- children
4819
+ ref: forwardedRef,
4820
+ paddingTop: 4,
4821
+ paddingBottom: 4,
4822
+ alignItems: "flex-end",
4823
+ justifyContent: "space-between",
4824
+ children: /* @__PURE__ */ jsx(
4825
+ PaginationProvider,
4826
+ {
4827
+ currentQuery: query,
4828
+ page: query.page,
4829
+ pageSize: query.pageSize,
4830
+ pageCount: pageCount.toString(),
4831
+ setPageSize,
4832
+ total,
4833
+ children
4834
+ }
4835
+ )
4697
4836
  }
4698
- ) });
4837
+ );
4699
4838
  }
4700
4839
  );
4701
4840
  const PageSize = ({ options = ["10", "20", "50", "100"] }) => {
@@ -5303,4 +5442,4 @@ const {
5303
5442
  const useAdminUsers = useGetUsersQuery;
5304
5443
 
5305
5444
  export { isObject as A, BackButton as B, ConfirmDialog as C, useInjectReducer as D, useFocusInputField as E, Form as F, renderAdmin as G, DescriptionComponentRenderer as H, Blocker as I, getYupValidationErrors as J, useTable as K, LayoutContent as L, MemoizedInputRenderer as M, NpsSurvey as N, constants as O, Pagination as P, SearchInput as S, Table as T, UnauthenticatedLayout as U, Logo as a, Layouts as b, useGetRolesQuery as c, Login as d, errorsTrads as e, useGetRolePermissionLayoutQuery as f, useGetRolePermissionsQuery as g, useCreateRoleMutation as h, useUpdateRolePermissionsMutation as i, useUpdateUserMutation as j, useAdminUsers as k, useGuidedTour as l, getBasename as m, Column as n, useQueryParams as o, useFetchClient as p, useUpdateRoleMutation as q, SETTINGS_LINKS_CE as r, useCreateUserMutation as s, useDeleteManyUsersMutation as t, useField as u, Filters as v, useClipboard as w, useForm as x, MemoizedStringInput as y, StrapiLogo as z };
5306
- //# sourceMappingURL=index-jwAq-BX-.mjs.map
5445
+ //# sourceMappingURL=index-7Wlj8eA7.mjs.map