@rebasepro/admin 0.10.0 → 0.10.1-canary.0a881d4
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/dist/{CollectionEditorDialog-BOlKGGg7.js → CollectionEditorDialog-DMztwJ5S.js} +12 -12
- package/dist/CollectionEditorDialog-DMztwJ5S.js.map +1 -0
- package/dist/{PropertyEditView-i51tFOfM.js → PropertyEditView-CjFCnftn.js} +18 -18
- package/dist/PropertyEditView-CjFCnftn.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-Dh4W53PU.js → RouterCollectionsStudioView-nDFQdKHA.js} +4 -4
- package/dist/RouterCollectionsStudioView-nDFQdKHA.js.map +1 -0
- package/dist/collection_editor/api/generateCollectionApi.d.ts +4 -4
- package/dist/collection_editor/pgColumnToProperty.d.ts +4 -3
- package/dist/collection_editor/serializable_types.d.ts +31 -30
- package/dist/collection_editor/serializable_utils.d.ts +6 -5
- package/dist/collection_editor/types/collection_editor_controller.d.ts +6 -5
- package/dist/collection_editor/types/collection_inference.d.ts +3 -2
- package/dist/collection_editor/types/config_controller.d.ts +8 -7
- package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -2
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +3 -2
- package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
- package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
- package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -2
- package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
- 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 +5 -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 +3 -2
- 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 +3 -2
- package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +4 -3
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.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/ui/collection_editor/utils/supported_fields.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.d.ts +2 -1
- 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/AdminModeSyncer.d.ts +1 -1
- package/dist/components/ClearFilterSortButton.d.ts +1 -1
- package/dist/components/CollectionPanel.d.ts +2 -2
- package/dist/components/CollectionTableBinding/CollectionRowActions.d.ts +4 -4
- package/dist/components/CollectionTableBinding/CollectionTableBinding.d.ts +1 -1
- package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +3 -2
- package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.d.ts +3 -3
- package/dist/components/CollectionTableBinding/fields/TableReferenceField.d.ts +3 -3
- package/dist/components/CollectionTableBinding/fields/TableRelationField.d.ts +3 -3
- package/dist/components/CollectionTableBinding/internal/common.d.ts +2 -2
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +2 -2
- package/dist/components/CollectionViewBinding/BoardCardBinding.d.ts +3 -3
- package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.d.ts +3 -3
- package/dist/components/CollectionViewBinding/CollectionCardViewBinding.d.ts +3 -3
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.d.ts +3 -3
- package/dist/components/CollectionViewBinding/CollectionViewActions.d.ts +2 -3
- package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +2 -2
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +2 -3
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +3 -3
- package/dist/components/CollectionViewBinding/FilterPresetsButton.d.ts +2 -1
- package/dist/components/CollectionViewBinding/SplitListView.d.ts +3 -3
- package/dist/components/CollectionViewBinding/ViewModeToggle.d.ts +1 -1
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.d.ts +3 -2
- package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.d.ts +3 -2
- package/dist/components/CollectionViewBinding/useBoardDataController.d.ts +2 -2
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +9 -6
- package/dist/components/CollectionViewBinding/useSelectionController.d.ts +2 -1
- package/dist/components/DeleteEntityDialog.d.ts +2 -2
- package/dist/components/DetailViewBinding.d.ts +3 -3
- package/dist/components/DrawerNavigationGroup.d.ts +1 -1
- package/dist/components/EditViewBinding.d.ts +3 -3
- package/dist/components/EntityPreviewBinding.d.ts +3 -3
- package/dist/components/EntityViewBinding.d.ts +2 -2
- package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +1 -1
- package/dist/components/HomePage/NavigationCardBinding.d.ts +1 -1
- package/dist/components/PropertyConfigBadge.d.ts +1 -1
- package/dist/components/RebaseAdmin.d.ts +1 -1
- package/dist/components/RebaseLayout.d.ts +1 -1
- package/dist/components/ReferenceTable/SelectionTableBinding.d.ts +2 -2
- package/dist/components/SelectableTable/SelectableTable.d.ts +3 -2
- package/dist/components/SelectableTable/SelectionStore.d.ts +1 -1
- package/dist/components/SelectableTable/filters/FilterFieldBinding.d.ts +2 -2
- package/dist/components/SidePanelBinding.d.ts +1 -1
- package/dist/components/admin/CreationResultDialog.d.ts +1 -1
- package/dist/components/common/default_entity_actions.d.ts +2 -1
- package/dist/components/field_configs.d.ts +3 -2
- package/dist/components/history/EntityHistoryEntry.d.ts +2 -2
- package/dist/components/history/EntityHistoryView.d.ts +1 -1
- package/dist/components/history/LastEditedByFormAction.d.ts +1 -1
- package/dist/components/history/LastEditedByIndicator.d.ts +2 -2
- package/dist/contexts/BreacrumbsContext.d.ts +1 -1
- package/dist/contexts/SideDialogsControllerContext.d.ts +1 -1
- package/dist/contexts/SidePanelControllerContext.d.ts +1 -1
- package/dist/data_export/export/ExportCollectionAction.d.ts +4 -3
- package/dist/data_import/components/ImportSaveInProgress.d.ts +2 -2
- package/dist/data_import/import/ImportCollectionAction.d.ts +2 -1
- package/dist/data_import/utils/data.d.ts +2 -1
- package/dist/{export-BM6HPujv.js → export-CavEbZVF.js} +2 -2
- package/dist/export-CavEbZVF.js.map +1 -0
- package/dist/form/PropertyFieldBinding.d.ts +1 -1
- package/dist/form/form_utils.d.ts +4 -3
- package/dist/{history-CtIPJxvQ.js → history-B1lIsrkX.js} +2 -2
- package/dist/history-B1lIsrkX.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +2 -2
- package/dist/hooks/navigation/contexts/NavigationStateContext.d.ts +1 -1
- package/dist/hooks/navigation/contexts/UrlContext.d.ts +1 -1
- package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +2 -1
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +7 -5
- package/dist/hooks/navigation/useBuildUrlController.d.ts +1 -1
- package/dist/hooks/navigation/useNavigationResolution.d.ts +6 -5
- package/dist/hooks/navigation/useResolvedCollections.d.ts +8 -7
- package/dist/hooks/navigation/useResolvedViews.d.ts +4 -2
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +2 -2
- package/dist/hooks/navigation/utils.d.ts +5 -5
- package/dist/hooks/useBreadcrumbsController.d.ts +1 -1
- package/dist/hooks/useBuildSidePanel.d.ts +4 -4
- package/dist/hooks/useCMSContext.d.ts +4 -2
- package/dist/hooks/useResolvedNavigationFrom.d.ts +5 -4
- package/dist/hooks/useResolvedUsers.d.ts +8 -0
- package/dist/hooks/useSideDialogsController.d.ts +1 -1
- package/dist/hooks/useSidePanel.d.ts +1 -1
- package/dist/{import-DzQnT03v.js → import-36UcGe71.js} +2 -2
- package/dist/import-36UcGe71.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/preview/components/UrlComponentPreview.d.ts +1 -1
- package/dist/preview/components/UserPreview.d.ts +3 -2
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
- package/dist/preview/util.d.ts +1 -1
- package/dist/routes/CustomViewRoute.d.ts +1 -1
- package/dist/types/components/EntityFormActionsProps.d.ts +2 -2
- package/dist/types/components/EntityFormProps.d.ts +3 -3
- package/dist/types/fields.d.ts +2 -2
- package/dist/util/dataControllerAdapter.d.ts +1 -1
- package/dist/util/entity_actions.d.ts +1 -1
- package/dist/util/navigation_utils.d.ts +3 -3
- package/dist/util/previews.d.ts +22 -4
- package/dist/util/property_utils.d.ts +3 -2
- package/dist/util/resolutions.d.ts +1 -1
- package/dist/util/view_mode.d.ts +3 -3
- package/dist/{util-XFwQ9FEc.js → util-CPgUM4M8.js} +353 -221
- package/dist/util-CPgUM4M8.js.map +1 -0
- package/package.json +11 -9
- package/src/collection_editor/ConfigControllerProvider.tsx +11 -12
- package/src/collection_editor/api/generateCollectionApi.ts +4 -4
- package/src/collection_editor/pgColumnToProperty.ts +4 -3
- package/src/collection_editor/serializable_types.ts +36 -34
- package/src/collection_editor/serializable_utils.ts +17 -32
- package/src/collection_editor/types/collection_editor_controller.tsx +6 -5
- package/src/collection_editor/types/collection_inference.ts +3 -2
- package/src/collection_editor/types/config_controller.tsx +8 -7
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +3 -2
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +3 -2
- package/src/collection_editor/ui/EditorCollectionAction.tsx +3 -2
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +3 -2
- package/src/collection_editor/ui/EditorEntityAction.tsx +3 -2
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -1
- package/src/collection_editor/ui/KanbanSetupAction.tsx +3 -2
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +1 -1
- package/src/collection_editor/ui/NewCollectionCard.tsx +1 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +6 -5
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +5 -7
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +28 -38
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +5 -4
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +6 -5
- package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -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 +3 -3
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +4 -4
- package/src/collection_editor/ui/collection_editor/templates/users_template.ts +2 -2
- package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +10 -8
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +10 -9
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +5 -5
- package/src/collection_editor/validateCollectionJson.ts +4 -5
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/ClearFilterSortButton.tsx +1 -1
- package/src/components/CollectionPanel.tsx +5 -4
- package/src/components/CollectionTableBinding/CollectionRowActions.tsx +6 -6
- package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +5 -4
- package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +3 -2
- package/src/components/CollectionTableBinding/PropertyTableCell.tsx +5 -5
- package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +4 -3
- package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +5 -4
- package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +4 -3
- package/src/components/CollectionTableBinding/internal/common.tsx +8 -7
- package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +5 -4
- package/src/components/CollectionTableBinding/table_bindings.tsx +7 -7
- package/src/components/CollectionViewBinding/BoardCardBinding.tsx +6 -5
- package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +5 -6
- package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +4 -3
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +10 -13
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +3 -3
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +17 -16
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +3 -3
- package/src/components/CollectionViewBinding/EntityCardBinding.tsx +6 -5
- package/src/components/CollectionViewBinding/FilterPresetsButton.tsx +2 -1
- package/src/components/CollectionViewBinding/FiltersDialog.tsx +2 -2
- package/src/components/CollectionViewBinding/SplitListView.tsx +6 -5
- package/src/components/CollectionViewBinding/ViewModeToggle.tsx +1 -1
- package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +3 -2
- package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +3 -2
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +3 -2
- package/src/components/CollectionViewBinding/usePreviewSlots.ts +57 -25
- package/src/components/CollectionViewBinding/useSelectionController.tsx +2 -1
- package/src/components/DefaultDrawer.tsx +2 -2
- package/src/components/DeleteEntityDialog.tsx +3 -2
- package/src/components/DetailViewBinding.tsx +23 -18
- package/src/components/DrawerNavigationGroup.tsx +1 -1
- package/src/components/EditFormActions.tsx +5 -5
- package/src/components/EditViewBinding.tsx +11 -15
- package/src/components/EntityPreviewBinding.tsx +7 -6
- package/src/components/EntityViewBinding.tsx +3 -3
- package/src/components/HomePage/ContentHomePage.tsx +2 -2
- package/src/components/HomePage/FavouritesView.tsx +1 -1
- package/src/components/HomePage/HomePageDnD.tsx +1 -1
- package/src/components/HomePage/NavigationCardBinding.tsx +2 -2
- package/src/components/PropertyConfigBadge.tsx +2 -1
- package/src/components/RebaseAdmin.tsx +1 -1
- package/src/components/RebaseAuthGate.tsx +1 -1
- package/src/components/RebaseLayout.tsx +1 -1
- package/src/components/RebaseNavigation.tsx +4 -3
- package/src/components/ReferenceTable/SelectionTableBinding.tsx +6 -5
- package/src/components/ReferenceWidget.tsx +3 -2
- package/src/components/SelectableTable/SelectableTable.tsx +3 -3
- package/src/components/SelectableTable/SelectionStore.ts +1 -1
- package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +9 -6
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +3 -2
- package/src/components/SideDialogs.tsx +2 -2
- package/src/components/SidePanelBinding.tsx +5 -5
- package/src/components/SidePanelProvider.tsx +1 -1
- package/src/components/admin/CreationResultDialog.tsx +1 -1
- package/src/components/common/default_entity_actions.tsx +3 -2
- package/src/components/field_configs.tsx +30 -29
- package/src/components/history/EntityHistoryEntry.tsx +3 -2
- package/src/components/history/EntityHistoryView.tsx +1 -1
- package/src/components/history/LastEditedByFormAction.tsx +1 -1
- package/src/components/history/LastEditedByIndicator.tsx +3 -2
- package/src/contexts/BreacrumbsContext.tsx +1 -1
- package/src/contexts/SideDialogsControllerContext.tsx +1 -1
- package/src/contexts/SidePanelControllerContext.tsx +1 -1
- package/src/data_export/export/ExportCollectionAction.tsx +5 -4
- package/src/data_import/components/ImportSaveInProgress.tsx +4 -3
- package/src/data_import/import/ImportCollectionAction.tsx +3 -2
- package/src/data_import/utils/data.ts +3 -2
- package/src/form/EntityForm.tsx +19 -10
- package/src/form/EntityFormActions.tsx +3 -3
- package/src/form/EntityFormBinding.tsx +6 -4
- package/src/form/PropertyFieldBinding.tsx +15 -12
- package/src/form/components/FieldHelperText.tsx +1 -1
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +5 -4
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +7 -6
- package/src/form/field_bindings/BlockFieldBinding.tsx +4 -4
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MapFieldBinding.tsx +7 -7
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +4 -3
- package/src/form/field_bindings/RelationFieldBinding.tsx +2 -2
- package/src/form/field_bindings/RepeatFieldBinding.tsx +5 -5
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
- package/src/form/field_bindings/SwitchFieldBinding.tsx +1 -1
- package/src/form/field_bindings/TextFieldBinding.tsx +8 -8
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +1 -1
- package/src/form/form_utils.ts +5 -3
- package/src/form/useClearRestoreValue.tsx +1 -1
- package/src/form/validation.ts +1 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +3 -2
- package/src/hooks/navigation/contexts/NavigationStateContext.tsx +1 -1
- package/src/hooks/navigation/contexts/UrlContext.tsx +1 -1
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +19 -15
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +8 -6
- package/src/hooks/navigation/useBuildUrlController.tsx +2 -2
- package/src/hooks/navigation/useNavigationResolution.ts +15 -21
- package/src/hooks/navigation/useResolvedCollections.ts +10 -9
- package/src/hooks/navigation/useResolvedViews.tsx +4 -2
- package/src/hooks/navigation/useTopLevelNavigation.ts +3 -2
- package/src/hooks/navigation/utils.ts +6 -5
- package/src/hooks/useBreadcrumbsController.tsx +1 -1
- package/src/hooks/useBuildSidePanel.tsx +9 -12
- package/src/hooks/useCMSContext.tsx +8 -4
- package/src/hooks/useResolvedNavigationFrom.tsx +7 -5
- package/src/hooks/useResolvedUsers.ts +143 -0
- package/src/hooks/useSelectionDialog.tsx +3 -2
- package/src/hooks/useSideDialogsController.tsx +1 -1
- package/src/hooks/useSidePanel.tsx +1 -1
- package/src/index.ts +2 -1
- package/src/preview/PropertyPreview.tsx +11 -11
- package/src/preview/components/ReferencePreview.tsx +6 -5
- package/src/preview/components/RelationPreview.tsx +6 -5
- package/src/preview/components/UrlComponentPreview.tsx +1 -1
- package/src/preview/components/UserPreview.tsx +13 -4
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +1 -1
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +2 -2
- package/src/preview/property_previews/StringPropertyPreview.tsx +19 -13
- package/src/preview/util.ts +1 -1
- package/src/routes/CustomViewRoute.tsx +1 -1
- package/src/routes/RebaseRoute.tsx +7 -5
- package/src/types/components/EntityFormActionsProps.tsx +3 -2
- package/src/types/components/EntityFormProps.tsx +4 -3
- package/src/types/fields.tsx +3 -2
- package/src/util/dataControllerAdapter.ts +2 -1
- package/src/util/entity_actions.ts +1 -1
- package/src/util/navigation_utils.ts +4 -13
- package/src/util/previews.ts +43 -53
- package/src/util/propertyConfigMapper.ts +7 -7
- package/src/util/property_utils.tsx +5 -4
- package/src/util/resolutions.ts +1 -1
- package/src/util/view_mode.ts +4 -3
- package/dist/CollectionEditorDialog-BOlKGGg7.js.map +0 -1
- package/dist/PropertyEditView-i51tFOfM.js.map +0 -1
- package/dist/RouterCollectionsStudioView-Dh4W53PU.js.map +0 -1
- package/dist/export-BM6HPujv.js.map +0 -1
- package/dist/history-CtIPJxvQ.js.map +0 -1
- package/dist/import-DzQnT03v.js.map +0 -1
- package/dist/util-XFwQ9FEc.js.map +0 -1
package/dist/{RouterCollectionsStudioView-Dh4W53PU.js → RouterCollectionsStudioView-nDFQdKHA.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { rn as useUrlController } from "./util-
|
|
3
|
-
import { s as AIModifiedPathsProvider } from "./PropertyEditView-
|
|
4
|
-
import { t as CollectionEditor } from "./CollectionEditorDialog-
|
|
2
|
+
import { rn as useUrlController } from "./util-CPgUM4M8.js";
|
|
3
|
+
import { s as AIModifiedPathsProvider } from "./PropertyEditView-CjFCnftn.js";
|
|
4
|
+
import { t as CollectionEditor } from "./CollectionEditorDialog-DMztwJ5S.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { Button, IconButton, PlusIcon, ResizablePanels, Tooltip, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
7
7
|
import { IconForView, UnsavedChangesDialog, useUnsavedChangesDialog } from "@rebasepro/app";
|
|
@@ -189,4 +189,4 @@ function RouterCollectionsStudioView(props) {
|
|
|
189
189
|
//#endregion
|
|
190
190
|
export { CollectionStudioView as i, RouterCollectionsStudioView_exports as n, CollectionsStudioView as r, RouterCollectionsStudioView as t };
|
|
191
191
|
|
|
192
|
-
//# sourceMappingURL=RouterCollectionsStudioView-
|
|
192
|
+
//# sourceMappingURL=RouterCollectionsStudioView-nDFQdKHA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterCollectionsStudioView-nDFQdKHA.js","names":[],"sources":["../src/collection_editor/ui/collection_editor/CollectionStudioView.tsx","../src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx","../src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx"],"sourcesContent":["\nimport { useUnsavedChangesDialog, UnsavedChangesDialog } from \"@rebasepro/app\";\nimport * as React from \"react\";\nimport { useState } from \"react\";\nimport { Button, PlusIcon, Typography } from \"@rebasepro/ui\";\nimport { CollectionEditorDialogProps } from \"./CollectionEditorDialog\";\nimport { AIModifiedPathsProvider } from \"./AIModifiedPathsContext\";\nimport { CollectionEditor } from \"./CollectionEditorDialog\";\nimport type { AdminCollection } from \"@rebasepro/admin-types\";\n\nexport type CollectionStudioViewProps = Omit<CollectionEditorDialogProps, \"open\" | \"isNewCollection\" | \"editedCollectionId\" | \"handleClose\" | \"handleCancel\"> & {\n collectionId?: string | \"new\";\n\n /**\n * Called after a successful save.\n * Receives the saved collection (or undefined if dismissed without saving).\n * When not provided, save completes silently.\n */\n onSave?: (collection?: AdminCollection) => void;\n\n /**\n * Called when the user cancels editing.\n * When not provided, cancel is a no-op.\n */\n onCancel?: () => void;\n};\n\nexport function CollectionStudioView({ collectionId, onSave, onCancel, ...props }: CollectionStudioViewProps) {\n\n // Form state from the editor\n const [formDirty, setFormDirty] = useState<boolean>(false);\n const [cancelRequested, setCancelRequested] = useState<boolean>(false);\n\n const { dialogProps, triggerDialog } = useUnsavedChangesDialog(\n formDirty,\n () => setFormDirty(false)\n );\n\n const activeCollectionId = collectionId;\n\n const handleCancelClick = () => {\n if (!formDirty) {\n onCancel?.();\n } else {\n setCancelRequested(true);\n triggerDialog();\n }\n };\n\n return (\n <div className=\"flex-grow flex flex-col h-full w-full bg-surface-50 dark:bg-surface-800\">\n <AIModifiedPathsProvider>\n {activeCollectionId ? (\n <CollectionEditor\n key={activeCollectionId}\n {...props}\n fullScreen={true}\n open={true}\n isNewCollection={activeCollectionId === \"new\"}\n editedCollectionId={activeCollectionId !== \"new\" ? activeCollectionId : undefined}\n handleCancel={handleCancelClick}\n handleClose={(savedCollection) => {\n setFormDirty(false);\n if (savedCollection) {\n setTimeout(() => {\n onSave?.(savedCollection);\n }, 0);\n }\n }}\n setFormDirty={setFormDirty}\n />\n ) : (\n <div className=\"flex-grow flex flex-col items-center justify-center h-full gap-4\">\n <Typography variant=\"label\">\n Select a collection or create a new one\n </Typography>\n <Button\n disabled={props.configController?.readOnly}\n onClick={() => onSave?.()}\n >\n <PlusIcon/>\n Add new collection\n </Button>\n </div>\n )}\n\n <UnsavedChangesDialog\n {...dialogProps}\n handleOk={() => {\n dialogProps.handleOk();\n if (cancelRequested) {\n onCancel?.();\n setCancelRequested(false);\n }\n }}\n handleCancel={() => {\n dialogProps.handleCancel();\n setCancelRequested(false);\n }}\n />\n </AIModifiedPathsProvider>\n </div>\n );\n}\n","\nimport { IconForView } from \"@rebasepro/app\";\nimport React, { useState, useEffect } from \"react\";\nimport {\n Button,\n cls,\n defaultBorderMixin,\n IconButton,\n iconSize,\n PlusIcon,\n ResizablePanels,\n Tooltip,\n Typography\n} from \"@rebasepro/ui\";\n\nimport { CollectionsConfigController } from \"../../types/config_controller\";\nimport { CollectionStudioView } from \"./CollectionStudioView\";\nimport type { CollectionEditorExtensionProps } from \"../../extensibility_types\";\nimport type { AdminCollection } from \"@rebasepro/admin-types\";\n\nexport interface CollectionsStudioViewProps extends CollectionEditorExtensionProps {\n configController: CollectionsConfigController;\n\n /**\n * Collections to show in the sidebar.\n * When provided, overrides the collections from `configController`.\n * Use this to control exactly which collections the editor displays.\n */\n collections?: AdminCollection[];\n\n /**\n * Controlled active collection ID.\n * When provided together with `onActiveCollectionChange`,\n * navigation is fully external — no internal state is used.\n */\n activeCollectionId?: string;\n\n /**\n * Called when the user clicks a collection, \"new\", or navigates.\n * When provided, the component is fully controlled (no internal state).\n * When not provided, the component manages selection via internal state.\n *\n * Pass `\"new\"` to create a new collection. Pass `undefined` to deselect.\n */\n onActiveCollectionChange?: (collectionId: string | undefined) => void;\n}\n\nexport function CollectionsStudioView({\n configController,\n collections: collectionsProp,\n activeCollectionId: controlledActiveId,\n onActiveCollectionChange,\n propertyTypePresets,\n hiddenPropertyTypes,\n renderExtraPropertyFields,\n renderExtraCollectionFields,\n visibleTabs,\n standalone,\n}: CollectionsStudioViewProps) {\n\n // ── Navigation state ────────────────────────────────────────────────\n // If onActiveCollectionChange is provided, the component is controlled.\n // Otherwise, use internal state.\n const [internalActiveId, setInternalActiveId] = useState<string | undefined>(undefined);\n const isControlled = onActiveCollectionChange !== undefined;\n const activeCollectionId = isControlled ? controlledActiveId : internalActiveId;\n\n const setActiveCollectionId = (id: string | undefined) => {\n if (isControlled) {\n onActiveCollectionChange?.(id);\n } else {\n setInternalActiveId(id);\n }\n };\n\n // ── Collections list ────────────────────────────────────────────────\n const collections = collectionsProp ?? configController.collections ?? [];\n\n // ── Sidebar sizing ──────────────────────────────────────────────────\n const [sidebarSize, setSidebarSize] = useState(() => {\n try {\n const saved = localStorage.getItem(\"rebase_collections_editor_sidebar_size\");\n return saved !== null ? parseFloat(saved) : 25;\n } catch (e) {\n return 25;\n }\n });\n\n useEffect(() => {\n try {\n localStorage.setItem(\"rebase_collections_editor_sidebar_size\", sidebarSize.toString());\n } catch (e) {\n // ignore local storage error\n }\n }, [sidebarSize]);\n\n return (\n <div className=\"flex h-full w-full bg-surface-50 dark:bg-surface-800 overflow-hidden text-text-primary dark:text-text-primary-dark\">\n <ResizablePanels\n orientation=\"horizontal\"\n panelSizePercent={sidebarSize}\n onPanelSizeChange={setSidebarSize}\n minPanelSizePx={220}\n firstPanel={\n <div className={cls(\"flex flex-col h-full w-full bg-surface-50 dark:bg-surface-800 border-r\", defaultBorderMixin)}>\n <div className={cls(\"flex items-center justify-between px-3 py-2 border-b bg-surface-50 dark:bg-surface-900 min-h-[48px]\", defaultBorderMixin)}>\n <Typography variant=\"caption\" className=\"font-semibold text-[11px] uppercase tracking-wider text-surface-400 dark:text-surface-400\">\n Collections\n </Typography>\n <Tooltip title={configController.readOnly ? configController.readOnlyReason || \"Read only\" : \"Add collection\"}>\n <div>\n <IconButton\n size=\"small\"\n disabled={configController.readOnly}\n onClick={() => setActiveCollectionId(\"new\")}\n className={activeCollectionId === \"new\" ? \"text-primary dark:text-primary-dark\" : \"text-text-secondary dark:text-text-secondary-dark\"}\n >\n <PlusIcon size={iconSize.smallest}/>\n </IconButton>\n </div>\n </Tooltip>\n </div>\n\n <div className=\"flex-grow overflow-y-auto w-full no-scrollbar p-2 space-y-0.5\">\n {collections.length === 0 && (\n <div className=\"p-4 text-center\">\n <Typography variant=\"caption\" className=\"text-text-disabled dark:text-text-disabled-dark italic\">\n No collections yet.\n </Typography>\n </div>\n )}\n {collections.map((collection) => {\n const collectionKey = collection.slug;\n const isSelected = activeCollectionId === collectionKey;\n return (\n <div\n key={collectionKey}\n onClick={() => setActiveCollectionId(collectionKey)}\n className={cls(\n \"flex items-center gap-2.5 px-3 h-[30px] cursor-pointer rounded-lg text-[13px] font-medium transition-colors\",\n isSelected\n ? \"bg-primary/8 text-primary dark:bg-primary/10 dark:text-primary-light font-semibold\"\n : \"hover:bg-primary/5 dark:hover:bg-primary/5 text-surface-700 dark:text-surface-300 hover:text-surface-900 dark:hover:text-white\"\n )}\n >\n <IconForView collectionOrView={collection} size={\"smallest\"} className={cls(\n isSelected\n ? \"text-primary dark:text-primary-light\"\n : \"text-surface-500 dark:text-text-secondary-dark\"\n )}/>\n <span className=\"truncate flex-1\">\n {collection.name || collection.slug}\n </span>\n </div>\n );\n })}\n </div>\n </div>\n }\n secondPanel={\n <div className=\"flex-grow flex flex-col min-w-0 h-full w-full\">\n {/* We use key to force unmount when switching collections, preventing stale state */}\n {activeCollectionId ? (\n <CollectionStudioView\n key={activeCollectionId}\n configController={configController}\n collectionId={activeCollectionId}\n onSave={(savedCollection) => {\n // After creating a new collection, switch to it\n if (activeCollectionId === \"new\" && savedCollection?.slug) {\n setActiveCollectionId(savedCollection.slug);\n }\n }}\n onCancel={() => setActiveCollectionId(undefined)}\n propertyTypePresets={propertyTypePresets}\n hiddenPropertyTypes={hiddenPropertyTypes}\n renderExtraPropertyFields={renderExtraPropertyFields}\n renderExtraCollectionFields={renderExtraCollectionFields}\n visibleTabs={visibleTabs}\n standalone={standalone}\n />\n ) : (\n <div className=\"flex flex-col items-center justify-center h-full gap-4\">\n <Typography variant=\"label\">\n Select a collection or create a new one to start editing\n </Typography>\n <Button\n disabled={configController.readOnly}\n onClick={() => setActiveCollectionId(\"new\")}\n >\n <PlusIcon/>\n Add new collection\n </Button>\n </div>\n )}\n </div>\n }\n />\n </div>\n );\n}\n","/**\n * Router-aware wrapper around CollectionsStudioView.\n *\n * This component provides the react-router-based navigation behavior\n * that Rebase Studio expects: the active collection is derived from the\n * URL, and clicking a collection navigates via react-router.\n *\n * External consumers should use `CollectionsStudioView` directly\n * (which has no react-router dependency).\n */\nimport React from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { useUrlController } from \"../../_cms_internals\";\nimport { CollectionsStudioView, CollectionsStudioViewProps } from \"./CollectionsStudioView\";\n\nexport type RouterCollectionsStudioViewProps = Omit<CollectionsStudioViewProps, \"activeCollectionId\" | \"onActiveCollectionChange\">;\n\nexport function RouterCollectionsStudioView(props: RouterCollectionsStudioViewProps) {\n const navigate = useNavigate();\n const urlController = useUrlController();\n const location = useLocation();\n\n // Determine the active collection from the URL segment after \"schema/\"\n const basePath = urlController.buildAppUrlPath(\"schema\");\n const relativePath = location.pathname.replace(basePath, \"\").replace(/^\\//, \"\");\n const activeCollectionId = relativePath.split(\"/\")[0] || undefined;\n\n return (\n <CollectionsStudioView\n {...props}\n activeCollectionId={activeCollectionId}\n onActiveCollectionChange={(id) => {\n if (id) {\n navigate(urlController.buildAppUrlPath(`schema/${id}`));\n } else {\n navigate(urlController.buildAppUrlPath(\"schema\"));\n }\n }}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
2
2
|
export interface GenerateCollectionRequest {
|
|
3
3
|
/** User's natural language description of what they want */
|
|
4
4
|
prompt: string;
|
|
5
5
|
/** Other collections in the project (for context/relationships). Limit to 30. */
|
|
6
|
-
existingCollections: Partial<
|
|
6
|
+
existingCollections: Partial<AdminCollection>[];
|
|
7
7
|
/** Optional for generate, required for modifications. If provided, modifies this collection */
|
|
8
|
-
existingCollection?: Partial<
|
|
8
|
+
existingCollection?: Partial<AdminCollection>;
|
|
9
9
|
}
|
|
10
10
|
/** Operation types for modifying a collection */
|
|
11
11
|
export type CollectionOperationType = "add" | "modify" | "delete";
|
|
@@ -17,7 +17,7 @@ export interface CollectionOperation {
|
|
|
17
17
|
}
|
|
18
18
|
/** Result from collection generation, including optional delta operations */
|
|
19
19
|
export interface GenerateCollectionResult {
|
|
20
|
-
collection:
|
|
20
|
+
collection: AdminCollection;
|
|
21
21
|
operations?: CollectionOperation[];
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableMetadata } from "@rebasepro/types";
|
|
2
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
2
3
|
/**
|
|
3
|
-
* Builds a partial
|
|
4
|
+
* Builds a partial AdminCollection from PostgreSQL table metadata.
|
|
4
5
|
* This is used when creating a new collection from an existing database table.
|
|
5
6
|
*/
|
|
6
|
-
export declare function buildCollectionFromTableMetadata(tableName: string, metadata: TableMetadata): Partial<
|
|
7
|
+
export declare function buildCollectionFromTableMetadata(tableName: string, metadata: TableMetadata): Partial<AdminCollection>;
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import type { ArrayPropertyValidationSchema,
|
|
13
|
+
import type { ArrayPropertyValidationSchema, EnumValues, FileType, FilterPreset, FilterValues, ImageResize, JoinStep, NumberPropertyValidationSchema, OnAction, PropertyConditions, PropertyValidationSchema, SecurityRule } from "@rebasepro/types";
|
|
14
|
+
import type { CollectionSize, KanbanConfig, NavigationGroupMapping, ViewMode } from "@rebasepro/admin-types";
|
|
14
15
|
/**
|
|
15
|
-
* JSON-serializable version of `
|
|
16
|
+
* JSON-serializable version of `AdminPropertyOptions`.
|
|
16
17
|
* Drops `Field` and `Preview` (ComponentRef — functions/components).
|
|
17
18
|
*/
|
|
18
|
-
export interface
|
|
19
|
+
export interface SerializableAdminBaseOptions {
|
|
19
20
|
columnWidth?: number;
|
|
20
21
|
hideFromCollection?: boolean;
|
|
21
22
|
readOnly?: boolean;
|
|
@@ -73,42 +74,42 @@ export interface SerializableStorageConfig {
|
|
|
73
74
|
/** Key of the named storage backend to use (see `StorageConfig.storageSource`). */
|
|
74
75
|
storageSource?: string;
|
|
75
76
|
}
|
|
76
|
-
/** JSON-serializable version of `
|
|
77
|
-
export interface
|
|
77
|
+
/** JSON-serializable version of `AdminStringOptions`. */
|
|
78
|
+
export interface SerializableAdminStringOptions extends SerializableAdminBaseOptions {
|
|
78
79
|
multiline?: boolean;
|
|
79
80
|
markdown?: boolean;
|
|
80
81
|
previewAsTag?: boolean;
|
|
81
82
|
clearable?: boolean;
|
|
82
83
|
url?: boolean | "image" | "video" | "audio" | "file";
|
|
83
84
|
}
|
|
84
|
-
/** JSON-serializable version of `
|
|
85
|
-
export interface
|
|
85
|
+
/** JSON-serializable version of `AdminNumberOptions`. */
|
|
86
|
+
export interface SerializableAdminNumberOptions extends SerializableAdminBaseOptions {
|
|
86
87
|
clearable?: boolean;
|
|
87
88
|
}
|
|
88
|
-
/** JSON-serializable version of `
|
|
89
|
-
export interface
|
|
89
|
+
/** JSON-serializable version of `AdminDateOptions`. */
|
|
90
|
+
export interface SerializableAdminDateOptions extends SerializableAdminBaseOptions {
|
|
90
91
|
clearable?: boolean;
|
|
91
92
|
}
|
|
92
|
-
/** JSON-serializable version of `
|
|
93
|
-
export interface
|
|
93
|
+
/** JSON-serializable version of `AdminVectorOptions`. */
|
|
94
|
+
export interface SerializableAdminVectorOptions extends SerializableAdminBaseOptions {
|
|
94
95
|
clearable?: boolean;
|
|
95
96
|
}
|
|
96
|
-
/** JSON-serializable version of `
|
|
97
|
-
export interface
|
|
97
|
+
/** JSON-serializable version of `AdminReferenceOptions`. */
|
|
98
|
+
export interface SerializableAdminReferenceOptions extends SerializableAdminBaseOptions {
|
|
98
99
|
previewProperties?: string[];
|
|
99
100
|
}
|
|
100
|
-
/** JSON-serializable version of `
|
|
101
|
-
export interface
|
|
101
|
+
/** JSON-serializable version of `AdminRelationOptions`. */
|
|
102
|
+
export interface SerializableAdminRelationOptions extends SerializableAdminBaseOptions {
|
|
102
103
|
previewProperties?: string[];
|
|
103
104
|
widget?: "select" | "dialog";
|
|
104
105
|
}
|
|
105
|
-
/** JSON-serializable version of `
|
|
106
|
-
export interface
|
|
106
|
+
/** JSON-serializable version of `AdminArrayOptions`. */
|
|
107
|
+
export interface SerializableAdminArrayOptions extends SerializableAdminBaseOptions {
|
|
107
108
|
expanded?: boolean;
|
|
108
109
|
minimalistView?: boolean;
|
|
109
110
|
}
|
|
110
|
-
/** JSON-serializable version of `
|
|
111
|
-
export interface
|
|
111
|
+
/** JSON-serializable version of `AdminMapOptions`. */
|
|
112
|
+
export interface SerializableAdminMapOptions extends SerializableAdminBaseOptions {
|
|
112
113
|
expanded?: boolean;
|
|
113
114
|
minimalistView?: boolean;
|
|
114
115
|
spreadChildren?: boolean;
|
|
@@ -119,7 +120,7 @@ export interface SerializableMapUIConfig extends SerializableBaseUIConfig {
|
|
|
119
120
|
* Keeps: `conditions` (JSON Logic — already serializable by design).
|
|
120
121
|
*/
|
|
121
122
|
export interface SerializableBaseProperty {
|
|
122
|
-
|
|
123
|
+
admin?: SerializableAdminBaseOptions;
|
|
123
124
|
name: string;
|
|
124
125
|
description?: string;
|
|
125
126
|
propertyConfig?: string;
|
|
@@ -139,7 +140,7 @@ export interface SerializableBaseProperty {
|
|
|
139
140
|
}
|
|
140
141
|
/** JSON-serializable `StringProperty`. */
|
|
141
142
|
export interface SerializableStringProperty extends SerializableBaseProperty {
|
|
142
|
-
|
|
143
|
+
admin?: SerializableAdminStringOptions;
|
|
143
144
|
type: "string";
|
|
144
145
|
columnType?: "varchar" | "text" | "char" | "uuid";
|
|
145
146
|
validation?: SerializableStringValidation;
|
|
@@ -152,7 +153,7 @@ export interface SerializableStringProperty extends SerializableBaseProperty {
|
|
|
152
153
|
}
|
|
153
154
|
/** JSON-serializable `NumberProperty`. */
|
|
154
155
|
export interface SerializableNumberProperty extends SerializableBaseProperty {
|
|
155
|
-
|
|
156
|
+
admin?: SerializableAdminNumberOptions;
|
|
156
157
|
type: "number";
|
|
157
158
|
columnType?: "integer" | "real" | "double precision" | "numeric" | "bigint" | "serial" | "bigserial";
|
|
158
159
|
validation?: NumberPropertyValidationSchema;
|
|
@@ -161,13 +162,13 @@ export interface SerializableNumberProperty extends SerializableBaseProperty {
|
|
|
161
162
|
}
|
|
162
163
|
/** JSON-serializable `BooleanProperty`. */
|
|
163
164
|
export interface SerializableBooleanProperty extends SerializableBaseProperty {
|
|
164
|
-
|
|
165
|
+
admin?: SerializableAdminBaseOptions;
|
|
165
166
|
type: "boolean";
|
|
166
167
|
validation?: PropertyValidationSchema;
|
|
167
168
|
}
|
|
168
169
|
/** JSON-serializable `DateProperty`. */
|
|
169
170
|
export interface SerializableDateProperty extends SerializableBaseProperty {
|
|
170
|
-
|
|
171
|
+
admin?: SerializableAdminDateOptions;
|
|
171
172
|
type: "date";
|
|
172
173
|
columnType?: "timestamp" | "date" | "time";
|
|
173
174
|
validation?: SerializableDateValidation;
|
|
@@ -177,13 +178,13 @@ export interface SerializableDateProperty extends SerializableBaseProperty {
|
|
|
177
178
|
}
|
|
178
179
|
/** JSON-serializable `GeopointProperty`. */
|
|
179
180
|
export interface SerializableGeopointProperty extends SerializableBaseProperty {
|
|
180
|
-
|
|
181
|
+
admin?: SerializableAdminBaseOptions;
|
|
181
182
|
type: "geopoint";
|
|
182
183
|
validation?: PropertyValidationSchema;
|
|
183
184
|
}
|
|
184
185
|
/** JSON-serializable `VectorProperty`. */
|
|
185
186
|
export interface SerializableVectorProperty extends SerializableBaseProperty {
|
|
186
|
-
|
|
187
|
+
admin?: SerializableAdminVectorOptions;
|
|
187
188
|
type: "vector";
|
|
188
189
|
dimensions: number;
|
|
189
190
|
validation?: PropertyValidationSchema;
|
|
@@ -198,7 +199,7 @@ export interface SerializableBinaryProperty extends SerializableBaseProperty {
|
|
|
198
199
|
* Already largely serializable; just inherits the serializable base.
|
|
199
200
|
*/
|
|
200
201
|
export interface SerializableReferenceProperty extends SerializableBaseProperty {
|
|
201
|
-
|
|
202
|
+
admin?: SerializableAdminReferenceOptions;
|
|
202
203
|
type: "reference";
|
|
203
204
|
isId?: boolean;
|
|
204
205
|
path?: string;
|
|
@@ -212,7 +213,7 @@ export interface SerializableReferenceProperty extends SerializableBaseProperty
|
|
|
212
213
|
* `() => CollectionConfig` is not serializable.
|
|
213
214
|
*/
|
|
214
215
|
export interface SerializableRelationProperty extends SerializableBaseProperty {
|
|
215
|
-
|
|
216
|
+
admin?: SerializableAdminRelationOptions;
|
|
216
217
|
type: "relation";
|
|
217
218
|
isId?: boolean;
|
|
218
219
|
/** Target collection slug. Function variant is not serializable. */
|
|
@@ -238,7 +239,7 @@ export interface SerializableRelationProperty extends SerializableBaseProperty {
|
|
|
238
239
|
}
|
|
239
240
|
/** JSON-serializable `ArrayProperty`. */
|
|
240
241
|
export interface SerializableArrayProperty extends SerializableBaseProperty {
|
|
241
|
-
|
|
242
|
+
admin?: SerializableAdminArrayOptions;
|
|
242
243
|
type: "array";
|
|
243
244
|
columnType?: "json" | "jsonb" | "text[]" | "integer[]" | "boolean[]" | "numeric[]";
|
|
244
245
|
of?: SerializableProperty | SerializableProperty[];
|
|
@@ -254,7 +255,7 @@ export interface SerializableArrayProperty extends SerializableBaseProperty {
|
|
|
254
255
|
}
|
|
255
256
|
/** JSON-serializable `MapProperty`. */
|
|
256
257
|
export interface SerializableMapProperty extends SerializableBaseProperty {
|
|
257
|
-
|
|
258
|
+
admin?: SerializableAdminMapOptions;
|
|
258
259
|
type: "map";
|
|
259
260
|
columnType?: "json" | "jsonb";
|
|
260
261
|
properties?: SerializableProperties;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
10
|
+
import type { Properties, Property } from "@rebasepro/types";
|
|
11
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
11
12
|
import type { SerializableCollectionConfig, SerializableProperties, SerializableProperty } from "./serializable_types";
|
|
12
13
|
/**
|
|
13
14
|
* Convert a single `Property` to its JSON-serializable form.
|
|
@@ -19,14 +20,14 @@ export declare function toSerializableProperty(property: Property): Serializable
|
|
|
19
20
|
*/
|
|
20
21
|
export declare function toSerializableProperties(properties: Properties): SerializableProperties;
|
|
21
22
|
/**
|
|
22
|
-
* Convert an `
|
|
23
|
+
* Convert an `AdminCollection` to its JSON-serializable form.
|
|
23
24
|
*
|
|
24
25
|
* Strips all non-serializable fields (functions, React nodes, class instances)
|
|
25
26
|
* while preserving the structural schema that the collection editor works with.
|
|
26
27
|
*
|
|
27
28
|
* The result is safe for `JSON.stringify()` and database storage.
|
|
28
29
|
*/
|
|
29
|
-
export declare function toSerializableCollectionConfig(collection:
|
|
30
|
+
export declare function toSerializableCollectionConfig(collection: AdminCollection): SerializableCollectionConfig;
|
|
30
31
|
/**
|
|
31
32
|
* Convert a serializable property back to the original `Property` type.
|
|
32
33
|
*
|
|
@@ -41,10 +42,10 @@ export declare function fromSerializableProperty(serialized: SerializablePropert
|
|
|
41
42
|
*/
|
|
42
43
|
export declare function fromSerializableProperties(serialized: SerializableProperties): Properties;
|
|
43
44
|
/**
|
|
44
|
-
* Convert a `SerializableCollectionConfig` back to an `
|
|
45
|
+
* Convert a `SerializableCollectionConfig` back to an `AdminCollection`.
|
|
45
46
|
*
|
|
46
47
|
* The result will NOT contain any of the non-serializable fields
|
|
47
48
|
* (callbacks, entityActions, etc.) — those must be re-attached by the
|
|
48
49
|
* consumer if needed.
|
|
49
50
|
*/
|
|
50
|
-
export declare function fromSerializableCollectionConfig(serialized: SerializableCollectionConfig):
|
|
51
|
+
export declare function fromSerializableCollectionConfig(serialized: SerializableCollectionConfig): AdminCollection;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CollectionsConfigController } from "./config_controller";
|
|
2
|
-
import { Entity,
|
|
2
|
+
import { Entity, Property } from "@rebasepro/types";
|
|
3
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
3
4
|
/**
|
|
4
5
|
* Controller to open the collection editor dialog.
|
|
5
6
|
* @group Hooks and utilities
|
|
@@ -10,7 +11,7 @@ export interface CollectionEditorController {
|
|
|
10
11
|
path?: string;
|
|
11
12
|
parentCollectionSlugs: string[];
|
|
12
13
|
parentEntityIds: string[];
|
|
13
|
-
parentCollection?:
|
|
14
|
+
parentCollection?: AdminCollection;
|
|
14
15
|
existingEntities?: Entity<any>[];
|
|
15
16
|
/**
|
|
16
17
|
* Initial view to open: "general", "display", or "properties"
|
|
@@ -32,10 +33,10 @@ export interface CollectionEditorController {
|
|
|
32
33
|
* A collection to duplicate from. If provided, the new collection will be
|
|
33
34
|
* pre-populated with the same properties (but with empty name, path, and id).
|
|
34
35
|
*/
|
|
35
|
-
copyFrom?:
|
|
36
|
+
copyFrom?: AdminCollection;
|
|
36
37
|
parentCollectionSlugs: string[];
|
|
37
38
|
parentEntityIds: string[];
|
|
38
|
-
parentCollection?:
|
|
39
|
+
parentCollection?: AdminCollection;
|
|
39
40
|
redirect: boolean;
|
|
40
41
|
sourceClick?: string;
|
|
41
42
|
}) => void;
|
|
@@ -46,7 +47,7 @@ export interface CollectionEditorController {
|
|
|
46
47
|
editedCollectionId: string;
|
|
47
48
|
parentCollectionSlugs: string[];
|
|
48
49
|
parentEntityIds: string[];
|
|
49
|
-
collection:
|
|
50
|
+
collection: AdminCollection;
|
|
50
51
|
existingEntities: Entity<any>[];
|
|
51
52
|
}) => void;
|
|
52
53
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterValues } from "@rebasepro/types";
|
|
2
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
2
3
|
/**
|
|
3
4
|
* This function is used to infer the configuration of a collection given its path.
|
|
4
5
|
* @param path - The path of the collection
|
|
@@ -7,4 +8,4 @@ import { CollectionConfig, FilterValues } from "@rebasepro/types";
|
|
|
7
8
|
* @param initialFilter - Optional filter values from the collection configuration
|
|
8
9
|
* @param initialSort - Optional sort configuration from the collection
|
|
9
10
|
*/
|
|
10
|
-
export type CollectionInference = (path: string, parentCollectionPaths: string[], databaseId?: string, initialFilter?: FilterValues<string>, initialSort?: [string, "asc" | "desc"]) => Promise<Partial<
|
|
11
|
+
export type CollectionInference = (path: string, parentCollectionPaths: string[], databaseId?: string, initialFilter?: FilterValues<string>, initialSort?: [string, "asc" | "desc"]) => Promise<Partial<AdminCollection> | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Property } from "@rebasepro/types";
|
|
2
|
+
import { NavigationGroupMapping, AdminCollection } from "@rebasepro/admin-types";
|
|
2
3
|
export interface CollectionsSetupInfo {
|
|
3
4
|
status: "ongoing" | "complete" | "error";
|
|
4
5
|
error: string | null;
|
|
@@ -9,7 +10,7 @@ export interface CollectionsSetupInfo {
|
|
|
9
10
|
*/
|
|
10
11
|
export interface CollectionsConfigController {
|
|
11
12
|
loading: boolean;
|
|
12
|
-
collections?:
|
|
13
|
+
collections?: AdminCollection[];
|
|
13
14
|
/**
|
|
14
15
|
* If true, the configuration cannot be modified.
|
|
15
16
|
* Use readOnlyReason to explain why.
|
|
@@ -24,7 +25,7 @@ export interface CollectionsConfigController {
|
|
|
24
25
|
* Stored in the project config document at `collectionsSetup`.
|
|
25
26
|
*/
|
|
26
27
|
collectionsSetup?: CollectionsSetupInfo;
|
|
27
|
-
getCollection: (id: string) =>
|
|
28
|
+
getCollection: (id: string) => AdminCollection;
|
|
28
29
|
saveCollection: <M extends {
|
|
29
30
|
[Key: string]: any;
|
|
30
31
|
}>(params: SaveCollectionParams<M>) => Promise<void>;
|
|
@@ -47,14 +48,14 @@ export interface CollectionsConfigController {
|
|
|
47
48
|
}
|
|
48
49
|
export type UpdateCollectionParams<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
49
50
|
id: string;
|
|
50
|
-
collectionData: Partial<
|
|
51
|
+
collectionData: Partial<AdminCollection<M>>;
|
|
51
52
|
previousId?: string;
|
|
52
53
|
parentCollectionSlugs?: string[];
|
|
53
54
|
parentEntityIds?: string[];
|
|
54
55
|
};
|
|
55
56
|
export type SaveCollectionParams<M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
56
57
|
id: string;
|
|
57
|
-
collectionData:
|
|
58
|
+
collectionData: AdminCollection<M>;
|
|
58
59
|
previousId?: string;
|
|
59
60
|
parentCollectionSlugs?: string[];
|
|
60
61
|
parentEntityIds?: string[];
|
|
@@ -85,14 +86,14 @@ export type UpdatePropertiesOrderParams = {
|
|
|
85
86
|
fullPath: string;
|
|
86
87
|
parentCollectionSlugs: string[];
|
|
87
88
|
parentEntityIds: string[];
|
|
88
|
-
collection:
|
|
89
|
+
collection: AdminCollection;
|
|
89
90
|
newPropertiesOrder: string[];
|
|
90
91
|
};
|
|
91
92
|
export type UpdateKanbanColumnsOrderParams = {
|
|
92
93
|
fullPath: string;
|
|
93
94
|
parentCollectionSlugs: string[];
|
|
94
95
|
parentEntityIds: string[];
|
|
95
|
-
collection:
|
|
96
|
+
collection: AdminCollection;
|
|
96
97
|
kanbanColumnProperty: string;
|
|
97
98
|
newColumnsOrder: string[];
|
|
98
99
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
3
3
|
/**
|
|
4
4
|
* Component rendered at the end of the Kanban board to add new columns (enum values).
|
|
5
5
|
* Opens a dialog to input a new enum value for the column property.
|
|
6
6
|
*/
|
|
7
7
|
export declare function AddKanbanColumnAction({ collection, fullPath, parentCollectionSlugs, parentEntityIds, columnProperty }: {
|
|
8
|
-
collection:
|
|
8
|
+
collection: AdminCollection;
|
|
9
9
|
fullPath: string;
|
|
10
10
|
parentCollectionSlugs: string[];
|
|
11
11
|
parentEntityIds: string[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Property } from "@rebasepro/types";
|
|
2
|
+
import { EntityTableController, AdminCollection } from "@rebasepro/admin-types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
export declare function CollectionViewHeaderAction({ propertyKey, onHover, property, path, parentCollectionSlugs, parentEntityIds, collection, tableController }: {
|
|
4
5
|
property: Property;
|
|
@@ -7,6 +8,6 @@ export declare function CollectionViewHeaderAction({ propertyKey, onHover, prope
|
|
|
7
8
|
path: string;
|
|
8
9
|
parentCollectionSlugs: string[];
|
|
9
10
|
parentEntityIds: string[];
|
|
10
|
-
collection:
|
|
11
|
+
collection: AdminCollection;
|
|
11
12
|
tableController: EntityTableController;
|
|
12
13
|
}): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CollectionActionsProps } from "@rebasepro/types";
|
|
1
|
+
import { CollectionActionsProps } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function EditorCollectionAction({ path, parentCollectionSlugs, parentEntityIds, collection, tableController }: CollectionActionsProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CollectionActionsProps } from "@rebasepro/types";
|
|
1
|
+
import { CollectionActionsProps } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function EditorCollectionActionStart({ path, parentCollectionSlugs, parentEntityIds, collection, tableController }: CollectionActionsProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginFormActionProps } from "@rebasepro/types";
|
|
1
|
+
import { PluginFormActionProps } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function EditorEntityAction({ path, parentCollectionSlugs, parentEntityIds, collection, formContext }: PluginFormActionProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginHomePageActionsProps } from "@rebasepro/types";
|
|
1
|
+
import { PluginHomePageActionsProps } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function HomePageEditorCollectionAction({ slug, collection }: PluginHomePageActionsProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
3
3
|
/**
|
|
4
4
|
* Component rendered when Kanban view is missing orderProperty configuration.
|
|
5
5
|
* Provides a CTA button to open the collection editor to configure Kanban.
|
|
6
6
|
*/
|
|
7
7
|
export declare function KanbanSetupAction({ collection, fullPath, parentCollectionSlugs, parentEntityIds }: {
|
|
8
|
-
collection:
|
|
8
|
+
collection: AdminCollection;
|
|
9
9
|
fullPath: string;
|
|
10
10
|
parentCollectionSlugs: string[];
|
|
11
11
|
parentEntityIds: string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginHomePageAdditionalCardsProps } from "@rebasepro/types";
|
|
1
|
+
import { PluginHomePageAdditionalCardsProps } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function NewCollectionCard({ group, context }: PluginHomePageAdditionalCardsProps): import("react").JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityTableController, AdminCollection } from "@rebasepro/admin-types";
|
|
2
2
|
export declare function PropertyAddColumnComponent({ path, parentCollectionSlugs, parentEntityIds, collection, tableController }: {
|
|
3
3
|
path: string;
|
|
4
4
|
parentCollectionSlugs: string[];
|
|
5
5
|
parentEntityIds: string[];
|
|
6
|
-
collection:
|
|
6
|
+
collection: AdminCollection;
|
|
7
7
|
tableController: EntityTableController;
|
|
8
8
|
}): import("react").JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CollectionConfig } from "@rebasepro/types";
|
|
3
2
|
import { CollectionGenerationCallback, CollectionOperation } from "../../api/generateCollectionApi";
|
|
3
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
4
4
|
export interface AICollectionGeneratorPopoverProps {
|
|
5
5
|
/**
|
|
6
6
|
* Current collection being edited (if modifying an existing collection)
|
|
7
7
|
*/
|
|
8
|
-
existingCollection?:
|
|
8
|
+
existingCollection?: AdminCollection<any>;
|
|
9
9
|
/**
|
|
10
10
|
* Callback when a collection is generated or modified.
|
|
11
11
|
* Includes the collection and optionally the operations that were applied.
|
|
12
12
|
*/
|
|
13
|
-
onGenerated: (collection:
|
|
13
|
+
onGenerated: (collection: AdminCollection, operations?: CollectionOperation[]) => void;
|
|
14
14
|
/**
|
|
15
15
|
* Callback function for generating/modifying collections.
|
|
16
16
|
* The plugin is API-agnostic - the consumer provides the implementation.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
3
3
|
export declare function CollectionDetailsForm({ isNewCollection, existingPaths, existingIds, parentCollection, expandKanban }: {
|
|
4
4
|
isNewCollection: boolean;
|
|
5
5
|
existingPaths?: string[];
|
|
6
6
|
existingIds?: string[];
|
|
7
|
-
parentCollection?:
|
|
7
|
+
parentCollection?: AdminCollection;
|
|
8
8
|
parentCollectionSlugs?: string[];
|
|
9
9
|
parentEntityIds?: string[];
|
|
10
10
|
expandKanban?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { Entity,
|
|
2
|
+
import { Entity, TableMetadata, User } from "@rebasepro/types";
|
|
3
|
+
import { AdminCollection } from "@rebasepro/admin-types";
|
|
3
4
|
import { CollectionsConfigController } from "../../types/config_controller";
|
|
4
5
|
import { CollectionInference } from "../../types/collection_inference";
|
|
5
6
|
import { CollectionGenerationCallback } from "../../api/generateCollectionApi";
|
|
@@ -15,12 +16,12 @@ export interface CollectionEditorDialogProps extends CollectionEditorExtensionPr
|
|
|
15
16
|
* A collection to duplicate from. If provided, the new collection will be
|
|
16
17
|
* pre-populated with the same properties (but with empty name, path, and id).
|
|
17
18
|
*/
|
|
18
|
-
copyFrom?:
|
|
19
|
+
copyFrom?: AdminCollection;
|
|
19
20
|
editedCollectionId?: string;
|
|
20
21
|
path?: string;
|
|
21
22
|
parentCollectionSlugs?: string[];
|
|
22
23
|
parentEntityIds?: string[];
|
|
23
|
-
handleClose: (collection?:
|
|
24
|
+
handleClose: (collection?: AdminCollection) => void;
|
|
24
25
|
configController: CollectionsConfigController;
|
|
25
26
|
collectionInference?: CollectionInference;
|
|
26
27
|
extraView?: {
|
|
@@ -31,7 +32,7 @@ export interface CollectionEditorDialogProps extends CollectionEditorExtensionPr
|
|
|
31
32
|
};
|
|
32
33
|
getUser?: (uid: string) => User | null;
|
|
33
34
|
getData?: (path: string, parentPaths: string[]) => Promise<object[]>;
|
|
34
|
-
parentCollection?:
|
|
35
|
+
parentCollection?: AdminCollection;
|
|
35
36
|
existingEntities?: Entity<any>[];
|
|
36
37
|
/**
|
|
37
38
|
* Initial view to open when editing: "general", "display", or "properties".
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CollectionConfig } from "@rebasepro/types";
|
|
3
2
|
import { CollectionGenerationCallback } from "../../api/generateCollectionApi";
|
|
3
|
+
import type { AdminCollection } from "@rebasepro/admin-types";
|
|
4
4
|
export declare function CollectionEditorWelcomeView({ path, parentCollection, onContinue, existingCollectionPaths, generateCollection, onAnalyticsEvent, unmappedTables, onImportFromTable }: {
|
|
5
5
|
path: string;
|
|
6
|
-
parentCollection?:
|
|
6
|
+
parentCollection?: AdminCollection;
|
|
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 type { AdminCollection } from "@rebasepro/admin-types";
|
|
3
3
|
export interface CollectionJsonImportDialogProps {
|
|
4
4
|
open: boolean;
|
|
5
5
|
onClose: () => void;
|
|
6
|
-
onImport: (collection:
|
|
6
|
+
onImport: (collection: AdminCollection) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function CollectionJsonImportDialog({ open, onClose, onImport }: CollectionJsonImportDialogProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { User } from "@rebasepro/types";
|
|
3
|
+
import { PropertyConfig, AdminCollection } from "@rebasepro/admin-types";
|
|
3
4
|
import type { PropertyTypePreset, PropertyType } from "../../extensibility_types";
|
|
4
5
|
import type { SerializableProperty, SerializableCollectionConfig } from "../../serializable_types";
|
|
5
6
|
type CollectionEditorFormProps = {
|
|
@@ -11,7 +12,7 @@ type CollectionEditorFormProps = {
|
|
|
11
12
|
extraIcon: React.ReactNode;
|
|
12
13
|
getUser?: (uid: string) => User | null;
|
|
13
14
|
getData?: () => Promise<object[]>;
|
|
14
|
-
doCollectionInference?: (collection:
|
|
15
|
+
doCollectionInference?: (collection: AdminCollection) => Promise<Partial<AdminCollection> | null> | undefined;
|
|
15
16
|
propertyConfigs: Record<string, PropertyConfig>;
|
|
16
17
|
propertyTypePresets?: PropertyTypePreset[];
|
|
17
18
|
hiddenPropertyTypes?: PropertyType[];
|