@payloadcms/next 3.0.0-canary.6659da8 → 3.0.0-canary.67aae47

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 (854) hide show
  1. package/dist/cjs/withPayload.cjs +33 -15
  2. package/dist/cjs/withPayload.cjs.map +1 -1
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +0 -1
  5. package/dist/config.js.map +1 -1
  6. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +16 -10
  7. package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -1
  8. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.d.ts.map +1 -1
  9. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +104 -34
  10. package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
  11. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts +4 -2
  12. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
  13. package/dist/elements/DocumentHeader/Tabs/Tab/index.js +75 -53
  14. package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
  15. package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +70 -66
  16. package/dist/elements/DocumentHeader/Tabs/getCustomViews.js +31 -35
  17. package/dist/elements/DocumentHeader/Tabs/getCustomViews.js.map +1 -1
  18. package/dist/elements/DocumentHeader/Tabs/getViewConfig.js +15 -12
  19. package/dist/elements/DocumentHeader/Tabs/getViewConfig.js.map +1 -1
  20. package/dist/elements/DocumentHeader/Tabs/index.d.ts +2 -2
  21. package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
  22. package/dist/elements/DocumentHeader/Tabs/index.js +90 -72
  23. package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
  24. package/dist/elements/DocumentHeader/Tabs/index.scss +41 -40
  25. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.d.ts.map +1 -1
  26. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +23 -17
  27. package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -1
  28. package/dist/elements/DocumentHeader/Tabs/tabs/index.d.ts +4 -2
  29. package/dist/elements/DocumentHeader/Tabs/tabs/index.d.ts.map +1 -1
  30. package/dist/elements/DocumentHeader/Tabs/tabs/index.js +60 -52
  31. package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -1
  32. package/dist/elements/DocumentHeader/index.d.ts +2 -3
  33. package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
  34. package/dist/elements/DocumentHeader/index.js +23 -25
  35. package/dist/elements/DocumentHeader/index.js.map +1 -1
  36. package/dist/elements/DocumentHeader/index.scss +44 -41
  37. package/dist/elements/FormHeader/index.d.ts +9 -0
  38. package/dist/elements/FormHeader/index.d.ts.map +1 -0
  39. package/dist/elements/FormHeader/index.js +20 -0
  40. package/dist/elements/FormHeader/index.js.map +1 -0
  41. package/dist/elements/FormHeader/index.scss +8 -0
  42. package/dist/elements/Logo/index.d.ts.map +1 -1
  43. package/dist/elements/Logo/index.js +36 -19
  44. package/dist/elements/Logo/index.js.map +1 -1
  45. package/dist/elements/Nav/NavHamburger/index.js +42 -14
  46. package/dist/elements/Nav/NavHamburger/index.js.map +1 -1
  47. package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -1
  48. package/dist/elements/Nav/NavWrapper/index.js +49 -15
  49. package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
  50. package/dist/elements/Nav/NavWrapper/index.scss +22 -12
  51. package/dist/elements/Nav/index.client.d.ts +4 -1
  52. package/dist/elements/Nav/index.client.d.ts.map +1 -1
  53. package/dist/elements/Nav/index.client.js +98 -70
  54. package/dist/elements/Nav/index.client.js.map +1 -1
  55. package/dist/elements/Nav/index.d.ts.map +1 -1
  56. package/dist/elements/Nav/index.js +96 -59
  57. package/dist/elements/Nav/index.js.map +1 -1
  58. package/dist/elements/Nav/index.scss +125 -113
  59. package/dist/exports/layouts.d.ts +2 -1
  60. package/dist/exports/layouts.d.ts.map +1 -1
  61. package/dist/exports/layouts.js +2 -2
  62. package/dist/exports/layouts.js.map +1 -1
  63. package/dist/exports/routes.d.ts +1 -1
  64. package/dist/exports/routes.d.ts.map +1 -1
  65. package/dist/exports/routes.js +1 -2
  66. package/dist/exports/routes.js.map +1 -1
  67. package/dist/exports/templates.js +0 -1
  68. package/dist/exports/templates.js.map +1 -1
  69. package/dist/exports/utilities.d.ts +1 -0
  70. package/dist/exports/utilities.d.ts.map +1 -1
  71. package/dist/exports/utilities.js +2 -1
  72. package/dist/exports/utilities.js.map +1 -1
  73. package/dist/exports/views.d.ts +1 -3
  74. package/dist/exports/views.d.ts.map +1 -1
  75. package/dist/exports/views.js +1 -4
  76. package/dist/exports/views.js.map +1 -1
  77. package/dist/fetchAPI-multipart/fileFactory.d.ts +2 -2
  78. package/dist/fetchAPI-multipart/fileFactory.d.ts.map +1 -1
  79. package/dist/fetchAPI-multipart/fileFactory.js +35 -34
  80. package/dist/fetchAPI-multipart/fileFactory.js.map +1 -1
  81. package/dist/fetchAPI-multipart/handlers.d.ts +1 -2
  82. package/dist/fetchAPI-multipart/handlers.d.ts.map +1 -1
  83. package/dist/fetchAPI-multipart/handlers.js +79 -78
  84. package/dist/fetchAPI-multipart/handlers.js.map +1 -1
  85. package/dist/fetchAPI-multipart/index.d.ts +1 -102
  86. package/dist/fetchAPI-multipart/index.d.ts.map +1 -1
  87. package/dist/fetchAPI-multipart/index.js +33 -31
  88. package/dist/fetchAPI-multipart/index.js.map +1 -1
  89. package/dist/fetchAPI-multipart/isEligibleRequest.js +13 -21
  90. package/dist/fetchAPI-multipart/isEligibleRequest.js.map +1 -1
  91. package/dist/fetchAPI-multipart/processMultipart.d.ts +2 -1
  92. package/dist/fetchAPI-multipart/processMultipart.d.ts.map +1 -1
  93. package/dist/fetchAPI-multipart/processMultipart.js +157 -141
  94. package/dist/fetchAPI-multipart/processMultipart.js.map +1 -1
  95. package/dist/fetchAPI-multipart/processNested.d.ts.map +1 -1
  96. package/dist/fetchAPI-multipart/processNested.js +26 -20
  97. package/dist/fetchAPI-multipart/processNested.js.map +1 -1
  98. package/dist/fetchAPI-multipart/uploadTimer.d.ts.map +1 -1
  99. package/dist/fetchAPI-multipart/uploadTimer.js +18 -17
  100. package/dist/fetchAPI-multipart/uploadTimer.js.map +1 -1
  101. package/dist/fetchAPI-multipart/utilities.d.ts +1 -1
  102. package/dist/fetchAPI-multipart/utilities.d.ts.map +1 -1
  103. package/dist/fetchAPI-multipart/utilities.js +185 -165
  104. package/dist/fetchAPI-multipart/utilities.js.map +1 -1
  105. package/dist/fetchAPI-stream-file/index.d.ts +0 -1
  106. package/dist/fetchAPI-stream-file/index.d.ts.map +1 -1
  107. package/dist/fetchAPI-stream-file/index.js +19 -17
  108. package/dist/fetchAPI-stream-file/index.js.map +1 -1
  109. package/dist/index.js +0 -1
  110. package/dist/index.js.map +1 -1
  111. package/dist/layouts/Root/NestProviders.d.ts +11 -0
  112. package/dist/layouts/Root/NestProviders.d.ts.map +1 -0
  113. package/dist/layouts/Root/NestProviders.js +21 -0
  114. package/dist/layouts/Root/NestProviders.js.map +1 -0
  115. package/dist/layouts/Root/index.d.ts +6 -4
  116. package/dist/layouts/Root/index.d.ts.map +1 -1
  117. package/dist/layouts/Root/index.js +152 -99
  118. package/dist/layouts/Root/index.js.map +1 -1
  119. package/dist/prod/styles.css +1 -1
  120. package/dist/routes/graphql/handler.d.ts.map +1 -1
  121. package/dist/routes/graphql/handler.js +121 -107
  122. package/dist/routes/graphql/handler.js.map +1 -1
  123. package/dist/routes/graphql/index.js +0 -1
  124. package/dist/routes/graphql/index.js.map +1 -1
  125. package/dist/routes/graphql/playground.d.ts.map +1 -1
  126. package/dist/routes/graphql/playground.js +23 -24
  127. package/dist/routes/graphql/playground.js.map +1 -1
  128. package/dist/routes/index.js +0 -1
  129. package/dist/routes/index.js.map +1 -1
  130. package/dist/routes/rest/auth/access.js +22 -21
  131. package/dist/routes/rest/auth/access.js.map +1 -1
  132. package/dist/routes/rest/auth/forgotPassword.d.ts.map +1 -1
  133. package/dist/routes/rest/auth/forgotPassword.js +29 -21
  134. package/dist/routes/rest/auth/forgotPassword.js.map +1 -1
  135. package/dist/routes/rest/auth/init.js +16 -14
  136. package/dist/routes/rest/auth/init.js.map +1 -1
  137. package/dist/routes/rest/auth/login.d.ts.map +1 -1
  138. package/dist/routes/rest/auth/login.js +43 -33
  139. package/dist/routes/rest/auth/login.js.map +1 -1
  140. package/dist/routes/rest/auth/logout.d.ts.map +1 -1
  141. package/dist/routes/rest/auth/logout.js +32 -27
  142. package/dist/routes/rest/auth/logout.js.map +1 -1
  143. package/dist/routes/rest/auth/me.js +23 -21
  144. package/dist/routes/rest/auth/me.js.map +1 -1
  145. package/dist/routes/rest/auth/refresh.d.ts.map +1 -1
  146. package/dist/routes/rest/auth/refresh.js +29 -33
  147. package/dist/routes/rest/auth/refresh.js.map +1 -1
  148. package/dist/routes/rest/auth/registerFirstUser.d.ts.map +1 -1
  149. package/dist/routes/rest/auth/registerFirstUser.js +43 -31
  150. package/dist/routes/rest/auth/registerFirstUser.js.map +1 -1
  151. package/dist/routes/rest/auth/resetPassword.js +38 -33
  152. package/dist/routes/rest/auth/resetPassword.js.map +1 -1
  153. package/dist/routes/rest/auth/unlock.d.ts.map +1 -1
  154. package/dist/routes/rest/auth/unlock.js +27 -19
  155. package/dist/routes/rest/auth/unlock.js.map +1 -1
  156. package/dist/routes/rest/auth/verifyEmail.js +22 -17
  157. package/dist/routes/rest/auth/verifyEmail.js.map +1 -1
  158. package/dist/routes/rest/checkEndpoints.d.ts.map +1 -1
  159. package/dist/routes/rest/checkEndpoints.js +11 -9
  160. package/dist/routes/rest/checkEndpoints.js.map +1 -1
  161. package/dist/routes/rest/collections/count.js +15 -11
  162. package/dist/routes/rest/collections/count.js.map +1 -1
  163. package/dist/routes/rest/collections/create.d.ts.map +1 -1
  164. package/dist/routes/rest/collections/create.js +34 -26
  165. package/dist/routes/rest/collections/create.js.map +1 -1
  166. package/dist/routes/rest/collections/delete.d.ts.map +1 -1
  167. package/dist/routes/rest/collections/delete.js +48 -35
  168. package/dist/routes/rest/collections/delete.js.map +1 -1
  169. package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -1
  170. package/dist/routes/rest/collections/deleteByID.js +42 -31
  171. package/dist/routes/rest/collections/deleteByID.js.map +1 -1
  172. package/dist/routes/rest/collections/docAccess.js +17 -14
  173. package/dist/routes/rest/collections/docAccess.js.map +1 -1
  174. package/dist/routes/rest/collections/duplicate.d.ts.map +1 -1
  175. package/dist/routes/rest/collections/duplicate.js +40 -31
  176. package/dist/routes/rest/collections/duplicate.js.map +1 -1
  177. package/dist/routes/rest/collections/find.d.ts.map +1 -1
  178. package/dist/routes/rest/collections/find.js +38 -20
  179. package/dist/routes/rest/collections/find.js.map +1 -1
  180. package/dist/routes/rest/collections/findByID.d.ts.map +1 -1
  181. package/dist/routes/rest/collections/findByID.js +34 -23
  182. package/dist/routes/rest/collections/findByID.js.map +1 -1
  183. package/dist/routes/rest/collections/findVersionByID.d.ts.map +1 -1
  184. package/dist/routes/rest/collections/findVersionByID.js +31 -22
  185. package/dist/routes/rest/collections/findVersionByID.js.map +1 -1
  186. package/dist/routes/rest/collections/findVersions.d.ts.map +1 -1
  187. package/dist/routes/rest/collections/findVersions.js +33 -19
  188. package/dist/routes/rest/collections/findVersions.js.map +1 -1
  189. package/dist/routes/rest/collections/preview.js +39 -34
  190. package/dist/routes/rest/collections/preview.js.map +1 -1
  191. package/dist/routes/rest/collections/restoreVersion.d.ts.map +1 -1
  192. package/dist/routes/rest/collections/restoreVersion.js +34 -25
  193. package/dist/routes/rest/collections/restoreVersion.js.map +1 -1
  194. package/dist/routes/rest/collections/update.d.ts.map +1 -1
  195. package/dist/routes/rest/collections/update.js +53 -37
  196. package/dist/routes/rest/collections/update.js.map +1 -1
  197. package/dist/routes/rest/collections/updateByID.d.ts.map +1 -1
  198. package/dist/routes/rest/collections/updateByID.js +50 -33
  199. package/dist/routes/rest/collections/updateByID.js.map +1 -1
  200. package/dist/routes/rest/files/checkFileAccess.d.ts +2 -2
  201. package/dist/routes/rest/files/checkFileAccess.d.ts.map +1 -1
  202. package/dist/routes/rest/files/checkFileAccess.js +52 -45
  203. package/dist/routes/rest/files/checkFileAccess.js.map +1 -1
  204. package/dist/routes/rest/files/getFile.d.ts +2 -2
  205. package/dist/routes/rest/files/getFile.d.ts.map +1 -1
  206. package/dist/routes/rest/files/getFile.js +56 -47
  207. package/dist/routes/rest/files/getFile.js.map +1 -1
  208. package/dist/routes/rest/files/getFileTypeFallback.js +16 -17
  209. package/dist/routes/rest/files/getFileTypeFallback.js.map +1 -1
  210. package/dist/routes/rest/globals/docAccess.js +15 -13
  211. package/dist/routes/rest/globals/docAccess.js.map +1 -1
  212. package/dist/routes/rest/globals/findOne.d.ts.map +1 -1
  213. package/dist/routes/rest/globals/findOne.js +26 -18
  214. package/dist/routes/rest/globals/findOne.js.map +1 -1
  215. package/dist/routes/rest/globals/findVersionByID.d.ts.map +1 -1
  216. package/dist/routes/rest/globals/findVersionByID.js +26 -17
  217. package/dist/routes/rest/globals/findVersionByID.js.map +1 -1
  218. package/dist/routes/rest/globals/findVersions.d.ts.map +1 -1
  219. package/dist/routes/rest/globals/findVersions.js +33 -19
  220. package/dist/routes/rest/globals/findVersions.js.map +1 -1
  221. package/dist/routes/rest/globals/preview.js +38 -34
  222. package/dist/routes/rest/globals/preview.js.map +1 -1
  223. package/dist/routes/rest/globals/restoreVersion.d.ts.map +1 -1
  224. package/dist/routes/rest/globals/restoreVersion.js +29 -20
  225. package/dist/routes/rest/globals/restoreVersion.js.map +1 -1
  226. package/dist/routes/rest/globals/update.d.ts.map +1 -1
  227. package/dist/routes/rest/globals/update.js +42 -28
  228. package/dist/routes/rest/globals/update.js.map +1 -1
  229. package/dist/routes/rest/index.d.ts +17 -12
  230. package/dist/routes/rest/index.d.ts.map +1 -1
  231. package/dist/routes/rest/index.js +747 -609
  232. package/dist/routes/rest/index.js.map +1 -1
  233. package/dist/routes/rest/og/image.d.ts +4 -1
  234. package/dist/routes/rest/og/image.d.ts.map +1 -1
  235. package/dist/routes/rest/og/image.js +79 -73
  236. package/dist/routes/rest/og/image.js.map +1 -1
  237. package/dist/routes/rest/og/index.d.ts +2 -2
  238. package/dist/routes/rest/og/index.d.ts.map +1 -1
  239. package/dist/routes/rest/og/index.js +55 -55
  240. package/dist/routes/rest/og/index.js.map +1 -1
  241. package/dist/routes/rest/routeError.d.ts +3 -8
  242. package/dist/routes/rest/routeError.d.ts.map +1 -1
  243. package/dist/routes/rest/routeError.js +74 -99
  244. package/dist/routes/rest/routeError.js.map +1 -1
  245. package/dist/routes/rest/types.d.ts +7 -7
  246. package/dist/routes/rest/types.d.ts.map +1 -1
  247. package/dist/routes/rest/types.js +1 -2
  248. package/dist/routes/rest/types.js.map +1 -1
  249. package/dist/routes/rest/utilities/sanitizeCollectionID.d.ts.map +1 -1
  250. package/dist/routes/rest/utilities/sanitizeCollectionID.js +18 -11
  251. package/dist/routes/rest/utilities/sanitizeCollectionID.js.map +1 -1
  252. package/dist/routes/rest/utilities/sanitizeJoinParams.d.ts +13 -0
  253. package/dist/routes/rest/utilities/sanitizeJoinParams.d.ts.map +1 -0
  254. package/dist/routes/rest/utilities/sanitizeJoinParams.js +21 -0
  255. package/dist/routes/rest/utilities/sanitizeJoinParams.js.map +1 -0
  256. package/dist/routes/rest/utilities/sanitizePopulate.d.ts +3 -0
  257. package/dist/routes/rest/utilities/sanitizePopulate.d.ts.map +1 -0
  258. package/dist/routes/rest/utilities/sanitizePopulate.js +11 -0
  259. package/dist/routes/rest/utilities/sanitizePopulate.js.map +1 -0
  260. package/dist/routes/rest/utilities/sanitizeSelect.d.ts +6 -0
  261. package/dist/routes/rest/utilities/sanitizeSelect.d.ts.map +1 -0
  262. package/dist/routes/rest/utilities/sanitizeSelect.js +17 -0
  263. package/dist/routes/rest/utilities/sanitizeSelect.js.map +1 -0
  264. package/dist/scss/app.scss +166 -167
  265. package/dist/scss/colors.scss +256 -254
  266. package/dist/scss/resets.scss +9 -7
  267. package/dist/scss/toastify.scss +61 -0
  268. package/dist/scss/toasts.scss +115 -82
  269. package/dist/scss/type.scss +79 -86
  270. package/dist/scss/vars.scss +26 -47
  271. package/dist/templates/Default/NavHamburger/index.js +19 -7
  272. package/dist/templates/Default/NavHamburger/index.js.map +1 -1
  273. package/dist/templates/Default/Wrapper/index.d.ts.map +1 -1
  274. package/dist/templates/Default/Wrapper/index.js +43 -12
  275. package/dist/templates/Default/Wrapper/index.js.map +1 -1
  276. package/dist/templates/Default/Wrapper/index.scss +48 -15
  277. package/dist/templates/Default/index.d.ts +4 -3
  278. package/dist/templates/Default/index.d.ts.map +1 -1
  279. package/dist/templates/Default/index.js +126 -56
  280. package/dist/templates/Default/index.js.map +1 -1
  281. package/dist/templates/Default/index.scss +62 -50
  282. package/dist/templates/Minimal/index.js +16 -16
  283. package/dist/templates/Minimal/index.js.map +1 -1
  284. package/dist/templates/Minimal/index.scss +22 -20
  285. package/dist/utilities/addDataAndFileToRequest.d.ts +3 -6
  286. package/dist/utilities/addDataAndFileToRequest.d.ts.map +1 -1
  287. package/dist/utilities/addDataAndFileToRequest.js +41 -39
  288. package/dist/utilities/addDataAndFileToRequest.js.map +1 -1
  289. package/dist/utilities/addLocalesToRequest.d.ts +2 -5
  290. package/dist/utilities/addLocalesToRequest.d.ts.map +1 -1
  291. package/dist/utilities/addLocalesToRequest.js +50 -39
  292. package/dist/utilities/addLocalesToRequest.js.map +1 -1
  293. package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
  294. package/dist/utilities/createPayloadRequest.js +91 -70
  295. package/dist/utilities/createPayloadRequest.js.map +1 -1
  296. package/dist/utilities/getClientConfig.d.ts +7 -0
  297. package/dist/utilities/getClientConfig.d.ts.map +1 -0
  298. package/dist/utilities/getClientConfig.js +14 -0
  299. package/dist/utilities/getClientConfig.js.map +1 -0
  300. package/dist/utilities/getNextRequestI18n.d.ts +3 -3
  301. package/dist/utilities/getNextRequestI18n.d.ts.map +1 -1
  302. package/dist/utilities/getNextRequestI18n.js +14 -10
  303. package/dist/utilities/getNextRequestI18n.js.map +1 -1
  304. package/dist/utilities/getPayloadHMR.d.ts +2 -2
  305. package/dist/utilities/getPayloadHMR.d.ts.map +1 -1
  306. package/dist/utilities/getPayloadHMR.js +92 -79
  307. package/dist/utilities/getPayloadHMR.js.map +1 -1
  308. package/dist/utilities/getRequestLanguage.js +16 -13
  309. package/dist/utilities/getRequestLanguage.js.map +1 -1
  310. package/dist/utilities/getRequestLocales.js +27 -24
  311. package/dist/utilities/getRequestLocales.js.map +1 -1
  312. package/dist/utilities/getRequestTheme.d.ts +1 -1
  313. package/dist/utilities/getRequestTheme.d.ts.map +1 -1
  314. package/dist/utilities/getRequestTheme.js +20 -17
  315. package/dist/utilities/getRequestTheme.js.map +1 -1
  316. package/dist/utilities/handleServerFunctions.d.ts +3 -0
  317. package/dist/utilities/handleServerFunctions.d.ts.map +1 -0
  318. package/dist/utilities/handleServerFunctions.js +35 -0
  319. package/dist/utilities/handleServerFunctions.js.map +1 -0
  320. package/dist/utilities/headersWithCors.d.ts +2 -2
  321. package/dist/utilities/headersWithCors.d.ts.map +1 -1
  322. package/dist/utilities/headersWithCors.js +21 -14
  323. package/dist/utilities/headersWithCors.js.map +1 -1
  324. package/dist/utilities/initPage/handleAdminPage.d.ts +13 -7
  325. package/dist/utilities/initPage/handleAdminPage.d.ts.map +1 -1
  326. package/dist/utilities/initPage/handleAdminPage.js +46 -33
  327. package/dist/utilities/initPage/handleAdminPage.js.map +1 -1
  328. package/dist/utilities/initPage/handleAuthRedirect.d.ts +7 -4
  329. package/dist/utilities/initPage/handleAuthRedirect.d.ts.map +1 -1
  330. package/dist/utilities/initPage/handleAuthRedirect.js +38 -24
  331. package/dist/utilities/initPage/handleAuthRedirect.js.map +1 -1
  332. package/dist/utilities/initPage/index.d.ts +1 -1
  333. package/dist/utilities/initPage/index.d.ts.map +1 -1
  334. package/dist/utilities/initPage/index.js +160 -122
  335. package/dist/utilities/initPage/index.js.map +1 -1
  336. package/dist/utilities/initPage/isCustomAdminView.d.ts +10 -0
  337. package/dist/utilities/initPage/isCustomAdminView.d.ts.map +1 -0
  338. package/dist/utilities/initPage/isCustomAdminView.js +31 -0
  339. package/dist/utilities/initPage/isCustomAdminView.js.map +1 -0
  340. package/dist/utilities/initPage/shared.d.ts +14 -2
  341. package/dist/utilities/initPage/shared.d.ts.map +1 -1
  342. package/dist/utilities/initPage/shared.js +33 -16
  343. package/dist/utilities/initPage/shared.js.map +1 -1
  344. package/dist/utilities/initPage/types.d.ts +2 -1
  345. package/dist/utilities/initPage/types.d.ts.map +1 -1
  346. package/dist/utilities/initPage/types.js +1 -2
  347. package/dist/utilities/initPage/types.js.map +1 -1
  348. package/dist/utilities/initReq.d.ts +11 -0
  349. package/dist/utilities/initReq.d.ts.map +1 -0
  350. package/dist/utilities/initReq.js +47 -0
  351. package/dist/utilities/initReq.js.map +1 -0
  352. package/dist/utilities/mergeHeaders.d.ts +2 -0
  353. package/dist/utilities/mergeHeaders.d.ts.map +1 -0
  354. package/dist/utilities/mergeHeaders.js +10 -0
  355. package/dist/utilities/mergeHeaders.js.map +1 -0
  356. package/dist/utilities/meta.d.ts +2 -2
  357. package/dist/utilities/meta.d.ts.map +1 -1
  358. package/dist/utilities/meta.js +67 -68
  359. package/dist/utilities/meta.js.map +1 -1
  360. package/dist/utilities/timestamp.d.ts.map +1 -1
  361. package/dist/utilities/timestamp.js +6 -5
  362. package/dist/utilities/timestamp.js.map +1 -1
  363. package/dist/views/API/LocaleSelector/index.d.ts +2 -2
  364. package/dist/views/API/LocaleSelector/index.d.ts.map +1 -1
  365. package/dist/views/API/LocaleSelector/index.js +37 -9
  366. package/dist/views/API/LocaleSelector/index.js.map +1 -1
  367. package/dist/views/API/RenderJSON/index.d.ts +1 -1
  368. package/dist/views/API/RenderJSON/index.d.ts.map +1 -1
  369. package/dist/views/API/RenderJSON/index.js +125 -113
  370. package/dist/views/API/RenderJSON/index.js.map +1 -1
  371. package/dist/views/API/RenderJSON/index.scss +68 -66
  372. package/dist/views/API/index.client.d.ts.map +1 -1
  373. package/dist/views/API/index.client.js +189 -200
  374. package/dist/views/API/index.client.js.map +1 -1
  375. package/dist/views/API/index.d.ts +2 -2
  376. package/dist/views/API/index.d.ts.map +1 -1
  377. package/dist/views/API/index.js +2 -3
  378. package/dist/views/API/index.js.map +1 -1
  379. package/dist/views/API/index.scss +98 -97
  380. package/dist/views/API/meta.d.ts.map +1 -1
  381. package/dist/views/API/meta.js +22 -14
  382. package/dist/views/API/meta.js.map +1 -1
  383. package/dist/views/Account/Settings/LanguageSelector.js +46 -13
  384. package/dist/views/Account/Settings/LanguageSelector.js.map +1 -1
  385. package/dist/views/Account/Settings/index.d.ts +5 -4
  386. package/dist/views/Account/Settings/index.d.ts.map +1 -1
  387. package/dist/views/Account/Settings/index.js +22 -28
  388. package/dist/views/Account/Settings/index.js.map +1 -1
  389. package/dist/views/Account/Settings/index.scss +37 -35
  390. package/dist/views/Account/ToggleTheme/index.d.ts.map +1 -1
  391. package/dist/views/Account/ToggleTheme/index.js +52 -28
  392. package/dist/views/Account/ToggleTheme/index.js.map +1 -1
  393. package/dist/views/Account/index.client.d.ts +3 -0
  394. package/dist/views/Account/index.client.d.ts.map +1 -0
  395. package/dist/views/Account/index.client.js +37 -0
  396. package/dist/views/Account/index.client.js.map +1 -0
  397. package/dist/views/Account/index.d.ts.map +1 -1
  398. package/dist/views/Account/index.js +160 -76
  399. package/dist/views/Account/index.js.map +1 -1
  400. package/dist/views/Account/meta.js +12 -8
  401. package/dist/views/Account/meta.js.map +1 -1
  402. package/dist/views/CreateFirstUser/index.client.d.ts +4 -1
  403. package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
  404. package/dist/views/CreateFirstUser/index.client.js +124 -58
  405. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  406. package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
  407. package/dist/views/CreateFirstUser/index.js +74 -46
  408. package/dist/views/CreateFirstUser/index.js.map +1 -1
  409. package/dist/views/CreateFirstUser/index.scss +18 -2
  410. package/dist/views/CreateFirstUser/meta.js +12 -8
  411. package/dist/views/CreateFirstUser/meta.js.map +1 -1
  412. package/dist/views/Dashboard/Default/index.d.ts +12 -3
  413. package/dist/views/Dashboard/Default/index.d.ts.map +1 -1
  414. package/dist/views/Dashboard/Default/index.js +158 -115
  415. package/dist/views/Dashboard/Default/index.js.map +1 -1
  416. package/dist/views/Dashboard/Default/index.scss +53 -42
  417. package/dist/views/Dashboard/index.d.ts.map +1 -1
  418. package/dist/views/Dashboard/index.js +87 -48
  419. package/dist/views/Dashboard/index.js.map +1 -1
  420. package/dist/views/Dashboard/meta.js +16 -12
  421. package/dist/views/Dashboard/meta.js.map +1 -1
  422. package/dist/views/Document/getCustomViewByKey.d.ts +1 -1
  423. package/dist/views/Document/getCustomViewByKey.d.ts.map +1 -1
  424. package/dist/views/Document/getCustomViewByKey.js +2 -4
  425. package/dist/views/Document/getCustomViewByKey.js.map +1 -1
  426. package/dist/views/Document/getCustomViewByRoute.d.ts +5 -2
  427. package/dist/views/Document/getCustomViewByRoute.d.ts.map +1 -1
  428. package/dist/views/Document/getCustomViewByRoute.js +30 -17
  429. package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
  430. package/dist/views/Document/getDocPreferences.d.ts +11 -0
  431. package/dist/views/Document/getDocPreferences.d.ts.map +1 -0
  432. package/dist/views/Document/getDocPreferences.js +44 -0
  433. package/dist/views/Document/getDocPreferences.js.map +1 -0
  434. package/dist/views/Document/getDocumentData.d.ts +10 -7
  435. package/dist/views/Document/getDocumentData.d.ts.map +1 -1
  436. package/dist/views/Document/getDocumentData.js +36 -28
  437. package/dist/views/Document/getDocumentData.js.map +1 -1
  438. package/dist/views/Document/getDocumentPermissions.d.ts.map +1 -1
  439. package/dist/views/Document/getDocumentPermissions.js +84 -74
  440. package/dist/views/Document/getDocumentPermissions.js.map +1 -1
  441. package/dist/views/Document/getIsLocked.d.ts +17 -0
  442. package/dist/views/Document/getIsLocked.d.ts.map +1 -0
  443. package/dist/views/Document/getIsLocked.js +54 -0
  444. package/dist/views/Document/getIsLocked.js.map +1 -0
  445. package/dist/views/Document/getMetaBySegment.d.ts +6 -5
  446. package/dist/views/Document/getMetaBySegment.d.ts.map +1 -1
  447. package/dist/views/Document/getMetaBySegment.js +114 -63
  448. package/dist/views/Document/getMetaBySegment.js.map +1 -1
  449. package/dist/views/Document/getVersions.d.ts +19 -0
  450. package/dist/views/Document/getVersions.d.ts.map +1 -0
  451. package/dist/views/Document/getVersions.js +181 -0
  452. package/dist/views/Document/getVersions.js.map +1 -0
  453. package/dist/views/Document/getViewsFromConfig.d.ts +18 -7
  454. package/dist/views/Document/getViewsFromConfig.d.ts.map +1 -1
  455. package/dist/views/Document/getViewsFromConfig.js +314 -226
  456. package/dist/views/Document/getViewsFromConfig.js.map +1 -1
  457. package/dist/views/Document/handleServerFunction.d.ts +24 -0
  458. package/dist/views/Document/handleServerFunction.d.ts.map +1 -0
  459. package/dist/views/Document/handleServerFunction.js +156 -0
  460. package/dist/views/Document/handleServerFunction.js.map +1 -0
  461. package/dist/views/Document/index.d.ts +5 -1
  462. package/dist/views/Document/index.d.ts.map +1 -1
  463. package/dist/views/Document/index.js +304 -170
  464. package/dist/views/Document/index.js.map +1 -1
  465. package/dist/views/Document/meta.js +1 -2
  466. package/dist/views/Document/meta.js.map +1 -1
  467. package/dist/views/Document/renderDocumentSlots.d.ts +12 -0
  468. package/dist/views/Document/renderDocumentSlots.d.ts.map +1 -0
  469. package/dist/views/Document/renderDocumentSlots.js +92 -0
  470. package/dist/views/Document/renderDocumentSlots.js.map +1 -0
  471. package/dist/views/Edit/index.d.ts +3 -2
  472. package/dist/views/Edit/index.d.ts.map +1 -1
  473. package/dist/views/Edit/index.js +7 -4
  474. package/dist/views/Edit/index.js.map +1 -1
  475. package/dist/views/Edit/meta.d.ts.map +1 -1
  476. package/dist/views/Edit/meta.js +43 -24
  477. package/dist/views/Edit/meta.js.map +1 -1
  478. package/dist/views/Edit/sanitizeEditViewProps.js +8 -9
  479. package/dist/views/Edit/sanitizeEditViewProps.js.map +1 -1
  480. package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
  481. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +159 -67
  482. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  483. package/dist/views/ForgotPassword/index.d.ts.map +1 -1
  484. package/dist/views/ForgotPassword/index.js +63 -40
  485. package/dist/views/ForgotPassword/index.js.map +1 -1
  486. package/dist/views/ForgotPassword/meta.js +12 -8
  487. package/dist/views/ForgotPassword/meta.js.map +1 -1
  488. package/dist/views/List/handleServerFunction.d.ts +26 -0
  489. package/dist/views/List/handleServerFunction.d.ts.map +1 -0
  490. package/dist/views/List/handleServerFunction.js +155 -0
  491. package/dist/views/List/handleServerFunction.js.map +1 -0
  492. package/dist/views/List/index.d.ts +12 -2
  493. package/dist/views/List/index.d.ts.map +1 -1
  494. package/dist/views/List/index.js +200 -115
  495. package/dist/views/List/index.js.map +1 -1
  496. package/dist/views/List/meta.d.ts +2 -2
  497. package/dist/views/List/meta.d.ts.map +1 -1
  498. package/dist/views/List/meta.js +20 -17
  499. package/dist/views/List/meta.js.map +1 -1
  500. package/dist/views/List/renderListViewSlots.d.ts +8 -0
  501. package/dist/views/List/renderListViewSlots.d.ts.map +1 -0
  502. package/dist/views/List/renderListViewSlots.js +44 -0
  503. package/dist/views/List/renderListViewSlots.js.map +1 -0
  504. package/dist/views/LivePreview/Context/collisionDetection.js +24 -21
  505. package/dist/views/LivePreview/Context/collisionDetection.js.map +1 -1
  506. package/dist/views/LivePreview/Context/context.d.ts +3 -2
  507. package/dist/views/LivePreview/Context/context.d.ts.map +1 -1
  508. package/dist/views/LivePreview/Context/context.js +39 -36
  509. package/dist/views/LivePreview/Context/context.js.map +1 -1
  510. package/dist/views/LivePreview/Context/index.d.ts +3 -3
  511. package/dist/views/LivePreview/Context/index.d.ts.map +1 -1
  512. package/dist/views/LivePreview/Context/index.js +136 -142
  513. package/dist/views/LivePreview/Context/index.js.map +1 -1
  514. package/dist/views/LivePreview/Context/sizeReducer.js +18 -19
  515. package/dist/views/LivePreview/Context/sizeReducer.js.map +1 -1
  516. package/dist/views/LivePreview/Device/index.d.ts.map +1 -1
  517. package/dist/views/LivePreview/Device/index.js +83 -72
  518. package/dist/views/LivePreview/Device/index.js.map +1 -1
  519. package/dist/views/LivePreview/DeviceContainer/index.js +47 -23
  520. package/dist/views/LivePreview/DeviceContainer/index.js.map +1 -1
  521. package/dist/views/LivePreview/IFrame/index.js +21 -16
  522. package/dist/views/LivePreview/IFrame/index.js.map +1 -1
  523. package/dist/views/LivePreview/IFrame/index.scss +8 -6
  524. package/dist/views/LivePreview/Preview/index.js +147 -94
  525. package/dist/views/LivePreview/Preview/index.js.map +1 -1
  526. package/dist/views/LivePreview/Preview/index.scss +32 -30
  527. package/dist/views/LivePreview/Toolbar/Controls/index.d.ts.map +1 -1
  528. package/dist/views/LivePreview/Toolbar/Controls/index.js +137 -116
  529. package/dist/views/LivePreview/Toolbar/Controls/index.js.map +1 -1
  530. package/dist/views/LivePreview/Toolbar/Controls/index.scss +49 -47
  531. package/dist/views/LivePreview/Toolbar/SizeInput/index.d.ts.map +1 -1
  532. package/dist/views/LivePreview/Toolbar/SizeInput/index.js +89 -51
  533. package/dist/views/LivePreview/Toolbar/SizeInput/index.js.map +1 -1
  534. package/dist/views/LivePreview/Toolbar/SizeInput/index.scss +11 -9
  535. package/dist/views/LivePreview/Toolbar/index.d.ts +2 -2
  536. package/dist/views/LivePreview/Toolbar/index.d.ts.map +1 -1
  537. package/dist/views/LivePreview/Toolbar/index.js +83 -51
  538. package/dist/views/LivePreview/Toolbar/index.js.map +1 -1
  539. package/dist/views/LivePreview/Toolbar/index.scss +33 -31
  540. package/dist/views/LivePreview/ToolbarArea/index.js +32 -10
  541. package/dist/views/LivePreview/ToolbarArea/index.js.map +1 -1
  542. package/dist/views/LivePreview/ToolbarArea/index.scss +5 -3
  543. package/dist/views/LivePreview/index.client.d.ts +3 -3
  544. package/dist/views/LivePreview/index.client.d.ts.map +1 -1
  545. package/dist/views/LivePreview/index.client.js +359 -180
  546. package/dist/views/LivePreview/index.client.js.map +1 -1
  547. package/dist/views/LivePreview/index.d.ts +2 -2
  548. package/dist/views/LivePreview/index.d.ts.map +1 -1
  549. package/dist/views/LivePreview/index.js +67 -55
  550. package/dist/views/LivePreview/index.js.map +1 -1
  551. package/dist/views/LivePreview/index.scss +48 -46
  552. package/dist/views/LivePreview/meta.d.ts.map +1 -1
  553. package/dist/views/LivePreview/meta.js +14 -8
  554. package/dist/views/LivePreview/meta.js.map +1 -1
  555. package/dist/views/LivePreview/usePopupWindow.d.ts +3 -2
  556. package/dist/views/LivePreview/usePopupWindow.d.ts.map +1 -1
  557. package/dist/views/LivePreview/usePopupWindow.js +134 -92
  558. package/dist/views/LivePreview/usePopupWindow.js.map +1 -1
  559. package/dist/views/Login/LoginField/index.d.ts +9 -0
  560. package/dist/views/Login/LoginField/index.d.ts.map +1 -0
  561. package/dist/views/Login/LoginField/index.js +95 -0
  562. package/dist/views/Login/LoginField/index.js.map +1 -0
  563. package/dist/views/Login/LoginForm/index.d.ts +3 -0
  564. package/dist/views/Login/LoginForm/index.d.ts.map +1 -1
  565. package/dist/views/Login/LoginForm/index.js +153 -81
  566. package/dist/views/Login/LoginForm/index.js.map +1 -1
  567. package/dist/views/Login/LoginForm/index.scss +8 -6
  568. package/dist/views/Login/index.d.ts.map +1 -1
  569. package/dist/views/Login/index.js +84 -54
  570. package/dist/views/Login/index.js.map +1 -1
  571. package/dist/views/Login/index.scss +8 -6
  572. package/dist/views/Login/meta.js +12 -8
  573. package/dist/views/Login/meta.js.map +1 -1
  574. package/dist/views/Logout/LogoutClient.d.ts +1 -0
  575. package/dist/views/Logout/LogoutClient.d.ts.map +1 -1
  576. package/dist/views/Logout/LogoutClient.js +112 -37
  577. package/dist/views/Logout/LogoutClient.js.map +1 -1
  578. package/dist/views/Logout/index.d.ts +2 -2
  579. package/dist/views/Logout/index.d.ts.map +1 -1
  580. package/dist/views/Logout/index.js +29 -16
  581. package/dist/views/Logout/index.js.map +1 -1
  582. package/dist/views/Logout/index.scss +19 -14
  583. package/dist/views/Logout/meta.js +11 -7
  584. package/dist/views/Logout/meta.js.map +1 -1
  585. package/dist/views/NotFound/index.client.d.ts.map +1 -1
  586. package/dist/views/NotFound/index.client.js +82 -40
  587. package/dist/views/NotFound/index.client.js.map +1 -1
  588. package/dist/views/NotFound/index.d.ts +8 -7
  589. package/dist/views/NotFound/index.d.ts.map +1 -1
  590. package/dist/views/NotFound/index.js +55 -44
  591. package/dist/views/NotFound/index.js.map +1 -1
  592. package/dist/views/NotFound/index.scss +41 -21
  593. package/dist/views/NotFound/meta.d.ts +2 -2
  594. package/dist/views/NotFound/meta.d.ts.map +1 -1
  595. package/dist/views/NotFound/meta.js +9 -7
  596. package/dist/views/NotFound/meta.js.map +1 -1
  597. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts +7 -0
  598. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts.map +1 -0
  599. package/dist/views/ResetPassword/ResetPasswordForm/index.js +124 -0
  600. package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -0
  601. package/dist/views/ResetPassword/index.d.ts.map +1 -1
  602. package/dist/views/ResetPassword/index.js +76 -54
  603. package/dist/views/ResetPassword/index.js.map +1 -1
  604. package/dist/views/ResetPassword/index.scss +9 -3
  605. package/dist/views/ResetPassword/meta.js +12 -8
  606. package/dist/views/ResetPassword/meta.js.map +1 -1
  607. package/dist/views/Root/generateCustomViewMetadata.d.ts +11 -0
  608. package/dist/views/Root/generateCustomViewMetadata.d.ts.map +1 -0
  609. package/dist/views/Root/generateCustomViewMetadata.js +25 -0
  610. package/dist/views/Root/generateCustomViewMetadata.js.map +1 -0
  611. package/dist/views/Root/getCustomViewByRoute.d.ts +7 -2
  612. package/dist/views/Root/getCustomViewByRoute.d.ts.map +1 -1
  613. package/dist/views/Root/getCustomViewByRoute.js +45 -16
  614. package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
  615. package/dist/views/Root/getViewFromConfig.d.ts +13 -5
  616. package/dist/views/Root/getViewFromConfig.d.ts.map +1 -1
  617. package/dist/views/Root/getViewFromConfig.js +277 -135
  618. package/dist/views/Root/getViewFromConfig.js.map +1 -1
  619. package/dist/views/Root/index.d.ts +10 -9
  620. package/dist/views/Root/index.d.ts.map +1 -1
  621. package/dist/views/Root/index.js +124 -64
  622. package/dist/views/Root/index.js.map +1 -1
  623. package/dist/views/Root/isPathMatchingRoute.d.ts.map +1 -1
  624. package/dist/views/Root/isPathMatchingRoute.js +22 -13
  625. package/dist/views/Root/isPathMatchingRoute.js.map +1 -1
  626. package/dist/views/Root/meta.d.ts +5 -5
  627. package/dist/views/Root/meta.d.ts.map +1 -1
  628. package/dist/views/Root/meta.js +144 -121
  629. package/dist/views/Root/meta.js.map +1 -1
  630. package/dist/views/Unauthorized/index.d.ts +2 -2
  631. package/dist/views/Unauthorized/index.d.ts.map +1 -1
  632. package/dist/views/Unauthorized/index.js +40 -22
  633. package/dist/views/Unauthorized/index.js.map +1 -1
  634. package/dist/views/Unauthorized/index.scss +4 -31
  635. package/dist/views/Unauthorized/meta.js +12 -8
  636. package/dist/views/Unauthorized/meta.js.map +1 -1
  637. package/dist/views/Verify/index.client.d.ts +7 -0
  638. package/dist/views/Verify/index.client.d.ts.map +1 -0
  639. package/dist/views/Verify/index.client.js +46 -0
  640. package/dist/views/Verify/index.client.js.map +1 -0
  641. package/dist/views/Verify/index.d.ts.map +1 -1
  642. package/dist/views/Verify/index.js +62 -38
  643. package/dist/views/Verify/index.js.map +1 -1
  644. package/dist/views/Verify/index.scss +13 -11
  645. package/dist/views/Verify/meta.js +12 -8
  646. package/dist/views/Verify/meta.js.map +1 -1
  647. package/dist/views/Version/Default/SetStepNav.d.ts +8 -10
  648. package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
  649. package/dist/views/Version/Default/SetStepNav.js +150 -91
  650. package/dist/views/Version/Default/SetStepNav.js.map +1 -1
  651. package/dist/views/Version/Default/index.d.ts.map +1 -1
  652. package/dist/views/Version/Default/index.js +199 -120
  653. package/dist/views/Version/Default/index.js.map +1 -1
  654. package/dist/views/Version/Default/index.scss +52 -50
  655. package/dist/views/Version/Default/types.d.ts +8 -8
  656. package/dist/views/Version/Default/types.d.ts.map +1 -1
  657. package/dist/views/Version/Default/types.js +1 -2
  658. package/dist/views/Version/Default/types.js.map +1 -1
  659. package/dist/views/Version/RenderFieldsToDiff/Label/index.js +6 -5
  660. package/dist/views/Version/RenderFieldsToDiff/Label/index.js.map +1 -1
  661. package/dist/views/Version/RenderFieldsToDiff/Label/index.scss +5 -3
  662. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +2 -2
  663. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
  664. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +68 -70
  665. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  666. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +29 -27
  667. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts +2 -2
  668. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -1
  669. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js +35 -32
  670. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js.map +1 -1
  671. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.scss +11 -9
  672. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +3 -2
  673. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
  674. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +114 -64
  675. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
  676. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +12 -10
  677. package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +17 -11
  678. package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js.map +1 -1
  679. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +3 -6
  680. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
  681. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +42 -38
  682. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
  683. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +12 -10
  684. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +3 -5
  685. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
  686. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +42 -32
  687. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
  688. package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +17 -11
  689. package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js.map +1 -1
  690. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +3 -2
  691. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
  692. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +39 -30
  693. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
  694. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +12 -10
  695. package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js +4 -5
  696. package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js.map +1 -1
  697. package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +21 -55
  698. package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
  699. package/dist/views/Version/RenderFieldsToDiff/fields/index.js +22 -22
  700. package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
  701. package/dist/views/Version/RenderFieldsToDiff/fields/styles.js +23 -24
  702. package/dist/views/Version/RenderFieldsToDiff/fields/styles.js.map +1 -1
  703. package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts +15 -16
  704. package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.map +1 -1
  705. package/dist/views/Version/RenderFieldsToDiff/fields/types.js +1 -2
  706. package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +1 -1
  707. package/dist/views/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
  708. package/dist/views/Version/RenderFieldsToDiff/index.js +107 -94
  709. package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
  710. package/dist/views/Version/RenderFieldsToDiff/index.scss +12 -10
  711. package/dist/views/Version/RenderFieldsToDiff/types.d.ts +11 -12
  712. package/dist/views/Version/RenderFieldsToDiff/types.d.ts.map +1 -1
  713. package/dist/views/Version/RenderFieldsToDiff/types.js +1 -2
  714. package/dist/views/Version/RenderFieldsToDiff/types.js.map +1 -1
  715. package/dist/views/Version/Restore/index.d.ts.map +1 -1
  716. package/dist/views/Version/Restore/index.js +112 -80
  717. package/dist/views/Version/Restore/index.js.map +1 -1
  718. package/dist/views/Version/Restore/index.scss +67 -18
  719. package/dist/views/Version/Restore/types.d.ts +1 -0
  720. package/dist/views/Version/Restore/types.d.ts.map +1 -1
  721. package/dist/views/Version/Restore/types.js +1 -2
  722. package/dist/views/Version/Restore/types.js.map +1 -1
  723. package/dist/views/Version/SelectComparison/index.d.ts.map +1 -1
  724. package/dist/views/Version/SelectComparison/index.js +155 -119
  725. package/dist/views/Version/SelectComparison/index.js.map +1 -1
  726. package/dist/views/Version/SelectComparison/index.scss +12 -10
  727. package/dist/views/Version/SelectComparison/types.d.ts +3 -1
  728. package/dist/views/Version/SelectComparison/types.d.ts.map +1 -1
  729. package/dist/views/Version/SelectComparison/types.js +1 -2
  730. package/dist/views/Version/SelectComparison/types.js.map +1 -1
  731. package/dist/views/Version/SelectLocales/index.d.ts.map +1 -1
  732. package/dist/views/Version/SelectLocales/index.js +59 -31
  733. package/dist/views/Version/SelectLocales/index.js.map +1 -1
  734. package/dist/views/Version/SelectLocales/index.scss +6 -4
  735. package/dist/views/Version/SelectLocales/types.js +1 -2
  736. package/dist/views/Version/SelectLocales/types.js.map +1 -1
  737. package/dist/views/Version/index.d.ts +2 -2
  738. package/dist/views/Version/index.d.ts.map +1 -1
  739. package/dist/views/Version/index.js +130 -95
  740. package/dist/views/Version/index.js.map +1 -1
  741. package/dist/views/Version/meta.d.ts.map +1 -1
  742. package/dist/views/Version/meta.js +50 -39
  743. package/dist/views/Version/meta.js.map +1 -1
  744. package/dist/views/Versions/buildColumns.d.ts +6 -3
  745. package/dist/views/Versions/buildColumns.d.ts.map +1 -1
  746. package/dist/views/Versions/buildColumns.js +75 -56
  747. package/dist/views/Versions/buildColumns.js.map +1 -1
  748. package/dist/views/Versions/cells/AutosaveCell/index.d.ts +14 -1
  749. package/dist/views/Versions/cells/AutosaveCell/index.d.ts.map +1 -1
  750. package/dist/views/Versions/cells/AutosaveCell/index.js +112 -28
  751. package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
  752. package/dist/views/Versions/cells/CreatedAt/index.d.ts +4 -0
  753. package/dist/views/Versions/cells/CreatedAt/index.d.ts.map +1 -1
  754. package/dist/views/Versions/cells/CreatedAt/index.js +75 -17
  755. package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
  756. package/dist/views/Versions/cells/ID/index.d.ts +3 -1
  757. package/dist/views/Versions/cells/ID/index.d.ts.map +1 -1
  758. package/dist/views/Versions/cells/ID/index.js +8 -8
  759. package/dist/views/Versions/cells/ID/index.js.map +1 -1
  760. package/dist/views/Versions/getLatestVersion.d.ts +15 -0
  761. package/dist/views/Versions/getLatestVersion.d.ts.map +1 -0
  762. package/dist/views/Versions/getLatestVersion.js +49 -0
  763. package/dist/views/Versions/getLatestVersion.js.map +1 -0
  764. package/dist/views/Versions/index.client.d.ts +5 -5
  765. package/dist/views/Versions/index.client.d.ts.map +1 -1
  766. package/dist/views/Versions/index.client.js +82 -74
  767. package/dist/views/Versions/index.client.js.map +1 -1
  768. package/dist/views/Versions/index.d.ts +2 -2
  769. package/dist/views/Versions/index.d.ts.map +1 -1
  770. package/dist/views/Versions/index.js +173 -88
  771. package/dist/views/Versions/index.js.map +1 -1
  772. package/dist/views/Versions/index.scss +78 -76
  773. package/dist/views/Versions/meta.d.ts.map +1 -1
  774. package/dist/views/Versions/meta.js +44 -33
  775. package/dist/views/Versions/meta.js.map +1 -1
  776. package/dist/views/Versions/types.js +1 -2
  777. package/dist/views/Versions/types.js.map +1 -1
  778. package/dist/withPayload.d.ts +1 -1
  779. package/dist/withPayload.d.ts.map +1 -1
  780. package/dist/withPayload.js +91 -110
  781. package/dist/withPayload.js.map +1 -1
  782. package/package.json +71 -39
  783. package/dist/elements/LeaveWithoutSaving/index.d.ts +0 -4
  784. package/dist/elements/LeaveWithoutSaving/index.d.ts.map +0 -1
  785. package/dist/elements/LeaveWithoutSaving/index.js +0 -86
  786. package/dist/elements/LeaveWithoutSaving/index.js.map +0 -1
  787. package/dist/elements/LeaveWithoutSaving/index.scss +0 -36
  788. package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts +0 -8
  789. package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +0 -1
  790. package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +0 -114
  791. package/dist/elements/LeaveWithoutSaving/usePreventLeave.js.map +0 -1
  792. package/dist/prod/index.js +0 -55
  793. package/dist/prod/payload/payload-favicon-dark.png +0 -0
  794. package/dist/prod/payload/payload-favicon-light.png +0 -0
  795. package/dist/prod/payload/static-og-image.png +0 -0
  796. package/dist/routes/rest/buildFormState.d.ts +0 -5
  797. package/dist/routes/rest/buildFormState.d.ts.map +0 -1
  798. package/dist/routes/rest/buildFormState.js +0 -45
  799. package/dist/routes/rest/buildFormState.js.map +0 -1
  800. package/dist/views/Edit/Default/Auth/APIKey.d.ts +0 -6
  801. package/dist/views/Edit/Default/Auth/APIKey.d.ts.map +0 -1
  802. package/dist/views/Edit/Default/Auth/APIKey.js +0 -116
  803. package/dist/views/Edit/Default/Auth/APIKey.js.map +0 -1
  804. package/dist/views/Edit/Default/Auth/index.d.ts +0 -5
  805. package/dist/views/Edit/Default/Auth/index.d.ts.map +0 -1
  806. package/dist/views/Edit/Default/Auth/index.js +0 -154
  807. package/dist/views/Edit/Default/Auth/index.js.map +0 -1
  808. package/dist/views/Edit/Default/Auth/index.scss +0 -61
  809. package/dist/views/Edit/Default/Auth/types.d.ts +0 -13
  810. package/dist/views/Edit/Default/Auth/types.d.ts.map +0 -1
  811. package/dist/views/Edit/Default/Auth/types.js +0 -3
  812. package/dist/views/Edit/Default/Auth/types.js.map +0 -1
  813. package/dist/views/Edit/Default/SetDocumentStepNav/index.d.ts +0 -12
  814. package/dist/views/Edit/Default/SetDocumentStepNav/index.d.ts.map +0 -1
  815. package/dist/views/Edit/Default/SetDocumentStepNav/index.js +0 -69
  816. package/dist/views/Edit/Default/SetDocumentStepNav/index.js.map +0 -1
  817. package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts +0 -9
  818. package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts.map +0 -1
  819. package/dist/views/Edit/Default/SetDocumentTitle/index.js +0 -36
  820. package/dist/views/Edit/Default/SetDocumentTitle/index.js.map +0 -1
  821. package/dist/views/Edit/Default/index.d.ts +0 -4
  822. package/dist/views/Edit/Default/index.d.ts.map +0 -1
  823. package/dist/views/Edit/Default/index.js +0 -193
  824. package/dist/views/Edit/Default/index.js.map +0 -1
  825. package/dist/views/Edit/Default/index.scss +0 -21
  826. package/dist/views/Edit/Default/types.d.ts +0 -6
  827. package/dist/views/Edit/Default/types.d.ts.map +0 -1
  828. package/dist/views/Edit/Default/types.js +0 -3
  829. package/dist/views/Edit/Default/types.js.map +0 -1
  830. package/dist/views/Edit/index.client.d.ts +0 -3
  831. package/dist/views/Edit/index.client.d.ts.map +0 -1
  832. package/dist/views/Edit/index.client.js +0 -25
  833. package/dist/views/Edit/index.client.js.map +0 -1
  834. package/dist/views/List/Default/index.d.ts +0 -4
  835. package/dist/views/List/Default/index.d.ts.map +0 -1
  836. package/dist/views/List/Default/index.js +0 -200
  837. package/dist/views/List/Default/index.js.map +0 -1
  838. package/dist/views/List/Default/index.scss +0 -195
  839. package/dist/views/List/Default/types.d.ts +0 -15
  840. package/dist/views/List/Default/types.d.ts.map +0 -1
  841. package/dist/views/List/Default/types.js +0 -3
  842. package/dist/views/List/Default/types.js.map +0 -1
  843. package/dist/views/ResetPassword/index.client.d.ts +0 -7
  844. package/dist/views/ResetPassword/index.client.d.ts.map +0 -1
  845. package/dist/views/ResetPassword/index.client.js +0 -81
  846. package/dist/views/ResetPassword/index.client.js.map +0 -1
  847. package/dist/views/Version/shared.d.ts +0 -9
  848. package/dist/views/Version/shared.d.ts.map +0 -1
  849. package/dist/views/Version/shared.js +0 -10
  850. package/dist/views/Version/shared.js.map +0 -1
  851. package/dist/webpackEntry.d.ts +0 -5
  852. package/dist/webpackEntry.d.ts.map +0 -1
  853. package/dist/webpackEntry.js +0 -6
  854. package/dist/webpackEntry.js.map +0 -1
