@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
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import { useAuthController, useCustomizationController, IconForView, useSnackbarController, useLargeLayout, AIIcon, useRebaseContext, ErrorView, ConfirmationDialog, useUnsavedChangesDialog, UnsavedChangesDialog } from "@rebasepro/core";
4
- import { bi as useCollectionsConfigController, J as FieldCaption, ad as SearchIconsView, aL as getFieldConfig, $ as PropertyConfigBadge, aN as getFullId, aV as idToPropertiesPath, aZ as namespaceToPropertiesOrderPath, bu as validateCollectionJson, bh as useCollectionRegistryController, C as CollectionGenerationApiError, bg as useCollectionEditorController, O as ImportFileUpload, aR as getInferenceType, P as ImportNewPropertyFieldPreview, p as DataNewPropertiesMapping, aM as getFieldId, bp as useSelectionController, ay as convertDataToEntity, w as EntityCollectionTable, bm as useNavigationStateController, bk as useImportConfig, bt as useUrlController, Q as ImportSaveInProgress, aO as getFullIdPath } from "./util-DtbWD7LF.js";
4
+ import { bo as useCollectionsConfigController, N as FieldCaption, ai as SearchIconsView, aQ as getFieldConfig, a4 as PropertyConfigBadge, aS as getFullId, a_ as idToPropertiesPath, b2 as namespaceToPropertiesOrderPath, bA as validateCollectionJson, bn as useCollectionRegistryController, l as CollectionGenerationApiError, bm as useCollectionEditorController, S as ImportFileUpload, aW as getInferenceType, T as ImportNewPropertyFieldPreview, p as DataNewPropertiesMapping, aR as getFieldId, bv as useSelectionController, aD as convertDataToEntity, y as EntityCollectionTable, bs as useNavigationStateController, bq as useImportConfig, bz as useUrlController, U as ImportSaveInProgress, aT as getFullIdPath } from "./util-ZM9gQuCv.js";
5
5
  import * as React from "react";
6
6
  import React__default, { useState, useRef, useMemo, useEffect } from "react";
7
- import { Chip, Typography, cls, Tooltip, IconButton, TextField, DebouncedTextField, Dialog, Container, ColumnsIcon, SquareIcon, PanelLeftIcon, AppWindow, ToggleButtonGroup, ListIcon, TableIcon, LayoutGridIcon, KanbanIcon, Select, SelectItem, XIcon, iconSize, Button, BooleanSwitchWithLabel, DialogTitle, DialogContent, CopyIcon, DialogActions, CircularProgress, FileSearchIcon, PlusIcon, ErrorBoundary, defaultBorderMixin, Table, TableHeader, TableCell, TableBody, TableRow, Trash2Icon, CodeIcon, Alert, Menu, ShoppingCartIcon, UserIcon, FileTextIcon, FileIcon, Card, CircularProgressCenter, Paper, KeyIcon, MultiSelect, MultiSelectItem, coolIconKeys, Tabs, Tab, LoadingButton, ArrowLeftIcon, CheckIcon } from "@rebasepro/ui";
7
+ import { Chip, Typography, cls, Tooltip, IconButton, TextField, DebouncedTextField, Dialog, Container, ColumnsIcon, SquareIcon, PanelLeftIcon, AppWindow, ToggleButtonGroup, ListIcon, TableIcon, LayoutGridIcon, KanbanIcon, Select, SelectItem, XIcon, iconSize, Button, BooleanSwitchWithLabel, DialogTitle, DialogContent, CopyIcon, DialogActions, CircularProgress, FileSearchIcon, PlusIcon, ErrorBoundary, defaultBorderMixin, CodeIcon, Alert, Menu, ShoppingCartIcon, UserIcon, FileTextIcon, FileIcon, Card, CircularProgressCenter, Paper, KeyIcon, Trash2Icon, MultiSelect, MultiSelectItem, coolIconKeys, Tabs, Tab, LoadingButton, ArrowLeftIcon, CheckIcon } from "@rebasepro/ui";
8
8
  import { isPropertyBuilder, getSubcollections, getTableName, removeInitialAndTrailingSlashes } from "@rebasepro/common";
