@rebasepro/admin 0.2.3 → 0.2.5

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.
Files changed (225) hide show
  1. package/dist/{CollectionEditorDialog-CmGXXSY9.js → CollectionEditorDialog-Cn8-tGyL.js} +89 -79
  2. package/dist/CollectionEditorDialog-Cn8-tGyL.js.map +1 -0
  3. package/dist/{CollectionsStudioView-DcLHT5bU.js → CollectionsStudioView-C-Ts1rZt.js} +5 -4
  4. package/dist/{CollectionsStudioView-DcLHT5bU.js.map → CollectionsStudioView-C-Ts1rZt.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-BfN34eWX.js → ExportCollectionAction-BRdKM3DF.js} +4 -3
  6. package/dist/ExportCollectionAction-BRdKM3DF.js.map +1 -0
  7. package/dist/{ImportCollectionAction-SZrInjhx.js → ImportCollectionAction-U-v7lGxO.js} +3 -2
  8. package/dist/{ImportCollectionAction-SZrInjhx.js.map → ImportCollectionAction-U-v7lGxO.js.map} +1 -1
  9. package/dist/{PropertyEditView-Cvryrb3B.js → PropertyEditView-BDNYkfNf.js} +128 -121
  10. package/dist/PropertyEditView-BDNYkfNf.js.map +1 -0
  11. package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -5
  12. package/dist/collection_editor/index.d.ts +0 -1
  13. package/dist/collection_editor/types/collection_editor_controller.d.ts +0 -2
  14. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -3
  15. package/dist/collection_editor_ui.js +3 -3
  16. package/dist/components/ArrayContainer.d.ts +2 -2
  17. package/dist/components/DefaultAppBar.d.ts +18 -1
  18. package/dist/components/DefaultDrawer.d.ts +51 -3
  19. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  20. package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
  21. package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
  22. package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
  23. package/dist/components/EntityEditView.d.ts +2 -1
  24. package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
  25. package/dist/components/PropertyCollectionView.d.ts +1 -1
  26. package/dist/components/PropertyIdCopyTooltip.d.ts +1 -1
  27. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  28. package/dist/components/SelectableTable/SelectionStore.d.ts +4 -1
  29. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
  30. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
  31. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
  32. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
  33. package/dist/components/admin/index.d.ts +1 -3
  34. package/dist/components/app/Drawer.d.ts +8 -1
  35. package/dist/data_export/export/export.d.ts +3 -3
  36. package/dist/editor/components/editor-bubble.d.ts +5 -1
  37. package/dist/editor/components/image-bubble.d.ts +5 -1
  38. package/dist/editor/components/index.d.ts +3 -3
  39. package/dist/editor/components/table-bubble.d.ts +5 -1
  40. package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
  41. package/dist/editor/useProseMirror.d.ts +2 -2
  42. package/dist/editor/utils/remove_classes.d.ts +1 -1
  43. package/dist/editor.js +15 -14
  44. package/dist/editor.js.map +1 -1
  45. package/dist/form/EntityForm.d.ts +2 -2
  46. package/dist/form/components/StorageUploadProgress.d.ts +2 -2
  47. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
  48. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  49. package/dist/form/validation.d.ts +3 -3
  50. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +1 -1
  51. package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
  52. package/dist/hooks/navigation/useResolvedViews.d.ts +3 -7
  53. package/dist/{index-DjduZG1T.js → index-DHaOV-7A.js} +3 -3
  54. package/dist/index-DHaOV-7A.js.map +1 -0
  55. package/dist/{index-MKPc70-v.js → index-DJSL_SCr.js} +3 -3
  56. package/dist/index-DJSL_SCr.js.map +1 -0
  57. package/dist/{index-PLIQXpTt.js → index-XMII4H3d.js} +3 -2
  58. package/dist/{index-PLIQXpTt.js.map → index-XMII4H3d.js.map} +1 -1
  59. package/dist/index.d.ts +1 -3
  60. package/dist/index.js +2688 -452
  61. package/dist/index.js.map +1 -1
  62. package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
  63. package/dist/markdown-DD2JDU1X.js.map +1 -0
  64. package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
  65. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  66. package/dist/types/components/EntityFormProps.d.ts +2 -2
  67. package/dist/types/fields.d.ts +1 -1
  68. package/dist/{util-DbWax_sV.js → util-0GYaJqL_.js} +1505 -2043
  69. package/dist/util-0GYaJqL_.js.map +1 -0
  70. package/package.json +8 -8
  71. package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
  72. package/src/collection_editor/index.ts +1 -3
  73. package/src/collection_editor/pgColumnToProperty.ts +19 -2
  74. package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
  75. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
  76. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
  77. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
  78. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
  79. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
  80. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
  81. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
  82. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
  83. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
  84. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
  85. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
  86. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
  87. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
  88. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
  89. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
  90. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
  91. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
  92. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
  93. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
  94. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
  95. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
  96. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
  97. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
  98. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  99. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
  100. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
  101. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
  102. package/src/components/ArrayContainer.tsx +3 -3
  103. package/src/components/DefaultAppBar.tsx +52 -31
  104. package/src/components/DefaultDrawer.tsx +280 -67
  105. package/src/components/DrawerNavigationItem.tsx +1 -1
  106. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
  107. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
  108. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
  109. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
  110. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
  111. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  112. package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
  113. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +4 -4
  114. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +7 -0
  115. package/src/components/EntityCollectionView/EntityCollectionView.tsx +10 -5
  116. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
  117. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
  118. package/src/components/EntityDetailView.tsx +46 -24
  119. package/src/components/EntityEditView.tsx +51 -28
  120. package/src/components/EntityEditViewFormActions.tsx +4 -4
  121. package/src/components/EntityPreview.tsx +9 -4
  122. package/src/components/HomePage/HomePageDnD.tsx +3 -2
  123. package/src/components/PropertyCollectionView.tsx +1 -1
  124. package/src/components/PropertyIdCopyTooltip.tsx +1 -1
  125. package/src/components/RebaseLayout.tsx +5 -1
  126. package/src/components/RebaseNavigation.tsx +2 -2
  127. package/src/components/RebaseRouteDefs.tsx +6 -11
  128. package/src/components/RebaseShell.tsx +16 -13
  129. package/src/components/SearchIconsView.tsx +1 -8
  130. package/src/components/SelectableTable/SelectableTable.tsx +8 -11
  131. package/src/components/SelectableTable/SelectionStore.ts +1 -1
  132. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
  133. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
  134. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
  135. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
  136. package/src/components/SideEntityProvider.tsx +2 -1
  137. package/src/components/admin/index.ts +1 -3
  138. package/src/components/app/Drawer.tsx +9 -1
  139. package/src/components/app/Scaffold.tsx +5 -1
  140. package/src/components/index.ts +1 -3
  141. package/src/data_export/export/export.ts +17 -17
  142. package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
  143. package/src/editor/components/editor-bubble.tsx +32 -9
  144. package/src/editor/components/image-bubble.tsx +27 -11
  145. package/src/editor/components/index.ts +3 -3
  146. package/src/editor/components/table-bubble.tsx +79 -17
  147. package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
  148. package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
  149. package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
  150. package/src/editor/schema.ts +135 -59
  151. package/src/editor/selectors/link-selector.tsx +8 -5
  152. package/src/editor/useProseMirror.ts +2 -2
  153. package/src/editor/utils/remove_classes.ts +6 -5
  154. package/src/form/EntityForm.tsx +15 -15
  155. package/src/form/EntityFormActions.tsx +2 -2
  156. package/src/form/PropertyFieldBinding.tsx +64 -64
  157. package/src/form/components/FieldHelperText.tsx +4 -4
  158. package/src/form/components/StorageUploadProgress.tsx +2 -2
  159. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  160. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  161. package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
  162. package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
  163. package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
  164. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
  165. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
  166. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
  167. package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
  168. package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
  169. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  170. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  171. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
  172. package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
  173. package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
  174. package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
  175. package/src/form/validation.ts +43 -43
  176. package/src/hooks/navigation/useBuildNavigationStateController.tsx +4 -7
  177. package/src/hooks/navigation/useResolvedCollections.ts +27 -7
  178. package/src/hooks/navigation/useResolvedViews.tsx +8 -70
  179. package/src/index.ts +4 -3
  180. package/src/preview/PropertyPreview.tsx +2 -2
  181. package/src/preview/components/ImagePreview.tsx +2 -1
  182. package/src/preview/components/UrlComponentPreview.tsx +11 -2
  183. package/src/preview/components/UserPreview.tsx +1 -1
  184. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  185. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
  186. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
  187. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
  188. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
  189. package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
  190. package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
  191. package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
  192. package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
  193. package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
  194. package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
  195. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  196. package/src/types/components/EntityFormProps.tsx +2 -2
  197. package/src/types/fields.tsx +2 -2
  198. package/src/util/previews.ts +9 -1
  199. package/dist/CollectionEditorDialog-CmGXXSY9.js.map +0 -1
  200. package/dist/ContentHomePage-C7vFqKSe.js +0 -1784
  201. package/dist/ContentHomePage-C7vFqKSe.js.map +0 -1
  202. package/dist/ExportCollectionAction-BfN34eWX.js.map +0 -1
  203. package/dist/PropertyEditView-Cvryrb3B.js.map +0 -1
  204. package/dist/RoleChip-QtUFXeTp.js +0 -67
  205. package/dist/RoleChip-QtUFXeTp.js.map +0 -1
  206. package/dist/RolesView-BCb7qwWs.js +0 -437
  207. package/dist/RolesView-BCb7qwWs.js.map +0 -1
  208. package/dist/UsersView-Cex24r8H.js +0 -408
  209. package/dist/UsersView-Cex24r8H.js.map +0 -1
  210. package/dist/collection_editor/types/config_permissions.d.ts +0 -19
  211. package/dist/components/admin/RoleChip.d.ts +0 -4
  212. package/dist/components/admin/RolesFilterSelect.d.ts +0 -2
  213. package/dist/components/admin/RolesView.d.ts +0 -4
  214. package/dist/components/admin/UserRolesSelectField.d.ts +0 -2
  215. package/dist/components/admin/UsersView.d.ts +0 -4
  216. package/dist/index-DjduZG1T.js.map +0 -1
  217. package/dist/index-MKPc70-v.js.map +0 -1
  218. package/dist/markdown-z2Ir7Cgo.js.map +0 -1
  219. package/dist/util-DbWax_sV.js.map +0 -1
  220. package/src/collection_editor/types/config_permissions.ts +0 -20
  221. package/src/components/admin/RoleChip.tsx +0 -23
  222. package/src/components/admin/RolesFilterSelect.tsx +0 -45
  223. package/src/components/admin/RolesView.tsx +0 -465
  224. package/src/components/admin/UserRolesSelectField.tsx +0 -50
  225. package/src/components/admin/UsersView.tsx +0 -687
