@strapi/admin 4.15.0-alpha.0 → 4.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1355) hide show
  1. package/dist/_chunks/AuthenticatedApp-092ef2be.js +1476 -0
  2. package/dist/_chunks/AuthenticatedApp-092ef2be.js.map +1 -0
  3. package/dist/_chunks/AuthenticatedApp-b0ada7e9.mjs +1450 -0
  4. package/dist/_chunks/AuthenticatedApp-b0ada7e9.mjs.map +1 -0
  5. package/dist/_chunks/DragLayer-bff96835.mjs +44 -0
  6. package/dist/_chunks/DragLayer-bff96835.mjs.map +1 -0
  7. package/dist/_chunks/DragLayer-f07eee6c.js +43 -0
  8. package/dist/_chunks/DragLayer-f07eee6c.js.map +1 -0
  9. package/dist/_chunks/HomePage-5798ba6f.mjs +543 -0
  10. package/dist/_chunks/HomePage-5798ba6f.mjs.map +1 -0
  11. package/dist/_chunks/HomePage-5ae473e6.js +564 -0
  12. package/dist/_chunks/HomePage-5ae473e6.js.map +1 -0
  13. package/dist/_chunks/HomePage-a3cc32d2.mjs +50 -0
  14. package/dist/_chunks/HomePage-a3cc32d2.mjs.map +1 -0
  15. package/dist/_chunks/HomePage-bdcb51be.js +50 -0
  16. package/dist/_chunks/HomePage-bdcb51be.js.map +1 -0
  17. package/dist/_chunks/InstalledPluginsPage-6284aaff.mjs +136 -0
  18. package/dist/_chunks/InstalledPluginsPage-6284aaff.mjs.map +1 -0
  19. package/dist/_chunks/InstalledPluginsPage-cc2d6a36.js +155 -0
  20. package/dist/_chunks/InstalledPluginsPage-cc2d6a36.js.map +1 -0
  21. package/dist/_chunks/InternalErrorPage-040dc993.mjs +41 -0
  22. package/dist/_chunks/InternalErrorPage-040dc993.mjs.map +1 -0
  23. package/dist/_chunks/InternalErrorPage-d0e51ac2.js +41 -0
  24. package/dist/_chunks/InternalErrorPage-d0e51ac2.js.map +1 -0
  25. package/dist/_chunks/Layout-4b3e434a.js +92 -0
  26. package/dist/_chunks/Layout-4b3e434a.js.map +1 -0
  27. package/dist/_chunks/Layout-72fa2ace.mjs +90 -0
  28. package/dist/_chunks/Layout-72fa2ace.mjs.map +1 -0
  29. package/dist/_chunks/LimitsModal-203482b8.js +84 -0
  30. package/dist/_chunks/LimitsModal-203482b8.js.map +1 -0
  31. package/dist/_chunks/LimitsModal-da04700e.mjs +82 -0
  32. package/dist/_chunks/LimitsModal-da04700e.mjs.map +1 -0
  33. package/dist/_chunks/MarketplacePage-209ec658.js +1037 -0
  34. package/dist/_chunks/MarketplacePage-209ec658.js.map +1 -0
  35. package/dist/_chunks/MarketplacePage-7dee72f5.mjs +1013 -0
  36. package/dist/_chunks/MarketplacePage-7dee72f5.mjs.map +1 -0
  37. package/dist/_chunks/ProfilePage-26c14ba4.mjs +596 -0
  38. package/dist/_chunks/ProfilePage-26c14ba4.mjs.map +1 -0
  39. package/dist/_chunks/ProfilePage-4f8c127b.js +619 -0
  40. package/dist/_chunks/ProfilePage-4f8c127b.js.map +1 -0
  41. package/dist/_chunks/SSOProviders-1d062c95.mjs +90 -0
  42. package/dist/_chunks/SSOProviders-1d062c95.mjs.map +1 -0
  43. package/dist/_chunks/SSOProviders-1ef0a89e.js +111 -0
  44. package/dist/_chunks/SSOProviders-1ef0a89e.js.map +1 -0
  45. package/dist/_chunks/SalesPage-56bf9463.mjs +48 -0
  46. package/dist/_chunks/SalesPage-56bf9463.mjs.map +1 -0
  47. package/dist/_chunks/SalesPage-66f9ea32.js +51 -0
  48. package/dist/_chunks/SalesPage-66f9ea32.js.map +1 -0
  49. package/dist/_chunks/SalesPage-c5cbb366.js +51 -0
  50. package/dist/_chunks/SalesPage-c5cbb366.js.map +1 -0
  51. package/dist/_chunks/SalesPage-c7c94c3f.mjs +51 -0
  52. package/dist/_chunks/SalesPage-c7c94c3f.mjs.map +1 -0
  53. package/dist/_chunks/SalesPage-d0cdc1a7.js +48 -0
  54. package/dist/_chunks/SalesPage-d0cdc1a7.js.map +1 -0
  55. package/dist/_chunks/SalesPage-f9597ae7.mjs +51 -0
  56. package/dist/_chunks/SalesPage-f9597ae7.mjs.map +1 -0
  57. package/dist/_chunks/ar-21279f4c.js +936 -0
  58. package/dist/_chunks/ar-21279f4c.js.map +1 -0
  59. package/dist/_chunks/ar-62e5e2b3.mjs +936 -0
  60. package/dist/_chunks/ar-62e5e2b3.mjs.map +1 -0
  61. package/dist/_chunks/build-e1ca35da.mjs +66 -0
  62. package/dist/_chunks/build-e1ca35da.mjs.map +1 -0
  63. package/dist/_chunks/build-f36bfc97.js +66 -0
  64. package/dist/_chunks/build-f36bfc97.js.map +1 -0
  65. package/dist/_chunks/ca-d05fb350.js +724 -0
  66. package/dist/_chunks/ca-d05fb350.js.map +1 -0
  67. package/dist/_chunks/ca-e99de225.mjs +724 -0
  68. package/dist/_chunks/ca-e99de225.mjs.map +1 -0
  69. package/dist/_chunks/colors-c24a54f0.js +33 -0
  70. package/dist/_chunks/colors-c24a54f0.js.map +1 -0
  71. package/dist/_chunks/colors-e7489dd4.mjs +34 -0
  72. package/dist/_chunks/colors-e7489dd4.mjs.map +1 -0
  73. package/dist/_chunks/constants-12dfb222.mjs +34 -0
  74. package/dist/_chunks/constants-12dfb222.mjs.map +1 -0
  75. package/dist/_chunks/constants-1aea1185.js +34 -0
  76. package/dist/_chunks/constants-1aea1185.js.map +1 -0
  77. package/dist/_chunks/constants-27319180.mjs +226 -0
  78. package/dist/_chunks/constants-27319180.mjs.map +1 -0
  79. package/dist/_chunks/constants-2a8f4e41.mjs +11 -0
  80. package/dist/_chunks/constants-2a8f4e41.mjs.map +1 -0
  81. package/dist/_chunks/constants-32975b2e.js +86 -0
  82. package/dist/_chunks/constants-32975b2e.js.map +1 -0
  83. package/dist/_chunks/constants-40ffa931.js +11 -0
  84. package/dist/_chunks/constants-40ffa931.js.map +1 -0
  85. package/dist/_chunks/constants-6157f648.mjs +52 -0
  86. package/dist/_chunks/constants-6157f648.mjs.map +1 -0
  87. package/dist/_chunks/constants-64899732.js +30 -0
  88. package/dist/_chunks/constants-64899732.js.map +1 -0
  89. package/dist/_chunks/constants-70e05152.js +52 -0
  90. package/dist/_chunks/constants-70e05152.js.map +1 -0
  91. package/dist/_chunks/constants-727a113c.js +82 -0
  92. package/dist/_chunks/constants-727a113c.js.map +1 -0
  93. package/dist/_chunks/constants-8092eeb5.mjs +59 -0
  94. package/dist/_chunks/constants-8092eeb5.mjs.map +1 -0
  95. package/dist/_chunks/constants-85da8cc4.js +58 -0
  96. package/dist/_chunks/constants-85da8cc4.js.map +1 -0
  97. package/dist/_chunks/constants-86aa3e70.js +85 -0
  98. package/dist/_chunks/constants-86aa3e70.js.map +1 -0
  99. package/dist/_chunks/constants-90c20a6f.mjs +86 -0
  100. package/dist/_chunks/constants-90c20a6f.mjs.map +1 -0
  101. package/dist/_chunks/constants-921eda17.mjs +83 -0
  102. package/dist/_chunks/constants-921eda17.mjs.map +1 -0
  103. package/dist/_chunks/constants-9de7641c.mjs +80 -0
  104. package/dist/_chunks/constants-9de7641c.mjs.map +1 -0
  105. package/dist/_chunks/constants-a773ff9b.js +228 -0
  106. package/dist/_chunks/constants-a773ff9b.js.map +1 -0
  107. package/dist/_chunks/constants-a92ce583.mjs +7 -0
  108. package/dist/_chunks/constants-a92ce583.mjs.map +1 -0
  109. package/dist/_chunks/constants-d3dd8ed6.mjs +7 -0
  110. package/dist/_chunks/constants-d3dd8ed6.mjs.map +1 -0
  111. package/dist/_chunks/constants-d5d67ca8.js +6 -0
  112. package/dist/_chunks/constants-d5d67ca8.js.map +1 -0
  113. package/dist/_chunks/constants-da2542a3.js +6 -0
  114. package/dist/_chunks/constants-da2542a3.js.map +1 -0
  115. package/dist/_chunks/constants-def33545.mjs +30 -0
  116. package/dist/_chunks/constants-def33545.mjs.map +1 -0
  117. package/dist/_chunks/cs-2fa881a2.mjs +291 -0
  118. package/dist/_chunks/cs-2fa881a2.mjs.map +1 -0
  119. package/dist/_chunks/cs-eee75b10.js +291 -0
  120. package/dist/_chunks/cs-eee75b10.js.map +1 -0
  121. package/dist/_chunks/de-28f8bc28.mjs +716 -0
  122. package/dist/_chunks/de-28f8bc28.mjs.map +1 -0
  123. package/dist/_chunks/de-976cc986.js +716 -0
  124. package/dist/_chunks/de-976cc986.js.map +1 -0
  125. package/dist/_chunks/develop-513c9644.js +59 -0
  126. package/dist/_chunks/develop-513c9644.js.map +1 -0
  127. package/dist/_chunks/develop-e45b460e.mjs +59 -0
  128. package/dist/_chunks/develop-e45b460e.mjs.map +1 -0
  129. package/dist/_chunks/dk-0b759a56.mjs +634 -0
  130. package/dist/_chunks/dk-0b759a56.mjs.map +1 -0
  131. package/dist/_chunks/dk-6189917e.js +634 -0
  132. package/dist/_chunks/dk-6189917e.js.map +1 -0
  133. package/dist/_chunks/edit-29bdf5d6.js +50 -0
  134. package/dist/_chunks/edit-29bdf5d6.js.map +1 -0
  135. package/dist/_chunks/edit-923cefa0.mjs +32 -0
  136. package/dist/_chunks/edit-923cefa0.mjs.map +1 -0
  137. package/dist/_chunks/en-0e9e9327.js +1022 -0
  138. package/dist/_chunks/en-0e9e9327.js.map +1 -0
  139. package/dist/_chunks/en-e728accb.mjs +1022 -0
  140. package/dist/_chunks/en-e728accb.mjs.map +1 -0
  141. package/dist/_chunks/es-18b29db2.mjs +796 -0
  142. package/dist/_chunks/es-18b29db2.mjs.map +1 -0
  143. package/dist/_chunks/es-3ee0992a.js +796 -0
  144. package/dist/_chunks/es-3ee0992a.js.map +1 -0
  145. package/dist/_chunks/eu-8fd773c2.mjs +832 -0
  146. package/dist/_chunks/eu-8fd773c2.mjs.map +1 -0
  147. package/dist/_chunks/eu-be749f31.js +832 -0
  148. package/dist/_chunks/eu-be749f31.js.map +1 -0
  149. package/dist/_chunks/fr-29c84e1f.js +762 -0
  150. package/dist/_chunks/fr-29c84e1f.js.map +1 -0
  151. package/dist/_chunks/fr-f37df086.mjs +762 -0
  152. package/dist/_chunks/fr-f37df086.mjs.map +1 -0
  153. package/dist/_chunks/gu-377a4b46.js +623 -0
  154. package/dist/_chunks/gu-377a4b46.js.map +1 -0
  155. package/dist/_chunks/gu-69f0e13a.mjs +623 -0
  156. package/dist/_chunks/gu-69f0e13a.mjs.map +1 -0
  157. package/dist/_chunks/he-aec27352.js +326 -0
  158. package/dist/_chunks/he-aec27352.js.map +1 -0
  159. package/dist/_chunks/he-bd769d7e.mjs +326 -0
  160. package/dist/_chunks/he-bd769d7e.mjs.map +1 -0
  161. package/dist/_chunks/hi-1bdc7a46.js +722 -0
  162. package/dist/_chunks/hi-1bdc7a46.js.map +1 -0
  163. package/dist/_chunks/hi-d397a24b.mjs +722 -0
  164. package/dist/_chunks/hi-d397a24b.mjs.map +1 -0
  165. package/dist/_chunks/hu-e2c05f40.js +832 -0
  166. package/dist/_chunks/hu-e2c05f40.js.map +1 -0
  167. package/dist/_chunks/hu-eb88bd0c.mjs +832 -0
  168. package/dist/_chunks/hu-eb88bd0c.mjs.map +1 -0
  169. package/dist/_chunks/id-586df3a2.js +448 -0
  170. package/dist/_chunks/id-586df3a2.js.map +1 -0
  171. package/dist/_chunks/id-f47699e6.mjs +448 -0
  172. package/dist/_chunks/id-f47699e6.mjs.map +1 -0
  173. package/dist/_chunks/index-00202c8a.mjs +126 -0
  174. package/dist/_chunks/index-00202c8a.mjs.map +1 -0
  175. package/dist/_chunks/index-066ee02e.js +127 -0
  176. package/dist/_chunks/index-066ee02e.js.map +1 -0
  177. package/dist/_chunks/index-0af587c3.js +1525 -0
  178. package/dist/_chunks/index-0af587c3.js.map +1 -0
  179. package/dist/_chunks/index-137490ba.js +69 -0
  180. package/dist/_chunks/index-137490ba.js.map +1 -0
  181. package/dist/_chunks/index-16030b74.js +134 -0
  182. package/dist/_chunks/index-16030b74.js.map +1 -0
  183. package/dist/_chunks/index-1763a04f.js +586 -0
  184. package/dist/_chunks/index-1763a04f.js.map +1 -0
  185. package/dist/_chunks/index-176cc121.mjs +469 -0
  186. package/dist/_chunks/index-176cc121.mjs.map +1 -0
  187. package/dist/_chunks/index-1b7e986c.mjs +54 -0
  188. package/dist/_chunks/index-1b7e986c.mjs.map +1 -0
  189. package/dist/_chunks/index-1da8c640.mjs +363 -0
  190. package/dist/_chunks/index-1da8c640.mjs.map +1 -0
  191. package/dist/_chunks/index-1e973c03.mjs +54 -0
  192. package/dist/_chunks/index-1e973c03.mjs.map +1 -0
  193. package/dist/_chunks/index-1f1e2465.js +340 -0
  194. package/dist/_chunks/index-1f1e2465.js.map +1 -0
  195. package/dist/_chunks/index-24189ec9.js +697 -0
  196. package/dist/_chunks/index-24189ec9.js.map +1 -0
  197. package/dist/_chunks/index-284c5926.js +432 -0
  198. package/dist/_chunks/index-284c5926.js.map +1 -0
  199. package/dist/_chunks/index-305a03f4.mjs +66 -0
  200. package/dist/_chunks/index-305a03f4.mjs.map +1 -0
  201. package/dist/_chunks/index-332f319e.mjs +127 -0
  202. package/dist/_chunks/index-332f319e.mjs.map +1 -0
  203. package/dist/_chunks/index-34a2909e.mjs +359 -0
  204. package/dist/_chunks/index-34a2909e.mjs.map +1 -0
  205. package/dist/_chunks/index-34de382e.mjs +3504 -0
  206. package/dist/_chunks/index-34de382e.mjs.map +1 -0
  207. package/dist/_chunks/index-35e4bad6.mjs +274 -0
  208. package/dist/_chunks/index-35e4bad6.mjs.map +1 -0
  209. package/dist/_chunks/index-36e0d449.mjs +406 -0
  210. package/dist/_chunks/index-36e0d449.mjs.map +1 -0
  211. package/dist/_chunks/index-370a4ee8.mjs +60 -0
  212. package/dist/_chunks/index-370a4ee8.mjs.map +1 -0
  213. package/dist/_chunks/index-38115cde.js +66 -0
  214. package/dist/_chunks/index-38115cde.js.map +1 -0
  215. package/dist/_chunks/index-3c58de6f.js +50 -0
  216. package/dist/_chunks/index-3c58de6f.js.map +1 -0
  217. package/dist/_chunks/index-4565fcbd.js +847 -0
  218. package/dist/_chunks/index-4565fcbd.js.map +1 -0
  219. package/dist/_chunks/index-48322669.mjs +132 -0
  220. package/dist/_chunks/index-48322669.mjs.map +1 -0
  221. package/dist/_chunks/index-4c5acc70.js +254 -0
  222. package/dist/_chunks/index-4c5acc70.js.map +1 -0
  223. package/dist/_chunks/index-51a15b27.js +403 -0
  224. package/dist/_chunks/index-51a15b27.js.map +1 -0
  225. package/dist/_chunks/index-52b5db8a.js +267 -0
  226. package/dist/_chunks/index-52b5db8a.js.map +1 -0
  227. package/dist/_chunks/index-53ba81f9.mjs +271 -0
  228. package/dist/_chunks/index-53ba81f9.mjs.map +1 -0
  229. package/dist/_chunks/index-56ced4ab.mjs +50 -0
  230. package/dist/_chunks/index-56ced4ab.mjs.map +1 -0
  231. package/dist/_chunks/index-5752584c.mjs +1063 -0
  232. package/dist/_chunks/index-5752584c.mjs.map +1 -0
  233. package/dist/_chunks/index-58db145d.mjs +866 -0
  234. package/dist/_chunks/index-58db145d.mjs.map +1 -0
  235. package/dist/_chunks/index-59d22949.mjs +583 -0
  236. package/dist/_chunks/index-59d22949.mjs.map +1 -0
  237. package/dist/_chunks/index-5ad8482b.mjs +412 -0
  238. package/dist/_chunks/index-5ad8482b.mjs.map +1 -0
  239. package/dist/_chunks/index-5d8d89a7.js +47 -0
  240. package/dist/_chunks/index-5d8d89a7.js.map +1 -0
  241. package/dist/_chunks/index-62b4b3fc.js +311 -0
  242. package/dist/_chunks/index-62b4b3fc.js.map +1 -0
  243. package/dist/_chunks/index-6a512cec.js +295 -0
  244. package/dist/_chunks/index-6a512cec.js.map +1 -0
  245. package/dist/_chunks/index-6b9e3d60.js +273 -0
  246. package/dist/_chunks/index-6b9e3d60.js.map +1 -0
  247. package/dist/_chunks/index-6cc54f3b.mjs +245 -0
  248. package/dist/_chunks/index-6cc54f3b.mjs.map +1 -0
  249. package/dist/_chunks/index-6dbc94a9.mjs +676 -0
  250. package/dist/_chunks/index-6dbc94a9.mjs.map +1 -0
  251. package/dist/_chunks/index-73ba6bdd.mjs +826 -0
  252. package/dist/_chunks/index-73ba6bdd.mjs.map +1 -0
  253. package/dist/_chunks/index-74812118.mjs +53 -0
  254. package/dist/_chunks/index-74812118.mjs.map +1 -0
  255. package/dist/_chunks/index-77e0e5d7.js +50 -0
  256. package/dist/_chunks/index-77e0e5d7.js.map +1 -0
  257. package/dist/_chunks/index-7aed99db.js +380 -0
  258. package/dist/_chunks/index-7aed99db.js.map +1 -0
  259. package/dist/_chunks/index-7d40adea.mjs +398 -0
  260. package/dist/_chunks/index-7d40adea.mjs.map +1 -0
  261. package/dist/_chunks/index-85069cac.mjs +233 -0
  262. package/dist/_chunks/index-85069cac.mjs.map +1 -0
  263. package/dist/_chunks/index-86dfbe3a.js +1134 -0
  264. package/dist/_chunks/index-86dfbe3a.js.map +1 -0
  265. package/dist/_chunks/index-88298941.js +54 -0
  266. package/dist/_chunks/index-88298941.js.map +1 -0
  267. package/dist/_chunks/index-89d27faa.js +54 -0
  268. package/dist/_chunks/index-89d27faa.js.map +1 -0
  269. package/dist/_chunks/index-8d4d361d.mjs +47 -0
  270. package/dist/_chunks/index-8d4d361d.mjs.map +1 -0
  271. package/dist/_chunks/index-8ea5a488.js +366 -0
  272. package/dist/_chunks/index-8ea5a488.js.map +1 -0
  273. package/dist/_chunks/index-928b18d2.mjs +383 -0
  274. package/dist/_chunks/index-928b18d2.mjs.map +1 -0
  275. package/dist/_chunks/index-973c363e.mjs +63 -0
  276. package/dist/_chunks/index-973c363e.mjs.map +1 -0
  277. package/dist/_chunks/index-a4348f3b.js +62 -0
  278. package/dist/_chunks/index-a4348f3b.js.map +1 -0
  279. package/dist/_chunks/index-acd6d64f.js +417 -0
  280. package/dist/_chunks/index-acd6d64f.js.map +1 -0
  281. package/dist/_chunks/index-af69bc98.mjs +308 -0
  282. package/dist/_chunks/index-af69bc98.mjs.map +1 -0
  283. package/dist/_chunks/index-b2257157.js +15328 -0
  284. package/dist/_chunks/index-b2257157.js.map +1 -0
  285. package/dist/_chunks/index-b81f7273.mjs +1501 -0
  286. package/dist/_chunks/index-b81f7273.mjs.map +1 -0
  287. package/dist/_chunks/index-b98ea3ce.mjs +52 -0
  288. package/dist/_chunks/index-b98ea3ce.mjs.map +1 -0
  289. package/dist/_chunks/index-bb8093ea.mjs +314 -0
  290. package/dist/_chunks/index-bb8093ea.mjs.map +1 -0
  291. package/dist/_chunks/index-bdfc1149.mjs +15247 -0
  292. package/dist/_chunks/index-bdfc1149.mjs.map +1 -0
  293. package/dist/_chunks/index-be2ca313.mjs +47 -0
  294. package/dist/_chunks/index-be2ca313.mjs.map +1 -0
  295. package/dist/_chunks/index-c604806d.js +335 -0
  296. package/dist/_chunks/index-c604806d.js.map +1 -0
  297. package/dist/_chunks/index-cadd3ee0.js +873 -0
  298. package/dist/_chunks/index-cadd3ee0.js.map +1 -0
  299. package/dist/_chunks/index-d1620260.js +52 -0
  300. package/dist/_chunks/index-d1620260.js.map +1 -0
  301. package/dist/_chunks/index-d3e1fd86.js +490 -0
  302. package/dist/_chunks/index-d3e1fd86.js.map +1 -0
  303. package/dist/_chunks/index-da04b144.js +50 -0
  304. package/dist/_chunks/index-da04b144.js.map +1 -0
  305. package/dist/_chunks/index-e22d1a84.mjs +50 -0
  306. package/dist/_chunks/index-e22d1a84.mjs.map +1 -0
  307. package/dist/_chunks/index-e414353b.js +418 -0
  308. package/dist/_chunks/index-e414353b.js.map +1 -0
  309. package/dist/_chunks/index-ea23ee9f.mjs +340 -0
  310. package/dist/_chunks/index-ea23ee9f.mjs.map +1 -0
  311. package/dist/_chunks/index-eb67694f.mjs +261 -0
  312. package/dist/_chunks/index-eb67694f.mjs.map +1 -0
  313. package/dist/_chunks/index-edc9bb0b.js +3536 -0
  314. package/dist/_chunks/index-edc9bb0b.js.map +1 -0
  315. package/dist/_chunks/index-f179c7ea.js +47 -0
  316. package/dist/_chunks/index-f179c7ea.js.map +1 -0
  317. package/dist/_chunks/index-f448aed2.js +128 -0
  318. package/dist/_chunks/index-f448aed2.js.map +1 -0
  319. package/dist/_chunks/index-f5342ea5.js +54 -0
  320. package/dist/_chunks/index-f5342ea5.js.map +1 -0
  321. package/dist/_chunks/index-fc700e52.js +263 -0
  322. package/dist/_chunks/index-fc700e52.js.map +1 -0
  323. package/dist/_chunks/index-fcd5bc14.mjs +50 -0
  324. package/dist/_chunks/index-fcd5bc14.mjs.map +1 -0
  325. package/dist/_chunks/it-4006227c.mjs +459 -0
  326. package/dist/_chunks/it-4006227c.mjs.map +1 -0
  327. package/dist/_chunks/it-9c4295f1.js +459 -0
  328. package/dist/_chunks/it-9c4295f1.js.map +1 -0
  329. package/dist/_chunks/ja-db43ca3d.mjs +633 -0
  330. package/dist/_chunks/ja-db43ca3d.mjs.map +1 -0
  331. package/dist/_chunks/ja-eb74520f.js +633 -0
  332. package/dist/_chunks/ja-eb74520f.js.map +1 -0
  333. package/dist/_chunks/ko-18e71df4.js +631 -0
  334. package/dist/_chunks/ko-18e71df4.js.map +1 -0
  335. package/dist/_chunks/ko-a7826e25.mjs +631 -0
  336. package/dist/_chunks/ko-a7826e25.mjs.map +1 -0
  337. package/dist/_chunks/ml-90131768.mjs +722 -0
  338. package/dist/_chunks/ml-90131768.mjs.map +1 -0
  339. package/dist/_chunks/ml-c5199364.js +722 -0
  340. package/dist/_chunks/ml-c5199364.js.map +1 -0
  341. package/dist/_chunks/ms-bc514df6.js +342 -0
  342. package/dist/_chunks/ms-bc514df6.js.map +1 -0
  343. package/dist/_chunks/ms-f4f16a83.mjs +342 -0
  344. package/dist/_chunks/ms-f4f16a83.mjs.map +1 -0
  345. package/dist/_chunks/nl-887ce2c3.mjs +828 -0
  346. package/dist/_chunks/nl-887ce2c3.mjs.map +1 -0
  347. package/dist/_chunks/nl-f1aedbe2.js +828 -0
  348. package/dist/_chunks/nl-f1aedbe2.js.map +1 -0
  349. package/dist/_chunks/no-ec6c2927.js +310 -0
  350. package/dist/_chunks/no-ec6c2927.js.map +1 -0
  351. package/dist/_chunks/no-f0b02541.mjs +310 -0
  352. package/dist/_chunks/no-f0b02541.mjs.map +1 -0
  353. package/dist/_chunks/pl-9be86414.js +721 -0
  354. package/dist/_chunks/pl-9be86414.js.map +1 -0
  355. package/dist/_chunks/pl-9ccd35d9.mjs +721 -0
  356. package/dist/_chunks/pl-9ccd35d9.mjs.map +1 -0
  357. package/dist/_chunks/pt-4fcc08f1.js +296 -0
  358. package/dist/_chunks/pt-4fcc08f1.js.map +1 -0
  359. package/dist/_chunks/pt-8acb6ac1.mjs +296 -0
  360. package/dist/_chunks/pt-8acb6ac1.mjs.map +1 -0
  361. package/dist/_chunks/pt-BR-d43239e3.js +794 -0
  362. package/dist/_chunks/pt-BR-d43239e3.js.map +1 -0
  363. package/dist/_chunks/pt-BR-fd73cb13.mjs +794 -0
  364. package/dist/_chunks/pt-BR-fd73cb13.mjs.map +1 -0
  365. package/dist/_chunks/ru-07958f09.js +944 -0
  366. package/dist/_chunks/ru-07958f09.js.map +1 -0
  367. package/dist/_chunks/ru-d43423ea.mjs +944 -0
  368. package/dist/_chunks/ru-d43423ea.mjs.map +1 -0
  369. package/dist/_chunks/sa-6bf4c20e.mjs +722 -0
  370. package/dist/_chunks/sa-6bf4c20e.mjs.map +1 -0
  371. package/dist/_chunks/sa-8ffb7ca7.js +722 -0
  372. package/dist/_chunks/sa-8ffb7ca7.js.map +1 -0
  373. package/dist/_chunks/schema-a95f2514.mjs +490 -0
  374. package/dist/_chunks/schema-a95f2514.mjs.map +1 -0
  375. package/dist/_chunks/schema-f49c76d7.js +514 -0
  376. package/dist/_chunks/schema-f49c76d7.js.map +1 -0
  377. package/dist/_chunks/sk-58d31b17.mjs +690 -0
  378. package/dist/_chunks/sk-58d31b17.mjs.map +1 -0
  379. package/dist/_chunks/sk-a9308737.js +690 -0
  380. package/dist/_chunks/sk-a9308737.js.map +1 -0
  381. package/dist/_chunks/sv-0f5ffd1e.js +827 -0
  382. package/dist/_chunks/sv-0f5ffd1e.js.map +1 -0
  383. package/dist/_chunks/sv-d80ad633.mjs +827 -0
  384. package/dist/_chunks/sv-d80ad633.mjs.map +1 -0
  385. package/dist/_chunks/th-a53bbf7a.js +430 -0
  386. package/dist/_chunks/th-a53bbf7a.js.map +1 -0
  387. package/dist/_chunks/th-e72c6a22.mjs +430 -0
  388. package/dist/_chunks/th-e72c6a22.mjs.map +1 -0
  389. package/dist/_chunks/tr-b84a68b0.js +785 -0
  390. package/dist/_chunks/tr-b84a68b0.js.map +1 -0
  391. package/dist/_chunks/tr-e35ecfe8.mjs +785 -0
  392. package/dist/_chunks/tr-e35ecfe8.mjs.map +1 -0
  393. package/dist/_chunks/uk-de367ec1.mjs +343 -0
  394. package/dist/_chunks/uk-de367ec1.mjs.map +1 -0
  395. package/dist/_chunks/uk-e5226227.js +343 -0
  396. package/dist/_chunks/uk-e5226227.js.map +1 -0
  397. package/dist/_chunks/useAdminRolePermissions-603a2709.mjs +2322 -0
  398. package/dist/_chunks/useAdminRolePermissions-603a2709.mjs.map +1 -0
  399. package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js +2337 -0
  400. package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js.map +1 -0
  401. package/dist/_chunks/useAdminRoles-68d5d608.js +62 -0
  402. package/dist/_chunks/useAdminRoles-68d5d608.js.map +1 -0
  403. package/dist/_chunks/useAdminRoles-7ab5d521.mjs +44 -0
  404. package/dist/_chunks/useAdminRoles-7ab5d521.mjs.map +1 -0
  405. package/dist/_chunks/useAdminUsers-05d6b26a.js +61 -0
  406. package/dist/_chunks/useAdminUsers-05d6b26a.js.map +1 -0
  407. package/dist/_chunks/useAdminUsers-09f86a58.mjs +43 -0
  408. package/dist/_chunks/useAdminUsers-09f86a58.mjs.map +1 -0
  409. package/dist/_chunks/useContentTypes-53b449bb.mjs +67 -0
  410. package/dist/_chunks/useContentTypes-53b449bb.mjs.map +1 -0
  411. package/dist/_chunks/useContentTypes-7da293cc.js +85 -0
  412. package/dist/_chunks/useContentTypes-7da293cc.js.map +1 -0
  413. package/dist/_chunks/useDebounce-4712871e.js +35 -0
  414. package/dist/_chunks/useDebounce-4712871e.js.map +1 -0
  415. package/dist/_chunks/useDebounce-9364f340.mjs +17 -0
  416. package/dist/_chunks/useDebounce-9364f340.mjs.map +1 -0
  417. package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs +80 -0
  418. package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs.map +1 -0
  419. package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js +100 -0
  420. package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js.map +1 -0
  421. package/dist/_chunks/useLicenseLimits-13a102d3.mjs +31 -0
  422. package/dist/_chunks/useLicenseLimits-13a102d3.mjs.map +1 -0
  423. package/dist/_chunks/useLicenseLimits-81ef3cce.js +49 -0
  424. package/dist/_chunks/useLicenseLimits-81ef3cce.js.map +1 -0
  425. package/dist/_chunks/useReviewWorkflows-799e0305.js +59 -0
  426. package/dist/_chunks/useReviewWorkflows-799e0305.js.map +1 -0
  427. package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs +41 -0
  428. package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs.map +1 -0
  429. package/dist/_chunks/validateWorkflow-d051b610.mjs +1101 -0
  430. package/dist/_chunks/validateWorkflow-d051b610.mjs.map +1 -0
  431. package/dist/_chunks/validateWorkflow-e66d7d2e.js +1124 -0
  432. package/dist/_chunks/validateWorkflow-e66d7d2e.js.map +1 -0
  433. package/dist/_chunks/vi-096bccbb.mjs +298 -0
  434. package/dist/_chunks/vi-096bccbb.mjs.map +1 -0
  435. package/dist/_chunks/vi-c5fabb75.js +298 -0
  436. package/dist/_chunks/vi-c5fabb75.js.map +1 -0
  437. package/dist/_chunks/zh-24f618cb.js +836 -0
  438. package/dist/_chunks/zh-24f618cb.js.map +1 -0
  439. package/dist/_chunks/zh-Hans-35d2c374.js +957 -0
  440. package/dist/_chunks/zh-Hans-35d2c374.js.map +1 -0
  441. package/dist/_chunks/zh-Hans-ccf4be4b.mjs +957 -0
  442. package/dist/_chunks/zh-Hans-ccf4be4b.mjs.map +1 -0
  443. package/dist/_chunks/zh-ba29b2e1.mjs +836 -0
  444. package/dist/_chunks/zh-ba29b2e1.mjs.map +1 -0
  445. package/dist/admin/index.js +35 -0
  446. package/dist/admin/index.js.map +1 -0
  447. package/dist/admin/index.mjs +35 -0
  448. package/dist/admin/index.mjs.map +1 -0
  449. package/dist/admin/src/App.d.ts +6 -0
  450. package/dist/admin/src/StrapiApp.d.ts +140 -0
  451. package/dist/admin/src/components/AuthenticatedApp.d.ts +2 -0
  452. package/dist/admin/src/components/ConfigurationProvider.d.ts +11 -0
  453. package/dist/admin/src/components/DefaultDocument.d.ts +5 -0
  454. package/dist/admin/src/components/DragLayer.d.ts +10 -0
  455. package/dist/admin/src/components/GuidedTour/Homepage.d.ts +2 -0
  456. package/dist/admin/src/components/GuidedTour/Modal.d.ts +2 -0
  457. package/dist/admin/src/components/GuidedTour/Ornaments.d.ts +13 -0
  458. package/dist/admin/src/components/GuidedTour/Provider.d.ts +6 -0
  459. package/dist/admin/src/components/GuidedTour/constants.d.ts +165 -0
  460. package/dist/admin/src/components/LanguageProvider.d.ts +19 -0
  461. package/dist/admin/src/components/LeftMenu.d.ts +5 -0
  462. package/dist/admin/src/components/NoJavascript.d.ts +7 -0
  463. package/dist/admin/src/components/NpsSurvey.d.ts +17 -0
  464. package/dist/admin/src/components/Onboarding.d.ts +2 -0
  465. package/dist/admin/src/components/PluginsInitializer.d.ts +5 -0
  466. package/dist/admin/src/components/PrivateRoute.d.ts +8 -0
  467. package/dist/admin/src/components/Providers.d.ts +13 -0
  468. package/dist/admin/src/components/RBACProvider.d.ts +27 -0
  469. package/dist/admin/src/components/Theme.d.ts +6 -0
  470. package/dist/admin/src/components/ThemeToggleProvider.d.ts +12 -0
  471. package/dist/admin/src/components/UnauthenticatedLogo.d.ts +2 -0
  472. package/dist/admin/src/constants.d.ts +185 -0
  473. package/dist/admin/src/contexts/admin.d.ts +14 -0
  474. package/dist/admin/src/contexts/apiTokenPermissions.d.ts +36 -0
  475. package/dist/admin/src/contexts/configuration.d.ts +27 -0
  476. package/dist/admin/src/contexts/themeToggle.d.ts +22 -0
  477. package/dist/admin/src/core/apis/Components.d.ts +10 -0
  478. package/dist/admin/src/core/apis/CustomFields.d.ts +8 -0
  479. package/dist/admin/src/core/apis/Fields.d.ts +10 -0
  480. package/dist/admin/src/core/apis/Middlewares.d.ts +9 -0
  481. package/dist/admin/src/core/apis/Plugin.d.ts +19 -0
  482. package/dist/admin/src/core/apis/Reducers.d.ts +10 -0
  483. package/dist/admin/src/core/store/configure.d.ts +29 -0
  484. package/dist/admin/src/core/store/hooks.d.ts +37 -0
  485. package/dist/admin/src/core/utils/basename.d.ts +1 -0
  486. package/dist/admin/src/core/utils/createHook.d.ts +10 -0
  487. package/dist/admin/src/hooks/__mocks__/useAdminUsers.d.ts +2 -0
  488. package/dist/admin/src/hooks/__mocks__/useContentTypes.d.ts +2 -0
  489. package/dist/admin/src/hooks/useAdminRoles.d.ts +13 -0
  490. package/dist/admin/src/hooks/useAdminUsers.d.ts +19 -0
  491. package/dist/admin/src/hooks/useContentTypes.d.ts +7 -0
  492. package/dist/admin/src/hooks/useDebounce.d.ts +1 -0
  493. package/dist/admin/src/hooks/useEnterprise.d.ts +6 -0
  494. package/dist/admin/src/hooks/useInjectReducer.d.ts +10 -0
  495. package/dist/admin/src/hooks/useLicenseLimitNotification.d.ts +1 -0
  496. package/dist/admin/src/hooks/useMenu.d.ts +9 -0
  497. package/dist/admin/src/index.d.ts +2 -0
  498. package/dist/admin/src/layouts/AppLayout.d.ts +7 -0
  499. package/dist/admin/src/layouts/UnauthenticatedLayout.d.ts +11 -0
  500. package/dist/admin/src/pages/Admin.d.ts +7 -0
  501. package/dist/admin/src/pages/HomePage.d.ts +3 -0
  502. package/dist/admin/src/pages/InstalledPluginsPage.d.ts +3 -0
  503. package/dist/admin/src/pages/InternalErrorPage.d.ts +7 -0
  504. package/dist/admin/src/pages/Marketplace/MarketplacePage.d.ts +19 -0
  505. package/dist/admin/src/pages/Marketplace/components/NpmPackageCard.d.ts +13 -0
  506. package/dist/admin/src/pages/Marketplace/components/NpmPackagesFilters.d.ts +13 -0
  507. package/dist/admin/src/pages/Marketplace/components/NpmPackagesGrid.d.ts +13 -0
  508. package/dist/admin/src/pages/Marketplace/components/OfflineLayout.d.ts +2 -0
  509. package/dist/admin/src/pages/Marketplace/components/PageHeader.d.ts +8 -0
  510. package/dist/admin/src/pages/Marketplace/components/SortSelect.d.ts +51 -0
  511. package/dist/admin/src/pages/Marketplace/hooks/__mocks__/useNavigatorOnline.d.ts +1 -0
  512. package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +92 -0
  513. package/dist/admin/src/pages/Marketplace/hooks/useNavigatorOnline.d.ts +5 -0
  514. package/dist/admin/src/pages/NotFoundPage.d.ts +1 -0
  515. package/dist/admin/src/pages/ProfilePage.d.ts +2 -0
  516. package/dist/admin/src/pages/SettingsPage/hooks/useRegenerate.d.ts +4 -0
  517. package/dist/admin/src/pages/SettingsPage/pages/Roles/EditPage/hooks/usePermissionsDataManager.d.ts +24 -0
  518. package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/__mocks__/useAdminRolePermissions.d.ts +2 -0
  519. package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissions.d.ts +11 -0
  520. package/dist/admin/src/pages/SettingsPage/utils/makeUniqueRoutes.d.ts +6 -0
  521. package/dist/admin/src/pages/UseCasePage.d.ts +8 -0
  522. package/dist/admin/src/reducer.d.ts +21 -0
  523. package/dist/admin/src/render.d.ts +7 -0
  524. package/dist/admin/src/selectors.d.ts +21 -0
  525. package/dist/admin/src/shared/components/InjectionZone.d.ts +53 -0
  526. package/dist/admin/src/shared/hooks/__mocks__/useInjectionZone.d.ts +1 -0
  527. package/dist/admin/src/shared/hooks/useInjectionZone.d.ts +2 -0
  528. package/dist/admin/src/translations/languageNativeNames.d.ts +36 -0
  529. package/dist/admin/src/types/permissions.d.ts +7 -0
  530. package/dist/admin/src/utils/createRoute.d.ts +6 -0
  531. package/dist/admin/src/utils/formatAPIErrors.d.ts +6 -0
  532. package/dist/admin/src/utils/getFullName.d.ts +1 -0
  533. package/dist/admin/src/utils/hashAdminUserEmail.d.ts +6 -0
  534. package/dist/cli.js +46 -0
  535. package/dist/cli.js.map +1 -0
  536. package/dist/cli.mjs +46 -0
  537. package/dist/cli.mjs.map +1 -0
  538. package/dist/ee/admin/src/constants.d.ts +53 -0
  539. package/dist/ee/admin/src/hooks/useLicenseLimitNotification.d.ts +1 -0
  540. package/dist/ee/admin/src/pages/HomePage.d.ts +1 -0
  541. package/dist/shared/contracts/admin.d.ts +23 -0
  542. package/dist/shared/contracts/providers.d.ts +16 -0
  543. package/dist/shared/contracts/roles.d.ts +52 -0
  544. package/dist/shared/contracts/shared.d.ts +39 -0
  545. package/dist/shared/contracts/user.d.ts +40 -0
  546. package/dist/shared/contracts/users.d.ts +49 -0
  547. package/dist/shared/schema.d.ts +7 -0
  548. package/ee/server/bootstrap.js +1 -1
  549. package/ee/server/controllers/__tests__/stages.test.js +174 -0
  550. package/ee/server/controllers/admin.js +1 -1
  551. package/ee/server/controllers/user.js +1 -1
  552. package/ee/server/destroy.js +1 -1
  553. package/ee/server/middlewares/__tests__/review-workflows.test.js +40 -0
  554. package/ee/server/register.js +1 -1
  555. package/ee/server/routes/utils.js +1 -1
  556. package/ee/server/services/__tests__/assignees.test.js +76 -0
  557. package/ee/server/services/__tests__/audit-logs.test.js +300 -0
  558. package/ee/server/services/__tests__/passport.test.js +95 -0
  559. package/ee/server/services/__tests__/review-workflows-validation.test.js +100 -0
  560. package/ee/server/services/__tests__/review-workflows.test.js +163 -0
  561. package/ee/server/services/__tests__/sso.test.js +117 -0
  562. package/ee/server/services/__tests__/stages.test.js +275 -0
  563. package/ee/server/services/__tests__/workflows.test.js +203 -0
  564. package/ee/server/services/audit-logs.js +1 -1
  565. package/ee/server/services/passport/sso.js +1 -1
  566. package/ee/server/services/passport.js +1 -1
  567. package/ee/server/services/review-workflows/__tests__/entity-service-decorator.test.js +211 -0
  568. package/ee/server/services/review-workflows/metrics/__tests__/weekly-metrics.test.js +65 -0
  569. package/ee/server/services/review-workflows/workflows/__tests__/content-types.test.js +146 -0
  570. package/ee/server/services/seat-enforcement.js +1 -1
  571. package/ee/server/utils/__tests__/persisted-tables.test.js +38 -0
  572. package/ee/server/utils/__tests__/sso-lock.test.js +84 -0
  573. package/ee/server/utils/sso-lock.js +1 -1
  574. package/ee/server/validation/role.js +1 -1
  575. package/ee/server/validation/user.js +1 -1
  576. package/index.d.ts +22 -0
  577. package/index.js +214 -123
  578. package/package.json +85 -39
  579. package/server/controllers/__tests__/admin.test.js +106 -0
  580. package/server/controllers/__tests__/api-token.test.js +496 -0
  581. package/server/controllers/__tests__/content-api.test.js +173 -0
  582. package/server/controllers/__tests__/permission.test.js +200 -0
  583. package/server/controllers/__tests__/role.test.js +201 -0
  584. package/server/controllers/__tests__/transfer/token.test.js +520 -0
  585. package/server/controllers/__tests__/user.test.js +326 -0
  586. package/server/controllers/admin.js +4 -3
  587. package/server/domain/action/__tests__/action-domain.test.js +230 -0
  588. package/server/domain/action/__tests__/action-provider.test.js +376 -0
  589. package/server/domain/condition/__tests__/condition-domain.test.js +122 -0
  590. package/server/domain/condition/__tests__/condition-provider.test.js +156 -0
  591. package/server/domain/permission/__tests__/permission-domain.test.js +285 -0
  592. package/server/services/__tests__/action.test.js +98 -0
  593. package/server/services/__tests__/api-token.test.js +980 -0
  594. package/server/services/__tests__/auth.test.js +319 -0
  595. package/server/services/__tests__/content-type.test.js +405 -0
  596. package/server/services/__tests__/metrics.test.js +65 -0
  597. package/server/services/__tests__/passport.test.js +90 -0
  598. package/server/services/__tests__/permission.test.js +177 -0
  599. package/server/services/__tests__/permissions-manager-sanitize.test.js +117 -0
  600. package/server/services/__tests__/permissions-manager-validate.test.js +119 -0
  601. package/server/services/__tests__/permissions-manager.test.js +318 -0
  602. package/server/services/__tests__/permissions.section-builder.section.test.js +136 -0
  603. package/server/services/__tests__/project-settings.test.js +397 -0
  604. package/server/services/__tests__/role.test.js +970 -0
  605. package/server/services/__tests__/token.test.js +217 -0
  606. package/server/services/__tests__/transfer/token.test.js +878 -0
  607. package/server/services/__tests__/user.test.js +771 -0
  608. package/server/strategies/__tests__/admin.test.js +118 -0
  609. package/server/strategies/__tests__/api-token.test.js +364 -0
  610. package/server/validation/__tests__/common-functions.test.js +54 -0
  611. package/.browserslistrc +0 -4
  612. package/.eslintignore +0 -4
  613. package/.eslintrc.js +0 -14
  614. package/admin/src/StrapiApp.js +0 -478
  615. package/admin/src/app.js +0 -9
  616. package/admin/src/assets/images/icon_offline-cloud.svg +0 -5
  617. package/admin/src/assets/images/logo-strapi-2022.svg +0 -7
  618. package/admin/src/assets/images/onboarding-preview.png +0 -0
  619. package/admin/src/components/AuthenticatedApp/index.js +0 -120
  620. package/admin/src/components/AuthenticatedApp/utils/api.js +0 -85
  621. package/admin/src/components/AuthenticatedApp/utils/checkLatestStrapiVersion.js +0 -11
  622. package/admin/src/components/ConfigurationsProvider/index.js +0 -66
  623. package/admin/src/components/ConfigurationsProvider/reducer.js +0 -29
  624. package/admin/src/components/DragLayer/DragLayer.js +0 -54
  625. package/admin/src/components/DragLayer/index.js +0 -1
  626. package/admin/src/components/GlobalStyle/index.js +0 -9
  627. package/admin/src/components/GuidedTour/Homepage/components/Step.js +0 -61
  628. package/admin/src/components/GuidedTour/Homepage/components/Stepper.js +0 -61
  629. package/admin/src/components/GuidedTour/Homepage/index.js +0 -71
  630. package/admin/src/components/GuidedTour/Modal/components/Content.js +0 -66
  631. package/admin/src/components/GuidedTour/Modal/components/Modal.js +0 -72
  632. package/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js +0 -26
  633. package/admin/src/components/GuidedTour/Modal/components/Stepper.js +0 -118
  634. package/admin/src/components/GuidedTour/Modal/index.js +0 -94
  635. package/admin/src/components/GuidedTour/Modal/reducer.js +0 -29
  636. package/admin/src/components/GuidedTour/Stepper/StepLine.js +0 -29
  637. package/admin/src/components/GuidedTour/Stepper/StepNumber.js +0 -71
  638. package/admin/src/components/GuidedTour/constants.js +0 -3
  639. package/admin/src/components/GuidedTour/index.js +0 -102
  640. package/admin/src/components/GuidedTour/init.js +0 -37
  641. package/admin/src/components/GuidedTour/layout.js +0 -162
  642. package/admin/src/components/GuidedTour/reducer.js +0 -50
  643. package/admin/src/components/GuidedTour/utils/arePreviousSectionsDone.js +0 -13
  644. package/admin/src/components/GuidedTour/utils/arePreviousStepsDone.js +0 -12
  645. package/admin/src/components/GuidedTour/utils/isGuidedTourCompleted.js +0 -6
  646. package/admin/src/components/GuidedTour/utils/persistStateToLocaleStorage.js +0 -34
  647. package/admin/src/components/LanguageProvider/index.js +0 -54
  648. package/admin/src/components/LanguageProvider/init.js +0 -13
  649. package/admin/src/components/LanguageProvider/reducer.js +0 -30
  650. package/admin/src/components/LanguageProvider/utils/localStorageKey.js +0 -3
  651. package/admin/src/components/LeftMenu/index.js +0 -252
  652. package/admin/src/components/LocalesProvider/__mocks__/useLocalesProvider.js +0 -7
  653. package/admin/src/components/LocalesProvider/context.js +0 -5
  654. package/admin/src/components/LocalesProvider/index.js +0 -21
  655. package/admin/src/components/LocalesProvider/useLocalesProvider.js +0 -11
  656. package/admin/src/components/NpsSurvey/hooks/useNpsSurveySettings.js +0 -17
  657. package/admin/src/components/NpsSurvey/index.js +0 -368
  658. package/admin/src/components/PluginsInitializer/index.js +0 -68
  659. package/admin/src/components/PluginsInitializer/init.js +0 -11
  660. package/admin/src/components/PluginsInitializer/reducer.js +0 -22
  661. package/admin/src/components/PrivateRoute/index.js +0 -46
  662. package/admin/src/components/Providers/index.js +0 -156
  663. package/admin/src/components/RBACProvider/actions.js +0 -10
  664. package/admin/src/components/RBACProvider/constants.js +0 -2
  665. package/admin/src/components/RBACProvider/index.js +0 -39
  666. package/admin/src/components/RBACProvider/reducer.js +0 -51
  667. package/admin/src/components/Theme/index.js +0 -26
  668. package/admin/src/components/ThemeToggleProvider/index.js +0 -79
  669. package/admin/src/components/UnauthenticatedLogo/index.js +0 -19
  670. package/admin/src/constants.js +0 -90
  671. package/admin/src/content-manager/assets/images/background_input.svg +0 -1
  672. package/admin/src/content-manager/assets/images/icon_remove.svg +0 -19
  673. package/admin/src/content-manager/assets/images/logo.svg +0 -1
  674. package/admin/src/content-manager/components/BlocksEditor/BlocksInput/index.js +0 -87
  675. package/admin/src/content-manager/components/BlocksEditor/Toolbar/index.js +0 -463
  676. package/admin/src/content-manager/components/BlocksEditor/hooks/useBlocksStore.js +0 -451
  677. package/admin/src/content-manager/components/BlocksEditor/hooks/useModifiersStore.js +0 -102
  678. package/admin/src/content-manager/components/BlocksEditor/index.js +0 -126
  679. package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +0 -432
  680. package/admin/src/content-manager/components/ComponentIcon/ComponentIcon.js +0 -40
  681. package/admin/src/content-manager/components/ComponentIcon/constants.js +0 -133
  682. package/admin/src/content-manager/components/ComponentIcon/index.js +0 -1
  683. package/admin/src/content-manager/components/ComponentInitializer/index.js +0 -81
  684. package/admin/src/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumns.js +0 -2
  685. package/admin/src/content-manager/components/DynamicZone/components/AddComponentButton.js +0 -102
  686. package/admin/src/content-manager/components/DynamicZone/components/ComponentCard.js +0 -72
  687. package/admin/src/content-manager/components/DynamicZone/components/ComponentCategory.js +0 -108
  688. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker.js +0 -94
  689. package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +0 -313
  690. package/admin/src/content-manager/components/DynamicZone/components/DynamicZoneLabel.js +0 -79
  691. package/admin/src/content-manager/components/DynamicZone/index.js +0 -316
  692. package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +0 -709
  693. package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +0 -428
  694. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +0 -191
  695. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/findAllAndReplace.js +0 -92
  696. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/getAPIInnerError.js +0 -18
  697. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/handleAPIError.js +0 -15
  698. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/index.js +0 -3
  699. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/moveFields.js +0 -10
  700. package/admin/src/content-manager/components/FieldComponent/Label.js +0 -68
  701. package/admin/src/content-manager/components/FieldComponent/index.js +0 -168
  702. package/admin/src/content-manager/components/FieldComponent/utils/connect.js +0 -12
  703. package/admin/src/content-manager/components/FieldComponent/utils/select.js +0 -129
  704. package/admin/src/content-manager/components/FieldTypeIcon/index.js +0 -82
  705. package/admin/src/content-manager/components/Filter/CustomInputs/AdminUsersFilter.js +0 -42
  706. package/admin/src/content-manager/components/Filter/Filter.js +0 -54
  707. package/admin/src/content-manager/components/Filter/index.js +0 -1
  708. package/admin/src/content-manager/components/Hint/index.js +0 -31
  709. package/admin/src/content-manager/components/InjectionZoneList/index.js +0 -39
  710. package/admin/src/content-manager/components/InputUID/endActionStyle.js +0 -43
  711. package/admin/src/content-manager/components/InputUID/index.js +0 -286
  712. package/admin/src/content-manager/components/InputUID/regex.js +0 -3
  713. package/admin/src/content-manager/components/Inputs/index.js +0 -288
  714. package/admin/src/content-manager/components/Inputs/utils/VALIDATIONS_TO_OMIT.js +0 -13
  715. package/admin/src/content-manager/components/Inputs/utils/connect.js +0 -12
  716. package/admin/src/content-manager/components/Inputs/utils/generateOptions.js +0 -32
  717. package/admin/src/content-manager/components/Inputs/utils/getInputType.js +0 -46
  718. package/admin/src/content-manager/components/Inputs/utils/index.js +0 -5
  719. package/admin/src/content-manager/components/Inputs/utils/select.js +0 -39
  720. package/admin/src/content-manager/components/ListViewTable/CellContent/PublicationState/PublicationState.js +0 -27
  721. package/admin/src/content-manager/components/ListViewTable/CellContent/PublicationState/index.js +0 -1
  722. package/admin/src/content-manager/components/NonRepeatableComponent/index.js +0 -98
  723. package/admin/src/content-manager/components/PreviewWysiwyg/Wrapper.js +0 -147
  724. package/admin/src/content-manager/components/PreviewWysiwyg/index.js +0 -34
  725. package/admin/src/content-manager/components/PreviewWysiwyg/utils/mdRenderer.js +0 -77
  726. package/admin/src/content-manager/components/PreviewWysiwyg/utils/satinizeHtml.js +0 -16
  727. package/admin/src/content-manager/components/RelationInput/RelationInput.js +0 -507
  728. package/admin/src/content-manager/components/RelationInput/components/Option.js +0 -63
  729. package/admin/src/content-manager/components/RelationInput/components/RelationItem.js +0 -170
  730. package/admin/src/content-manager/components/RelationInput/components/RelationList.js +0 -56
  731. package/admin/src/content-manager/components/RelationInput/constants.js +0 -2
  732. package/admin/src/content-manager/components/RelationInput/index.js +0 -2
  733. package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js +0 -436
  734. package/admin/src/content-manager/components/RelationInputDataManager/constants.js +0 -8
  735. package/admin/src/content-manager/components/RelationInputDataManager/index.js +0 -1
  736. package/admin/src/content-manager/components/RelationInputDataManager/utils/connect.js +0 -11
  737. package/admin/src/content-manager/components/RelationInputDataManager/utils/diffRelations.js +0 -24
  738. package/admin/src/content-manager/components/RelationInputDataManager/utils/getRelationLink.js +0 -3
  739. package/admin/src/content-manager/components/RelationInputDataManager/utils/index.js +0 -5
  740. package/admin/src/content-manager/components/RelationInputDataManager/utils/normalizeRelations.js +0 -44
  741. package/admin/src/content-manager/components/RelationInputDataManager/utils/normalizeSearchResults.js +0 -16
  742. package/admin/src/content-manager/components/RelationInputDataManager/utils/select.js +0 -113
  743. package/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js +0 -78
  744. package/admin/src/content-manager/components/RepeatableComponent/components/Component.js +0 -272
  745. package/admin/src/content-manager/components/RepeatableComponent/components/Preview.js +0 -17
  746. package/admin/src/content-manager/components/RepeatableComponent/index.js +0 -283
  747. package/admin/src/content-manager/components/RepeatableComponent/utils/getComponentErrorKeys.js +0 -10
  748. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +0 -387
  749. package/admin/src/content-manager/components/Wysiwyg/Editor.js +0 -468
  750. package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +0 -127
  751. package/admin/src/content-manager/components/Wysiwyg/WysiwygFooter.js +0 -38
  752. package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +0 -232
  753. package/admin/src/content-manager/components/Wysiwyg/WysiwygStyles.js +0 -57
  754. package/admin/src/content-manager/components/Wysiwyg/index.js +0 -214
  755. package/admin/src/content-manager/components/Wysiwyg/utils/continueList.js +0 -111
  756. package/admin/src/content-manager/components/Wysiwyg/utils/utils.js +0 -313
  757. package/admin/src/content-manager/constants/attributes.js +0 -3
  758. package/admin/src/content-manager/contexts/ContentTypeLayout.js +0 -5
  759. package/admin/src/content-manager/contexts/ModelsContext.js +0 -5
  760. package/admin/src/content-manager/contexts/Wysiwyg.js +0 -5
  761. package/admin/src/content-manager/contexts/index.js +0 -2
  762. package/admin/src/content-manager/hooks/index.js +0 -9
  763. package/admin/src/content-manager/hooks/useAllowedAttributes.js +0 -43
  764. package/admin/src/content-manager/hooks/useContentTypeLayout/index.js +0 -20
  765. package/admin/src/content-manager/hooks/useDragAndDrop.js +0 -135
  766. package/admin/src/content-manager/hooks/useFetchContentTypeLayout/index.js +0 -90
  767. package/admin/src/content-manager/hooks/useFetchContentTypeLayout/reducer.js +0 -56
  768. package/admin/src/content-manager/hooks/useFetchContentTypeLayout/utils/formatLayouts.js +0 -167
  769. package/admin/src/content-manager/hooks/useFindRedirectionLink/index.js +0 -15
  770. package/admin/src/content-manager/hooks/useFindRedirectionLink/selectors.js +0 -7
  771. package/admin/src/content-manager/hooks/useFindRedirectionLink/utils/getRedirectionLink.js +0 -45
  772. package/admin/src/content-manager/hooks/useKeyboardDragAndDrop.js +0 -106
  773. package/admin/src/content-manager/hooks/useLazyComponents/index.js +0 -70
  774. package/admin/src/content-manager/hooks/usePluginsQueryParams/index.js +0 -11
  775. package/admin/src/content-manager/hooks/usePrev.js +0 -14
  776. package/admin/src/content-manager/hooks/useRelation/index.js +0 -1
  777. package/admin/src/content-manager/hooks/useRelation/useRelation.js +0 -174
  778. package/admin/src/content-manager/hooks/useSyncRbac/actions.js +0 -14
  779. package/admin/src/content-manager/hooks/useSyncRbac/constants.js +0 -2
  780. package/admin/src/content-manager/hooks/useSyncRbac/index.js +0 -38
  781. package/admin/src/content-manager/hooks/useSyncRbac/reducer.js +0 -33
  782. package/admin/src/content-manager/hooks/useSyncRbac/selectors.js +0 -4
  783. package/admin/src/content-manager/hooks/useWysiwyg.js +0 -7
  784. package/admin/src/content-manager/pages/App/LeftMenu/index.js +0 -142
  785. package/admin/src/content-manager/pages/App/actions.js +0 -24
  786. package/admin/src/content-manager/pages/App/components/CardDragPreview.js +0 -95
  787. package/admin/src/content-manager/pages/App/components/ComponentDragPreview.js +0 -76
  788. package/admin/src/content-manager/pages/App/components/RelationDragPreview.js +0 -81
  789. package/admin/src/content-manager/pages/App/constants.js +0 -3
  790. package/admin/src/content-manager/pages/App/index.js +0 -166
  791. package/admin/src/content-manager/pages/App/reducer.js +0 -50
  792. package/admin/src/content-manager/pages/App/selectors.js +0 -36
  793. package/admin/src/content-manager/pages/App/useContentManagerInitData.js +0 -102
  794. package/admin/src/content-manager/pages/App/utils/checkPermissions.js +0 -13
  795. package/admin/src/content-manager/pages/App/utils/generateModelsLinks.js +0 -65
  796. package/admin/src/content-manager/pages/App/utils/getContentTypeLinks.js +0 -50
  797. package/admin/src/content-manager/pages/CollectionTypeRecursivePath/components/ErrorFallback.js +0 -14
  798. package/admin/src/content-manager/pages/CollectionTypeRecursivePath/index.js +0 -134
  799. package/admin/src/content-manager/pages/ComponentSetttingsView/index.js +0 -62
  800. package/admin/src/content-manager/pages/EditSettingsView/components/ComponentFieldList.js +0 -62
  801. package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFieldButton.js +0 -394
  802. package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +0 -79
  803. package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +0 -76
  804. package/admin/src/content-manager/pages/EditSettingsView/components/FieldButtonContent.js +0 -81
  805. package/admin/src/content-manager/pages/EditSettingsView/components/FormModal.js +0 -100
  806. package/admin/src/content-manager/pages/EditSettingsView/components/GenericInput.js +0 -67
  807. package/admin/src/content-manager/pages/EditSettingsView/components/LayoutDndProvider/index.js +0 -75
  808. package/admin/src/content-manager/pages/EditSettingsView/components/LinkToCTB.js +0 -59
  809. package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +0 -141
  810. package/admin/src/content-manager/pages/EditSettingsView/components/RowItemsLayout.js +0 -42
  811. package/admin/src/content-manager/pages/EditSettingsView/components/RowsLayout.js +0 -34
  812. package/admin/src/content-manager/pages/EditSettingsView/hooks/useLayoutDnd.js +0 -7
  813. package/admin/src/content-manager/pages/EditSettingsView/index.js +0 -404
  814. package/admin/src/content-manager/pages/EditSettingsView/init.js +0 -19
  815. package/admin/src/content-manager/pages/EditSettingsView/reducer.js +0 -196
  816. package/admin/src/content-manager/pages/EditSettingsView/utils/createPossibleMainFieldsForModelsAndComponents.js +0 -24
  817. package/admin/src/content-manager/pages/EditSettingsView/utils/getInputProps.js +0 -30
  818. package/admin/src/content-manager/pages/EditSettingsView/utils/index.js +0 -2
  819. package/admin/src/content-manager/pages/EditSettingsView/utils/layout.js +0 -106
  820. package/admin/src/content-manager/pages/EditView/DeleteLink/index.js +0 -69
  821. package/admin/src/content-manager/pages/EditView/DeleteLink/utils/connect.js +0 -12
  822. package/admin/src/content-manager/pages/EditView/DeleteLink/utils/index.js +0 -2
  823. package/admin/src/content-manager/pages/EditView/DeleteLink/utils/select.js +0 -21
  824. package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/index.js +0 -93
  825. package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/connect.js +0 -12
  826. package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/index.js +0 -2
  827. package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/select.js +0 -14
  828. package/admin/src/content-manager/pages/EditView/GridRow/index.js +0 -64
  829. package/admin/src/content-manager/pages/EditView/Header/index.js +0 -303
  830. package/admin/src/content-manager/pages/EditView/Header/utils/connect.js +0 -12
  831. package/admin/src/content-manager/pages/EditView/Header/utils/index.js +0 -2
  832. package/admin/src/content-manager/pages/EditView/Header/utils/select.js +0 -33
  833. package/admin/src/content-manager/pages/EditView/Information/index.js +0 -132
  834. package/admin/src/content-manager/pages/EditView/Information/utils/getUnits.js +0 -27
  835. package/admin/src/content-manager/pages/EditView/InformationBox/InformationBoxCE.js +0 -12
  836. package/admin/src/content-manager/pages/EditView/InformationBox/index.js +0 -1
  837. package/admin/src/content-manager/pages/EditView/hooks/useOnce.js +0 -14
  838. package/admin/src/content-manager/pages/EditView/index.js +0 -297
  839. package/admin/src/content-manager/pages/EditView/selectors.js +0 -15
  840. package/admin/src/content-manager/pages/EditView/utils/createAttributesLayout.js +0 -41
  841. package/admin/src/content-manager/pages/EditView/utils/getCustomFieldUidsFromLayout.js +0 -18
  842. package/admin/src/content-manager/pages/EditView/utils/getFieldsActionMatchingPermissions.js +0 -24
  843. package/admin/src/content-manager/pages/EditView/utils/index.js +0 -4
  844. package/admin/src/content-manager/pages/EditViewLayoutManager/Permissions.js +0 -32
  845. package/admin/src/content-manager/pages/EditViewLayoutManager/actions.js +0 -9
  846. package/admin/src/content-manager/pages/EditViewLayoutManager/constants.js +0 -2
  847. package/admin/src/content-manager/pages/EditViewLayoutManager/index.js +0 -52
  848. package/admin/src/content-manager/pages/EditViewLayoutManager/reducer.js +0 -31
  849. package/admin/src/content-manager/pages/EditViewLayoutManager/selectors.js +0 -3
  850. package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +0 -260
  851. package/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js +0 -144
  852. package/admin/src/content-manager/pages/ListSettingsView/components/Settings.js +0 -203
  853. package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +0 -115
  854. package/admin/src/content-manager/pages/ListSettingsView/constants.js +0 -8
  855. package/admin/src/content-manager/pages/ListSettingsView/index.js +0 -288
  856. package/admin/src/content-manager/pages/ListSettingsView/reducer.js +0 -83
  857. package/admin/src/content-manager/pages/ListView/actions.js +0 -35
  858. package/admin/src/content-manager/pages/ListView/components/Body/index.js +0 -191
  859. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/ConfirmBulkActionDialog/index.js +0 -169
  860. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +0 -525
  861. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/index.js +0 -233
  862. package/admin/src/content-manager/pages/ListView/components/CellContent/CellValue.js +0 -51
  863. package/admin/src/content-manager/pages/ListView/components/CellContent/Media/FileWrapper.js +0 -36
  864. package/admin/src/content-manager/pages/ListView/components/CellContent/Media/index.js +0 -43
  865. package/admin/src/content-manager/pages/ListView/components/CellContent/MultipleMedias.js +0 -48
  866. package/admin/src/content-manager/pages/ListView/components/CellContent/RelationMultiple/index.js +0 -144
  867. package/admin/src/content-manager/pages/ListView/components/CellContent/RelationSingle/index.js +0 -34
  868. package/admin/src/content-manager/pages/ListView/components/CellContent/RepeatableComponent/index.js +0 -67
  869. package/admin/src/content-manager/pages/ListView/components/CellContent/SingleComponent/index.js +0 -37
  870. package/admin/src/content-manager/pages/ListView/components/CellContent/index.js +0 -99
  871. package/admin/src/content-manager/pages/ListView/components/CellContent/utils/hasContent.js +0 -65
  872. package/admin/src/content-manager/pages/ListView/components/CellContent/utils/isSingleRelation.js +0 -3
  873. package/admin/src/content-manager/pages/ListView/components/ConfirmDialogDelete/index.js +0 -77
  874. package/admin/src/content-manager/pages/ListView/components/ConfirmDialogDeleteAll/index.js +0 -78
  875. package/admin/src/content-manager/pages/ListView/components/FieldPicker/index.js +0 -106
  876. package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +0 -304
  877. package/admin/src/content-manager/pages/ListView/components/ViewSettingsMenu/index.js +0 -80
  878. package/admin/src/content-manager/pages/ListView/constants.js +0 -6
  879. package/admin/src/content-manager/pages/ListView/index.js +0 -905
  880. package/admin/src/content-manager/pages/ListView/reducer.js +0 -137
  881. package/admin/src/content-manager/pages/ListView/selectors.js +0 -30
  882. package/admin/src/content-manager/pages/ListView/utils/buildValidGetParams.js +0 -30
  883. package/admin/src/content-manager/pages/ListView/utils/index.js +0 -1
  884. package/admin/src/content-manager/pages/ListViewLayoutManager/Permissions.js +0 -43
  885. package/admin/src/content-manager/pages/ListViewLayoutManager/index.js +0 -60
  886. package/admin/src/content-manager/pages/NoContentType/index.js +0 -50
  887. package/admin/src/content-manager/pages/NoPermissions/index.js +0 -28
  888. package/admin/src/content-manager/pages/SingleTypeRecursivePath/index.js +0 -88
  889. package/admin/src/content-manager/sharedReducers/crudReducer/actions.js +0 -49
  890. package/admin/src/content-manager/sharedReducers/crudReducer/constants.js +0 -9
  891. package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +0 -81
  892. package/admin/src/content-manager/sharedReducers/crudReducer/selectors.js +0 -3
  893. package/admin/src/content-manager/testUtils/data.js +0 -305
  894. package/admin/src/content-manager/testUtils/index.js +0 -3
  895. package/admin/src/content-manager/utils/ItemTypes.js +0 -7
  896. package/admin/src/content-manager/utils/arrayMoveItem.js +0 -22
  897. package/admin/src/content-manager/utils/checkIfAttributeIsDisplayable.js +0 -11
  898. package/admin/src/content-manager/utils/composeRefs.js +0 -28
  899. package/admin/src/content-manager/utils/createDefaultForm.js +0 -42
  900. package/admin/src/content-manager/utils/formatLayoutToApi.js +0 -43
  901. package/admin/src/content-manager/utils/generatePermissionsObject.js +0 -21
  902. package/admin/src/content-manager/utils/getDisplayName.js +0 -33
  903. package/admin/src/content-manager/utils/getFieldName.js +0 -6
  904. package/admin/src/content-manager/utils/getMaxTempKey.js +0 -14
  905. package/admin/src/content-manager/utils/getTrad.js +0 -3
  906. package/admin/src/content-manager/utils/index.js +0 -15
  907. package/admin/src/content-manager/utils/isFieldTypeNumber.js +0 -3
  908. package/admin/src/content-manager/utils/mergeMetasWithSchema.js +0 -24
  909. package/admin/src/content-manager/utils/paths.js +0 -37
  910. package/admin/src/content-manager/utils/removeKeyInObject.js +0 -41
  911. package/admin/src/content-manager/utils/removePasswordFieldsFromData.js +0 -54
  912. package/admin/src/content-manager/utils/schema.js +0 -405
  913. package/admin/src/contexts/Admin/index.js +0 -5
  914. package/admin/src/contexts/ApiTokenPermissions/index.js +0 -25
  915. package/admin/src/contexts/Configurations/index.js +0 -5
  916. package/admin/src/contexts/MarketPlace/index.js +0 -18
  917. package/admin/src/contexts/PermisssionsDataManagerContext/index.js +0 -5
  918. package/admin/src/contexts/ThemeToggle/index.js +0 -5
  919. package/admin/src/contexts/index.js +0 -4
  920. package/admin/src/core/apis/Components.js +0 -19
  921. package/admin/src/core/apis/CustomFields.js +0 -124
  922. package/admin/src/core/apis/Fields.js +0 -18
  923. package/admin/src/core/apis/Middlewares.js +0 -11
  924. package/admin/src/core/apis/Plugin.js +0 -30
  925. package/admin/src/core/apis/Reducers.js +0 -11
  926. package/admin/src/core/apis/index.js +0 -6
  927. package/admin/src/core/store/configureStore.js +0 -47
  928. package/admin/src/core/utils/basename.js +0 -3
  929. package/admin/src/core/utils/createHook.js +0 -49
  930. package/admin/src/core/utils/index.js +0 -2
  931. package/admin/src/exposedHooks.js +0 -27
  932. package/admin/src/favicon.png +0 -0
  933. package/admin/src/hooks/index.js +0 -10
  934. package/admin/src/hooks/useAdminRolePermissions/__mocks__/index.js +0 -5
  935. package/admin/src/hooks/useAdminRolePermissions/index.js +0 -34
  936. package/admin/src/hooks/useAdminRoles/__mocks__/index.js +0 -5
  937. package/admin/src/hooks/useAdminRoles/index.js +0 -50
  938. package/admin/src/hooks/useAdminUsers/__mocks__/index.js +0 -5
  939. package/admin/src/hooks/useAdminUsers/index.js +0 -1
  940. package/admin/src/hooks/useAdminUsers/useAdminUsers.js +0 -47
  941. package/admin/src/hooks/useConfigurations/__mocks__/index.js +0 -7
  942. package/admin/src/hooks/useConfigurations/index.js +0 -11
  943. package/admin/src/hooks/useContentTypes/__mocks__/index.js +0 -6
  944. package/admin/src/hooks/useContentTypes/index.js +0 -1
  945. package/admin/src/hooks/useContentTypes/useContentTypes.js +0 -56
  946. package/admin/src/hooks/useDebounce/index.js +0 -19
  947. package/admin/src/hooks/useEnterprise/index.js +0 -1
  948. package/admin/src/hooks/useEnterprise/useEnterprise.js +0 -36
  949. package/admin/src/hooks/useInjectReducer/index.js +0 -1
  950. package/admin/src/hooks/useInjectReducer/useInjectReducer.js +0 -20
  951. package/admin/src/hooks/useLicenseLimitNotification/index.js +0 -5
  952. package/admin/src/hooks/useMenu/index.js +0 -86
  953. package/admin/src/hooks/useMenu/utils/checkPermissions.js +0 -13
  954. package/admin/src/hooks/useMenu/utils/getGeneralLinks.js +0 -31
  955. package/admin/src/hooks/useMenu/utils/getPluginSectionLinks.js +0 -17
  956. package/admin/src/hooks/useNavigatorOnLine/index.js +0 -31
  957. package/admin/src/hooks/usePermissionsDataManager/index.js +0 -7
  958. package/admin/src/hooks/useRegenerate/index.js +0 -40
  959. package/admin/src/hooks/useReleaseNotification/index.js +0 -31
  960. package/admin/src/hooks/useReleaseNotification/utils/api.js +0 -20
  961. package/admin/src/hooks/useReleaseNotification/utils/checkLatestStrapiVersion.js +0 -11
  962. package/admin/src/hooks/useSettingsForm/index.js +0 -151
  963. package/admin/src/hooks/useSettingsForm/init.js +0 -5
  964. package/admin/src/hooks/useSettingsForm/reducer.js +0 -62
  965. package/admin/src/hooks/useSettingsMenu/constants.js +0 -39
  966. package/admin/src/hooks/useSettingsMenu/index.js +0 -125
  967. package/admin/src/hooks/useSettingsMenu/utils/formatLinks.js +0 -12
  968. package/admin/src/hooks/useSettingsMenu/utils/sortLinks.js +0 -5
  969. package/admin/src/hooks/useThemeToggle/index.js +0 -11
  970. package/admin/src/index.html +0 -15
  971. package/admin/src/index.js +0 -82
  972. package/admin/src/injectionZones.js +0 -25
  973. package/admin/src/layouts/AppLayout/index.js +0 -33
  974. package/admin/src/layouts/UnauthenticatedLayout/LocaleToggle/index.js +0 -29
  975. package/admin/src/layouts/UnauthenticatedLayout/index.js +0 -55
  976. package/admin/src/pages/Admin/Onboarding/constants.js +0 -46
  977. package/admin/src/pages/Admin/Onboarding/index.js +0 -226
  978. package/admin/src/pages/Admin/index.js +0 -126
  979. package/admin/src/pages/App/constants.js +0 -4
  980. package/admin/src/pages/App/index.js +0 -203
  981. package/admin/src/pages/App/reducer.js +0 -30
  982. package/admin/src/pages/App/selectors.js +0 -12
  983. package/admin/src/pages/AuthPage/components/FieldActionWrapper/index.js +0 -14
  984. package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +0 -112
  985. package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +0 -59
  986. package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +0 -180
  987. package/admin/src/pages/AuthPage/components/Login/index.js +0 -23
  988. package/admin/src/pages/AuthPage/components/Oops/index.js +0 -58
  989. package/admin/src/pages/AuthPage/components/Register/index.js +0 -378
  990. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +0 -190
  991. package/admin/src/pages/AuthPage/constants.js +0 -122
  992. package/admin/src/pages/AuthPage/index.js +0 -319
  993. package/admin/src/pages/AuthPage/init.js +0 -5
  994. package/admin/src/pages/AuthPage/reducer.js +0 -41
  995. package/admin/src/pages/HomePage/CloudBox.js +0 -85
  996. package/admin/src/pages/HomePage/ContentBlocks.js +0 -106
  997. package/admin/src/pages/HomePage/HomeHeader.js +0 -76
  998. package/admin/src/pages/HomePage/SocialLinks.js +0 -203
  999. package/admin/src/pages/HomePage/assets/corner-ornament.svg +0 -48
  1000. package/admin/src/pages/HomePage/assets/strapi-cloud-background.png +0 -0
  1001. package/admin/src/pages/HomePage/assets/strapi-cloud-flags.svg +0 -1
  1002. package/admin/src/pages/HomePage/assets/strapi-cloud-icon.svg +0 -1
  1003. package/admin/src/pages/HomePage/index.js +0 -107
  1004. package/admin/src/pages/InstalledPluginsPage/Plugins.js +0 -121
  1005. package/admin/src/pages/InstalledPluginsPage/hooks/usePlugins/index.js +0 -29
  1006. package/admin/src/pages/InstalledPluginsPage/index.js +0 -29
  1007. package/admin/src/pages/InternalErrorPage/index.js +0 -50
  1008. package/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/EmptyNpmPackageGrid.js +0 -27
  1009. package/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/index.js +0 -31
  1010. package/admin/src/pages/MarketplacePage/components/MissingPluginBanner/index.js +0 -40
  1011. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/CardButton.js +0 -109
  1012. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/InstallPluginButton.js +0 -81
  1013. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/PackageStats.js +0 -75
  1014. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/index.js +0 -189
  1015. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/FilterSelect.js +0 -43
  1016. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/FiltersPopover.js +0 -104
  1017. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/index.js +0 -105
  1018. package/admin/src/pages/MarketplacePage/components/NpmPackagesGrid/index.js +0 -87
  1019. package/admin/src/pages/MarketplacePage/components/NpmPackagesPagination/index.js +0 -27
  1020. package/admin/src/pages/MarketplacePage/components/OfflineLayout/index.js +0 -47
  1021. package/admin/src/pages/MarketplacePage/components/PageHeader/index.js +0 -55
  1022. package/admin/src/pages/MarketplacePage/components/SortSelect/index.js +0 -106
  1023. package/admin/src/pages/MarketplacePage/constants.js +0 -1
  1024. package/admin/src/pages/MarketplacePage/hooks/useFetchMarketplacePlugins/index.js +0 -44
  1025. package/admin/src/pages/MarketplacePage/hooks/useFetchMarketplaceProviders/index.js +0 -44
  1026. package/admin/src/pages/MarketplacePage/index.js +0 -263
  1027. package/admin/src/pages/MarketplacePage/utils/useMarketplaceData.js +0 -87
  1028. package/admin/src/pages/NotFoundPage/index.js +0 -50
  1029. package/admin/src/pages/ProfilePage/components/Password/index.js +0 -216
  1030. package/admin/src/pages/ProfilePage/components/Preferences/index.js +0 -161
  1031. package/admin/src/pages/ProfilePage/components/UserInfo/index.js +0 -113
  1032. package/admin/src/pages/ProfilePage/index.js +0 -235
  1033. package/admin/src/pages/ProfilePage/utils/schema.js +0 -7
  1034. package/admin/src/pages/SettingsPage/components/Filters/index.js +0 -54
  1035. package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +0 -77
  1036. package/admin/src/pages/SettingsPage/components/Tokens/FormHead/index.js +0 -110
  1037. package/admin/src/pages/SettingsPage/components/Tokens/LifeSpanInput/index.js +0 -99
  1038. package/admin/src/pages/SettingsPage/components/Tokens/Regenerate/index.js +0 -77
  1039. package/admin/src/pages/SettingsPage/components/Tokens/Table/DefaultButton/index.js +0 -64
  1040. package/admin/src/pages/SettingsPage/components/Tokens/Table/DeleteButton/index.js +0 -53
  1041. package/admin/src/pages/SettingsPage/components/Tokens/Table/ReadButton/index.js +0 -21
  1042. package/admin/src/pages/SettingsPage/components/Tokens/Table/UpdateButton/index.js +0 -21
  1043. package/admin/src/pages/SettingsPage/components/Tokens/Table/index.js +0 -161
  1044. package/admin/src/pages/SettingsPage/components/Tokens/TokenBox/index.js +0 -81
  1045. package/admin/src/pages/SettingsPage/components/Tokens/TokenDescription/index.js +0 -52
  1046. package/admin/src/pages/SettingsPage/components/Tokens/TokenName/index.js +0 -47
  1047. package/admin/src/pages/SettingsPage/components/Tokens/TokenTypeSelect/index.js +0 -71
  1048. package/admin/src/pages/SettingsPage/components/Tokens/constants.js +0 -2
  1049. package/admin/src/pages/SettingsPage/constants.js +0 -167
  1050. package/admin/src/pages/SettingsPage/index.js +0 -73
  1051. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ActionBoundRoutes/index.js +0 -56
  1052. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/BoundRoute/getMethodColor.js +0 -41
  1053. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/BoundRoute/index.js +0 -72
  1054. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/CheckBoxWrapper.js +0 -30
  1055. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/index.js +0 -160
  1056. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContenTypesSection/index.js +0 -39
  1057. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormApiTokenContainer/index.js +0 -164
  1058. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/LoadingView/index.js +0 -49
  1059. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Permissions/index.js +0 -40
  1060. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js +0 -74
  1061. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +0 -342
  1062. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/init.js +0 -13
  1063. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/reducer.js +0 -73
  1064. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/utils/getDateOfExpiration.js +0 -16
  1065. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/utils/index.js +0 -5
  1066. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/utils/schema.js +0 -14
  1067. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/utils/transformPermissionsData.js +0 -34
  1068. package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +0 -187
  1069. package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/utils/tableHeaders.js +0 -48
  1070. package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedCreateView/index.js +0 -19
  1071. package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedEditView/index.js +0 -19
  1072. package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedListView/index.js +0 -19
  1073. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/index.js +0 -143
  1074. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/init.js +0 -16
  1075. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/reducer.js +0 -63
  1076. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/index.js +0 -128
  1077. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/reducer.js +0 -28
  1078. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/stepper.js +0 -25
  1079. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/AddLogoDialog.js +0 -67
  1080. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromComputerForm.js +0 -181
  1081. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromUrlForm.js +0 -85
  1082. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/ImageCardAsset.js +0 -52
  1083. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/PendingLogoDialog.js +0 -93
  1084. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/index.js +0 -86
  1085. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/reducer.js +0 -28
  1086. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +0 -293
  1087. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/constants.js +0 -3
  1088. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/getFormData.js +0 -17
  1089. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/parseFileMetadatas.js +0 -76
  1090. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/urlToFile.js +0 -22
  1091. package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js +0 -284
  1092. package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/utils/schema.js +0 -9
  1093. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/CollapseLabel/index.js +0 -11
  1094. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsButton/index.js +0 -58
  1095. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/index.js +0 -72
  1096. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/utils/options.js +0 -31
  1097. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +0 -161
  1098. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/utils/createDefaultConditionsForm.js +0 -47
  1099. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/index.js +0 -262
  1100. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/utils/generateCheckboxesActions.js +0 -57
  1101. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +0 -228
  1102. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/getRowLabelCheckboxeState.js +0 -60
  1103. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/CarretIcon/index.js +0 -11
  1104. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +0 -67
  1105. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +0 -243
  1106. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/index.js +0 -62
  1107. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/utils/generateHeadersFromActions.js +0 -12
  1108. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/index.js +0 -77
  1109. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/activeStyle.js +0 -18
  1110. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/getAvailableActions.js +0 -10
  1111. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/index.js +0 -2
  1112. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapses/index.js +0 -52
  1113. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypes/index.js +0 -46
  1114. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Curve/index.js +0 -56
  1115. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +0 -94
  1116. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/findDisplayedActions.js +0 -4
  1117. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/getRowLabelCheckboxesState.js +0 -39
  1118. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/index.js +0 -2
  1119. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/HiddenAction/index.js +0 -9
  1120. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/README.md +0 -372
  1121. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/index.js +0 -185
  1122. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/init.js +0 -41
  1123. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/reducer.js +0 -182
  1124. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/constants.js +0 -3
  1125. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/createDefaultCTFormFromLayout.js +0 -182
  1126. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/createDefaultPluginsFormFromLayout.js +0 -48
  1127. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/findMatchingPermissions.js +0 -4
  1128. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatContentTypesPermissionToAPI.js +0 -124
  1129. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatLayoutForSettingsAndPlugins.js +0 -19
  1130. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatPermissionsToAPI.js +0 -21
  1131. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatSettingsPermissionsToAPI.js +0 -59
  1132. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/tabLabels.js +0 -24
  1133. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/updateConditionsToFalse.js +0 -42
  1134. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/updateValues.js +0 -31
  1135. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PermissionsDataManagerProvider/index.js +0 -28
  1136. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +0 -77
  1137. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/index.js +0 -153
  1138. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/formatActions.js +0 -33
  1139. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/getConditionsButtonState.js +0 -17
  1140. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/index.js +0 -2
  1141. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/index.js +0 -52
  1142. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RequiredSign/index.js +0 -12
  1143. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +0 -107
  1144. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RowLabelWithCheckbox/index.js +0 -98
  1145. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/index.js +0 -2
  1146. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/createArrayOfValues.js +0 -20
  1147. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/getCheckboxState.js +0 -19
  1148. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/index.js +0 -3
  1149. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/removeConditionKeyFromData.js +0 -15
  1150. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +0 -185
  1151. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/utils/schema.js +0 -8
  1152. package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/EmptyRole/index.js +0 -1
  1153. package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/RoleRow/index.js +0 -72
  1154. package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +0 -347
  1155. package/admin/src/pages/SettingsPage/pages/Roles/ListPage/reducer.js +0 -38
  1156. package/admin/src/pages/SettingsPage/pages/Roles/ProtectedEditPage/index.js +0 -32
  1157. package/admin/src/pages/SettingsPage/pages/Roles/ProtectedListPage/index.js +0 -19
  1158. package/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissionLayout/index.js +0 -23
  1159. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/components/FormTransferTokenContainer/index.js +0 -144
  1160. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/components/LoadingView/index.js +0 -49
  1161. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/index.js +0 -268
  1162. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/utils/getDateOfExpiration.js +0 -16
  1163. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/utils/index.js +0 -4
  1164. package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/utils/schema.js +0 -11
  1165. package/admin/src/pages/SettingsPage/pages/TransferTokens/ListView/index.js +0 -224
  1166. package/admin/src/pages/SettingsPage/pages/TransferTokens/ListView/utils/tableHeaders.js +0 -48
  1167. package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedCreateView/index.js +0 -19
  1168. package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedEditView/index.js +0 -19
  1169. package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedListView/index.js +0 -19
  1170. package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +0 -313
  1171. package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/api.js +0 -11
  1172. package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/layout.js +0 -116
  1173. package/admin/src/pages/SettingsPage/pages/Users/ListPage/CreateAction/index.js +0 -23
  1174. package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +0 -136
  1175. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/constants.js +0 -91
  1176. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +0 -271
  1177. package/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/index.js +0 -35
  1178. package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +0 -201
  1179. package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/displayedFilters.js +0 -29
  1180. package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/tableHeaders.js +0 -101
  1181. package/admin/src/pages/SettingsPage/pages/Users/ProtectedEditPage/index.js +0 -54
  1182. package/admin/src/pages/SettingsPage/pages/Users/ProtectedListPage/index.js +0 -19
  1183. package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/MagicLinkWrapper.js +0 -46
  1184. package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/index.js +0 -30
  1185. package/admin/src/pages/SettingsPage/pages/Users/components/SelectRoles/index.js +0 -101
  1186. package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/edit.js +0 -12
  1187. package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/index.js +0 -3
  1188. package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/profile.js +0 -36
  1189. package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/roles.js +0 -8
  1190. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/EventTableCE.js +0 -13
  1191. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/index.js +0 -1
  1192. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/Events/index.js +0 -333
  1193. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/Combobox.js +0 -97
  1194. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +0 -109
  1195. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +0 -168
  1196. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +0 -196
  1197. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/utils/makeWebhookValidationSchema.js +0 -68
  1198. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/index.js +0 -152
  1199. package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +0 -400
  1200. package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedCreateView/index.js +0 -19
  1201. package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedEditView/index.js +0 -19
  1202. package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedListView/index.js +0 -19
  1203. package/admin/src/pages/UseCasePage/index.js +0 -175
  1204. package/admin/src/plugins.js +0 -17
  1205. package/admin/src/reducers.js +0 -23
  1206. package/admin/src/shared/components/InjectionZone/index.js +0 -17
  1207. package/admin/src/shared/components/index.js +0 -2
  1208. package/admin/src/shared/hooks/index.js +0 -2
  1209. package/admin/src/shared/hooks/useAdminProvider/index.js +0 -11
  1210. package/admin/src/shared/hooks/useInjectionZone/index.js +0 -11
  1211. package/admin/src/translations/ar.json +0 -898
  1212. package/admin/src/translations/ca.json +0 -692
  1213. package/admin/src/translations/cs.json +0 -269
  1214. package/admin/src/translations/de.json +0 -684
  1215. package/admin/src/translations/dk.json +0 -602
  1216. package/admin/src/translations/en.json +0 -971
  1217. package/admin/src/translations/es.json +0 -760
  1218. package/admin/src/translations/eu.json +0 -796
  1219. package/admin/src/translations/fr.json +0 -724
  1220. package/admin/src/translations/gu.json +0 -609
  1221. package/admin/src/translations/he.json +0 -302
  1222. package/admin/src/translations/hi.json +0 -690
  1223. package/admin/src/translations/hu.json +0 -796
  1224. package/admin/src/translations/id.json +0 -426
  1225. package/admin/src/translations/it.json +0 -437
  1226. package/admin/src/translations/ja.json +0 -601
  1227. package/admin/src/translations/ko.json +0 -599
  1228. package/admin/src/translations/languageNativeNames.js +0 -38
  1229. package/admin/src/translations/ml.json +0 -690
  1230. package/admin/src/translations/ms.json +0 -320
  1231. package/admin/src/translations/nl.json +0 -792
  1232. package/admin/src/translations/no.json +0 -288
  1233. package/admin/src/translations/pl.json +0 -689
  1234. package/admin/src/translations/pt-BR.json +0 -758
  1235. package/admin/src/translations/pt.json +0 -276
  1236. package/admin/src/translations/ru.json +0 -906
  1237. package/admin/src/translations/sa.json +0 -690
  1238. package/admin/src/translations/sk.json +0 -654
  1239. package/admin/src/translations/sv.json +0 -791
  1240. package/admin/src/translations/th.json +0 -408
  1241. package/admin/src/translations/tr.json +0 -749
  1242. package/admin/src/translations/uk.json +0 -321
  1243. package/admin/src/translations/vi.json +0 -276
  1244. package/admin/src/translations/zh-Hans.json +0 -919
  1245. package/admin/src/translations/zh.json +0 -800
  1246. package/admin/src/tsconfig.json +0 -10
  1247. package/admin/src/utils/checkFormValidity.js +0 -15
  1248. package/admin/src/utils/createRoute.js +0 -47
  1249. package/admin/src/utils/formatAPIErrors.js +0 -17
  1250. package/admin/src/utils/getAttributesToDisplay.js +0 -19
  1251. package/admin/src/utils/getExistingActions.js +0 -32
  1252. package/admin/src/utils/getFullName.js +0 -9
  1253. package/admin/src/utils/index.js +0 -9
  1254. package/admin/src/utils/makeUniqueRoutes.js +0 -6
  1255. package/admin/src/utils/sortLinks.js +0 -5
  1256. package/admin/src/utils/uniqueAdminHash.js +0 -22
  1257. package/doc/change-the-login-page-logo.md +0 -28
  1258. package/doc/customize-menu.md +0 -17
  1259. package/doc/disable-tracking.md +0 -16
  1260. package/ee/LICENSE +0 -1
  1261. package/ee/admin/constants.js +0 -19
  1262. package/ee/admin/content-manager/components/Filter/CustomInputs/ReviewWorkflows/AssigneeFilter.js +0 -42
  1263. package/ee/admin/content-manager/components/Filter/CustomInputs/ReviewWorkflows/StageFilter.js +0 -70
  1264. package/ee/admin/content-manager/components/Filter/CustomInputs/ReviewWorkflows/constants.js +0 -71
  1265. package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +0 -30
  1266. package/ee/admin/content-manager/pages/EditView/InformationBox/components/AssigneeSelect/AssigneeSelect.js +0 -137
  1267. package/ee/admin/content-manager/pages/EditView/InformationBox/components/AssigneeSelect/index.js +0 -1
  1268. package/ee/admin/content-manager/pages/EditView/InformationBox/components/StageSelect/StageSelect.js +0 -255
  1269. package/ee/admin/content-manager/pages/EditView/InformationBox/components/StageSelect/index.js +0 -1
  1270. package/ee/admin/content-manager/pages/EditView/InformationBox/constants.js +0 -2
  1271. package/ee/admin/content-manager/pages/EditView/InformationBox/index.js +0 -1
  1272. package/ee/admin/content-manager/pages/ListSettingsView/constants.js +0 -7
  1273. package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/ReviewWorkflowsAssigneeEE.js +0 -21
  1274. package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/ReviewWorkflowsStageEE.js +0 -38
  1275. package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/constants.js +0 -51
  1276. package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/index.js +0 -2
  1277. package/ee/admin/hooks/__mocks__/useLicenseLimits.js +0 -8
  1278. package/ee/admin/hooks/useAuthProviders.js +0 -25
  1279. package/ee/admin/hooks/useLicenseLimitNotification.js +0 -99
  1280. package/ee/admin/hooks/useLicenseLimits.js +0 -37
  1281. package/ee/admin/hooks/useSettingsMenu/constants.js +0 -38
  1282. package/ee/admin/pages/App/constants.js +0 -9
  1283. package/ee/admin/pages/AuthPage/components/Login/index.js +0 -67
  1284. package/ee/admin/pages/AuthPage/components/Providers/SSOProviders.js +0 -114
  1285. package/ee/admin/pages/AuthPage/components/Providers/index.js +0 -93
  1286. package/ee/admin/pages/AuthPage/constants.js +0 -12
  1287. package/ee/admin/pages/AuthResponse/index.js +0 -66
  1288. package/ee/admin/pages/HomePage/index.js +0 -11
  1289. package/ee/admin/pages/SettingsPage/constants.js +0 -73
  1290. package/ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js +0 -105
  1291. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/ComboboxFilter/index.js +0 -42
  1292. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionBody.js +0 -107
  1293. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionItem.js +0 -22
  1294. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/index.js +0 -62
  1295. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/PaginationFooter/index.js +0 -35
  1296. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/TableRows/index.js +0 -87
  1297. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useAuditLogsData.js +0 -60
  1298. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useFormatTimeStamp.js +0 -24
  1299. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/index.js +0 -110
  1300. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getActionTypesDefaultMessages.js +0 -34
  1301. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getDisplayedFilters.js +0 -107
  1302. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/tableHeaders.js +0 -38
  1303. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ProtectedListPage/index.js +0 -19
  1304. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/actions/index.js +0 -113
  1305. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/AddStage/AddStage.js +0 -87
  1306. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/AddStage/index.js +0 -1
  1307. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Layout/Layout.js +0 -65
  1308. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Layout/index.js +0 -1
  1309. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/LimitsModal.js +0 -111
  1310. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/assets/balloon.png +0 -0
  1311. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/index.js +0 -3
  1312. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/StageDragPreview/StageDragPreview.js +0 -46
  1313. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/StageDragPreview/index.js +0 -1
  1314. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/Stage.js +0 -569
  1315. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/index.js +0 -1
  1316. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stages.js +0 -99
  1317. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/index.js +0 -1
  1318. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/WorkflowAttributes.js +0 -186
  1319. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/index.js +0 -1
  1320. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/constants.js +0 -43
  1321. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/hooks/useReviewWorkflows.js +0 -50
  1322. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/hooks/useReviewWorkflowsStages.js +0 -36
  1323. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/CreateView.js +0 -394
  1324. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/index.js +0 -18
  1325. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/EditView.js +0 -467
  1326. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/index.js +0 -18
  1327. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/ListView.js +0 -399
  1328. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/index.js +0 -18
  1329. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/reducer/index.js +0 -221
  1330. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/selectors.js +0 -45
  1331. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/utils/colors.js +0 -39
  1332. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/utils/validateWorkflow.js +0 -100
  1333. package/ee/admin/pages/SettingsPage/pages/SingleSignOn/index.js +0 -244
  1334. package/ee/admin/pages/SettingsPage/pages/SingleSignOn/utils/schema.js +0 -19
  1335. package/ee/admin/pages/SettingsPage/pages/Users/ListPage/CreateAction/index.js +0 -59
  1336. package/ee/admin/pages/SettingsPage/pages/Users/ListPage/ModalForm/constants.js +0 -30
  1337. package/ee/admin/pages/SettingsPage/pages/Users/ListPage/index.js +0 -13
  1338. package/ee/admin/pages/SettingsPage/pages/Users/components/MagicLink/index.js +0 -43
  1339. package/ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/EventTableEE.js +0 -22
  1340. package/ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/index.js +0 -1
  1341. package/ee/admin/permissions/customPermissions.js +0 -18
  1342. package/env.js +0 -42
  1343. package/index.html +0 -16
  1344. package/jest.config.front.js +0 -7
  1345. package/scripts/build.js +0 -118
  1346. package/scripts/create-dev-plugins-file.js +0 -33
  1347. package/utils/create-cache-dir.js +0 -80
  1348. package/utils/get-custom-app-config-file.js +0 -33
  1349. package/utils/get-custom-webpack-config.js +0 -38
  1350. package/utils/index.js +0 -13
  1351. package/utils/plugins.js +0 -223
  1352. package/utils/should-build-admin.js +0 -52
  1353. package/utils/watch-admin-files.js +0 -59
  1354. package/webpack.alias.js +0 -40
  1355. package/webpack.config.js +0 -173
