@payloadcms/ui 3.69.0-internal.424436e → 3.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/dist/elements/AppHeader/index.js +1 -2
  2. package/dist/elements/AppHeader/index.js.map +1 -1
  3. package/dist/elements/AppHeader/index.scss +0 -1
  4. package/dist/elements/ArrayAction/index.d.ts +6 -6
  5. package/dist/elements/ArrayAction/index.d.ts.map +1 -1
  6. package/dist/elements/ArrayAction/index.js +8 -8
  7. package/dist/elements/ArrayAction/index.js.map +1 -1
  8. package/dist/elements/Autosave/index.d.ts.map +1 -1
  9. package/dist/elements/Autosave/index.js +20 -5
  10. package/dist/elements/Autosave/index.js.map +1 -1
  11. package/dist/elements/BulkUpload/FormsManager/index.d.ts.map +1 -1
  12. package/dist/elements/BulkUpload/FormsManager/index.js +10 -6
  13. package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
  14. package/dist/elements/CopyLocaleData/index.d.ts.map +1 -1
  15. package/dist/elements/CopyLocaleData/index.js +36 -39
  16. package/dist/elements/CopyLocaleData/index.js.map +1 -1
  17. package/dist/elements/DefaultListViewTabs/index.d.ts.map +1 -1
  18. package/dist/elements/DefaultListViewTabs/index.js +1 -2
  19. package/dist/elements/DefaultListViewTabs/index.js.map +1 -1
  20. package/dist/elements/DeleteDocument/index.d.ts.map +1 -1
  21. package/dist/elements/DeleteDocument/index.js +9 -7
  22. package/dist/elements/DeleteDocument/index.js.map +1 -1
  23. package/dist/elements/DeleteMany/index.d.ts.map +1 -1
  24. package/dist/elements/DeleteMany/index.js +19 -16
  25. package/dist/elements/DeleteMany/index.js.map +1 -1
  26. package/dist/elements/DocumentControls/index.d.ts.map +1 -1
  27. package/dist/elements/DocumentControls/index.js +2 -4
  28. package/dist/elements/DocumentControls/index.js.map +1 -1
  29. package/dist/elements/DuplicateDocument/index.d.ts.map +1 -1
  30. package/dist/elements/DuplicateDocument/index.js +4 -6
  31. package/dist/elements/DuplicateDocument/index.js.map +1 -1
  32. package/dist/elements/EditMany/DrawerContent.d.ts.map +1 -1
  33. package/dist/elements/EditMany/DrawerContent.js +8 -12
  34. package/dist/elements/EditMany/DrawerContent.js.map +1 -1
  35. package/dist/elements/FolderView/BrowseByFolderButton/index.d.ts.map +1 -1
  36. package/dist/elements/FolderView/BrowseByFolderButton/index.js +2 -4
  37. package/dist/elements/FolderView/BrowseByFolderButton/index.js.map +1 -1
  38. package/dist/elements/FolderView/Cell/index.client.d.ts.map +1 -1
  39. package/dist/elements/FolderView/Cell/index.client.js +9 -2
  40. package/dist/elements/FolderView/Cell/index.client.js.map +1 -1
  41. package/dist/elements/FolderView/CurrentFolderActions/index.d.ts.map +1 -1
  42. package/dist/elements/FolderView/CurrentFolderActions/index.js +7 -4
  43. package/dist/elements/FolderView/CurrentFolderActions/index.js.map +1 -1
  44. package/dist/elements/FolderView/MoveDocToFolder/index.d.ts +1 -1
  45. package/dist/elements/FolderView/MoveDocToFolder/index.d.ts.map +1 -1
  46. package/dist/elements/FolderView/MoveDocToFolder/index.js +5 -1
  47. package/dist/elements/FolderView/MoveDocToFolder/index.js.map +1 -1
  48. package/dist/elements/IDLabel/index.d.ts.map +1 -1
  49. package/dist/elements/IDLabel/index.js +11 -14
  50. package/dist/elements/IDLabel/index.js.map +1 -1
  51. package/dist/elements/ItemsDrawer/ItemSearch/index.d.ts +8 -0
  52. package/dist/elements/ItemsDrawer/ItemSearch/index.d.ts.map +1 -0
  53. package/dist/elements/ItemsDrawer/ItemSearch/index.js +56 -0
  54. package/dist/elements/ItemsDrawer/ItemSearch/index.js.map +1 -0
  55. package/dist/elements/ItemsDrawer/ItemSearch/index.scss +38 -0
  56. package/dist/elements/ItemsDrawer/index.d.ts +15 -0
  57. package/dist/elements/ItemsDrawer/index.d.ts.map +1 -0
  58. package/dist/elements/ItemsDrawer/index.js +195 -0
  59. package/dist/elements/ItemsDrawer/index.js.map +1 -0
  60. package/dist/elements/ItemsDrawer/index.scss +102 -0
  61. package/dist/elements/Link/index.d.ts.map +1 -1
  62. package/dist/elements/Link/index.js +5 -3
  63. package/dist/elements/Link/index.js.map +1 -1
  64. package/dist/elements/ListControls/index.d.ts.map +1 -1
  65. package/dist/elements/ListControls/index.js +6 -4
  66. package/dist/elements/ListControls/index.js.map +1 -1
  67. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.d.ts.map +1 -1
  68. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js +9 -2
  69. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js.map +1 -1
  70. package/dist/elements/Logout/index.d.ts.map +1 -1
  71. package/dist/elements/Logout/index.js +8 -11
  72. package/dist/elements/Logout/index.js.map +1 -1
  73. package/dist/elements/PermanentlyDeleteButton/index.d.ts.map +1 -1
  74. package/dist/elements/PermanentlyDeleteButton/index.js +19 -14
  75. package/dist/elements/PermanentlyDeleteButton/index.js.map +1 -1
  76. package/dist/elements/Popup/PopupButtonList/index.scss +1 -0
  77. package/dist/elements/Popup/PopupTrigger/index.d.ts +1 -1
  78. package/dist/elements/Popup/PopupTrigger/index.d.ts.map +1 -1
  79. package/dist/elements/Popup/PopupTrigger/index.js +24 -92
  80. package/dist/elements/Popup/PopupTrigger/index.js.map +1 -1
  81. package/dist/elements/Popup/index.d.ts +32 -1
  82. package/dist/elements/Popup/index.d.ts.map +1 -1
  83. package/dist/elements/Popup/index.js +249 -122
  84. package/dist/elements/Popup/index.js.map +1 -1
  85. package/dist/elements/Popup/index.scss +49 -231
  86. package/dist/elements/PublishButton/ScheduleDrawer/index.d.ts.map +1 -1
  87. package/dist/elements/PublishButton/ScheduleDrawer/index.js +6 -2
  88. package/dist/elements/PublishButton/ScheduleDrawer/index.js.map +1 -1
  89. package/dist/elements/PublishButton/index.d.ts.map +1 -1
  90. package/dist/elements/PublishButton/index.js +14 -4
  91. package/dist/elements/PublishButton/index.js.map +1 -1
  92. package/dist/elements/PublishMany/DrawerContent.d.ts.map +1 -1
  93. package/dist/elements/PublishMany/DrawerContent.js +8 -5
  94. package/dist/elements/PublishMany/DrawerContent.js.map +1 -1
  95. package/dist/elements/QueryPresets/QueryPresetBar/index.d.ts.map +1 -1
  96. package/dist/elements/QueryPresets/QueryPresetBar/index.js +7 -9
  97. package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
  98. package/dist/elements/RestoreButton/index.d.ts.map +1 -1
  99. package/dist/elements/RestoreButton/index.js +19 -14
  100. package/dist/elements/RestoreButton/index.js.map +1 -1
  101. package/dist/elements/RestoreMany/index.d.ts.map +1 -1
  102. package/dist/elements/RestoreMany/index.js +17 -14
  103. package/dist/elements/RestoreMany/index.js.map +1 -1
  104. package/dist/elements/SaveDraftButton/index.d.ts.map +1 -1
  105. package/dist/elements/SaveDraftButton/index.js +11 -5
  106. package/dist/elements/SaveDraftButton/index.js.map +1 -1
  107. package/dist/elements/Status/index.d.ts.map +1 -1
  108. package/dist/elements/Status/index.js +11 -5
  109. package/dist/elements/Status/index.js.map +1 -1
  110. package/dist/elements/StayLoggedIn/index.d.ts.map +1 -1
  111. package/dist/elements/StayLoggedIn/index.js +17 -20
  112. package/dist/elements/StayLoggedIn/index.js.map +1 -1
  113. package/dist/elements/StepNav/context.d.ts.map +1 -1
  114. package/dist/elements/StepNav/context.js +9 -1
  115. package/dist/elements/StepNav/context.js.map +1 -1
  116. package/dist/elements/StepNav/index.scss +0 -1
  117. package/dist/elements/Table/DefaultCell/fields/Relationship/index.d.ts.map +1 -1
  118. package/dist/elements/Table/DefaultCell/fields/Relationship/index.js +39 -41
  119. package/dist/elements/Table/DefaultCell/fields/Relationship/index.js.map +1 -1
  120. package/dist/elements/Table/DefaultCell/index.d.ts.map +1 -1
  121. package/dist/elements/Table/DefaultCell/index.js +9 -12
  122. package/dist/elements/Table/DefaultCell/index.js.map +1 -1
  123. package/dist/elements/Table/OrderableTable.d.ts.map +1 -1
  124. package/dist/elements/Table/OrderableTable.js +5 -1
  125. package/dist/elements/Table/OrderableTable.js.map +1 -1
  126. package/dist/elements/Table/RelationshipProvider/index.d.ts.map +1 -1
  127. package/dist/elements/Table/RelationshipProvider/index.js +25 -24
  128. package/dist/elements/Table/RelationshipProvider/index.js.map +1 -1
  129. package/dist/elements/UnpublishMany/DrawerContent.d.ts.map +1 -1
  130. package/dist/elements/UnpublishMany/DrawerContent.js +8 -5
  131. package/dist/elements/UnpublishMany/DrawerContent.js.map +1 -1
  132. package/dist/elements/Upload/index.d.ts.map +1 -1
  133. package/dist/elements/Upload/index.js +7 -5
  134. package/dist/elements/Upload/index.js.map +1 -1
  135. package/dist/elements/WhereBuilder/Condition/Relationship/index.d.ts.map +1 -1
  136. package/dist/elements/WhereBuilder/Condition/Relationship/index.js +14 -8
  137. package/dist/elements/WhereBuilder/Condition/Relationship/index.js.map +1 -1
  138. package/dist/elements/withMergedProps/index.d.ts +1 -1
  139. package/dist/elements/withMergedProps/index.js +1 -1
  140. package/dist/elements/withMergedProps/index.js.map +1 -1
  141. package/dist/exports/client/index.d.ts +1 -2
  142. package/dist/exports/client/index.d.ts.map +1 -1
  143. package/dist/exports/client/index.js +12 -12
  144. package/dist/exports/client/index.js.map +4 -4
  145. package/dist/exports/rsc/index.d.ts +1 -0
  146. package/dist/exports/rsc/index.d.ts.map +1 -1
  147. package/dist/exports/rsc/index.js +1 -0
  148. package/dist/exports/rsc/index.js.map +1 -1
  149. package/dist/exports/shared/index.d.ts +3 -0
  150. package/dist/exports/shared/index.d.ts.map +1 -1
  151. package/dist/exports/shared/index.js +2 -2
  152. package/dist/exports/shared/index.js.map +4 -4
  153. package/dist/fields/Array/ArrayRow.d.ts +7 -18
  154. package/dist/fields/Array/ArrayRow.d.ts.map +1 -1
  155. package/dist/fields/Array/ArrayRow.js +133 -65
  156. package/dist/fields/Array/ArrayRow.js.map +1 -1
  157. package/dist/fields/Array/index.d.ts.map +1 -1
  158. package/dist/fields/Array/index.js +3 -10
  159. package/dist/fields/Array/index.js.map +1 -1
  160. package/dist/fields/Relationship/Input.d.ts.map +1 -1
  161. package/dist/fields/Relationship/Input.js +9 -3
  162. package/dist/fields/Relationship/Input.js.map +1 -1
  163. package/dist/fields/Upload/Input.d.ts.map +1 -1
  164. package/dist/fields/Upload/Input.js +7 -3
  165. package/dist/fields/Upload/Input.js.map +1 -1
  166. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js +8 -1
  167. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js.map +1 -1
  168. package/dist/graphics/Account/index.d.ts.map +1 -1
  169. package/dist/graphics/Account/index.js +2 -4
  170. package/dist/graphics/Account/index.js.map +1 -1
  171. package/dist/providers/Auth/index.d.ts.map +1 -1
  172. package/dist/providers/Auth/index.js +23 -26
  173. package/dist/providers/Auth/index.js.map +1 -1
  174. package/dist/providers/DocumentInfo/index.d.ts +1 -1
  175. package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
  176. package/dist/providers/DocumentInfo/index.js +16 -15
  177. package/dist/providers/DocumentInfo/index.js.map +1 -1
  178. package/dist/providers/DocumentInfo/useGetDocPermissions.d.ts +1 -2
  179. package/dist/providers/DocumentInfo/useGetDocPermissions.d.ts.map +1 -1
  180. package/dist/providers/DocumentInfo/useGetDocPermissions.js +16 -6
  181. package/dist/providers/DocumentInfo/useGetDocPermissions.js.map +1 -1
  182. package/dist/providers/Folders/index.d.ts.map +1 -1
  183. package/dist/providers/Folders/index.js +14 -11
  184. package/dist/providers/Folders/index.js.map +1 -1
  185. package/dist/providers/Locale/index.d.ts.map +1 -1
  186. package/dist/providers/Locale/index.js +45 -34
  187. package/dist/providers/Locale/index.js.map +1 -1
  188. package/dist/providers/Preferences/index.d.ts.map +1 -1
  189. package/dist/providers/Preferences/index.js +16 -7
  190. package/dist/providers/Preferences/index.js.map +1 -1
  191. package/dist/providers/RouteTransition/index.d.ts.map +1 -1
  192. package/dist/providers/RouteTransition/index.js +6 -1
  193. package/dist/providers/RouteTransition/index.js.map +1 -1
  194. package/dist/providers/TableColumns/buildColumnState/renderCell.d.ts.map +1 -1
  195. package/dist/providers/TableColumns/buildColumnState/renderCell.js +1 -2
  196. package/dist/providers/TableColumns/buildColumnState/renderCell.js.map +1 -1
  197. package/dist/scss/app.scss +14 -1
  198. package/dist/styles.css +1 -1
  199. package/dist/utilities/getGlobalData.d.ts +11 -0
  200. package/dist/utilities/getGlobalData.d.ts.map +1 -0
  201. package/dist/utilities/getGlobalData.js +49 -0
  202. package/dist/utilities/getGlobalData.js.map +1 -0
  203. package/dist/utilities/getNavGroups.d.ts +5 -0
  204. package/dist/utilities/getNavGroups.d.ts.map +1 -0
  205. package/dist/utilities/getNavGroups.js +22 -0
  206. package/dist/utilities/getNavGroups.js.map +1 -0
  207. package/dist/utilities/getVisibleEntities.d.ts +5 -0
  208. package/dist/utilities/getVisibleEntities.d.ts.map +1 -0
  209. package/dist/utilities/getVisibleEntities.js +31 -0
  210. package/dist/utilities/getVisibleEntities.js.map +1 -0
  211. package/dist/utilities/groupNavItems.d.ts +3 -0
  212. package/dist/utilities/groupNavItems.d.ts.map +1 -1
  213. package/dist/utilities/groupNavItems.js +3 -0
  214. package/dist/utilities/groupNavItems.js.map +1 -1
  215. package/dist/utilities/handleBackToDashboard.js +1 -1
  216. package/dist/utilities/handleBackToDashboard.js.map +1 -1
  217. package/dist/utilities/handleGoBack.d.ts.map +1 -1
  218. package/dist/utilities/handleGoBack.js +1 -2
  219. package/dist/utilities/handleGoBack.js.map +1 -1
  220. package/dist/utilities/normalizeRelationshipValue.spec.js +1 -1
  221. package/dist/utilities/normalizeRelationshipValue.spec.js.map +1 -1
  222. package/dist/views/CollectionFolder/index.js +2 -4
  223. package/dist/views/CollectionFolder/index.js.map +1 -1
  224. package/dist/views/Edit/Auth/index.d.ts.map +1 -1
  225. package/dist/views/Edit/Auth/index.js +22 -21
  226. package/dist/views/Edit/Auth/index.js.map +1 -1
  227. package/dist/views/Edit/SetDocumentStepNav/index.d.ts.map +1 -1
  228. package/dist/views/Edit/SetDocumentStepNav/index.js +36 -22
  229. package/dist/views/Edit/SetDocumentStepNav/index.js.map +1 -1
  230. package/dist/views/Edit/index.d.ts.map +1 -1
  231. package/dist/views/Edit/index.js +2 -3
  232. package/dist/views/Edit/index.js.map +1 -1
  233. package/dist/views/List/index.d.ts.map +1 -1
  234. package/dist/views/List/index.js +1 -2
  235. package/dist/views/List/index.js.map +1 -1
  236. package/dist/widgets/CollectionCards/index.d.ts +5 -0
  237. package/dist/widgets/CollectionCards/index.d.ts.map +1 -0
  238. package/dist/widgets/CollectionCards/index.js +135 -0
  239. package/dist/widgets/CollectionCards/index.js.map +1 -0
  240. package/dist/widgets/CollectionCards/index.scss +70 -0
  241. package/package.json +5 -5
@@ -15,4 +15,5 @@ export { handlePreview } from '../../utilities/handlePreview.js';
15
15
  export { renderFilters, renderTable } from '../../utilities/renderTable.js';
16
16
  export { resolveFilterOptions } from '../../utilities/resolveFilterOptions.js';
17
17
  export { upsertPreferences } from '../../utilities/upsertPreferences.js';
18
+ export { CollectionCards } from '../../widgets/CollectionCards/index.js';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/rsc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4EAA4E,CAAA;AACzH,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,O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,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA"}
@@ -15,4 +15,5 @@ export { handlePreview } from '../../utilities/handlePreview.js';
15
15
  export { renderFilters, renderTable } from '../../utilities/renderTable.js';
16
16
  export { resolveFilterOptions } from '../../utilities/resolveFilterOptions.js';
