@rebasepro/admin 0.9.1-canary.16c42e9 → 0.9.1-canary.26fe4b2

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 (92) hide show
  1. package/dist/{CollectionEditorDialog-DbPpDDwb.js → CollectionEditorDialog-BOlKGGg7.js} +123 -31
  2. package/dist/{CollectionEditorDialog-DbPpDDwb.js.map → CollectionEditorDialog-BOlKGGg7.js.map} +1 -1
  3. package/dist/{PropertyEditView-DfJbZ67t.js → PropertyEditView-i51tFOfM.js} +3 -3
  4. package/dist/PropertyEditView-i51tFOfM.js.map +1 -0
  5. package/dist/{RouterCollectionsStudioView-C6XQ7Il5.js → RouterCollectionsStudioView-Dh4W53PU.js} +4 -4
  6. package/dist/{RouterCollectionsStudioView-C6XQ7Il5.js.map → RouterCollectionsStudioView-Dh4W53PU.js.map} +1 -1
  7. package/dist/collection_editor_ui.js +4 -4
  8. package/dist/components/field_configs.d.ts +17 -0
  9. package/dist/contexts/BreacrumbsContext.d.ts +1 -1
  10. package/dist/editor.js.map +1 -1
  11. package/dist/export-BM6HPujv.js +518 -0
  12. package/dist/export-BM6HPujv.js.map +1 -0
  13. package/dist/{history-GSa4BgDt.js → history-CtIPJxvQ.js} +3 -3
  14. package/dist/history-CtIPJxvQ.js.map +1 -0
  15. package/dist/hooks/useSelectionDialog.d.ts +1 -1
  16. package/dist/import-DzQnT03v.js +328 -0
  17. package/dist/import-DzQnT03v.js.map +1 -0
  18. package/dist/index.js +3299 -1
  19. package/dist/index.js.map +1 -0
  20. package/dist/preview/components/UrlComponentPreview.d.ts +2 -1
  21. package/dist/preview/util.d.ts +1 -0
  22. package/dist/util/view_mode.d.ts +54 -0
  23. package/dist/{src-B8WuGSPZ.js → util-XFwQ9FEc.js} +17388 -21329
  24. package/dist/util-XFwQ9FEc.js.map +1 -0
  25. package/package.json +8 -8
  26. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +104 -9
  27. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +1 -1
  28. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +1 -1
  29. package/src/components/CollectionTableBinding/CollectionRowActions.tsx +1 -1
  30. package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +1 -1
  31. package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +1 -1
  32. package/src/components/CollectionViewBinding/CollectionViewActions.tsx +1 -1
  33. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +76 -126
  34. package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +4 -8
  35. package/src/components/CollectionViewBinding/SplitListView.tsx +114 -63
  36. package/src/components/DetailViewBinding.tsx +4 -2
  37. package/src/components/EditFormActions.tsx +2 -2
  38. package/src/components/EditViewBinding.tsx +3 -2
  39. package/src/components/EntityPreviewBinding.tsx +2 -1
  40. package/src/components/HomePage/ContentHomePage.tsx +2 -1
  41. package/src/components/HomePage/FavouritesView.tsx +1 -1
  42. package/src/components/RebaseRouteDefs.tsx +1 -1
  43. package/src/components/ReferenceTable/SelectionTableBinding.tsx +2 -1
  44. package/src/components/ReferenceWidget.tsx +1 -1
  45. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +1 -1
  46. package/src/components/SidePanelBinding.tsx +46 -8
  47. package/src/components/SidePanelProvider.tsx +14 -11
  48. package/src/components/field_configs.tsx +41 -24
  49. package/src/components/history/EntityHistoryView.tsx +1 -1
  50. package/src/contexts/BreacrumbsContext.tsx +1 -1
  51. package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +2 -4
  52. package/src/data_import/import/ImportCollectionAction.tsx +6 -6
  53. package/src/editor/selectors/color-selector.tsx +1 -1
  54. package/src/editor/selectors/node-selector.tsx +1 -1
  55. package/src/editor/selectors/text-buttons.tsx +1 -1
  56. package/src/form/EntityForm.tsx +4 -1
  57. package/src/form/EntityFormBinding.tsx +3 -1
  58. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +2 -1
  59. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +3 -2
  60. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -1
  61. package/src/form/field_bindings/DateTimeFieldBinding.tsx +2 -1
  62. package/src/form/field_bindings/KeyValueFieldBinding.tsx +2 -1
  63. package/src/form/field_bindings/MapFieldBinding.tsx +2 -1
  64. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +2 -1
  65. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -1
  66. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +2 -1
  67. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -1
  68. package/src/form/field_bindings/ReferenceFieldBinding.tsx +3 -2
  69. package/src/form/field_bindings/RelationFieldBinding.tsx +2 -1
  70. package/src/form/field_bindings/RepeatFieldBinding.tsx +2 -1
  71. package/src/form/field_bindings/SelectFieldBinding.tsx +2 -1
  72. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -1
  73. package/src/form/field_bindings/SwitchFieldBinding.tsx +2 -1
  74. package/src/form/field_bindings/TextFieldBinding.tsx +2 -1
  75. package/src/form/field_bindings/UserSelectFieldBinding.tsx +2 -1
  76. package/src/form/field_bindings/VectorFieldBinding.tsx +2 -1
  77. package/src/hooks/useBuildSidePanel.tsx +8 -0
  78. package/src/hooks/useSelectionDialog.tsx +3 -3
  79. package/src/preview/components/ImagePreview.tsx +1 -1
  80. package/src/preview/components/ReferencePreview.tsx +1 -1
  81. package/src/preview/components/RelationPreview.tsx +2 -2
  82. package/src/preview/components/UrlComponentPreview.tsx +2 -9
  83. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +1 -1
  84. package/src/preview/property_previews/NumberPropertyPreview.tsx +1 -1
  85. package/src/preview/util.ts +9 -0
  86. package/src/routes/CustomViewRoute.tsx +2 -1
  87. package/src/routes/RebaseRoute.tsx +20 -25
  88. package/src/util/navigation_utils.ts +2 -5
  89. package/src/util/view_mode.ts +102 -0
  90. package/dist/PropertyEditView-DfJbZ67t.js.map +0 -1
  91. package/dist/history-GSa4BgDt.js.map +0 -1
  92. package/dist/src-B8WuGSPZ.js.map +0 -1