@@ -0,0 +1,3504 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { auth, useCallbackRef, Form, Link, useQuery, useNotification, useAppInfo, usePersistentState, useTracking, useAPIErrorHandler, useFetchClient, getYupInnerErrors, translatedErrors, useGuidedTour, useFocusWhenNavigate, pxToRem, LoadingIndicatorPage, TrackingProvider, prefixFileUrlWithBackendUrl, GuidedTourProvider as GuidedTourProvider$1, StrapiAppProvider, LibraryProvider, CustomFieldsProvider, AutoReloadOverlayBlockerProvider, OverlayBlockerProvider, NotificationsProvider, RBACContext, getFetchClient } from "@strapi/helper-plugin";
3
+ import { createRoot } from "react-dom/client";
4
+ import { Box, Flex, SingleSelect, SingleSelectOption, FieldAction, TextInput, Main, Typography, Checkbox, Button, Field, Portal, IconButton, FieldLabel, VisuallyHidden, FieldInput, Textarea, Grid, GridItem, HeaderLayout, ContentLayout, EmptyStateLayout, LinkButton, Select, Option, TextButton, SkipToContent, DesignSystemProvider, lightTheme, darkTheme } from "@strapi/design-system";
5
+ import invariant from "invariant";
6
+ import isFunction from "lodash/isFunction";
7
+ import merge from "lodash/merge";
8
+ import pick from "lodash/pick";
9
+ import { Helmet } from "react-helmet";
10
+ import { useLocation, Route, Redirect, useHistory, useRouteMatch, Switch, BrowserRouter } from "react-router-dom";
11
+ import * as React from "react";
12
+ import { useState, useReducer, useEffect } from "react";
13
+ import { IntlProvider, useIntl } from "react-intl";
14
+ import { useDispatch, Provider, useSelector, useStore } from "react-redux";
15
+ import { createContext } from "@radix-ui/react-context";
16
+ import axios from "axios";
17
+ import camelCase from "lodash/camelCase";
18
+ import get from "lodash/get";
19
+ import omit from "lodash/omit";
20
+ import PropTypes from "prop-types";
21
+ import defaultsDeep from "lodash/defaultsDeep";
22
+ import styled, { useTheme, createGlobalStyle } from "styled-components";
23
+ import { Eye, EyeStriked, Cross, ArrowRight, EmptyPictures } from "@strapi/icons";
24
+ import { Formik, Form as Form$1 } from "formik";
25
+ import * as yup from "yup";
26
+ import { useMutation, useQuery as useQuery$1, QueryClient, QueryClientProvider } from "react-query";
27
+ import produce from "immer";
28
+ import set from "lodash/set";
29
+ import { parse } from "qs";
30
+ import { createSelector, configureStore, combineReducers } from "@reduxjs/toolkit";
31
+ const styles = `
32
+ .strapi--root {
33
+ position: absolute;
34
+ top: 0;
35
+ right: 0;
36
+ left: 0;
37
+ bottom: 0;
38
+ background: #fff;
39
+ }
40
+
41
+ .strapi--no-js {
42
+ position: absolute;
43
+ top: 50%;
44
+ left: 50%;
45
+ transform: translate(-50%, -50%);
46
+ text-align: center;
47
+ font-family: helvetica, arial, sans-serif;
48
+ }
49
+ `;
50
+ const NoJavascript = () => {
51
+ return /* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("div", { className: "strapi--root", children: /* @__PURE__ */ jsxs("div", { className: "strapi--no-js", children: [
52
+ /* @__PURE__ */ jsx("style", { type: "text/css", children: styles }),
53
+ /* @__PURE__ */ jsx("h1", { children: "JavaScript disabled" }),
54
+ /* @__PURE__ */ jsxs("p", { children: [
55
+ "Please ",
56
+ /* @__PURE__ */ jsx("a", { href: "https://www.enable-javascript.com/", children: "enable JavaScript" }),
57
+ " in your browser and reload the page to proceed."
58
+ ] })
59
+ ] }) }) });
60
+ };
61
+ const globalStyles = `
62
+ html,
63
+ body,
64
+ #strapi {
65
+ height: 100%;
66
+ }
67
+ body {
68
+ margin: 0;
69
+ -webkit-font-smoothing: antialiased;
70
+ }
71
+ `;
72
+ const DefaultDocument = () => {
73
+ return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
74
+ /* @__PURE__ */ jsxs("head", { children: [
75
+ /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
76
+ /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, viewport-fit=cover" }),
77
+ /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex" }),
78
+ /* @__PURE__ */ jsx("meta", { name: "referrer", content: "same-origin" }),
79
+ /* @__PURE__ */ jsx("title", { children: "Strapi Admin" }),
80
+ /* @__PURE__ */ jsx("style", { children: globalStyles })
81
+ ] }),
82
+ /* @__PURE__ */ jsxs("body", { children: [
83
+ /* @__PURE__ */ jsx("div", { id: "strapi" }),
84
+ /* @__PURE__ */ jsx(NoJavascript, {})
85
+ ] })
86
+ ] });
87
+ };
88
+ const __variableDynamicImportRuntimeHelper = (glob, path) => {
89
+ const v = glob[path];
90
+ if (v) {
91
+ return typeof v === "function" ? v() : Promise.resolve(v);
92
+ }
93
+ return new Promise((_, reject) => {
94
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
95
+ });
96
+ };
97
+ const PrivateRoute = ({
98
+ component: Component,
99
+ path,
100
+ ...rest
101
+ }) => {
102
+ const { pathname, search } = useLocation();
103
+ return /* @__PURE__ */ jsx(
104
+ Route,
105
+ {
106
+ path,
107
+ render: (props) => auth.getToken() !== null ? /* @__PURE__ */ jsx(Component, { ...rest, ...props }) : /* @__PURE__ */ jsx(
108
+ Redirect,
109
+ {
110
+ to: {
111
+ pathname: "/auth/login",
112
+ search: pathname !== "/" ? `?redirectTo=${encodeURIComponent(`${pathname}${search}`)}` : void 0
113
+ }
114
+ }
115
+ )
116
+ }
117
+ );
118
+ };
119
+ const ADMIN_PERMISSIONS_CE = {
120
+ contentManager: {
121
+ main: [],
122
+ collectionTypesConfigurations: [
123
+ {
124
+ action: "plugin::content-manager.collection-types.configure-view",
125
+ subject: null
126
+ }
127
+ ],
128
+ componentsConfigurations: [
129
+ {
130
+ action: "plugin::content-manager.components.configure-layout",
131
+ subject: null
132
+ }
133
+ ],
134
+ singleTypesConfigurations: [
135
+ {
136
+ action: "plugin::content-manager.single-types.configure-view",
137
+ subject: null
138
+ }
139
+ ]
140
+ },
141
+ marketplace: {
142
+ main: [{ action: "admin::marketplace.read", subject: null }],
143
+ read: [{ action: "admin::marketplace.read", subject: null }]
144
+ },
145
+ settings: {
146
+ roles: {
147
+ main: [
148
+ { action: "admin::roles.create", subject: null },
149
+ { action: "admin::roles.update", subject: null },
150
+ { action: "admin::roles.read", subject: null },
151
+ { action: "admin::roles.delete", subject: null }
152
+ ],
153
+ create: [{ action: "admin::roles.create", subject: null }],
154
+ delete: [{ action: "admin::roles.delete", subject: null }],
155
+ read: [{ action: "admin::roles.read", subject: null }],
156
+ update: [{ action: "admin::roles.update", subject: null }]
157
+ },
158
+ users: {
159
+ main: [
160
+ { action: "admin::users.create", subject: null },
161
+ { action: "admin::users.read", subject: null },
162
+ { action: "admin::users.update", subject: null },
163
+ { action: "admin::users.delete", subject: null }
164
+ ],
165
+ create: [{ action: "admin::users.create", subject: null }],
166
+ delete: [{ action: "admin::users.delete", subject: null }],
167
+ read: [{ action: "admin::users.read", subject: null }],
168
+ update: [{ action: "admin::users.update", subject: null }]
169
+ },
170
+ webhooks: {
171
+ main: [
172
+ { action: "admin::webhooks.create", subject: null },
173
+ { action: "admin::webhooks.read", subject: null },
174
+ { action: "admin::webhooks.update", subject: null },
175
+ { action: "admin::webhooks.delete", subject: null }
176
+ ],
177
+ create: [{ action: "admin::webhooks.create", subject: null }],
178
+ delete: [{ action: "admin::webhooks.delete", subject: null }],
179
+ read: [
180
+ { action: "admin::webhooks.read", subject: null },
181
+ // NOTE: We need to check with the API
182
+ { action: "admin::webhooks.update", subject: null },
183
+ { action: "admin::webhooks.delete", subject: null }
184
+ ],
185
+ update: [{ action: "admin::webhooks.update", subject: null }]
186
+ },
187
+ "api-tokens": {
188
+ main: [{ action: "admin::api-tokens.access", subject: null }],
189
+ create: [{ action: "admin::api-tokens.create", subject: null }],
190
+ delete: [{ action: "admin::api-tokens.delete", subject: null }],
191
+ read: [{ action: "admin::api-tokens.read", subject: null }],
192
+ update: [{ action: "admin::api-tokens.update", subject: null }],
193
+ regenerate: [{ action: "admin::api-tokens.regenerate", subject: null }]
194
+ },
195
+ "transfer-tokens": {
196
+ main: [{ action: "admin::transfer.tokens.access", subject: null }],
197
+ create: [{ action: "admin::transfer.tokens.create", subject: null }],
198
+ delete: [{ action: "admin::transfer.tokens.delete", subject: null }],
199
+ read: [{ action: "admin::transfer.tokens.read", subject: null }],
200
+ update: [{ action: "admin::transfer.tokens.update", subject: null }],
201
+ regenerate: [{ action: "admin::transfer.tokens.regenerate", subject: null }]
202
+ },
203
+ "project-settings": {
204
+ read: [{ action: "admin::project-settings.read", subject: null }],
205
+ update: [{ action: "admin::project-settings.update", subject: null }]
206
+ }
207
+ }
208
+ };
209
+ const HOOKS = {
210
+ /**
211
+ * Hook that allows to mutate the displayed headers of the list view table
212
+ * @constant
213
+ * @type {string}
214
+ */
215
+ INJECT_COLUMN_IN_TABLE: "Admin/CM/pages/ListView/inject-column-in-table",
216
+ /**
217
+ * Hook that allows to mutate the CM's collection types links pre-set filters
218
+ * @constant
219
+ * @type {string}
220
+ */
221
+ MUTATE_COLLECTION_TYPES_LINKS: "Admin/CM/pages/App/mutate-collection-types-links",
222
+ /**
223
+ * Hook that allows to mutate the CM's edit view layout
224
+ * @constant
225
+ * @type {string}
226
+ */
227
+ MUTATE_EDIT_VIEW_LAYOUT: "Admin/CM/pages/EditView/mutate-edit-view-layout",
228
+ /**
229
+ * Hook that allows to mutate the CM's single types links pre-set filters
230
+ * @constant
231
+ * @type {string}
232
+ */
233
+ MUTATE_SINGLE_TYPES_LINKS: "Admin/CM/pages/App/mutate-single-types-links"
234
+ };
235
+ const ACTION_SET_APP_RUNTIME_STATUS = "StrapiAdmin/APP/SET_APP_RUNTIME_STATUS";
236
+ const ACTION_SET_ADMIN_PERMISSIONS = "StrapiAdmin/App/SET_ADMIN_PERMISSIONS";
237
+ const [ConfigurationContextProvider, useConfigurationContext] = createContext("ConfigurationContext");
238
+ const useConfiguration = () => useConfigurationContext("useConfiguration");
239
+ function isEnterprise() {
240
+ return window.strapi.isEE;
241
+ }
242
+ function useEnterprise(ceData, eeCallback, {
243
+ defaultValue = null,
244
+ combine = (ceData2, eeData) => eeData,
245
+ enabled = true
246
+ } = {}) {
247
+ const eeCallbackRef = useCallbackRef(eeCallback);
248
+ const combineCallbackRef = useCallbackRef(combine);
249
+ const [{ data }, setData] = React.useState({
250
+ data: isEnterprise() && enabled ? defaultValue : ceData
251
+ });
252
+ React.useEffect(() => {
253
+ async function importEE() {
254
+ const eeData = await eeCallbackRef();
255
+ setData({ data: combineCallbackRef(ceData, eeData) });
256
+ }
257
+ if (isEnterprise() && enabled) {
258
+ importEE();
259
+ }
260
+ }, [ceData, eeCallbackRef, combineCallbackRef, enabled]);
261
+ return data;
262
+ }
263
+ const [LocalesContextProvider, useLocalesContext] = createContext("LocalesContext");
264
+ const useLocales = () => useLocalesContext("useLocales");
265
+ const LANGUAGE_LOCAL_STORAGE_KEY = "strapi-admin-language";
266
+ const LanguageProvider = ({ children, localeNames, messages }) => {
267
+ const [{ locale }, dispatch] = React.useReducer(
268
+ reducer$3,
269
+ initialState$8,
270
+ () => {
271
+ const languageFromLocaleStorage = window.localStorage.getItem(LANGUAGE_LOCAL_STORAGE_KEY);
272
+ if (languageFromLocaleStorage && localeNames[languageFromLocaleStorage]) {
273
+ return {
274
+ locale: languageFromLocaleStorage,
275
+ localeNames
276
+ };
277
+ } else {
278
+ return {
279
+ locale: "en",
280
+ localeNames
281
+ };
282
+ }
283
+ }
284
+ );
285
+ React.useEffect(() => {
286
+ window.localStorage.setItem(LANGUAGE_LOCAL_STORAGE_KEY, locale);
287
+ document.documentElement.setAttribute("lang", locale);
288
+ }, [locale]);
289
+ const changeLocale = React.useCallback((locale2) => {
290
+ dispatch({
291
+ type: "CHANGE_LOCALE",
292
+ locale: locale2
293
+ });
294
+ }, []);
295
+ const appMessages = defaultsDeep(messages[locale], messages.en);
296
+ return /* @__PURE__ */ jsx(IntlProvider, { locale, defaultLocale: "en", messages: appMessages, textComponent: "span", children: /* @__PURE__ */ jsx(LocalesContextProvider, { changeLocale, localeNames, children }) });
297
+ };
298
+ const initialState$8 = {
299
+ localeNames: { en: "English" },
300
+ locale: "en"
301
+ };
302
+ const reducer$3 = (state = initialState$8, action) => {
303
+ switch (action.type) {
304
+ case "CHANGE_LOCALE": {
305
+ const { locale } = action;
306
+ if (!state.localeNames[locale]) {
307
+ return state;
308
+ }
309
+ return { ...state, locale };
310
+ }
311
+ default: {
312
+ return state;
313
+ }
314
+ }
315
+ };
316
+ const formatAPIErrors = ({ data }) => {
317
+ try {
318
+ return Object.keys(data).reduce(
319
+ (acc, current) => {
320
+ const errorMessage = data[current][0];
321
+ acc[current] = {
322
+ id: errorMessage,
323
+ defaultMessage: errorMessage
324
+ };
325
+ return acc;
326
+ },
327
+ {}
328
+ );
329
+ } catch (err) {
330
+ return {};
331
+ }
332
+ };
333
+ const Wrapper = styled(Box)`
334
+ margin: 0 auto;
335
+ width: 552px;
336
+ `;
337
+ const Column = styled(Flex)`
338
+ flex-direction: column;
339
+ `;
340
+ const LocaleToggle = () => {
341
+ const { changeLocale, localeNames } = useLocales();
342
+ const { formatMessage, locale } = useIntl();
343
+ return /* @__PURE__ */ jsx(
344
+ SingleSelect,
345
+ {
346
+ "aria-label": formatMessage({
347
+ id: "global.localeToggle.label",
348
+ defaultMessage: "Select interface language"
349
+ }),
350
+ value: locale,
351
+ onChange: (language) => {
352
+ changeLocale(language);
353
+ },
354
+ children: Object.entries(localeNames).map(([language, name]) => /* @__PURE__ */ jsx(SingleSelectOption, { value: language, children: name }, language))
355
+ }
356
+ );
357
+ };
358
+ const LayoutContent = ({ children }) => /* @__PURE__ */ jsx(
359
+ Wrapper,
360
+ {
361
+ shadow: "tableShadow",
362
+ hasRadius: true,
363
+ paddingTop: 9,
364
+ paddingBottom: 9,
365
+ paddingLeft: 10,
366
+ paddingRight: 10,
367
+ background: "neutral0",
368
+ children
369
+ }
370
+ );
371
+ const UnauthenticatedLayout = ({ children }) => {
372
+ return /* @__PURE__ */ jsxs("div", { children: [
373
+ /* @__PURE__ */ jsx(Flex, { as: "header", justifyContent: "flex-end", children: /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingRight: 8, children: /* @__PURE__ */ jsx(LocaleToggle, {}) }) }),
374
+ /* @__PURE__ */ jsx(Box, { paddingTop: 2, paddingBottom: 11, children })
375
+ ] });
376
+ };
377
+ const Img = styled.img`
378
+ height: ${72 / 16}rem;
379
+ `;
380
+ const Logo = () => {
381
+ const {
382
+ logos: { auth: auth2 }
383
+ } = useConfiguration();
384
+ return /* @__PURE__ */ jsx(Img, { src: auth2?.custom ?? auth2.default, "aria-hidden": true, alt: "" });
385
+ };
386
+ const FieldActionWrapper = styled(FieldAction)`
387
+ svg {
388
+ height: 1rem;
389
+ width: 1rem;
390
+ path {
391
+ fill: ${({ theme }) => theme.colors.neutral600};
392
+ }
393
+ }
394
+ `;
395
+ const PasswordInput$2 = styled(TextInput)`
396
+ ::-ms-reveal {
397
+ display: none;
398
+ }
399
+ `;
400
+ const Login = ({ onSubmit, schema, children }) => {
401
+ const [passwordShown, setPasswordShown] = useState(false);
402
+ const { formatMessage } = useIntl();
403
+ return /* @__PURE__ */ jsxs(Main, { children: [
404
+ /* @__PURE__ */ jsxs(LayoutContent, { children: [
405
+ /* @__PURE__ */ jsx(
406
+ Formik,
407
+ {
408
+ enableReinitialize: true,
409
+ initialValues: {
410
+ email: "",
411
+ password: "",
412
+ rememberMe: false
413
+ },
414
+ onSubmit,
415
+ validationSchema: schema,
416
+ validateOnChange: false,
417
+ children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
418
+ /* @__PURE__ */ jsxs(Column, { children: [
419
+ /* @__PURE__ */ jsx(Logo, {}),
420
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "alpha", as: "h1", children: formatMessage({
421
+ id: "Auth.form.welcome.title",
422
+ defaultMessage: "Welcome!"
423
+ }) }) }),
424
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage({
425
+ id: "Auth.form.welcome.subtitle",
426
+ defaultMessage: "Log in to your Strapi account"
427
+ }) }) }),
428
+ errors.errorMessage && /* @__PURE__ */ jsx(
429
+ Typography,
430
+ {
431
+ id: "global-form-error",
432
+ role: "alert",
433
+ tabIndex: -1,
434
+ textColor: "danger600",
435
+ children: errors.errorMessage
436
+ }
437
+ )
438
+ ] }),
439
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
440
+ /* @__PURE__ */ jsx(
441
+ TextInput,
442
+ {
443
+ error: errors.email ? formatMessage({
444
+ id: errors.email,
445
+ defaultMessage: "This value is required."
446
+ }) : "",
447
+ value: values.email,
448
+ onChange: handleChange,
449
+ label: formatMessage({ id: "Auth.form.email.label", defaultMessage: "Email" }),
450
+ placeholder: formatMessage({
451
+ id: "Auth.form.email.placeholder",
452
+ defaultMessage: "kai@doe.com"
453
+ }),
454
+ name: "email",
455
+ required: true
456
+ }
457
+ ),
458
+ /* @__PURE__ */ jsx(
459
+ PasswordInput$2,
460
+ {
461
+ error: errors.password ? formatMessage({
462
+ id: errors.password,
463
+ defaultMessage: "This value is required."
464
+ }) : "",
465
+ onChange: handleChange,
466
+ value: values.password,
467
+ label: formatMessage({
468
+ id: "global.password",
469
+ defaultMessage: "Password"
470
+ }),
471
+ name: "password",
472
+ type: passwordShown ? "text" : "password",
473
+ endAction: /* @__PURE__ */ jsx(
474
+ FieldActionWrapper,
475
+ {
476
+ onClick: (e) => {
477
+ e.stopPropagation();
478
+ setPasswordShown((prev) => !prev);
479
+ },
480
+ label: formatMessage(
481
+ passwordShown ? {
482
+ id: "Auth.form.password.show-password",
483
+ defaultMessage: "Show password"
484
+ } : {
485
+ id: "Auth.form.password.hide-password",
486
+ defaultMessage: "Hide password"
487
+ }
488
+ ),
489
+ children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
490
+ }
491
+ ),
492
+ required: true
493
+ }
494
+ ),
495
+ /* @__PURE__ */ jsx(
496
+ Checkbox,
497
+ {
498
+ onValueChange: (checked) => {
499
+ handleChange({ target: { value: checked, name: "rememberMe" } });
500
+ },
501
+ value: values.rememberMe,
502
+ "aria-label": "rememberMe",
503
+ name: "rememberMe",
504
+ children: formatMessage({
505
+ id: "Auth.form.rememberMe.label",
506
+ defaultMessage: "Remember me"
507
+ })
508
+ }
509
+ ),
510
+ /* @__PURE__ */ jsx(Button, { fullWidth: true, type: "submit", children: formatMessage({ id: "Auth.form.button.login", defaultMessage: "Login" }) })
511
+ ] })
512
+ ] })
513
+ }
514
+ ),
515
+ children
516
+ ] }),
517
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/forgot-password", children: formatMessage({
518
+ id: "Auth.link.forgot-password",
519
+ defaultMessage: "Forgot your password?"
520
+ }) }) }) })
521
+ ] });
522
+ };
523
+ Login.defaultProps = {
524
+ children: null,
525
+ onSubmit() {
526
+ }
527
+ };
528
+ Login.propTypes = {
529
+ children: PropTypes.node,
530
+ onSubmit: PropTypes.func,
531
+ schema: PropTypes.shape({
532
+ type: PropTypes.string.isRequired
533
+ }).isRequired
534
+ };
535
+ const LoginCE = (loginProps) => {
536
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsx(Login, { ...loginProps }) });
537
+ };
538
+ LoginCE.defaultProps = {
539
+ onSubmit: (e) => e.preventDefault()
540
+ };
541
+ LoginCE.propTypes = {
542
+ onSubmit: PropTypes.func
543
+ };
544
+ const ForgotPassword$1 = ({ onSubmit, schema }) => {
545
+ const { formatMessage } = useIntl();
546
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
547
+ /* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsx(
548
+ Formik,
549
+ {
550
+ enableReinitialize: true,
551
+ initialValues: {
552
+ email: ""
553
+ },
554
+ onSubmit,
555
+ validationSchema: schema,
556
+ validateOnChange: false,
557
+ children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
558
+ /* @__PURE__ */ jsxs(Column, { children: [
559
+ /* @__PURE__ */ jsx(Logo, {}),
560
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({
561
+ id: "Auth.form.button.password-recovery",
562
+ defaultMessage: "Password Recovery"
563
+ }) }) }),
564
+ errors.errorMessage && /* @__PURE__ */ jsx(
565
+ Typography,
566
+ {
567
+ id: "global-form-error",
568
+ role: "alert",
569
+ tabIndex: -1,
570
+ textColor: "danger600",
571
+ children: formatMessage({
572
+ id: errors.errorMessage,
573
+ defaultMessage: "An error occurred"
574
+ })
575
+ }
576
+ )
577
+ ] }),
578
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
579
+ /* @__PURE__ */ jsx(
580
+ TextInput,
581
+ {
582
+ error: errors.email ? formatMessage({
583
+ id: errors.email,
584
+ defaultMessage: "This email is invalid."
585
+ }) : "",
586
+ value: values.email,
587
+ onChange: handleChange,
588
+ label: formatMessage({ id: "Auth.form.email.label", defaultMessage: "Email" }),
589
+ placeholder: formatMessage({
590
+ id: "Auth.form.email.placeholder",
591
+ defaultMessage: "kai@doe.com"
592
+ }),
593
+ name: "email",
594
+ required: true
595
+ }
596
+ ),
597
+ /* @__PURE__ */ jsx(Button, { type: "submit", fullWidth: true, children: formatMessage({
598
+ id: "Auth.form.button.forgot-password",
599
+ defaultMessage: "Send Email"
600
+ }) })
601
+ ] })
602
+ ] })
603
+ }
604
+ ) }),
605
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
606
+ ] }) });
607
+ };
608
+ ForgotPassword$1.defaultProps = {
609
+ onSubmit: (e) => e.preventDefault()
610
+ };
611
+ ForgotPassword$1.propTypes = {
612
+ onSubmit: PropTypes.func,
613
+ schema: PropTypes.shape({
614
+ type: PropTypes.string.isRequired
615
+ }).isRequired
616
+ };
617
+ const ForgotPasswordSuccess = () => {
618
+ const { formatMessage } = useIntl();
619
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
620
+ /* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsxs(Column, { children: [
621
+ /* @__PURE__ */ jsx(Logo, {}),
622
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({
623
+ id: "app.containers.AuthPage.ForgotPasswordSuccess.title",
624
+ defaultMessage: "Email sent"
625
+ }) }) }),
626
+ /* @__PURE__ */ jsx(Typography, { children: formatMessage({
627
+ id: "app.containers.AuthPage.ForgotPasswordSuccess.text.email",
628
+ defaultMessage: "It can take a few minutes to receive your password recovery link."
629
+ }) }),
630
+ /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Typography, { children: formatMessage({
631
+ id: "app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin",
632
+ defaultMessage: "If you do not receive this link, please contact your administrator."
633
+ }) }) })
634
+ ] }) }),
635
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
636
+ ] }) });
637
+ };
638
+ const Oops = () => {
639
+ const { formatMessage } = useIntl();
640
+ const query = useQuery();
641
+ const message = query.get("info") || formatMessage({
642
+ id: "Auth.components.Oops.text",
643
+ defaultMessage: "Your account has been suspended."
644
+ });
645
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
646
+ /* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsxs(Column, { children: [
647
+ /* @__PURE__ */ jsx(Logo, {}),
648
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({ id: "Auth.components.Oops.title", defaultMessage: "Oops..." }) }) }),
649
+ /* @__PURE__ */ jsx(Typography, { children: message }),
650
+ /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Typography, { children: formatMessage({
651
+ id: "Auth.components.Oops.text.admin",
652
+ defaultMessage: "If this is a mistake, please contact your administrator."
653
+ }) }) })
654
+ ] }) }),
655
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
656
+ ] }) });
657
+ };
658
+ const FieldWrapper = styled(Field)`
659
+ height: ${32 / 16}rem;
660
+ width: ${32 / 16}rem;
661
+
662
+ > label,
663
+ ~ input {
664
+ display: block;
665
+ position: absolute;
666
+ top: 0;
667
+ left: 0;
668
+ right: 0;
669
+ bottom: 0;
670
+ }
671
+
672
+ > label {
673
+ color: inherit;
674
+ cursor: pointer;
675
+ padding: ${({ theme }) => theme.spaces[2]};
676
+ text-align: center;
677
+ vertical-align: middle;
678
+ }
679
+
680
+ &:hover,
681
+ &:focus-within {
682
+ background-color: ${({ theme }) => theme.colors.neutral0};
683
+ }
684
+
685
+ &:active,
686
+ &.selected {
687
+ color: ${({ theme }) => theme.colors.primary700};
688
+ background-color: ${({ theme }) => theme.colors.neutral0};
689
+ border-color: ${({ theme }) => theme.colors.primary700};
690
+ }
691
+ `;
692
+ const delays = {
693
+ postResponse: 90 * 24 * 60 * 60 * 1e3,
694
+ // 90 days in ms
695
+ postFirstDismissal: 7 * 24 * 60 * 60 * 1e3,
696
+ // 7 days in ms
697
+ postSubsequentDismissal: 90 * 24 * 60 * 60 * 1e3,
698
+ // 90 days in ms
699
+ display: 5 * 60 * 1e3
700
+ // 5 minutes in ms
701
+ };
702
+ const ratingArray = [...Array(11).keys()];
703
+ const checkIfShouldShowSurvey = (settings) => {
704
+ const { enabled, lastResponseDate, firstDismissalDate, lastDismissalDate } = settings;
705
+ if (window.strapi.flags.nps === false) {
706
+ return false;
707
+ }
708
+ if (enabled === false) {
709
+ return false;
710
+ }
711
+ if (lastResponseDate) {
712
+ const timeSinceLastResponse = Date.now() - new Date(lastResponseDate).getTime();
713
+ if (timeSinceLastResponse >= delays.postResponse) {
714
+ return true;
715
+ }
716
+ return false;
717
+ }
718
+ if (lastDismissalDate) {
719
+ const timeSinceLastDismissal = Date.now() - new Date(lastDismissalDate).getTime();
720
+ if (timeSinceLastDismissal >= delays.postSubsequentDismissal) {
721
+ return true;
722
+ }
723
+ return false;
724
+ }
725
+ if (firstDismissalDate) {
726
+ const timeSinceFirstDismissal = Date.now() - new Date(firstDismissalDate).getTime();
727
+ if (timeSinceFirstDismissal >= delays.postFirstDismissal) {
728
+ return true;
729
+ }
730
+ return false;
731
+ }
732
+ return true;
733
+ };
734
+ const NpsSurvey = () => {
735
+ const theme = useTheme();
736
+ const { formatMessage } = useIntl();
737
+ const { npsSurveySettings, setNpsSurveySettings } = useNpsSurveySettings();
738
+ const [isFeedbackResponse, setIsFeedbackResponse] = React.useState(false);
739
+ const toggleNotification = useNotification();
740
+ const { currentEnvironment, strapiVersion } = useAppInfo();
741
+ const { mutate, isLoading } = useMutation(
742
+ async (form) => {
743
+ const res = await fetch("https://analytics.strapi.io/submit-nps", {
744
+ method: "POST",
745
+ headers: {
746
+ "Content-Type": "application/json"
747
+ },
748
+ body: JSON.stringify(form)
749
+ });
750
+ if (!res.ok) {
751
+ throw new Error("Failed to submit NPS survey");
752
+ }
753
+ return res;
754
+ },
755
+ {
756
+ onSuccess() {
757
+ setNpsSurveySettings((settings) => ({
758
+ ...settings,
759
+ lastResponseDate: (/* @__PURE__ */ new Date()).toString(),
760
+ firstDismissalDate: null,
761
+ lastDismissalDate: null
762
+ }));
763
+ setIsFeedbackResponse(true);
764
+ setTimeout(() => {
765
+ setSurveyIsShown(false);
766
+ }, 3e3);
767
+ },
768
+ onError() {
769
+ toggleNotification({
770
+ type: "warning",
771
+ message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
772
+ });
773
+ }
774
+ }
775
+ );
776
+ const [surveyIsShown, setSurveyIsShown] = React.useState(
777
+ checkIfShouldShowSurvey(npsSurveySettings)
778
+ );
779
+ const [displaySurvey, setDisplaySurvey] = React.useState(false);
780
+ React.useEffect(() => {
781
+ const displayTime = setTimeout(() => {
782
+ setDisplaySurvey(true);
783
+ }, delays.display);
784
+ return () => {
785
+ clearTimeout(displayTime);
786
+ };
787
+ }, []);
788
+ if (!displaySurvey) {
789
+ return null;
790
+ }
791
+ if (!surveyIsShown) {
792
+ return null;
793
+ }
794
+ const handleSubmitResponse = ({
795
+ npsSurveyRating,
796
+ npsSurveyFeedback
797
+ }) => {
798
+ const userInfo = auth.getUserInfo();
799
+ mutate({
800
+ email: typeof userInfo === "object" && userInfo !== null ? userInfo.email : "",
801
+ rating: npsSurveyRating,
802
+ comment: npsSurveyFeedback,
803
+ environment: currentEnvironment,
804
+ version: strapiVersion ?? void 0,
805
+ license: window.strapi.projectType
806
+ });
807
+ };
808
+ const handleDismiss = () => {
809
+ setNpsSurveySettings((settings) => {
810
+ const nextSettings = {
811
+ ...settings,
812
+ lastResponseDate: null
813
+ };
814
+ if (settings.firstDismissalDate) {
815
+ nextSettings.lastDismissalDate = (/* @__PURE__ */ new Date()).toString();
816
+ } else {
817
+ nextSettings.firstDismissalDate = (/* @__PURE__ */ new Date()).toString();
818
+ }
819
+ return nextSettings;
820
+ });
821
+ setSurveyIsShown(false);
822
+ };
823
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
824
+ Formik,
825
+ {
826
+ initialValues: { npsSurveyFeedback: "", npsSurveyRating: null },
827
+ onSubmit: handleSubmitResponse,
828
+ validationSchema: yup.object({
829
+ npsSurveyFeedback: yup.string(),
830
+ npsSurveyRating: yup.number().required()
831
+ }),
832
+ children: ({ values, handleChange, setFieldValue }) => /* @__PURE__ */ jsx(Form$1, { name: "npsSurveyForm", children: /* @__PURE__ */ jsx(
833
+ Flex,
834
+ {
835
+ hasRadius: true,
836
+ direction: "column",
837
+ padding: 4,
838
+ borderColor: "primary200",
839
+ background: "neutral0",
840
+ shadow: "popupShadow",
841
+ position: "fixed",
842
+ bottom: 0,
843
+ left: "50%",
844
+ transform: "translateX(-50%)",
845
+ zIndex: theme.zIndices[2],
846
+ width: "50%",
847
+ children: isFeedbackResponse ? /* @__PURE__ */ jsx(Typography, { fontWeight: "semiBold", children: formatMessage({
848
+ id: "app.components.NpsSurvey.feedback-response",
849
+ defaultMessage: "Thank you very much for your feedback!"
850
+ }) }) : /* @__PURE__ */ jsxs(Box, { as: "fieldset", width: "100%", children: [
851
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", width: "100%", children: [
852
+ /* @__PURE__ */ jsx(Box, { marginLeft: "auto", marginRight: "auto", children: /* @__PURE__ */ jsx(Typography, { fontWeight: "semiBold", as: "legend", children: formatMessage({
853
+ id: "app.components.NpsSurvey.banner-title",
854
+ defaultMessage: "How likely are you to recommend Strapi to a friend or colleague?"
855
+ }) }) }),
856
+ /* @__PURE__ */ jsx(
857
+ IconButton,
858
+ {
859
+ onClick: handleDismiss,
860
+ "aria-label": formatMessage({
861
+ id: "app.components.NpsSurvey.dismiss-survey-label",
862
+ defaultMessage: "Dismiss survey"
863
+ }),
864
+ icon: /* @__PURE__ */ jsx(Cross, {})
865
+ }
866
+ )
867
+ ] }),
868
+ /* @__PURE__ */ jsxs(Flex, { gap: 2, marginTop: 2, marginBottom: 2, justifyContent: "center", children: [
869
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: formatMessage({
870
+ id: "app.components.NpsSurvey.no-recommendation",
871
+ defaultMessage: "Not at all likely"
872
+ }) }),
873
+ ratingArray.map((number) => {
874
+ return /* @__PURE__ */ jsx(
875
+ FieldWrapper,
876
+ {
877
+ className: values.npsSurveyRating === number ? "selected" : void 0,
878
+ hasRadius: true,
879
+ background: "primary100",
880
+ borderColor: "primary200",
881
+ color: "primary600",
882
+ position: "relative",
883
+ cursor: "pointer",
884
+ children: /* @__PURE__ */ jsxs(FieldLabel, { htmlFor: `nps-survey-rating-${number}-input`, children: [
885
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
886
+ FieldInput,
887
+ {
888
+ type: "radio",
889
+ id: `nps-survey-rating-${number}-input`,
890
+ name: "npsSurveyRating",
891
+ checked: values.npsSurveyRating === number,
892
+ onChange: (e) => setFieldValue("npsSurveyRating", parseInt(e.target.value, 10)),
893
+ value: number
894
+ }
895
+ ) }),
896
+ number
897
+ ] })
898
+ },
899
+ number
900
+ );
901
+ }),
902
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: formatMessage({
903
+ id: "app.components.NpsSurvey.happy-to-recommend",
904
+ defaultMessage: "Extremely likely"
905
+ }) })
906
+ ] }),
907
+ values.npsSurveyRating !== null && /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
908
+ /* @__PURE__ */ jsx(Box, { marginTop: 2, children: /* @__PURE__ */ jsx(FieldLabel, { htmlFor: "npsSurveyFeedback", fontWeight: "semiBold", fontSize: 2, children: formatMessage({
909
+ id: "app.components.NpsSurvey.feedback-question",
910
+ defaultMessage: "Do you have any suggestion for improvements?"
911
+ }) }) }),
912
+ /* @__PURE__ */ jsx(Box, { width: "62%", marginTop: 3, marginBottom: 4, children: /* @__PURE__ */ jsx(
913
+ Textarea,
914
+ {
915
+ id: "npsSurveyFeedback",
916
+ width: "100%",
917
+ onChange: handleChange,
918
+ children: values.npsSurveyFeedback
919
+ }
920
+ ) }),
921
+ /* @__PURE__ */ jsx(Button, { marginBottom: 2, type: "submit", loading: isLoading, children: formatMessage({
922
+ id: "app.components.NpsSurvey.submit-feedback",
923
+ defaultMessage: "Submit Feedback"
924
+ }) })
925
+ ] })
926
+ ] })
927
+ }
928
+ ) })
929
+ }
930
+ ) });
931
+ };
932
+ function useNpsSurveySettings() {
933
+ const [npsSurveySettings, setNpsSurveySettings] = usePersistentState(
934
+ "STRAPI_NPS_SURVEY_SETTINGS",
935
+ {
936
+ enabled: true,
937
+ lastResponseDate: null,
938
+ firstDismissalDate: null,
939
+ lastDismissalDate: null
940
+ }
941
+ );
942
+ return { npsSurveySettings, setNpsSurveySettings };
943
+ }
944
+ const A = styled.a`
945
+ color: ${({ theme }) => theme.colors.primary600};
946
+ `;
947
+ const PasswordInput$1 = styled(TextInput)`
948
+ ::-ms-reveal {
949
+ display: none;
950
+ }
951
+ `;
952
+ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) => {
953
+ const toggleNotification = useNotification();
954
+ const { push } = useHistory();
955
+ const [passwordShown, setPasswordShown] = useState(false);
956
+ const [confirmPasswordShown, setConfirmPasswordShown] = useState(false);
957
+ const [submitCount, setSubmitCount] = useState(0);
958
+ const { trackUsage } = useTracking();
959
+ const { formatMessage } = useIntl();
960
+ const query = useQuery();
961
+ const { formatAPIError } = useAPIErrorHandler();
962
+ const { get: get2 } = useFetchClient();
963
+ const { setNpsSurveySettings } = useNpsSurveySettings();
964
+ const registrationToken = query.get("registrationToken");
965
+ const { data: userInfo } = useQuery$1({
966
+ queryKey: ["admin", "registration-info", registrationToken],
967
+ async queryFn() {
968
+ const {
969
+ data: { data }
970
+ } = await get2(`/admin/registration-info`, {
971
+ params: {
972
+ registrationToken
973
+ }
974
+ });
975
+ return data;
976
+ },
977
+ enabled: !!registrationToken,
978
+ initialData: {},
979
+ onError(err) {
980
+ const message = formatAPIError(err);
981
+ toggleNotification({
982
+ type: "warning",
983
+ message
984
+ });
985
+ push(`/auth/oops?info=${encodeURIComponent(message)}`);
986
+ }
987
+ });
988
+ function normalizeData(data) {
989
+ return Object.entries(data).reduce((acc, [key, value]) => {
990
+ let normalizedvalue = value;
991
+ if (!["password", "confirmPassword"].includes(key) && typeof value === "string") {
992
+ normalizedvalue = normalizedvalue.trim();
993
+ if (key === "lastname") {
994
+ normalizedvalue = normalizedvalue || null;
995
+ }
996
+ }
997
+ acc[key] = normalizedvalue;
998
+ return acc;
999
+ }, {});
1000
+ }
1001
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(LayoutContent, { children: [
1002
+ /* @__PURE__ */ jsx(
1003
+ Formik,
1004
+ {
1005
+ enableReinitialize: true,
1006
+ initialValues: {
1007
+ firstname: userInfo.firstname || "",
1008
+ lastname: userInfo.lastname || "",
1009
+ email: userInfo.email || "",
1010
+ password: "",
1011
+ confirmPassword: "",
1012
+ registrationToken: registrationToken || void 0,
1013
+ news: false
1014
+ },
1015
+ onSubmit: async (data, formik) => {
1016
+ const normalizedData = normalizeData(data);
1017
+ try {
1018
+ await schema.validate(normalizedData, { abortEarly: false });
1019
+ if (submitCount > 0 && authType === "register-admin") {
1020
+ trackUsage("didSubmitWithErrorsFirstAdmin", { count: submitCount.toString() });
1021
+ }
1022
+ if (registrationToken) {
1023
+ onSubmit(
1024
+ { userInfo: omit(normalizedData, ["registrationToken"]), registrationToken },
1025
+ formik
1026
+ );
1027
+ } else {
1028
+ onSubmit(normalizedData, formik);
1029
+ }
1030
+ setNpsSurveySettings({ enabled: data.news });
1031
+ } catch (err) {
1032
+ const errors = getYupInnerErrors(err);
1033
+ setSubmitCount(submitCount + 1);
1034
+ formik.setErrors(errors);
1035
+ }
1036
+ },
1037
+ validateOnChange: false,
1038
+ children: ({ values, errors, handleChange }) => {
1039
+ return /* @__PURE__ */ jsx(Form, { noValidate: true, children: /* @__PURE__ */ jsxs(Main, { children: [
1040
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 3, children: [
1041
+ /* @__PURE__ */ jsx(Logo, {}),
1042
+ /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", textAlign: "center", children: formatMessage({
1043
+ id: "Auth.form.welcome.title",
1044
+ defaultMessage: "Welcome to Strapi!"
1045
+ }) }),
1046
+ /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", textAlign: "center", children: formatMessage({
1047
+ id: "Auth.form.register.subtitle",
1048
+ defaultMessage: "Credentials are only used to authenticate in Strapi. All saved data will be stored in your database."
1049
+ }) })
1050
+ ] }),
1051
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, marginTop: 7, children: [
1052
+ /* @__PURE__ */ jsxs(Grid, { gap: 4, children: [
1053
+ /* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
1054
+ TextInput,
1055
+ {
1056
+ name: "firstname",
1057
+ required: true,
1058
+ value: values.firstname,
1059
+ error: errors.firstname ? formatMessage(errors.firstname) : void 0,
1060
+ onChange: handleChange,
1061
+ label: formatMessage({
1062
+ id: "Auth.form.firstname.label",
1063
+ defaultMessage: "Firstname"
1064
+ })
1065
+ }
1066
+ ) }),
1067
+ /* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
1068
+ TextInput,
1069
+ {
1070
+ name: "lastname",
1071
+ value: values.lastname,
1072
+ onChange: handleChange,
1073
+ label: formatMessage({
1074
+ id: "Auth.form.lastname.label",
1075
+ defaultMessage: "Lastname"
1076
+ })
1077
+ }
1078
+ ) })
1079
+ ] }),
1080
+ /* @__PURE__ */ jsx(
1081
+ TextInput,
1082
+ {
1083
+ name: "email",
1084
+ disabled: fieldsToDisable.includes("email"),
1085
+ value: values.email,
1086
+ onChange: handleChange,
1087
+ error: errors.email ? formatMessage(errors.email) : void 0,
1088
+ required: true,
1089
+ label: formatMessage({
1090
+ id: "Auth.form.email.label",
1091
+ defaultMessage: "Email"
1092
+ }),
1093
+ type: "email"
1094
+ }
1095
+ ),
1096
+ /* @__PURE__ */ jsx(
1097
+ PasswordInput$1,
1098
+ {
1099
+ name: "password",
1100
+ onChange: handleChange,
1101
+ value: values.password,
1102
+ error: errors.password ? formatMessage(errors.password) : void 0,
1103
+ endAction: /* @__PURE__ */ jsx(
1104
+ FieldActionWrapper,
1105
+ {
1106
+ onClick: (e) => {
1107
+ e.preventDefault();
1108
+ setPasswordShown((prev) => !prev);
1109
+ },
1110
+ label: formatMessage(
1111
+ passwordShown ? {
1112
+ id: "Auth.form.password.show-password",
1113
+ defaultMessage: "Show password"
1114
+ } : {
1115
+ id: "Auth.form.password.hide-password",
1116
+ defaultMessage: "Hide password"
1117
+ }
1118
+ ),
1119
+ children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
1120
+ }
1121
+ ),
1122
+ hint: formatMessage({
1123
+ id: "Auth.form.password.hint",
1124
+ defaultMessage: "Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"
1125
+ }),
1126
+ required: true,
1127
+ label: formatMessage({
1128
+ id: "global.password",
1129
+ defaultMessage: "Password"
1130
+ }),
1131
+ type: passwordShown ? "text" : "password"
1132
+ }
1133
+ ),
1134
+ /* @__PURE__ */ jsx(
1135
+ PasswordInput$1,
1136
+ {
1137
+ name: "confirmPassword",
1138
+ onChange: handleChange,
1139
+ value: values.confirmPassword,
1140
+ error: errors.confirmPassword ? formatMessage(errors.confirmPassword) : void 0,
1141
+ endAction: /* @__PURE__ */ jsx(
1142
+ FieldActionWrapper,
1143
+ {
1144
+ onClick: (e) => {
1145
+ e.preventDefault();
1146
+ setConfirmPasswordShown((prev) => !prev);
1147
+ },
1148
+ label: formatMessage(
1149
+ confirmPasswordShown ? {
1150
+ id: "Auth.form.password.show-password",
1151
+ defaultMessage: "Show password"
1152
+ } : {
1153
+ id: "Auth.form.password.hide-password",
1154
+ defaultMessage: "Hide password"
1155
+ }
1156
+ ),
1157
+ children: confirmPasswordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
1158
+ }
1159
+ ),
1160
+ required: true,
1161
+ label: formatMessage({
1162
+ id: "Auth.form.confirmPassword.label",
1163
+ defaultMessage: "Confirm Password"
1164
+ }),
1165
+ type: confirmPasswordShown ? "text" : "password"
1166
+ }
1167
+ ),
1168
+ /* @__PURE__ */ jsx(
1169
+ Checkbox,
1170
+ {
1171
+ onValueChange: (checked) => {
1172
+ handleChange({ target: { value: checked, name: "news" } });
1173
+ },
1174
+ value: values.news,
1175
+ name: "news",
1176
+ "aria-label": "news",
1177
+ children: formatMessage(
1178
+ {
1179
+ id: "Auth.form.register.news.label",
1180
+ defaultMessage: "Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy})."
1181
+ },
1182
+ {
1183
+ terms: /* @__PURE__ */ jsx(A, { target: "_blank", href: "https://strapi.io/terms", rel: "noreferrer", children: formatMessage({
1184
+ id: "Auth.privacy-policy-agreement.terms",
1185
+ defaultMessage: "terms"
1186
+ }) }),
1187
+ policy: /* @__PURE__ */ jsx(A, { target: "_blank", href: "https://strapi.io/privacy", rel: "noreferrer", children: formatMessage({
1188
+ id: "Auth.privacy-policy-agreement.policy",
1189
+ defaultMessage: "policy"
1190
+ }) })
1191
+ }
1192
+ )
1193
+ }
1194
+ ),
1195
+ /* @__PURE__ */ jsx(Button, { fullWidth: true, size: "L", type: "submit", children: formatMessage({
1196
+ id: "Auth.form.button.register",
1197
+ defaultMessage: "Let's start"
1198
+ }) })
1199
+ ] })
1200
+ ] }) });
1201
+ }
1202
+ }
1203
+ ),
1204
+ !noSignin && /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Link, { label: "Auth.link.signin", to: "/auth/login", children: formatMessage({
1205
+ id: "Auth.link.signin.account",
1206
+ defaultMessage: "Already have an account?"
1207
+ }) }) }) })
1208
+ ] }) });
1209
+ };
1210
+ Register.defaultProps = {
1211
+ fieldsToDisable: [],
1212
+ noSignin: false,
1213
+ onSubmit: (e) => e.preventDefault()
1214
+ };
1215
+ Register.propTypes = {
1216
+ authType: PropTypes.string.isRequired,
1217
+ fieldsToDisable: PropTypes.array,
1218
+ noSignin: PropTypes.bool,
1219
+ onSubmit: PropTypes.func,
1220
+ schema: PropTypes.shape({
1221
+ validate: PropTypes.func.isRequired,
1222
+ type: PropTypes.string.isRequired
1223
+ }).isRequired
1224
+ };
1225
+ const PasswordInput = styled(TextInput)`
1226
+ ::-ms-reveal {
1227
+ display: none;
1228
+ }
1229
+ `;
1230
+ const ForgotPassword = ({ onSubmit, schema }) => {
1231
+ const [passwordShown, setPasswordShown] = useState(false);
1232
+ const [confirmPasswordShown, setConfirmPasswordShown] = useState(false);
1233
+ const { formatMessage } = useIntl();
1234
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
1235
+ /* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsx(
1236
+ Formik,
1237
+ {
1238
+ enableReinitialize: true,
1239
+ initialValues: {
1240
+ password: "",
1241
+ confirmPassword: ""
1242
+ },
1243
+ onSubmit,
1244
+ validationSchema: schema,
1245
+ validateOnChange: false,
1246
+ children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
1247
+ /* @__PURE__ */ jsxs(Column, { children: [
1248
+ /* @__PURE__ */ jsx(Logo, {}),
1249
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({
1250
+ id: "global.reset-password",
1251
+ defaultMessage: "Reset password"
1252
+ }) }) }),
1253
+ errors.errorMessage && /* @__PURE__ */ jsx(
1254
+ Typography,
1255
+ {
1256
+ id: "global-form-error",
1257
+ role: "alert",
1258
+ tabIndex: -1,
1259
+ textColor: "danger600",
1260
+ children: formatMessage({
1261
+ id: errors.errorMessage,
1262
+ defaultMessage: "An error occurred"
1263
+ })
1264
+ }
1265
+ )
1266
+ ] }),
1267
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
1268
+ /* @__PURE__ */ jsx(
1269
+ PasswordInput,
1270
+ {
1271
+ name: "password",
1272
+ onChange: handleChange,
1273
+ value: values.password,
1274
+ error: errors.password ? formatMessage({
1275
+ id: errors.password,
1276
+ defaultMessage: "This field is required."
1277
+ }) : void 0,
1278
+ endAction: /* @__PURE__ */ jsx(
1279
+ FieldActionWrapper,
1280
+ {
1281
+ onClick: (e) => {
1282
+ e.preventDefault();
1283
+ setPasswordShown((prev) => !prev);
1284
+ },
1285
+ label: formatMessage(
1286
+ passwordShown ? {
1287
+ id: "Auth.form.password.show-password",
1288
+ defaultMessage: "Show password"
1289
+ } : {
1290
+ id: "Auth.form.password.hide-password",
1291
+ defaultMessage: "Hide password"
1292
+ }
1293
+ ),
1294
+ children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
1295
+ }
1296
+ ),
1297
+ hint: formatMessage({
1298
+ id: "Auth.form.password.hint",
1299
+ defaultMessage: "Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number"
1300
+ }),
1301
+ required: true,
1302
+ label: formatMessage({
1303
+ id: "global.password",
1304
+ defaultMessage: "Password"
1305
+ }),
1306
+ type: passwordShown ? "text" : "password"
1307
+ }
1308
+ ),
1309
+ /* @__PURE__ */ jsx(
1310
+ PasswordInput,
1311
+ {
1312
+ name: "confirmPassword",
1313
+ onChange: handleChange,
1314
+ value: values.confirmPassword,
1315
+ error: errors.confirmPassword ? formatMessage({
1316
+ id: errors.confirmPassword,
1317
+ defaultMessage: "This value is required."
1318
+ }) : void 0,
1319
+ endAction: /* @__PURE__ */ jsx(
1320
+ FieldActionWrapper,
1321
+ {
1322
+ onClick: (e) => {
1323
+ e.preventDefault();
1324
+ setConfirmPasswordShown((prev) => !prev);
1325
+ },
1326
+ label: formatMessage(
1327
+ passwordShown ? {
1328
+ id: "Auth.form.password.show-password",
1329
+ defaultMessage: "Show password"
1330
+ } : {
1331
+ id: "Auth.form.password.hide-password",
1332
+ defaultMessage: "Hide password"
1333
+ }
1334
+ ),
1335
+ children: confirmPasswordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
1336
+ }
1337
+ ),
1338
+ required: true,
1339
+ label: formatMessage({
1340
+ id: "Auth.form.confirmPassword.label",
1341
+ defaultMessage: "Confirm Password"
1342
+ }),
1343
+ type: confirmPasswordShown ? "text" : "password"
1344
+ }
1345
+ ),
1346
+ /* @__PURE__ */ jsx(Button, { fullwidth: true, type: "submit", children: formatMessage({
1347
+ id: "global.change-password",
1348
+ defaultMessage: "Change password"
1349
+ }) })
1350
+ ] })
1351
+ ] })
1352
+ }
1353
+ ) }),
1354
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
1355
+ ] }) });
1356
+ };
1357
+ ForgotPassword.defaultProps = {
1358
+ onSubmit: (e) => e.preventDefault()
1359
+ };
1360
+ ForgotPassword.propTypes = {
1361
+ onSubmit: PropTypes.func,
1362
+ schema: PropTypes.shape({
1363
+ type: PropTypes.string.isRequired
1364
+ }).isRequired
1365
+ };
1366
+ const FORMS = {
1367
+ "forgot-password": {
1368
+ Component: ForgotPassword$1,
1369
+ endPoint: "forgot-password",
1370
+ fieldsToDisable: [],
1371
+ fieldsToOmit: [],
1372
+ schema: yup.object().shape({
1373
+ email: yup.string().email(translatedErrors.email).required(translatedErrors.required)
1374
+ }),
1375
+ inputsPrefix: ""
1376
+ },
1377
+ "forgot-password-success": {
1378
+ Component: ForgotPasswordSuccess,
1379
+ endPoint: "",
1380
+ fieldsToDisable: [],
1381
+ fieldsToOmit: [],
1382
+ schema: null,
1383
+ inputsPrefix: ""
1384
+ },
1385
+ // the `Component` attribute is set after all forms and CE/EE components are loaded, but since we
1386
+ // are here outside of a React component we can not use the hook directly
1387
+ login: {
1388
+ endPoint: "login",
1389
+ fieldsToDisable: [],
1390
+ fieldsToOmit: ["rememberMe"],
1391
+ schema: yup.object().shape({
1392
+ email: yup.string().email(translatedErrors.email).required(translatedErrors.required),
1393
+ password: yup.string().required(translatedErrors.required),
1394
+ rememberMe: yup.bool().nullable()
1395
+ }),
1396
+ inputsPrefix: ""
1397
+ },
1398
+ oops: {
1399
+ Component: Oops,
1400
+ endPoint: null,
1401
+ fieldsToDisable: [],
1402
+ fieldsToOmit: [],
1403
+ schema: null,
1404
+ inputsPrefix: ""
1405
+ },
1406
+ register: {
1407
+ Component: Register,
1408
+ endPoint: "register",
1409
+ fieldsToDisable: ["email"],
1410
+ fieldsToOmit: ["userInfo.confirmPassword", "userInfo.news", "userInfo.email"],
1411
+ schema: yup.object().shape({
1412
+ firstname: yup.string().trim().required(translatedErrors.required),
1413
+ lastname: yup.string().nullable(),
1414
+ password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
1415
+ confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required),
1416
+ registrationToken: yup.string().required(translatedErrors.required)
1417
+ }),
1418
+ inputsPrefix: "userInfo."
1419
+ },
1420
+ "register-admin": {
1421
+ Component: Register,
1422
+ endPoint: "register-admin",
1423
+ noSignin: true,
1424
+ fieldsToDisable: [],
1425
+ fieldsToOmit: ["confirmPassword", "news"],
1426
+ schema: yup.object().shape({
1427
+ firstname: yup.string().trim().required(translatedErrors.required),
1428
+ lastname: yup.string().nullable(),
1429
+ password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
1430
+ email: yup.string().email(translatedErrors.email).strict().lowercase(translatedErrors.lowercase).required(translatedErrors.required),
1431
+ confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
1432
+ }),
1433
+ inputsPrefix: ""
1434
+ },
1435
+ "reset-password": {
1436
+ Component: ForgotPassword,
1437
+ endPoint: "reset-password",
1438
+ fieldsToDisable: [],
1439
+ fieldsToOmit: ["confirmPassword"],
1440
+ schema: yup.object().shape({
1441
+ password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
1442
+ confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
1443
+ })
1444
+ }
1445
+ };
1446
+ const init = (initialState2) => {
1447
+ return initialState2;
1448
+ };
1449
+ const initialState$7 = {
1450
+ formErrors: {},
1451
+ modifiedData: {},
1452
+ requestError: null
1453
+ };
1454
+ const reducer$2 = (state, action) => produce(state, (draftState) => {
1455
+ switch (action.type) {
1456
+ case "ON_CHANGE": {
1457
+ set(draftState.modifiedData, action.keys.split("."), action.value);
1458
+ break;
1459
+ }
1460
+ case "RESET_PROPS": {
1461
+ return initialState$7;
1462
+ }
1463
+ case "SET_DATA": {
1464
+ draftState.modifiedData = action.data;
1465
+ break;
1466
+ }
1467
+ case "SET_ERRORS": {
1468
+ draftState.formErrors = action.errors;
1469
+ break;
1470
+ }
1471
+ case "SET_REQUEST_ERROR": {
1472
+ draftState.requestError = {
1473
+ errorMessage: action.errorMessage,
1474
+ errorStatus: action.errorStatus
1475
+ };
1476
+ break;
1477
+ }
1478
+ default:
1479
+ return draftState;
1480
+ }
1481
+ });
1482
+ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
1483
+ const {
1484
+ push,
1485
+ location: { search }
1486
+ } = useHistory();
1487
+ const { changeLocale } = useLocales();
1488
+ const { setSkipped } = useGuidedTour();
1489
+ const { trackUsage } = useTracking();
1490
+ const {
1491
+ params: { authType }
1492
+ } = useRouteMatch("/auth/:authType");
1493
+ const query = useQuery();
1494
+ const Login2 = useEnterprise(
1495
+ LoginCE,
1496
+ async () => (await import("./index-305a03f4.mjs")).LoginEE
1497
+ );
1498
+ const forms = useEnterprise(
1499
+ FORMS,
1500
+ async () => (await import("./constants-9de7641c.mjs")).FORMS,
1501
+ {
1502
+ combine(ceForms, eeForms) {
1503
+ return {
1504
+ ...ceForms,
1505
+ ...eeForms
1506
+ };
1507
+ },
1508
+ defaultValue: FORMS
1509
+ }
1510
+ );
1511
+ const [{ formErrors, modifiedData, requestError }, dispatch] = useReducer(
1512
+ reducer$2,
1513
+ initialState$7,
1514
+ init
1515
+ );
1516
+ const CancelToken = axios.CancelToken;
1517
+ const source = CancelToken.source();
1518
+ const { endPoint, fieldsToDisable, fieldsToOmit, inputsPrefix, schema, ...rest } = forms?.[authType] ?? {};
1519
+ useEffect(() => {
1520
+ return () => {
1521
+ source.cancel("Component unmounted");
1522
+ };
1523
+ }, []);
1524
+ const { post } = useFetchClient();
1525
+ useEffect(() => {
1526
+ dispatch({
1527
+ type: "RESET_PROPS"
1528
+ });
1529
+ }, [authType]);
1530
+ const handleChange = ({ target: { name, value } }) => {
1531
+ dispatch({
1532
+ type: "ON_CHANGE",
1533
+ keys: name,
1534
+ value
1535
+ });
1536
+ };
1537
+ const handleSubmit = async (e, { setSubmitting, setErrors }) => {
1538
+ setSubmitting(true);
1539
+ const body = omit(e, fieldsToOmit);
1540
+ const requestURL = `/admin/${endPoint}`;
1541
+ if (authType === "login") {
1542
+ await loginRequest(e, requestURL, { setSubmitting, setErrors });
1543
+ }
1544
+ if (authType === "register" || authType === "register-admin") {
1545
+ await registerRequest(e, requestURL, { setSubmitting, setErrors });
1546
+ }
1547
+ if (authType === "forgot-password") {
1548
+ await forgotPasswordRequest(body, requestURL, { setSubmitting, setErrors });
1549
+ }
1550
+ if (authType === "reset-password") {
1551
+ await resetPasswordRequest(body, requestURL, { setSubmitting, setErrors });
1552
+ }
1553
+ };
1554
+ const forgotPasswordRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
1555
+ try {
1556
+ await post(requestURL, body, { cancelToken: source.token });
1557
+ push("/auth/forgot-password-success");
1558
+ } catch (err) {
1559
+ console.error(err);
1560
+ setErrors({ errorMessage: "notification.error" });
1561
+ } finally {
1562
+ setSubmitting(false);
1563
+ }
1564
+ };
1565
+ const loginRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
1566
+ try {
1567
+ const {
1568
+ data: {
1569
+ data: { token, user }
1570
+ }
1571
+ } = await post(requestURL, omit(body, fieldsToOmit), { cancelToken: source.token });
1572
+ if (user.preferedLanguage) {
1573
+ changeLocale(user.preferedLanguage);
1574
+ }
1575
+ auth.setToken(token, body.rememberMe);
1576
+ auth.setUserInfo(user, body.rememberMe);
1577
+ redirectToPreviousLocation();
1578
+ } catch (err) {
1579
+ if (err.response) {
1580
+ const errorMessage = get(
1581
+ err,
1582
+ ["response", "data", "error", "message"],
1583
+ "Something went wrong"
1584
+ );
1585
+ if (camelCase(errorMessage).toLowerCase() === "usernotactive") {
1586
+ push("/auth/oops");
1587
+ dispatch({
1588
+ type: "RESET_PROPS"
1589
+ });
1590
+ return;
1591
+ }
1592
+ setErrors({ errorMessage });
1593
+ }
1594
+ } finally {
1595
+ setSubmitting(false);
1596
+ }
1597
+ };
1598
+ const registerRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
1599
+ try {
1600
+ trackUsage("willCreateFirstAdmin");
1601
+ const {
1602
+ data: {
1603
+ data: { token, user }
1604
+ }
1605
+ } = await post(requestURL, omit(body, fieldsToOmit), { cancelToken: source.token });
1606
+ auth.setToken(token, false);
1607
+ auth.setUserInfo(user, false);
1608
+ setSubmitting(false);
1609
+ setHasAdmin(true);
1610
+ const { roles } = user;
1611
+ if (roles) {
1612
+ const isUserSuperAdmin = roles.find(({ code }) => code === "strapi-super-admin");
1613
+ if (isUserSuperAdmin) {
1614
+ auth.set(false, "GUIDED_TOUR_SKIPPED", true);
1615
+ setSkipped(false);
1616
+ trackUsage("didLaunchGuidedtour");
1617
+ }
1618
+ }
1619
+ if (authType === "register" && body.userInfo.news === true || authType === "register-admin" && body.news === true) {
1620
+ push({
1621
+ pathname: "/usecase",
1622
+ search: `?hasAdmin=${hasAdmin}`
1623
+ });
1624
+ return;
1625
+ }
1626
+ redirectToPreviousLocation();
1627
+ } catch (err) {
1628
+ trackUsage("didNotCreateFirstAdmin");
1629
+ if (err.response) {
1630
+ const { data } = err.response;
1631
+ const apiErrors = formatAPIErrors(data);
1632
+ setErrors({ apiErrors });
1633
+ }
1634
+ }
1635
+ };
1636
+ const resetPasswordRequest = async (body, requestURL, { setErrors, setSubmitting }) => {
1637
+ try {
1638
+ const {
1639
+ data: {
1640
+ data: { token, user }
1641
+ }
1642
+ } = await post(
1643
+ requestURL,
1644
+ { ...body, resetPasswordToken: query.get("code") },
1645
+ { cancelToken: source.token }
1646
+ );
1647
+ auth.setToken(token, false);
1648
+ auth.setUserInfo(user, false);
1649
+ push("/");
1650
+ } catch (err) {
1651
+ if (err.response) {
1652
+ const errorMessage = get(err, ["response", "data", "message"], "Something went wrong");
1653
+ const errorStatus = get(err, ["response", "data", "statusCode"], 400);
1654
+ dispatch({
1655
+ type: "SET_REQUEST_ERROR",
1656
+ errorMessage,
1657
+ errorStatus
1658
+ });
1659
+ setErrors({ errorMessage });
1660
+ }
1661
+ } finally {
1662
+ setSubmitting(false);
1663
+ }
1664
+ };
1665
+ const redirectToPreviousLocation = () => {
1666
+ if (authType === "login") {
1667
+ const redirectTo = query.get("redirectTo");
1668
+ const redirectUrl = redirectTo ? decodeURIComponent(redirectTo) : "/";
1669
+ push(redirectUrl);
1670
+ } else {
1671
+ push("/");
1672
+ }
1673
+ };
1674
+ if (!forms[authType] || hasAdmin && authType === "register-admin" || auth.getToken()) {
1675
+ return /* @__PURE__ */ jsx(Redirect, { to: "/" });
1676
+ }
1677
+ if (!hasAdmin && authType !== "register-admin") {
1678
+ return /* @__PURE__ */ jsx(
1679
+ Redirect,
1680
+ {
1681
+ to: {
1682
+ pathname: "/auth/register-admin",
1683
+ // Forward the `?redirectTo` from /auth/login
1684
+ // /abc => /auth/login?redirectTo=%2Fabc => /auth/register-admin?redirectTo=%2Fabc
1685
+ search
1686
+ }
1687
+ }
1688
+ );
1689
+ }
1690
+ if (Login2) {
1691
+ forms.login.Component = Login2;
1692
+ }
1693
+ if (!Login2) {
1694
+ return null;
1695
+ }
1696
+ const { Component } = forms?.[authType] ?? {};
1697
+ return /* @__PURE__ */ jsx(
1698
+ Component,
1699
+ {
1700
+ ...rest,
1701
+ authType,
1702
+ fieldsToDisable,
1703
+ formErrors,
1704
+ inputsPrefix,
1705
+ modifiedData,
1706
+ onChange: handleChange,
1707
+ onSubmit: handleSubmit,
1708
+ requestError,
1709
+ schema
1710
+ }
1711
+ );
1712
+ };
1713
+ AuthPage.defaultProps = {
1714
+ hasAdmin: false
1715
+ };
1716
+ AuthPage.propTypes = {
1717
+ hasAdmin: PropTypes.bool,
1718
+ setHasAdmin: PropTypes.func.isRequired
1719
+ };
1720
+ const NotFoundPage = () => {
1721
+ const { formatMessage } = useIntl();
1722
+ useFocusWhenNavigate();
1723
+ return /* @__PURE__ */ jsxs(Main, { labelledBy: "title", children: [
1724
+ /* @__PURE__ */ jsx(
1725
+ HeaderLayout,
1726
+ {
1727
+ id: "title",
1728
+ title: formatMessage({
1729
+ id: "content-manager.pageNotFound",
1730
+ defaultMessage: "Page not found"
1731
+ })
1732
+ }
1733
+ ),
1734
+ /* @__PURE__ */ jsx(ContentLayout, { children: /* @__PURE__ */ jsx(
1735
+ EmptyStateLayout,
1736
+ {
1737
+ action: /* @__PURE__ */ jsx(LinkButton, { variant: "secondary", endIcon: /* @__PURE__ */ jsx(ArrowRight, {}), to: "/", children: formatMessage({
1738
+ id: "app.components.NotFoundPage.back",
1739
+ defaultMessage: "Back to homepage"
1740
+ }) }),
1741
+ content: formatMessage({
1742
+ id: "app.page.not.found",
1743
+ defaultMessage: "Oops! We can't seem to find the page you're looging for..."
1744
+ }),
1745
+ hasRadius: true,
1746
+ icon: /* @__PURE__ */ jsx(EmptyPictures, { width: "10rem" }),
1747
+ shadow: "tableShadow"
1748
+ }
1749
+ ) })
1750
+ ] });
1751
+ };
1752
+ const NotFoundPage$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1753
+ __proto__: null,
1754
+ NotFoundPage
1755
+ }, Symbol.toStringTag, { value: "Module" }));
1756
+ const options = [
1757
+ {
1758
+ intlLabel: {
1759
+ id: "Usecase.front-end",
1760
+ defaultMessage: "Front-end developer"
1761
+ },
1762
+ value: "front_end_developer"
1763
+ },
1764
+ {
1765
+ intlLabel: {
1766
+ id: "Usecase.back-end",
1767
+ defaultMessage: "Back-end developer"
1768
+ },
1769
+ value: "back_end_developer"
1770
+ },
1771
+ {
1772
+ intlLabel: {
1773
+ id: "Usecase.full-stack",
1774
+ defaultMessage: "Full-stack developer"
1775
+ },
1776
+ value: "full_stack_developer"
1777
+ },
1778
+ {
1779
+ intlLabel: {
1780
+ id: "global.content-manager",
1781
+ defaultMessage: "Content Manager"
1782
+ },
1783
+ value: "content_manager"
1784
+ },
1785
+ {
1786
+ intlLabel: {
1787
+ id: "Usecase.content-creator",
1788
+ defaultMessage: "Content Creator"
1789
+ },
1790
+ value: "content_creator"
1791
+ },
1792
+ {
1793
+ intlLabel: {
1794
+ id: "Usecase.other",
1795
+ defaultMessage: "Other"
1796
+ },
1797
+ value: "other"
1798
+ }
1799
+ ];
1800
+ const TypographyCenter = styled(Typography)`
1801
+ text-align: center;
1802
+ `;
1803
+ const UseCasePage = () => {
1804
+ const toggleNotification = useNotification();
1805
+ const { push, location } = useHistory();
1806
+ const { formatMessage } = useIntl();
1807
+ const [role, setRole] = React.useState(null);
1808
+ const [otherRole, setOtherRole] = React.useState("");
1809
+ const { post } = useFetchClient();
1810
+ const { firstname, email } = auth.get("userInfo") ?? {};
1811
+ const { hasAdmin } = parse(location?.search, { ignoreQueryPrefix: true });
1812
+ const isOther = role === "other";
1813
+ const handleSubmit = async (event, skipPersona) => {
1814
+ event.preventDefault();
1815
+ try {
1816
+ await post("https://analytics.strapi.io/register", {
1817
+ email,
1818
+ username: firstname,
1819
+ firstAdmin: Boolean(!hasAdmin),
1820
+ persona: {
1821
+ role: skipPersona ? void 0 : role,
1822
+ otherRole: skipPersona ? void 0 : otherRole
1823
+ }
1824
+ });
1825
+ toggleNotification({
1826
+ type: "success",
1827
+ message: {
1828
+ id: "Usecase.notification.success.project-created",
1829
+ defaultMessage: "Project has been successfully created"
1830
+ }
1831
+ });
1832
+ push("/");
1833
+ } catch (err) {
1834
+ }
1835
+ };
1836
+ return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { labelledBy: "usecase-title", children: [
1837
+ /* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsxs("form", { onSubmit: (e) => handleSubmit(e, false), children: [
1838
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", paddingBottom: 7, children: [
1839
+ /* @__PURE__ */ jsx(Logo, {}),
1840
+ /* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 1, width: pxToRem(250), children: /* @__PURE__ */ jsx(TypographyCenter, { variant: "alpha", as: "h1", id: "usecase-title", children: formatMessage({
1841
+ id: "Usecase.title",
1842
+ defaultMessage: "Tell us a bit more about yourself"
1843
+ }) }) })
1844
+ ] }),
1845
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
1846
+ /* @__PURE__ */ jsx(
1847
+ Select,
1848
+ {
1849
+ id: "usecase",
1850
+ "data-testid": "usecase",
1851
+ label: formatMessage({
1852
+ id: "Usecase.input.work-type",
1853
+ defaultMessage: "What type of work do you do?"
1854
+ }),
1855
+ onChange: (value) => setRole(value),
1856
+ value: role,
1857
+ children: options.map(({ intlLabel, value }) => /* @__PURE__ */ jsx(Option, { value, children: formatMessage(intlLabel) }, value))
1858
+ }
1859
+ ),
1860
+ isOther && /* @__PURE__ */ jsx(
1861
+ TextInput,
1862
+ {
1863
+ name: "other",
1864
+ label: formatMessage({ id: "Usecase.other", defaultMessage: "Other" }),
1865
+ value: otherRole,
1866
+ onChange: (e) => setOtherRole(e.target.value),
1867
+ "data-testid": "other"
1868
+ }
1869
+ ),
1870
+ /* @__PURE__ */ jsx(Button, { type: "submit", size: "L", fullWidth: true, disabled: !role, children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
1871
+ ] })
1872
+ ] }) }),
1873
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(TextButton, { onClick: (event) => handleSubmit(event, true), children: formatMessage({
1874
+ id: "Usecase.button.skip",
1875
+ defaultMessage: "Skip this question"
1876
+ }) }) }) })
1877
+ ] }) });
1878
+ };
1879
+ const LazyCompo = ({ loadComponent }) => {
1880
+ const [Compo, setCompo] = React.useState(null);
1881
+ React.useEffect(() => {
1882
+ const loadCompo = async () => {
1883
+ try {
1884
+ const loadedCompo = await loadComponent();
1885
+ if (typeof loadedCompo === "function") {
1886
+ setCompo(() => loadedCompo);
1887
+ } else if (loadedCompo.default) {
1888
+ setCompo(() => loadedCompo.default);
1889
+ }
1890
+ } catch (err) {
1891
+ }
1892
+ };
1893
+ loadCompo();
1894
+ }, [loadComponent]);
1895
+ if (Compo) {
1896
+ return /* @__PURE__ */ jsx(Compo, {});
1897
+ }
1898
+ return /* @__PURE__ */ jsx(LoadingIndicatorPage, {});
1899
+ };
1900
+ const createRoute = (loadComponent, to, exact = false) => {
1901
+ return /* @__PURE__ */ jsx(
1902
+ Route,
1903
+ {
1904
+ render: () => /* @__PURE__ */ jsx(LazyCompo, { loadComponent }),
1905
+ path: to,
1906
+ exact: exact || false
1907
+ },
1908
+ to
1909
+ );
1910
+ };
1911
+ const ROUTES_CE = null;
1912
+ const AuthenticatedApp = React.lazy(
1913
+ () => import("./AuthenticatedApp-b0ada7e9.mjs").then((n) => n.A).then((mod) => ({ default: mod.AuthenticatedApp }))
1914
+ );
1915
+ const App = () => {
1916
+ const adminPermissions = useEnterprise(
1917
+ ADMIN_PERMISSIONS_CE,
1918
+ async () => (await import("./constants-921eda17.mjs")).ADMIN_PERMISSIONS_EE,
1919
+ {
1920
+ combine(cePermissions, eePermissions) {
1921
+ return merge({}, cePermissions, eePermissions);
1922
+ },
1923
+ defaultValue: ADMIN_PERMISSIONS_CE
1924
+ }
1925
+ );
1926
+ const routes = useEnterprise(
1927
+ ROUTES_CE,
1928
+ async () => (await import("./constants-921eda17.mjs")).ROUTES_EE,
1929
+ {
1930
+ defaultValue: []
1931
+ }
1932
+ );
1933
+ const toggleNotification = useNotification();
1934
+ const { updateProjectSettings } = useConfiguration();
1935
+ const { formatMessage } = useIntl();
1936
+ const [{ isLoading, hasAdmin, uuid, deviceId }, setState] = React.useState({
1937
+ isLoading: true,
1938
+ deviceId: void 0,
1939
+ hasAdmin: false,
1940
+ uuid: false
1941
+ });
1942
+ const dispatch = useDispatch();
1943
+ const appInfo = useAppInfo();
1944
+ const { get: get2, post } = useFetchClient();
1945
+ const authRoutes = React.useMemo(() => {
1946
+ if (!routes) {
1947
+ return null;
1948
+ }
1949
+ return routes.map(({ to, Component, exact }) => createRoute(Component, to, exact));
1950
+ }, [routes]);
1951
+ const [telemetryProperties, setTelemetryProperties] = React.useState(void 0);
1952
+ React.useEffect(() => {
1953
+ dispatch({ type: ACTION_SET_ADMIN_PERMISSIONS, payload: adminPermissions });
1954
+ }, [adminPermissions, dispatch]);
1955
+ React.useEffect(() => {
1956
+ const currentToken = auth.getToken();
1957
+ const renewToken = async () => {
1958
+ try {
1959
+ const {
1960
+ data: {
1961
+ data: { token }
1962
+ }
1963
+ } = await post("/admin/renew-token", { token: currentToken });
1964
+ auth.updateToken(token);
1965
+ } catch (err) {
1966
+ auth.clearAppStorage();
1967
+ window.location.reload();
1968
+ }
1969
+ };
1970
+ if (currentToken) {
1971
+ renewToken();
1972
+ }
1973
+ }, [post]);
1974
+ React.useEffect(() => {
1975
+ const getData = async () => {
1976
+ try {
1977
+ const {
1978
+ data: {
1979
+ data: { hasAdmin: hasAdmin2, uuid: uuid2, menuLogo, authLogo }
1980
+ }
1981
+ } = await get2(`/admin/init`);
1982
+ updateProjectSettings({
1983
+ menuLogo: prefixFileUrlWithBackendUrl(menuLogo),
1984
+ authLogo: prefixFileUrlWithBackendUrl(authLogo)
1985
+ });
1986
+ if (uuid2) {
1987
+ const {
1988
+ data: { data: properties }
1989
+ } = await get2(`/admin/telemetry-properties`, {
1990
+ // NOTE: needed because the interceptors of the fetchClient redirect to /login when receive a 401 and it would end up in an infinite loop when the user doesn't have a session.
1991
+ validateStatus: (status) => status < 500
1992
+ });
1993
+ setTelemetryProperties(properties);
1994
+ try {
1995
+ const event = "didInitializeAdministration";
1996
+ await post(
1997
+ "https://analytics.strapi.io/api/v2/track",
1998
+ {
1999
+ // This event is anonymous
2000
+ event,
2001
+ userId: "",
2002
+ deviceId,
2003
+ eventPropeties: {},
2004
+ userProperties: { environment: appInfo.currentEnvironment },
2005
+ groupProperties: { ...properties, projectId: uuid2 }
2006
+ },
2007
+ {
2008
+ headers: {
2009
+ "X-Strapi-Event": event
2010
+ }
2011
+ }
2012
+ );
2013
+ } catch (e) {
2014
+ }
2015
+ }
2016
+ setState({ isLoading: false, hasAdmin: hasAdmin2, uuid: uuid2, deviceId });
2017
+ } catch (err) {
2018
+ toggleNotification({
2019
+ type: "warning",
2020
+ message: { id: "app.containers.App.notification.error.init" }
2021
+ });
2022
+ }
2023
+ };
2024
+ getData();
2025
+ }, [toggleNotification, updateProjectSettings]);
2026
+ const setHasAdmin = (hasAdmin2) => setState((prev) => ({ ...prev, hasAdmin: hasAdmin2 }));
2027
+ const trackingInfo = React.useMemo(
2028
+ () => ({
2029
+ uuid,
2030
+ telemetryProperties,
2031
+ deviceId
2032
+ }),
2033
+ [uuid, telemetryProperties, deviceId]
2034
+ );
2035
+ if (isLoading) {
2036
+ return /* @__PURE__ */ jsx(LoadingIndicatorPage, {});
2037
+ }
2038
+ return /* @__PURE__ */ jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsx(LoadingIndicatorPage, {}), children: [
2039
+ /* @__PURE__ */ jsx(SkipToContent, { children: formatMessage({ id: "skipToContent", defaultMessage: "Skip to content" }) }),
2040
+ /* @__PURE__ */ jsx(TrackingProvider, { value: trackingInfo, children: /* @__PURE__ */ jsxs(Switch, { children: [
2041
+ authRoutes,
2042
+ /* @__PURE__ */ jsx(
2043
+ Route,
2044
+ {
2045
+ path: "/auth/:authType",
2046
+ render: (routerProps) => /* @__PURE__ */ jsx(AuthPage, { ...routerProps, setHasAdmin, hasAdmin }),
2047
+ exact: true
2048
+ }
2049
+ ),
2050
+ /* @__PURE__ */ jsx(PrivateRoute, { path: "/usecase", component: UseCasePage }),
2051
+ /* @__PURE__ */ jsx(PrivateRoute, { path: "/", component: AuthenticatedApp }),
2052
+ /* @__PURE__ */ jsx(Route, { path: "", component: NotFoundPage })
2053
+ ] }) })
2054
+ ] });
2055
+ };
2056
+ const StrapiLogo = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDgwMCA4MDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cGF0aCBkPSJNMzkgMjgyYzAtMTE4IDAtMTc2LjkgMzYuNi0yMTMuNUMxMTIuMiAzMiAxNzEuMSAzMiAyODguOSAzMmgyMjEuMmMxMTcuOCAwIDE3Ni43IDAgMjEzLjMgMzYuNkM3NjAgMTA1LjIgNzYwIDE2NC4xIDc2MCAyODEuOXYyMjEuMmMwIDExNy44IDAgMTc2LjctMzYuNiAyMTMuM0M2ODYuOCA3NTMgNjI3LjkgNzUzIDUxMC4xIDc1M0gyODguOWMtMTE3LjggMC0xNzYuNyAwLTIxMy4zLTM2LjZDMzkgNjc5LjggMzkgNjIwLjkgMzkgNTAzLjFWMjgxLjlaIiBmaWxsPSIjNDk0NUZGIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUzNi40IDI1MC43SDI5My43djEyMy44aDEyMy44djEyMy43aDEyMy44VjI1NS41YzAtMi42LTIuMi00LjgtNC45LTQuOFoiIGZpbGw9IiNmZmYiLz4KICAgIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik00MTIuNyAzNzQuNWg0Ljh2NC44aC00Ljh6Ii8+CiAgICA8cGF0aCBkPSJNMjkzLjggMzc0LjVoMTE5YzIuNiAwIDQuOCAyLjEgNC44IDQuOHYxMTloLTExOWE0LjggNC44IDAgMCAxLTQuOC00Ljl2LTExOVoiIGZpbGw9IiM5NTkzRkYiLz4KICAgIDxwYXRoIGQ9Ik00MTcuNSA0OTguMmgxMjMuOEw0MjEuNiA2MThhMi40IDIuNCAwIDAgMS00LTEuN3YtMTE4Wk0yOTMuOCAzNzQuNWgtMTE4YTIuNCAyLjQgMCAwIDEtMS43LTQuMWwxMTkuNy0xMTkuN3YxMjMuOFoiIGZpbGw9IiM5NTkzRkYiLz4KPC9zdmc+Cg==";
2057
+ const [AdminContextProvider, useAdminContext] = createContext("AdminContext");
2058
+ const useAdmin = () => useAdminContext("useAdmin");
2059
+ const ConfigurationProvider = ({
2060
+ children,
2061
+ authLogo: defaultAuthLogo,
2062
+ menuLogo: defaultMenuLogo,
2063
+ showReleaseNotification = false,
2064
+ showTutorials = false
2065
+ }) => {
2066
+ const [{ menuLogo, authLogo }, setLogos] = React.useState({
2067
+ menuLogo: null,
2068
+ authLogo: null
2069
+ });
2070
+ const updateProjectSettings = React.useCallback(
2071
+ ({ menuLogo: menuLogo2, authLogo: authLogo2 }) => {
2072
+ setLogos({
2073
+ menuLogo: menuLogo2 || defaultMenuLogo,
2074
+ authLogo: authLogo2 || defaultAuthLogo
2075
+ });
2076
+ },
2077
+ [defaultAuthLogo, defaultMenuLogo]
2078
+ );
2079
+ return /* @__PURE__ */ jsx(
2080
+ ConfigurationContextProvider,
2081
+ {
2082
+ updateProjectSettings,
2083
+ showReleaseNotification,
2084
+ showTutorials,
2085
+ logos: {
2086
+ menu: { custom: menuLogo, default: defaultMenuLogo },
2087
+ auth: { custom: authLogo, default: defaultAuthLogo }
2088
+ },
2089
+ children
2090
+ }
2091
+ );
2092
+ };
2093
+ const GuidedTourProvider = ({ children }) => {
2094
+ const [{ currentStep, guidedTourState, isGuidedTourVisible, isSkipped }, dispatch] = React.useReducer(reducer$1, initialState$6, initialiseState);
2095
+ const setCurrentStep = (step) => {
2096
+ if (step !== null) {
2097
+ const isStepAlreadyDone = get(guidedTourState, step);
2098
+ const [sectionName, stepName] = step.split(".");
2099
+ const sectionArray = Object.entries(guidedTourState[sectionName]);
2100
+ const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName);
2101
+ const previousSteps = sectionArray.slice(0, currentStepIndex);
2102
+ const isStepToShow = previousSteps.every(([, sectionValue]) => sectionValue);
2103
+ if (isStepAlreadyDone || isSkipped || !isStepToShow) {
2104
+ return null;
2105
+ }
2106
+ }
2107
+ auth.set(null, "GUIDED_TOUR_CURRENT_STEP", true);
2108
+ return dispatch({
2109
+ type: "SET_CURRENT_STEP",
2110
+ step
2111
+ });
2112
+ };
2113
+ const setGuidedTourVisibility = (value) => {
2114
+ dispatch({
2115
+ type: "SET_GUIDED_TOUR_VISIBILITY",
2116
+ value
2117
+ });
2118
+ };
2119
+ const setStepState = (currentStep2, value) => {
2120
+ addCompletedStep(currentStep2);
2121
+ dispatch({
2122
+ type: "SET_STEP_STATE",
2123
+ currentStep: currentStep2,
2124
+ value
2125
+ });
2126
+ };
2127
+ const startSection = (sectionName) => {
2128
+ const sectionSteps = guidedTourState[sectionName];
2129
+ if (sectionSteps) {
2130
+ const guidedTourArray = Object.entries(guidedTourState);
2131
+ const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName);
2132
+ const previousSections = guidedTourArray.slice(0, currentSectionIndex);
2133
+ const isSectionToShow = previousSections.every(
2134
+ ([, sectionValue]) => Object.values(sectionValue).every(Boolean)
2135
+ );
2136
+ const [firstStep] = Object.keys(sectionSteps);
2137
+ const isFirstStepDone = sectionSteps[firstStep];
2138
+ if (isSectionToShow && !currentStep && !isFirstStepDone) {
2139
+ setCurrentStep(`${sectionName}.${firstStep}`);
2140
+ }
2141
+ }
2142
+ };
2143
+ const setSkipped = (value) => {
2144
+ auth.set(value, "GUIDED_TOUR_SKIPPED", true);
2145
+ dispatch({
2146
+ type: "SET_SKIPPED",
2147
+ value
2148
+ });
2149
+ };
2150
+ return /* @__PURE__ */ jsx(
2151
+ GuidedTourProvider$1,
2152
+ {
2153
+ guidedTourState,
2154
+ currentStep,
2155
+ setCurrentStep,
2156
+ setGuidedTourVisibility,
2157
+ setSkipped,
2158
+ setStepState,
2159
+ startSection,
2160
+ isGuidedTourVisible,
2161
+ isSkipped,
2162
+ children
2163
+ }
2164
+ );
2165
+ };
2166
+ const initialState$6 = {
2167
+ currentStep: null,
2168
+ guidedTourState: {
2169
+ contentTypeBuilder: {
2170
+ create: false,
2171
+ success: false
2172
+ },
2173
+ contentManager: {
2174
+ create: false,
2175
+ success: false
2176
+ },
2177
+ apiTokens: {
2178
+ create: false,
2179
+ success: false
2180
+ }
2181
+ },
2182
+ isGuidedTourVisible: false,
2183
+ isSkipped: false
2184
+ };
2185
+ const reducer$1 = (state = initialState$6, action) => produce(state, (draftState) => {
2186
+ switch (action.type) {
2187
+ case "SET_CURRENT_STEP": {
2188
+ draftState.currentStep = action.step;
2189
+ break;
2190
+ }
2191
+ case "SET_STEP_STATE": {
2192
+ const [section, step] = action.currentStep.split(".");
2193
+ draftState.guidedTourState[section][step] = action.value;
2194
+ break;
2195
+ }
2196
+ case "SET_SKIPPED": {
2197
+ draftState.isSkipped = action.value;
2198
+ break;
2199
+ }
2200
+ case "SET_GUIDED_TOUR_VISIBILITY": {
2201
+ draftState.isGuidedTourVisible = action.value;
2202
+ break;
2203
+ }
2204
+ default: {
2205
+ return draftState;
2206
+ }
2207
+ }
2208
+ });
2209
+ const initialiseState = (initialState2) => {
2210
+ const copyInitialState = { ...initialState2 };
2211
+ const guidedTourLocaleStorage = auth.get("GUIDED_TOUR_COMPLETED_STEPS");
2212
+ const currentStepLocaleStorage = auth.get("GUIDED_TOUR_CURRENT_STEP");
2213
+ const skippedLocaleStorage = auth.get("GUIDED_TOUR_SKIPPED");
2214
+ if (Array.isArray(guidedTourLocaleStorage)) {
2215
+ guidedTourLocaleStorage.forEach((step) => {
2216
+ const [sectionName, stepName] = step.split(".");
2217
+ set(copyInitialState, ["guidedTourState", sectionName, stepName], true);
2218
+ });
2219
+ }
2220
+ if (currentStepLocaleStorage) {
2221
+ const [sectionName, stepName] = currentStepLocaleStorage.split(".");
2222
+ set(copyInitialState, ["guidedTourState", sectionName, stepName], true);
2223
+ addCompletedStep(currentStepLocaleStorage);
2224
+ auth.set(null, "GUIDED_TOUR_CURRENT_STEP", true);
2225
+ }
2226
+ if (skippedLocaleStorage !== null) {
2227
+ set(copyInitialState, "isSkipped", skippedLocaleStorage);
2228
+ }
2229
+ return copyInitialState;
2230
+ };
2231
+ const addCompletedStep = (completedStep) => {
2232
+ const currentSteps = auth.get("GUIDED_TOUR_COMPLETED_STEPS") ?? [];
2233
+ if (!Array.isArray(currentSteps)) {
2234
+ return;
2235
+ }
2236
+ const isAlreadyStored = currentSteps.includes(completedStep);
2237
+ if (isAlreadyStored) {
2238
+ return;
2239
+ }
2240
+ auth.set([...currentSteps, completedStep], "GUIDED_TOUR_COMPLETED_STEPS", true);
2241
+ };
2242
+ const [ThemeToggleContextProvider, useThemeToggleContext] = createContext("ThemeToggleContext");
2243
+ const useThemeToggle = () => useThemeToggleContext("useThemeToggle");
2244
+ const Theme = ({ children }) => {
2245
+ const { currentTheme, themes, systemTheme } = useThemeToggle();
2246
+ const { locale } = useIntl();
2247
+ const computedThemeName = currentTheme === "system" ? systemTheme : currentTheme;
2248
+ return /* @__PURE__ */ jsxs(
2249
+ DesignSystemProvider,
2250
+ {
2251
+ locale,
2252
+ theme: themes?.[computedThemeName || "light"],
2253
+ children: [
2254
+ children,
2255
+ /* @__PURE__ */ jsx(GlobalStyle, {})
2256
+ ]
2257
+ }
2258
+ );
2259
+ };
2260
+ const GlobalStyle = createGlobalStyle`
2261
+ body {
2262
+ background: ${({ theme }) => theme.colors.neutral100};
2263
+ }
2264
+ `;
2265
+ const THEME_KEY = "STRAPI_THEME";
2266
+ const getDefaultTheme = () => {
2267
+ const persistedTheme = localStorage.getItem(THEME_KEY);
2268
+ return persistedTheme || "system";
2269
+ };
2270
+ const ThemeToggleProvider = ({ children, themes }) => {
2271
+ const [currentTheme, setCurrentTheme] = React.useState(getDefaultTheme());
2272
+ const [systemTheme, setSystemTheme] = React.useState();
2273
+ const handleChangeTheme = React.useCallback(
2274
+ (nextTheme) => {
2275
+ setCurrentTheme(nextTheme);
2276
+ localStorage.setItem(THEME_KEY, nextTheme);
2277
+ },
2278
+ [setCurrentTheme]
2279
+ );
2280
+ React.useEffect(() => {
2281
+ const themeWatcher = window.matchMedia("(prefers-color-scheme: dark)");
2282
+ setSystemTheme(themeWatcher.matches ? "dark" : "light");
2283
+ const listener = (event) => {
2284
+ setSystemTheme(event.matches ? "dark" : "light");
2285
+ };
2286
+ themeWatcher.addEventListener("change", listener);
2287
+ return () => {
2288
+ themeWatcher.removeEventListener("change", listener);
2289
+ };
2290
+ }, []);
2291
+ return /* @__PURE__ */ jsx(
2292
+ ThemeToggleContextProvider,
2293
+ {
2294
+ currentTheme,
2295
+ onChangeTheme: handleChangeTheme,
2296
+ themes,
2297
+ systemTheme,
2298
+ children
2299
+ }
2300
+ );
2301
+ };
2302
+ const queryClient = new QueryClient({
2303
+ defaultOptions: {
2304
+ queries: {
2305
+ refetchOnWindowFocus: false
2306
+ }
2307
+ }
2308
+ });
2309
+ const Providers = ({
2310
+ authLogo,
2311
+ children,
2312
+ components,
2313
+ customFields,
2314
+ fields,
2315
+ getAdminInjectedComponents,
2316
+ getPlugin,
2317
+ localeNames,
2318
+ menu,
2319
+ menuLogo,
2320
+ messages,
2321
+ plugins,
2322
+ runHookParallel,
2323
+ runHookSeries,
2324
+ runHookWaterfall,
2325
+ settings,
2326
+ showReleaseNotification,
2327
+ showTutorials,
2328
+ store,
2329
+ themes
2330
+ }) => {
2331
+ return /* @__PURE__ */ jsx(LanguageProvider, { messages, localeNames, children: /* @__PURE__ */ jsx(ThemeToggleProvider, { themes, children: /* @__PURE__ */ jsx(Theme, { children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AdminContextProvider, { getAdminInjectedComponents, children: /* @__PURE__ */ jsx(
2332
+ ConfigurationProvider,
2333
+ {
2334
+ authLogo,
2335
+ menuLogo,
2336
+ showReleaseNotification,
2337
+ showTutorials,
2338
+ children: /* @__PURE__ */ jsx(
2339
+ StrapiAppProvider,
2340
+ {
2341
+ getPlugin,
2342
+ menu,
2343
+ plugins,
2344
+ runHookParallel,
2345
+ runHookWaterfall,
2346
+ runHookSeries,
2347
+ settings,
2348
+ children: /* @__PURE__ */ jsx(LibraryProvider, { components, fields, children: /* @__PURE__ */ jsx(CustomFieldsProvider, { customFields, children: /* @__PURE__ */ jsx(AutoReloadOverlayBlockerProvider, { children: /* @__PURE__ */ jsx(OverlayBlockerProvider, { children: /* @__PURE__ */ jsx(GuidedTourProvider, { children: /* @__PURE__ */ jsx(NotificationsProvider, { children }) }) }) }) }) })
2349
+ }
2350
+ )
2351
+ }
2352
+ ) }) }) }) }) }) });
2353
+ };
2354
+ class Components {
2355
+ components;
2356
+ constructor() {
2357
+ this.components = {};
2358
+ }
2359
+ add(component) {
2360
+ const { name, Component } = component;
2361
+ invariant(Component, "A Component must be provided");
2362
+ invariant(name, "A name must be provided");
2363
+ invariant(this.components[name] === void 0, "A similar field already exists");
2364
+ this.components[name] = Component;
2365
+ }
2366
+ }
2367
+ const ALLOWED_TYPES = [
2368
+ "biginteger",
2369
+ "boolean",
2370
+ "date",
2371
+ "datetime",
2372
+ "decimal",
2373
+ "email",
2374
+ "enumeration",
2375
+ "float",
2376
+ "integer",
2377
+ "json",
2378
+ "password",
2379
+ "richtext",
2380
+ "string",
2381
+ "text",
2382
+ "time",
2383
+ "uid"
2384
+ ];
2385
+ const ALLOWED_ROOT_LEVEL_OPTIONS = [
2386
+ "min",
2387
+ "minLength",
2388
+ "max",
2389
+ "maxLength",
2390
+ "required",
2391
+ "regex",
2392
+ "enum",
2393
+ "unique",
2394
+ "private",
2395
+ "default"
2396
+ ];
2397
+ class CustomFields {
2398
+ customFields;
2399
+ constructor() {
2400
+ this.customFields = {};
2401
+ }
2402
+ register(customFields) {
2403
+ if (Array.isArray(customFields)) {
2404
+ customFields.forEach((customField) => {
2405
+ this.register(customField);
2406
+ });
2407
+ } else {
2408
+ const { name, pluginId, type, intlLabel, intlDescription, components, options: options2 } = customFields;
2409
+ invariant(name, "A name must be provided");
2410
+ invariant(type, "A type must be provided");
2411
+ invariant(intlLabel, "An intlLabel must be provided");
2412
+ invariant(intlDescription, "An intlDescription must be provided");
2413
+ invariant(components, "A components object must be provided");
2414
+ invariant(components.Input, "An Input component must be provided");
2415
+ invariant(
2416
+ ALLOWED_TYPES.includes(type),
2417
+ `Custom field type: '${type}' is not a valid Strapi type or it can't be used with a Custom Field`
2418
+ );
2419
+ const isValidObjectKey = /^(?![0-9])[a-zA-Z0-9$_-]+$/g;
2420
+ invariant(
2421
+ isValidObjectKey.test(name),
2422
+ `Custom field name: '${name}' is not a valid object key`
2423
+ );
2424
+ const allFormOptions = [...options2?.base || [], ...options2?.advanced || []];
2425
+ if (allFormOptions.length) {
2426
+ const optionPathValidations = allFormOptions.reduce(optionsValidationReducer, []);
2427
+ optionPathValidations.forEach(({ isValidOptionPath, errorMessage }) => {
2428
+ invariant(isValidOptionPath, errorMessage);
2429
+ });
2430
+ }
2431
+ const uid = pluginId ? `plugin::${pluginId}.${name}` : `global::${name}`;
2432
+ const uidAlreadyUsed = Object.prototype.hasOwnProperty.call(this.customFields, uid);
2433
+ invariant(!uidAlreadyUsed, `Custom field: '${uid}' has already been registered`);
2434
+ this.customFields[uid] = customFields;
2435
+ }
2436
+ }
2437
+ getAll() {
2438
+ return this.customFields;
2439
+ }
2440
+ get(uid) {
2441
+ return this.customFields[uid];
2442
+ }
2443
+ }
2444
+ const optionsValidationReducer = (acc, option) => {
2445
+ if ("items" in option) {
2446
+ return option.items.reduce(optionsValidationReducer, acc);
2447
+ }
2448
+ if (!option.name) {
2449
+ acc.push({
2450
+ isValidOptionPath: false,
2451
+ errorMessage: "The 'name' property is required on an options object"
2452
+ });
2453
+ } else {
2454
+ acc.push({
2455
+ isValidOptionPath: option.name.startsWith("options") || ALLOWED_ROOT_LEVEL_OPTIONS.includes(option.name),
2456
+ errorMessage: `'${option.name}' must be prefixed with 'options.'`
2457
+ });
2458
+ }
2459
+ return acc;
2460
+ };
2461
+ class Fields {
2462
+ fields;
2463
+ constructor() {
2464
+ this.fields = {};
2465
+ }
2466
+ add(field) {
2467
+ const { type, Component } = field;
2468
+ invariant(Component, "A Component must be provided");
2469
+ invariant(type, "A type must be provided");
2470
+ this.fields[type] = Component;
2471
+ }
2472
+ }
2473
+ class Middlewares {
2474
+ middlewares;
2475
+ constructor() {
2476
+ this.middlewares = [];
2477
+ }
2478
+ add(middleware) {
2479
+ this.middlewares.push(middleware);
2480
+ }
2481
+ }
2482
+ class Plugin {
2483
+ apis;
2484
+ initializer;
2485
+ injectionZones;
2486
+ isReady;
2487
+ name;
2488
+ pluginId;
2489
+ constructor(pluginConf) {
2490
+ this.apis = pluginConf.apis || {};
2491
+ this.initializer = pluginConf.initializer || null;
2492
+ this.injectionZones = pluginConf.injectionZones || {};
2493
+ this.isReady = pluginConf.isReady !== void 0 ? pluginConf.isReady : true;
2494
+ this.name = pluginConf.name;
2495
+ this.pluginId = pluginConf.id;
2496
+ }
2497
+ getInjectedComponents(containerName, blockName) {
2498
+ try {
2499
+ return this.injectionZones[containerName][blockName] || [];
2500
+ } catch (err) {
2501
+ console.error("Cannot get injected component", err);
2502
+ return [];
2503
+ }
2504
+ }
2505
+ injectComponent(containerName, blockName, component) {
2506
+ try {
2507
+ this.injectionZones[containerName][blockName].push(component);
2508
+ } catch (err) {
2509
+ console.error("Cannot inject component", err);
2510
+ }
2511
+ }
2512
+ }
2513
+ class Reducers {
2514
+ reducers;
2515
+ constructor({ appReducers = {} } = {}) {
2516
+ this.reducers = { ...appReducers };
2517
+ }
2518
+ add(reducerName, reducer2) {
2519
+ this.reducers[reducerName] = reducer2;
2520
+ }
2521
+ }
2522
+ const useTypedDispatch = useDispatch;
2523
+ const useTypedStore = useStore;
2524
+ const useTypedSelector = useSelector;
2525
+ const createTypedSelector = (selector) => createSelector((state) => state, selector);
2526
+ const RBACProvider = ({ children, permissions, refetchPermissions }) => {
2527
+ const allPermissions = useTypedSelector((state) => state.rbacProvider.allPermissions);
2528
+ const dispatch = useTypedDispatch();
2529
+ React.useEffect(() => {
2530
+ dispatch(setPermissionsAction(permissions));
2531
+ return () => {
2532
+ dispatch(resetStoreAction());
2533
+ };
2534
+ }, [permissions, dispatch]);
2535
+ if (!allPermissions) {
2536
+ return /* @__PURE__ */ jsx(LoadingIndicatorPage, {});
2537
+ }
2538
+ return /* @__PURE__ */ jsx(RBACContext.Provider, { value: { allPermissions, refetchPermissions }, children });
2539
+ };
2540
+ const initialState$5 = {
2541
+ allPermissions: null,
2542
+ collectionTypesRelatedPermissions: {}
2543
+ };
2544
+ const RESET_STORE = "StrapiAdmin/RBACProvider/RESET_STORE";
2545
+ const SET_PERMISSIONS$1 = "StrapiAdmin/RBACProvider/SET_PERMISSIONS";
2546
+ const resetStoreAction = () => ({ type: RESET_STORE });
2547
+ const setPermissionsAction = (permissions) => ({
2548
+ type: SET_PERMISSIONS$1,
2549
+ permissions
2550
+ });
2551
+ const RBACReducer = (state = initialState$5, action) => produce(state, (draftState) => {
2552
+ switch (action.type) {
2553
+ case SET_PERMISSIONS$1: {
2554
+ draftState.allPermissions = action.permissions;
2555
+ draftState.collectionTypesRelatedPermissions = action.permissions.filter((perm) => perm.subject).reduce((acc, current) => {
2556
+ const { subject, action: action2 } = current;
2557
+ if (!subject)
2558
+ return acc;
2559
+ if (!acc[subject]) {
2560
+ acc[subject] = {};
2561
+ }
2562
+ acc[subject] = acc[subject][action2] ? { ...acc[subject], [action2]: [...acc[subject][action2], current] } : { ...acc[subject], [action2]: [current] };
2563
+ return acc;
2564
+ }, {});
2565
+ break;
2566
+ }
2567
+ case RESET_STORE: {
2568
+ return initialState$5;
2569
+ }
2570
+ default:
2571
+ return state;
2572
+ }
2573
+ });
2574
+ const SET_PERMISSIONS = "ContentManager/RBACManager/SET_PERMISSIONS";
2575
+ const RESET_PERMISSIONS = "ContentManager/RBACManager/RESET_PERMISSIONS";
2576
+ const initialState$4 = {
2577
+ permissions: null
2578
+ };
2579
+ const rbacManagerReducer = (state = initialState$4, action) => (
2580
+ // eslint-disable-next-line consistent-return
2581
+ produce(state, (draftState) => {
2582
+ switch (action.type) {
2583
+ case SET_PERMISSIONS: {
2584
+ draftState.permissions = Object.entries(action.permissions).reduce((acc, current) => {
2585
+ return [...acc, ...current[1]];
2586
+ }, []);
2587
+ break;
2588
+ }
2589
+ case RESET_PERMISSIONS: {
2590
+ draftState.permissions = null;
2591
+ break;
2592
+ }
2593
+ default:
2594
+ return draftState;
2595
+ }
2596
+ })
2597
+ );
2598
+ const GET_INIT_DATA = "ContentManager/App/GET_INIT_DATA";
2599
+ const RESET_INIT_DATA = "ContentManager/App/RESET_INIT_DATA";
2600
+ const SET_INIT_DATA = "ContentManager/App/SET_INIT_DATA";
2601
+ const initialState$3 = {
2602
+ components: [],
2603
+ status: "loading",
2604
+ models: [],
2605
+ collectionTypeLinks: [],
2606
+ singleTypeLinks: []
2607
+ };
2608
+ const mainReducer = (state = initialState$3, action) => produce(state, (draftState) => {
2609
+ switch (action.type) {
2610
+ case GET_INIT_DATA: {
2611
+ draftState.status = "loading";
2612
+ break;
2613
+ }
2614
+ case RESET_INIT_DATA: {
2615
+ return initialState$3;
2616
+ }
2617
+ case SET_INIT_DATA: {
2618
+ draftState.collectionTypeLinks = action.data.authorizedCollectionTypeLinks.filter(
2619
+ ({ isDisplayed }) => isDisplayed
2620
+ );
2621
+ draftState.singleTypeLinks = action.data.authorizedSingleTypeLinks.filter(
2622
+ ({ isDisplayed }) => isDisplayed
2623
+ );
2624
+ draftState.components = action.data.components;
2625
+ draftState.models = action.data.contentTypeSchemas;
2626
+ draftState.fieldSizes = action.data.fieldSizes;
2627
+ draftState.status = "resolved";
2628
+ break;
2629
+ }
2630
+ default:
2631
+ return draftState;
2632
+ }
2633
+ });
2634
+ const SET_LAYOUT = "ContentManager/EditViewLayoutManager/SET_LAYOUT";
2635
+ const RESET_PROPS$2 = "ContentManager/EditViewLayoutManager/RESET_PROPS";
2636
+ const initialState$2 = {
2637
+ currentLayout: null
2638
+ };
2639
+ const editViewManagerReducer = (state = initialState$2, action) => (
2640
+ // eslint-disable-next-line consistent-return
2641
+ produce(state, (draftState) => {
2642
+ switch (action.type) {
2643
+ case RESET_PROPS$2: {
2644
+ draftState.currentLayout = null;
2645
+ break;
2646
+ }
2647
+ case SET_LAYOUT: {
2648
+ draftState.currentLayout = action.layout;
2649
+ break;
2650
+ }
2651
+ default:
2652
+ return draftState;
2653
+ }
2654
+ })
2655
+ );
2656
+ const GET_DATA$1 = "ContentManager/ListView/GET_DATA";
2657
+ const GET_DATA_SUCCEEDED$1 = "ContentManager/ListView/GET_DATA_SUCCEEDED";
2658
+ const RESET_PROPS$1 = "ContentManager/ListView/RESET_PROPS";
2659
+ const ON_CHANGE_LIST_HEADERS = "ContentManager/ListView/ON_CHANGE_LIST_HEADERS ";
2660
+ const ON_RESET_LIST_HEADERS = "ContentManager/ListView/ON_RESET_LIST_HEADERS ";
2661
+ const SET_LIST_LAYOUT = "ContentManager/ListView/SET_LIST_LAYOUT ";
2662
+ const initialState$1 = {
2663
+ data: [],
2664
+ isLoading: true,
2665
+ contentType: {},
2666
+ components: [],
2667
+ initialDisplayedHeaders: [],
2668
+ displayedHeaders: [],
2669
+ pagination: {
2670
+ total: 0
2671
+ }
2672
+ };
2673
+ const listViewReducer = (state = initialState$1, action) => (
2674
+ // eslint-disable-next-line consistent-return
2675
+ produce(state, (draftState) => {
2676
+ switch (action.type) {
2677
+ case GET_DATA$1: {
2678
+ return {
2679
+ ...initialState$1,
2680
+ contentType: state.contentType,
2681
+ components: state.components,
2682
+ initialDisplayedHeaders: state.initialDisplayedHeaders,
2683
+ displayedHeaders: state.displayedHeaders
2684
+ };
2685
+ }
2686
+ case GET_DATA_SUCCEEDED$1: {
2687
+ draftState.pagination = action.pagination;
2688
+ draftState.data = action.data;
2689
+ draftState.isLoading = false;
2690
+ break;
2691
+ }
2692
+ case ON_CHANGE_LIST_HEADERS: {
2693
+ const {
2694
+ target: { name, value }
2695
+ } = action;
2696
+ if (!value) {
2697
+ const { metadatas, attributes, uid } = state.contentType;
2698
+ const metas = metadatas[name].list;
2699
+ const header = {
2700
+ name,
2701
+ fieldSchema: attributes[name],
2702
+ metadatas: metas,
2703
+ key: `__${name}_key__`
2704
+ };
2705
+ switch (attributes[name].type) {
2706
+ case "component": {
2707
+ const componentName = attributes[name].component;
2708
+ const mainFieldName = get(
2709
+ state,
2710
+ ["components", componentName, "settings", "mainField"],
2711
+ null
2712
+ );
2713
+ const mainFieldAttribute = get(state, [
2714
+ "components",
2715
+ componentName,
2716
+ "attributes",
2717
+ mainFieldName
2718
+ ]);
2719
+ draftState.displayedHeaders.push({
2720
+ ...header,
2721
+ metadatas: {
2722
+ ...metas,
2723
+ mainField: {
2724
+ ...mainFieldAttribute,
2725
+ name: mainFieldName
2726
+ }
2727
+ }
2728
+ });
2729
+ break;
2730
+ }
2731
+ case "relation":
2732
+ draftState.displayedHeaders.push({
2733
+ ...header,
2734
+ queryInfos: {
2735
+ defaultParams: {},
2736
+ endPoint: `collection-types/${uid}`
2737
+ }
2738
+ });
2739
+ break;
2740
+ default:
2741
+ draftState.displayedHeaders.push(header);
2742
+ }
2743
+ } else {
2744
+ draftState.displayedHeaders = state.displayedHeaders.filter(
2745
+ (header) => header.name !== name
2746
+ );
2747
+ }
2748
+ break;
2749
+ }
2750
+ case ON_RESET_LIST_HEADERS: {
2751
+ draftState.displayedHeaders = state.initialDisplayedHeaders;
2752
+ break;
2753
+ }
2754
+ case RESET_PROPS$1: {
2755
+ return initialState$1;
2756
+ }
2757
+ case SET_LIST_LAYOUT: {
2758
+ const { contentType, components, displayedHeaders } = action;
2759
+ draftState.contentType = contentType;
2760
+ draftState.components = components;
2761
+ draftState.displayedHeaders = displayedHeaders;
2762
+ draftState.initialDisplayedHeaders = displayedHeaders;
2763
+ break;
2764
+ }
2765
+ default:
2766
+ return draftState;
2767
+ }
2768
+ })
2769
+ );
2770
+ const GET_DATA = "ContentManager/CrudReducer/GET_DATA";
2771
+ const GET_DATA_SUCCEEDED = "ContentManager/CrudReducer/GET_DATA_SUCCEEDED";
2772
+ const INIT_FORM = "ContentManager/CrudReducer/INIT_FORM";
2773
+ const RESET_PROPS = "ContentManager/CrudReducer/RESET_PROPS";
2774
+ const SET_DATA_STRUCTURES = "ContentManager/CrudReducer/SET_DATA_STRUCTURES";
2775
+ const SET_STATUS = "ContentManager/CrudReducer/SET_STATUS";
2776
+ const SUBMIT_SUCCEEDED = "ContentManager/CrudReducer/SUBMIT_SUCCEEDED";
2777
+ const CLEAR_SET_MODIFIED_DATA_ONLY = "ContentManager/CrudReducer/CLEAR_SET_MODIFIED_DATA_ONLY";
2778
+ const crudInitialState = {
2779
+ componentsDataStructure: {},
2780
+ contentTypeDataStructure: {},
2781
+ isLoading: true,
2782
+ data: null,
2783
+ status: "resolved",
2784
+ setModifiedDataOnly: false
2785
+ };
2786
+ const crudReducer = (state = crudInitialState, action) => produce(state, (draftState) => {
2787
+ switch (action.type) {
2788
+ case GET_DATA: {
2789
+ draftState.isLoading = true;
2790
+ draftState.data = null;
2791
+ break;
2792
+ }
2793
+ case GET_DATA_SUCCEEDED: {
2794
+ draftState.isLoading = false;
2795
+ draftState.data = action.data;
2796
+ draftState.setModifiedDataOnly = action.setModifiedDataOnly ?? false;
2797
+ break;
2798
+ }
2799
+ case INIT_FORM: {
2800
+ if (action.data) {
2801
+ draftState.isLoading = false;
2802
+ draftState.data = action.data;
2803
+ break;
2804
+ }
2805
+ draftState.isLoading = false;
2806
+ draftState.data = state.contentTypeDataStructure;
2807
+ break;
2808
+ }
2809
+ case RESET_PROPS: {
2810
+ return crudInitialState;
2811
+ }
2812
+ case SET_DATA_STRUCTURES: {
2813
+ draftState.componentsDataStructure = action.componentsDataStructure;
2814
+ draftState.contentTypeDataStructure = action.contentTypeDataStructure;
2815
+ break;
2816
+ }
2817
+ case SET_STATUS: {
2818
+ draftState.status = action.status;
2819
+ break;
2820
+ }
2821
+ case SUBMIT_SUCCEEDED: {
2822
+ draftState.data = action.data;
2823
+ break;
2824
+ }
2825
+ case CLEAR_SET_MODIFIED_DATA_ONLY: {
2826
+ draftState.setModifiedDataOnly = false;
2827
+ break;
2828
+ }
2829
+ default:
2830
+ return draftState;
2831
+ }
2832
+ });
2833
+ const initialState = {
2834
+ permissions: {},
2835
+ status: "init"
2836
+ };
2837
+ const reducer = (state = initialState, action) => (
2838
+ /* eslint-disable-next-line consistent-return */
2839
+ produce(state, (draftState) => {
2840
+ switch (action.type) {
2841
+ case ACTION_SET_APP_RUNTIME_STATUS: {
2842
+ draftState.status = "runtime";
2843
+ break;
2844
+ }
2845
+ case ACTION_SET_ADMIN_PERMISSIONS: {
2846
+ draftState.permissions = action.payload;
2847
+ break;
2848
+ }
2849
+ default:
2850
+ return draftState;
2851
+ }
2852
+ })
2853
+ );
2854
+ const staticReducers = {
2855
+ admin_app: reducer,
2856
+ rbacProvider: RBACReducer,
2857
+ "content-manager_app": mainReducer,
2858
+ "content-manager_listView": listViewReducer,
2859
+ "content-manager_rbacManager": rbacManagerReducer,
2860
+ "content-manager_editViewLayoutManager": editViewManagerReducer,
2861
+ "content-manager_editViewCrudReducer": crudReducer
2862
+ };
2863
+ const injectReducerStoreEnhancer = (appReducers) => (next) => (...args) => {
2864
+ const store = next(...args);
2865
+ const asyncReducers = {};
2866
+ return {
2867
+ ...store,
2868
+ asyncReducers,
2869
+ injectReducer: (key, asyncReducer) => {
2870
+ asyncReducers[key] = asyncReducer;
2871
+ store.replaceReducer(
2872
+ // @ts-expect-error we dynamically add reducers which makes the types uncomfortable.
2873
+ combineReducers({
2874
+ ...appReducers,
2875
+ ...asyncReducers
2876
+ })
2877
+ );
2878
+ }
2879
+ };
2880
+ };
2881
+ const configureStoreImpl = (appMiddlewares = [], injectedReducers = {}) => {
2882
+ const coreReducers = { ...staticReducers, ...injectedReducers };
2883
+ const store = configureStore({
2884
+ reducer: coreReducers,
2885
+ devTools: process.env.NODE_ENV !== "production",
2886
+ middleware: (getDefaultMiddleware) => [
2887
+ ...getDefaultMiddleware(),
2888
+ ...appMiddlewares.map((m) => m())
2889
+ ],
2890
+ enhancers: [injectReducerStoreEnhancer(coreReducers)]
2891
+ });
2892
+ return store;
2893
+ };
2894
+ const getBasename = () => (process.env.ADMIN_PATH ?? "").replace(window.location.origin, "");
2895
+ const createHook = () => {
2896
+ const _handlers = [];
2897
+ return {
2898
+ register(fn) {
2899
+ _handlers.push(fn);
2900
+ },
2901
+ delete(handler) {
2902
+ _handlers.splice(_handlers.indexOf(handler), 1);
2903
+ },
2904
+ runWaterfall(args, store) {
2905
+ return _handlers.reduce((acc, fn) => fn(acc, store), args);
2906
+ },
2907
+ async runWaterfallAsync(args, store) {
2908
+ let result = args;
2909
+ for (const fn of _handlers) {
2910
+ result = await fn(result, store);
2911
+ }
2912
+ return result;
2913
+ },
2914
+ runSeries(...args) {
2915
+ return _handlers.map((fn) => fn(...args));
2916
+ },
2917
+ async runSeriesAsync(...args) {
2918
+ const result = [];
2919
+ for (const fn of _handlers) {
2920
+ result.push(await fn(...args));
2921
+ }
2922
+ return result;
2923
+ },
2924
+ runParallel(...args) {
2925
+ return Promise.all(
2926
+ _handlers.map((fn) => {
2927
+ return fn(...args);
2928
+ })
2929
+ );
2930
+ }
2931
+ };
2932
+ };
2933
+ const useInjectionZone = (area) => {
2934
+ const { getAdminInjectedComponents } = useAdmin();
2935
+ const [moduleName, page, position] = area.split(".");
2936
+ return getAdminInjectedComponents(moduleName, page, position);
2937
+ };
2938
+ const INJECTION_ZONES = {
2939
+ admin: {
2940
+ // Temporary injection zone, support for the react-tour plugin in foodadvisor
2941
+ tutorials: {
2942
+ links: []
2943
+ }
2944
+ },
2945
+ contentManager: {
2946
+ editView: { informations: [], "right-links": [] },
2947
+ listView: {
2948
+ actions: [],
2949
+ deleteModalAdditionalInfos: [],
2950
+ publishModalAdditionalInfos: [],
2951
+ unpublishModalAdditionalInfos: []
2952
+ }
2953
+ }
2954
+ };
2955
+ const InjectionZone = ({ area, ...props }) => {
2956
+ const components = useInjectionZone(area);
2957
+ return components.map((component) => /* @__PURE__ */ jsx(component.Component, { ...props }, component.name));
2958
+ };
2959
+ const languageNativeNames = {
2960
+ ar: "العربية",
2961
+ ca: "Català",
2962
+ cs: "Čeština",
2963
+ de: "Deutsch",
2964
+ dk: "Dansk",
2965
+ en: "English",
2966
+ es: "Español",
2967
+ eu: "Euskara",
2968
+ fr: "Français",
2969
+ gu: "Gujarati",
2970
+ he: "עברית",
2971
+ hu: "Magyar",
2972
+ id: "Indonesian",
2973
+ it: "Italiano",
2974
+ ja: "日本語",
2975
+ ko: "한국어",
2976
+ ml: "Malayalam",
2977
+ ms: "Melayu",
2978
+ nl: "Nederlands",
2979
+ no: "Norwegian",
2980
+ pl: "Polski",
2981
+ "pt-BR": "Português (Brasil)",
2982
+ pt: "Português (Portugal)",
2983
+ ru: "Русский",
2984
+ sk: "Slovenčina",
2985
+ sv: "Swedish",
2986
+ th: "ไทย",
2987
+ tr: "Türkçe",
2988
+ uk: "Українська",
2989
+ vi: "Tiếng Việt",
2990
+ "zh-Hans": "中文 (简体)",
2991
+ zh: "中文 (繁體)",
2992
+ sa: "संस्कृत",
2993
+ hi: "हिन्दी"
2994
+ };
2995
+ const {
2996
+ INJECT_COLUMN_IN_TABLE,
2997
+ MUTATE_COLLECTION_TYPES_LINKS,
2998
+ MUTATE_EDIT_VIEW_LAYOUT,
2999
+ MUTATE_SINGLE_TYPES_LINKS
3000
+ } = HOOKS;
3001
+ class StrapiApp {
3002
+ admin;
3003
+ appPlugins;
3004
+ configurations;
3005
+ customBootstrapConfiguration;
3006
+ customConfigurations;
3007
+ customFields;
3008
+ hooksDict;
3009
+ library;
3010
+ menu;
3011
+ middlewares;
3012
+ plugins;
3013
+ reducers;
3014
+ settings;
3015
+ translations;
3016
+ constructor({ adminConfig, appPlugins } = {}) {
3017
+ this.customConfigurations = adminConfig?.config ?? {};
3018
+ this.customBootstrapConfiguration = adminConfig?.bootstrap;
3019
+ this.configurations = {
3020
+ authLogo: StrapiLogo,
3021
+ head: { favicon: "" },
3022
+ locales: ["en"],
3023
+ menuLogo: StrapiLogo,
3024
+ notifications: { releases: true },
3025
+ themes: { light: lightTheme, dark: darkTheme },
3026
+ translations: {},
3027
+ tutorials: true
3028
+ };
3029
+ this.appPlugins = appPlugins || {};
3030
+ this.library = {
3031
+ components: new Components(),
3032
+ fields: new Fields()
3033
+ };
3034
+ this.middlewares = new Middlewares();
3035
+ this.plugins = {};
3036
+ this.reducers = new Reducers();
3037
+ this.translations = {};
3038
+ this.hooksDict = {};
3039
+ this.admin = {
3040
+ injectionZones: INJECTION_ZONES
3041
+ };
3042
+ this.customFields = new CustomFields();
3043
+ this.menu = [];
3044
+ this.settings = {
3045
+ global: {
3046
+ id: "global",
3047
+ intlLabel: {
3048
+ id: "Settings.global",
3049
+ defaultMessage: "Global Settings"
3050
+ },
3051
+ links: []
3052
+ }
3053
+ };
3054
+ }
3055
+ addComponents = (components) => {
3056
+ if (Array.isArray(components)) {
3057
+ components.map((compo) => this.library.components.add(compo));
3058
+ } else {
3059
+ this.library.components.add(components);
3060
+ }
3061
+ };
3062
+ addCorePluginMenuLink = (link) => {
3063
+ const stringifiedLink = JSON.stringify(link);
3064
+ invariant(link.to, `link.to should be defined for ${stringifiedLink}`);
3065
+ invariant(
3066
+ typeof link.to === "string",
3067
+ `Expected link.to to be a string instead received ${typeof link.to}`
3068
+ );
3069
+ invariant(
3070
+ ["/plugins/content-type-builder", "/plugins/upload"].includes(link.to),
3071
+ "This method is not available for your plugin"
3072
+ );
3073
+ invariant(
3074
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3075
+ `link.intlLabel.id & link.intlLabel.defaultMessage for ${stringifiedLink}`
3076
+ );
3077
+ this.menu.push(link);
3078
+ };
3079
+ addFields = (fields) => {
3080
+ if (Array.isArray(fields)) {
3081
+ fields.map((field) => this.library.fields.add(field));
3082
+ } else {
3083
+ this.library.fields.add(fields);
3084
+ }
3085
+ };
3086
+ addMenuLink = (link) => {
3087
+ const stringifiedLink = JSON.stringify(link);
3088
+ invariant(link.to, `link.to should be defined for ${stringifiedLink}`);
3089
+ invariant(
3090
+ typeof link.to === "string",
3091
+ `Expected link.to to be a string instead received ${typeof link.to}`
3092
+ );
3093
+ invariant(
3094
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3095
+ `link.intlLabel.id & link.intlLabel.defaultMessage for ${stringifiedLink}`
3096
+ );
3097
+ invariant(
3098
+ link.Component && typeof link.Component === "function",
3099
+ `link.Component should be a valid React Component`
3100
+ );
3101
+ invariant(
3102
+ link.icon && typeof link.icon === "function",
3103
+ `link.Icon should be a valid React Component`
3104
+ );
3105
+ this.menu.push(link);
3106
+ };
3107
+ addMiddlewares = (middlewares) => {
3108
+ middlewares.forEach((middleware) => {
3109
+ this.middlewares.add(middleware);
3110
+ });
3111
+ };
3112
+ addReducers = (reducers) => {
3113
+ Object.keys(reducers).forEach((reducerName) => {
3114
+ this.reducers.add(reducerName, reducers[reducerName]);
3115
+ });
3116
+ };
3117
+ addSettingsLink = (sectionId, link) => {
3118
+ invariant(this.settings[sectionId], "The section does not exist");
3119
+ const stringifiedLink = JSON.stringify(link);
3120
+ invariant(link.id, `link.id should be defined for ${stringifiedLink}`);
3121
+ invariant(
3122
+ link.intlLabel?.id && link.intlLabel?.defaultMessage,
3123
+ `link.intlLabel.id & link.intlLabel.defaultMessage for ${stringifiedLink}`
3124
+ );
3125
+ invariant(link.to, `link.to should be defined for ${stringifiedLink}`);
3126
+ invariant(
3127
+ link.Component && typeof link.Component === "function",
3128
+ `link.Component should be a valid React Component`
3129
+ );
3130
+ this.settings[sectionId].links.push(link);
3131
+ };
3132
+ addSettingsLinks = (sectionId, links) => {
3133
+ invariant(this.settings[sectionId], "The section does not exist");
3134
+ invariant(Array.isArray(links), "TypeError expected links to be an array");
3135
+ links.forEach((link) => {
3136
+ this.addSettingsLink(sectionId, link);
3137
+ });
3138
+ };
3139
+ async bootstrap() {
3140
+ Object.keys(this.appPlugins).forEach((plugin) => {
3141
+ const bootstrap = this.appPlugins[plugin].bootstrap;
3142
+ if (bootstrap) {
3143
+ bootstrap({
3144
+ addSettingsLink: this.addSettingsLink,
3145
+ addSettingsLinks: this.addSettingsLinks,
3146
+ getPlugin: this.getPlugin,
3147
+ injectContentManagerComponent: this.injectContentManagerComponent,
3148
+ injectAdminComponent: this.injectAdminComponent,
3149
+ registerHook: this.registerHook
3150
+ });
3151
+ }
3152
+ });
3153
+ if (isFunction(this.customBootstrapConfiguration)) {
3154
+ this.customBootstrapConfiguration({
3155
+ addComponents: this.addComponents,
3156
+ addFields: this.addFields,
3157
+ addMenuLink: this.addMenuLink,
3158
+ addReducers: this.addReducers,
3159
+ addSettingsLink: this.addSettingsLink,
3160
+ addSettingsLinks: this.addSettingsLinks,
3161
+ getPlugin: this.getPlugin,
3162
+ injectContentManagerComponent: this.injectContentManagerComponent,
3163
+ injectAdminComponent: this.injectAdminComponent,
3164
+ registerHook: this.registerHook
3165
+ });
3166
+ }
3167
+ }
3168
+ bootstrapAdmin = async () => {
3169
+ await this.createCustomConfigurations();
3170
+ this.createHook(INJECT_COLUMN_IN_TABLE);
3171
+ this.createHook(MUTATE_COLLECTION_TYPES_LINKS);
3172
+ this.createHook(MUTATE_SINGLE_TYPES_LINKS);
3173
+ this.createHook(MUTATE_EDIT_VIEW_LAYOUT);
3174
+ return Promise.resolve();
3175
+ };
3176
+ createCustomConfigurations = async () => {
3177
+ if (this.customConfigurations?.locales) {
3178
+ this.configurations.locales = [
3179
+ "en",
3180
+ ...this.customConfigurations.locales?.filter((loc) => loc !== "en") || []
3181
+ ];
3182
+ }
3183
+ if (this.customConfigurations?.auth?.logo) {
3184
+ this.configurations.authLogo = this.customConfigurations.auth.logo;
3185
+ }
3186
+ if (this.customConfigurations?.menu?.logo) {
3187
+ this.configurations.menuLogo = this.customConfigurations.menu.logo;
3188
+ }
3189
+ if (this.customConfigurations?.head?.favicon) {
3190
+ this.configurations.head.favicon = this.customConfigurations.head.favicon;
3191
+ }
3192
+ if (this.customConfigurations?.theme) {
3193
+ const darkTheme2 = this.customConfigurations.theme.dark;
3194
+ const lightTheme2 = this.customConfigurations.theme.light;
3195
+ if (!darkTheme2 && !lightTheme2) {
3196
+ console.warn(
3197
+ `[deprecated] In future versions, Strapi will stop supporting this theme customization syntax. The theme configuration accepts a light and a dark key to customize each theme separately. See https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#theme-extension.`
3198
+ );
3199
+ merge(this.configurations.themes.light, this.customConfigurations.theme);
3200
+ }
3201
+ if (lightTheme2)
3202
+ merge(this.configurations.themes.light, lightTheme2);
3203
+ if (darkTheme2)
3204
+ merge(this.configurations.themes.dark, darkTheme2);
3205
+ }
3206
+ if (this.customConfigurations?.notifications?.releases !== void 0) {
3207
+ this.configurations.notifications.releases = this.customConfigurations.notifications.releases;
3208
+ }
3209
+ if (this.customConfigurations?.tutorials !== void 0) {
3210
+ this.configurations.tutorials = this.customConfigurations.tutorials;
3211
+ }
3212
+ };
3213
+ createHook = (name) => {
3214
+ this.hooksDict[name] = createHook();
3215
+ };
3216
+ createSettingSection = (section, links) => {
3217
+ invariant(section.id, "section.id should be defined");
3218
+ invariant(
3219
+ section.intlLabel?.id && section.intlLabel?.defaultMessage,
3220
+ "section.intlLabel should be defined"
3221
+ );
3222
+ invariant(Array.isArray(links), "TypeError expected links to be an array");
3223
+ invariant(this.settings[section.id] === void 0, "A similar section already exists");
3224
+ this.settings[section.id] = { ...section, links: [] };
3225
+ links.forEach((link) => {
3226
+ this.addSettingsLink(section.id, link);
3227
+ });
3228
+ };
3229
+ createStore = () => {
3230
+ const store = configureStoreImpl(this.middlewares.middlewares, this.reducers.reducers);
3231
+ return store;
3232
+ };
3233
+ getAdminInjectedComponents = (moduleName, containerName, blockName) => {
3234
+ try {
3235
+ return this.admin.injectionZones[moduleName][containerName][blockName] || [];
3236
+ } catch (err) {
3237
+ console.error("Cannot get injected component", err);
3238
+ return [];
3239
+ }
3240
+ };
3241
+ getPlugin = (pluginId) => {
3242
+ return this.plugins[pluginId];
3243
+ };
3244
+ async initialize() {
3245
+ Object.keys(this.appPlugins).forEach((plugin) => {
3246
+ this.appPlugins[plugin].register(this);
3247
+ });
3248
+ }
3249
+ injectContentManagerComponent = (containerName, blockName, component) => {
3250
+ invariant(
3251
+ this.admin.injectionZones.contentManager[containerName]?.[blockName],
3252
+ `The ${containerName} ${String(blockName)} zone is not defined in the content manager`
3253
+ );
3254
+ invariant(component, "A Component must be provided");
3255
+ this.admin.injectionZones.contentManager[containerName][blockName].push(component);
3256
+ };
3257
+ injectAdminComponent = (containerName, blockName, component) => {
3258
+ invariant(
3259
+ this.admin.injectionZones.admin[containerName]?.[blockName],
3260
+ `The ${containerName} ${String(blockName)} zone is not defined in the admin`
3261
+ );
3262
+ invariant(component, "A Component must be provided");
3263
+ this.admin.injectionZones.admin[containerName][blockName].push(component);
3264
+ };
3265
+ /**
3266
+ * Load the admin translations
3267
+ * @returns {Object} The imported admin translations
3268
+ */
3269
+ async loadAdminTrads() {
3270
+ const arrayOfPromises = this.configurations.locales.map((locale) => {
3271
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-62e5e2b3.mjs"), "./translations/ca.json": () => import("./ca-e99de225.mjs"), "./translations/cs.json": () => import("./cs-2fa881a2.mjs"), "./translations/de.json": () => import("./de-28f8bc28.mjs"), "./translations/dk.json": () => import("./dk-0b759a56.mjs"), "./translations/en.json": () => import("./en-e728accb.mjs"), "./translations/es.json": () => import("./es-18b29db2.mjs"), "./translations/eu.json": () => import("./eu-8fd773c2.mjs"), "./translations/fr.json": () => import("./fr-f37df086.mjs"), "./translations/gu.json": () => import("./gu-69f0e13a.mjs"), "./translations/he.json": () => import("./he-bd769d7e.mjs"), "./translations/hi.json": () => import("./hi-d397a24b.mjs"), "./translations/hu.json": () => import("./hu-eb88bd0c.mjs"), "./translations/id.json": () => import("./id-f47699e6.mjs"), "./translations/it.json": () => import("./it-4006227c.mjs"), "./translations/ja.json": () => import("./ja-db43ca3d.mjs"), "./translations/ko.json": () => import("./ko-a7826e25.mjs"), "./translations/ml.json": () => import("./ml-90131768.mjs"), "./translations/ms.json": () => import("./ms-f4f16a83.mjs"), "./translations/nl.json": () => import("./nl-887ce2c3.mjs"), "./translations/no.json": () => import("./no-f0b02541.mjs"), "./translations/pl.json": () => import("./pl-9ccd35d9.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-fd73cb13.mjs"), "./translations/pt.json": () => import("./pt-8acb6ac1.mjs"), "./translations/ru.json": () => import("./ru-d43423ea.mjs"), "./translations/sa.json": () => import("./sa-6bf4c20e.mjs"), "./translations/sk.json": () => import("./sk-58d31b17.mjs"), "./translations/sv.json": () => import("./sv-d80ad633.mjs"), "./translations/th.json": () => import("./th-e72c6a22.mjs"), "./translations/tr.json": () => import("./tr-e35ecfe8.mjs"), "./translations/uk.json": () => import("./uk-de367ec1.mjs"), "./translations/vi.json": () => import("./vi-096bccbb.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-ccf4be4b.mjs"), "./translations/zh.json": () => import("./zh-ba29b2e1.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
3272
+ return { data, locale };
3273
+ }).catch(() => {
3274
+ return { data: null, locale };
3275
+ });
3276
+ });
3277
+ const adminLocales = await Promise.all(arrayOfPromises);
3278
+ const translations = adminLocales.reduce(
3279
+ (acc, current) => {
3280
+ if (current.data) {
3281
+ acc[current.locale] = current.data;
3282
+ }
3283
+ return acc;
3284
+ },
3285
+ {}
3286
+ );
3287
+ return translations;
3288
+ }
3289
+ /**
3290
+ * Load the application's translations and merged the custom translations
3291
+ * with the default ones.
3292
+ *
3293
+ */
3294
+ async loadTrads() {
3295
+ const adminTranslations = await this.loadAdminTrads();
3296
+ const arrayOfPromises = Object.keys(this.appPlugins).map((plugin) => {
3297
+ const registerTrads = this.appPlugins[plugin].registerTrads;
3298
+ if (registerTrads) {
3299
+ return registerTrads({ locales: this.configurations.locales });
3300
+ }
3301
+ return null;
3302
+ }).filter((a) => a);
3303
+ const pluginsTrads = await Promise.all(arrayOfPromises);
3304
+ const mergedTrads = pluginsTrads.reduce(
3305
+ (acc, currentPluginTrads) => {
3306
+ const pluginTrads = currentPluginTrads.reduce(
3307
+ (acc1, current) => {
3308
+ acc1[current.locale] = current.data;
3309
+ return acc1;
3310
+ },
3311
+ {}
3312
+ );
3313
+ Object.keys(pluginTrads).forEach((locale) => {
3314
+ acc[locale] = { ...acc[locale], ...pluginTrads[locale] };
3315
+ });
3316
+ return acc;
3317
+ },
3318
+ {}
3319
+ );
3320
+ const translations = this.configurations.locales.reduce((acc, current) => {
3321
+ acc[current] = {
3322
+ ...adminTranslations[current],
3323
+ ...mergedTrads[current] || {},
3324
+ ...this.customConfigurations?.translations?.[current] ?? {}
3325
+ };
3326
+ return acc;
3327
+ }, {});
3328
+ this.configurations.translations = translations;
3329
+ return Promise.resolve();
3330
+ }
3331
+ registerHook = (name, fn) => {
3332
+ invariant(
3333
+ this.hooksDict[name],
3334
+ `The hook ${name} is not defined. You are trying to register a hook that does not exist in the application.`
3335
+ );
3336
+ this.hooksDict[name].register(fn);
3337
+ };
3338
+ registerPlugin = (pluginConf) => {
3339
+ const plugin = new Plugin(pluginConf);
3340
+ this.plugins[plugin.pluginId] = plugin;
3341
+ };
3342
+ runHookSeries = (name, asynchronous = false) => asynchronous ? this.hooksDict[name].runSeriesAsync() : this.hooksDict[name].runSeries();
3343
+ runHookWaterfall = (name, initialValue, asynchronous = false, store) => {
3344
+ return asynchronous ? this.hooksDict[name].runWaterfallAsync(initialValue, store) : this.hooksDict[name].runWaterfall(initialValue, store);
3345
+ };
3346
+ runHookParallel = (name) => this.hooksDict[name].runParallel();
3347
+ render() {
3348
+ const store = this.createStore();
3349
+ const localeNames = pick(languageNativeNames, this.configurations.locales || []);
3350
+ const {
3351
+ components: { components },
3352
+ fields: { fields }
3353
+ } = this.library;
3354
+ return /* @__PURE__ */ jsxs(
3355
+ Providers,
3356
+ {
3357
+ authLogo: this.configurations.authLogo,
3358
+ components,
3359
+ fields,
3360
+ customFields: this.customFields,
3361
+ localeNames,
3362
+ getAdminInjectedComponents: this.getAdminInjectedComponents,
3363
+ getPlugin: this.getPlugin,
3364
+ messages: this.configurations.translations,
3365
+ menu: this.menu,
3366
+ menuLogo: this.configurations.menuLogo,
3367
+ plugins: this.plugins,
3368
+ runHookParallel: this.runHookParallel,
3369
+ runHookWaterfall: (name, initialValue, async = false) => {
3370
+ return this.runHookWaterfall(name, initialValue, async, store);
3371
+ },
3372
+ runHookSeries: this.runHookSeries,
3373
+ themes: this.configurations.themes,
3374
+ settings: this.settings,
3375
+ showTutorials: this.configurations.tutorials,
3376
+ showReleaseNotification: this.configurations.notifications.releases,
3377
+ store,
3378
+ children: [
3379
+ /* @__PURE__ */ jsx(
3380
+ Helmet,
3381
+ {
3382
+ htmlAttributes: { lang: localStorage.getItem(LANGUAGE_LOCAL_STORAGE_KEY) || "en" }
3383
+ }
3384
+ ),
3385
+ /* @__PURE__ */ jsx(BrowserRouter, { basename: getBasename(), children: /* @__PURE__ */ jsx(App, {}) })
3386
+ ]
3387
+ }
3388
+ );
3389
+ }
3390
+ }
3391
+ const renderAdmin = async (mountNode, { plugins }) => {
3392
+ if (!mountNode) {
3393
+ throw new Error("[@strapi/admin]: Could not find the root element to mount the admin app");
3394
+ }
3395
+ window.strapi = {
3396
+ /**
3397
+ * This ENV variable is passed from the strapi instance, by default no url is set
3398
+ * in the config and therefore the instance returns you an empty string so URLs are relative.
3399
+ *
3400
+ * To ensure that the backendURL is always set, we use the window.location.origin as a fallback.
3401
+ */
3402
+ backendURL: process.env.STRAPI_ADMIN_BACKEND_URL || window.location.origin,
3403
+ isEE: false,
3404
+ telemetryDisabled: process.env.STRAPI_TELEMETRY_DISABLED === "true" ? true : false,
3405
+ features: {
3406
+ SSO: "sso",
3407
+ AUDIT_LOGS: "audit-logs",
3408
+ REVIEW_WORKFLOWS: "review-workflows",
3409
+ /**
3410
+ * If we don't get the license then we know it's not EE
3411
+ * so no feature is enabled.
3412
+ */
3413
+ isEnabled: () => false
3414
+ },
3415
+ projectType: "Community",
3416
+ flags: {
3417
+ nps: false,
3418
+ promoteEE: true
3419
+ }
3420
+ };
3421
+ const { get: get2 } = getFetchClient();
3422
+ try {
3423
+ const {
3424
+ data: {
3425
+ data: { isEE, features, flags }
3426
+ }
3427
+ } = await get2("/admin/project-type");
3428
+ window.strapi.isEE = isEE;
3429
+ window.strapi.flags = flags;
3430
+ window.strapi.features = {
3431
+ ...window.strapi.features,
3432
+ isEnabled: (featureName) => features.some((feature) => feature.name === featureName)
3433
+ };
3434
+ window.strapi.projectType = isEE ? "Enterprise" : "Community";
3435
+ } catch (err) {
3436
+ console.error(err);
3437
+ }
3438
+ const app = new StrapiApp({
3439
+ adminConfig: {},
3440
+ appPlugins: plugins
3441
+ });
3442
+ await app.bootstrapAdmin();
3443
+ await app.initialize();
3444
+ await app.bootstrap();
3445
+ await app.loadTrads();
3446
+ createRoot(mountNode).render(app.render());
3447
+ if (typeof module !== "undefined" && module && "hot" in module && typeof module.hot === "object" && module.hot !== null && "accept" in module.hot && typeof module.hot.accept === "function") {
3448
+ module.hot.accept();
3449
+ }
3450
+ };
3451
+ export {
3452
+ ACTION_SET_APP_RUNTIME_STATUS as A,
3453
+ crudReducer as B,
3454
+ Column as C,
3455
+ crudInitialState as D,
3456
+ RESET_INIT_DATA as E,
3457
+ GET_INIT_DATA as F,
3458
+ GET_DATA as G,
3459
+ HOOKS as H,
3460
+ INIT_FORM as I,
3461
+ SET_INIT_DATA as J,
3462
+ initialState$3 as K,
3463
+ Login as L,
3464
+ StrapiLogo as M,
3465
+ NpsSurvey as N,
3466
+ ON_RESET_LIST_HEADERS as O,
3467
+ useLocales as P,
3468
+ useThemeToggle as Q,
3469
+ RBACProvider as R,
3470
+ SET_PERMISSIONS as S,
3471
+ getBasename as T,
3472
+ UnauthenticatedLayout as U,
3473
+ useTypedStore as V,
3474
+ DefaultDocument as W,
3475
+ renderAdmin as X,
3476
+ NotFoundPage$1 as Y,
3477
+ useTypedDispatch as a,
3478
+ useTypedSelector as b,
3479
+ createTypedSelector as c,
3480
+ createRoute as d,
3481
+ LayoutContent as e,
3482
+ Logo as f,
3483
+ RESET_PERMISSIONS as g,
3484
+ RESET_PROPS$2 as h,
3485
+ SET_LAYOUT as i,
3486
+ RESET_PROPS as j,
3487
+ SET_DATA_STRUCTURES as k,
3488
+ SET_STATUS as l,
3489
+ SUBMIT_SUCCEEDED as m,
3490
+ GET_DATA_SUCCEEDED as n,
3491
+ CLEAR_SET_MODIFIED_DATA_ONLY as o,
3492
+ useEnterprise as p,
3493
+ InjectionZone as q,
3494
+ GET_DATA$1 as r,
3495
+ GET_DATA_SUCCEEDED$1 as s,
3496
+ RESET_PROPS$1 as t,
3497
+ useConfiguration as u,
3498
+ SET_LIST_LAYOUT as v,
3499
+ ON_CHANGE_LIST_HEADERS as w,
3500
+ useInjectionZone as x,
3501
+ initialState$1 as y,
3502
+ formatAPIErrors as z
3503
+ };
3504
+ //# sourceMappingURL=index-34de382e.mjs.map