@rebasepro/admin 0.1.2 → 0.2.1

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 (241) hide show
  1. package/LICENSE +21 -6
  2. package/dist/{CollectionEditorDialog-ywdxhs1L.js → CollectionEditorDialog-BXIh2AXg.js} +40 -31
  3. package/dist/CollectionEditorDialog-BXIh2AXg.js.map +1 -0
  4. package/dist/{CollectionsStudioView-BDzMFzqH.js → CollectionsStudioView-jR8iz_ja.js} +6 -8
  5. package/dist/CollectionsStudioView-jR8iz_ja.js.map +1 -0
  6. package/dist/{ContentHomePage-0tHuEIm_.js → ContentHomePage-BQZWuOFb.js} +5 -7
  7. package/dist/ContentHomePage-BQZWuOFb.js.map +1 -0
  8. package/dist/{ExportCollectionAction-BIrq92To.js → ExportCollectionAction-CMdiiv1L.js} +36 -38
  9. package/dist/ExportCollectionAction-CMdiiv1L.js.map +1 -0
  10. package/dist/{ImportCollectionAction-h8yg_To8.js → ImportCollectionAction-C05lE0IW.js} +5 -7
  11. package/dist/ImportCollectionAction-C05lE0IW.js.map +1 -0
  12. package/dist/{PropertyEditView-BuZrNnBN.js → PropertyEditView-BB5xjnhZ.js} +261 -165
  13. package/dist/PropertyEditView-BB5xjnhZ.js.map +1 -0
  14. package/dist/{RolesView-CMPsaIXo.js → RolesView-CULIHWZ9.js} +22 -11
  15. package/dist/RolesView-CULIHWZ9.js.map +1 -0
  16. package/dist/{UsersView-BkeblMVT.js → UsersView-D7_AtJ44.js} +7 -71
  17. package/dist/UsersView-D7_AtJ44.js.map +1 -0
  18. package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +2 -2
  19. package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +3 -0
  20. package/dist/collection_editor_ui.js +5 -5
  21. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  22. package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
  23. package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +18 -2
  24. package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
  25. package/dist/components/EntityDetailView.d.ts +31 -0
  26. package/dist/components/EntityEditView.d.ts +3 -2
  27. package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
  28. package/dist/components/admin/CreationResultDialog.d.ts +5 -0
  29. package/dist/components/admin/RolesFilterSelect.d.ts +2 -0
  30. package/dist/components/admin/UserRolesSelectField.d.ts +2 -0
  31. package/dist/components/common/default_entity_actions.d.ts +7 -1
  32. package/dist/components/field_configs.d.ts +1 -1
  33. package/dist/components/index.d.ts +1 -0
  34. package/dist/data_import/utils/data.d.ts +1 -1
  35. package/dist/data_import/utils/file_headers.d.ts +6 -1
  36. package/dist/data_import/utils/file_to_json.d.ts +1 -11
  37. package/dist/data_import/utils/transforms.d.ts +11 -0
  38. package/dist/editor.js +2 -4
  39. package/dist/editor.js.map +1 -1
  40. package/dist/form/EntityForm.d.ts +1 -1
  41. package/dist/form/field_bindings/RelationFieldBinding.d.ts +1 -1
  42. package/dist/form/field_bindings/VectorFieldBinding.d.ts +11 -0
  43. package/dist/form/index.d.ts +1 -0
  44. package/dist/hooks/navigation/useResolvedViews.d.ts +2 -1
  45. package/dist/{index-CS6uJ7oW.js → index-BAM9KCmM.js} +4 -6
  46. package/dist/index-BAM9KCmM.js.map +1 -0
  47. package/dist/{index-BuZaHcyc.js → index-CoSNm3e3.js} +3 -3
  48. package/dist/index-CoSNm3e3.js.map +1 -0
  49. package/dist/{index-eRJbMvHi.js → index-D5OQhv-T.js} +3 -3
  50. package/dist/index-D5OQhv-T.js.map +1 -0
  51. package/dist/index.d.ts +4 -1
  52. package/dist/index.js +352 -148
  53. package/dist/index.js.map +1 -1
  54. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  55. package/dist/types/components/EntityFormProps.d.ts +2 -1
  56. package/dist/types/fields.d.ts +3 -3
  57. package/dist/util/navigation_utils.d.ts +1 -1
  58. package/dist/{util-zfU1zOCX.js → util-DtbWD7LF.js} +5304 -2572
  59. package/dist/util-DtbWD7LF.js.map +1 -0
  60. package/package.json +45 -39
  61. package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
  62. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +12 -2
  63. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -2
  64. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -2
  65. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -2
  66. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -2
  67. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -2
  68. package/src/collection_editor/ui/NewCollectionButton.tsx +1 -2
  69. package/src/collection_editor/ui/NewCollectionCard.tsx +4 -6
  70. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -2
  71. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +10 -2
  72. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +18 -2
  73. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +22 -7
  74. package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +16 -2
  75. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +19 -9
  76. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +13 -2
  77. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +24 -2
  78. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +22 -3
  79. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -2
  80. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +11 -2
  81. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +12 -2
  82. package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +16 -3
  83. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +17 -2
  84. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +18 -2
  85. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +1 -2
  86. package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +1 -2
  87. package/src/collection_editor/ui/collection_editor/LayoutModeSwitch.tsx +17 -5
  88. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +32 -6
  89. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +7 -7
  90. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +14 -2
  91. package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +16 -2
  92. package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +9 -2
  93. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -2
  94. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +1 -2
  95. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +9 -2
  96. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +11 -2
  97. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +34 -0
  98. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +15 -7
  99. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.tsx +1 -2
  100. package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +15 -3
  101. package/src/collection_editor/ui/collection_editor/properties/conditions/property_paths.ts +1 -1
  102. package/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.tsx +1 -2
  103. package/src/collection_editor/useLocalCollectionsConfigController.tsx +0 -2
  104. package/src/collection_editor/validateCollectionJson.ts +9 -9
  105. package/src/components/AdminModeSyncer.tsx +1 -1
  106. package/src/components/ArrayContainer.tsx +19 -15
  107. package/src/components/ClearFilterSortButton.tsx +1 -2
  108. package/src/components/CollectionEditorDialogs.tsx +1 -1
  109. package/src/components/DefaultAppBar.tsx +15 -3
  110. package/src/components/DefaultDrawer.tsx +3 -3
  111. package/src/components/DrawerNavigationGroup.tsx +1 -2
  112. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +14 -6
  113. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +1 -1
  114. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  115. package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +1 -2
  116. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -2
  117. package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +1 -2
  118. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +1 -2
  119. package/src/components/EntityCollectionTable/fields/VirtualTableSelect.tsx +0 -1
  120. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +15 -27
  121. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -2
  122. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +1 -2
  123. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +3 -5
  124. package/src/components/EntityCollectionTable/table_bindings.tsx +51 -45
  125. package/src/components/EntityCollectionView/Board.tsx +1 -2
  126. package/src/components/EntityCollectionView/BoardColumn.tsx +9 -2
  127. package/src/components/EntityCollectionView/BoardColumnTitle.tsx +5 -4
  128. package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +18 -16
  129. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +16 -17
  130. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +87 -18
  131. package/src/components/EntityCollectionView/EntityCollectionView.tsx +20 -11
  132. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +6 -7
  133. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +14 -5
  134. package/src/components/EntityCollectionView/FilterPresetsButton.tsx +292 -0
  135. package/src/components/EntityCollectionView/FiltersDialog.tsx +1 -2
  136. package/src/components/EntityCollectionView/SplitListView.tsx +76 -25
  137. package/src/components/EntityCollectionView/ViewModeToggle.tsx +20 -7
  138. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +1 -1
  139. package/src/components/EntityCollectionView/useBoardDataController.tsx +74 -6
  140. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +1 -1
  141. package/src/components/EntityDetailView.tsx +619 -0
  142. package/src/components/EntityEditView.tsx +29 -10
  143. package/src/components/EntityEditViewFormActions.tsx +20 -7
  144. package/src/components/EntityPreview.tsx +14 -5
  145. package/src/components/EntitySidePanel.tsx +116 -62
  146. package/src/components/EntityView.tsx +1 -2
  147. package/src/components/HomePage/ContentHomePage.tsx +1 -1
  148. package/src/components/HomePage/FavouritesView.tsx +1 -2
  149. package/src/components/HomePage/NavigationCard.tsx +1 -2
  150. package/src/components/HomePage/NavigationCardBinding.tsx +1 -2
  151. package/src/components/HomePage/NavigationGroup.tsx +1 -2
  152. package/src/components/HomePage/SmallNavigationCard.tsx +1 -2
  153. package/src/components/PropertyIdCopyTooltip.tsx +1 -2
  154. package/src/components/RebaseAuthGate.tsx +2 -2
  155. package/src/components/RebaseNavigation.tsx +9 -7
  156. package/src/components/ReferenceTable/EntitySelectionTable.tsx +12 -8
  157. package/src/components/RelationSelector.tsx +34 -6
  158. package/src/components/SearchIconsView.tsx +10 -2
  159. package/src/components/SelectableTable/SelectableTable.tsx +2 -2
  160. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -2
  161. package/src/components/SideDialogs.tsx +63 -38
  162. package/src/components/UserSelector.tsx +30 -6
  163. package/src/components/admin/CreationResultDialog.tsx +135 -0
  164. package/src/components/admin/RolesFilterSelect.tsx +45 -0
  165. package/src/components/admin/RolesView.tsx +53 -14
  166. package/src/components/admin/UserRolesSelectField.tsx +50 -0
  167. package/src/components/admin/UsersView.tsx +41 -124
  168. package/src/components/app/Scaffold.tsx +1 -2
  169. package/src/components/common/default_entity_actions.tsx +119 -12
  170. package/src/components/field_configs.tsx +39 -3
  171. package/src/components/history/EntityHistoryEntry.tsx +1 -2
  172. package/src/components/history/EntityHistoryView.tsx +1 -2
  173. package/src/components/index.ts +2 -0
  174. package/src/data_export/export/BasicExportAction.tsx +35 -38
  175. package/src/data_export/export/ExportCollectionAction.tsx +39 -40
  176. package/src/data_import/components/DataNewPropertiesMapping.tsx +15 -2
  177. package/src/data_import/components/ImportFileUpload.tsx +1 -2
  178. package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -2
  179. package/src/data_import/import/ImportCollectionAction.tsx +21 -8
  180. package/src/data_import/utils/data.ts +23 -5
  181. package/src/data_import/utils/file_headers.ts +13 -89
  182. package/src/data_import/utils/file_to_json.ts +43 -68
  183. package/src/data_import/utils/transforms.ts +47 -0
  184. package/src/editor/components/SlashCommandMenu.tsx +17 -2
  185. package/src/editor/components/editor-bubble-item.tsx +1 -1
  186. package/src/editor/extensions/Image/index.ts +1 -1
  187. package/src/editor/extensions/Image.ts +1 -1
  188. package/src/editor/selectors/color-selector.tsx +1 -2
  189. package/src/editor/selectors/link-selector.tsx +1 -2
  190. package/src/editor/selectors/node-selector.tsx +16 -2
  191. package/src/editor/selectors/text-buttons.tsx +1 -2
  192. package/src/editor/utils/prosemirror-utils.ts +1 -1
  193. package/src/form/EntityForm.tsx +16 -6
  194. package/src/form/EntityFormActions.tsx +11 -3
  195. package/src/form/PropertyFieldBinding.tsx +5 -12
  196. package/src/form/components/FieldHelperText.tsx +1 -2
  197. package/src/form/components/LocalChangesMenu.tsx +17 -2
  198. package/src/form/components/StorageItemPreview.tsx +1 -2
  199. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -2
  200. package/src/form/field_bindings/KeyValueFieldBinding.tsx +17 -2
  201. package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
  202. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +10 -3
  203. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -2
  204. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -2
  205. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +7 -7
  206. package/src/form/field_bindings/RelationFieldBinding.tsx +150 -147
  207. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  208. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -2
  209. package/src/form/field_bindings/TextFieldBinding.tsx +10 -2
  210. package/src/form/field_bindings/VectorFieldBinding.tsx +202 -0
  211. package/src/form/index.tsx +1 -0
  212. package/src/form/validation.ts +54 -2
  213. package/src/hooks/navigation/useBuildNavigationStateController.tsx +2 -1
  214. package/src/hooks/navigation/useResolvedViews.tsx +30 -15
  215. package/src/hooks/navigation/useTopLevelNavigation.ts +1 -1
  216. package/src/index.ts +6 -0
  217. package/src/preview/PropertyPreview.tsx +1 -1
  218. package/src/preview/components/ImagePreview.tsx +1 -1
  219. package/src/preview/components/UrlComponentPreview.tsx +1 -2
  220. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  221. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +23 -24
  222. package/src/routes/RebaseRoute.tsx +64 -35
  223. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  224. package/src/types/components/EntityFormProps.tsx +3 -1
  225. package/src/types/fields.tsx +4 -3
  226. package/src/util/navigation_utils.ts +4 -3
  227. package/src/util/previews.ts +1 -1
  228. package/src/util/property_utils.tsx +22 -6
  229. package/src/util/resolutions.ts +2 -2
  230. package/dist/CollectionEditorDialog-ywdxhs1L.js.map +0 -1
  231. package/dist/CollectionsStudioView-BDzMFzqH.js.map +0 -1
  232. package/dist/ContentHomePage-0tHuEIm_.js.map +0 -1
  233. package/dist/ExportCollectionAction-BIrq92To.js.map +0 -1
  234. package/dist/ImportCollectionAction-h8yg_To8.js.map +0 -1
  235. package/dist/PropertyEditView-BuZrNnBN.js.map +0 -1
  236. package/dist/RolesView-CMPsaIXo.js.map +0 -1
  237. package/dist/UsersView-BkeblMVT.js.map +0 -1
  238. package/dist/index-BuZaHcyc.js.map +0 -1
  239. package/dist/index-CS6uJ7oW.js.map +0 -1
  240. package/dist/index-eRJbMvHi.js.map +0 -1
  241. package/dist/util-zfU1zOCX.js.map +0 -1