@@ -42,6 +42,23 @@ import { RelationFieldBinding } from "../form/field_bindings/RelationFieldBindin
42
42
  import { UserSelectFieldBinding } from "../form/field_bindings/UserSelectFieldBinding";
43
43
  import { mergeDeep } from "@rebasepro/utils";
44
44
 
45
+ /**
46
+ * Every `Field` below is a getter on purpose — do not inline it back to
47
+ * `Field: SomeBinding`.
48
+ *
49
+ * This module and the field bindings form an import cycle: we import the
50
+ * bindings, the container bindings (map, repeat, block, custom-shaped array)
51
+ * import `PropertyFieldBinding` to render their children, and that imports
52
+ * `getFieldConfig` from here. Enter the cycle at a binding rather than here and
53
+ * this object is built while that binding's module is still initialising.
54
+ *
55
+ * As a plain value the binding would be read at that moment. It happens to
56
+ * survive today only because every binding is declared `export function`, which
57
+ * hoists; rewriting a single one as `export const` would make the read a
58
+ * temporal dead zone ReferenceError at import time, surfacing as a blank screen
59
+ * far from its cause. The getter defers the read to first access, long after
60
+ * every module has initialised, so declaration style stops mattering.
61
+ */
45
62
  export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> = {
46
63
  text_field: {
47
64
  key: "text_field",
@@ -51,7 +68,7 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
51
68
  color: "#2d7ff9",
52
69
  property: {
53
70
  type: "string",
54
- ui: { Field: TextFieldBinding }
71
+ ui: { get Field() { return TextFieldBinding; } }
55
72
  }
56
73
  },
57
74
  multiline: {
@@ -63,7 +80,7 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
63
80
  property: {
64
81
  type: "string",
65
82
  ui: { multiline: true,
66
- Field: TextFieldBinding }
83
+ get Field() { return TextFieldBinding; } }
67
84
  }
68
85
  },
69
86
  markdown: {
@@ -75,7 +92,7 @@ Field: TextFieldBinding }
75
92
  property: {
76
93
  type: "string",
77
94
  ui: { markdown: true,
78
- Field: MarkdownEditorFieldBinding }
95
+ get Field() { return MarkdownEditorFieldBinding; } }
79
96
  }
80
97
  },
81
98
  url: {
@@ -87,7 +104,7 @@ Field: MarkdownEditorFieldBinding }
87
104
  property: {
88
105
  type: "string",
89
106
  ui: { url: true,
90
- Field: TextFieldBinding }
107
+ get Field() { return TextFieldBinding; } }
91
108
  }
92
109
  },
93
110
  email: {
@@ -99,7 +116,7 @@ Field: TextFieldBinding }
99
116
  property: {
100
117
  type: "string",
101
118
  email: true,
102
- ui: { Field: TextFieldBinding }
119
+ ui: { get Field() { return TextFieldBinding; } }
103
120
  }
