@strapi/content-manager 0.0.0-experimental.d1602f22dc638a4c3c5084965fd6126fff5e9d4f → 0.0.0-experimental.d325780feab1caf1b9e4423588eb1cc73b74c376

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 (441) hide show
  1. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +69 -0
  2. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  3. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +70 -0
  4. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  5. package/dist/_chunks/ComponentConfigurationPage-Cx-bPC7o.mjs +236 -0
  6. package/dist/_chunks/ComponentConfigurationPage-Cx-bPC7o.mjs.map +1 -0
  7. package/dist/_chunks/ComponentConfigurationPage-Dco_oGcv.js +254 -0
  8. package/dist/_chunks/ComponentConfigurationPage-Dco_oGcv.js.map +1 -0
  9. package/dist/_chunks/ComponentIcon-CRbtQEUV.js +175 -0
  10. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +1 -0
  11. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +157 -0
  12. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  13. package/dist/_chunks/EditConfigurationPage-2JHTYC9l.mjs +132 -0
  14. package/dist/_chunks/EditConfigurationPage-2JHTYC9l.mjs.map +1 -0
  15. package/dist/_chunks/EditConfigurationPage-7ex5BamM.js +150 -0
  16. package/dist/_chunks/EditConfigurationPage-7ex5BamM.js.map +1 -0
  17. package/dist/_chunks/EditViewPage-BUdd4V-E.mjs +191 -0
  18. package/dist/_chunks/EditViewPage-BUdd4V-E.mjs.map +1 -0
  19. package/dist/_chunks/EditViewPage-CpSt4shF.js +209 -0
  20. package/dist/_chunks/EditViewPage-CpSt4shF.js.map +1 -0
  21. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +50 -0
  22. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -0
  23. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +49 -0
  24. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -0
  25. package/dist/_chunks/Form-B5wai69r.js +778 -0
  26. package/dist/_chunks/Form-B5wai69r.js.map +1 -0
  27. package/dist/_chunks/Form-CKvmIxLb.mjs +758 -0
  28. package/dist/_chunks/Form-CKvmIxLb.mjs.map +1 -0
  29. package/dist/_chunks/History-BtUvMl3c.mjs +999 -0
  30. package/dist/_chunks/History-BtUvMl3c.mjs.map +1 -0
  31. package/dist/_chunks/History-_uVRZnTx.js +1019 -0
  32. package/dist/_chunks/History-_uVRZnTx.js.map +1 -0
  33. package/dist/_chunks/Input-C7kIupyO.mjs +5585 -0
  34. package/dist/_chunks/Input-C7kIupyO.mjs.map +1 -0
  35. package/dist/_chunks/Input-D_lWa2v5.js +5617 -0
  36. package/dist/_chunks/Input-D_lWa2v5.js.map +1 -0
  37. package/dist/_chunks/ListConfigurationPage-B8V2YLn_.mjs +633 -0
  38. package/dist/_chunks/ListConfigurationPage-B8V2YLn_.mjs.map +1 -0
  39. package/dist/_chunks/ListConfigurationPage-mzxHRiSU.js +652 -0
  40. package/dist/_chunks/ListConfigurationPage-mzxHRiSU.js.map +1 -0
  41. package/dist/_chunks/ListViewPage-CmYoPeqC.js +877 -0
  42. package/dist/_chunks/ListViewPage-CmYoPeqC.js.map +1 -0
  43. package/dist/_chunks/ListViewPage-GTcTc1Mh.mjs +854 -0
  44. package/dist/_chunks/ListViewPage-GTcTc1Mh.mjs.map +1 -0
  45. package/dist/_chunks/NoContentTypePage-CurjDsnX.js +51 -0
  46. package/dist/_chunks/NoContentTypePage-CurjDsnX.js.map +1 -0
  47. package/dist/_chunks/NoContentTypePage-aTTRCOJI.mjs +51 -0
  48. package/dist/_chunks/NoContentTypePage-aTTRCOJI.mjs.map +1 -0
  49. package/dist/_chunks/NoPermissionsPage-BaC4j1Lu.mjs +23 -0
  50. package/dist/_chunks/NoPermissionsPage-BaC4j1Lu.mjs.map +1 -0
  51. package/dist/_chunks/NoPermissionsPage-DW7_REzi.js +23 -0
  52. package/dist/_chunks/NoPermissionsPage-DW7_REzi.js.map +1 -0
  53. package/dist/_chunks/Preview-DTUxeZDR.js +305 -0
  54. package/dist/_chunks/Preview-DTUxeZDR.js.map +1 -0
  55. package/dist/_chunks/Preview-k2MYjnIi.mjs +287 -0
  56. package/dist/_chunks/Preview-k2MYjnIi.mjs.map +1 -0
  57. package/dist/_chunks/Relations-CkfzR66V.js +750 -0
  58. package/dist/_chunks/Relations-CkfzR66V.js.map +1 -0
  59. package/dist/_chunks/Relations-ClCLZFKk.mjs +731 -0
  60. package/dist/_chunks/Relations-ClCLZFKk.mjs.map +1 -0
  61. package/dist/_chunks/ar-BUUWXIYu.js +226 -0
  62. package/dist/{admin/chunks/ar-DckYq_WK.js.map → _chunks/ar-BUUWXIYu.js.map} +1 -1
  63. package/dist/_chunks/ar-CCEVvqGG.mjs +226 -0
  64. package/dist/_chunks/ar-CCEVvqGG.mjs.map +1 -0
  65. package/dist/_chunks/ca-5U32ON2v.mjs +201 -0
  66. package/dist/_chunks/ca-5U32ON2v.mjs.map +1 -0
  67. package/dist/_chunks/ca-Cmk45QO6.js +201 -0
  68. package/dist/{admin/chunks/de-CbImAUA5.js.map → _chunks/ca-Cmk45QO6.js.map} +1 -1
  69. package/dist/_chunks/cs-CM2aBUar.mjs +125 -0
  70. package/dist/_chunks/cs-CM2aBUar.mjs.map +1 -0
  71. package/dist/_chunks/cs-CkJy6B2v.js +125 -0
  72. package/dist/{admin/chunks/cs-C7OSYFQ7.js.map → _chunks/cs-CkJy6B2v.js.map} +1 -1
  73. package/dist/_chunks/de-C72KDNOl.mjs +199 -0
  74. package/dist/_chunks/de-C72KDNOl.mjs.map +1 -0
  75. package/dist/_chunks/de-CCEmbAah.js +199 -0
  76. package/dist/{admin/chunks/es-C8vLuvZL.js.map → _chunks/de-CCEmbAah.js.map} +1 -1
  77. package/dist/_chunks/en-BR48D_RH.js +312 -0
  78. package/dist/{admin/chunks/en-LfhocNG2.js.map → _chunks/en-BR48D_RH.js.map} +1 -1
  79. package/dist/_chunks/en-D65uIF6Y.mjs +312 -0
  80. package/dist/{admin/chunks/en-C1CjdAtC.js.map → _chunks/en-D65uIF6Y.mjs.map} +1 -1
  81. package/dist/_chunks/es-9K52xZIr.js +196 -0
  82. package/dist/{admin/chunks/de-5QRlDHyR.js.map → _chunks/es-9K52xZIr.js.map} +1 -1
  83. package/dist/_chunks/es-D34tqjMw.mjs +196 -0
  84. package/dist/_chunks/es-D34tqjMw.mjs.map +1 -0
  85. package/dist/_chunks/eu-CdALomew.mjs +202 -0
  86. package/dist/_chunks/eu-CdALomew.mjs.map +1 -0
  87. package/dist/_chunks/eu-VDH-3ovk.js +202 -0
  88. package/dist/_chunks/eu-VDH-3ovk.js.map +1 -0
  89. package/dist/_chunks/fr-C43IbhA_.js +219 -0
  90. package/dist/_chunks/fr-C43IbhA_.js.map +1 -0
  91. package/dist/_chunks/fr-DBseuRuB.mjs +219 -0
  92. package/dist/_chunks/fr-DBseuRuB.mjs.map +1 -0
  93. package/dist/_chunks/gu-BRmF601H.js +200 -0
  94. package/dist/_chunks/gu-BRmF601H.js.map +1 -0
  95. package/dist/_chunks/gu-CNpaMDpH.mjs +200 -0
  96. package/dist/_chunks/gu-CNpaMDpH.mjs.map +1 -0
  97. package/dist/_chunks/hi-CCJBptSq.js +200 -0
  98. package/dist/_chunks/hi-CCJBptSq.js.map +1 -0
  99. package/dist/_chunks/hi-Dwvd04m3.mjs +200 -0
  100. package/dist/_chunks/hi-Dwvd04m3.mjs.map +1 -0
  101. package/dist/{admin/chunks/hooks-D-sOYd1s.js → _chunks/hooks-BAaaKPS_.js} +3 -6
  102. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -0
  103. package/dist/_chunks/hooks-E5u1mcgM.mjs +8 -0
  104. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +1 -0
  105. package/dist/_chunks/hu-CeYvaaO0.mjs +202 -0
  106. package/dist/_chunks/hu-CeYvaaO0.mjs.map +1 -0
  107. package/dist/_chunks/hu-sNV_yLYy.js +202 -0
  108. package/dist/_chunks/hu-sNV_yLYy.js.map +1 -0
  109. package/dist/_chunks/id-B5Ser98A.js +160 -0
  110. package/dist/{admin/chunks/it-BAHrwmYS.js.map → _chunks/id-B5Ser98A.js.map} +1 -1
  111. package/dist/_chunks/id-BtwA9WJT.mjs +160 -0
  112. package/dist/_chunks/id-BtwA9WJT.mjs.map +1 -0
  113. package/dist/_chunks/index-CIIIuVmx.mjs +4481 -0
  114. package/dist/_chunks/index-CIIIuVmx.mjs.map +1 -0
  115. package/dist/_chunks/index-CwbxJQVl.js +4500 -0
  116. package/dist/_chunks/index-CwbxJQVl.js.map +1 -0
  117. package/dist/_chunks/it-BrVPqaf1.mjs +162 -0
  118. package/dist/_chunks/it-BrVPqaf1.mjs.map +1 -0
  119. package/dist/_chunks/it-DkBIs7vD.js +162 -0
  120. package/dist/{admin/chunks/id-D7V5S1rB.js.map → _chunks/it-DkBIs7vD.js.map} +1 -1
  121. package/dist/_chunks/ja-7sfIbjxE.js +196 -0
  122. package/dist/{admin/chunks/it-CQFpa_Dc.js.map → _chunks/ja-7sfIbjxE.js.map} +1 -1
  123. package/dist/_chunks/ja-BHqhDq4V.mjs +196 -0
  124. package/dist/_chunks/ja-BHqhDq4V.mjs.map +1 -0
  125. package/dist/_chunks/ko-HVQRlfUI.mjs +195 -0
  126. package/dist/_chunks/ko-HVQRlfUI.mjs.map +1 -0
  127. package/dist/_chunks/ko-woFZPmLk.js +195 -0
  128. package/dist/{admin/chunks/es-DkoWSExG.js.map → _chunks/ko-woFZPmLk.js.map} +1 -1
  129. package/dist/_chunks/layout-B1sUBgaT.js +488 -0
  130. package/dist/_chunks/layout-B1sUBgaT.js.map +1 -0
  131. package/dist/_chunks/layout-CpUqPtOS.mjs +471 -0
  132. package/dist/_chunks/layout-CpUqPtOS.mjs.map +1 -0
  133. package/dist/_chunks/ml-BihZwQit.mjs +200 -0
  134. package/dist/_chunks/ml-BihZwQit.mjs.map +1 -0
  135. package/dist/_chunks/ml-C2W8N8k1.js +200 -0
  136. package/dist/_chunks/ml-C2W8N8k1.js.map +1 -0
  137. package/dist/_chunks/ms-BuFotyP_.js +144 -0
  138. package/dist/{admin/chunks/cs-BJFxwIWj.js.map → _chunks/ms-BuFotyP_.js.map} +1 -1
  139. package/dist/_chunks/ms-m_WjyWx7.mjs +144 -0
  140. package/dist/_chunks/ms-m_WjyWx7.mjs.map +1 -0
  141. package/dist/_chunks/nl-D4R9gHx5.mjs +202 -0
  142. package/dist/_chunks/nl-D4R9gHx5.mjs.map +1 -0
  143. package/dist/_chunks/nl-bbEOHChV.js +202 -0
  144. package/dist/_chunks/nl-bbEOHChV.js.map +1 -0
  145. package/dist/_chunks/objects-BcXOv6_9.js +47 -0
  146. package/dist/_chunks/objects-BcXOv6_9.js.map +1 -0
  147. package/dist/_chunks/objects-D6yBsdmx.mjs +45 -0
  148. package/dist/_chunks/objects-D6yBsdmx.mjs.map +1 -0
  149. package/dist/_chunks/pl-sbx9mSt_.mjs +199 -0
  150. package/dist/_chunks/pl-sbx9mSt_.mjs.map +1 -0
  151. package/dist/_chunks/pl-uzwG-hk7.js +199 -0
  152. package/dist/{admin/chunks/ca-DviY7mRj.js.map → _chunks/pl-uzwG-hk7.js.map} +1 -1
  153. package/dist/_chunks/pt-BR-BiOz37D9.js +201 -0
  154. package/dist/{admin/chunks/pt-BR-CcotyBGJ.js.map → _chunks/pt-BR-BiOz37D9.js.map} +1 -1
  155. package/dist/_chunks/pt-BR-C71iDxnh.mjs +201 -0
  156. package/dist/_chunks/pt-BR-C71iDxnh.mjs.map +1 -0
  157. package/dist/_chunks/pt-BsaFvS8-.mjs +95 -0
  158. package/dist/_chunks/pt-BsaFvS8-.mjs.map +1 -0
  159. package/dist/_chunks/pt-CeXQuq50.js +95 -0
  160. package/dist/_chunks/pt-CeXQuq50.js.map +1 -0
  161. package/dist/_chunks/relations-B6L5kXX8.js +133 -0
  162. package/dist/_chunks/relations-B6L5kXX8.js.map +1 -0
  163. package/dist/_chunks/relations-DU-iUzo_.mjs +134 -0
  164. package/dist/_chunks/relations-DU-iUzo_.mjs.map +1 -0
  165. package/dist/_chunks/ru-BE6A4Exp.mjs +231 -0
  166. package/dist/{admin/chunks/ar-DeQBSsfl.js.map → _chunks/ru-BE6A4Exp.mjs.map} +1 -1
  167. package/dist/_chunks/ru-BT3ybNny.js +231 -0
  168. package/dist/{admin/chunks/ru-CB4BUyQp.js.map → _chunks/ru-BT3ybNny.js.map} +1 -1
  169. package/dist/_chunks/sa-CcvkYInH.js +200 -0
  170. package/dist/_chunks/sa-CcvkYInH.js.map +1 -0
  171. package/dist/_chunks/sa-Dag0k-Z8.mjs +200 -0
  172. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +1 -0
  173. package/dist/_chunks/sk-BFg-R8qJ.mjs +202 -0
  174. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +1 -0
  175. package/dist/_chunks/sk-CvY09Xjv.js +202 -0
  176. package/dist/_chunks/sk-CvY09Xjv.js.map +1 -0
  177. package/dist/_chunks/sv-CUnfWGsh.mjs +202 -0
  178. package/dist/_chunks/sv-CUnfWGsh.mjs.map +1 -0
  179. package/dist/_chunks/sv-MYDuzgvT.js +202 -0
  180. package/dist/_chunks/sv-MYDuzgvT.js.map +1 -0
  181. package/dist/_chunks/th-BqbI8lIT.mjs +148 -0
  182. package/dist/_chunks/th-BqbI8lIT.mjs.map +1 -0
  183. package/dist/_chunks/th-D9_GfAjc.js +148 -0
  184. package/dist/{admin/chunks/ms-CvSC0OdG.js.map → _chunks/th-D9_GfAjc.js.map} +1 -1
  185. package/dist/_chunks/tr-CgeK3wJM.mjs +199 -0
  186. package/dist/_chunks/tr-CgeK3wJM.mjs.map +1 -0
  187. package/dist/_chunks/tr-D9UH-O_R.js +199 -0
  188. package/dist/_chunks/tr-D9UH-O_R.js.map +1 -0
  189. package/dist/_chunks/uk-C8EiqJY7.js +144 -0
  190. package/dist/{admin/chunks/ms-Bh09NFff.js.map → _chunks/uk-C8EiqJY7.js.map} +1 -1
  191. package/dist/_chunks/uk-CR-zDhAY.mjs +144 -0
  192. package/dist/_chunks/uk-CR-zDhAY.mjs.map +1 -0
  193. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js +245 -0
  194. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +1 -0
  195. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs +228 -0
  196. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +1 -0
  197. package/dist/_chunks/usePrev-CZGy2Vjf.mjs +29 -0
  198. package/dist/_chunks/usePrev-CZGy2Vjf.mjs.map +1 -0
  199. package/dist/_chunks/usePrev-D5J_2fEu.js +28 -0
  200. package/dist/_chunks/usePrev-D5J_2fEu.js.map +1 -0
  201. package/dist/_chunks/vi-CJlYDheJ.js +111 -0
  202. package/dist/{admin/chunks/vi-CvBGlTjr.js.map → _chunks/vi-CJlYDheJ.js.map} +1 -1
  203. package/dist/_chunks/vi-DUXIk_fw.mjs +111 -0
  204. package/dist/_chunks/vi-DUXIk_fw.mjs.map +1 -0
  205. package/dist/_chunks/zh-BWZspA60.mjs +209 -0
  206. package/dist/_chunks/zh-BWZspA60.mjs.map +1 -0
  207. package/dist/_chunks/zh-CQQfszqR.js +209 -0
  208. package/dist/{admin/chunks/ca-ClDTvatJ.js.map → _chunks/zh-CQQfszqR.js.map} +1 -1
  209. package/dist/_chunks/zh-Hans-9kOncHGw.js +952 -0
  210. package/dist/{admin/chunks/zh-Hans-CI0HKio3.js.map → _chunks/zh-Hans-9kOncHGw.js.map} +1 -1
  211. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +952 -0
  212. package/dist/{admin/chunks/zh-Hans-JVK9x7xr.js.map → _chunks/zh-Hans-BPQcRIyH.mjs.map} +1 -1
  213. package/dist/admin/index.js +4 -23
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +13 -16
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  218. package/dist/admin/src/hooks/useDocument.d.ts +2 -2
  219. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +1 -0
  220. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  221. package/dist/admin/src/preview/components/PreviewContent.d.ts +1 -2
  222. package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
  223. package/dist/admin/src/preview/index.d.ts +3 -2
  224. package/dist/server/index.js +4396 -5468
  225. package/dist/server/index.js.map +1 -1
  226. package/dist/server/index.mjs +4368 -5442
  227. package/dist/server/index.mjs.map +1 -1
  228. package/dist/server/src/controllers/utils/metadata.d.ts +1 -1
  229. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  230. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  231. package/dist/server/src/services/utils/count.d.ts +1 -1
  232. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  233. package/dist/server/src/services/utils/populate.d.ts +1 -1
  234. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  235. package/dist/shared/contracts/collection-types.d.ts +1 -0
  236. package/dist/shared/contracts/components.d.ts +1 -0
  237. package/dist/shared/contracts/content-types.d.ts +1 -0
  238. package/dist/shared/contracts/history-versions.d.ts +1 -0
  239. package/dist/shared/contracts/index.d.ts +1 -0
  240. package/dist/shared/contracts/init.d.ts +1 -0
  241. package/dist/shared/contracts/preview.d.ts +1 -0
  242. package/dist/shared/contracts/relations.d.ts +2 -1
  243. package/dist/shared/contracts/relations.d.ts.map +1 -1
  244. package/dist/shared/contracts/review-workflows.d.ts +1 -0
  245. package/dist/shared/contracts/single-types.d.ts +1 -0
  246. package/dist/shared/contracts/uid.d.ts +1 -0
  247. package/dist/shared/index.d.ts +1 -0
  248. package/dist/shared/index.js +24 -35
  249. package/dist/shared/index.js.map +1 -1
  250. package/dist/shared/index.mjs +25 -34
  251. package/dist/shared/index.mjs.map +1 -1
  252. package/package.json +10 -13
  253. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js +0 -80
  254. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
  255. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +0 -82
  256. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +0 -1
  257. package/dist/admin/chunks/ComponentConfigurationPage-DXwOtpq1.js +0 -298
  258. package/dist/admin/chunks/ComponentConfigurationPage-DXwOtpq1.js.map +0 -1
  259. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js +0 -276
  260. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js.map +0 -1
  261. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js +0 -153
  262. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
  263. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +0 -176
  264. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +0 -1
  265. package/dist/admin/chunks/EditConfigurationPage-D0Ng758X.js +0 -180
  266. package/dist/admin/chunks/EditConfigurationPage-D0Ng758X.js.map +0 -1
  267. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js +0 -158
  268. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js.map +0 -1
  269. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js +0 -265
  270. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js.map +0 -1
  271. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js +0 -288
  272. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js.map +0 -1
  273. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js +0 -56
  274. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
  275. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +0 -58
  276. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +0 -1
  277. package/dist/admin/chunks/Form-BEqiuSvQ.js +0 -978
  278. package/dist/admin/chunks/Form-BEqiuSvQ.js.map +0 -1
  279. package/dist/admin/chunks/Form-CZmB6JIg.js +0 -955
  280. package/dist/admin/chunks/Form-CZmB6JIg.js.map +0 -1
  281. package/dist/admin/chunks/History-BlLKDZSw.js +0 -1331
  282. package/dist/admin/chunks/History-BlLKDZSw.js.map +0 -1
  283. package/dist/admin/chunks/History-CPYXgxkS.js +0 -1308
  284. package/dist/admin/chunks/History-CPYXgxkS.js.map +0 -1
  285. package/dist/admin/chunks/Input-CLX3C5DI.js +0 -6711
  286. package/dist/admin/chunks/Input-CLX3C5DI.js.map +0 -1
  287. package/dist/admin/chunks/Input-DiR2Xfa7.js +0 -6742
  288. package/dist/admin/chunks/Input-DiR2Xfa7.js.map +0 -1
  289. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js +0 -795
  290. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js.map +0 -1
  291. package/dist/admin/chunks/ListConfigurationPage-DdTp-HxB.js +0 -818
  292. package/dist/admin/chunks/ListConfigurationPage-DdTp-HxB.js.map +0 -1
  293. package/dist/admin/chunks/ListViewPage-BtXYjEYz.js +0 -1154
  294. package/dist/admin/chunks/ListViewPage-BtXYjEYz.js.map +0 -1
  295. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js +0 -1132
  296. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js.map +0 -1
  297. package/dist/admin/chunks/NoContentTypePage-BJrZvYPY.js +0 -57
  298. package/dist/admin/chunks/NoContentTypePage-BJrZvYPY.js.map +0 -1
  299. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js +0 -59
  300. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js.map +0 -1
  301. package/dist/admin/chunks/NoPermissionsPage-BulvG4hB.js +0 -36
  302. package/dist/admin/chunks/NoPermissionsPage-BulvG4hB.js.map +0 -1
  303. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js +0 -38
  304. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js.map +0 -1
  305. package/dist/admin/chunks/Preview-DEuQgQg2.js +0 -482
  306. package/dist/admin/chunks/Preview-DEuQgQg2.js.map +0 -1
  307. package/dist/admin/chunks/Preview-H74FQ9Cq.js +0 -504
  308. package/dist/admin/chunks/Preview-H74FQ9Cq.js.map +0 -1
  309. package/dist/admin/chunks/Relations-C8jbZPVK.js +0 -827
  310. package/dist/admin/chunks/Relations-C8jbZPVK.js.map +0 -1
  311. package/dist/admin/chunks/Relations-mxOUS7TJ.js +0 -853
  312. package/dist/admin/chunks/Relations-mxOUS7TJ.js.map +0 -1
  313. package/dist/admin/chunks/ar-DckYq_WK.js +0 -222
  314. package/dist/admin/chunks/ar-DeQBSsfl.js +0 -227
  315. package/dist/admin/chunks/ca-ClDTvatJ.js +0 -202
  316. package/dist/admin/chunks/ca-DviY7mRj.js +0 -197
  317. package/dist/admin/chunks/cs-BJFxwIWj.js +0 -126
  318. package/dist/admin/chunks/cs-C7OSYFQ7.js +0 -122
  319. package/dist/admin/chunks/de-5QRlDHyR.js +0 -195
  320. package/dist/admin/chunks/de-CbImAUA5.js +0 -200
  321. package/dist/admin/chunks/en-C1CjdAtC.js +0 -313
  322. package/dist/admin/chunks/en-LfhocNG2.js +0 -308
  323. package/dist/admin/chunks/es-C8vLuvZL.js +0 -197
  324. package/dist/admin/chunks/es-DkoWSExG.js +0 -192
  325. package/dist/admin/chunks/eu-BG1xX7HK.js +0 -198
  326. package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
  327. package/dist/admin/chunks/eu-BJW3AvXu.js +0 -203
  328. package/dist/admin/chunks/eu-BJW3AvXu.js.map +0 -1
  329. package/dist/admin/chunks/fr-CFdRaRVj.js +0 -215
  330. package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
  331. package/dist/admin/chunks/fr-gQSilC7w.js +0 -220
  332. package/dist/admin/chunks/fr-gQSilC7w.js.map +0 -1
  333. package/dist/admin/chunks/gu-D5MMMXRs.js +0 -196
  334. package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
  335. package/dist/admin/chunks/gu-DPU4wyx7.js +0 -201
  336. package/dist/admin/chunks/gu-DPU4wyx7.js.map +0 -1
  337. package/dist/admin/chunks/hi-Dp4omeBb.js +0 -201
  338. package/dist/admin/chunks/hi-Dp4omeBb.js.map +0 -1
  339. package/dist/admin/chunks/hi-lp17SCjr.js +0 -196
  340. package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
  341. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +0 -1
  342. package/dist/admin/chunks/hooks-DMvik5y_.js +0 -7
  343. package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
  344. package/dist/admin/chunks/hu-CLka1U2C.js +0 -198
  345. package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
  346. package/dist/admin/chunks/hu-CtFJuhTd.js +0 -203
  347. package/dist/admin/chunks/hu-CtFJuhTd.js.map +0 -1
  348. package/dist/admin/chunks/id-D7V5S1rB.js +0 -161
  349. package/dist/admin/chunks/id-USfY9m1g.js +0 -156
  350. package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
  351. package/dist/admin/chunks/index-BRlRBRLb.js +0 -5350
  352. package/dist/admin/chunks/index-BRlRBRLb.js.map +0 -1
  353. package/dist/admin/chunks/index-ZIwOPk6p.js +0 -5416
  354. package/dist/admin/chunks/index-ZIwOPk6p.js.map +0 -1
  355. package/dist/admin/chunks/it-BAHrwmYS.js +0 -158
  356. package/dist/admin/chunks/it-CQFpa_Dc.js +0 -163
  357. package/dist/admin/chunks/ja-BWKmBJFT.js +0 -192
  358. package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
  359. package/dist/admin/chunks/ja-jdQM-B79.js +0 -197
  360. package/dist/admin/chunks/ja-jdQM-B79.js.map +0 -1
  361. package/dist/admin/chunks/ko-CgADGBNt.js +0 -191
  362. package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
  363. package/dist/admin/chunks/ko-k46sEyzt.js +0 -196
  364. package/dist/admin/chunks/ko-k46sEyzt.js.map +0 -1
  365. package/dist/admin/chunks/layout-B3-guCPG.js +0 -598
  366. package/dist/admin/chunks/layout-B3-guCPG.js.map +0 -1
  367. package/dist/admin/chunks/layout-ameRNiAM.js +0 -618
  368. package/dist/admin/chunks/layout-ameRNiAM.js.map +0 -1
  369. package/dist/admin/chunks/ml-CnhCfOn_.js +0 -196
  370. package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
  371. package/dist/admin/chunks/ml-DqxPwODx.js +0 -201
  372. package/dist/admin/chunks/ml-DqxPwODx.js.map +0 -1
  373. package/dist/admin/chunks/ms-Bh09NFff.js +0 -140
  374. package/dist/admin/chunks/ms-CvSC0OdG.js +0 -145
  375. package/dist/admin/chunks/nl-BEubhS8C.js +0 -203
  376. package/dist/admin/chunks/nl-BEubhS8C.js.map +0 -1
  377. package/dist/admin/chunks/nl-C8HYflTc.js +0 -198
  378. package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
  379. package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
  380. package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
  381. package/dist/admin/chunks/objects-wl73iEma.js +0 -73
  382. package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
  383. package/dist/admin/chunks/pl-DWhGDzmM.js +0 -200
  384. package/dist/admin/chunks/pl-DWhGDzmM.js.map +0 -1
  385. package/dist/admin/chunks/pl-MFCZJZuZ.js +0 -195
  386. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
  387. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +0 -202
  388. package/dist/admin/chunks/pt-BR-CPtAXD-4.js.map +0 -1
  389. package/dist/admin/chunks/pt-BR-CcotyBGJ.js +0 -197
  390. package/dist/admin/chunks/pt-BoPxN80n.js +0 -96
  391. package/dist/admin/chunks/pt-BoPxN80n.js.map +0 -1
  392. package/dist/admin/chunks/pt-HbmgeiYO.js +0 -93
  393. package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
  394. package/dist/admin/chunks/relations-CmoFVrKj.js +0 -178
  395. package/dist/admin/chunks/relations-CmoFVrKj.js.map +0 -1
  396. package/dist/admin/chunks/relations-DYQAaXwZ.js +0 -173
  397. package/dist/admin/chunks/relations-DYQAaXwZ.js.map +0 -1
  398. package/dist/admin/chunks/ru-C0op0ALG.js +0 -232
  399. package/dist/admin/chunks/ru-C0op0ALG.js.map +0 -1
  400. package/dist/admin/chunks/ru-CB4BUyQp.js +0 -230
  401. package/dist/admin/chunks/sa-B_FuPyMw.js +0 -201
  402. package/dist/admin/chunks/sa-B_FuPyMw.js.map +0 -1
  403. package/dist/admin/chunks/sa-n_aPA-pU.js +0 -196
  404. package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
  405. package/dist/admin/chunks/sk-D_iXML2C.js +0 -203
  406. package/dist/admin/chunks/sk-D_iXML2C.js.map +0 -1
  407. package/dist/admin/chunks/sk-tn_BDjE2.js +0 -198
  408. package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
  409. package/dist/admin/chunks/sv-BstBC1Yp.js +0 -203
  410. package/dist/admin/chunks/sv-BstBC1Yp.js.map +0 -1
  411. package/dist/admin/chunks/sv-cq4ZrQRd.js +0 -198
  412. package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
  413. package/dist/admin/chunks/th-lXoOCqPC.js +0 -149
  414. package/dist/admin/chunks/th-lXoOCqPC.js.map +0 -1
  415. package/dist/admin/chunks/th-mUH7hEtc.js +0 -144
  416. package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
  417. package/dist/admin/chunks/tr-CkS6sLIE.js +0 -200
  418. package/dist/admin/chunks/tr-CkS6sLIE.js.map +0 -1
  419. package/dist/admin/chunks/tr-Yt38daxh.js +0 -195
  420. package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
  421. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  422. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  423. package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
  424. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
  425. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js +0 -247
  426. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
  427. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js +0 -271
  428. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
  429. package/dist/admin/chunks/usePrev-Bjw2dhmq.js +0 -18
  430. package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
  431. package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
  432. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
  433. package/dist/admin/chunks/vi-BGr1X_HZ.js +0 -112
  434. package/dist/admin/chunks/vi-BGr1X_HZ.js.map +0 -1
  435. package/dist/admin/chunks/vi-CvBGlTjr.js +0 -108
  436. package/dist/admin/chunks/zh-BmF-sHaT.js +0 -205
  437. package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
  438. package/dist/admin/chunks/zh-DwFu_Kfj.js +0 -210
  439. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +0 -1
  440. package/dist/admin/chunks/zh-Hans-CI0HKio3.js +0 -934
  441. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +0 -953
