@rebasepro/admin 0.11.0 → 0.11.1-canary.g8caabf3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{CollectionEditorDialog-o7F_zbGY.js → CollectionEditorDialog-id__fOqM.js} +4 -4
- package/dist/CollectionEditorDialog-id__fOqM.js.map +1 -0
- package/dist/{PropertyEditView-DgB2b22q.js → PropertyEditView-BLPT_e-N.js} +2 -2
- package/dist/{PropertyEditView-DgB2b22q.js.map → PropertyEditView-BLPT_e-N.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-DaLRgPkj.js → RouterCollectionsStudioView-DwkGdgyN.js} +4 -4
- package/dist/{RouterCollectionsStudioView-DaLRgPkj.js.map → RouterCollectionsStudioView-DwkGdgyN.js.map} +1 -1
- package/dist/collection_editor/CollectionEditorDialogsContext.d.ts +1 -1
- package/dist/collection_editor/_cms_internals.d.ts +1 -1
- package/dist/collection_editor/extensibility_types.d.ts +1 -1
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/CollectionEditorDialogs.d.ts +2 -2
- package/dist/components/CollectionViewBinding/CollectionListViewBinding.d.ts +2 -2
- package/dist/components/DefaultDrawer.d.ts +3 -3
- package/dist/components/DrawerNavigationGroup.d.ts +8 -1
- package/dist/components/DrawerNavigationItem.d.ts +7 -1
- package/dist/components/EditViewBinding.d.ts +1 -1
- package/dist/components/RebaseAdmin.d.ts +1 -1
- package/dist/components/RebaseAuthGate.d.ts +1 -1
- package/dist/components/RebaseLayout.d.ts +5 -1
- package/dist/components/RebaseNavigation.d.ts +2 -2
- package/dist/components/RebaseRouteDefs.d.ts +1 -1
- package/dist/components/RebaseShell.d.ts +6 -1
- package/dist/components/SidePanelProvider.d.ts +2 -2
- package/dist/components/app/Scaffold.d.ts +11 -0
- package/dist/{export-BvqhjdEb.js → export-lZhpezjk.js} +3 -3
- package/dist/export-lZhpezjk.js.map +1 -0
- package/dist/form/EntityForm.d.ts +2 -2
- package/dist/form/EntityFormBinding.d.ts +5 -5
- package/dist/{history-Dz20hH38.js → history-DkP1tce0.js} +2 -2
- package/dist/{history-Dz20hH38.js.map → history-DkP1tce0.js.map} +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useAdminContext.d.ts +29 -0
- package/dist/{import-DINSB-Vu.js → import-DQPGsiIw.js} +2 -2
- package/dist/{import-DINSB-Vu.js.map → import-DQPGsiIw.js.map} +1 -1
- package/dist/index.js +60 -38
- package/dist/index.js.map +1 -1
- package/dist/types/components/EntityFormProps.d.ts +1 -1
- package/dist/types/fields.d.ts +1 -1
- package/dist/{util-BhhfHY1M.js → util-DBxSfWpl.js} +45 -35
- package/dist/util-DBxSfWpl.js.map +1 -0
- package/package.json +9 -9
- package/src/collection_editor/CollectionEditorDialogsContext.tsx +1 -1
- package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
- package/src/collection_editor/_cms_internals.ts +1 -1
- package/src/collection_editor/extensibility_types.ts +1 -1
- package/src/collection_editor/index.ts +2 -2
- package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +2 -2
- package/src/components/CollectionEditorDialogs.tsx +2 -2
- package/src/components/CollectionTableBinding/CollectionRowActions.tsx +5 -4
- package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +8 -7
- package/src/components/CollectionViewBinding/CollectionViewActions.tsx +2 -2
- package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +2 -2
- package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +2 -2
- package/src/components/DefaultDrawer.tsx +19 -8
- package/src/components/DeleteEntityDialog.tsx +2 -2
- package/src/components/DetailViewBinding.tsx +21 -1
- package/src/components/DrawerNavigationGroup.tsx +28 -4
- package/src/components/DrawerNavigationItem.tsx +19 -5
- package/src/components/EditFormActions.tsx +4 -3
- package/src/components/EditViewBinding.tsx +1 -1
- package/src/components/HomePage/ContentHomePage.tsx +4 -4
- package/src/components/RebaseAdmin.tsx +3 -3
- package/src/components/RebaseAuthGate.tsx +1 -1
- package/src/components/RebaseLayout.tsx +8 -2
- package/src/components/RebaseNavigation.tsx +9 -9
- package/src/components/RebaseRouteDefs.tsx +2 -2
- package/src/components/RebaseShell.tsx +10 -1
- package/src/components/RelationSelector.tsx +2 -2
- package/src/components/SidePanelProvider.tsx +2 -2
- package/src/components/app/Scaffold.tsx +16 -1
- package/src/data_export/export/ExportCollectionAction.tsx +2 -2
- package/src/form/EntityForm.tsx +2 -2
- package/src/form/EntityFormActions.tsx +2 -1
- package/src/form/EntityFormBinding.tsx +7 -7
- package/src/hooks/index.ts +1 -1
- package/src/hooks/navigation/useNavigationResolution.ts +2 -2
- package/src/hooks/{useCMSContext.tsx → useAdminContext.tsx} +10 -10
- package/src/hooks/useResolvedNavigationFrom.tsx +2 -2
- package/src/index.ts +4 -4
- package/src/preview/components/RelationPreview.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +2 -2
- package/src/types/fields.tsx +1 -1
- package/dist/CollectionEditorDialog-o7F_zbGY.js.map +0 -1
- package/dist/export-BvqhjdEb.js.map +0 -1
- package/dist/hooks/useCMSContext.d.ts +0 -29
- package/dist/util-BhhfHY1M.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { FormexController } from "./formex";
|
|
|
5
5
|
import { EntityFormActionsProps } from "./EntityFormActionsProps";
|
|
6
6
|
/**
|
|
7
7
|
* Props for the headless EntityForm component.
|
|
8
|
-
* This form can be used without
|
|
8
|
+
* This form can be used without admin context — all backend concerns
|
|
9
9
|
* (save, caching, analytics, plugin slots) are provided via callbacks.
|
|
10
10
|
*/
|
|
11
11
|
export type EntityFormProps<M extends Record<string, unknown>> = {
|
package/dist/types/fields.d.ts
CHANGED
|
@@ -173,7 +173,7 @@ export interface PropertyFieldBindingProps<M extends Record<string, unknown> = R
|
|
|
173
173
|
*/
|
|
174
174
|
propertyKey: string;
|
|
175
175
|
/**
|
|
176
|
-
* The
|
|
176
|
+
* The admin property you are binding this field to
|
|
177
177
|
*/
|
|
178
178
|
property: Property;
|
|
179
179
|
/**
|
|
@@ -4569,18 +4569,18 @@ function useUrlController() {
|
|
|
4569
4569
|
return context;
|
|
4570
4570
|
}
|
|
4571
4571
|
//#endregion
|
|
4572
|
-
//#region src/hooks/
|
|
4572
|
+
//#region src/hooks/useAdminContext.tsx
|
|
4573
4573
|
/**
|
|
4574
|
-
* Hook that builds a fully-populated
|
|
4575
|
-
* core {@link RebaseContext} with
|
|
4574
|
+
* Hook that builds a fully-populated admin context by combining the
|
|
4575
|
+
* core {@link RebaseContext} with admin-specific controllers.
|
|
4576
4576
|
*
|
|
4577
|
-
* Use this instead of `useRebaseContext()` in
|
|
4577
|
+
* Use this instead of `useRebaseContext()` in admin components that
|
|
4578
4578
|
* need to pass context to entity action callbacks, plugin slots,
|
|
4579
|
-
* or any consumer that expects
|
|
4579
|
+
* or any consumer that expects admin controllers on the context object.
|
|
4580
4580
|
*
|
|
4581
4581
|
* @group Hooks and utilities
|
|
4582
4582
|
*/
|
|
4583
|
-
function
|
|
4583
|
+
function useAdminContext() {
|
|
4584
4584
|
const baseContext = useRebaseContext();
|
|
4585
4585
|
const sidePanelController = useSidePanel();
|
|
4586
4586
|
const sideDialogsController = useSideDialogsController();
|
|
@@ -4619,7 +4619,7 @@ function useCMSContext() {
|
|
|
4619
4619
|
* @group Collection components
|
|
4620
4620
|
*/
|
|
4621
4621
|
var CollectionRowActions = function CollectionRowActions({ entity, collection, path, width, frozen, isSelected, selectionEnabled, size, highlightEntity, onCollectionChange, unhighlightEntity, actions = [], hideId, selectionController, openEntityMode, sortableNodeRef, sortableStyle, sortableAttributes, isDragging, isDraggable }) {
|
|
4622
|
-
const context =
|
|
4622
|
+
const context = useAdminContext();
|
|
4623
4623
|
const sidePanelCtrl = context.sidePanelController;
|
|
4624
4624
|
const { t } = useTranslation();
|
|
4625
4625
|
const onCheckedChange = useCallback((checked) => {
|
|
@@ -4666,7 +4666,7 @@ var CollectionRowActions = function CollectionRowActions({ entity, collection, p
|
|
|
4666
4666
|
});
|
|
4667
4667
|
},
|
|
4668
4668
|
size: iconSize,
|
|
4669
|
-
children: action.icon
|
|
4669
|
+
children: getIcon(action.icon, void 0, void 0, "smallest")
|
|
4670
4670
|
});
|
|
4671
4671
|
if (isEditAction && hasDraft) iconButton = /* @__PURE__ */ jsx(Badge, {
|
|
4672
4672
|
color: "warning",
|
|
@@ -4700,7 +4700,7 @@ var CollectionRowActions = function CollectionRowActions({ entity, collection, p
|
|
|
4700
4700
|
openEntityMode: openEntityMode ?? collection?.openEntityMode
|
|
4701
4701
|
});
|
|
4702
4702
|
},
|
|
4703
|
-
children: [action.icon, action.name]
|
|
4703
|
+
children: [getIcon(action.icon, void 0, void 0, "smallest"), action.name]
|
|
4704
4704
|
}, index))
|
|
4705
4705
|
}),
|
|
4706
4706
|
selectionEnabled && /* @__PURE__ */ jsx(Tooltip, {
|
|
@@ -7438,10 +7438,10 @@ function EditorCollectionAction({ path, parentCollectionSlugs, parentEntityIds,
|
|
|
7438
7438
|
}
|
|
7439
7439
|
//#endregion
|
|
7440
7440
|
//#region src/components/CollectionViewBinding/CollectionViewActions.tsx
|
|
7441
|
-
var ImportCollectionAction = lazy(() => import("./import-
|
|
7442
|
-
var ExportCollectionAction = lazy(() => import("./export-
|
|
7441
|
+
var ImportCollectionAction = lazy(() => import("./import-DQPGsiIw.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
|
|
7442
|
+
var ExportCollectionAction = lazy(() => import("./export-lZhpezjk.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
|
|
7443
7443
|
function CollectionViewActions({ collection, relativePath, parentCollectionSlugs, parentEntityIds, onNewClick, onAddExistingClick, onMultipleDeleteClick, selectionEnabled, path, selectionController, tableController, collectionEntitiesCount, compact, children, openNewDocument }) {
|
|
7444
|
-
const context =
|
|
7444
|
+
const context = useAdminContext();
|
|
7445
7445
|
const { canCreate, canDelete } = usePermissions();
|
|
7446
7446
|
const largeLayout = useLargeLayout();
|
|
7447
7447
|
const { t } = useTranslation();
|
|
@@ -8184,8 +8184,8 @@ function formatDateValue(value) {
|
|
|
8184
8184
|
});
|
|
8185
8185
|
}
|
|
8186
8186
|
/**
|
|
8187
|
-
* Classic
|
|
8188
|
-
* Designed to be the most familiar, stereotypical
|
|
8187
|
+
* Classic admin list view for displaying entities.
|
|
8188
|
+
* Designed to be the most familiar, stereotypical admin content management view:
|
|
8189
8189
|
* - Clean rows with checkbox, icon/avatar, title, metadata, and actions
|
|
8190
8190
|
* - Column-sortable headers
|
|
8191
8191
|
* - Infinite scroll
|
|
@@ -8194,7 +8194,7 @@ function CollectionListViewBinding({ collection, tableController, onEntityClick,
|
|
|
8194
8194
|
const authController = useAuthController();
|
|
8195
8195
|
const customizationController = useCustomizationController();
|
|
8196
8196
|
const analyticsController = useAnalyticsController();
|
|
8197
|
-
const context =
|
|
8197
|
+
const context = useAdminContext();
|
|
8198
8198
|
const containerRef = useRef(null);
|
|
8199
8199
|
const [containerWidth, setContainerWidth] = useState(1200);
|
|
8200
8200
|
useEffect(() => {
|
|
@@ -8638,7 +8638,7 @@ var ListRow = React.memo(function ListRow({ entity, collection, onClick, selecte
|
|
|
8638
8638
|
openEntityMode: openEntityMode ?? collection?.openEntityMode ?? "full_screen"
|
|
8639
8639
|
});
|
|
8640
8640
|
},
|
|
8641
|
-
children: action.icon
|
|
8641
|
+
children: getIcon(action.icon, void 0, void 0, "smallest")
|
|
8642
8642
|
})
|
|
8643
8643
|
}, action.key ?? index))
|
|
8644
8644
|
})
|
|
@@ -8932,7 +8932,7 @@ var MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
|
|
|
8932
8932
|
var JSON_TAB_VALUE = "__json";
|
|
8933
8933
|
//#endregion
|
|
8934
8934
|
//#region src/components/DetailViewBinding.tsx
|
|
8935
|
-
var EntityHistoryView$1 = lazy(() => import("./history-
|
|
8935
|
+
var EntityHistoryView$1 = lazy(() => import("./history-DkP1tce0.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
8936
8936
|
function DetailViewBinding({ entityId, ...props }) {
|
|
8937
8937
|
const { entity, dataLoading, dataLoadingError } = useFetch({
|
|
8938
8938
|
path: props.path,
|
|
@@ -9212,7 +9212,16 @@ function DetailViewBindingInner({ path, entityId, selectedTab: selectedTabProp,
|
|
|
9212
9212
|
})
|
|
9213
9213
|
}, `entity_detail_collection_tab_${view.name}`);
|
|
9214
9214
|
});
|
|
9215
|
-
const
|
|
9215
|
+
const backToCollectionButton = layout === "full_screen" ? /* @__PURE__ */ jsx(Tooltip, {
|
|
9216
|
+
title: t("back"),
|
|
9217
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
9218
|
+
size: "small",
|
|
9219
|
+
"aria-label": t("back"),
|
|
9220
|
+
onClick: () => navigate(urlController.buildUrlCollectionPath(path)),
|
|
9221
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, { size: iconSize.smallest })
|
|
9222
|
+
})
|
|
9223
|
+
}) : null;
|
|
9224
|
+
const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews || layout === "side_panel" || layout === "dialog" || Boolean(backToCollectionButton);
|
|
9216
9225
|
const fullScreenButton = !barActions && (layout === "side_panel" || layout === "split" || layout === "dialog") && entityId ? /* @__PURE__ */ jsx(Tooltip, {
|
|
9217
9226
|
title: "Open full screen",
|
|
9218
9227
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -9286,6 +9295,7 @@ function DetailViewBindingInner({ path, entityId, selectedTab: selectedTabProp,
|
|
|
9286
9295
|
shouldShowTopBar && /* @__PURE__ */ jsxs("div", {
|
|
9287
9296
|
className: cls("h-[52px] items-center flex overflow-hidden w-full border-b pl-2 pr-2 flex bg-surface-50 dark:bg-surface-900", defaultBorderMixin),
|
|
9288
9297
|
children: [
|
|
9298
|
+
backToCollectionButton,
|
|
9289
9299
|
fullScreenButton,
|
|
9290
9300
|
barActions?.({
|
|
9291
9301
|
path,
|
|
@@ -10955,7 +10965,7 @@ function DeleteEntityDialog({ entityOrEntitiesToDelete, collection, onClose, ope
|
|
|
10955
10965
|
const snackbarController = useSnackbarController();
|
|
10956
10966
|
const { t } = useTranslation();
|
|
10957
10967
|
const [loading, setLoading] = useState(false);
|
|
10958
|
-
const context =
|
|
10968
|
+
const context = useAdminContext();
|
|
10959
10969
|
const entityOrEntities = Array.isArray(entityOrEntitiesToDelete) && entityOrEntitiesToDelete.length === 1 ? entityOrEntitiesToDelete[0] : entityOrEntitiesToDelete;
|
|
10960
10970
|
const multipleEntities = Array.isArray(entityOrEntities);
|
|
10961
10971
|
const handleCancel = useCallback(() => {
|
|
@@ -12239,7 +12249,7 @@ function FilterPresetsButton({ filterPresets, tableController, compact }) {
|
|
|
12239
12249
|
//#endregion
|
|
12240
12250
|
//#region src/components/CollectionViewBinding/CollectionViewStartActions.tsx
|
|
12241
12251
|
function CollectionViewStartActions({ collection, relativePath, parentCollectionSlugs, parentEntityIds, path, selectionController, tableController, collectionEntitiesCount, resolvedProperties, compact, openNewDocument }) {
|
|
12242
|
-
const context =
|
|
12252
|
+
const context = useAdminContext();
|
|
12243
12253
|
const largeLayout = useLargeLayout();
|
|
12244
12254
|
const { t } = useTranslation();
|
|
12245
12255
|
const navigate = useNavigate();
|
|
@@ -12386,7 +12396,7 @@ var EMPTY_ARRAY = [];
|
|
|
12386
12396
|
*/
|
|
12387
12397
|
var CollectionViewBindingInner = React.memo(function CollectionViewBindingInner({ path: pathProp, parentCollectionSlugs, parentEntityIds, isSubCollection, className, updateUrl, selectedEntityId: selectedEntityIdProp, selectedTab: selectedTabProp, ...collectionProp }) {
|
|
12388
12398
|
const { t } = useTranslation();
|
|
12389
|
-
const context =
|
|
12399
|
+
const context = useAdminContext();
|
|
12390
12400
|
const collectionRegistry = useCollectionRegistryController();
|
|
12391
12401
|
const urlController = useUrlController();
|
|
12392
12402
|
const breadcrumbs = useBreadcrumbsController();
|
|
@@ -13353,7 +13363,7 @@ function EntityIdHeaderWidget({ collection, path, idPath, openEntityMode }) {
|
|
|
13353
13363
|
//#region src/components/EditFormActions.tsx
|
|
13354
13364
|
function EditFormActions({ collection, path, entity, layout, savingError, formex, disabled, status, pluginActions, openEntityMode, showDefaultActions = true, navigateBack, formContext }) {
|
|
13355
13365
|
const { canCreate, canDelete } = usePermissions();
|
|
13356
|
-
const context =
|
|
13366
|
+
const context = useAdminContext();
|
|
13357
13367
|
const sidePanelController = context.sidePanelController;
|
|
13358
13368
|
const sideDialogContext = useSideDialogContext();
|
|
13359
13369
|
const customizationController = useCustomizationController();
|
|
@@ -13619,13 +13629,13 @@ function EntityActionButton({ action, enabled, props }) {
|
|
|
13619
13629
|
});
|
|
13620
13630
|
}
|
|
13621
13631
|
},
|
|
13622
|
-
children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" }) : action.icon
|
|
13632
|
+
children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" }) : getIcon(action.icon, void 0, void 0, "smallest")
|
|
13623
13633
|
})
|
|
13624
13634
|
});
|
|
13625
13635
|
}
|
|
13626
13636
|
//#endregion
|
|
13627
13637
|
//#region src/components/EditViewBinding.tsx
|
|
13628
|
-
var EntityHistoryView = lazy(() => import("./history-
|
|
13638
|
+
var EntityHistoryView = lazy(() => import("./history-DkP1tce0.js").then((m) => ({ default: m.EntityHistoryView })));
|
|
13629
13639
|
/**
|
|
13630
13640
|
* This is the default view that is used as the content of a side panel when
|
|
13631
13641
|
* a record is opened.
|
|
@@ -14619,7 +14629,7 @@ function resolveNavigationFrom({ path, context }) {
|
|
|
14619
14629
|
* @group Hooks and utilities
|
|
14620
14630
|
*/
|
|
14621
14631
|
function useResolvedNavigationFrom({ path }) {
|
|
14622
|
-
const context =
|
|
14632
|
+
const context = useAdminContext();
|
|
14623
14633
|
const { navigationStateController, collectionRegistryController } = context;
|
|
14624
14634
|
const [data, setData] = useState();
|
|
14625
14635
|
const [dataLoading, setDataLoading] = useState(false);
|
|
@@ -15035,7 +15045,7 @@ async function resolveAppViews(baseViews, authController, data, plugins) {
|
|
|
15035
15045
|
slugCounts.set(v.slug, (slugCounts.get(v.slug) ?? 0) + 1);
|
|
15036
15046
|
});
|
|
15037
15047
|
slugCounts.forEach((count, slug) => {
|
|
15038
|
-
if (count > 1) console.warn(`[Rebase] Duplicate view slug "${slug}" detected (${count} views). Last-write-wins. Ensure unique slugs across
|
|
15048
|
+
if (count > 1) console.warn(`[Rebase] Duplicate view slug "${slug}" detected (${count} views). Last-write-wins. Ensure unique slugs across admin views and plugins.`);
|
|
15039
15049
|
});
|
|
15040
15050
|
}
|
|
15041
15051
|
resolvedViews = filterViewsByRole(resolvedViews, authController);
|
|
@@ -19188,7 +19198,7 @@ function buildBottomActions({ savingError, entity, path, formActions, collection
|
|
|
19188
19198
|
formContext
|
|
19189
19199
|
});
|
|
19190
19200
|
},
|
|
19191
|
-
children: action.icon
|
|
19201
|
+
children: getIcon(action.icon, void 0, void 0, "smallest")
|
|
19192
19202
|
}, action.name))
|
|
19193
19203
|
}),
|
|
19194
19204
|
pluginActions,
|
|
@@ -19471,9 +19481,9 @@ function zodToFormErrors(zodError) {
|
|
|
19471
19481
|
/**
|
|
19472
19482
|
* Headless entity form component.
|
|
19473
19483
|
*
|
|
19474
|
-
* Renders a form for a entity collection without any
|
|
19484
|
+
* Renders a form for a entity collection without any admin or backend dependencies.
|
|
19475
19485
|
* All backend concerns (save, caching, analytics, plugin slots) are provided via
|
|
19476
|
-
* callback props. For
|
|
19486
|
+
* callback props. For admin-connected usage, use {@link EntityFormBinding} instead.
|
|
19477
19487
|
*
|
|
19478
19488
|
* @group Components
|
|
19479
19489
|
*/
|
|
@@ -19906,7 +19916,7 @@ function useOnAutoSave(autoSave, formex, lastSavedValues, save) {
|
|
|
19906
19916
|
//#endregion
|
|
19907
19917
|
//#region src/form/EntityFormBinding.tsx
|
|
19908
19918
|
/**
|
|
19909
|
-
*
|
|
19919
|
+
* admin-connected wrapper around EntityForm.
|
|
19910
19920
|
*
|
|
19911
19921
|
* Provides all backend concerns that the headless EntityForm delegates via callbacks:
|
|
19912
19922
|
* - Save via the data layer (`saveEntityWithCallbacks`)
|
|
@@ -19917,8 +19927,8 @@ function useOnAutoSave(autoSave, formex, lastSavedValues, save) {
|
|
|
19917
19927
|
* - Analytics events
|
|
19918
19928
|
* - Navigation via side entity controller
|
|
19919
19929
|
*
|
|
19920
|
-
* Use this component inside the
|
|
19921
|
-
* For headless usage outside the
|
|
19930
|
+
* Use this component inside the admin (`<RebaseShell>`).
|
|
19931
|
+
* For headless usage outside the admin, use `EntityForm` directly.
|
|
19922
19932
|
*
|
|
19923
19933
|
* @group Components
|
|
19924
19934
|
*/
|
|
@@ -19930,7 +19940,7 @@ function EntityFormBinding({ path, entityId: entityIdProp, collection, entity, i
|
|
|
19930
19940
|
const dataClient = useData();
|
|
19931
19941
|
const snackbarController = useSnackbarController();
|
|
19932
19942
|
const customizationController = useCustomizationController();
|
|
19933
|
-
const context =
|
|
19943
|
+
const context = useAdminContext();
|
|
19934
19944
|
const analyticsController = useAnalyticsController();
|
|
19935
19945
|
const [status, setStatus] = useState(initialStatus);
|
|
19936
19946
|
const [entityId, setEntityId] = useState(() => {
|
|
@@ -20971,6 +20981,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
|
|
|
20971
20981
|
return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
|
|
20972
20982
|
}
|
|
20973
20983
|
//#endregion
|
|
20974
|
-
export { useBuildCollectionRegistryController as $, StorageThumbnailInternal as $n, CollectionTableBinding as $t, getFieldId as A, ArrayOfReferencesPreview as An, convertFileToJson as At, MapFieldBinding as B, getBracketNotation as Bn, getCollectionBySlugWithin as Bt, removeEmptyContainers as C, MapPropertyPreview as Cn, convertDataToEntity as Ct, getDefaultFieldConfig as D, ArrayEnumPreview as Dn, useImportConfig as Dt, DEFAULT_FIELD_CONFIGS as E, ArrayPropertyEnumPreview as En, getInferenceType as Et, SelectFieldBinding as F, CollectionRegistryContext as Fn, FieldCaption as Ft, useSelectionDialog as G, getPropertyInPath as Gn, removeTrailingSlash$1 as Gt, DateTimeFieldBinding as H, getIconForProperty as Hn, getLastSegment$1 as Ht, RepeatFieldBinding as I, useCollectionRegistryController as In, useBreadcrumbsController as It, useBuildUrlController as J, isRelationProperty as Jn, resolveViewMode as Jt, SelectionTableBinding as K, getResolvedPropertyInPath as Kn, resolveCollectionPathIds$1 as Kt, ReferenceFieldBinding as L, getEntityPreviewKeys as Ln, BreadcrumbsProvider as Lt, TextFieldBinding as M, EntityPreviewBinding as Mn, ArrayContainer as Mt, SwitchFieldBinding as N, SidePanelControllerContext as Nn, PropertyConfigBadge as Nt, getDefaultFieldId as O, ArrayOfStorageComponentsPreview as On, ImportSaveInProgress as Ot, StorageUploadFieldBinding as P, useSidePanel as Pn, SearchIconsView as Pt, useResolvedCollections as Q, StorageThumbnail as Qn, VirtualTableInput$1 as Qt, MultiSelectFieldBinding as R, getEntityTitlePropertyKey as Rn, mergeEntityActions as Rt, getInitialEntityValues as S, KeyValuePreview as Sn, DataNewPropertiesMapping as St, PropertyFieldBinding as T, ArrayOfStringsPreview as Tn, processValueMapping as Tt, BlockFieldBinding as U, getIconForWidget as Un, removeInitialAndTrailingSlashes$1 as Ut, KeyValueFieldBinding as V, getDefaultPropertiesOrder as Vn, getCollectionPathsCombinations as Vt, ArrayOfReferencesFieldBinding as W, getPropertiesWithPropertiesOrder as Wn, removeInitialSlash as Wt, useTopLevelNavigation as X, StringPropertyPreview as Xn, resolveEntityView as Xt, useBuildNavigationStateController as Y, ArrayPropertyPreview as Yn, resolveEntityAction as Yt, useResolvedViews as Z, EnumValuesChip as Zn, useSelectionController as Zt, useCollectionsConfigController as _, getUserLabel as _n, CollectionViewActions as _t, namespaceToPropertiesPath as a, NavigationStateContext as an, UrlComponentPreview as ar, useBuildSidePanel as at, extractTouchedValues as b, BooleanPreview as bn, useCollectionEditorDialogsState as bt, buildCollectionGenerationCallback as c, SideDialogsControllerContext as cn, EmptyValue as cr, copyEntityAction as ct, fromSerializableCollectionConfigs as d, useClearRestoreValue as dn, LabelWithIcon as dr, resetPasswordAction as dt, SelectableTable as en, SkeletonPropertyComponent as er, useHistory as et, fromSerializableProperties as f, ReadOnlyFieldBinding as fn, FormLayout as fr, CreationResultDialog as ft, toSerializableProperty as g, UserPreview as gn, EntityCardBinding as gt, toSerializableProperties as h, PropertyPreview as hn, CollectionCardViewBinding as ht, namespaceToPropertiesOrderPath as i, useUrlController as in, renderSkeletonText as ir, getEntityViewWidth as it, VectorFieldBinding as j, ReferencePreview as jn, unflattenObject as jt, getFieldConfig as k, RelationPreview as kn, ImportFileUpload as kt, validateCollectionJson as l, SelectableTableContext as ln, LabelWithIconAndTooltip as lr, deleteEntityAction as lt, toSerializableCollectionConfig as m, ArrayOfMapsPreview as mn, EntityViewBinding as mt, getFullIdPath as n,
|
|
20984
|
+
export { useBuildCollectionRegistryController as $, StorageThumbnailInternal as $n, CollectionTableBinding as $t, getFieldId as A, ArrayOfReferencesPreview as An, convertFileToJson as At, MapFieldBinding as B, getBracketNotation as Bn, getCollectionBySlugWithin as Bt, removeEmptyContainers as C, MapPropertyPreview as Cn, convertDataToEntity as Ct, getDefaultFieldConfig as D, ArrayEnumPreview as Dn, useImportConfig as Dt, DEFAULT_FIELD_CONFIGS as E, ArrayPropertyEnumPreview as En, getInferenceType as Et, SelectFieldBinding as F, CollectionRegistryContext as Fn, FieldCaption as Ft, useSelectionDialog as G, getPropertyInPath as Gn, removeTrailingSlash$1 as Gt, DateTimeFieldBinding as H, getIconForProperty as Hn, getLastSegment$1 as Ht, RepeatFieldBinding as I, useCollectionRegistryController as In, useBreadcrumbsController as It, useBuildUrlController as J, isRelationProperty as Jn, resolveViewMode as Jt, SelectionTableBinding as K, getResolvedPropertyInPath as Kn, resolveCollectionPathIds$1 as Kt, ReferenceFieldBinding as L, getEntityPreviewKeys as Ln, BreadcrumbsProvider as Lt, TextFieldBinding as M, EntityPreviewBinding as Mn, ArrayContainer as Mt, SwitchFieldBinding as N, SidePanelControllerContext as Nn, PropertyConfigBadge as Nt, getDefaultFieldId as O, ArrayOfStorageComponentsPreview as On, ImportSaveInProgress as Ot, StorageUploadFieldBinding as P, useSidePanel as Pn, SearchIconsView as Pt, useResolvedCollections as Q, StorageThumbnail as Qn, VirtualTableInput$1 as Qt, MultiSelectFieldBinding as R, getEntityTitlePropertyKey as Rn, mergeEntityActions as Rt, getInitialEntityValues as S, KeyValuePreview as Sn, DataNewPropertiesMapping as St, PropertyFieldBinding as T, ArrayOfStringsPreview as Tn, processValueMapping as Tt, BlockFieldBinding as U, getIconForWidget as Un, removeInitialAndTrailingSlashes$1 as Ut, KeyValueFieldBinding as V, getDefaultPropertiesOrder as Vn, getCollectionPathsCombinations as Vt, ArrayOfReferencesFieldBinding as W, getPropertiesWithPropertiesOrder as Wn, removeInitialSlash as Wt, useTopLevelNavigation as X, StringPropertyPreview as Xn, resolveEntityView as Xt, useBuildNavigationStateController as Y, ArrayPropertyPreview as Yn, resolveEntityAction as Yt, useResolvedViews as Z, EnumValuesChip as Zn, useSelectionController as Zt, useCollectionsConfigController as _, getUserLabel as _n, CollectionViewActions as _t, namespaceToPropertiesPath as a, NavigationStateContext as an, UrlComponentPreview as ar, useBuildSidePanel as at, extractTouchedValues as b, BooleanPreview as bn, useCollectionEditorDialogsState as bt, buildCollectionGenerationCallback as c, SideDialogsControllerContext as cn, EmptyValue as cr, copyEntityAction as ct, fromSerializableCollectionConfigs as d, useClearRestoreValue as dn, LabelWithIcon as dr, resetPasswordAction as dt, SelectableTable as en, SkeletonPropertyComponent as er, useHistory as et, fromSerializableProperties as f, ReadOnlyFieldBinding as fn, FormLayout as fr, CreationResultDialog as ft, toSerializableProperty as g, UserPreview as gn, EntityCardBinding as gt, toSerializableProperties as h, PropertyPreview as hn, CollectionCardViewBinding as ht, namespaceToPropertiesOrderPath as i, useUrlController as in, renderSkeletonText as ir, getEntityViewWidth as it, VectorFieldBinding as j, ReferencePreview as jn, unflattenObject as jt, getFieldConfig as k, RelationPreview as kn, ImportFileUpload as kt, validateCollectionJson as l, SelectableTableContext as ln, LabelWithIconAndTooltip as lr, deleteEntityAction as lt, toSerializableCollectionConfig as m, ArrayOfMapsPreview as mn, EntityViewBinding as mt, getFullIdPath as n, useAdminContext as nn, renderSkeletonIcon as nr, useResolvedNavigationFrom as nt, CollectionGenerationApiError as o, useNavigationStateController as on, ImagePreview as or, EditViewBinding as ot, fromSerializableProperty as p, FieldHelperText as pn, FormEntry as pr, DetailViewBinding as pt, SideDialogs as q, isReferenceProperty as qn, resolveOpenEntityMode as qt, idToPropertiesPath as r, UrlContext as rn, renderSkeletonImageThumbnail as rr, buildSidePanelsFromUrl as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, useSideDialogsController as sn, sanitizeUrl as sr, CollectionViewBinding as st, getFullId as t, CollectionRowActions as tn, renderSkeletonCaptionText as tr, resolveNavigationFrom as tt, fromSerializableCollectionConfig as u, ArrayCustomShapedFieldBinding as un, PropertyIdCopyTooltip as ur, editEntityAction as ut, EntityFormBinding as v, useResolvedUser as vn, useCollectionEditorController as vt, zodToFormErrors as w, ArrayOneOfPreview as wn, flattenEntry as wt, getChanges as x, DatePreview as xn, ImportNewPropertyFieldPreview as xt, EntityForm as y, NumberPropertyPreview as yn, ConfigControllerProvider as yt, MarkdownEditorFieldBinding as z, getEntityTitlePropertyKeyForEntity as zn, addInitialSlash as zt };
|
|
20975
20985
|
|
|
20976
|
-
//# sourceMappingURL=util-
|
|
20986
|
+
//# sourceMappingURL=util-DBxSfWpl.js.map
|