@payloadcms/ui 4.0.0-internal.af6aad0 → 4.0.0-internal.b8a92d2

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 (855) hide show
  1. package/dist/css/app.css +1 -0
  2. package/dist/css/colors.css +9 -8
  3. package/dist/css/forms.css +1 -0
  4. package/dist/css/preflight.css +1 -0
  5. package/dist/css/spacing.css +12 -0
  6. package/dist/css/typography.css +158 -14
  7. package/dist/elements/APIKeyInput/index.d.ts +2 -0
  8. package/dist/elements/APIKeyInput/index.d.ts.map +1 -1
  9. package/dist/elements/APIKeyInput/index.js +27 -29
  10. package/dist/elements/APIKeyInput/index.js.map +1 -1
  11. package/dist/elements/AddNewRelation/index.css +4 -0
  12. package/dist/elements/AddNewRelation/index.js +2 -2
  13. package/dist/elements/AddNewRelation/index.js.map +1 -1
  14. package/dist/elements/AppHeader/EditViewWidthSettings/index.css +5 -0
  15. package/dist/elements/AppHeader/EditViewWidthSettings/index.d.ts +4 -0
  16. package/dist/elements/AppHeader/EditViewWidthSettings/index.d.ts.map +1 -0
  17. package/dist/elements/AppHeader/EditViewWidthSettings/index.js +77 -0
  18. package/dist/elements/AppHeader/EditViewWidthSettings/index.js.map +1 -0
  19. package/dist/{icons/CollapseLayers → elements/AppHeader/SettingsMenu}/index.css +1 -1
  20. package/dist/elements/AppHeader/SettingsMenu/index.d.ts +4 -0
  21. package/dist/elements/AppHeader/SettingsMenu/index.d.ts.map +1 -0
  22. package/dist/elements/AppHeader/SettingsMenu/index.js +59 -0
  23. package/dist/elements/AppHeader/SettingsMenu/index.js.map +1 -0
  24. package/dist/elements/AppHeader/TypeSizeSettings/index.d.ts +3 -0
  25. package/dist/elements/AppHeader/TypeSizeSettings/index.d.ts.map +1 -0
  26. package/dist/elements/AppHeader/TypeSizeSettings/index.js +58 -0
  27. package/dist/elements/AppHeader/TypeSizeSettings/index.js.map +1 -0
  28. package/dist/elements/AppHeader/index.css +3 -4
  29. package/dist/elements/AppHeader/index.d.ts +8 -1
  30. package/dist/elements/AppHeader/index.d.ts.map +1 -1
  31. package/dist/elements/AppHeader/index.js +16 -6
  32. package/dist/elements/AppHeader/index.js.map +1 -1
  33. package/dist/elements/Autosave/index.d.ts.map +1 -1
  34. package/dist/elements/Autosave/index.js +2 -3
  35. package/dist/elements/Autosave/index.js.map +1 -1
  36. package/dist/elements/Banner/index.css +4 -0
  37. package/dist/elements/Banner/index.d.ts.map +1 -1
  38. package/dist/elements/Banner/index.js +1 -0
  39. package/dist/elements/Banner/index.js.map +1 -1
  40. package/dist/elements/BulkUpload/ActionsBar/index.css +1 -0
  41. package/dist/elements/BulkUpload/AddingFilesView/index.css +2 -4
  42. package/dist/elements/BulkUpload/FileSidebar/index.css +1 -0
  43. package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts +1 -1
  44. package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts.map +1 -1
  45. package/dist/elements/BulkUpload/FormsManager/createFormData.js +7 -3
  46. package/dist/elements/BulkUpload/FormsManager/createFormData.js.map +1 -1
  47. package/dist/elements/BulkUpload/FormsManager/index.d.ts.map +1 -1
  48. package/dist/elements/BulkUpload/FormsManager/index.js +18 -12
  49. package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
  50. package/dist/elements/BulkUpload/index.css +2 -0
  51. package/dist/elements/Button/index.css +0 -23
  52. package/dist/elements/Button/types.d.ts +1 -1
  53. package/dist/elements/Button/types.d.ts.map +1 -1
  54. package/dist/elements/Button/types.js.map +1 -1
  55. package/dist/elements/Collapsible/index.css +1 -0
  56. package/dist/elements/CopyLocaleData/index.d.ts.map +1 -1
  57. package/dist/elements/CopyLocaleData/index.js +8 -9
  58. package/dist/elements/CopyLocaleData/index.js.map +1 -1
  59. package/dist/elements/DatePicker/index.css +2 -0
  60. package/dist/elements/DefaultListViewTabs/index.css +0 -1
  61. package/dist/elements/DefaultListViewTabs/index.d.ts.map +1 -1
  62. package/dist/elements/DefaultListViewTabs/index.js +62 -84
  63. package/dist/elements/DefaultListViewTabs/index.js.map +1 -1
  64. package/dist/elements/DeleteMany/index.d.ts.map +1 -1
  65. package/dist/elements/DeleteMany/index.js +2 -3
  66. package/dist/elements/DeleteMany/index.js.map +1 -1
  67. package/dist/elements/Dialog/index.css +1 -0
  68. package/dist/elements/DocumentControls/index.css +1 -0
  69. package/dist/elements/DocumentDrawer/types.d.ts +1 -1
  70. package/dist/elements/DocumentDrawer/types.d.ts.map +1 -1
  71. package/dist/elements/DocumentDrawer/types.js.map +1 -1
  72. package/dist/elements/DocumentFields/index.css +2 -0
  73. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts +1 -0
  74. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
  75. package/dist/elements/DocumentHeader/Tabs/Tab/index.js +3 -2
  76. package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
  77. package/dist/elements/DocumentHeader/Tabs/index.css +1 -0
  78. package/dist/elements/DocumentHeader/Tabs/index.d.ts +1 -0
  79. package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
  80. package/dist/elements/DocumentHeader/Tabs/index.js +5 -3
  81. package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
  82. package/dist/elements/DocumentHeader/index.css +1 -0
  83. package/dist/elements/DocumentHeader/index.d.ts +1 -0
  84. package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
  85. package/dist/elements/DocumentHeader/index.js +4 -2
  86. package/dist/elements/DocumentHeader/index.js.map +1 -1
  87. package/dist/elements/Drawer/types.d.ts +2 -2
  88. package/dist/elements/Drawer/types.d.ts.map +1 -1
  89. package/dist/elements/Drawer/types.js.map +1 -1
  90. package/dist/elements/DuplicateDocument/index.d.ts.map +1 -1
  91. package/dist/elements/DuplicateDocument/index.js +2 -3
  92. package/dist/elements/DuplicateDocument/index.js.map +1 -1
  93. package/dist/elements/EditMany/DrawerContent.d.ts.map +1 -1
  94. package/dist/elements/EditMany/DrawerContent.js +2 -3
  95. package/dist/elements/EditMany/DrawerContent.js.map +1 -1
  96. package/dist/elements/EditUpload/index.css +1 -1
  97. package/dist/elements/FieldDiffContainer/index.css +1 -0
  98. package/dist/elements/FieldDiffLabel/index.css +1 -0
  99. package/dist/elements/FileDetails/StaticFileDetails/index.css +2 -0
  100. package/dist/elements/HTMLDiff/index.css +1 -0
  101. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.css +4 -22
  102. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.d.ts.map +1 -1
  103. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js +49 -68
  104. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js.map +1 -1
  105. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.css +15 -100
  106. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.d.ts.map +1 -1
  107. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js +137 -97
  108. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js.map +1 -1
  109. package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts +1 -1
  110. package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts.map +1 -1
  111. package/dist/elements/Hierarchy/ColumnBrowser/index.js +23 -51
  112. package/dist/elements/Hierarchy/ColumnBrowser/index.js.map +1 -1
  113. package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +3 -26
  114. package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts.map +1 -1
  115. package/dist/elements/Hierarchy/ColumnBrowser/types.js.map +1 -1
  116. package/dist/elements/Hierarchy/DocHeaderButton/index.d.ts.map +1 -1
  117. package/dist/elements/Hierarchy/DocHeaderButton/index.js +1 -6
  118. package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
  119. package/dist/elements/Hierarchy/DocHeaderButton/index.server.js +3 -1
  120. package/dist/elements/Hierarchy/DocHeaderButton/index.server.js.map +1 -1
  121. package/dist/elements/Hierarchy/Field/SelectedHierarchies.css +36 -0
  122. package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts +13 -0
  123. package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts.map +1 -0
  124. package/dist/elements/Hierarchy/Field/SelectedHierarchies.js +141 -0
  125. package/dist/elements/Hierarchy/Field/SelectedHierarchies.js.map +1 -0
  126. package/dist/elements/Hierarchy/Field/index.client.d.ts +0 -5
  127. package/dist/elements/Hierarchy/Field/index.client.d.ts.map +1 -1
  128. package/dist/elements/Hierarchy/Field/index.client.js +95 -120
  129. package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
  130. package/dist/elements/Hierarchy/Field/index.css +34 -3
  131. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts +4 -18
  132. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -1
  133. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js +24 -88
  134. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -1
  135. package/dist/elements/Hierarchy/Modal/index.css +53 -4
  136. package/dist/elements/Hierarchy/Modal/index.d.ts +2 -5
  137. package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -1
  138. package/dist/elements/Hierarchy/Modal/index.js +99 -136
  139. package/dist/elements/Hierarchy/Modal/index.js.map +1 -1
  140. package/dist/elements/Hierarchy/Modal/types.d.ts +0 -15
  141. package/dist/elements/Hierarchy/Modal/types.d.ts.map +1 -1
  142. package/dist/elements/Hierarchy/Modal/types.js.map +1 -1
  143. package/dist/elements/Hierarchy/MoveMany/index.d.ts +3 -7
  144. package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
  145. package/dist/elements/Hierarchy/MoveMany/index.js +171 -45
  146. package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
  147. package/dist/elements/Hierarchy/Search/index.css +9 -2
  148. package/dist/elements/Hierarchy/Search/index.d.ts.map +1 -1
  149. package/dist/elements/Hierarchy/Search/index.js +73 -6
  150. package/dist/elements/Hierarchy/Search/index.js.map +1 -1
  151. package/dist/elements/Hierarchy/Search/types.d.ts +6 -2
  152. package/dist/elements/Hierarchy/Search/types.d.ts.map +1 -1
  153. package/dist/elements/Hierarchy/Search/types.js.map +1 -1
  154. package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
  155. package/dist/elements/Hierarchy/Search/useHierarchySearch.js +2 -3
  156. package/dist/elements/Hierarchy/Search/useHierarchySearch.js.map +1 -1
  157. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts +4 -0
  158. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts.map +1 -1
  159. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js +186 -101
  160. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js.map +1 -1
  161. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.d.ts.map +1 -1
  162. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.js +21 -1
  163. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.js.map +1 -1
  164. package/dist/elements/Hierarchy/Tree/LoadMore/index.css +3 -3
  165. package/dist/elements/Hierarchy/Tree/TreeNode/index.css +29 -59
  166. package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts +1 -1
  167. package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts.map +1 -1
  168. package/dist/elements/Hierarchy/Tree/TreeNode/index.js +10 -54
  169. package/dist/elements/Hierarchy/Tree/TreeNode/index.js.map +1 -1
  170. package/dist/elements/Hierarchy/Tree/index.css +9 -8
  171. package/dist/elements/Hierarchy/Tree/index.d.ts.map +1 -1
  172. package/dist/elements/Hierarchy/Tree/index.js +47 -29
  173. package/dist/elements/Hierarchy/Tree/index.js.map +1 -1
  174. package/dist/elements/Hierarchy/Tree/types.d.ts +1 -9
  175. package/dist/elements/Hierarchy/Tree/types.d.ts.map +1 -1
  176. package/dist/elements/Hierarchy/Tree/types.js.map +1 -1
  177. package/dist/elements/Hierarchy/Tree/useChildren.d.ts.map +1 -1
  178. package/dist/elements/Hierarchy/Tree/useChildren.js +1 -11
  179. package/dist/elements/Hierarchy/Tree/useChildren.js.map +1 -1
  180. package/dist/elements/ItemsDrawer/index.css +3 -0
  181. package/dist/elements/ListControls/index.css +1 -0
  182. package/dist/elements/ListControls/index.d.ts.map +1 -1
  183. package/dist/elements/ListControls/index.js +7 -2
  184. package/dist/elements/ListControls/index.js.map +1 -1
  185. package/dist/elements/ListControls/types.d.ts +3 -5
  186. package/dist/elements/ListControls/types.d.ts.map +1 -1
  187. package/dist/elements/ListControls/types.js.map +1 -1
  188. package/dist/elements/ListControlsBar/index.css +1 -0
  189. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.d.ts.map +1 -1
  190. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js +3 -4
  191. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js.map +1 -1
  192. package/dist/elements/LivePreview/Window/index.css +1 -0
  193. package/dist/elements/LivePreview/Window/index.js +1 -1
  194. package/dist/elements/LivePreview/Window/index.js.map +1 -1
  195. package/dist/elements/Localizer/index.js +1 -1
  196. package/dist/elements/Localizer/index.js.map +1 -1
  197. package/dist/elements/Nav/NavSidebarToggle/index.js +1 -1
  198. package/dist/elements/Nav/NavSidebarToggle/index.js.map +1 -1
  199. package/dist/elements/Nav/NavWrapper/index.d.ts +0 -1
  200. package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -1
  201. package/dist/elements/Nav/NavWrapper/index.js +18 -12
  202. package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
  203. package/dist/elements/Nav/SidebarTabs/index.css +2 -1
  204. package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js +3 -2
  205. package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js.map +1 -1
  206. package/dist/elements/Nav/context.d.ts +1 -0
  207. package/dist/elements/Nav/context.d.ts.map +1 -1
  208. package/dist/elements/Nav/context.js +67 -92
  209. package/dist/elements/Nav/context.js.map +1 -1
  210. package/dist/elements/Nav/index.css +44 -47
  211. package/dist/elements/Nav/index.d.ts +0 -4
  212. package/dist/elements/Nav/index.d.ts.map +1 -1
  213. package/dist/elements/Nav/index.js +1 -16
  214. package/dist/elements/Nav/index.js.map +1 -1
  215. package/dist/elements/NavGroup/index.css +15 -29
  216. package/dist/elements/PageControls/index.css +1 -0
  217. package/dist/elements/PillSelector/index.css +1 -0
  218. package/dist/elements/Popup/PopupButtonList/index.css +16 -32
  219. package/dist/elements/Popup/index.css +0 -6
  220. package/dist/elements/Popup/index.d.ts +0 -10
  221. package/dist/elements/Popup/index.d.ts.map +1 -1
  222. package/dist/elements/Popup/index.js +5 -12
  223. package/dist/elements/Popup/index.js.map +1 -1
  224. package/dist/elements/PreviewSizes/index.css +2 -0
  225. package/dist/elements/PublishButton/ScheduleDrawer/index.d.ts.map +1 -1
  226. package/dist/elements/PublishButton/ScheduleDrawer/index.js +8 -30
  227. package/dist/elements/PublishButton/ScheduleDrawer/index.js.map +1 -1
  228. package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts +1 -1
  229. package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts.map +1 -1
  230. package/dist/elements/PublishButton/ScheduleDrawer/types.js.map +1 -1
  231. package/dist/elements/PublishButton/index.css +1 -0
  232. package/dist/elements/PublishButton/index.d.ts.map +1 -1
  233. package/dist/elements/PublishButton/index.js +16 -31
  234. package/dist/elements/PublishButton/index.js.map +1 -1
  235. package/dist/elements/PublishMany/DrawerContent.d.ts.map +1 -1
  236. package/dist/elements/PublishMany/DrawerContent.js +2 -3
  237. package/dist/elements/PublishMany/DrawerContent.js.map +1 -1
  238. package/dist/elements/QueryPresets/QueryPresetBar/index.d.ts.map +1 -1
  239. package/dist/elements/QueryPresets/QueryPresetBar/index.js +14 -1
  240. package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
  241. package/dist/elements/QueryPresets/fields/Heading/index.css +1 -0
  242. package/dist/elements/ReactSelect/types.d.ts +0 -5
  243. package/dist/elements/ReactSelect/types.d.ts.map +1 -1
  244. package/dist/elements/ReactSelect/types.js.map +1 -1
  245. package/dist/elements/RenderTitle/index.css +1 -0
  246. package/dist/elements/RestoreMany/index.d.ts.map +1 -1
  247. package/dist/elements/RestoreMany/index.js +2 -3
  248. package/dist/elements/RestoreMany/index.js.map +1 -1
  249. package/dist/elements/SaveDraftButton/index.d.ts.map +1 -1
  250. package/dist/elements/SaveDraftButton/index.js +2 -3
  251. package/dist/elements/SaveDraftButton/index.js.map +1 -1
  252. package/dist/elements/SelectAll/index.d.ts.map +1 -1
  253. package/dist/elements/SelectAll/index.js +2 -1
  254. package/dist/elements/SelectAll/index.js.map +1 -1
  255. package/dist/elements/SelectRow/index.d.ts.map +1 -1
  256. package/dist/elements/SelectRow/index.js +2 -1
  257. package/dist/elements/SelectRow/index.js.map +1 -1
  258. package/dist/elements/SidebarRow/index.css +5 -1
  259. package/dist/elements/SidebarToggle/index.css +1 -3
  260. package/dist/elements/Status/index.d.ts.map +1 -1
  261. package/dist/elements/Status/index.js +2 -3
  262. package/dist/elements/Status/index.js.map +1 -1
  263. package/dist/elements/StepNav/index.d.ts.map +1 -1
  264. package/dist/elements/StepNav/index.js +10 -14
  265. package/dist/elements/StepNav/index.js.map +1 -1
  266. package/dist/elements/StepNav/types.d.ts +0 -6
  267. package/dist/elements/StepNav/types.d.ts.map +1 -1
  268. package/dist/elements/StepNav/types.js.map +1 -1
  269. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.css +7 -5
  270. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.d.ts.map +1 -1
  271. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +3 -14
  272. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js.map +1 -1
  273. package/dist/elements/Table/OrderableTable.d.ts.map +1 -1
  274. package/dist/elements/Table/OrderableTable.js +2 -3
  275. package/dist/elements/Table/OrderableTable.js.map +1 -1
  276. package/dist/elements/Table/RelationshipProvider/index.d.ts.map +1 -1
  277. package/dist/elements/Table/RelationshipProvider/index.js +2 -3
  278. package/dist/elements/Table/RelationshipProvider/index.js.map +1 -1
  279. package/dist/elements/Table/index.css +1 -0
  280. package/dist/elements/TableSection/index.css +1 -0
  281. package/dist/elements/Tabs/index.css +1 -0
  282. package/dist/elements/Thumbnail/index.css +1 -0
  283. package/dist/elements/TimezonePicker/index.css +1 -0
  284. package/dist/elements/Tooltip/index.css +7 -0
  285. package/dist/elements/UnpublishButton/index.d.ts.map +1 -1
  286. package/dist/elements/UnpublishButton/index.js +3 -4
  287. package/dist/elements/UnpublishButton/index.js.map +1 -1
  288. package/dist/elements/UnpublishMany/DrawerContent.d.ts.map +1 -1
  289. package/dist/elements/UnpublishMany/DrawerContent.js +2 -3
  290. package/dist/elements/UnpublishMany/DrawerContent.js.map +1 -1
  291. package/dist/elements/UserMenu/LanguageMenu/index.d.ts.map +1 -1
  292. package/dist/elements/UserMenu/LanguageMenu/index.js +39 -83
  293. package/dist/elements/UserMenu/LanguageMenu/index.js.map +1 -1
  294. package/dist/elements/UserMenu/SettingsMenu/index.d.ts.map +1 -1
  295. package/dist/elements/UserMenu/SettingsMenu/index.js +21 -57
  296. package/dist/elements/UserMenu/SettingsMenu/index.js.map +1 -1
  297. package/dist/elements/UserMenu/ThemeMenu/index.d.ts.map +1 -1
  298. package/dist/elements/UserMenu/ThemeMenu/index.js +39 -83
  299. package/dist/elements/UserMenu/ThemeMenu/index.js.map +1 -1
  300. package/dist/elements/UserMenu/index.css +2 -32
  301. package/dist/elements/UserMenu/index.d.ts +0 -1
  302. package/dist/elements/UserMenu/index.d.ts.map +1 -1
  303. package/dist/elements/UserMenu/index.js +51 -77
  304. package/dist/elements/UserMenu/index.js.map +1 -1
  305. package/dist/elements/WhereBuilder/Condition/Relationship/index.js +1 -1
  306. package/dist/elements/WhereBuilder/Condition/Relationship/index.js.map +1 -1
  307. package/dist/elements/WhereBuilder/Condition/index.css +1 -0
  308. package/dist/elements/WhereBuilder/index.css +2 -0
  309. package/dist/exports/client/index.d.ts +2 -4
  310. package/dist/exports/client/index.d.ts.map +1 -1
  311. package/dist/exports/client/index.js +1 -1
  312. package/dist/exports/client/index.js.map +3 -3
  313. package/dist/exports/rsc/index.d.ts +2 -0
  314. package/dist/exports/rsc/index.d.ts.map +1 -1
  315. package/dist/exports/rsc/index.js +2 -0
  316. package/dist/exports/rsc/index.js.map +1 -1
  317. package/dist/fields/Array/index.css +1 -0
  318. package/dist/fields/Array/index.d.ts.map +1 -1
  319. package/dist/fields/Array/index.js +2 -3
  320. package/dist/fields/Array/index.js.map +1 -1
  321. package/dist/fields/Blocks/index.css +1 -0
  322. package/dist/fields/Blocks/index.d.ts.map +1 -1
  323. package/dist/fields/Blocks/index.js +2 -3
  324. package/dist/fields/Blocks/index.js.map +1 -1
  325. package/dist/fields/Checkbox/Input.d.ts +2 -2
  326. package/dist/fields/Checkbox/Input.d.ts.map +1 -1
  327. package/dist/fields/Checkbox/Input.js +152 -134
  328. package/dist/fields/Checkbox/Input.js.map +1 -1
  329. package/dist/fields/Checkbox/index.css +163 -168
  330. package/dist/fields/FieldDescription/index.css +5 -0
  331. package/dist/fields/FieldLabel/index.css +8 -27
  332. package/dist/fields/FieldLabel/index.d.ts.map +1 -1
  333. package/dist/fields/FieldLabel/index.js +4 -5
  334. package/dist/fields/FieldLabel/index.js.map +1 -1
  335. package/dist/fields/Group/index.css +1 -0
  336. package/dist/fields/RadioGroup/Radio/index.css +1 -0
  337. package/dist/fields/RadioGroup/index.css +1 -1
  338. package/dist/fields/Relationship/Input.d.ts.map +1 -1
  339. package/dist/fields/Relationship/Input.js +8 -27
  340. package/dist/fields/Relationship/Input.js.map +1 -1
  341. package/dist/fields/Relationship/optionsReducer.d.ts.map +1 -1
  342. package/dist/fields/Relationship/optionsReducer.js +0 -2
  343. package/dist/fields/Relationship/optionsReducer.js.map +1 -1
  344. package/dist/fields/Relationship/types.d.ts +0 -24
  345. package/dist/fields/Relationship/types.d.ts.map +1 -1
  346. package/dist/fields/Relationship/types.js.map +1 -1
  347. package/dist/fields/Row/index.css +2 -0
  348. package/dist/fields/Slug/index.d.ts.map +1 -1
  349. package/dist/fields/Slug/index.js +2 -3
  350. package/dist/fields/Slug/index.js.map +1 -1
  351. package/dist/fields/Tabs/index.css +1 -0
  352. package/dist/fields/Textarea/index.css +1 -1
  353. package/dist/fields/Upload/Input.d.ts.map +1 -1
  354. package/dist/fields/Upload/Input.js +2 -3
  355. package/dist/fields/Upload/Input.js.map +1 -1
  356. package/dist/fields/shared/index.d.ts +1 -1
  357. package/dist/fields/shared/index.d.ts.map +1 -1
  358. package/dist/fields/shared/index.js.map +1 -1
  359. package/dist/forms/Form/context.d.ts +3 -1
  360. package/dist/forms/Form/context.d.ts.map +1 -1
  361. package/dist/forms/Form/context.js +3 -1
  362. package/dist/forms/Form/context.js.map +1 -1
  363. package/dist/forms/Form/index.d.ts.map +1 -1
  364. package/dist/forms/Form/index.js +15 -7
  365. package/dist/forms/Form/index.js.map +1 -1
  366. package/dist/forms/NullifyField/index.d.ts.map +1 -1
  367. package/dist/forms/NullifyField/index.js +2 -3
  368. package/dist/forms/NullifyField/index.js.map +1 -1
  369. package/dist/forms/RenderFields/index.css +1 -7
  370. package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
  371. package/dist/forms/fieldSchemasToFormState/renderField.js +3 -2
  372. package/dist/forms/fieldSchemasToFormState/renderField.js.map +1 -1
  373. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts +12 -0
  374. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts.map +1 -0
  375. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js +42 -0
  376. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js.map +1 -0
  377. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts +8 -6
  378. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts.map +1 -1
  379. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js +22 -9
  380. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js.map +1 -1
  381. package/dist/forms/fieldSchemasToFormState/types.d.ts +1 -0
  382. package/dist/forms/fieldSchemasToFormState/types.d.ts.map +1 -1
  383. package/dist/forms/fieldSchemasToFormState/types.js.map +1 -1
  384. package/dist/hooks/useControllableState.js +3 -3
  385. package/dist/hooks/useControllableState.js.map +1 -1
  386. package/dist/hooks/usePayloadAPI.d.ts.map +1 -1
  387. package/dist/hooks/usePayloadAPI.js +2 -3
  388. package/dist/hooks/usePayloadAPI.js.map +1 -1
  389. package/dist/layouts/Root/index.d.ts.map +1 -1
  390. package/dist/layouts/Root/index.js +19 -5
  391. package/dist/layouts/Root/index.js.map +1 -1
  392. package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
  393. package/dist/providers/DocumentInfo/index.js +32 -22
  394. package/dist/providers/DocumentInfo/index.js.map +1 -1
  395. package/dist/providers/Hierarchy/index.d.ts.map +1 -1
  396. package/dist/providers/Hierarchy/index.js +24 -53
  397. package/dist/providers/Hierarchy/index.js.map +1 -1
  398. package/dist/providers/Hierarchy/types.d.ts +0 -2
  399. package/dist/providers/Hierarchy/types.d.ts.map +1 -1
  400. package/dist/providers/Hierarchy/types.js.map +1 -1
  401. package/dist/providers/LivePreview/index.d.ts.map +1 -1
  402. package/dist/providers/LivePreview/index.js +13 -6
  403. package/dist/providers/LivePreview/index.js.map +1 -1
  404. package/dist/providers/Locale/index.d.ts +1 -5
  405. package/dist/providers/Locale/index.d.ts.map +1 -1
  406. package/dist/providers/Locale/index.js +61 -140
  407. package/dist/providers/Locale/index.js.map +1 -1
  408. package/dist/providers/Root/index.d.ts +4 -1
  409. package/dist/providers/Root/index.d.ts.map +1 -1
  410. package/dist/providers/Root/index.js +25 -16
  411. package/dist/providers/Root/index.js.map +1 -1
  412. package/dist/providers/Selection/index.d.ts.map +1 -1
  413. package/dist/providers/Selection/index.js +2 -3
  414. package/dist/providers/Selection/index.js.map +1 -1
  415. package/dist/providers/ServerFunctions/index.d.ts +5 -1
  416. package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
  417. package/dist/providers/ServerFunctions/index.js +15 -0
  418. package/dist/providers/ServerFunctions/index.js.map +1 -1
  419. package/dist/providers/TableColumns/buildColumnState/index.d.ts.map +1 -1
  420. package/dist/providers/TableColumns/buildColumnState/index.js +0 -1
  421. package/dist/providers/TableColumns/buildColumnState/index.js.map +1 -1
  422. package/dist/providers/Theme/index.d.ts +17 -1
  423. package/dist/providers/Theme/index.d.ts.map +1 -1
  424. package/dist/providers/Theme/index.js +253 -81
  425. package/dist/providers/Theme/index.js.map +1 -1
  426. package/dist/providers/Theme/shared.d.ts +8 -0
  427. package/dist/providers/Theme/shared.d.ts.map +1 -1
  428. package/dist/providers/Theme/shared.js +6 -0
  429. package/dist/providers/Theme/shared.js.map +1 -1
  430. package/dist/styles.css +182 -23
  431. package/dist/templates/Default/Wrapper/index.css +3 -2
  432. package/dist/templates/Default/Wrapper/index.d.ts +0 -2
  433. package/dist/templates/Default/Wrapper/index.d.ts.map +1 -1
  434. package/dist/templates/Default/Wrapper/index.js +6 -12
  435. package/dist/templates/Default/Wrapper/index.js.map +1 -1
  436. package/dist/templates/Default/index.css +2 -3
  437. package/dist/templates/Default/index.d.ts.map +1 -1
  438. package/dist/templates/Default/index.js +15 -17
  439. package/dist/templates/Default/index.js.map +1 -1
  440. package/dist/utilities/buildFormState.d.ts.map +1 -1
  441. package/dist/utilities/buildFormState.js +6 -2
  442. package/dist/utilities/buildFormState.js.map +1 -1
  443. package/dist/utilities/formatAbsoluteURL.d.ts +1 -1
  444. package/dist/utilities/formatAbsoluteURL.d.ts.map +1 -1
  445. package/dist/utilities/formatAbsoluteURL.js +18 -8
  446. package/dist/utilities/formatAbsoluteURL.js.map +1 -1
  447. package/dist/utilities/getHasScheduledPublish.d.ts +2 -3
  448. package/dist/utilities/getHasScheduledPublish.d.ts.map +1 -1
  449. package/dist/utilities/getHasScheduledPublish.js +2 -5
  450. package/dist/utilities/getHasScheduledPublish.js.map +1 -1
  451. package/dist/utilities/handleAuthRedirect.d.ts.map +1 -1
  452. package/dist/utilities/handleAuthRedirect.js +4 -1
  453. package/dist/utilities/handleAuthRedirect.js.map +1 -1
  454. package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
  455. package/dist/utilities/handleServerFunctions.js +4 -2
  456. package/dist/utilities/handleServerFunctions.js.map +1 -1
  457. package/dist/utilities/initReq.d.ts.map +1 -1
  458. package/dist/utilities/initReq.js +40 -5
  459. package/dist/utilities/initReq.js.map +1 -1
  460. package/dist/utilities/isAbsoluteURL.d.ts +3 -0
  461. package/dist/utilities/isAbsoluteURL.d.ts.map +1 -0
  462. package/dist/utilities/isAbsoluteURL.js +15 -0
  463. package/dist/utilities/isAbsoluteURL.js.map +1 -0
  464. package/dist/utilities/isHttpURL.d.ts +3 -0
  465. package/dist/utilities/isHttpURL.d.ts.map +1 -0
  466. package/dist/utilities/isHttpURL.js +12 -0
  467. package/dist/utilities/isHttpURL.js.map +1 -0
  468. package/dist/utilities/isPathMatchingRoute.d.ts.map +1 -1
  469. package/dist/utilities/isPathMatchingRoute.js +7 -5
  470. package/dist/utilities/isPathMatchingRoute.js.map +1 -1
  471. package/dist/utilities/isPublicAdminRoute.d.ts.map +1 -1
  472. package/dist/utilities/isPublicAdminRoute.js +9 -6
  473. package/dist/utilities/isPublicAdminRoute.js.map +1 -1
  474. package/dist/utilities/schedulePublishHandler.d.ts +8 -1
  475. package/dist/utilities/schedulePublishHandler.d.ts.map +1 -1
  476. package/dist/utilities/schedulePublishHandler.js +72 -5
  477. package/dist/utilities/schedulePublishHandler.js.map +1 -1
  478. package/dist/utilities/serverFunctionRegistry.d.ts.map +1 -1
  479. package/dist/utilities/serverFunctionRegistry.js +2 -1
  480. package/dist/utilities/serverFunctionRegistry.js.map +1 -1
  481. package/dist/utilities/slugify.d.ts.map +1 -1
  482. package/dist/utilities/slugify.js +2 -0
  483. package/dist/utilities/slugify.js.map +1 -1
  484. package/dist/views/API/index.client.d.ts.map +1 -1
  485. package/dist/views/API/index.client.js +2 -3
  486. package/dist/views/API/index.client.js.map +1 -1
  487. package/dist/views/API/index.css +1 -0
  488. package/dist/views/Account/index.d.ts +1 -1
  489. package/dist/views/Account/index.d.ts.map +1 -1
  490. package/dist/views/Account/index.js +8 -5
  491. package/dist/views/Account/index.js.map +1 -1
  492. package/dist/views/Dashboard/Default/ModularDashboard/index.css +2 -0
  493. package/dist/views/Dashboard/Default/ModularDashboard/index.d.ts.map +1 -1
  494. package/dist/views/Dashboard/Default/ModularDashboard/index.js +1 -0
  495. package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
  496. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.d.ts.map +1 -1
  497. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +3 -1
  498. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
  499. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.d.ts.map +1 -1
  500. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +2 -0
  501. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
  502. package/dist/views/Dashboard/index.d.ts.map +1 -1
  503. package/dist/views/Dashboard/index.js +2 -3
  504. package/dist/views/Dashboard/index.js.map +1 -1
  505. package/dist/views/Document/handleServerFunction.d.ts.map +1 -1
  506. package/dist/views/Document/handleServerFunction.js +2 -0
  507. package/dist/views/Document/handleServerFunction.js.map +1 -1
  508. package/dist/views/Document/index.d.ts +1 -1
  509. package/dist/views/Document/index.d.ts.map +1 -1
  510. package/dist/views/Document/index.js +10 -6
  511. package/dist/views/Document/index.js.map +1 -1
  512. package/dist/views/Document/renderDocumentSlots.d.ts +1 -0
  513. package/dist/views/Document/renderDocumentSlots.d.ts.map +1 -1
  514. package/dist/views/Document/renderDocumentSlots.js +7 -4
  515. package/dist/views/Document/renderDocumentSlots.js.map +1 -1
  516. package/dist/views/Edit/Auth/APIKey.d.ts +1 -1
  517. package/dist/views/Edit/Auth/APIKey.d.ts.map +1 -1
  518. package/dist/views/Edit/Auth/APIKey.js +233 -59
  519. package/dist/views/Edit/Auth/APIKey.js.map +1 -1
  520. package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts +12 -0
  521. package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts.map +1 -0
  522. package/dist/views/Edit/Auth/APIKeyGenerationModal.js +117 -0
  523. package/dist/views/Edit/Auth/APIKeyGenerationModal.js.map +1 -0
  524. package/dist/views/Edit/Auth/index.css +91 -0
  525. package/dist/views/Edit/Auth/index.d.ts.map +1 -1
  526. package/dist/views/Edit/Auth/index.js +10 -28
  527. package/dist/views/Edit/Auth/index.js.map +1 -1
  528. package/dist/views/Edit/Auth/types.d.ts +3 -1
  529. package/dist/views/Edit/Auth/types.d.ts.map +1 -1
  530. package/dist/views/Edit/Auth/types.js.map +1 -1
  531. package/dist/views/Edit/index.css +44 -0
  532. package/dist/views/Edit/index.d.ts.map +1 -1
  533. package/dist/views/Edit/index.js +13 -0
  534. package/dist/views/Edit/index.js.map +1 -1
  535. package/dist/views/Edit/useEditViewWidth.d.ts +8 -0
  536. package/dist/views/Edit/useEditViewWidth.d.ts.map +1 -0
  537. package/dist/views/Edit/useEditViewWidth.js +56 -0
  538. package/dist/views/Edit/useEditViewWidth.js.map +1 -0
  539. package/dist/views/ForgotPassword/ForgotPasswordForm/index.css +14 -0
  540. package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
  541. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +209 -161
  542. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  543. package/dist/views/ForgotPassword/index.d.ts.map +1 -1
  544. package/dist/views/ForgotPassword/index.js +2 -11
  545. package/dist/views/ForgotPassword/index.js.map +1 -1
  546. package/dist/views/HierarchyList/DocumentListSelection/index.d.ts.map +1 -1
  547. package/dist/views/HierarchyList/DocumentListSelection/index.js +105 -100
  548. package/dist/views/HierarchyList/DocumentListSelection/index.js.map +1 -1
  549. package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts +1 -6
  550. package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts.map +1 -1
  551. package/dist/views/HierarchyList/HierarchyListHeader/index.js +8 -10
  552. package/dist/views/HierarchyList/HierarchyListHeader/index.js.map +1 -1
  553. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.d.ts.map +1 -1
  554. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js +10 -11
  555. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js.map +1 -1
  556. package/dist/views/HierarchyList/HierarchyTable/SlotTable.css +1 -0
  557. package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts.map +1 -1
  558. package/dist/views/HierarchyList/HierarchyTable/SlotTable.js +6 -3
  559. package/dist/views/HierarchyList/HierarchyTable/SlotTable.js.map +1 -1
  560. package/dist/views/HierarchyList/HierarchyTable/index.css +0 -51
  561. package/dist/views/HierarchyList/HierarchyTable/index.d.ts +1 -13
  562. package/dist/views/HierarchyList/HierarchyTable/index.d.ts.map +1 -1
  563. package/dist/views/HierarchyList/HierarchyTable/index.js +38 -156
  564. package/dist/views/HierarchyList/HierarchyTable/index.js.map +1 -1
  565. package/dist/views/HierarchyList/HierarchyTable/types.d.ts +0 -6
  566. package/dist/views/HierarchyList/HierarchyTable/types.d.ts.map +1 -1
  567. package/dist/views/HierarchyList/HierarchyTable/types.js.map +1 -1
  568. package/dist/views/HierarchyList/index.css +1 -0
  569. package/dist/views/HierarchyList/index.d.ts.map +1 -1
  570. package/dist/views/HierarchyList/index.js +20 -103
  571. package/dist/views/HierarchyList/index.js.map +1 -1
  572. package/dist/views/List/ListHeader/index.css +1 -0
  573. package/dist/views/List/ListHeader/index.d.ts +0 -1
  574. package/dist/views/List/ListHeader/index.d.ts.map +1 -1
  575. package/dist/views/List/ListHeader/index.js +2 -6
  576. package/dist/views/List/ListHeader/index.js.map +1 -1
  577. package/dist/views/List/ListSelection/index.d.ts.map +1 -1
  578. package/dist/views/List/ListSelection/index.js +122 -138
  579. package/dist/views/List/ListSelection/index.js.map +1 -1
  580. package/dist/views/List/handleHierarchy.d.ts +1 -6
  581. package/dist/views/List/handleHierarchy.d.ts.map +1 -1
  582. package/dist/views/List/handleHierarchy.js +3 -34
  583. package/dist/views/List/handleHierarchy.js.map +1 -1
  584. package/dist/views/List/handleServerFunction.d.ts.map +1 -1
  585. package/dist/views/List/handleServerFunction.js +3 -1
  586. package/dist/views/List/handleServerFunction.js.map +1 -1
  587. package/dist/views/List/index.client.d.ts.map +1 -1
  588. package/dist/views/List/index.client.js +6 -129
  589. package/dist/views/List/index.client.js.map +1 -1
  590. package/dist/views/List/index.css +2 -0
  591. package/dist/views/List/index.d.ts.map +1 -1
  592. package/dist/views/List/index.js +18 -28
  593. package/dist/views/List/index.js.map +1 -1
  594. package/dist/views/NotFound/client.d.ts +2 -0
  595. package/dist/views/NotFound/client.d.ts.map +1 -0
  596. package/dist/views/NotFound/client.js +4 -0
  597. package/dist/views/NotFound/client.js.map +1 -0
  598. package/dist/views/NotFound/page.d.ts.map +1 -1
  599. package/dist/views/NotFound/page.js +4 -3
  600. package/dist/views/NotFound/page.js.map +1 -1
  601. package/dist/views/Root/getRouteData.d.ts.map +1 -1
  602. package/dist/views/Root/getRouteData.js +2 -8
  603. package/dist/views/Root/getRouteData.js.map +1 -1
  604. package/dist/views/Root/index.d.ts.map +1 -1
  605. package/dist/views/Root/index.js +31 -22
  606. package/dist/views/Root/index.js.map +1 -1
  607. package/dist/views/Verify/index.d.ts +1 -1
  608. package/dist/views/Verify/index.d.ts.map +1 -1
  609. package/dist/views/Verify/index.js +4 -4
  610. package/dist/views/Verify/index.js.map +1 -1
  611. package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
  612. package/dist/views/Version/Default/SetStepNav.js +10 -13
  613. package/dist/views/Version/Default/SetStepNav.js.map +1 -1
  614. package/dist/views/Version/Default/index.css +2 -0
  615. package/dist/views/Version/Default/index.d.ts.map +1 -1
  616. package/dist/views/Version/Default/index.js +12 -13
  617. package/dist/views/Version/Default/index.js.map +1 -1
  618. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts +1 -0
  619. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts.map +1 -1
  620. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +56 -50
  621. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
  622. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -1
  623. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +41 -27
  624. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
  625. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.css +8 -0
  626. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
  627. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +10 -0
  628. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  629. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.css +1 -0
  630. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.css +1 -0
  631. package/dist/views/Version/RenderFieldsToDiff/index.css +2 -0
  632. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
  633. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +33 -1
  634. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
  635. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +8 -2
  636. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
  637. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +17 -19
  638. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
  639. package/dist/views/Version/Restore/index.d.ts.map +1 -1
  640. package/dist/views/Version/Restore/index.js +9 -6
  641. package/dist/views/Version/Restore/index.js.map +1 -1
  642. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.d.ts.map +1 -1
  643. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js +2 -3
  644. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js.map +1 -1
  645. package/dist/views/Versions/VersionPillLabel/index.css +1 -0
  646. package/dist/views/Versions/index.css +1 -0
  647. package/dist/widgets/CollectionCards/index.client.js +1 -1
  648. package/dist/widgets/CollectionCards/index.client.js.map +1 -1
  649. package/dist/widgets/CollectionCards/index.css +43 -33
  650. package/dist/widgets/CollectionCards/index.js +1 -1
  651. package/dist/widgets/CollectionCards/index.js.map +1 -1
  652. package/dist/widgets/RecentlyViewed/DocumentActivity/index.css +193 -0
  653. package/dist/widgets/RecentlyViewed/DocumentActivity/index.d.ts +5 -0
  654. package/dist/widgets/RecentlyViewed/DocumentActivity/index.d.ts.map +1 -0
  655. package/dist/widgets/RecentlyViewed/DocumentActivity/index.js +225 -0
  656. package/dist/widgets/RecentlyViewed/DocumentActivity/index.js.map +1 -0
  657. package/dist/widgets/RecentlyViewed/DocumentItem/index.css +181 -0
  658. package/dist/widgets/RecentlyViewed/DocumentItem/index.d.ts +11 -0
  659. package/dist/widgets/RecentlyViewed/DocumentItem/index.d.ts.map +1 -0
  660. package/dist/widgets/RecentlyViewed/DocumentItem/index.js +104 -0
  661. package/dist/widgets/RecentlyViewed/DocumentItem/index.js.map +1 -0
  662. package/dist/widgets/RecentlyViewed/getDocumentThumbnail.d.ts +10 -0
  663. package/dist/widgets/RecentlyViewed/getDocumentThumbnail.d.ts.map +1 -0
  664. package/dist/widgets/RecentlyViewed/getDocumentThumbnail.js +85 -0
  665. package/dist/widgets/RecentlyViewed/getDocumentThumbnail.js.map +1 -0
  666. package/dist/widgets/RecentlyViewed/getDocumentWidgetData.d.ts +7 -0
  667. package/dist/widgets/RecentlyViewed/getDocumentWidgetData.d.ts.map +1 -0
  668. package/dist/widgets/RecentlyViewed/getDocumentWidgetData.js +206 -0
  669. package/dist/widgets/RecentlyViewed/getDocumentWidgetData.js.map +1 -0
  670. package/dist/widgets/RecentlyViewed/index.d.ts +3 -5
  671. package/dist/widgets/RecentlyViewed/index.d.ts.map +1 -1
  672. package/dist/widgets/RecentlyViewed/index.js +10 -140
  673. package/dist/widgets/RecentlyViewed/index.js.map +1 -1
  674. package/dist/widgets/RecentlyViewed/shared.d.ts +38 -0
  675. package/dist/widgets/RecentlyViewed/shared.d.ts.map +1 -0
  676. package/dist/widgets/RecentlyViewed/shared.js +70 -0
  677. package/dist/widgets/RecentlyViewed/shared.js.map +1 -0
  678. package/dist/widgets/UploadDropzone/index.client.d.ts +7 -0
  679. package/dist/widgets/UploadDropzone/index.client.d.ts.map +1 -0
  680. package/dist/widgets/UploadDropzone/index.client.js +134 -0
  681. package/dist/widgets/UploadDropzone/index.client.js.map +1 -0
  682. package/dist/widgets/UploadDropzone/index.css +50 -0
  683. package/dist/widgets/UploadDropzone/index.d.ts +8 -0
  684. package/dist/widgets/UploadDropzone/index.d.ts.map +1 -0
  685. package/dist/widgets/UploadDropzone/index.js +29 -0
  686. package/dist/widgets/UploadDropzone/index.js.map +1 -0
  687. package/dist/widgets/Welcome/index.css +13 -0
  688. package/dist/widgets/Welcome/index.d.ts +5 -0
  689. package/dist/widgets/Welcome/index.d.ts.map +1 -0
  690. package/dist/widgets/Welcome/index.js +26 -0
  691. package/dist/widgets/Welcome/index.js.map +1 -0
  692. package/dist/widgets/WidgetIcon/assets/images.svg +3 -0
  693. package/dist/widgets/WidgetIcon/assets/pin-solid.svg +3 -0
  694. package/dist/widgets/WidgetIcon/assets/pin.svg +3 -0
  695. package/dist/widgets/WidgetIcon/assets/table.svg +3 -0
  696. package/dist/widgets/WidgetIcon/index.css +23 -0
  697. package/dist/widgets/WidgetIcon/index.d.ts +6 -0
  698. package/dist/widgets/WidgetIcon/index.d.ts.map +1 -0
  699. package/dist/widgets/WidgetIcon/index.js +10 -0
  700. package/dist/widgets/WidgetIcon/index.js.map +1 -0
  701. package/package.json +11 -5
  702. package/dist/elements/ClipboardAction/clipboardUtilities.spec.js +0 -120
  703. package/dist/elements/ClipboardAction/clipboardUtilities.spec.js.map +0 -1
  704. package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js +0 -144
  705. package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js.map +0 -1
  706. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js +0 -885
  707. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js.map +0 -1
  708. package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js +0 -87
  709. package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js.map +0 -1
  710. package/dist/elements/CommandPalette/buildActions.spec.js +0 -158
  711. package/dist/elements/CommandPalette/buildActions.spec.js.map +0 -1
  712. package/dist/elements/CommandPalette/highlightLabel.spec.js +0 -78
  713. package/dist/elements/CommandPalette/highlightLabel.spec.js.map +0 -1
  714. package/dist/elements/FieldSelect/reduceFieldOptions.spec.js +0 -143
  715. package/dist/elements/FieldSelect/reduceFieldOptions.spec.js.map +0 -1
  716. package/dist/elements/Hierarchy/CreateNewButton/index.css +0 -9
  717. package/dist/elements/Hierarchy/CreateNewButton/index.d.ts +0 -9
  718. package/dist/elements/Hierarchy/CreateNewButton/index.d.ts.map +0 -1
  719. package/dist/elements/Hierarchy/CreateNewButton/index.js +0 -111
  720. package/dist/elements/Hierarchy/CreateNewButton/index.js.map +0 -1
  721. package/dist/elements/Hierarchy/Modal/Footer/index.css +0 -45
  722. package/dist/elements/Hierarchy/Modal/Footer/index.d.ts +0 -28
  723. package/dist/elements/Hierarchy/Modal/Footer/index.d.ts.map +0 -1
  724. package/dist/elements/Hierarchy/Modal/Footer/index.js +0 -166
  725. package/dist/elements/Hierarchy/Modal/Footer/index.js.map +0 -1
  726. package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts +0 -22
  727. package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts.map +0 -1
  728. package/dist/elements/Hierarchy/getFolderHierarchySlug.js +0 -17
  729. package/dist/elements/Hierarchy/getFolderHierarchySlug.js.map +0 -1
  730. package/dist/elements/Hierarchy/move/moveDocuments.d.ts +0 -34
  731. package/dist/elements/Hierarchy/move/moveDocuments.d.ts.map +0 -1
  732. package/dist/elements/Hierarchy/move/moveDocuments.js +0 -94
  733. package/dist/elements/Hierarchy/move/moveDocuments.js.map +0 -1
  734. package/dist/elements/SegmentedControl/index.css +0 -58
  735. package/dist/elements/SegmentedControl/index.d.ts +0 -19
  736. package/dist/elements/SegmentedControl/index.d.ts.map +0 -1
  737. package/dist/elements/SegmentedControl/index.js +0 -104
  738. package/dist/elements/SegmentedControl/index.js.map +0 -1
  739. package/dist/elements/StepNav/DropTarget/index.css +0 -20
  740. package/dist/elements/StepNav/DropTarget/index.d.ts +0 -16
  741. package/dist/elements/StepNav/DropTarget/index.d.ts.map +0 -1
  742. package/dist/elements/StepNav/DropTarget/index.js +0 -71
  743. package/dist/elements/StepNav/DropTarget/index.js.map +0 -1
  744. package/dist/elements/Toasts/fieldErrors.spec.js +0 -46
  745. package/dist/elements/Toasts/fieldErrors.spec.js.map +0 -1
  746. package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts +0 -18
  747. package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts.map +0 -1
  748. package/dist/elements/UserMenu/HoverSubmenuGroup.js +0 -38
  749. package/dist/elements/UserMenu/HoverSubmenuGroup.js.map +0 -1
  750. package/dist/elements/UserMenu/useHoverSubmenu.d.ts +0 -21
  751. package/dist/elements/UserMenu/useHoverSubmenu.d.ts.map +0 -1
  752. package/dist/elements/UserMenu/useHoverSubmenu.js +0 -260
  753. package/dist/elements/UserMenu/useHoverSubmenu.js.map +0 -1
  754. package/dist/elements/ViewModeToggle/index.d.ts +0 -8
  755. package/dist/elements/ViewModeToggle/index.d.ts.map +0 -1
  756. package/dist/elements/ViewModeToggle/index.js +0 -29
  757. package/dist/elements/ViewModeToggle/index.js.map +0 -1
  758. package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js +0 -152
  759. package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js.map +0 -1
  760. package/dist/elements/WhereBuilder/conditionValue.spec.js +0 -65
  761. package/dist/elements/WhereBuilder/conditionValue.spec.js.map +0 -1
  762. package/dist/fields/Upload/Input.spec.js +0 -241
  763. package/dist/fields/Upload/Input.spec.js.map +0 -1
  764. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts +0 -2
  765. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts.map +0 -1
  766. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js +0 -67
  767. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js.map +0 -1
  768. package/dist/icons/CollapseLayers/index.d.ts +0 -7
  769. package/dist/icons/CollapseLayers/index.d.ts.map +0 -1
  770. package/dist/icons/CollapseLayers/index.js +0 -23
  771. package/dist/icons/CollapseLayers/index.js.map +0 -1
  772. package/dist/icons/Table/index.css +0 -5
  773. package/dist/icons/Table/index.d.ts +0 -7
  774. package/dist/icons/Table/index.d.ts.map +0 -1
  775. package/dist/icons/Table/index.js +0 -25
  776. package/dist/icons/Table/index.js.map +0 -1
  777. package/dist/layouts/Root/index.spec.js +0 -20
  778. package/dist/layouts/Root/index.spec.js.map +0 -1
  779. package/dist/providers/Auth/authSessionRequests.spec.js +0 -121
  780. package/dist/providers/Auth/authSessionRequests.spec.js.map +0 -1
  781. package/dist/providers/Auth/sessionActivity.spec.js +0 -44
  782. package/dist/providers/Auth/sessionActivity.spec.js.map +0 -1
  783. package/dist/providers/Auth/tabSessionSync/index.spec.js +0 -463
  784. package/dist/providers/Auth/tabSessionSync/index.spec.js.map +0 -1
  785. package/dist/providers/Auth/useAuthSessionTimers.spec.js +0 -311
  786. package/dist/providers/Auth/useAuthSessionTimers.spec.js.map +0 -1
  787. package/dist/providers/HierarchyDnd/index.css +0 -51
  788. package/dist/providers/HierarchyDnd/index.d.ts +0 -21
  789. package/dist/providers/HierarchyDnd/index.d.ts.map +0 -1
  790. package/dist/providers/HierarchyDnd/index.js +0 -163
  791. package/dist/providers/HierarchyDnd/index.js.map +0 -1
  792. package/dist/providers/HierarchyDnd/types.d.ts +0 -56
  793. package/dist/providers/HierarchyDnd/types.d.ts.map +0 -1
  794. package/dist/providers/HierarchyDnd/types.js +0 -21
  795. package/dist/providers/HierarchyDnd/types.js.map +0 -1
  796. package/dist/providers/RouteTransition/ProgressBar/index.spec.js +0 -44
  797. package/dist/providers/RouteTransition/ProgressBar/index.spec.js.map +0 -1
  798. package/dist/providers/TableColumns/buildColumnState/index.spec.js +0 -40
  799. package/dist/providers/TableColumns/buildColumnState/index.spec.js.map +0 -1
  800. package/dist/utilities/appendCacheTag.spec.js +0 -34
  801. package/dist/utilities/appendCacheTag.spec.js.map +0 -1
  802. package/dist/utilities/formatMetadata.spec.js +0 -83
  803. package/dist/utilities/formatMetadata.spec.js.map +0 -1
  804. package/dist/utilities/fuzzyMatch.spec.js +0 -38
  805. package/dist/utilities/fuzzyMatch.spec.js.map +0 -1
  806. package/dist/utilities/isCustomAdminView.spec.js +0 -90
  807. package/dist/utilities/isCustomAdminView.spec.js.map +0 -1
  808. package/dist/utilities/isPathMatchingRoute.spec.js +0 -178
  809. package/dist/utilities/isPathMatchingRoute.spec.js.map +0 -1
  810. package/dist/utilities/normalizeRelationshipValue.spec.js +0 -373
  811. package/dist/utilities/normalizeRelationshipValue.spec.js.map +0 -1
  812. package/dist/utilities/recentlyViewed.spec.js +0 -92
  813. package/dist/utilities/recentlyViewed.spec.js.map +0 -1
  814. package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.css +0 -216
  815. package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts +0 -20
  816. package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts.map +0 -1
  817. package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js +0 -182
  818. package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js.map +0 -1
  819. package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.css +0 -38
  820. package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts +0 -15
  821. package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts.map +0 -1
  822. package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js +0 -85
  823. package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js.map +0 -1
  824. package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.css +0 -98
  825. package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts +0 -27
  826. package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts.map +0 -1
  827. package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js +0 -84
  828. package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js.map +0 -1
  829. package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts +0 -19
  830. package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts.map +0 -1
  831. package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js +0 -100
  832. package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js.map +0 -1
  833. package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts +0 -53
  834. package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts.map +0 -1
  835. package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js +0 -145
  836. package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js.map +0 -1
  837. package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts +0 -8
  838. package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts.map +0 -1
  839. package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js +0 -21
  840. package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js.map +0 -1
  841. package/dist/views/HierarchyList/HierarchyCards/index.css +0 -115
  842. package/dist/views/HierarchyList/HierarchyCards/index.d.ts +0 -80
  843. package/dist/views/HierarchyList/HierarchyCards/index.d.ts.map +0 -1
  844. package/dist/views/HierarchyList/HierarchyCards/index.js +0 -457
  845. package/dist/views/HierarchyList/HierarchyCards/index.js.map +0 -1
  846. package/dist/views/Root/getCustomCollectionViewByRoute.spec.js +0 -168
  847. package/dist/views/Root/getCustomCollectionViewByRoute.spec.js.map +0 -1
  848. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +0 -861
  849. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +0 -1
  850. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +0 -47
  851. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +0 -1
  852. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +0 -135
  853. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +0 -1
  854. package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js +0 -100
  855. package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js.map +0 -1