@@ -1,288 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var strapiAdmin = require('@strapi/admin/strapi-admin');
6
- var designSystem = require('@strapi/design-system');
7
- var reactIntl = require('react-intl');
8
- var reactRouterDom = require('react-router-dom');
9
- var styledComponents = require('styled-components');
10
- var index = require('./index-ZIwOPk6p.js');
11
- var Input = require('./Input-DiR2Xfa7.js');
12
- require('@strapi/icons');
13
- require('lodash/fp/mapValues');
14
- require('yup');
15
- require('fractional-indexing');
16
- require('lodash/fp/pipe');
17
- require('qs');
18
- require('date-fns');
19
- require('@reduxjs/toolkit');
20
- require('slate');
21
- require('slate-history');
22
- require('slate-react');
23
- require('prismjs');
24
- require('prismjs/themes/prism-solarizedlight.css');
25
- require('./usePrev-DIYl-IAL.js');
26
- require('./useDragAndDrop-gcqEJMnO.js');
27
- require('react-dnd');
28
- require('@radix-ui/react-toolbar');
29
- require('react-dnd-html5-backend');
30
- require('./objects-C3EebVVe.js');
31
- require('lodash/clone');
32
- require('lodash/toPath');
33
- require('./Relations-mxOUS7TJ.js');
34
- require('react-window');
35
- require('./relations-CmoFVrKj.js');
36
- require('./ComponentIcon-C-EjOUPA.js');
37
- require('@strapi/icons/symbols');
38
- require('codemirror5');
39
- require('sanitize-html');
40
- require('highlight.js');
41
- require('markdown-it');
42
- require('markdown-it-abbr');
43
- require('markdown-it-container');
44
- require('markdown-it-deflist');
45
- require('markdown-it-emoji');
46
- require('markdown-it-footnote');
47
- require('markdown-it-ins');
48
- require('markdown-it-mark');
49
- require('markdown-it-sub');
50
- require('markdown-it-sup');
51
- require('highlight.js/styles/solarized-dark.css');
52
- require('codemirror5/addon/display/placeholder');
53
-
54
- function _interopNamespaceDefault(e) {
55
- var n = Object.create(null);
56
- if (e) {
57
- Object.keys(e).forEach(function (k) {
58
- if (k !== 'default') {
59
- var d = Object.getOwnPropertyDescriptor(e, k);
60
- Object.defineProperty(n, k, d.get ? d : {
61
- enumerable: true,
62
- get: function () { return e[k]; }
63
- });
64
- }
65
- });
66
- }
67
- n.default = e;
68
- return Object.freeze(n);
69
- }
70
-
71
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
72
-
73
- const useOnce = (effect)=>React__namespace.useEffect(effect, emptyDeps);
74
- const emptyDeps = [];
75
-
76
- /* -------------------------------------------------------------------------------------------------
77
- * EditViewPage
78
- * -----------------------------------------------------------------------------------------------*/ const EditViewPage = ()=>{
79
- const location = reactRouterDom.useLocation();
80
- const [{ query: { status } }, setQuery] = strapiAdmin.useQueryParams({
81
- status: 'draft'
82
- });
83
- const { formatMessage } = reactIntl.useIntl();
84
- const { toggleNotification } = strapiAdmin.useNotification();
85
- const { document, meta, isLoading: isLoadingDocument, schema, components, collectionType, id, model, hasError, getTitle, getInitialFormValues } = index.useDoc();
86
- const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
87
- useOnce(()=>{
88
- /**
89
- * We only ever want to fire the notification once otherwise
90
- * whenever the app re-renders it'll pop up regardless of
91
- * what we do because the state comes from react-router-dom
92
- */ if (location?.state && 'error' in location.state) {
93
- toggleNotification({
94
- type: 'danger',
95
- message: location.state.error,
96
- timeout: 5000
97
- });
98
- }
99
- });
100
- const isLoadingActionsRBAC = index.useDocumentRBAC('EditViewPage', (state)=>state.isLoading);
101
- const isSingleType = collectionType === index.SINGLE_TYPES;
102
- /**
103
- * single-types don't current have an id, but because they're a singleton
104
- * we can simply use the update operation to continuously update the same
105
- * document with varying params.
106
- */ const isCreatingDocument = !id && !isSingleType;
107
- const { isLoading: isLoadingLayout, edit: { layout, settings: { mainField } } } = index.useDocumentLayout(model);
108
- const { isLazyLoading } = Input.useLazyComponents([]);
109
- const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;
110
- const initialValues = getInitialFormValues(isCreatingDocument);
111
- if (hasError) {
112
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
113
- }
114
- if (isLoading && !document?.documentId) {
115
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
116
- }
117
- if (!initialValues) {
118
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
119
- }
120
- const handleTabChange = (status)=>{
121
- if (status === 'published' || status === 'draft') {
122
- setQuery({
123
- status
124
- }, 'push', true);
125
- }
126
- };
127
- const validateSync = (values, options)=>{
128
- const yupSchema = index.createYupSchema(schema?.attributes, components, {
129
- status,
130
- ...options
131
- });
132
- return yupSchema.validateSync(values, {
133
- abortEarly: false
134
- });
135
- };
136
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Main, {
137
- paddingLeft: 10,
138
- paddingRight: 10,
139
- children: [
140
- /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Title, {
141
- children: getTitle(mainField)
142
- }),
143
- /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Form, {
144
- disabled: hasDraftAndPublished && status === 'published',
145
- initialValues: initialValues,
146
- method: isCreatingDocument ? 'POST' : 'PUT',
147
- validate: (values, options)=>{
148
- const yupSchema = index.createYupSchema(schema?.attributes, components, {
149
- status,
150
- ...options
151
- });
152
- return yupSchema.validate(values, {
153
- abortEarly: false
154
- });
155
- },
156
- initialErrors: location?.state?.forceValidation ? validateSync(initialValues, {}) : {},
157
- children: ({ resetForm })=>/*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
158
- children: [
159
- /*#__PURE__*/ jsxRuntime.jsx(index.Header, {
160
- isCreating: isCreatingDocument,
161
- status: hasDraftAndPublished ? getDocumentStatus(document, meta) : undefined,
162
- title: getTitle(mainField)
163
- }),
164
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tabs.Root, {
165
- variant: "simple",
166
- value: status,
167
- onValueChange: handleTabChange,
168
- children: [
169
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.List, {
170
- "aria-label": formatMessage({
171
- id: index.getTranslation('containers.edit.tabs.label'),
172
- defaultMessage: 'Document status'
173
- }),
174
- children: hasDraftAndPublished ? /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
175
- children: [
176
- /*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
177
- value: "draft",
178
- children: formatMessage({
179
- id: index.getTranslation('containers.edit.tabs.draft'),
180
- defaultMessage: 'draft'
181
- })
182
- }),
183
- /*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
184
- disabled: !meta || meta.availableStatus.length === 0,
185
- value: "published",
186
- children: formatMessage({
187
- id: index.getTranslation('containers.edit.tabs.published'),
188
- defaultMessage: 'published'
189
- })
190
- })
191
- ]
192
- }) : null
193
- }),
194
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Root, {
195
- paddingTop: 8,
196
- gap: 4,
197
- children: [
198
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Item, {
199
- col: 9,
200
- s: 12,
201
- direction: "column",
202
- alignItems: "stretch",
203
- children: [
204
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
205
- value: "draft",
206
- children: /*#__PURE__*/ jsxRuntime.jsx(Input.FormLayout, {
207
- layout: layout
208
- })
209
- }),
210
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Content, {
211
- value: "published",
212
- children: /*#__PURE__*/ jsxRuntime.jsx(Input.FormLayout, {
213
- layout: layout
214
- })
215
- })
216
- ]
217
- }),
218
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
219
- col: 3,
220
- s: 12,
221
- direction: "column",
222
- alignItems: "stretch",
223
- children: /*#__PURE__*/ jsxRuntime.jsx(index.Panels, {})
224
- })
225
- ]
226
- })
227
- ]
228
- }),
229
- /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Blocker, {
230
- // We reset the form to the published version to avoid errors like – https://strapi-inc.atlassian.net/browse/CONTENT-2284
231
- onProceed: resetForm
232
- })
233
- ]
234
- })
235
- })
236
- ]
237
- });
238
- };
239
- const StatusTab = styledComponents.styled(designSystem.Tabs.Trigger)`
240
- text-transform: uppercase;
241
- `;
242
- /**
243
- * @internal
244
- * @description Returns the status of the document where its latest state takes priority,
245
- * this typically will be "published" unless a user has edited their draft in which we should
246
- * display "modified".
247
- */ const getDocumentStatus = (document, meta)=>{
248
- const docStatus = document?.status;
249
- const statuses = meta?.availableStatus ?? [];
250
- /**
251
- * Creating an entry
252
- */ if (!docStatus) {
253
- return 'draft';
254
- }
255
- /**
256
- * We're viewing a draft, but the document could have a published version
257
- */ if (docStatus === 'draft' && statuses.find((doc)=>doc.publishedAt !== null)) {
258
- return 'published';
259
- }
260
- return docStatus;
261
- };
262
- /* -------------------------------------------------------------------------------------------------
263
- * ProtectedEditViewPage
264
- * -----------------------------------------------------------------------------------------------*/ const ProtectedEditViewPage = ()=>{
265
- const { slug = '' } = reactRouterDom.useParams();
266
- const { permissions = [], isLoading, error } = strapiAdmin.useRBAC(index.PERMISSIONS.map((action)=>({
267
- action,
268
- subject: slug
269
- })));
270
- if (isLoading) {
271
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
272
- }
273
- if (error || !slug) {
274
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
275
- }
276
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Protect, {
277
- permissions: permissions,
278
- children: ({ permissions })=>/*#__PURE__*/ jsxRuntime.jsx(index.DocumentRBAC, {
279
- permissions: permissions,
280
- children: /*#__PURE__*/ jsxRuntime.jsx(EditViewPage, {})
281
- })
282
- });
283
- };
284
-
285
- exports.EditViewPage = EditViewPage;
286
- exports.ProtectedEditViewPage = ProtectedEditViewPage;
287
- exports.getDocumentStatus = getDocumentStatus;
288
- //# sourceMappingURL=EditViewPage-zSnDwLz3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditViewPage-zSnDwLz3.js","sources":["../../../admin/src/hooks/useOnce.ts","../../../admin/src/pages/EditView/EditViewPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport * as React from 'react';\n\nexport const useOnce = (effect: React.EffectCallback) => React.useEffect(effect, emptyDeps);\n\nconst emptyDeps: React.DependencyList = [];\n","import * as React from 'react';\n\nimport {\n Page,\n Blocker,\n Form,\n useRBAC,\n useNotification,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { Grid, Main, Tabs } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { useLocation, useParams } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { SINGLE_TYPES } from '../../constants/collections';\nimport { PERMISSIONS } from '../../constants/plugin';\nimport { DocumentRBAC, useDocumentRBAC } from '../../features/DocumentRBAC';\nimport { type UseDocument, useDoc } from '../../hooks/useDocument';\nimport { useDocumentLayout } from '../../hooks/useDocumentLayout';\nimport { useLazyComponents } from '../../hooks/useLazyComponents';\nimport { useOnce } from '../../hooks/useOnce';\nimport { getTranslation } from '../../utils/translations';\nimport { createYupSchema } from '../../utils/validation';\n\nimport { FormLayout } from './components/FormLayout';\nimport { Header } from './components/Header';\nimport { Panels } from './components/Panels';\nimport { transformDocument } from './utils/data';\nimport { createDefaultForm } from './utils/forms';\n\n/* -------------------------------------------------------------------------------------------------\n * EditViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst EditViewPage = () => {\n const location = useLocation();\n const [\n {\n query: { status },\n },\n setQuery,\n ] = useQueryParams<{ status: 'draft' | 'published' }>({\n status: 'draft',\n });\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n\n const {\n document,\n meta,\n isLoading: isLoadingDocument,\n schema,\n components,\n collectionType,\n id,\n model,\n hasError,\n getTitle,\n getInitialFormValues,\n } = useDoc();\n\n const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;\n\n useOnce(() => {\n /**\n * We only ever want to fire the notification once otherwise\n * whenever the app re-renders it'll pop up regardless of\n * what we do because the state comes from react-router-dom\n */\n if (location?.state && 'error' in location.state) {\n toggleNotification({\n type: 'danger',\n message: location.state.error,\n timeout: 5000,\n });\n }\n });\n\n const isLoadingActionsRBAC = useDocumentRBAC('EditViewPage', (state) => state.isLoading);\n\n const isSingleType = collectionType === SINGLE_TYPES;\n\n /**\n * single-types don't current have an id, but because they're a singleton\n * we can simply use the update operation to continuously update the same\n * document with varying params.\n */\n const isCreatingDocument = !id && !isSingleType;\n\n const {\n isLoading: isLoadingLayout,\n edit: {\n layout,\n settings: { mainField },\n },\n } = useDocumentLayout(model);\n\n const { isLazyLoading } = useLazyComponents([]);\n\n const isLoading = isLoadingActionsRBAC || isLoadingDocument || isLoadingLayout || isLazyLoading;\n\n const initialValues = getInitialFormValues(isCreatingDocument);\n\n if (hasError) {\n return <Page.Error />;\n }\n\n if (isLoading && !document?.documentId) {\n return <Page.Loading />;\n }\n\n if (!initialValues) {\n return <Page.Error />;\n }\n\n const handleTabChange = (status: string) => {\n if (status === 'published' || status === 'draft') {\n setQuery({ status }, 'push', true);\n }\n };\n\n const validateSync = (values: Record<string, unknown>, options: Record<string, string>) => {\n const yupSchema = createYupSchema(schema?.attributes, components, {\n status,\n ...options,\n });\n\n return yupSchema.validateSync(values, { abortEarly: false });\n };\n\n return (\n <Main paddingLeft={10} paddingRight={10}>\n <Page.Title>{getTitle(mainField)}</Page.Title>\n <Form\n disabled={hasDraftAndPublished && status === 'published'}\n initialValues={initialValues}\n method={isCreatingDocument ? 'POST' : 'PUT'}\n validate={(values: Record<string, unknown>, options: Record<string, string>) => {\n const yupSchema = createYupSchema(schema?.attributes, components, {\n status,\n ...options,\n });\n\n return yupSchema.validate(values, { abortEarly: false });\n }}\n initialErrors={location?.state?.forceValidation ? validateSync(initialValues, {}) : {}}\n >\n {({ resetForm }) => (\n <>\n <Header\n isCreating={isCreatingDocument}\n status={hasDraftAndPublished ? getDocumentStatus(document, meta) : undefined}\n title={getTitle(mainField)}\n />\n <Tabs.Root variant=\"simple\" value={status} onValueChange={handleTabChange}>\n <Tabs.List\n aria-label={formatMessage({\n id: getTranslation('containers.edit.tabs.label'),\n defaultMessage: 'Document status',\n })}\n >\n {hasDraftAndPublished ? (\n <>\n <StatusTab value=\"draft\">\n {formatMessage({\n id: getTranslation('containers.edit.tabs.draft'),\n defaultMessage: 'draft',\n })}\n </StatusTab>\n <StatusTab\n disabled={!meta || meta.availableStatus.length === 0}\n value=\"published\"\n >\n {formatMessage({\n id: getTranslation('containers.edit.tabs.published'),\n defaultMessage: 'published',\n })}\n </StatusTab>\n </>\n ) : null}\n </Tabs.List>\n <Grid.Root paddingTop={8} gap={4}>\n <Grid.Item col={9} s={12} direction=\"column\" alignItems=\"stretch\">\n <Tabs.Content value=\"draft\">\n <FormLayout layout={layout} />\n </Tabs.Content>\n <Tabs.Content value=\"published\">\n <FormLayout layout={layout} />\n </Tabs.Content>\n </Grid.Item>\n <Grid.Item col={3} s={12} direction=\"column\" alignItems=\"stretch\">\n <Panels />\n </Grid.Item>\n </Grid.Root>\n </Tabs.Root>\n <Blocker\n // We reset the form to the published version to avoid errors like – https://strapi-inc.atlassian.net/browse/CONTENT-2284\n onProceed={resetForm}\n />\n </>\n )}\n </Form>\n </Main>\n );\n};\n\nconst StatusTab = styled(Tabs.Trigger)`\n text-transform: uppercase;\n`;\n\n/**\n * @internal\n * @description Returns the status of the document where its latest state takes priority,\n * this typically will be \"published\" unless a user has edited their draft in which we should\n * display \"modified\".\n */\nconst getDocumentStatus = (\n document: ReturnType<UseDocument>['document'],\n meta: ReturnType<UseDocument>['meta']\n): 'draft' | 'published' | 'modified' => {\n const docStatus = document?.status;\n const statuses = meta?.availableStatus ?? [];\n\n /**\n * Creating an entry\n */\n if (!docStatus) {\n return 'draft';\n }\n\n /**\n * We're viewing a draft, but the document could have a published version\n */\n if (docStatus === 'draft' && statuses.find((doc) => doc.publishedAt !== null)) {\n return 'published';\n }\n\n return docStatus;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProtectedEditViewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedEditViewPage = () => {\n const { slug = '' } = useParams<{\n slug: string;\n }>();\n const {\n permissions = [],\n isLoading,\n error,\n } = useRBAC(\n PERMISSIONS.map((action) => ({\n action,\n subject: slug,\n }))\n );\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !slug) {\n return <Page.Error />;\n }\n\n return (\n <Page.Protect permissions={permissions}>\n {({ permissions }) => (\n <DocumentRBAC permissions={permissions}>\n <EditViewPage />\n </DocumentRBAC>\n )}\n </Page.Protect>\n );\n};\n\nexport { EditViewPage, ProtectedEditViewPage, getDocumentStatus };\n"],"names":["useOnce","effect","React","useEffect","emptyDeps","EditViewPage","location","useLocation","query","status","setQuery","useQueryParams","formatMessage","useIntl","toggleNotification","useNotification","document","meta","isLoading","isLoadingDocument","schema","components","collectionType","id","model","hasError","getTitle","getInitialFormValues","useDoc","hasDraftAndPublished","options","draftAndPublish","state","type","message","error","timeout","isLoadingActionsRBAC","useDocumentRBAC","isSingleType","SINGLE_TYPES","isCreatingDocument","isLoadingLayout","edit","layout","settings","mainField","useDocumentLayout","isLazyLoading","useLazyComponents","initialValues","_jsx","Page","Error","documentId","Loading","handleTabChange","validateSync","values","yupSchema","createYupSchema","attributes","abortEarly","_jsxs","Main","paddingLeft","paddingRight","Title","Form","disabled","method","validate","initialErrors","forceValidation","resetForm","_Fragment","Header","isCreating","getDocumentStatus","undefined","title","Tabs","Root","variant","value","onValueChange","List","aria-label","getTranslation","defaultMessage","StatusTab","availableStatus","length","Grid","paddingTop","gap","Item","col","s","direction","alignItems","Content","FormLayout","Panels","Blocker","onProceed","styled","Trigger","docStatus","statuses","find","doc","publishedAt","ProtectedEditViewPage","slug","useParams","permissions","useRBAC","PERMISSIONS","map","action","subject","Protect","DocumentRBAC"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAMA,UAAU,CAACC,MAAAA,GAAiCC,iBAAMC,SAAS,CAACF,QAAQG,SAAW,CAAA;AAE5F,MAAMA,YAAkC,EAAE;;AC0B1C;;AAEkG,2GAE5FC,YAAe,GAAA,IAAA;AACnB,IAAA,MAAMC,QAAWC,GAAAA,0BAAAA,EAAAA;IACjB,MAAM,CACJ,EACEC,KAAAA,EAAO,EAAEC,MAAM,EAAE,EAClB,EACDC,QACD,CAAA,GAAGC,0BAAkD,CAAA;QACpDF,MAAQ,EAAA;AACV,KA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A,QAAA,EAAA,CAAC,EAAEA,WAAW,EAAE,iBACfjE,cAACwE,CAAAA,kBAAAA,EAAAA;gBAAaP,WAAaA,EAAAA,WAAAA;AACzB,gBAAA,QAAA,gBAAAjE,cAAC9C,CAAAA,YAAAA,EAAAA,EAAAA;;;AAKX;;;;;;"}
@@ -1,56 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import 'react';
3
- import { useStrapiApp } from '@strapi/admin/strapi-admin';
4
- import { Box } from '@strapi/design-system';
5
- import { NumberField, BooleanField, DateField, EmailField, EnumerationField, MediaField, PasswordField, RelationField, TextField, JsonField, UidField, ComponentField, DynamicZoneField, BlocksField } from '@strapi/icons/symbols';
6
-
7
- const iconByTypes = {
8
- biginteger: /*#__PURE__*/ jsx(NumberField, {}),
9
- boolean: /*#__PURE__*/ jsx(BooleanField, {}),
10
- date: /*#__PURE__*/ jsx(DateField, {}),
11
- datetime: /*#__PURE__*/ jsx(DateField, {}),
12
- decimal: /*#__PURE__*/ jsx(NumberField, {}),
13
- email: /*#__PURE__*/ jsx(EmailField, {}),
14
- enumeration: /*#__PURE__*/ jsx(EnumerationField, {}),
15
- float: /*#__PURE__*/ jsx(NumberField, {}),
16
- integer: /*#__PURE__*/ jsx(NumberField, {}),
17
- media: /*#__PURE__*/ jsx(MediaField, {}),
18
- password: /*#__PURE__*/ jsx(PasswordField, {}),
19
- relation: /*#__PURE__*/ jsx(RelationField, {}),
20
- string: /*#__PURE__*/ jsx(TextField, {}),
21
- text: /*#__PURE__*/ jsx(TextField, {}),
22
- richtext: /*#__PURE__*/ jsx(TextField, {}),
23
- time: /*#__PURE__*/ jsx(DateField, {}),
24
- timestamp: /*#__PURE__*/ jsx(DateField, {}),
25
- json: /*#__PURE__*/ jsx(JsonField, {}),
26
- uid: /*#__PURE__*/ jsx(UidField, {}),
27
- component: /*#__PURE__*/ jsx(ComponentField, {}),
28
- dynamiczone: /*#__PURE__*/ jsx(DynamicZoneField, {}),
29
- blocks: /*#__PURE__*/ jsx(BlocksField, {})
30
- };
31
- const FieldTypeIcon = ({ type, customFieldUid })=>{
32
- const getCustomField = useStrapiApp('FieldTypeIcon', (state)=>state.customFields.get);
33
- if (!type) {
34
- return null;
35
- }
36
- let Compo = iconByTypes[type];
37
- if (customFieldUid) {
38
- const customField = getCustomField(customFieldUid);
39
- const CustomFieldIcon = customField?.icon;
40
- if (CustomFieldIcon) {
41
- Compo = /*#__PURE__*/ jsx(Box, {
42
- marginRight: 3,
43
- width: 7,
44
- height: 6,
45
- children: /*#__PURE__*/ jsx(CustomFieldIcon, {})
46
- });
47
- }
48
- }
49
- if (!iconByTypes[type]) {
50
- return null;
51
- }
52
- return Compo;
53
- };
54
-
55
- export { FieldTypeIcon as F };
56
- //# sourceMappingURL=FieldTypeIcon-BY6MrVF4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldTypeIcon-BY6MrVF4.js","sources":["../../../admin/src/components/FieldTypeIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useStrapiApp } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport {\n BlocksField,\n BooleanField,\n ComponentField,\n DateField,\n DynamicZoneField,\n EmailField,\n EnumerationField,\n JsonField,\n MediaField,\n NumberField,\n PasswordField,\n RelationField,\n TextField,\n UidField,\n} from '@strapi/icons/symbols';\n\nimport type { Schema } from '@strapi/types';\n\nconst iconByTypes: Record<Schema.Attribute.Kind, React.ReactElement> = {\n biginteger: <NumberField />,\n boolean: <BooleanField />,\n date: <DateField />,\n datetime: <DateField />,\n decimal: <NumberField />,\n email: <EmailField />,\n enumeration: <EnumerationField />,\n float: <NumberField />,\n integer: <NumberField />,\n media: <MediaField />,\n password: <PasswordField />,\n relation: <RelationField />,\n string: <TextField />,\n text: <TextField />,\n richtext: <TextField />,\n time: <DateField />,\n timestamp: <DateField />,\n json: <JsonField />,\n uid: <UidField />,\n component: <ComponentField />,\n dynamiczone: <DynamicZoneField />,\n blocks: <BlocksField />,\n};\n\ninterface FieldTypeIconProps {\n type?: keyof typeof iconByTypes;\n customFieldUid?: string;\n}\n\nconst FieldTypeIcon = ({ type, customFieldUid }: FieldTypeIconProps) => {\n const getCustomField = useStrapiApp('FieldTypeIcon', (state) => state.customFields.get);\n\n if (!type) {\n return null;\n }\n\n let Compo = iconByTypes[type];\n\n if (customFieldUid) {\n const customField = getCustomField(customFieldUid);\n const CustomFieldIcon = customField?.icon;\n\n if (CustomFieldIcon) {\n Compo = (\n <Box marginRight={3} width={7} height={6}>\n <CustomFieldIcon />\n </Box>\n );\n }\n }\n\n if (!iconByTypes[type]) {\n return null;\n }\n\n return Compo;\n};\n\nexport { FieldTypeIcon };\n"],"names":["iconByTypes","biginteger","_jsx","NumberField","boolean","BooleanField","date","DateField","datetime","decimal","email","EmailField","enumeration","EnumerationField","float","integer","media","MediaField","password","PasswordField","relation","RelationField","string","TextField","text","richtext","time","timestamp","json","JsonField","uid","UidField","component","ComponentField","dynamiczone","DynamicZoneField","blocks","BlocksField","FieldTypeIcon","type","customFieldUid","getCustomField","useStrapiApp","state","customFields","get","Compo","customField","CustomFieldIcon","icon","Box","marginRight","width","height"],"mappings":";;;;;;AAuBA,MAAMA,WAAiE,GAAA;AACrEC,IAAAA,UAAAA,gBAAYC,GAACC,CAAAA,WAAAA,EAAAA,EAAAA,CAAAA;AACbC,IAAAA,OAAAA,gBAASF,GAACG,CAAAA,YAAAA,EAAAA,EAAAA,CAAAA;AACVC,IAAAA,IAAAA,gBAAMJ,GAACK,CAAAA,SAAAA,EAAAA,EAAAA,CAAAA;AACPC,IAAAA,QAAAA,gBAAUN,GAACK,CAAAA,SAAAA,EAAAA,EAAAA,CAAAA;AACXE,IAAAA,OAAAA,gBAASP,GAACC,CAAAA,WAAAA,EAAAA,EAAAA,CAAAA;AACVO,IAAAA,KAAAA,gBAAOR,GAACS,CAAAA,UAAAA,EAAAA,EAAAA,CAAAA;AACRC,IAAAA,WAAAA,gBAAaV,GAACW,CAAAA,gBAAAA,EAAAA,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AACC,QAAUA,KAAMC,CAAAA,YAAY,CAACC,GAAG,CAAA;AAEtF,IAAA,IAAI,CAACN,IAAM,EAAA;QACT,OAAO,IAAA;AACT;IAEA,IAAIO,KAAAA,GAAQ9C,WAAW,CAACuC,IAAK,CAAA;AAE7B,IAAA,IAAIC,cAAgB,EAAA;AAClB,QAAA,MAAMO,cAAcN,cAAeD,CAAAA,cAAAA,CAAAA;AACnC,QAAA,MAAMQ,kBAAkBD,WAAaE,EAAAA,IAAAA;AAErC,QAAA,IAAID,eAAiB,EAAA;AACnBF,YAAAA,KAAAA,iBACE5C,GAACgD,CAAAA,GAAAA,EAAAA;gBAAIC,WAAa,EAAA,CAAA;gBAAGC,KAAO,EAAA,CAAA;gBAAGC,MAAQ,EAAA,CAAA;AACrC,gBAAA,QAAA,gBAAAnD,GAAC8C,CAAAA,eAAAA,EAAAA,EAAAA;;AAGP;AACF;AAEA,IAAA,IAAI,CAAChD,WAAW,CAACuC,IAAAA,CAAK,EAAE;QACtB,OAAO,IAAA;AACT;IAEA,OAAOO,KAAAA;AACT;;;;"}
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- require('react');
5
- var strapiAdmin = require('@strapi/admin/strapi-admin');
6
- var designSystem = require('@strapi/design-system');
7
- var Symbols = require('@strapi/icons/symbols');
8
-
9
- const iconByTypes = {
10
- biginteger: /*#__PURE__*/ jsxRuntime.jsx(Symbols.NumberField, {}),
11
- boolean: /*#__PURE__*/ jsxRuntime.jsx(Symbols.BooleanField, {}),
12
- date: /*#__PURE__*/ jsxRuntime.jsx(Symbols.DateField, {}),
13
- datetime: /*#__PURE__*/ jsxRuntime.jsx(Symbols.DateField, {}),
14
- decimal: /*#__PURE__*/ jsxRuntime.jsx(Symbols.NumberField, {}),
15
- email: /*#__PURE__*/ jsxRuntime.jsx(Symbols.EmailField, {}),
16
- enumeration: /*#__PURE__*/ jsxRuntime.jsx(Symbols.EnumerationField, {}),
17
- float: /*#__PURE__*/ jsxRuntime.jsx(Symbols.NumberField, {}),
18
- integer: /*#__PURE__*/ jsxRuntime.jsx(Symbols.NumberField, {}),
19
- media: /*#__PURE__*/ jsxRuntime.jsx(Symbols.MediaField, {}),
20
- password: /*#__PURE__*/ jsxRuntime.jsx(Symbols.PasswordField, {}),
21
- relation: /*#__PURE__*/ jsxRuntime.jsx(Symbols.RelationField, {}),
22
- string: /*#__PURE__*/ jsxRuntime.jsx(Symbols.TextField, {}),
23
- text: /*#__PURE__*/ jsxRuntime.jsx(Symbols.TextField, {}),
24
- richtext: /*#__PURE__*/ jsxRuntime.jsx(Symbols.TextField, {}),
25
- time: /*#__PURE__*/ jsxRuntime.jsx(Symbols.DateField, {}),
26
- timestamp: /*#__PURE__*/ jsxRuntime.jsx(Symbols.DateField, {}),
27
- json: /*#__PURE__*/ jsxRuntime.jsx(Symbols.JsonField, {}),
28
- uid: /*#__PURE__*/ jsxRuntime.jsx(Symbols.UidField, {}),
29
- component: /*#__PURE__*/ jsxRuntime.jsx(Symbols.ComponentField, {}),
30
- dynamiczone: /*#__PURE__*/ jsxRuntime.jsx(Symbols.DynamicZoneField, {}),
31
- blocks: /*#__PURE__*/ jsxRuntime.jsx(Symbols.BlocksField, {})
32
- };
33
- const FieldTypeIcon = ({ type, customFieldUid })=>{
34
- const getCustomField = strapiAdmin.useStrapiApp('FieldTypeIcon', (state)=>state.customFields.get);
35
- if (!type) {
36
- return null;
37
- }
38
- let Compo = iconByTypes[type];
39
- if (customFieldUid) {
40
- const customField = getCustomField(customFieldUid);
41
- const CustomFieldIcon = customField?.icon;
42
- if (CustomFieldIcon) {
43
- Compo = /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
44
- marginRight: 3,
45
- width: 7,
46
- height: 6,
47
- children: /*#__PURE__*/ jsxRuntime.jsx(CustomFieldIcon, {})
48
- });
49
- }
50
- }
51
- if (!iconByTypes[type]) {
52
- return null;
53
- }
54
- return Compo;
55
- };
56
-
57
- exports.FieldTypeIcon = FieldTypeIcon;
58
- //# sourceMappingURL=FieldTypeIcon-Bxh-7Jin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldTypeIcon-Bxh-7Jin.js","sources":["../../../admin/src/components/FieldTypeIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useStrapiApp } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport {\n BlocksField,\n BooleanField,\n ComponentField,\n DateField,\n DynamicZoneField,\n EmailField,\n EnumerationField,\n JsonField,\n MediaField,\n NumberField,\n PasswordField,\n RelationField,\n TextField,\n UidField,\n} from '@strapi/icons/symbols';\n\nimport type { Schema } from '@strapi/types';\n\nconst iconByTypes: Record<Schema.Attribute.Kind, React.ReactElement> = {\n biginteger: <NumberField />,\n boolean: <BooleanField />,\n date: <DateField />,\n datetime: <DateField />,\n decimal: <NumberField />,\n email: <EmailField />,\n enumeration: <EnumerationField />,\n float: <NumberField />,\n integer: <NumberField />,\n media: <MediaField />,\n password: <PasswordField />,\n relation: <RelationField />,\n string: <TextField />,\n text: <TextField />,\n richtext: <TextField />,\n time: <DateField />,\n timestamp: <DateField />,\n json: <JsonField />,\n uid: <UidField />,\n component: <ComponentField />,\n dynamiczone: <DynamicZoneField />,\n blocks: <BlocksField />,\n};\n\ninterface FieldTypeIconProps {\n type?: keyof typeof iconByTypes;\n customFieldUid?: string;\n}\n\nconst FieldTypeIcon = ({ type, customFieldUid }: FieldTypeIconProps) => {\n const getCustomField = useStrapiApp('FieldTypeIcon', (state) => state.customFields.get);\n\n if (!type) {\n return null;\n }\n\n let Compo = iconByTypes[type];\n\n if (customFieldUid) {\n const customField = getCustomField(customFieldUid);\n const CustomFieldIcon = customField?.icon;\n\n if (CustomFieldIcon) {\n Compo = (\n <Box marginRight={3} width={7} height={6}>\n <CustomFieldIcon />\n </Box>\n );\n }\n }\n\n if (!iconByTypes[type]) {\n return null;\n }\n\n return Compo;\n};\n\nexport { FieldTypeIcon };\n"],"names":["iconByTypes","biginteger","_jsx","NumberField","boolean","BooleanField","date","DateField","datetime","decimal","email","EmailField","enumeration","EnumerationField","float","integer","media","MediaField","password","PasswordField","relation","RelationField","string","TextField","text","richtext","time","timestamp","json","JsonField","uid","UidField","component","ComponentField","dynamiczone","DynamicZoneField","blocks","BlocksField","FieldTypeIcon","type","customFieldUid","getCustomField","useStrapiApp","state","customFields","get","Compo","customField","CustomFieldIcon","icon","Box","marginRight","width","height"],"mappings":";;;;;;;;AAuBA,MAAMA,WAAiE,GAAA;AACrEC,IAAAA,UAAAA,gBAAYC,cAACC,CAAAA,mBAAAA,EAAAA,EAAAA,CAAAA;AACbC,IAAAA,OAAAA,gBAASF,cAACG,CAAAA,oBAAAA,EAAAA,EAAAA,CAAAA;AACVC,IAAAA,IAAAA,gBAAMJ,cAACK,CAAAA,iBAAAA,EAAAA,EAAAA,CAAAA;AACPC,IAAAA,QAAAA,gBAAUN,cAACK,CAAAA,iBAAAA,EAAAA,EAAAA,CAAAA;AACXE,IAAAA,OAAAA,gBAASP,cAACC,CAAAA,mBAAAA,EAAAA,EAAAA,CAAAA;AACVO,IAAAA,KAAAA,gBAAOR,cAACS,CAAAA,kBAAAA,EAAAA,EAAAA,CAAAA;AACRC,IAAAA,WAAAA,gBAAaV,cAACW,CAAAA,wBAAAA,EAAAA,EAAAA,CAAAA;AACdC,IAAAA,KAAAA,gBAAOZ,cAACC,CAAAA,mBAAAA,EAAAA,EAAAA,CAAAA;AACRY,IAAAA,OAAAA,gBAASb,cAACC,CAAAA,mBAAAA,EAAAA,EAAAA,CAAAA;AACVa,IAAAA,KAAAA,gBAAOd,cAACe,CAAAA,kBAAAA,EAAAA,EAAAA,CAAAA;AACRC,IAAAA,QAAAA,gBAAUhB,cAACiB,CAAAA,qBAAAA,EAAAA,EAAAA,CAAAA;AACXC,IAAAA,QAAAA,gBAAUlB,cAACmB,CAAAA,qBAAAA,EAAAA,EAAAA,CAAAA;AACXC,IAAAA,MAAAA,gBAAQpB,cAACqB,CAAAA,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