@@ -6,8 +6,23 @@ import { deepEqual as equal } from "fast-equals"
6
6
  ;
7
7
  import { EnumValueConfig, EnumValues } from "@rebasepro/types";
8
8
  import { ArrayContainer, ArrayEntryParams } from "../../_cms_internals";
9
- import { Badge, Button, CircularProgress, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, Paper, Typography , iconSize } from "@rebasepro/ui";
10
- import { RefreshCcwIcon, ListIcon, SettingsIcon } from "lucide-react";
9
+ import {
10
+ Badge,
11
+ Button,
12
+ CircularProgress,
13
+ DebouncedTextField,
14
+ Dialog,
15
+ DialogActions,
16
+ DialogContent,
17
+ DialogTitle,
18
+ IconButton,
19
+ iconSize,
20
+ ListIcon,
21
+ Paper,
22
+ RefreshCcwIcon,
23
+ SettingsIcon,
24
+ Typography
25
+ } from "@rebasepro/ui";
11
26
  import { extractEnumFromValues } from "@rebasepro/schema-inference";
12
27
  import { Field, Formex, getIn, useCreateFormex, useFormex } from "@rebasepro/formex";
13
28
 
@@ -5,8 +5,24 @@ import React, { useState } from "react";
5
5
  import { useAuthController, useCustomizationController } from "@rebasepro/core";