17
17
  export { upsertPreferences } from '../../utilities/upsertPreferences.js';
18
+ export { CollectionCards } from '../../widgets/CollectionCards/index.js';
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FieldDiffContainer","FieldDiffLabel","FolderTableCell","FolderField","getHTMLDiffComponents","SlugField","_internal_renderFieldHandler","File","CheckIcon","copyDataFromLocaleHandler","getColumns","getFolderResultsComponentAndData","handleLivePreview","handlePreview","renderFilters","renderTable","resolveFilterOptions","upsertPreferences"],"sources":["../../../src/exports/rsc/index.ts"],"sourcesContent":["export { FieldDiffContainer } from '../../elements/FieldDiffContainer/index.js'\nexport { FieldDiffLabel } from '../../elements/FieldDiffLabel/index.js'\nexport { FolderTableCell } from '../../elements/FolderView/Cell/index.server.js'\nexport { FolderField } from '../../elements/FolderView/FolderField/index.server.js'\nexport { getHTMLDiffComponents } from '../../elements/HTMLDiff/index.js'\nexport { SlugField } from '../../fields/Slug/index.js'\nexport { _internal_renderFieldHandler } from '../../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js'\nexport { File } from '../../graphics/File/index.js'\nexport { CheckIcon } from '../../icons/Check/index.js'\nexport { copyDataFromLocaleHandler } from '../../utilities/copyDataFromLocale.js'\nexport { getColumns } from '../../utilities/getColumns.js'\nexport { getFolderResultsComponentAndData } from '../../utilities/getFolderResultsComponentAndData.js'\nexport { handleLivePreview } from '../../utilities/handleLivePreview.js'\nexport { handlePreview } from '../../utilities/handlePreview.js'\nexport { renderFilters, renderTable } from '../../utilities/renderTable.js'\nexport { resolveFilterOptions } from '../../utilities/resolveFilterOptions.js'\nexport { upsertPreferences } from '../../utilities/upsertPreferences.js'\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,eAAe,QAAQ;AAChC,SAASC,WAAW,QAAQ;AAC5B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,SAAS,QAAQ;AAC1B,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,IAAI,QAAQ;AACrB,SAASC,SAAS,QAAQ;AAC1B,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,gCAAgC,QAAQ;AACjD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,aAAa,QAAQ;AAC9B,SAASC,aAAa,EAAEC,WAAW,QAAQ;AAC3C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,iBAAiB,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["FieldDiffContainer","FieldDiffLabel","FolderTableCell","FolderField","getHTMLDiffComponents","SlugField","_internal_renderFieldHandler","File","CheckIcon","copyDataFromLocaleHandler","getColumns","getFolderResultsComponentAndData","handleLivePreview","handlePreview","renderFilters","renderTable","resolveFilterOptions","upsertPreferences","CollectionCards"],"sources":["../../../src/exports/rsc/index.ts"],"sourcesContent":["export { FieldDiffContainer } from '../../elements/FieldDiffContainer/index.js'\nexport { FieldDiffLabel } from '../../elements/FieldDiffLabel/index.js'\nexport { FolderTableCell } from '../../elements/FolderView/Cell/index.server.js'\nexport { FolderField } from '../../elements/FolderView/FolderField/index.server.js'\nexport { getHTMLDiffComponents } from '../../elements/HTMLDiff/index.js'\nexport { SlugField } from '../../fields/Slug/index.js'\nexport { _internal_renderFieldHandler } from '../../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js'\nexport { File } from '../../graphics/File/index.js'\nexport { CheckIcon } from '../../icons/Check/index.js'\nexport { copyDataFromLocaleHandler } from '../../utilities/copyDataFromLocale.js'\nexport { getColumns } from '../../utilities/getColumns.js'\nexport { getFolderResultsComponentAndData } from '../../utilities/getFolderResultsComponentAndData.js'\nexport { handleLivePreview } from '../../utilities/handleLivePreview.js'\nexport { handlePreview } from '../../utilities/handlePreview.js'\nexport { renderFilters, renderTable } from '../../utilities/renderTable.js'\nexport { resolveFilterOptions } from '../../utilities/resolveFilterOptions.js'\nexport { upsertPreferences } from '../../utilities/upsertPreferences.js'\nexport { CollectionCards } from '../../widgets/CollectionCards/index.js'\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,eAAe,QAAQ;AAChC,SAASC,WAAW,QAAQ;AAC5B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,SAAS,QAAQ;AAC1B,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,IAAI,QAAQ;AACrB,SAASC,SAAS,QAAQ;AAC1B,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,gCAAgC,QAAQ;AACjD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,aAAa,QAAQ;AAC9B,SAASC,aAAa,EAAEC,WAAW,QAAQ;AAC3C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,eAAe,QAAQ","ignoreList":[]}
@@ -13,6 +13,9 @@ export { findLocaleFromCode } from '../../utilities/findLocaleFromCode.js';
13
13
  export { formatAdminURL } from '../../utilities/formatAdminURL.js';
14
14
  export { formatDate } from '../../utilities/formatDocTitle/formatDateTitle.js';
15
15
  export { formatDocTitle } from '../../utilities/formatDocTitle/index.js';
16
+ export { getGlobalData } from '../../utilities/getGlobalData.js';
17
+ export { getNavGroups } from '../../utilities/getNavGroups.js';
18
+ export { getVisibleEntities } from '../../utilities/getVisibleEntities.js';
16
19
  export { type EntityToGroup, EntityType, groupNavItems, type NavGroupType, } from '../../utilities/groupNavItems.js';
17
20
  export { handleBackToDashboard } from '../../utilities/handleBackToDashboard.js';
18
21
  export { handleGoBack } from '../../utilities/handleGoBack.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAA;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,EACL,KAAK,aAAa,EAClB,UAAU,EACV,aAAa,EACb,KAAK,YAAY,GAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,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;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAC1E,OAAO,EACL,KAAK,aAAa,EAClB,UAAU,EACV,aAAa,EACb,KAAK,YAAY,GAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC1D;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,6 +1,6 @@
1
- import{jsx as g}from"react/jsx-runtime";import"react";var L=({elements:e,translationString:t})=>{let r=/(<[^>]+>.*?<\/[^>]+>)/g,o=t.split(r);return g("span",{children:o.map((n,s)=>{if(e&&n.startsWith("<")&&n.endsWith(">")){let i=n[1],a=e[i];if(a){let l=new RegExp(`<${i}>(.*?)</${i}>`,"g"),h=n.replace(l,(c,f)=>f);return g(a,{children:g(L,{translationString:h})},s)}}return n})})},I=({elements:e,i18nKey:t,t:r,variables:o})=>{let n=r(t,o||{});return e?g(L,{elements:e,translationString:n}):n};import{jsx as $}from"react/jsx-runtime";import{isReactServerComponentOrFunction as z,serverProps as B}from"payload/shared";import"react";function H({Component:e,sanitizeServerOnlyProps:t,toMergeIntoProps:r}){return t===void 0&&(t=!z(e)),n=>{let s=W(n,r);return t&&B.forEach(i=>{delete s[i]}),$(e,{...s})}}function W(e,t){return{...e,...t}}import{jsx as k}from"react/jsx-runtime";import{isReactServerComponentOrFunction as E}from"payload/shared";import"react";var V=({Component:e,serverOnlyProps:t,...r})=>e?(n=>{let s={...n,...E(e)?t??{}:{}};return k(e,{...s})})(r):null;var _=e=>({...e?.admin?.style||{},...e?.admin?.width?{"--field-width":e.admin.width}:{flex:"1 1 auto"},...e?.admin?.style?.flex?{flex:e.admin.style.flex}:{}});var q=["validate","customComponents"],K=e=>{let t={...e};for(let r of q)delete t[r];return t},Y=e=>{let t={};for(let r in e)t[r]=K(e[r]);return t};import{jsx as U,jsxs as Q}from"react/jsx-runtime";import"react";var J=({fill:e})=>{let t=e||"var(--theme-elevation-1000)";return Q("svg",{className:"graphic-icon",height:"100%",viewBox:"0 0 25 25",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:[U("path",{d:"M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z",fill:t}),U("path",{d:"M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z",fill:t})]})};import{jsx as p,jsxs as T}from"react/jsx-runtime";import"react";var X=`
1
+ import{jsx as g}from"react/jsx-runtime";import"react";var F=({elements:t,translationString:e})=>{let r=/(<[^>]+>.*?<\/[^>]+>)/g,o=e.split(r);return g("span",{children:o.map((n,s)=>{if(t&&n.startsWith("<")&&n.endsWith(">")){let i=n[1],l=t[i];if(l){let a=new RegExp(`<${i}>(.*?)</${i}>`,"g"),u=n.replace(a,(c,f)=>f);return g(l,{children:g(F,{translationString:u})},s)}}return n})})},B=({elements:t,i18nKey:e,t:r,variables:o})=>{let n=r(e,o||{});return t?g(F,{elements:t,translationString:n}):n};import{jsx as $}from"react/jsx-runtime";import{isReactServerComponentOrFunction as H,serverProps as V}from"payload/shared";import"react";function z({Component:t,sanitizeServerOnlyProps:e,toMergeIntoProps:r}){return e===void 0&&(e=!H(t)),n=>{let s=W(n,r);return e&&V.forEach(i=>{delete s[i]}),$(t,{...s})}}function W(t,e){return{...t,...e}}import{jsx as _}from"react/jsx-runtime";import{isReactServerComponentOrFunction as G}from"payload/shared";import"react";var K=({Component:t,serverOnlyProps:e,...r})=>t?(n=>{let s={...n,...G(t)?e??{}:{}};return _(t,{...s})})(r):null;var Y=t=>({...t?.admin?.style||{},...t?.admin?.width?{"--field-width":t.admin.width}:{flex:"1 1 auto"},...t?.admin?.style?.flex?{flex:t.admin.style.flex}:{}});var q=["validate","customComponents"],Q=t=>{let e={...t};for(let r of q)delete e[r];return e},J=t=>{let e={};for(let r in t)e[r]=Q(t[r]);return e};import{jsx as O,jsxs as X}from"react/jsx-runtime";import"react";var tt=({fill:t})=>{let e=t||"var(--theme-elevation-1000)";return X("svg",{className:"graphic-icon",height:"100%",viewBox:"0 0 25 25",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:[O("path",{d:"M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z",fill:e}),O("path",{d:"M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z",fill:e})]})};import{jsx as p,jsxs as T}from"react/jsx-runtime";import"react";var et=`
2
2
  .graphic-logo path {
3
3
  fill: var(--theme-elevation-1000);
4
4
  }
