@rebasepro/admin 0.2.1 → 0.2.4
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-BXIh2AXg.js → CollectionEditorDialog-D0VqpLPO.js} +73 -256
- package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
- package/dist/{CollectionsStudioView-jR8iz_ja.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
- package/dist/{CollectionsStudioView-jR8iz_ja.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
- package/dist/{ExportCollectionAction-CMdiiv1L.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
- package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
- package/dist/{ImportCollectionAction-C05lE0IW.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
- package/dist/{ImportCollectionAction-C05lE0IW.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
- package/dist/{PropertyEditView-BB5xjnhZ.js → PropertyEditView-CvRSV-A2.js} +430 -445
- package/dist/PropertyEditView-CvRSV-A2.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -5
- package/dist/collection_editor/index.d.ts +0 -1
- package/dist/collection_editor/types/collection_editor_controller.d.ts +0 -2
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -3
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +1 -7
- package/dist/collection_editor_ui.js +3 -3
- package/dist/components/ArrayContainer.d.ts +2 -2
- package/dist/components/DefaultAppBar.d.ts +18 -1
- package/dist/components/DefaultDrawer.d.ts +51 -3
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
- package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
- package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
- package/dist/components/EntityEditView.d.ts +2 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
- package/dist/components/PropertyCollectionView.d.ts +1 -1
- package/dist/components/PropertyIdCopyTooltip.d.ts +1 -1
- package/dist/components/SelectableTable/SelectionStore.d.ts +4 -1
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
- package/dist/components/admin/RolesView.d.ts +3 -3
- package/dist/components/admin/UsersView.d.ts +3 -3
- package/dist/components/app/Drawer.d.ts +8 -1
- package/dist/data_export/export/export.d.ts +3 -3
- package/dist/editor/components/editor-bubble.d.ts +5 -1
- package/dist/editor/components/image-bubble.d.ts +5 -1
- package/dist/editor/components/index.d.ts +3 -3
- package/dist/editor/components/table-bubble.d.ts +5 -1
- package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
- package/dist/editor/useProseMirror.d.ts +2 -2
- package/dist/editor/utils/remove_classes.d.ts +1 -1
- package/dist/editor.js +15 -14
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +2 -2
- package/dist/form/components/StorageUploadProgress.d.ts +2 -2
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
- package/dist/form/validation.d.ts +3 -3
- package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
- package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
- package/dist/{index-BAM9KCmM.js → index-BCcLwgfe.js} +3 -2
- package/dist/{index-BAM9KCmM.js.map → index-BCcLwgfe.js.map} +1 -1
- package/dist/{index-D5OQhv-T.js → index-DY2k5TtG.js} +3 -3
- package/dist/index-DY2k5TtG.js.map +1 -0
- package/dist/{index-CoSNm3e3.js → index-UQOMHwt1.js} +3 -3
- package/dist/index-UQOMHwt1.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2813 -372
- package/dist/index.js.map +1 -1
- package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
- package/dist/markdown-DD2JDU1X.js.map +1 -0
- package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/EntityFormProps.d.ts +2 -2
- package/dist/types/fields.d.ts +1 -1
- package/dist/{util-DtbWD7LF.js → util-ZM9gQuCv.js} +2104 -2071
- package/dist/util-ZM9gQuCv.js.map +1 -0
- package/package.json +10 -9
- package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
- package/src/collection_editor/index.ts +1 -3
- package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
- package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
- package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
- package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +1 -10
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +37 -57
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
- package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
- package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
- package/src/collection_editor/validateCollectionJson.ts +88 -1
- package/src/components/ArrayContainer.tsx +3 -3
- package/src/components/DefaultAppBar.tsx +52 -31
- package/src/components/DefaultDrawer.tsx +279 -66
- package/src/components/DrawerNavigationItem.tsx +1 -1
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
- package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
- package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
- package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
- package/src/components/EntityDetailView.tsx +46 -24
- package/src/components/EntityEditView.tsx +51 -28
- package/src/components/EntityEditViewFormActions.tsx +4 -4
- package/src/components/EntityPreview.tsx +9 -4
- package/src/components/HomePage/HomePageDnD.tsx +3 -2
- package/src/components/PropertyCollectionView.tsx +1 -1
- package/src/components/PropertyIdCopyTooltip.tsx +1 -1
- package/src/components/RebaseLayout.tsx +5 -1
- package/src/components/RebaseNavigation.tsx +2 -2
- package/src/components/RebaseRouteDefs.tsx +4 -7
- package/src/components/RebaseShell.tsx +16 -13
- package/src/components/SearchIconsView.tsx +1 -8
- package/src/components/SelectableTable/SelectableTable.tsx +8 -11
- package/src/components/SelectableTable/SelectionStore.ts +1 -1
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
- package/src/components/SideEntityProvider.tsx +2 -1
- package/src/components/admin/RolesView.tsx +7 -2
- package/src/components/admin/UsersView.tsx +12 -6
- package/src/components/app/Drawer.tsx +9 -1
- package/src/components/app/Scaffold.tsx +5 -1
- package/src/data_export/export/export.ts +17 -17
- package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
- package/src/editor/components/editor-bubble.tsx +32 -9
- package/src/editor/components/image-bubble.tsx +27 -11
- package/src/editor/components/index.ts +3 -3
- package/src/editor/components/table-bubble.tsx +79 -17
- package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
- package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
- package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
- package/src/editor/schema.ts +135 -59
- package/src/editor/selectors/link-selector.tsx +8 -5
- package/src/editor/useProseMirror.ts +2 -2
- package/src/editor/utils/remove_classes.ts +6 -5
- package/src/form/EntityForm.tsx +15 -15
- package/src/form/EntityFormActions.tsx +2 -2
- package/src/form/PropertyFieldBinding.tsx +64 -64
- package/src/form/components/FieldHelperText.tsx +4 -4
- package/src/form/components/StorageUploadProgress.tsx +2 -2
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
- package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
- package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
- package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
- package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
- package/src/form/validation.ts +43 -43
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -5
- package/src/hooks/navigation/useResolvedCollections.ts +27 -7
- package/src/hooks/navigation/useResolvedViews.tsx +24 -44
- package/src/index.ts +2 -0
- package/src/preview/PropertyPreview.tsx +2 -2
- package/src/preview/components/ImagePreview.tsx +2 -1
- package/src/preview/components/UrlComponentPreview.tsx +11 -2
- package/src/preview/components/UserPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
- package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
- package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
- package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
- package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
- package/src/types/components/EntityFormActionsProps.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +2 -2
- package/src/types/fields.tsx +2 -2
- package/dist/CollectionEditorDialog-BXIh2AXg.js.map +0 -1
- package/dist/ContentHomePage-BQZWuOFb.js +0 -1784
- package/dist/ContentHomePage-BQZWuOFb.js.map +0 -1
- package/dist/ExportCollectionAction-CMdiiv1L.js.map +0 -1
- package/dist/PropertyEditView-BB5xjnhZ.js.map +0 -1
- package/dist/RoleChip-QtUFXeTp.js +0 -67
- package/dist/RoleChip-QtUFXeTp.js.map +0 -1
- package/dist/RolesView-CULIHWZ9.js +0 -437
- package/dist/RolesView-CULIHWZ9.js.map +0 -1
- package/dist/UsersView-D7_AtJ44.js +0 -408
- package/dist/UsersView-D7_AtJ44.js.map +0 -1
- package/dist/collection_editor/types/config_permissions.d.ts +0 -19
- package/dist/index-CoSNm3e3.js.map +0 -1
- package/dist/index-D5OQhv-T.js.map +0 -1
- package/dist/markdown-z2Ir7Cgo.js.map +0 -1
- package/dist/util-DtbWD7LF.js.map +0 -1
- package/src/collection_editor/types/config_permissions.ts +0 -20
|
@@ -34,7 +34,7 @@ export function TableStorageUpload(props: {
|
|
|
34
34
|
selected: boolean;
|
|
35
35
|
focused: boolean;
|
|
36
36
|
property: StringProperty | ArrayProperty;
|
|
37
|
-
entity: Entity<
|
|
37
|
+
entity: Entity<Record<string, unknown>>;
|
|
38
38
|
path: string;
|
|
39
39
|
previewSize: PreviewSize;
|
|
40
40
|
openPopup?: (cellRect?: DOMRect) => void;
|
|
@@ -112,13 +112,13 @@ interface StorageUploadProps {
|
|
|
112
112
|
autoFocus: boolean;
|
|
113
113
|
selected: boolean;
|
|
114
114
|
disabled: boolean;
|
|
115
|
-
entity: Entity<
|
|
115
|
+
entity: Entity<Record<string, unknown>>;
|
|
116
116
|
previewSize: PreviewSize;
|
|
117
117
|
storage: StorageConfig;
|
|
118
118
|
onFilesAdded: (acceptedFiles: File[]) => void;
|
|
119
119
|
storagePathBuilder: (file: File) => string;
|
|
120
120
|
openPopup?: (cellRect?: DOMRect) => void;
|
|
121
|
-
onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, fileMetadata?:
|
|
121
|
+
onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, fileMetadata?: Record<string, unknown>) => Promise<void>;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
function StorageUpload({
|
|
@@ -156,7 +156,7 @@ function StorageUpload({
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
const metadata:
|
|
159
|
+
const metadata: Record<string, unknown> | undefined = storage?.metadata;
|
|
160
160
|
const hasValue = Boolean(internalValue);
|
|
161
161
|
|
|
162
162
|
const snackbarContext = useSnackbarController();
|
|
@@ -288,7 +288,7 @@ interface TableStorageItemPreviewProps {
|
|
|
288
288
|
property: StringProperty;
|
|
289
289
|
value: string,
|
|
290
290
|
size: PreviewSize;
|
|
291
|
-
entity: Entity<
|
|
291
|
+
entity: Entity<Record<string, unknown>>;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
export function TableStorageItemPreview({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useDebouncedCallback, cls, focusedDisabled } from "@rebasepro/ui";
|
|
2
|
+
import { useDebouncedCallback, cls, focusedDisabled, TextField } from "@rebasepro/ui";
|
|
3
3
|
|
|
4
4
|
export function VirtualTableNumberInput(props: {
|
|
5
5
|
error: Error | undefined;
|
|
@@ -50,21 +50,24 @@ export function VirtualTableNumberInput(props: {
|
|
|
50
50
|
[value, focused]
|
|
51
51
|
);
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
const inputRef = React.useRef<HTMLInputElement>(null);
|
|
54
54
|
|
|
55
55
|
useEffect(() => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
56
|
+
if (inputRef.current && focused) {
|
|
57
|
+
inputRef.current.focus({ preventScroll: true });
|
|
58
58
|
}
|
|
59
|
-
}, [focused,
|
|
59
|
+
}, [focused, inputRef]);
|
|
60
60
|
|
|
61
61
|
const regexp = /^-?[0-9]+[,.]?[0-9]*$/;
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
<TextField
|
|
65
|
+
inputRef={inputRef}
|
|
66
|
+
invisible={true}
|
|
67
|
+
size="small"
|
|
68
|
+
className="w-full"
|
|
69
|
+
inputClassName={cls("p-0 m-0 bg-transparent border-none outline-hidden font-normal leading-normal text-unset", focusedDisabled)}
|
|
70
|
+
inputStyle={{
|
|
68
71
|
textAlign: align
|
|
69
72
|
}}
|
|
70
73
|
value={internalValue ?? ""}
|
|
@@ -13,7 +13,7 @@ interface EntityTableCellProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* The value is used only to check changes and force re-renders
|
|
15
15
|
*/
|
|
16
|
-
value?:
|
|
16
|
+
value?: unknown;
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
savedTimestamp?: number;
|
|
19
19
|
error?: Error;
|
|
@@ -31,7 +31,7 @@ interface EntityTableCellProps {
|
|
|
31
31
|
// Sortable props for dnd-kit integration
|
|
32
32
|
sortableNodeRef?: (node: HTMLElement | null) => void;
|
|
33
33
|
sortableStyle?: React.CSSProperties;
|
|
34
|
-
sortableAttributes?: Record<string,
|
|
34
|
+
sortableAttributes?: Record<string, string | number | undefined>;
|
|
35
35
|
isDragging?: boolean;
|
|
36
36
|
isDraggable?: boolean;
|
|
37
37
|
frozen?: boolean;
|
|
@@ -248,7 +248,7 @@ export function PopupFormFieldInternal<M extends Record<string, unknown>>({
|
|
|
248
248
|
if (!validationSchema) return {};
|
|
249
249
|
const result = await validationSchema.safeParseAsync(values);
|
|
250
250
|
if (result.success) return {};
|
|
251
|
-
return zodToFormErrors(result.error)
|
|
251
|
+
return zodToFormErrors(result.error) as Record<string, string>;
|
|
252
252
|
},
|
|
253
253
|
validateOnInitialRender: true,
|
|
254
254
|
onSubmit: (values, actions) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ArrayProperty, DateProperty, Entity, EntityReference, EntityRelation, NumberProperty, Property, ReferenceProperty, RelationProperty, StringProperty } from "@rebasepro/types";
|
|
3
|
+
import { TableSize } from "@rebasepro/core";
|
|
3
4
|
|
|
4
5
|
import { VirtualTableInput } from "./fields/VirtualTableInput";
|
|
5
6
|
import { VirtualTableSelect } from "./fields/VirtualTableSelect";
|
|
@@ -14,7 +15,7 @@ import { TableRelationSelectorField } from "./fields/TableRelationSelectorField"
|
|
|
14
15
|
|
|
15
16
|
import { getPreviewSizeFrom } from "../../preview/util";
|
|
16
17
|
|
|
17
|
-
export interface TableFieldBindingProps<T =
|
|
18
|
+
export interface TableFieldBindingProps<T = unknown> {
|
|
18
19
|
propertyKey: string;
|
|
19
20
|
property: Property;
|
|
20
21
|
internalValue: T;
|
|
@@ -23,9 +24,9 @@ export interface TableFieldBindingProps<T = any> {
|
|
|
23
24
|
validationError?: Error;
|
|
24
25
|
disabled: boolean;
|
|
25
26
|
selected: boolean;
|
|
26
|
-
size:
|
|
27
|
+
size: TableSize;
|
|
27
28
|
align: "left" | "center" | "right";
|
|
28
|
-
entity: Entity<
|
|
29
|
+
entity: Entity<Record<string, unknown>>;
|
|
29
30
|
path: string;
|
|
30
31
|
openPopup?: (cellRect: DOMRect | undefined) => void;
|
|
31
32
|
}
|
|
@@ -100,7 +101,7 @@ export function getTableBindingForProperty(
|
|
|
100
101
|
property={property as StringProperty | ArrayProperty}
|
|
101
102
|
entity={entity}
|
|
102
103
|
path={path}
|
|
103
|
-
value={internalValue}
|
|
104
|
+
value={internalValue as string | string[] | null}
|
|
104
105
|
previewSize={getPreviewSizeFrom(size)}
|
|
105
106
|
updateValue={updateValue}
|
|
106
107
|
propertyKey={propertyKey}
|
|
@@ -40,7 +40,7 @@ import { EntityCollectionListView } from "./EntityCollectionListView";
|
|
|
40
40
|
import { SplitListView } from "./SplitListView";
|
|
41
41
|
import { EntityCollectionBoardView } from "./EntityCollectionBoardView";
|
|
42
42
|
import { ViewModeToggle, KanbanPropertyOption } from "./ViewModeToggle";
|
|
43
|
-
import { Button, cls, focusedDisabled, IconButton, Markdown, Popover, Skeleton, Tooltip, Typography, VirtualTableColumn , iconSize } from "@rebasepro/ui";
|
|
43
|
+
import { Button, cls, focusedDisabled, IconButton, Markdown, Popover, Skeleton, TextField, Tooltip, Typography, VirtualTableColumn , iconSize } from "@rebasepro/ui";
|
|
44
44
|
import { ArrowRightToLineIcon, ErrorBoundary, PlusIcon, SearchIcon } from "@rebasepro/ui";
|
|
45
45
|
import { setIn } from "@rebasepro/formex";
|
|
46
46
|
import { getSubcollectionColumnId } from "../EntityCollectionTable/internal/common";
|
|
@@ -1335,15 +1335,17 @@ function EntityIdHeaderWidget({
|
|
|
1335
1335
|
className={"w-96 max-w-full"}>
|
|
1336
1336
|
|
|
1337
1337
|
<div className="flex p-2 w-full gap-2">
|
|
1338
|
-
<
|
|
1338
|
+
<TextField
|
|
1339
1339
|
autoFocus={openPopup}
|
|
1340
1340
|
placeholder={t("find_entity_by_id")}
|
|
1341
|
-
|
|
1341
|
+
size="small"
|
|
1342
1342
|
onChange={(e) => {
|
|
1343
1343
|
setSearchString(e.target.value);
|
|
1344
1344
|
}}
|
|
1345
1345
|
value={searchString}
|
|
1346
|
-
className=
|
|
1346
|
+
className="flex-grow"
|
|
1347
|
+
inputClassName={cls("rounded-lg bg-white dark:bg-surface-900", focusedDisabled)}
|
|
1348
|
+
/>
|
|
1347
1349
|
<Button variant={"text"}
|
|
1348
1350
|
disabled={!(searchString.trim())}
|
|
1349
1351
|
type={"submit"}
|
|
@@ -43,7 +43,7 @@ export function useCollectionInlineEditor<M extends Record<string, unknown>>({
|
|
|
43
43
|
data: entity
|
|
44
44
|
}) => {
|
|
45
45
|
|
|
46
|
-
const updatedValues = setIn({}, propertyKey, value)
|
|
46
|
+
const updatedValues = setIn({}, propertyKey, value) as Partial<Record<string, unknown>>;
|
|
47
47
|
|
|
48
48
|
const saveProps: SaveEntityProps = {
|
|
49
49
|
path: entity.path ?? path,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
2
|
import { setIn } from "@rebasepro/formex";
|
|
3
|
-
import { EntityCollection, SaveEntityProps, RebaseData, RebaseContext } from "@rebasepro/types";
|
|
3
|
+
import { EntityCollection, SaveEntityProps, RebaseData, RebaseContext, AnalyticsController } from "@rebasepro/types";
|
|
4
4
|
import { saveEntityWithCallbacks } from "@rebasepro/core";
|
|
5
5
|
import { BoardItem } from "../board_types";
|
|
6
|
+
import { BoardDataController } from "../useBoardDataController";
|
|
6
7
|
import { generateKeyBetween } from "fractional-indexing";
|
|
7
8
|
|
|
8
9
|
export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
|
|
@@ -12,8 +13,8 @@ export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
|
|
|
12
13
|
orderProperty?: string;
|
|
13
14
|
dataClient: RebaseData;
|
|
14
15
|
context: RebaseContext;
|
|
15
|
-
boardDataController:
|
|
16
|
-
analyticsController:
|
|
16
|
+
boardDataController: BoardDataController<M>;
|
|
17
|
+
analyticsController: AnalyticsController;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export function useKanbanDragAndDrop<M extends Record<string, unknown>>({
|
|
@@ -77,18 +78,18 @@ export function useKanbanDragAndDrop<M extends Record<string, unknown>>({
|
|
|
77
78
|
b = null;
|
|
78
79
|
}
|
|
79
80
|
const newKey = generateKeyBetween(a, b);
|
|
80
|
-
updatedValues = setIn(updatedValues, orderProperty, newKey)
|
|
81
|
+
updatedValues = setIn(updatedValues, orderProperty, newKey) as Record<string, unknown>;
|
|
81
82
|
} catch (e) {
|
|
82
83
|
// Fallback: if keys are somehow invalid, generate from scratch
|
|
83
84
|
console.warn("fractional-indexing error, falling back:", e);
|
|
84
85
|
const newKey = generateKeyBetween(null, null);
|
|
85
|
-
updatedValues = setIn(updatedValues, orderProperty, newKey)
|
|
86
|
+
updatedValues = setIn(updatedValues, orderProperty, newKey) as Record<string, unknown>;
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
// Update column if it changed
|
|
90
91
|
if (isColumnChange) {
|
|
91
|
-
updatedValues = setIn(updatedValues, columnProperty, moveInfo.targetColumn)
|
|
92
|
+
updatedValues = setIn(updatedValues, columnProperty, moveInfo.targetColumn) as Record<string, unknown>;
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
// Apply optimistic UI update to boardDataController's internal state
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
Typography
|
|
26
26
|
} from "@rebasepro/ui";
|
|
27
27
|
import { ErrorBoundary } from "@rebasepro/ui";
|
|
28
|
-
import { ErrorView, createFormexStub, usePermissions, useTranslation } from "@rebasepro/core";
|
|
28
|
+
import { ErrorView, createFormexStub, usePermissions, useTranslation, getIcon } from "@rebasepro/core";
|
|
29
29
|
import {
|
|
30
30
|
getSubcollections,
|
|
31
31
|
removeInitialAndTrailingSlashes,
|
|
@@ -386,33 +386,55 @@ function EntityDetailViewInner<M extends Record<string, unknown>>({
|
|
|
386
386
|
};
|
|
387
387
|
|
|
388
388
|
// Tabs
|
|
389
|
-
const subcollectionTabs = subcollections && subcollections.map((subcollection) =>
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
value={subcollection.slug}
|
|
393
|
-
key={`entity_detail_collection_tab_${subcollection.name}`}>
|
|
394
|
-
{subcollection.name}
|
|
395
|
-
</Tab>
|
|
396
|
-
);
|
|
397
|
-
|
|
398
|
-
const customViewTabsStart = resolvedEntityViews.filter(view => view.position === "start")
|
|
399
|
-
.map((view) =>
|
|
389
|
+
const subcollectionTabs = subcollections && subcollections.map((subcollection) => {
|
|
390
|
+
const icon = getIcon(subcollection.icon, undefined, undefined, "small");
|
|
391
|
+
return (
|
|
400
392
|
<Tab
|
|
401
|
-
className=
|
|
402
|
-
value={
|
|
403
|
-
key={`entity_detail_collection_tab_${
|
|
404
|
-
|
|
393
|
+
className="text-sm min-w-[90px]"
|
|
394
|
+
value={subcollection.slug}
|
|
395
|
+
key={`entity_detail_collection_tab_${subcollection.name}`}>
|
|
396
|
+
<span className="flex items-center gap-1.5">
|
|
397
|
+
{icon}
|
|
398
|
+
{subcollection.name}
|
|
399
|
+
</span>
|
|
405
400
|
</Tab>
|
|
406
401
|
);
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
const customViewTabsStart = resolvedEntityViews.filter(view => view.position === "start")
|
|
405
|
+
.map((view) => {
|
|
406
|
+
const icon = getIcon(view.icon, undefined, undefined, "small");
|
|
407
|
+
return (
|
|
408
|
+
<Tab
|
|
409
|
+
className={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
|
|
410
|
+
value={view.key}
|
|
411
|
+
key={`entity_detail_collection_tab_${view.name}`}>
|
|
412
|
+
{view.tabComponent ?? (
|
|
413
|
+
<span className="flex items-center gap-1.5">
|
|
414
|
+
{icon}
|
|
415
|
+
{view.name}
|
|
416
|
+
</span>
|
|
417
|
+
)}
|
|
418
|
+
</Tab>
|
|
419
|
+
);
|
|
420
|
+
});
|
|
407
421
|
const customViewTabsEnd = resolvedEntityViews.filter(view => !view.position || view.position === "end")
|
|
408
|
-
.map((view) =>
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
422
|
+
.map((view) => {
|
|
423
|
+
const icon = getIcon(view.icon, undefined, undefined, "small");
|
|
424
|
+
return (
|
|
425
|
+
<Tab
|
|
426
|
+
className={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
|
|
427
|
+
value={view.key}
|
|
428
|
+
key={`entity_detail_collection_tab_${view.name}`}>
|
|
429
|
+
{view.tabComponent ?? (
|
|
430
|
+
<span className="flex items-center gap-1.5">
|
|
431
|
+
{icon}
|
|
432
|
+
{view.name}
|
|
433
|
+
</span>
|
|
434
|
+
)}
|
|
435
|
+
</Tab>
|
|
436
|
+
);
|
|
437
|
+
});
|
|
416
438
|
|
|
417
439
|
const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews || layout === "side_panel" || layout === "dialog";
|
|
418
440
|
|
|
@@ -35,7 +35,8 @@ import {
|
|
|
35
35
|
useEntityFetch,
|
|
36
36
|
useRebaseContext,
|
|
37
37
|
useLargeLayout,
|
|
38
|
-
useSlot
|
|
38
|
+
useSlot,
|
|
39
|
+
getIcon
|
|
39
40
|
} from "@rebasepro/core";
|
|
40
41
|
import { getEntityFromMemoryCache } from "@rebasepro/core";
|
|
41
42
|
import { EntityForm } from "../form";
|
|
@@ -84,7 +85,7 @@ export interface EntityEditViewProps<M extends Record<string, unknown> = Record<
|
|
|
84
85
|
onTabChange?: (props: OnTabChangeParams<M>) => void;
|
|
85
86
|
navigateBack?: () => void;
|
|
86
87
|
layout?: "side_panel" | "full_screen" | "split" | "dialog";
|
|
87
|
-
barActions?: (params: BarActionsParams) =>
|
|
88
|
+
barActions?: (params: BarActionsParams) => React.ReactNode;
|
|
88
89
|
formProps?: Partial<EntityFormProps<M>>,
|
|
89
90
|
/**
|
|
90
91
|
* Pre-populate the form with these values when creating a new entity.
|
|
@@ -270,7 +271,7 @@ export function EntityEditViewInner<M extends Record<string, unknown>>({
|
|
|
270
271
|
openEntityMode: layout,
|
|
271
272
|
status: status,
|
|
272
273
|
values: usedEntity?.values ?? ({} as M),
|
|
273
|
-
setFieldValue: (key: string, value:
|
|
274
|
+
setFieldValue: (key: string, value: unknown) => {
|
|
274
275
|
throw new Error("You can't update values in read only mode");
|
|
275
276
|
},
|
|
276
277
|
save: () => {
|
|
@@ -289,7 +290,7 @@ export function EntityEditViewInner<M extends Record<string, unknown>>({
|
|
|
289
290
|
[resolvedEntityViews]
|
|
290
291
|
);
|
|
291
292
|
|
|
292
|
-
const customViewsView:
|
|
293
|
+
const customViewsView: React.ReactNode[] | undefined = customViews && nonActionCustomViews
|
|
293
294
|
.map((customView) => {
|
|
294
295
|
|
|
295
296
|
if (!customView)
|
|
@@ -466,33 +467,55 @@ export function EntityEditViewInner<M extends Record<string, unknown>>({
|
|
|
466
467
|
Builder={resolveComponentRef(selectedSecondaryForm?.Builder as ComponentRef<EntityCustomViewParams<M>> | undefined) as React.ComponentType<EntityCustomViewParams<M>> | undefined}
|
|
467
468
|
/>;
|
|
468
469
|
|
|
469
|
-
const subcollectionTabs = subcollections && subcollections.map((subcollection) =>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
value={subcollection.slug}
|
|
473
|
-
key={`entity_detail_collection_tab_${subcollection.name}`}>
|
|
474
|
-
{subcollection.name}
|
|
475
|
-
</Tab>
|
|
476
|
-
);
|
|
477
|
-
|
|
478
|
-
const customViewTabsStart = resolvedEntityViews.filter(view => view.position === "start")
|
|
479
|
-
.map((view) =>
|
|
470
|
+
const subcollectionTabs = subcollections && subcollections.map((subcollection) => {
|
|
471
|
+
const icon = getIcon(subcollection.icon, undefined, undefined, "small");
|
|
472
|
+
return (
|
|
480
473
|
<Tab
|
|
481
|
-
className=
|
|
482
|
-
value={
|
|
483
|
-
key={`entity_detail_collection_tab_${
|
|
484
|
-
|
|
474
|
+
className="text-sm min-w-[90px]"
|
|
475
|
+
value={subcollection.slug}
|
|
476
|
+
key={`entity_detail_collection_tab_${subcollection.name}`}>
|
|
477
|
+
<span className="flex items-center gap-1.5">
|
|
478
|
+
{icon}
|
|
479
|
+
{subcollection.name}
|
|
480
|
+
</span>
|
|
485
481
|
</Tab>
|
|
486
482
|
);
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
const customViewTabsStart = resolvedEntityViews.filter(view => view.position === "start")
|
|
486
|
+
.map((view) => {
|
|
487
|
+
const icon = getIcon(view.icon, undefined, undefined, "small");
|
|
488
|
+
return (
|
|
489
|
+
<Tab
|
|
490
|
+
className={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
|
|
491
|
+
value={view.key}
|
|
492
|
+
key={`entity_detail_collection_tab_${view.name}`}>
|
|
493
|
+
{view.tabComponent ?? (
|
|
494
|
+
<span className="flex items-center gap-1.5">
|
|
495
|
+
{icon}
|
|
496
|
+
{view.name}
|
|
497
|
+
</span>
|
|
498
|
+
)}
|
|
499
|
+
</Tab>
|
|
500
|
+
);
|
|
501
|
+
});
|
|
487
502
|
const customViewTabsEnd = resolvedEntityViews.filter(view => !view.position || view.position === "end")
|
|
488
|
-
.map((view) =>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
503
|
+
.map((view) => {
|
|
504
|
+
const icon = getIcon(view.icon, undefined, undefined, "small");
|
|
505
|
+
return (
|
|
506
|
+
<Tab
|
|
507
|
+
className={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
|
|
508
|
+
value={view.key}
|
|
509
|
+
key={`entity_detail_collection_tab_${view.name}`}>
|
|
510
|
+
{view.tabComponent ?? (
|
|
511
|
+
<span className="flex items-center gap-1.5">
|
|
512
|
+
{icon}
|
|
513
|
+
{view.name}
|
|
514
|
+
</span>
|
|
515
|
+
)}
|
|
516
|
+
</Tab>
|
|
517
|
+
);
|
|
518
|
+
});
|
|
496
519
|
|
|
497
520
|
const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews || layout === "side_panel" || layout === "dialog";
|
|
498
521
|
|
|
@@ -605,7 +628,7 @@ export function EntityEditViewInner<M extends Record<string, unknown>>({
|
|
|
605
628
|
return result;
|
|
606
629
|
}
|
|
607
630
|
|
|
608
|
-
function EntityFormSkeleton({ collection }: { collection: EntityCollection
|
|
631
|
+
function EntityFormSkeleton({ collection }: { collection: EntityCollection }) {
|
|
609
632
|
return (
|
|
610
633
|
<div className="flex-1 flex flex-row w-full overflow-y-auto justify-center">
|
|
611
634
|
<div className="relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-6xl w-full h-fit">
|
|
@@ -122,11 +122,11 @@ type ActionsViewProps<M extends Record<string, unknown>> = {
|
|
|
122
122
|
disabled: boolean,
|
|
123
123
|
status: "new" | "existing" | "copy",
|
|
124
124
|
sideDialogContext: SideDialogController,
|
|
125
|
-
pluginActions?:
|
|
125
|
+
pluginActions?: React.ReactNode[],
|
|
126
126
|
openEntityMode: "side_panel" | "full_screen" | "split" | "dialog";
|
|
127
127
|
navigateBack: () => void;
|
|
128
128
|
formContext: FormContext,
|
|
129
|
-
formex: FormexController<
|
|
129
|
+
formex: FormexController<Record<string, unknown>>;
|
|
130
130
|
t: (key: string, vars?: Record<string, string>) => string;
|
|
131
131
|
className?: string;
|
|
132
132
|
};
|
|
@@ -174,7 +174,7 @@ function buildBottomActions<M extends Record<string, unknown>>({
|
|
|
174
174
|
openEntityMode,
|
|
175
175
|
navigateBack,
|
|
176
176
|
formContext
|
|
177
|
-
} satisfies EntityActionClickProps<
|
|
177
|
+
} satisfies EntityActionClickProps<Record<string, unknown>>;
|
|
178
178
|
|
|
179
179
|
const isEnabled = !action.isEnabled || action.isEnabled(props);
|
|
180
180
|
return (
|
|
@@ -316,7 +316,7 @@ function EntityActionButton({
|
|
|
316
316
|
}: {
|
|
317
317
|
action: EntityAction,
|
|
318
318
|
enabled: boolean,
|
|
319
|
-
props: EntityActionClickProps<
|
|
319
|
+
props: EntityActionClickProps<Record<string, unknown>>
|
|
320
320
|
}) {
|
|
321
321
|
const snackbarController = useSnackbarController();
|
|
322
322
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -352,10 +352,8 @@ export const EntityPreviewContainer = React.forwardRef<HTMLDivElement, EntityPre
|
|
|
352
352
|
}, ref) => {
|
|
353
353
|
return <div
|
|
354
354
|
ref={ref}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
tabIndex: 0
|
|
358
|
-
} as React.CSSProperties}
|
|
355
|
+
tabIndex={0}
|
|
356
|
+
style={style}
|
|
359
357
|
className={cls(
|
|
360
358
|
"bg-white dark:bg-surface-900",
|
|
361
359
|
size === "small" ? "min-h-[32px]" : "min-h-[44px]",
|
|
@@ -367,12 +365,19 @@ export const EntityPreviewContainer = React.forwardRef<HTMLDivElement, EntityPre
|
|
|
367
365
|
onClick ? "cursor-pointer" : "",
|
|
368
366
|
defaultBorderMixin,
|
|
369
367
|
className)}
|
|
368
|
+
role={onClick ? "button" : undefined}
|
|
370
369
|
onClick={(event) => {
|
|
371
370
|
if (onClick) {
|
|
372
371
|
event.preventDefault();
|
|
373
372
|
onClick(event);
|
|
374
373
|
}
|
|
375
374
|
}}
|
|
375
|
+
onKeyDown={(event) => {
|
|
376
|
+
if (onClick && (event.key === "Enter" || event.key === " ")) {
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
onClick(event);
|
|
379
|
+
}
|
|
380
|
+
}}
|
|
376
381
|
{...props}>
|
|
377
382
|
{children}
|
|
378
383
|
</div>;
|
|
@@ -2,6 +2,7 @@ import type { NavigationEntry } from "@rebasepro/types";
|
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
Active,
|
|
5
|
+
Over,
|
|
5
6
|
closestCenter,
|
|
6
7
|
closestCorners,
|
|
7
8
|
CollisionDetection,
|
|
@@ -347,7 +348,7 @@ export function useHomePageDnd({
|
|
|
347
348
|
const handleDragOver = ({
|
|
348
349
|
active,
|
|
349
350
|
over
|
|
350
|
-
}: { active: Active; over:
|
|
351
|
+
}: { active: Active; over: Over | null }) => {
|
|
351
352
|
if (disabled || !over) return;
|
|
352
353
|
|
|
353
354
|
const activeIdNow = active.id;
|
|
@@ -398,7 +399,7 @@ export function useHomePageDnd({
|
|
|
398
399
|
const handleDragEnd = ({
|
|
399
400
|
active,
|
|
400
401
|
over
|
|
401
|
-
}: { active: Active; over:
|
|
402
|
+
}: { active: Active; over: Over | null }) => {
|
|
402
403
|
if (disabled || !over) {
|
|
403
404
|
resetDragState();
|
|
404
405
|
return;
|
|
@@ -53,7 +53,11 @@ export function RebaseLayout(props: RebaseLayoutProps) {
|
|
|
53
53
|
|
|
54
54
|
const adminModeController = useAdminModeController();
|
|
55
55
|
|
|
56
|
-
const ActiveAppBar = appBar ?? <AppBar
|
|
56
|
+
const ActiveAppBar = appBar ?? <AppBar
|
|
57
|
+
includeLanguageToggle={false}
|
|
58
|
+
includeModeToggle={false}
|
|
59
|
+
includeUserMenu={false}
|
|
60
|
+
/>;
|
|
57
61
|
const ActiveDrawer = drawer ?? (
|
|
58
62
|
<Drawer
|
|
59
63
|
title={title}
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
CustomizationControllerContext
|
|
14
14
|
} from "@rebasepro/core";
|
|
15
15
|
import { CircularProgressCenter } from "@rebasepro/ui";
|
|
16
|
-
import type { AppView, CollectionEditorOptions, EntityCustomView, EntityAction, EntityCollection } from "@rebasepro/types";
|
|
16
|
+
import type { AppView, CollectionEditorOptions, EntityCustomView, EntityAction, EntityCollection, RebasePlugin } from "@rebasepro/types";
|
|
17
17
|
import type { CollectionRegistryController } from "@rebasepro/types";
|
|
18
18
|
import type { UrlController, NavigationStateController } from "@rebasepro/types";
|
|
19
19
|
|
|
20
|
-
const EMPTY_PLUGINS:
|
|
20
|
+
const EMPTY_PLUGINS: RebasePlugin[] = [];
|
|
21
21
|
const EMPTY_COLLECTIONS: EntityCollection[] = [];
|
|
22
22
|
|
|
23
23
|
import { useBuildNavigationStateController } from "../hooks/navigation/useBuildNavigationStateController";
|
|
@@ -10,10 +10,8 @@ import {
|
|
|
10
10
|
} from "@rebasepro/core";
|
|
11
11
|
import { CircularProgressCenter } from "@rebasepro/ui";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const UsersView = lazy(() => import("./admin/UsersView").then(m => ({ default: m.UsersView })));
|
|
16
|
-
const RolesView = lazy(() => import("./admin/RolesView").then(m => ({ default: m.RolesView })));
|
|
13
|
+
import { ContentHomePage } from "./HomePage/ContentHomePage";
|
|
14
|
+
import { RolesView } from "./admin/RolesView";
|
|
17
15
|
import { RebaseRoute } from "../routes/RebaseRoute";
|
|
18
16
|
import { CustomViewRoute } from "../routes/CustomViewRoute";
|
|
19
17
|
import { useNavigationStateController } from "../hooks/navigation/contexts/NavigationStateContext";
|
|
@@ -27,7 +25,7 @@ function SettingsView() {
|
|
|
27
25
|
const breadcrumbs = useBreadcrumbsController();
|
|
28
26
|
useEffect(() => {
|
|
29
27
|
breadcrumbs.set({
|
|
30
|
-
breadcrumbs: [{ title: t("
|
|
28
|
+
breadcrumbs: [{ title: t("account_settings"),
|
|
31
29
|
url: "/settings" }]
|
|
32
30
|
});
|
|
33
31
|
|
|
@@ -87,8 +85,7 @@ export function RebaseRouteDefs({ children, layout }: RebaseRouteDefsProps) {
|
|
|
87
85
|
|
|
88
86
|
<Route path={"/c/*"} element={<RebaseRoute/>}/>
|
|
89
87
|
<Route path={"/settings"} element={<SettingsView/>}/>
|
|
90
|
-
{userManagement && <Route path={"/roles"} element={<
|
|
91
|
-
{userManagement && <Route path={"/users"} element={<Suspense fallback={<CircularProgressCenter/>}><UsersView userManagement={userManagement}/></Suspense>}/>}
|
|
88
|
+
{userManagement && <Route path={"/roles"} element={<RolesView userManagement={userManagement}/>}/>}
|
|
92
89
|
|
|
93
90
|
{/* Hidden debug route */}
|
|
94
91
|
<Route path={"/debug/ui"} element={<UIReferenceView/>}/>
|