@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.
Files changed (214) hide show
  1. package/dist/{CollectionEditorDialog-BXIh2AXg.js → CollectionEditorDialog-D0VqpLPO.js} +73 -256
  2. package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
  3. package/dist/{CollectionsStudioView-jR8iz_ja.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
  4. package/dist/{CollectionsStudioView-jR8iz_ja.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
  5. package/dist/{ExportCollectionAction-CMdiiv1L.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
  6. package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
  7. package/dist/{ImportCollectionAction-C05lE0IW.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
  8. package/dist/{ImportCollectionAction-C05lE0IW.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
  9. package/dist/{PropertyEditView-BB5xjnhZ.js → PropertyEditView-CvRSV-A2.js} +430 -445
  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/collection_editor/properties/RelationPropertyField.d.ts +1 -7
  16. package/dist/collection_editor_ui.js +3 -3
  17. package/dist/components/ArrayContainer.d.ts +2 -2
  18. package/dist/components/DefaultAppBar.d.ts +18 -1
  19. package/dist/components/DefaultDrawer.d.ts +51 -3
  20. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  21. package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
  22. package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
  23. package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
  24. package/dist/components/EntityEditView.d.ts +2 -1
  25. package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
  26. package/dist/components/PropertyCollectionView.d.ts +1 -1
  27. package/dist/components/PropertyIdCopyTooltip.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/RolesView.d.ts +3 -3
  34. package/dist/components/admin/UsersView.d.ts +3 -3
  35. package/dist/components/app/Drawer.d.ts +8 -1
  36. package/dist/data_export/export/export.d.ts +3 -3
  37. package/dist/editor/components/editor-bubble.d.ts +5 -1
  38. package/dist/editor/components/image-bubble.d.ts +5 -1
  39. package/dist/editor/components/index.d.ts +3 -3
  40. package/dist/editor/components/table-bubble.d.ts +5 -1
  41. package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
  42. package/dist/editor/useProseMirror.d.ts +2 -2
  43. package/dist/editor/utils/remove_classes.d.ts +1 -1
  44. package/dist/editor.js +15 -14
  45. package/dist/editor.js.map +1 -1
  46. package/dist/form/EntityForm.d.ts +2 -2
  47. package/dist/form/components/StorageUploadProgress.d.ts +2 -2
  48. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
  49. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  50. package/dist/form/validation.d.ts +3 -3
  51. package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
  52. package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
  53. package/dist/{index-BAM9KCmM.js → index-BCcLwgfe.js} +3 -2
  54. package/dist/{index-BAM9KCmM.js.map → index-BCcLwgfe.js.map} +1 -1
  55. package/dist/{index-D5OQhv-T.js → index-DY2k5TtG.js} +3 -3
  56. package/dist/index-DY2k5TtG.js.map +1 -0
  57. package/dist/{index-CoSNm3e3.js → index-UQOMHwt1.js} +3 -3
  58. package/dist/index-UQOMHwt1.js.map +1 -0
  59. package/dist/index.d.ts +1 -1
  60. package/dist/index.js +2813 -372
  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-DtbWD7LF.js → util-ZM9gQuCv.js} +2104 -2071
  69. package/dist/util-ZM9gQuCv.js.map +1 -0
  70. package/package.json +10 -9
  71. package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
  72. package/src/collection_editor/index.ts +1 -3
  73. package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
  74. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
  75. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
  76. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
  77. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
  78. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
  79. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
  80. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +1 -10
  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/RelationPropertyField.tsx +37 -57
  94. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
  95. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
  96. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
  97. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
  98. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
  99. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  100. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
  101. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
  102. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
  103. package/src/collection_editor/validateCollectionJson.ts +88 -1
  104. package/src/components/ArrayContainer.tsx +3 -3
  105. package/src/components/DefaultAppBar.tsx +52 -31
  106. package/src/components/DefaultDrawer.tsx +279 -66
  107. package/src/components/DrawerNavigationItem.tsx +1 -1
  108. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
  109. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
  110. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
  111. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
  112. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
  113. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  114. package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
  115. package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
  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 +4 -7
  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/RolesView.tsx +7 -2
  138. package/src/components/admin/UsersView.tsx +12 -6
  139. package/src/components/app/Drawer.tsx +9 -1
  140. package/src/components/app/Scaffold.tsx +5 -1
  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 +3 -5
  177. package/src/hooks/navigation/useResolvedCollections.ts +27 -7
  178. package/src/hooks/navigation/useResolvedViews.tsx +24 -44
  179. package/src/index.ts +2 -0
  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/dist/CollectionEditorDialog-BXIh2AXg.js.map +0 -1
  199. package/dist/ContentHomePage-BQZWuOFb.js +0 -1784
  200. package/dist/ContentHomePage-BQZWuOFb.js.map +0 -1
  201. package/dist/ExportCollectionAction-CMdiiv1L.js.map +0 -1
  202. package/dist/PropertyEditView-BB5xjnhZ.js.map +0 -1
  203. package/dist/RoleChip-QtUFXeTp.js +0 -67
  204. package/dist/RoleChip-QtUFXeTp.js.map +0 -1
  205. package/dist/RolesView-CULIHWZ9.js +0 -437
  206. package/dist/RolesView-CULIHWZ9.js.map +0 -1
  207. package/dist/UsersView-D7_AtJ44.js +0 -408
  208. package/dist/UsersView-D7_AtJ44.js.map +0 -1
  209. package/dist/collection_editor/types/config_permissions.d.ts +0 -19
  210. package/dist/index-CoSNm3e3.js.map +0 -1
  211. package/dist/index-D5OQhv-T.js.map +0 -1
  212. package/dist/markdown-z2Ir7Cgo.js.map +0 -1
  213. package/dist/util-DtbWD7LF.js.map +0 -1
  214. 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<any>;
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<any>;
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?: any) => Promise<void>;
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: any | undefined = storage?.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<any>;
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 ref = React.useRef<HTMLInputElement>(null);
53
+ const inputRef = React.useRef<HTMLInputElement>(null);
54
54
 
55
55
  useEffect(() => {
56
- if (ref.current && focused) {
57
- ref.current.focus({ preventScroll: true });
56
+ if (inputRef.current && focused) {
57
+ inputRef.current.focus({ preventScroll: true });
58
58
  }
59
- }, [focused, ref]);
59
+ }, [focused, inputRef]);
60
60
 
61
61
  const regexp = /^-?[0-9]+[,.]?[0-9]*$/;
62
62
 
63
63
  return (
64
- <input
65
- ref={ref}
66
- className={cls("w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-hidden font-normal leading-normal text-unset", focusedDisabled)}
67
- style={{
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?: any;
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, any>;
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 = 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/>}/>