5
- `,G=()=>T("svg",{className:"graphic-logo",fill:"none",height:"43.5",id:"b",viewBox:"0 0 193.38 43.5",width:"193.38",xmlns:"http://www.w3.org/2000/svg",children:[p("style",{children:X}),T("g",{id:"c",children:[p("path",{d:"M18.01,35.63l-12.36-7.13c-.15-.09-.25-.25-.25-.43v-11.02c0-.19.21-.31.37-.22l14.35,8.28c.2.12.45-.03.45-.26v-5.37c0-.21-.11-.41-.3-.52L3.01,9c-.15-.09-.35-.09-.5,0l-2.26,1.31c-.15.09-.25.25-.25.43v20.47c0,.18.1.34.25.43l17.73,10.24c.15.09.35.09.5,0l14.89-8.6c.2-.12.2-.4,0-.52l-4.64-2.68c-.19-.11-.41-.11-.6,0l-9.61,5.55c-.15.09-.35.09-.5,0Z"}),p("path",{d:"M36.21,10.3L18.48.07c-.15-.09-.35-.09-.5,0l-9.37,5.41c-.2.12-.2.4,0,.52l4.6,2.66c.19.11.41.11.6,0l4.2-2.42c.15-.09.35-.09.5,0l12.36,7.13c.15.09.25.25.25.43v11.07c0,.21.11.41.3.52l4.6,2.65c.2.12.45-.03.45-.26V10.74c0-.18-.1-.34-.25-.43Z"}),T("g",{id:"d",children:[p("path",{d:"M193.38,9.47c0,1.94-1.48,3.32-3.3,3.32s-3.31-1.39-3.31-3.32,1.49-3.31,3.31-3.31,3.3,1.39,3.3,3.31ZM192.92,9.47c0-1.68-1.26-2.88-2.84-2.88s-2.84,1.2-2.84,2.88,1.26,2.89,2.84,2.89,2.84-1.2,2.84-2.89ZM188.69,11.17v-3.51h1.61c.85,0,1.35.39,1.35,1.15,0,.53-.3.86-.67,1.02l.79,1.35h-.89l-.72-1.22h-.64v1.22h-.82ZM190.18,9.31c.46,0,.64-.16.64-.5s-.19-.49-.64-.49h-.67v.99h.67Z"}),p("path",{d:"M54.72,24.84v10.93h-5.4V6.1h12.26c7.02,0,11.1,3.2,11.1,9.39s-4.07,9.35-11.06,9.35h-6.9,0ZM61.12,20.52c4.07,0,6.11-1.66,6.11-5.03s-2.04-5.03-6.11-5.03h-6.4v10.06h6.4Z"}),p("path",{d:"M85.94,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.18-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM85.73,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z"}),p("path",{d:"M90.39,14.66h5.4l5.86,15.92h.08l5.57-15.92h5.28l-8.23,21.49c-2,5.28-4.45,7.32-8.89,7.36-.71,0-1.7-.08-2.45-.21v-4.03c.62.13.96.13,1.41.13,2.16,0,3.07-.75,4.2-3.66l-8.23-21.07h0Z"}),p("path",{d:"M113.46,35.77V6.1h5.32v29.67h-5.32Z"}),p("path",{d:"M130.79,36.27c-6.23,0-10.68-4.2-10.68-11.05s4.45-11.05,10.68-11.05,10.68,4.24,10.68,11.05-4.45,11.05-10.68,11.05ZM130.79,32.32c3.41,0,5.36-2.66,5.36-7.11s-1.95-7.11-5.36-7.11-5.36,2.7-5.36,7.11,1.91,7.11,5.36,7.11Z"}),p("path",{d:"M156.19,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.19-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM155.98,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z"}),p("path",{d:"M178.5,32.41c-1.04,2.12-3.58,3.87-6.78,3.87-5.53,0-9.31-4.49-9.31-11.05s3.78-11.05,9.31-11.05c3.28,0,5.69,1.83,6.69,3.95V6.1h5.32v29.67h-5.24v-3.37h0ZM178.55,24.84c0-4.11-1.95-6.78-5.32-6.78s-5.45,2.83-5.45,7.15,2,7.15,5.45,7.15,5.32-2.66,5.32-6.78v-.75h0Z"})]})]})]});import{fieldIsHiddenOrDisabled as ee,fieldIsID as te}from"payload/shared";var D=e=>{let t=r=>r.type!=="ui"&&ee(r)&&!te(r)||r?.admin?.disableListColumn===!0;return(e??[]).reduce((r,o)=>{if(t(o))return r;if(o.type==="tabs"&&"tabs"in o){let n={...o,tabs:o.tabs.map(s=>({...s,fields:D(s.fields)}))};return r.push(n),r}if("fields"in o&&Array.isArray(o.fields)){let n={...o,fields:D(o.fields)};return r.push(n),r}return r.push(o),r},[])};import{fieldAffectsData as F}from"payload/shared";var C=(e,t)=>e?.reduce((r,o)=>F(o)&&o.name===t?r:!F(o)&&"fields"in o?[...r,...C(o.fields,t)]:o.type==="tabs"&&"tabs"in o?[...r,...o.tabs.reduce((n,s)=>[...n,..."name"in s?[s.name]:C(s.fields,t)],[])]:[...r,o.name],[]),re=(e,t,r)=>{let o=[];if(Array.isArray(r)&&r.length>=1)o=r;else{t&&o.push(t);let n=C(e,t);o=o.concat(n),o=o.slice(0,4)}return o.map(n=>({accessor:n,active:!0}))};function oe(e){if(e)try{e.abort()}catch{}}function ne(e){let t=new AbortController;if(e.current)try{e.current.abort()}catch{}return e.current=t,t}import*as O from"qs-esm";var se={delete:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{},o={...t,credentials:"include",headers:{...r},method:"delete"};return fetch(e,o)},get:(e,t={headers:{}})=>{let r="";return t.params&&(r=O.stringify(t.params,{addQueryPrefix:!0})),fetch(`${e}${r}`,{credentials:"include",...t})},patch:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{},o={...t,credentials:"include",headers:{...r},method:"PATCH"};return fetch(e,o)},post:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{},o={...t,credentials:"include",headers:{...r},method:"post"};return fetch(`${e}`,o)},put:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{},o={...t,credentials:"include",headers:{...r},method:"put"};return fetch(e,o)}};var ie=(e,t)=>!e?.locales||e.locales.length===0?null:e.locales.find(r=>r?.code===t);import{formatAdminURL as ae}from"payload/shared";var le={},d={};function u(e,t){try{let o=(le[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return o in d?d[o]:Z(o,o.split(":"))}catch{if(e in d)return d[e];let r=e?.match(ce);return r?Z(e,r.slice(1)):NaN}}var ce=/([+-]\d\d):?(\d\d)?/;function Z(e,t){let r=+t[0],o=+(t[1]||0);return d[e]=r>0?r*60+o:r*60-o}var m=class e extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(u(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),N(this,NaN),w(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new e(...r,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-u(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),w(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}},j=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!j.test(e))return;let t=e.replace(j,"$1UTC");m.prototype[t]&&(e.startsWith("get")?m.prototype[e]=function(){return this.internal[t]()}:(m.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),fe(this),+this},m.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),w(this),+this}))});function w(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function fe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),N(e)}function N(e){let t=u(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),n=-new Date(+r).getTimezoneOffset(),s=o-n,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);let a=o-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);let l=u(e.timeZone,e),c=-new Date(+e).getTimezoneOffset()-l,f=l!==t,b=c-a;if(f&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);let A=u(e.timeZone,e),y=l-A;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}import{format as P,formatDistanceToNow as lt,transpose as pe}from"date-fns";var v=({date:e,i18n:t,pattern:r,timezone:o})=>{let n=new m(new Date(e));if(o){let s=m.tz(o),i=n.withTimeZone(o),a=pe(i,s);return t.dateFNS?P(a,r,{locale:t.dateFNS}):`${t.t("general:loading")}...`}return t.dateFNS?P(n,r,{locale:t.dateFNS}):`${t.t("general:loading")}...`};import{getTranslation as he}from"@payloadcms/translations";function M(e){return typeof e=="object"&&"root"in e}function x(e,t){for(let r of e)"text"in r&&r.text?t+=r.text:"children"in r||(t+=`[${r.type}]`),"children"in r&&r.children&&(t+=x(r.children,t));return t}var R=e=>Array.isArray(e)?e.map(t=>typeof t=="object"&&t!==null?t.id:String(t)).filter(Boolean).join(", "):typeof e=="object"&&e!==null?e.id||"":String(e);var me=({collectionConfig:e,data:t,dateFormat:r,fallback:o,globalConfig:n,i18n:s})=>{let i;if(e){let a=e?.admin?.useAsTitle;if(a&&(i=t?.[a],i)){let l=e.fields.find(f=>"name"in f&&f.name===a),h=l?.type==="date",c=l?.type==="relationship";if(h){let f="date"in l.admin&&l?.admin?.date?.displayFormat||r;i=v({date:i,i18n:s,pattern:f})||i}c&&(i=R(t[a]))}}return n&&(i=he(n?.label,s)||n?.slug),i&&M(i)&&(i=x(i.root.children?.[0]?.children||[],"")),!i&&M(o)&&(i=x(o.root.children?.[0]?.children||[],"")),i||(i=typeof o=="string"?o:`[${s.t("general:untitled")}]`),i};import{getTranslation as S}from"@payloadcms/translations";var ue=function(e){return e.collection="collections",e.global="globals",e}({});function de(e,t,r){return e.reduce((n,s)=>{if(s.entity?.admin?.group===!1)return n;if(t?.[s.type.toLowerCase()]?.[s.entity.slug]?.read){let i=S(s.entity.admin.group,r),a="labels"in s.entity?s.entity.labels.plural:s.entity.label,l=typeof a=="function"?a({i18n:r,t:r.t}):a;if(s.entity.admin.group){let h=n.find(f=>S(f.label,r)===i),c=h;h||(c={entities:[],label:i},n.push(c)),c.entities.push({slug:s.entity.slug,type:s.type,label:l})}else n.find(c=>S(c.label,r)===r.t(`general:${s.type}`)).entities.push({slug:s.entity.slug,type:s.type,label:l})}return n},[{entities:[],label:r.t("general:collections")},{entities:[],label:r.t("general:globals")}]).filter(n=>n.entities.length>0)}import{formatAdminURL as ge}from"payload/shared";var xe=({adminRoute:e,router:t,serverURL:r})=>{let o=ge({adminRoute:e,path:"/",serverURL:r});t.push(o)};import{formatAdminURL as ye}from"payload/shared";var Te=({adminRoute:e,collectionSlug:t,router:r,serverURL:o})=>{let n=ye({adminRoute:e,path:t?`/collections/${t}`:"/",serverURL:o});r.push(n)};var De=async({id:e,clearRouteCache:t,collectionSlug:r,documentLockStateRef:o,globalSlug:n,isLockingEnabled:s,isWithinDoc:i,setCurrentEditor:a,setIsReadOnlyForIncomingUser:l,updateDocumentEditor:h,user:c})=>{if(s)try{await h(e,r??n,c),i||(o.current.hasShownLockedModal=!0),o.current={hasShownLockedModal:o.current?.hasShownLockedModal,isLocked:!0,user:c},a(c),i&&l&&l(!1),t&&t()}catch(f){console.error("Error during document takeover:",f)}};var Ce=e=>{let{collectionSlug:t,docPermissions:r,globalSlug:o,isEditing:n}=e;return t?!!(n&&r?.update||!n&&r?.create):o?!!r?.update:!1};var we=e=>e&&typeof e=="object";var ve=({id:e,collectionSlug:t,globalSlug:r})=>!!(r||t&&e);function Me(e){return e===void 0||typeof e=="number"?e:decodeURIComponent(e)}import{mergeListSearchAndWhere as Gt}from"payload/shared";export{ue as EntityType,J as PayloadIcon,G as PayloadLogo,I as Translation,V as WithServerSideProps,oe as abortAndIgnore,D as filterFields,ie as findLocaleFromCode,ae as formatAdminURL,v as formatDate,me as formatDocTitle,re as getInitialColumns,de as groupNavItems,ne as handleAbortRef,xe as handleBackToDashboard,Te as handleGoBack,De as handleTakeOver,Ce as hasSavePermission,we as isClientUserObject,ve as isEditing,_ as mergeFieldStyles,Gt as mergeListSearchAndWhere,Y as reduceToSerializableFields,se as requests,Me as sanitizeID,H as withMergedProps};
5
+ `,rt=()=>T("svg",{className:"graphic-logo",fill:"none",height:"43.5",id:"b",viewBox:"0 0 193.38 43.5",width:"193.38",xmlns:"http://www.w3.org/2000/svg",children:[p("style",{children:et}),T("g",{id:"c",children:[p("path",{d:"M18.01,35.63l-12.36-7.13c-.15-.09-.25-.25-.25-.43v-11.02c0-.19.21-.31.37-.22l14.35,8.28c.2.12.45-.03.45-.26v-5.37c0-.21-.11-.41-.3-.52L3.01,9c-.15-.09-.35-.09-.5,0l-2.26,1.31c-.15.09-.25.25-.25.43v20.47c0,.18.1.34.25.43l17.73,10.24c.15.09.35.09.5,0l14.89-8.6c.2-.12.2-.4,0-.52l-4.64-2.68c-.19-.11-.41-.11-.6,0l-9.61,5.55c-.15.09-.35.09-.5,0Z"}),p("path",{d:"M36.21,10.3L18.48.07c-.15-.09-.35-.09-.5,0l-9.37,5.41c-.2.12-.2.4,0,.52l4.6,2.66c.19.11.41.11.6,0l4.2-2.42c.15-.09.35-.09.5,0l12.36,7.13c.15.09.25.25.25.43v11.07c0,.21.11.41.3.52l4.6,2.65c.2.12.45-.03.45-.26V10.74c0-.18-.1-.34-.25-.43Z"}),T("g",{id:"d",children:[p("path",{d:"M193.38,9.47c0,1.94-1.48,3.32-3.3,3.32s-3.31-1.39-3.31-3.32,1.49-3.31,3.31-3.31,3.3,1.39,3.3,3.31ZM192.92,9.47c0-1.68-1.26-2.88-2.84-2.88s-2.84,1.2-2.84,2.88,1.26,2.89,2.84,2.89,2.84-1.2,2.84-2.89ZM188.69,11.17v-3.51h1.61c.85,0,1.35.39,1.35,1.15,0,.53-.3.86-.67,1.02l.79,1.35h-.89l-.72-1.22h-.64v1.22h-.82ZM190.18,9.31c.46,0,.64-.16.64-.5s-.19-.49-.64-.49h-.67v.99h.67Z"}),p("path",{d:"M54.72,24.84v10.93h-5.4V6.1h12.26c7.02,0,11.1,3.2,11.1,9.39s-4.07,9.35-11.06,9.35h-6.9,0ZM61.12,20.52c4.07,0,6.11-1.66,6.11-5.03s-2.04-5.03-6.11-5.03h-6.4v10.06h6.4Z"}),p("path",{d:"M85.94,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.18-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM85.73,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z"}),p("path",{d:"M90.39,14.66h5.4l5.86,15.92h.08l5.57-15.92h5.28l-8.23,21.49c-2,5.28-4.45,7.32-8.89,7.36-.71,0-1.7-.08-2.45-.21v-4.03c.62.13.96.13,1.41.13,2.16,0,3.07-.75,4.2-3.66l-8.23-21.07h0Z"}),p("path",{d:"M113.46,35.77V6.1h5.32v29.67h-5.32Z"}),p("path",{d:"M130.79,36.27c-6.23,0-10.68-4.2-10.68-11.05s4.45-11.05,10.68-11.05,10.68,4.24,10.68,11.05-4.45,11.05-10.68,11.05ZM130.79,32.32c3.41,0,5.36-2.66,5.36-7.11s-1.95-7.11-5.36-7.11-5.36,2.7-5.36,7.11,1.91,7.11,5.36,7.11Z"}),p("path",{d:"M156.19,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.19-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM155.98,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z"}),p("path",{d:"M178.5,32.41c-1.04,2.12-3.58,3.87-6.78,3.87-5.53,0-9.31-4.49-9.31-11.05s3.78-11.05,9.31-11.05c3.28,0,5.69,1.83,6.69,3.95V6.1h5.32v29.67h-5.24v-3.37h0ZM178.55,24.84c0-4.11-1.95-6.78-5.32-6.78s-5.45,2.83-5.45,7.15,2,7.15,5.45,7.15,5.32-2.66,5.32-6.78v-.75h0Z"})]})]})]});import{fieldIsHiddenOrDisabled as ot,fieldIsID as nt}from"payload/shared";var v=t=>{let e=r=>r.type!=="ui"&&ot(r)&&!nt(r)||r?.admin?.disableListColumn===!0;return(t??[]).reduce((r,o)=>{if(e(o))return r;if(o.type==="tabs"&&"tabs"in o){let n={...o,tabs:o.tabs.map(s=>({...s,fields:v(s.fields)}))};return r.push(n),r}if("fields"in o&&Array.isArray(o.fields)){let n={...o,fields:v(o.fields)};return r.push(n),r}return r.push(o),r},[])};import{fieldAffectsData as Z}from"payload/shared";var b=(t,e)=>t?.reduce((r,o)=>Z(o)&&o.name===e?r:!Z(o)&&"fields"in o?[...r,...b(o.fields,e)]:o.type==="tabs"&&"tabs"in o?[...r,...o.tabs.reduce((n,s)=>[...n,..."name"in s?[s.name]:b(s.fields,e)],[])]:[...r,o.name],[]),st=(t,e,r)=>{let o=[];if(Array.isArray(r)&&r.length>=1)o=r;else{e&&o.push(e);let n=b(t,e);o=o.concat(n),o=o.slice(0,4)}return o.map(n=>({accessor:n,active:!0}))};function it(t){if(t)try{t.abort()}catch{}}function lt(t){let e=new AbortController;if(t.current)try{t.current.abort()}catch{}return t.current=e,e}import*as N from"qs-esm";var at={delete:(t,e={headers:{}})=>{let r=e&&e.headers?{...e.headers}:{},o={...e,credentials:"include",headers:{...r},method:"delete"};return fetch(t,o)},get:(t,e={headers:{}})=>{let r="";return e.params&&(r=N.stringify(e.params,{addQueryPrefix:!0})),fetch(`${t}${r}`,{credentials:"include",...e})},patch:(t,e={headers:{}})=>{let r=e&&e.headers?{...e.headers}:{},o={...e,credentials:"include",headers:{...r},method:"PATCH"};return fetch(t,o)},post:(t,e={headers:{}})=>{let r=e&&e.headers?{...e.headers}:{},o={...e,credentials:"include",headers:{...r},method:"post"};return fetch(`${t}`,o)},put:(t,e={headers:{}})=>{let r=e&&e.headers?{...e.headers}:{},o={...e,credentials:"include",headers:{...r},method:"put"};return fetch(t,o)}};var ct=(t,e)=>!t?.locales||t.locales.length===0?null:t.locales.find(r=>r?.code===e);import{formatAdminURL as ft}from"payload/shared";var pt={},d={};function h(t,e){try{let o=(pt[t]||=new Intl.DateTimeFormat("en-GB",{timeZone:t,hour:"numeric",timeZoneName:"longOffset"}).format)(e).split("GMT")[1]||"";return o in d?d[o]:j(o,o.split(":"))}catch{if(t in d)return d[t];let r=t?.match(ut);return r?j(t,r.slice(1)):NaN}}var ut=/([+-]\d\d):?(\d\d)?/;function j(t,e){let r=+e[0],o=+(e[1]||0);return d[t]=r>0?r*60+o:r*60-o}var m=class t extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(h(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),P(this,NaN),w(this)):this.setTime(Date.now())}static tz(e,...r){return r.length?new t(...r,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){return-h(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),w(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}},A=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!A.test(t))return;let e=t.replace(A,"$1UTC");m.prototype[e]&&(t.startsWith("get")?m.prototype[t]=function(){return this.internal[e]()}:(m.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),mt(this),+this},m.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),w(this),+this}))});function w(t){t.internal.setTime(+t),t.internal.setUTCMinutes(t.internal.getUTCMinutes()-t.getTimezoneOffset())}function mt(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),P(t)}function P(t){let e=h(t.timeZone,t),r=new Date(+t);r.setUTCHours(r.getUTCHours()-1);let o=-new Date(+t).getTimezoneOffset(),n=-new Date(+r).getTimezoneOffset(),s=o-n,i=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();s&&i&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+s);let l=o-e;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);let a=h(t.timeZone,t),c=-new Date(+t).getTimezoneOffset()-a,f=a!==e,U=c-l;if(f&&U){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+U);let E=h(t.timeZone,t),D=a-E;D&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+D),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+D))}}import{format as R,formatDistanceToNow as ue,transpose as ht}from"date-fns";var C=({date:t,i18n:e,pattern:r,timezone:o})=>{let n=new m(new Date(t));if(o){let s=m.tz(o),i=n.withTimeZone(o),l=ht(i,s);return e.dateFNS?R(l,r,{locale:e.dateFNS}):`${e.t("general:loading")}...`}return e.dateFNS?R(n,r,{locale:e.dateFNS}):`${e.t("general:loading")}...`};import{getTranslation as dt}from"@payloadcms/translations";function M(t){return typeof t=="object"&&"root"in t}function y(t,e){for(let r of t)"text"in r&&r.text?e+=r.text:"children"in r||(e+=`[${r.type}]`),"children"in r&&r.children&&(e+=y(r.children,e));return e}var k=t=>Array.isArray(t)?t.map(e=>typeof e=="object"&&e!==null?e.id:String(e)).filter(Boolean).join(", "):typeof t=="object"&&t!==null?t.id||"":String(t);var gt=({collectionConfig:t,data:e,dateFormat:r,fallback:o,globalConfig:n,i18n:s})=>{let i;if(t){let l=t?.admin?.useAsTitle;if(l&&(i=e?.[l],i)){let a=t.fields.find(f=>"name"in f&&f.name===l),u=a?.type==="date",c=a?.type==="relationship";if(u){let f="date"in a.admin&&a?.admin?.date?.displayFormat||r;i=C({date:i,i18n:s,pattern:f})||i}c&&(i=k(e[l]))}}return n&&(i=dt(n?.label,s)||n?.slug),i&&M(i)&&(i=y(i.root.children?.[0]?.children||[],"")),!i&&M(o)&&(i=y(o.root.children?.[0]?.children||[],"")),i||(i=typeof o=="string"?o:`[${s.t("general:untitled")}]`),i};async function yt(t){let{payload:{config:e},payload:r}=t,o=[];if(e.globals.length>0){let n=await r.find({collection:"payload-locked-documents",depth:1,overrideAccess:!1,pagination:!1,req:t,select:{globalSlug:!0,updatedAt:!0,user:!0},where:{globalSlug:{exists:!0}}});o=e.globals.map(s=>{let i=typeof s.lockDocuments=="object"?s.lockDocuments.duration:300,l=n.docs.find(a=>a.globalSlug===s.slug);return{slug:s.slug,data:{_isLocked:!!l,_lastEditedAt:l?.updatedAt??null,_userEditing:l?.user?.value??null},lockDuration:i}})}return o}import{getTranslation as S}from"@payloadcms/translations";var x=function(t){return t.collection="collections",t.global="globals",t}({});function L(t,e,r){return t.reduce((n,s)=>{if(s.entity?.admin?.group===!1)return n;if(e?.[s.type.toLowerCase()]?.[s.entity.slug]?.read){let i=S(s.entity.admin.group,r),l="labels"in s.entity?s.entity.labels.plural:s.entity.label,a=typeof l=="function"?l({i18n:r,t:r.t}):l;if(s.entity.admin.group){let u=n.find(f=>S(f.label,r)===i),c=u;u||(c={entities:[],label:i},n.push(c)),c.entities.push({slug:s.entity.slug,type:s.type,label:a})}else n.find(c=>S(c.label,r)===r.t(`general:${s.type}`)).entities.push({slug:s.entity.slug,type:s.type,label:a})}return n},[{entities:[],label:r.t("general:collections")},{entities:[],label:r.t("general:globals")}]).filter(n=>n.entities.length>0)}function xt(t,e,r,o){let n=r.collections.filter(l=>t?.collections?.[l.slug]?.read&&e.collections.includes(l.slug)),s=r.globals.filter(l=>t?.globals?.[l.slug]?.read&&e.globals.includes(l.slug));return L([...n.map(l=>({type:x.collection,entity:l}))??[],...s.map(l=>({type:x.global,entity:l}))??[]],t,o)}function I(t,e){if(typeof t=="function")try{return t({user:e})}catch{return!0}return!!t}function Dt({req:t}){return{collections:t.payload.config.collections.map(({slug:e,admin:{hidden:r}})=>I(r,t.user)?null:e).filter(Boolean),globals:t.payload.config.globals.map(({slug:e,admin:{hidden:r}})=>I(r,t.user)?null:e).filter(Boolean)}}import{formatAdminURL as Tt}from"payload/shared";var vt=({adminRoute:t,router:e,serverURL:r})=>{let o=Tt({adminRoute:t,path:"",serverURL:r});e.push(o)};import{formatAdminURL as bt}from"payload/shared";var wt=({adminRoute:t,collectionSlug:e,router:r,serverURL:o})=>{let n=bt({adminRoute:t,path:e?`/collections/${e}`:"/"});r.push(n)};var Ct=async({id:t,clearRouteCache:e,collectionSlug:r,documentLockStateRef:o,globalSlug:n,isLockingEnabled:s,isWithinDoc:i,setCurrentEditor:l,setIsReadOnlyForIncomingUser:a,updateDocumentEditor:u,user:c})=>{if(s)try{await u(t,r??n,c),i||(o.current.hasShownLockedModal=!0),o.current={hasShownLockedModal:o.current?.hasShownLockedModal,isLocked:!0,user:c},l(c),i&&a&&a(!1),e&&e()}catch(f){console.error("Error during document takeover:",f)}};var Mt=t=>{let{collectionSlug:e,docPermissions:r,globalSlug:o,isEditing:n}=t;return e?!!(n&&r?.update||!n&&r?.create):o?!!r?.update:!1};var St=t=>t&&typeof t=="object";var Lt=({id:t,collectionSlug:e,globalSlug:r})=>!!(r||e&&t);function Ut(t){return t===void 0||typeof t=="number"?t:decodeURIComponent(t)}import{mergeListSearchAndWhere as pr}from"payload/shared";export{x as EntityType,tt as PayloadIcon,rt as PayloadLogo,B as Translation,K as WithServerSideProps,it as abortAndIgnore,v as filterFields,ct as findLocaleFromCode,ft as formatAdminURL,C as formatDate,gt as formatDocTitle,yt as getGlobalData,st as getInitialColumns,xt as getNavGroups,Dt as getVisibleEntities,L as groupNavItems,lt as handleAbortRef,vt as handleBackToDashboard,wt as handleGoBack,Ct as handleTakeOver,Mt as hasSavePermission,St as isClientUserObject,Lt as isEditing,Y as mergeFieldStyles,pr as mergeListSearchAndWhere,J as reduceToSerializableFields,at as requests,Ut as sanitizeID,z as withMergedProps};
6
6
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/elements/Translation/index.tsx", "../../../src/elements/withMergedProps/index.tsx", "../../../src/elements/WithServerSideProps/index.tsx", "../../../src/fields/mergeFieldStyles.ts", "../../../src/forms/Form/reduceToSerializableFields.ts", "../../../src/graphics/Icon/index.tsx", "../../../src/graphics/Logo/index.tsx", "../../../src/providers/TableColumns/buildColumnState/filterFields.tsx", "../../../src/providers/TableColumns/getInitialColumns.ts", "../../../src/utilities/abortAndIgnore.ts", "../../../src/utilities/api.ts", "../../../src/utilities/findLocaleFromCode.ts", "../../../src/utilities/formatAdminURL.ts", "../../../../../node_modules/.pnpm/@date-fns+tz@1.2.0/node_modules/@date-fns/tz/tzOffset/index.js", "../../../../../node_modules/.pnpm/@date-fns+tz@1.2.0/node_modules/@date-fns/tz/date/mini.js", "../../../src/utilities/formatDocTitle/formatDateTitle.ts", "../../../src/utilities/formatDocTitle/index.ts", "../../../src/utilities/formatDocTitle/formatLexicalDocTitle.ts", "../../../src/utilities/formatDocTitle/formatRelationshipTitle.ts", "../../../src/utilities/groupNavItems.ts", "../../../src/utilities/handleBackToDashboard.tsx", "../../../src/utilities/handleGoBack.tsx", "../../../src/utilities/handleTakeOver.tsx", "../../../src/utilities/hasSavePermission.ts", "../../../src/utilities/isClientUserObject.ts", "../../../src/utilities/isEditing.ts", "../../../src/utilities/sanitizeID.ts", "../../../src/exports/shared/index.ts"],
4
- "sourcesContent": ["import type { ClientTranslationKeys, TFunction } from '@payloadcms/translations'\n\nimport * as React from 'react'\n\nconst RecursiveTranslation: React.FC<{\n elements?: Record<string, React.FC<{ children: React.ReactNode }>>\n translationString: string\n}> = ({ elements, translationString }) => {\n const regex = /(<[^>]+>.*?<\\/[^>]+>)/g\n const sections = translationString.split(regex)\n\n return (\n <span>\n {sections.map((section, index) => {\n if (elements && section.startsWith('<') && section.endsWith('>')) {\n const elementKey = section[1]\n const Element = elements[elementKey]\n\n if (Element) {\n const regex = new RegExp(`<${elementKey}>(.*?)<\\/${elementKey}>`, 'g')\n const children = section.replace(regex, (_, group) => group)\n\n return (\n <Element key={index}>\n <RecursiveTranslation translationString={children} />\n </Element>\n )\n }\n }\n\n return section\n })}\n </span>\n )\n}\n\nexport type TranslationProps = {\n elements?: Record<string, React.FC<{ children: React.ReactNode }>>\n i18nKey: ClientTranslationKeys\n t: TFunction\n variables?: Record<string, unknown>\n}\n\nexport const Translation: React.FC<TranslationProps> = ({ elements, i18nKey, t, variables }) => {\n const stringWithVariables = t(i18nKey, variables || {})\n\n if (!elements) {\n return stringWithVariables\n }\n\n return <RecursiveTranslation elements={elements} translationString={stringWithVariables} />\n}\n", "import { isReactServerComponentOrFunction, serverProps } from 'payload/shared'\nimport React from 'react'\n\n/**\n * Creates a higher-order component (HOC) that merges predefined properties (`toMergeIntoProps`)\n * with any properties passed to the resulting component.\n *\n * Use this when you want to pre-specify some props for a component, while also allowing users to\n * pass in their own props. The HOC ensures the passed props and predefined props are combined before\n * rendering the original component.\n *\n * @example\n * const PredefinedComponent = withMergedProps({\n * Component: OriginalComponent,\n * toMergeIntoProps: { someExtraValue: 5 }\n * });\n * // Using <PredefinedComponent customProp=\"value\" /> will result in\n * // <OriginalComponent customProp=\"value\" someExtraValue={5} />\n *\n * @returns A higher-order component with combined properties.\n *\n * @param Component - The original component to wrap.\n * @param sanitizeServerOnlyProps - If true, server-only props will be removed from the merged props. @default true if the component is not a server component, false otherwise.\n * @param toMergeIntoProps - The properties to merge into the passed props.\n */\nexport function withMergedProps<ToMergeIntoProps, CompleteReturnProps>({\n Component,\n sanitizeServerOnlyProps,\n toMergeIntoProps,\n}: {\n Component: React.FC<CompleteReturnProps>\n sanitizeServerOnlyProps?: boolean\n toMergeIntoProps: ToMergeIntoProps\n}): React.FC<CompleteReturnProps> {\n if (sanitizeServerOnlyProps === undefined) {\n sanitizeServerOnlyProps = !isReactServerComponentOrFunction(Component)\n }\n // A wrapper around the args.Component to inject the args.toMergeArgs as props, which are merged with the passed props\n const MergedPropsComponent: React.FC<CompleteReturnProps> = (passedProps) => {\n const mergedProps = simpleMergeProps(passedProps, toMergeIntoProps) as CompleteReturnProps\n\n if (sanitizeServerOnlyProps) {\n serverProps.forEach((prop) => {\n delete mergedProps[prop]\n })\n }\n\n return <Component {...mergedProps} />\n }\n\n return MergedPropsComponent\n}\n\nfunction simpleMergeProps(props, toMerge) {\n return { ...props, ...toMerge }\n}\n", "import type { WithServerSidePropsComponent } from 'payload'\n\nimport { isReactServerComponentOrFunction } from 'payload/shared'\nimport React from 'react'\n\nexport const WithServerSideProps: WithServerSidePropsComponent = ({\n Component,\n serverOnlyProps,\n ...rest\n}) => {\n if (Component) {\n const WithServerSideProps: React.FC = (passedProps) => {\n const propsWithServerOnlyProps = {\n ...passedProps,\n ...(isReactServerComponentOrFunction(Component) ? (serverOnlyProps ?? {}) : {}),\n }\n\n return <Component {...propsWithServerOnlyProps} />\n }\n\n return WithServerSideProps(rest)\n }\n\n return null\n}\n", "import type { ClientField } from 'payload'\n\nexport const mergeFieldStyles = (\n field: ClientField | Omit<ClientField, 'type'>,\n): React.CSSProperties => ({\n ...(field?.admin?.style || {}),\n ...(field?.admin?.width\n ? {\n '--field-width': field.admin.width,\n }\n : {\n flex: '1 1 auto',\n }),\n // allow flex overrides to still take precedence over the fallback\n ...(field?.admin?.style?.flex\n ? {\n flex: field.admin.style.flex,\n }\n : {}),\n})\n", "import { type FormField, type FormState } from 'payload'\n\ntype BlacklistedKeys = 'customComponents' | 'validate'\nconst blacklistedKeys: BlacklistedKeys[] = ['validate', 'customComponents']\n\nconst sanitizeField = (incomingField: FormField): FormField => {\n const field = { ...incomingField } // shallow copy, as we only need to remove top-level keys\n\n for (const key of blacklistedKeys) {\n delete field[key]\n }\n\n return field\n}\n\n/**\n * Takes in FormState and removes fields that are not serializable.\n * Returns FormState without blacklisted keys.\n */\nexport const reduceToSerializableFields = (\n fields: FormState,\n): {\n [key: string]: Omit<FormField, BlacklistedKeys>\n} => {\n const result: Record<string, Omit<FormField, BlacklistedKeys>> = {}\n\n for (const key in fields) {\n result[key] = sanitizeField(fields[key])\n }\n\n return result\n}\n", "import React from 'react'\n\nexport const PayloadIcon: React.FC<{\n fill?: string\n}> = ({ fill: fillFromProps }) => {\n const fill = fillFromProps || 'var(--theme-elevation-1000)'\n\n return (\n <svg\n className=\"graphic-icon\"\n height=\"100%\"\n viewBox=\"0 0 25 25\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z\"\n fill={fill}\n />\n <path\n d=\"M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z\"\n fill={fill}\n />\n </svg>\n )\n}\n", "import React from 'react'\n\nconst css = `\n .graphic-logo path {\n fill: var(--theme-elevation-1000);\n }\n`\n\nexport const PayloadLogo: React.FC = () => (\n <svg\n className=\"graphic-logo\"\n fill=\"none\"\n height=\"43.5\"\n id=\"b\"\n viewBox=\"0 0 193.38 43.5\"\n width=\"193.38\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <style>{css}</style>\n <g id=\"c\">\n <path d=\"M18.01,35.63l-12.36-7.13c-.15-.09-.25-.25-.25-.43v-11.02c0-.19.21-.31.37-.22l14.35,8.28c.2.12.45-.03.45-.26v-5.37c0-.21-.11-.41-.3-.52L3.01,9c-.15-.09-.35-.09-.5,0l-2.26,1.31c-.15.09-.25.25-.25.43v20.47c0,.18.1.34.25.43l17.73,10.24c.15.09.35.09.5,0l14.89-8.6c.2-.12.2-.4,0-.52l-4.64-2.68c-.19-.11-.41-.11-.6,0l-9.61,5.55c-.15.09-.35.09-.5,0Z\" />\n <path d=\"M36.21,10.3L18.48.07c-.15-.09-.35-.09-.5,0l-9.37,5.41c-.2.12-.2.4,0,.52l4.6,2.66c.19.11.41.11.6,0l4.2-2.42c.15-.09.35-.09.5,0l12.36,7.13c.15.09.25.25.25.43v11.07c0,.21.11.41.3.52l4.6,2.65c.2.12.45-.03.45-.26V10.74c0-.18-.1-.34-.25-.43Z\" />\n <g id=\"d\">\n <path d=\"M193.38,9.47c0,1.94-1.48,3.32-3.3,3.32s-3.31-1.39-3.31-3.32,1.49-3.31,3.31-3.31,3.3,1.39,3.3,3.31ZM192.92,9.47c0-1.68-1.26-2.88-2.84-2.88s-2.84,1.2-2.84,2.88,1.26,2.89,2.84,2.89,2.84-1.2,2.84-2.89ZM188.69,11.17v-3.51h1.61c.85,0,1.35.39,1.35,1.15,0,.53-.3.86-.67,1.02l.79,1.35h-.89l-.72-1.22h-.64v1.22h-.82ZM190.18,9.31c.46,0,.64-.16.64-.5s-.19-.49-.64-.49h-.67v.99h.67Z\" />\n <path d=\"M54.72,24.84v10.93h-5.4V6.1h12.26c7.02,0,11.1,3.2,11.1,9.39s-4.07,9.35-11.06,9.35h-6.9,0ZM61.12,20.52c4.07,0,6.11-1.66,6.11-5.03s-2.04-5.03-6.11-5.03h-6.4v10.06h6.4Z\" />\n <path d=\"M85.94,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.18-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM85.73,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z\" />\n <path d=\"M90.39,14.66h5.4l5.86,15.92h.08l5.57-15.92h5.28l-8.23,21.49c-2,5.28-4.45,7.32-8.89,7.36-.71,0-1.7-.08-2.45-.21v-4.03c.62.13.96.13,1.41.13,2.16,0,3.07-.75,4.2-3.66l-8.23-21.07h0Z\" />\n <path d=\"M113.46,35.77V6.1h5.32v29.67h-5.32Z\" />\n <path d=\"M130.79,36.27c-6.23,0-10.68-4.2-10.68-11.05s4.45-11.05,10.68-11.05,10.68,4.24,10.68,11.05-4.45,11.05-10.68,11.05ZM130.79,32.32c3.41,0,5.36-2.66,5.36-7.11s-1.95-7.11-5.36-7.11-5.36,2.7-5.36,7.11,1.91,7.11,5.36,7.11Z\" />\n <path d=\"M156.19,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.19-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM155.98,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z\" />\n <path d=\"M178.5,32.41c-1.04,2.12-3.58,3.87-6.78,3.87-5.53,0-9.31-4.49-9.31-11.05s3.78-11.05,9.31-11.05c3.28,0,5.69,1.83,6.69,3.95V6.1h5.32v29.67h-5.24v-3.37h0ZM178.55,24.84c0-4.11-1.95-6.78-5.32-6.78s-5.45,2.83-5.45,7.15,2,7.15,5.45,7.15,5.32-2.66,5.32-6.78v-.75h0Z\" />\n </g>\n </g>\n </svg>\n)\n", "import type { ClientField, Field } from 'payload'\n\nimport { fieldIsHiddenOrDisabled, fieldIsID } from 'payload/shared'\n\n/**\n * Filters fields that are hidden, disabled, or have `disableListColumn` set to `true`.\n * Recurses through `tabs` and any container with `.fields` (e.g., `row`, `group`, `collapsible`).\n */\nexport const filterFields = <T extends ClientField | Field>(incomingFields: T[]): T[] => {\n const shouldSkipField = (field: T): boolean =>\n (field.type !== 'ui' && fieldIsHiddenOrDisabled(field) && !fieldIsID(field)) ||\n field?.admin?.disableListColumn === true\n\n return (incomingFields ?? []).reduce<T[]>((acc, field) => {\n if (shouldSkipField(field)) {\n return acc\n }\n\n // handle tabs\n if (field.type === 'tabs' && 'tabs' in field) {\n const formattedField: T = {\n ...field,\n tabs: field.tabs.map((tab) => ({\n ...tab,\n fields: filterFields(tab.fields as T[]),\n })),\n }\n acc.push(formattedField)\n return acc\n }\n\n // handle fields with subfields (row, group, collapsible, etc.)\n if ('fields' in field && Array.isArray(field.fields)) {\n const formattedField: T = {\n ...field,\n fields: filterFields(field.fields as T[]),\n }\n acc.push(formattedField)\n return acc\n }\n\n // leaf\n acc.push(field)\n return acc\n }, [])\n}\n", "import type { ClientField, CollectionConfig, CollectionPreferences, Field } from 'payload'\n\nimport { fieldAffectsData } from 'payload/shared'\n\nconst getRemainingColumns = <T extends ClientField[] | Field[]>(\n fields: T,\n useAsTitle: string,\n): CollectionPreferences['columns'] =>\n fields?.reduce((remaining, field) => {\n if (fieldAffectsData(field) && field.name === useAsTitle) {\n return remaining\n }\n\n if (!fieldAffectsData(field) && 'fields' in field) {\n return [...remaining, ...getRemainingColumns(field.fields, useAsTitle)]\n }\n\n if (field.type === 'tabs' && 'tabs' in field) {\n return [\n ...remaining,\n ...field.tabs.reduce(\n (tabFieldColumns, tab) => [\n ...tabFieldColumns,\n ...('name' in tab ? [tab.name] : getRemainingColumns(tab.fields, useAsTitle)),\n ],\n [],\n ),\n ]\n }\n\n return [...remaining, field.name]\n }, [])\n\n/**\n * Returns the initial columns to display in the table based on the following criteria:\n * 1. If `defaultColumns` is set in the collection config, use those columns\n * 2. Otherwise take `useAtTitle, if set, and the next 3 fields that are not hidden or disabled\n */\nexport const getInitialColumns = <T extends ClientField[] | Field[]>(\n fields: T,\n useAsTitle: CollectionConfig['admin']['useAsTitle'],\n defaultColumns: CollectionConfig['admin']['defaultColumns'],\n): CollectionPreferences['columns'] => {\n let initialColumns = []\n\n if (Array.isArray(defaultColumns) && defaultColumns.length >= 1) {\n initialColumns = defaultColumns\n } else {\n if (useAsTitle) {\n initialColumns.push(useAsTitle)\n }\n\n const remainingColumns = getRemainingColumns(fields, useAsTitle)\n\n initialColumns = initialColumns.concat(remainingColumns)\n initialColumns = initialColumns.slice(0, 4)\n }\n\n return initialColumns.map((column) => ({\n accessor: column,\n active: true,\n }))\n}\n", "export function abortAndIgnore(abortController: AbortController) {\n if (abortController) {\n try {\n abortController.abort()\n } catch (_err) {\n // swallow error\n }\n }\n}\n\n/**\n * Use this function when an effect is triggered multiple times over and you want to cancel the previous effect.\n * It will abort the previous effect and create a new AbortController for the next effect.\n * Important: You must also _reset_ the `abortControllerRef` after the effect is done, otherwise the next effect will be aborted immediately.\n * For example, run `abortControllerRef.current = null` in a `finally` block or after an awaited promise.\n * @param abortControllerRef\n * @returns {AbortController}\n */\nexport function handleAbortRef(\n abortControllerRef: React.RefObject<AbortController>,\n): AbortController {\n const newController = new AbortController()\n\n if (abortControllerRef.current) {\n try {\n abortControllerRef.current.abort()\n } catch (_err) {\n // swallow error\n }\n }\n\n abortControllerRef.current = newController\n\n return newController\n}\n", "import * as qs from 'qs-esm'\n\ntype GetOptions = {\n params?: Record<string, unknown>\n} & RequestInit\n\nexport const requests = {\n delete: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'delete',\n }\n\n return fetch(url, formattedOptions)\n },\n\n get: (url: string, options: GetOptions = { headers: {} }): Promise<Response> => {\n let query = ''\n if (options.params) {\n query = qs.stringify(options.params, { addQueryPrefix: true })\n }\n return fetch(`${url}${query}`, {\n credentials: 'include',\n ...options,\n })\n },\n\n patch: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'PATCH',\n }\n\n return fetch(url, formattedOptions)\n },\n\n post: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'post',\n }\n\n return fetch(`${url}`, formattedOptions)\n },\n\n put: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'put',\n }\n\n return fetch(url, formattedOptions)\n },\n}\n", "import type { Locale, SanitizedLocalizationConfig } from 'payload'\n/*\n return the Locale for given locale code, else return null\n*/\nexport const findLocaleFromCode = (\n localizationConfig: SanitizedLocalizationConfig,\n locale: string,\n): Locale | null => {\n if (!localizationConfig?.locales || localizationConfig.locales.length === 0) {\n return null\n }\n\n return localizationConfig.locales.find((el) => el?.code === locale)\n}\n", "/** Will read the `routes.admin` config and appropriately handle `\"/\"` admin paths */\nexport { formatAdminURL } from 'payload/shared'\n", "const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-GB\", {\n timeZone,\n hour: \"numeric\",\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split('GMT')[1] || '';\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support \u00B1HH:MM/\u00B1HHMM/\u00B1HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +values[0];\n const minutes = +(values[1] || 0);\n return offsetCache[cacheStr] = hours > 0 ? hours * 60 + minutes : hours * 60 - minutes;\n}", "import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n return -tzOffset(this.timeZone, this);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() - date.getTimezoneOffset());\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const offset = tzOffset(date.timeZone, date);\n\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postOffset = tzOffset(date.timeZone, date);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newOffset = tzOffset(date.timeZone, date);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}", "import type { I18n, I18nClient } from '@payloadcms/translations'\n\nimport { TZDateMini as TZDate } from '@date-fns/tz/date/mini'\nimport { format, formatDistanceToNow, transpose } from 'date-fns'\n\nexport type FormatDateArgs = {\n date: Date | number | string | undefined\n i18n: I18n<unknown, unknown> | I18nClient<unknown>\n pattern: string\n timezone?: string\n}\n\nexport const formatDate = ({ date, i18n, pattern, timezone }: FormatDateArgs): string => {\n const theDate = new TZDate(new Date(date))\n\n if (timezone) {\n const DateWithOriginalTz = TZDate.tz(timezone)\n\n const modifiedDate = theDate.withTimeZone(timezone)\n\n // Transpose the date to the selected timezone\n const dateWithTimezone = transpose(modifiedDate, DateWithOriginalTz)\n\n // Transpose the date to the user's timezone - this is necessary because the react-datepicker component insists on displaying the date in the user's timezone\n return i18n.dateFNS\n ? format(dateWithTimezone, pattern, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n }\n\n return i18n.dateFNS\n ? format(theDate, pattern, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n}\n\ntype FormatTimeToNowArgs = {\n date: Date | number | string | undefined\n i18n: I18n<unknown, unknown> | I18nClient<unknown>\n}\n\nexport const formatTimeToNow = ({ date, i18n }: FormatTimeToNowArgs): string => {\n const theDate = typeof date === 'string' ? new Date(date) : date\n return i18n?.dateFNS\n ? formatDistanceToNow(theDate, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n}\n", "import type { I18n } from '@payloadcms/translations'\nimport type {\n ClientCollectionConfig,\n ClientGlobalConfig,\n SanitizedConfig,\n TypeWithID,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { formatDate } from './formatDateTitle.js'\nimport { formatLexicalDocTitle, isSerializedLexicalEditor } from './formatLexicalDocTitle.js'\nimport { formatRelationshipTitle } from './formatRelationshipTitle.js'\n\nexport const formatDocTitle = ({\n collectionConfig,\n data,\n dateFormat: dateFormatFromConfig,\n fallback,\n globalConfig,\n i18n,\n}: {\n collectionConfig?: ClientCollectionConfig\n data: TypeWithID\n dateFormat: SanitizedConfig['admin']['dateFormat']\n fallback?: object | string\n globalConfig?: ClientGlobalConfig\n i18n: I18n<any, any>\n}): string => {\n let title: string\n\n if (collectionConfig) {\n const useAsTitle = collectionConfig?.admin?.useAsTitle\n\n if (useAsTitle) {\n title = data?.[useAsTitle] as string\n\n if (title) {\n const fieldConfig = collectionConfig.fields.find(\n (f) => 'name' in f && f.name === useAsTitle,\n )\n\n const isDate = fieldConfig?.type === 'date'\n const isRelationship = fieldConfig?.type === 'relationship'\n\n if (isDate) {\n const dateFormat =\n ('date' in fieldConfig.admin && fieldConfig?.admin?.date?.displayFormat) ||\n dateFormatFromConfig\n\n title = formatDate({ date: title, i18n, pattern: dateFormat }) || title\n }\n\n if (isRelationship) {\n const formattedRelationshipTitle = formatRelationshipTitle(data[useAsTitle])\n title = formattedRelationshipTitle\n }\n }\n }\n }\n\n if (globalConfig) {\n title = getTranslation(globalConfig?.label, i18n) || globalConfig?.slug\n }\n\n // richtext lexical case. We convert the first child of root to plain text\n if (title && isSerializedLexicalEditor(title)) {\n title = formatLexicalDocTitle(title.root.children?.[0]?.children || [], '')\n }\n\n if (!title && isSerializedLexicalEditor(fallback)) {\n title = formatLexicalDocTitle(fallback.root.children?.[0]?.children || [], '')\n }\n\n if (!title) {\n title = typeof fallback === 'string' ? fallback : `[${i18n.t('general:untitled')}]`\n }\n\n return title\n}\n", "type SerializedLexicalEditor = {\n root: {\n children: Array<{ children?: Array<{ type: string }>; type: string }>\n }\n}\n\nexport function isSerializedLexicalEditor(value: unknown): value is SerializedLexicalEditor {\n return typeof value === 'object' && 'root' in value\n}\n\nexport function formatLexicalDocTitle(\n editorState: Array<{ children?: Array<{ type: string }>; type: string }>,\n textContent: string,\n): string {\n for (const node of editorState) {\n if ('text' in node && node.text) {\n textContent += node.text as string\n } else {\n if (!('children' in node)) {\n textContent += `[${node.type}]`\n }\n }\n if ('children' in node && node.children) {\n textContent += formatLexicalDocTitle(node.children as Array<{ type: string }>, textContent)\n }\n }\n return textContent\n}\n", "export const formatRelationshipTitle = (data): string => {\n if (Array.isArray(data)) {\n return data\n .map((item) => {\n if (typeof item === 'object' && item !== null) {\n return item.id\n }\n return String(item)\n })\n .filter(Boolean)\n .join(', ')\n }\n\n if (typeof data === 'object' && data !== null) {\n return data.id || ''\n }\n\n return String(data)\n}\n", "import type { I18nClient } from '@payloadcms/translations'\nimport type {\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n StaticLabel,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nexport enum EntityType {\n collection = 'collections',\n global = 'globals',\n}\n\nexport type EntityToGroup =\n | {\n entity: SanitizedCollectionConfig\n type: EntityType.collection\n }\n | {\n entity: SanitizedGlobalConfig\n type: EntityType.global\n }\n\nexport type NavGroupType = {\n entities: {\n label: StaticLabel\n slug: string\n type: EntityType\n }[]\n label: string\n}\n\nexport function groupNavItems(\n entities: EntityToGroup[],\n permissions: SanitizedPermissions,\n i18n: I18nClient,\n): NavGroupType[] {\n const result = entities.reduce(\n (groups, entityToGroup) => {\n // Skip entities where admin.group is explicitly false\n if (entityToGroup.entity?.admin?.group === false) {\n return groups\n }\n\n if (permissions?.[entityToGroup.type.toLowerCase()]?.[entityToGroup.entity.slug]?.read) {\n const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n)\n\n const labelOrFunction =\n 'labels' in entityToGroup.entity\n ? entityToGroup.entity.labels.plural\n : entityToGroup.entity.label\n\n const label =\n typeof labelOrFunction === 'function'\n ? labelOrFunction({ i18n, t: i18n.t })\n : labelOrFunction\n\n if (entityToGroup.entity.admin.group) {\n const existingGroup = groups.find(\n (group) => getTranslation(group.label, i18n) === translatedGroup,\n ) as NavGroupType\n\n let matchedGroup: NavGroupType = existingGroup\n\n if (!existingGroup) {\n matchedGroup = { entities: [], label: translatedGroup }\n groups.push(matchedGroup)\n }\n\n matchedGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n } else {\n const defaultGroup = groups.find((group) => {\n return getTranslation(group.label, i18n) === i18n.t(`general:${entityToGroup.type}`)\n }) as NavGroupType\n defaultGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n }\n }\n\n return groups\n },\n [\n {\n entities: [],\n label: i18n.t('general:collections'),\n },\n {\n entities: [],\n label: i18n.t('general:globals'),\n },\n ],\n )\n\n return result.filter((group) => group.entities.length > 0)\n}\n", "import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'\n\nimport { formatAdminURL } from 'payload/shared'\n\ntype BackToDashboardProps = {\n adminRoute: string\n router: AppRouterInstance\n serverURL?: string\n}\n\nexport const handleBackToDashboard = ({ adminRoute, router, serverURL }: BackToDashboardProps) => {\n const redirectRoute = formatAdminURL({\n adminRoute,\n path: '/',\n serverURL,\n })\n router.push(redirectRoute)\n}\n", "import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'\n\nimport { formatAdminURL } from 'payload/shared'\n\ntype GoBackProps = {\n adminRoute: string\n collectionSlug: string\n router: AppRouterInstance\n serverURL?: string\n}\n\nexport const handleGoBack = ({ adminRoute, collectionSlug, router, serverURL }: GoBackProps) => {\n const redirectRoute = formatAdminURL({\n adminRoute,\n path: collectionSlug ? `/collections/${collectionSlug}` : '/',\n serverURL,\n })\n router.push(redirectRoute)\n}\n", "import type { ClientUser } from 'payload'\n\nexport interface HandleTakeOverParams {\n clearRouteCache?: () => void\n collectionSlug?: string\n documentLockStateRef: React.RefObject<{\n hasShownLockedModal: boolean\n isLocked: boolean\n user: ClientUser | number | string\n }>\n globalSlug?: string\n id: number | string\n isLockingEnabled: boolean\n isWithinDoc: boolean\n setCurrentEditor: (value: React.SetStateAction<ClientUser | number | string>) => void\n setIsReadOnlyForIncomingUser?: (value: React.SetStateAction<boolean>) => void\n updateDocumentEditor: (\n docID: number | string,\n slug: string,\n user: ClientUser | number | string,\n ) => Promise<void>\n user: ClientUser | number | string\n}\n\nexport const handleTakeOver = async ({\n id,\n clearRouteCache,\n collectionSlug,\n documentLockStateRef,\n globalSlug,\n isLockingEnabled,\n isWithinDoc,\n setCurrentEditor,\n setIsReadOnlyForIncomingUser,\n updateDocumentEditor,\n user,\n}: HandleTakeOverParams): Promise<void> => {\n if (!isLockingEnabled) {\n return\n }\n\n try {\n // Call updateDocumentEditor to update the document's owner to the current user\n await updateDocumentEditor(id, collectionSlug ?? globalSlug, user)\n\n if (!isWithinDoc) {\n documentLockStateRef.current.hasShownLockedModal = true\n }\n\n // Update the locked state to reflect the current user as the owner\n documentLockStateRef.current = {\n hasShownLockedModal: documentLockStateRef.current?.hasShownLockedModal,\n isLocked: true,\n user,\n }\n setCurrentEditor(user)\n\n // If this is a takeover within the document, ensure the document is editable\n if (isWithinDoc && setIsReadOnlyForIncomingUser) {\n setIsReadOnlyForIncomingUser(false)\n }\n\n // Need to clear the route cache to refresh the page and update readOnly state for server rendered components\n if (clearRouteCache) {\n clearRouteCache()\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error during document takeover:', error)\n }\n}\n", "import type {\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedGlobalPermission,\n} from 'payload'\n\nexport const hasSavePermission = (args: {\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n collectionSlug?: string\n docPermissions: SanitizedDocumentPermissions\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n globalSlug?: string\n isEditing: boolean\n}) => {\n const { collectionSlug, docPermissions, globalSlug, isEditing } = args\n\n if (collectionSlug) {\n return Boolean(\n (isEditing && docPermissions?.update) ||\n (!isEditing && (docPermissions as SanitizedCollectionPermission)?.create),\n )\n }\n\n if (globalSlug) {\n return Boolean((docPermissions as SanitizedGlobalPermission)?.update)\n }\n\n return false\n}\n", "import type { ClientUser } from 'payload'\n\nexport const isClientUserObject = (user): user is ClientUser => {\n return user && typeof user === 'object'\n}\n", "export const isEditing = ({\n id,\n collectionSlug,\n globalSlug,\n}: {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n}): boolean => Boolean(globalSlug || (collectionSlug && !!id))\n", "export function sanitizeID(id: number | string): number | string {\n if (id === undefined) {\n return id\n }\n\n if (typeof id === 'number') {\n return id\n }\n\n return decodeURIComponent(id)\n}\n", "export { Translation } from '../../elements/Translation/index.js'\nexport { withMergedProps } from '../../elements/withMergedProps/index.js' // cannot be within a 'use client', thus we export this from shared\nexport { WithServerSideProps } from '../../elements/WithServerSideProps/index.js'\nexport { mergeFieldStyles } from '../../fields/mergeFieldStyles.js'\nexport { reduceToSerializableFields } from '../../forms/Form/reduceToSerializableFields.js'\nexport { PayloadIcon } from '../../graphics/Icon/index.js'\nexport { PayloadLogo } from '../../graphics/Logo/index.js'\n// IMPORTANT: the shared.ts file CANNOT contain any Server Components _that import client components_.\nexport { filterFields } from '../../providers/TableColumns/buildColumnState/filterFields.js'\nexport { getInitialColumns } from '../../providers/TableColumns/getInitialColumns.js'\nexport { abortAndIgnore, handleAbortRef } from '../../utilities/abortAndIgnore.js'\nexport { requests } from '../../utilities/api.js'\nexport { findLocaleFromCode } from '../../utilities/findLocaleFromCode.js'\nexport { formatAdminURL } from '../../utilities/formatAdminURL.js'\nexport { formatDate } from '../../utilities/formatDocTitle/formatDateTitle.js'\nexport { formatDocTitle } from '../../utilities/formatDocTitle/index.js'\nexport {\n type EntityToGroup,\n EntityType,\n groupNavItems,\n type NavGroupType,\n} from '../../utilities/groupNavItems.js'\nexport { handleBackToDashboard } from '../../utilities/handleBackToDashboard.js'\nexport { handleGoBack } from '../../utilities/handleGoBack.js'\nexport { handleTakeOver } from '../../utilities/handleTakeOver.js'\nexport { hasSavePermission } from '../../utilities/hasSavePermission.js'\nexport { isClientUserObject } from '../../utilities/isClientUserObject.js'\nexport { isEditing } from '../../utilities/isEditing.js'\nexport { sanitizeID } from '../../utilities/sanitizeID.js'\n/**\n * @deprecated\n * The `mergeListSearchAndWhere` function is deprecated.\n * Import this from `payload/shared` instead.\n */\nexport { mergeListSearchAndWhere } from 'payload/shared'\n"],
5
- "mappings": "wCAEA,MAAuB,QAEvB,IAAMA,EAGDA,CAAC,CAAEC,SAAAA,EAAUC,kBAAAA,CAAiB,IAAE,CACnC,IAAMC,EAAQ,yBACRC,EAAWF,EAAkBG,MAAMF,CAAA,EAEzC,OACEG,EAAC,OAAA,UACEF,EAASG,IAAI,CAACC,EAASC,IAAA,CACtB,GAAIR,GAAYO,EAAQE,WAAW,GAAA,GAAQF,EAAQG,SAAS,GAAA,EAAM,CAChE,IAAMC,EAAaJ,EAAQ,CAAA,EACrBK,EAAUZ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AU,CAC7BC,oBAAqBT,EAAqBQ,SAASC,oBACnDC,SAAU,GACVH,KAAAA,CACF,EACAH,EAAiBG,CAAA,EAGbJ,GAAeE,GACjBA,EAA6B,EAAA,EAI3BP,GACFA,EAAA,CAEJ,OAASa,EAAO,CAEdC,QAAQD,MAAM,kCAAmCA,CAAA,CACnD,CACF,EChEO,IAAME,GAAqBC,GAAA,CAYhC,GAAM,CAAEC,eAAAA,EAAgBC,eAAAA,EAAgBC,WAAAA,EAAYC,UAAAA,CAAS,EAAKJ,EAElE,OAAIC,EACKI,GACLD,GAAcF,GAAgBI,QAC3B,CAACF,GAAcF,GAAkDK,QAIpEJ,EACKE,EAASH,GAA8CI,OAGzD,EACT,EC9BO,IAAME,GAAsBC,GAC1BA,GAAQ,OAAOA,GAAS,SCH1B,IAAMC,GAAYA,CAAC,CACxBC,GAAAA,EACAC,eAAAA,EACAC,WAAAA,CAAU,IAKGC,GAAQD,GAAeD,GAAoBD,GCRnD,SAASI,GAAWC,EAAmB,CAK5C,OAJIA,IAAOC,QAIP,OAAOD,GAAO,SACTA,EAGFE,mBAAmBF,CAAA,CAC5B,CCwBA,OAASG,2BAAAA,OAA+B",
6
- "names": ["RecursiveTranslation", "elements", "translationString", "regex", "sections", "split", "_jsx", "map", "section", "index", "startsWith", "endsWith", "elementKey", "Element", "RegExp", "children", "replace", "_", "group", "Translation", "i18nKey", "t", "variables", "stringWithVariables", "isReactServerComponentOrFunction", "serverProps", "withMergedProps", "Component", "sanitizeServerOnlyProps", "toMergeIntoProps", "undefined", "passedProps", "mergedProps", "simpleMergeProps", "forEach", "prop", "_jsx", "props", "toMerge", "isReactServerComponentOrFunction", "WithServerSideProps", "Component", "serverOnlyProps", "rest", "passedProps", "propsWithServerOnlyProps", "_jsx", "mergeFieldStyles", "field", "admin", "style", "width", "flex", "blacklistedKeys", "sanitizeField", "incomingField", "field", "key", "reduceToSerializableFields", "fields", "result", "PayloadIcon", "fill", "fillFromProps", "_jsxs", "className", "height", "viewBox", "width", "xmlns", "_jsx", "d", "css", "PayloadLogo", "_jsxs", "className", "fill", "height", "id", "viewBox", "width", "xmlns", "_jsx", "d", "fieldIsHiddenOrDisabled", "fieldIsID", "filterFields", "incomingFields", "shouldSkipField", "field", "type", "admin", "disableListColumn", "reduce", "acc", "formattedField", "tabs", "map", "tab", "fields", "push", "Array", "isArray", "fieldAffectsData", "getRemainingColumns", "fields", "useAsTitle", "reduce", "remaining", "field", "name", "type", "tabs", "tabFieldColumns", "tab", "getInitialColumns", "defaultColumns", "initialColumns", "Array", "isArray", "length", "push", "remainingColumns", "concat", "slice", "map", "column", "accessor", "active", "abortAndIgnore", "abortController", "abort", "handleAbortRef", "abortControllerRef", "newController", "AbortController", "current", "qs", "requests", "delete", "url", "options", "headers", "formattedOptions", "credentials", "method", "fetch", "get", "query", "params", "stringify", "addQueryPrefix", "patch", "post", "put", "findLocaleFromCode", "localizationConfig", "locale", "locales", "length", "find", "el", "code", "formatAdminURL", "offsetFormatCache", "offsetCache", "tzOffset", "timeZone", "date", "offsetStr", "calcOffset", "captures", "offsetRe", "cacheStr", "values", "hours", "minutes", "TZDateMini", "_TZDateMini", "args", "tzOffset", "adjustToSystemTZ", "syncToInternal", "tz", "timeZone", "time", "date", "re", "method", "utcMethod", "syncFromInternal", "offset", "prevHour", "systemOffset", "prevHourSystemOffset", "systemDSTChange", "dstShift", "offsetDiff", "postOffset", "postOffsetDiff", "offsetChanged", "postDiff", "newOffset", "offsetChange", "format", "formatDistanceToNow", "transpose", "formatDate", "date", "i18n", "pattern", "timezone", "theDate", "TZDate", "Date", "DateWithOriginalTz", "tz", "modifiedDate", "withTimeZone", "dateWithTimezone", "dateFNS", "locale", "t", "getTranslation", "isSerializedLexicalEditor", "value", "formatLexicalDocTitle", "editorState", "textContent", "node", "text", "type", "children", "formatRelationshipTitle", "data", "Array", "isArray", "map", "item", "id", "String", "filter", "Boolean", "join", "formatDocTitle", "collectionConfig", "data", "dateFormat", "dateFormatFromConfig", "fallback", "globalConfig", "i18n", "title", "useAsTitle", "admin", "fieldConfig", "fields", "find", "f", "name", "isDate", "type", "isRelationship", "date", "displayFormat", "formatDate", "pattern", "formatRelationshipTitle", "getTranslation", "label", "slug", "isSerializedLexicalEditor", "formatLexicalDocTitle", "root", "children", "t", "getTranslation", "EntityType", "groupNavItems", "entities", "permissions", "i18n", "reduce", "groups", "entityToGroup", "entity", "admin", "group", "type", "toLowerCase", "slug", "read", "translatedGroup", "labelOrFunction", "labels", "plural", "label", "t", "existingGroup", "find", "matchedGroup", "push", "filter", "length", "formatAdminURL", "handleBackToDashboard", "adminRoute", "router", "serverURL", "redirectRoute", "path", "push", "formatAdminURL", "handleGoBack", "adminRoute", "collectionSlug", "router", "serverURL", "redirectRoute", "path", "push", "handleTakeOver", "id", "clearRouteCache", "collectionSlug", "documentLockStateRef", "globalSlug", "isLockingEnabled", "isWithinDoc", "setCurrentEditor", "setIsReadOnlyForIncomingUser", "updateDocumentEditor", "user", "current", "hasShownLockedModal", "isLocked", "error", "console", "hasSavePermission", "args", "collectionSlug", "docPermissions", "globalSlug", "isEditing", "Boolean", "update", "create", "isClientUserObject", "user", "isEditing", "id", "collectionSlug", "globalSlug", "Boolean", "sanitizeID", "id", "undefined", "decodeURIComponent", "mergeListSearchAndWhere"]
3
+ "sources": ["../../../src/elements/Translation/index.tsx", "../../../src/elements/withMergedProps/index.tsx", "../../../src/elements/WithServerSideProps/index.tsx", "../../../src/fields/mergeFieldStyles.ts", "../../../src/forms/Form/reduceToSerializableFields.ts", "../../../src/graphics/Icon/index.tsx", "../../../src/graphics/Logo/index.tsx", "../../../src/providers/TableColumns/buildColumnState/filterFields.tsx", "../../../src/providers/TableColumns/getInitialColumns.ts", "../../../src/utilities/abortAndIgnore.ts", "../../../src/utilities/api.ts", "../../../src/utilities/findLocaleFromCode.ts", "../../../src/utilities/formatAdminURL.ts", "../../../../../node_modules/.pnpm/@date-fns+tz@1.2.0/node_modules/@date-fns/tz/tzOffset/index.js", "../../../../../node_modules/.pnpm/@date-fns+tz@1.2.0/node_modules/@date-fns/tz/date/mini.js", "../../../src/utilities/formatDocTitle/formatDateTitle.ts", "../../../src/utilities/formatDocTitle/index.ts", "../../../src/utilities/formatDocTitle/formatLexicalDocTitle.ts", "../../../src/utilities/formatDocTitle/formatRelationshipTitle.ts", "../../../src/utilities/getGlobalData.ts", "../../../src/utilities/groupNavItems.ts", "../../../src/utilities/getNavGroups.ts", "../../../src/utilities/getVisibleEntities.ts", "../../../src/utilities/handleBackToDashboard.tsx", "../../../src/utilities/handleGoBack.tsx", "../../../src/utilities/handleTakeOver.tsx", "../../../src/utilities/hasSavePermission.ts", "../../../src/utilities/isClientUserObject.ts", "../../../src/utilities/isEditing.ts", "../../../src/utilities/sanitizeID.ts", "../../../src/exports/shared/index.ts"],
4
+ "sourcesContent": ["import type { ClientTranslationKeys, TFunction } from '@payloadcms/translations'\n\nimport * as React from 'react'\n\nconst RecursiveTranslation: React.FC<{\n elements?: Record<string, React.FC<{ children: React.ReactNode }>>\n translationString: string\n}> = ({ elements, translationString }) => {\n const regex = /(<[^>]+>.*?<\\/[^>]+>)/g\n const sections = translationString.split(regex)\n\n return (\n <span>\n {sections.map((section, index) => {\n if (elements && section.startsWith('<') && section.endsWith('>')) {\n const elementKey = section[1]\n const Element = elements[elementKey]\n\n if (Element) {\n const regex = new RegExp(`<${elementKey}>(.*?)<\\/${elementKey}>`, 'g')\n const children = section.replace(regex, (_, group) => group)\n\n return (\n <Element key={index}>\n <RecursiveTranslation translationString={children} />\n </Element>\n )\n }\n }\n\n return section\n })}\n </span>\n )\n}\n\nexport type TranslationProps = {\n elements?: Record<string, React.FC<{ children: React.ReactNode }>>\n i18nKey: ClientTranslationKeys\n t: TFunction\n variables?: Record<string, unknown>\n}\n\nexport const Translation: React.FC<TranslationProps> = ({ elements, i18nKey, t, variables }) => {\n const stringWithVariables = t(i18nKey, variables || {})\n\n if (!elements) {\n return stringWithVariables\n }\n\n return <RecursiveTranslation elements={elements} translationString={stringWithVariables} />\n}\n", "import { isReactServerComponentOrFunction, serverProps } from 'payload/shared'\nimport React from 'react'\n\n/**\n * Creates a higher-order component (HOC) that merges predefined properties (`toMergeIntoProps`)\n * with any properties passed to the resulting component.\n *\n * Use this when you want to pre-specify some props for a component, while also allowing users to\n * pass in their own props. The HOC ensures the passed props and predefined props are combined before\n * rendering the original component.\n *\n * @example\n * const PredefinedComponent = getMergedPropsComponent({\n * Component: OriginalComponent,\n * toMergeIntoProps: { someExtraValue: 5 }\n * });\n * // Using <PredefinedComponent customProp=\"value\" /> will result in\n * // <OriginalComponent customProp=\"value\" someExtraValue={5} />\n *\n * @returns A higher-order component with combined properties.\n *\n * @param Component - The original component to wrap.\n * @param sanitizeServerOnlyProps - If true, server-only props will be removed from the merged props. @default true if the component is not a server component, false otherwise.\n * @param toMergeIntoProps - The properties to merge into the passed props.\n */\nexport function withMergedProps<ToMergeIntoProps, CompleteReturnProps>({\n Component,\n sanitizeServerOnlyProps,\n toMergeIntoProps,\n}: {\n Component: React.FC<CompleteReturnProps>\n sanitizeServerOnlyProps?: boolean\n toMergeIntoProps: ToMergeIntoProps\n}): React.FC<CompleteReturnProps> {\n if (sanitizeServerOnlyProps === undefined) {\n sanitizeServerOnlyProps = !isReactServerComponentOrFunction(Component)\n }\n // A wrapper around the args.Component to inject the args.toMergeArgs as props, which are merged with the passed props\n const MergedPropsComponent: React.FC<CompleteReturnProps> = (passedProps) => {\n const mergedProps = simpleMergeProps(passedProps, toMergeIntoProps) as CompleteReturnProps\n\n if (sanitizeServerOnlyProps) {\n serverProps.forEach((prop) => {\n delete mergedProps[prop]\n })\n }\n\n return <Component {...mergedProps} />\n }\n\n return MergedPropsComponent\n}\n\nfunction simpleMergeProps(props, toMerge) {\n return { ...props, ...toMerge }\n}\n", "import type { WithServerSidePropsComponent } from 'payload'\n\nimport { isReactServerComponentOrFunction } from 'payload/shared'\nimport React from 'react'\n\nexport const WithServerSideProps: WithServerSidePropsComponent = ({\n Component,\n serverOnlyProps,\n ...rest\n}) => {\n if (Component) {\n const WithServerSideProps: React.FC = (passedProps) => {\n const propsWithServerOnlyProps = {\n ...passedProps,\n ...(isReactServerComponentOrFunction(Component) ? (serverOnlyProps ?? {}) : {}),\n }\n\n return <Component {...propsWithServerOnlyProps} />\n }\n\n return WithServerSideProps(rest)\n }\n\n return null\n}\n", "import type { ClientField } from 'payload'\n\nexport const mergeFieldStyles = (\n field: ClientField | Omit<ClientField, 'type'>,\n): React.CSSProperties => ({\n ...(field?.admin?.style || {}),\n ...(field?.admin?.width\n ? {\n '--field-width': field.admin.width,\n }\n : {\n flex: '1 1 auto',\n }),\n // allow flex overrides to still take precedence over the fallback\n ...(field?.admin?.style?.flex\n ? {\n flex: field.admin.style.flex,\n }\n : {}),\n})\n", "import { type FormField, type FormState } from 'payload'\n\ntype BlacklistedKeys = 'customComponents' | 'validate'\nconst blacklistedKeys: BlacklistedKeys[] = ['validate', 'customComponents']\n\nconst sanitizeField = (incomingField: FormField): FormField => {\n const field = { ...incomingField } // shallow copy, as we only need to remove top-level keys\n\n for (const key of blacklistedKeys) {\n delete field[key]\n }\n\n return field\n}\n\n/**\n * Takes in FormState and removes fields that are not serializable.\n * Returns FormState without blacklisted keys.\n */\nexport const reduceToSerializableFields = (\n fields: FormState,\n): {\n [key: string]: Omit<FormField, BlacklistedKeys>\n} => {\n const result: Record<string, Omit<FormField, BlacklistedKeys>> = {}\n\n for (const key in fields) {\n result[key] = sanitizeField(fields[key])\n }\n\n return result\n}\n", "import React from 'react'\n\nexport const PayloadIcon: React.FC<{\n fill?: string\n}> = ({ fill: fillFromProps }) => {\n const fill = fillFromProps || 'var(--theme-elevation-1000)'\n\n return (\n <svg\n className=\"graphic-icon\"\n height=\"100%\"\n viewBox=\"0 0 25 25\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z\"\n fill={fill}\n />\n <path\n d=\"M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z\"\n fill={fill}\n />\n </svg>\n )\n}\n", "import React from 'react'\n\nconst css = `\n .graphic-logo path {\n fill: var(--theme-elevation-1000);\n }\n`\n\nexport const PayloadLogo: React.FC = () => (\n <svg\n className=\"graphic-logo\"\n fill=\"none\"\n height=\"43.5\"\n id=\"b\"\n viewBox=\"0 0 193.38 43.5\"\n width=\"193.38\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <style>{css}</style>\n <g id=\"c\">\n <path d=\"M18.01,35.63l-12.36-7.13c-.15-.09-.25-.25-.25-.43v-11.02c0-.19.21-.31.37-.22l14.35,8.28c.2.12.45-.03.45-.26v-5.37c0-.21-.11-.41-.3-.52L3.01,9c-.15-.09-.35-.09-.5,0l-2.26,1.31c-.15.09-.25.25-.25.43v20.47c0,.18.1.34.25.43l17.73,10.24c.15.09.35.09.5,0l14.89-8.6c.2-.12.2-.4,0-.52l-4.64-2.68c-.19-.11-.41-.11-.6,0l-9.61,5.55c-.15.09-.35.09-.5,0Z\" />\n <path d=\"M36.21,10.3L18.48.07c-.15-.09-.35-.09-.5,0l-9.37,5.41c-.2.12-.2.4,0,.52l4.6,2.66c.19.11.41.11.6,0l4.2-2.42c.15-.09.35-.09.5,0l12.36,7.13c.15.09.25.25.25.43v11.07c0,.21.11.41.3.52l4.6,2.65c.2.12.45-.03.45-.26V10.74c0-.18-.1-.34-.25-.43Z\" />\n <g id=\"d\">\n <path d=\"M193.38,9.47c0,1.94-1.48,3.32-3.3,3.32s-3.31-1.39-3.31-3.32,1.49-3.31,3.31-3.31,3.3,1.39,3.3,3.31ZM192.92,9.47c0-1.68-1.26-2.88-2.84-2.88s-2.84,1.2-2.84,2.88,1.26,2.89,2.84,2.89,2.84-1.2,2.84-2.89ZM188.69,11.17v-3.51h1.61c.85,0,1.35.39,1.35,1.15,0,.53-.3.86-.67,1.02l.79,1.35h-.89l-.72-1.22h-.64v1.22h-.82ZM190.18,9.31c.46,0,.64-.16.64-.5s-.19-.49-.64-.49h-.67v.99h.67Z\" />\n <path d=\"M54.72,24.84v10.93h-5.4V6.1h12.26c7.02,0,11.1,3.2,11.1,9.39s-4.07,9.35-11.06,9.35h-6.9,0ZM61.12,20.52c4.07,0,6.11-1.66,6.11-5.03s-2.04-5.03-6.11-5.03h-6.4v10.06h6.4Z\" />\n <path d=\"M85.94,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.18-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM85.73,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z\" />\n <path d=\"M90.39,14.66h5.4l5.86,15.92h.08l5.57-15.92h5.28l-8.23,21.49c-2,5.28-4.45,7.32-8.89,7.36-.71,0-1.7-.08-2.45-.21v-4.03c.62.13.96.13,1.41.13,2.16,0,3.07-.75,4.2-3.66l-8.23-21.07h0Z\" />\n <path d=\"M113.46,35.77V6.1h5.32v29.67h-5.32Z\" />\n <path d=\"M130.79,36.27c-6.23,0-10.68-4.2-10.68-11.05s4.45-11.05,10.68-11.05,10.68,4.24,10.68,11.05-4.45,11.05-10.68,11.05ZM130.79,32.32c3.41,0,5.36-2.66,5.36-7.11s-1.95-7.11-5.36-7.11-5.36,2.7-5.36,7.11,1.91,7.11,5.36,7.11Z\" />\n <path d=\"M156.19,32.45c-1,2.41-3.66,3.78-7.02,3.78-4.11,0-7.11-2.29-7.11-6.11,0-4.24,3.32-5.98,7.61-6.48l6.32-.71v-1c0-2.58-1.58-3.82-3.99-3.82s-3.74,1.29-3.91,3.24h-5.11c.46-4.53,3.99-7.19,9.19-7.19,5.74,0,9.02,2.7,9.02,8.19v8.15c0,1.95.08,3.58.42,5.28h-5.11c-.21-1.16-.29-2.29-.29-3.32h0ZM155.98,27.58v-1.29l-4.7.54c-2.24.29-3.95.79-3.95,2.99,0,1.66,1.16,2.7,3.28,2.7,2.74,0,5.36-1.62,5.36-4.95h0Z\" />\n <path d=\"M178.5,32.41c-1.04,2.12-3.58,3.87-6.78,3.87-5.53,0-9.31-4.49-9.31-11.05s3.78-11.05,9.31-11.05c3.28,0,5.69,1.83,6.69,3.95V6.1h5.32v29.67h-5.24v-3.37h0ZM178.55,24.84c0-4.11-1.95-6.78-5.32-6.78s-5.45,2.83-5.45,7.15,2,7.15,5.45,7.15,5.32-2.66,5.32-6.78v-.75h0Z\" />\n </g>\n </g>\n </svg>\n)\n", "import type { ClientField, Field } from 'payload'\n\nimport { fieldIsHiddenOrDisabled, fieldIsID } from 'payload/shared'\n\n/**\n * Filters fields that are hidden, disabled, or have `disableListColumn` set to `true`.\n * Recurses through `tabs` and any container with `.fields` (e.g., `row`, `group`, `collapsible`).\n */\nexport const filterFields = <T extends ClientField | Field>(incomingFields: T[]): T[] => {\n const shouldSkipField = (field: T): boolean =>\n (field.type !== 'ui' && fieldIsHiddenOrDisabled(field) && !fieldIsID(field)) ||\n field?.admin?.disableListColumn === true\n\n return (incomingFields ?? []).reduce<T[]>((acc, field) => {\n if (shouldSkipField(field)) {\n return acc\n }\n\n // handle tabs\n if (field.type === 'tabs' && 'tabs' in field) {\n const formattedField: T = {\n ...field,\n tabs: field.tabs.map((tab) => ({\n ...tab,\n fields: filterFields(tab.fields as T[]),\n })),\n }\n acc.push(formattedField)\n return acc\n }\n\n // handle fields with subfields (row, group, collapsible, etc.)\n if ('fields' in field && Array.isArray(field.fields)) {\n const formattedField: T = {\n ...field,\n fields: filterFields(field.fields as T[]),\n }\n acc.push(formattedField)\n return acc\n }\n\n // leaf\n acc.push(field)\n return acc\n }, [])\n}\n", "import type { ClientField, CollectionConfig, CollectionPreferences, Field } from 'payload'\n\nimport { fieldAffectsData } from 'payload/shared'\n\nconst getRemainingColumns = <T extends ClientField[] | Field[]>(\n fields: T,\n useAsTitle: string,\n): CollectionPreferences['columns'] =>\n fields?.reduce((remaining, field) => {\n if (fieldAffectsData(field) && field.name === useAsTitle) {\n return remaining\n }\n\n if (!fieldAffectsData(field) && 'fields' in field) {\n return [...remaining, ...getRemainingColumns(field.fields, useAsTitle)]\n }\n\n if (field.type === 'tabs' && 'tabs' in field) {\n return [\n ...remaining,\n ...field.tabs.reduce(\n (tabFieldColumns, tab) => [\n ...tabFieldColumns,\n ...('name' in tab ? [tab.name] : getRemainingColumns(tab.fields, useAsTitle)),\n ],\n [],\n ),\n ]\n }\n\n return [...remaining, field.name]\n }, [])\n\n/**\n * Returns the initial columns to display in the table based on the following criteria:\n * 1. If `defaultColumns` is set in the collection config, use those columns\n * 2. Otherwise take `useAtTitle, if set, and the next 3 fields that are not hidden or disabled\n */\nexport const getInitialColumns = <T extends ClientField[] | Field[]>(\n fields: T,\n useAsTitle: CollectionConfig['admin']['useAsTitle'],\n defaultColumns: CollectionConfig['admin']['defaultColumns'],\n): CollectionPreferences['columns'] => {\n let initialColumns = []\n\n if (Array.isArray(defaultColumns) && defaultColumns.length >= 1) {\n initialColumns = defaultColumns\n } else {\n if (useAsTitle) {\n initialColumns.push(useAsTitle)\n }\n\n const remainingColumns = getRemainingColumns(fields, useAsTitle)\n\n initialColumns = initialColumns.concat(remainingColumns)\n initialColumns = initialColumns.slice(0, 4)\n }\n\n return initialColumns.map((column) => ({\n accessor: column,\n active: true,\n }))\n}\n", "export function abortAndIgnore(abortController: AbortController) {\n if (abortController) {\n try {\n abortController.abort()\n } catch (_err) {\n // swallow error\n }\n }\n}\n\n/**\n * Use this function when an effect is triggered multiple times over and you want to cancel the previous effect.\n * It will abort the previous effect and create a new AbortController for the next effect.\n * Important: You must also _reset_ the `abortControllerRef` after the effect is done, otherwise the next effect will be aborted immediately.\n * For example, run `abortControllerRef.current = null` in a `finally` block or after an awaited promise.\n * @param abortControllerRef\n * @returns {AbortController}\n */\nexport function handleAbortRef(\n abortControllerRef: React.RefObject<AbortController>,\n): AbortController {\n const newController = new AbortController()\n\n if (abortControllerRef.current) {\n try {\n abortControllerRef.current.abort()\n } catch (_err) {\n // swallow error\n }\n }\n\n abortControllerRef.current = newController\n\n return newController\n}\n", "import * as qs from 'qs-esm'\n\ntype GetOptions = {\n params?: Record<string, unknown>\n} & RequestInit\n\nexport const requests = {\n delete: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'delete',\n }\n\n return fetch(url, formattedOptions)\n },\n\n get: (url: string, options: GetOptions = { headers: {} }): Promise<Response> => {\n let query = ''\n if (options.params) {\n query = qs.stringify(options.params, { addQueryPrefix: true })\n }\n return fetch(`${url}${query}`, {\n credentials: 'include',\n ...options,\n })\n },\n\n patch: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'PATCH',\n }\n\n return fetch(url, formattedOptions)\n },\n\n post: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'post',\n }\n\n return fetch(`${url}`, formattedOptions)\n },\n\n put: (url: string, options: RequestInit = { headers: {} }): Promise<Response> => {\n const headers = options && options.headers ? { ...options.headers } : {}\n\n const formattedOptions: RequestInit = {\n ...options,\n credentials: 'include',\n headers: {\n ...headers,\n },\n method: 'put',\n }\n\n return fetch(url, formattedOptions)\n },\n}\n", "import type { Locale, SanitizedLocalizationConfig } from 'payload'\n/*\n return the Locale for given locale code, else return null\n*/\nexport const findLocaleFromCode = (\n localizationConfig: SanitizedLocalizationConfig,\n locale: string,\n): Locale | null => {\n if (!localizationConfig?.locales || localizationConfig.locales.length === 0) {\n return null\n }\n\n return localizationConfig.locales.find((el) => el?.code === locale)\n}\n", "/** Will read the `routes.admin` config and appropriately handle `\"/\"` admin paths */\nexport { formatAdminURL } from 'payload/shared'\n", "const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-GB\", {\n timeZone,\n hour: \"numeric\",\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split('GMT')[1] || '';\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support \u00B1HH:MM/\u00B1HHMM/\u00B1HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +values[0];\n const minutes = +(values[1] || 0);\n return offsetCache[cacheStr] = hours > 0 ? hours * 60 + minutes : hours * 60 - minutes;\n}", "import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n return -tzOffset(this.timeZone, this);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() - date.getTimezoneOffset());\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const offset = tzOffset(date.timeZone, date);\n\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postOffset = tzOffset(date.timeZone, date);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newOffset = tzOffset(date.timeZone, date);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}", "import type { I18n, I18nClient } from '@payloadcms/translations'\n\nimport { TZDateMini as TZDate } from '@date-fns/tz/date/mini'\nimport { format, formatDistanceToNow, transpose } from 'date-fns'\n\nexport type FormatDateArgs = {\n date: Date | number | string | undefined\n i18n: I18n<unknown, unknown> | I18nClient<unknown>\n pattern: string\n timezone?: string\n}\n\nexport const formatDate = ({ date, i18n, pattern, timezone }: FormatDateArgs): string => {\n const theDate = new TZDate(new Date(date))\n\n if (timezone) {\n const DateWithOriginalTz = TZDate.tz(timezone)\n\n const modifiedDate = theDate.withTimeZone(timezone)\n\n // Transpose the date to the selected timezone\n const dateWithTimezone = transpose(modifiedDate, DateWithOriginalTz)\n\n // Transpose the date to the user's timezone - this is necessary because the react-datepicker component insists on displaying the date in the user's timezone\n return i18n.dateFNS\n ? format(dateWithTimezone, pattern, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n }\n\n return i18n.dateFNS\n ? format(theDate, pattern, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n}\n\ntype FormatTimeToNowArgs = {\n date: Date | number | string | undefined\n i18n: I18n<unknown, unknown> | I18nClient<unknown>\n}\n\nexport const formatTimeToNow = ({ date, i18n }: FormatTimeToNowArgs): string => {\n const theDate = typeof date === 'string' ? new Date(date) : date\n return i18n?.dateFNS\n ? formatDistanceToNow(theDate, { locale: i18n.dateFNS })\n : `${i18n.t('general:loading')}...`\n}\n", "import type { I18n } from '@payloadcms/translations'\nimport type {\n ClientCollectionConfig,\n ClientGlobalConfig,\n SanitizedConfig,\n TypeWithID,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { formatDate } from './formatDateTitle.js'\nimport { formatLexicalDocTitle, isSerializedLexicalEditor } from './formatLexicalDocTitle.js'\nimport { formatRelationshipTitle } from './formatRelationshipTitle.js'\n\nexport const formatDocTitle = ({\n collectionConfig,\n data,\n dateFormat: dateFormatFromConfig,\n fallback,\n globalConfig,\n i18n,\n}: {\n collectionConfig?: ClientCollectionConfig\n data: TypeWithID\n dateFormat: SanitizedConfig['admin']['dateFormat']\n fallback?: object | string\n globalConfig?: ClientGlobalConfig\n i18n: I18n<any, any>\n}): string => {\n let title: string\n\n if (collectionConfig) {\n const useAsTitle = collectionConfig?.admin?.useAsTitle\n\n if (useAsTitle) {\n title = data?.[useAsTitle] as string\n\n if (title) {\n const fieldConfig = collectionConfig.fields.find(\n (f) => 'name' in f && f.name === useAsTitle,\n )\n\n const isDate = fieldConfig?.type === 'date'\n const isRelationship = fieldConfig?.type === 'relationship'\n\n if (isDate) {\n const dateFormat =\n ('date' in fieldConfig.admin && fieldConfig?.admin?.date?.displayFormat) ||\n dateFormatFromConfig\n\n title = formatDate({ date: title, i18n, pattern: dateFormat }) || title\n }\n\n if (isRelationship) {\n const formattedRelationshipTitle = formatRelationshipTitle(data[useAsTitle])\n title = formattedRelationshipTitle\n }\n }\n }\n }\n\n if (globalConfig) {\n title = getTranslation(globalConfig?.label, i18n) || globalConfig?.slug\n }\n\n // richtext lexical case. We convert the first child of root to plain text\n if (title && isSerializedLexicalEditor(title)) {\n title = formatLexicalDocTitle(title.root.children?.[0]?.children || [], '')\n }\n\n if (!title && isSerializedLexicalEditor(fallback)) {\n title = formatLexicalDocTitle(fallback.root.children?.[0]?.children || [], '')\n }\n\n if (!title) {\n title = typeof fallback === 'string' ? fallback : `[${i18n.t('general:untitled')}]`\n }\n\n return title\n}\n", "type SerializedLexicalEditor = {\n root: {\n children: Array<{ children?: Array<{ type: string }>; type: string }>\n }\n}\n\nexport function isSerializedLexicalEditor(value: unknown): value is SerializedLexicalEditor {\n return typeof value === 'object' && 'root' in value\n}\n\nexport function formatLexicalDocTitle(\n editorState: Array<{ children?: Array<{ type: string }>; type: string }>,\n textContent: string,\n): string {\n for (const node of editorState) {\n if ('text' in node && node.text) {\n textContent += node.text as string\n } else {\n if (!('children' in node)) {\n textContent += `[${node.type}]`\n }\n }\n if ('children' in node && node.children) {\n textContent += formatLexicalDocTitle(node.children as Array<{ type: string }>, textContent)\n }\n }\n return textContent\n}\n", "export const formatRelationshipTitle = (data): string => {\n if (Array.isArray(data)) {\n return data\n .map((item) => {\n if (typeof item === 'object' && item !== null) {\n return item.id\n }\n return String(item)\n })\n .filter(Boolean)\n .join(', ')\n }\n\n if (typeof data === 'object' && data !== null) {\n return data.id || ''\n }\n\n return String(data)\n}\n", "import type { ClientUser, PayloadRequest, TypedUser } from 'payload'\n\nconst globalLockDurationDefault = 300\n\nexport async function getGlobalData(req: PayloadRequest) {\n const {\n payload: { config },\n payload,\n } = req\n // Query locked global documents only if there are globals in the config\n // This type is repeated from DashboardViewServerPropsOnly['globalData'].\n // I thought about moving it to a payload to share it, but we're already\n // exporting all the views props from the next package.\n let globalData: Array<{\n data: { _isLocked: boolean; _lastEditedAt: string; _userEditing: ClientUser | number | string }\n lockDuration?: number\n slug: string\n }> = []\n\n if (config.globals.length > 0) {\n const lockedDocuments = await payload.find({\n collection: 'payload-locked-documents',\n depth: 1,\n overrideAccess: false,\n pagination: false,\n req,\n select: {\n globalSlug: true,\n updatedAt: true,\n user: true,\n },\n where: {\n globalSlug: {\n exists: true,\n },\n },\n })\n\n // Map over globals to include `lockDuration` and lock data for each global slug\n globalData = config.globals.map((global) => {\n const lockDuration =\n typeof global.lockDocuments === 'object'\n ? global.lockDocuments.duration\n : globalLockDurationDefault\n\n const lockedDoc = lockedDocuments.docs.find((doc) => doc.globalSlug === global.slug)\n\n return {\n slug: global.slug,\n data: {\n _isLocked: !!lockedDoc,\n _lastEditedAt: (lockedDoc?.updatedAt as string) ?? null,\n _userEditing: (lockedDoc?.user as { value?: TypedUser })?.value ?? null!,\n },\n lockDuration,\n }\n })\n }\n\n return globalData\n}\n", "import type { I18nClient } from '@payloadcms/translations'\nimport type {\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n StaticLabel,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\n/**\n * @deprecated Import from `payload` instead\n */\nexport enum EntityType {\n collection = 'collections',\n global = 'globals',\n}\n\nexport type EntityToGroup =\n | {\n entity: SanitizedCollectionConfig\n type: EntityType.collection\n }\n | {\n entity: SanitizedGlobalConfig\n type: EntityType.global\n }\n\nexport type NavGroupType = {\n entities: {\n label: StaticLabel\n slug: string\n type: EntityType\n }[]\n label: string\n}\n\nexport function groupNavItems(\n entities: EntityToGroup[],\n permissions: SanitizedPermissions,\n i18n: I18nClient,\n): NavGroupType[] {\n const result = entities.reduce(\n (groups, entityToGroup) => {\n // Skip entities where admin.group is explicitly false\n if (entityToGroup.entity?.admin?.group === false) {\n return groups\n }\n\n if (permissions?.[entityToGroup.type.toLowerCase()]?.[entityToGroup.entity.slug]?.read) {\n const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n)\n\n const labelOrFunction =\n 'labels' in entityToGroup.entity\n ? entityToGroup.entity.labels.plural\n : entityToGroup.entity.label\n\n const label =\n typeof labelOrFunction === 'function'\n ? labelOrFunction({ i18n, t: i18n.t })\n : labelOrFunction\n\n if (entityToGroup.entity.admin.group) {\n const existingGroup = groups.find(\n (group) => getTranslation(group.label, i18n) === translatedGroup,\n ) as NavGroupType\n\n let matchedGroup: NavGroupType = existingGroup\n\n if (!existingGroup) {\n matchedGroup = { entities: [], label: translatedGroup }\n groups.push(matchedGroup)\n }\n\n matchedGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n } else {\n const defaultGroup = groups.find((group) => {\n return getTranslation(group.label, i18n) === i18n.t(`general:${entityToGroup.type}`)\n }) as NavGroupType\n defaultGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n }\n }\n\n return groups\n },\n [\n {\n entities: [],\n label: i18n.t('general:collections'),\n },\n {\n entities: [],\n label: i18n.t('general:globals'),\n },\n ],\n )\n\n return result.filter((group) => group.entities.length > 0)\n}\n", "import type { SanitizedConfig, SanitizedPermissions, VisibleEntities } from 'payload'\n\nimport { type I18nClient } from '@payloadcms/translations'\n\nimport { EntityType } from './groupNavItems.js'\nimport { type EntityToGroup, groupNavItems } from './groupNavItems.js'\n\n/** @internal */\nexport function getNavGroups(\n permissions: SanitizedPermissions,\n visibleEntities: VisibleEntities,\n config: SanitizedConfig,\n i18n: I18nClient,\n) {\n const collections = config.collections.filter(\n (collection) =>\n permissions?.collections?.[collection.slug]?.read &&\n visibleEntities.collections.includes(collection.slug),\n )\n\n const globals = config.globals.filter(\n (global) =>\n permissions?.globals?.[global.slug]?.read && visibleEntities.globals.includes(global.slug),\n )\n\n const navGroups = groupNavItems(\n [\n ...(collections.map((collection) => {\n const entityToGroup: EntityToGroup = {\n type: EntityType.collection,\n entity: collection,\n }\n\n return entityToGroup\n }) ?? []),\n ...(globals.map((global) => {\n const entityToGroup: EntityToGroup = {\n type: EntityType.global,\n entity: global,\n }\n\n return entityToGroup\n }) ?? []),\n ],\n permissions,\n i18n,\n )\n\n return navGroups\n}\n", "import type { PayloadRequest, VisibleEntities } from 'payload'\n\ntype Hidden = ((args: { user: unknown }) => boolean) | boolean\n\nfunction isHidden(hidden: Hidden | undefined, user: unknown): boolean {\n if (typeof hidden === 'function') {\n try {\n return hidden({ user })\n } catch {\n return true\n }\n }\n return !!hidden\n}\n\nexport function getVisibleEntities({ req }: { req: PayloadRequest }): VisibleEntities {\n return {\n collections: req.payload.config.collections\n .map(({ slug, admin: { hidden } }) => (!isHidden(hidden, req.user) ? slug : null))\n .filter(Boolean),\n globals: req.payload.config.globals\n .map(({ slug, admin: { hidden } }) => (!isHidden(hidden, req.user) ? slug : null))\n .filter(Boolean),\n }\n}\n", "import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'\n\nimport { formatAdminURL } from 'payload/shared'\n\ntype BackToDashboardProps = {\n adminRoute: string\n router: AppRouterInstance\n serverURL?: string\n}\n\nexport const handleBackToDashboard = ({ adminRoute, router, serverURL }: BackToDashboardProps) => {\n const redirectRoute = formatAdminURL({\n adminRoute,\n path: '',\n serverURL,\n })\n router.push(redirectRoute)\n}\n", "import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'\n\nimport { formatAdminURL } from 'payload/shared'\n\ntype GoBackProps = {\n adminRoute: string\n collectionSlug: string\n router: AppRouterInstance\n serverURL?: string\n}\n\nexport const handleGoBack = ({ adminRoute, collectionSlug, router, serverURL }: GoBackProps) => {\n const redirectRoute = formatAdminURL({\n adminRoute,\n path: collectionSlug ? `/collections/${collectionSlug}` : '/',\n })\n router.push(redirectRoute)\n}\n", "import type { ClientUser } from 'payload'\n\nexport interface HandleTakeOverParams {\n clearRouteCache?: () => void\n collectionSlug?: string\n documentLockStateRef: React.RefObject<{\n hasShownLockedModal: boolean\n isLocked: boolean\n user: ClientUser | number | string\n }>\n globalSlug?: string\n id: number | string\n isLockingEnabled: boolean\n isWithinDoc: boolean\n setCurrentEditor: (value: React.SetStateAction<ClientUser | number | string>) => void\n setIsReadOnlyForIncomingUser?: (value: React.SetStateAction<boolean>) => void\n updateDocumentEditor: (\n docID: number | string,\n slug: string,\n user: ClientUser | number | string,\n ) => Promise<void>\n user: ClientUser | number | string\n}\n\nexport const handleTakeOver = async ({\n id,\n clearRouteCache,\n collectionSlug,\n documentLockStateRef,\n globalSlug,\n isLockingEnabled,\n isWithinDoc,\n setCurrentEditor,\n setIsReadOnlyForIncomingUser,\n updateDocumentEditor,\n user,\n}: HandleTakeOverParams): Promise<void> => {\n if (!isLockingEnabled) {\n return\n }\n\n try {\n // Call updateDocumentEditor to update the document's owner to the current user\n await updateDocumentEditor(id, collectionSlug ?? globalSlug, user)\n\n if (!isWithinDoc) {\n documentLockStateRef.current.hasShownLockedModal = true\n }\n\n // Update the locked state to reflect the current user as the owner\n documentLockStateRef.current = {\n hasShownLockedModal: documentLockStateRef.current?.hasShownLockedModal,\n isLocked: true,\n user,\n }\n setCurrentEditor(user)\n\n // If this is a takeover within the document, ensure the document is editable\n if (isWithinDoc && setIsReadOnlyForIncomingUser) {\n setIsReadOnlyForIncomingUser(false)\n }\n\n // Need to clear the route cache to refresh the page and update readOnly state for server rendered components\n if (clearRouteCache) {\n clearRouteCache()\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error during document takeover:', error)\n }\n}\n", "import type {\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedGlobalPermission,\n} from 'payload'\n\nexport const hasSavePermission = (args: {\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n collectionSlug?: string\n docPermissions: SanitizedDocumentPermissions\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n globalSlug?: string\n isEditing: boolean\n}) => {\n const { collectionSlug, docPermissions, globalSlug, isEditing } = args\n\n if (collectionSlug) {\n return Boolean(\n (isEditing && docPermissions?.update) ||\n (!isEditing && (docPermissions as SanitizedCollectionPermission)?.create),\n )\n }\n\n if (globalSlug) {\n return Boolean((docPermissions as SanitizedGlobalPermission)?.update)\n }\n\n return false\n}\n", "import type { ClientUser } from 'payload'\n\nexport const isClientUserObject = (user): user is ClientUser => {\n return user && typeof user === 'object'\n}\n", "export const isEditing = ({\n id,\n collectionSlug,\n globalSlug,\n}: {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n}): boolean => Boolean(globalSlug || (collectionSlug && !!id))\n", "export function sanitizeID(id: number | string): number | string {\n if (id === undefined) {\n return id\n }\n\n if (typeof id === 'number') {\n return id\n }\n\n return decodeURIComponent(id)\n}\n", "export { Translation } from '../../elements/Translation/index.js'\nexport { withMergedProps } from '../../elements/withMergedProps/index.js' // cannot be within a 'use client', thus we export this from shared\nexport { WithServerSideProps } from '../../elements/WithServerSideProps/index.js'\nexport { mergeFieldStyles } from '../../fields/mergeFieldStyles.js'\nexport { reduceToSerializableFields } from '../../forms/Form/reduceToSerializableFields.js'\nexport { PayloadIcon } from '../../graphics/Icon/index.js'\nexport { PayloadLogo } from '../../graphics/Logo/index.js'\n// IMPORTANT: the shared.ts file CANNOT contain any Server Components _that import client components_.\nexport { filterFields } from '../../providers/TableColumns/buildColumnState/filterFields.js'\nexport { getInitialColumns } from '../../providers/TableColumns/getInitialColumns.js'\nexport { abortAndIgnore, handleAbortRef } from '../../utilities/abortAndIgnore.js'\nexport { requests } from '../../utilities/api.js'\nexport { findLocaleFromCode } from '../../utilities/findLocaleFromCode.js'\nexport { formatAdminURL } from '../../utilities/formatAdminURL.js'\nexport { formatDate } from '../../utilities/formatDocTitle/formatDateTitle.js'\nexport { formatDocTitle } from '../../utilities/formatDocTitle/index.js'\nexport { getGlobalData } from '../../utilities/getGlobalData.js'\nexport { getNavGroups } from '../../utilities/getNavGroups.js'\nexport { getVisibleEntities } from '../../utilities/getVisibleEntities.js'\nexport {\n type EntityToGroup,\n EntityType,\n groupNavItems,\n type NavGroupType,\n} from '../../utilities/groupNavItems.js'\nexport { handleBackToDashboard } from '../../utilities/handleBackToDashboard.js'\nexport { handleGoBack } from '../../utilities/handleGoBack.js'\nexport { handleTakeOver } from '../../utilities/handleTakeOver.js'\nexport { hasSavePermission } from '../../utilities/hasSavePermission.js'\nexport { isClientUserObject } from '../../utilities/isClientUserObject.js'\nexport { isEditing } from '../../utilities/isEditing.js'\nexport { sanitizeID } from '../../utilities/sanitizeID.js'\n/**\n * @deprecated\n * The `mergeListSearchAndWhere` function is deprecated.\n * Import this from `payload/shared` instead.\n */\nexport { mergeListSearchAndWhere } from 'payload/shared'\n"],
5
+ "mappings": "wCAEA,MAAuB,QAEvB,IAAMA,EAGDA,CAAC,CAAEC,SAAAA,EAAUC,kBAAAA,CAAiB,IAAE,CACnC,IAAMC,EAAQ,yBACRC,EAAWF,EAAkBG,MAAMF,CAAA,EAEzC,OACEG,EAAC,OAAA,UACEF,EAASG,IAAI,CAACC,EAASC,IAAA,CACtB,GAAIR,GAAYO,EAAQE,WAAW,GAAA,GAAQF,EAAQG,SAAS,GAAA,EAAM,CAChE,IAAMC,EAAaJ,EAAQ,CAAA,EACrBK,EAAUZ,EAASW,CAAA,EAEzB,GAAIC,EAAS,CACX,IAAMV,EAAQ,IAAIW,OAAO,IAAIF,CAAA,WAAsBA,CAAA,IAAe,GAAA,EAC5DG,EAAWP,EAAQQ,QAAQb,EAAO,CAACc,EAAGC,IAAUA,CAAA,EAEtD,OACEZ,EAACO,EAAA,UACCP,EAACN,EAAA,CAAqBE,kBAAmBa,KAD7BN,CAAA,CAIlB,CACF,CAEA,OAAOD,CACT,CAAA,GAGN,EASaW,EAA0CA,CAAC,CAAElB,SAAAA,EAAUmB,QAAAA,EAASC,EAAAA,EAAGC,UAAAA,CAAS,IAAE,CACzF,IAAMC,EAAsBF,EAAED,EAASE,GAAa,CAAC,CAAA,EAErD,OAAKrB,EAIEK,EAACN,EAAA,CAAqBC,SAAUA,EAAUC,kBAAmBqB,IAH3DA,CAIX,0CCnDA,OAASC,oCAAAA,EAAkCC,eAAAA,MAAmB,iBAC9D,MAAkB,QAwBX,SAASC,EAAuD,CACrEC,UAAAA,EACAC,wBAAAA,EACAC,iBAAAA,CAAgB,EAKjB,CACC,OAAID,IAA4BE,SAC9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QAAU,CAC7BC,oBAAqBT,EAAqBQ,SAASC,oBACnDC,SAAU,GACVH,KAAAA,CACF,EACAH,EAAiBG,CAAA,EAGbJ,GAAeE,GACjBA,EAA6B,EAAA,EAI3BP,GACFA,EAAA,CAEJ,OAASa,EAAO,CAEdC,QAAQD,MAAM,kCAAmCA,CAAA,CACnD,CACF,EChEO,IAAME,GAAqBC,GAAA,CAYhC,GAAM,CAAEC,eAAAA,EAAgBC,eAAAA,EAAgBC,WAAAA,EAAYC,UAAAA,CAAS,EAAKJ,EAElE,OAAIC,EACKI,GACLD,GAAcF,GAAgBI,QAC3B,CAACF,GAAcF,GAAkDK,QAIpEJ,EACKE,EAASH,GAA8CI,OAGzD,EACT,EC9BO,IAAME,GAAsBC,GAC1BA,GAAQ,OAAOA,GAAS,SCH1B,IAAMC,GAAYA,CAAC,CACxBC,GAAAA,EACAC,eAAAA,EACAC,WAAAA,CAAU,IAKGC,GAAQD,GAAeD,GAAoBD,GCRnD,SAASI,GAAWC,EAAmB,CAK5C,OAJIA,IAAOC,QAIP,OAAOD,GAAO,SACTA,EAGFE,mBAAmBF,CAAA,CAC5B,CC2BA,OAASG,2BAAAA,OAA+B",
6
+ "names": ["RecursiveTranslation", "elements", "translationString", "regex", "sections", "split", "_jsx", "map", "section", "index", "startsWith", "endsWith", "elementKey", "Element", "RegExp", "children", "replace", "_", "group", "Translation", "i18nKey", "t", "variables", "stringWithVariables", "isReactServerComponentOrFunction", "serverProps", "withMergedProps", "Component", "sanitizeServerOnlyProps", "toMergeIntoProps", "undefined", "passedProps", "mergedProps", "simpleMergeProps", "forEach", "prop", "_jsx", "props", "toMerge", "isReactServerComponentOrFunction", "WithServerSideProps", "Component", "serverOnlyProps", "rest", "passedProps", "propsWithServerOnlyProps", "_jsx", "mergeFieldStyles", "field", "admin", "style", "width", "flex", "blacklistedKeys", "sanitizeField", "incomingField", "field", "key", "reduceToSerializableFields", "fields", "result", "PayloadIcon", "fill", "fillFromProps", "_jsxs", "className", "height", "viewBox", "width", "xmlns", "_jsx", "d", "css", "PayloadLogo", "_jsxs", "className", "fill", "height", "id", "viewBox", "width", "xmlns", "_jsx", "d", "fieldIsHiddenOrDisabled", "fieldIsID", "filterFields", "incomingFields", "shouldSkipField", "field", "type", "admin", "disableListColumn", "reduce", "acc", "formattedField", "tabs", "map", "tab", "fields", "push", "Array", "isArray", "fieldAffectsData", "getRemainingColumns", "fields", "useAsTitle", "reduce", "remaining", "field", "name", "type", "tabs", "tabFieldColumns", "tab", "getInitialColumns", "defaultColumns", "initialColumns", "Array", "isArray", "length", "push", "remainingColumns", "concat", "slice", "map", "column", "accessor", "active", "abortAndIgnore", "abortController", "abort", "handleAbortRef", "abortControllerRef", "newController", "AbortController", "current", "qs", "requests", "delete", "url", "options", "headers", "formattedOptions", "credentials", "method", "fetch", "get", "query", "params", "stringify", "addQueryPrefix", "patch", "post", "put", "findLocaleFromCode", "localizationConfig", "locale", "locales", "length", "find", "el", "code", "formatAdminURL", "offsetFormatCache", "offsetCache", "tzOffset", "timeZone", "date", "offsetStr", "calcOffset", "captures", "offsetRe", "cacheStr", "values", "hours", "minutes", "TZDateMini", "_TZDateMini", "args", "tzOffset", "adjustToSystemTZ", "syncToInternal", "tz", "timeZone", "time", "date", "re", "method", "utcMethod", "syncFromInternal", "offset", "prevHour", "systemOffset", "prevHourSystemOffset", "systemDSTChange", "dstShift", "offsetDiff", "postOffset", "postOffsetDiff", "offsetChanged", "postDiff", "newOffset", "offsetChange", "format", "formatDistanceToNow", "transpose", "formatDate", "date", "i18n", "pattern", "timezone", "theDate", "TZDate", "Date", "DateWithOriginalTz", "tz", "modifiedDate", "withTimeZone", "dateWithTimezone", "dateFNS", "locale", "t", "getTranslation", "isSerializedLexicalEditor", "value", "formatLexicalDocTitle", "editorState", "textContent", "node", "text", "type", "children", "formatRelationshipTitle", "data", "Array", "isArray", "map", "item", "id", "String", "filter", "Boolean", "join", "formatDocTitle", "collectionConfig", "data", "dateFormat", "dateFormatFromConfig", "fallback", "globalConfig", "i18n", "title", "useAsTitle", "admin", "fieldConfig", "fields", "find", "f", "name", "isDate", "type", "isRelationship", "date", "displayFormat", "formatDate", "pattern", "formatRelationshipTitle", "getTranslation", "label", "slug", "isSerializedLexicalEditor", "formatLexicalDocTitle", "root", "children", "t", "getGlobalData", "req", "payload", "config", "globalData", "globals", "length", "lockedDocuments", "find", "collection", "depth", "overrideAccess", "pagination", "select", "globalSlug", "updatedAt", "user", "where", "exists", "map", "global", "lockDuration", "lockDocuments", "duration", "globalLockDurationDefault", "lockedDoc", "docs", "doc", "slug", "data", "_isLocked", "_lastEditedAt", "_userEditing", "value", "getTranslation", "EntityType", "groupNavItems", "entities", "permissions", "i18n", "reduce", "groups", "entityToGroup", "entity", "admin", "group", "type", "toLowerCase", "slug", "read", "translatedGroup", "labelOrFunction", "labels", "plural", "label", "t", "existingGroup", "find", "matchedGroup", "push", "filter", "length", "getNavGroups", "permissions", "visibleEntities", "config", "i18n", "collections", "filter", "collection", "slug", "read", "includes", "globals", "global", "groupNavItems", "map", "type", "EntityType", "entity", "isHidden", "hidden", "user", "getVisibleEntities", "req", "collections", "payload", "config", "map", "slug", "admin", "filter", "Boolean", "globals", "formatAdminURL", "handleBackToDashboard", "adminRoute", "router", "serverURL", "redirectRoute", "path", "push", "formatAdminURL", "handleGoBack", "adminRoute", "collectionSlug", "router", "serverURL", "redirectRoute", "path", "push", "handleTakeOver", "id", "clearRouteCache", "collectionSlug", "documentLockStateRef", "globalSlug", "isLockingEnabled", "isWithinDoc", "setCurrentEditor", "setIsReadOnlyForIncomingUser", "updateDocumentEditor", "user", "current", "hasShownLockedModal", "isLocked", "error", "console", "hasSavePermission", "args", "collectionSlug", "docPermissions", "globalSlug", "isEditing", "Boolean", "update", "create", "isClientUserObject", "user", "isEditing", "id", "collectionSlug", "globalSlug", "Boolean", "sanitizeID", "id", "undefined", "decodeURIComponent", "mergeListSearchAndWhere"]
7
7
  }