9
9
  import "fast-equals";
10
10
  import { useFormex, getIn, Field, clone, useCreateFormex, Formex } from "@rebasepro/formex";
@@ -21,7 +21,8 @@ import "exceljs";
21
21
  import { buildPropertyFromData, buildEntityPropertiesFromData } from "@rebasepro/schema-inference";
22
22
  import "date-fns";
23
23
  import "date-fns/locale";
24
- import { b as PropertyFormDialog, d as useAIModifiedPaths, c as PropertyTree, a as PropertyForm, s as supportedFields, u as updatePropertyFromWidget, A as AIModifiedPathsProvider } from "./PropertyEditView-BB5xjnhZ.js";
24
+ import "fuse.js";
25
+ import { b as PropertyFormDialog, d as useAIModifiedPaths, c as PropertyTree, a as PropertyForm, s as supportedFields, u as updatePropertyFromWidget, A as AIModifiedPathsProvider } from "./PropertyEditView-CvRSV-A2.js";
25
26
  import JSON5 from "json5";
26
27
  import { Highlight, themes } from "prism-react-renderer";
27
28
  const CollectionEditorSchema = z.object({
@@ -1192,8 +1193,8 @@ function CollectionPropertiesEditorForm({
1192
1193
  const newProp = newProps[key];
1193
1194
  if (!existingProp) {
1194
1195
  keys.push(fullKey);
1195
- } else if (typeof newProp === "object" && "type" in newProp && newProp.dataType === "map" && newProp.properties) {
1196
- const existingMapProps = typeof existingProp === "object" && "type" in existingProp && existingProp.dataType === "map" ? existingProp.properties : void 0;
1196
+ } else if (typeof newProp === "object" && "type" in newProp && newProp.type === "map" && newProp.properties) {
1197
+ const existingMapProps = typeof existingProp === "object" && "type" in existingProp && existingProp.type === "map" ? existingProp.properties : void 0;
1197
1198
  keys.push(...findNewPropertyKeys(existingMapProps, newProp.properties, fullKey));
1198
1199
  }
1199
1200
  }
@@ -1210,7 +1211,7 @@ function CollectionPropertiesEditorForm({
1210
1211
  const newProp_0 = newProps_0[key_0];
1211
1212
  if (!existingProp_0) {
1212
1213
  result[key_0] = newProp_0;
1213
- } else if (typeof existingProp_0 === "object" && "type" in existingProp_0 && existingProp_0.dataType === "map" && typeof newProp_0 === "object" && "type" in newProp_0 && newProp_0.dataType === "map" && newProp_0.properties) {
1214
+ } else if (typeof existingProp_0 === "object" && "type" in existingProp_0 && existingProp_0.type === "map" && typeof newProp_0 === "object" && "type" in newProp_0 && newProp_0.type === "map" && newProp_0.properties) {
1214
1215
  const existingMapProps_0 = existingProp_0.properties;
1215
1216
  if (existingMapProps_0) {
1216
1217
  result[key_0] = {
@@ -1373,7 +1374,7 @@ function CollectionPropertiesEditorForm({
1373
1374
  /* @__PURE__ */ jsx(Button, { className: "mt-4 xl:mt-8 w-full", variant: "filled", color: "neutral", disabled: configController?.readOnly, onClick: () => setNewPropertyDialogOpen(true), startIcon: /* @__PURE__ */ jsx(PlusIcon, {}), children: "Add new property" })
1374
1375
  ] }),
1375
1376
  !asDialog && /* @__PURE__ */ jsx("div", { className: "col-span-12 lg:col-span-7 p-4 md:py-8 md:px-4 h-full overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "sticky top-8 min-h-full w-full flex flex-col justify-center", children: [
1376
- selectedPropertyFullId && selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs }, `edit_view_${selectedPropertyIndex}_${generationCounter}`),
1377
+ selectedPropertyFullId && !!selectedProperty && !isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(PropertyForm, { inArray: false, existingProperty: !isNewCollection, autoUpdateId: false, allowDataInference: !isNewCollection, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs }, `edit_view_${selectedPropertyIndex}_${generationCounter}`),
1377
1378
  !selectedProperty && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col items-center justify-center h-full gap-4", children: [
1378
1379
  /* @__PURE__ */ jsx(Typography, { variant: "label", className: "", children: emptyCollection ? "Now you can add your first property" : "Select a property to edit it" }),
1379
1380
  /* @__PURE__ */ jsxs(Button, { disabled: configController?.readOnly, onClick: () => setNewPropertyDialogOpen(true), children: [
@@ -1381,7 +1382,7 @@ function CollectionPropertiesEditorForm({
1381
1382
  "Add new property"
1382
1383
  ] })
1383
1384
  ] }),
1384
- selectedProperty && isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(Typography, { variant: "label", className: "flex items-center justify-center", children: "This property is defined as a property builder in code" })
1385
+ !!selectedProperty && isPropertyBuilder(selectedProperty) && /* @__PURE__ */ jsx(Typography, { variant: "label", className: "flex items-center justify-center", children: "This property is defined as a property builder in code" })
1385
1386
  ] }) }),
1386
1387
  asDialog && /* @__PURE__ */ jsx(PropertyFormDialog, { inArray: false, open: selectedPropertyIndex !== void 0, autoUpdateId: !selectedProperty, allowDataInference: !isNewCollection, existingProperty: true, autoOpenTypeSelect: false, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, onPropertyChanged, onDelete: deleteProperty, onError: onPropertyErrorInternal, forceShowErrors: showErrors, initialErrors, getData, propertyConfigs, onCancel: closePropertyDialog, onOkClicked: asDialog ? closePropertyDialog : void 0 }, `edit_view_${selectedPropertyIndex}_${generationCounter}`)
1387
1388
  ] });