104
121
  },
105
122
  switch: {
@@ -110,7 +127,7 @@ Field: TextFieldBinding }
110
127
  color: "#20d9d2",
111
128
  property: {
112
129
  type: "boolean",
113
- ui: { Field: SwitchFieldBinding }
130
+ ui: { get Field() { return SwitchFieldBinding; } }
114
131
  }
115
132
  },
116
133
  select: {
@@ -122,7 +139,7 @@ Field: TextFieldBinding }
122
139
  property: {
123
140
  type: "string",
124
141
  enum: [],
125
- ui: { Field: SelectFieldBinding }
142
+ ui: { get Field() { return SelectFieldBinding; } }
126
143
  }
127
144
  },
128
145
  multi_select: {
@@ -137,7 +154,7 @@ Field: TextFieldBinding }
137
154
  type: "string",
138
155
  enum: []
139
156
  },
140
- ui: { Field: MultiSelectFieldBinding }
157
+ ui: { get Field() { return MultiSelectFieldBinding; } }
141
158
  }
142
159
  },
143
160
  user_select: {
@@ -147,7 +164,7 @@ Field: TextFieldBinding }
147
164
  Icon: UserIcon,
148
165
  property: {
149
166
  type: "string",
150
- ui: { Field: UserSelectFieldBinding }
167
+ ui: { get Field() { return UserSelectFieldBinding; } }
151
168
  }
152
169
  },
153
170
  number_input: {
@@ -158,7 +175,7 @@ Field: TextFieldBinding }
158
175
  color: "#bec920",
159
176
  property: {
160
177
  type: "number",
161
- ui: { Field: TextFieldBinding }
178
+ ui: { get Field() { return TextFieldBinding; } }
162
179
  }
163
180
  },
164
181
  number_select: {
@@ -170,7 +187,7 @@ Field: TextFieldBinding }
170
187
  property: {
171
188
  type: "number",
172
189
  enum: [],
173
- ui: { Field: SelectFieldBinding }
190
+ ui: { get Field() { return SelectFieldBinding; } }
174
191
  }
175
192
  },
176
193
  multi_number_select: {
@@ -185,7 +202,7 @@ Field: TextFieldBinding }
185
202
  type: "number",
186
203
  enum: []
187
204
  },
188
- ui: { Field: MultiSelectFieldBinding }
205
+ ui: { get Field() { return MultiSelectFieldBinding; } }
189
206
  }
190
207
  },
191
208
  file_upload: {
@@ -199,7 +216,7 @@ Field: TextFieldBinding }
199
216
  storage: {
200
217
  storagePath: "{path}"
201
218
  },
202
- ui: { Field: StorageUploadFieldBinding }
219
+ ui: { get Field() { return StorageUploadFieldBinding; } }
203
220
  }
204
221
  },
205
222
  multi_file_upload: {
@@ -216,7 +233,7 @@ Field: TextFieldBinding }
216
233
  storagePath: "{path}"
217
234
  }
218
235
  },
219
- ui: { Field: StorageUploadFieldBinding }
236
+ ui: { get Field() { return StorageUploadFieldBinding; } }
220
237
  }
221
238
  },
222
239
  reference: {
@@ -227,7 +244,7 @@ Field: TextFieldBinding }
227
244
  color: "#ff0042",
228
245
  property: {
229
246
  type: "reference",
230
- ui: { Field: ReferenceFieldBinding }
247
+ ui: { get Field() { return ReferenceFieldBinding; } }
231
248
  }
232
249
  },
233
250
  multi_references: {
@@ -241,7 +258,7 @@ Field: TextFieldBinding }
241
258
  of: {
242
259
  type: "reference"
243
260
  },
244
- ui: { Field: ArrayOfReferencesFieldBinding }
261
+ ui: { get Field() { return ArrayOfReferencesFieldBinding; } }
245
262
  }
246
263
  },
247
264
  relation: {
@@ -253,7 +270,7 @@ Field: TextFieldBinding }
253
270
  property: {
254
271
  relationName: "",
255
272
  type: "relation",
256
- ui: { Field: RelationFieldBinding }
273
+ ui: { get Field() { return RelationFieldBinding; } }
257
274
  }
258
275
  },
259
276
  date_time: {
@@ -264,7 +281,7 @@ Field: TextFieldBinding }
264
281
  color: "#8b46ff",
265
282
  property: {
266
283
  type: "date",
267
- ui: { Field: DateTimeFieldBinding }
284
+ ui: { get Field() { return DateTimeFieldBinding; } }
268
285
  }
269
286
  },
