@rebasepro/admin 0.8.0 → 0.9.1-canary.09aaf62
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.
- package/README.md +26 -26
- package/dist/{CollectionEditorDialog-BO_aQ-Z4.js → CollectionEditorDialog-DbPpDDwb.js} +40 -18
- package/dist/CollectionEditorDialog-DbPpDDwb.js.map +1 -0
- package/dist/{PropertyEditView-DKzOpMjR.js → PropertyEditView-DfJbZ67t.js} +81 -73
- package/dist/PropertyEditView-DfJbZ67t.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-BQTIExjA.js → RouterCollectionsStudioView-C6XQ7Il5.js} +5 -5
- package/dist/RouterCollectionsStudioView-C6XQ7Il5.js.map +1 -0
- package/dist/collection_editor/_cms_internals.d.ts +3 -3
- package/dist/collection_editor/api/generateCollectionApi.d.ts +8 -8
- package/dist/collection_editor/extensibility_types.d.ts +3 -3
- package/dist/collection_editor/index.d.ts +2 -2
- package/dist/collection_editor/pgColumnToProperty.d.ts +3 -3
- package/dist/collection_editor/serializable_types.d.ts +7 -7
- package/dist/collection_editor/serializable_utils.d.ts +8 -8
- package/dist/collection_editor/types/collection_editor_controller.d.ts +5 -5
- package/dist/collection_editor/types/collection_inference.d.ts +2 -2
- package/dist/collection_editor/types/config_controller.d.ts +7 -7
- package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -2
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +2 -2
- package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -2
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +3 -3
- package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +5 -5
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +3 -3
- package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +2 -2
- package/dist/collection_editor/useLocalCollectionsConfigController.d.ts +2 -2
- package/dist/collection_editor/useSafeSnackbarController.d.ts +1 -1
- package/dist/collection_editor/validateCollectionJson.d.ts +2 -2
- package/dist/collection_editor_ui.js +5 -5
- package/dist/collection_editor_ui.js.map +1 -1
- package/dist/components/CollectionPanel.d.ts +4 -4
- package/dist/components/{EntityCollectionTable/EntityCollectionRowActions.d.ts → CollectionTableBinding/CollectionRowActions.d.ts} +3 -3
- package/dist/components/CollectionTableBinding/CollectionTableBinding.d.ts +28 -0
- package/dist/components/{EntityCollectionTable/EntityCollectionTableProps.d.ts → CollectionTableBinding/CollectionTableBindingProps.d.ts} +2 -2
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableMultipleRelationField.d.ts +2 -2
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableReferenceField.d.ts +2 -2
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableRelationField.d.ts +2 -2
- package/dist/components/CollectionTableBinding/index.d.ts +6 -0
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCell.d.ts +1 -1
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/common.d.ts +2 -2
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/PopupFormField.d.ts +3 -3
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/table_bindings.d.ts +1 -1
- package/dist/components/{EntityCollectionView/EntityBoardCard.d.ts → CollectionViewBinding/BoardCardBinding.d.ts} +8 -8
- package/dist/components/{EntityCollectionView/EntityCollectionBoardView.d.ts → CollectionViewBinding/CollectionBoardViewBinding.d.ts} +4 -4
- package/dist/components/{EntityCollectionView/EntityCollectionCardView.d.ts → CollectionViewBinding/CollectionCardViewBinding.d.ts} +5 -5
- package/dist/components/{EntityCollectionView/EntityCollectionListView.d.ts → CollectionViewBinding/CollectionListViewBinding.d.ts} +4 -4
- package/dist/components/{EntityCollectionView/EntityCollectionViewActions.d.ts → CollectionViewBinding/CollectionViewActions.d.ts} +4 -4
- package/dist/components/{EntityCollectionView/EntityCollectionView.d.ts → CollectionViewBinding/CollectionViewBinding.d.ts} +4 -4
- package/dist/components/{EntityCollectionView/EntityCollectionViewStartActions.d.ts → CollectionViewBinding/CollectionViewStartActions.d.ts} +4 -4
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +21 -0
- package/dist/components/{EntityCollectionView → CollectionViewBinding}/SplitListView.d.ts +3 -3
- package/dist/components/{EntityCollectionView → CollectionViewBinding}/hooks/useCollectionInlineEditor.d.ts +3 -3
- package/dist/components/{EntityCollectionView → CollectionViewBinding}/hooks/useKanbanDragAndDrop.d.ts +2 -2
- package/dist/components/{EntityCollectionView → CollectionViewBinding}/useBoardDataController.d.ts +2 -2
- package/dist/components/{EntityCollectionView/useEntityPreviewSlots.d.ts → CollectionViewBinding/usePreviewSlots.d.ts} +5 -5
- package/dist/components/DeleteEntityDialog.d.ts +4 -4
- package/dist/components/{EntityDetailView.d.ts → DetailViewBinding.d.ts} +5 -5
- package/dist/components/EditFormActions.d.ts +3 -0
- package/dist/components/{EntityEditView.d.ts → EditViewBinding.d.ts} +9 -9
- package/dist/components/{EntityPreview.d.ts → EntityPreviewBinding.d.ts} +13 -13
- package/dist/components/EntityViewBinding.d.ts +13 -0
- package/dist/components/{EntityJsonPreview.d.ts → JsonPreviewBinding.d.ts} +1 -1
- package/dist/components/{RebaseCMS.d.ts → RebaseAdmin.d.ts} +2 -2
- package/dist/components/RebaseLayout.d.ts +5 -4
- package/dist/components/RebaseNavigation.d.ts +1 -1
- package/dist/components/RebaseShell.d.ts +1 -0
- package/dist/components/ReferenceTable/{EntitySelectionTable.d.ts → SelectionTableBinding.d.ts} +5 -5
- package/dist/components/SelectableTable/SelectableTable.d.ts +6 -6
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +3 -3
- package/dist/components/SelectableTable/SelectionStore.d.ts +2 -2
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +6 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +7 -1
- package/dist/components/SelectableTable/filters/FilterFieldBinding.d.ts +40 -0
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +7 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +7 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +7 -1
- package/dist/components/SideDialogs.d.ts +1 -1
- package/dist/components/SidePanelBinding.d.ts +11 -0
- package/dist/components/{SideEntityProvider.d.ts → SidePanelProvider.d.ts} +7 -7
- package/dist/components/history/EntityHistoryEntry.d.ts +2 -2
- package/dist/components/history/LastEditedByIndicator.d.ts +2 -2
- package/dist/components/index.d.ts +15 -14
- package/dist/contexts/SidePanelControllerContext.d.ts +3 -0
- package/dist/data_export/export/ExportCollectionAction.d.ts +3 -3
- package/dist/data_import/components/ImportSaveInProgress.d.ts +2 -2
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/form/PropertyFieldBinding.d.ts +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +1 -1
- package/dist/form/components/StorageUploadProgress.d.ts +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
- package/dist/form/form_utils.d.ts +2 -2
- package/dist/{history-B3cqBzEV.js → history-GSa4BgDt.js} +7 -7
- package/dist/history-GSa4BgDt.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +2 -2
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +5 -5
- package/dist/hooks/navigation/useNavigationResolution.d.ts +4 -4
- package/dist/hooks/navigation/useResolvedCollections.d.ts +7 -7
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +2 -2
- package/dist/hooks/navigation/utils.d.ts +5 -5
- package/dist/hooks/useBuildSidePanel.d.ts +6 -0
- package/dist/hooks/useCMSContext.d.ts +2 -2
- package/dist/hooks/{useEntityHistory.d.ts → useHistory.d.ts} +1 -1
- package/dist/hooks/useResolvedNavigationFrom.d.ts +3 -3
- package/dist/hooks/{useEntitySelectionDialog.d.ts → useSelectionDialog.d.ts} +2 -2
- package/dist/hooks/useSideDialogsController.d.ts +1 -1
- package/dist/hooks/useSidePanel.d.ts +11 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{src-cxV1ODRG.js → src-B8WuGSPZ.js} +886 -692
- package/dist/src-B8WuGSPZ.js.map +1 -0
- package/dist/types/components/EntityFormActionsProps.d.ts +2 -2
- package/dist/types/components/EntityFormProps.d.ts +3 -3
- package/dist/types/components/formex.d.ts +1 -1
- package/dist/types/fields.d.ts +2 -2
- package/dist/util/dataControllerAdapter.d.ts +2 -5
- package/dist/util/navigation_utils.d.ts +6 -6
- package/dist/util/previews.d.ts +3 -3
- package/dist/util/property_utils.d.ts +2 -2
- package/dist/util/{entity_view_constants.d.ts → view_constants.d.ts} +1 -1
- package/package.json +12 -17
- package/src/collection_editor/ConfigControllerProvider.tsx +11 -11
- package/src/collection_editor/_cms_internals.ts +3 -3
- package/src/collection_editor/api/generateCollectionApi.ts +8 -8
- package/src/collection_editor/extensibility_types.ts +3 -3
- package/src/collection_editor/index.ts +3 -3
- package/src/collection_editor/pgColumnToProperty.ts +3 -3
- package/src/collection_editor/serializable_types.ts +8 -8
- package/src/collection_editor/serializable_utils.ts +17 -17
- package/src/collection_editor/types/collection_editor_controller.tsx +5 -5
- package/src/collection_editor/types/collection_inference.ts +2 -2
- package/src/collection_editor/types/config_controller.tsx +7 -7
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +3 -3
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +3 -3
- package/src/collection_editor/ui/EditorCollectionAction.tsx +3 -3
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +3 -3
- package/src/collection_editor/ui/EditorEntityAction.tsx +3 -3
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -1
- package/src/collection_editor/ui/KanbanSetupAction.tsx +3 -3
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +1 -1
- package/src/collection_editor/ui/NewCollectionButton.tsx +1 -1
- package/src/collection_editor/ui/NewCollectionCard.tsx +1 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +6 -6
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +6 -6
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +29 -29
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +10 -10
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +38 -7
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/EntityActionsSelectDialog.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +7 -7
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +9 -9
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +46 -37
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +7 -7
- package/src/collection_editor/ui/collection_editor/SwitchControl.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +2 -2
- package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +2 -2
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +2 -2
- package/src/collection_editor/ui/collection_editor/templates/users_template.ts +2 -2
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +13 -13
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +4 -4
- package/src/collection_editor/useSafeSnackbarController.ts +1 -1
- package/src/collection_editor/validateCollectionJson.ts +3 -3
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/ArrayContainer.tsx +1 -1
- package/src/components/ClearFilterSortButton.tsx +1 -1
- package/src/components/CollectionPanel.tsx +14 -17
- package/src/components/{EntityCollectionTable/EntityCollectionRowActions.tsx → CollectionTableBinding/CollectionRowActions.tsx} +8 -8
- package/src/components/{EntityCollectionTable/EntityCollectionTable.tsx → CollectionTableBinding/CollectionTableBinding.tsx} +13 -13
- package/src/components/{EntityCollectionTable/EntityCollectionTableProps.tsx → CollectionTableBinding/CollectionTableBindingProps.tsx} +2 -2
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/PropertyTableCell.tsx +1 -1
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/column_utils.tsx +1 -1
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableMultipleRelationField.tsx +7 -7
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableReferenceField.tsx +10 -10
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableRelationField.tsx +7 -7
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableStorageUpload.tsx +1 -1
- package/src/components/CollectionTableBinding/index.tsx +14 -0
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/CollectionTableToolbar.tsx +1 -1
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCell.tsx +2 -2
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCellActions.tsx +1 -1
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/common.tsx +2 -2
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/PopupFormField.tsx +6 -6
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/table_bindings.tsx +1 -1
- package/src/components/{EntityCollectionView/EntityBoardCard.tsx → CollectionViewBinding/BoardCardBinding.tsx} +17 -17
- package/src/components/{EntityCollectionView/EntityCollectionBoardView.tsx → CollectionViewBinding/CollectionBoardViewBinding.tsx} +17 -16
- package/src/components/{EntityCollectionView/EntityCollectionCardView.tsx → CollectionViewBinding/CollectionCardViewBinding.tsx} +9 -9
- package/src/components/{EntityCollectionView/EntityCollectionListView.tsx → CollectionViewBinding/CollectionListViewBinding.tsx} +15 -15
- package/src/components/{EntityCollectionView/EntityCollectionViewActions.tsx → CollectionViewBinding/CollectionViewActions.tsx} +7 -7
- package/src/components/{EntityCollectionView/EntityCollectionView.tsx → CollectionViewBinding/CollectionViewBinding.tsx} +107 -92
- package/src/components/{EntityCollectionView/EntityCollectionViewStartActions.tsx → CollectionViewBinding/CollectionViewStartActions.tsx} +6 -6
- package/src/components/{EntityCollectionView/EntityCard.tsx → CollectionViewBinding/EntityCardBinding.tsx} +12 -12
- package/src/components/{EntityCollectionView → CollectionViewBinding}/FiltersDialog.tsx +49 -72
- package/src/components/{EntityCollectionView → CollectionViewBinding}/SplitListView.tsx +10 -10
- package/src/components/{EntityCollectionView → CollectionViewBinding}/ViewModeToggle.tsx +1 -1
- package/src/components/{EntityCollectionView → CollectionViewBinding}/hooks/useCollectionInlineEditor.ts +6 -6
- package/src/components/{EntityCollectionView → CollectionViewBinding}/hooks/useKanbanDragAndDrop.ts +5 -5
- package/src/components/{EntityCollectionView → CollectionViewBinding}/useBoardDataController.tsx +25 -13
- package/src/components/{EntityCollectionView/useEntityPreviewSlots.ts → CollectionViewBinding/usePreviewSlots.ts} +9 -9
- package/src/components/DefaultAppBar.tsx +3 -3
- package/src/components/DefaultDrawer.tsx +3 -3
- package/src/components/DeleteEntityDialog.tsx +7 -7
- package/src/components/{EntityDetailView.tsx → DetailViewBinding.tsx} +28 -31
- package/src/components/DrawerNavigationGroup.tsx +2 -2
- package/src/components/{EntityEditViewFormActions.tsx → EditFormActions.tsx} +16 -16
- package/src/components/{EntityEditView.tsx → EditViewBinding.tsx} +34 -37
- package/src/components/{EntityPreview.tsx → EntityPreviewBinding.tsx} +30 -30
- package/src/components/{EntityView.tsx → EntityViewBinding.tsx} +7 -7
- package/src/components/HomePage/ContentHomePage.tsx +4 -4
- package/src/components/HomePage/FavouritesView.tsx +1 -1
- package/src/components/HomePage/NavigationCardBinding.tsx +4 -4
- package/src/components/HomePage/NavigationGroup.tsx +1 -1
- package/src/components/HomePage/RenameGroupDialog.tsx +1 -1
- package/src/components/{EntityJsonPreview.tsx → JsonPreviewBinding.tsx} +2 -2
- package/src/components/{RebaseCMS.tsx → RebaseAdmin.tsx} +6 -5
- package/src/components/RebaseAuthGate.tsx +2 -2
- package/src/components/RebaseLayout.tsx +7 -13
- package/src/components/RebaseNavigation.tsx +35 -11
- package/src/components/RebaseRouteDefs.tsx +2 -2
- package/src/components/RebaseShell.tsx +2 -1
- package/src/components/ReferenceTable/{EntitySelectionTable.tsx → SelectionTableBinding.tsx} +27 -24
- package/src/components/ReferenceWidget.tsx +4 -4
- package/src/components/RelationSelector.tsx +15 -13
- package/src/components/SearchIconsView.tsx +2 -2
- package/src/components/SelectableTable/SelectableTable.tsx +35 -88
- package/src/components/SelectableTable/SelectableTableContext.tsx +3 -3
- package/src/components/SelectableTable/SelectionStore.ts +4 -4
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +10 -2
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +34 -13
- package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +187 -0
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +22 -8
- package/src/components/SelectableTable/filters/RelationFilterField.tsx +17 -3
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +67 -13
- package/src/components/SideDialogs.tsx +4 -4
- package/src/components/{EntitySidePanel.tsx → SidePanelBinding.tsx} +20 -20
- package/src/components/{SideEntityProvider.tsx → SidePanelProvider.tsx} +17 -17
- package/src/components/UserSelector.tsx +1 -1
- package/src/components/admin/CreationResultDialog.tsx +6 -3
- package/src/components/app/Scaffold.tsx +6 -2
- package/src/components/common/default_entity_actions.tsx +132 -34
- package/src/components/field_configs.tsx +1 -1
- package/src/components/history/EntityHistoryEntry.tsx +3 -3
- package/src/components/history/EntityHistoryView.tsx +7 -7
- package/src/components/history/LastEditedByIndicator.tsx +4 -4
- package/src/components/index.ts +16 -15
- package/src/contexts/SidePanelControllerContext.tsx +5 -0
- package/src/data_export/export/BasicExportAction.tsx +1 -1
- package/src/data_export/export/ExportCollectionAction.tsx +5 -5
- package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
- package/src/data_import/components/ImportFileUpload.tsx +1 -1
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -1
- package/src/data_import/components/ImportSaveInProgress.tsx +4 -4
- package/src/data_import/import/ImportCollectionAction.tsx +6 -6
- package/src/data_import/utils/data.ts +4 -4
- package/src/data_import/utils/get_properties_mapping.ts +1 -1
- package/src/editor/components/image-bubble.tsx +1 -1
- package/src/editor/components/table-bubble.tsx +1 -1
- package/src/editor/editor.tsx +1 -1
- package/src/editor/selectors/link-selector.tsx +1 -1
- package/src/editor/selectors/node-selector.tsx +1 -1
- package/src/form/EntityForm.tsx +6 -6
- package/src/form/EntityFormActions.tsx +4 -4
- package/src/form/EntityFormBinding.tsx +10 -10
- package/src/form/PropertyFieldBinding.tsx +7 -7
- package/src/form/components/ErrorFocus.tsx +1 -1
- package/src/form/components/LocalChangesMenu.tsx +3 -3
- package/src/form/components/StorageItemPreview.tsx +1 -1
- package/src/form/components/StorageUploadProgress.tsx +3 -3
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +5 -5
- package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +21 -21
- package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +3 -3
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +7 -7
- package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +3 -3
- package/src/form/form_utils.ts +3 -3
- package/src/hooks/index.ts +4 -4
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +2 -2
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +11 -11
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +5 -5
- package/src/hooks/navigation/useNavigationResolution.ts +28 -13
- package/src/hooks/navigation/useResolvedCollections.ts +8 -8
- package/src/hooks/navigation/useTopLevelNavigation.ts +2 -2
- package/src/hooks/navigation/utils.ts +5 -5
- package/src/hooks/{useBuildSideEntityController.tsx → useBuildSidePanel.tsx} +29 -29
- package/src/hooks/useCMSContext.tsx +7 -7
- package/src/hooks/{useEntityHistory.ts → useHistory.ts} +2 -2
- package/src/hooks/useResolvedNavigationFrom.tsx +10 -5
- package/src/hooks/{useEntitySelectionDialog.tsx → useSelectionDialog.tsx} +7 -7
- package/src/hooks/useSideDialogsController.tsx +1 -1
- package/src/hooks/useSidePanel.tsx +13 -0
- package/src/index.ts +15 -15
- package/src/preview/PropertyPreview.tsx +2 -2
- package/src/preview/components/DatePreview.tsx +1 -1
- package/src/preview/components/EnumValuesChip.tsx +1 -1
- package/src/preview/components/ImagePreview.tsx +1 -1
- package/src/preview/components/ReferencePreview.tsx +11 -11
- package/src/preview/components/RelationPreview.tsx +13 -12
- package/src/preview/components/StorageThumbnail.tsx +1 -1
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
- package/src/routes/RebaseRoute.tsx +12 -12
- package/src/types/components/EntityFormActionsProps.tsx +2 -2
- package/src/types/components/EntityFormProps.tsx +3 -3
- package/src/types/components/formex.tsx +1 -1
- package/src/types/fields.tsx +2 -2
- package/src/util/dataControllerAdapter.ts +9 -15
- package/src/util/navigation_utils.ts +7 -7
- package/src/util/previews.ts +7 -5
- package/src/util/property_utils.tsx +2 -2
- package/src/util/{entity_view_constants.ts → view_constants.ts} +1 -1
- package/dist/CollectionEditorDialog-BO_aQ-Z4.js.map +0 -1
- package/dist/PropertyEditView-DKzOpMjR.js.map +0 -1
- package/dist/RouterCollectionsStudioView-BQTIExjA.js.map +0 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -28
- package/dist/components/EntityCollectionTable/index.d.ts +0 -6
- package/dist/components/EntityCollectionView/EntityCard.d.ts +0 -21
- package/dist/components/EntityEditViewFormActions.d.ts +0 -3
- package/dist/components/EntitySidePanel.d.ts +0 -11
- package/dist/components/EntityView.d.ts +0 -13
- package/dist/contexts/SideEntityControllerContext.d.ts +0 -3
- package/dist/history-B3cqBzEV.js.map +0 -1
- package/dist/hooks/useBuildSideEntityController.d.ts +0 -6
- package/dist/hooks/useSideEntityController.d.ts +0 -11
- package/dist/src-cxV1ODRG.js.map +0 -1
- package/src/components/EntityCollectionTable/index.tsx +0 -14
- package/src/contexts/SideEntityControllerContext.tsx +0 -5
- package/src/hooks/useSideEntityController.tsx +0 -13
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/PropertyTableCell.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/column_utils.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableRelationSelectorField.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableStorageUpload.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/VirtualTableSelect.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/fields/VirtualTableUserSelect.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/CollectionTableToolbar.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCellActions.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/useDraggable.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/useWindowSize.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → CollectionViewBinding}/FilterPresetsButton.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → CollectionViewBinding}/FiltersDialog.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → CollectionViewBinding}/ViewModeToggle.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → CollectionViewBinding}/useSelectionController.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → CollectionViewBinding}/utils.d.ts +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableRelationSelectorField.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/VirtualTableSelect.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/VirtualTableUserSelect.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/useDraggable.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/useWindowSize.tsx +0 -0
- /package/src/components/{EntityCollectionView → CollectionViewBinding}/FilterPresetsButton.tsx +0 -0
- /package/src/components/{EntityCollectionView → CollectionViewBinding}/useSelectionController.tsx +0 -0
- /package/src/components/{EntityCollectionView → CollectionViewBinding}/utils.ts +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig, ViewMode } from "@rebasepro/types";
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { CollectionViewBinding } from "./CollectionViewBinding/CollectionViewBinding";
|
|
4
4
|
import { useCollectionRegistryController } from "../hooks/navigation/contexts/CollectionRegistryContext";
|
|
5
5
|
import { Typography } from "@rebasepro/ui";
|
|
6
|
-
import { useComponentOverride,
|
|
6
|
+
import { useComponentOverride, CollectionScopeProvider } from "@rebasepro/app";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Props for the {@link CollectionPanel} component.
|
|
10
10
|
*
|
|
11
|
-
* This is a high-level, consumer-friendly wrapper around {@link
|
|
11
|
+
* This is a high-level, consumer-friendly wrapper around {@link CollectionViewBinding}
|
|
12
12
|
* designed for embedding collection views inside custom pages (home pages,
|
|
13
13
|
* dashboards, entity detail views, etc.).
|
|
14
14
|
*
|
|
@@ -53,7 +53,7 @@ export type CollectionPanelProps = {
|
|
|
53
53
|
updateUrl?: boolean;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Override the entity open mode when clicking
|
|
56
|
+
* Override the entity open mode when clicking a entity.
|
|
57
57
|
*/
|
|
58
58
|
openEntityMode?: "side_panel" | "full_screen" | "split" | "dialog";
|
|
59
59
|
|
|
@@ -66,7 +66,7 @@ export type CollectionPanelProps = {
|
|
|
66
66
|
* Any additional collection-level overrides (e.g. `previewProperties`,
|
|
67
67
|
* `enabledViews`, `entityActions`, `defaultFilter`, etc.).
|
|
68
68
|
*/
|
|
69
|
-
collectionOverrides?: Partial<
|
|
69
|
+
collectionOverrides?: Partial<CollectionConfig>;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
/**
|
|
@@ -101,8 +101,8 @@ function CollectionPanelInner({
|
|
|
101
101
|
title,
|
|
102
102
|
updateUrl,
|
|
103
103
|
className
|
|
104
|
-
}: CollectionPanelProps & { mergedCollection:
|
|
105
|
-
const ResolvedCollectionView = useComponentOverride("Collection.View",
|
|
104
|
+
}: CollectionPanelProps & { mergedCollection: CollectionConfig }) {
|
|
105
|
+
const ResolvedCollectionView = useComponentOverride("Collection.View", CollectionViewBinding);
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<div className={className}>
|
|
@@ -150,7 +150,7 @@ export function CollectionPanel(props: CollectionPanelProps) {
|
|
|
150
150
|
...registeredCollection,
|
|
151
151
|
...(collectionOverrides ?? {}),
|
|
152
152
|
...propOverrides
|
|
153
|
-
} as
|
|
153
|
+
} as CollectionConfig;
|
|
154
154
|
}, [registeredCollection, collectionOverrides, viewMode, sort, limit, openEntityMode]);
|
|
155
155
|
|
|
156
156
|
if (!mergedCollection) {
|
|
@@ -170,12 +170,9 @@ export function CollectionPanel(props: CollectionPanelProps) {
|
|
|
170
170
|
/>
|
|
171
171
|
);
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
return content;
|
|
173
|
+
return (
|
|
174
|
+
<CollectionScopeProvider collection={mergedCollection}>
|
|
175
|
+
{content}
|
|
176
|
+
</CollectionScopeProvider>
|
|
177
|
+
);
|
|
181
178
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import type { EntityAction } from "@rebasepro/types";
|
|
3
3
|
import React, { MouseEvent, useCallback } from "react";
|
|
4
4
|
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
Skeleton,
|
|
15
15
|
Tooltip
|
|
16
16
|
} from "@rebasepro/ui";
|
|
17
|
-
import { useTranslation } from "@rebasepro/
|
|
18
|
-
import { getEntityFromCache } from "@rebasepro/
|
|
17
|
+
import { useTranslation } from "@rebasepro/app";
|
|
18
|
+
import { getEntityFromCache } from "@rebasepro/app";
|
|
19
19
|
import { getLocalChangesBackup } from "@rebasepro/common";
|
|
20
20
|
import { useCMSContext } from "../../index";
|
|
21
21
|
|
|
@@ -32,7 +32,7 @@ import { useCMSContext } from "../../index";
|
|
|
32
32
|
*
|
|
33
33
|
* @group Collection components
|
|
34
34
|
*/
|
|
35
|
-
export const
|
|
35
|
+
export const CollectionRowActions = function CollectionRowActions({
|
|
36
36
|
entity,
|
|
37
37
|
collection,
|
|
38
38
|
path,
|
|
@@ -56,7 +56,7 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
|
|
|
56
56
|
}:
|
|
57
57
|
{
|
|
58
58
|
entity: Entity<any>,
|
|
59
|
-
collection?:
|
|
59
|
+
collection?: CollectionConfig<any>,
|
|
60
60
|
path?: string,
|
|
61
61
|
width: number,
|
|
62
62
|
frozen?: boolean,
|
|
@@ -80,7 +80,7 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
const context = useCMSContext();
|
|
83
|
-
const
|
|
83
|
+
const sidePanelCtrl = context.sidePanelController;
|
|
84
84
|
const { t } = useTranslation();
|
|
85
85
|
|
|
86
86
|
const onCheckedChange = useCallback((checked: boolean) => {
|
|
@@ -131,7 +131,7 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
|
|
|
131
131
|
path,
|
|
132
132
|
collection,
|
|
133
133
|
context,
|
|
134
|
-
|
|
134
|
+
sidePanelController: sidePanelCtrl,
|
|
135
135
|
selectionController,
|
|
136
136
|
highlightEntity,
|
|
137
137
|
unhighlightEntity,
|
|
@@ -175,7 +175,7 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
|
|
|
175
175
|
path,
|
|
176
176
|
collection,
|
|
177
177
|
context,
|
|
178
|
-
|
|
178
|
+
sidePanelController: sidePanelCtrl,
|
|
179
179
|
selectionController,
|
|
180
180
|
highlightEntity,
|
|
181
181
|
unhighlightEntity,
|
|
@@ -3,46 +3,46 @@ import React, { useCallback, useMemo, useRef } from "react";
|
|
|
3
3
|
import { CollectionSize, Entity, RebaseContext, User, Property } from "@rebasepro/types";
|
|
4
4
|
import { PropertyTableCell } from "./PropertyTableCell";
|
|
5
5
|
import { ErrorBoundary } from "@rebasepro/ui";
|
|
6
|
-
import { useRebaseContext, useLargeLayout } from "@rebasepro/
|
|
6
|
+
import { useRebaseContext, useLargeLayout } from "@rebasepro/app";
|
|
7
7
|
import { CellRendererParams, VirtualTableColumn } from "@rebasepro/ui";
|
|
8
|
-
import {
|
|
8
|
+
import { CollectionRowActions } from "./CollectionRowActions";
|
|
9
9
|
import { CollectionTableToolbar } from "./internal/CollectionTableToolbar";
|
|
10
|
-
import {
|
|
10
|
+
import { CollectionTableBindingProps } from "./CollectionTableBindingProps";
|
|
11
11
|
import { EntityTableCell } from "./internal/EntityTableCell";
|
|
12
12
|
import { CustomFieldValidator } from "../../form/validation";
|
|
13
13
|
import { renderSkeletonText } from "../../preview";
|
|
14
14
|
import { propertiesToColumns } from "./column_utils";
|
|
15
|
-
import { ErrorView } from "@rebasepro/
|
|
15
|
+
import { ErrorView } from "@rebasepro/app";
|
|
16
16
|
import { SelectableTable } from "../SelectableTable/SelectableTable";
|
|
17
17
|
import { cls } from "@rebasepro/ui";
|
|
18
|
-
import { getRowHeight } from "@rebasepro/
|
|
18
|
+
import { getRowHeight } from "@rebasepro/app";
|
|
19
19
|
import { getValueInPath } from "@rebasepro/utils";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* This component is in charge of rendering a collection table with a high
|
|
23
23
|
* degree of customization.
|
|
24
24
|
*
|
|
25
|
-
* This component is used internally by {@link
|
|
25
|
+
* This component is used internally by {@link CollectionViewBinding} and
|
|
26
26
|
* {@link useReferenceDialog}
|
|
27
27
|
*
|
|
28
28
|
* Please note that you only need to use this component if you are building
|
|
29
29
|
* a custom view. If you just need to create a default view you can do it
|
|
30
30
|
* exclusively with config options.
|
|
31
31
|
*
|
|
32
|
-
* If you want to bind a {@link
|
|
32
|
+
* If you want to bind a {@link CollectionConfig} to a table with the default
|
|
33
33
|
* options you see in collections in the top level navigation, you can
|
|
34
|
-
* check {@link
|
|
34
|
+
* check {@link CollectionViewBinding}.
|
|
35
35
|
*
|
|
36
36
|
* The data displayed in the table is managed by a {@link EntityTableController}.
|
|
37
37
|
* You can build the default, bound to a path in the driver, by using the hook
|
|
38
38
|
* {@link useDataTableController}
|
|
39
39
|
*
|
|
40
|
-
* @see
|
|
41
|
-
* @see
|
|
40
|
+
* @see CollectionTableBindingProps
|
|
41
|
+
* @see CollectionViewBinding
|
|
42
42
|
* @see VirtualTable
|
|
43
43
|
* @group Components
|
|
44
44
|
*/
|
|
45
|
-
export const
|
|
45
|
+
export const CollectionTableBinding = function CollectionTableBinding<M extends Record<string, unknown> = Record<string, unknown>, USER extends User = User>
|
|
46
46
|
({
|
|
47
47
|
className,
|
|
48
48
|
style,
|
|
@@ -82,7 +82,7 @@ export const EntityCollectionTable = function EntityCollectionTable<M extends Re
|
|
|
82
82
|
openEntityMode = "side_panel",
|
|
83
83
|
onColumnsOrderChange,
|
|
84
84
|
hideToolbar = false
|
|
85
|
-
}:
|
|
85
|
+
}: CollectionTableBindingProps<M>) {
|
|
86
86
|
|
|
87
87
|
const ref = useRef<HTMLDivElement>(null);
|
|
88
88
|
|
|
@@ -310,7 +310,7 @@ export const EntityCollectionTable = function EntityCollectionTable<M extends Re
|
|
|
310
310
|
frozen: column.frozen
|
|
311
311
|
});
|
|
312
312
|
else
|
|
313
|
-
return <
|
|
313
|
+
return <CollectionRowActions entity={props.rowData!}
|
|
314
314
|
width={column.width}
|
|
315
315
|
frozen={column.frozen}
|
|
316
316
|
isSelected={false}
|
|
@@ -3,13 +3,13 @@ import type { AdditionalFieldDelegate } from "@rebasepro/types";
|
|
|
3
3
|
import type { Property } from "@rebasepro/types";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { CollectionSize, Entity, EntityTableController, FilterValues, SelectionController, User } from "@rebasepro/types";
|
|
6
|
-
import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from "@rebasepro/
|
|
6
|
+
import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from "@rebasepro/app";
|
|
7
7
|
import { VirtualTableColumn } from "@rebasepro/ui";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @group Collection components
|
|
11
11
|
*/
|
|
12
|
-
export type
|
|
12
|
+
export type CollectionTableBindingProps<M extends Record<string, unknown>,
|
|
13
13
|
USER extends User = User> = {
|
|
14
14
|
|
|
15
15
|
className?: string;
|
package/src/components/{EntityCollectionTable → CollectionTableBinding}/PropertyTableCell.tsx
RENAMED
|
@@ -17,7 +17,7 @@ import { EntityTableCellActions } from "./internal/EntityTableCellActions";
|
|
|
17
17
|
|
|
18
18
|
import { useSelectableTableController } from "../SelectableTable/SelectableTableContext";
|
|
19
19
|
import { useClearRestoreValue } from "../../form/useClearRestoreValue";
|
|
20
|
-
import { getRowHeight } from "@rebasepro/
|
|
20
|
+
import { getRowHeight } from "@rebasepro/app";
|
|
21
21
|
import { isReadOnly } from "@rebasepro/common";
|
|
22
22
|
import { TableRelationField } from "./fields/TableRelationField";
|
|
23
23
|
import { TableRelationSelectorField } from "./fields/TableRelationSelectorField";
|
|
@@ -4,7 +4,7 @@ import { getTableCellAlignment, getTablePropertyColumnWidth } from "./internal/c
|
|
|
4
4
|
import { FilterValues } from "@rebasepro/types";
|
|
5
5
|
import { VirtualTableColumn } from "@rebasepro/ui";
|
|
6
6
|
import { getIconForProperty, getResolvedPropertyInPath } from "../../util/property_utils";
|
|
7
|
-
import { getColumnKeysForProperty } from "@rebasepro/
|
|
7
|
+
import { getColumnKeysForProperty } from "@rebasepro/app";
|
|
8
8
|
|
|
9
9
|
export function buildIdColumn(largeLayout?: boolean): VirtualTableColumn {
|
|
10
10
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { useSelectionDialog } from "../../../hooks/useSelectionDialog";
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import { getCollectionDataPath } from "@rebasepro/types";
|
|
4
4
|
import React, { useCallback } from "react";
|
|
5
5
|
import { deepEqual as equal } from "fast-equals";
|
|
@@ -9,9 +9,9 @@ import { getRelationFrom, normalizeToEntityRelation } from "@rebasepro/common";
|
|
|
9
9
|
|
|
10
10
|
import { RelationPreview } from "../../../preview";
|
|
11
11
|
import { CollectionSize, Entity, EntityRelation, FilterValues, Relation } from "@rebasepro/types";
|
|
12
|
-
import { } from "@rebasepro/
|
|
13
|
-
import { ErrorView } from "@rebasepro/
|
|
14
|
-
import { EntityPreviewContainer } from "../../
|
|
12
|
+
import { } from "@rebasepro/app";
|
|
13
|
+
import { ErrorView } from "@rebasepro/app";
|
|
14
|
+
import { EntityPreviewContainer } from "../../EntityPreviewBinding";
|
|
15
15
|
|
|
16
16
|
type TableMultipleRelationFieldProps = {
|
|
17
17
|
name: string;
|
|
@@ -34,7 +34,7 @@ export function TableMultipleRelationField(props: TableMultipleRelationFieldProp
|
|
|
34
34
|
|
|
35
35
|
export const TableMultipleRelationFieldInternal = React.memo(
|
|
36
36
|
function TableMultipleRelationFieldInternal(props: TableMultipleRelationFieldProps & {
|
|
37
|
-
collection:
|
|
37
|
+
collection: CollectionConfig;
|
|
38
38
|
}) {
|
|
39
39
|
const {
|
|
40
40
|
name,
|
|
@@ -57,7 +57,7 @@ export const TableMultipleRelationFieldInternal = React.memo(
|
|
|
57
57
|
|
|
58
58
|
const selectedEntityIds = value.map((ref) => ref.id);
|
|
59
59
|
|
|
60
|
-
const relationDialogController =
|
|
60
|
+
const relationDialogController = useSelectionDialog({
|
|
61
61
|
multiselect: true,
|
|
62
62
|
path: getCollectionDataPath(collection),
|
|
63
63
|
collection,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { useSelectionDialog } from "../../../hooks/useSelectionDialog";
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { deepEqual as equal } from "fast-equals"
|
|
5
5
|
|
|
@@ -7,9 +7,9 @@ import { ReferencePreview } from "../../../preview";
|
|
|
7
7
|
import { CollectionSize, Entity, EntityReference, FilterValues } from "@rebasepro/types";
|
|
8
8
|
|
|
9
9
|
import { getPreviewSizeFrom } from "../../../preview/util";
|
|
10
|
-
import { useComponentOverride, ErrorView,
|
|
10
|
+
import { useComponentOverride, ErrorView, CollectionScopeProvider } from "@rebasepro/app";
|
|
11
11
|
import { cls, PencilIcon } from "@rebasepro/ui";
|
|
12
|
-
import { EntityPreviewContainer } from "../../
|
|
12
|
+
import { EntityPreviewContainer } from "../../EntityPreviewBinding";
|
|
13
13
|
import { getReferenceFrom } from "@rebasepro/common";
|
|
14
14
|
import { useCollectionRegistryController } from "../../../index";
|
|
15
15
|
|
|
@@ -30,7 +30,7 @@ type TableReferenceFieldProps = {
|
|
|
30
30
|
|
|
31
31
|
const DefaultMissingReference: React.FC<{ path: string }> = () => null;
|
|
32
32
|
|
|
33
|
-
function TableReferenceFieldResolver(props: TableReferenceFieldProps & { collection:
|
|
33
|
+
function TableReferenceFieldResolver(props: TableReferenceFieldProps & { collection: CollectionConfig | undefined }) {
|
|
34
34
|
const ResolvedMissingReference = useComponentOverride("Entity.MissingReference", DefaultMissingReference);
|
|
35
35
|
const { path, collection } = props;
|
|
36
36
|
|
|
@@ -56,11 +56,11 @@ export function TableReferenceField(props: TableReferenceFieldProps) {
|
|
|
56
56
|
/>
|
|
57
57
|
);
|
|
58
58
|
|
|
59
|
-
if (collection
|
|
59
|
+
if (collection) {
|
|
60
60
|
return (
|
|
61
|
-
<
|
|
61
|
+
<CollectionScopeProvider collection={collection}>
|
|
62
62
|
{content}
|
|
63
|
-
</
|
|
63
|
+
</CollectionScopeProvider>
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
return content;
|
|
@@ -68,7 +68,7 @@ export function TableReferenceField(props: TableReferenceFieldProps) {
|
|
|
68
68
|
|
|
69
69
|
export const TableReferenceFieldInternal = React.memo(
|
|
70
70
|
function TableReferenceFieldInternal(props: TableReferenceFieldProps & {
|
|
71
|
-
collection:
|
|
71
|
+
collection: CollectionConfig;
|
|
72
72
|
}) {
|
|
73
73
|
const {
|
|
74
74
|
name,
|
|
@@ -100,7 +100,7 @@ export const TableReferenceFieldInternal = React.memo(
|
|
|
100
100
|
: internalValue.id ? [internalValue.id] : [])
|
|
101
101
|
: [];
|
|
102
102
|
|
|
103
|
-
const referenceDialogController =
|
|
103
|
+
const referenceDialogController = useSelectionDialog({
|
|
104
104
|
multiselect,
|
|
105
105
|
path,
|
|
106
106
|
collection,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { useSelectionDialog } from "../../../hooks/useSelectionDialog";
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import { getCollectionDataPath } from "@rebasepro/types";
|
|
4
4
|
import React, { useCallback } from "react";
|
|
5
5
|
import { deepEqual as equal } from "fast-equals"
|
|
@@ -8,10 +8,10 @@ import { RelationPreview } from "../../../preview";
|
|
|
8
8
|
import { CollectionSize, Entity, EntityRelation, FilterValues, Relation } from "@rebasepro/types";
|
|
9
9
|
|
|
10
10
|
import { getPreviewSizeFrom } from "../../../preview/util";
|
|
11
|
-
import { } from "@rebasepro/
|
|
12
|
-
import { ErrorView } from "@rebasepro/
|
|
11
|
+
import { } from "@rebasepro/app";
|
|
12
|
+
import { ErrorView } from "@rebasepro/app";
|
|
13
13
|
import { cls, PencilIcon } from "@rebasepro/ui";
|
|
14
|
-
import { EntityPreviewContainer } from "../../
|
|
14
|
+
import { EntityPreviewContainer } from "../../EntityPreviewBinding";
|
|
15
15
|
import { getRelationFrom, normalizeToEntityRelation } from "@rebasepro/common";
|
|
16
16
|
import { TableMultipleRelationField } from "./TableMultipleRelationField";
|
|
17
17
|
|
|
@@ -57,7 +57,7 @@ export function TableRelationField(props: TableRelationFieldProps) {
|
|
|
57
57
|
|
|
58
58
|
export const TableRelationFieldInternal = React.memo(
|
|
59
59
|
function TableRelationFieldInternal(props: TableRelationFieldProps & {
|
|
60
|
-
collection:
|
|
60
|
+
collection: CollectionConfig;
|
|
61
61
|
}) {
|
|
62
62
|
const {
|
|
63
63
|
name,
|
|
@@ -89,7 +89,7 @@ export const TableRelationFieldInternal = React.memo(
|
|
|
89
89
|
: internalValue.id ? [internalValue.id] : [])
|
|
90
90
|
: [];
|
|
91
91
|
|
|
92
|
-
const relationDialogController =
|
|
92
|
+
const relationDialogController = useSelectionDialog({
|
|
93
93
|
multiselect,
|
|
94
94
|
path: getCollectionDataPath(collection),
|
|
95
95
|
collection,
|
|
@@ -8,7 +8,7 @@ import { useDropzone } from "react-dropzone";
|
|
|
8
8
|
import { PropertyPreview } from "../../../preview";
|
|
9
9
|
import { ErrorBoundary } from "@rebasepro/ui";
|
|
10
10
|
import { cls, IconButton, PencilIcon, Typography } from "@rebasepro/ui";
|
|
11
|
-
import { useSnackbarController, useStorageSource, useTranslation, StorageFieldItem, useStorageUploadController, StorageSourceContext } from "@rebasepro/
|
|
11
|
+
import { useSnackbarController, useStorageSource, useTranslation, StorageFieldItem, useStorageUploadController, StorageSourceContext } from "@rebasepro/app";
|
|
12
12
|
import { getThumbnailMeasure } from "../../../preview/util";
|
|
13
13
|
import { StorageUploadProgress } from "../../../form/components/StorageUploadProgress";
|
|
14
14
|
import { EntityTableCellActions } from "../internal/EntityTableCellActions";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
CollectionTableBinding
|
|
3
|
+
} from "./CollectionTableBinding";
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
CollectionTableBindingProps
|
|
7
|
+
} from "./CollectionTableBindingProps";
|
|
8
|
+
|
|
9
|
+
export * from "./PropertyTableCell";
|
|
10
|
+
export * from "./CollectionRowActions";
|
|
11
|
+
|
|
12
|
+
export * from "./column_utils";
|
|
13
|
+
|
|
14
|
+
export { VirtualTableInput } from "@rebasepro/ui";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { CircularProgress, cls, defaultBorderMixin, SearchBar } from "@rebasepro/ui";
|
|
4
|
-
import { useLargeLayout, useTranslation } from "@rebasepro/
|
|
4
|
+
import { useLargeLayout, useTranslation } from "@rebasepro/app";
|
|
5
5
|
|
|
6
6
|
interface CollectionTableToolbarProps {
|
|
7
7
|
loading: boolean;
|
package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCell.tsx
RENAMED
|
@@ -4,8 +4,8 @@ import useMeasure from "react-use-measure";
|
|
|
4
4
|
|
|
5
5
|
import { cls, Tooltip, iconSize } from "@rebasepro/ui";
|
|
6
6
|
import { ErrorBoundary, MinusCircleIcon } from "@rebasepro/ui";
|
|
7
|
-
import { getRowHeight, TableSize } from "@rebasepro/
|
|
8
|
-
import { ErrorTooltip } from "@rebasepro/
|
|
7
|
+
import { getRowHeight, TableSize } from "@rebasepro/app";
|
|
8
|
+
import { ErrorTooltip } from "@rebasepro/app";
|
|
9
9
|
|
|
10
10
|
interface EntityTableCellProps {
|
|
11
11
|
children: React.ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import type { ArrayProperty, Property } from "@rebasepro/types";
|
|
3
3
|
|
|
4
4
|
export function getTableCellAlignment(property: Property): "right" | "left" | "center" {
|
|
@@ -68,6 +68,6 @@ export function getTablePropertyColumnWidth(property: Property): number {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export function getSubcollectionColumnId(collection:
|
|
71
|
+
export function getSubcollectionColumnId(collection: CollectionConfig) {
|
|
72
72
|
return `subcollection:${collection.slug}`;
|
|
73
73
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Properties } from "@rebasepro/types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import type { FormContext, PropertyFieldBindingProps } from "../../../../types/fields";
|
|
4
4
|
import type { Property } from "@rebasepro/types";
|
|
5
5
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
@@ -7,15 +7,15 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } fro
|
|
|
7
7
|
import { Button, DialogActions, IconButton, Portal, Typography, XIcon } from "@rebasepro/ui";
|
|
8
8
|
|
|
9
9
|
import { Entity, EntityValues } from "@rebasepro/types";
|
|
10
|
-
import { PluginProviderStack } from "@rebasepro/
|
|
11
|
-
import { Formex, FormexController, useCreateFormex } from "@rebasepro/
|
|
10
|
+
import { PluginProviderStack } from "@rebasepro/app";
|
|
11
|
+
import { Formex, FormexController, useCreateFormex } from "@rebasepro/forms";
|
|
12
12
|
import { useDraggable } from "./useDraggable";
|
|
13
13
|
import { CustomFieldValidator, getEntitySchema } from "../../../../form/validation";
|
|
14
14
|
import { useWindowSize } from "./useWindowSize";
|
|
15
15
|
import { getPropertyInPath } from "../../../../util/property_utils";
|
|
16
16
|
import { PropertyFieldBinding, zodToFormErrors } from "../../../../form";
|
|
17
|
-
import { useAuthController, useCustomizationController, useData, useRebaseContext } from "@rebasepro/
|
|
18
|
-
import type { OnCellValueChangeParams } from "@rebasepro/
|
|
17
|
+
import { useAuthController, useCustomizationController, useData, useRebaseContext } from "@rebasepro/app";
|
|
18
|
+
import type { OnCellValueChangeParams } from "@rebasepro/app";
|
|
19
19
|
import { isReadOnly } from "@rebasepro/common";
|
|
20
20
|
|
|
21
21
|
interface PopupFormFieldProps<M extends Record<string, unknown>> {
|
|
@@ -24,7 +24,7 @@ interface PopupFormFieldProps<M extends Record<string, unknown>> {
|
|
|
24
24
|
entityId: string | number;
|
|
25
25
|
tableKey: string;
|
|
26
26
|
propertyKey?: Extract<keyof M, string>;
|
|
27
|
-
collection?:
|
|
27
|
+
collection?: CollectionConfig<any>;
|
|
28
28
|
cellRect?: DOMRect;
|
|
29
29
|
open: boolean;
|
|
30
30
|
onClose: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ArrayProperty, DateProperty, Entity, EntityReference, EntityRelation, NumberProperty, Property, ReferenceProperty, RelationProperty, StringProperty } from "@rebasepro/types";
|
|
3
|
-
import { TableSize, useCustomizationController } from "@rebasepro/
|
|
3
|
+
import { TableSize, useCustomizationController } from "@rebasepro/app";
|
|
4
4
|
import {
|
|
5
5
|
VirtualTableInput,
|
|
6
6
|
VirtualTableNumberInput,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React, { memo, useCallback, useMemo } from "react";
|
|
3
3
|
import { Entity } from "@rebasepro/types";
|
|
4
4
|
import { Checkbox, Chip, cls, defaultBorderMixin, Markdown } from "@rebasepro/ui";
|
|
5
5
|
import { PropertyPreview } from "../../preview";
|
|
6
|
-
import { useAuthController, useCustomizationController } from "@rebasepro/
|
|
7
|
-
import { IconForView } from "@rebasepro/
|
|
6
|
+
import { useAuthController, useCustomizationController } from "@rebasepro/app";
|
|
7
|
+
import { IconForView } from "@rebasepro/app";
|
|
8
8
|
import { BoardItemViewProps } from "@rebasepro/ui";
|
|
9
|
-
import { useCollectionSlotKeys, resolveEntitySlots } from "./
|
|
9
|
+
import { useCollectionSlotKeys, resolveEntitySlots } from "./usePreviewSlots";
|
|
10
10
|
|
|
11
|
-
export type
|
|
12
|
-
collection:
|
|
11
|
+
export type BoardCardBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<Entity<M>> & {
|
|
12
|
+
collection: CollectionConfig<M>;
|
|
13
13
|
onClick?: (entity: Entity<M>) => void;
|
|
14
14
|
selected?: boolean;
|
|
15
15
|
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
|
|
@@ -17,14 +17,14 @@ export type EntityBoardCardProps<M extends Record<string, unknown> = Record<stri
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Compact card component for displaying
|
|
20
|
+
* Compact card component for displaying a entity in a Kanban board.
|
|
21
21
|
* Uses the shared slot system for consistent preview rendering.
|
|
22
22
|
*
|
|
23
23
|
* Selection UX: The checkbox overlays on top of the image/icon thumbnail area,
|
|
24
24
|
* revealed on card hover or when the card is selected. This keeps the card
|
|
25
25
|
* layout clean while providing intuitive selection affordance.
|
|
26
26
|
*/
|
|
27
|
-
function
|
|
27
|
+
function BoardCardBindingInner<M extends Record<string, unknown> = Record<string, unknown>>({
|
|
28
28
|
item,
|
|
29
29
|
isDragging,
|
|
30
30
|
isGroupedOver,
|
|
@@ -34,13 +34,13 @@ function EntityBoardCardInner<M extends Record<string, unknown> = Record<string,
|
|
|
34
34
|
selected,
|
|
35
35
|
onSelectionChange,
|
|
36
36
|
selectionEnabled = false
|
|
37
|
-
}:
|
|
37
|
+
}: BoardCardBindingProps<M>) {
|
|
38
38
|
const entity = item.data;
|
|
39
39
|
const authController = useAuthController();
|
|
40
40
|
const customizationController = useCustomizationController();
|
|
41
41
|
|
|
42
42
|
const slotKeys = useCollectionSlotKeys(
|
|
43
|
-
collection as
|
|
43
|
+
collection as CollectionConfig<Record<string, unknown>>,
|
|
44
44
|
authController,
|
|
45
45
|
customizationController.propertyConfigs
|
|
46
46
|
);
|
|
@@ -48,7 +48,7 @@ function EntityBoardCardInner<M extends Record<string, unknown> = Record<string,
|
|
|
48
48
|
const slots = useMemo(
|
|
49
49
|
() => resolveEntitySlots(
|
|
50
50
|
entity as Entity<Record<string, unknown>>,
|
|
51
|
-
collection as
|
|
51
|
+
collection as CollectionConfig<Record<string, unknown>>,
|
|
52
52
|
slotKeys
|
|
53
53
|
),
|
|
54
54
|
[entity, collection, slotKeys]
|
|
@@ -234,13 +234,13 @@ function EntityBoardCardInner<M extends Record<string, unknown> = Record<string,
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// Memoized to prevent unnecessary re-renders when other cards in the board change
|
|
237
|
-
export const
|
|
237
|
+
export const BoardCardBinding = memo(BoardCardBindingInner) as typeof BoardCardBindingInner;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
|
-
* Wrapper component that adapts
|
|
240
|
+
* Wrapper component that adapts BoardCardBinding to BoardItemViewProps interface
|
|
241
241
|
*/
|
|
242
|
-
export function
|
|
243
|
-
collection:
|
|
242
|
+
export function createBoardCardBindingComponent<M extends Record<string, unknown>>(
|
|
243
|
+
collection: CollectionConfig<M>,
|
|
244
244
|
options: {
|
|
245
245
|
onClick?: (entity: Entity<M>) => void;
|
|
246
246
|
isEntitySelected?: (entity: Entity<M>) => boolean;
|
|
@@ -248,9 +248,9 @@ export function createEntityBoardCardComponent<M extends Record<string, unknown>
|
|
|
248
248
|
selectionEnabled?: boolean;
|
|
249
249
|
}
|
|
250
250
|
): React.ComponentType<BoardItemViewProps<Entity<M>>> {
|
|
251
|
-
return function
|
|
251
|
+
return function BoardCardBindingWrapper(props: BoardItemViewProps<Entity<M>>) {
|
|
252
252
|
return (
|
|
253
|
-
<
|
|
253
|
+
<BoardCardBinding
|
|
254
254
|
{...props}
|
|
255
255
|
collection={collection}
|
|
256
256
|
onClick={options.onClick}
|