@strapi/admin 5.0.0-beta.8 → 5.0.0-rc.0

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