@@ -1,135 +1,214 @@
1
1
  'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
2
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Gutter, SetViewActions, useComponentMap, useConfig, useDocumentInfo, usePayloadAPI, useTranslation } from '@payloadcms/ui/client';
5
+ import { Gutter, useConfig, useDocumentInfo, usePayloadAPI, useTranslation } from '@payloadcms/ui';
4
6
  import { formatDate } from '@payloadcms/ui/shared';
5
7
  import React, { useState } from 'react';
6
- import diffComponents from '../RenderFieldsToDiff/fields/index.js';
8
+ import { diffComponents } from '../RenderFieldsToDiff/fields/index.js';
7
9
  import RenderFieldsToDiff from '../RenderFieldsToDiff/index.js';
8
10
  import Restore from '../Restore/index.js';
9
11
  import { SelectComparison } from '../SelectComparison/index.js';
10
12
  import { SelectLocales } from '../SelectLocales/index.js';
11
- import { mostRecentVersionOption } from '../shared.js';
12
13
  import { SetStepNav } from './SetStepNav.js';
13
14
  const baseClass = 'view-version';
14
- export const DefaultVersionView = ({ doc, docPermissions, initialComparisonDoc, localeOptions, mostRecentDoc, publishedDoc, versionID })=>{
15
- const config = useConfig();
16
- const { i18n } = useTranslation();
17
- const { id, collectionSlug, globalSlug } = useDocumentInfo();
18
- const { getComponentMap, getFieldMap } = useComponentMap();
19
- const componentMap = getComponentMap({
20
- collectionSlug,
21
- globalSlug
15
+ export const DefaultVersionView = t0 => {
16
+ const $ = _c(23);
17
+ const {
18
+ doc,
19
+ docPermissions,
20
+ initialComparisonDoc,
21
+ latestDraftVersion,
22
+ latestPublishedVersion,
23
+ localeOptions,
24
+ versionID
25
+ } = t0;
26
+ const {
27
+ config,
28
+ getEntityConfig
29
+ } = useConfig();
30
+ const {
31
+ i18n
32
+ } = useTranslation();
33
+ const {
34
+ id,
35
+ collectionSlug,
36
+ globalSlug
37
+ } = useDocumentInfo();
38
+ let t1;
39
+ if ($[0] !== getEntityConfig || $[1] !== collectionSlug) {
40
+ t1 = () => getEntityConfig({
41
+ collectionSlug
22
42
  });
23
- const [fieldMap] = useState(()=>getFieldMap({
24
- collectionSlug,
25
- globalSlug
26
- }));
27
- const [collectionConfig] = useState(()=>config.collections.find((collection)=>collection.slug === collectionSlug));
28
- const [globalConfig] = useState(()=>config.globals.find((global)=>global.slug === globalSlug));
29
- const [locales, setLocales] = useState(localeOptions);
30
- const [compareValue, setCompareValue] = useState(mostRecentVersionOption);
31
- const { admin: { dateFormat }, localization, routes: { api: apiRoute }, serverURL } = config;
32
- const formattedCreatedAt = doc?.createdAt ? formatDate({
33
- date: doc.createdAt,
34
- i18n,
35
- pattern: dateFormat
36
- }) : '';
37
- const originalDocFetchURL = `${serverURL}${apiRoute}/${globalSlug ? 'globals/' : ''}${collectionSlug || globalSlug}${collectionSlug ? `/${id}` : ''}`;
38
- const compareBaseURL = `${serverURL}${apiRoute}/${globalSlug ? 'globals/' : ''}${collectionSlug || globalSlug}/versions`;
39
- const compareFetchURL = compareValue?.value === 'mostRecent' || compareValue?.value === 'published' ? originalDocFetchURL : `${compareBaseURL}/${compareValue.value}`;
40
- const [{ data: currentComparisonDoc }] = usePayloadAPI(compareFetchURL, {
41
- initialData: initialComparisonDoc,
42
- initialParams: {
43
- depth: 1,
44
- draft: 'true',
45
- locale: '*'
46
- }
43
+ $[0] = getEntityConfig;
44
+ $[1] = collectionSlug;
45
+ $[2] = t1;
46
+ } else {
47
+ t1 = $[2];
48
+ }
49
+ const [collectionConfig] = useState(t1);
50
+ let t2;
51
+ if ($[3] !== getEntityConfig || $[4] !== globalSlug) {
52
+ t2 = () => getEntityConfig({
53
+ globalSlug
54
+ });
55
+ $[3] = getEntityConfig;
56
+ $[4] = globalSlug;
57
+ $[5] = t2;
58
+ } else {
59
+ t2 = $[5];
60
+ }
61
+ const [globalConfig] = useState(t2);
62
+ const [locales, setLocales] = useState(localeOptions);
63
+ const [compareValue, setCompareValue] = useState();
64
+ const {
65
+ admin: t3,
66
+ localization,
67
+ routes: t4,
68
+ serverURL
69
+ } = config;
70
+ const {
71
+ dateFormat
72
+ } = t3;
73
+ const {
74
+ api: apiRoute
75
+ } = t4;
76
+ const versionCreatedAt = doc?.updatedAt ? formatDate({
77
+ date: doc.updatedAt,
78
+ i18n,
79
+ pattern: dateFormat
80
+ }) : "";
81
+ const compareBaseURL = `${serverURL}${apiRoute}/${globalSlug ? "globals/" : ""}${collectionSlug || globalSlug}/versions`;
82
+ const compareFetchURL = compareValue?.value && `${compareBaseURL}/${compareValue.value}`;
83
+ let t5;
84
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
85
+ t5 = {
86
+ depth: 1,
87
+ draft: "true",
88
+ locale: "all"
89
+ };
90
+ $[6] = t5;
91
+ } else {
92
+ t5 = $[6];
93
+ }
94
+ let t6;
95
+ if ($[7] !== initialComparisonDoc) {
96
+ t6 = {
97
+ initialData: initialComparisonDoc,
98
+ initialParams: t5
99
+ };
100
+ $[7] = initialComparisonDoc;
101
+ $[8] = t6;
102
+ } else {
103
+ t6 = $[8];
104
+ }
105
+ const [t7] = usePayloadAPI(compareFetchURL, t6);
106
+ const {
107
+ data: currentComparisonDoc
108
+ } = t7;
109
+ const comparison = compareValue?.value && currentComparisonDoc?.version;
110
+ const canUpdate = docPermissions?.update?.permission;
111
+ let t8;
112
+ if ($[9] !== locales) {
113
+ t8 = locales && locales.map(_temp);
114
+ $[9] = locales;
115
+ $[10] = t8;
116
+ } else {
117
+ t8 = $[10];
118
+ }
119
+ const localeValues = t8;
120
+ const draftsEnabled = Boolean((collectionConfig || globalConfig)?.versions.drafts);
121
+ let t9;
122
+ if ($[11] !== localization || $[12] !== localeOptions || $[13] !== locales) {
123
+ t9 = localization && _jsx(SelectLocales, {
124
+ onChange: setLocales,
125
+ options: localeOptions,
126
+ value: locales
47
127
  });
48
- const comparison = compareValue?.value === 'mostRecent' ? mostRecentDoc : compareValue?.value === 'published' ? publishedDoc : currentComparisonDoc?.version // the `version` key is only present on `versions` documents
49
- ;
50
- const canUpdate = docPermissions?.update?.permission;
51
- return /*#__PURE__*/ _jsxs("main", {
52
- className: baseClass,
53
- children: [
54
- /*#__PURE__*/ _jsx(SetViewActions, {
55
- actions: componentMap?.actionsMap?.Edit?.Version
56
- }),
57
- /*#__PURE__*/ _jsx(SetStepNav, {
58
- collectionConfig: collectionConfig,
59
- collectionSlug: collectionSlug,
60
- doc: doc,
61
- fieldMap: fieldMap,
62
- globalConfig: globalConfig,
63
- globalSlug: globalSlug,
64
- id: id,
65
- mostRecentDoc: mostRecentDoc
66
- }),
67
- /*#__PURE__*/ _jsxs(Gutter, {
68
- className: `${baseClass}__wrap`,
69
- children: [
70
- /*#__PURE__*/ _jsxs("div", {
71
- className: `${baseClass}__header-wrap`,
72
- children: [
73
- /*#__PURE__*/ _jsx("p", {
74
- className: `${baseClass}__created-at`,
75
- children: i18n.t('version:versionCreatedOn', {
76
- version: i18n.t(doc?.autosave ? 'version:autosavedVersion' : 'version:version')
77
- })
78
- }),
79
- /*#__PURE__*/ _jsxs("header", {
80
- className: `${baseClass}__header`,
81
- children: [
82
- /*#__PURE__*/ _jsx("h2", {
83
- children: formattedCreatedAt
84
- }),
85
- canUpdate && /*#__PURE__*/ _jsx(Restore, {
86
- className: `${baseClass}__restore`,
87
- collectionSlug: collectionSlug,
88
- globalSlug: globalSlug,
89
- label: collectionConfig?.labels.singular || globalConfig?.label,
90
- originalDocID: id,
91
- versionDate: formattedCreatedAt,
92
- versionID: versionID
93
- })
94
- ]
95
- })
96
- ]
97
- }),
98
- /*#__PURE__*/ _jsxs("div", {
99
- className: `${baseClass}__controls`,
100
- children: [
101
- /*#__PURE__*/ _jsx(SelectComparison, {
102
- baseURL: compareBaseURL,
103
- onChange: setCompareValue,
104
- parentID: id,
105
- publishedDoc: publishedDoc,
106
- value: compareValue,
107
- versionID: versionID
108
- }),
109
- localization && /*#__PURE__*/ _jsx(SelectLocales, {
110
- onChange: setLocales,
111
- options: localeOptions,
112
- value: locales
113
- })
114
- ]
115
- }),
116
- doc?.version && /*#__PURE__*/ _jsx(RenderFieldsToDiff, {
117
- comparison: comparison,
118
- diffComponents: diffComponents,
119
- fieldMap: fieldMap,
120
- fieldPermissions: docPermissions?.fields,
121
- i18n: i18n,
122
- locales: locales ? locales.map(({ label })=>typeof label === 'string' ? label : undefined) : [],
123
- version: globalConfig ? {
124
- ...doc?.version,
125
- createdAt: doc?.version?.createdAt || doc.createdAt,
126
- updatedAt: doc?.version?.updatedAt || doc.updatedAt
127
- } : doc?.version
128
- })
129
- ]
130
- })
131
- ]
128
+ $[11] = localization;
129
+ $[12] = localeOptions;
130
+ $[13] = locales;
131
+ $[14] = t9;
132
+ } else {
133
+ t9 = $[14];
134
+ }
135
+ let t10;
136
+ if ($[15] !== doc || $[16] !== docPermissions || $[17] !== collectionConfig || $[18] !== globalConfig || $[19] !== comparison || $[20] !== i18n || $[21] !== localeValues) {
137
+ t10 = doc?.version && _jsx(RenderFieldsToDiff, {
138
+ comparison,
139
+ diffComponents,
140
+ fieldPermissions: docPermissions?.fields,
141
+ fields: (collectionConfig || globalConfig)?.fields,
142
+ i18n,
143
+ locales: localeValues,
144
+ version: globalConfig ? {
145
+ ...doc?.version,
146
+ createdAt: doc?.version?.createdAt || doc.createdAt,
147
+ updatedAt: doc?.version?.updatedAt || doc.updatedAt
148
+ } : doc?.version
132
149
  });
150
+ $[15] = doc;
151
+ $[16] = docPermissions;
152
+ $[17] = collectionConfig;
153
+ $[18] = globalConfig;
154
+ $[19] = comparison;
155
+ $[20] = i18n;
156
+ $[21] = localeValues;
157
+ $[22] = t10;
158
+ } else {
159
+ t10 = $[22];
160
+ }
161
+ return _jsxs("main", {
162
+ className: baseClass,
163
+ children: [_jsx(SetStepNav, {
164
+ collectionConfig,
165
+ collectionSlug,
166
+ doc,
167
+ fields: (collectionConfig || globalConfig)?.fields,
168
+ globalConfig,
169
+ globalSlug,
170
+ id
171
+ }), _jsxs(Gutter, {
172
+ className: `${baseClass}__wrap`,
173
+ children: [_jsxs("div", {
174
+ className: `${baseClass}__header-wrap`,
175
+ children: [_jsx("p", {
176
+ className: `${baseClass}__created-at`,
177
+ children: i18n.t("version:versionCreatedOn", {
178
+ version: i18n.t(doc?.autosave ? "version:autosavedVersion" : "version:version")
179
+ })
180
+ }), _jsxs("header", {
181
+ className: `${baseClass}__header`,
182
+ children: [_jsx("h2", {
183
+ children: versionCreatedAt
184
+ }), canUpdate && _jsx(Restore, {
185
+ className: `${baseClass}__restore`,
186
+ collectionSlug,
187
+ globalSlug,
188
+ label: collectionConfig?.labels.singular || globalConfig?.label,
189
+ originalDocID: id,
190
+ status: doc?.version?._status,
191
+ versionDate: versionCreatedAt,
192
+ versionID
193
+ })]
194
+ })]
195
+ }), _jsxs("div", {
196
+ className: `${baseClass}__controls`,
197
+ children: [_jsx(SelectComparison, {
198
+ baseURL: compareBaseURL,
199
+ draftsEnabled,
200
+ latestDraftVersion,
201
+ latestPublishedVersion,
202
+ onChange: setCompareValue,
203
+ parentID: id,
204
+ value: compareValue,
205
+ versionID
206
+ }), t9]
207
+ }), t10]
208
+ })]
209
+ });
133
210
  };
134
-
211
+ function _temp(locale) {
212
+ return locale.value;
213
+ }
135
214
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/views/Version/Default/index.tsx"],"sourcesContent":["'use client'\nimport type { OptionObject } from 'payload'\n\nimport {\n Gutter,\n SetViewActions,\n useComponentMap,\n useConfig,\n useDocumentInfo,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui/client'\nimport { formatDate } from '@payloadcms/ui/shared'\nimport React, { useState } from 'react'\n\nimport type { CompareOption, DefaultVersionsViewProps } from './types.js'\n\nimport diffComponents from '../RenderFieldsToDiff/fields/index.js'\nimport RenderFieldsToDiff from '../RenderFieldsToDiff/index.js'\nimport Restore from '../Restore/index.js'\nimport { SelectComparison } from '../SelectComparison/index.js'\nimport { SelectLocales } from '../SelectLocales/index.js'\nimport { mostRecentVersionOption } from '../shared.js'\nimport { SetStepNav } from './SetStepNav.js'\nimport './index.scss'\n\nconst baseClass = 'view-version'\n\nexport const DefaultVersionView: React.FC<DefaultVersionsViewProps> = ({\n doc,\n docPermissions,\n initialComparisonDoc,\n localeOptions,\n mostRecentDoc,\n publishedDoc,\n versionID,\n}) => {\n const config = useConfig()\n\n const { i18n } = useTranslation()\n const { id, collectionSlug, globalSlug } = useDocumentInfo()\n\n const { getComponentMap, getFieldMap } = useComponentMap()\n\n const componentMap = getComponentMap({ collectionSlug, globalSlug })\n\n const [fieldMap] = useState(() => getFieldMap({ collectionSlug, globalSlug }))\n\n const [collectionConfig] = useState(() =>\n config.collections.find((collection) => collection.slug === collectionSlug),\n )\n\n const [globalConfig] = useState(() => config.globals.find((global) => global.slug === globalSlug))\n\n const [locales, setLocales] = useState<OptionObject[]>(localeOptions)\n const [compareValue, setCompareValue] = useState<CompareOption>(mostRecentVersionOption)\n\n const {\n admin: { dateFormat },\n localization,\n routes: { api: apiRoute },\n serverURL,\n } = config\n\n const formattedCreatedAt = doc?.createdAt\n ? formatDate({ date: doc.createdAt, i18n, pattern: dateFormat })\n : ''\n\n const originalDocFetchURL = `${serverURL}${apiRoute}/${globalSlug ? 'globals/' : ''}${\n collectionSlug || globalSlug\n }${collectionSlug ? `/${id}` : ''}`\n\n const compareBaseURL = `${serverURL}${apiRoute}/${globalSlug ? 'globals/' : ''}${\n collectionSlug || globalSlug\n }/versions`\n\n const compareFetchURL =\n compareValue?.value === 'mostRecent' || compareValue?.value === 'published'\n ? originalDocFetchURL\n : `${compareBaseURL}/${compareValue.value}`\n\n const [{ data: currentComparisonDoc }] = usePayloadAPI(compareFetchURL, {\n initialData: initialComparisonDoc,\n initialParams: { depth: 1, draft: 'true', locale: '*' },\n })\n\n const comparison =\n compareValue?.value === 'mostRecent'\n ? mostRecentDoc\n : compareValue?.value === 'published'\n ? publishedDoc\n : currentComparisonDoc?.version // the `version` key is only present on `versions` documents\n\n const canUpdate = docPermissions?.update?.permission\n\n return (\n <main className={baseClass}>\n <SetViewActions actions={componentMap?.actionsMap?.Edit?.Version} />\n <SetStepNav\n collectionConfig={collectionConfig}\n collectionSlug={collectionSlug}\n doc={doc}\n fieldMap={fieldMap}\n globalConfig={globalConfig}\n globalSlug={globalSlug}\n id={id}\n mostRecentDoc={mostRecentDoc}\n />\n <Gutter className={`${baseClass}__wrap`}>\n <div className={`${baseClass}__header-wrap`}>\n <p className={`${baseClass}__created-at`}>\n {i18n.t('version:versionCreatedOn', {\n version: i18n.t(doc?.autosave ? 'version:autosavedVersion' : 'version:version'),\n })}\n </p>\n <header className={`${baseClass}__header`}>\n <h2>{formattedCreatedAt}</h2>\n {canUpdate && (\n <Restore\n className={`${baseClass}__restore`}\n collectionSlug={collectionSlug}\n globalSlug={globalSlug}\n label={collectionConfig?.labels.singular || globalConfig?.label}\n originalDocID={id}\n versionDate={formattedCreatedAt}\n versionID={versionID}\n />\n )}\n </header>\n </div>\n <div className={`${baseClass}__controls`}>\n <SelectComparison\n baseURL={compareBaseURL}\n onChange={setCompareValue}\n parentID={id}\n publishedDoc={publishedDoc}\n value={compareValue}\n versionID={versionID}\n />\n {localization && (\n <SelectLocales onChange={setLocales} options={localeOptions} value={locales} />\n )}\n </div>\n {doc?.version && (\n <RenderFieldsToDiff\n comparison={comparison}\n diffComponents={diffComponents}\n fieldMap={fieldMap}\n fieldPermissions={docPermissions?.fields}\n i18n={i18n}\n locales={\n locales\n ? locales.map(({ label }) => (typeof label === 'string' ? label : undefined))\n : []\n }\n version={\n globalConfig\n ? {\n ...doc?.version,\n createdAt: doc?.version?.createdAt || doc.createdAt,\n updatedAt: doc?.version?.updatedAt || doc.updatedAt,\n }\n : doc?.version\n }\n />\n )}\n </Gutter>\n </main>\n )\n}\n"],"names":["Gutter","SetViewActions","useComponentMap","useConfig","useDocumentInfo","usePayloadAPI","useTranslation","formatDate","React","useState","diffComponents","RenderFieldsToDiff","Restore","SelectComparison","SelectLocales","mostRecentVersionOption","SetStepNav","baseClass","DefaultVersionView","doc","docPermissions","initialComparisonDoc","localeOptions","mostRecentDoc","publishedDoc","versionID","config","i18n","id","collectionSlug","globalSlug","getComponentMap","getFieldMap","componentMap","fieldMap","collectionConfig","collections","find","collection","slug","globalConfig","globals","global","locales","setLocales","compareValue","setCompareValue","admin","dateFormat","localization","routes","api","apiRoute","serverURL","formattedCreatedAt","createdAt","date","pattern","originalDocFetchURL","compareBaseURL","compareFetchURL","value","data","currentComparisonDoc","initialData","initialParams","depth","draft","locale","comparison","version","canUpdate","update","permission","main","className","actions","actionsMap","Edit","Version","div","p","t","autosave","header","h2","label","labels","singular","originalDocID","versionDate","baseURL","onChange","parentID","options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WAAWA,QAAQY,aAChE,EAAE;wBAER5B,SACE9B,eACI;4BACE,GAAGrB,KAAKmD,OAAO;4BACff,WAAWpC,KAAKmD,SAASf,aAAapC,IAAIoC,SAAS;4BACnD4C,WAAWhF,KAAKmD,SAAS6B,aAAahF,IAAIgF,SAAS;wBACrD,IACAhF,KAAKmD;;;;;;AAOvB,EAAC"}
1
+ {"version":3,"file":"index.js","names":["c","_c","Gutter","useConfig","useDocumentInfo","usePayloadAPI","useTranslation","formatDate","React","useState","diffComponents","RenderFieldsToDiff","Restore","SelectComparison","SelectLocales","SetStepNav","baseClass","DefaultVersionView","t0","$","doc","docPermissions","initialComparisonDoc","latestDraftVersion","latestPublishedVersion","localeOptions","versionID","config","getEntityConfig","i18n","id","collectionSlug","globalSlug","t1","collectionConfig","t2","globalConfig","locales","setLocales","compareValue","setCompareValue","admin","t3","localization","routes","t4","serverURL","dateFormat","api","apiRoute","versionCreatedAt","updatedAt","date","pattern","compareBaseURL","compareFetchURL","value","t5","Symbol","for","depth","draft","locale","t6","initialData","initialParams","t7","data","currentComparisonDoc","comparison","version","canUpdate","update","permission","t8","map","_temp","localeValues","draftsEnabled","Boolean","versions","drafts","t9","_jsx","onChange","options","t10","fieldPermissions","fields","createdAt","_jsxs","className","children","t","autosave","label","labels","singular","originalDocID","status","_status","versionDate","baseURL","parentID"],"sources":["../../../../src/views/Version/Default/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, ClientGlobalConfig, OptionObject } from 'payload'\n\nimport { Gutter, useConfig, useDocumentInfo, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { formatDate } from '@payloadcms/ui/shared'\nimport React, { useState } from 'react'\n\nimport type { CompareOption, DefaultVersionsViewProps } from './types.js'\n\nimport { diffComponents } from '../RenderFieldsToDiff/fields/index.js'\nimport RenderFieldsToDiff from '../RenderFieldsToDiff/index.js'\nimport Restore from '../Restore/index.js'\nimport { SelectComparison } from '../SelectComparison/index.js'\nimport { SelectLocales } from '../SelectLocales/index.js'\nimport './index.scss'\nimport { SetStepNav } from './SetStepNav.js'\n\nconst baseClass = 'view-version'\n\nexport const DefaultVersionView: React.FC<DefaultVersionsViewProps> = ({\n doc,\n docPermissions,\n initialComparisonDoc,\n latestDraftVersion,\n latestPublishedVersion,\n localeOptions,\n versionID,\n}) => {\n const { config, getEntityConfig } = useConfig()\n\n const { i18n } = useTranslation()\n const { id, collectionSlug, globalSlug } = useDocumentInfo()\n\n const [collectionConfig] = useState(\n () => getEntityConfig({ collectionSlug }) as ClientCollectionConfig,\n )\n\n const [globalConfig] = useState(() => getEntityConfig({ globalSlug }) as ClientGlobalConfig)\n\n const [locales, setLocales] = useState<OptionObject[]>(localeOptions)\n\n const [compareValue, setCompareValue] = useState<CompareOption>()\n\n const {\n admin: { dateFormat },\n localization,\n routes: { api: apiRoute },\n serverURL,\n } = config\n\n const versionCreatedAt = doc?.updatedAt\n ? formatDate({ date: doc.updatedAt, i18n, pattern: dateFormat })\n : ''\n\n const compareBaseURL = `${serverURL}${apiRoute}/${globalSlug ? 'globals/' : ''}${\n collectionSlug || globalSlug\n }/versions`\n\n const compareFetchURL = compareValue?.value && `${compareBaseURL}/${compareValue.value}`\n\n const [{ data: currentComparisonDoc }] = usePayloadAPI(compareFetchURL, {\n initialData: initialComparisonDoc,\n initialParams: { depth: 1, draft: 'true', locale: 'all' },\n })\n\n const comparison = compareValue?.value && currentComparisonDoc?.version // the `version` key is only present on `versions` documents\n\n const canUpdate = docPermissions?.update?.permission\n\n const localeValues = locales && locales.map((locale) => locale.value)\n\n const draftsEnabled = Boolean((collectionConfig || globalConfig)?.versions.drafts)\n\n return (\n <main className={baseClass}>\n <SetStepNav\n collectionConfig={collectionConfig}\n collectionSlug={collectionSlug}\n doc={doc}\n fields={(collectionConfig || globalConfig)?.fields}\n globalConfig={globalConfig}\n globalSlug={globalSlug}\n id={id}\n />\n <Gutter className={`${baseClass}__wrap`}>\n <div className={`${baseClass}__header-wrap`}>\n <p className={`${baseClass}__created-at`}>\n {i18n.t('version:versionCreatedOn', {\n version: i18n.t(doc?.autosave ? 'version:autosavedVersion' : 'version:version'),\n })}\n </p>\n <header className={`${baseClass}__header`}>\n <h2>{versionCreatedAt}</h2>\n {canUpdate && (\n <Restore\n className={`${baseClass}__restore`}\n collectionSlug={collectionSlug}\n globalSlug={globalSlug}\n label={collectionConfig?.labels.singular || globalConfig?.label}\n originalDocID={id}\n status={doc?.version?._status}\n versionDate={versionCreatedAt}\n versionID={versionID}\n />\n )}\n </header>\n </div>\n <div className={`${baseClass}__controls`}>\n <SelectComparison\n baseURL={compareBaseURL}\n draftsEnabled={draftsEnabled}\n latestDraftVersion={latestDraftVersion}\n latestPublishedVersion={latestPublishedVersion}\n onChange={setCompareValue}\n parentID={id}\n value={compareValue}\n versionID={versionID}\n />\n {localization && (\n <SelectLocales onChange={setLocales} options={localeOptions} value={locales} />\n )}\n </div>\n {doc?.version && (\n <RenderFieldsToDiff\n comparison={comparison}\n diffComponents={diffComponents}\n fieldPermissions={docPermissions?.fields}\n fields={(collectionConfig || globalConfig)?.fields}\n i18n={i18n}\n locales={localeValues}\n version={\n globalConfig\n ? {\n ...doc?.version,\n createdAt: doc?.version?.createdAt || doc.createdAt,\n updatedAt: doc?.version?.updatedAt || doc.updatedAt,\n }\n : doc?.version\n }\n />\n )}\n </Gutter>\n </main>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,aAAa,EAAEC,cAAc,QAAQ;AAClF,SAASC,UAAU,QAAQ;AAC3B,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAIhC,SAASC,cAAc,QAAQ;AAC/B,OAAOC,kBAAA,MAAwB;AAC/B,OAAOC,OAAA,MAAa;AACpB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,aAAa,QAAQ;AAE9B,SAASC,UAAU,QAAQ;AAE3B,MAAMC,SAAA,GAAY;AAElB,OAA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oreList":[]}
@@ -1,70 +1,72 @@
1
1
  @import '../../../scss/styles.scss';
2
2
 
3
- .view-version {
4
- width: 100%;
5
- padding-bottom: var(--spacing-view-bottom);
3
+ @layer payload-default {
4
+ .view-version {
5
+ width: 100%;
6
+ padding-bottom: var(--spacing-view-bottom);
6
7
 
7
- &__wrap {
8
- padding-top: calc(var(--base) * 1.5);
9
- display: flex;
10
- flex-direction: column;
11
- gap: var(--base);
12
- }
13
-
14
- &__header-wrap {
15
- display: flex;
16
- flex-direction: column;
17
- gap: calc(var(--base) / 4);
18
- }
19
-
20
- &__header {
21
- display: flex;
22
- align-items: center;
23
- flex-wrap: wrap;
24
-
25
- h2 {
26
- margin: 0;
8
+ &__wrap {
9
+ padding-top: calc(var(--base) * 1.5);
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: var(--base);
27
13
  }
28
- }
29
14
 
30
- &__created-at {
31
- margin: 0;
32
- color: var(--theme-elevation-500);
33
- }
15
+ &__header-wrap {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: calc(var(--base) / 4);
19
+ }
34
20
 
35
- &__controls {
36
- display: flex;
37
- gap: var(--base);
21
+ &__header {
22
+ display: flex;
23
+ align-items: center;
24
+ flex-wrap: wrap;
38
25
 
39
- > * {
40
- flex-basis: 100%;
26
+ h2 {
27
+ margin: 0;
28
+ }
41
29
  }
42
- }
43
-
44
- &__restore {
45
- margin: 0 0 0 var(--base);
46
- }
47
30
 
48
- @include mid-break {
49
- &__intro,
50
- &__header {
51
- display: block;
31
+ &__created-at {
32
+ margin: 0;
33
+ color: var(--theme-elevation-500);
52
34
  }
53
35
 
54
36
  &__controls {
55
- flex-direction: column;
56
- gap: calc(var(--base) / 4);
37
+ display: flex;
38
+ gap: var(--base);
39
+
40
+ > * {
41
+ flex-basis: 100%;
42
+ }
57
43
  }
58
44
 
59
45
  &__restore {
60
- margin: calc(var(--base) * 0.5) 0 0 0;
46
+ margin: 0 0 0 var(--base);
61
47
  }
62
- }
63
48
 
64
- @include small-break {
65
- &__wrap {
66
- padding-top: calc(var(--base) / 2);
67
- gap: calc(var(--base) / 2);
49
+ @include mid-break {
50
+ &__intro,
51
+ &__header {
52
+ display: block;
53
+ }
54
+
55
+ &__controls {
56
+ flex-direction: column;
57
+ gap: calc(var(--base) / 4);
58
+ }
59
+
60
+ &__restore {
61
+ margin: calc(var(--base) * 0.5) 0 0 0;
62
+ }
63
+ }
64
+
65
+ @include small-break {
66
+ &__wrap {
67
+ padding-top: calc(var(--base) / 2);
68
+ gap: calc(var(--base) / 2);
69
+ }
68
70
  }
69
71
  }
70
72
  }
@@ -1,17 +1,17 @@
1
1
  import type { CollectionPermission, Document, GlobalPermission, OptionObject } from 'payload';
2
2
  export type CompareOption = {
3
- label: string;
3
+ label: React.ReactNode | string;
4
4
  options?: CompareOption[];
5
5
  relationTo?: string;
6
6
  value: string;
7
7
  };
8
8
  export type DefaultVersionsViewProps = {
9
- doc: Document;
10
- docPermissions: CollectionPermission | GlobalPermission;
11
- initialComparisonDoc: Document;
12
- localeOptions: OptionObject[];
13
- mostRecentDoc: Document;
14
- publishedDoc: Document;
15
- versionID?: string;
9
+ readonly doc: Document;
10
+ readonly docPermissions: CollectionPermission | GlobalPermission;
11
+ readonly initialComparisonDoc: Document;
12
+ readonly latestDraftVersion?: string;
13
+ readonly latestPublishedVersion?: string;
14
+ readonly localeOptions: OptionObject[];
15
+ readonly versionID?: string;
16
16
  };
17
17
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/Default/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE7F,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,aAAa,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,QAAQ,CAAA;IACb,cAAc,EAAE,oBAAoB,GAAG,gBAAgB,CAAA;IACvD,oBAAoB,EAAE,QAAQ,CAAA;IAC9B,aAAa,EAAE,YAAY,EAAE,CAAA;IAC7B,aAAa,EAAE,QAAQ,CAAA;IACvB,YAAY,EAAE,QAAQ,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/Default/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE7F,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IAC/B,OAAO,CAAC,EAAE,aAAa,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;IACtB,QAAQ,CAAC,cAAc,EAAE,oBAAoB,GAAG,gBAAgB,CAAA;IAChE,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAA;IACvC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;IACxC,QAAQ,CAAC,aAAa,EAAE,YAAY,EAAE,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA"}
@@ -1,3 +1,2 @@
1
- export { };
2
-
1
+ export {};
3
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/views/Version/Default/types.ts"],"sourcesContent":["import type { CollectionPermission, Document, GlobalPermission, OptionObject } from 'payload'\n\nexport type CompareOption = {\n label: string\n options?: CompareOption[]\n relationTo?: string\n value: string\n}\n\nexport type DefaultVersionsViewProps = {\n doc: Document\n docPermissions: CollectionPermission | GlobalPermission\n initialComparisonDoc: Document\n localeOptions: OptionObject[]\n mostRecentDoc: Document\n publishedDoc: Document\n versionID?: string\n}\n"],"names":[],"rangeMappings":"","mappings":"AASA,WAQC"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/views/Version/Default/types.ts"],"sourcesContent":["import type { CollectionPermission, Document, GlobalPermission, OptionObject } from 'payload'\n\nexport type CompareOption = {\n label: React.ReactNode | string\n options?: CompareOption[]\n relationTo?: string\n value: string\n}\n\nexport type DefaultVersionsViewProps = {\n readonly doc: Document\n readonly docPermissions: CollectionPermission | GlobalPermission\n readonly initialComparisonDoc: Document\n readonly latestDraftVersion?: string\n readonly latestPublishedVersion?: string\n readonly localeOptions: OptionObject[]\n readonly versionID?: string\n}\n"],"mappings":"AASA","ignoreList":[]}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  const baseClass = 'field-diff-label';
4
- const Label = ({ children })=>/*#__PURE__*/ _jsx("div", {
5
- className: baseClass,
6
- children: children
7
- });
4
+ const Label = ({
5
+ children
6
+ }) => /*#__PURE__*/_jsx("div", {
7
+ className: baseClass,
8
+ children: children
9
+ });
8
10
  export default Label;
9
-
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/views/Version/RenderFieldsToDiff/Label/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nconst baseClass = 'field-diff-label'\n\nconst Label: React.FC<{ children?: React.ReactNode }> = ({ children }) => (\n <div className={baseClass}>{children}</div>\n)\n\nexport default Label\n"],"names":["React","baseClass","Label","children","div","className"],"rangeMappings":";;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,MAAMC,YAAY;AAElB,MAAMC,QAAkD,CAAC,EAAEC,QAAQ,EAAE,iBACnE,KAACC;QAAIC,WAAWJ;kBAAYE;;AAG9B,eAAeD,MAAK"}
1
+ {"version":3,"file":"index.js","names":["React","baseClass","Label","children","_jsx","className"],"sources":["../../../../../src/views/Version/RenderFieldsToDiff/Label/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nconst baseClass = 'field-diff-label'\n\nconst Label: React.FC<{ children?: React.ReactNode }> = ({ children }) => (\n <div className={baseClass}>{children}</div>\n)\n\nexport default Label\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAIlB,MAAMC,SAAA,GAAY;AAElB,MAAMC,KAAA,GAAkDA,CAAC;EAAEC;AAAQ,CAAE,kBACnEC,IAAA,CAAC;EAAIC,SAAA,EAAWJ,SAAA;YAAYE;;AAG9B,eAAeD,KAAA","ignoreList":[]}
@@ -1,4 +1,6 @@
1
- .field-diff-label {
2
- margin-bottom: calc(var(--base) * 0.25);
3
- font-weight: 600;
1
+ @layer payload-default {
2
+ .field-diff-label {
3
+ margin-bottom: calc(var(--base) * 0.25);
4
+ font-weight: 600;
5
+ }
4
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { Props } from '../types.js';
2
+ import type { DiffComponentProps } from '../types.js';
3
3
  import './index.scss';
4
- declare const Iterable: React.FC<Props>;
4
+ declare const Iterable: React.FC<DiffComponentProps>;
5
5
  export default Iterable;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Iterable/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAIxC,OAAO,cAAc,CAAA;AAIrB,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2G7B,CAAA;AAED,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Iterable/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIrD,OAAO,cAAc,CAAA;AAIrB,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgG1C,CAAA;AAED,eAAe,QAAQ,CAAA"}