@rebasepro/admin 0.6.0 → 0.7.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/README.md +7 -3
- package/dist/{CollectionEditorDialog-jA-PLh6N.js → CollectionEditorDialog-iGgS4rLX.js} +233 -152
- package/dist/CollectionEditorDialog-iGgS4rLX.js.map +1 -0
- package/dist/{PropertyEditView-DEUddmg_.js → PropertyEditView-C9yhLyja.js} +129 -15
- package/dist/PropertyEditView-C9yhLyja.js.map +1 -0
- package/dist/{CollectionsStudioView-UKouBPOm.js → RouterCollectionsStudioView-Dqx27GD8.js} +61 -39
- package/dist/RouterCollectionsStudioView-Dqx27GD8.js.map +1 -0
- 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 +374 -0
- package/dist/collection_editor/serializable_utils.d.ts +50 -0
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -1
- 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/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/editor/editor.d.ts +10 -4
- package/dist/editor.js +6 -4
- 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/field_bindings/MarkdownEditorFieldBinding.d.ts +2 -2
- package/dist/form/form_utils.d.ts +8 -0
- package/dist/form/index.d.ts +5 -1
- package/dist/{history-BL49TIDb.js → history-ChHgyyvM.js} +2 -2
- package/dist/{history-BL49TIDb.js.map → history-ChHgyyvM.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/routes/CustomViewRoute.d.ts +2 -1
- package/dist/{src-BJ8fkM8y.js → src-DOX2nOyh.js} +1634 -1330
- package/dist/src-DOX2nOyh.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/fields.d.ts +6 -1
- 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 +18 -18
- package/src/collection_editor/extensibility_types.ts +168 -0
- package/src/collection_editor/index.ts +46 -0
- package/src/collection_editor/serializable_types.ts +487 -0
- package/src/collection_editor/serializable_utils.ts +588 -0
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +2 -0
- package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +134 -70
- 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 +155 -10
- 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/useJsonCollectionsConfigController.tsx +286 -0
- package/src/collection_editor/useSafeSnackbarController.ts +9 -0
- package/src/collection_editor_ui.ts +6 -0
- package/src/components/ArrayContainer.tsx +5 -5
- package/src/components/DefaultDrawer.tsx +13 -3
- package/src/components/DrawerNavigationGroup.tsx +2 -2
- package/src/components/DrawerNavigationItem.tsx +4 -4
- package/src/components/EntityCollectionView/EntityBoardCard.tsx +6 -6
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +14 -11
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +40 -190
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +54 -183
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +6 -6
- package/src/components/EntityEditView.tsx +5 -4
- package/src/components/EntityEditViewFormActions.tsx +32 -26
- package/src/components/HomePage/ContentHomePage.tsx +13 -4
- package/src/components/HomePage/NavigationCard.tsx +8 -14
- package/src/components/HomePage/NavigationGroup.tsx +1 -1
- package/src/components/HomePage/SmallNavigationCard.tsx +1 -5
- package/src/components/RebaseCMS.tsx +3 -2
- package/src/components/RebaseNavigation.tsx +71 -7
- package/src/components/SelectableTable/SelectableTable.tsx +2 -2
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +28 -21
- package/src/components/SideDialogs.tsx +0 -7
- package/src/components/common/default_entity_actions.tsx +18 -10
- package/src/contexts/BreacrumbsContext.tsx +15 -6
- package/src/editor/editor.tsx +14 -8
- package/src/editor/selectors/ai-selector.tsx +0 -1
- package/src/form/EntityForm.tsx +191 -428
- package/src/form/EntityFormActions.tsx +33 -47
- package/src/form/EntityFormBinding.tsx +323 -0
- package/src/form/components/FormLayout.tsx +1 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +4 -4
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +7 -2
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +1 -1
- package/src/form/form_utils.ts +163 -0
- package/src/form/index.tsx +14 -5
- 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 +7 -2
- 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/fields.tsx +7 -1
- package/src/util/dataControllerAdapter.ts +93 -0
- package/src/util/navigation_utils.ts +1 -1
- package/src/util/propertyConfigMapper.ts +134 -0
- package/LICENSE +0 -21
- package/dist/CollectionEditorDialog-jA-PLh6N.js.map +0 -1
- package/dist/CollectionsStudioView-UKouBPOm.js.map +0 -1
- package/dist/PropertyEditView-DEUddmg_.js.map +0 -1
- 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/hooks/navigation/useNavigationRegistry.d.ts +0 -12
- package/dist/hooks/navigation/useNavigationURLs.d.ts +0 -11
- package/dist/src-BJ8fkM8y.js.map +0 -1
- 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/hooks/navigation/useNavigationRegistry.ts +0 -164
- package/src/hooks/navigation/useNavigationURLs.ts +0 -56
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BoardProps } from "./board_types";
|
|
3
|
-
export declare function Board<M extends Record<string, unknown>, COLUMN extends string>({ data, columns: columnsProp, columnLabels, columnColors, className, assignColumn, allowColumnReorder, onColumnReorder, onItemsReorder, ItemComponent, columnLoadingState, onLoadMoreColumn, onAddItemToColumn, AddColumnComponent }: BoardProps<M, COLUMN>): React.JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BoardItem, BoardItemViewProps } from "./board_types";
|
|
3
|
-
import { ChipColorKey, ChipColorScheme } from "@rebasepro/ui";
|
|
4
|
-
export interface BoardColumnProps<M extends Record<string, unknown>> {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
items: BoardItem<M>[];
|
|
8
|
-
index: number;
|
|
9
|
-
ItemComponent: React.ComponentType<BoardItemViewProps<M>>;
|
|
10
|
-
isDragging: boolean;
|
|
11
|
-
isDragOverColumn: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Whether column reordering is allowed (shows drag handle)
|
|
14
|
-
*/
|
|
15
|
-
allowReorder?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Whether items are loading for this column
|
|
18
|
-
*/
|
|
19
|
-
loading?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether there are more items to load
|
|
22
|
-
*/
|
|
23
|
-
hasMore?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Callback to load more items
|
|
26
|
-
*/
|
|
27
|
-
onLoadMore?: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Callback to add a new item to this column
|
|
30
|
-
*/
|
|
31
|
-
onAddItem?: () => void;
|
|
32
|
-
/**
|
|
33
|
-
* Total count of entities in this column
|
|
34
|
-
*/
|
|
35
|
-
totalCount?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Color of the column header indicator
|
|
38
|
-
*/
|
|
39
|
-
color?: ChipColorKey | ChipColorScheme;
|
|
40
|
-
style?: React.CSSProperties;
|
|
41
|
-
}
|
|
42
|
-
export declare const BoardColumn: <M extends Record<string, unknown>>(props: BoardColumnProps<M>) => React.ReactElement;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ChipColorKey, ChipColorScheme } from "@rebasepro/ui";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface BoardColumnTitleProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
"aria-label"?: string;
|
|
7
|
-
color?: ChipColorKey | ChipColorScheme;
|
|
8
|
-
}
|
|
9
|
-
export declare function BoardColumnTitle({ children, className, color, ...props }: BoardColumnTitleProps): React.JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BoardItem, BoardItemViewProps } from "./board_types";
|
|
3
|
-
interface BoardSortableListProps<M extends Record<string, unknown>> {
|
|
4
|
-
columnId: string;
|
|
5
|
-
items: BoardItem<M>[];
|
|
6
|
-
ItemComponent: React.ComponentType<BoardItemViewProps<M>>;
|
|
7
|
-
isDragging: boolean;
|
|
8
|
-
isDragOverColumn: boolean;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
hasMore?: boolean;
|
|
11
|
-
onLoadMore?: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function BoardSortableList<M extends Record<string, unknown>>({ columnId, items, ItemComponent, isDragging, isDragOverColumn, loading, hasMore, onLoadMore }: BoardSortableListProps<M>): React.JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from "react";
|
|
2
|
-
import { ChipColorKey, ChipColorScheme } from "@rebasepro/ui";
|
|
3
|
-
import { Entity } from "@rebasepro/types";
|
|
4
|
-
/**
|
|
5
|
-
* Item wrapper for entities in the Board component
|
|
6
|
-
*/
|
|
7
|
-
export interface BoardItem<M extends Record<string, unknown> = Record<string, unknown>> {
|
|
8
|
-
id: string;
|
|
9
|
-
entity: Entity<M>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Map of column keys to arrays of board items
|
|
13
|
-
*/
|
|
14
|
-
export interface BoardItemMap<M extends Record<string, unknown> = Record<string, unknown>> {
|
|
15
|
-
[columnKey: string]: BoardItem<M>[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Props passed to custom item render components
|
|
19
|
-
*/
|
|
20
|
-
export interface BoardItemViewProps<M extends Record<string, unknown> = Record<string, unknown>> {
|
|
21
|
-
item: BoardItem<M>;
|
|
22
|
-
isDragging: boolean;
|
|
23
|
-
isClone?: boolean;
|
|
24
|
-
isGroupedOver?: boolean;
|
|
25
|
-
style?: CSSProperties;
|
|
26
|
-
index?: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Per-column loading state
|
|
30
|
-
*/
|
|
31
|
-
export interface ColumnLoadingState {
|
|
32
|
-
[columnKey: string]: {
|
|
33
|
-
loading: boolean;
|
|
34
|
-
hasMore: boolean;
|
|
35
|
-
itemCount: number;
|
|
36
|
-
/** Total count of entities in column (may differ from itemCount if some lack orderProperty) */
|
|
37
|
-
totalCount?: number;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Props for the Board component
|
|
42
|
-
*/
|
|
43
|
-
export interface BoardProps<M extends Record<string, unknown>, COLUMN extends string> {
|
|
44
|
-
/**
|
|
45
|
-
* Array of board items (entities wrapped with id)
|
|
46
|
-
*/
|
|
47
|
-
data: BoardItem<M>[];
|
|
48
|
-
/**
|
|
49
|
-
* Array of column keys/identifiers
|
|
50
|
-
*/
|
|
51
|
-
columns: COLUMN[];
|
|
52
|
-
/**
|
|
53
|
-
* Labels for each column (optional, uses column key if not provided)
|
|
54
|
-
*/
|
|
55
|
-
columnLabels?: Record<COLUMN, string>;
|
|
56
|
-
/**
|
|
57
|
-
* Colors for each column from enum values (optional)
|
|
58
|
-
*/
|
|
59
|
-
columnColors?: Record<COLUMN, ChipColorKey | ChipColorScheme | undefined>;
|
|
60
|
-
/**
|
|
61
|
-
* CSS class name for the board container
|
|
62
|
-
*/
|
|
63
|
-
className?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Function to determine which column an item belongs to
|
|
66
|
-
*/
|
|
67
|
-
assignColumn: (item: BoardItem<M>) => COLUMN;
|
|
68
|
-
/**
|
|
69
|
-
* Whether column reordering is allowed.
|
|
70
|
-
* Set to true only when a plugin provides persistence for column order.
|
|
71
|
-
*/
|
|
72
|
-
allowColumnReorder?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Callback when columns are reordered
|
|
75
|
-
*/
|
|
76
|
-
onColumnReorder?: (columns: COLUMN[]) => void;
|
|
77
|
-
/**
|
|
78
|
-
* Callback when items are reordered or moved between columns
|
|
79
|
-
*/
|
|
80
|
-
onItemsReorder?: (items: BoardItem<M>[], moveInfo?: {
|
|
81
|
-
itemId: string;
|
|
82
|
-
sourceColumn: COLUMN;
|
|
83
|
-
targetColumn: COLUMN;
|
|
84
|
-
}) => void;
|
|
85
|
-
/**
|
|
86
|
-
* Component to render individual items
|
|
87
|
-
*/
|
|
88
|
-
ItemComponent: React.ComponentType<BoardItemViewProps<M>>;
|
|
89
|
-
/**
|
|
90
|
-
* Per-column loading state for pagination
|
|
91
|
-
*/
|
|
92
|
-
columnLoadingState?: ColumnLoadingState;
|
|
93
|
-
/**
|
|
94
|
-
* Callback to load more items for a column
|
|
95
|
-
*/
|
|
96
|
-
onLoadMoreColumn?: (column: COLUMN) => void;
|
|
97
|
-
/**
|
|
98
|
-
* Callback to add a new item to a specific column
|
|
99
|
-
*/
|
|
100
|
-
onAddItemToColumn?: (column: COLUMN) => void;
|
|
101
|
-
/**
|
|
102
|
-
* Optional component to render at the end of the board for adding new columns
|
|
103
|
-
*/
|
|
104
|
-
AddColumnComponent?: React.ReactNode;
|
|
105
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EntityCollection } from "@rebasepro/types";
|
|
2
|
-
import { CollectionRegistry } from "@rebasepro/common";
|
|
3
|
-
import { EntityReference, UserConfigurationPersistence } from "@rebasepro/types";
|
|
4
|
-
export declare function useNavigationRegistry(userConfigPersistence?: UserConfigurationPersistence): {
|
|
5
|
-
collectionRegistryRef: import("react").RefObject<CollectionRegistry>;
|
|
6
|
-
getCollection: (slugOrPath: string, includeUserOverride?: boolean) => EntityCollection | undefined;
|
|
7
|
-
getRawCollection: (slugOrPath: string) => EntityCollection | undefined;
|
|
8
|
-
getParentReferencesFromPath: (path: string) => EntityReference[];
|
|
9
|
-
getParentCollectionSlugs: (path: string) => string[];
|
|
10
|
-
getParentEntityIds: (path: string) => string[];
|
|
11
|
-
convertIdsToPaths: (ids: string[]) => string[];
|
|
12
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CollectionRegistry } from "@rebasepro/common";
|
|
2
|
-
export declare function encodePath(input: string): string;
|
|
3
|
-
export declare function useNavigationURLs(basePath: string, baseCollectionPath: string, collectionRegistryRef: React.MutableRefObject<CollectionRegistry>): {
|
|
4
|
-
homeUrl: string;
|
|
5
|
-
fullCollectionPath: string;
|
|
6
|
-
buildAppUrlPath: (path: string) => string;
|
|
7
|
-
buildUrlCollectionPath: (path: string) => string;
|
|
8
|
-
isUrlCollectionPath: (path: string) => boolean;
|
|
9
|
-
urlPathToDataPath: (path: string) => string;
|
|
10
|
-
resolveDatabasePathsFrom: (path: string) => string;
|
|
11
|
-
};
|