@@ -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 = any> {
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: any;
27
+ size: TableSize;
27
28
  align: "left" | "center" | "right";
28
- entity: Entity<any>;
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}
@@ -109,6 +109,8 @@ export function EntityCollectionCardView<M extends Record<string, unknown> = Rec
109
109
 
110
110
  // Infinite scroll with Intersection Observer — stable deps only
111
111
  useEffect(() => {
112
+ if (!loadMoreRef.current) return;
113
+
112
114
  const observer = new IntersectionObserver(
113
115
  (entries) => {
114
116
  const { paginationEnabled: pe, noMoreToLoad: nm, dataLoading: dl, itemCount: ic, pageSize: ps } = paginationStateRef.current;
@@ -124,12 +126,10 @@ export function EntityCollectionCardView<M extends Record<string, unknown> = Rec
124
126
  }
125
127
  );
126
128
 
127
- if (loadMoreRef.current) {
128
- observer.observe(loadMoreRef.current);
129
- }
129
+ observer.observe(loadMoreRef.current);
130
130
 
131
131
  return () => observer.disconnect();
132
- }, [setItemCount]);
132
+ }, [setItemCount, data.length]);
133
133
 
134
134
  // Scroll restoration — deferred to after layout paint
135
135
  useEffect(() => {
@@ -139,6 +139,13 @@ function getScrollParent(element: HTMLElement | null): HTMLElement | null {
139
139
  * PropertyPreview in list row columns (because it would blow up height).
140
140
  */
141
141
  function isComplexPropertyType(property: Property): boolean {
142
+ if (property.type === "array") {
143
+ const ofProp = "of" in property ? property.of : undefined;
144
+ const innerProp = ofProp ? (Array.isArray(ofProp) ? ofProp[0] : ofProp) : undefined;
145
+ if (innerProp && typeof innerProp === "object" && "enum" in innerProp && innerProp.enum) {
146
+ return false;
147
+ }
148
+ }
142
149
  return property.type === "array"
143
150
  || property.type === "map"
144
151
  || property.type === "reference"
@@ -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";
@@ -1092,7 +1092,10 @@ export const EntityCollectionView = React.memo(
1092
1092
  ) : (
1093
1093
  <div className="flex flex-col w-full h-full">
1094
1094
  {toolbarNode}
1095
- <div className="flex-1 flex flex-col overflow-y-auto">
1095
+ <div className={cls(
1096
+ "flex-1 flex flex-col",
1097
+ viewMode === "list" && "overflow-y-auto"
1098
+ )}>
1096
1099
  {viewMode === "list" ? (
1097
1100
  <div
1098
1101
  className={cls(
@@ -1335,15 +1338,17 @@ function EntityIdHeaderWidget({
1335
1338
  className={"w-96 max-w-full"}>
1336
1339
 
1337
1340
  <div className="flex p-2 w-full gap-2">
1338
- <input
1341
+ <TextField
1339
1342
  autoFocus={openPopup}
1340
1343
  placeholder={t("find_entity_by_id")}
1341
- // size={"small"}
1344
+ size="small"
1342
1345
  onChange={(e) => {
1343
1346
  setSearchString(e.target.value);
1344
1347
  }}
1345
1348
  value={searchString}
1346
- className={"rounded-lg bg-white dark:bg-surface-900 flex-grow outline-none p-2 " + focusedDisabled}/>
1349
+ className="flex-grow"
1350
+ inputClassName={cls("rounded-lg bg-white dark:bg-surface-900", focusedDisabled)}
1351
+ />
1347
1352
  <Button variant={"text"}
1348
1353
  disabled={!(searchString.trim())}
1349
1354
  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: any;
16
- analyticsController: any;
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
- <Tab
391
- className="text-sm min-w-[90px]"
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={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
402
- value={view.key}
403
- key={`entity_detail_collection_tab_${view.name}`}>
404
- {view.tabComponent ?? view.name}
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
- <Tab
410
- className={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
411
- value={view.key}
412
- key={`entity_detail_collection_tab_${view.name}`}>
413
- {view.tabComponent ?? view.name}
414
- </Tab>
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) => any;
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: any) => {
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: any[] | undefined = customViews && nonActionCustomViews
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
- <Tab
471
- className="text-sm min-w-[90px]"
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={!view.tabComponent ? "text-sm min-w-[90px]" : undefined}
482
- value={view.key}
483
- key={`entity_detail_collection_tab_${view.name}`}>
484
- {view.tabComponent ?? view.name}
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
- <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 ?? view.name}
494
- </Tab>
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<any> }) {
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?: any[],
125
+ pluginActions?: React.ReactNode[],
126
126
  openEntityMode: "side_panel" | "full_screen" | "split" | "dialog";
127
127
  navigateBack: () => void;
128
128
  formContext: FormContext,
129
- formex: FormexController<any>;
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<any>;
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<any, any>
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
- style={{
356
- ...style,
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: any }) => {
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: any }) => {
402
+ }: { active: Active; over: Over | null }) => {
402
403
  if (disabled || !over) {
403
404
  resetDragState();
404
405
  return;
@@ -101,7 +101,7 @@ export const PropertyCollectionView = ({
101
101
  suppressHeader = false,
102
102
  size = "small"
103
103
  }: {
104
- data: any;
104
+ data: unknown;
105
105
  properties: Properties;
106
106
  baseKey?: string;
107
107
  suppressHeader?: boolean;
@@ -8,7 +8,7 @@ export function PropertyIdCopyTooltip({
8
8
  }: {
9
9
  propertyKey: string,
10
10
  className?: string,
11
- children: any
11
+ children: React.ReactNode
12
12
  }) {
13
13
  return <Tooltip title={<PropertyIdCopyTooltipContent propertyKey={propertyKey}/>}
14
14
  delayDuration={800}
@@ -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: unknown[] = [];
20
+ const EMPTY_PLUGINS: RebasePlugin[] = [];
21
21
  const EMPTY_COLLECTIONS: EntityCollection[] = [];
22
22
 
23
23
  import { useBuildNavigationStateController } from "../hooks/navigation/useBuildNavigationStateController";
@@ -5,15 +5,12 @@ import {
5
5
  RebaseRoutes,
6
6
  UserSettingsView,
7
7
  UIReferenceView,
8
- NotFoundPage,
9
- useInternalUserManagementController
8
+ NotFoundPage
10
9
  } from "@rebasepro/core";
11
10
  import { CircularProgressCenter } from "@rebasepro/ui";
12
11
 
13
- // Lazy-load admin views rarely visited, no need in initial bundle
14
- const ContentHomePage = lazy(() => import("./HomePage/ContentHomePage").then(m => ({ default: m.ContentHomePage })));
15
- const UsersView = lazy(() => import("./admin/UsersView").then(m => ({ default: m.UsersView })));
16
- const RolesView = lazy(() => import("./admin/RolesView").then(m => ({ default: m.RolesView })));
12
+ import { ContentHomePage } from "./HomePage/ContentHomePage";
13
+
17
14
  import { RebaseRoute } from "../routes/RebaseRoute";
18
15
  import { CustomViewRoute } from "../routes/CustomViewRoute";
19
16
  import { useNavigationStateController } from "../hooks/navigation/contexts/NavigationStateContext";
@@ -27,7 +24,7 @@ function SettingsView() {
27
24
  const breadcrumbs = useBreadcrumbsController();
28
25
  useEffect(() => {
29
26
  breadcrumbs.set({
30
- breadcrumbs: [{ title: t("project_settings"),
27
+ breadcrumbs: [{ title: t("account_settings"),
31
28
  url: "/settings" }]
32
29
  });
33
30
 
@@ -50,7 +47,7 @@ export interface RebaseRouteDefsProps {
50
47
  * Route definitions for the CMS.
51
48
  *
52
49
  * Defines all standard routes: home, studio home, collection view,
53
- * settings, users, roles, debug, custom views, and a catch-all 404.
50
+ * settings, debug, custom views, and a catch-all 404.
54
51
  *
55
52
  * **Independently usable**: Use this when you want Rebase routes
56
53
  * inside your own layout/navigation setup.
@@ -66,7 +63,6 @@ export interface RebaseRouteDefsProps {
66
63
  */
67
64
  export function RebaseRouteDefs({ children, layout }: RebaseRouteDefsProps) {
68
65
  const registry = useRebaseRegistry();
69
- const userManagement = useInternalUserManagementController();
70
66
  const navigationStateController = useNavigationStateController();
71
67
 
72
68
  const cmsHomePage = registry.cmsConfig?.homePage ?? <Suspense fallback={<CircularProgressCenter/>}><ContentHomePage/></Suspense>;
@@ -87,8 +83,7 @@ export function RebaseRouteDefs({ children, layout }: RebaseRouteDefsProps) {
87
83
 
88
84
  <Route path={"/c/*"} element={<RebaseRoute/>}/>
89
85
  <Route path={"/settings"} element={<SettingsView/>}/>
90
- {userManagement && <Route path={"/roles"} element={<Suspense fallback={<CircularProgressCenter/>}><RolesView userManagement={userManagement}/></Suspense>}/>}
91
- {userManagement && <Route path={"/users"} element={<Suspense fallback={<CircularProgressCenter/>}><UsersView userManagement={userManagement}/></Suspense>}/>}
86
+
92
87
 
93
88
  {/* Hidden debug route */}
94
89
  <Route path={"/debug/ui"} element={<UIReferenceView/>}/>
@@ -2,6 +2,7 @@ import React, { useMemo } from "react";
2
2
  import {
3
3
  useRebaseRegistry
4
4
  } from "@rebasepro/core";
5
+ import { ErrorBoundary } from "@rebasepro/ui";
5
6
 
6
7
  import { RebaseAuthGate } from "./RebaseAuthGate";
7
8
  import { RebaseNavigation } from "./RebaseNavigation";
@@ -51,19 +52,21 @@ export function RebaseShell(props: RebaseShellProps) {
51
52
  return (
52
53
  <RebaseAuthGate>
53
54
  <RebaseNavigation>
54
- <RebaseRouteDefs
55
- layout={
56
- <RebaseLayout
57
- title={title}
58
- appBar={appBar}
59
- drawer={drawer}
60
- autoOpenDrawer={autoOpenDrawer}
61
- devViews={devViews}
62
- />
63
- }
64
- >
65
- {children}
66
- </RebaseRouteDefs>
55
+ <ErrorBoundary fullPage>
56
+ <RebaseRouteDefs
57
+ layout={
58
+ <RebaseLayout
59
+ title={title}
60
+ appBar={appBar}
61
+ drawer={drawer}
62
+ autoOpenDrawer={autoOpenDrawer}
63
+ devViews={devViews}
64
+ />
65
+ }
66
+ >
67
+ {children}
68
+ </RebaseRouteDefs>
69
+ </ErrorBoundary>
67
70
  </RebaseNavigation>
68
71
  </RebaseAuthGate>
69
72
  );
@@ -10,18 +10,11 @@ import {
10
10
  SearchBar,
11
11
  Tooltip
12
12
  } from "@rebasepro/ui";
13
- import { iconsSearch, iconSynonyms } from "@rebasepro/core";
13
+ import { iconsSearch } from "@rebasepro/core";
14
14
  import { useTranslation } from "@rebasepro/core";
15
15
 
16
16
  const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
17
17
 
18
- if (iconSynonyms && process.env.NODE_ENV !== "production") {
19
- Object.keys(iconSynonyms).forEach((icon: string) => {
20
- if (!iconKeys.includes(icon)) {
21
- console.warn(`The icon ${icon} no longer exists. Remove it from \`iconSynonyms\``);
22
- }
23
- });
24
- }
25
18
 
26
19
  function toPascalCase(str: string): string {
27
20
  return str.split(/[-_]/).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');