@rebasepro/core 0.0.1-canary.2 → 0.0.1-canary.4d4fb3e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/ErrorView.d.ts +1 -1
- package/dist/components/LanguageToggle.d.ts +1 -0
- package/dist/components/LoginView/LoginView.d.ts +68 -0
- package/dist/components/LoginView/index.d.ts +2 -0
- package/dist/components/RebaseAuth.d.ts +10 -0
- package/dist/components/UserSelectPopover.d.ts +62 -0
- package/dist/components/common/index.d.ts +3 -3
- package/dist/components/common/types.d.ts +2 -1
- package/dist/components/common/useColumnsIds.d.ts +6 -3
- package/dist/components/common/{useDataSourceTableController.d.ts → useDataTableController.d.ts} +5 -4
- package/dist/components/index.d.ts +6 -25
- package/dist/contexts/CustomizationControllerContext.d.ts +1 -1
- package/dist/contexts/DataDriverContext.d.ts +3 -0
- package/dist/contexts/DatabaseAdminContext.d.ts +3 -0
- package/dist/contexts/DialogsProvider.d.ts +1 -1
- package/dist/contexts/EffectiveRoleController.d.ts +1 -1
- package/dist/contexts/RebaseClientInstanceContext.d.ts +6 -0
- package/dist/contexts/RebaseDataContext.d.ts +3 -0
- package/dist/contexts/index.d.ts +3 -5
- package/dist/core/PluginLifecycleManager.d.ts +17 -0
- package/dist/core/PluginProviderStack.d.ts +21 -0
- package/dist/core/Rebase.d.ts +2 -1
- package/dist/core/RebaseProps.d.ts +136 -0
- package/dist/core/index.d.ts +1 -6
- package/dist/hooks/data/delete.d.ts +7 -9
- package/dist/hooks/data/save.d.ts +7 -10
- package/dist/hooks/data/useCollectionFetch.d.ts +3 -2
- package/dist/hooks/data/useData.d.ts +13 -0
- package/dist/hooks/data/useEntityFetch.d.ts +4 -3
- package/dist/hooks/data/useRelationSelector.d.ts +9 -2
- package/dist/hooks/index.d.ts +8 -13
- package/dist/hooks/useAuthSubscription.d.ts +2 -0
- package/dist/hooks/useBridgeRegistration.d.ts +18 -0
- package/dist/hooks/useBuildEffectiveRoleController.d.ts +1 -1
- package/dist/hooks/useCustomizationController.d.ts +1 -1
- package/dist/hooks/useDialogsController.d.ts +1 -1
- package/dist/hooks/usePermissions.d.ts +2 -1
- package/dist/hooks/useRebaseClient.d.ts +5 -0
- package/dist/hooks/useRebaseRegistry.d.ts +34 -0
- package/dist/hooks/useSlot.d.ts +18 -0
- package/dist/hooks/useSnackbarController.d.ts +1 -1
- package/dist/hooks/useStorageSource.d.ts +2 -1
- package/dist/hooks/useStudioBridge.d.ts +91 -0
- package/dist/hooks/useTranslation.d.ts +17 -0
- package/dist/hooks/useValidateAuthenticator.d.ts +4 -4
- package/dist/i18n/RebaseI18nProvider.d.ts +33 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.es.js +13861 -32681
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +13843 -32679
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/de.d.ts +2 -0
- package/dist/locales/en.d.ts +10 -0
- package/dist/locales/es.d.ts +10 -0
- package/dist/locales/fr.d.ts +2 -0
- package/dist/locales/hi.d.ts +2 -0
- package/dist/locales/it.d.ts +2 -0
- package/dist/locales/pt.d.ts +7 -0
- package/dist/util/icon_list.d.ts +1 -1
- package/dist/util/index.d.ts +0 -2
- package/dist/util/previews.d.ts +2 -1
- package/dist/util/useStorageUploadController.d.ts +5 -3
- package/dist/vitePlugin.js +30 -0
- package/package.json +18 -37
- package/src/components/ConfirmationDialog.tsx +4 -2
- package/src/components/Debug/UIReferenceView.tsx +238 -0
- package/src/components/ErrorView.tsx +1 -1
- package/src/components/LanguageToggle.tsx +66 -0
- package/src/components/LoginView/LoginView.tsx +727 -0
- package/src/components/LoginView/index.ts +2 -0
- package/src/components/NotFoundPage.tsx +5 -3
- package/src/components/RebaseAuth.tsx +27 -0
- package/src/components/UnsavedChangesDialog.tsx +6 -3
- package/src/components/UserDisplay.tsx +1 -2
- package/src/components/UserSelectPopover.tsx +424 -0
- package/src/components/UserSettingsView.tsx +12 -11
- package/src/components/common/index.ts +3 -3
- package/src/components/common/types.tsx +2 -1
- package/src/components/common/useColumnsIds.tsx +31 -19
- package/src/components/common/{useDataSourceTableController.tsx → useDataTableController.tsx} +63 -57
- package/src/components/index.tsx +12 -32
- package/src/contexts/CustomizationControllerContext.tsx +1 -1
- package/src/contexts/DataDriverContext.tsx +4 -0
- package/src/contexts/DatabaseAdminContext.tsx +4 -0
- package/src/contexts/DialogsProvider.tsx +2 -1
- package/src/contexts/EffectiveRoleController.tsx +2 -1
- package/src/contexts/RebaseClientInstanceContext.tsx +7 -0
- package/src/contexts/RebaseDataContext.tsx +4 -0
- package/src/contexts/index.ts +3 -5
- package/src/core/PluginLifecycleManager.tsx +95 -0
- package/src/core/PluginProviderStack.tsx +40 -0
- package/src/core/Rebase.tsx +151 -104
- package/src/core/RebaseProps.tsx +166 -0
- package/src/core/RebaseRoutes.tsx +3 -26
- package/src/core/index.tsx +1 -10
- package/src/hooks/data/delete.ts +8 -22
- package/src/hooks/data/save.ts +17 -19
- package/src/hooks/data/useCollectionFetch.tsx +42 -36
- package/src/hooks/data/useData.tsx +18 -0
- package/src/hooks/data/useEntityFetch.tsx +12 -25
- package/src/hooks/data/useRelationSelector.tsx +93 -49
- package/src/hooks/index.tsx +10 -15
- package/src/hooks/useAuthSubscription.ts +80 -0
- package/src/hooks/useBackendStorageSource.ts +25 -10
- package/src/hooks/useBridgeRegistration.tsx +32 -0
- package/src/hooks/useBrowserTitleAndIcon.tsx +1 -3
- package/src/hooks/useBuildAdminModeController.tsx +3 -3
- package/src/hooks/useBuildEffectiveRoleController.tsx +2 -1
- package/src/hooks/useBuildLocalConfigurationPersistence.tsx +2 -1
- package/src/hooks/useCustomizationController.tsx +1 -1
- package/src/hooks/useDialogsController.tsx +2 -1
- package/src/hooks/usePermissions.ts +2 -1
- package/src/hooks/useRebaseClient.tsx +10 -0
- package/src/hooks/useRebaseContext.tsx +18 -29
- package/src/hooks/useRebaseRegistry.tsx +88 -0
- package/src/hooks/useSlot.tsx +38 -0
- package/src/hooks/useSnackbarController.tsx +2 -2
- package/src/hooks/useStorageSource.tsx +2 -1
- package/src/hooks/useStudioBridge.tsx +215 -0
- package/src/hooks/useTranslation.ts +31 -0
- package/src/hooks/useValidateAuthenticator.tsx +6 -6
- package/src/i18n/RebaseI18nProvider.tsx +160 -0
- package/src/index.ts +11 -9
- package/src/locales/de.ts +850 -0
- package/src/locales/en.ts +898 -0
- package/src/locales/es.ts +860 -0
- package/src/locales/fr.ts +849 -0
- package/src/locales/hi.ts +849 -0
- package/src/locales/it.ts +849 -0
- package/src/locales/pt.ts +857 -0
- package/src/util/entity_cache.ts +17 -20
- package/src/util/icon_list.ts +1 -2
- package/src/util/icons.tsx +1 -2
- package/src/util/index.ts +2 -2
- package/src/util/previews.ts +25 -6
- package/src/util/useStorageUploadController.tsx +18 -29
- package/dist/app/AppBar.d.ts +0 -12
- package/dist/app/Drawer.d.ts +0 -19
- package/dist/app/Scaffold.d.ts +0 -34
- package/dist/app/index.d.ts +0 -4
- package/dist/app/useApp.d.ts +0 -17
- package/dist/components/AdminModeSyncer.d.ts +0 -17
- package/dist/components/ArrayContainer.d.ts +0 -59
- package/dist/components/CircularProgressCenter.d.ts +0 -11
- package/dist/components/ClearFilterSortButton.d.ts +0 -5
- package/dist/components/DeleteEntityDialog.d.ts +0 -12
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +0 -37
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -27
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +0 -128
- package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +0 -25
- package/dist/components/EntityCollectionTable/column_utils.d.ts +0 -15
- package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +0 -20
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +0 -21
- package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +0 -21
- package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +0 -20
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +0 -32
- package/dist/components/EntityCollectionTable/index.d.ts +0 -6
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +0 -16
- package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +0 -32
- package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +0 -9
- package/dist/components/EntityCollectionTable/internal/common.d.ts +0 -4
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +0 -26
- package/dist/components/EntityCollectionTable/internal/popup_field/useDraggable.d.ts +0 -13
- package/dist/components/EntityCollectionTable/internal/popup_field/useWindowSize.d.ts +0 -6
- package/dist/components/EntityCollectionView/Board.d.ts +0 -2
- package/dist/components/EntityCollectionView/BoardColumn.d.ts +0 -42
- package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +0 -9
- package/dist/components/EntityCollectionView/BoardSortableList.d.ts +0 -14
- package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +0 -26
- package/dist/components/EntityCollectionView/EntityCard.d.ts +0 -19
- package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +0 -20
- package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +0 -31
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +0 -54
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +0 -14
- package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +0 -15
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +0 -14
- package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +0 -44
- package/dist/components/EntityCollectionView/board_types.d.ts +0 -105
- package/dist/components/EntityCollectionView/useBoardDataController.d.ts +0 -60
- package/dist/components/EntityCollectionView/useSelectionController.d.ts +0 -2
- package/dist/components/EntityCollectionView/utils.d.ts +0 -3
- package/dist/components/EntityJsonPreview.d.ts +0 -3
- package/dist/components/EntityPreview.d.ts +0 -54
- package/dist/components/EntityView.d.ts +0 -11
- package/dist/components/ErrorBoundary.d.ts +0 -11
- package/dist/components/FieldCaption.d.ts +0 -5
- package/dist/components/HomePage/ContentHomePage.d.ts +0 -11
- package/dist/components/HomePage/FavouritesView.d.ts +0 -3
- package/dist/components/HomePage/HomePageDnD.d.ts +0 -77
- package/dist/components/HomePage/NavigationCard.d.ts +0 -10
- package/dist/components/HomePage/NavigationCardBinding.d.ts +0 -18
- package/dist/components/HomePage/NavigationGroup.d.ts +0 -11
- package/dist/components/HomePage/RenameGroupDialog.d.ts +0 -9
- package/dist/components/HomePage/SmallNavigationCard.d.ts +0 -6
- package/dist/components/HomePage/StudioHomePage.d.ts +0 -9
- package/dist/components/HomePage/index.d.ts +0 -5
- package/dist/components/PropertyCollectionView.d.ts +0 -22
- package/dist/components/PropertyConfigBadge.d.ts +0 -6
- package/dist/components/PropertyIdCopyTooltip.d.ts +0 -8
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +0 -58
- package/dist/components/ReferenceWidget.d.ts +0 -29
- package/dist/components/RelationSelector.d.ts +0 -32
- package/dist/components/SearchIconsView.d.ts +0 -5
- package/dist/components/SelectableTable/SelectableTable.d.ts +0 -89
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +0 -4
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +0 -9
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +0 -12
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +0 -15
- package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +0 -12
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +0 -13
- package/dist/components/VirtualTable/VirtualTable.d.ts +0 -11
- package/dist/components/VirtualTable/VirtualTableCell.d.ts +0 -20
- package/dist/components/VirtualTable/VirtualTableHeader.d.ts +0 -29
- package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +0 -2
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +0 -239
- package/dist/components/VirtualTable/VirtualTableRow.d.ts +0 -3
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +0 -12
- package/dist/components/VirtualTable/fields/VirtualTableInput.d.ts +0 -9
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +0 -8
- package/dist/components/VirtualTable/fields/VirtualTableSelect.d.ts +0 -15
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.d.ts +0 -7
- package/dist/components/VirtualTable/fields/VirtualTableUserSelect.d.ts +0 -12
- package/dist/components/VirtualTable/index.d.ts +0 -3
- package/dist/components/VirtualTable/types.d.ts +0 -37
- package/dist/components/admin/RoleChip.d.ts +0 -4
- package/dist/components/admin/RolesView.d.ts +0 -4
- package/dist/components/admin/UsersView.d.ts +0 -4
- package/dist/components/admin/index.d.ts +0 -3
- package/dist/components/common/default_entity_actions.d.ts +0 -4
- package/dist/components/common/useDebouncedCallback.d.ts +0 -1
- package/dist/components/common/useTableSearchHelper.d.ts +0 -11
- package/dist/contexts/BreacrumbsContext.d.ts +0 -8
- package/dist/contexts/DataSourceContext.d.ts +0 -3
- package/dist/contexts/NavigationContext.d.ts +0 -3
- package/dist/contexts/SideDialogsControllerContext.d.ts +0 -3
- package/dist/contexts/SideEntityControllerContext.d.ts +0 -3
- package/dist/core/DefaultAppBar.d.ts +0 -29
- package/dist/core/DefaultDrawer.d.ts +0 -29
- package/dist/core/DrawerNavigationGroup.d.ts +0 -45
- package/dist/core/DrawerNavigationItem.d.ts +0 -10
- package/dist/core/EntityEditView.d.ts +0 -47
- package/dist/core/EntityEditViewFormActions.d.ts +0 -2
- package/dist/core/EntitySidePanel.d.ts +0 -10
- package/dist/core/SideDialogs.d.ts +0 -25
- package/dist/core/field_configs.d.ts +0 -6
- package/dist/form/EntityForm.d.ts +0 -7
- package/dist/form/EntityFormActions.d.ts +0 -2
- package/dist/form/PropertyFieldBinding.d.ts +0 -30
- package/dist/form/components/ErrorFocus.d.ts +0 -4
- package/dist/form/components/FieldHelperText.d.ts +0 -12
- package/dist/form/components/FormEntry.d.ts +0 -6
- package/dist/form/components/FormLayout.d.ts +0 -5
- package/dist/form/components/LabelWithIcon.d.ts +0 -14
- package/dist/form/components/LabelWithIconAndTooltip.d.ts +0 -15
- package/dist/form/components/LocalChangesMenu.d.ts +0 -11
- package/dist/form/components/StorageItemPreview.d.ts +0 -13
- package/dist/form/components/StorageUploadProgress.d.ts +0 -10
- package/dist/form/components/index.d.ts +0 -5
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +0 -11
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +0 -10
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +0 -11
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +0 -7
- package/dist/form/field_bindings/MapFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +0 -11
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +0 -10
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +0 -2
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +0 -10
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +0 -10
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +0 -19
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +0 -9
- package/dist/form/field_bindings/TextFieldBinding.d.ts +0 -8
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +0 -12
- package/dist/form/index.d.ts +0 -20
- package/dist/form/useClearRestoreValue.d.ts +0 -13
- package/dist/form/validation.d.ts +0 -26
- package/dist/hooks/data/useDataSource.d.ts +0 -6
- package/dist/hooks/navigation/contexts/CMSUrlContext.d.ts +0 -4
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +0 -4
- package/dist/hooks/navigation/contexts/NavigationStateContext.d.ts +0 -4
- package/dist/hooks/navigation/contexts/index.d.ts +0 -3
- package/dist/hooks/navigation/useBuildCMSUrlController.d.ts +0 -6
- package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +0 -7
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +0 -32
- package/dist/hooks/navigation/useNavigationRegistry.d.ts +0 -10
- package/dist/hooks/navigation/useNavigationResolution.d.ts +0 -5
- package/dist/hooks/navigation/useNavigationURLs.d.ts +0 -11
- package/dist/hooks/navigation/useResolvedCollections.d.ts +0 -26
- package/dist/hooks/navigation/useResolvedViews.d.ts +0 -28
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +0 -26
- package/dist/hooks/navigation/utils.d.ts +0 -12
- package/dist/hooks/useBreadcrumbsController.d.ts +0 -42
- package/dist/hooks/useBuildNavigationController.d.ts +0 -16
- package/dist/hooks/useEntitySelectionDialog.d.ts +0 -18
- package/dist/hooks/useResolvedNavigationFrom.d.ts +0 -72
- package/dist/hooks/useSideDialogsController.d.ts +0 -18
- package/dist/hooks/useSideEntityController.d.ts +0 -12
- package/dist/internal/useBuildDataSource.d.ts +0 -12
- package/dist/internal/useBuildSideDialogsController.d.ts +0 -2
- package/dist/internal/useBuildSideEntityController.d.ts +0 -4
- package/dist/preview/PropertyPreview.d.ts +0 -6
- package/dist/preview/components/ArrayEnumPreview.d.ts +0 -10
- package/dist/preview/components/AsyncPreviewComponent.d.ts +0 -11
- package/dist/preview/components/BooleanPreview.d.ts +0 -10
- package/dist/preview/components/DatePreview.d.ts +0 -17
- package/dist/preview/components/EmptyValue.d.ts +0 -6
- package/dist/preview/components/EnumValuesChip.d.ts +0 -13
- package/dist/preview/components/ImagePreview.d.ts +0 -16
- package/dist/preview/components/ReferencePreview.d.ts +0 -16
- package/dist/preview/components/RelationPreview.d.ts +0 -16
- package/dist/preview/components/StorageThumbnail.d.ts +0 -15
- package/dist/preview/components/UrlComponentPreview.d.ts +0 -13
- package/dist/preview/components/UserPreview.d.ts +0 -8
- package/dist/preview/index.d.ts +0 -24
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +0 -5
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +0 -5
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +0 -8
- package/dist/preview/property_previews/NumberPropertyPreview.d.ts +0 -6
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +0 -13
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +0 -6
- package/dist/preview/util.d.ts +0 -6
- package/dist/routes/CustomCMSRoute.d.ts +0 -4
- package/dist/routes/RebaseRoute.d.ts +0 -1
- package/dist/routes/index.d.ts +0 -2
- package/dist/util/property_utils.d.ts +0 -23
- package/dist/util/useDebouncedCallback.d.ts +0 -1
- package/src/app/AppBar.tsx +0 -18
- package/src/app/Drawer.tsx +0 -30
- package/src/app/Scaffold.tsx +0 -238
- package/src/app/index.ts +0 -4
- package/src/app/useApp.tsx +0 -36
- package/src/components/AdminModeSyncer.tsx +0 -47
- package/src/components/ArrayContainer.tsx +0 -549
- package/src/components/CircularProgressCenter.tsx +0 -26
- package/src/components/ClearFilterSortButton.tsx +0 -44
- package/src/components/DeleteEntityDialog.tsx +0 -181
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +0 -225
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +0 -383
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +0 -180
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +0 -561
- package/src/components/EntityCollectionTable/column_utils.tsx +0 -74
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +0 -122
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +0 -169
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +0 -177
- package/src/components/EntityCollectionTable/fields/TableRelationSelectorField.tsx +0 -42
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +0 -315
- package/src/components/EntityCollectionTable/index.tsx +0 -12
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +0 -90
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +0 -311
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +0 -82
- package/src/components/EntityCollectionTable/internal/common.tsx +0 -72
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +0 -425
- package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +0 -96
- package/src/components/EntityCollectionTable/internal/popup_field/useWindowSize.tsx +0 -20
- package/src/components/EntityCollectionView/Board.tsx +0 -324
- package/src/components/EntityCollectionView/BoardColumn.tsx +0 -158
- package/src/components/EntityCollectionView/BoardColumnTitle.tsx +0 -45
- package/src/components/EntityCollectionView/BoardSortableList.tsx +0 -172
- package/src/components/EntityCollectionView/EntityBoardCard.tsx +0 -200
- package/src/components/EntityCollectionView/EntityCard.tsx +0 -225
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +0 -746
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +0 -254
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +0 -1220
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +0 -142
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +0 -131
- package/src/components/EntityCollectionView/FiltersDialog.tsx +0 -249
- package/src/components/EntityCollectionView/ViewModeToggle.tsx +0 -194
- package/src/components/EntityCollectionView/board_types.ts +0 -113
- package/src/components/EntityCollectionView/useBoardDataController.tsx +0 -490
- package/src/components/EntityCollectionView/useSelectionController.tsx +0 -43
- package/src/components/EntityCollectionView/utils.ts +0 -19
- package/src/components/EntityJsonPreview.tsx +0 -66
- package/src/components/EntityPreview.tsx +0 -367
- package/src/components/EntityView.tsx +0 -66
- package/src/components/ErrorBoundary.tsx +0 -40
- package/src/components/FieldCaption.tsx +0 -14
- package/src/components/HomePage/ContentHomePage.tsx +0 -634
- package/src/components/HomePage/FavouritesView.tsx +0 -59
- package/src/components/HomePage/HomePageDnD.tsx +0 -702
- package/src/components/HomePage/NavigationCard.tsx +0 -80
- package/src/components/HomePage/NavigationCardBinding.tsx +0 -111
- package/src/components/HomePage/NavigationGroup.tsx +0 -154
- package/src/components/HomePage/RenameGroupDialog.tsx +0 -121
- package/src/components/HomePage/SmallNavigationCard.tsx +0 -45
- package/src/components/HomePage/StudioHomePage.tsx +0 -231
- package/src/components/HomePage/index.tsx +0 -6
- package/src/components/PropertyCollectionView.tsx +0 -333
- package/src/components/PropertyConfigBadge.tsx +0 -27
- package/src/components/PropertyIdCopyTooltip.tsx +0 -47
- package/src/components/ReferenceTable/EntitySelectionTable.tsx +0 -371
- package/src/components/ReferenceWidget.tsx +0 -152
- package/src/components/RelationSelector.tsx +0 -518
- package/src/components/SearchIconsView.tsx +0 -78
- package/src/components/SelectableTable/SelectableTable.tsx +0 -344
- package/src/components/SelectableTable/SelectableTableContext.tsx +0 -6
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +0 -49
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +0 -126
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +0 -203
- package/src/components/SelectableTable/filters/RelationFilterField.tsx +0 -138
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +0 -217
- package/src/components/VirtualTable/VirtualTable.performance.test.tsx +0 -386
- package/src/components/VirtualTable/VirtualTable.tsx +0 -625
- package/src/components/VirtualTable/VirtualTableCell.tsx +0 -58
- package/src/components/VirtualTable/VirtualTableHeader.tsx +0 -275
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +0 -249
- package/src/components/VirtualTable/VirtualTableProps.tsx +0 -298
- package/src/components/VirtualTable/VirtualTableRow.tsx +0 -52
- package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +0 -39
- package/src/components/VirtualTable/fields/VirtualTableInput.tsx +0 -93
- package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +0 -83
- package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +0 -133
- package/src/components/VirtualTable/fields/VirtualTableSwitch.tsx +0 -32
- package/src/components/VirtualTable/fields/VirtualTableUserSelect.tsx +0 -111
- package/src/components/VirtualTable/index.tsx +0 -3
- package/src/components/VirtualTable/types.tsx +0 -46
- package/src/components/admin/RoleChip.tsx +0 -23
- package/src/components/admin/RolesView.tsx +0 -408
- package/src/components/admin/UsersView.tsx +0 -353
- package/src/components/admin/index.ts +0 -3
- package/src/components/common/default_entity_actions.tsx +0 -144
- package/src/components/common/useDebouncedCallback.tsx +0 -20
- package/src/components/common/useTableSearchHelper.ts +0 -75
- package/src/contexts/BreacrumbsContext.tsx +0 -45
- package/src/contexts/DataSourceContext.tsx +0 -4
- package/src/contexts/NavigationContext.tsx +0 -4
- package/src/contexts/SideDialogsControllerContext.tsx +0 -4
- package/src/contexts/SideEntityControllerContext.tsx +0 -4
- package/src/core/DefaultAppBar.tsx +0 -274
- package/src/core/DefaultDrawer.tsx +0 -267
- package/src/core/DrawerNavigationGroup.tsx +0 -117
- package/src/core/DrawerNavigationItem.tsx +0 -65
- package/src/core/EntityEditView.tsx +0 -590
- package/src/core/EntityEditViewFormActions.tsx +0 -343
- package/src/core/EntitySidePanel.tsx +0 -173
- package/src/core/SideDialogs.tsx +0 -200
- package/src/core/field_configs.tsx +0 -443
- package/src/form/EntityForm.tsx +0 -820
- package/src/form/EntityFormActions.tsx +0 -201
- package/src/form/PropertyFieldBinding.tsx +0 -348
- package/src/form/components/ErrorFocus.tsx +0 -44
- package/src/form/components/FieldHelperText.tsx +0 -45
- package/src/form/components/FormEntry.tsx +0 -22
- package/src/form/components/FormLayout.tsx +0 -16
- package/src/form/components/LabelWithIcon.tsx +0 -43
- package/src/form/components/LabelWithIconAndTooltip.tsx +0 -28
- package/src/form/components/LocalChangesMenu.tsx +0 -144
- package/src/form/components/StorageItemPreview.tsx +0 -79
- package/src/form/components/StorageUploadProgress.tsx +0 -105
- package/src/form/components/index.tsx +0 -5
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +0 -105
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +0 -163
- package/src/form/field_bindings/BlockFieldBinding.tsx +0 -268
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +0 -70
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +0 -567
- package/src/form/field_bindings/MapFieldBinding.tsx +0 -156
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +0 -146
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +0 -120
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +0 -151
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +0 -64
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +0 -135
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +0 -134
- package/src/form/field_bindings/RelationFieldBinding.tsx +0 -176
- package/src/form/field_bindings/RepeatFieldBinding.tsx +0 -136
- package/src/form/field_bindings/SelectFieldBinding.tsx +0 -107
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +0 -490
- package/src/form/field_bindings/SwitchFieldBinding.tsx +0 -64
- package/src/form/field_bindings/TextFieldBinding.tsx +0 -153
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +0 -96
- package/src/form/index.tsx +0 -27
- package/src/form/useClearRestoreValue.tsx +0 -35
- package/src/form/validation.ts +0 -532
- package/src/hooks/data/useDataSource.tsx +0 -22
- package/src/hooks/navigation/contexts/CMSUrlContext.tsx +0 -24
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +0 -19
- package/src/hooks/navigation/contexts/NavigationStateContext.tsx +0 -15
- package/src/hooks/navigation/contexts/index.ts +0 -14
- package/src/hooks/navigation/useBuildCMSUrlController.tsx +0 -68
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +0 -150
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +0 -135
- package/src/hooks/navigation/useNavigationRegistry.ts +0 -142
- package/src/hooks/navigation/useNavigationResolution.ts +0 -98
- package/src/hooks/navigation/useNavigationURLs.ts +0 -56
- package/src/hooks/navigation/useResolvedCollections.ts +0 -139
- package/src/hooks/navigation/useResolvedViews.tsx +0 -204
- package/src/hooks/navigation/useTopLevelNavigation.ts +0 -265
- package/src/hooks/navigation/utils.ts +0 -177
- package/src/hooks/useBreadcrumbsController.tsx +0 -49
- package/src/hooks/useBuildNavigationController.tsx +0 -341
- package/src/hooks/useEntitySelectionDialog.tsx +0 -56
- package/src/hooks/useResolvedNavigationFrom.tsx +0 -158
- package/src/hooks/useSideDialogsController.tsx +0 -21
- package/src/hooks/useSideEntityController.tsx +0 -15
- package/src/internal/useBuildDataSource.ts +0 -380
- package/src/internal/useBuildSideDialogsController.tsx +0 -135
- package/src/internal/useBuildSideEntityController.tsx +0 -309
- package/src/preview/PropertyPreview.tsx +0 -308
- package/src/preview/components/ArrayEnumPreview.tsx +0 -38
- package/src/preview/components/AsyncPreviewComponent.tsx +0 -47
- package/src/preview/components/BooleanPreview.tsx +0 -25
- package/src/preview/components/DatePreview.tsx +0 -94
- package/src/preview/components/EmptyValue.tsx +0 -10
- package/src/preview/components/EnumValuesChip.tsx +0 -39
- package/src/preview/components/ImagePreview.tsx +0 -111
- package/src/preview/components/ReferencePreview.tsx +0 -162
- package/src/preview/components/RelationPreview.tsx +0 -153
- package/src/preview/components/StorageThumbnail.tsx +0 -91
- package/src/preview/components/UrlComponentPreview.tsx +0 -113
- package/src/preview/components/UserPreview.tsx +0 -27
- package/src/preview/index.ts +0 -26
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +0 -72
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +0 -43
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +0 -52
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +0 -49
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +0 -44
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +0 -67
- package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +0 -34
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +0 -69
- package/src/preview/property_previews/MapPropertyPreview.tsx +0 -145
- package/src/preview/property_previews/NumberPropertyPreview.tsx +0 -28
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +0 -275
- package/src/preview/property_previews/StringPropertyPreview.tsx +0 -57
- package/src/preview/util.ts +0 -30
- package/src/routes/CustomCMSRoute.tsx +0 -21
- package/src/routes/RebaseRoute.tsx +0 -255
- package/src/routes/index.ts +0 -2
- package/src/util/property_utils.tsx +0 -152
- package/src/util/useDebouncedCallback.ts +0 -25
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EntityCollection } from "@rebasepro/types";
|
|
2
|
+
import { Entity, User } from "@rebasepro/types";
|
|
2
3
|
/**
|
|
3
4
|
* @group Hooks and utilities
|
|
4
5
|
*/
|
|
@@ -19,11 +20,11 @@ export interface EntityFetchResult<M extends Record<string, any>> {
|
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* This hook is used to fetch an entity.
|
|
22
|
-
* It gives real time updates if the
|
|
23
|
+
* It gives real time updates if the driver supports it.
|
|
23
24
|
* @param path
|
|
24
25
|
* @param collection
|
|
25
26
|
* @param entityId
|
|
26
27
|
* @param useCache
|
|
27
28
|
* @group Hooks and utilities
|
|
28
29
|
*/
|
|
29
|
-
export declare function useEntityFetch<M extends Record<string, any>, USER extends User>({ path
|
|
30
|
+
export declare function useEntityFetch<M extends Record<string, any>, USER extends User = User>({ path, entityId, collection, databaseId, useCache }: EntityFetchProps<M, USER>): EntityFetchResult<M>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityCollection } from "@rebasepro/types";
|
|
2
|
+
import { Entity, EntityRelation, FilterValues } from "@rebasepro/types";
|
|
3
|
+
export interface RelationItem {
|
|
4
|
+
id: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
data: Entity<any>;
|
|
8
|
+
relation: EntityRelation;
|
|
9
|
+
}
|
|
3
10
|
export interface UseRelationSelectorProps<M extends Record<string, any> = any> {
|
|
4
11
|
/**
|
|
5
12
|
* Full path where the relation data is located
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
export * from "./data/
|
|
1
|
+
export * from "./data/useData";
|
|
2
2
|
export * from "./data/useCollectionFetch";
|
|
3
3
|
export * from "./data/useEntityFetch";
|
|
4
4
|
export * from "./data/useRelationSelector";
|
|
5
5
|
export * from "./data/save";
|
|
6
6
|
export * from "./data/delete";
|
|
7
|
-
export * from "./navigation/contexts";
|
|
8
|
-
export * from "./navigation/useBuildCollectionRegistryController";
|
|
9
|
-
export * from "./navigation/useBuildCMSUrlController";
|
|
10
|
-
export * from "./navigation/useBuildNavigationStateController";
|
|
11
|
-
export * from "./navigation/useResolvedCollections";
|
|
12
|
-
export * from "./navigation/useResolvedViews";
|
|
13
|
-
export * from "./navigation/useTopLevelNavigation";
|
|
14
7
|
export * from "./useUnsavedChangesDialog";
|
|
15
|
-
export * from "./useResolvedNavigationFrom";
|
|
16
8
|
export * from "./useStorageSource";
|
|
17
9
|
export * from "./useAuthController";
|
|
10
|
+
export * from "./useAuthSubscription";
|
|
18
11
|
export * from "./useDialogsController";
|
|
19
|
-
export * from "./useSideDialogsController";
|
|
20
12
|
export * from "./useAdminModeController";
|
|
21
13
|
export * from "./useBuildAdminModeController";
|
|
22
14
|
export * from "./useEffectiveRoleController";
|
|
23
15
|
export * from "./useBuildEffectiveRoleController";
|
|
24
|
-
export * from "./useSideEntityController";
|
|
25
16
|
export * from "./useRebaseContext";
|
|
26
17
|
export * from "./useSnackbarController";
|
|
27
18
|
export * from "./useModeController";
|
|
@@ -29,13 +20,17 @@ export * from "./useClipboard";
|
|
|
29
20
|
export * from "./useLargeLayout";
|
|
30
21
|
export * from "./useCollapsedGroups";
|
|
31
22
|
export * from "./useInternalUserManagementController";
|
|
32
|
-
export * from "./useEntitySelectionDialog";
|
|
33
23
|
export * from "./useBrowserTitleAndIcon";
|
|
24
|
+
export * from "./useSlot";
|
|
34
25
|
export * from "./useCustomizationController";
|
|
35
|
-
export * from "./useBuildNavigationController";
|
|
36
26
|
export * from "./useBuildLocalConfigurationPersistence";
|
|
37
27
|
export * from "./useBuildModeController";
|
|
38
28
|
export * from "./useValidateAuthenticator";
|
|
29
|
+
export * from "./useRebaseRegistry";
|
|
39
30
|
export * from "./useBackendStorageSource";
|
|
40
31
|
export * from "./usePermissions";
|
|
41
32
|
export * from "./ApiConfigContext";
|
|
33
|
+
export * from "./useTranslation";
|
|
34
|
+
export * from "./useRebaseClient";
|
|
35
|
+
export * from "./useAnalyticsController";
|
|
36
|
+
export * from "./useUserConfigurationPersistence";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StudioBridge } from "./useStudioBridge";
|
|
2
|
+
/**
|
|
3
|
+
* Registers a value into the self-assembling Studio bridge.
|
|
4
|
+
*
|
|
5
|
+
* Each controller (collectionRegistry, sideEntity, url, navigation, breadcrumbs)
|
|
6
|
+
* calls this hook on mount to inject its real implementation into the bridge.
|
|
7
|
+
* On unmount the slice is automatically removed, reverting to the noop default.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* ```tsx
|
|
11
|
+
* function SomeProvider({ children }) {
|
|
12
|
+
* const controller = useBuildSomeController();
|
|
13
|
+
* useBridgeRegistration("sideEntityController", controller);
|
|
14
|
+
* return <SomeContext.Provider value={controller}>{children}</SomeContext.Provider>;
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useBridgeRegistration<K extends keyof StudioBridge>(key: K, value: StudioBridge[K]): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EntityCollection
|
|
1
|
+
import type { EntityCollection } from "@rebasepro/types";
|
|
2
|
+
import { Entity } from "@rebasepro/types";
|
|
2
3
|
/**
|
|
3
4
|
* Hook to evaluate roles and permissions for the current user.
|
|
4
5
|
* It abstracts away the need to pass `authController` to permission evaluation functions.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { RebaseRegistryController, RebaseCMSConfig, RebaseStudioConfig, RebaseAuthConfig } from "@rebasepro/types";
|
|
3
|
+
/**
|
|
4
|
+
* Split into two contexts to prevent infinite re-render loops:
|
|
5
|
+
* - DispatchContext: stable register/unregister functions (never changes identity)
|
|
6
|
+
* - StateContext: the current config values (changes when modules register)
|
|
7
|
+
*
|
|
8
|
+
* Feature components (RebaseAuth, RebaseCMS, RebaseStudio) only consume
|
|
9
|
+
* the dispatch context, so registering does NOT cause them to re-render.
|
|
10
|
+
* RebaseShell consumes state context to read the collected configs.
|
|
11
|
+
*/
|
|
12
|
+
interface RegistryDispatch {
|
|
13
|
+
registerCMS: (config: RebaseCMSConfig) => void;
|
|
14
|
+
unregisterCMS: () => void;
|
|
15
|
+
registerStudio: (config: RebaseStudioConfig) => void;
|
|
16
|
+
unregisterStudio: () => void;
|
|
17
|
+
registerAuth: (config: RebaseAuthConfig) => void;
|
|
18
|
+
unregisterAuth: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function RebaseRegistryProvider({ children }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the full registry (state + dispatch).
|
|
25
|
+
* Use this in RebaseShell where you need to read configs.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useRebaseRegistry(): RebaseRegistryController;
|
|
28
|
+
/**
|
|
29
|
+
* Returns only the stable dispatch functions.
|
|
30
|
+
* Use this in feature components (RebaseAuth, RebaseCMS, RebaseStudio)
|
|
31
|
+
* to avoid re-render loops.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useRebaseRegistryDispatch(): RegistryDispatch;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SlotName, SlotRegistry } from "@rebasepro/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that retrieves and renders all slot contributions for a given slot name.
|
|
5
|
+
*
|
|
6
|
+
* @param slot - The slot name to render contributions for.
|
|
7
|
+
* @param props - Props passed to each slot component.
|
|
8
|
+
* @returns An array of rendered React nodes, each wrapped in an ErrorBoundary.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const actions = useSlot("home.actions", { context });
|
|
13
|
+
* return <div>{actions}</div>;
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @group Hooks
|
|
17
|
+
*/
|
|
18
|
+
export declare function useSlot<K extends SlotName>(slot: K, props: SlotRegistry[K]): React.ReactNode[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EntityCollection
|
|
1
|
+
import type { EntityCollection } from "@rebasepro/types";
|
|
2
|
+
import { StorageSource } from "@rebasepro/types";
|
|
2
3
|
/**
|
|
3
4
|
* Use this hook to get the storage source being used
|
|
4
5
|
* @group Hooks and utilities
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CollectionRegistryController, SideEntityController, UrlController, NavigationStateController } from "@rebasepro/types";
|
|
3
|
+
export interface BreadcrumbEntry {
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
count?: number | null;
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BreadcrumbsController {
|
|
10
|
+
breadcrumbs: BreadcrumbEntry[];
|
|
11
|
+
set: (props: {
|
|
12
|
+
breadcrumbs: BreadcrumbEntry[];
|
|
13
|
+
}) => void;
|
|
14
|
+
updateCount: (id: string, count: number | null | undefined) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* StudioBridge provides optional CMS capabilities to Studio components.
|
|
18
|
+
* When CMS is present, a bridge provider injects real implementations.
|
|
19
|
+
* When CMS is absent, noop defaults ensure Studio works standalone.
|
|
20
|
+
*/
|
|
21
|
+
export interface StudioBridge {
|
|
22
|
+
collectionRegistry: CollectionRegistryController;
|
|
23
|
+
sideEntityController: SideEntityController;
|
|
24
|
+
urlController: UrlController;
|
|
25
|
+
navigationState: NavigationStateController;
|
|
26
|
+
breadcrumbs: BreadcrumbsController;
|
|
27
|
+
}
|
|
28
|
+
export declare const StudioBridgeContext: React.Context<StudioBridge>;
|
|
29
|
+
/**
|
|
30
|
+
* Provider that injects CMS capabilities into Studio.
|
|
31
|
+
* Accepts partial overrides — any field not provided falls back to noop.
|
|
32
|
+
*
|
|
33
|
+
* Usage (in app wiring, when CMS is present):
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <StudioBridgeProvider value={{
|
|
36
|
+
* collectionRegistry: useCollectionRegistryController(),
|
|
37
|
+
* sideEntityController: useSideEntityController(),
|
|
38
|
+
* urlController: useUrlController(),
|
|
39
|
+
* navigationState: useNavigationStateController(),
|
|
40
|
+
* breadcrumbs: useBreadcrumbsController(),
|
|
41
|
+
* }}>
|
|
42
|
+
* <RebaseStudio ... />
|
|
43
|
+
* </StudioBridgeProvider>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function StudioBridgeProvider({ value, children, }: {
|
|
47
|
+
value: Partial<StudioBridge>;
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
/** Collection registry — returns noop if CMS is not present. */
|
|
51
|
+
export declare function useStudioCollectionRegistry(): CollectionRegistryController;
|
|
52
|
+
/** Side entity controller — returns noop if CMS is not present. */
|
|
53
|
+
export declare function useStudioSideEntityController(): SideEntityController;
|
|
54
|
+
/** URL controller — returns noop if CMS is not present. */
|
|
55
|
+
export declare function useStudioUrlController(): UrlController;
|
|
56
|
+
/** Navigation state — returns noop if CMS is not present. */
|
|
57
|
+
export declare function useStudioNavigationState(): NavigationStateController;
|
|
58
|
+
/** Breadcrumbs controller — returns noop if CMS is not present. */
|
|
59
|
+
export declare function useStudioBreadcrumbs(): BreadcrumbsController;
|
|
60
|
+
/**
|
|
61
|
+
* Registry that controllers use to self-register their implementations
|
|
62
|
+
* into the Studio bridge. Each controller calls `register(key, value)`
|
|
63
|
+
* on mount and `unregister(key)` on unmount.
|
|
64
|
+
*/
|
|
65
|
+
export interface StudioBridgeRegistry {
|
|
66
|
+
register: <K extends keyof StudioBridge>(key: K, value: StudioBridge[K]) => void;
|
|
67
|
+
unregister: (key: keyof StudioBridge) => void;
|
|
68
|
+
}
|
|
69
|
+
export declare const StudioBridgeRegistryContext: React.Context<StudioBridgeRegistry | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Provider that creates a self-assembling bridge.
|
|
72
|
+
*
|
|
73
|
+
* Mount this above the controller providers. Each controller calls
|
|
74
|
+
* `useBridgeRegistration(key, value)` to inject its implementation.
|
|
75
|
+
* The bridge context value is automatically kept in sync.
|
|
76
|
+
*
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <StudioBridgeRegistryProvider>
|
|
79
|
+
* <CollectionRegistryProvider> // auto-registers
|
|
80
|
+
* <SideEntityProvider> // auto-registers
|
|
81
|
+
* <UrlProvider> // auto-registers
|
|
82
|
+
* <RebaseStudio /> // consumes bridge
|
|
83
|
+
* </UrlProvider>
|
|
84
|
+
* </SideEntityProvider>
|
|
85
|
+
* </CollectionRegistryProvider>
|
|
86
|
+
* </StudioBridgeRegistryProvider>
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function StudioBridgeRegistryProvider({ children }: {
|
|
90
|
+
children: React.ReactNode;
|
|
91
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal hook for translating FireCMS UI strings.
|
|
3
|
+
*
|
|
4
|
+
* Uses the `rebase_core` i18next namespace that is initialised by
|
|
5
|
+
* `RebaseI18nProvider`. Do NOT use `react-i18next` directly in internal
|
|
6
|
+
* components — always go through this hook so the namespace is consistent.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const { t } = useTranslation();
|
|
10
|
+
* <Button>{t("save")}</Button>
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function useTranslation(): {
|
|
15
|
+
t: (key: string, vars?: Record<string, string>) => string;
|
|
16
|
+
i18n: import("i18next").i18n;
|
|
17
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { AuthController, Authenticator,
|
|
1
|
+
import { AuthController, Authenticator, RebaseData, StorageSource, User } from "@rebasepro/types";
|
|
2
2
|
/**
|
|
3
3
|
* This hook is used internally for validating an authenticator.
|
|
4
4
|
*
|
|
5
5
|
* @param authController
|
|
6
6
|
* @param authentication
|
|
7
7
|
* @param storageSource
|
|
8
|
-
* @param
|
|
8
|
+
* @param data
|
|
9
9
|
*/
|
|
10
|
-
export declare function useValidateAuthenticator<USER extends User = any>({ disabled, authController, authenticator, storageSource,
|
|
10
|
+
export declare function useValidateAuthenticator<USER extends User = any>({ disabled, authController, authenticator, storageSource, data }: {
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
authController: AuthController<USER>;
|
|
13
13
|
authenticator?: boolean | Authenticator<USER>;
|
|
14
|
-
|
|
14
|
+
data: RebaseData;
|
|
15
15
|
storageSource: StorageSource;
|
|
16
16
|
}): {
|
|
17
17
|
canAccessMainView: boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { RebaseTranslations } from "@rebasepro/types";
|
|
3
|
+
export declare const REBASE_LOCALE_STORAGE_KEY = "rebase_locale";
|
|
4
|
+
/** DeepPartial helper — allows partial overrides at any nesting level */
|
|
5
|
+
type DeepPartial<T> = T extends object ? {
|
|
6
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
7
|
+
} : T;
|
|
8
|
+
export interface RebaseI18nProviderProps {
|
|
9
|
+
/** BCP-47 locale tag, e.g. "en", "es", "fr". Defaults to "en". */
|
|
10
|
+
locale?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Override or extend any FireCMS UI string, keyed by locale.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* translations={{
|
|
16
|
+
* en: { save: "Publish" },
|
|
17
|
+
* es: { save: "Publicar", discard: "Descartar" }
|
|
18
|
+
* }}
|
|
19
|
+
*/
|
|
20
|
+
translations?: {
|
|
21
|
+
[locale: string]: DeepPartial<RebaseTranslations>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Initialises a dedicated i18next instance for FireCMS's internal UI strings.
|
|
26
|
+
*
|
|
27
|
+
* This instance is isolated from any app-level i18next configuration the
|
|
28
|
+
* consumer may have. Mount this at the top of the FireCMS component tree.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function RebaseI18nProvider({ locale, translations, children }: PropsWithChildren<RebaseI18nProviderProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * from "./core";
|
|
2
|
-
export * from "./app";
|
|
3
|
-
export * from "@rebasepro/types";
|
|
4
|
-
export * from "@rebasepro/common";
|
|
5
|
-
export * from "./form";
|
|
6
|
-
export * from "./preview";
|
|
7
2
|
export * from "./hooks";
|
|
8
|
-
export * from "./components/admin";
|
|
9
3
|
export * from "./components";
|
|
10
4
|
export * from "./util";
|
|
11
5
|
export * from "./contexts";
|
|
12
|
-
export * from "./
|
|
6
|
+
export * from "./internal/common";
|
|
7
|
+
export * from "./internal/useRestoreScroll";
|
|
13
8
|
export { useUnsavedChangesDialog } from "./hooks/useUnsavedChangesDialog";
|
|
14
9
|
export type { UnsavedChangesDialogProps } from "./components/UnsavedChangesDialog";
|
|
15
10
|
export { UnsavedChangesDialog } from "./components/UnsavedChangesDialog";
|
|
11
|
+
export * from "./i18n/RebaseI18nProvider";
|
|
12
|
+
export * from "./locales/en";
|
|
13
|
+
export * from "./locales/es";
|
|
14
|
+
export * from "./hooks/useStudioBridge";
|
|
15
|
+
export { useBridgeRegistration } from "./hooks/useBridgeRegistration";
|