@rebasepro/admin 0.13.0 → 0.13.1-canary.g18cfeb7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CollectionEditorDialog-CjXkWZ64.js → CollectionEditorDialog-CUFXevVg.js} +3 -3
- package/dist/{CollectionEditorDialog-CjXkWZ64.js.map → CollectionEditorDialog-CUFXevVg.js.map} +1 -1
- package/dist/{PropertyEditView-W8I3YV89.js → PropertyEditView-DDUC7giL.js} +2 -2
- package/dist/{PropertyEditView-W8I3YV89.js.map → PropertyEditView-DDUC7giL.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-BsLTNoqX.js → RouterCollectionsStudioView-vzS848Gf.js} +9 -13
- package/dist/RouterCollectionsStudioView-vzS848Gf.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +1 -0
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/AdditionalFieldValue.d.ts +25 -0
- package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +16 -0
- package/dist/components/CollectionViewBinding/SlotValue.d.ts +63 -0
- package/dist/components/CollectionViewBinding/SplitListCloseButton.d.ts +17 -4
- package/dist/components/CollectionViewBinding/SplitListShowButton.d.ts +12 -0
- package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +55 -5
- package/dist/components/DetailViewBinding.d.ts +15 -0
- package/dist/components/DrawerNavigationGroup.d.ts +9 -6
- package/dist/components/DrawerNavigationItem.d.ts +16 -6
- package/dist/components/EditViewBinding.d.ts +30 -1
- package/dist/components/EntityDisplayHeader.d.ts +53 -0
- package/dist/components/EntityIdentityBar.d.ts +43 -1
- package/dist/components/EntityViewBinding.d.ts +60 -6
- package/dist/components/RebaseLayout.d.ts +1 -1
- package/dist/components/RebaseShell.d.ts +1 -1
- package/dist/components/RelationSelector.d.ts +8 -1
- package/dist/components/UserSelector.d.ts +8 -1
- package/dist/components/app/Scaffold.d.ts +9 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/{export-J79rMoNj.js → export-5bl2EoSs.js} +2 -2
- package/dist/{export-J79rMoNj.js.map → export-5bl2EoSs.js.map} +1 -1
- package/dist/form/components/FieldBlock.d.ts +58 -4
- package/dist/form/components/FormRail.d.ts +13 -0
- package/dist/form/components/FormSections.d.ts +15 -1
- package/dist/form/components/useRailVisible.d.ts +5 -4
- package/dist/form/form_utils.d.ts +38 -1
- package/dist/{history-D7L_JlLO.js → history-BuKKAhoY.js} +4 -4
- package/dist/{history-D7L_JlLO.js.map → history-BuKKAhoY.js.map} +1 -1
- package/dist/hooks/useEntityDisplay.d.ts +102 -0
- package/dist/hooks/useEntityDisplayTitle.d.ts +18 -9
- package/dist/{import-BvYl--U4.js → import-BhdWs34H.js} +3 -3
- package/dist/{import-BvYl--U4.js.map → import-BhdWs34H.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +152 -57
- package/dist/index.js.map +1 -1
- package/dist/preview/compact_text.d.ts +23 -0
- package/dist/preview/components/BooleanPreview.d.ts +3 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +1 -1
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
- package/dist/routes/RebaseRoute.d.ts +1 -1
- package/dist/types/components/PropertyPreviewProps.d.ts +19 -0
- package/dist/util/number_format.d.ts +14 -0
- package/dist/util/previews.d.ts +9 -2
- package/dist/{util-GiwPgxnL.js → util-DNG7iK0w.js} +3756 -2300
- package/dist/util-DNG7iK0w.js.map +1 -0
- package/package.json +9 -9
- package/src/collection_editor/serializable_types.ts +1 -0
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +9 -11
- package/src/components/AdditionalFieldValue.tsx +68 -0
- package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +7 -8
- package/src/components/CollectionTableBinding/PropertyTableCell.tsx +2 -2
- package/src/components/CollectionTableBinding/column_utils.tsx +15 -6
- package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +2 -2
- package/src/components/CollectionViewBinding/BoardCardBinding.tsx +26 -27
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +723 -348
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +1 -1
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +38 -8
- package/src/components/CollectionViewBinding/EntityCardBinding.tsx +23 -36
- package/src/components/CollectionViewBinding/SlotValue.tsx +156 -0
- package/src/components/CollectionViewBinding/SplitListCloseButton.tsx +23 -7
- package/src/components/CollectionViewBinding/SplitListShowButton.tsx +28 -0
- package/src/components/CollectionViewBinding/SplitListView.tsx +33 -2
- package/src/components/CollectionViewBinding/useBoardDataController.tsx +12 -3
- package/src/components/CollectionViewBinding/usePreviewSlots.ts +183 -64
- package/src/components/CollectionViewBinding/utils.ts +7 -4
- package/src/components/DefaultDrawer.tsx +19 -23
- package/src/components/DetailViewBinding.tsx +93 -56
- package/src/components/DrawerNavigationGroup.tsx +16 -39
- package/src/components/DrawerNavigationItem.tsx +44 -16
- package/src/components/EditViewBinding.tsx +215 -42
- package/src/components/EntityDisplayHeader.tsx +170 -0
- package/src/components/EntityIdentityBar.tsx +163 -23
- package/src/components/EntityInspector.tsx +24 -6
- package/src/components/EntityPreviewBinding.tsx +58 -18
- package/src/components/EntityViewBinding.tsx +342 -41
- package/src/components/InlineEntityPreview.tsx +10 -10
- package/src/components/RebaseLayout.tsx +2 -2
- package/src/components/RebaseShell.tsx +2 -2
- package/src/components/ReferenceTable/SelectionTableBinding.tsx +4 -2
- package/src/components/RelationSelector.tsx +15 -4
- package/src/components/SideDialogs.tsx +15 -3
- package/src/components/SidePanelBinding.tsx +122 -66
- package/src/components/UserSelector.tsx +15 -4
- package/src/components/app/Scaffold.tsx +112 -10
- package/src/components/history/LastEditedByIndicator.tsx +7 -12
- package/src/components/index.ts +3 -0
- package/src/data_import/utils/data.ts +9 -1
- package/src/form/EntityForm.tsx +64 -52
- package/src/form/EntityFormBinding.tsx +24 -11
- package/src/form/PropertyFieldBinding.tsx +2 -2
- package/src/form/components/FieldBlock.tsx +80 -10
- package/src/form/components/FormRail.tsx +19 -2
- package/src/form/components/FormSections.tsx +32 -5
- package/src/form/components/StorageUploadProgress.tsx +9 -3
- package/src/form/components/useRailVisible.tsx +5 -4
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +2 -2
- package/src/form/field_bindings/BinaryFieldBinding.tsx +10 -5
- package/src/form/field_bindings/BlockFieldBinding.tsx +3 -3
- package/src/form/field_bindings/GeopointFieldBinding.tsx +23 -16
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +13 -7
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +7 -1
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +7 -1
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -1
- package/src/form/field_bindings/RelationFieldBinding.tsx +5 -2
- package/src/form/field_bindings/RepeatFieldBinding.tsx +3 -3
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +4 -1
- package/src/form/field_bindings/VectorFieldBinding.tsx +6 -4
- package/src/form/form_utils.ts +78 -0
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +29 -5
- package/src/hooks/useEntityDisplay.tsx +262 -0
- package/src/hooks/useEntityDisplayTitle.tsx +27 -38
- package/src/index.ts +9 -1
- package/src/preview/PropertyPreview.tsx +25 -5
- package/src/preview/compact_text.ts +68 -0
- package/src/preview/components/BooleanPreview.tsx +5 -2
- package/src/preview/components/StorageThumbnail.tsx +5 -2
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +6 -3
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +26 -1
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +10 -1
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +10 -1
- package/src/preview/property_previews/MapPropertyPreview.tsx +52 -1
- package/src/preview/property_previews/NumberPropertyPreview.tsx +9 -1
- package/src/preview/property_previews/StringPropertyPreview.tsx +8 -5
- package/src/routes/RebaseRoute.tsx +62 -4
- package/src/types/components/PropertyPreviewProps.tsx +21 -0
- package/src/util/number_format.ts +46 -0
- package/src/util/previews.ts +8 -55
- package/src/util/property_utils.tsx +6 -1
- package/dist/RouterCollectionsStudioView-BsLTNoqX.js.map +0 -1
- package/dist/util-GiwPgxnL.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { i as PropertySelectEntry, n as ImportCollectionAction, r as ImportDataPreview } from "./import-
|
|
3
|
-
import { a as downloadDataAsCsv, c as getEntityJsonExportableData, i as downloadBlob, n as ExportCollectionAction, o as downloadEntitiesExport, r as BasicExportAction, s as getEntityCSVExportableData } from "./export-
|
|
1
|
+
import { $ as getEntityViewWidth, $n as UrlComponentPreview, $t as CollectionTableBinding, A as SelectFieldBinding, An as ArrayOfReferencesPreview, At as convertFileToJson, B as useSelectionDialog, Bn as getEntityPreviewKeys, Bt as mergeEntityActions, C as getDefaultFieldId, Cn as MapPropertyPreview, Ct as convertDataToEntity, D as TextFieldBinding, Dn as ArrayEnumPreview, Dt as useImportConfig, E as VectorFieldBinding, En as ArrayPropertyEnumPreview, Et as getInferenceType, F as MapFieldBinding, Fn as useSidePanel, Ft as FieldCaption, G as useTopLevelNavigation, Gn as EnumValuesChip, Gt as removeInitialAndTrailingSlashes, H as SideDialogs, Hn as getEntityTitlePropertyKeyForEntity, Ht as getCollectionBySlugWithin, I as KeyValueFieldBinding, In as CollectionRegistryContext, It as useBreadcrumbsController, J as useBuildCollectionRegistryController, Jn as SkeletonPropertyComponent, Jt as resolveCollectionPathIds, K as useResolvedViews, Kn as StorageThumbnail, Kt as removeInitialSlash, L as DateTimeFieldBinding, Ln as useCollectionRegistryController, Lt as BreadcrumbsProvider, M as ReferenceFieldBinding, Mn as ReferencePreview, Mt as ArrayContainer, N as MultiSelectFieldBinding, Nn as EntityPreviewBinding, Nt as PropertyConfigBadge, O as SwitchFieldBinding, On as ArrayOfStorageComponentsPreview, Ot as ImportSaveInProgress, P as MarkdownEditorFieldBinding, Pn as SidePanelControllerContext, Pt as SearchIconsView, Q as buildSidePanelsFromUrl, Qn as renderSkeletonText, Qt as VirtualTableInput, R as BlockFieldBinding, Rn as getUserLabel, Rt as resolveEntityAction, S as getDefaultFieldConfig, Sn as KeyValuePreview, St as DataNewPropertiesMapping, T as getFieldId, Tn as ArrayOfStringsPreview, Tt as processValueMapping, U as useBuildUrlController, Un as ArrayPropertyPreview, Ut as getCollectionPathsCombinations, V as SelectionTableBinding, Vn as getEntityTitlePropertyKey, Vt as addInitialSlash, W as useBuildNavigationStateController, Wn as StringPropertyPreview, Wt as getLastSegment, X as resolveNavigationFrom, Xn as renderSkeletonIcon, Xt as resolveViewMode, Y as useHistory, Yn as renderSkeletonCaptionText, Yt as resolveOpenEntityMode, Z as useResolvedNavigationFrom, Zn as renderSkeletonImageThumbnail, Zt as useSelectionController, _ as useCollectionsConfigController, _n as PropertyPreview, _r as getResolvedPropertyInPath, _t as CollectionViewActions, a as namespaceToPropertiesPath, an as NavigationStateContext, ar as RecordMeta, at as removeEmptyContainers, b as PropertyFieldBinding, bn as BooleanPreview, bt as useCollectionEditorDialogsState, c as buildCollectionGenerationCallback, cn as SideDialogsControllerContext, cr as isSelfLabellingProperty, ct as copyEntityAction, d as fromSerializableCollectionConfigs, dn as useClearRestoreValue, dr as getBracketNotation, dt as resetPasswordAction, en as SelectableTable, er as ImagePreview, et as useBuildSidePanel, f as fromSerializableProperties, fn as ReadOnlyFieldBinding, fr as getDefaultPropertiesOrder, ft as CreationResultDialog, g as toSerializableProperty, gn as ArrayOfMapsPreview, gr as getPropertyInPath, gt as EntityCardBinding, h as toSerializableProperties, hn as FieldHelperText, hr as getPropertiesWithPropertiesOrder, ht as CollectionCardViewBinding, i as namespaceToPropertiesOrderPath, in as useUrlController, ir as FormRail, it as getInitialEntityValues, j as RepeatFieldBinding, jn as InlineEntityListPreview, jt as unflattenObject, k as StorageUploadFieldBinding, kn as RelationPreview, kt as ImportFileUpload, l as validateCollectionJson, ln as SelectableTableContext, lr as spanClass, lt as deleteEntityAction, m as toSerializableCollectionConfig, mn as LabelWithIcon, mr as getIconForWidget, mt as EntityViewBinding, n as getFullIdPath, nn as useAdminContext, nr as EmptyValue, nt as extractTouchedValues, o as CollectionGenerationApiError, on as useNavigationStateController, or as FieldBlock, ot as zodToFormErrors, p as fromSerializableProperty, pn as LabelWithIconAndTooltip, pr as getIconForProperty, pt as DetailViewBinding, q as useResolvedCollections, qn as StorageThumbnailInternal, qt as removeTrailingSlash, r as idToPropertiesPath, rn as UrlContext, rr as FormSections, rt as getChanges, s as DEFAULT_COLLECTION_GENERATION_ENDPOINT, sn as useSideDialogsController, sr as LABEL_ICON_SIZE, st as CollectionViewBinding, t as getFullId, tn as CollectionRowActions, tr as sanitizeUrl, tt as EditViewBinding, u as fromSerializableCollectionConfig, un as ArrayCustomShapedFieldBinding, ur as PropertyIdCopyTooltip, ut as editEntityAction, v as EntityFormBinding, vn as UserPreview, vr as isReferenceProperty, vt as useCollectionEditorController, w as getFieldConfig, wn as ArrayOneOfPreview, wt as flattenEntry, x as DEFAULT_FIELD_CONFIGS, xn as DatePreview, xt as ImportNewPropertyFieldPreview, y as EntityForm, yn as NumberPropertyPreview, yr as isRelationProperty, yt as ConfigControllerProvider, z as ArrayOfReferencesFieldBinding, zn as useResolvedUser, zt as resolveEntityView } from "./util-DNG7iK0w.js";
|
|
2
|
+
import { i as PropertySelectEntry, n as ImportCollectionAction, r as ImportDataPreview } from "./import-BhdWs34H.js";
|
|
3
|
+
import { a as downloadDataAsCsv, c as getEntityJsonExportableData, i as downloadBlob, n as ExportCollectionAction, o as downloadEntitiesExport, r as BasicExportAction, s as getEntityCSVExportableData } from "./export-5bl2EoSs.js";
|
|
4
4
|
import React, { Suspense, lazy, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { deepEqual } from "fast-equals";
|
|
6
|
-
import { Avatar, Button, Card, ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, Chip, CircularProgressCenter, Collapse, Container, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, IconButton, LogOutIcon, Markdown, Menu, MenuIcon, MenuItem, MoonIcon, PencilIcon, SearchBar, SettingsIcon, Sheet, Skeleton, StarIcon, SunIcon, SunMoonIcon, TextField, Tooltip, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
6
|
+
import { Avatar, Button, Card, CenteredView, ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, Chip, CircularProgressCenter, Collapse, Container, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, IconButton, LogOutIcon, Markdown, Menu, MenuIcon, MenuItem, MoonIcon, PencilIcon, SearchBar, SettingsIcon, Sheet, Skeleton, StarIcon, SunIcon, SunMoonIcon, TextField, Tooltip, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
7
7
|
import { buildRoutedRebaseData, getReferenceFrom, resolveDataSource } from "@rebasepro/common";
|
|
8
8
|
import { CollectionResolverRegistrationContext, CollectionScopeProvider, CustomizationControllerContext, DEFAULT_API_PATH, ErrorView, IconForView, LanguageToggle, LoginView, NavigationBlockerProvider, NotFoundPage, RebaseDataContext, RebaseLogo, RebaseRoutes, SchemaDriftBanner, StudioBridgeRegistryProvider, UIReferenceView, UnsavedChangesDialog, UserSettingsView, buildCollapsedDefaults, getIcon, getLastSegment as getLastSegment$1, getNavigationEntriesFromPath, useAdminModeController, useAnalyticsController, useAuthController, useBridgeRegistration, useBuildLocalConfigurationPersistence, useCollapsedGroups, useComponentOverride, useCustomizationController, useData, useDataSources, useLargeLayout, useModeController, useNavigationBlocker, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRestoreScroll, useSlot, useTranslation, useUserConfigurationPersistence } from "@rebasepro/app";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -86,7 +86,7 @@ function RebaseRoute() {
|
|
|
86
86
|
if (!collection) collection = collectionRegistry.getCollection(navigationEntries[0].slug);
|
|
87
87
|
if (!collection) {
|
|
88
88
|
if (!collectionRegistry.initialised) return /* @__PURE__ */ jsx(CircularProgressCenter, {});
|
|
89
|
-
return
|
|
89
|
+
return /* @__PURE__ */ jsx(UnresolvedCollectionView, { path: navigationEntries[0].slug });
|
|
90
90
|
}
|
|
91
91
|
return /* @__PURE__ */ jsx(ResolvedCollectionView, {
|
|
92
92
|
...collection,
|
|
@@ -105,7 +105,7 @@ function RebaseRoute() {
|
|
|
105
105
|
if (!collection) collection = collectionRegistry.getCollection(firstEntry.slug);
|
|
106
106
|
if (!collection) {
|
|
107
107
|
if (!collectionRegistry.initialised) return /* @__PURE__ */ jsx(CircularProgressCenter, {});
|
|
108
|
-
return
|
|
108
|
+
return /* @__PURE__ */ jsx(UnresolvedCollectionView, { path: firstEntry.slug });
|
|
109
109
|
}
|
|
110
110
|
return /* @__PURE__ */ jsx(ResolvedCollectionView, {
|
|
111
111
|
...collection,
|
|
@@ -178,6 +178,7 @@ function EntityFullScreenRoute({ pathname, navigationEntries, isNew, isCopy }) {
|
|
|
178
178
|
const urlController = useUrlController();
|
|
179
179
|
const navigate = useNavigate();
|
|
180
180
|
const location = useLocation();
|
|
181
|
+
const userConfigPersistence = useUserConfigurationPersistence();
|
|
181
182
|
const defaultValues = location.state?.defaultValues;
|
|
182
183
|
const hash = location.hash;
|
|
183
184
|
const navigationPath = urlController.urlPathToDataPath(pathname);
|
|
@@ -225,12 +226,26 @@ function EntityFullScreenRoute({ pathname, navigationEntries, isNew, isCopy }) {
|
|
|
225
226
|
const fullIdPath = isNew ? lastCollectionEntry.slug : lastEntityEntry.slug;
|
|
226
227
|
const collectionPath = urlController.resolveDatabasePathsFrom(fullIdPath);
|
|
227
228
|
const isEditRoute = pathname.endsWith("/edit") || pathname.split("/").pop() === "edit";
|
|
228
|
-
|
|
229
|
+
const isDetailMode = collection.defaultEntityAction === "view" && !isNew && !isCopy && entityId && !isEditRoute;
|
|
230
|
+
const showList = !isNew && !isCopy && entityId !== void 0 && navigationEntries[0]?.type === "collection" && (navigationEntries.length === 2 || navigationEntries.length === 3) && resolveOpenEntityMode({
|
|
231
|
+
collection,
|
|
232
|
+
viewMode: resolveViewMode({
|
|
233
|
+
collection,
|
|
234
|
+
search: location.search,
|
|
235
|
+
savedViewMode: userConfigPersistence?.getCollectionConfig(collection.slug)?.defaultViewMode
|
|
236
|
+
})
|
|
237
|
+
}) === "split" ? () => navigate({
|
|
238
|
+
pathname,
|
|
239
|
+
search: location.search,
|
|
240
|
+
hash: ""
|
|
241
|
+
}) : void 0;
|
|
242
|
+
if (isDetailMode) return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(DetailViewBinding, {
|
|
229
243
|
entityId,
|
|
230
244
|
collection,
|
|
231
245
|
layout: "full_screen",
|
|
232
246
|
path: collectionPath,
|
|
233
247
|
selectedTab: selectedTab ?? void 0,
|
|
248
|
+
onShowList: showList,
|
|
234
249
|
onEditClick: () => {
|
|
235
250
|
const editUrl = urlController.buildUrlCollectionPath(`${collectionPath}/${entityId}`) + "/edit";
|
|
236
251
|
navigate(editUrl + hash);
|
|
@@ -251,6 +266,7 @@ function EntityFullScreenRoute({ pathname, navigationEntries, isNew, isCopy }) {
|
|
|
251
266
|
path: collectionPath,
|
|
252
267
|
copy: isCopy,
|
|
253
268
|
selectedTab: selectedTab ?? void 0,
|
|
269
|
+
onShowList: showList,
|
|
254
270
|
defaultValues: isNew ? defaultValues : void 0,
|
|
255
271
|
onValuesModified: (modified) => blocked.current = modified,
|
|
256
272
|
navigateBack: () => {
|
|
@@ -280,6 +296,29 @@ function EntityFullScreenRoute({ pathname, navigationEntries, isNew, isCopy }) {
|
|
|
280
296
|
body: "You have unsaved changes in this entity."
|
|
281
297
|
})] });
|
|
282
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* Shown when a URL names a collection the registry cannot resolve.
|
|
301
|
+
*
|
|
302
|
+
* This used to be `return null`, which renders an empty pane inside the app
|
|
303
|
+
* chrome: the sidebar, the nav highlight and the breadcrumb all still work,
|
|
304
|
+
* because those read the collections array directly, while the view itself is
|
|
305
|
+
* blank. Nothing is thrown, and the only trace is a `console.debug` — so the
|
|
306
|
+
* panel looks like it lost its data rather than like it failed to find the
|
|
307
|
+
* collection, and there is no string to search for.
|
|
308
|
+
*
|
|
309
|
+
* A slug containing slashes went unresolvable this way and cost an afternoon to
|
|
310
|
+
* find. The lookup is fixed; this is the part that made it expensive.
|
|
311
|
+
*/
|
|
312
|
+
function UnresolvedCollectionView({ path }) {
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
console.warn(`[rebase] No collection is registered for "${path}", so this route has nothing to render. Check that the collection is in the collections array and that its slug matches the URL.`);
|
|
315
|
+
}, [path]);
|
|
316
|
+
return /* @__PURE__ */ jsx(CenteredView, { children: /* @__PURE__ */ jsx(ErrorView, {
|
|
317
|
+
title: "Collection not found",
|
|
318
|
+
error: `Nothing is registered for "${path}".`,
|
|
319
|
+
tooltip: "The URL names a collection the panel does not know about. It may have been renamed or removed from the collections array, or the slug may not match the path."
|
|
320
|
+
}) });
|
|
321
|
+
}
|
|
283
322
|
//#endregion
|
|
284
323
|
//#region src/components/ReferenceWidget.tsx
|
|
285
324
|
/**
|
|
@@ -735,7 +774,16 @@ function AppBar({ children, ...props }) {
|
|
|
735
774
|
AppBar.componentType = "AppBar";
|
|
736
775
|
//#endregion
|
|
737
776
|
//#region src/components/DrawerNavigationItem.tsx
|
|
738
|
-
function DrawerNavigationItem({ name, icon, drawerOpen,
|
|
777
|
+
function DrawerNavigationItem({ name, icon, drawerOpen, url, onClick, indented = false }) {
|
|
778
|
+
const iconWrap = indented ? /* @__PURE__ */ jsx("div", {
|
|
779
|
+
className: "shrink-0 w-[44px] h-[30px]",
|
|
780
|
+
"aria-hidden": true
|
|
781
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
782
|
+
className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-text-secondary-dark [&>svg]:size-4 group-hover/nav:text-primary transition-colors duration-150",
|
|
783
|
+
children: icon
|
|
784
|
+
});
|
|
785
|
+
const [wantsTooltip, setWantsTooltip] = React.useState(false);
|
|
786
|
+
if (drawerOpen && wantsTooltip) setWantsTooltip(false);
|
|
739
787
|
const listItem = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(NavLink, {
|
|
740
788
|
onClick,
|
|
741
789
|
style: {
|
|
@@ -744,19 +792,14 @@ function DrawerNavigationItem({ name, icon, drawerOpen, adminMenuOpen, tooltipsO
|
|
|
744
792
|
},
|
|
745
793
|
className: ({ isActive }) => cls("rounded-lg truncate group/nav", "hover:bg-primary/5 dark:hover:bg-primary/5 text-surface-700 dark:text-surface-300 hover:text-surface-900 dark:hover:text-white", "flex flex-row items-center", drawerOpen ? "pr-4 h-[30px]" : "h-[30px]", "font-medium text-[13px]", isActive ? "bg-primary/8 dark:bg-primary/10 text-primary dark:text-primary [&_div]:text-primary" : ""),
|
|
746
794
|
to: url,
|
|
747
|
-
children: [
|
|
748
|
-
className: "shrink-0 w-[44px] h-[30px]",
|
|
749
|
-
"aria-hidden": true
|
|
750
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
751
|
-
className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-text-secondary-dark [&>svg]:size-4 group-hover/nav:text-primary transition-colors duration-150",
|
|
752
|
-
children: icon
|
|
753
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
795
|
+
children: [iconWrap, /* @__PURE__ */ jsx("div", {
|
|
754
796
|
className: cls("text-text-primary dark:text-surface-200", drawerOpen ? "opacity-100" : "opacity-0 hidden", "font-inherit truncate space-x-2"),
|
|
755
797
|
children: name
|
|
756
798
|
})]
|
|
757
799
|
}) });
|
|
758
800
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
759
|
-
open: drawerOpen
|
|
801
|
+
open: !drawerOpen && wantsTooltip,
|
|
802
|
+
onOpenChange: setWantsTooltip,
|
|
760
803
|
side: "right",
|
|
761
804
|
title: name,
|
|
762
805
|
children: listItem
|
|
@@ -768,12 +811,10 @@ function DrawerNavigationItem({ name, icon, drawerOpen, adminMenuOpen, tooltipsO
|
|
|
768
811
|
* Shared drawer navigation group component used by both DefaultDrawer and RebaseCloudDrawer.
|
|
769
812
|
* Renders a collapsible group with header and navigation items.
|
|
770
813
|
*/
|
|
771
|
-
function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, drawerOpen,
|
|
814
|
+
function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, drawerOpen, headerActions, onItemClick, hideHeader, icon }) {
|
|
772
815
|
const { t } = useTranslation();
|
|
773
816
|
const ResolvedDrawerNavigationItem = useComponentOverride("Shell.DrawerNavigationItem", DrawerNavigationItem);
|
|
774
817
|
const groupIcon = !hideHeader && drawerOpen ? getIcon(icon, void 0, void 0, "small") : void 0;
|
|
775
|
-
const categorised = Boolean(groupIcon);
|
|
776
|
-
const indentEntries = categorised;
|
|
777
818
|
return /* @__PURE__ */ jsxs("div", {
|
|
778
819
|
className: "my-2 mx-2 flex flex-col",
|
|
779
820
|
children: [!hideHeader && /* @__PURE__ */ jsxs("div", {
|
|
@@ -782,7 +823,7 @@ function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, d
|
|
|
782
823
|
children: [
|
|
783
824
|
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
784
825
|
size: iconSize.small,
|
|
785
|
-
className: cls(
|
|
826
|
+
className: cls("text-surface-400 dark:text-surface-400 transition-transform duration-200 mr-1", collapsed ? "-rotate-90" : "rotate-0")
|
|
786
827
|
}),
|
|
787
828
|
groupIcon && /* @__PURE__ */ jsx("span", {
|
|
788
829
|
className: "shrink-0 mr-2 flex items-center text-surface-600 dark:text-surface-300 [&>svg]:size-4",
|
|
@@ -791,7 +832,7 @@ function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, d
|
|
|
791
832
|
/* @__PURE__ */ jsx(Typography, {
|
|
792
833
|
variant: "caption",
|
|
793
834
|
color: "secondary",
|
|
794
|
-
className:
|
|
835
|
+
className: "font-semibold text-[11px] uppercase tracking-wider flex-grow line-clamp-1 text-surface-400 dark:text-surface-400",
|
|
795
836
|
children: group || t("views_group")
|
|
796
837
|
}),
|
|
797
838
|
headerActions && /* @__PURE__ */ jsx("div", {
|
|
@@ -806,13 +847,10 @@ function DrawerNavigationGroup({ group, entries, collapsed, onToggleCollapsed, d
|
|
|
806
847
|
collectionOrView: entry.collection ?? entry.view,
|
|
807
848
|
size: "small"
|
|
808
849
|
}),
|
|
809
|
-
tooltipsOpen: !collapsed && tooltipsOpen,
|
|
810
|
-
adminMenuOpen,
|
|
811
850
|
drawerOpen,
|
|
812
851
|
onClick: () => onItemClick?.(entry),
|
|
813
852
|
url: entry.url,
|
|
814
|
-
name: entry.name
|
|
815
|
-
indented: indentEntries
|
|
853
|
+
name: entry.name
|
|
816
854
|
}, entry.id))
|
|
817
855
|
})]
|
|
818
856
|
}, `drawer_group_${group}`);
|
|
@@ -881,11 +919,9 @@ function DefaultDrawer({ title, logo, logoDestination, children, footerActions,
|
|
|
881
919
|
*/
|
|
882
920
|
function AdminNavigationContent() {
|
|
883
921
|
const { drawerHovered, drawerOpen, closeDrawer, closeHover } = useApp();
|
|
884
|
-
const [adminMenuOpen, setAdminMenuOpen] = React.useState(false);
|
|
885
922
|
const analyticsController = useAnalyticsController();
|
|
886
923
|
const navigationState = useNavigationStateController();
|
|
887
924
|
const context = useRebaseContext();
|
|
888
|
-
const tooltipsOpen = drawerHovered && !drawerOpen && !adminMenuOpen;
|
|
889
925
|
const largeLayout = useLargeLayout();
|
|
890
926
|
const adminModeController = useAdminModeController();
|
|
891
927
|
const registry = useRebaseRegistry();
|
|
@@ -941,8 +977,6 @@ function AdminNavigationContent() {
|
|
|
941
977
|
collapsed: isGroupCollapsed(group),
|
|
942
978
|
onToggleCollapsed: () => toggleGroupCollapsed(group),
|
|
943
979
|
drawerOpen: drawerVisuallyOpen,
|
|
944
|
-
tooltipsOpen,
|
|
945
|
-
adminMenuOpen,
|
|
946
980
|
onItemClick,
|
|
947
981
|
icon: groupIcons.get(group)
|
|
948
982
|
}, `drawer_group_${group}`);
|
|
@@ -965,7 +999,7 @@ function DrawerLogo({ logo, title, logoDestination = "/", drawerOpen, drawerHove
|
|
|
965
999
|
height: "28px"
|
|
966
1000
|
})
|
|
967
1001
|
}), /* @__PURE__ */ jsx("div", {
|
|
968
|
-
className: cls("flex flex-row items-center overflow-hidden transition-all duration-200 ease-in-out", drawerOpen || drawerHovered
|
|
1002
|
+
className: cls("flex flex-row items-center overflow-hidden transition-all duration-200 ease-in-out", drawerOpen || drawerHovered ? "opacity-100 w-full ml-1" : "opacity-0 w-0 ml-0"),
|
|
969
1003
|
children: title && /* @__PURE__ */ jsx(Link, {
|
|
970
1004
|
className: "visited:text-inherit dark:visited:text-inherit block truncate",
|
|
971
1005
|
to: logoDestination,
|
|
@@ -985,32 +1019,25 @@ function DrawerLogo({ logo, title, logoDestination = "/", drawerOpen, drawerHove
|
|
|
985
1019
|
*/
|
|
986
1020
|
function DrawerToggle({ drawerOpen, drawerHovered, openDrawer, closeDrawer }) {
|
|
987
1021
|
const isExpanded = drawerOpen;
|
|
988
|
-
const
|
|
989
|
-
const
|
|
990
|
-
|
|
1022
|
+
const showFullContent = isExpanded || drawerHovered && !drawerOpen;
|
|
1023
|
+
const [wantsTooltip, setWantsTooltip] = React.useState(false);
|
|
1024
|
+
if (showFullContent && wantsTooltip) setWantsTooltip(false);
|
|
991
1025
|
const { t } = useTranslation();
|
|
992
1026
|
return /* @__PURE__ */ jsx("div", {
|
|
993
1027
|
className: "shrink-0 mt-auto px-4 pt-0.5 pb-2",
|
|
994
1028
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
995
1029
|
title: isExpanded ? t("collapse") : t("expand"),
|
|
1030
|
+
open: !showFullContent && wantsTooltip,
|
|
1031
|
+
onOpenChange: setWantsTooltip,
|
|
996
1032
|
side: "right",
|
|
997
1033
|
sideOffset: 12,
|
|
998
1034
|
asChild: true,
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
className: cls("flex flex-row items-center rounded-lg cursor-pointer", "hover:bg-surface-accent-100 dark:hover:bg-surface-800", "transition-colors duration-150", "py-2"),
|
|
1002
|
-
role: "button",
|
|
1003
|
-
tabIndex: 0,
|
|
1035
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
1036
|
+
type: "button",
|
|
1037
|
+
className: cls("flex flex-row items-center rounded-lg cursor-pointer w-full", "hover:bg-surface-accent-100 dark:hover:bg-surface-800", "transition-colors duration-150", "py-2"),
|
|
1004
1038
|
"aria-expanded": isExpanded,
|
|
1005
1039
|
"aria-label": isExpanded ? t("collapse") : t("expand"),
|
|
1006
1040
|
onClick: () => isExpanded ? closeDrawer() : openDrawer(),
|
|
1007
|
-
onKeyDown: (e) => {
|
|
1008
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1009
|
-
e.preventDefault();
|
|
1010
|
-
if (isExpanded) closeDrawer();
|
|
1011
|
-
else openDrawer();
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
1041
|
children: [/* @__PURE__ */ jsx("div", {
|
|
1015
1042
|
className: "shrink-0 flex items-center justify-center w-[44px] h-[24px] text-surface-500 dark:text-surface-400",
|
|
1016
1043
|
children: isExpanded ? /* @__PURE__ */ jsx(ChevronsLeftIcon, { size: iconSize.small }) : /* @__PURE__ */ jsx(ChevronsRightIcon, { size: iconSize.small })
|
|
@@ -1189,6 +1216,29 @@ function Drawer({ children, title, logo, logoDestination, footerActions, classNa
|
|
|
1189
1216
|
}
|
|
1190
1217
|
Drawer.componentType = "Drawer";
|
|
1191
1218
|
/**
|
|
1219
|
+
* Namespaced by base path: two admins served from one origin are two different
|
|
1220
|
+
* navigations, and a single key would have them overwrite each other's drawer.
|
|
1221
|
+
*/
|
|
1222
|
+
function drawerOpenStorageKey(basePath) {
|
|
1223
|
+
return `rebase-drawer-open:${basePath || "/"}`;
|
|
1224
|
+
}
|
|
1225
|
+
/** `null` when the user has never toggled the drawer, or storage is unavailable. */
|
|
1226
|
+
function readStoredDrawerOpen(key) {
|
|
1227
|
+
if (typeof window === "undefined") return null;
|
|
1228
|
+
try {
|
|
1229
|
+
const stored = window.localStorage.getItem(key);
|
|
1230
|
+
return stored === null ? null : stored === "true";
|
|
1231
|
+
} catch (e) {
|
|
1232
|
+
return null;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
function writeStoredDrawerOpen(key, open) {
|
|
1236
|
+
if (typeof window === "undefined") return;
|
|
1237
|
+
try {
|
|
1238
|
+
window.localStorage.setItem(key, String(open));
|
|
1239
|
+
} catch (e) {}
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1192
1242
|
* This view acts as a scaffold for Rebase.
|
|
1193
1243
|
*
|
|
1194
1244
|
* It is in charge of displaying the navigation drawer, top bar and main
|
|
@@ -1200,7 +1250,7 @@ Drawer.componentType = "Drawer";
|
|
|
1200
1250
|
* @group Core
|
|
1201
1251
|
*/
|
|
1202
1252
|
var Scaffold = React.memo(function Scaffold(props) {
|
|
1203
|
-
const { children, autoOpenDrawer, defaultDrawerOpen = false, logo, className, style, padding = true } = props;
|
|
1253
|
+
const { children, autoOpenDrawer = true, defaultDrawerOpen = false, logo, className, style, padding = true } = props;
|
|
1204
1254
|
const drawerChildren = React.Children.toArray(children).filter((child) => child.type.componentType === "Drawer");
|
|
1205
1255
|
if (drawerChildren.length > 1) throw Error("Only one Drawer component is allowed in Scaffold");
|
|
1206
1256
|
const appBarChildren = React.Children.toArray(children).filter((child) => child.type.componentType === "AppBar");
|
|
@@ -1208,19 +1258,64 @@ var Scaffold = React.memo(function Scaffold(props) {
|
|
|
1208
1258
|
const otherChildren = React.Children.toArray(children).filter((child) => child.type.componentType !== "Drawer" && child.type.componentType !== "AppBar");
|
|
1209
1259
|
const includeDrawer = drawerChildren.length > 0;
|
|
1210
1260
|
const largeLayout = useLargeLayout();
|
|
1211
|
-
const
|
|
1261
|
+
const storageKey = drawerOpenStorageKey(useUrlController().basePath);
|
|
1262
|
+
const [drawerOpen, setDrawerOpenState] = React.useState(defaultDrawerOpen && largeLayout);
|
|
1212
1263
|
const [onHover, setOnHover] = React.useState(false);
|
|
1213
|
-
|
|
1264
|
+
React.useLayoutEffect(() => {
|
|
1265
|
+
const stored = readStoredDrawerOpen(storageKey);
|
|
1266
|
+
if (stored === null) return;
|
|
1267
|
+
setDrawerOpenState(stored && largeLayout);
|
|
1268
|
+
}, [storageKey]);
|
|
1269
|
+
const wasLargeLayout = React.useRef(largeLayout);
|
|
1270
|
+
React.useEffect(() => {
|
|
1271
|
+
if (wasLargeLayout.current === largeLayout) return;
|
|
1272
|
+
wasLargeLayout.current = largeLayout;
|
|
1273
|
+
setDrawerOpenState(largeLayout ? readStoredDrawerOpen(storageKey) ?? defaultDrawerOpen : false);
|
|
1274
|
+
}, [
|
|
1275
|
+
largeLayout,
|
|
1276
|
+
defaultDrawerOpen,
|
|
1277
|
+
storageKey
|
|
1278
|
+
]);
|
|
1279
|
+
const setDrawerOpen = useCallback((open) => {
|
|
1280
|
+
setDrawerOpenState(open);
|
|
1281
|
+
if (!largeLayout) return;
|
|
1282
|
+
writeStoredDrawerOpen(storageKey, open);
|
|
1283
|
+
}, [largeLayout, storageKey]);
|
|
1284
|
+
const collapseWhenPopoverCloses = React.useRef(false);
|
|
1285
|
+
const setOnHoverTrue = useCallback(() => {
|
|
1286
|
+
if (!autoOpenDrawer) return;
|
|
1287
|
+
collapseWhenPopoverCloses.current = false;
|
|
1288
|
+
setOnHover(true);
|
|
1289
|
+
}, [autoOpenDrawer]);
|
|
1214
1290
|
const setOnHoverFalse = useCallback(() => {
|
|
1215
|
-
if (document.querySelector("[data-radix-popper-content-wrapper]"))
|
|
1291
|
+
if (document.querySelector("[data-radix-popper-content-wrapper]")) {
|
|
1292
|
+
collapseWhenPopoverCloses.current = true;
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
collapseWhenPopoverCloses.current = false;
|
|
1216
1296
|
setOnHover(false);
|
|
1217
1297
|
}, []);
|
|
1298
|
+
React.useEffect(() => {
|
|
1299
|
+
if (!onHover) return;
|
|
1300
|
+
const collapseIfOwed = () => {
|
|
1301
|
+
if (!collapseWhenPopoverCloses.current) return;
|
|
1302
|
+
if (document.querySelector("[data-radix-popper-content-wrapper]")) return;
|
|
1303
|
+
collapseWhenPopoverCloses.current = false;
|
|
1304
|
+
setOnHover(false);
|
|
1305
|
+
};
|
|
1306
|
+
const observer = new MutationObserver(collapseIfOwed);
|
|
1307
|
+
observer.observe(document.body, {
|
|
1308
|
+
childList: true,
|
|
1309
|
+
subtree: true
|
|
1310
|
+
});
|
|
1311
|
+
return () => observer.disconnect();
|
|
1312
|
+
}, [onHover]);
|
|
1218
1313
|
const handleDrawerOpen = useCallback(() => {
|
|
1219
1314
|
setDrawerOpen(true);
|
|
1220
|
-
}, []);
|
|
1315
|
+
}, [setDrawerOpen]);
|
|
1221
1316
|
const handleDrawerClose = useCallback(() => {
|
|
1222
1317
|
setDrawerOpen(false);
|
|
1223
|
-
}, []);
|
|
1318
|
+
}, [setDrawerOpen]);
|
|
1224
1319
|
const computedDrawerOpen = drawerOpen;
|
|
1225
1320
|
const computedDrawerHovered = Boolean(largeLayout && onHover);
|
|
1226
1321
|
const isStudioDark = useAdminModeController().mode === "studio";
|
|
@@ -1561,7 +1656,7 @@ function useLocalCollectionsConfigController(clientOrUrl, baseCollections = [],
|
|
|
1561
1656
|
//#region src/components/RebaseNavigation.tsx
|
|
1562
1657
|
var EMPTY_PLUGINS = [];
|
|
1563
1658
|
var EMPTY_COLLECTIONS = [];
|
|
1564
|
-
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-
|
|
1659
|
+
var CollectionsStudioView = lazy(() => import("./RouterCollectionsStudioView-vzS848Gf.js").then((n) => n.n).then((m) => ({ default: m.RouterCollectionsStudioView })));
|
|
1565
1660
|
/**
|
|
1566
1661
|
* Navigation layer — builds and provides all admin navigation controllers:
|
|
1567
1662
|
* collection registry, URL controller, navigation state, side entity,
|
|
@@ -1764,7 +1859,7 @@ function BridgeAutoRegistrar({ collectionRegistryController, urlController, navi
|
|
|
1764
1859
|
* ```
|
|
1765
1860
|
*/
|
|
1766
1861
|
function RebaseLayout(props) {
|
|
1767
|
-
const { title = "Rebase", appBar, drawer, autoOpenDrawer =
|
|
1862
|
+
const { title = "Rebase", appBar, drawer, autoOpenDrawer = true, defaultDrawerOpen = false, logo, devViews = [] } = props;
|
|
1768
1863
|
const adminModeController = useAdminModeController();
|
|
1769
1864
|
const ResolvedDrawer = useComponentOverride("Shell.Drawer", Drawer);
|
|
1770
1865
|
const ActiveDrawer = drawer ?? /* @__PURE__ */ jsx(ResolvedDrawer, {
|
|
@@ -2790,8 +2885,8 @@ function ContentHomePage({ additionalActions, additionalChildrenStart, additiona
|
|
|
2790
2885
|
}
|
|
2791
2886
|
//#endregion
|
|
2792
2887
|
//#region src/components/CollectionEditorDialogs.tsx
|
|
2793
|
-
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-
|
|
2794
|
-
var PropertyFormDialog = lazy(() => import("./PropertyEditView-
|
|
2888
|
+
var CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-CUFXevVg.js").then((n) => n.r).then((m) => ({ default: m.CollectionEditorDialog })));
|
|
2889
|
+
var PropertyFormDialog = lazy(() => import("./PropertyEditView-DDUC7giL.js").then((n) => n.t).then((m) => ({ default: m.PropertyFormDialog })));
|
|
2795
2890
|
/**
|
|
2796
2891
|
* Renders the CollectionEditorDialog and PropertyFormDialog inside
|
|
2797
2892
|
* the RebaseShell tree where admin-internal contexts
|
|
@@ -2938,7 +3033,7 @@ function RebaseRouteDefs({ children, layout }) {
|
|
|
2938
3033
|
* RebaseShell is sugar that composes them all with sensible defaults.
|
|
2939
3034
|
*/
|
|
2940
3035
|
function RebaseShell(props) {
|
|
2941
|
-
const { title = "Rebase", appBar, drawer, autoOpenDrawer =
|
|
3036
|
+
const { title = "Rebase", appBar, drawer, autoOpenDrawer = true, defaultDrawerOpen = false, logo, children } = props;
|
|
2942
3037
|
const registry = useRebaseRegistry();
|
|
2943
3038
|
return /* @__PURE__ */ jsx(RebaseAuthGate, { children: /* @__PURE__ */ jsx(RebaseNavigation, { children: /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
2944
3039
|
fullPage: true,
|
|
@@ -3389,6 +3484,6 @@ function MissingReferenceWidget({ path: pathProp }) {
|
|
|
3389
3484
|
});
|
|
3390
3485
|
}
|
|
3391
3486
|
//#endregion
|
|
3392
|
-
export { AdminModeSyncer, AppBar, ArrayContainer, ArrayCustomShapedFieldBinding, ArrayEnumPreview, ArrayOfMapsPreview, ArrayOfReferencesFieldBinding, ArrayOfReferencesPreview, ArrayOfStorageComponentsPreview, ArrayOfStringsPreview, ArrayOneOfPreview, ArrayPropertyEnumPreview, ArrayPropertyPreview, BasicExportAction, BlockFieldBinding, BooleanPreview, CollectionCardViewBinding, CollectionGenerationApiError, CollectionPanel, CollectionRegistryContext, CollectionRowActions, CollectionTableBinding, CollectionViewActions, CollectionViewBinding, CreationResultDialog, CustomViewRoute, DEFAULT_COLLECTION_GENERATION_ENDPOINT, DEFAULT_FIELD_CONFIGS, DataNewPropertiesMapping, DatePreview, DateTimeFieldBinding, DefaultDrawer, Drawer, DrawerFooterActions, EmptyValue, EntityCardBinding, EntityForm, EntityFormBinding, EntityPreviewBinding, EntityViewBinding, EnumValuesChip, ExportCollectionAction, FieldBlock, FieldCaption, FieldHelperText, FormRail, FormSections, ImagePreview, ImportCollectionAction, ImportDataPreview, ImportFileUpload, ImportNewPropertyFieldPreview, ImportSaveInProgress, InlineEntityListPreview, KeyValueFieldBinding, KeyValuePreview, LabelWithIcon, LabelWithIconAndTooltip, MapFieldBinding, MapPropertyPreview, MarkdownEditorFieldBinding, MissingReferenceWidget, MultiSelectFieldBinding, NavigationStateContext, NumberPropertyPreview, PropertyConfigBadge, PropertyFieldBinding, PropertyIdCopyTooltip, PropertyPreview, PropertySelectEntry, ReadOnlyFieldBinding, RebaseAdmin, RebaseAuthGate, RebaseLayout, RebaseNavigation, RebaseRoute, RebaseRouteDefs, RebaseShell, ReferenceFieldBinding, ReferencePreview, ReferenceWidget, RelationPreview, RepeatFieldBinding, Scaffold, SearchIconsView, SelectFieldBinding, SelectableTable, SelectableTableContext, SelectionTableBinding, SideDialogs, SidePanelControllerContext, SidePanelProvider, SkeletonPropertyComponent, StorageThumbnail, StorageThumbnailInternal, StorageUploadFieldBinding, StringPropertyPreview, SwitchFieldBinding, TextFieldBinding, UrlComponentPreview, UrlContext, UserPreview, VectorFieldBinding, VirtualTableInput, addInitialSlash, buildCollectionGenerationCallback, buildSidePanelsFromUrl, convertDataToEntity, convertFileToJson, copyEntityAction, createStaticDataController, deleteEntityAction, downloadBlob, downloadDataAsCsv, downloadEntitiesExport, editEntityAction, extractTouchedValues, flattenEntry, fromSerializableCollectionConfig, fromSerializableCollectionConfigs, fromSerializableProperties, fromSerializableProperty, getBracketNotation, getChanges, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultFieldConfig, getDefaultFieldId, getDefaultPropertiesOrder, getEntityCSVExportableData, getEntityJsonExportableData, getEntityPreviewKeys, getEntityTitlePropertyKey, getEntityTitlePropertyKeyForEntity, getEntityViewWidth, getFieldConfig, getFieldId, getFullId, getFullIdPath, getIconForProperty, getIconForWidget, getInferenceType, getInitialEntityValues, getLastSegment, getPropertiesWithPropertiesOrder, getPropertyInPath, getResolvedPropertyInPath, getUserLabel, idToPropertiesPath, isReferenceProperty, isRelationProperty, isSelfLabellingProperty, mapPropertiesToConfigs, mapPropertyToConfig, mergeEntityActions, namespaceToPropertiesOrderPath, namespaceToPropertiesPath, processValueMapping, removeEmptyContainers, removeInitialAndTrailingSlashes, removeInitialSlash, removeTrailingSlash, renderSkeletonCaptionText, renderSkeletonIcon, renderSkeletonImageThumbnail, renderSkeletonText, resetPasswordAction, resolveCollectionPathIds, resolveEntityAction, resolveEntityView, resolveNavigationFrom, sanitizeUrl, toSerializableCollectionConfig, toSerializableProperties, toSerializableProperty, unflattenObject, useAdminContext, useApp, useBreadcrumbsController, useBuildCollectionRegistryController, useBuildNavigationStateController, useBuildSidePanel, useBuildUrlController, useClearRestoreValue, useCollectionDataController, useCollectionEditorController, useCollectionRegistryController, useCollectionsConfigController, useHistory, useImportConfig, useJsonCollectionsConfigController, useLocalCollectionsConfigController, useNavigationStateController, useResolvedCollections, useResolvedNavigationFrom, useResolvedUser, useResolvedViews, useSelectionController, useSelectionDialog, useSideDialogsController, useSidePanel, useTopLevelNavigation, useUrlController, validateCollectionJson, zodToFormErrors };
|
|
3487
|
+
export { AdminModeSyncer, AppBar, ArrayContainer, ArrayCustomShapedFieldBinding, ArrayEnumPreview, ArrayOfMapsPreview, ArrayOfReferencesFieldBinding, ArrayOfReferencesPreview, ArrayOfStorageComponentsPreview, ArrayOfStringsPreview, ArrayOneOfPreview, ArrayPropertyEnumPreview, ArrayPropertyPreview, BasicExportAction, BlockFieldBinding, BooleanPreview, CollectionCardViewBinding, CollectionGenerationApiError, CollectionPanel, CollectionRegistryContext, CollectionRowActions, CollectionTableBinding, CollectionViewActions, CollectionViewBinding, CreationResultDialog, CustomViewRoute, DEFAULT_COLLECTION_GENERATION_ENDPOINT, DEFAULT_FIELD_CONFIGS, DataNewPropertiesMapping, DatePreview, DateTimeFieldBinding, DefaultDrawer, Drawer, DrawerFooterActions, DrawerNavigationGroup, DrawerNavigationItem, EmptyValue, EntityCardBinding, EntityForm, EntityFormBinding, EntityPreviewBinding, EntityViewBinding, EnumValuesChip, ExportCollectionAction, FieldBlock, FieldCaption, FieldHelperText, FormRail, FormSections, ImagePreview, ImportCollectionAction, ImportDataPreview, ImportFileUpload, ImportNewPropertyFieldPreview, ImportSaveInProgress, InlineEntityListPreview, KeyValueFieldBinding, KeyValuePreview, LABEL_ICON_SIZE, LabelWithIcon, LabelWithIconAndTooltip, MapFieldBinding, MapPropertyPreview, MarkdownEditorFieldBinding, MissingReferenceWidget, MultiSelectFieldBinding, NavigationStateContext, NumberPropertyPreview, PropertyConfigBadge, PropertyFieldBinding, PropertyIdCopyTooltip, PropertyPreview, PropertySelectEntry, ReadOnlyFieldBinding, RebaseAdmin, RebaseAuthGate, RebaseLayout, RebaseNavigation, RebaseRoute, RebaseRouteDefs, RebaseShell, RecordMeta, ReferenceFieldBinding, ReferencePreview, ReferenceWidget, RelationPreview, RepeatFieldBinding, Scaffold, SearchIconsView, SelectFieldBinding, SelectableTable, SelectableTableContext, SelectionTableBinding, SideDialogs, SidePanelControllerContext, SidePanelProvider, SkeletonPropertyComponent, StorageThumbnail, StorageThumbnailInternal, StorageUploadFieldBinding, StringPropertyPreview, SwitchFieldBinding, TextFieldBinding, UrlComponentPreview, UrlContext, UserPreview, VectorFieldBinding, VirtualTableInput, addInitialSlash, buildCollectionGenerationCallback, buildSidePanelsFromUrl, convertDataToEntity, convertFileToJson, copyEntityAction, createStaticDataController, deleteEntityAction, downloadBlob, downloadDataAsCsv, downloadEntitiesExport, editEntityAction, extractTouchedValues, flattenEntry, fromSerializableCollectionConfig, fromSerializableCollectionConfigs, fromSerializableProperties, fromSerializableProperty, getBracketNotation, getChanges, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultFieldConfig, getDefaultFieldId, getDefaultPropertiesOrder, getEntityCSVExportableData, getEntityJsonExportableData, getEntityPreviewKeys, getEntityTitlePropertyKey, getEntityTitlePropertyKeyForEntity, getEntityViewWidth, getFieldConfig, getFieldId, getFullId, getFullIdPath, getIconForProperty, getIconForWidget, getInferenceType, getInitialEntityValues, getLastSegment, getPropertiesWithPropertiesOrder, getPropertyInPath, getResolvedPropertyInPath, getUserLabel, idToPropertiesPath, isReferenceProperty, isRelationProperty, isSelfLabellingProperty, mapPropertiesToConfigs, mapPropertyToConfig, mergeEntityActions, namespaceToPropertiesOrderPath, namespaceToPropertiesPath, processValueMapping, removeEmptyContainers, removeInitialAndTrailingSlashes, removeInitialSlash, removeTrailingSlash, renderSkeletonCaptionText, renderSkeletonIcon, renderSkeletonImageThumbnail, renderSkeletonText, resetPasswordAction, resolveCollectionPathIds, resolveEntityAction, resolveEntityView, resolveNavigationFrom, sanitizeUrl, spanClass, toSerializableCollectionConfig, toSerializableProperties, toSerializableProperty, unflattenObject, useAdminContext, useApp, useBreadcrumbsController, useBuildCollectionRegistryController, useBuildNavigationStateController, useBuildSidePanel, useBuildUrlController, useClearRestoreValue, useCollectionDataController, useCollectionEditorController, useCollectionRegistryController, useCollectionsConfigController, useHistory, useImportConfig, useJsonCollectionsConfigController, useLocalCollectionsConfigController, useNavigationStateController, useResolvedCollections, useResolvedNavigationFrom, useResolvedUser, useResolvedViews, useSelectionController, useSelectionDialog, useSideDialogsController, useSidePanel, useTopLevelNavigation, useUrlController, validateCollectionJson, zodToFormErrors };
|
|
3393
3488
|
|
|
3394
3489
|
//# sourceMappingURL=index.js.map
|