6
6
  import { SearchIconsView } from "../../_cms_internals";
7
7
  import type { EntityCollection, PostgresCollection } from "@rebasepro/types";
8
- import { BooleanSwitchWithLabel, Chip, cls, Container, DebouncedTextField, Dialog, ExpandablePanel, IconButton, Select, SelectItem, TextField, Tooltip, Typography , iconSize } from "@rebasepro/ui";
9
- import { HistoryIcon, SearchIcon } from "lucide-react";
8
+ import {
9
+ BooleanSwitchWithLabel,
10
+ Chip,
11
+ cls,
12
+ Container,
13
+ DebouncedTextField,
14
+ Dialog,
15
+ ExpandablePanel,
16
+ HistoryIcon,
17
+ IconButton,
18
+ iconSize,
19
+ SearchIcon,
20
+ Select,
21
+ SelectItem,
22
+ TextField,
23
+ Tooltip,
24
+ Typography
25
+ } from "@rebasepro/ui";
10
26
  import { Field, getIn, useFormex } from "@rebasepro/formex";
11
27
  import { useCollectionsConfigController } from "../../useCollectionsConfigController";
12
28
  import { singular, toSnakeCase } from "@rebasepro/utils";
@@ -1,7 +1,6 @@
1
1
  import { useSnackbarController } from "@rebasepro/core";
2
2
  import { EntityCollection } from "@rebasepro/types";
3
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography } from "@rebasepro/ui";
4
- import { CopyIcon } from "lucide-react";
3
+ import { Button, CopyIcon, Dialog, DialogActions, DialogContent, DialogTitle, Typography } from "@rebasepro/ui";
5
4
  import React from "react";
6
5
  import JSON5 from "json5";
7
6
  import { Highlight, themes } from "prism-react-renderer"
