@rebasepro/cms 0.17.3 → 0.18.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 (449) hide show
  1. package/README.md +4 -0
  2. package/dist/{CollectionEditorDialog-B-akreOU.js → CollectionEditorDialog-BeX4b92r.js} +13 -7
  3. package/dist/{CollectionEditorDialog-B-akreOU.js.map → CollectionEditorDialog-BeX4b92r.js.map} +1 -1
  4. package/dist/{PropertyEditView-CiY84wkR.js → PropertyEditView-C7thfj4L.js} +3 -3
  5. package/dist/{PropertyEditView-CiY84wkR.js.map → PropertyEditView-C7thfj4L.js.map} +1 -1
  6. package/dist/{RouterCollectionsStudioView-DkAWda4N.js → RouterCollectionsStudioView-BtjzvB6E.js} +4 -4
  7. package/dist/{RouterCollectionsStudioView-DkAWda4N.js.map → RouterCollectionsStudioView-BtjzvB6E.js.map} +1 -1
  8. package/dist/{SchemaChangeDialog-DceT8QFX.js → SchemaChangeDialog-CkqK6KOC.js} +4 -2
  9. package/dist/{SchemaChangeDialog-DceT8QFX.js.map → SchemaChangeDialog-CkqK6KOC.js.map} +1 -1
  10. package/dist/collection_editor/api/generateCollectionApi.d.ts +1 -2
  11. package/dist/collection_editor_ui.d.ts +2 -0
  12. package/dist/collection_editor_ui.js +6 -5
  13. package/dist/collection_editor_ui.js.map +1 -1
  14. package/dist/components/DeleteEntityDialog.d.ts +2 -3
  15. package/dist/components/RebaseLayout.d.ts +11 -4
  16. package/dist/components/field_configs.d.ts +1 -1
  17. package/dist/editor/sanitize-html.d.ts +15 -0
  18. package/dist/editor.js +195 -10
  19. package/dist/editor.js.map +1 -1
  20. package/dist/{export-Ben8E355.js → export--arni_VY.js} +2 -2
  21. package/dist/{export-Ben8E355.js.map → export--arni_VY.js.map} +1 -1
  22. package/dist/form/components/LabelWithIcon.d.ts +10 -0
  23. package/dist/{history-DIEVd26f.js → history-C2TpoQwi.js} +2 -2
  24. package/dist/{history-DIEVd26f.js.map → history-C2TpoQwi.js.map} +1 -1
  25. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
  26. package/dist/hooks/navigation/useResolvedViews.d.ts +1 -1
  27. package/dist/hooks/navigation/useTopLevelNavigation.d.ts +1 -1
  28. package/dist/{import-D25x7ko-.js → import-DTkXNoBg.js} +2 -2
  29. package/dist/{import-D25x7ko-.js.map → import-DTkXNoBg.js.map} +1 -1
  30. package/dist/index.js +78 -33
  31. package/dist/index.js.map +1 -1
  32. package/dist/util/propertyConfigMapper.d.ts +1 -1
  33. package/dist/util-CfLFggP7.js +57 -0
  34. package/dist/util-CfLFggP7.js.map +1 -0
  35. package/dist/{util-DVqnqlLn.js → util-DE1WQW6h.js} +134 -112
  36. package/dist/util-DE1WQW6h.js.map +1 -0
  37. package/package.json +42 -34
  38. package/dist/util-DVqnqlLn.js.map +0 -1
  39. package/src/collection_editor/CollectionEditorDialogsContext.tsx +0 -25
  40. package/src/collection_editor/ConfigControllerProvider.tsx +0 -395
  41. package/src/collection_editor/_cms_internals.ts +0 -41
  42. package/src/collection_editor/api/generateCollectionApi.ts +0 -126
  43. package/src/collection_editor/api/index.ts +0 -1
  44. package/src/collection_editor/extensibility_types.ts +0 -168
  45. package/src/collection_editor/index.ts +0 -108
  46. package/src/collection_editor/liveSchemaClient.ts +0 -285
  47. package/src/collection_editor/relation_kinds.ts +0 -44
  48. package/src/collection_editor/serializable_types.ts +0 -535
  49. package/src/collection_editor/serializable_utils.ts +0 -729
  50. package/src/collection_editor/types/collection_editor_controller.tsx +0 -62
  51. package/src/collection_editor/types/collection_inference.ts +0 -18
  52. package/src/collection_editor/types/config_controller.tsx +0 -121
  53. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +0 -199
  54. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +0 -51
  55. package/src/collection_editor/ui/EditorCollectionAction.tsx +0 -54
  56. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +0 -90
  57. package/src/collection_editor/ui/EditorEntityAction.tsx +0 -50
  58. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +0 -114
  59. package/src/collection_editor/ui/KanbanSetupAction.tsx +0 -43
  60. package/src/collection_editor/ui/MissingReferenceWidget.tsx +0 -35
  61. package/src/collection_editor/ui/NewCollectionButton.tsx +0 -27
  62. package/src/collection_editor/ui/NewCollectionCard.tsx +0 -48
  63. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +0 -49
  64. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +0 -260
  65. package/src/collection_editor/ui/collection_editor/AIModifiedPathsContext.tsx +0 -90
  66. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +0 -388
  67. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1098
  68. package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +0 -301
  69. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +0 -172
  70. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +0 -620
  71. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +0 -530
  72. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +0 -462
  73. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +0 -104
  74. package/src/collection_editor/ui/collection_editor/CollectionYupValidation.tsx +0 -9
  75. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +0 -199
  76. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +0 -315
  77. package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +0 -164
  78. package/src/collection_editor/ui/collection_editor/EntityActionsSelectDialog.tsx +0 -40
  79. package/src/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +0 -39
  80. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +0 -373
  81. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +0 -288
  82. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +0 -141
  83. package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +0 -194
  84. package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +0 -53
  85. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +0 -980
  86. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +0 -164
  87. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +0 -364
  88. package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +0 -44
  89. package/src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx +0 -41
  90. package/src/collection_editor/ui/collection_editor/SchemaChangeDialog.tsx +0 -470
  91. package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +0 -256
  92. package/src/collection_editor/ui/collection_editor/SwitchControl.tsx +0 -39
  93. package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +0 -68
  94. package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +0 -67
  95. package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +0 -296
  96. package/src/collection_editor/ui/collection_editor/import/clean_import_data.ts +0 -57
  97. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +0 -147
  98. package/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.tsx +0 -41
  99. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +0 -113
  100. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +0 -250
  101. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +0 -126
  102. package/src/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.tsx +0 -20
  103. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +0 -153
  104. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +0 -217
  105. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +0 -117
  106. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +0 -129
  107. package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +0 -335
  108. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +0 -107
  109. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +0 -403
  110. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +0 -148
  111. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +0 -91
  112. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +0 -34
  113. package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +0 -49
  114. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +0 -925
  115. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +0 -28
  116. package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +0 -626
  117. package/src/collection_editor/ui/collection_editor/properties/conditions/index.ts +0 -6
  118. package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +0 -93
  119. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +0 -52
  120. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +0 -63
  121. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +0 -114
  122. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +0 -154
  123. package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +0 -28
  124. package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +0 -112
  125. package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +0 -183
  126. package/src/collection_editor/ui/collection_editor/templates/products_template.ts +0 -88
  127. package/src/collection_editor/ui/collection_editor/templates/users_template.ts +0 -42
  128. package/src/collection_editor/ui/collection_editor/util.ts +0 -28
  129. package/src/collection_editor/ui/collection_editor/utils/strings.ts +0 -1
  130. package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +0 -39
  131. package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +0 -276
  132. package/src/collection_editor/useCollectionEditorController.tsx +0 -9
  133. package/src/collection_editor/useCollectionsConfigController.tsx +0 -9
  134. package/src/collection_editor/useJsonCollectionsConfigController.tsx +0 -297
  135. package/src/collection_editor/useLiveSchemaEditing.tsx +0 -315
  136. package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -341
  137. package/src/collection_editor/useSafeSnackbarController.ts +0 -9
  138. package/src/collection_editor/validateCollectionJson.ts +0 -440
  139. package/src/collection_editor_ui.ts +0 -21
  140. package/src/components/AdditionalFieldValue.tsx +0 -68
  141. package/src/components/AdminModeSyncer.tsx +0 -56
  142. package/src/components/ArrayContainer.tsx +0 -542
  143. package/src/components/ClearFilterSortButton.tsx +0 -56
  144. package/src/components/CollectionEditorDialogs.tsx +0 -69
  145. package/src/components/CollectionPanel.tsx +0 -179
  146. package/src/components/CollectionTableBinding/CollectionRowActions.tsx +0 -244
  147. package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +0 -394
  148. package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +0 -172
  149. package/src/components/CollectionTableBinding/PropertyTableCell.tsx +0 -350
  150. package/src/components/CollectionTableBinding/column_utils.tsx +0 -155
  151. package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +0 -131
  152. package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +0 -193
  153. package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +0 -192
  154. package/src/components/CollectionTableBinding/fields/TableRelationSelectorField.tsx +0 -42
  155. package/src/components/CollectionTableBinding/fields/TableStorageUpload.tsx +0 -324
  156. package/src/components/CollectionTableBinding/fields/VirtualTableSelect.tsx +0 -132
  157. package/src/components/CollectionTableBinding/fields/VirtualTableUserSelect.tsx +0 -41
  158. package/src/components/CollectionTableBinding/index.tsx +0 -14
  159. package/src/components/CollectionTableBinding/internal/CollectionTableToolbar.tsx +0 -96
  160. package/src/components/CollectionTableBinding/internal/EntityTableCell.tsx +0 -309
  161. package/src/components/CollectionTableBinding/internal/EntityTableCellActions.tsx +0 -80
  162. package/src/components/CollectionTableBinding/internal/common.tsx +0 -74
  163. package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +0 -422
  164. package/src/components/CollectionTableBinding/internal/popup_field/useDraggable.tsx +0 -99
  165. package/src/components/CollectionTableBinding/internal/popup_field/useWindowSize.tsx +0 -22
  166. package/src/components/CollectionTableBinding/table_bindings.tsx +0 -350
  167. package/src/components/CollectionViewBinding/BoardCardBinding.tsx +0 -263
  168. package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +0 -662
  169. package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +0 -159
  170. package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +0 -1430
  171. package/src/components/CollectionViewBinding/CollectionViewActions.tsx +0 -227
  172. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +0 -1603
  173. package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +0 -240
  174. package/src/components/CollectionViewBinding/EntityCardBinding.tsx +0 -239
  175. package/src/components/CollectionViewBinding/FilterPresetsButton.tsx +0 -298
  176. package/src/components/CollectionViewBinding/FiltersDialog.tsx +0 -218
  177. package/src/components/CollectionViewBinding/SearchExplanation.tsx +0 -106
  178. package/src/components/CollectionViewBinding/SearchHighlight.tsx +0 -311
  179. package/src/components/CollectionViewBinding/SlotValue.tsx +0 -156
  180. package/src/components/CollectionViewBinding/SortButton.tsx +0 -354
  181. package/src/components/CollectionViewBinding/SplitListCloseButton.tsx +0 -49
  182. package/src/components/CollectionViewBinding/SplitListShowButton.tsx +0 -28
  183. package/src/components/CollectionViewBinding/SplitListView.tsx +0 -488
  184. package/src/components/CollectionViewBinding/SplitViewContext.tsx +0 -34
  185. package/src/components/CollectionViewBinding/ViewModeToggle.tsx +0 -250
  186. package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +0 -81
  187. package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +0 -181
  188. package/src/components/CollectionViewBinding/useBoardDataController.tsx +0 -802
  189. package/src/components/CollectionViewBinding/usePreviewSlots.ts +0 -703
  190. package/src/components/CollectionViewBinding/useSelectionController.tsx +0 -40
  191. package/src/components/CollectionViewBinding/utils.ts +0 -22
  192. package/src/components/DefaultAppBar.tsx +0 -264
  193. package/src/components/DefaultDrawer.tsx +0 -593
  194. package/src/components/DeleteEntityDialog.tsx +0 -205
  195. package/src/components/DetailViewBinding.tsx +0 -731
  196. package/src/components/DrawerNavigationGroup.tsx +0 -141
  197. package/src/components/DrawerNavigationItem.tsx +0 -115
  198. package/src/components/EditFormActions.tsx +0 -303
  199. package/src/components/EditViewBinding.tsx +0 -1069
  200. package/src/components/EntityDisplayHeader.tsx +0 -170
  201. package/src/components/EntityIdentityBar.tsx +0 -428
  202. package/src/components/EntityInspector.tsx +0 -156
  203. package/src/components/EntityPreviewBinding.tsx +0 -432
  204. package/src/components/EntityPreviewNesting.tsx +0 -50
  205. package/src/components/EntityViewBinding.tsx +0 -374
  206. package/src/components/FieldCaption.tsx +0 -14
  207. package/src/components/HomePage/ContentHomePage.tsx +0 -586
  208. package/src/components/HomePage/FavouritesView.tsx +0 -60
  209. package/src/components/HomePage/HomePageDnD.tsx +0 -704
  210. package/src/components/HomePage/NavigationCard.tsx +0 -81
  211. package/src/components/HomePage/NavigationCardBinding.tsx +0 -107
  212. package/src/components/HomePage/NavigationGroup.tsx +0 -156
  213. package/src/components/HomePage/RenameGroupDialog.tsx +0 -123
  214. package/src/components/HomePage/SmallNavigationCard.tsx +0 -41
  215. package/src/components/HomePage/index.tsx +0 -5
  216. package/src/components/InlineEntityPreview.tsx +0 -149
  217. package/src/components/JsonPreviewBinding.tsx +0 -66
  218. package/src/components/PropertyCollectionView.tsx +0 -336
  219. package/src/components/PropertyConfigBadge.tsx +0 -28
  220. package/src/components/PropertyIdCopyTooltip.tsx +0 -47
  221. package/src/components/RebaseAuthGate.tsx +0 -44
  222. package/src/components/RebaseCMS.tsx +0 -30
  223. package/src/components/RebaseLayout.tsx +0 -80
  224. package/src/components/RebaseNavigation.tsx +0 -369
  225. package/src/components/RebaseRouteDefs.tsx +0 -127
  226. package/src/components/RebaseShell.tsx +0 -83
  227. package/src/components/ReferenceTable/SelectionTableBinding.tsx +0 -389
  228. package/src/components/ReferenceWidget.tsx +0 -156
  229. package/src/components/RelationSelector.tsx +0 -926
  230. package/src/components/SearchIconsView.tsx +0 -78
  231. package/src/components/SelectableTable/SelectableTable.tsx +0 -309
  232. package/src/components/SelectableTable/SelectableTableContext.tsx +0 -7
  233. package/src/components/SelectableTable/SelectionStore.ts +0 -43
  234. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +0 -59
  235. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +0 -146
  236. package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +0 -190
  237. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +0 -250
  238. package/src/components/SelectableTable/filters/RelationFilterField.tsx +0 -238
  239. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +0 -282
  240. package/src/components/SelectableTable/filters/null_filter.ts +0 -63
  241. package/src/components/SideDialogs.tsx +0 -238
  242. package/src/components/SidePanelBinding.tsx +0 -361
  243. package/src/components/SidePanelProvider.tsx +0 -80
  244. package/src/components/UserSelector.tsx +0 -513
  245. package/src/components/admin/CreationResultDialog.tsx +0 -138
  246. package/src/components/admin/index.ts +0 -1
  247. package/src/components/app/AppBar.tsx +0 -17
  248. package/src/components/app/Drawer.tsx +0 -38
  249. package/src/components/app/Scaffold.tsx +0 -366
  250. package/src/components/app/index.ts +0 -4
  251. package/src/components/app/useApp.tsx +0 -36
  252. package/src/components/common/default_entity_actions.tsx +0 -440
  253. package/src/components/common/index.ts +0 -1
  254. package/src/components/field_configs.tsx +0 -506
  255. package/src/components/history/EntityHistoryEntry.tsx +0 -203
  256. package/src/components/history/EntityHistoryView.tsx +0 -206
  257. package/src/components/history/LastEditedByFormAction.tsx +0 -24
  258. package/src/components/history/LastEditedByIndicator.tsx +0 -95
  259. package/src/components/history/UserChip.tsx +0 -15
  260. package/src/components/history/index.tsx +0 -5
  261. package/src/components/index.ts +0 -63
  262. package/src/contexts/BreacrumbsContext.tsx +0 -45
  263. package/src/contexts/SideDialogsControllerContext.tsx +0 -5
  264. package/src/contexts/SidePanelControllerContext.tsx +0 -5
  265. package/src/data_export/export/BasicExportAction.tsx +0 -142
  266. package/src/data_export/export/ExportCollectionAction.tsx +0 -321
  267. package/src/data_export/export/export.ts +0 -295
  268. package/src/data_export/export/fetch_export_data.ts +0 -90
  269. package/src/data_export/export/index.ts +0 -4
  270. package/src/data_export/index.ts +0 -1
  271. package/src/data_import/components/DataNewPropertiesMapping.tsx +0 -261
  272. package/src/data_import/components/ImportFileUpload.tsx +0 -42
  273. package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +0 -58
  274. package/src/data_import/components/ImportSaveInProgress.tsx +0 -121
  275. package/src/data_import/components/index.ts +0 -4
  276. package/src/data_import/hooks/index.ts +0 -1
  277. package/src/data_import/hooks/useImportConfig.tsx +0 -34
  278. package/src/data_import/import/ImportCollectionAction.tsx +0 -461
  279. package/src/data_import/import/index.ts +0 -1
  280. package/src/data_import/index.ts +0 -5
  281. package/src/data_import/types/column_mapping.ts +0 -32
  282. package/src/data_import/types/index.ts +0 -1
  283. package/src/data_import/utils/csv.ts +0 -153
  284. package/src/data_import/utils/data.ts +0 -181
  285. package/src/data_import/utils/file_headers.ts +0 -14
  286. package/src/data_import/utils/file_to_json.ts +0 -149
  287. package/src/data_import/utils/get_import_inference_type.ts +0 -33
  288. package/src/data_import/utils/get_properties_mapping.ts +0 -67
  289. package/src/data_import/utils/index.ts +0 -5
  290. package/src/data_import/utils/save_entities.ts +0 -138
  291. package/src/data_import/utils/transforms.ts +0 -70
  292. package/src/editor/components/SlashCommandMenu.tsx +0 -532
  293. package/src/editor/components/editor-bubble-item.tsx +0 -32
  294. package/src/editor/components/editor-bubble.tsx +0 -143
  295. package/src/editor/components/image-bubble.tsx +0 -183
  296. package/src/editor/components/index.ts +0 -14
  297. package/src/editor/components/table-bubble.tsx +0 -233
  298. package/src/editor/editor.tsx +0 -529
  299. package/src/editor/extensions/HighlightDecorationExtension.ts +0 -115
  300. package/src/editor/extensions/Image.ts +0 -159
  301. package/src/editor/extensions/TextLoadingDecorationExtension.tsx +0 -107
  302. package/src/editor/extensions/clipboard.ts +0 -72
  303. package/src/editor/extensions/custom-keymap.ts +0 -25
  304. package/src/editor/extensions/drag-and-drop.tsx +0 -508
  305. package/src/editor/hooks/useProseMirror.ts +0 -126
  306. package/src/editor/hooks/useProseMirrorContext.ts +0 -15
  307. package/src/editor/index.ts +0 -2
  308. package/src/editor/markdown-it-plugins.d.ts +0 -24
  309. package/src/editor/markdown.ts +0 -204
  310. package/src/editor/nodeViews/ImageComponent.tsx +0 -20
  311. package/src/editor/nodeViews/ReactNodeView.tsx +0 -89
  312. package/src/editor/nodeViews/TaskItemComponent.tsx +0 -30
  313. package/src/editor/nodeViews/index.ts +0 -35
  314. package/src/editor/plugins/index.ts +0 -58
  315. package/src/editor/plugins/inputrules.ts +0 -82
  316. package/src/editor/plugins/placeholderPlugin.ts +0 -55
  317. package/src/editor/plugins/slashCommandPlugin.ts +0 -65
  318. package/src/editor/schema.ts +0 -339
  319. package/src/editor/selectors/ai-selector.tsx +0 -110
  320. package/src/editor/selectors/color-selector.tsx +0 -199
  321. package/src/editor/selectors/link-selector.tsx +0 -122
  322. package/src/editor/selectors/node-selector.tsx +0 -159
  323. package/src/editor/selectors/text-buttons.tsx +0 -79
  324. package/src/editor/types.ts +0 -6
  325. package/src/editor/useProseMirror.ts +0 -125
  326. package/src/editor/utils/prosemirror-utils.ts +0 -113
  327. package/src/editor/utils/remove_classes.ts +0 -18
  328. package/src/editor/utils/useDebouncedCallback.ts +0 -25
  329. package/src/form/EntityForm.tsx +0 -761
  330. package/src/form/EntityFormActions.tsx +0 -160
  331. package/src/form/EntityFormBinding.tsx +0 -342
  332. package/src/form/PropertyFieldBinding.tsx +0 -348
  333. package/src/form/components/ErrorFocus.tsx +0 -44
  334. package/src/form/components/FieldBlock.tsx +0 -189
  335. package/src/form/components/FieldHelperText.tsx +0 -84
  336. package/src/form/components/FormRail.tsx +0 -153
  337. package/src/form/components/FormSections.tsx +0 -145
  338. package/src/form/components/LabelWithIcon.tsx +0 -43
  339. package/src/form/components/LabelWithIconAndTooltip.tsx +0 -28
  340. package/src/form/components/LocalChangesMenu.tsx +0 -147
  341. package/src/form/components/StorageItemPreview.tsx +0 -81
  342. package/src/form/components/StorageUploadProgress.tsx +0 -118
  343. package/src/form/components/index.tsx +0 -6
  344. package/src/form/components/useRailVisible.tsx +0 -47
  345. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +0 -109
  346. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +0 -172
  347. package/src/form/field_bindings/BinaryFieldBinding.tsx +0 -177
  348. package/src/form/field_bindings/BlockFieldBinding.tsx +0 -282
  349. package/src/form/field_bindings/DateTimeFieldBinding.tsx +0 -78
  350. package/src/form/field_bindings/GeopointFieldBinding.tsx +0 -200
  351. package/src/form/field_bindings/KeyValueFieldBinding.tsx +0 -574
  352. package/src/form/field_bindings/MapFieldBinding.tsx +0 -120
  353. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +0 -259
  354. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +0 -130
  355. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +0 -168
  356. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +0 -94
  357. package/src/form/field_bindings/ReferenceFieldBinding.tsx +0 -146
  358. package/src/form/field_bindings/RelationFieldBinding.tsx +0 -202
  359. package/src/form/field_bindings/RepeatFieldBinding.tsx +0 -143
  360. package/src/form/field_bindings/SelectFieldBinding.tsx +0 -111
  361. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +0 -521
  362. package/src/form/field_bindings/SwitchFieldBinding.tsx +0 -70
  363. package/src/form/field_bindings/TextFieldBinding.tsx +0 -189
  364. package/src/form/field_bindings/UserSelectFieldBinding.tsx +0 -71
  365. package/src/form/field_bindings/VectorFieldBinding.tsx +0 -209
  366. package/src/form/form_utils.ts +0 -243
  367. package/src/form/index.tsx +0 -36
  368. package/src/form/useClearRestoreValue.tsx +0 -36
  369. package/src/form/useUndoableDiscard.ts +0 -39
  370. package/src/form/validation.ts +0 -583
  371. package/src/hooks/index.ts +0 -16
  372. package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +0 -22
  373. package/src/hooks/navigation/contexts/NavigationStateContext.tsx +0 -16
  374. package/src/hooks/navigation/contexts/UrlContext.tsx +0 -24
  375. package/src/hooks/navigation/contexts/index.ts +0 -14
  376. package/src/hooks/navigation/useAsyncResolver.ts +0 -100
  377. package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +0 -218
  378. package/src/hooks/navigation/useBuildNavigationStateController.tsx +0 -134
  379. package/src/hooks/navigation/useBuildUrlController.tsx +0 -66
  380. package/src/hooks/navigation/useNavigationResolution.ts +0 -271
  381. package/src/hooks/navigation/useResolvedCollections.ts +0 -102
  382. package/src/hooks/navigation/useResolvedViews.tsx +0 -139
  383. package/src/hooks/navigation/useTopLevelNavigation.ts +0 -273
  384. package/src/hooks/navigation/utils.ts +0 -200
  385. package/src/hooks/useAdminContext.tsx +0 -83
  386. package/src/hooks/useBreadcrumbsController.tsx +0 -17
  387. package/src/hooks/useBuildSideDialogsController.tsx +0 -145
  388. package/src/hooks/useBuildSidePanel.tsx +0 -315
  389. package/src/hooks/useChildViewSource.ts +0 -46
  390. package/src/hooks/useEntityDisplay.tsx +0 -262
  391. package/src/hooks/useEntityDisplayTitle.tsx +0 -49
  392. package/src/hooks/useHistory.ts +0 -178
  393. package/src/hooks/useRecordActions.tsx +0 -69
  394. package/src/hooks/useResolvedNavigationFrom.tsx +0 -167
  395. package/src/hooks/useResolvedUsers.ts +0 -148
  396. package/src/hooks/useSelectionDialog.tsx +0 -58
  397. package/src/hooks/useSideDialogsController.tsx +0 -25
  398. package/src/hooks/useSidePanel.tsx +0 -13
  399. package/src/index.ts +0 -124
  400. package/src/preview/PropertyPreview.tsx +0 -331
  401. package/src/preview/compact_text.ts +0 -68
  402. package/src/preview/components/ArrayEnumPreview.tsx +0 -39
  403. package/src/preview/components/BooleanPreview.tsx +0 -28
  404. package/src/preview/components/DatePreview.tsx +0 -106
  405. package/src/preview/components/EmptyValue.tsx +0 -10
  406. package/src/preview/components/EnumValuesChip.tsx +0 -39
  407. package/src/preview/components/ImagePreview.tsx +0 -144
  408. package/src/preview/components/InlineEntityListPreview.tsx +0 -42
  409. package/src/preview/components/ReferencePreview.tsx +0 -235
  410. package/src/preview/components/RelationPreview.tsx +0 -271
  411. package/src/preview/components/StorageThumbnail.tsx +0 -147
  412. package/src/preview/components/UrlComponentPreview.tsx +0 -116
  413. package/src/preview/components/UserPreview.tsx +0 -30
  414. package/src/preview/components/date_fns_locales.ts +0 -125
  415. package/src/preview/index.ts +0 -26
  416. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +0 -73
  417. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +0 -67
  418. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +0 -77
  419. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +0 -49
  420. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +0 -70
  421. package/src/preview/property_previews/ArrayOneOfPreview.tsx +0 -79
  422. package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +0 -35
  423. package/src/preview/property_previews/ArrayPropertyPreview.tsx +0 -79
  424. package/src/preview/property_previews/MapPropertyPreview.tsx +0 -198
  425. package/src/preview/property_previews/NumberPropertyPreview.tsx +0 -39
  426. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +0 -276
  427. package/src/preview/property_previews/StringPropertyPreview.tsx +0 -70
  428. package/src/preview/util.ts +0 -39
  429. package/src/routes/CustomViewRoute.tsx +0 -33
  430. package/src/routes/RebaseRoute.tsx +0 -467
  431. package/src/routes/index.ts +0 -2
  432. package/src/types/components/EntityFormActionsProps.tsx +0 -20
  433. package/src/types/components/EntityFormProps.tsx +0 -119
  434. package/src/types/components/PropertyPreviewProps.tsx +0 -85
  435. package/src/types/components/formex.tsx +0 -2
  436. package/src/types/components/index.ts +0 -3
  437. package/src/types/fields.tsx +0 -340
  438. package/src/types/index.ts +0 -4
  439. package/src/util/dataControllerAdapter.ts +0 -88
  440. package/src/util/entity_actions.ts +0 -28
  441. package/src/util/index.ts +0 -5
  442. package/src/util/navigation_utils.ts +0 -89
  443. package/src/util/number_format.ts +0 -46
  444. package/src/util/previews.ts +0 -131
  445. package/src/util/propertyConfigMapper.ts +0 -134
  446. package/src/util/property_utils.tsx +0 -236
  447. package/src/util/resolutions.ts +0 -96
  448. package/src/util/view_constants.ts +0 -33
  449. package/src/util/view_mode.ts +0 -176