@@ -1,9 +0,0 @@
1
- @layer payload-default {
2
- .hierarchy-create-new {
3
- flex-shrink: 0;
4
-
5
- &:hover:not(.btn--selected) {
6
- background: var(--color-bg-tertiary);
7
- }
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './index.css';
3
- export type HierarchyCreateNewButtonProps = {
4
- collectionSlug: string;
5
- /** Document the new item is created under. `null` creates at the root level. */
6
- parentId: null | number | string;
7
- };
8
- export declare const HierarchyCreateNewButton: React.FC<HierarchyCreateNewButtonProps>;
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/CreateNewButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAA;AASpD,OAAO,aAAa,CAAA;AAIpB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,cAAc,EAAE,MAAM,CAAA;IACtB,gFAAgF;IAChF,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAiD5E,CAAA"}
@@ -1,111 +0,0 @@
1
- 'use client';
2
-
3
- import { c as _c } from "react/compiler-runtime";
4
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
- import React, { Fragment, useCallback } from 'react';
6
- import { PlusIcon } from '../../../icons/Plus/index.js';
7
- import { useAuth } from '../../../providers/Auth/index.js';
8
- import { useConfig } from '../../../providers/Config/index.js';
9
- import { useHierarchy } from '../../../providers/Hierarchy/index.js';
10
- import { useTranslation } from '../../../providers/Translation/index.js';
11
- import { Button } from '../../Button/index.js';
12
- import { useDocumentDrawer } from '../../DocumentDrawer/index.js';
13
- import './index.css';
14
- const baseClass = 'hierarchy-create-new';
15
- export const HierarchyCreateNewButton = t0 => {
16
- const $ = _c(17);
17
- const {
18
- collectionSlug,
19
- parentId
20
- } = t0;
21
- const {
22
- t
23
- } = useTranslation();
24
- const {
25
- permissions
26
- } = useAuth();
27
- const {
28
- getEntityConfig
29
- } = useConfig();
30
- const {
31
- refreshTree
32
- } = useHierarchy();
33
- let t1;
34
- if ($[0] !== collectionSlug || $[1] !== getEntityConfig) {
35
- t1 = getEntityConfig({
36
- collectionSlug
37
- });
38
- $[0] = collectionSlug;
39
- $[1] = getEntityConfig;
40
- $[2] = t1;
41
- } else {
42
- t1 = $[2];
43
- }
44
- const collectionConfig = t1;
45
- const parentFieldName = collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === "object" ? collectionConfig.hierarchy.parentFieldName : undefined;
46
- const t2 = `${baseClass}-${collectionSlug}`;
47
- let t3;
48
- if ($[3] !== collectionSlug || $[4] !== t2) {
49
- t3 = {
50
- collectionSlug,
51
- drawerSlug: t2
52
- };
53
- $[3] = collectionSlug;
54
- $[4] = t2;
55
- $[5] = t3;
56
- } else {
57
- t3 = $[5];
58
- }
59
- const [DocumentDrawer,, t4] = useDocumentDrawer(t3);
60
- const {
61
- closeDrawer,
62
- openDrawer
63
- } = t4;
64
- let t5;
65
- if ($[6] !== closeDrawer || $[7] !== collectionSlug || $[8] !== refreshTree) {
66
- t5 = () => {
67
- refreshTree(collectionSlug);
68
- closeDrawer();
69
- };
70
- $[6] = closeDrawer;
71
- $[7] = collectionSlug;
72
- $[8] = refreshTree;
73
- $[9] = t5;
74
- } else {
75
- t5 = $[9];
76
- }
77
- const handleSave = t5;
78
- const canCreate = Boolean(permissions?.collections?.[collectionSlug]?.create);
79
- if (!canCreate || !parentFieldName) {
80
- return null;
81
- }
82
- let t6;
83
- if ($[10] !== DocumentDrawer || $[11] !== handleSave || $[12] !== openDrawer || $[13] !== parentFieldName || $[14] !== parentId || $[15] !== t) {
84
- t6 = _jsxs(Fragment, {
85
- children: [_jsx(Button, {
86
- "aria-label": t("general:createNew"),
87
- buttonStyle: "ghost",
88
- className: baseClass,
89
- icon: _jsx(PlusIcon, {}),
90
- onClick: openDrawer,
91
- round: true
92
- }), _jsx(DocumentDrawer, {
93
- initialData: parentId !== null ? {
94
- [parentFieldName]: parentId
95
- } : undefined,
96
- onSave: handleSave
97
- }, String(parentId))]
98
- });
99
- $[10] = DocumentDrawer;
100
- $[11] = handleSave;
101
- $[12] = openDrawer;
102
- $[13] = parentFieldName;
103
- $[14] = parentId;
104
- $[15] = t;
105
- $[16] = t6;
106
- } else {
107
- t6 = $[16];
108
- }
109
- return t6;
110
- };
111
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["c","_c","React","Fragment","useCallback","PlusIcon","useAuth","useConfig","useHierarchy","useTranslation","Button","useDocumentDrawer","baseClass","HierarchyCreateNewButton","t0","$","collectionSlug","parentId","t","permissions","getEntityConfig","refreshTree","t1","collectionConfig","parentFieldName","hierarchy","undefined","t2","t3","drawerSlug","DocumentDrawer","t4","closeDrawer","openDrawer","t5","handleSave","canCreate","Boolean","collections","create","t6","_jsxs","children","_jsx","buttonStyle","className","icon","onClick","round","initialData","onSave","String"],"sources":["../../../../src/elements/Hierarchy/CreateNewButton/index.tsx"],"sourcesContent":["'use client'\n\nimport React, { Fragment, useCallback } from 'react'\n\nimport { PlusIcon } from '../../../icons/Plus/index.js'\nimport { useAuth } from '../../../providers/Auth/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useHierarchy } from '../../../providers/Hierarchy/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { Button } from '../../Button/index.js'\nimport { useDocumentDrawer } from '../../DocumentDrawer/index.js'\nimport './index.css'\n\nconst baseClass = 'hierarchy-create-new'\n\nexport type HierarchyCreateNewButtonProps = {\n collectionSlug: string\n /** Document the new item is created under. `null` creates at the root level. */\n parentId: null | number | string\n}\n\nexport const HierarchyCreateNewButton: React.FC<HierarchyCreateNewButtonProps> = ({\n collectionSlug,\n parentId,\n}) => {\n const { t } = useTranslation()\n const { permissions } = useAuth()\n const { getEntityConfig } = useConfig()\n const { refreshTree } = useHierarchy()\n\n const collectionConfig = getEntityConfig({ collectionSlug })\n const parentFieldName =\n collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === 'object'\n ? collectionConfig.hierarchy.parentFieldName\n : undefined\n\n const [DocumentDrawer, , { closeDrawer, openDrawer }] = useDocumentDrawer({\n collectionSlug,\n drawerSlug: `${baseClass}-${collectionSlug}`,\n })\n\n const handleSave = useCallback(() => {\n refreshTree(collectionSlug)\n closeDrawer()\n }, [closeDrawer, collectionSlug, refreshTree])\n\n const canCreate = Boolean(permissions?.collections?.[collectionSlug]?.create)\n\n if (!canCreate || !parentFieldName) {\n return null\n }\n\n return (\n <Fragment>\n <Button\n aria-label={t('general:createNew')}\n buttonStyle=\"ghost\"\n className={baseClass}\n icon={<PlusIcon />}\n onClick={openDrawer}\n round\n />\n <DocumentDrawer\n // Remount the form when the target parent changes so initialData is picked back up\n initialData={parentId !== null ? { [parentFieldName]: parentId } : undefined}\n key={String(parentId)}\n onSave={handleSave}\n />\n </Fragment>\n )\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- @layer payload-default {
2
- .hierarchy-modal-footer__lead {
3
- display: flex;
4
- align-items: center;
5
- gap: var(--spacer-1);
6
- min-width: 0;
7
- overflow: hidden;
8
- }
9
-
10
- .hierarchy-modal-footer__trail {
11
- display: flex;
12
- align-items: center;
13
- gap: var(--spacer-2);
14
- flex-shrink: 0;
15
- }
16
-
17
- .hierarchy-modal-footer__placeholder {
18
- color: var(--color-text-secondary);
19
- white-space: nowrap;
20
- }
21
-
22
- .hierarchy-modal-footer__arrow {
23
- display: flex;
24
- flex-shrink: 0;
25
- color: var(--color-text-secondary);
26
- }
27
-
28
- .hierarchy-modal-footer__chip {
29
- max-width: 280px;
30
- }
31
-
32
- /* Lets the breadcrumb ellipsize instead of forcing the chip past its max-width */
33
- .hierarchy-modal-footer__chip .chip__label {
34
- min-width: 0;
35
- }
36
-
37
- .hierarchy-modal-footer__chip-separator,
38
- .hierarchy-modal-footer__chip-ellipsis {
39
- color: var(--color-text-secondary);
40
- }
41
-
42
- .hierarchy-modal-footer__chip-separator {
43
- padding-inline: calc(var(--spacer-1) / 2);
44
- }
45
- }
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import type { PathSegment } from '../../ColumnBrowser/types.js';
3
- import './index.css';
4
- export type HierarchyModalFooterProps = {
5
- /** Label for the primary action, e.g. "Move" or "Confirm" */
6
- readonly confirmLabel: string;
7
- /** Path of the item the user has picked in this session, root first */
8
- readonly destinationPath?: PathSegment[];
9
- /** Leading icon for the breadcrumb chips - falls back to a folder */
10
- readonly Icon?: React.ReactNode;
11
- readonly isConfirmDisabled: boolean;
12
- readonly isMultiSelect: boolean;
13
- readonly onClear: () => void;
14
- readonly onConfirm: () => void;
15
- readonly onMoveToRoot?: () => void;
16
- /** Called with a chip's path to expand the browser down to that item and focus it */
17
- readonly onRevealPath: (path: PathSegment[]) => void;
18
- /** Shown when nothing has been picked yet, e.g. "Select Folder" */
19
- readonly placeholderLabel: string;
20
- /** Path the item lived in before the modal was opened, root first */
21
- readonly previousPath?: PathSegment[];
22
- readonly selectionCount: number;
23
- /** Shown in multi-select mode once something is checked, e.g. "3 Tags selected" */
24
- readonly selectionCountLabel: string;
25
- readonly showMoveToRoot?: boolean;
26
- };
27
- export declare const HierarchyModalFooter: React.FC<HierarchyModalFooterProps>;
28
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/Hierarchy/Modal/Footer/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAQ/D,OAAO,aAAa,CAAA;AAOpB,MAAM,MAAM,yBAAyB,GAAG;IACtC,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAA;IACxC,qEAAqE;IACrE,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAA;IACnC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,qFAAqF;IACrF,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACpD,mEAAmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,qEAAqE;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAClC,CAAA;AAsCD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqFpE,CAAA"}
@@ -1,166 +0,0 @@
1
- 'use client';
2
-
3
- import { c as _c } from "react/compiler-runtime";
4
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
- import React, { useCallback } from 'react';
6
- import { FolderIcon } from '../../../../icons/Folder/index.js';
7
- import { ReplaceIcon } from '../../../../icons/Replace/index.js';
8
- import { useTranslation } from '../../../../providers/Translation/index.js';
9
- import { Button } from '../../../Button/index.js';
10
- import { Chip } from '../../../Chip/index.js';
11
- import { DialogFooter } from '../../../Dialog/index.js';
12
- import './index.css';
13
- const baseClass = 'hierarchy-modal-footer';
14
- // TODO: replace with a translation key once the hierarchy strings are finalized
15
- const moveToLabel = 'Move to';
16
- /** Deeper paths collapse to a leading ellipsis so the chip stays scannable, e.g. "… / Parent / Child" */
17
- const MAX_VISIBLE_SEGMENTS = 2;
18
- const Separator = () => /*#__PURE__*/_jsx("span", {
19
- className: `${baseClass}__chip-separator`,
20
- children: "/"
21
- });
22
- const HierarchyPathChip = ({
23
- Icon,
24
- onClick,
25
- path
26
- }) => {
27
- const isTruncated = path.length > MAX_VISIBLE_SEGMENTS;
28
- const visibleSegments = isTruncated ? path.slice(-MAX_VISIBLE_SEGMENTS) : path;
29
- return /*#__PURE__*/_jsxs(Chip, {
30
- "aria-label": path.map(segment => segment.title).join(' / '),
31
- className: `${baseClass}__chip`,
32
- icon: Icon ?? /*#__PURE__*/_jsx(FolderIcon, {}),
33
- onClick: onClick,
34
- children: [isTruncated ? /*#__PURE__*/_jsxs(React.Fragment, {
35
- children: [/*#__PURE__*/_jsx("span", {
36
- className: `${baseClass}__chip-ellipsis`,
37
- children: "…"
38
- }), /*#__PURE__*/_jsx(Separator, {})]
39
- }) : null, visibleSegments.map((segment, index) => /*#__PURE__*/_jsxs(React.Fragment, {
40
- children: [index > 0 && /*#__PURE__*/_jsx(Separator, {}), segment.title]
41
- }, segment.id))]
42
- });
43
- };
44
- export const HierarchyModalFooter = t0 => {
45
- const $ = _c(23);
46
- const {
47
- confirmLabel,
48
- destinationPath,
49
- Icon,
50
- isConfirmDisabled,
51
- isMultiSelect,
52
- onClear,
53
- onConfirm,
54
- onMoveToRoot,
55
- onRevealPath,
56
- placeholderLabel,
57
- previousPath,
58
- selectionCount,
59
- selectionCountLabel,
60
- showMoveToRoot
61
- } = t0;
62
- const {
63
- t
64
- } = useTranslation();
65
- let t1;
66
- if ($[0] !== onRevealPath || $[1] !== previousPath) {
67
- t1 = () => onRevealPath(previousPath ?? []);
68
- $[0] = onRevealPath;
69
- $[1] = previousPath;
70
- $[2] = t1;
71
- } else {
72
- t1 = $[2];
73
- }
74
- const revealPrevious = t1;
75
- let t2;
76
- if ($[3] !== destinationPath || $[4] !== onRevealPath) {
77
- t2 = () => onRevealPath(destinationPath ?? []);
78
- $[3] = destinationPath;
79
- $[4] = onRevealPath;
80
- $[5] = t2;
81
- } else {
82
- t2 = $[5];
83
- }
84
- const revealDestination = t2;
85
- let t3;
86
- if ($[6] !== Icon || $[7] !== confirmLabel || $[8] !== destinationPath || $[9] !== isConfirmDisabled || $[10] !== isMultiSelect || $[11] !== onClear || $[12] !== onConfirm || $[13] !== onMoveToRoot || $[14] !== placeholderLabel || $[15] !== previousPath || $[16] !== revealDestination || $[17] !== revealPrevious || $[18] !== selectionCount || $[19] !== selectionCountLabel || $[20] !== showMoveToRoot || $[21] !== t) {
87
- const placeholder = _jsx("span", {
88
- className: `${baseClass}__placeholder`,
89
- children: placeholderLabel
90
- });
91
- t3 = _jsxs(DialogFooter, {
92
- children: [_jsx("div", {
93
- className: `${baseClass}__lead`,
94
- children: isMultiSelect ? selectionCount > 0 ? _jsxs(React.Fragment, {
95
- children: [_jsx("span", {
96
- className: `${baseClass}__placeholder`,
97
- children: selectionCountLabel
98
- }), _jsx(Button, {
99
- buttonStyle: "link",
100
- className: `${baseClass}__clear`,
101
- margin: false,
102
- onClick: onClear,
103
- size: "medium",
104
- children: t("general:clear")
105
- })]
106
- }) : placeholder : _jsxs(React.Fragment, {
107
- children: [previousPath?.length ? _jsxs(React.Fragment, {
108
- children: [_jsx(HierarchyPathChip, {
109
- Icon,
110
- onClick: revealPrevious,
111
- path: previousPath
112
- }), _jsx("span", {
113
- className: `${baseClass}__arrow`,
114
- children: _jsx(ReplaceIcon, {})
115
- })]
116
- }) : null, destinationPath?.length ? _jsxs(React.Fragment, {
117
- children: [!previousPath?.length && _jsx("span", {
118
- className: `${baseClass}__placeholder`,
119
- children: moveToLabel
120
- }), _jsx(HierarchyPathChip, {
121
- Icon,
122
- onClick: revealDestination,
123
- path: destinationPath
124
- })]
125
- }) : placeholder]
126
- })
127
- }), _jsxs("div", {
128
- className: `${baseClass}__trail`,
129
- children: [showMoveToRoot && onMoveToRoot ? _jsx(Button, {
130
- buttonStyle: "secondary",
131
- margin: false,
132
- onClick: onMoveToRoot,
133
- size: "medium",
134
- children: t("hierarchy:moveToRoot")
135
- }) : null, _jsx(Button, {
136
- disabled: isConfirmDisabled,
137
- margin: false,
138
- onClick: onConfirm,
139
- size: "medium",
140
- children: confirmLabel
141
- })]
142
- })]
143
- });
144
- $[6] = Icon;
145
- $[7] = confirmLabel;
146
- $[8] = destinationPath;
147
- $[9] = isConfirmDisabled;
148
- $[10] = isMultiSelect;
149
- $[11] = onClear;
150
- $[12] = onConfirm;
151
- $[13] = onMoveToRoot;
152
- $[14] = placeholderLabel;
153
- $[15] = previousPath;
154
- $[16] = revealDestination;
155
- $[17] = revealPrevious;
156
- $[18] = selectionCount;
157
- $[19] = selectionCountLabel;
158
- $[20] = showMoveToRoot;
159
- $[21] = t;
160
- $[22] = t3;
161
- } else {
162
- t3 = $[22];
163
- }
164
- return t3;
165
- };
166
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["c","_c","React","useCallback","FolderIcon","ReplaceIcon","useTranslation","Button","Chip","DialogFooter","baseClass","moveToLabel","MAX_VISIBLE_SEGMENTS","Separator","_jsx","className","HierarchyPathChip","Icon","onClick","path","isTruncated","length","visibleSegments","slice","_jsxs","map","segment","title","join","icon","Fragment","index","id","HierarchyModalFooter","t0","$","confirmLabel","destinationPath","isConfirmDisabled","isMultiSelect","onClear","onConfirm","onMoveToRoot","onRevealPath","placeholderLabel","previousPath","selectionCount","selectionCountLabel","showMoveToRoot","t","t1","revealPrevious","t2","revealDestination","t3","placeholder","children","buttonStyle","margin","size","disabled"],"sources":["../../../../../src/elements/Hierarchy/Modal/Footer/index.tsx"],"sourcesContent":["'use client'\nimport React, { useCallback } from 'react'\n\nimport type { PathSegment } from '../../ColumnBrowser/types.js'\n\nimport { FolderIcon } from '../../../../icons/Folder/index.js'\nimport { ReplaceIcon } from '../../../../icons/Replace/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { Button } from '../../../Button/index.js'\nimport { Chip } from '../../../Chip/index.js'\nimport { DialogFooter } from '../../../Dialog/index.js'\nimport './index.css'\n\nconst baseClass = 'hierarchy-modal-footer'\n\n// TODO: replace with a translation key once the hierarchy strings are finalized\nconst moveToLabel = 'Move to'\n\nexport type HierarchyModalFooterProps = {\n /** Label for the primary action, e.g. \"Move\" or \"Confirm\" */\n readonly confirmLabel: string\n /** Path of the item the user has picked in this session, root first */\n readonly destinationPath?: PathSegment[]\n /** Leading icon for the breadcrumb chips - falls back to a folder */\n readonly Icon?: React.ReactNode\n readonly isConfirmDisabled: boolean\n readonly isMultiSelect: boolean\n readonly onClear: () => void\n readonly onConfirm: () => void\n readonly onMoveToRoot?: () => void\n /** Called with a chip's path to expand the browser down to that item and focus it */\n readonly onRevealPath: (path: PathSegment[]) => void\n /** Shown when nothing has been picked yet, e.g. \"Select Folder\" */\n readonly placeholderLabel: string\n /** Path the item lived in before the modal was opened, root first */\n readonly previousPath?: PathSegment[]\n readonly selectionCount: number\n /** Shown in multi-select mode once something is checked, e.g. \"3 Tags selected\" */\n readonly selectionCountLabel: string\n readonly showMoveToRoot?: boolean\n}\n\n/** Deeper paths collapse to a leading ellipsis so the chip stays scannable, e.g. \"… / Parent / Child\" */\nconst MAX_VISIBLE_SEGMENTS = 2\n\nconst Separator: React.FC = () => <span className={`${baseClass}__chip-separator`}>/</span>\n\nconst HierarchyPathChip: React.FC<{\n readonly Icon?: React.ReactNode\n readonly onClick: () => void\n readonly path: PathSegment[]\n}> = ({ Icon, onClick, path }) => {\n const isTruncated = path.length > MAX_VISIBLE_SEGMENTS\n const visibleSegments = isTruncated ? path.slice(-MAX_VISIBLE_SEGMENTS) : path\n\n return (\n <Chip\n aria-label={path.map((segment) => segment.title).join(' / ')}\n className={`${baseClass}__chip`}\n icon={Icon ?? <FolderIcon />}\n onClick={onClick}\n >\n {isTruncated ? (\n <React.Fragment>\n <span className={`${baseClass}__chip-ellipsis`}>&hellip;</span>\n <Separator />\n </React.Fragment>\n ) : null}\n {visibleSegments.map((segment, index) => (\n <React.Fragment key={segment.id}>\n {index > 0 && <Separator />}\n {segment.title}\n </React.Fragment>\n ))}\n </Chip>\n )\n}\n\nexport const HierarchyModalFooter: React.FC<HierarchyModalFooterProps> = ({\n confirmLabel,\n destinationPath,\n Icon,\n isConfirmDisabled,\n isMultiSelect,\n onClear,\n onConfirm,\n onMoveToRoot,\n onRevealPath,\n placeholderLabel,\n previousPath,\n selectionCount,\n selectionCountLabel,\n showMoveToRoot,\n}) => {\n const { t } = useTranslation()\n\n const revealPrevious = useCallback(\n () => onRevealPath(previousPath ?? []),\n [onRevealPath, previousPath],\n )\n\n const revealDestination = useCallback(\n () => onRevealPath(destinationPath ?? []),\n [destinationPath, onRevealPath],\n )\n\n const placeholder = <span className={`${baseClass}__placeholder`}>{placeholderLabel}</span>\n\n return (\n <DialogFooter>\n <div className={`${baseClass}__lead`}>\n {isMultiSelect ? (\n selectionCount > 0 ? (\n <React.Fragment>\n <span className={`${baseClass}__placeholder`}>{selectionCountLabel}</span>\n <Button\n buttonStyle=\"link\"\n className={`${baseClass}__clear`}\n margin={false}\n onClick={onClear}\n size=\"medium\"\n >\n {t('general:clear')}\n </Button>\n </React.Fragment>\n ) : (\n placeholder\n )\n ) : (\n <React.Fragment>\n {previousPath?.length ? (\n <React.Fragment>\n <HierarchyPathChip Icon={Icon} onClick={revealPrevious} path={previousPath} />\n <span className={`${baseClass}__arrow`}>\n <ReplaceIcon />\n </span>\n </React.Fragment>\n ) : null}\n {destinationPath?.length ? (\n <React.Fragment>\n {!previousPath?.length && (\n <span className={`${baseClass}__placeholder`}>{moveToLabel}</span>\n )}\n <HierarchyPathChip Icon={Icon} onClick={revealDestination} path={destinationPath} />\n </React.Fragment>\n ) : (\n placeholder\n )}\n </React.Fragment>\n )}\n </div>\n <div className={`${baseClass}__trail`}>\n {showMoveToRoot && onMoveToRoot ? (\n <Button buttonStyle=\"secondary\" margin={false} onClick={onMoveToRoot} size=\"medium\">\n {t('hierarchy:moveToRoot')}\n </Button>\n ) : null}\n <Button disabled={isConfirmDisabled} margin={false} onClick={onConfirm} size=\"medium\">\n {confirmLabel}\n </Button>\n </div>\n </DialogFooter>\n )\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,22 +0,0 @@
1
- /**
2
- * The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes
3
- * of this lookup, so routing (which holds the sanitized config) and client components can share
4
- * one implementation.
5
- */
6
- type FolderHierarchyCandidate = {
7
- hierarchy?: {
8
- relatedCollections?: Record<string, {
9
- hasMany: boolean;
10
- }>;
11
- } | boolean;
12
- slug: string;
13
- };
14
- /**
15
- * Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that
16
- * `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.
17
- * Returns undefined if the collection has no folder field (e.g. it only has a tags field,
18
- * or no hierarchy field at all).
19
- */
20
- export declare const getFolderHierarchySlug: (collections: FolderHierarchyCandidate[], collectionSlug: string) => string | undefined;
21
- export {};
22
- //# sourceMappingURL=getFolderHierarchySlug.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFolderHierarchySlug.d.ts","sourceRoot":"","sources":["../../../src/elements/Hierarchy/getFolderHierarchySlug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,KAAK,wBAAwB,GAAG;IAC9B,SAAS,CAAC,EACN;QACE,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAC1D,GACD,OAAO,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,gBACpB,wBAAwB,EAAE,kBACvB,MAAM,KACrB,MAAM,GAAG,SASF,CAAA"}
@@ -1,17 +0,0 @@
1
- /**
2
- * The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes
3
- * of this lookup, so routing (which holds the sanitized config) and client components can share
4
- * one implementation.
5
- */ /**
6
- * Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that
7
- * `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.
8
- * Returns undefined if the collection has no folder field (e.g. it only has a tags field,
9
- * or no hierarchy field at all).
10
- */export const getFolderHierarchySlug = (collections, collectionSlug) => collections.find(collection => {
11
- if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {
12
- return false;
13
- }
14
- const related = collection.hierarchy.relatedCollections?.[collectionSlug];
15
- return related !== undefined && related.hasMany === false;
16
- })?.slug;
17
- //# sourceMappingURL=getFolderHierarchySlug.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFolderHierarchySlug.js","names":["getFolderHierarchySlug","collections","collectionSlug","find","collection","hierarchy","related","relatedCollections","undefined","hasMany","slug"],"sources":["../../../src/elements/Hierarchy/getFolderHierarchySlug.ts"],"sourcesContent":["/**\n * The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes\n * of this lookup, so routing (which holds the sanitized config) and client components can share\n * one implementation.\n */\ntype FolderHierarchyCandidate = {\n hierarchy?:\n | {\n relatedCollections?: Record<string, { hasMany: boolean }>\n }\n | boolean\n slug: string\n}\n\n/**\n * Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that\n * `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.\n * Returns undefined if the collection has no folder field (e.g. it only has a tags field,\n * or no hierarchy field at all).\n */\nexport const getFolderHierarchySlug = (\n collections: FolderHierarchyCandidate[],\n collectionSlug: string,\n): string | undefined =>\n collections.find((collection) => {\n if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {\n return false\n }\n\n const related = collection.hierarchy.relatedCollections?.[collectionSlug]\n\n return related !== undefined && related.hasMany === false\n })?.slug\n"],"mappings":"AAAA;;;;GAAA,CAcA;;;;;MAMA,OAAO,MAAMA,sBAAA,GAAyBA,CACpCC,WAAA,EACAC,cAAA,KAEAD,WAAA,CAAYE,IAAI,CAAEC,UAAA;EAChB,IAAI,CAACA,UAAA,CAAWC,SAAS,IAAI,OAAOD,UAAA,CAAWC,SAAS,KAAK,UAAU;IACrE,OAAO;EACT;EAEA,MAAMC,OAAA,GAAUF,UAAA,CAAWC,SAAS,CAACE,kBAAkB,GAAGL,cAAA,CAAe;EAEzE,OAAOI,OAAA,KAAYE,SAAA,IAAaF,OAAA,CAAQG,OAAO,KAAK;AACtD,IAAIC,IAAA","ignoreList":[]}
@@ -1,34 +0,0 @@
1
- import type { I18nClient } from '@payloadcms/translations';
2
- type MoveDocumentsArgs = {
3
- apiRoute: string;
4
- /** Destination hierarchy item, or null for root. */
5
- destination: {
6
- id: null | number | string;
7
- title: string;
8
- };
9
- i18n: I18nClient;
10
- /** Human-readable label for what moved, used in the success toast. */
11
- label: string;
12
- locale?: string;
13
- /** The hierarchy item's parent/folder field name on each moved document. */
14
- parentFieldName: string;
15
- /** Documents to move, grouped by collection slug. */
16
- selections: Record<string, {
17
- ids: (number | string)[];
18
- }>;
19
- t: (key: string, options?: Record<string, unknown>) => string;
20
- };
21
- /**
22
- * Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.
23
- *
24
- * Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't
25
- * strand the rest. Returns how many documents actually moved, leaving it to the caller to decide
26
- * whether to refresh the view or clear its selection - the same reason it does not take an
27
- * `onSuccess`: drop and the Move button want different follow-up.
28
- */
29
- export declare const moveDocuments: ({ apiRoute, destination, i18n, label, locale, parentFieldName, selections, t, }: MoveDocumentsArgs) => Promise<{
30
- hasErrors: boolean;
31
- totalMoved: number;
32
- }>;
33
- export {};
34
- //# sourceMappingURL=moveDocuments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"moveDocuments.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/move/moveDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAQ1D,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oDAAoD;IACpD,WAAW,EAAE;QAAE,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1D,IAAI,EAAE,UAAU,CAAA;IAChB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAA;IACvB,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;KAAE,CAAC,CAAA;IACxD,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;CAC9D,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,oFASvB,iBAAiB,KAAG,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA6ExE,CAAA"}
@@ -1,94 +0,0 @@
1
- import { formatAdminURL } from 'payload/shared';
2
- import * as qs from 'qs-esm';
3
- import { toast } from 'sonner';
4
- import { requests } from '../../../utilities/api.js';
5
- /**
6
- * Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.
7
- *
8
- * Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't
9
- * strand the rest. Returns how many documents actually moved, leaving it to the caller to decide
10
- * whether to refresh the view or clear its selection - the same reason it does not take an
11
- * `onSuccess`: drop and the Move button want different follow-up.
12
- */
13
- export const moveDocuments = async ({
14
- apiRoute,
15
- destination,
16
- i18n,
17
- label,
18
- locale,
19
- parentFieldName,
20
- selections,
21
- t
22
- }) => {
23
- let totalMoved = 0;
24
- let hasErrors = false;
25
- try {
26
- for (const [collectionSlug, {
27
- ids
28
- }] of Object.entries(selections)) {
29
- if (ids.length === 0) {
30
- continue;
31
- }
32
- const queryString = qs.stringify({
33
- locale,
34
- where: {
35
- id: {
36
- in: ids
37
- }
38
- }
39
- }, {
40
- addQueryPrefix: true
41
- });
42
- const url = formatAdminURL({
43
- apiRoute,
44
- path: `/${collectionSlug}${queryString}`
45
- });
46
- const response = await requests.patch(url, {
47
- body: JSON.stringify({
48
- [parentFieldName]: destination.id
49
- }),
50
- headers: {
51
- 'Accept-Language': i18n.language,
52
- 'Content-Type': 'application/json',
53
- credentials: 'include'
54
- }
55
- });
56
- const json = await response.json();
57
- if (response.status >= 400) {
58
- hasErrors = true;
59
- if (json?.errors?.length > 0) {
60
- toast.error(json.message || t('error:unknown'), {
61
- description: json.errors.map(error => error.message).join('\n')
62
- });
63
- } else {
64
- toast.error(json?.message || t('error:unknown'));
65
- }
66
- continue;
67
- }
68
- const movedCount = json?.docs?.length || 0;
69
- totalMoved += movedCount;
70
- if (json?.errors?.length > 0) {
71
- hasErrors = true;
72
- toast.error(json.message, {
73
- description: json.errors.map(error => error.message).join('\n')
74
- });
75
- }
76
- }
77
- if (totalMoved > 0) {
78
- const successKey = destination.id === null ? 'hierarchy:itemsMovedToRoot' : 'hierarchy:itemsMovedTo';
79
- toast.success(t(successKey, {
80
- count: totalMoved,
81
- destination: destination.title,
82
- label
83
- }));
84
- }
85
- } catch (_err) {
86
- hasErrors = true;
87
- toast.error(t('error:unknown'));
88
- }
89
- return {
90
- hasErrors,
91
- totalMoved
92
- };
93
- };
94
- //# sourceMappingURL=moveDocuments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"moveDocuments.js","names":["formatAdminURL","qs","toast","requests","moveDocuments","apiRoute","destination","i18n","label","locale","parentFieldName","selections","t","totalMoved","hasErrors","collectionSlug","ids","Object","entries","length","queryString","stringify","where","id","in","addQueryPrefix","url","path","response","patch","body","JSON","headers","language","credentials","json","status","errors","error","message","description","map","join","movedCount","docs","successKey","success","count","title","_err"],"sources":["../../../../src/elements/Hierarchy/move/moveDocuments.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\n\nimport { formatAdminURL } from 'payload/shared'\nimport * as qs from 'qs-esm'\nimport { toast } from 'sonner'\n\nimport { requests } from '../../../utilities/api.js'\n\ntype MoveDocumentsArgs = {\n apiRoute: string\n /** Destination hierarchy item, or null for root. */\n destination: { id: null | number | string; title: string }\n i18n: I18nClient\n /** Human-readable label for what moved, used in the success toast. */\n label: string\n locale?: string\n /** The hierarchy item's parent/folder field name on each moved document. */\n parentFieldName: string\n /** Documents to move, grouped by collection slug. */\n selections: Record<string, { ids: (number | string)[] }>\n t: (key: string, options?: Record<string, unknown>) => string\n}\n\n/**\n * Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.\n *\n * Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't\n * strand the rest. Returns how many documents actually moved, leaving it to the caller to decide\n * whether to refresh the view or clear its selection - the same reason it does not take an\n * `onSuccess`: drop and the Move button want different follow-up.\n */\nexport const moveDocuments = async ({\n apiRoute,\n destination,\n i18n,\n label,\n locale,\n parentFieldName,\n selections,\n t,\n}: MoveDocumentsArgs): Promise<{ hasErrors: boolean; totalMoved: number }> => {\n let totalMoved = 0\n let hasErrors = false\n\n try {\n for (const [collectionSlug, { ids }] of Object.entries(selections)) {\n if (ids.length === 0) {\n continue\n }\n\n const queryString = qs.stringify(\n {\n locale,\n where: { id: { in: ids } },\n },\n { addQueryPrefix: true },\n )\n\n const url = formatAdminURL({\n apiRoute,\n path: `/${collectionSlug}${queryString}`,\n })\n\n const response = await requests.patch(url, {\n body: JSON.stringify({ [parentFieldName]: destination.id }),\n headers: {\n 'Accept-Language': i18n.language,\n 'Content-Type': 'application/json',\n credentials: 'include',\n },\n })\n\n const json = await response.json()\n\n if (response.status >= 400) {\n hasErrors = true\n\n if (json?.errors?.length > 0) {\n toast.error(json.message || t('error:unknown'), {\n description: json.errors.map((error: { message: string }) => error.message).join('\\n'),\n })\n } else {\n toast.error(json?.message || t('error:unknown'))\n }\n\n continue\n }\n\n const movedCount = json?.docs?.length || 0\n totalMoved += movedCount\n\n if (json?.errors?.length > 0) {\n hasErrors = true\n toast.error(json.message, {\n description: json.errors.map((error: { message: string }) => error.message).join('\\n'),\n })\n }\n }\n\n if (totalMoved > 0) {\n const successKey =\n destination.id === null ? 'hierarchy:itemsMovedToRoot' : 'hierarchy:itemsMovedTo'\n\n toast.success(\n t(successKey, {\n count: totalMoved,\n destination: destination.title,\n label,\n }),\n )\n }\n } catch (_err) {\n hasErrors = true\n toast.error(t('error:unknown'))\n }\n\n return { hasErrors, totalMoved }\n}\n"],"mappings":"AAEA,SAASA,cAAc,QAAQ;AAC/B,YAAYC,EAAA,MAAQ;AACpB,SAASC,KAAK,QAAQ;AAEtB,SAASC,QAAQ,QAAQ;AAiBzB;;;;;;;;AAQA,OAAO,MAAMC,aAAA,GAAgB,MAAAA,CAAO;EAClCC,QAAQ;EACRC,WAAW;EACXC,IAAI;EACJC,KAAK;EACLC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC;AAAC,CACiB;EAClB,IAAIC,UAAA,GAAa;EACjB,IAAIC,SAAA,GAAY;EAEhB,IAAI;IACF,KAAK,MAAM,CAACC,cAAA,EAAgB;MAAEC;IAAG,CAAE,CAAC,IAAIC,MAAA,CAAOC,OAAO,CAACP,UAAA,GAAa;MAClE,IAAIK,GAAA,CAAIG,MAAM,KAAK,GAAG;QACpB;MACF;MAEA,MAAMC,WAAA,GAAcnB,EAAA,CAAGoB,SAAS,CAC9B;QACEZ,MAAA;QACAa,KAAA,EAAO;UAAEC,EAAA,EAAI;YAAEC,EAAA,EAAIR;UAAI;QAAE;MAC3B,GACA;QAAES,cAAA,EAAgB;MAAK;MAGzB,MAAMC,GAAA,GAAM1B,cAAA,CAAe;QACzBK,QAAA;QACAsB,IAAA,EAAM,IAAIZ,cAAA,GAAiBK,WAAA;MAC7B;MAEA,MAAMQ,QAAA,GAAW,MAAMzB,QAAA,CAAS0B,KAAK,CAACH,GAAA,EAAK;QACzCI,IAAA,EAAMC,IAAA,CAAKV,SAAS,CAAC;UAAE,CAACX,eAAA,GAAkBJ,WAAA,CAAYiB;QAAG;QACzDS,OAAA,EAAS;UACP,mBAAmBzB,IAAA,CAAK0B,QAAQ;UAChC,gBAAgB;UAChBC,WAAA,EAAa;QACf;MACF;MAEA,MAAMC,IAAA,GAAO,MAAMP,QAAA,CAASO,IAAI;MAEhC,IAAIP,QAAA,CAASQ,MAAM,IAAI,KAAK;QAC1BtB,SAAA,GAAY;QAEZ,IAAIqB,IAAA,EAAME,MAAA,EAAQlB,MAAA,GAAS,GAAG;UAC5BjB,KAAA,CAAMoC,KAAK,CAACH,IAAA,CAAKI,OAAO,IAAI3B,CAAA,CAAE,kBAAkB;YAC9C4B,WAAA,EAAaL,IAAA,CAAKE,MAAM,CAACI,GAAG,CAAEH,KAAA,IAA+BA,KAAA,CAAMC,OAAO,EAAEG,IAAI,CAAC;UACnF;QACF,OAAO;UACLxC,KAAA,CAAMoC,KAAK,CAACH,IAAA,EAAMI,OAAA,IAAW3B,CAAA,CAAE;QACjC;QAEA;MACF;MAEA,MAAM+B,UAAA,GAAaR,IAAA,EAAMS,IAAA,EAAMzB,MAAA,IAAU;MACzCN,UAAA,IAAc8B,UAAA;MAEd,IAAIR,IAAA,EAAME,MAAA,EAAQlB,MAAA,GAAS,GAAG;QAC5BL,SAAA,GAAY;QACZZ,KAAA,CAAMoC,KAAK,CAACH,IAAA,CAAKI,OAAO,EAAE;UACxBC,WAAA,EAAaL,IAAA,CAAKE,MAAM,CAACI,GAAG,CAAEH,KAAA,IAA+BA,KAAA,CAAMC,OAAO,EAAEG,IAAI,CAAC;QACnF;MACF;IACF;IAEA,IAAI7B,UAAA,GAAa,GAAG;MAClB,MAAMgC,UAAA,GACJvC,WAAA,CAAYiB,EAAE,KAAK,OAAO,+BAA+B;MAE3DrB,KAAA,CAAM4C,OAAO,CACXlC,CAAA,CAAEiC,UAAA,EAAY;QACZE,KAAA,EAAOlC,UAAA;QACPP,WAAA,EAAaA,WAAA,CAAY0C,KAAK;QAC9BxC;MACF;IAEJ;EACF,EAAE,OAAOyC,IAAA,EAAM;IACbnC,SAAA,GAAY;IACZZ,KAAA,CAAMoC,KAAK,CAAC1B,CAAA,CAAE;EAChB;EAEA,OAAO;IAAEE,SAAA;IAAWD;EAAW;AACjC","ignoreList":[]}