@@ -5,8 +5,7 @@ import { useAuthController, useCustomizationController } from "@rebasepro/core";
5
5
  import { EntityCollection, Property } from "@rebasepro/types";
6
6
  import { PropertyConfigBadge } from "../../../components/PropertyConfigBadge";
7
7
  import { getFieldConfig } from "../../../components/field_configs";
8
- import { IconButton, Select, SelectItem, Typography, Button , iconSize } from "@rebasepro/ui";
9
- import { XIcon } from "lucide-react";
8
+ import { Button, IconButton, iconSize, Select, SelectItem, Typography, XIcon } from "@rebasepro/ui";
10
9
  import { useFormex } from "@rebasepro/formex";
11
10
  import { PropertyFormDialog } from "./PropertyEditView";
12
11
  import { unslugify } from "@rebasepro/utils";
@@ -1,13 +1,20 @@
1
- import { cls, ToggleButtonGroup, Typography } from "@rebasepro/ui";
2
- import { ColumnsIcon, PanelLeftIcon, SquareIcon } from "lucide-react";
1
+ import {
2
+ AppWindow,
3
+ cls,
4
+ ColumnsIcon,
5
+ PanelLeftIcon,
6
+ SquareIcon,
7
+ ToggleButtonGroup,
8
+ Typography
9
+ } from "@rebasepro/ui";
3
10
 
4
11
  export function LayoutModeSwitch({
5
12
  value,
6
13
  onChange,
7
14
  className
8
15
  }: {
9
- value: "side_panel" | "full_screen" | "split";
10
- onChange: (value: "side_panel" | "full_screen" | "split") => void;
16
+ value: "side_panel" | "full_screen" | "split" | "dialog";
17
+ onChange: (value: "side_panel" | "full_screen" | "split" | "dialog") => void;
11
18
  className?: string;
12
19
  }) {
13
20
 
@@ -32,10 +39,15 @@ export function LayoutModeSwitch({
32
39
  value: "split",
33
40
  label: "Split view",
34
41
  icon: <PanelLeftIcon/>
42
+ },
43
+ {
44
+ value: "dialog",
45
+ label: "Centered dialog",
46
+ icon: <AppWindow/>
35
47
  }
36
48
  ]}
37
49
  />
38
50
  </div>
39
- <Typography variant={"caption"} color={"secondary"} className={"ml-3.5"}>Should documents be opened full screen or in an inline side dialog</Typography>
51
+ <Typography variant={"caption"} color={"secondary"} className={"ml-3.5"}>Should documents be opened full screen, inline side dialog, or centered dialog</Typography>
40
52
  </div>
41
53
  }
@@ -8,8 +8,25 @@ import { DEFAULT_FIELD_CONFIGS, getFieldConfig, getFieldId } from "../../../comp
8
8
  import { PropertyConfigBadge } from "../../../components/PropertyConfigBadge";
9
9
  import { Property, PropertyConfig, PropertyConfigId } from "@rebasepro/types";
10
10
  import { isPropertyBuilder } from "@rebasepro/common";
11
- import { Button, Card, cls, Dialog, DialogActions, DialogContent, DialogTitle, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, fieldBackgroundMixin, IconButton, InfoLabel, Tooltip, Typography , iconSize } from "@rebasepro/ui";
12
- import { Trash2Icon, AlertTriangleIcon } from "lucide-react";
11
+ import {
12
+ AlertTriangleIcon,
13
+ Button,
14
+ Card,
15
+ cls,
16
+ Dialog,
17
+ DialogActions,
18
+ DialogContent,
19
+ DialogTitle,
20
+ fieldBackgroundDisabledMixin,
21
+ fieldBackgroundHoverMixin,
22
+ fieldBackgroundMixin,
23
+ IconButton,
24
+ iconSize,
25
+ InfoLabel,
26
+ Tooltip,
27
+ Trash2Icon,
28
+ Typography
29
+ } from "@rebasepro/ui";
13
30
  import { EnumPropertyField } from "./properties/EnumPropertyField";
14
31
  import { StoragePropertyField } from "./properties/StoragePropertyField";
15
32
  import { MapPropertyField } from "./properties/MapPropertyField";
@@ -22,6 +39,7 @@ import { NumberPropertyField } from "./properties/NumberPropertyField";
22
39
  import { ReferencePropertyField } from "./properties/ReferencePropertyField";
23
40
  import { DateTimePropertyField } from "./properties/DateTimePropertyField";
24
41
  import { AdvancedPropertyValidation } from "./properties/advanced/AdvancedPropertyValidation";
42
+ import { VectorPropertyField } from "./properties/VectorPropertyField";
25
43
 
26
44
  import { KeyValuePropertyField } from "./properties/KeyValuePropertyField";
27
45
  import { RelationPropertyField } from "./properties/RelationPropertyField";
