@rebasepro/admin 0.2.3 → 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.
Files changed (210) hide show
  1. package/dist/{CollectionEditorDialog-CmGXXSY9.js → CollectionEditorDialog-D0VqpLPO.js} +70 -77
  2. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
  3. package/dist/{CollectionsStudioView-DcLHT5bU.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
  4. package/dist/{CollectionsStudioView-DcLHT5bU.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-BfN34eWX.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
  6. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
  7. package/dist/{ImportCollectionAction-SZrInjhx.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
  8. package/dist/{ImportCollectionAction-SZrInjhx.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
  9. package/dist/{PropertyEditView-Cvryrb3B.js → PropertyEditView-CvRSV-A2.js} +128 -121
  10. package/dist/PropertyEditView-CvRSV-A2.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/SelectableTable/SelectionStore.d.ts +4 -1
  28. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
  29. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
  30. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
  31. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
  32. package/dist/components/admin/RolesView.d.ts +3 -3
  33. package/dist/components/admin/UsersView.d.ts +3 -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/useResolvedCollections.d.ts +6 -0
  51. package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
  52. package/dist/{index-PLIQXpTt.js → index-BCcLwgfe.js} +3 -2
  53. package/dist/{index-PLIQXpTt.js.map → index-BCcLwgfe.js.map} +1 -1
  54. package/dist/{index-DjduZG1T.js → index-DY2k5TtG.js} +3 -3
  55. package/dist/index-DY2k5TtG.js.map +1 -0
  56. package/dist/{index-MKPc70-v.js → index-UQOMHwt1.js} +3 -3
  57. package/dist/index-UQOMHwt1.js.map +1 -0
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +2813 -372
  60. package/dist/index.js.map +1 -1
  61. package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
  62. package/dist/markdown-DD2JDU1X.js.map +1 -0
  63. package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
  64. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  65. package/dist/types/components/EntityFormProps.d.ts +2 -2
  66. package/dist/types/fields.d.ts +1 -1
  67. package/dist/{util-DbWax_sV.js → util-ZM9gQuCv.js} +2031 -2078
  68. package/dist/util-ZM9gQuCv.js.map +1 -0
  69. package/package.json +8 -8
  70. package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
  71. package/src/collection_editor/index.ts +1 -3
  72. package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
  73. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
  74. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
  75. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
  76. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
  77. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
  78. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
  79. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
  80. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
  81. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
  82. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
  83. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
  84. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
  85. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
  86. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
  87. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
  88. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
  89. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
  90. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
  91. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
  92. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
  93. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
  94. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
  95. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
  96. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  97. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
  98. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
  99. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
  100. package/src/components/ArrayContainer.tsx +3 -3
  101. package/src/components/DefaultAppBar.tsx +52 -31
  102. package/src/components/DefaultDrawer.tsx +279 -66
  103. package/src/components/DrawerNavigationItem.tsx +1 -1
  104. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
  105. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
  106. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
  107. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
  108. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
  109. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  110. package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
  111. package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
  112. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
  113. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
  114. package/src/components/EntityDetailView.tsx +46 -24
  115. package/src/components/EntityEditView.tsx +51 -28
  116. package/src/components/EntityEditViewFormActions.tsx +4 -4
  117. package/src/components/EntityPreview.tsx +9 -4
  118. package/src/components/HomePage/HomePageDnD.tsx +3 -2
  119. package/src/components/PropertyCollectionView.tsx +1 -1
  120. package/src/components/PropertyIdCopyTooltip.tsx +1 -1
  121. package/src/components/RebaseLayout.tsx +5 -1
  122. package/src/components/RebaseNavigation.tsx +2 -2
  123. package/src/components/RebaseRouteDefs.tsx +4 -7
  124. package/src/components/RebaseShell.tsx +16 -13
  125. package/src/components/SearchIconsView.tsx +1 -8
  126. package/src/components/SelectableTable/SelectableTable.tsx +8 -11
  127. package/src/components/SelectableTable/SelectionStore.ts +1 -1
  128. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
  129. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
  130. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
  131. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
  132. package/src/components/SideEntityProvider.tsx +2 -1
  133. package/src/components/admin/RolesView.tsx +7 -2
  134. package/src/components/admin/UsersView.tsx +12 -6
  135. package/src/components/app/Drawer.tsx +9 -1
  136. package/src/components/app/Scaffold.tsx +5 -1
  137. package/src/data_export/export/export.ts +17 -17
  138. package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
  139. package/src/editor/components/editor-bubble.tsx +32 -9
  140. package/src/editor/components/image-bubble.tsx +27 -11
  141. package/src/editor/components/index.ts +3 -3
  142. package/src/editor/components/table-bubble.tsx +79 -17
  143. package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
  144. package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
  145. package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
  146. package/src/editor/schema.ts +135 -59
  147. package/src/editor/selectors/link-selector.tsx +8 -5
  148. package/src/editor/useProseMirror.ts +2 -2
  149. package/src/editor/utils/remove_classes.ts +6 -5
  150. package/src/form/EntityForm.tsx +15 -15
  151. package/src/form/EntityFormActions.tsx +2 -2
  152. package/src/form/PropertyFieldBinding.tsx +64 -64
  153. package/src/form/components/FieldHelperText.tsx +4 -4
  154. package/src/form/components/StorageUploadProgress.tsx +2 -2
  155. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  156. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  157. package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
  158. package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
  159. package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
  160. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
  161. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
  162. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
  163. package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
  164. package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
  165. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  166. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  167. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
  168. package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
  169. package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
  170. package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
  171. package/src/form/validation.ts +43 -43
  172. package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -5
  173. package/src/hooks/navigation/useResolvedCollections.ts +27 -7
  174. package/src/hooks/navigation/useResolvedViews.tsx +24 -44
  175. package/src/index.ts +2 -0
  176. package/src/preview/PropertyPreview.tsx +2 -2
  177. package/src/preview/components/ImagePreview.tsx +2 -1
  178. package/src/preview/components/UrlComponentPreview.tsx +11 -2
  179. package/src/preview/components/UserPreview.tsx +1 -1
  180. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  181. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
  182. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
  183. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
  184. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
  185. package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
  186. package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
  187. package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
  188. package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
  189. package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
  190. package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
  191. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  192. package/src/types/components/EntityFormProps.tsx +2 -2
  193. package/src/types/fields.tsx +2 -2
  194. package/dist/CollectionEditorDialog-CmGXXSY9.js.map +0 -1
  195. package/dist/ContentHomePage-C7vFqKSe.js +0 -1784
  196. package/dist/ContentHomePage-C7vFqKSe.js.map +0 -1
  197. package/dist/ExportCollectionAction-BfN34eWX.js.map +0 -1
  198. package/dist/PropertyEditView-Cvryrb3B.js.map +0 -1
  199. package/dist/RoleChip-QtUFXeTp.js +0 -67
  200. package/dist/RoleChip-QtUFXeTp.js.map +0 -1
  201. package/dist/RolesView-BCb7qwWs.js +0 -437
  202. package/dist/RolesView-BCb7qwWs.js.map +0 -1
  203. package/dist/UsersView-Cex24r8H.js +0 -408
  204. package/dist/UsersView-Cex24r8H.js.map +0 -1
  205. package/dist/collection_editor/types/config_permissions.d.ts +0 -19
  206. package/dist/index-DjduZG1T.js.map +0 -1
  207. package/dist/index-MKPc70-v.js.map +0 -1
  208. package/dist/markdown-z2Ir7Cgo.js.map +0 -1
  209. package/dist/util-DbWax_sV.js.map +0 -1
  210. package/src/collection_editor/types/config_permissions.ts +0 -20
@@ -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}
@@ -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
- <input
1338
+ <TextField
1339
1339
  autoFocus={openPopup}
1340
1340
  placeholder={t("find_entity_by_id")}
1341
- // size={"small"}
1341
+ size="small"
1342
1342
  onChange={(e) => {
1343
1343
  setSearchString(e.target.value);
1344
1344
  }}
1345
1345
  value={searchString}
1346
- className={"rounded-lg bg-white dark:bg-surface-900 flex-grow outline-none p-2 " + focusedDisabled}/>
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: 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";
@@ -10,10 +10,8 @@ import {
10
10
  } from "@rebasepro/core";
11
11
  import { CircularProgressCenter } from "@rebasepro/ui";
12
12
 
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 })));
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("project_settings"),
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={<Suspense fallback={<CircularProgressCenter/>}><RolesView userManagement={userManagement}/></Suspense>}/>}
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/>}/>
@@ -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('');
@@ -243,11 +243,11 @@ export const SelectableTable = function SelectableTable<M extends Record<string,
243
243
  ref={ref}>
