@rebasepro/admin 0.9.0 → 0.9.1-canary.09aaf62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/{CollectionEditorDialog-B-7uW3iJ.js → CollectionEditorDialog-DbPpDDwb.js} +33 -11
- package/dist/CollectionEditorDialog-DbPpDDwb.js.map +1 -0
- package/dist/{PropertyEditView-7KMTcrqi.js → PropertyEditView-DfJbZ67t.js} +5 -5
- package/dist/PropertyEditView-DfJbZ67t.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-epqIbZrJ.js → RouterCollectionsStudioView-C6XQ7Il5.js} +5 -5
- package/dist/RouterCollectionsStudioView-C6XQ7Il5.js.map +1 -0
- package/dist/collection_editor/api/generateCollectionApi.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +1 -1
- package/dist/collection_editor/useSafeSnackbarController.d.ts +1 -1
- package/dist/collection_editor_ui.js +5 -5
- package/dist/collection_editor_ui.js.map +1 -1
- package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +1 -1
- package/dist/components/CollectionTableBinding/internal/EntityTableCell.d.ts +1 -1
- package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/CollectionTableBinding/table_bindings.d.ts +1 -1
- package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.d.ts +1 -1
- package/dist/components/{RebaseCMS.d.ts → RebaseAdmin.d.ts} +2 -2
- package/dist/components/RebaseLayout.d.ts +5 -4
- package/dist/components/RebaseShell.d.ts +1 -0
- package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +1 -1
- package/dist/components/SidePanelProvider.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +1 -1
- package/dist/form/components/StorageUploadProgress.d.ts +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
- package/dist/{history-7X5bON_n.js → history-GSa4BgDt.js} +5 -5
- package/dist/history-GSa4BgDt.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{src-sUZfe29F.js → src-B8WuGSPZ.js} +160 -56
- package/dist/src-B8WuGSPZ.js.map +1 -0
- package/dist/types/components/formex.d.ts +1 -1
- package/package.json +12 -17
- package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
- package/src/collection_editor/api/generateCollectionApi.ts +4 -4
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +1 -1
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -1
- package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -1
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -1
- package/src/collection_editor/ui/EditorEntityAction.tsx +1 -1
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -1
- package/src/collection_editor/ui/KanbanSetupAction.tsx +1 -1
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +1 -1
- package/src/collection_editor/ui/NewCollectionButton.tsx +1 -1
- package/src/collection_editor/ui/NewCollectionCard.tsx +1 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +37 -6
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsSelectDialog.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/SwitchControl.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +2 -2
- package/src/collection_editor/useSafeSnackbarController.ts +1 -1
- package/src/components/AdminModeSyncer.tsx +1 -1
- package/src/components/ArrayContainer.tsx +1 -1
- package/src/components/ClearFilterSortButton.tsx +1 -1
- package/src/components/CollectionPanel.tsx +1 -1
- package/src/components/CollectionTableBinding/CollectionRowActions.tsx +2 -2
- package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +3 -3
- package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +1 -1
- package/src/components/CollectionTableBinding/PropertyTableCell.tsx +1 -1
- package/src/components/CollectionTableBinding/column_utils.tsx +1 -1
- package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +2 -2
- package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +1 -1
- package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +2 -2
- package/src/components/CollectionTableBinding/fields/TableStorageUpload.tsx +1 -1
- package/src/components/CollectionTableBinding/internal/CollectionTableToolbar.tsx +1 -1
- package/src/components/CollectionTableBinding/internal/EntityTableCell.tsx +2 -2
- package/src/components/CollectionTableBinding/internal/EntityTableCellActions.tsx +1 -1
- package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +4 -4
- package/src/components/CollectionTableBinding/table_bindings.tsx +1 -1
- package/src/components/CollectionViewBinding/BoardCardBinding.tsx +2 -2
- package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +3 -3
- package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +3 -3
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +2 -2
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +1 -1
- package/src/components/CollectionViewBinding/EntityCardBinding.tsx +3 -3
- package/src/components/CollectionViewBinding/FiltersDialog.tsx +19 -1
- package/src/components/CollectionViewBinding/SplitListView.tsx +1 -1
- package/src/components/CollectionViewBinding/ViewModeToggle.tsx +1 -1
- package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +2 -2
- package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +2 -2
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +9 -3
- package/src/components/CollectionViewBinding/usePreviewSlots.ts +1 -1
- package/src/components/DefaultAppBar.tsx +3 -3
- package/src/components/DefaultDrawer.tsx +3 -3
- package/src/components/DeleteEntityDialog.tsx +1 -1
- package/src/components/DetailViewBinding.tsx +3 -3
- package/src/components/DrawerNavigationGroup.tsx +2 -2
- package/src/components/EditFormActions.tsx +4 -4
- package/src/components/EditViewBinding.tsx +6 -6
- package/src/components/EntityPreviewBinding.tsx +3 -3
- package/src/components/EntityViewBinding.tsx +2 -2
- package/src/components/HomePage/ContentHomePage.tsx +4 -4
- package/src/components/HomePage/FavouritesView.tsx +1 -1
- package/src/components/HomePage/NavigationCardBinding.tsx +3 -3
- package/src/components/HomePage/NavigationGroup.tsx +1 -1
- package/src/components/HomePage/RenameGroupDialog.tsx +1 -1
- package/src/components/JsonPreviewBinding.tsx +1 -1
- package/src/components/{RebaseCMS.tsx → RebaseAdmin.tsx} +3 -3
- package/src/components/RebaseAuthGate.tsx +2 -2
- package/src/components/RebaseLayout.tsx +7 -13
- package/src/components/RebaseNavigation.tsx +18 -3
- package/src/components/RebaseRouteDefs.tsx +2 -2
- package/src/components/RebaseShell.tsx +2 -1
- package/src/components/ReferenceTable/SelectionTableBinding.tsx +5 -5
- package/src/components/RelationSelector.tsx +1 -1
- package/src/components/SearchIconsView.tsx +2 -2
- package/src/components/SelectableTable/SelectableTable.tsx +2 -2
- package/src/components/SelectableTable/SelectableTableContext.tsx +1 -1
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +1 -1
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +1 -1
- package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +1 -1
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +1 -1
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -1
- package/src/components/SideDialogs.tsx +1 -1
- package/src/components/SidePanelBinding.tsx +1 -1
- package/src/components/SidePanelProvider.tsx +2 -2
- package/src/components/UserSelector.tsx +1 -1
- package/src/components/admin/CreationResultDialog.tsx +6 -3
- package/src/components/app/Scaffold.tsx +6 -2
- package/src/components/common/default_entity_actions.tsx +123 -25
- package/src/components/field_configs.tsx +1 -1
- package/src/components/history/EntityHistoryEntry.tsx +1 -1
- package/src/components/history/EntityHistoryView.tsx +4 -4
- package/src/components/history/LastEditedByIndicator.tsx +2 -2
- package/src/components/index.ts +1 -1
- package/src/data_export/export/BasicExportAction.tsx +1 -1
- package/src/data_export/export/ExportCollectionAction.tsx +1 -1
- package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
- package/src/data_import/components/ImportFileUpload.tsx +1 -1
- package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -1
- package/src/data_import/components/ImportSaveInProgress.tsx +1 -1
- package/src/data_import/import/ImportCollectionAction.tsx +2 -2
- package/src/data_import/utils/data.ts +2 -2
- package/src/data_import/utils/get_properties_mapping.ts +1 -1
- package/src/editor/components/image-bubble.tsx +1 -1
- package/src/editor/components/table-bubble.tsx +1 -1
- package/src/editor/editor.tsx +1 -1
- package/src/editor/selectors/link-selector.tsx +1 -1
- package/src/editor/selectors/node-selector.tsx +1 -1
- package/src/form/EntityForm.tsx +4 -4
- package/src/form/EntityFormActions.tsx +1 -1
- package/src/form/EntityFormBinding.tsx +4 -4
- package/src/form/PropertyFieldBinding.tsx +3 -3
- package/src/form/components/ErrorFocus.tsx +1 -1
- package/src/form/components/LocalChangesMenu.tsx +3 -3
- package/src/form/components/StorageItemPreview.tsx +1 -1
- package/src/form/components/StorageUploadProgress.tsx +3 -3
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
- package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +2 -2
- package/src/form/field_bindings/RelationFieldBinding.tsx +1 -1
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +3 -3
- package/src/form/form_utils.ts +1 -1
- package/src/hooks/navigation/useNavigationResolution.ts +19 -4
- package/src/hooks/useBuildSidePanel.tsx +2 -2
- package/src/hooks/useCMSContext.tsx +1 -1
- package/src/hooks/useHistory.ts +1 -1
- package/src/hooks/useResolvedNavigationFrom.tsx +4 -2
- package/src/index.ts +3 -3
- package/src/preview/PropertyPreview.tsx +2 -2
- package/src/preview/components/DatePreview.tsx +1 -1
- package/src/preview/components/EnumValuesChip.tsx +1 -1
- package/src/preview/components/ImagePreview.tsx +1 -1
- package/src/preview/components/ReferencePreview.tsx +2 -2
- package/src/preview/components/RelationPreview.tsx +1 -1
- package/src/preview/components/StorageThumbnail.tsx +1 -1
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
- package/src/routes/RebaseRoute.tsx +2 -2
- package/src/types/components/formex.tsx +1 -1
- package/src/util/previews.ts +4 -2
- package/dist/CollectionEditorDialog-B-7uW3iJ.js.map +0 -1
- package/dist/PropertyEditView-7KMTcrqi.js.map +0 -1
- package/dist/RouterCollectionsStudioView-epqIbZrJ.js.map +0 -1
- package/dist/history-7X5bON_n.js.map +0 -1
- package/dist/src-sUZfe29F.js.map +0 -1
|
@@ -4,8 +4,8 @@ import React, { Suspense, createContext, createElement, forwardRef, lazy, memo,
|
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { Alert, AlertCircleIcon, AlertTriangleIcon, AlignLeftIcon, ArrowLeftIcon, ArrowRightToLineIcon, Avatar, Badge, BooleanSwitchWithLabel, Button, CHIP_COLORS, CalendarIcon, Card, CardView, CenteredView, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, Chip, CircleIcon, CircularProgress, CircularProgressCenter, CodeIcon, Collapse, ColumnsIcon, Container, CopyIcon, DateTimeField, Dialog, DialogActions, DialogContent, DialogTitle, DownloadIcon, ErrorBoundary, ExpandablePanel, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FilterXIcon, FlagIcon, FolderUpIcon, FunctionSquareIcon, GlobeIcon, HandleIcon, HashIcon, HistoryIcon, IconButton, ImageOffIcon, KanbanIcon, KanbanView, KeyRoundIcon, Label, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, ListView, LoaderIcon, LoadingButton, LogOutIcon, MailIcon, Markdown, Maximize2Icon, Menu, MenuIcon, MenuItem, MinusIcon, MoonIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, PencilIcon, PlusIcon, Popover, PopoverPrimitive, Portal, QuoteIcon, RadioGroup, RadioGroupItem, RefreshCwIcon, RepeatIcon, ResizablePanels, Rows3Icon, SearchBar, SearchIcon, Select, SelectItem, Separator, SettingsIcon, Sheet, Skeleton, StarIcon, SunIcon, SunMoonIcon, Tab, Table, TableBody, TableCell, TableHeader, TableIcon, TableRow, TableView, Tabs, TextField, TextIcon, TextareaAutosize, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UploadIcon, UserIcon, VirtualTableDateField, VirtualTableInput, VirtualTableInput as VirtualTableInput$1, VirtualTableNumberInput, VirtualTableSwitch, VoteIcon, XCircleIcon, XIcon, cls, coolIconKeys, createVirtualTableSelectionStore, debounce, defaultBorderMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, fieldBackgroundInvisibleMixin, fieldBackgroundMixin, focusedDisabled, getColorSchemeForSeed, iconSize, lucideIcons, paperMixin, useDebouncedCallback, useInjectStyles, useOutsideAlerter } from "@rebasepro/ui";
|
|
6
6
|
import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, addInitialSlash, buildRoutedRebaseData, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getEntityImagePreviewPropertyKey, getLabelOrConfigFrom, getLastSegment, getLastSegment as getLastSegment$1, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getReferenceFrom, getRelationFrom, getSubcollections, getTableName, isHidden, isPropertyBuilder, isReadOnly, normalizeToEntityRelation, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, resolveArrayProperties, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveDataSource, resolveDefaultSelectedView, resolveEnumValues, resolveFilterOperators, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource } from "@rebasepro/common";
|
|
7
|
-
import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH,
|
|
8
|
-
import { Field, Formex, getIn, setIn, useCreateFormex, useFormex } from "@rebasepro/
|
|
7
|
+
import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH, CollectionResolverRegistrationContext, CollectionScopeProvider, CustomizationControllerContext, DEFAULT_PAGE_SIZE, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, IconForView, LanguageToggle, LoginView, NotFoundPage, PluginProviderStack, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StorageSourceContext, StudioBridgeRegistryProvider, UIReferenceView, UnsavedChangesDialog, UserDisplay, UserSettingsView, buildCollapsedDefaults, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, flattenKeys, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getFormFieldKeys, getIcon, getRelationIncludeParams, getRowHeight, iconsSearch, removeEntityFromCache, removeEntityFromMemoryCache, resolveComponentRef, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiConfig, useAuthController, useBridgeRegistration, useBuildLocalConfigurationPersistence, useCollapsedGroups, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useFetch, useLargeLayout, useModeController, usePermissions, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useResolvedComponent, useRestoreScroll, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/app";
|
|
8
|
+
import { Field, Formex, getIn, setIn, useCreateFormex, useFormex } from "@rebasepro/forms";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { defaultDateFormat, getArrayValuesCount, getHashValue, getValueInPath, hydrateRegExp, isObject, mergeDeep, prettifyIdentifier, randomString, slugify, toArray } from "@rebasepro/utils";
|
|
11
11
|
import { EntityReference, EntityRelation, GeoPoint, Vector, getCollectionDataPath, getDataSourceCapabilities } from "@rebasepro/types";
|
|
@@ -20,7 +20,7 @@ import { restrictToVerticalAxis, restrictToWindowEdges } from "@dnd-kit/modifier
|
|
|
20
20
|
import { SortableContext, arrayMove, defaultAnimateLayoutChanges, horizontalListSortingStrategy, rectSortingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
21
21
|
import { CSS } from "@dnd-kit/utilities";
|
|
22
22
|
import ExcelJS from "exceljs";
|
|
23
|
-
import { buildEntityPropertiesFromData, inferTypeFromValue } from "@rebasepro/
|
|
23
|
+
import { buildEntityPropertiesFromData, inferTypeFromValue } from "@rebasepro/inference";
|
|
24
24
|
import { generateKeyBetween, generateNKeysBetween } from "fractional-indexing";
|
|
25
25
|
import Fuse from "fuse.js";
|
|
26
26
|
import { format } from "date-fns";
|
|
@@ -1100,7 +1100,7 @@ function getEntityTitlePropertyKey(collection, propertyConfigs) {
|
|
|
1100
1100
|
if (property && !isPropertyBuilder(property)) {
|
|
1101
1101
|
const prop = property;
|
|
1102
1102
|
if (prop && typeof prop === "object" && "isId" in prop && Boolean(prop.isId) || key === "id" || isHiddenProperty(prop)) continue;
|
|
1103
|
-
if (prop.type === "relation" || prop.type === "string") return key;
|
|
1103
|
+
if (prop.type === "relation" || prop.type === "string" && !isStorageProperty$1(prop)) return key;
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
let firstStringCandidate;
|
|
@@ -1596,7 +1596,7 @@ var MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
|
|
|
1596
1596
|
var JSON_TAB_VALUE = "__json";
|
|
1597
1597
|
//#endregion
|
|
1598
1598
|
//#region src/components/DetailViewBinding.tsx
|
|
1599
|
-
var EntityHistoryView$1 = lazy(() => import("./history-
|
|
1599
|
+
var EntityHistoryView$1 = lazy(() => import("./history-GSa4BgDt.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
1600
1600
|
function DetailViewBinding({ entityId, ...props }) {
|
|
1601
1601
|
const { entity, dataLoading, dataLoadingError } = useFetch({
|
|
1602
1602
|
path: props.path,
|
|
@@ -5821,7 +5821,7 @@ function EntityActionButton({ action, enabled, props }) {
|
|
|
5821
5821
|
}
|
|
5822
5822
|
//#endregion
|
|
5823
5823
|
//#region src/components/EditViewBinding.tsx
|
|
5824
|
-
var EntityHistoryView = lazy(() => import("./history-
|
|
5824
|
+
var EntityHistoryView = lazy(() => import("./history-GSa4BgDt.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
5825
5825
|
/**
|
|
5826
5826
|
* This is the default view that is used as the content of a side panel when
|
|
5827
5827
|
* a record is opened.
|
|
@@ -6837,7 +6837,7 @@ function resolveNavigationFrom({ path, context }) {
|
|
|
6837
6837
|
return data.collection(entry.slug).findById(entry.entityId).then((row) => {
|
|
6838
6838
|
if (!row) return void 0;
|
|
6839
6839
|
const entity = {
|
|
6840
|
-
id:
|
|
6840
|
+
id: entry.entityId,
|
|
6841
6841
|
path: entry.slug,
|
|
6842
6842
|
values: row
|
|
6843
6843
|
};
|
|
@@ -7393,7 +7393,7 @@ function CreationResultDialog({ result, onClose }) {
|
|
|
7393
7393
|
color: "warning",
|
|
7394
7394
|
children: /* @__PURE__ */ jsx(Typography, {
|
|
7395
7395
|
variant: "body2",
|
|
7396
|
-
children: t("temporary_password_description") ?? "Email is not configured. Share this temporary password with the user securely. It will not be shown again."
|
|
7396
|
+
children: result.emailDeliveryFailed ? t("temporary_password_email_failed_description") ?? "The email could not be delivered. Share this temporary password with the user securely. It will not be shown again." : t("temporary_password_description") ?? "Email is not configured. Share this temporary password with the user securely. It will not be shown again."
|
|
7397
7397
|
})
|
|
7398
7398
|
}),
|
|
7399
7399
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
|
|
@@ -7537,8 +7537,19 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
|
|
|
7537
7537
|
const { t } = useTranslation();
|
|
7538
7538
|
const [loading, setLoading] = useState(false);
|
|
7539
7539
|
const [creationResult, setCreationResult] = useState(null);
|
|
7540
|
+
const [mode, setMode] = useState("email");
|
|
7541
|
+
const [password, setPassword] = useState("");
|
|
7542
|
+
const [confirmPassword, setConfirmPassword] = useState("");
|
|
7543
|
+
const [error, setError] = useState(null);
|
|
7544
|
+
const passwordsMatch = password === confirmPassword;
|
|
7545
|
+
const canSubmit = mode === "email" || password.length > 0 && passwordsMatch;
|
|
7540
7546
|
const handleConfirm = async () => {
|
|
7547
|
+
if (mode === "manual" && !passwordsMatch) {
|
|
7548
|
+
setError(t("passwords_dont_match") || "Passwords don't match");
|
|
7549
|
+
return;
|
|
7550
|
+
}
|
|
7541
7551
|
setLoading(true);
|
|
7552
|
+
setError(null);
|
|
7542
7553
|
try {
|
|
7543
7554
|
const baseUrl = client?.baseUrl || "";
|
|
7544
7555
|
const token = await getAuthToken?.();
|
|
@@ -7547,28 +7558,27 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
|
|
|
7547
7558
|
headers: {
|
|
7548
7559
|
"Content-Type": "application/json",
|
|
7549
7560
|
...token ? { "Authorization": `Bearer ${token}` } : {}
|
|
7550
|
-
}
|
|
7561
|
+
},
|
|
7562
|
+
body: JSON.stringify(mode === "manual" ? { password } : {})
|
|
7551
7563
|
});
|
|
7552
7564
|
if (!response.ok) {
|
|
7553
|
-
const
|
|
7554
|
-
throw new Error(error.message || "Failed to reset password");
|
|
7565
|
+
const errorBody = await response.json().catch(() => ({}));
|
|
7566
|
+
throw new Error(errorBody.error?.message || errorBody.message || "Failed to reset password");
|
|
7555
7567
|
}
|
|
7556
7568
|
const data = await response.json();
|
|
7557
|
-
setCreationResult({
|
|
7558
|
-
user,
|
|
7559
|
-
invitationSent: data.invitationSent ?? false,
|
|
7560
|
-
temporaryPassword: data.temporaryPassword
|
|
7561
|
-
});
|
|
7562
7569
|
snackbarController.open({
|
|
7563
7570
|
type: "success",
|
|
7564
7571
|
message: t("reset_password_success") || "Password reset successfully"
|
|
7565
7572
|
});
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7573
|
+
if (data.invitationSent || data.temporaryPassword) setCreationResult({
|
|
7574
|
+
user,
|
|
7575
|
+
invitationSent: data.invitationSent ?? false,
|
|
7576
|
+
temporaryPassword: data.temporaryPassword,
|
|
7577
|
+
emailDeliveryFailed: data.emailDeliveryFailed ?? false
|
|
7570
7578
|
});
|
|
7571
|
-
onClose();
|
|
7579
|
+
else onClose();
|
|
7580
|
+
} catch (e) {
|
|
7581
|
+
setError(e instanceof Error ? e.message : t("error_resetting_password") || "Error resetting password");
|
|
7572
7582
|
} finally {
|
|
7573
7583
|
setLoading(false);
|
|
7574
7584
|
}
|
|
@@ -7580,13 +7590,101 @@ function ResetPasswordActionDialog({ user, open, onClose }) {
|
|
|
7580
7590
|
onClose();
|
|
7581
7591
|
}
|
|
7582
7592
|
});
|
|
7583
|
-
return /* @__PURE__ */
|
|
7593
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
7584
7594
|
open,
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7595
|
+
onOpenChange: (o) => !o ? onClose() : void 0,
|
|
7596
|
+
maxWidth: "xl",
|
|
7597
|
+
children: [
|
|
7598
|
+
/* @__PURE__ */ jsx(DialogTitle, {
|
|
7599
|
+
variant: "h5",
|
|
7600
|
+
gutterBottom: false,
|
|
7601
|
+
children: t("reset_password") || "Reset Password"
|
|
7602
|
+
}),
|
|
7603
|
+
/* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
7604
|
+
className: "flex flex-col gap-4 py-2",
|
|
7605
|
+
children: [
|
|
7606
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
7607
|
+
variant: "body2",
|
|
7608
|
+
color: "secondary",
|
|
7609
|
+
children: user.email
|
|
7610
|
+
}),
|
|
7611
|
+
/* @__PURE__ */ jsxs(RadioGroup, {
|
|
7612
|
+
value: mode,
|
|
7613
|
+
onValueChange: (v) => {
|
|
7614
|
+
setMode(v);
|
|
7615
|
+
setError(null);
|
|
7616
|
+
},
|
|
7617
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
7618
|
+
className: "flex items-center gap-2",
|
|
7619
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
7620
|
+
value: "email",
|
|
7621
|
+
id: "reset-password-mode-email"
|
|
7622
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
7623
|
+
htmlFor: "reset-password-mode-email",
|
|
7624
|
+
children: t("reset_password_send_email") || "Send a password reset email"
|
|
7625
|
+
})]
|
|
7626
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
7627
|
+
className: "flex items-center gap-2",
|
|
7628
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
7629
|
+
value: "manual",
|
|
7630
|
+
id: "reset-password-mode-manual"
|
|
7631
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
7632
|
+
htmlFor: "reset-password-mode-manual",
|
|
7633
|
+
children: t("reset_password_set_manually") || "Set a password manually"
|
|
7634
|
+
})]
|
|
7635
|
+
})]
|
|
7636
|
+
}),
|
|
7637
|
+
mode === "manual" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7638
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
7639
|
+
type: "password",
|
|
7640
|
+
value: password,
|
|
7641
|
+
autoFocus: true,
|
|
7642
|
+
autoComplete: "new-password",
|
|
7643
|
+
label: t("new_password") || "New password",
|
|
7644
|
+
onChange: (e) => {
|
|
7645
|
+
setPassword(e.target.value);
|
|
7646
|
+
setError(null);
|
|
7647
|
+
}
|
|
7648
|
+
}),
|
|
7649
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
7650
|
+
type: "password",
|
|
7651
|
+
value: confirmPassword,
|
|
7652
|
+
autoComplete: "new-password",
|
|
7653
|
+
error: confirmPassword.length > 0 && !passwordsMatch,
|
|
7654
|
+
label: t("confirm_password") || "Confirm password",
|
|
7655
|
+
onChange: (e) => {
|
|
7656
|
+
setConfirmPassword(e.target.value);
|
|
7657
|
+
setError(null);
|
|
7658
|
+
}
|
|
7659
|
+
}),
|
|
7660
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
7661
|
+
variant: "caption",
|
|
7662
|
+
color: "secondary",
|
|
7663
|
+
children: t("reset_password_set_manually_description") || "The password is updated immediately and no email is sent. Share it with the user securely."
|
|
7664
|
+
})
|
|
7665
|
+
] }),
|
|
7666
|
+
error && /* @__PURE__ */ jsx(Alert, {
|
|
7667
|
+
color: "error",
|
|
7668
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
7669
|
+
variant: "body2",
|
|
7670
|
+
children: error
|
|
7671
|
+
})
|
|
7672
|
+
})
|
|
7673
|
+
]
|
|
7674
|
+
}) }),
|
|
7675
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
7676
|
+
variant: "text",
|
|
7677
|
+
onClick: onClose,
|
|
7678
|
+
disabled: loading,
|
|
7679
|
+
children: t("cancel")
|
|
7680
|
+
}), /* @__PURE__ */ jsx(LoadingButton, {
|
|
7681
|
+
variant: "filled",
|
|
7682
|
+
onClick: handleConfirm,
|
|
7683
|
+
loading,
|
|
7684
|
+
disabled: !canSubmit,
|
|
7685
|
+
children: t("reset_password") || "Reset Password"
|
|
7686
|
+
})] })
|
|
7687
|
+
]
|
|
7590
7688
|
});
|
|
7591
7689
|
}
|
|
7592
7690
|
var resetPasswordAction = {
|
|
@@ -7652,13 +7750,17 @@ function applyPluginModifyCollection(resolvedCollections, modifyCollection) {
|
|
|
7652
7750
|
* with `auth: true` or `auth: { enabled: true }`.
|
|
7653
7751
|
*
|
|
7654
7752
|
* Injections:
|
|
7655
|
-
* 1. **resetPasswordAction** — adds the entity action unless explicitly disabled
|
|
7753
|
+
* 1. **resetPasswordAction** — adds the entity action unless explicitly disabled,
|
|
7754
|
+
* or unless the auth adapter reports no `adminPasswordReset` support. Custom
|
|
7755
|
+
* adapters mount their own admin routes and may not implement
|
|
7756
|
+
* `POST /admin/users/:userId/reset-password`; injecting the action anyway
|
|
7757
|
+
* would show a button that can only ever 404.
|
|
7656
7758
|
* 2. **afterSave callback** — shows the `CreationResultDialog` when a new user
|
|
7657
7759
|
* is created with `invitationSent` or `temporaryPassword` in the response
|
|
7658
7760
|
*
|
|
7659
7761
|
* Skips injection if the collection already has the action/callback present.
|
|
7660
7762
|
*/
|
|
7661
|
-
function injectAuthCollectionConfig(collections) {
|
|
7763
|
+
function injectAuthCollectionConfig(collections, adminPasswordResetSupported) {
|
|
7662
7764
|
return collections.map((collection) => {
|
|
7663
7765
|
const authProp = collection.auth;
|
|
7664
7766
|
if (!authProp) return collection;
|
|
@@ -7669,6 +7771,7 @@ function injectAuthCollectionConfig(collections) {
|
|
|
7669
7771
|
let actionToInject;
|
|
7670
7772
|
if (resetPref === false) actionToInject = void 0;
|
|
7671
7773
|
else if (typeof resetPref === "object") actionToInject = resetPref;
|
|
7774
|
+
else if (!adminPasswordResetSupported) actionToInject = void 0;
|
|
7672
7775
|
else actionToInject = resetPasswordAction;
|
|
7673
7776
|
if (actionToInject) {
|
|
7674
7777
|
const injectedAction = actionToInject;
|
|
@@ -7700,7 +7803,8 @@ function injectAuthCollectionConfig(collections) {
|
|
|
7700
7803
|
isAnonymous: false
|
|
7701
7804
|
},
|
|
7702
7805
|
invitationSent: !!values.invitationSent,
|
|
7703
|
-
temporaryPassword: typeof values.temporaryPassword === "string" ? values.temporaryPassword : void 0
|
|
7806
|
+
temporaryPassword: typeof values.temporaryPassword === "string" ? values.temporaryPassword : void 0,
|
|
7807
|
+
emailDeliveryFailed: !!values.emailDeliveryFailed
|
|
7704
7808
|
};
|
|
7705
7809
|
const { closeDialog } = dialogsController.open({
|
|
7706
7810
|
key: "user_creation_result",
|
|
@@ -7727,7 +7831,7 @@ async function resolveCollections(collections, authController, data, plugins) {
|
|
|
7727
7831
|
if (plugin.hooks?.modifyCollection) resolvedCollections = applyPluginModifyCollection(resolvedCollections, plugin.hooks.modifyCollection);
|
|
7728
7832
|
if (plugin.hooks?.injectCollections) resolvedCollections = plugin.hooks.injectCollections(resolvedCollections);
|
|
7729
7833
|
}
|
|
7730
|
-
resolvedCollections = injectAuthCollectionConfig(resolvedCollections);
|
|
7834
|
+
resolvedCollections = injectAuthCollectionConfig(resolvedCollections, authController.capabilities?.adminPasswordReset ?? true);
|
|
7731
7835
|
resolvedCollections = filterOutNotAllowedCollections(resolvedCollections, authController);
|
|
7732
7836
|
return resolvedCollections;
|
|
7733
7837
|
}
|
|
@@ -11857,7 +11961,7 @@ var DEFAULT_FIELD_CONFIGS = {
|
|
|
11857
11961
|
},
|
|
11858
11962
|
user_select: {
|
|
11859
11963
|
key: "user_select",
|
|
11860
|
-
name: "
|
|
11964
|
+
name: "User select",
|
|
11861
11965
|
description: "Select a user from the user management system. Store the user ID.",
|
|
11862
11966
|
Icon: UserIcon,
|
|
11863
11967
|
property: {
|
|
@@ -14756,17 +14860,20 @@ function useBoardDataController({ fullPath, collection, columnProperty, columns,
|
|
|
14756
14860
|
}));
|
|
14757
14861
|
};
|
|
14758
14862
|
const accessor = currentDataClient.collection(currentResolvedPath);
|
|
14863
|
+
const includeParams = getRelationIncludeParams(currentCollection);
|
|
14759
14864
|
if (accessor.listen) {
|
|
14760
14865
|
const unsubscribe = accessor.listen({
|
|
14761
14866
|
where: whereFilter,
|
|
14762
14867
|
limit: itemCount,
|
|
14763
|
-
orderBy: orderByParam
|
|
14868
|
+
orderBy: orderByParam,
|
|
14869
|
+
include: includeParams
|
|
14764
14870
|
}, (res) => onUpdate(res.data), onError);
|
|
14765
14871
|
unsubscribersRef.current[column] = unsubscribe;
|
|
14766
14872
|
} else accessor.find({
|
|
14767
14873
|
where: whereFilter,
|
|
14768
14874
|
limit: itemCount,
|
|
14769
|
-
orderBy: orderByParam
|
|
14875
|
+
orderBy: orderByParam,
|
|
14876
|
+
include: includeParams
|
|
14770
14877
|
}).then((res) => onUpdate(res.data)).catch(onError);
|
|
14771
14878
|
}, []);
|
|
14772
14879
|
useEffect(() => {
|
|
@@ -17585,7 +17692,7 @@ function useBuildSideDialogsController() {
|
|
|
17585
17692
|
//#region src/components/SidePanelProvider.tsx
|
|
17586
17693
|
/**
|
|
17587
17694
|
* Provider that builds the SidePanelController and makes it available
|
|
17588
|
-
* via the SidePanelControllerContext from @rebasepro/
|
|
17695
|
+
* via the SidePanelControllerContext from @rebasepro/app.
|
|
17589
17696
|
*
|
|
17590
17697
|
* After the CMS extraction refactor, `useBuildSidePanel` lives
|
|
17591
17698
|
* in the CMS package while the context it feeds into lives in core.
|
|
@@ -18382,8 +18489,9 @@ var Scaffold = React.memo(function Scaffold(props) {
|
|
|
18382
18489
|
className: "flex flex-col grow overflow-auto",
|
|
18383
18490
|
children: [hasAppBar && /* @__PURE__ */ jsx(DrawerHeader, {}), /* @__PURE__ */ jsx("div", {
|
|
18384
18491
|
className: cls(defaultBorderMixin, "bg-surface-50 dark:bg-surface-800", "grow overflow-auto m-0", {
|
|
18385
|
-
"lg:mt-4": !hasAppBar,
|
|
18386
18492
|
"mt-1 lg:m-0 lg:mx-2 lg:mb-2 lg:rounded-lg lg:border-t lg:border-x lg:border-solid": padding,
|
|
18493
|
+
"lg:mt-2": !hasAppBar && padding,
|
|
18494
|
+
"lg:mt-4": !hasAppBar && !padding,
|
|
18387
18495
|
"border-t": hasAppBar && !padding
|
|
18388
18496
|
}),
|
|
18389
18497
|
children: /* @__PURE__ */ jsx(ErrorBoundary, { children: otherChildren })
|
|
@@ -18446,7 +18554,7 @@ function DrawerWrapper(props) {
|
|
|
18446
18554
|
});
|
|
18447
18555
|
}
|
|
18448
18556
|
//#endregion
|
|
18449
|
-
//#region src/components/
|
|
18557
|
+
//#region src/components/RebaseAdmin.tsx
|
|
18450
18558
|
/**
|
|
18451
18559
|
* Declarative component to configure the CMS in Rebase.
|
|
18452
18560
|
* Renders nothing — purely registers config into the RebaseRegistry.
|
|
@@ -18455,7 +18563,7 @@ function DrawerWrapper(props) {
|
|
|
18455
18563
|
* is auto-wired as a native feature (slots, provider, Studio view) without
|
|
18456
18564
|
* needing any external plugin.
|
|
18457
18565
|
*/
|
|
18458
|
-
function
|
|
18566
|
+
function RebaseAdmin({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings, basePath }) {
|
|
18459
18567
|
const dispatch = useRebaseRegistryDispatch();
|
|
18460
18568
|
useLayoutEffect(() => {
|
|
18461
18569
|
dispatch.registerCMS({
|
|
@@ -18612,7 +18720,7 @@ function useLocalCollectionsConfigController(clientOrUrl, baseCollections = [],
|
|
|
18612
18720
|
//#region src/components/RebaseNavigation.tsx
|
|
18613
18721
|
var EMPTY_PLUGINS = [];
|
|
18614
18722
|
var EMPTY_COLLECTIONS = [];
|
|
18615
|
-
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-
|
|
18723
|
+
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-C6XQ7Il5.js").then((n) => n.n).then((m) => ({ default: m.RouterCollectionsStudioView })));
|
|
18616
18724
|
/**
|
|
18617
18725
|
* Navigation layer — builds and provides all CMS navigation controllers:
|
|
18618
18726
|
* collection registry, URL controller, navigation state, side entity,
|
|
@@ -18653,6 +18761,7 @@ function RebaseNavigation({ children }) {
|
|
|
18653
18761
|
const defaultData = useData();
|
|
18654
18762
|
const getCollectionRef = useRef(collectionRegistryController.getCollection);
|
|
18655
18763
|
getCollectionRef.current = collectionRegistryController.getCollection;
|
|
18764
|
+
useContext(CollectionResolverRegistrationContext)(useCallback((slug) => getCollectionRef.current(slug), []));
|
|
18656
18765
|
const routedData = useMemo(() => buildRoutedRebaseData({
|
|
18657
18766
|
defaultData,
|
|
18658
18767
|
sources: dataSources.sources,
|
|
@@ -18788,17 +18897,18 @@ function BridgeAutoRegistrar({ collectionRegistryController, urlController, navi
|
|
|
18788
18897
|
//#endregion
|
|
18789
18898
|
//#region src/components/RebaseLayout.tsx
|
|
18790
18899
|
/**
|
|
18791
|
-
* Layout layer — provides the Scaffold,
|
|
18900
|
+
* Layout layer — provides the Scaffold, Drawer, and SideDialogs.
|
|
18792
18901
|
*
|
|
18793
18902
|
* Wraps the route outlet with the standard Rebase admin layout.
|
|
18794
|
-
* Override
|
|
18903
|
+
* Override the drawer via props; pass `appBar` to add a top bar (there is
|
|
18904
|
+
* none by default — the drawer owns navigation and user actions).
|
|
18795
18905
|
*
|
|
18796
18906
|
* **Independently usable**: Use this when you want the Rebase layout
|
|
18797
18907
|
* without its default route definitions.
|
|
18798
18908
|
*
|
|
18799
18909
|
* @example
|
|
18800
18910
|
* ```tsx
|
|
18801
|
-
* <RebaseLayout title="My Admin">
|
|
18911
|
+
* <RebaseLayout title="My Admin" appBar={<AppBar/>}>
|
|
18802
18912
|
* <Route path="/" element={<MyHomePage />} />
|
|
18803
18913
|
* <Route path="/custom" element={<CustomView />} />
|
|
18804
18914
|
* </RebaseLayout>
|
|
@@ -18807,13 +18917,7 @@ function BridgeAutoRegistrar({ collectionRegistryController, urlController, navi
|
|
|
18807
18917
|
function RebaseLayout(props) {
|
|
18808
18918
|
const { title = "Rebase", appBar, drawer, autoOpenDrawer = false, devViews = [] } = props;
|
|
18809
18919
|
const adminModeController = useAdminModeController();
|
|
18810
|
-
const ResolvedAppBar = useComponentOverride("Shell.AppBar", AppBar);
|
|
18811
18920
|
const ResolvedDrawer = useComponentOverride("Shell.Drawer", Drawer);
|
|
18812
|
-
const ActiveAppBar = appBar ?? /* @__PURE__ */ jsx(ResolvedAppBar, {
|
|
18813
|
-
includeLanguageToggle: false,
|
|
18814
|
-
includeModeToggle: false,
|
|
18815
|
-
includeUserMenu: false
|
|
18816
|
-
});
|
|
18817
18921
|
const ActiveDrawer = drawer ?? /* @__PURE__ */ jsx(ResolvedDrawer, {
|
|
18818
18922
|
title,
|
|
18819
18923
|
logoDestination: adminModeController.mode === "studio" ? "/s" : "/"
|
|
@@ -18822,7 +18926,7 @@ function RebaseLayout(props) {
|
|
|
18822
18926
|
autoOpenDrawer,
|
|
18823
18927
|
children: [
|
|
18824
18928
|
/* @__PURE__ */ jsx(AdminModeSyncer, { devViews }),
|
|
18825
|
-
|
|
18929
|
+
appBar,
|
|
18826
18930
|
ActiveDrawer,
|
|
18827
18931
|
/* @__PURE__ */ jsx(Outlet, {}),
|
|
18828
18932
|
/* @__PURE__ */ jsx(SideDialogs, {})
|
|
@@ -20109,8 +20213,8 @@ function CustomViewRoute({ view }) {
|
|
|
20109
20213
|
}
|
|
20110
20214
|
//#endregion
|
|
20111
20215
|
//#region src/components/CollectionEditorDialogs.tsx
|
|
20112
|
-
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-
|
|
20113
|
-
var PropertyFormDialog = lazy(() => import("./PropertyEditView-
|
|
20216
|
+
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-DbPpDDwb.js").then((n) => n.r).then((m) => ({ default: m.CollectionEditorDialog })));
|
|
20217
|
+
var PropertyFormDialog = lazy(() => import("./PropertyEditView-DfJbZ67t.js").then((n) => n.t).then((m) => ({ default: m.PropertyFormDialog })));
|
|
20114
20218
|
/**
|
|
20115
20219
|
* Renders the CollectionEditorDialog and PropertyFormDialog inside
|
|
20116
20220
|
* the RebaseShell tree where CMS-internal contexts
|
|
@@ -24028,15 +24132,15 @@ var DEFAULT_COLLECTION_GENERATION_ENDPOINT = "https://api.rebase.pro/collections
|
|
|
24028
24132
|
*
|
|
24029
24133
|
* @example
|
|
24030
24134
|
* ```tsx
|
|
24031
|
-
* import {
|
|
24135
|
+
* import { RebaseAdmin } from "@rebasepro/admin";
|
|
24032
24136
|
* import { buildCollectionGenerationCallback } from "@rebasepro/admin/collection_editor";
|
|
24033
|
-
* import { useFirebaseAuthController } from "@rebasepro/
|
|
24137
|
+
* import { useFirebaseAuthController } from "@rebasepro/firebase";
|
|
24034
24138
|
*
|
|
24035
24139
|
* const authController = useFirebaseAuthController({ firebaseApp });
|
|
24036
24140
|
*
|
|
24037
24141
|
* export function App() {
|
|
24038
24142
|
* return (
|
|
24039
|
-
* <
|
|
24143
|
+
* <RebaseAdmin
|
|
24040
24144
|
* collectionEditor={{
|
|
24041
24145
|
* generateCollection: buildCollectionGenerationCallback({
|
|
24042
24146
|
* getAuthToken: authController.getAuthToken
|
|
@@ -24117,6 +24221,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
|
|
|
24117
24221
|
return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
|
|
24118
24222
|
}
|
|
24119
24223
|
//#endregion
|
|
24120
|
-
export { RelationPreview as $, SelectableTable as $n, BlockFieldBinding as $t, useCollectionDataController as A, removeInitialAndTrailingSlashes$1 as An, renderSkeletonIcon as Ar, useImportConfig as At, ArrayOfMapsPreview as B, useUrlController as Bn, getFieldId as Bt, downloadEntitiesExport as C, editEntityAction as Cn, ArrayPropertyPreview as Cr, useCollectionEditorController as Ct, ImportDataPreview as D, getCollectionBySlugWithin as Dn, StorageThumbnailInternal as Dr, flattenEntry as Dt, ImportCollectionAction as E, addInitialSlash as En, StorageThumbnail as Er, convertDataToEntity as Et, extractTouchedValues as F, useHistory as Fn, ImagePreview as Fr, PropertyConfigBadge as Ft, DatePreview as G, useSideDialogsController as Gn, SelectFieldBinding as Gt, UserPreview as H, useNavigationStateController as Hn, TextFieldBinding as Ht, getChanges as I, resolveNavigationFrom as In, EmptyValue as Ir, DEFAULT_FIELD_CONFIGS as It, ArrayOneOfPreview as J, useBuildSidePanel as Jn, MultiSelectFieldBinding as Jt, KeyValuePreview as K, buildSidePanelsFromUrl as Kn, RepeatFieldBinding as Kt, getInitialEntityValues as L, useResolvedNavigationFrom as Ln, getDefaultFieldConfig as Lt, mapPropertyToConfig as M, removeTrailingSlash as Mn, renderSkeletonText as Mr, ImportFileUpload as Mt, EntityFormBinding as N, resolveCollectionPathIds$1 as Nn, UrlComponentPreview as Nr, convertFileToJson as Nt, PropertySelectEntry as O, getCollectionPathsCombinations as On, SkeletonPropertyComponent as Or, processValueMapping as Ot, EntityForm as P, useBuildCollectionRegistryController as Pn, sanitizeUrl as Pr, unflattenObject as Pt, ArrayOfStorageComponentsPreview as Q, CollectionTableBinding as Qn, DateTimeFieldBinding as Qt, removeEmptyContainers as R, useCMSContext as Rn, getDefaultFieldId as Rt, downloadDataAsCsv as S, deleteEntityAction as Sn, isRelationProperty as Sr, CollectionViewActions as St, getEntityJsonExportableData as T, CreationResultDialog as Tn, EnumValuesChip as Tr, DataNewPropertiesMapping as Tt, NumberPropertyPreview as U, CollectionRegistryContext as Un, SwitchFieldBinding as Ut, PropertyPreview as V, NavigationStateContext as Vn, VectorFieldBinding as Vt, BooleanPreview as W, useCollectionRegistryController as Wn, StorageUploadFieldBinding as Wt, ArrayPropertyEnumPreview as X, useSelectionController as Xn, MapFieldBinding as Xt, ArrayOfStringsPreview as Y, mergeEntityActions as Yn, MarkdownEditorFieldBinding as Yt, ArrayEnumPreview as Z, VirtualTableInput$1 as Zn, KeyValueFieldBinding as Zt, toSerializableProperty as _, useBuildNavigationStateController as _n, getIconForWidget as _r, SidePanelProvider as _t, namespaceToPropertiesPath as a, FormLayout as an, useSelectionDialog as ar, RebaseLayout as at, BasicExportAction as b, useResolvedCollections as bn, getResolvedPropertyInPath as br, CollectionCardViewBinding as bt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as c, PropertyIdCopyTooltip as cn, EntityViewBinding as cr, RebaseAuthGate as ct, useJsonCollectionsConfigController as d, SearchIconsView as dn, EntityPreviewBinding as dr, Drawer as dt, ArrayOfReferencesFieldBinding as en, CollectionRowActions as er, CollectionPanel as et, fromSerializableCollectionConfig as f, FieldCaption as fn, getEntityPreviewKeys as fr, DefaultDrawer as ft, toSerializableProperties as g, useBuildUrlController as gn, getIconForProperty as gr, AdminModeSyncer as gt, toSerializableCollectionConfig as h, useBreadcrumbsController as hn, getDefaultPropertiesOrder as hr, useApp as ht, namespaceToPropertiesOrderPath as i, ReadOnlyFieldBinding as in, useSidePanel as ir, RebaseRoute as it, mapPropertiesToConfigs as j, removeInitialSlash as jn, renderSkeletonImageThumbnail as jr, ImportSaveInProgress as jt, createStaticDataController as k, getLastSegment$1 as kn, renderSkeletonCaptionText as kr, getInferenceType as kt, buildCollectionGenerationCallback as l, LabelWithIcon as ln, ArrayOfReferencesPreview as lr,
|
|
24224
|
+
export { RelationPreview as $, SelectableTable as $n, BlockFieldBinding as $t, useCollectionDataController as A, removeInitialAndTrailingSlashes$1 as An, renderSkeletonIcon as Ar, useImportConfig as At, ArrayOfMapsPreview as B, useUrlController as Bn, getFieldId as Bt, downloadEntitiesExport as C, editEntityAction as Cn, ArrayPropertyPreview as Cr, useCollectionEditorController as Ct, ImportDataPreview as D, getCollectionBySlugWithin as Dn, StorageThumbnailInternal as Dr, flattenEntry as Dt, ImportCollectionAction as E, addInitialSlash as En, StorageThumbnail as Er, convertDataToEntity as Et, extractTouchedValues as F, useHistory as Fn, ImagePreview as Fr, PropertyConfigBadge as Ft, DatePreview as G, useSideDialogsController as Gn, SelectFieldBinding as Gt, UserPreview as H, useNavigationStateController as Hn, TextFieldBinding as Ht, getChanges as I, resolveNavigationFrom as In, EmptyValue as Ir, DEFAULT_FIELD_CONFIGS as It, ArrayOneOfPreview as J, useBuildSidePanel as Jn, MultiSelectFieldBinding as Jt, KeyValuePreview as K, buildSidePanelsFromUrl as Kn, RepeatFieldBinding as Kt, getInitialEntityValues as L, useResolvedNavigationFrom as Ln, getDefaultFieldConfig as Lt, mapPropertyToConfig as M, removeTrailingSlash as Mn, renderSkeletonText as Mr, ImportFileUpload as Mt, EntityFormBinding as N, resolveCollectionPathIds$1 as Nn, UrlComponentPreview as Nr, convertFileToJson as Nt, PropertySelectEntry as O, getCollectionPathsCombinations as On, SkeletonPropertyComponent as Or, processValueMapping as Ot, EntityForm as P, useBuildCollectionRegistryController as Pn, sanitizeUrl as Pr, unflattenObject as Pt, ArrayOfStorageComponentsPreview as Q, CollectionTableBinding as Qn, DateTimeFieldBinding as Qt, removeEmptyContainers as R, useCMSContext as Rn, getDefaultFieldId as Rt, downloadDataAsCsv as S, deleteEntityAction as Sn, isRelationProperty as Sr, CollectionViewActions as St, getEntityJsonExportableData as T, CreationResultDialog as Tn, EnumValuesChip as Tr, DataNewPropertiesMapping as Tt, NumberPropertyPreview as U, CollectionRegistryContext as Un, SwitchFieldBinding as Ut, PropertyPreview as V, NavigationStateContext as Vn, VectorFieldBinding as Vt, BooleanPreview as W, useCollectionRegistryController as Wn, StorageUploadFieldBinding as Wt, ArrayPropertyEnumPreview as X, useSelectionController as Xn, MapFieldBinding as Xt, ArrayOfStringsPreview as Y, mergeEntityActions as Yn, MarkdownEditorFieldBinding as Yt, ArrayEnumPreview as Z, VirtualTableInput$1 as Zn, KeyValueFieldBinding as Zt, toSerializableProperty as _, useBuildNavigationStateController as _n, getIconForWidget as _r, SidePanelProvider as _t, namespaceToPropertiesPath as a, FormLayout as an, useSelectionDialog as ar, RebaseLayout as at, BasicExportAction as b, useResolvedCollections as bn, getResolvedPropertyInPath as br, CollectionCardViewBinding as bt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as c, PropertyIdCopyTooltip as cn, EntityViewBinding as cr, RebaseAuthGate as ct, useJsonCollectionsConfigController as d, SearchIconsView as dn, EntityPreviewBinding as dr, Drawer as dt, ArrayOfReferencesFieldBinding as en, CollectionRowActions as er, CollectionPanel as et, fromSerializableCollectionConfig as f, FieldCaption as fn, getEntityPreviewKeys as fr, DefaultDrawer as ft, toSerializableProperties as g, useBuildUrlController as gn, getIconForProperty as gr, AdminModeSyncer as gt, toSerializableCollectionConfig as h, useBreadcrumbsController as hn, getDefaultPropertiesOrder as hr, useApp as ht, namespaceToPropertiesOrderPath as i, ReadOnlyFieldBinding as in, useSidePanel as ir, RebaseRoute as it, mapPropertiesToConfigs as j, removeInitialSlash as jn, renderSkeletonImageThumbnail as jr, ImportSaveInProgress as jt, createStaticDataController as k, getLastSegment$1 as kn, renderSkeletonCaptionText as kr, getInferenceType as kt, buildCollectionGenerationCallback as l, LabelWithIcon as ln, ArrayOfReferencesPreview as lr, RebaseAdmin as lt, fromSerializableProperty as m, SideDialogs as mn, getBracketNotation as mr, AppBar as mt, getFullIdPath as n, ArrayCustomShapedFieldBinding as nn, SelectableTableContext as nr, RebaseRouteDefs as nt, MissingReferenceWidget as o, FormEntry as on, resolveEntityAction as or, RebaseNavigation as ot, fromSerializableProperties as p, SelectionTableBinding as pn, getEntityTitlePropertyKey as pr, DrawerFooterActions as pt, MapPropertyPreview as q, getEntityViewWidth as qn, ReferenceFieldBinding as qt, idToPropertiesPath as r, PropertyFieldBinding as rn, SidePanelControllerContext as rr, CustomViewRoute as rt, CollectionGenerationApiError as s, LabelWithIconAndTooltip as sn, resolveEntityView as sr, useLocalCollectionsConfigController as st, getFullId as t, ArrayContainer as tn, useClearRestoreValue as tr, RebaseShell as tt, validateCollectionJson as u, FieldHelperText as un, ReferencePreview as ur, Scaffold as ut, useCollectionsConfigController as v, useTopLevelNavigation as vn, getPropertiesWithPropertiesOrder as vr, ReferenceWidget as vt, getEntityCSVExportableData as w, resetPasswordAction as wn, StringPropertyPreview as wr, ImportNewPropertyFieldPreview as wt, downloadBlob as x, copyEntityAction as xn, isReferenceProperty as xr, EntityCardBinding as xt, ExportCollectionAction as y, useResolvedViews as yn, getPropertyInPath as yr, CollectionViewBinding as yt, zodToFormErrors as z, UrlContext as zn, getFieldConfig as zt };
|
|
24121
24225
|
|
|
24122
|
-
//# sourceMappingURL=src-
|
|
24226
|
+
//# sourceMappingURL=src-B8WuGSPZ.js.map
|