@rebasepro/cms 0.28.1 → 0.29.0-canary.g0e3a0e7

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 (339) hide show
  1. package/README.md +3 -3
  2. package/dist/collection_editor/_cms_internals.d.ts +0 -1
  3. package/dist/collection_editor/ui/EditorCollectionAction.d.ts +2 -2
  4. package/dist/collection_editor/ui/EditorCollectionAction.js.map +1 -1
  5. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js +2 -2
  6. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.js.map +1 -1
  7. package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js +1 -1
  8. package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.js.map +1 -1
  9. package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js +1 -1
  10. package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.js.map +1 -1
  11. package/dist/components/AdditionalFieldValue.d.ts +9 -3
  12. package/dist/components/AdditionalFieldValue.js +7 -4
  13. package/dist/components/AdditionalFieldValue.js.map +1 -1
  14. package/dist/components/CollectionPanel.d.ts +117 -18
  15. package/dist/components/CollectionPanel.js +115 -37
  16. package/dist/components/CollectionPanel.js.map +1 -1
  17. package/dist/components/CollectionTableBinding/CollectionRowActions.d.ts +5 -5
  18. package/dist/components/CollectionTableBinding/CollectionRowActions.js +16 -12
  19. package/dist/components/CollectionTableBinding/CollectionRowActions.js.map +1 -1
  20. package/dist/components/CollectionTableBinding/CollectionTableBinding.js +33 -8
  21. package/dist/components/CollectionTableBinding/CollectionTableBinding.js.map +1 -1
  22. package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +8 -3
  23. package/dist/components/CollectionTableBinding/PropertyTableCell.js +2 -2
  24. package/dist/components/CollectionTableBinding/PropertyTableCell.js.map +1 -1
  25. package/dist/components/CollectionTableBinding/column_utils.d.ts +9 -1
  26. package/dist/components/CollectionTableBinding/column_utils.js +6 -3
  27. package/dist/components/CollectionTableBinding/column_utils.js.map +1 -1
  28. package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js +2 -2
  29. package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.js.map +1 -1
  30. package/dist/components/CollectionTableBinding/fields/TableReferenceField.js +2 -2
  31. package/dist/components/CollectionTableBinding/fields/TableReferenceField.js.map +1 -1
  32. package/dist/components/CollectionTableBinding/fields/TableRelationField.js +2 -2
  33. package/dist/components/CollectionTableBinding/fields/TableRelationField.js.map +1 -1
  34. package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.d.ts +3 -2
  35. package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js +9 -7
  36. package/dist/components/CollectionTableBinding/internal/CollectionTableToolbar.js.map +1 -1
  37. package/dist/components/CollectionTableBinding/internal/common.d.ts +26 -2
  38. package/dist/components/CollectionTableBinding/internal/common.js +88 -4
  39. package/dist/components/CollectionTableBinding/internal/common.js.map +1 -1
  40. package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js +4 -3
  41. package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.js.map +1 -1
  42. package/dist/components/CollectionViewBinding/BoardCardBinding.d.ts +7 -1
  43. package/dist/components/CollectionViewBinding/BoardCardBinding.js +19 -14
  44. package/dist/components/CollectionViewBinding/BoardCardBinding.js.map +1 -1
  45. package/dist/components/CollectionViewBinding/CollectionAddButton.d.ts +28 -0
  46. package/dist/components/CollectionViewBinding/CollectionAddButton.js +50 -0
  47. package/dist/components/CollectionViewBinding/CollectionAddButton.js.map +1 -0
  48. package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.d.ts +11 -3
  49. package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js +9 -4
  50. package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.js.map +1 -1
  51. package/dist/components/CollectionViewBinding/CollectionCardViewBinding.d.ts +5 -3
  52. package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js +5 -3
  53. package/dist/components/CollectionViewBinding/CollectionCardViewBinding.js.map +1 -1
  54. package/dist/components/CollectionViewBinding/CollectionEntityActions.d.ts +29 -0
  55. package/dist/components/CollectionViewBinding/CollectionEntityActions.js +112 -0
  56. package/dist/components/CollectionViewBinding/CollectionEntityActions.js.map +1 -0
  57. package/dist/components/CollectionViewBinding/CollectionListViewBinding.d.ts +2 -2
  58. package/dist/components/CollectionViewBinding/CollectionListViewBinding.js +58 -16
  59. package/dist/components/CollectionViewBinding/CollectionListViewBinding.js.map +1 -1
  60. package/dist/components/CollectionViewBinding/CollectionToolbar.d.ts +57 -0
  61. package/dist/components/CollectionViewBinding/CollectionToolbar.js +146 -0
  62. package/dist/components/CollectionViewBinding/CollectionToolbar.js.map +1 -0
  63. package/dist/components/CollectionViewBinding/CollectionViewActions.d.ts +2 -2
  64. package/dist/components/CollectionViewBinding/CollectionViewActions.js +22 -26
  65. package/dist/components/CollectionViewBinding/CollectionViewActions.js.map +1 -1
  66. package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +58 -22
  67. package/dist/components/CollectionViewBinding/CollectionViewBinding.js +81 -1089
  68. package/dist/components/CollectionViewBinding/CollectionViewBinding.js.map +1 -1
  69. package/dist/components/CollectionViewBinding/CollectionViewContent.d.ts +9 -0
  70. package/dist/components/CollectionViewBinding/CollectionViewContent.js +152 -0
  71. package/dist/components/CollectionViewBinding/CollectionViewContent.js.map +1 -0
  72. package/dist/components/CollectionViewBinding/CollectionViewDialogs.d.ts +9 -0
  73. package/dist/components/CollectionViewBinding/CollectionViewDialogs.js +38 -0
  74. package/dist/components/CollectionViewBinding/CollectionViewDialogs.js.map +1 -0
  75. package/dist/components/CollectionViewBinding/CollectionViewFrame.d.ts +13 -0
  76. package/dist/components/CollectionViewBinding/CollectionViewFrame.js +32 -0
  77. package/dist/components/CollectionViewBinding/CollectionViewFrame.js.map +1 -0
  78. package/dist/components/CollectionViewBinding/CollectionViewScope.d.ts +14 -0
  79. package/dist/components/CollectionViewBinding/CollectionViewScope.js +22 -0
  80. package/dist/components/CollectionViewBinding/CollectionViewScope.js.map +1 -0
  81. package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +2 -2
  82. package/dist/components/CollectionViewBinding/CollectionViewStartActions.js +39 -67
  83. package/dist/components/CollectionViewBinding/CollectionViewStartActions.js.map +1 -1
  84. package/dist/components/CollectionViewBinding/CustomViewHost.d.ts +28 -0
  85. package/dist/components/CollectionViewBinding/CustomViewHost.js +54 -0
  86. package/dist/components/CollectionViewBinding/CustomViewHost.js.map +1 -0
  87. package/dist/components/CollectionViewBinding/EntitiesCount.d.ts +24 -0
  88. package/dist/components/CollectionViewBinding/EntitiesCount.js +69 -0
  89. package/dist/components/CollectionViewBinding/EntitiesCount.js.map +1 -0
  90. package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +7 -1
  91. package/dist/components/CollectionViewBinding/EntityCardBinding.js +34 -23
  92. package/dist/components/CollectionViewBinding/EntityCardBinding.js.map +1 -1
  93. package/dist/components/CollectionViewBinding/EntityIdHeaderWidget.d.ts +17 -0
  94. package/dist/components/CollectionViewBinding/EntityIdHeaderWidget.js +107 -0
  95. package/dist/components/CollectionViewBinding/EntityIdHeaderWidget.js.map +1 -0
  96. package/dist/components/CollectionViewBinding/FiltersButton.d.ts +15 -0
  97. package/dist/components/CollectionViewBinding/FiltersButton.js +49 -0
  98. package/dist/components/CollectionViewBinding/FiltersButton.js.map +1 -0
  99. package/dist/components/CollectionViewBinding/PluginColumnSlots.d.ts +35 -0
  100. package/dist/components/CollectionViewBinding/PluginColumnSlots.js +45 -0
  101. package/dist/components/CollectionViewBinding/PluginColumnSlots.js.map +1 -0
  102. package/dist/components/CollectionViewBinding/RowActions.d.ts +40 -0
  103. package/dist/components/CollectionViewBinding/RowActions.js +60 -0
  104. package/dist/components/CollectionViewBinding/RowActions.js.map +1 -0
  105. package/dist/components/CollectionViewBinding/SplitListView.d.ts +7 -4
  106. package/dist/components/CollectionViewBinding/SplitListView.js +20 -21
  107. package/dist/components/CollectionViewBinding/SplitListView.js.map +1 -1
  108. package/dist/components/CollectionViewBinding/builtin_action_props.d.ts +13 -0
  109. package/dist/components/CollectionViewBinding/fields.d.ts +22 -0
  110. package/dist/components/CollectionViewBinding/fields.js +47 -0
  111. package/dist/components/CollectionViewBinding/fields.js.map +1 -0
  112. package/dist/components/CollectionViewBinding/useBoardDataController.js +6 -7
  113. package/dist/components/CollectionViewBinding/useBoardDataController.js.map +1 -1
  114. package/dist/components/CollectionViewBinding/useCollectionLargeLayout.d.ts +19 -0
  115. package/dist/components/CollectionViewBinding/useCollectionLargeLayout.js +28 -0
  116. package/dist/components/CollectionViewBinding/useCollectionLargeLayout.js.map +1 -0
  117. package/dist/components/CollectionViewBinding/useCollectionViewState.d.ts +125 -0
  118. package/dist/components/CollectionViewBinding/useCollectionViewState.js +844 -0
  119. package/dist/components/CollectionViewBinding/useCollectionViewState.js.map +1 -0
  120. package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +20 -0
  121. package/dist/components/CollectionViewBinding/usePreviewSlots.js +23 -2
  122. package/dist/components/CollectionViewBinding/usePreviewSlots.js.map +1 -1
  123. package/dist/components/CollectionViewBinding/useSelectionController.d.ts +21 -3
  124. package/dist/components/CollectionViewBinding/useSelectionController.js +37 -6
  125. package/dist/components/CollectionViewBinding/useSelectionController.js.map +1 -1
  126. package/dist/components/CollectionsProvider.d.ts +3 -3
  127. package/dist/components/CollectionsProvider.js +4 -4
  128. package/dist/components/CollectionsProvider.js.map +1 -1
  129. package/dist/components/CollectionsScopeContext.d.ts +1 -1
  130. package/dist/components/CollectionsScopeContext.js +1 -1
  131. package/dist/components/CollectionsScopeContext.js.map +1 -1
  132. package/dist/components/DeleteEntityDialog.d.ts +1 -1
  133. package/dist/components/DeleteEntityDialog.js +2 -2
  134. package/dist/components/DeleteEntityDialog.js.map +1 -1
  135. package/dist/components/DetailViewBinding.js +32 -68
  136. package/dist/components/DetailViewBinding.js.map +1 -1
  137. package/dist/components/EditFormActions.js +5 -4
  138. package/dist/components/EditFormActions.js.map +1 -1
  139. package/dist/components/EditViewBinding.d.ts +2 -2
  140. package/dist/components/EditViewBinding.js +25 -15
  141. package/dist/components/EditViewBinding.js.map +1 -1
  142. package/dist/components/EntityDisplayHeader.js +8 -5
  143. package/dist/components/EntityDisplayHeader.js.map +1 -1
  144. package/dist/components/EntityPreviewBinding.js +1 -1
  145. package/dist/components/EntityPreviewBinding.js.map +1 -1
  146. package/dist/components/EntityViewBinding.d.ts +8 -1
  147. package/dist/components/EntityViewBinding.js +43 -14
  148. package/dist/components/EntityViewBinding.js.map +1 -1
  149. package/dist/components/EntityViewBody.d.ts +40 -0
  150. package/dist/components/EntityViewBody.js +90 -0
  151. package/dist/components/EntityViewBody.js.map +1 -0
  152. package/dist/components/FieldValue.d.ts +50 -0
  153. package/dist/components/FieldValue.js +81 -0
  154. package/dist/components/FieldValue.js.map +1 -0
  155. package/dist/components/InlineEntityPreview.js +1 -1
  156. package/dist/components/InlineEntityPreview.js.map +1 -1
  157. package/dist/components/PanelNotFound.d.ts +5 -0
  158. package/dist/components/PanelNotFound.js +21 -0
  159. package/dist/components/PanelNotFound.js.map +1 -0
  160. package/dist/components/RebaseCMS.d.ts +1 -1
  161. package/dist/components/RebaseCMS.js +11 -3
  162. package/dist/components/RebaseCMS.js.map +1 -1
  163. package/dist/components/RebaseNavigation.js +9 -3
  164. package/dist/components/RebaseNavigation.js.map +1 -1
  165. package/dist/components/RebaseShell.js +10 -5
  166. package/dist/components/RebaseShell.js.map +1 -1
  167. package/dist/components/RecordDetail.d.ts +61 -0
  168. package/dist/components/RecordDetail.js +123 -0
  169. package/dist/components/RecordDetail.js.map +1 -0
  170. package/dist/components/RecordForm.d.ts +126 -0
  171. package/dist/components/{EntityFormPanel.js → RecordForm.js} +64 -36
  172. package/dist/components/RecordForm.js.map +1 -0
  173. package/dist/components/ReferenceTable/SelectionTableBinding.d.ts +47 -17
  174. package/dist/components/ReferenceTable/SelectionTableBinding.js +89 -53
  175. package/dist/components/ReferenceTable/SelectionTableBinding.js.map +1 -1
  176. package/dist/components/ReferenceWidget.d.ts +5 -3
  177. package/dist/components/ReferenceWidget.js +10 -7
  178. package/dist/components/ReferenceWidget.js.map +1 -1
  179. package/dist/components/RelationSelector.js +4 -4
  180. package/dist/components/RelationSelector.js.map +1 -1
  181. package/dist/components/SelectableTable/SelectableTable.js +2 -3
  182. package/dist/components/SelectableTable/SelectableTable.js.map +1 -1
  183. package/dist/components/SelectableTable/SelectionStore.d.ts +1 -1
  184. package/dist/components/SelectableTable/SelectionStore.js +1 -1
  185. package/dist/components/SelectableTable/SelectionStore.js.map +1 -1
  186. package/dist/components/SelectableTable/filters/ReferenceFilterField.js +2 -2
  187. package/dist/components/SelectableTable/filters/ReferenceFilterField.js.map +1 -1
  188. package/dist/components/SidePanelBinding.js +13 -12
  189. package/dist/components/SidePanelBinding.js.map +1 -1
  190. package/dist/components/collection_prop.d.ts +18 -0
  191. package/dist/components/collection_prop.js +23 -0
  192. package/dist/components/collection_prop.js.map +1 -0
  193. package/dist/components/common/default_entity_actions.js +54 -54
  194. package/dist/components/common/default_entity_actions.js.map +1 -1
  195. package/dist/components/history/EntityHistoryView.d.ts +4 -1
  196. package/dist/components/history/EntityHistoryView.js +1 -1
  197. package/dist/components/history/EntityHistoryView.js.map +1 -1
  198. package/dist/components/history/LastEditedByFormAction.d.ts +1 -1
  199. package/dist/components/index.d.ts +4 -2
  200. package/dist/data_export/export/ExportCollectionAction.d.ts +3 -2
  201. package/dist/data_export/export/ExportCollectionAction.js +4 -3
  202. package/dist/data_export/export/ExportCollectionAction.js.map +1 -1
  203. package/dist/data_export/export/additional_fields.d.ts +6 -3
  204. package/dist/data_export/export/additional_fields.js +8 -4
  205. package/dist/data_export/export/additional_fields.js.map +1 -1
  206. package/dist/data_import/import/ImportCollectionAction.js +2 -2
  207. package/dist/data_import/import/ImportCollectionAction.js.map +1 -1
  208. package/dist/form/EntityForm.d.ts +1 -1
  209. package/dist/form/EntityForm.js +252 -150
  210. package/dist/form/EntityForm.js.map +1 -1
  211. package/dist/form/EntityFormActions.js +3 -2
  212. package/dist/form/EntityFormActions.js.map +1 -1
  213. package/dist/form/EntityFormBinding.d.ts +1 -1
  214. package/dist/form/EntityFormBinding.js +22 -11
  215. package/dist/form/EntityFormBinding.js.map +1 -1
  216. package/dist/form/FormField.d.ts +36 -0
  217. package/dist/form/FormField.js +41 -0
  218. package/dist/form/FormField.js.map +1 -0
  219. package/dist/form/FormFieldsContext.d.ts +69 -0
  220. package/dist/form/FormFieldsContext.js +143 -0
  221. package/dist/form/FormFieldsContext.js.map +1 -0
  222. package/dist/form/PropertyFieldBinding.js +4 -4
  223. package/dist/form/PropertyFieldBinding.js.map +1 -1
  224. package/dist/form/collection_showing.d.ts +8 -0
  225. package/dist/form/collection_showing.js +29 -0
  226. package/dist/form/collection_showing.js.map +1 -0
  227. package/dist/form/components/ErrorFocus.js +2 -1
  228. package/dist/form/components/ErrorFocus.js.map +1 -1
  229. package/dist/form/components/FieldBlock.js +3 -1
  230. package/dist/form/components/FieldBlock.js.map +1 -1
  231. package/dist/form/components/FormRail.d.ts +5 -1
  232. package/dist/form/components/FormRail.js +5 -1
  233. package/dist/form/components/FormRail.js.map +1 -1
  234. package/dist/form/components/FormSections.d.ts +5 -1
  235. package/dist/form/components/FormSections.js +11 -4
  236. package/dist/form/components/FormSections.js.map +1 -1
  237. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js +2 -2
  238. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.js.map +1 -1
  239. package/dist/form/field_bindings/MarkdownEditorFieldBinding.js +1 -1
  240. package/dist/form/field_bindings/MarkdownEditorFieldBinding.js.map +1 -1
  241. package/dist/form/field_bindings/MultipleRelationFieldBinding.js +2 -2
  242. package/dist/form/field_bindings/MultipleRelationFieldBinding.js.map +1 -1
  243. package/dist/form/field_bindings/ReadOnlyFieldBinding.js.map +1 -1
  244. package/dist/form/field_bindings/ReferenceFieldBinding.js +2 -2
  245. package/dist/form/field_bindings/ReferenceFieldBinding.js.map +1 -1
  246. package/dist/form/field_bindings/RelationFieldBinding.js +2 -2
  247. package/dist/form/field_bindings/RelationFieldBinding.js.map +1 -1
  248. package/dist/form/field_bindings/StorageUploadFieldBinding.js +1 -1
  249. package/dist/form/field_bindings/StorageUploadFieldBinding.js.map +1 -1
  250. package/dist/form/form_dom_ids.d.ts +25 -0
  251. package/dist/form/form_dom_ids.js +42 -0
  252. package/dist/form/form_dom_ids.js.map +1 -0
  253. package/dist/form/index.d.ts +3 -1
  254. package/dist/form/resolve_cell_property.d.ts +5 -0
  255. package/dist/form/resolve_cell_property.js +22 -1
  256. package/dist/form/resolve_cell_property.js.map +1 -1
  257. package/dist/hooks/index.d.ts +1 -1
  258. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +2 -2
  259. package/dist/hooks/navigation/useBuildNavigationStateController.js.map +1 -1
  260. package/dist/hooks/navigation/useNavigationResolution.d.ts +3 -3
  261. package/dist/hooks/navigation/useNavigationResolution.js.map +1 -1
  262. package/dist/hooks/navigation/useResolvedCollections.d.ts +2 -2
  263. package/dist/hooks/navigation/useResolvedCollections.js.map +1 -1
  264. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -2
  265. package/dist/hooks/navigation/useResolvedViews.js.map +1 -1
  266. package/dist/hooks/useBuildSidePanel.js +9 -9
  267. package/dist/hooks/useBuildSidePanel.js.map +1 -1
  268. package/dist/hooks/useEntityDisplay.js +6 -4
  269. package/dist/hooks/useEntityDisplay.js.map +1 -1
  270. package/dist/hooks/useRecordActions.js +2 -2
  271. package/dist/hooks/useRecordActions.js.map +1 -1
  272. package/dist/hooks/useSelectionDialog.d.ts +20 -7
  273. package/dist/hooks/useSelectionDialog.js +29 -8
  274. package/dist/hooks/useSelectionDialog.js.map +1 -1
  275. package/dist/index.d.ts +8 -3
  276. package/dist/index.js +15 -9
  277. package/dist/mcp-view.d.ts +9 -0
  278. package/dist/mcp-view.js +2 -0
  279. package/dist/mcp_view/app_modules.d.ts +29 -0
  280. package/dist/mcp_view/app_modules.js +163 -0
  281. package/dist/mcp_view/app_modules.js.map +1 -0
  282. package/dist/mcp_view/bridge.d.ts +90 -0
  283. package/dist/mcp_view/bridge.js +205 -0
  284. package/dist/mcp_view/bridge.js.map +1 -0
  285. package/dist/mcp_view/code_app.d.ts +65 -0
  286. package/dist/mcp_view/code_app.js +139 -0
  287. package/dist/mcp_view/code_app.js.map +1 -0
  288. package/dist/mcp_view/index.d.ts +48 -0
  289. package/dist/mcp_view/index.js +235 -0
  290. package/dist/mcp_view/index.js.map +1 -0
  291. package/dist/mcp_view/payload.d.ts +78 -0
  292. package/dist/mcp_view/payload.js +155 -0
  293. package/dist/mcp_view/payload.js.map +1 -0
  294. package/dist/mcp_view/screen.d.ts +28 -0
  295. package/dist/mcp_view/screen.js +223 -0
  296. package/dist/mcp_view/screen.js.map +1 -0
  297. package/dist/mcp_view/storage_source.d.ts +14 -0
  298. package/dist/mcp_view/storage_source.js +29 -0
  299. package/dist/mcp_view/storage_source.js.map +1 -0
  300. package/dist/mcp_view/store.d.ts +9 -0
  301. package/dist/mcp_view/store.js +27 -0
  302. package/dist/mcp_view/store.js.map +1 -0
  303. package/dist/mcp_view/tool_driver.d.ts +135 -0
  304. package/dist/mcp_view/tool_driver.js +527 -0
  305. package/dist/mcp_view/tool_driver.js.map +1 -0
  306. package/dist/preview/components/DatePreview.d.ts +34 -1
  307. package/dist/preview/components/DatePreview.js +72 -37
  308. package/dist/preview/components/DatePreview.js.map +1 -1
  309. package/dist/routes/RebaseRoute.js +1 -1
  310. package/dist/routes/RebaseRoute.js.map +1 -1
  311. package/dist/selection/SelectionMenu.d.ts +5 -3
  312. package/dist/selection/SelectionMenu.js +16 -9
  313. package/dist/selection/SelectionMenu.js.map +1 -1
  314. package/dist/selection/index.d.ts +2 -1
  315. package/dist/selection/resolve_selection.d.ts +61 -7
  316. package/dist/selection/resolve_selection.js +93 -11
  317. package/dist/selection/resolve_selection.js.map +1 -1
  318. package/dist/types/components/EntityFormProps.d.ts +60 -10
  319. package/dist/types/fields.d.ts +2 -65
  320. package/dist/util/dataControllerAdapter.d.ts +8 -0
  321. package/dist/util/dataControllerAdapter.js +11 -0
  322. package/dist/util/dataControllerAdapter.js.map +1 -1
  323. package/dist/util/navigation_utils.d.ts +5 -4
  324. package/dist/util/navigation_utils.js +6 -6
  325. package/dist/util/navigation_utils.js.map +1 -1
  326. package/dist/util/propertyConfigMapper.d.ts +8 -0
  327. package/dist/util/propertyConfigMapper.js +16 -2
  328. package/dist/util/propertyConfigMapper.js.map +1 -1
  329. package/package.json +15 -9
  330. package/recipes/README.md +79 -26
  331. package/recipes/approval-queue.tsx +79 -0
  332. package/recipes/bulk-set-status.tsx +23 -17
  333. package/recipes/calendar-view.tsx +28 -23
  334. package/recipes/master-detail.tsx +75 -0
  335. package/recipes/my-preferences.tsx +3 -3
  336. package/recipes/orders-dashboard.tsx +58 -84
  337. package/recipes/site-settings.tsx +4 -4
  338. package/dist/components/EntityFormPanel.d.ts +0 -63
  339. package/dist/components/EntityFormPanel.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionEntityActions.js","names":[],"sources":["../../../src/components/CollectionViewBinding/CollectionEntityActions.tsx"],"sourcesContent":["import type { AdminCollection, EntityAction, EntityActionClickProps, EntitySelectionController } from \"@rebasepro/cms-types\";\nimport { Entity } from \"@rebasepro/types\";\nimport React, { useCallback, useContext } from \"react\";\nimport { getIcon, useTranslation } from \"@rebasepro/app\";\nimport { IconButton, Menu, MenuItem, MoreVerticalIcon, Separator, Tooltip } from \"@rebasepro/ui\";\nimport { useAdminContext } from \"../../hooks/useAdminContext\";\nimport { entityActionName, placeEntityActions, resolveEntityActionState } from \"../../util/entity_actions\";\nimport { ActionMenuLabel } from \"../common/ActionMenuLabel\";\nimport { rowOfEntity, selectionControllerOf } from \"@rebasepro/app\";\nimport type { OpenEntityMode } from \"../../util/view_mode\";\nimport { RowActionsSlot } from \"./RowActions\";\n\n/**\n * What a card's actions are built from: the actions a row of this collection\n * has, and what the table hands an action it runs.\n */\nexport type EntityActionsScope<M extends Record<string, unknown> = Record<string, unknown>> = {\n getActions: (entity: Entity<M>) => EntityAction[];\n collection: AdminCollection<M>;\n path: string;\n openEntityMode: OpenEntityMode;\n selectionController?: EntitySelectionController<M>;\n onCollectionChange: () => void;\n highlightRow: (id: string | number) => void;\n unhighlightRow: () => void;\n};\n\n/**\n * Reaches the card's actions through context, not through the card's props:\n * the grid and the board draw memoised cards, and a scope that changes with\n * the selection would redraw every one of them.\n */\nexport const EntityActionsScopeContext = React.createContext<EntityActionsScope | null>(null);\n\n/**\n * The actions of one record on a card or a kanban card, placed as a table row\n * places them: `collapsed: false` ones as buttons, the rest in a menu — the\n * collection's own, then Copy, then Delete apart. Edit is left out: clicking\n * the card is what opens it.\n */\nfunction CollectionEntityActions({ entity }: { entity: Entity<Record<string, unknown>> }) {\n const scope = useContext(EntityActionsScopeContext);\n const context = useAdminContext();\n const { t } = useTranslation();\n const stopPropagation = useCallback((event: React.MouseEvent) => event.stopPropagation(), []);\n if (!scope) return null;\n\n const actions = scope.getActions(entity).filter(action => action.key !== \"edit\");\n const rowActions = <RowActionsSlot entity={entity} collection={scope.collection} path={scope.path}/>;\n if (actions.length === 0) return rowActions;\n\n const placed = placeEntityActions(actions);\n const collapsedGroups = [placed.own, placed.generic, placed.destructive].filter(group => group.length > 0);\n const clickProps: EntityActionClickProps<Record<string, unknown>> = {\n view: \"collection\",\n row: rowOfEntity(entity, scope.collection),\n id: String(entity.id),\n path: scope.path,\n collection: scope.collection,\n context,\n sidePanelController: context.sidePanelController,\n selectionController: scope.selectionController\n ? selectionControllerOf(scope.selectionController, scope.collection, scope.path)\n : undefined,\n highlightRow: scope.highlightRow,\n unhighlightRow: scope.unhighlightRow,\n onCollectionChange: scope.onCollectionChange,\n openEntityMode: scope.openEntityMode\n };\n\n return (\n <div className=\"flex items-center gap-0.5 shrink-0\" onClick={stopPropagation}>\n {rowActions}\n {placed.inline.map((action, index) => {\n const { enabled, disabledReason } = resolveEntityActionState(action, clickProps);\n const name = entityActionName(action, t);\n // A disabled icon takes no pointer events: wrapped, the\n // wrapper hovers, and the tooltip can still say why.\n return (\n <Tooltip key={action.key ?? index}\n title={disabledReason ? `${name}: ${disabledReason}` : name}\n asChild={enabled}>\n <IconButton\n aria-label={name}\n disabled={!enabled}\n size=\"small\"\n onClick={(event: React.MouseEvent) => {\n event.stopPropagation();\n action.onClick(clickProps);\n }}>\n {getIcon(action.icon, undefined, undefined, \"smallest\")}\n </IconButton>\n </Tooltip>\n );\n })}\n {collapsedGroups.length > 0 &&\n <Menu\n trigger={<IconButton aria-label={t(\"more_actions\")} size=\"small\">\n <MoreVerticalIcon/>\n </IconButton>}>\n {collapsedGroups.map((group, groupIndex) => (\n <React.Fragment key={groupIndex}>\n {groupIndex > 0 && <Separator orientation={\"horizontal\"}/>}\n {group.map((action, index) => {\n const { enabled, disabledReason } = resolveEntityActionState(action, clickProps);\n return <MenuItem\n key={action.key ?? index}\n disabled={!enabled}\n onClick={(event) => {\n event.stopPropagation();\n action.onClick(clickProps);\n }}>\n {getIcon(action.icon, undefined, undefined, \"smallest\")}\n <ActionMenuLabel name={entityActionName(action, t)} disabledReason={disabledReason}/>\n </MenuItem>;\n })}\n </React.Fragment>\n ))}\n </Menu>}\n </div>\n );\n}\n\n/**\n * Draws a record's actions where a card puts them. One function for the life\n * of the module, so a memoised card is never redrawn for a new one.\n */\nexport function renderCollectionEntityActions(entity: Entity<Record<string, unknown>>): React.ReactNode {\n return <CollectionEntityActions entity={entity}/>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAgCA,IAAa,4BAA4B,MAAM,cAAyC,IAAI;;;;;;;AAQ5F,SAAS,wBAAwB,EAAE,UAAuD;CACtF,MAAM,QAAQ,WAAW,yBAAyB;CAClD,MAAM,UAAU,gBAAgB;CAChC,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,kBAAkB,aAAa,UAA4B,MAAM,gBAAgB,GAAG,CAAC,CAAC;CAC5F,IAAI,CAAC,OAAO,OAAO;CAEnB,MAAM,UAAU,MAAM,WAAW,MAAM,CAAC,CAAC,QAAO,WAAU,OAAO,QAAQ,MAAM;CAC/E,MAAM,aAAa,oBAAC,gBAAD;EAAwB;EAAQ,YAAY,MAAM;EAAY,MAAM,MAAM;CAAM,CAAA;CACnG,IAAI,QAAQ,WAAW,GAAG,OAAO;CAEjC,MAAM,SAAS,mBAAmB,OAAO;CACzC,MAAM,kBAAkB;EAAC,OAAO;EAAK,OAAO;EAAS,OAAO;CAAW,CAAC,CAAC,QAAO,UAAS,MAAM,SAAS,CAAC;CACzG,MAAM,aAA8D;EAChE,MAAM;EACN,KAAK,YAAY,QAAQ,MAAM,UAAU;EACzC,IAAI,OAAO,OAAO,EAAE;EACpB,MAAM,MAAM;EACZ,YAAY,MAAM;EAClB;EACA,qBAAqB,QAAQ;EAC7B,qBAAqB,MAAM,sBACrB,sBAAsB,MAAM,qBAAqB,MAAM,YAAY,MAAM,IAAI,IAC7E,KAAA;EACN,cAAc,MAAM;EACpB,gBAAgB,MAAM;EACtB,oBAAoB,MAAM;EAC1B,gBAAgB,MAAM;CAC1B;CAEA,OACI,qBAAC,OAAD;EAAK,WAAU;EAAqC,SAAS;YAA7D;GACK;GACA,OAAO,OAAO,KAAK,QAAQ,UAAU;IAClC,MAAM,EAAE,SAAS,mBAAmB,yBAAyB,QAAQ,UAAU;IAC/E,MAAM,OAAO,iBAAiB,QAAQ,CAAC;IAGvC,OACI,oBAAC,SAAD;KACI,OAAO,iBAAiB,GAAG,KAAK,IAAI,mBAAmB;KACvD,SAAS;eACT,oBAAC,YAAD;MACI,cAAY;MACZ,UAAU,CAAC;MACX,MAAK;MACL,UAAU,UAA4B;OAClC,MAAM,gBAAgB;OACtB,OAAO,QAAQ,UAAU;MAC7B;gBACC,QAAQ,OAAO,MAAM,KAAA,GAAW,KAAA,GAAW,UAAU;KAC9C,CAAA;IACP,GAbK,OAAO,OAAO,KAanB;GAEjB,CAAC;GACA,gBAAgB,SAAS,KACtB,oBAAC,MAAD;IACI,SAAS,oBAAC,YAAD;KAAY,cAAY,EAAE,cAAc;KAAG,MAAK;eACrD,oBAAC,kBAAD,CAAkB,CAAA;IACV,CAAA;cACX,gBAAgB,KAAK,OAAO,eACzB,qBAAC,MAAM,UAAP,EAAA,UAAA,CACK,aAAa,KAAK,oBAAC,WAAD,EAAW,aAAa,aAAc,CAAA,GACxD,MAAM,KAAK,QAAQ,UAAU;KAC1B,MAAM,EAAE,SAAS,mBAAmB,yBAAyB,QAAQ,UAAU;KAC/E,OAAO,qBAAC,UAAD;MAEH,UAAU,CAAC;MACX,UAAU,UAAU;OAChB,MAAM,gBAAgB;OACtB,OAAO,QAAQ,UAAU;MAC7B;gBANG,CAOF,QAAQ,OAAO,MAAM,KAAA,GAAW,KAAA,GAAW,UAAU,GACtD,oBAAC,iBAAD;OAAiB,MAAM,iBAAiB,QAAQ,CAAC;OAAmB;MAAgB,CAAA,CAC9E;QARD,OAAO,OAAO,KAQb;IACd,CAAC,CACW,EAAA,GAfK,UAeL,CACnB;GACC,CAAA;EACT;;AAEb;;;;;AAMA,SAAgB,8BAA8B,QAA0D;CACpG,OAAO,oBAAC,yBAAD,EAAiC,OAAQ,CAAA;AACpD"}
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
2
  import { Entity } from "@rebasepro/types";