244
244
 
245
245
  <VirtualTable
246
- data={data}
246
+ data={data as any}
247
247
  columns={columns}
248
248
  // @ts-ignore
249
249
  cellRenderer={cellRenderer}
250
- onRowClick={inlineEditing ? undefined : (onEntityClick ? onRowClick : undefined)}
250
+ onRowClick={inlineEditing ? undefined : (onEntityClick ? (onRowClick as any) : undefined)}
251
251
  onEndReached={loadNextPage}
252
252
  onResetPagination={resetPagination}
253
253
  error={dataLoadingError}
@@ -262,8 +262,8 @@ export const SelectableTable = function SelectableTable<M extends Record<string,
262
262
  initialScroll={initialScroll}
263
263
  onScroll={onScroll}
264
264
  checkFilterCombination={checkFilterCombination}
265
- createFilterField={filterable ? createFilterField : undefined}
266
- rowClassName={useCallback((entity: Entity<M>) => {
265
+ createFilterField={filterable ? (createFilterField as any) : undefined}
266
+ rowClassName={useCallback((entity: any) => {
267
267
  return highlightedRow?.(entity) ? "bg-surface-accent-50 dark:!bg-surface-accent-900" : "";
268
268
  }, [highlightedRow])}
269
269
  className="grow"
@@ -287,16 +287,13 @@ function createFilterField({
287
287
  column,
288
288
  hidden,
289
289
  setHidden
290
- }: FilterFormFieldProps<{
291
- resolvedProperty: Property,
292
- disabled: boolean,
293
- }>): React.ReactNode {
290
+ }: FilterFormFieldProps<any>): React.ReactNode {
294
291
 
295
292
  if (!column.custom) {
296
293
  return null;
297
294
  }
298
295
 
299
- const { resolvedProperty } = column.custom;
296
+ const { resolvedProperty } = column.custom as { resolvedProperty?: Property };
300
297
 
301
298
  const isArray = resolvedProperty?.type === "array";
302
299
  const ofVal = isArray && resolvedProperty ? resolvedProperty.of : undefined;
@@ -316,7 +313,7 @@ function createFilterField({
316
313
  hidden={hidden}
317
314
  setHidden={setHidden}/>;
318
315
  } else if (baseProperty.type === "relation" && baseProperty.relation) {
319
- return <RelationFilterField value={filterValue}
316
+ return <RelationFilterField value={filterValue as any}
320
317
  setValue={setFilterValue}
321
318
  name={id as string}
322
319
  relation={baseProperty.relation}
@@ -350,7 +347,7 @@ function createFilterField({
350
347
  }
351
348
 
352
349
  return (
353
- <div>{`Currently the filter field ${resolvedProperty.type} is not supported`}</div>
350
+ <div>{`Currently the filter field ${resolvedProperty?.type} is not supported`}</div>
354
351
  );
355
352
  }
356
353
 
@@ -43,7 +43,7 @@ export type SelectionStore = ReturnType<typeof createSelectionStore>;
43
43
  * `selected` boolean actually changes (not on every store update).
44
44
  */
45
45
  export function useCellSelected(
46
- store: SelectionStore,
46
+ store: { getSnapshot: () => SelectedCellProps<any> | undefined; subscribe: (listener: () => void) => () => void },
47
47
  propertyKey: string,
48
48
  entityPath: string,
49
49
  entityId: string | number