@@ -1391,180 +1392,6 @@ function CollectionPropertiesEditorForm({
1391
1392
  /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(GetCodeDialog, { collection: values, open: codeDialogOpen, onOpenChange: setCodeDialogOpen }) })
1392
1393
  ] });
1393
1394
  }
1394
- function CollectionRelationsTab() {
1395
- const {
1396
- values,
1397
- setFieldValue
1398
- } = useFormex();
1399
- const {
1400
- collections
1401
- } = useCollectionsConfigController();
1402
- const [editingRelationIndex, setEditingRelationIndex] = useState(null);
1403
- const [editingRelationState, setEditingRelationState] = useState(null);
1404
- const getTargetSlug = (target) => {
1405
- if (typeof target === "string") {
1406
- const match = target.match(/\(\)\s*=>\s*([a-zA-Z0-9_]+)/);
1407
- return match ? match[1] : target;
1408
- }
1409
- if (typeof target === "function") {
1410
- try {
1411
- if (target.slug) return target.slug;
1412
- const col = target();
1413
- return col?.slug || col?.name || "";
1414
- } catch (e) {
1415
- return "";
1416
- }
1417
- }
1418
- return "";
1419
- };
1420
- const relations = values.relations || [];
1421
- const handleDelete = (index) => {
1422
- const newRelations = [...relations];
1423
- newRelations.splice(index, 1);
1424
- setFieldValue("relations", newRelations);
1425
- };
1426
- const handleSave = () => {
1427
- if (!editingRelationState) return;
1428
- const newRelations_0 = [...relations];
1429
- if (editingRelationIndex === -1) {
1430
- newRelations_0.push(editingRelationState);
1431
- } else if (editingRelationIndex !== null) {
1432
- newRelations_0[editingRelationIndex] = editingRelationState;
1433
- }
1434
- setFieldValue("relations", newRelations_0);
1435
- setEditingRelationIndex(null);
1436
- setEditingRelationState(null);
1437
- };
1438
- const handleCancel = () => {
1439
- setEditingRelationIndex(null);
1440
- setEditingRelationState(null);
1441
- };
1442
- return /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto h-full w-full", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto h-full", children: [
1443
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-8", children: [
1444
- /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Relations" }),
1445
- /* @__PURE__ */ jsx(Button, { variant: "filled", color: "neutral", onClick: () => {
1446
- setEditingRelationIndex(-1);
1447
- setEditingRelationState({
1448
- relationName: "",
1449
- target: "",
1450
- cardinality: "many",
1451
- direction: "owning"
1452
- });
1453
- }, children: "ADD RELATION" })
1454
- ] }),
1455
- relations.length > 0 ? /* @__PURE__ */ jsx("div", { className: "w-full overflow-auto border dark:border-surface-800 rounded-lg", children: /* @__PURE__ */ jsxs(Table, { className: "w-full", children: [
1456
- /* @__PURE__ */ jsxs(TableHeader, { children: [
1457
- /* @__PURE__ */ jsx(TableCell, { header: true, className: "w-16" }),
1458
- /* @__PURE__ */ jsx(TableCell, { header: true, children: "Name" }),
1459
- /* @__PURE__ */ jsx(TableCell, { header: true, children: "Target" }),
1460
- /* @__PURE__ */ jsx(TableCell, { header: true, children: "Cardinality" }),
1461
- /* @__PURE__ */ jsx(TableCell, { header: true, children: "Direction" })
1462
- ] }),
1463
- /* @__PURE__ */ jsx(TableBody, { children: relations.map((relation, index_0) => /* @__PURE__ */ jsxs(TableRow, { className: "cursor-pointer hover:bg-surface-100 dark:hover:bg-surface-800", onClick: () => {
1464
- setEditingRelationIndex(index_0);
1465
- setEditingRelationState(relation);
1466
- }, children: [
1467
- /* @__PURE__ */ jsx(TableCell, { style: {
1468
- width: "64px"
1469
- }, children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: (e_0) => {
1470
- e_0.stopPropagation();
1471
- handleDelete(index_0);
1472
- }, children: /* @__PURE__ */ jsx(Trash2Icon, {}) }) }),
1473
- /* @__PURE__ */ jsx(TableCell, { className: "font-medium", children: relation.relationName }),
1474
- /* @__PURE__ */ jsx(TableCell, { children: getTargetSlug(relation.target) || "Function" }),
1475
- /* @__PURE__ */ jsx(TableCell, { children: relation.cardinality }),
1476
- /* @__PURE__ */ jsx(TableCell, { children: relation.direction || "owning" })
1477
- ] }, index_0)) })
1478
- ] }) }) : /* @__PURE__ */ jsxs("div", { className: "flex-grow flex flex-col border border-dashed dark:border-surface-700 rounded-lg items-center justify-center text-text-disabled py-20", children: [
1479
- /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "mb-4", children: "No relations defined for this collection." }),
1480
- /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
1481
- setEditingRelationIndex(-1);
1482
- setEditingRelationState({
1483
- relationName: "",
1484
- target: "",
1485
- cardinality: "many",
1486
- direction: "owning"
1487
- });
1488
- }, children: "Create your first relation" })
1489
- ] }),
1490
- /* @__PURE__ */ jsx(Dialog, { open: !!editingRelationState, onOpenChange: (open) => !open && handleCancel(), maxWidth: "2xl", children: editingRelationState && /* @__PURE__ */ jsxs(Fragment, { children: [
1491
- /* @__PURE__ */ jsx(DialogTitle, { className: "flex justify-between items-center w-full", variant: "h6", children: editingRelationIndex === -1 ? "New Relation" : "Edit Relation" }),
1492
- /* @__PURE__ */ jsx(DialogContent, { includeMargin: false, className: cls("p-4 md:p-6 border-t bg-white dark:bg-surface-900", defaultBorderMixin), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 max-w-2xl mx-auto", children: [
1493
- /* @__PURE__ */ jsx(TextField, { label: "Relation Name", name: "relationName", placeholder: "e.g. posts", value: editingRelationState.relationName || "", onChange: (e_1) => setEditingRelationState((prev) => prev ? {
1494
- ...prev,
1495
- relationName: e_1.target.value
1496
- } : null) }),
1497
- /* @__PURE__ */ jsx(Select, { fullWidth: true, label: "Target Collection", value: getTargetSlug(editingRelationState.target), onValueChange: (val) => {
1498
- setEditingRelationState((prev_0) => {
1499
- if (!prev_0) return null;
1500
- const targetFn = () => collections?.find((c2) => c2.slug === val) || {
1501
- slug: val
1502
- };
1503
- targetFn.slug = val;
1504
- return {
1505
- ...prev_0,
1506
- target: targetFn
1507
- };
1508
- });
1509
- }, children: collections?.map((col_0) => /* @__PURE__ */ jsx(SelectItem, { value: col_0.slug, children: col_0.name || col_0.slug }, col_0.slug)) }),
1510
- /* @__PURE__ */ jsxs(Select, { fullWidth: true, label: "Cardinality", value: editingRelationState.cardinality || "many", onValueChange: (val_0) => setEditingRelationState((prev_1) => prev_1 ? {
1511
- ...prev_1,
1512
- cardinality: val_0
1513
- } : null), children: [
1514
- /* @__PURE__ */ jsx(SelectItem, { value: "many", children: "Many" }),
1515
- /* @__PURE__ */ jsx(SelectItem, { value: "one", children: "One" })
1516
- ] }),
1517
- /* @__PURE__ */ jsxs(Select, { fullWidth: true, label: "Direction", value: editingRelationState.direction || "owning", onValueChange: (val_1) => setEditingRelationState((prev_2) => prev_2 ? {
1518
- ...prev_2,
1519
- direction: val_1
1520
- } : null), children: [
1521
- /* @__PURE__ */ jsx(SelectItem, { value: "owning", children: "Owning" }),
1522
- /* @__PURE__ */ jsx(SelectItem, { value: "inverse", children: "Inverse" })
1523
- ] }),
1524
- editingRelationState.cardinality === "many" && editingRelationState.direction === "owning" && /* @__PURE__ */ jsxs("div", { className: cls("flex flex-col gap-4 mt-4 pt-4 border-t", defaultBorderMixin), children: [
1525
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "text-text-primary", children: "Intermediate Table" }),
1526
- /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-secondary -mt-3", children: "Required for many-to-many relationships. This defines the junction table linking both collections." }),
1527
- /* @__PURE__ */ jsx(TextField, { label: "Table Name", name: "throughTable", placeholder: "e.g. user_roles", value: editingRelationState.through?.table || "", onChange: (e_2) => setEditingRelationState((prev_3) => prev_3 ? {
1528
- ...prev_3,
1529
- through: {
1530
- ...prev_3.through || {
1531
- sourceColumn: "",
1532
- targetColumn: ""
1533
- },
1534
- table: e_2.target.value
1535
- }
1536
- } : null) }),
1537
- /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
1538
- /* @__PURE__ */ jsx(TextField, { className: "flex-1", label: "Source Column", name: "sourceColumn", placeholder: "FK to this collection", value: editingRelationState.through?.sourceColumn || "", onChange: (e_3) => setEditingRelationState((prev_4) => prev_4 ? {
1539
- ...prev_4,
1540
- through: {
1541
- ...prev_4.through || {
1542
- table: "",
1543
- targetColumn: ""
1544
- },
1545
- sourceColumn: e_3.target.value
1546
- }
1547
- } : null) }),
1548
- /* @__PURE__ */ jsx(TextField, { className: "flex-1", label: "Target Column", name: "targetColumn", placeholder: "FK to target collection", value: editingRelationState.through?.targetColumn || "", onChange: (e_4) => setEditingRelationState((prev_5) => prev_5 ? {
1549
- ...prev_5,
1550
- through: {
1551
- ...prev_5.through || {
1552
- table: "",
1553
- sourceColumn: ""
1554
- },
1555
- targetColumn: e_4.target.value
1556
- }
1557
- } : null) })
1558
- ] })
1559
- ] })
1560
- ] }) }),
1561
- /* @__PURE__ */ jsxs(DialogActions, { children: [
1562
- /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleCancel, children: "Cancel" }),
1563
- /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: handleSave, disabled: !editingRelationState.relationName || !editingRelationState.target, children: "Save" })
1564
- ] })
1565
- ] }) })
1566
- ] }) });
1567
- }
1568
1395
  const EXAMPLE_JSON = `{
1569
1396
  "id": "products",
1570
1397
  "name": "Products",
@@ -1587,7 +1414,7 @@ const EXAMPLE_JSON = `{
1587
1414
  }