270
287
  group: {
@@ -276,7 +293,7 @@ Field: TextFieldBinding }
276
293
  property: {
277
294
  type: "map",
278
295
  properties: {},
279
- ui: { Field: MapFieldBinding }
296
+ ui: { get Field() { return MapFieldBinding; } }
280
297
  }
281
298
  },
282
299
  key_value: {
@@ -288,7 +305,7 @@ Field: TextFieldBinding }
288
305
  property: {
289
306
  type: "map",
290
307
  keyValue: true,
291
- ui: { Field: KeyValueFieldBinding }
308
+ ui: { get Field() { return KeyValueFieldBinding; } }
292
309
  }
293
310
  },
294
311
  repeat: {
@@ -302,7 +319,7 @@ Field: TextFieldBinding }
302
319
  of: {
303
320
  type: "string"
304
321
  },
305
- ui: { Field: RepeatFieldBinding }
322
+ ui: { get Field() { return RepeatFieldBinding; } }
306
323
  }
307
324
  },
308
325
  custom_array: {
@@ -313,7 +330,7 @@ Field: TextFieldBinding }
313
330
  color: "#ff9408",
314
331
  property: {
315
332
  type: "array",
316
- ui: { Field: ArrayCustomShapedFieldBinding }
333
+ ui: { get Field() { return ArrayCustomShapedFieldBinding; } }
317
334
  }
318
335
  },
319
336
  block: {
@@ -327,7 +344,7 @@ Field: TextFieldBinding }
327
344
  oneOf: {
328
345
  properties: {}
329
346
  },
330
- ui: { Field: BlockFieldBinding }
347
+ ui: { get Field() { return BlockFieldBinding; } }
331
348
  }
332
349
  },
333
350
  vector_input: {
@@ -339,7 +356,7 @@ Field: TextFieldBinding }
339
356
  property: {
340
357
  type: "vector",
341
358
  dimensions: 1536,
342
- ui: { Field: VectorFieldBinding }
359
+ ui: { get Field() { return VectorFieldBinding; } }
343
360
  }
344
361
  }
345
362
  };
@@ -7,7 +7,7 @@ import { EntityHistoryEntry } from "./EntityHistoryEntry";
7
7
  import { useSnackbarController, useAuthController } from "@rebasepro/app";
8
8
  import { ConfirmationDialog } from "@rebasepro/app";
9
9
  import { useState } from "react";
10
- import { useHistory } from "../../index";
10
+ import { useHistory } from "../../hooks/useHistory";
11
11
 