3
- import { CollectionSize, EntityAction, EntityTableController, SelectionController, AdminCollection } from "@rebasepro/cms-types";
3
+ import { CollectionSize, EntityAction, EntityTableController, EntitySelectionController, AdminCollection } from "@rebasepro/cms-types";
4
4
  export type CollectionListViewBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = {
5
5
  collection: AdminCollection<M>;
6
6
  tableController: EntityTableController<M>;
7
7
  onEntityClick?: (entity: Entity<M>) => void;
8
- selectionController?: SelectionController<M>;
8
+ selectionController?: EntitySelectionController<M>;
9
9
  selectionEnabled?: boolean;
10
10
  highlightedEntities?: Entity<M>[];
11
11
  emptyComponent?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { getResolvedPropertyInPath } from "../../util/property_utils.js";
2
2
  import { formatCollectionDate } from "../../util/format_collection_date.js";
3
- import { useCollectionSlotKeys, useEntitySlots } from "./usePreviewSlots.js";
3
+ import { useCollectionSlotKeys, useEntitySlots, useImagePlace } from "./usePreviewSlots.js";
4
4
  import { PropertyPreview } from "../../preview/PropertyPreview.js";
5
5
  import { useAdminContext } from "../../hooks/useAdminContext.js";
6
6
  import { entityActionName, resolveEntityActionState } from "../../util/entity_actions.js";
@@ -9,25 +9,31 @@ import { resolveEntityAction } from "../../util/resolutions.js";
9
9
  import { Highlighted } from "./SearchHighlight.js";
10
10
  import { MatchExplanation, fieldLabel, useSearchExplanation } from "./SearchExplanation.js";
11
11
  import { SlotValue, TagChips } from "./SlotValue.js";
12
+ import { RowActionsSlot } from "./RowActions.js";
12
13
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
13
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
15
  import { ArrowDownIcon, ArrowUpIcon, Checkbox, Chip, IconButton, ListView, Tooltip, Typography, cls, defaultBorderMixin, useUiLabels } from "@rebasepro/ui";
15
- import { IconForView, getDisplayResolver, getIcon, hasDeclaredDisplay, useAnalyticsController, useAuthController, useCustomizationController, useTranslation } from "@rebasepro/app";
16
+ import { resolveProperty } from "@rebasepro/common";
17
+ import { IconForView, getDisplayResolver, getIcon, hasDeclaredDisplay, rowOfEntity, selectionControllerOf, useAnalyticsController, useAuthController, useCustomizationController, useTranslation } from "@rebasepro/app";
16
18
  import { getValueInPath } from "@rebasepro/utils";
17
19
  //#region src/components/CollectionViewBinding/CollectionListViewBinding.tsx
18
20
  /** A column left over from a sort or filter that is no longer applied. */
19
21
  var PRIORITY_STALE_REQUEST = 1e3;
20
- var PRIORITY_DATE = 2e3;
21
- var PRIORITY_STATUS = 2001;
22
- var PRIORITY_TAGS = 2002;
22
+ /** The collection's `listProperties`, plus how many come after a column: the last goes first. */
23
+ var PRIORITY_NAMED = 2e3;
24
+ /** The display slots, above any number of named columns, in give-way order. */
25
+ var PRIORITY_DATE = 2500;
26
+ var PRIORITY_STATUS = 2501;
27
+ var PRIORITY_TAGS = 2502;
23
28
  /** The sort or filter currently in force. */
24
29
  var PRIORITY_ACTIVE_REQUEST = 3e3;
25
30
  /**
26
31
  * How wide a column of this property wants to be — the Tailwind class the cell
27
32
  * gets, and the pixel cost of that class. The two are returned together because
28
33
  * they must not drift: the budget is only meaningful if it describes the widths
29
- * actually rendered. `lg:` variants key off the viewport, not this panel, so a
30
- * narrow split on a wide screen gets the larger of the two — the cost we budget.
34
+ * actually rendered. The wider variant keys off the collection view's width,
35
+ * not the list's, so a narrow split in a wide view gets the larger of the two —
36
+ * the cost we budget.
31
37
  */
32
38
  function getIdealColumnWidth(prop) {
33
39
  if (prop.type === "string" && "enum" in prop) return {
@@ -39,11 +45,11 @@ function getIdealColumnWidth(prop) {
39
45
  widthPx: 112
40
46
  };
41
47
  if (prop.type === "reference" || prop.type === "relation") return {
42
- width: "flex-shrink-0 w-56 lg:w-64",
48
+ width: "flex-shrink-0 w-56 @5xl/collection:w-64",
43
49
  widthPx: 256
44
50
  };
45
51
  if (prop.type === "string") return {
46
- width: "flex-shrink-0 w-40 lg:w-48",
52
+ width: "flex-shrink-0 w-40 @5xl/collection:w-48",
47
53
  widthPx: 192
48
54
  };
49
55
  return {
@@ -104,6 +110,21 @@ function isComplexPropertyType(property) {
104
110
  return property.type === "array" || property.type === "map" || property.type === "reference" || property.type === "relation";
105
111
  }
106
112
  /**
113
+ * Whether the property brings its own `Preview`, directly or through the
114
+ * property config it inherits from.
115
+ */
116
+ function hasOwnPreview(property, propertyKey, propertyConfigs, authController) {
117
+ if (property.admin?.Preview) return true;
118
+ if (!property.propertyConfig) return false;
119
+ return !!resolveProperty({
120
+ property,
121
+ propertyKey,
122
+ propertyConfigs,
123
+ authController,
124
+ ignoreMissingFields: true
125
+ })?.admin?.Preview;
126
+ }
127
+ /**
107
128
  * Render a complex value as a compact, single-line string.
108
129
  * - Arrays → "Item, Item +3"
109
130
  * - Maps → "4 fields"
@@ -261,6 +282,17 @@ function CollectionListViewBinding({ collection, tableController, onEntityClick,
261
282
  */
262
283
  const declaredColumns = useMemo(() => {
263
284
  const cols = [];
285
+ /**
286
+ * The property a slot is declared to read, when it reads one: a
287
+ * resolver computes its value, and an inferred key is a guess.
288
+ */
289
+ const declaredSlotKey = (slot, key) => key && hasDeclaredDisplay(resolvedCollection, slot) && !getDisplayResolver(resolvedCollection, slot) ? key : void 0;
290
+ const slotPriorities = /* @__PURE__ */ new Map([
291
+ [declaredSlotKey("tags", slotKeys.tagsKey), PRIORITY_TAGS],
292
+ [declaredSlotKey("status", statusPropertyKey), PRIORITY_STATUS],
293
+ [declaredSlotKey("date", datePropertyKey), PRIORITY_DATE]
294
+ ]);
295
+ slotPriorities.delete(void 0);
264
296
  if (columnMode) {
265
297
  const keys = resolvedCollection.listProperties.filter((key) => key !== titleColumn?.key);
266
298
  keys.forEach((key, index) => {
@@ -273,7 +305,7 @@ function CollectionListViewBinding({ collection, tableController, onEntityClick,
273
305
  align: property.type === "number" || property.type === "date" ? "right" : "left",
274
306
  ...getIdealColumnWidth(property),
275
307
  sortable: sortableKeys.has(key),
276
- priority: PRIORITY_TAGS + (keys.length - index)
308
+ priority: slotPriorities.get(key) ?? PRIORITY_NAMED + (keys.length - index)
277
309
  });
278
310
  });
279
311
  }
@@ -431,7 +463,7 @@ function CollectionListViewBinding({ collection, tableController, onEntityClick,
431
463
  }
432
464
  return actions;
433
465
  }, [listViewActionsCache, getListViewActions]);
434
- const showImage = size !== "xs";
466
+ const showImage = useImagePlace(imagePropertyKey) && size !== "xs";
435
467
  /**
436
468
  * Does the checkbox ride on the thumbnail rather than sit beside it?
437
469
  *
@@ -821,12 +853,13 @@ var ListRow = React.memo(function ListRow({ entity, collection, onClick, selecte
821
853
  children: listViewActions.map((action, index) => {
822
854
  const clickProps = {
823
855
  view: "collection",
824
- entity,
825
- path,
856
+ row: rowOfEntity(entity, collection),
857
+ id: String(entity.id),
858
+ path: path ?? entity.path,
826
859
  collection,
827
860
  context,
828
861
  sidePanelController: context?.sidePanelController,
829
- selectionController,
862
+ selectionController: selectionController ? selectionControllerOf(selectionController, collection, path ?? entity.path) : void 0,
830
863
  openEntityMode: openEntityMode ?? collection?.openEntityMode ?? "full_screen"
831
864
  };
832
865
  const { enabled, disabledReason } = resolveEntityActionState(action, clickProps);
@@ -846,6 +879,12 @@ var ListRow = React.memo(function ListRow({ entity, collection, onClick, selecte
846
879
  })
847
880
  }, action.key ?? index);
848
881
  })
882
+ }),
883
+ /* @__PURE__ */ jsx(RowActionsSlot, {
884
+ entity,
885
+ collection,
886
+ path,
887
+ className: "flex items-center gap-1 flex-shrink-0 ml-2"
849
888
  })
850
889
  ]
851
890
  });
@@ -860,6 +899,8 @@ var ListRow = React.memo(function ListRow({ entity, collection, onClick, selecte
860
899
  */
861
900
  function ListCell({ column, entity, slots }) {
862
901
  const relativeTimeLabels = useUiLabels().relativeTime;
902
+ const { propertyConfigs } = useCustomizationController();
903
+ const authController = useAuthController();
863
904
  if (column.slot === "tags") {
864
905
  if (!slots.tags) return null;
865
906
  return /* @__PURE__ */ jsx("div", {
@@ -890,7 +931,7 @@ function ListCell({ column, entity, slots }) {
890
931
  className: "whitespace-nowrap text-surface-400 dark:text-surface-500 font-medium",
891
932
  children: formatCollectionDate(value, property, { relativeTimeLabels }) ?? "—"
892
933
  });
893
- if (isComplexPropertyType(property)) return /* @__PURE__ */ jsx(Typography, {
934
+ if (isComplexPropertyType(property) && !hasOwnPreview(property, column.key, propertyConfigs, authController)) return /* @__PURE__ */ jsx(Typography, {
894
935
  variant: "caption",
895
936
  className: "text-surface-500 dark:text-surface-400 truncate",
896
937
  children: compactValueSummary(value, property) ?? "—"
@@ -904,7 +945,8 @@ function ListCell({ column, entity, slots }) {
904
945
  propertyKey: column.key,
905
946
  value,
906
947
  property,
907
- size: "small"
948
+ size: "small",
949
+ hideLabel: true
908
950
  })
909
951
  });
910
952
  }