1588
1415
  }`;
1589
1416
  function CollectionJsonImportDialog(t0) {
1590
- const $ = c(46);
1417
+ const $ = c(44);
1591
1418
  const {
1592
1419
  open,
1593
1420
  onClose,
@@ -1722,105 +1549,97 @@ function CollectionJsonImportDialog(t0) {
1722
1549
  } else {
1723
1550
  t11 = $[18];
1724
1551
  }
1725
- const t12 = errors.length > 0 && touched ? "border-red-500 dark:border-red-400" : "border-surface-300 dark:border-surface-600";
1552
+ const t12 = errors.length > 0 && touched;
1726
1553
  let t13;
1727
- if ($[19] !== t12) {
1728
- t13 = cls("w-full p-3 font-mono text-sm rounded-md border resize-none overflow-y-auto", "bg-surface-50 dark:bg-surface-800", "focus:outline-none focus:ring-2 focus:ring-primary", "h-[300px]", t12);
1729
- $[19] = t12;
1730
- $[20] = t13;
1554
+ if ($[19] !== jsonValue || $[20] !== t12) {
1555
+ t13 = /* @__PURE__ */ jsx(TextField, { multiline: true, minRows: 12, value: jsonValue, onChange: handleJsonChange, placeholder: EXAMPLE_JSON, error: t12, className: "w-full", inputClassName: "font-mono text-sm resize-none overflow-y-auto h-[300px]" });
1556
+ $[19] = jsonValue;
1557
+ $[20] = t12;
1558
+ $[21] = t13;
1731
1559
  } else {
1732
- t13 = $[20];
1560
+ t13 = $[21];
1733
1561
  }
1734
1562
  let t14;
1735
- if ($[21] !== jsonValue || $[22] !== t13) {
1736
- t14 = /* @__PURE__ */ jsx("textarea", { value: jsonValue, onChange: handleJsonChange, placeholder: EXAMPLE_JSON, rows: 12, className: t13 });
1737
- $[21] = jsonValue;
1738
- $[22] = t13;
1739
- $[23] = t14;
1740
- } else {
1741
- t14 = $[23];
1742
- }
1743
- let t15;
1744
- if ($[24] !== errors || $[25] !== touched) {
1745
- t15 = errors.length > 0 && touched && /* @__PURE__ */ jsxs(Alert, { color: "error", children: [
1563
+ if ($[22] !== errors || $[23] !== touched) {
1564
+ t14 = errors.length > 0 && touched && /* @__PURE__ */ jsxs(Alert, { color: "error", children: [
1746
1565
  /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "font-medium mb-2", children: "Validation errors:" }),
1747
1566
  /* @__PURE__ */ jsx("ul", { className: "list-disc list-inside space-y-1", children: errors.map(_temp$3) })
1748
1567
  ] });
1749
- $[24] = errors;
1750
- $[25] = touched;
1568
+ $[22] = errors;
1569
+ $[23] = touched;
1570
+ $[24] = t14;
1571
+ } else {
1572
+ t14 = $[24];
1573
+ }
1574
+ let t15;
1575
+ if ($[25] !== isValid) {
1576
+ t15 = isValid && /* @__PURE__ */ jsx(Alert, { color: "success", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "✓ JSON is valid and ready to import" }) });
1577
+ $[25] = isValid;
1751
1578
  $[26] = t15;
1752
1579
  } else {
1753
1580
  t15 = $[26];
1754
1581
  }
1755
1582
  let t16;
1756
- if ($[27] !== isValid) {
1757
- t16 = isValid && /* @__PURE__ */ jsx(Alert, { color: "success", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "✓ JSON is valid and ready to import" }) });
1758
- $[27] = isValid;
1759
- $[28] = t16;
1760
- } else {
1761
- t16 = $[28];
1762
- }
1763
- let t17;
1764
- if ($[29] !== t14 || $[30] !== t15 || $[31] !== t16) {
1765
- t17 = /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col gap-4", children: [
1583
+ if ($[27] !== t13 || $[28] !== t14 || $[29] !== t15) {
1584
+ t16 = /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col gap-4", children: [
1766
1585
  t11,
1586
+ t13,
1767
1587
  t14,
1768
- t15,
1769
- t16
1588
+ t15
1770
1589
  ] });
1771
- $[29] = t14;
1772
- $[30] = t15;
1773
- $[31] = t16;
1590
+ $[27] = t13;
1591
+ $[28] = t14;
1592
+ $[29] = t15;
1593
+ $[30] = t16;
1594
+ } else {
1595
+ t16 = $[30];
1596
+ }
1597
+ let t17;
1598
+ if ($[31] !== handleClose) {
1599
+ t17 = /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClose, children: "Cancel" });
1600
+ $[31] = handleClose;
1774
1601
  $[32] = t17;
1775
1602
  } else {
1776
1603
  t17 = $[32];
1777
1604
  }
1778
- let t18;
1779
- if ($[33] !== handleClose) {
1780
- t18 = /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClose, children: "Cancel" });
1781
- $[33] = handleClose;
1605
+ const t18 = !isValid;
1606
+ let t19;
1607
+ if ($[33] !== handleImport || $[34] !== t18) {
1608
+ t19 = /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: handleImport, disabled: t18, children: "Import Collection" });
1609
+ $[33] = handleImport;
1782
1610
  $[34] = t18;
1611
+ $[35] = t19;
1783
1612
  } else {
1784
- t18 = $[34];
1613
+ t19 = $[35];
1785
1614
  }
1786
- const t19 = !isValid;
1787
1615
  let t20;
1788
- if ($[35] !== handleImport || $[36] !== t19) {
1789
- t20 = /* @__PURE__ */ jsx(Button, { variant: "filled", color: "primary", onClick: handleImport, disabled: t19, children: "Import Collection" });
1790
- $[35] = handleImport;
1791
- $[36] = t19;
1792
- $[37] = t20;
1793
- } else {
1794
- t20 = $[37];
1795
- }
1796
- let t21;
1797
- if ($[38] !== t18 || $[39] !== t20) {
1798
- t21 = /* @__PURE__ */ jsxs(DialogActions, { children: [
1799
- t18,
1800
- t20
1616
+ if ($[36] !== t17 || $[37] !== t19) {
1617
+ t20 = /* @__PURE__ */ jsxs(DialogActions, { children: [
1618
+ t17,
1619
+ t19
1801
1620
  ] });
1802
- $[38] = t18;
1803
- $[39] = t20;
1804
- $[40] = t21;
1621
+ $[36] = t17;
1622
+ $[37] = t19;
1623
+ $[38] = t20;
1805
1624
  } else {
1806
- t21 = $[40];
1625
+ t20 = $[38];
1807
1626
  }
1808
- let t22;
1809
- if ($[41] !== open || $[42] !== t17 || $[43] !== t21 || $[44] !== t6) {
1810
- t22 = /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: t6, maxWidth: "2xl", children: [
1627
+ let t21;
1628
+ if ($[39] !== open || $[40] !== t16 || $[41] !== t20 || $[42] !== t6) {
1629
+ t21 = /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: t6, maxWidth: "2xl", children: [
1811
1630
  t7,
1812
- t17,
1813
- t21
1631
+ t16,
1632
+ t20
1814
1633
  ] });
1815
- $[41] = open;
1816
- $[42] = t17;
1634
+ $[39] = open;
1635
+ $[40] = t16;
1636
+ $[41] = t20;
1637
+ $[42] = t6;
1817
1638
  $[43] = t21;
1818
- $[44] = t6;
1819
- $[45] = t22;
1820
1639
  } else {
1821
- t22 = $[45];
1640
+ t21 = $[43];
1822
1641
  }
1823
- return t22;
1642
+ return t21;
1824
1643
  }
1825
1644
  function _temp$3(error, index) {
1826
1645
  return /* @__PURE__ */ jsx("li", { className: "text-sm", children: error.path ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -4460,7 +4279,7 @@ function CollectionEditorInternal({
4460
4279
  };
4461
4280
  const validation = (col) => {
4462
4281
  let errors = {};
4463
- const schema = (currentView === "properties" || currentView === "relations" || currentView === "general") && CollectionEditorSchema;
4282
+ const schema = (currentView === "properties" || currentView === "general") && CollectionEditorSchema;
4464
4283
  if (schema) {
4465
4284
  const result = schema.safeParse(col);
4466
4285
  if (!result.success) {
@@ -4582,8 +4401,7 @@ function CollectionEditorInternal({
4582
4401
  /* @__PURE__ */ jsx(Tab, { value: "general", children: "General" }),
4583
4402
  /* @__PURE__ */ jsx(Tab, { value: "display", children: "Display" }),
4584
4403
  /* @__PURE__ */ jsx(Tab, { value: "properties", children: "Properties" }),
4585
- getDataSourceCapabilities(values_1.driver).supportsRLS && /* @__PURE__ */ jsx(Tab, { value: "rls", children: "RLS" }),
4586
- getDataSourceCapabilities(values_1.driver).supportsRelations && /* @__PURE__ */ jsx(Tab, { value: "relations", children: "Relations" })
4404
+ getDataSourceCapabilities(values_1.driver).supportsRLS && /* @__PURE__ */ jsx(Tab, { value: "rls", children: "RLS" })
4587
4405
  ] }) }),
4588
4406
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
4589
4407
  generateCollection && /* @__PURE__ */ jsx(AICollectionGeneratorPopover, { existingCollection: values_1, onGenerated: handleAIGenerated, generateCollection, onAnalyticsEvent }),
@@ -4624,7 +4442,6 @@ function CollectionEditorInternal({
4624
4442
  } }),
4625
4443
  currentView === "general" && /* @__PURE__ */ jsx(GeneralSettingsForm, { existingPaths, existingIds, parentCollection, isNewCollection }),
4626
4444
  currentView === "display" && /* @__PURE__ */ jsx(DisplaySettingsForm, { expandKanban }),
4627
- currentView === "relations" && getDataSourceCapabilities(values_1.driver).supportsRelations && /* @__PURE__ */ jsx(CollectionRelationsTab, {}),
4628
4445
  currentView === "rls" && getDataSourceCapabilities(values_1.driver).supportsRLS && /* @__PURE__ */ jsx(CollectionRLSTab, {}),
4629
4446
  currentView === "properties" && /* @__PURE__ */ jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, onPropertyError: (propertyKey, namespace, error_0) => {
4630
4447
  const current = removeUndefined({
@@ -4737,4 +4554,4 @@ export {
4737
4554
  CollectionEditor,
4738
4555
  CollectionEditorDialog
4739
4556
  };
4740
- //# sourceMappingURL=CollectionEditorDialog-BXIh2AXg.js.map
4557
+ //# sourceMappingURL=CollectionEditorDialog-D0VqpLPO.js.map