12
12
  /**
13
13
  * Entity history tab view. Shows a paginated list of entity revisions
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useMemo, useState } from "react";
2
- import { BreadcrumbEntry, BreadcrumbsController } from "../hooks/useBreadcrumbsController";
2
+ import type { BreadcrumbEntry, BreadcrumbsController } from "@rebasepro/types";
3
3
 
4
4
  const DEFAULT_BREADCRUMBS_CONTROLLER: BreadcrumbsController = {
5
5
  breadcrumbs: [],
@@ -1,10 +1,8 @@
1
1
  import React from "react";
2
2
  import { useCustomizationController } from "@rebasepro/app";
3
3
  import { Property } from "@rebasepro/types";
4
- import {
5
- getFieldConfig,
6
- PropertyConfigBadge
7
- } from "../../components";
4
+ import { getFieldConfig } from "../../components/field_configs";
5
+ import { PropertyConfigBadge } from "../../components/PropertyConfigBadge";
8
6
  import { ErrorBoundary, IconButton, PencilIcon, TextField } from "@rebasepro/ui";
9
7
 
10
8
  export function ImportNewPropertyFieldPreview({
@@ -6,11 +6,9 @@ import {
6
6
  } from "@rebasepro/app";
7
7
  import { getPropertiesWithPropertiesOrder, getPropertyInPath } from "../../util";
8
8
  import { CollectionActionsProps, Properties, Property, User, CollectionConfig } from "@rebasepro/types";
9
- import {
10
- getFieldConfig,
11
- PropertyConfigBadge,
12
- useSelectionController
13
- } from "../../components";
9
+ import { getFieldConfig } from "../../components/field_configs";
10
+ import { PropertyConfigBadge } from "../../components/PropertyConfigBadge";
11
+ import { useSelectionController } from "../../components/CollectionViewBinding/useSelectionController";
14
12
  import { CollectionTableBinding } from "../../components/CollectionTableBinding/CollectionTableBinding";
15
13
  import { useCollectionRegistryController } from "../../hooks";
16
14
  import {
@@ -32,7 +30,9 @@ import {
32
30
  import { buildEntityPropertiesFromData } from "@rebasepro/inference";
33
31
  import { useImportConfig } from "../hooks";
34
32
  import { convertDataToEntity, getInferenceType } from "../utils";
35
- import { DataNewPropertiesMapping, ImportFileUpload, ImportSaveInProgress } from "../components";
33
+ import { DataNewPropertiesMapping } from "../components/DataNewPropertiesMapping";
34
+ import { ImportFileUpload } from "../components/ImportFileUpload";
35
+ import { ImportSaveInProgress } from "../components/ImportSaveInProgress";
36
36
  import { ImportConfig } from "../types";
37
37
  import { slugify } from "@rebasepro/utils";
38
38
 
@@ -1,5 +1,5 @@
1
1
  import type { Dispatch, SetStateAction } from "react";
2
- import { EditorBubbleItem } from "../components";
2
+ import { EditorBubbleItem } from "../components/editor-bubble-item";
3
3
  import { Button, CheckIcon, ChevronDownIcon, Popover } from "@rebasepro/ui";
4
4
  import { useProseMirrorContext } from "../hooks/useProseMirrorContext";
5
5
  import { isMarkActive, getMarkAttributes, setMark, unsetMark } from "../utils/prosemirror-utils";
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { EditorState, Transaction } from "prosemirror-state";
3
- import { EditorBubbleItem } from "../components";
3
+ import { EditorBubbleItem } from "../components/editor-bubble-item";
4
4
  import { useTranslation } from "@rebasepro/app";
5
5
 
6
6
  import {
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { EditorState, Transaction } from "prosemirror-state";
3
- import { EditorBubbleItem } from "../components";
3
+ import { EditorBubbleItem } from "../components/editor-bubble-item";
4
4
  import type { SelectorItem } from "./node-selector";
5
5
  import { BoldIcon, Button, cls, CodeIcon, ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@rebasepro/ui";
6
6
  import { useProseMirrorContext } from "../hooks/useProseMirrorContext";
@@ -15,7 +15,10 @@ import { getFormFieldKeys } from "@rebasepro/app";
15
15
  import { Alert, Button, Chip, cls, Dialog, DialogActions, DialogContent, DialogTitle, iconSize, paperMixin, Tooltip, Typography } from "@rebasepro/ui";
16
16
  import { Formex, FormexController, useCreateFormex } from "@rebasepro/forms";
17
17
 
18
- import { FormEntry, FormLayout, LabelWithIconAndTooltip, PropertyFieldBinding } from "../form";
18
+ import { FormEntry } from "./components/FormEntry";
19
+ import { FormLayout } from "./components/FormLayout";
20
+ import { LabelWithIconAndTooltip } from "./components/LabelWithIconAndTooltip";
21
+ import { PropertyFieldBinding } from "./PropertyFieldBinding";
19
22
  import { flattenKeys } from "@rebasepro/app";
20
23
  import { ErrorFocus } from "./components/ErrorFocus";
21
24
  import { CustomFieldValidator, getEntitySchema } from "./validation";
@@ -26,7 +26,9 @@ import {
26
26
  saveEntityToCache
27
27
  } from "@rebasepro/app";
28
28
 
29
- import { useCollectionRegistryController, useSidePanel, useCMSContext } from "../index";
29
+ import { useCollectionRegistryController } from "../hooks/navigation/contexts/CollectionRegistryContext";
30
+ import { useSidePanel } from "../hooks/useSidePanel";
31
+ import { useCMSContext } from "../hooks/useCMSContext";
30
32
  import { EntityForm } from "./EntityForm";
31
33
  import {
32
34
  extractTouchedValues,
@@ -2,7 +2,8 @@ import type { FieldProps } from "../../types/fields";
2
2
  import type { ArrayProperty, Property } from "@rebasepro/types";
3
3
  import React from "react";
4
4
  ;
5
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
5
+ import { FieldHelperText } from "../components/FieldHelperText";
6
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
6
7
  import { PropertyFieldBinding } from "../PropertyFieldBinding";
7
8
  import { ExpandablePanel, Typography } from "@rebasepro/ui";
8
9
  import { getArrayResolvedProperties, isReadOnly } from "@rebasepro/common";
@@ -5,7 +5,8 @@ import type { ArrayProperty, Property } from "@rebasepro/types";
5
5
  import React, { useCallback, useMemo } from "react";
6
6
  import { Entity, EntityReference } from "@rebasepro/types";
7
7
  import { ReferencePreview } from "../../preview";
8
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
8
+ import { FieldHelperText } from "../components/FieldHelperText";
9
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
9
10
  import { ArrayContainer, ArrayEntryParams } from "../../components/ArrayContainer";
10
11
  import { getIconForProperty } from "../../util/property_utils";
11
12
  import { getReferenceFrom } from "@rebasepro/common";
@@ -13,7 +14,7 @@ import { getReferenceFrom } from "@rebasepro/common";
13
14
  import { useTranslation, ErrorView } from "@rebasepro/app";
14
15
  import { Button, cls, ExpandablePanel, fieldBackgroundMixin, PencilIcon, Typography } from "@rebasepro/ui";
15
16
  import { useClearRestoreValue } from "../useClearRestoreValue";
16
- import { useCollectionRegistryController } from "../../index";
17
+ import { useCollectionRegistryController } from "../../hooks/navigation/contexts/CollectionRegistryContext";
17
18
 
18
19
  type ArrayOfReferencesFieldProps = FieldProps<ArrayProperty, EntityReference[]>;
19
20
 
@@ -4,7 +4,8 @@ import React, { useEffect, useState } from "react";
4
4
 
5
5
  import { Field, useFormex } from "@rebasepro/forms";
6
6
 
7
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
7
+ import { FieldHelperText } from "../components/FieldHelperText";
8
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
8
9
  import { PropertyFieldBinding } from "../PropertyFieldBinding";
9
10
  import { EnumValuesChip } from "../../preview";
10
11
 
@@ -4,7 +4,8 @@ import React from "react";
4
4
 
5
5
  ;
6
6
 
7
- import { FieldHelperText, LabelWithIcon } from "../components";
7
+ import { FieldHelperText } from "../components/FieldHelperText";
8
+ import { LabelWithIcon } from "../components/LabelWithIcon";
8
9
  import { useCustomizationController } from "@rebasepro/app";
9
10
  import { getIconForProperty } from "../../util/property_utils";
10
11
  import { DateTimeField } from "@rebasepro/ui";
@@ -4,7 +4,8 @@ import React, { useEffect, useState } from "react";
4
4
  import { DataType, GeoPoint } from "@rebasepro/types";
5
5
 
6
6
  import { ArrayContainer } from "../../components/ArrayContainer";
7
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
7
+ import { FieldHelperText } from "../components/FieldHelperText";
8
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
8
9
  import {
9
10
  BooleanSwitchWithLabel,
10
11
  Button,
@@ -7,7 +7,8 @@ import { useTranslation } from "@rebasepro/app";
7
7
  import { ErrorBoundary } from "@rebasepro/ui";
8
8
  import { getIconForProperty } from "../../util/property_utils";
9
9
  import { isHidden, isReadOnly } from "@rebasepro/common";
10
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
10
+ import { FieldHelperText } from "../components/FieldHelperText";
11
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
11
12
  import { PropertyFieldBinding } from "../PropertyFieldBinding";
12
13
  import { cls, ExpandablePanel } from "@rebasepro/ui";
13
14
 
@@ -1,5 +1,6 @@
1
1
  import React, { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
2
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
2
+ import { FieldHelperText } from "../components/FieldHelperText";
3
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
3
4
  import { useAuthController, useStorageSource } from "@rebasepro/app";
4
5
  import { useStorageSources } from "@rebasepro/app";
5
6
  import { resolveStorageSource } from "@rebasepro/common";
@@ -3,7 +3,8 @@ import type { ArrayProperty, Property } from "@rebasepro/types";
3
3
  import React, { useCallback } from "react";
4
4
 
5
5
  ;
6
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
6
+ import { FieldHelperText } from "../components/FieldHelperText";
7
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
7
8
  import { EnumValuesChip } from "../../preview";
8
9
  import { getIconForProperty } from "../../util/property_utils";
9
10
  import { enumToObjectEntries, getLabelOrConfigFrom } from "@rebasepro/common";
@@ -3,7 +3,8 @@ import type { FieldProps } from "../../types/fields";
3
3
  import type { RelationProperty } from "@rebasepro/types";
4
4
  import { Entity, getCollectionDataPath, getDataSourceCapabilities } from "@rebasepro/types";
5
5
  import React, { useCallback } from "react";
6
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
6
+ import { FieldHelperText } from "../components/FieldHelperText";
7
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
7
8
  import { ArrayContainer, ArrayEntryParams } from "../../components/ArrayContainer";
8
9
  import { getIconForProperty } from "../../util/property_utils";
9
10
  import { getRelationFrom, resolveRelationProperty } from "@rebasepro/common";
@@ -5,7 +5,8 @@ import React from "react";
5
5
  ;
6
6
 
7
7
  import { PropertyPreview } from "../../preview";
8
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
8
+ import { FieldHelperText } from "../components/FieldHelperText";
9
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
9
10
  import { ErrorBoundary } from "@rebasepro/ui";
10
11
  import { getIconForProperty } from "../../util/property_utils";
11
12
  import { cls } from "@rebasepro/ui";
@@ -7,7 +7,8 @@ import React, { useCallback, useMemo } from "react";
7
7
  import { Entity, EntityReference } from "@rebasepro/types";
8
8
  import { ErrorView } from "@rebasepro/app";
9
9
  import { ReadOnlyFieldBinding } from "./ReadOnlyFieldBinding";
10
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
10
+ import { FieldHelperText } from "../components/FieldHelperText";
11
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
11
12
  import { EntityPreviewContainer } from "../../components/EntityPreviewBinding";
12
13
  import { ReferencePreview } from "../../preview";
13
14
  import { IconForView } from "@rebasepro/app";
@@ -15,7 +16,7 @@ import { getIconForProperty } from "../../util/property_utils";
15
16
  import { getReferenceFrom } from "@rebasepro/common";
16
17
  import { useClearRestoreValue } from "../useClearRestoreValue";
17
18
  import { cls } from "@rebasepro/ui";
18
- import { useCollectionRegistryController } from "../../index";
19
+ import { useCollectionRegistryController } from "../../hooks/navigation/contexts/CollectionRegistryContext";
19
20
 
20
21
  /**
21
22
  * Field that opens a reference selection dialog.
@@ -3,7 +3,8 @@ import type { FieldProps } from "../../types/fields";
3
3
  import type { RelationProperty } from "@rebasepro/types";
4
4
  import { Entity, getCollectionDataPath, getDataSourceCapabilities, Relation } from "@rebasepro/types";
5
5
  import React, { useCallback } from "react";
6
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
6
+ import { FieldHelperText } from "../components/FieldHelperText";
7
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
7
8
  import { EntityPreviewContainer } from "../../components/EntityPreviewBinding";
8
9
  import { ErrorView, IconForView } from "@rebasepro/app";
9
10
  import { getIconForProperty } from "../../util/property_utils";
@@ -2,7 +2,8 @@ import type { FieldProps, PropertyFieldBindingProps } from "../../types/fields";
2
2
  import type { ArrayProperty } from "@rebasepro/types";
3
3
  import React, { useState } from "react";
4
4
  ;
5
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
5
+ import { FieldHelperText } from "../components/FieldHelperText";
6
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
6
7
  import { ArrayContainer, ArrayEntryParams } from "../../components/ArrayContainer";
7
8
  import { ErrorBoundary } from "@rebasepro/ui";
8
9
  import { getArrayResolvedProperties, getDefaultValueFor } from "@rebasepro/common";
@@ -3,7 +3,8 @@ import type { NumberProperty, StringProperty } from "@rebasepro/types";
3
3
  import React, { useCallback } from "react";
4
4
 
5
5
  ;
6
- import { FieldHelperText, LabelWithIcon } from "../components";
6
+ import { FieldHelperText } from "../components/FieldHelperText";
7
+ import { LabelWithIcon } from "../components/LabelWithIcon";
7
8
  import { EnumValuesChip } from "../../preview";
8
9
  import { getIconForProperty } from "../../util/property_utils";
9
10
  import { cls, IconButton, Select, SelectItem, XIcon } from "@rebasepro/ui";
@@ -5,7 +5,8 @@ import React, { useCallback, useState } from "react";
5
5
  import { StorageConfig } from "@rebasepro/types";
6
6
  import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
7
7
  import { useDropzone } from "react-dropzone";
8
- import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
8
+ import { FieldHelperText } from "../components/FieldHelperText";
9
+ import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
9
10
 
10
11
  import { isReadOnly } from "@rebasepro/common";
11
12
  import { getIconForProperty } from "../../util/property_utils";
@@ -4,7 +4,8 @@ import React from "react";
4
4
 
5
5
  ;
6
6
  import { getIconForProperty } from "../../util/property_utils";
7
- import { FieldHelperText, LabelWithIcon } from "../components";
7
+ import { FieldHelperText } from "../components/FieldHelperText";
8
+ import { LabelWithIcon } from "../components/LabelWithIcon";
8
9
  import { BooleanSwitchWithLabel } from "@rebasepro/ui";
9
10
  import { useClearRestoreValue } from "../useClearRestoreValue";
10
11
  import { PropertyIdCopyTooltip } from "../../components/PropertyIdCopyTooltip";
@@ -13,7 +13,8 @@ import {
13
13
  XIcon
14
14
  } from "@rebasepro/ui";
15
15
  import { PreviewType } from "@rebasepro/types";
16
- import { FieldHelperText, LabelWithIcon } from "../components";
16
+ import { FieldHelperText } from "../components/FieldHelperText";
17
+ import { LabelWithIcon } from "../components/LabelWithIcon";
17
18
  import { PropertyPreview } from "../../preview";
18
19
  import { useClearRestoreValue } from "../useClearRestoreValue";
19
20
  import { PropertyIdCopyTooltip } from "../../components/PropertyIdCopyTooltip";
@@ -2,7 +2,8 @@ import type { FieldProps } from "../../types/fields";
2
2
  import type { StringProperty } from "@rebasepro/types";
3
3
  import React from "react";
4
4
 
5
- import { FieldHelperText, LabelWithIcon } from "../components";
5
+ import { FieldHelperText } from "../components/FieldHelperText";
6
+ import { LabelWithIcon } from "../components/LabelWithIcon";
6
7
  import { getIconForProperty } from "../../util/property_utils";
7
8
  import { PropertyIdCopyTooltip } from "../../components/PropertyIdCopyTooltip";
8
9
  import { UserSelector } from "../../components/UserSelector";
@@ -11,7 +11,8 @@ import {
11
11
  TextField,
12
12
  Trash2Icon
13
13
  } from "@rebasepro/ui";
14
- import { FieldHelperText, LabelWithIcon } from "../components";
14
+ import { FieldHelperText } from "../components/FieldHelperText";
15
+ import { LabelWithIcon } from "../components/LabelWithIcon";
15
16
  import { useClearRestoreValue } from "../useClearRestoreValue";
16
17
  import { PropertyIdCopyTooltip } from "../../components/PropertyIdCopyTooltip";
17
18
  import { getIconForProperty } from "../../util/property_utils";
@@ -7,6 +7,7 @@ import {
7
7
  getNavigationEntriesFromPath,
8
8
  NavigationViewInternal,
9
9
  removeInitialAndTrailingSlashes,
10
+ removeTrailingSlash,
10
11
  resolveDefaultSelectedView
11
12
  } from "@rebasepro/common";
12
13
  import { resolvedSelectedEntityView } from "../util/resolutions";
@@ -280,6 +281,13 @@ export function buildSidePanelsFromUrl(path: string, collections: CollectionConf
280
281
 
281
282
  }
282
283
 
284
+ // `edit` is not a registered view, so the navigation parser skips it. Pick it
285
+ // up from the raw path so that reloading an edit URL reopens the edit form
286
+ // rather than silently dropping the user back on the detail view.
287
+ if (sidePanel && !sidePanel.selectedTab && removeTrailingSlash(path).endsWith("/edit")) {
288
+ sidePanel.selectedTab = "edit";
289
+ }
290
+
283
291
  // When the URL doesn't contain a tab segment but the collection has a
284
292
  // defaultSelectedView, resolve it so the panel opens with the correct
285
293
  // width and the URL is updated on the next replace() cycle.
@@ -1,8 +1,8 @@
1
- import { SelectionProps, SelectionTableBinding } from "../components";
1
+ import { SelectionProps, SelectionTableBinding } from "../components/ReferenceTable/SelectionTableBinding";
2
2
  import type { CollectionConfig } from "@rebasepro/types";
3
3
  import { useCallback, useMemo } from "react";
4
- import { useSideDialogsController } from "../index";
5
- import { useCollectionRegistryController } from "../index";
4
+ import { useSideDialogsController } from "./useSideDialogsController";
5
+ import { useCollectionRegistryController } from "./navigation/contexts/CollectionRegistryContext";
6
6
 
7
7
  /**
8
8
  * This hook is used to open a side dialog that allows the selection
@@ -3,7 +3,7 @@ import React, { CSSProperties, useMemo, useState, useEffect } from "react";impor
3
3
  import { PreviewSize } from "../../types/components/PropertyPreviewProps";
4
4
  import { getThumbnailMeasure } from "../util";
5
5
  import { useTranslation } from "@rebasepro/app";
6
- import { sanitizeUrl } from "./UrlComponentPreview";
6
+ import { sanitizeUrl } from "../util";
7
7
 
8
8
  /**
9
9
  * @group Preview components
@@ -8,7 +8,7 @@ import { Skeleton } from "@rebasepro/ui";
8
8
  import { ErrorBoundary } from "@rebasepro/ui";
9
9
  import { ErrorView } from "@rebasepro/app";
10
10
  import { EntityPreviewBinding, EntityPreviewContainer } from "../../components/EntityPreviewBinding";
11
- import { useCollectionRegistryController } from "../../index";
11
+ import { useCollectionRegistryController } from "../../hooks/navigation/contexts/CollectionRegistryContext";
12
12
  import { getEntityTitlePropertyKey } from "../../util/previews";
13
13
  import { getValueInPath } from "@rebasepro/utils";
14
14