@@ -1,17 +1,18 @@
1
+ import { n as getThumbnailMeasure, r as sanitizeUrl, t as getPreviewSizeFrom } from "./util-CfLFggP7.js";
1
2
  import * as React$1 from "react";
2
3
  import React, { Suspense, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
3
4
  import { deepEqual } from "fast-equals";
4
5
  import { Alert, AlertCircleIcon, AlertTriangleIcon, AlignLeftIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightToLineIcon, ArrowUpDownIcon, ArrowUpIcon, Badge, BooleanSwitchWithLabel, Button, CHIP_COLORS, CHIP_SEED_KEYS, CalendarIcon, Card, CardView, CenteredView, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, Chip, CircleIcon, CircularProgress, CircularProgressCenter, CodeIcon, Collapse, ColumnsIcon, CopyIcon, DateTimeField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FilterXIcon, FlagIcon, FolderUpIcon, FunctionSquareIcon, GlobeIcon, HandleIcon, HashIcon, HistoryIcon, IconButton, ImageOffIcon, KanbanIcon, KanbanView, KeyRoundIcon, Label, LayoutGridIcon, Link2Icon, LinkIcon, ListIcon, ListOrderedIcon, ListView, LoadingButton, LucideIconByName, MailIcon, Markdown, Maximize2Icon, Menu, MenuItem, MinusIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, PanelLeftCloseIcon, PanelLeftOpenIcon, PencilIcon, PlusIcon, Popover, PopoverPrimitive, Portal, QuoteIcon, RadioGroup, RadioGroupItem, RefreshCwIcon, RepeatIcon, ResizablePanels, Rows3Icon, SearchBar, SearchIcon, Select, SelectItem, Separator, SettingsIcon, Sheet, Skeleton, Tab, Table, TableBody, TableCell, TableHeader, TableIcon, TableRow, Tabs, TextField, TextIcon, TextareaAutosize, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, Unlink2Icon, UploadIcon, UserIcon, VirtualTable, VirtualTableDateField, VirtualTableInput, VirtualTableInput as VirtualTableInput$1, VirtualTableNumberInput, VirtualTableSwitch, VoteIcon, XCircleIcon, XIcon, cls, coolIconKeys, createVirtualTableSelectionStore, debounce, defaultBorderMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, fieldBackgroundInvisibleMixin, fieldBackgroundMixin, focusedDisabled, getColorSchemeForSeed, iconSize, lazyChunk, paperMixin, useDebouncedCallback, useOutsideAlerter, usePortalContainer } from "@rebasepro/ui";
5
6
  import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getEntityChildViews, getLabelOrConfigFrom, getReferenceFrom, getRelationFrom, getRelationTargetPath, getSubcollections, getTableName, isPropertyBuilder, normalizeOrderBy, normalizeToEntityRelation, resolveArrayProperties, resolveEnumValues, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource, serializeOrderBy } from "@rebasepro/common";