@@ -1,42 +1,31 @@
1
1
  import type { ArrayField, ClientComponentProps, ClientField, Row, SanitizedFieldPermissions } from 'payload';
2
- import type { CSSProperties } from 'react';
3
2
  import React from 'react';
4
3
  import type { UseDraggableSortableReturn } from '../../elements/DraggableSortable/useDraggableSortable/types.js';
5
4
  import './index.scss';
6
5
  type ArrayRowProps = {
7
- readonly addRow?: (rowIndex: number) => Promise<void> | void;
8
- readonly copyRow?: (rowIndex: number) => void;
6
+ readonly addRow: (rowIndex: number) => Promise<void> | void;
7
+ readonly copyRow: (rowIndex: number) => void;
9
8
  readonly CustomRowLabel?: React.ReactNode;
10
- readonly duplicateRow?: (rowIndex: number) => void;
9
+ readonly duplicateRow: (rowIndex: number) => void;
11
10
  readonly errorCount: number;
12
11
  readonly fields: ClientField[];
13
12
  readonly hasMaxRows?: boolean;
14
13
  readonly isLoading?: boolean;
15
14
  readonly isSortable?: boolean;
16
15
  readonly labels: Partial<ArrayField['labels']>;
17
- readonly moveRow?: (fromIndex: number, toIndex: number) => void;
16
+ readonly moveRow: (fromIndex: number, toIndex: number) => void;
18
17
  readonly parentPath: string;
19
- readonly pasteRow?: (rowIndex: number) => void;
18
+ readonly pasteRow: (rowIndex: number) => void;
20
19
  readonly path: string;
21
20
  readonly permissions: SanitizedFieldPermissions;
22
21
  readonly readOnly?: boolean;
23
- readonly ref?: React.Ref<HTMLDivElement>;
24
- readonly removeRow?: (rowIndex: number) => void;
22
+ readonly removeRow: (rowIndex: number) => void;
25
23
  readonly row: Row;
26
24
  readonly rowCount: number;
27
25
  readonly rowIndex: number;
28
26
  readonly schemaPath: string;
29
27
  readonly setCollapse: (rowID: string, collapsed: boolean) => void;
30
- readonly showActions?: boolean;
31
- readonly style?: CSSProperties;
32
- } & ({
33
- readonly dragHandleAttributes?: React.HTMLAttributes<HTMLElement>;
34
- readonly dragHandleListeners?: UseDraggableSortableReturn['listeners'];
35
- readonly isDragging?: UseDraggableSortableReturn['isDragging'];
36
- readonly isSortable: true;
37
- } | {
38
- readonly isSortable?: false;
39
- }) & Pick<ClientComponentProps, 'forceRender'>;
28
+ } & Pick<ClientComponentProps, 'forceRender'> & UseDraggableSortableReturn;
40
29
  export declare const ArrayRow: React.FC<ArrayRowProps>;
41
30
  export {};
42
31
  //# sourceMappingURL=ArrayRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayRow.d.ts","sourceRoot":"","sources":["../../../src/fields/Array/ArrayRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,GAAG,EACH,yBAAyB,EAC1B,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAA;AAWhH,OAAO,cAAc,CAAA;AAIrB,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC9C,QAAQ,CA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