@rebasepro/admin 0.7.0 → 0.9.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.
- package/LICENSE +21 -0
- package/README.md +20 -20
- package/dist/{CollectionEditorDialog-iGgS4rLX.js → CollectionEditorDialog-B-7uW3iJ.js} +15 -15
- package/dist/CollectionEditorDialog-B-7uW3iJ.js.map +1 -0
- package/dist/{PropertyEditView-C9yhLyja.js → PropertyEditView-7KMTcrqi.js} +140 -106
- package/dist/PropertyEditView-7KMTcrqi.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-Dqx27GD8.js → RouterCollectionsStudioView-epqIbZrJ.js} +4 -4
- package/dist/{RouterCollectionsStudioView-Dqx27GD8.js.map → RouterCollectionsStudioView-epqIbZrJ.js.map} +1 -1
- package/dist/collection_editor/_cms_internals.d.ts +4 -4
- package/dist/collection_editor/api/generateCollectionApi.d.ts +7 -6
- 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 +12 -16
- 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 -5
- 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 +4 -4
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +3 -3
- 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/validateCollectionJson.d.ts +2 -2
- package/dist/collection_editor_ui.js +4 -4
- 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} +1 -1
- 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/common.d.ts +2 -2
- package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/PopupFormField.d.ts +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/components/RebaseNavigation.d.ts +1 -1
- package/dist/components/ReferenceTable/{EntitySelectionTable.d.ts → SelectionTableBinding.d.ts} +5 -5
- package/dist/components/SelectableTable/SelectableTable.d.ts +5 -5
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +3 -3
- package/dist/components/SelectableTable/SelectionStore.d.ts +13 -22
- 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/field_configs.d.ts +1 -1
- package/dist/components/history/EntityHistoryEntry.d.ts +2 -2
- package/dist/components/history/LastEditedByIndicator.d.ts +2 -2
- package/dist/components/index.d.ts +14 -13
- 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/editor.d.ts +0 -6
- package/dist/editor.js +1 -3
- 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/StorageUploadProgress.d.ts +6 -1
- package/dist/form/form_utils.d.ts +2 -2
- package/dist/form/index.d.ts +0 -1
- package/dist/{history-ChHgyyvM.js → history-7X5bON_n.js} +4 -4
- package/dist/history-7X5bON_n.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 +3 -3
- package/dist/index.js +2 -2
- package/dist/preview/components/StorageThumbnail.d.ts +3 -1
- package/dist/{src-DOX2nOyh.js → src-sUZfe29F.js} +904 -1096
- package/dist/src-sUZfe29F.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/PropertyPreviewProps.d.ts +2 -1
- package/dist/types/fields.d.ts +6 -8
- 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 +18 -18
- package/src/collection_editor/ConfigControllerProvider.tsx +10 -10
- package/src/collection_editor/_cms_internals.ts +4 -4
- package/src/collection_editor/api/generateCollectionApi.ts +7 -6
- package/src/collection_editor/extensibility_types.ts +3 -3
- package/src/collection_editor/index.ts +3 -3
- package/src/collection_editor/pgColumnToProperty.ts +4 -4
- package/src/collection_editor/serializable_types.ts +22 -35
- package/src/collection_editor/serializable_utils.ts +40 -52
- 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 +2 -2
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +2 -2
- package/src/collection_editor/ui/EditorCollectionAction.tsx +2 -2
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +2 -2
- package/src/collection_editor/ui/EditorEntityAction.tsx +2 -2
- package/src/collection_editor/ui/KanbanSetupAction.tsx +2 -2
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +63 -46
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +8 -8
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +7 -16
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +45 -36
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +35 -1
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +3 -3
- 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/ui/collection_editor/utils/supported_fields.tsx +0 -1
- package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +7 -29
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +14 -14
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +4 -4
- package/src/collection_editor/validateCollectionJson.ts +3 -3
- package/src/components/CollectionPanel.tsx +14 -17
- package/src/components/{EntityCollectionTable/EntityCollectionRowActions.tsx → CollectionTableBinding/CollectionRowActions.tsx} +6 -6
- package/src/components/{EntityCollectionTable/EntityCollectionTable.tsx → CollectionTableBinding/CollectionTableBinding.tsx} +19 -17
- package/src/components/{EntityCollectionTable/EntityCollectionTableProps.tsx → CollectionTableBinding/CollectionTableBindingProps.tsx} +1 -1
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableMultipleRelationField.tsx +7 -6
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableReferenceField.tsx +10 -10
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableRelationField.tsx +7 -6
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/fields/TableStorageUpload.tsx +23 -20
- package/src/components/CollectionTableBinding/index.tsx +14 -0
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/common.tsx +2 -2
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/popup_field/PopupFormField.tsx +2 -2
- package/src/components/{EntityCollectionTable → CollectionTableBinding}/table_bindings.tsx +24 -44
- package/src/components/{EntityCollectionView/EntityBoardCard.tsx → CollectionViewBinding/BoardCardBinding.tsx} +15 -15
- package/src/components/{EntityCollectionView/EntityCollectionBoardView.tsx → CollectionViewBinding/CollectionBoardViewBinding.tsx} +15 -14
- package/src/components/{EntityCollectionView/EntityCollectionCardView.tsx → CollectionViewBinding/CollectionCardViewBinding.tsx} +8 -8
- package/src/components/{EntityCollectionView/EntityCollectionListView.tsx → CollectionViewBinding/CollectionListViewBinding.tsx} +24 -13
- package/src/components/{EntityCollectionView/EntityCollectionViewActions.tsx → CollectionViewBinding/CollectionViewActions.tsx} +5 -5
- package/src/components/{EntityCollectionView/EntityCollectionView.tsx → CollectionViewBinding/CollectionViewBinding.tsx} +112 -114
- package/src/components/{EntityCollectionView/EntityCollectionViewStartActions.tsx → CollectionViewBinding/CollectionViewStartActions.tsx} +5 -5
- package/src/components/{EntityCollectionView/EntityCard.tsx → CollectionViewBinding/EntityCardBinding.tsx} +9 -9
- package/src/components/{EntityCollectionView → CollectionViewBinding}/FiltersDialog.tsx +31 -72
- package/src/components/{EntityCollectionView → CollectionViewBinding}/SplitListView.tsx +9 -9
- package/src/components/{EntityCollectionView → CollectionViewBinding}/hooks/useCollectionInlineEditor.ts +6 -6
- package/src/components/{EntityCollectionView → CollectionViewBinding}/hooks/useKanbanDragAndDrop.ts +4 -4
- package/src/components/{EntityCollectionView → CollectionViewBinding}/useBoardDataController.tsx +28 -50
- package/src/components/{EntityCollectionView/useEntityPreviewSlots.ts → CollectionViewBinding/usePreviewSlots.ts} +11 -11
- package/src/components/DefaultDrawer.tsx +1 -1
- package/src/components/DeleteEntityDialog.tsx +6 -6
- package/src/components/{EntityDetailView.tsx → DetailViewBinding.tsx} +28 -31
- package/src/components/{EntityEditViewFormActions.tsx → EditFormActions.tsx} +15 -15
- package/src/components/{EntityEditView.tsx → EditViewBinding.tsx} +31 -34
- package/src/components/{EntityPreview.tsx → EntityPreviewBinding.tsx} +27 -27
- package/src/components/{EntityView.tsx → EntityViewBinding.tsx} +5 -5
- package/src/components/HomePage/ContentHomePage.tsx +1 -1
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
- package/src/components/{EntityJsonPreview.tsx → JsonPreviewBinding.tsx} +1 -1
- package/src/components/RebaseCMS.tsx +4 -4
- package/src/components/RebaseNavigation.tsx +20 -10
- package/src/components/ReferenceTable/{EntitySelectionTable.tsx → SelectionTableBinding.tsx} +22 -19
- package/src/components/ReferenceWidget.tsx +4 -4
- package/src/components/RelationSelector.tsx +16 -14
- package/src/components/SelectableTable/SelectableTable.tsx +44 -89
- package/src/components/SelectableTable/SelectableTableContext.tsx +3 -3
- package/src/components/SelectableTable/SelectionStore.ts +22 -52
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +9 -1
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +33 -12
- package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +187 -0
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +21 -7
- package/src/components/SelectableTable/filters/RelationFilterField.tsx +17 -3
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +66 -12
- package/src/components/SideDialogs.tsx +3 -3
- package/src/components/{EntitySidePanel.tsx → SidePanelBinding.tsx} +19 -19
- package/src/components/{SideEntityProvider.tsx → SidePanelProvider.tsx} +16 -16
- package/src/components/common/default_entity_actions.tsx +24 -13
- package/src/components/field_configs.tsx +0 -14
- package/src/components/history/EntityHistoryEntry.tsx +2 -2
- package/src/components/history/EntityHistoryView.tsx +3 -3
- package/src/components/history/LastEditedByIndicator.tsx +2 -2
- package/src/components/index.ts +15 -14
- package/src/contexts/SidePanelControllerContext.tsx +5 -0
- package/src/data_export/export/ExportCollectionAction.tsx +4 -4
- package/src/data_import/components/ImportSaveInProgress.tsx +3 -3
- package/src/data_import/import/ImportCollectionAction.tsx +4 -4
- package/src/data_import/utils/data.ts +2 -2
- package/src/editor/editor.tsx +4 -7
- package/src/form/EntityForm.tsx +2 -2
- package/src/form/EntityFormActions.tsx +4 -4
- package/src/form/EntityFormBinding.tsx +7 -7
- package/src/form/PropertyFieldBinding.tsx +4 -4
- package/src/form/components/StorageUploadProgress.tsx +9 -2
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +4 -4
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +19 -19
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +12 -1
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +6 -6
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +5 -5
- package/src/form/field_bindings/RelationFieldBinding.tsx +8 -10
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +19 -15
- package/src/form/form_utils.ts +2 -2
- package/src/form/index.tsx +0 -1
- 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 +10 -10
- 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} +28 -28
- package/src/hooks/useCMSContext.tsx +6 -6
- package/src/hooks/{useEntityHistory.ts → useHistory.ts} +1 -1
- package/src/hooks/useResolvedNavigationFrom.tsx +8 -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 +13 -13
- package/src/preview/PropertyPreview.tsx +1 -16
- package/src/preview/components/ReferencePreview.tsx +10 -10
- package/src/preview/components/RelationPreview.tsx +13 -12
- package/src/preview/components/StorageThumbnail.tsx +24 -7
- package/src/routes/RebaseRoute.tsx +10 -10
- package/src/types/components/EntityFormActionsProps.tsx +2 -2
- package/src/types/components/EntityFormProps.tsx +3 -3
- package/src/types/components/PropertyPreviewProps.tsx +1 -1
- package/src/types/fields.tsx +4 -9
- package/src/util/dataControllerAdapter.ts +9 -15
- package/src/util/navigation_utils.ts +7 -7
- package/src/util/previews.ts +23 -3
- package/src/util/propertyConfigMapper.ts +3 -3
- package/src/util/property_utils.tsx +2 -3
- package/src/util/{entity_view_constants.ts → view_constants.ts} +1 -1
- package/dist/CollectionEditorDialog-iGgS4rLX.js.map +0 -1
- package/dist/PropertyEditView-C9yhLyja.js.map +0 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -28
- package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +0 -12
- package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +0 -10
- package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +0 -9
- package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +0 -8
- 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/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +0 -11
- package/dist/history-ChHgyyvM.js.map +0 -1
- package/dist/hooks/useBuildSideEntityController.d.ts +0 -6
- package/dist/hooks/useSideEntityController.d.ts +0 -11
- package/dist/src-DOX2nOyh.js.map +0 -1
- package/src/components/EntityCollectionTable/fields/VirtualTableDateField.tsx +0 -39
- package/src/components/EntityCollectionTable/fields/VirtualTableInput.tsx +0 -90
- package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +0 -83
- package/src/components/EntityCollectionTable/fields/VirtualTableSwitch.tsx +0 -32
- package/src/components/EntityCollectionTable/index.tsx +0 -14
- package/src/contexts/SideEntityControllerContext.tsx +0 -5
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +0 -141
- 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/EntityTableCell.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/{EntityCollectionTable → CollectionTableBinding}/table_bindings.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}/PropertyTableCell.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/column_utils.tsx +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/CollectionTableToolbar.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCell.tsx +0 -0
- /package/src/components/{EntityCollectionTable → CollectionTableBinding}/internal/EntityTableCellActions.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}/ViewModeToggle.tsx +0 -0
- /package/src/components/{EntityCollectionView → CollectionViewBinding}/useSelectionController.tsx +0 -0
- /package/src/components/{EntityCollectionView → CollectionViewBinding}/utils.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import { CollectionGenerationCallback } from "../../api/generateCollectionApi";
|
|
4
4
|
export declare function CollectionEditorWelcomeView({ path, parentCollection, onContinue, existingCollectionPaths, generateCollection, onAnalyticsEvent, unmappedTables, onImportFromTable }: {
|
|
5
5
|
path: string;
|
|
6
|
-
parentCollection?:
|
|
6
|
+
parentCollection?: CollectionConfig;
|
|
7
7
|
onContinue: (importData?: object[], propertiesOrder?: string[]) => void;
|
|
8
8
|
existingCollectionPaths?: string[];
|
|
9
9
|
generateCollection?: CollectionGenerationCallback;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
export interface CollectionJsonImportDialogProps {
|
|
4
4
|
open: boolean;
|
|
5
5
|
onClose: () => void;
|
|
6
|
-
onImport: (collection:
|
|
6
|
+
onImport: (collection: CollectionConfig) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function CollectionJsonImportDialog({ open, onClose, onImport }: CollectionJsonImportDialogProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionConfig, PropertyConfig, User } from "@rebasepro/types";
|
|
3
3
|
import type { PropertyTypePreset, PropertyType } from "../../extensibility_types";
|
|
4
|
-
import type { SerializableProperty,
|
|
4
|
+
import type { SerializableProperty, SerializableCollectionConfig } from "../../serializable_types";
|
|
5
5
|
type CollectionEditorFormProps = {
|
|
6
6
|
showErrors: boolean;
|
|
7
7
|
isNewCollection: boolean;
|
|
@@ -11,7 +11,7 @@ type CollectionEditorFormProps = {
|
|
|
11
11
|
extraIcon: React.ReactNode;
|
|
12
12
|
getUser?: (uid: string) => User | null;
|
|
13
13
|
getData?: () => Promise<object[]>;
|
|
14
|
-
doCollectionInference?: (collection:
|
|
14
|
+
doCollectionInference?: (collection: CollectionConfig) => Promise<Partial<CollectionConfig> | null> | undefined;
|
|
15
15
|
propertyConfigs: Record<string, PropertyConfig>;
|
|
16
16
|
propertyTypePresets?: PropertyTypePreset[];
|
|
17
17
|
hiddenPropertyTypes?: PropertyType[];
|
|
@@ -19,7 +19,7 @@ type CollectionEditorFormProps = {
|
|
|
19
19
|
metadata: Record<string, unknown>;
|
|
20
20
|
onMetadataChange: (key: string, value: unknown) => void;
|
|
21
21
|
property: SerializableProperty;
|
|
22
|
-
collection:
|
|
22
|
+
collection: SerializableCollectionConfig;
|
|
23
23
|
}) => React.ReactNode;
|
|
24
24
|
standalone?: boolean;
|
|
25
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CollectionEditorDialogProps } from "./CollectionEditorDialog";
|
|
3
|
-
import type {
|
|
3
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
4
4
|
export type CollectionStudioViewProps = Omit<CollectionEditorDialogProps, "open" | "isNewCollection" | "editedCollectionId" | "handleClose" | "handleCancel"> & {
|
|
5
5
|
collectionId?: string | "new";
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ export type CollectionStudioViewProps = Omit<CollectionEditorDialogProps, "open"
|
|
|
8
8
|
* Receives the saved collection (or undefined if dismissed without saving).
|
|
9
9
|
* When not provided, save completes silently.
|
|
10
10
|
*/
|
|
11
|
-
onSave?: (collection?:
|
|
11
|
+
onSave?: (collection?: CollectionConfig) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Called when the user cancels editing.
|
|
14
14
|
* When not provided, cancel is a no-op.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import { CollectionsConfigController } from "../../types/config_controller";
|
|
4
4
|
import type { CollectionEditorExtensionProps } from "../../extensibility_types";
|
|
5
5
|
export interface CollectionsStudioViewProps extends CollectionEditorExtensionProps {
|
|
@@ -9,7 +9,7 @@ export interface CollectionsStudioViewProps extends CollectionEditorExtensionPro
|
|
|
9
9
|
* When provided, overrides the collections from `configController`.
|
|
10
10
|
* Use this to control exactly which collections the editor displays.
|
|
11
11
|
*/
|
|
12
|
-
collections?:
|
|
12
|
+
collections?: CollectionConfig[];
|
|
13
13
|
/**
|
|
14
14
|
* Controlled active collection ID.
|
|
15
15
|
* When provided together with `onActiveCollectionChange`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
export declare function EntityActionsEditTab({ collection, embedded }: {
|
|
4
|
-
collection:
|
|
4
|
+
collection: CollectionConfig;
|
|
5
5
|
embedded?: boolean;
|
|
6
6
|
}): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import type { ExtraCollectionFieldsParams } from "../../extensibility_types";
|
|
4
4
|
export declare function GeneralSettingsForm({ isNewCollection, existingPaths, existingIds, parentCollection, renderExtraCollectionFields, standalone, }: {
|
|
5
5
|
isNewCollection: boolean;
|
|
6
6
|
existingPaths?: string[];
|
|
7
7
|
existingIds?: string[];
|
|
8
|
-
parentCollection?:
|
|
8
|
+
parentCollection?: CollectionConfig;
|
|
9
9
|
renderExtraCollectionFields?: (params: ExtraCollectionFieldsParams) => React.ReactNode;
|
|
10
10
|
standalone?: boolean;
|
|
11
11
|
}): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export declare function GetCodeDialog({ collection, onOpenChange, open }: {
|
|
4
4
|
onOpenChange: (open: boolean) => void;
|
|
5
|
-
collection:
|
|
5
|
+
collection: CollectionConfig;
|
|
6
6
|
open: boolean;
|
|
7
7
|
}): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FormexController } from "@rebasepro/formex";
|
|
3
|
-
import {
|
|
3
|
+
import { CollectionConfig, Property, PropertyConfig } from "@rebasepro/types";
|
|
4
4
|
import type { PropertyTypePreset, PropertyType } from "../../extensibility_types";
|
|
5
|
-
import type { SerializableProperty,
|
|
5
|
+
import type { SerializableProperty, SerializableCollectionConfig } from "../../serializable_types";
|
|
6
6
|
export type PropertyWithId = Property & {
|
|
7
7
|
id?: string;
|
|
8
8
|
conditions?: import("@rebasepro/types").PropertyConditions;
|
|
@@ -40,9 +40,9 @@ export type PropertyFormProps = {
|
|
|
40
40
|
metadata: Record<string, unknown>;
|
|
41
41
|
onMetadataChange: (key: string, value: unknown) => void;
|
|
42
42
|
property: SerializableProperty;
|
|
43
|
-
collection:
|
|
43
|
+
collection: SerializableCollectionConfig;
|
|
44
44
|
}) => React.ReactNode;
|
|
45
|
-
collectionValues?:
|
|
45
|
+
collectionValues?: CollectionConfig;
|
|
46
46
|
};
|
|
47
47
|
export declare const PropertyForm: React.MemoExoticComponent<(props: PropertyFormProps) => React.JSX.Element>;
|
|
48
48
|
export declare function PropertyFormDialog({ open, onCancel, onOkClicked, onPropertyChanged, getData, ...formProps }: PropertyFormProps & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionConfig, User } from "@rebasepro/types";
|
|
3
3
|
import { CollectionsConfigController } from "../../types/config_controller";
|
|
4
4
|
import { CollectionInference } from "../../types/collection_inference";
|
|
5
5
|
export declare function SubcollectionsEditTab({ collection, parentCollection, configController, collectionInference, getUser, parentCollectionSlugs }: {
|
|
6
|
-
collection:
|
|
7
|
-
parentCollection?:
|
|
6
|
+
collection: CollectionConfig;
|
|
7
|
+
parentCollection?: CollectionConfig;
|
|
8
8
|
configController: CollectionsConfigController;
|
|
9
9
|
collectionInference?: CollectionInference;
|
|
10
10
|
getUser?: (uid: string) => User | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const blogCollectionTemplate:
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
export declare const blogCollectionTemplate: CollectionConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pagesCollectionTemplate:
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
export declare const pagesCollectionTemplate: CollectionConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const productsCollectionTemplate:
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
export declare const productsCollectionTemplate: CollectionConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const usersCollectionTemplate:
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
export declare const usersCollectionTemplate: CollectionConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollectionsConfigController } from "./types/config_controller";
|
|
2
|
-
import {
|
|
3
|
-
export declare function useLocalCollectionsConfigController(clientOrUrl: any, baseCollections?:
|
|
2
|
+
import { CollectionConfig } from "@rebasepro/types";
|
|
3
|
+
export declare function useLocalCollectionsConfigController(clientOrUrl: any, baseCollections?: CollectionConfig[], options?: {
|
|
4
4
|
readOnly?: boolean;
|
|
5
5
|
getAuthToken?: () => Promise<string | null>;
|
|
6
6
|
}): CollectionsConfigController;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
/**
|
|
3
3
|
* Validation error with path and message
|
|
4
4
|
*/
|
|
@@ -12,7 +12,7 @@ export interface CollectionValidationError {
|
|
|
12
12
|
export interface CollectionValidationResult {
|
|
13
13
|
valid: boolean;
|
|
14
14
|
errors: CollectionValidationError[];
|
|
15
|
-
collection?:
|
|
15
|
+
collection?: CollectionConfig;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Validates a JSON string representing a collection configuration.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-
|
|
3
|
-
import { n as CollectionEditorDialog } from "./CollectionEditorDialog-
|
|
4
|
-
import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-
|
|
1
|
+
import { Bn as useUrlController } from "./src-sUZfe29F.js";
|
|
2
|
+
import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-7KMTcrqi.js";
|
|
3
|
+
import { n as CollectionEditorDialog } from "./CollectionEditorDialog-B-7uW3iJ.js";
|
|
4
|
+
import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-epqIbZrJ.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { useSnackbarController } from "@rebasepro/core";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig, ViewMode } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Props for the {@link CollectionPanel} component.
|
|
5
5
|
*
|
|
6
|
-
* This is a high-level, consumer-friendly wrapper around {@link
|
|
6
|
+
* This is a high-level, consumer-friendly wrapper around {@link CollectionViewBinding}
|
|
7
7
|
* designed for embedding collection views inside custom pages (home pages,
|
|
8
8
|
* dashboards, entity detail views, etc.).
|
|
9
9
|
*
|
|
@@ -42,7 +42,7 @@ export type CollectionPanelProps = {
|
|
|
42
42
|
*/
|
|
43
43
|
updateUrl?: boolean;
|
|
44
44
|
/**
|
|
45
|
-
* Override the entity open mode when clicking
|
|
45
|
+
* Override the entity open mode when clicking a entity.
|
|
46
46
|
*/
|
|
47
47
|
openEntityMode?: "side_panel" | "full_screen" | "split" | "dialog";
|
|
48
48
|
/**
|
|
@@ -53,6 +53,6 @@ export type CollectionPanelProps = {
|
|
|
53
53
|
* Any additional collection-level overrides (e.g. `previewProperties`,
|
|
54
54
|
* `enabledViews`, `entityActions`, `defaultFilter`, etc.).
|
|
55
55
|
*/
|
|
56
|
-
collectionOverrides?: Partial<
|
|
56
|
+
collectionOverrides?: Partial<CollectionConfig>;
|
|
57
57
|
};
|
|
58
58
|
export declare function CollectionPanel(props: CollectionPanelProps): React.JSX.Element;
|
|
@@ -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 from "react";
|
|
4
4
|
import { CollectionSize, Entity, SelectionController } from "@rebasepro/types";
|
|
@@ -15,9 +15,9 @@ import { CollectionSize, Entity, SelectionController } from "@rebasepro/types";
|
|
|
15
15
|
*
|
|
16
16
|
* @group Collection components
|
|
17
17
|
*/
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const CollectionRowActions: ({ entity, collection, path, width, frozen, isSelected, selectionEnabled, size, highlightEntity, onCollectionChange, unhighlightEntity, actions, hideId, selectionController, openEntityMode, sortableNodeRef, sortableStyle, sortableAttributes, isDragging, isDraggable }: {
|
|
19
19
|
entity: Entity<any>;
|
|
20
|
-
collection?:
|
|
20
|
+
collection?: CollectionConfig<any>;
|
|
21
21
|
path?: string;
|
|
22
22
|
width: number;
|
|
23
23
|
frozen?: boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { User } from "@rebasepro/types";
|
|
3
|
+
import { CollectionTableBindingProps } from "./CollectionTableBindingProps";
|
|
4
|
+
/**
|
|
5
|
+
* This component is in charge of rendering a collection table with a high
|
|
6
|
+
* degree of customization.
|
|
7
|
+
*
|
|
8
|
+
* This component is used internally by {@link CollectionViewBinding} and
|
|
9
|
+
* {@link useReferenceDialog}
|
|
10
|
+
*
|
|
11
|
+
* Please note that you only need to use this component if you are building
|
|
12
|
+
* a custom view. If you just need to create a default view you can do it
|
|
13
|
+
* exclusively with config options.
|
|
14
|
+
*
|
|
15
|
+
* If you want to bind a {@link CollectionConfig} to a table with the default
|
|
16
|
+
* options you see in collections in the top level navigation, you can
|
|
17
|
+
* check {@link CollectionViewBinding}.
|
|
18
|
+
*
|
|
19
|
+
* The data displayed in the table is managed by a {@link EntityTableController}.
|
|
20
|
+
* You can build the default, bound to a path in the driver, by using the hook
|
|
21
|
+
* {@link useDataTableController}
|
|
22
|
+
*
|
|
23
|
+
* @see CollectionTableBindingProps
|
|
24
|
+
* @see CollectionViewBinding
|
|
25
|
+
* @see VirtualTable
|
|
26
|
+
* @group Components
|
|
27
|
+
*/
|
|
28
|
+
export declare const CollectionTableBinding: <M extends Record<string, unknown> = Record<string, unknown>, USER extends User = User>({ className, style, fixedFilter, actionsStart, actions, viewModeToggle, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, initialScroll, onScroll, onSizeChanged, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, enablePopupIcon, openEntityMode, onColumnsOrderChange, hideToolbar }: CollectionTableBindingProps<M>) => React.JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { VirtualTableColumn } from "@rebasepro/ui";
|
|
|
8
8
|
/**
|
|
9
9
|
* @group Collection components
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type CollectionTableBindingProps<M extends Record<string, unknown>, USER extends User = User> = {
|
|
12
12
|
className?: string;
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
14
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, EntityRelation, FilterValues, Relation } from "@rebasepro/types";
|
|
4
4
|
type TableMultipleRelationFieldProps = {
|
|
@@ -16,6 +16,6 @@ type TableMultipleRelationFieldProps = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare function TableMultipleRelationField(props: TableMultipleRelationFieldProps): React.JSX.Element;
|
|
18
18
|
export declare const TableMultipleRelationFieldInternal: React.MemoExoticComponent<(props: TableMultipleRelationFieldProps & {
|
|
19
|
-
collection:
|
|
19
|
+
collection: CollectionConfig;
|
|
20
20
|
}) => React.JSX.Element>;
|
|
21
21
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, EntityReference, FilterValues } from "@rebasepro/types";
|
|
4
4
|
type TableReferenceFieldProps = {
|
|
@@ -17,6 +17,6 @@ type TableReferenceFieldProps = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare function TableReferenceField(props: TableReferenceFieldProps): React.JSX.Element;
|
|
19
19
|
export declare const TableReferenceFieldInternal: React.MemoExoticComponent<(props: TableReferenceFieldProps & {
|
|
20
|
-
collection:
|
|
20
|
+
collection: CollectionConfig;
|
|
21
21
|
}) => React.JSX.Element>;
|
|
22
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, EntityRelation, FilterValues, Relation } from "@rebasepro/types";
|
|
4
4
|
type TableRelationFieldProps = {
|
|
@@ -17,6 +17,6 @@ type TableRelationFieldProps = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare function TableRelationField(props: TableRelationFieldProps): React.JSX.Element;
|
|
19
19
|
export declare const TableRelationFieldInternal: React.MemoExoticComponent<(props: TableRelationFieldProps & {
|
|
20
|
-
collection:
|
|
20
|
+
collection: CollectionConfig;
|
|
21
21
|
}) => React.JSX.Element>;
|
|
22
22
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CollectionTableBinding } from "./CollectionTableBinding";
|
|
2
|
+
export type { CollectionTableBindingProps } from "./CollectionTableBindingProps";
|
|
3
|
+
export * from "./PropertyTableCell";
|
|
4
|
+
export * from "./CollectionRowActions";
|
|
5
|
+
export * from "./column_utils";
|
|
6
|
+
export { VirtualTableInput } from "@rebasepro/ui";
|
package/dist/components/{EntityCollectionTable → CollectionTableBinding}/internal/common.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import type { Property } from "@rebasepro/types";
|
|
3
3
|
export declare function getTableCellAlignment(property: Property): "right" | "left" | "center";
|
|
4
4
|
export declare function getTablePropertyColumnWidth(property: Property): number;
|
|
5
|
-
export declare function getSubcollectionColumnId(collection:
|
|
5
|
+
export declare function getSubcollectionColumnId(collection: CollectionConfig): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "@rebasepro/types";
|
|
4
4
|
import { CustomFieldValidator } from "../../../../form/validation";
|
|
@@ -9,7 +9,7 @@ interface PopupFormFieldProps<M extends Record<string, unknown>> {
|
|
|
9
9
|
entityId: string | number;
|
|
10
10
|
tableKey: string;
|
|
11
11
|
propertyKey?: Extract<keyof M, string>;
|
|
12
|
-
collection?:
|
|
12
|
+
collection?: CollectionConfig<any>;
|
|
13
13
|
cellRect?: DOMRect;
|
|
14
14
|
open: boolean;
|
|
15
15
|
onClose: () => void;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "@rebasepro/types";
|
|
4
4
|
import { BoardItemViewProps } from "@rebasepro/ui";
|
|
5
|
-
export type
|
|
6
|
-
collection:
|
|
5
|
+
export type BoardCardBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<Entity<M>> & {
|
|
6
|
+
collection: CollectionConfig<M>;
|
|
7
7
|
onClick?: (entity: Entity<M>) => void;
|
|
8
8
|
selected?: boolean;
|
|
9
9
|
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
|
|
10
10
|
selectionEnabled?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* Compact card component for displaying
|
|
13
|
+
* Compact card component for displaying a entity in a Kanban board.
|
|
14
14
|
* Uses the shared slot system for consistent preview rendering.
|
|
15
15
|
*
|
|
16
16
|
* Selection UX: The checkbox overlays on top of the image/icon thumbnail area,
|
|
17
17
|
* revealed on card hover or when the card is selected. This keeps the card
|
|
18
18
|
* layout clean while providing intuitive selection affordance.
|
|
19
19
|
*/
|
|
20
|
-
declare function
|
|
21
|
-
export declare const
|
|
20
|
+
declare function BoardCardBindingInner<M extends Record<string, unknown> = Record<string, unknown>>({ item, isDragging, isGroupedOver, style, collection, onClick, selected, onSelectionChange, selectionEnabled }: BoardCardBindingProps<M>): React.JSX.Element;
|
|
21
|
+
export declare const BoardCardBinding: typeof BoardCardBindingInner;
|
|
22
22
|
/**
|
|
23
|
-
* Wrapper component that adapts
|
|
23
|
+
* Wrapper component that adapts BoardCardBinding to BoardItemViewProps interface
|
|
24
24
|
*/
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function createBoardCardBindingComponent<M extends Record<string, unknown>>(collection: CollectionConfig<M>, options: {
|
|
26
26
|
onClick?: (entity: Entity<M>) => void;
|
|
27
27
|
isEntitySelected?: (entity: Entity<M>) => boolean;
|
|
28
28
|
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity, EntityTableController, SelectionController } from "@rebasepro/types";
|
|
4
|
-
export type
|
|
5
|
-
collection:
|
|
4
|
+
export type CollectionBoardViewBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
tableController: EntityTableController<M>;
|
|
7
7
|
fullPath: string;
|
|
8
8
|
parentCollectionSlugs?: string[];
|
|
@@ -19,4 +19,4 @@ export type EntityCollectionBoardViewProps<M extends Record<string, unknown> = R
|
|
|
19
19
|
/**
|
|
20
20
|
* Kanban board view for displaying entities grouped by a string enum property.
|
|
21
21
|
*/
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function CollectionBoardViewBinding<M extends Record<string, unknown> = Record<string, unknown>>({ collection, tableController, fullPath, parentCollectionSlugs, parentEntityIds, columnProperty, onEntityClick, selectionController, selectionEnabled, highlightedEntities, emptyComponent, deletedEntities }: CollectionBoardViewBindingProps<M>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, Entity, EntityTableController, SelectionController } from "@rebasepro/types";
|
|
4
|
-
export type
|
|
5
|
-
collection:
|
|
4
|
+
export type CollectionCardViewBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
tableController: EntityTableController<M>;
|
|
7
7
|
onEntityClick?: (entity: Entity<M>) => void;
|
|
8
8
|
selectionController?: SelectionController<M>;
|
|
@@ -27,6 +27,6 @@ export type EntityCollectionCardViewProps<M extends Record<string, unknown> = Re
|
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* Card grid view for displaying entities with infinite scroll.
|
|
30
|
-
* Alternative to the
|
|
30
|
+
* Alternative to the CollectionTableBinding for visual browsing.
|
|
31
31
|
*/
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function CollectionCardViewBinding<M extends Record<string, unknown> = Record<string, unknown>>({ collection, tableController, onEntityClick, selectionController, selectionEnabled, highlightedEntities, emptyComponent, onScroll, initialScroll, size }: CollectionCardViewBindingProps<M>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, Entity, EntityAction, EntityTableController, SelectionController } from "@rebasepro/types";
|
|
4
|
-
export type
|
|
5
|
-
collection:
|
|
4
|
+
export type CollectionListViewBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
tableController: EntityTableController<M>;
|
|
7
7
|
onEntityClick?: (entity: Entity<M>) => void;
|
|
8
8
|
selectionController?: SelectionController<M>;
|
|
@@ -47,4 +47,4 @@ export type EntityCollectionListViewProps<M extends Record<string, unknown> = Re
|
|
|
47
47
|
* - Column-sortable headers
|
|
48
48
|
* - Infinite scroll
|
|
49
49
|
*/
|
|
50
|
-
export declare function
|
|
50
|
+
export declare function CollectionListViewBinding<M extends Record<string, unknown> = Record<string, unknown>>({ collection, tableController, onEntityClick, selectionController, selectionEnabled, highlightedEntities, emptyComponent, size, selectedEntityId, getActionsForEntity, path, openEntityMode }: CollectionListViewBindingProps<M>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { EntityTableController, SelectionController } from "@rebasepro/types";
|
|
4
|
-
export type
|
|
5
|
-
collection:
|
|
4
|
+
export type CollectionViewActionsProps<M extends Record<string, unknown>> = {
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
path: string;
|
|
7
7
|
relativePath: string;
|
|
8
8
|
parentCollectionSlugs: string[];
|
|
@@ -17,4 +17,4 @@ export type EntityCollectionViewActionsProps<M extends Record<string, unknown>>
|
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
openNewDocument: (defaultValues?: Record<string, unknown>) => void;
|
|
19
19
|
};
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function CollectionViewActions<M extends Record<string, unknown>>({ collection, relativePath, parentCollectionSlugs, parentEntityIds, onNewClick, onMultipleDeleteClick, selectionEnabled, path, selectionController, tableController, collectionEntitiesCount, compact, children, openNewDocument }: CollectionViewActionsProps<M>): React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
/**
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type CollectionViewBindingProps<M extends Record<string, unknown>> = {
|
|
7
7
|
/**
|
|
8
8
|
* Complete path where this collection is located.
|
|
9
9
|
* It defaults to the collection path if not provided.
|
|
@@ -37,5 +37,5 @@ export type EntityCollectionViewProps<M extends Record<string, unknown>> = {
|
|
|
37
37
|
* in the entity detail panel. Used by the router to pass the subcollection from the URL.
|
|
38
38
|
*/
|
|
39
39
|
selectedTab?: string;
|
|
40
|
-
} &
|
|
41
|
-
export declare const
|
|
40
|
+
} & CollectionConfig<M>;
|
|
41
|
+
export declare const CollectionViewBinding: React.FunctionComponent<CollectionViewBindingProps<any>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Properties } from "@rebasepro/types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { EntityTableController, SelectionController } from "@rebasepro/types";
|
|
5
|
-
export type
|
|
6
|
-
collection:
|
|
5
|
+
export type CollectionViewStartActionsProps<M extends Record<string, unknown>> = {
|
|
6
|
+
collection: CollectionConfig<M>;
|
|
7
7
|
path: string;
|
|
8
8
|
relativePath: string;
|
|
9
9
|
parentCollectionSlugs: string[];
|
|
@@ -18,4 +18,4 @@ export type EntityCollectionViewStartActionsProps<M extends Record<string, unkno
|
|
|
18
18
|
compact?: boolean;
|
|
19
19
|
openNewDocument: (defaultValues?: Record<string, unknown>) => void;
|
|
20
20
|
};
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function CollectionViewStartActions<M extends Record<string, unknown>>({ collection, relativePath, parentCollectionSlugs, parentEntityIds, path, selectionController, tableController, collectionEntitiesCount, resolvedProperties, compact, openNewDocument }: CollectionViewStartActionsProps<M>): React.JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CollectionSize, Entity } from "@rebasepro/types";
|
|
4
|
+
export type EntityCardBindingProps<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
+
entity: Entity<M>;
|
|
6
|
+
collection: CollectionConfig<M>;
|
|
7
|
+
onClick?: (entity: Entity<M>) => void;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
highlighted?: boolean;
|
|
10
|
+
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
|
|
11
|
+
selectionEnabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Size of the card - affects checkbox styling
|
|
14
|
+
*/
|
|
15
|
+
size?: CollectionSize;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Card component for displaying a entity in a grid view.
|
|
19
|
+
* Shows thumbnail, title, and preview properties via the shared slot system.
|
|
20
|
+
*/
|
|
21
|
+
export declare function EntityCardBinding<M extends Record<string, unknown> = Record<string, unknown>>({ entity, collection, onClick, selected, highlighted, onSelectionChange, selectionEnabled, size }: EntityCardBindingProps<M>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollectionConfig } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CollectionSize, Entity, EntityTableController, SelectionController } from "@rebasepro/types";
|
|
4
4
|
export type SplitListViewProps<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
|
-
collection:
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
tableController: EntityTableController<M>;
|
|
7
7
|
onEntityClick?: (entity: Entity<M>) => void;
|
|
8
8
|
onNewClick?: () => void;
|
|
@@ -52,7 +52,7 @@ export type SplitListViewProps<M extends Record<string, unknown> = Record<string
|
|
|
52
52
|
* State management:
|
|
53
53
|
* - The selected entity is driven by the URL path (e.g. /c/authors/14).
|
|
54
54
|
* `selectedEntityId` comes from props via RebaseRoute, NOT from internal state.
|
|
55
|
-
* - Clicking
|
|
55
|
+
* - Clicking a entity navigates to /c/authors/{id} via the standard onEntityClick handler.
|
|
56
56
|
* - Closing the detail navigates back to /c/authors.
|
|
57
57
|
*/
|
|
58
58
|
export declare function SplitListView<M extends Record<string, unknown> = Record<string, unknown>>({ collection, tableController, onEntityClick: externalOnEntityClick, onNewClick: externalOnNewClick, selectionController, selectionEnabled, highlightedEntities, emptyComponent, onScroll, initialScroll, size, path, parentCollectionSlugs, parentEntityIds, selectedEntityId, selectedTab, toolbar, children }: SplitListViewProps<M>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionConfig, RebaseData, RebaseContext } from "@rebasepro/types";
|
|
2
2
|
import { OnCellValueChange, UniqueFieldValidator } from "@rebasepro/core";
|
|
3
3
|
export interface UseCollectionInlineEditorParams<M extends Record<string, unknown>> {
|
|
4
4
|
path: string;
|
|
5
|
-
collection:
|
|
5
|
+
collection: CollectionConfig<M>;
|
|
6
6
|
dataClient: RebaseData;
|
|
7
7
|
context: RebaseContext;
|
|
8
8
|
}
|