6
- import { CONTAINER_FULL_WIDTH, CollectionScopeProvider, DEFAULT_PAGE_SIZE, EntityDisplayCache, ErrorTooltip, ErrorView, IconForView, PluginProviderStack, SIDE_PANEL_DEFAULT_WIDTH, StorageSourceContext, UnsavedChangesDialog, UserDisplay, addInitialSlash, apiBaseOf, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, entityDisplayKey, flattenKeys, getAdminEntityChildViews, getCollectionBySlugWithin, getCollectionPathsCombinations, getColorScheme, getColumnKeysForProperty, getDisplayPropertyKey, getDisplayResolver, getEntityFromCache, getEntityFromMemoryCache, getEntityImagePreviewPropertyKey, getEntityPreviewKeys, getFormFieldKeys, getIcon, getLastSegment as getLastSegment$1, getLeadingRelationTitleKey, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getPropertyInPath, getRedundantChildViewColumnIds, getRelationIncludeParams, getRowHeight, getTitlePropertyCandidates, getTitlePropertyKey, getTitlePropertyKeyForValues, hasDeclaredDisplay, iconsSearch, isDisabled, isFilterableRelation, isHidden, isReadOnly, looksLikeIdentifierValue, removeEntityFromCache, removeEntityFromMemoryCache, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, removeTrailingSlash as removeTrailingSlash$1, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveComponentRef, resolveDefaultSelectedView, resolveFilterOperators, resolveFormLayout, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAnalyticsController, useApiBase, useApiConfig, useAuthController, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataTableController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseClient, useRebaseContext, useRelationSelector, useResolvedComponent, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/app";
7
+ import { CONTAINER_FULL_WIDTH, CollectionScopeProvider, DEFAULT_PAGE_SIZE, EntityDisplayCache, ErrorTooltip, ErrorView, IconForView, PluginProviderStack, SIDE_PANEL_DEFAULT_WIDTH, StorageSourceContext, UnsavedChangesDialog, UserDisplay, addInitialSlash, apiBaseOf, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, entityDisplayKey, flattenKeys, getAdminEntityChildViews, getCollectionBySlugWithin, getCollectionPathsCombinations, getColorScheme, getColumnKeysForProperty, getDisplayPropertyKey, getDisplayResolver, getEntityFromCache, getEntityFromMemoryCache, getEntityImagePreviewPropertyKey, getEntityPreviewKeys, getFormFieldKeys, getIcon, getLastSegment as getLastSegment$1, getLeadingRelationTitleKey, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getPropertyInPath, getRedundantChildViewColumnIds, getRelationIncludeParams, getRowHeight, getTitlePropertyCandidates, getTitlePropertyKey, getTitlePropertyKeyForValues, hasDeclaredDisplay, iconsSearch, isDisabled, isFilterableRelation, isHidden, isReadOnly, looksLikeIdentifierValue, removeEntityFromCache, removeEntityFromMemoryCache, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, removeTrailingSlash as removeTrailingSlash$1, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveComponentRef, resolveDefaultSelectedView, resolveFilterOperators, resolveFormLayout, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAnalyticsController, useApiBase, useApiConfig, useAuthController, useBridgeRegistration, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataTableController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseClient, useRebaseContext, useRelationSelector, useResolvedComponent, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/app";
7
8
  import { Field, Formex, getIn, setIn, useCreateFormex, useFormex } from "@rebasepro/forms";
8
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- import { defaultDateFormat, formatRelativeTime, getHashValue, getValueInPath, hydrateRegExp, isArrayValue, isObject, isPrototypePollutingKey, mergeDeep, pathTraversesPrototype, randomString, readStoredJson, toArray, writeStoredJson } from "@rebasepro/utils";
10
+ import { EntityReference, EntityRelation, GeoPoint, MAX_LIST_LIMIT, Vector, getCollectionDataPath, getDataSourceCapabilities, isRelationalCollectionConfig, resourceKeyOf } from "@rebasepro/types";
11
+ import { defaultDateFormat, formatRelativeTime, getHashValue, getValueInPath, hydrateRegExp, isArrayValue, isObject, isPrototypePollutingKey, mergeDeep, pathTraversesPrototype, prettifyIdentifier, randomString, readStoredJson, toArray, writeStoredJson } from "@rebasepro/utils";
10
12
  import { resolveAdminCollection } from "@rebasepro/cms-types";
11
13
  import { format } from "date-fns";
12
14
  import { Command } from "cmdk";
13
15
  import { useDropzone } from "react-dropzone";
14
- import { EntityReference, EntityRelation, GeoPoint, MAX_LIST_LIMIT, Vector, getCollectionDataPath, getDataSourceCapabilities, isRelationalCollectionConfig } from "@rebasepro/types";
15
16
  import { z } from "zod";
16
17
  import useMeasure from "react-use-measure";
17
18
  import { Link, useLocation, useNavigate, useSearchParams } from "react-router";
@@ -577,30 +578,6 @@ function EmptyValue({ className }) {
577
578
  return /* @__PURE__ */ jsx("div", { className: "rounded-full bg-surface-200 bg-opacity-30 bg-surface-200/30 dark:bg-opacity-20 dark:bg-surface-200/20 w-5 h-2 inline-block" });
578
579
  }
579
580
  //#endregion
580
- //#region src/preview/util.ts
581
- function sanitizeUrl(url) {
582
- if (!url) return "about:blank";
583
- const trimmed = url.trim();
584
- if (/^(?:javascript|data|vbscript):/i.test(trimmed)) return "about:blank";
585
- return trimmed;
586
- }
587
- function getThumbnailMeasure(size) {
588
- if (size === "small") return 40;
589
- else if (size === "medium") return 100;
590
- else if (size === "large") return 200;
591
- else throw Error("Thumbnail size not mapped");
592
- }
593
- function getPreviewSizeFrom(size) {
594
- switch (size) {
595
- case "xs":
596
- case "s": return "small";
597
- case "m": return "medium";
598
- case "l":
599
- case "xl": return "large";
600
- default: throw Error("Missing mapping value in getPreviewSizeFrom: " + size);
601
- }
602
- }
603
- //#endregion
604
581
  //#region src/preview/components/ImagePreview.tsx
605
582
  /**
606
583
  * @group Preview components
@@ -3181,7 +3158,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
3181
3158
  content = /* @__PURE__ */ jsx(StorageThumbnail, {
3182
3159
  interactive,
3183
3160
  storeUrl: property.storage?.storeUrl ?? false,
3184
- storageSourceKey: stringProperty.storage.storageSource,
3161
+ storageSourceKey: stringProperty.storage.storageSource === void 0 ? void 0 : resourceKeyOf(stringProperty.storage.storageSource),
3185
3162
  size: props.size,
3186
3163
  fill,
3187
3164
  storagePathOrDownloadUrl: filePath
@@ -3461,11 +3438,12 @@ function FieldHelperText({ error, showError, property, includeDescription = true
3461
3438
  * Render the label of with an icon and the title of a property
3462
3439
  * @group Form custom fields
3463
3440
  */
3464
- var LabelWithIcon = forwardRef(({ icon, title, small, className, required }, ref) => {
3441
+ var LabelWithIcon = forwardRef(({ icon, title, small, className, required, labelId }, ref) => {
3465
3442
  return /* @__PURE__ */ jsxs("div", {
3466
3443
  ref,
3467
3444
  className: cls("align-middle inline-flex items-center my-0.5", small ? "gap-1" : "gap-2", className),
3468
3445
  children: [icon, /* @__PURE__ */ jsx("span", {
3446
+ id: labelId,
3469
3447
  className: `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`,
3470
3448
  children: (title ?? "") + (required ? " *" : "")
3471
3449
  })]
@@ -5429,6 +5407,20 @@ function RelationSelectorBindingComponent({ propertyKey, internalValue, updateVa
5429
5407
  //#endregion
5430
5408
  //#region src/form/validation.ts
5431
5409
  /** Whether an authored relation yields many rows. Derived from its kind. */
5410
+ /**
5411
+ * What to call this field in a validation message.
5412
+ *
5413
+ * `property.name` is the author's label and is optional — a headless project has
5414
+ * no panel and no reason to invent display names. Every message here
5415
+ * interpolated it directly, so an unnamed property produced
5416
+ * "undefined must be min 3 characters long" in front of a user.
5417
+ *
5418
+ * The fallback is the field's own key, prettified the same way the panel derives
5419
+ * a column header, so the message names the field the author would recognise.
5420
+ */
5421
+ function fieldLabel$1(property, name) {
5422
+ return property.name ?? (name ? prettifyIdentifier(name) : "This field");
5423
+ }
5432
5424
  function relationCardinality$1(relation) {
5433
5425
  if (!relation) return void 0;
5434
5426
  if (relation.kind === "via") return relation.cardinality;
@@ -5506,8 +5498,8 @@ function getZodStringSchema({ property, parentProperty, customFieldValidator, na
5506
5498
  }
5507
5499
  if (isRequired && !property.enum) schema = schema.refine((value) => value !== void 0 && value !== null && value !== "", { message: validation?.requiredMessage ? validation.requiredMessage : "Required" });
5508
5500
  if (validation) {
5509
- if (validation.min || validation.min === 0) schema = schema.refine((value) => value == null || typeof value === "string" && value.length >= validation.min, { message: `${property.name} must be min ${validation.min} characters long` });
5510
- if (validation.max || validation.max === 0) schema = schema.refine((value) => value == null || typeof value === "string" && value.length <= validation.max, { message: `${property.name} must be max ${validation.max} characters long` });
5501
+ if (validation.min || validation.min === 0) schema = schema.refine((value) => value == null || typeof value === "string" && value.length >= validation.min, { message: `${fieldLabel$1(property, name)} must be min ${validation.min} characters long` });
5502
+ if (validation.max || validation.max === 0) schema = schema.refine((value) => value == null || typeof value === "string" && value.length <= validation.max, { message: `${fieldLabel$1(property, name)} must be max ${validation.max} characters long` });
5511
5503
  if (validation.matches) {
5512
5504
  const regExp = typeof validation.matches === "string" ? hydrateRegExp(validation.matches) : validation.matches;
5513
5505
  if (regExp) schema = schema.refine((value) => value == null || typeof value === "string" && regExp.test(value), { message: validation.matchesMessage ?? "Invalid format" });
@@ -5515,7 +5507,7 @@ function getZodStringSchema({ property, parentProperty, customFieldValidator, na
5515
5507
  if (validation.trim) schema = z.preprocess((v) => typeof v === "string" ? v.trim() : v, schema);
5516
5508
  if (validation.lowercase) schema = z.preprocess((v) => typeof v === "string" ? v.toLowerCase() : v, schema);
5517
5509
  if (validation.uppercase) schema = z.preprocess((v) => typeof v === "string" ? v.toUpperCase() : v, schema);
5518
- if (property.email) schema = schema.refine((value) => value == null || typeof value === "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value), { message: `${property.name} must be an email` });
5510
+ if (property.email) schema = schema.refine((value) => value == null || typeof value === "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value), { message: `${fieldLabel$1(property, name)} must be an email` });
5519
5511
  if (property.url) if (!property.storage || property.storage?.storeUrl) schema = schema.refine((value) => {
5520
5512
  if (value == null) return true;
5521
5513
  try {
@@ -5524,8 +5516,8 @@ function getZodStringSchema({ property, parentProperty, customFieldValidator, na
5524
5516
  } catch {
5525
5517
  return false;
5526
5518
  }
5527
- }, { message: `${property.name} must be a url` });
5528
- else console.warn(`Property ${property.name} has a url validation but its storage configuration is not set to store urls`);
5519
+ }, { message: `${fieldLabel$1(property, name)} must be a url` });
5520
+ else console.warn(`Property ${fieldLabel$1(property, name)} has a url validation but its storage configuration is not set to store urls`);
5529
5521
  }
5530
5522
  return schema;
5531
5523
  }
@@ -5539,13 +5531,13 @@ function getZodNumberSchema({ property, parentProperty, customFieldValidator, na
5539
5531
  }, z.number({ error: "Must be a number" }).nullable());
5540
5532
  if (validation?.required || property.isId === true || property.isId === "manual") schema = schema.refine((value) => value !== void 0 && value !== null, { message: validation?.requiredMessage ? validation.requiredMessage : "Required" });
5541
5533
  if (validation) {
5542
- if (validation.min || validation.min === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value >= validation.min, { message: `${property.name} must be higher or equal to ${validation.min}` });
5543
- if (validation.max || validation.max === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value <= validation.max, { message: `${property.name} must be lower or equal to ${validation.max}` });
5544
- if (validation.lessThan || validation.lessThan === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value < validation.lessThan, { message: `${property.name} must be higher than ${validation.lessThan}` });
5545
- if (validation.moreThan || validation.moreThan === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value > validation.moreThan, { message: `${property.name} must be lower than ${validation.moreThan}` });
5546
- if (validation.positive) schema = schema.refine((value) => value == null || typeof value === "number" && value > 0, { message: `${property.name} must be positive` });
5547
- if (validation.negative) schema = schema.refine((value) => value == null || typeof value === "number" && value < 0, { message: `${property.name} must be negative` });
5548
- if (validation.integer) schema = schema.refine((value) => value == null || typeof value === "number" && Number.isInteger(value), { message: `${property.name} must be an integer` });
5534
+ if (validation.min || validation.min === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value >= validation.min, { message: `${fieldLabel$1(property, name)} must be higher or equal to ${validation.min}` });
5535
+ if (validation.max || validation.max === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value <= validation.max, { message: `${fieldLabel$1(property, name)} must be lower or equal to ${validation.max}` });
5536
+ if (validation.lessThan || validation.lessThan === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value < validation.lessThan, { message: `${fieldLabel$1(property, name)} must be higher than ${validation.lessThan}` });
5537
+ if (validation.moreThan || validation.moreThan === 0) schema = schema.refine((value) => value == null || typeof value === "number" && value > validation.moreThan, { message: `${fieldLabel$1(property, name)} must be lower than ${validation.moreThan}` });
5538
+ if (validation.positive) schema = schema.refine((value) => value == null || typeof value === "number" && value > 0, { message: `${fieldLabel$1(property, name)} must be positive` });
5539
+ if (validation.negative) schema = schema.refine((value) => value == null || typeof value === "number" && value < 0, { message: `${fieldLabel$1(property, name)} must be negative` });
5540
+ if (validation.integer) schema = schema.refine((value) => value == null || typeof value === "number" && Number.isInteger(value), { message: `${fieldLabel$1(property, name)} must be an integer` });
5549
5541
  }
5550
5542
  return schema;
5551
5543
  }
@@ -5561,8 +5553,8 @@ function getZodDateSchema({ property, parentProperty, customFieldValidator, name
5561
5553
  const validation = property.validation;
5562
5554
  if (validation) {
5563
5555
  if (validation.required) schema = schema.refine((value) => value !== void 0 && value !== null, { message: validation?.requiredMessage ? validation.requiredMessage : "Required" });
5564
- if (validation.min) schema = schema.refine((value) => value == null || value instanceof Date && value >= validation.min, { message: `${property.name} must be after ${validation.min}` });
5565
- if (validation.max) schema = schema.refine((value) => value == null || value instanceof Date && value <= validation.max, { message: `${property.name} must be before ${validation.min}` });
5556
+ if (validation.min) schema = schema.refine((value) => value == null || value instanceof Date && value >= validation.min, { message: `${fieldLabel$1(property, name)} must be after ${validation.min}` });
5557
+ if (validation.max) schema = schema.refine((value) => value == null || value instanceof Date && value <= validation.max, { message: `${fieldLabel$1(property, name)} must be before ${validation.min}` });
5566
5558
  }
5567
5559
  return schema;
5568
5560
  }
@@ -5640,18 +5632,18 @@ function getZodArraySchema({ property, parentProperty, customFieldValidator, nam
5640
5632
  }
5641
5633
  const arrayUniqueFields = hasUniqueInArrayModifier(property.of);
5642
5634
  if (arrayUniqueFields) {
5643
- if (typeof arrayUniqueFields === "boolean") arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values).size, { message: `${property.name} should have unique values within the array` });
5635
+ if (typeof arrayUniqueFields === "boolean") arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values).size, { message: `${fieldLabel$1(property, name)} should have unique values within the array` });
5644
5636
  else if (Array.isArray(arrayUniqueFields)) arrayUniqueFields.forEach(([fieldName, childProperty]) => {
5645
- arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values.map((v) => v && typeof v === "object" ? v[fieldName] : v)).size, { message: `${property.name} → ${childProperty.name ?? fieldName}: should have unique values within the array` });
5637
+ arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values.map((v) => v && typeof v === "object" ? v[fieldName] : v)).size, { message: `${fieldLabel$1(property, name)} → ${childProperty.name ?? fieldName}: should have unique values within the array` });
5646
5638
  });
5647
5639
  }
5648
5640
  }
5649
5641
  const validation = property.validation;
5650
5642
  if (validation) {
5651
5643
  if (validation.required) arraySchema = arraySchema.refine((value) => value !== void 0 && value !== null && Array.isArray(value) && value.length > 0, { message: validation?.requiredMessage ? validation.requiredMessage : "Required" });
5652
- if (validation.min || validation.min === 0) arraySchema = arraySchema.refine((value) => !value || !Array.isArray(value) || value.length >= validation.min, { message: `${property.name} should be min ${validation.min} entries long` });
5653
- if (validation.max) arraySchema = arraySchema.refine((value) => !value || !Array.isArray(value) || value.length <= validation.max, { message: `${property.name} should be max ${validation.max} entries long` });
5654
- if (validation.uniqueInArray) arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values).size, { message: `${property.name} should have unique values within the array` });
5644
+ if (validation.min || validation.min === 0) arraySchema = arraySchema.refine((value) => !value || !Array.isArray(value) || value.length >= validation.min, { message: `${fieldLabel$1(property, name)} should be min ${validation.min} entries long` });
5645
+ if (validation.max) arraySchema = arraySchema.refine((value) => !value || !Array.isArray(value) || value.length <= validation.max, { message: `${fieldLabel$1(property, name)} should be max ${validation.max} entries long` });
5646
+ if (validation.uniqueInArray) arraySchema = arraySchema.refine((values) => !values || !Array.isArray(values) || values.length === new Set(values).size, { message: `${fieldLabel$1(property, name)} should have unique values within the array` });
5655
5647
  }
5656
5648
  return arraySchema;
5657
5649
  }
@@ -9163,6 +9155,13 @@ var ConfigControllerProvider = React.memo(function ConfigControllerProvider({ ch
9163
9155
  authController.user,
9164
9156
  collectionConfigController.collections
9165
9157
  ]);
9158
+ useBridgeRegistration("schemaEditing", useMemo(() => ({
9159
+ available: !collectionConfigController.readOnly,
9160
+ updateCollection: (collectionId, patch) => collectionConfigController.updateCollection({
9161
+ id: collectionId,
9162
+ collectionData: patch
9163
+ })
9164
+ }), [collectionConfigController]));
9166
9165
  const onFetchTableMetadata = useCallback(async (tableName) => {
9167
9166
  return databaseAdmin?.fetchTableMetadata?.(tableName);
9168
9167
  }, [databaseAdmin]);
@@ -9427,8 +9426,8 @@ function EditorCollectionAction({ path, parentCollectionSlugs, parentEntityIds,
9427
9426
  }
9428
9427
  //#endregion
9429
9428
  //#region src/components/CollectionViewBinding/CollectionViewActions.tsx
9430
- var ImportCollectionAction = lazyChunk(() => import("./import-D25x7ko-.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
9431
- var ExportCollectionAction = lazyChunk(() => import("./export-Ben8E355.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
9429
+ var ImportCollectionAction = lazyChunk(() => import("./import-DTkXNoBg.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
9430
+ var ExportCollectionAction = lazyChunk(() => import("./export--arni_VY.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
9432
9431
  function CollectionViewActions({ collection, relativePath, parentCollectionSlugs, parentEntityIds, onNewClick, onAddExistingClick, onMultipleDeleteClick, selectionEnabled, path, selectionController, tableController, collectionEntitiesCount, compact, children, openNewDocument }) {
9433
9432
  const context = useAdminContext();
9434
9433
  const { canCreate, canDelete } = usePermissions();
@@ -11776,7 +11775,7 @@ function JsonPreviewBinding({ values }) {
11776
11775
  }
11777
11776
  //#endregion
11778
11777
  //#region src/components/EntityInspector.tsx
11779
- var EntityHistoryView = lazyChunk(() => import("./history-DIEVd26f.js").then((m) => ({ default: m.EntityHistoryView })));
11778
+ var EntityHistoryView = lazyChunk(() => import("./history-C2TpoQwi.js").then((m) => ({ default: m.EntityHistoryView })));
11780
11779
  /**
11781
11780
  * Raw values and revision history, as an inspector rather than as tabs.
11782
11781
  *
@@ -12974,9 +12973,9 @@ function useBoardDataController({ fullPath, collection, columnProperty, columns,
12974
12973
  if (isBEmpty) return -1;
12975
12974
  return valA < valB ? -1 : valA > valB ? 1 : 0;
12976
12975
  });
12977
- if (currentCollection.callbacks?.afterRead) try {
12976
+ if (currentCollection.browserCallbacks?.afterRead) try {
12978
12977
  processed = await Promise.all(processed.map(async (entity) => {
12979
- const processedRow = await currentCollection.callbacks.afterRead({
12978
+ const processedRow = await currentCollection.browserCallbacks.afterRead({
12980
12979
  collection: currentCollection,
12981
12980
  path: currentResolvedPath,
12982
12981
  row: {
@@ -14011,7 +14010,7 @@ function ViewModeToggle({ viewMode = "table", onViewModeChange, enabledViews = A
14011
14010
  }
14012
14011
  //#endregion
14013
14012
  //#region src/components/DeleteEntityDialog.tsx
14014
- function DeleteEntityDialog({ entityOrEntitiesToDelete, collection, onClose, open, callbacks, onEntityDelete, onMultipleEntitiesDelete, path, variant = "delete" }) {
14013
+ function DeleteEntityDialog({ entityOrEntitiesToDelete, collection, onClose, open, onEntityDelete, onMultipleEntitiesDelete, path, variant = "delete" }) {
14015
14014
  useAuthController();
14016
14015
  const dataClient = useData();
14017
14016
  useCustomizationController();
@@ -14040,14 +14039,12 @@ function DeleteEntityDialog({ entityOrEntitiesToDelete, collection, onClose, ope
14040
14039
  data: dataClient,
14041
14040
  entity,
14042
14041
  collection,
14043
- callbacks,
14044
14042
  onDeleteSuccess,
14045
14043
  onDeleteFailure,
14046
14044
  context
14047
14045
  }), [
14048
14046
  dataClient,
14049
14047
  collection,
14050
- callbacks,
14051
14048
  onDeleteSuccess,
14052
14049
  onDeleteFailure,
14053
14050
  context
@@ -14375,7 +14372,6 @@ function buildRemoveEntityAction({ key, name, icon, variant }) {
14375
14372
  entityOrEntitiesToDelete: entity,
14376
14373
  path,
14377
14374
  collection,
14378
- callbacks: collection.callbacks,
14379
14375
  variant,
14380
14376
  open,
14381
14377
  onEntityDelete: () => {
@@ -14426,7 +14422,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14426
14422
  const canSubmit = mode === "email" || password.length > 0 && passwordsMatch;
14427
14423
  const handleConfirm = async () => {
14428
14424
  if (mode === "manual" && !passwordsMatch) {
14429
- setError(t("passwords_dont_match") || "Passwords don't match");
14425
+ setError(t("passwords_dont_match", { defaultValue: "Passwords don't match" }));
14430
14426
  return;
14431
14427
  }
14432
14428
  setLoading(true);
@@ -14449,7 +14445,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14449
14445
  const data = await response.json();
14450
14446
  snackbarController.open({
14451
14447
  type: "success",
14452
- message: t("reset_password_success") || "Password reset successfully"
14448
+ message: t("reset_password_success", { defaultValue: "Password reset successfully" })
14453
14449
  });
14454
14450
  if (data.invitationSent || data.temporaryPassword) setCreationResult({
14455
14451
  user,
@@ -14459,7 +14455,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14459
14455
  });
14460
14456
  else onClose();
14461
14457
  } catch (e) {
14462
- setError(e instanceof Error ? e.message : t("error_resetting_password") || "Error resetting password");
14458
+ setError(e instanceof Error ? e.message : t("error_resetting_password", { defaultValue: "Error resetting password" }));
14463
14459
  } finally {
14464
14460
  setLoading(false);
14465
14461
  }
@@ -14479,7 +14475,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14479
14475
  /* @__PURE__ */ jsx(DialogTitle, {
14480
14476
  variant: "h5",
14481
14477
  gutterBottom: false,
14482
- children: t("reset_password") || "Reset Password"
14478
+ children: t("reset_password", { defaultValue: "Reset Password" })
14483
14479
  }),
14484
14480
  /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsxs("div", {
14485
14481
  className: "flex flex-col gap-4 py-2",
@@ -14502,7 +14498,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14502
14498
  id: "reset-password-mode-email"
14503
14499
  }), /* @__PURE__ */ jsx(Label, {
14504
14500
  htmlFor: "reset-password-mode-email",
14505
- children: t("reset_password_send_email") || "Send a password reset email"
14501
+ children: t("reset_password_send_email", { defaultValue: "Send a password reset email" })
14506
14502
  })]
14507
14503
  }), /* @__PURE__ */ jsxs("div", {
14508
14504
  className: "flex items-center gap-2",
@@ -14511,7 +14507,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14511
14507
  id: "reset-password-mode-manual"
14512
14508
  }), /* @__PURE__ */ jsx(Label, {
14513
14509
  htmlFor: "reset-password-mode-manual",
14514
- children: t("reset_password_set_manually") || "Set a password manually"
14510
+ children: t("reset_password_set_manually", { defaultValue: "Set a password manually" })
14515
14511
  })]
14516
14512
  })]
14517
14513
  }),
@@ -14521,7 +14517,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14521
14517
  value: password,
14522
14518
  autoFocus: true,
14523
14519
  autoComplete: "new-password",
14524
- label: t("new_password") || "New password",
14520
+ label: t("new_password", { defaultValue: "New Password" }),
14525
14521
  onChange: (e) => {
14526
14522
  setPassword(e.target.value);
14527
14523
  setError(null);
@@ -14532,7 +14528,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14532
14528
  value: confirmPassword,
14533
14529
  autoComplete: "new-password",
14534
14530
  error: confirmPassword.length > 0 && !passwordsMatch,
14535
- label: t("confirm_password") || "Confirm password",
14531
+ label: t("confirm_password", { defaultValue: "Confirm New Password" }),
14536
14532
  onChange: (e) => {
14537
14533
  setConfirmPassword(e.target.value);
14538
14534
  setError(null);
@@ -14541,7 +14537,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14541
14537
  /* @__PURE__ */ jsx(Typography, {
14542
14538
  variant: "caption",
14543
14539
  color: "secondary",
14544
- children: t("reset_password_set_manually_description") || "The password is updated immediately and no email is sent. Share it with the user securely."
14540
+ children: t("reset_password_set_manually_description", { defaultValue: "The password is updated immediately and no email is sent. Share it with the user securely." })
14545
14541
  })
14546
14542
  ] }),
14547
14543
  error && /* @__PURE__ */ jsx(Alert, {
@@ -14563,7 +14559,7 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
14563
14559
  onClick: handleConfirm,
14564
14560
  loading,
14565
14561
  disabled: !canSubmit,
14566
- children: t("reset_password") || "Reset Password"
14562
+ children: t("reset_password", { defaultValue: "Reset Password" })
14567
14563
  })] })
14568
14564
  ]
14569
14565
  });
@@ -16481,7 +16477,6 @@ var CollectionViewBindingInner = React.memo(function CollectionViewBindingInner(
16481
16477
  entityOrEntitiesToDelete: deleteEntityClicked,
16482
16478
  path,
16483
16479
  collection,
16484
- callbacks: collection.callbacks,
16485
16480
  open: Boolean(deleteEntityClicked),
16486
16481
  onEntityDelete: internalOnEntityDelete,
16487
16482
  onMultipleEntitiesDelete: internalOnMultipleEntitiesDelete,
@@ -17098,6 +17093,8 @@ function EditViewBinding({ entityId, ...props }) {
17098
17093
  }, [handoffKey]);
17099
17094
  const initialDirtyValues = carriesAsNew ? props.defaultValues ?? handoff.current.values : handoff.current.values;
17100
17095
  const { canEdit: canEditHook } = usePermissions();
17096
+ const { t } = useTranslation();
17097
+ const urlController = useUrlController();
17101
17098
  const [status, setStatus] = useState(props.copy ? "copy" : entityId ? "existing" : "new");
17102
17099
  const canEdit = useMemo(() => {
17103
17100
  if (status === "new" || status === "copy") return true;
@@ -17110,11 +17107,27 @@ function EditViewBinding({ entityId, ...props }) {
17110
17107
  props.path
17111
17108
  ]);
17112
17109
  if (!dataLoading && dataLoadingError) return /* @__PURE__ */ jsx(CenteredView, { children: /* @__PURE__ */ jsx(ErrorView, { error: dataLoadingError }) });
17113
- if (!dataLoading && !initialDirtyValues && !entity && (status === "existing" || status === "copy")) {
17114
- console.error(`Entity with id ${entityId} not found in collection ${props.path}`);
17115
- return /* @__PURE__ */ jsx(CenteredView, { children: /* @__PURE__ */ jsx(Typography, {
17116
- variant: "label",
17117
- children: "Entity not found"
17110
+ if (!dataLoading && !initialDirtyValues && !entity && !!entityId && (status === "existing" || status === "copy")) {
17111
+ console.warn(`Entity with id ${entityId} not found in collection ${props.path}`);
17112
+ return /* @__PURE__ */ jsx(CenteredView, { children: /* @__PURE__ */ jsxs("div", {
17113
+ className: "flex flex-col items-center gap-2 text-center",
17114
+ children: [
17115
+ /* @__PURE__ */ jsx(Typography, {
17116
+ variant: "label",
17117
+ children: t("entity_not_found")
17118
+ }),
17119
+ /* @__PURE__ */ jsx(Typography, {
17120
+ variant: "body2",
17121
+ color: "secondary",
17122
+ children: t("entity_not_found_body")
17123
+ }),
17124
+ /* @__PURE__ */ jsx(Button, {
17125
+ variant: "text",
17126
+ component: Link,
17127
+ to: urlController.buildUrlCollectionPath(props.path),
17128
+ children: t("back_to_collection", { name: props.collection.name ?? props.path })
17129
+ })
17130
+ ]
17118
17131
  }) });
17119
17132
  }
17120
17133
  const content = /* @__PURE__ */ jsx(EditViewBindingInner, {
@@ -18555,8 +18568,9 @@ function applyPluginModifyCollection(resolvedCollections, modifyCollection) {
18555
18568
  * adapters mount their own admin routes and may not implement
18556
18569
  * `POST /admin/users/:userId/reset-password`; injecting the action anyway
18557
18570
  * would show a button that can only ever 404.
18558
- * 2. **afterSave callback** — shows the `CreationResultDialog` when a new user
18559
- * is created with `invitationSent` or `temporaryPassword` in the response
18571
+ * 2. **browserCallbacks.afterSave** — shows the `CreationResultDialog` when a
18572
+ * new user is created with `invitationSent` or `temporaryPassword` in the
18573
+ * response
18560
18574
  *
18561
18575
  * Skips injection if the collection already has the action/callback present.
18562
18576
  */
@@ -18581,39 +18595,44 @@ function injectAuthCollectionConfig(collections, adminPasswordResetSupported) {
18581
18595
  entityActions: [...existing, injectedAction]
18582
18596
  };
18583
18597
  }
18584
- const existingAfterSave = result.callbacks?.afterSave;
18598
+ const existingAfterSave = result.browserCallbacks?.afterSave;
18599
+ const injectedAfterSave = {
18600
+ ...result.browserCallbacks,
18601
+ afterSave: (async (props) => {
18602
+ await existingAfterSave?.(props);
18603
+ const { values, status, context } = props;
18604
+ if (status !== "new" && status !== "copy") return;
18605
+ if (!(values.invitationSent !== void 0 || values.temporaryPassword !== void 0) || !isRebaseContext(context) || !context.dialogsController) return;
18606
+ const { dialogsController } = context;
18607
+ const creationResult = {
18608
+ user: {
18609
+ uid: String(props.id),
18610
+ email: typeof values.email === "string" ? values.email : "",
18611
+ displayName: typeof values.displayName === "string" ? values.displayName : "",
18612
+ roles: Array.isArray(values.roles) ? values.roles : [],
18613
+ photoURL: typeof values.photoURL === "string" ? values.photoURL : typeof values.photoUrl === "string" ? values.photoUrl : null,
18614
+ providerId: "password",
18615
+ isAnonymous: false
18616
+ },
18617
+ invitationSent: !!values.invitationSent,
18618
+ temporaryPassword: typeof values.temporaryPassword === "string" ? values.temporaryPassword : void 0,
18619
+ emailDeliveryFailed: !!values.emailDeliveryFailed
18620
+ };
18621
+ const { closeDialog } = dialogsController.open({
18622
+ key: "user_creation_result",
18623
+ Component: () => React.createElement(CreationResultDialog, {
18624
+ result: creationResult,
18625
+ onClose: () => closeDialog()
18626
+ })
18627
+ });
18628
+ })
18629
+ };
18585
18630
  result = {
18586
18631
  ...result,
18587
- callbacks: {
18588
- ...result.callbacks,
18589
- afterSave: async (props) => {
18590
- await existingAfterSave?.(props);
18591
- const { values, status, context } = props;
18592
- if (status !== "new" && status !== "copy") return;
18593
- if (!(values.invitationSent !== void 0 || values.temporaryPassword !== void 0) || !isRebaseContext(context) || !context.dialogsController) return;
18594
- const { dialogsController } = context;
18595
- const creationResult = {
18596
- user: {
18597
- uid: String(props.id),
18598
- email: typeof values.email === "string" ? values.email : "",
18599
- displayName: typeof values.displayName === "string" ? values.displayName : "",
18600
- roles: Array.isArray(values.roles) ? values.roles : [],
18601
- photoURL: typeof values.photoURL === "string" ? values.photoURL : typeof values.photoUrl === "string" ? values.photoUrl : null,
18602
- providerId: "password",
18603
- isAnonymous: false
18604
- },
18605
- invitationSent: !!values.invitationSent,
18606
- temporaryPassword: typeof values.temporaryPassword === "string" ? values.temporaryPassword : void 0,
18607
- emailDeliveryFailed: !!values.emailDeliveryFailed
18608
- };
18609
- const { closeDialog } = dialogsController.open({
18610
- key: "user_creation_result",
18611
- Component: () => React.createElement(CreationResultDialog, {
18612
- result: creationResult,
18613
- onClose: () => closeDialog()
18614
- })
18615
- });
18616
- }
18632
+ browserCallbacks: injectedAfterSave,
18633
+ admin: {
18634
+ ...result.admin,
18635
+ browserCallbacks: injectedAfterSave
18617
18636
  }
18618
18637
  };
18619
18638
  return result;
@@ -19899,6 +19918,7 @@ function BlockEntry({ name, index, value, typeField, valueField, properties, aut
19899
19918
  const value1 = fieldProps.field.value !== void 0 && fieldProps.field.value !== null ? fieldProps.field.value : "";
19900
19919
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Select, {
19901
19920
  className: "mb-2",
19921
+ "aria-label": t("type"),
19902
19922
  placeholder: /* @__PURE__ */ jsx(Typography, {
19903
19923
  variant: "caption",
19904
19924
  className: "px-4 py-2 font-medium",
@@ -20520,7 +20540,7 @@ function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, in
20520
20540
  const storage = property.storage;
20521
20541
  const storageSources = useStorageSources();
20522
20542
  const storageSource = useMemo(() => resolveStorageSource({
20523
- sourceKey: storage?.storageSource,
20543
+ sourceKey: storage?.storageSource === void 0 ? void 0 : resourceKeyOf(storage.storageSource),
20524
20544
  sources: storageSources.sources,
20525
20545
  defaultSource: defaultStorageSource
20526
20546
  }), [
@@ -20707,6 +20727,7 @@ function MultiSelectFieldBinding({ propertyKey, value, setValue, error, showErro
20707
20727
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MultiSelect, {
20708
20728
  className: "w-full",
20709
20729
  size,
20730
+ "aria-label": property.name ?? propertyKey,
20710
20731
  value: validValue ? value.map((v) => v?.toString()) : [],
20711
20732
  disabled,
20712
20733
  modalPopover: true,
@@ -20934,6 +20955,7 @@ function SelectFieldBinding({ propertyKey, value, setValue, error, showError, di
20934
20955
  }, [setValue]);
20935
20956
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Select, {
20936
20957
  value: value !== void 0 && value != null ? value.toString() : "",
20958
+ "aria-label": property.name ?? propertyKey,
20937
20959
  disabled,
20938
20960
  size,
20939
20961
  fullWidth: true,
@@ -21130,6 +21152,7 @@ function FileDropComponent({ storage, disabled, onFilesAdded, multipleFilesSuppo
21130
21152
  [ext]: []
21131
21153
  }), {}) : void 0,
21132
21154
  disabled: disabled || isDndItemDragging,
21155
+ multiple: multipleFilesSupported,
21133
21156
  noDragEventsBubbling: true,
21134
21157
  maxSize: storage.maxSize,
21135
21158
  onDrop: onFilesAdded,
@@ -24099,7 +24122,7 @@ function toSerializableStorageConfig(storage) {
24099
24122
  if (storage.includeBucketUrl !== void 0) result.includeBucketUrl = storage.includeBucketUrl;
24100
24123
  if (storage.storeUrl !== void 0) result.storeUrl = storage.storeUrl;
24101
24124
  if (storage.maxSize !== void 0) result.maxSize = storage.maxSize;
24102
- if (storage.storageSource !== void 0) result.storageSource = storage.storageSource;
24125
+ if (storage.storageSource !== void 0) result.storageSource = resourceKeyOf(storage.storageSource);
24103
24126
  return result;
24104
24127
  }
24105
24128
  /**
@@ -24825,8 +24848,7 @@ var DEFAULT_COLLECTION_GENERATION_ENDPOINT = "https://api.rebase.pro/collections
24825
24848
  *
24826
24849
  * @example
24827
24850
  * ```tsx
24828
- * import { RebaseCMS } from "@rebasepro/cms";
24829
- * import { buildCollectionGenerationCallback } from "@rebasepro/cms/collection_editor";
24851
+ * import { RebaseCMS, buildCollectionGenerationCallback } from "@rebasepro/cms";
24830
24852
  * import { useFirebaseAuthController } from "@rebasepro/firebase";
24831
24853
  *
24832
24854
  * const authController = useFirebaseAuthController({ firebaseApp });
@@ -24884,6 +24906,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
24884
24906
  return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
24885
24907
  }
24886
24908
  //#endregion
24887
- export { useBuildCollectionRegistryController as $, ArrayPropertyPreview as $n, getCollectionPathsCombinations as $t, getFieldId as A, BooleanPreview as An, flattenEntry as At, MapFieldBinding as B, ArrayOfReferencesPreview as Bn, parseCsvRows as Bt, EntityFormBinding as C, LabelWithIconAndTooltip as Cn, getIconForProperty as Cr, CollectionViewActions as Ct, getDefaultFieldConfig as D, PropertyPreview as Dn, getResolvedPropertyInPath as Dr, ImportNewPropertyFieldPreview as Dt, DEFAULT_FIELD_CONFIGS as E, ArrayOfMapsPreview as En, getPropertyInPath$1 as Er, useCollectionEditorDialogsState as Et, SelectFieldBinding as F, ArrayOfStringsPreview as Fn, IMPORT_BATCH_SIZE as Ft, useSelectionDialog as G, useSidePanel as Gn, FieldCaption as Gt, DateTimeFieldBinding as H, ReferencePreview as Hn, ArrayContainer as Ht, RepeatFieldBinding as I, ArrayPropertyEnumPreview as In, saveImportedEntities as It, useBuildUrlController as J, getUserLabel as Jn, resolveEntityAction as Jt, SelectionTableBinding as K, CollectionRegistryContext as Kn, useBreadcrumbsController as Kt, ReferenceFieldBinding as L, ArrayEnumPreview as Ln, ImportFileUpload as Lt, TextFieldBinding as M, KeyValuePreview as Mn, getInferenceType as Mt, SwitchFieldBinding as N, MapPropertyPreview as Nn, useImportConfig as Nt, getDefaultFieldId as O, UserPreview as On, isReferenceProperty as Or, DataNewPropertiesMapping as Ot, StorageUploadFieldBinding as P, ArrayOneOfPreview as Pn, ImportSaveInProgress as Pt, useResolvedCollections as Q, getEntityTitlePropertyKeyForEntity as Qn, getCollectionBySlugWithin as Qt, MultiSelectFieldBinding as R, ArrayOfStorageComponentsPreview as Rn, convertFileToJson as Rt, isSchemaChangeCancelled as S, ReadOnlyFieldBinding as Sn, getDefaultPropertiesOrder as Sr, EntityCardBinding as St, PropertyFieldBinding as T, FieldHelperText as Tn, getPropertiesWithPropertiesOrder as Tr, ConfigControllerProvider as Tt, BlockFieldBinding as U, EntityPreviewBinding as Un, PropertyConfigBadge as Ut, KeyValueFieldBinding as V, InlineEntityListPreview as Vn, parseCsvToObjects as Vt, ArrayOfReferencesFieldBinding as W, SidePanelControllerContext as Wn, SearchIconsView as Wt, useTopLevelNavigation as X, getEntityPreviewKeys as Xn, mergeEntityActions as Xt, useBuildNavigationStateController as Y, useResolvedUser as Yn, resolveEntityView as Yt, useResolvedViews as Z, getEntityTitlePropertyKey as Zn, addInitialSlash as Zt, useCollectionsConfigController as _, useSideDialogsController as _n, LABEL_ICON_SIZE as _r, resetPasswordAction as _t, namespaceToPropertiesPath as a, resolveOpenEntityMode as an, renderSkeletonCaptionText as ar, useBuildSidePanel as at, asUnavailable as b, ArrayCustomShapedFieldBinding as bn, PropertyIdCopyTooltip as br, EntityViewBinding as bt, buildCollectionGenerationCallback as c, VirtualTableInput$1 as cn, renderSkeletonText as cr, extractTouchedValues as ct, fromSerializableCollectionConfigs as d, CollectionRowActions as dn, sanitizeUrl as dr, removeEmptyContainers as dt, getLastSegment$1 as en, StringPropertyPreview as er, useHistory as et, fromSerializableProperties as f, useAdminContext as fn, EmptyValue as fr, zodToFormErrors as ft, toSerializableProperty as g, useNavigationStateController as gn, FieldBlock as gr, editEntityAction as gt, toSerializableProperties as h, NavigationStateContext as hn, RecordMeta as hr, deleteEntityAction as ht, namespaceToPropertiesOrderPath as i, resolveCollectionPathIds$1 as in, SkeletonPropertyComponent as ir, getEntityViewWidth as it, VectorFieldBinding as j, DatePreview as jn, processValueMapping as jt, getFieldConfig as k, NumberPropertyPreview as kn, isRelationProperty as kr, convertDataToEntity as kt, validateCollectionJson as l, CollectionTableBinding as ln, UrlComponentPreview as lr, getChanges as lt, toSerializableCollectionConfig as m, useUrlController as mn, FormRail as mr, copyEntityAction as mt, getFullIdPath as n, removeInitialSlash as nn, StorageThumbnail as nr, useResolvedNavigationFrom as nt, CollectionGenerationApiError as o, resolveViewMode as on, renderSkeletonIcon as or, EditViewBinding as ot, fromSerializableProperty as p, UrlContext as pn, FormSections as pr, CollectionViewBinding as pt, SideDialogs as q, useCollectionRegistryController as qn, BreadcrumbsProvider as qt, idToPropertiesPath as r, removeTrailingSlash$1 as rn, StorageThumbnailInternal as rr, buildSidePanelsFromUrl as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, useSelectionController as sn, renderSkeletonImageThumbnail as sr, useSafeSnackbarController as st, getFullId as t, removeInitialAndTrailingSlashes$1 as tn, EnumValuesChip as tr, resolveNavigationFrom as tt, fromSerializableCollectionConfig as u, SelectableTable as un, ImagePreview as ur, getInitialEntityValues as ut, LiveSchemaError as v, SideDialogsControllerContext as vn, isSelfLabellingProperty as vr, CreationResultDialog as vt, EntityForm as w, LabelWithIcon as wn, getIconForWidget as wr, useCollectionEditorController as wt, createLiveSchemaClient as x, useClearRestoreValue as xn, getBracketNotation as xr, CollectionCardViewBinding as xt, SchemaChangeCancelled as y, SelectableTableContext as yn, spanClass as yr, DetailViewBinding as yt, MarkdownEditorFieldBinding as z, RelationPreview as zn, detectCsvDelimiter as zt };
24909
+ export { NAVIGATION_DEFAULT_GROUP_NAME as $, getEntityTitlePropertyKeyForEntity as $n, getCollectionBySlugWithin as $t, getFieldId as A, NumberPropertyPreview as An, convertDataToEntity as At, MapFieldBinding as B, RelationPreview as Bn, detectCsvDelimiter as Bt, EntityFormBinding as C, ReadOnlyFieldBinding as Cn, getIconForProperty as Cr, EntityCardBinding as Ct, getDefaultFieldConfig as D, ArrayOfMapsPreview as Dn, getResolvedPropertyInPath as Dr, useCollectionEditorDialogsState as Dt, DEFAULT_FIELD_CONFIGS as E, FieldHelperText as En, getPropertyInPath$1 as Er, ConfigControllerProvider as Et, SelectFieldBinding as F, ArrayOneOfPreview as Fn, ImportSaveInProgress as Ft, useSelectionDialog as G, SidePanelControllerContext as Gn, SearchIconsView as Gt, DateTimeFieldBinding as H, InlineEntityListPreview as Hn, parseCsvToObjects as Ht, RepeatFieldBinding as I, ArrayOfStringsPreview as In, IMPORT_BATCH_SIZE as It, useBuildUrlController as J, useCollectionRegistryController as Jn, BreadcrumbsProvider as Jt, SelectionTableBinding as K, useSidePanel as Kn, FieldCaption as Kt, ReferenceFieldBinding as L, ArrayPropertyEnumPreview as Ln, saveImportedEntities as Lt, TextFieldBinding as M, DatePreview as Mn, processValueMapping as Mt, SwitchFieldBinding as N, KeyValuePreview as Nn, getInferenceType as Nt, getDefaultFieldId as O, PropertyPreview as On, isReferenceProperty as Or, ImportNewPropertyFieldPreview as Ot, StorageUploadFieldBinding as P, MapPropertyPreview as Pn, useImportConfig as Pt, useResolvedCollections as Q, getEntityTitlePropertyKey as Qn, addInitialSlash as Qt, MultiSelectFieldBinding as R, ArrayEnumPreview as Rn, ImportFileUpload as Rt, isSchemaChangeCancelled as S, useClearRestoreValue as Sn, getDefaultPropertiesOrder as Sr, CollectionCardViewBinding as St, PropertyFieldBinding as T, LabelWithIcon as Tn, getPropertiesWithPropertiesOrder as Tr, useCollectionEditorController as Tt, BlockFieldBinding as U, ReferencePreview as Un, ArrayContainer as Ut, KeyValueFieldBinding as V, ArrayOfReferencesPreview as Vn, parseCsvRows as Vt, ArrayOfReferencesFieldBinding as W, EntityPreviewBinding as Wn, PropertyConfigBadge as Wt, useTopLevelNavigation as X, useResolvedUser as Xn, resolveEntityView as Xt, useBuildNavigationStateController as Y, getUserLabel as Yn, resolveEntityAction as Yt, useResolvedViews as Z, getEntityPreviewKeys as Zn, mergeEntityActions as Zt, useCollectionsConfigController as _, useNavigationStateController as _n, LABEL_ICON_SIZE as _r, editEntityAction as _t, namespaceToPropertiesPath as a, resolveCollectionPathIds$1 as an, SkeletonPropertyComponent as ar, getEntityViewWidth as at, asUnavailable as b, SelectableTableContext as bn, PropertyIdCopyTooltip as br, DetailViewBinding as bt, buildCollectionGenerationCallback as c, useSelectionController as cn, renderSkeletonImageThumbnail as cr, useSafeSnackbarController as ct, fromSerializableCollectionConfigs as d, SelectableTable as dn, ImagePreview as dr, getInitialEntityValues as dt, getCollectionPathsCombinations as en, ArrayPropertyPreview as er, useBuildCollectionRegistryController as et, fromSerializableProperties as f, CollectionRowActions as fn, EmptyValue as fr, removeEmptyContainers as ft, toSerializableProperty as g, NavigationStateContext as gn, FieldBlock as gr, deleteEntityAction as gt, toSerializableProperties as h, useUrlController as hn, RecordMeta as hr, copyEntityAction as ht, namespaceToPropertiesOrderPath as i, removeTrailingSlash$1 as in, StorageThumbnailInternal as ir, buildSidePanelsFromUrl as it, VectorFieldBinding as j, BooleanPreview as jn, flattenEntry as jt, getFieldConfig as k, UserPreview as kn, isRelationProperty as kr, DataNewPropertiesMapping as kt, validateCollectionJson as l, VirtualTableInput$1 as ln, renderSkeletonText as lr, extractTouchedValues as lt, toSerializableCollectionConfig as m, UrlContext as mn, FormRail as mr, CollectionViewBinding as mt, getFullIdPath as n, removeInitialAndTrailingSlashes$1 as nn, EnumValuesChip as nr, resolveNavigationFrom as nt, CollectionGenerationApiError as o, resolveOpenEntityMode as on, renderSkeletonCaptionText as or, useBuildSidePanel as ot, fromSerializableProperty as p, useAdminContext as pn, FormSections as pr, zodToFormErrors as pt, SideDialogs as q, CollectionRegistryContext as qn, useBreadcrumbsController as qt, idToPropertiesPath as r, removeInitialSlash as rn, StorageThumbnail as rr, useResolvedNavigationFrom as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, resolveViewMode as sn, renderSkeletonIcon as sr, EditViewBinding as st, getFullId as t, getLastSegment$1 as tn, StringPropertyPreview as tr, useHistory as tt, fromSerializableCollectionConfig as u, CollectionTableBinding as un, UrlComponentPreview as ur, getChanges as ut, LiveSchemaError as v, useSideDialogsController as vn, isSelfLabellingProperty as vr, resetPasswordAction as vt, EntityForm as w, LabelWithIconAndTooltip as wn, getIconForWidget as wr, CollectionViewActions as wt, createLiveSchemaClient as x, ArrayCustomShapedFieldBinding as xn, getBracketNotation as xr, EntityViewBinding as xt, SchemaChangeCancelled as y, SideDialogsControllerContext as yn, spanClass as yr, CreationResultDialog as yt, MarkdownEditorFieldBinding as z, ArrayOfStorageComponentsPreview as zn, convertFileToJson as zt };
24888
24910
 
24889
- //# sourceMappingURL=util-DVqnqlLn.js.map
24911
+ //# sourceMappingURL=util-DE1WQW6h.js.map