@rebasepro/admin 0.6.1 → 0.8.0
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-HNXGxXdO.js → CollectionEditorDialog-BO_aQ-Z4.js} +236 -155
- package/dist/CollectionEditorDialog-BO_aQ-Z4.js.map +1 -0
- package/dist/{PropertyEditView-C2wp8kQ9.js → PropertyEditView-DKzOpMjR.js} +190 -50
- package/dist/PropertyEditView-DKzOpMjR.js.map +1 -0
- package/dist/{CollectionsStudioView-B1mN33GB.js → RouterCollectionsStudioView-BQTIExjA.js} +61 -39
- package/dist/RouterCollectionsStudioView-BQTIExjA.js.map +1 -0
- package/dist/collection_editor/_cms_internals.d.ts +1 -1
- package/dist/collection_editor/api/generateCollectionApi.d.ts +3 -2
- package/dist/collection_editor/extensibility_types.d.ts +135 -0
- package/dist/collection_editor/index.d.ts +6 -0
- package/dist/collection_editor/serializable_types.d.ts +370 -0
- package/dist/collection_editor/serializable_utils.d.ts +50 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +3 -3
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +12 -1
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +13 -1
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +24 -2
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +4 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +12 -1
- package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.d.ts +15 -0
- package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.d.ts +14 -0
- package/dist/collection_editor/useJsonCollectionsConfigController.d.ts +37 -0
- package/dist/collection_editor/useSafeSnackbarController.d.ts +2 -0
- package/dist/collection_editor_ui.d.ts +4 -0
- package/dist/collection_editor_ui.js +33 -4
- package/dist/collection_editor_ui.js.map +1 -0
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +1 -1
- package/dist/components/EntityCollectionTable/index.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +3 -3
- package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +3 -3
- package/dist/components/EntityEditView.d.ts +3 -2
- package/dist/components/RebaseCMS.d.ts +1 -1
- package/dist/components/SelectableTable/SelectionStore.d.ts +12 -21
- package/dist/components/field_configs.d.ts +1 -1
- package/dist/editor/editor.d.ts +0 -6
- package/dist/editor.js +1 -3
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +10 -9
- package/dist/form/EntityFormBinding.d.ts +27 -0
- package/dist/form/components/StorageUploadProgress.d.ts +6 -1
- package/dist/form/form_utils.d.ts +8 -0
- package/dist/form/index.d.ts +5 -2
- package/dist/{history-BO6VT85a.js → history-B3cqBzEV.js} +2 -2
- package/dist/{history-BO6VT85a.js.map → history-B3cqBzEV.js.map} +1 -1
- package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +1 -1
- package/dist/hooks/navigation/useAsyncResolver.d.ts +26 -0
- package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +2 -0
- package/dist/hooks/navigation/useTopLevelNavigation.d.ts +1 -1
- package/dist/hooks/navigation/utils.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/preview/components/StorageThumbnail.d.ts +3 -1
- package/dist/routes/CustomViewRoute.d.ts +2 -1
- package/dist/{src-BYniefVu.js → src-cxV1ODRG.js} +1731 -1710
- package/dist/src-cxV1ODRG.js.map +1 -0
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/EntityFormProps.d.ts +59 -0
- package/dist/types/components/PropertyPreviewProps.d.ts +2 -1
- package/dist/types/fields.d.ts +10 -7
- package/dist/util/dataControllerAdapter.d.ts +30 -0
- package/dist/util/navigation_utils.d.ts +1 -1
- package/dist/util/propertyConfigMapper.d.ts +17 -0
- package/package.json +8 -8
- package/src/collection_editor/_cms_internals.ts +1 -1
- package/src/collection_editor/api/generateCollectionApi.ts +3 -2
- package/src/collection_editor/extensibility_types.ts +168 -0
- package/src/collection_editor/index.ts +46 -0
- package/src/collection_editor/pgColumnToProperty.ts +2 -2
- package/src/collection_editor/serializable_types.ts +474 -0
- package/src/collection_editor/serializable_utils.ts +576 -0
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +6 -6
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +170 -89
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +95 -78
- package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +23 -20
- package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +79 -27
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +9 -7
- package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +22 -5
- package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +154 -18
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +6 -6
- package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +1 -0
- package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +44 -0
- package/src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx +41 -0
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +4 -3
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +35 -1
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +0 -1
- package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +7 -29
- package/src/collection_editor/useJsonCollectionsConfigController.tsx +286 -0
- package/src/collection_editor/useSafeSnackbarController.ts +9 -0
- package/src/collection_editor_ui.ts +6 -0
- package/src/components/DefaultDrawer.tsx +14 -4
- package/src/components/DrawerNavigationGroup.tsx +2 -2
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +11 -9
- package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +2 -1
- package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +2 -1
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +23 -20
- package/src/components/EntityCollectionTable/index.tsx +1 -1
- package/src/components/EntityCollectionTable/table_bindings.tsx +24 -44
- package/src/components/EntityCollectionView/EntityBoardCard.tsx +6 -6
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +13 -12
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +40 -190
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +66 -184
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +8 -25
- package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +6 -6
- package/src/components/EntityCollectionView/useBoardDataController.tsx +12 -40
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +3 -3
- package/src/components/EntityDetailView.tsx +2 -2
- package/src/components/EntityEditView.tsx +7 -6
- package/src/components/EntityEditViewFormActions.tsx +35 -29
- package/src/components/HomePage/ContentHomePage.tsx +14 -5
- package/src/components/RebaseCMS.tsx +3 -3
- package/src/components/RebaseNavigation.tsx +74 -9
- package/src/components/RelationSelector.tsx +2 -2
- package/src/components/SelectableTable/SelectableTable.tsx +13 -5
- package/src/components/SelectableTable/SelectionStore.ts +18 -48
- package/src/components/SideDialogs.tsx +0 -7
- package/src/components/common/default_entity_actions.tsx +22 -11
- package/src/components/field_configs.tsx +0 -14
- package/src/contexts/BreacrumbsContext.tsx +15 -6
- package/src/editor/editor.tsx +4 -7
- package/src/editor/selectors/ai-selector.tsx +0 -1
- package/src/form/EntityForm.tsx +191 -428
- package/src/form/EntityFormActions.tsx +35 -49
- package/src/form/EntityFormBinding.tsx +323 -0
- package/src/form/components/FormLayout.tsx +1 -1
- package/src/form/components/StorageUploadProgress.tsx +9 -2
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +12 -1
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +7 -2
- package/src/form/field_bindings/RelationFieldBinding.tsx +5 -7
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +19 -15
- package/src/form/form_utils.ts +163 -0
- package/src/form/index.tsx +14 -6
- package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +2 -2
- package/src/hooks/navigation/contexts/NavigationStateContext.tsx +2 -2
- package/src/hooks/navigation/contexts/UrlContext.tsx +1 -2
- package/src/hooks/navigation/useAsyncResolver.ts +100 -0
- package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +15 -8
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +12 -8
- package/src/hooks/navigation/useNavigationResolution.ts +33 -0
- package/src/hooks/navigation/useResolvedCollections.ts +29 -71
- package/src/hooks/navigation/useResolvedViews.tsx +40 -70
- package/src/hooks/navigation/useTopLevelNavigation.ts +20 -16
- package/src/hooks/navigation/utils.ts +7 -4
- package/src/index.ts +6 -1
- package/src/preview/PropertyPreview.tsx +1 -16
- package/src/preview/components/StorageThumbnail.tsx +24 -7
- package/src/routes/CustomViewRoute.tsx +14 -6
- package/src/types/components/EntityFormActionsProps.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +68 -0
- package/src/types/components/PropertyPreviewProps.tsx +1 -1
- package/src/types/fields.tsx +9 -8
- package/src/util/dataControllerAdapter.ts +93 -0
- package/src/util/navigation_utils.ts +1 -1
- package/src/util/previews.ts +20 -0
- package/src/util/propertyConfigMapper.ts +134 -0
- package/src/util/property_utils.tsx +1 -2
- package/dist/CollectionEditorDialog-HNXGxXdO.js.map +0 -1
- package/dist/CollectionsStudioView-B1mN33GB.js.map +0 -1
- package/dist/PropertyEditView-C2wp8kQ9.js.map +0 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +0 -12
- package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +0 -10
- package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +0 -9
- package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +0 -8
- package/dist/components/EntityCollectionView/Board.d.ts +0 -3
- package/dist/components/EntityCollectionView/BoardColumn.d.ts +0 -42
- package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +0 -9
- package/dist/components/EntityCollectionView/BoardSortableList.d.ts +0 -14
- package/dist/components/EntityCollectionView/board_types.d.ts +0 -105
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +0 -11
- package/dist/hooks/navigation/useNavigationRegistry.d.ts +0 -12
- package/dist/hooks/navigation/useNavigationURLs.d.ts +0 -11
- package/dist/src-BYniefVu.js.map +0 -1
- package/src/components/EntityCollectionTable/fields/VirtualTableDateField.tsx +0 -39
- package/src/components/EntityCollectionTable/fields/VirtualTableInput.tsx +0 -90
- package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +0 -83
- package/src/components/EntityCollectionTable/fields/VirtualTableSwitch.tsx +0 -32
- package/src/components/EntityCollectionView/Board.tsx +0 -475
- package/src/components/EntityCollectionView/BoardColumn.tsx +0 -165
- package/src/components/EntityCollectionView/BoardColumnTitle.tsx +0 -46
- package/src/components/EntityCollectionView/BoardSortableList.tsx +0 -177
- package/src/components/EntityCollectionView/board_types.ts +0 -113
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +0 -141
- package/src/hooks/navigation/useNavigationRegistry.ts +0 -164
- package/src/hooks/navigation/useNavigationURLs.ts +0 -56
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { Bn as useUrlController } from "./src-cxV1ODRG.js";
|
|
2
|
+
import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-DKzOpMjR.js";
|
|
3
|
+
import { n as CollectionEditorDialog } from "./CollectionEditorDialog-BO_aQ-Z4.js";
|
|
4
|
+
import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-BQTIExjA.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { useSnackbarController } from "@rebasepro/core";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { useNavigate } from "react-router-dom";
|
|
9
|
+
//#region src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx
|
|
10
|
+
function RouterCollectionStudioView(props) {
|
|
11
|
+
const navigate = useNavigate();
|
|
12
|
+
const urlController = useUrlController();
|
|
13
|
+
const snackbarController = useSnackbarController();
|
|
14
|
+
return /* @__PURE__ */ jsx(CollectionStudioView, {
|
|
15
|
+
...props,
|
|
16
|
+
onCancel: () => {
|
|
17
|
+
navigate(urlController.buildAppUrlPath("/"));
|
|
18
|
+
},
|
|
19
|
+
onSave: (savedCollection) => {
|
|
20
|
+
if (savedCollection) {
|
|
21
|
+
snackbarController.open({
|
|
22
|
+
type: "success",
|
|
23
|
+
message: `Collection ${savedCollection.name || savedCollection.slug} saved`
|
|
24
|
+
});
|
|
25
|
+
if (props.collectionId === "new") navigate(urlController.buildAppUrlPath(`s/schema/${savedCollection.slug}`));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { CollectionEditorDialog, CollectionStudioView, CollectionsStudioView, PropertyForm, PropertyFormDialog, RouterCollectionStudioView, RouterCollectionsStudioView };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=collection_editor_ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection_editor_ui.js","names":[],"sources":["../src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx"],"sourcesContent":["/**\n * Router-aware wrapper around CollectionStudioView.\n *\n * This component provides the react-router-based navigation behavior\n * that Rebase Studio expects: cancel navigates to the root path,\n * save navigates to the saved collection's slug, and a snackbar\n * toast is shown on success.\n *\n * External consumers should use `CollectionStudioView` directly\n * (which has no react-router dependency).\n */\nimport React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useUrlController } from \"../../_cms_internals\";\nimport { useSnackbarController } from \"@rebasepro/core\";\nimport { CollectionStudioView, CollectionStudioViewProps } from \"./CollectionStudioView\";\n\nexport type RouterCollectionStudioViewProps = Omit<CollectionStudioViewProps, \"onSave\" | \"onCancel\">;\n\nexport function RouterCollectionStudioView(props: RouterCollectionStudioViewProps) {\n const navigate = useNavigate();\n const urlController = useUrlController();\n const snackbarController = useSnackbarController();\n\n return (\n <CollectionStudioView\n {...props}\n onCancel={() => {\n navigate(urlController.buildAppUrlPath(\"/\"));\n }}\n onSave={(savedCollection) => {\n if (savedCollection) {\n snackbarController.open({\n type: \"success\",\n message: `Collection ${savedCollection.name || savedCollection.slug} saved`\n });\n if (props.collectionId === \"new\") {\n navigate(urlController.buildAppUrlPath(`s/schema/${savedCollection.slug}`));\n }\n }\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,2BAA2B,OAAwC;CAC/E,MAAM,WAAW,YAAY;CAC7B,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,qBAAqB,sBAAsB;CAEjD,OACI,oBAAC,sBAAD;EACI,GAAI;EACJ,gBAAgB;GACZ,SAAS,cAAc,gBAAgB,GAAG,CAAC;EAC/C;EACA,SAAS,oBAAoB;GACzB,IAAI,iBAAiB;IACjB,mBAAmB,KAAK;KACpB,MAAM;KACN,SAAS,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK;IACxE,CAAC;IACD,IAAI,MAAM,iBAAiB,OACvB,SAAS,cAAc,gBAAgB,YAAY,gBAAgB,MAAM,CAAC;GAElF;EACJ;CACH,CAAA;AAET"}
|
|
@@ -25,4 +25,4 @@ import { EntityCollectionTableProps } from "./EntityCollectionTableProps";
|
|
|
25
25
|
* @see VirtualTable
|
|
26
26
|
* @group Components
|
|
27
27
|
*/
|
|
28
|
-
export declare const EntityCollectionTable: <M extends Record<string, unknown> =
|
|
28
|
+
export declare const EntityCollectionTable: <M extends Record<string, unknown> = Record<string, unknown>, USER extends User = User>({ className, style, fixedFilter, actionsStart, actions, viewModeToggle, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, initialScroll, onScroll, onSizeChanged, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, enablePopupIcon, openEntityMode, onColumnsOrderChange, hideToolbar }: EntityCollectionTableProps<M>) => React.JSX.Element;
|
|
@@ -3,4 +3,4 @@ export type { EntityCollectionTableProps } from "./EntityCollectionTableProps";
|
|
|
3
3
|
export * from "./PropertyTableCell";
|
|
4
4
|
export * from "./EntityCollectionRowActions";
|
|
5
5
|
export * from "./column_utils";
|
|
6
|
-
export { VirtualTableInput } from "
|
|
6
|
+
export { VirtualTableInput } from "@rebasepro/ui";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { EntityCollection } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity } from "@rebasepro/types";
|
|
4
|
-
import { BoardItemViewProps } from "
|
|
5
|
-
export type EntityBoardCardProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<M
|
|
4
|
+
import { BoardItemViewProps } from "@rebasepro/ui";
|
|
5
|
+
export type EntityBoardCardProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<Entity<M>> & {
|
|
6
6
|
collection: EntityCollection<M>;
|
|
7
7
|
onClick?: (entity: Entity<M>) => void;
|
|
8
8
|
selected?: boolean;
|
|
@@ -27,5 +27,5 @@ export declare function createEntityBoardCardComponent<M extends Record<string,
|
|
|
27
27
|
isEntitySelected?: (entity: Entity<M>) => boolean;
|
|
28
28
|
onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
|
|
29
29
|
selectionEnabled?: boolean;
|
|
30
|
-
}): React.ComponentType<BoardItemViewProps<M
|
|
30
|
+
}): React.ComponentType<BoardItemViewProps<Entity<M>>>;
|
|
31
31
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityCollection, RebaseData, RebaseContext, AnalyticsController } from "@rebasepro/types";
|
|
2
|
-
import { BoardItem } from "
|
|
1
|
+
import { EntityCollection, RebaseData, RebaseContext, AnalyticsController, Entity } from "@rebasepro/types";
|
|
2
|
+
import { BoardItem } from "@rebasepro/ui";
|
|
3
3
|
import { BoardDataController } from "../useBoardDataController";
|
|
4
4
|
export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
|
|
5
5
|
collection: EntityCollection<M>;
|
|
@@ -12,7 +12,7 @@ export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
|
|
|
12
12
|
analyticsController: AnalyticsController;
|
|
13
13
|
}
|
|
14
14
|
export declare function useKanbanDragAndDrop<M extends Record<string, unknown>>({ collection, fullPath, columnProperty, orderProperty, dataClient, context, boardDataController, analyticsController }: UseKanbanDragAndDropParams<M>): {
|
|
15
|
-
handleItemsReorder: (items: BoardItem<M
|
|
15
|
+
handleItemsReorder: (items: BoardItem<Entity<M>>[], moveInfo?: {
|
|
16
16
|
itemId: string;
|
|
17
17
|
sourceColumn: string;
|
|
18
18
|
targetColumn: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { EntityCollection } from "@rebasepro/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Entity, EntityStatus } from "@rebasepro/types";
|
|
4
|
-
import type {
|
|
4
|
+
import type { EntityFormBindingProps } from "../form";
|
|
5
|
+
import type { OnUpdateParams } from "../types/components/EntityFormProps";
|
|
5
6
|
import { MAIN_TAB_VALUE, JSON_TAB_VALUE, HISTORY_TAB_VALUE } from "../util/entity_view_constants";
|
|
6
7
|
export { MAIN_TAB_VALUE, JSON_TAB_VALUE, HISTORY_TAB_VALUE };
|
|
7
8
|
export type BarActionsParams = {
|
|
@@ -34,7 +35,7 @@ export interface EntityEditViewProps<M extends Record<string, unknown> = Record<
|
|
|
34
35
|
navigateBack?: () => void;
|
|
35
36
|
layout?: "side_panel" | "full_screen" | "split" | "dialog";
|
|
36
37
|
barActions?: (params: BarActionsParams) => React.ReactNode;
|
|
37
|
-
formProps?: Partial<
|
|
38
|
+
formProps?: Partial<EntityFormBindingProps<M>>;
|
|
38
39
|
/**
|
|
39
40
|
* Pre-populate the form with these values when creating a new entity.
|
|
40
41
|
* Only applied when the form is in "new" mode (no entityId).
|
|
@@ -7,4 +7,4 @@ import type { RebaseCMSConfig } from "@rebasepro/types";
|
|
|
7
7
|
* is auto-wired as a native feature (slots, provider, Studio view) without
|
|
8
8
|
* needing any external plugin.
|
|
9
9
|
*/
|
|
10
|
-
export declare function RebaseCMS({ collections, homePage, entityViews, entityActions,
|
|
10
|
+
export declare function RebaseCMS({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings }: RebaseCMSConfig): null;
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { SelectedCellProps } from "@rebasepro/types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
* This store uses `useSyncExternalStore` so only cells whose `selected`
|
|
13
|
-
* derivation actually changed will re-render.
|
|
14
|
-
*/
|
|
2
|
+
import { VirtualTableSelectionStore, SelectedCell } from "@rebasepro/ui";
|
|
3
|
+
export interface AdminSelectedCell extends SelectedCell {
|
|
4
|
+
entityPath: string;
|
|
5
|
+
entityId: string | number;
|
|
6
|
+
propertyKey: string;
|
|
7
|
+
cellRect: DOMRect;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
15
11
|
export declare function createSelectionStore(): {
|
|
16
|
-
getSnapshot: () =>
|
|
12
|
+
getSnapshot: () => AdminSelectedCell | undefined;
|
|
17
13
|
subscribe: (listener: () => void) => () => void;
|
|
18
|
-
select: (cell:
|
|
14
|
+
select: (cell: AdminSelectedCell | undefined) => void;
|
|
19
15
|
};
|
|
20
|
-
export type SelectionStore =
|
|
21
|
-
/**
|
|
22
|
-
* Hook that subscribes a cell to the selection store and returns
|
|
23
|
-
* whether THIS cell is selected. Only re-renders when the cell's
|
|
24
|
-
* `selected` boolean actually changes (not on every store update).
|
|
25
|
-
*/
|
|
16
|
+
export type SelectionStore = VirtualTableSelectionStore<AdminSelectedCell>;
|
|
26
17
|
export declare function useCellSelected(store: {
|
|
27
18
|
getSnapshot: () => SelectedCellProps | undefined;
|
|
28
19
|
subscribe: (listener: () => void) => () => void;
|
|
@@ -3,5 +3,5 @@ import type { Property, PropertyConfig } from "@rebasepro/types";
|
|
|
3
3
|
export declare const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig>;
|
|
4
4
|
export declare function getDefaultFieldConfig(property: Property): PropertyConfig | undefined;
|
|
5
5
|
export declare function getFieldConfig(property: Property, propertyConfigs: Record<string, PropertyConfig>): PropertyConfig | undefined;
|
|
6
|
-
export declare function getDefaultFieldId(property: Property): "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "
|
|
6
|
+
export declare function getDefaultFieldId(property: Property): "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input" | undefined;
|
|
7
7
|
export declare function getFieldId(property: Property): string | undefined;
|
package/dist/editor/editor.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ export interface MarkdownEditorConfig {
|
|
|
10
10
|
transformPastedText?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export type RichTextEditorTextSize = "sm" | "base" | "lg";
|
|
13
|
-
/** @deprecated Use `RichTextEditorTextSize` instead. */
|
|
14
|
-
export type RebaseEditorTextSize = RichTextEditorTextSize;
|
|
15
13
|
export type RichTextEditorProps = {
|
|
16
14
|
content?: JSONContent | string;
|
|
17
15
|
onMarkdownContentChange?: (content: string) => void;
|
|
@@ -29,8 +27,4 @@ export type RichTextEditorProps = {
|
|
|
29
27
|
disabled?: boolean;
|
|
30
28
|
markdownConfig?: MarkdownEditorConfig;
|
|
31
29
|
};
|
|
32
|
-
/** @deprecated Use `RichTextEditorProps` instead. */
|
|
33
|
-
export type RebaseEditorProps = RichTextEditorProps;
|
|
34
30
|
export declare const RichTextEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled, markdownConfig }: RichTextEditorProps) => React.JSX.Element;
|
|
35
|
-
/** @deprecated Use `RichTextEditor` instead. */
|
|
36
|
-
export declare const RebaseEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled, markdownConfig }: RichTextEditorProps) => React.JSX.Element;
|
package/dist/editor.js
CHANGED
|
@@ -2681,8 +2681,6 @@ var RichTextEditor = ({ content, onJsonContentChange, onHtmlContentChange, onMar
|
|
|
2681
2681
|
})]
|
|
2682
2682
|
});
|
|
2683
2683
|
};
|
|
2684
|
-
/** @deprecated Use `RichTextEditor` instead. */
|
|
2685
|
-
var RebaseEditor = RichTextEditor;
|
|
2686
2684
|
var cssStyles = `
|
|
2687
2685
|
.ProseMirror {
|
|
2688
2686
|
box-shadow: none !important;
|
|
@@ -2887,6 +2885,6 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
|
|
|
2887
2885
|
}
|
|
2888
2886
|
`;
|
|
2889
2887
|
//#endregion
|
|
2890
|
-
export {
|
|
2888
|
+
export { RichTextEditor };
|
|
2891
2889
|
|
|
2892
2890
|
//# sourceMappingURL=editor.js.map
|