@@ -169,6 +187,9 @@ export const PropertyForm = React.memo(
169
187
  if (values.type === "reference" && !values.path) {
170
188
  errors.slug = "You must specify a target collection for the field";
171
189
  }
190
+ if (values.type === "vector" && (!values.dimensions || isNaN(Number(values.dimensions)) || Number(values.dimensions) <= 0)) {
191
+ errors.dimensions = "Vector dimensions must be a positive number";
192
+ }
172
193
  if (values.propertyConfig === "repeat") {
173
194
  if (!("of" in values) || !values.of) {
174
195
  errors.of = "You need to specify a repeat field";
@@ -463,6 +484,10 @@ function PropertyEditFormFields({
463
484
  <RelationPropertyField
464
485
  showErrors={showErrors}
465
486
  disabled={disabled}/>;
487
+ } else if (selectedFieldConfigId === "vector_input") {
488
+ childComponent =
489
+ <VectorPropertyField
490
+ disabled={disabled}/>;
466
491
  } else {
467
492
  childComponent = null;
468
493
  }
@@ -477,7 +502,7 @@ function PropertyEditFormFields({
477
502
  </Typography>
478
503
  </InfoLabel>}
479
504
 
480
- <div className="flex mt-2 justify-between">
505
+ <div className="flex mt-2 items-start justify-between">
481
506
  <div className={"w-full flex flex-col gap-2"}>
482
507
  <WidgetSelectView
483
508
  initialProperty={values}
@@ -509,10 +534,10 @@ function PropertyEditFormFields({
509
534
  {onDelete && values?.id &&
510
535
  <IconButton
511
536
  variant={"ghost"}
512
- className="m-4"
537
+ className="mt-1 shrink-0"
513
538
  disabled={disabled}
514
539
  onClick={() => setDeleteDialogOpen(true)}>
515
- <Trash2Icon/>
540
+ <Trash2Icon size={iconSize.small}/>
516
541
  </IconButton>}
517
542
  </div>
518
543
 
@@ -596,7 +621,8 @@ const WIDGET_TYPE_MAP: Record<PropertyConfigId, string> = {
596
621
  key_value: "Group",
597
622
  repeat: "Array",
598
623
  custom_array: "Array",
599
- block: "Group"
624
+ block: "Group",
625
+ vector_input: "Number"
600
626
  };
601
627
 
602
628
  function WidgetSelectView({
@@ -5,8 +5,7 @@ import { ErrorBoundary } from "@rebasepro/ui";
5
5
  import { Property } from "@rebasepro/types";
6
6
  import { isPropertyBuilder } from "@rebasepro/common";
7
7
  import { cls, Paper, Typography } from "@rebasepro/ui";
8
- import { MinusCircleIcon, FunctionSquareIcon } from "lucide-react";
9
- import { iconSize } from "@rebasepro/ui";
8
+ import { FunctionSquareIcon, iconSize, MinusCircleIcon } from "@rebasepro/ui";
10
9
 
11
10
 
12
11
  export function PropertyFieldPreview({
@@ -39,10 +38,11 @@ export function PropertyFieldPreview({
39
38
  <div onClick={onClick} className={onClick ? "cursor-pointer" : ""}>
40
39
  <Paper
41
40
  className={cls(
42
- "w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border bg-white dark:bg-surface-800 border-surface-200 dark:border-surface-700 shadow-xs",
41
+ "w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border bg-white dark:bg-surface-800 shadow-xs",
42
+ borderColorClass || "border-surface-200 dark:border-surface-700",
43
43
  selected
44
- ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary border-primary/30"
45
- : "hover:bg-surface-50 dark:hover:bg-surface-750"
44
+ ? "bg-primary/10 text-primary dark:bg-primary/20 dark:text-primary-light ring-1 ring-inset ring-primary border-primary/30"
45
+ : "hover:bg-surface-50 dark:hover:bg-surface-700"
46
46
  )}
47
47
  >
48
48
  <PropertyConfigBadge propertyConfig={propertyConfig} size="small"/>
@@ -107,8 +107,8 @@ export function NonEditablePropertyPreview({
107
107
  className={cls(
108
108
  "w-full flex flex-row gap-3 items-center px-3 py-2 rounded-lg transition-all duration-200 border bg-white dark:bg-surface-800 border-surface-200 dark:border-surface-700 shadow-xs",
109
109
  selected
110
- ? "bg-primary/5 dark:bg-primary/10 ring-1 ring-inset ring-primary border-primary/30"
111
- : "hover:bg-surface-50 dark:hover:bg-surface-750"
110
+ ? "bg-primary/10 text-primary dark:bg-primary/20 dark:text-primary-light ring-1 ring-inset ring-primary border-primary/30"
111
+ : "hover:bg-surface-50 dark:hover:bg-surface-700"
112
112
  )}
113
113
  >
114
114
  <div className={"relative shrink-0"}>
@@ -5,8 +5,20 @@ import { deepEqual as equal } from "fast-equals"
5
5
  import { AIModifiedIndicator } from "@rebasepro/core";
6
6
  import { AdditionalFieldDelegate, Properties, Property } from "@rebasepro/types";
7
7
  import { isPropertyBuilder } from "@rebasepro/common";
8
- import { defaultBorderMixin, cls, IconButton, Menu, MenuItem, Tooltip , iconSize } from "@rebasepro/ui";
9
- import { FileSearchIcon, ArrowDownToLineIcon, ArrowUpToLineIcon, Trash2Icon, MoreVerticalIcon } from "lucide-react";
8
+ import {
9
+ ArrowDownToLineIcon,
10
+ ArrowUpToLineIcon,
11
+ cls,
12
+ defaultBorderMixin,
13
+ FileSearchIcon,
14
+ IconButton,
15
+ iconSize,
16
+ Menu,
17
+ MenuItem,
18
+ MoreVerticalIcon,
19
+ Tooltip,
20
+ Trash2Icon
21
+ } from "@rebasepro/ui";
10
22
  import { NonEditablePropertyPreview, PropertyFieldPreview } from "./PropertyFieldPreview";
11
23
  import {
12
24
  closestCenter,
@@ -7,8 +7,22 @@ import {
7
7
  import { resolveEntityView } from "../../_cms_internals";
8
8
  import { EntityCollection, EntityCustomView, User } from "@rebasepro/types";
9
9
  import { getSubcollections } from "@rebasepro/common";
10
- import { Alert, Button, Container, IconButton, Paper, Table, TableBody, TableCell, TableRow, Tooltip, Typography , iconSize } from "@rebasepro/ui";
11
- import { PlusIcon, Trash2Icon } from "lucide-react";
10
+ import {
11
+ Alert,
12
+ Button,
13
+ Container,
14
+ IconButton,
15
+ iconSize,
16
+ Paper,
17
+ PlusIcon,
18
+ Table,
19
+ TableBody,
20
+ TableCell,
21
+ TableRow,
22
+ Tooltip,
23
+ Trash2Icon,
24
+ Typography
25
+ } from "@rebasepro/ui";
12
26
  import { CollectionEditorDialog } from "./CollectionEditorDialog";
13
27
  import { CollectionsConfigController } from "../../types/config_controller";
14
28
  import { CollectionInference } from "../../types/collection_inference";
@@ -1,6 +1,13 @@
1
1
  import { ViewMode } from "@rebasepro/types";
2
- import { cls, ToggleButtonGroup, Typography } from "@rebasepro/ui";
3
- import { KanbanIcon, LayoutGridIcon, ListIcon, TableIcon } from "lucide-react";
2
+ import {
3
+ cls,
4
+ KanbanIcon,
5
+ LayoutGridIcon,
6
+ ListIcon,
7
+ TableIcon,
8
+ ToggleButtonGroup,
9
+ Typography
10
+ } from "@rebasepro/ui";
4
11
 
5
12
  export function ViewModeSwitch({
6
13
  value,
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import { Button, Paper, Typography } from "@rebasepro/ui";
3
- import { PlusIcon } from "lucide-react";
2
+ import { Button, Paper, PlusIcon, Typography } from "@rebasepro/ui";
4
3
  import { getIn, useFormex } from "@rebasepro/formex";
5
4
  import { OnPropertyChangedParams, PropertyFormDialog } from "../PropertyEditView";
6
5
  import {
@@ -2,8 +2,7 @@ import { FieldCaption } from "../../../_cms_internals";
2
2
  import React, { useState } from "react";
3
3
  ;
4
4
  import { MapProperty, Property, PropertyConfig } from "@rebasepro/types";
5
- import { BooleanSwitchWithLabel, Button, Paper, Typography } from "@rebasepro/ui";
6
- import { PlusIcon } from "lucide-react";
5
+ import { BooleanSwitchWithLabel, Button, Paper, PlusIcon, Typography } from "@rebasepro/ui";
7
6
  import { PropertyFormDialog } from "../PropertyEditView";
8
7
  import { getIn, useFormex } from "@rebasepro/formex";
9
8
  import { useTranslation } from "@rebasepro/core";
@@ -5,8 +5,15 @@ import { ValidationPanel } from "./validation/ValidationPanel";
5
5
  import { Field, getIn, useFormex } from "@rebasepro/formex";
6
6
  import { useTranslation } from "@rebasepro/core";
7
7
 
8
- import { BooleanSwitchWithLabel, DebouncedTextField, ExpandablePanel, TextField, Typography } from "@rebasepro/ui";
9
- import { UploadCloudIcon, SettingsIcon } from "lucide-react";
8
+ import {
9
+ BooleanSwitchWithLabel,
10
+ DebouncedTextField,
11
+ ExpandablePanel,
12
+ SettingsIcon,
13
+ TextField,
14
+ Typography,
15
+ UploadCloudIcon
16
+ } from "@rebasepro/ui";
10
17
 
11
18
  export function MarkdownPropertyField({
12
19
  disabled,
@@ -1,7 +1,16 @@
1
1
 
2
2
  import React from "react";
3
- import { Button, DebouncedTextField, ExpandablePanel, MultiSelect, MultiSelectItem, Select, SelectItem, Typography } from "@rebasepro/ui";
4
- import { UploadCloudIcon } from "lucide-react";
3
+ import {
4
+ Button,
5
+ DebouncedTextField,
6
+ ExpandablePanel,
7
+ MultiSelect,
8
+ MultiSelectItem,
9
+ Select,
10
+ SelectItem,
11
+ Typography,
12
+ UploadCloudIcon
13
+ } from "@rebasepro/ui";
5
14
 
6
15
  import { Field, FormexFieldProps, getIn, useFormex } from "@rebasepro/formex";
7
16
  import { useTranslation } from "@rebasepro/core";
@@ -0,0 +1,34 @@
1
+ import { FieldCaption } from "../../../_cms_internals";
2
+ import React from "react";
3
+ import { TextField } from "@rebasepro/ui";
4
+ import { getIn, useFormex } from "@rebasepro/formex";
5
+
6
+ export function VectorPropertyField({ disabled }: {
7
+ disabled: boolean;
8
+ }) {
9
+ const { values, setFieldValue, touched, errors } = useFormex();
10
+
11
+ const dimensionsPath = "dimensions";
12
+ const dimensionsValue = getIn(values, dimensionsPath);
13
+ const dimensionsError = getIn(touched, dimensionsPath) && getIn(errors, dimensionsPath);
14
+
15
+ return (
16
+ <div className={"col-span-12"}>
17
+ <TextField
18
+ name={dimensionsPath}
19
+ disabled={disabled}
20
+ type={"number"}
21
+ onChange={(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
22
+ const parsedVal = parseInt(e.target.value);
23
+ setFieldValue(dimensionsPath, isNaN(parsedVal) ? undefined : parsedVal);
24
+ }}
25
+ label={"Vector Dimensions"}
26
+ value={dimensionsValue ?? ""}
27
+ error={Boolean(dimensionsError)}
28
+ />
29
+ <FieldCaption error={Boolean(dimensionsError)}>
30
+ {dimensionsError ?? "The dimension size of the vector embeddings (e.g., 1536 for OpenAI text-embedding-3-small)."}
31
+ </FieldCaption>
32
+ </div>
33
+ );
34
+ }
@@ -1,8 +1,21 @@
1
1
 
2
2
  import React from "react";
3
3
  import { useFormex } from "@rebasepro/formex";
4
- import { IconButton, Select, SelectItem, DebouncedTextField, Typography, Chip, TextField, cls, defaultBorderMixin, Button, BooleanSwitchWithLabel , iconSize } from "@rebasepro/ui";
5
- import { Trash2Icon } from "lucide-react";
4
+ import {
5
+ BooleanSwitchWithLabel,
6
+ Button,
7
+ Chip,
8
+ cls,
9
+ DebouncedTextField,
10
+ defaultBorderMixin,
11
+ IconButton,
12
+ iconSize,
13
+ Select,
14
+ SelectItem,
15
+ TextField,
16
+ Trash2Icon,
17
+ Typography
18
+ } from "@rebasepro/ui";
6
19
  import { getFieldConfig, DEFAULT_FIELD_CONFIGS } from "../../../../_cms_internals";
7
20
  import { Properties, Property, EnumValueConfig } from "@rebasepro/types";
8
21
  import { isPropertyBuilder } from "@rebasepro/common";
@@ -806,17 +819,12 @@ export function ConditionsEditor({ disabled, collectionProperties }: ConditionsE
806
819
  // Get current conditions from form values
807
820
  const conditions: Record<string, unknown> = (values as PropertyWithId & { conditions?: Record<string, unknown> }).conditions ?? {};
808
821
 
809
- // DEBUG: Log conditions to see what's being loaded
810
- console.log("[ConditionsEditor] Loaded conditions:", conditions);
811
-
812
822
  const activeConditions: { type: ConditionType; group: ConditionGroup }[] = [];
813
823
 
814
824
  for (const type of CONDITION_TYPES) {
815
825
  const jsonLogic = conditions[type.id as keyof typeof conditions];
816
826
  if (jsonLogic) {
817
- console.log(`[ConditionsEditor] Parsing ${type.id}:`, jsonLogic);
818
827
  const group = jsonLogicToGroup(jsonLogic as Record<string, any>);
819
- console.log("[ConditionsEditor] Parsed group:", group);
820
828
  if (group) {
821
829
  activeConditions.push({ type: type.id,
822
830
  group });
@@ -1,7 +1,6 @@
1
1
  import { PropsWithChildren } from "react";
2
2
 
3
- import { ExpandablePanel, Typography } from "@rebasepro/ui";
4
- import { SettingsIcon } from "lucide-react";
3
+ import { ExpandablePanel, SettingsIcon, Typography } from "@rebasepro/ui";
5
4
 
6
5
  export function ConditionsPanel({
7
6
  children
@@ -1,8 +1,20 @@
1
1
 
2
2
  import React from "react";
3
3
  import { useFormex } from "@rebasepro/formex";
4
- import { IconButton, Select, SelectItem, Typography, MultiSelect, MultiSelectItem, cls, defaultBorderMixin, DebouncedTextField, BooleanSwitchWithLabel , iconSize } from "@rebasepro/ui";
5
- import { Trash2Icon } from "lucide-react";
4
+ import {
5
+ BooleanSwitchWithLabel,
6
+ cls,
7
+ DebouncedTextField,
8
+ defaultBorderMixin,
9
+ IconButton,
10
+ iconSize,
11
+ MultiSelect,
12
+ MultiSelectItem,
13
+ Select,
14
+ SelectItem,
15
+ Trash2Icon,
16
+ Typography
17
+ } from "@rebasepro/ui";
6
18
  import { getFieldConfig, DEFAULT_FIELD_CONFIGS } from "../../../../_cms_internals";
7
19
  import { Properties, Property, EnumValueConfig } from "@rebasepro/types";
8
20
  import { isPropertyBuilder } from "@rebasepro/common";
@@ -269,7 +281,7 @@ function parseEnumFilterRule(rule: Record<string, unknown>): EnumConditionConfig
269
281
  const selectedEnumIds = objectToArray(selectedEnumIdsRaw);
270
282
  if (selectedEnumIds.length === 0 && selectedEnumIdsRaw) {
271
283
  // If it was truthy but we got no values, parsing failed
272
- console.log("[EnumConditionsEditor] Warning: Could not parse selectedEnumIds:", selectedEnumIdsRaw);
284
+ console.warn("[EnumConditionsEditor] Could not parse selectedEnumIds:", selectedEnumIdsRaw);
273
285
  }
274
286
 
275
287
  // Parse the condition
@@ -39,7 +39,7 @@ export function getPropertyPaths(
39
39
 
40
40
  // For arrays with object items, add the nested paths too
41
41
  if (property.type === "array" && property.of) {
42
- const ofPropertyOrBuilder = property.of as unknown as Property;
42
+ const ofPropertyOrBuilder = property.of as Property;
43
43
  // Skip if the array's 'of' is a PropertyBuilder
44
44
  if (!isPropertyBuilder(ofPropertyOrBuilder)) {
45
45
  const ofProperty = ofPropertyOrBuilder as Property;
@@ -1,7 +1,6 @@
1
1
  import { PropsWithChildren } from "react";
2
2
 
3
- import { ExpandablePanel, Typography } from "@rebasepro/ui";
4
- import { CheckSquareIcon } from "lucide-react";
3
+ import { CheckSquareIcon, ExpandablePanel, Typography } from "@rebasepro/ui";
5
4
 
6
5
  export function ValidationPanel({
7
6
  children
@@ -16,7 +16,6 @@ export function useLocalCollectionsConfigController(
16
16
  const parsedCollections = baseCollections;
17
17
 
18
18
  const request = async (endpoint: string, payload: Record<string, unknown>) => {
19
- console.log("dispatching dev server request", endpoint, payload);
20
19
  try {
21
20
  let token = options?.getAuthToken ? await options.getAuthToken() : null;
22
21
  let baseUrl = typeof clientOrUrl === "string" ? clientOrUrl : "";
@@ -38,7 +37,6 @@ export function useLocalCollectionsConfigController(
38
37
  headers,
39
38
  body: JSON.stringify(payload)
40
39
  });
41
- console.log("dev server response", endpoint, response.status);
42
40
  if (!response.ok) {
43
41
  const text = await response.text();
44
42
  let err: Record<string, unknown> = {};
@@ -78,7 +78,7 @@ function validateProperty(
78
78
  validateProperty(ofProp, `${path}.of[${index}]`, errors);
79
79
  });
80
80
  } else {
81
- validateProperty(property.of as unknown as Record<string, unknown>, `${path}.of`, errors);
81
+ validateProperty(property.of as Record<string, unknown>, `${path}.of`, errors);
82
82
  }
83
83
  }
84
84
  // oneOf validation
@@ -88,15 +88,15 @@ function validateProperty(
88
88
  path: `${path}.oneOf`,
89
89
  message: "Must be an object"
90
90
  });
91
- } else if ((property.oneOf as unknown as Record<string, unknown>).properties) {
92
- validateProperties((property.oneOf as unknown as Record<string, unknown>).properties as unknown as Record<string, unknown>, `${path}.oneOf.properties`, errors);
91
+ } else if ((property.oneOf as Record<string, unknown>).properties) {
92
+ validateProperties((property.oneOf as Record<string, unknown>).properties as Record<string, unknown>, `${path}.oneOf.properties`, errors);
93
93
  }
94
94
  }
95
95
  }
96
96
 
97
97
  // Validate map properties
98
98
  if (property.dataType === "map" && property.properties) {
99
- validateProperties(property.properties as unknown as Record<string, unknown>, `${path}.properties`, errors);
99
+ validateProperties(property.properties as Record<string, unknown>, `${path}.properties`, errors);
100
100
  }
101
101
 
102
102
  // Validate reference path
@@ -147,7 +147,7 @@ function validateProperties(
147
147
  }
148
148
 
149
149
  for (const [key, property] of Object.entries(properties)) {
150
- validateProperty(property as unknown as Record<string, unknown>, `${path}.${key}`, errors);
150
+ validateProperty(property as Record<string, unknown>, `${path}.${key}`, errors);
151
151
  }
152
152
  }
153
153
 
@@ -260,8 +260,8 @@ function validateOptionalFields(
260
260
  path: "kanban",
261
261
  message: "Must be an object"
262
262
  });
263
- } else if ((collection.kanban as unknown as Record<string, unknown>).columnProperty !== undefined &&
264
- typeof (collection.kanban as unknown as Record<string, unknown>).columnProperty !== "string") {
263
+ } else if ((collection.kanban as Record<string, unknown>).columnProperty !== undefined &&
264
+ typeof (collection.kanban as Record<string, unknown>).columnProperty !== "string") {
265
265
  errors.push({
266
266
  path: "kanban.columnProperty",
267
267
  message: "Must be a string"
@@ -316,7 +316,7 @@ function validateCollectionObject(
316
316
 
317
317
  // Properties validation
318
318
  if (collection.properties !== undefined) {
319
- validateProperties(collection.properties as unknown as Record<string, unknown>, "properties", errors);
319
+ validateProperties(collection.properties as Record<string, unknown>, "properties", errors);
320
320
  }
321
321
 
322
322
  // Optional fields
@@ -369,7 +369,7 @@ export function validateCollectionJson(jsonString: string): CollectionValidation
369
369
  };
370
370
  }
371
371
 
372
- validateCollectionObject(parsed as unknown as Record<string, unknown>, errors);
372
+ validateCollectionObject(parsed as Record<string, unknown>, errors);
373
373
 
374
374
  return {
375
375
  valid: errors.length === 0,
@@ -2,7 +2,7 @@ import type { AppView } from "@rebasepro/types";
2
2
  import React, { useEffect } from "react";
3
3
  import { useLocation } from "react-router-dom";
4
4
  ;
5
- import { useUrlController } from "../hooks";
5
+ import { useUrlController } from "../hooks/navigation/contexts/UrlContext";
6
6
  import { useAdminModeController } from "@rebasepro/core";
7
7
  export interface AdminModeSyncerProps {
8
8
  /**
@@ -13,8 +13,22 @@ import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
13
13
 
14
14
  import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
15
15
  import { CSS } from "@dnd-kit/utilities";
16
- import { Button, cls, HandleIcon, IconButton, Menu, MenuItem, Tooltip, useOutsideAlerter , iconSize } from "@rebasepro/ui";
17
- import { PlusIcon, CopyIcon, ChevronDownIcon, ChevronUpIcon, MinusIcon } from "lucide-react";
16
+ import {
17
+ Button,
18
+ ChevronDownIcon,
19
+ ChevronUpIcon,
20
+ cls,
21
+ CopyIcon,
22
+ HandleIcon,
23
+ IconButton,
24
+ iconSize,
25
+ Menu,
26
+ MenuItem,
27
+ MinusIcon,
28
+ PlusIcon,
29
+ Tooltip,
30
+ useOutsideAlerter
31
+ } from "@rebasepro/ui";
18
32
  import { useTranslation } from "@rebasepro/core";
19
33
  import { getHashValue } from "@rebasepro/utils";
20
34
 
@@ -95,24 +109,14 @@ function SortableItem({
95
109
  transform,
96
110
  transition,
97
111
  isDragging
98
- } = sortable
99
- ? useSortable({ id })
100
- : {
101
- attributes: {},
102
- listeners: {},
103
- setNodeRef: (node: HTMLElement | null) => {
104
- },
105
- transform: null,
106
- transition: undefined,
107
- isDragging: false
108
- };
112
+ } = useSortable({ id });
109
113
 
110
114
  const style = transform ? {
111
115
  transform: CSS.Transform.toString(transform),
112
116
  transition
113
117
  } : {};
114
- const dragHandleProps = sortable ? { ...listeners,
115
- ...attributes } : {};
118
+ const dragHandleProps = { ...listeners,
119
+ ...attributes };
116
120
 
117
121
  return (
118
122
  <ArrayContainerItem