@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
@@ -4,7 +4,7 @@ import React__default, { useEffect, useMemo, useContext, createContext, useState
4
4
  import { deepEqual } from "fast-equals";
5
5
  import { useFormex, getIn, Field, useCreateFormex, Formex } from "@rebasepro/formex";
6
6
  import { useTranslation, useSnackbarController, useCustomizationController, AIModifiedIndicator, IconForView, ConfirmationDialog } from "@rebasepro/core";
7
- import { a as ArrayContainer, J as FieldCaption, aL as getFieldConfig, $ as PropertyConfigBadge, aO as getFullIdPath, aN as getFullId, aV as idToPropertiesPath, aZ as namespaceToPropertiesOrderPath, a_ as namespaceToPropertiesPath, bh as useCollectionRegistryController, o as DEFAULT_FIELD_CONFIGS, aM as getFieldId } from "./util-DtbWD7LF.js";
7
+ import { a as ArrayContainer, N as FieldCaption, aQ as getFieldConfig, a4 as PropertyConfigBadge, aT as getFullIdPath, aS as getFullId, a_ as idToPropertiesPath, b2 as namespaceToPropertiesOrderPath, b3 as namespaceToPropertiesPath, bn as useCollectionRegistryController, o as DEFAULT_FIELD_CONFIGS, aR as getFieldId } from "./util-ZM9gQuCv.js";
8
8
  import { resolveEnumValues, isPropertyBuilder } from "@rebasepro/common";
9
9
  import { RefreshCcwIcon, iconSize, Badge, IconButton, SettingsIcon, Typography, DebouncedTextField, ListIcon, Button, CircularProgress, Paper, DialogTitle, DialogContent, DialogActions, Dialog, BooleanSwitchWithLabel, Tooltip, CheckSquareIcon, ExpandablePanel, Select, SelectItem, MultiSelectItem, UploadCloudIcon, MultiSelect, cls, ErrorBoundary, FunctionSquareIcon, MinusCircleIcon, FileSearchIcon, Trash2Icon, MoreVerticalIcon, ArrowUpToLineIcon, ArrowDownToLineIcon, defaultBorderMixin, MenuItem, Menu, PlusIcon, TextField, InfoLabel, AlertTriangleIcon, Card } from "@rebasepro/ui";
10
10
  import "zod";
@@ -19,6 +19,7 @@ import "exceljs";
19
19
  import { extractEnumFromValues } from "@rebasepro/schema-inference";
20
20
  import "date-fns";
21
21
  import "date-fns/locale";
22
+ import "fuse.js";
22
23
  import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
23
24
  function EnumForm(t0) {
24
25
  const $ = c(22);
@@ -1016,7 +1017,7 @@ function EnumPropertyField({
1016
1017
  ] }) }),
1017
1018
  !multiselect && /* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(Select, { disabled, position: "item-aligned", fullWidth: true, onValueChange: (value_0) => {
1018
1019
  setFieldValue("defaultValue", value_0);
1019
- }, label: t("default_value"), value: defaultValue ?? "", children: enumValues.filter((enumValue) => Boolean(enumValue?.id)).map((enumValue_0) => /* @__PURE__ */ jsx(SelectItem, { value: enumValue_0.id?.toString(), children: enumValue_0.label }, enumValue_0.id)) }) })
1020
+ }, label: t("default_value"), value: defaultValue?.toString() ?? "", children: enumValues.filter((enumValue) => Boolean(enumValue?.id)).map((enumValue_0) => /* @__PURE__ */ jsx(SelectItem, { value: enumValue_0.id?.toString(), children: enumValue_0.label }, enumValue_0.id)) }) })
1020
1021
  ] });
1021
1022
  }
1022
1023
  const fileTypes = {
@@ -2708,11 +2709,11 @@ function MapPropertyField(t0) {
2708
2709
  const propertiesOrder = t1;
2709
2710
  let t2;
2710
2711
  if ($[3] !== setFieldValue || $[4] !== values.properties || $[5] !== values.propertiesOrder) {
2711
- t2 = (t34) => {
2712
+ t2 = (t35) => {
2712
2713
  const {
2713
2714
  id,
2714
2715
  property
2715
- } = t34;
2716
+ } = t35;
2716
2717
  if (!id) {
2717
2718
  throw Error();
2718
2719
  }
@@ -2742,7 +2743,7 @@ function MapPropertyField(t0) {
2742
2743
  }
2743
2744
  const propertiesPath = idToPropertiesPath(fullId);
2744
2745
  const propertiesOrderPath = namespaceToPropertiesOrderPath(namespace);
2745
- const currentPropertiesOrder_0 = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)));
2746
+ const currentPropertiesOrder_0 = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace)) ?? {});
2746
2747
  setFieldValue(propertiesPath, void 0, false);
2747
2748
  setFieldValue(propertiesOrderPath, currentPropertiesOrder_0.filter((p) => p !== propertyKey), false);
2748
2749
  setPropertyDialogOpen(false);
@@ -2960,45 +2961,46 @@ function MapPropertyField(t0) {
2960
2961
  t26 = $[54];
2961
2962
  t27 = $[55];
2962
2963
  }
2963
- const t28 = Boolean(selectedPropertyKey);
2964
- const t29 = !selectedPropertyKey;
2964
+ const t28 = selectedProperty;
2965
+ const t29 = Boolean(selectedPropertyKey);
2965
2966
  const t30 = !selectedPropertyKey;
2966
- const t31 = selectedPropertyKey ? void 0 : propertiesOrder;
2967
- let t32;
2968
- if ($[56] !== allowDataInference || $[57] !== deleteProperty || $[58] !== getData || $[59] !== onPropertyCreated || $[60] !== propertyConfigs || $[61] !== propertyDialogOpen || $[62] !== selectedProperty || $[63] !== selectedPropertyKey || $[64] !== selectedPropertyNamespace || $[65] !== t28 || $[66] !== t29 || $[67] !== t30 || $[68] !== t31) {
2969
- t32 = /* @__PURE__ */ jsx(PropertyFormDialog, { inArray: false, forceShowErrors: false, open: propertyDialogOpen, allowDataInference, onCancel: t26, onOkClicked: t27, getData, onDelete: deleteProperty, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: selectedProperty, existingProperty: t28, autoUpdateId: t29, autoOpenTypeSelect: t30, onPropertyChanged: onPropertyCreated, existingPropertyKeys: t31, propertyConfigs });
2967
+ const t31 = !selectedPropertyKey;
2968
+ const t32 = selectedPropertyKey ? void 0 : propertiesOrder;
2969
+ let t33;
2970
+ if ($[56] !== allowDataInference || $[57] !== deleteProperty || $[58] !== getData || $[59] !== onPropertyCreated || $[60] !== propertyConfigs || $[61] !== propertyDialogOpen || $[62] !== selectedPropertyKey || $[63] !== selectedPropertyNamespace || $[64] !== t28 || $[65] !== t29 || $[66] !== t30 || $[67] !== t31 || $[68] !== t32) {
2971
+ t33 = /* @__PURE__ */ jsx(PropertyFormDialog, { inArray: false, forceShowErrors: false, open: propertyDialogOpen, allowDataInference, onCancel: t26, onOkClicked: t27, getData, onDelete: deleteProperty, propertyKey: selectedPropertyKey, propertyNamespace: selectedPropertyNamespace, property: t28, existingProperty: t29, autoUpdateId: t30, autoOpenTypeSelect: t31, onPropertyChanged: onPropertyCreated, existingPropertyKeys: t32, propertyConfigs });
2970
2972
  $[56] = allowDataInference;
2971
2973
  $[57] = deleteProperty;
2972
2974
  $[58] = getData;
2973
2975
  $[59] = onPropertyCreated;
2974
2976
  $[60] = propertyConfigs;
2975
2977
  $[61] = propertyDialogOpen;
2976
- $[62] = selectedProperty;
2977
- $[63] = selectedPropertyKey;
2978
- $[64] = selectedPropertyNamespace;
2979
- $[65] = t28;
2980
- $[66] = t29;
2981
- $[67] = t30;
2982
- $[68] = t31;
2983
- $[69] = t32;
2978
+ $[62] = selectedPropertyKey;
2979
+ $[63] = selectedPropertyNamespace;
2980
+ $[64] = t28;
2981
+ $[65] = t29;
2982
+ $[66] = t30;
2983
+ $[67] = t31;
2984
+ $[68] = t32;
2985
+ $[69] = t33;
2984
2986
  } else {
2985
- t32 = $[69];
2987
+ t33 = $[69];
2986
2988
  }
2987
- let t33;
2988
- if ($[70] !== t19 || $[71] !== t25 || $[72] !== t32) {
2989
- t33 = /* @__PURE__ */ jsxs(Fragment, { children: [
2989
+ let t34;
2990
+ if ($[70] !== t19 || $[71] !== t25 || $[72] !== t33) {
2991
+ t34 = /* @__PURE__ */ jsxs(Fragment, { children: [
2990
2992
  t19,
2991
2993
  t25,
2992
- t32
2994
+ t33
2993
2995
  ] });
2994
2996
  $[70] = t19;
2995
2997
  $[71] = t25;
2996
- $[72] = t32;
2997
- $[73] = t33;
2998
+ $[72] = t33;
2999
+ $[73] = t34;
2998
3000
  } else {
2999
- t33 = $[73];
3001
+ t34 = $[73];
3000
3002
  }
3001
- return t33;
3003
+ return t34;
3002
3004
  }
3003
3005
  function RepeatPropertyField(t0) {
3004
3006
  const $ = c(35);
@@ -3876,7 +3878,7 @@ function BlockPropertyField(t0) {
3876
3878
  }
3877
3879
  setFieldValue(`oneOf.${idToPropertiesPath(fullId)}`, void 0, false);
3878
3880
  const propertiesOrderPath = `oneOf.${namespaceToPropertiesOrderPath(namespace_0)}`;
3879
- const currentPropertiesOrder_0 = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace_0)));
3881
+ const currentPropertiesOrder_0 = getIn(values, propertiesOrderPath) ?? Object.keys(getIn(values, namespaceToPropertiesPath(namespace_0)) ?? {});
3880
3882
  setFieldValue(propertiesOrderPath, currentPropertiesOrder_0.filter((p) => p !== propertyKey), false);
3881
3883
  setPropertyDialogOpen(false);
3882
3884
  setSelectedPropertyKey(void 0);
@@ -4083,176 +4085,180 @@ function NumberPropertyValidation(t0) {
4083
4085
  } else {
4084
4086
  t2 = $[3];
4085
4087
  }
4086
- let t3;
4088
+ const t3 = t2;
4089
+ let t4;
4087
4090
  if ($[4] !== t) {
4088
- t3 = t("min_value");
4091
+ t4 = t("min_value");
4089
4092
  $[4] = t;
4090
- $[5] = t3;
4093
+ $[5] = t4;
4091
4094
  } else {
4092
- t3 = $[5];
4095
+ t4 = $[5];
4093
4096
  }
4094
- let t4;
4095
- if ($[6] !== disabled || $[7] !== handleChange || $[8] !== t2 || $[9] !== t3) {
4096
- t4 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t2, label: t3, name: "validation.min", type: "number", size: "small", disabled, onChange: handleChange }) });
4097
+ let t5;
4098
+ if ($[6] !== disabled || $[7] !== handleChange || $[8] !== t3 || $[9] !== t4) {
4099
+ t5 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t3, label: t4, name: "validation.min", type: "number", size: "small", disabled, onChange: handleChange }) });
4097
4100
  $[6] = disabled;
4098
4101
  $[7] = handleChange;
4099
- $[8] = t2;
4100
- $[9] = t3;
4101
- $[10] = t4;
4102
+ $[8] = t3;
4103
+ $[9] = t4;
4104
+ $[10] = t5;
4102
4105
  } else {
4103
- t4 = $[10];
4106
+ t5 = $[10];
4104
4107
  }
4105
- let t5;
4108
+ let t6;
4106
4109
  if ($[11] !== values) {
4107
- t5 = getIn(values, "validation.max");
4110
+ t6 = getIn(values, "validation.max");
4108
4111
  $[11] = values;
4109
- $[12] = t5;
4112
+ $[12] = t6;
4110
4113
  } else {
4111
- t5 = $[12];
4114
+ t6 = $[12];
4112
4115
  }
4113
- let t6;
4116
+ const t7 = t6;
4117
+ let t8;
4114
4118
  if ($[13] !== t) {
4115
- t6 = t("max_value");
4119
+ t8 = t("max_value");
4116
4120
  $[13] = t;
4117
- $[14] = t6;
4121
+ $[14] = t8;
4118
4122
  } else {
4119
- t6 = $[14];
4123
+ t8 = $[14];
4120
4124
  }
4121
- let t7;
4122
- if ($[15] !== disabled || $[16] !== handleChange || $[17] !== t5 || $[18] !== t6) {
4123
- t7 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t5, label: t6, name: "validation.max", type: "number", size: "small", disabled, onChange: handleChange }) });
4125
+ let t9;
4126
+ if ($[15] !== disabled || $[16] !== handleChange || $[17] !== t7 || $[18] !== t8) {
4127
+ t9 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t7, label: t8, name: "validation.max", type: "number", size: "small", disabled, onChange: handleChange }) });
4124
4128
  $[15] = disabled;
4125
4129
  $[16] = handleChange;
4126
- $[17] = t5;
4127
- $[18] = t6;
4128
- $[19] = t7;
4130
+ $[17] = t7;
4131
+ $[18] = t8;
4132
+ $[19] = t9;
4129
4133
  } else {
4130
- t7 = $[19];
4134
+ t9 = $[19];
4131
4135
  }
4132
- let t8;
4136
+ let t10;
4133
4137
  if ($[20] !== values) {
4134
- t8 = getIn(values, "validation.lessThan");
4138
+ t10 = getIn(values, "validation.lessThan");
4135
4139
  $[20] = values;
4136
- $[21] = t8;
4140
+ $[21] = t10;
4137
4141
  } else {
4138
- t8 = $[21];
4142
+ t10 = $[21];
4139
4143
  }
4140
- let t9;
4144
+ const t11 = t10;
4145
+ let t12;
4141
4146
  if ($[22] !== t) {
4142
- t9 = t("less_than");
4147
+ t12 = t("less_than");
4143
4148
  $[22] = t;
4144
- $[23] = t9;
4149
+ $[23] = t12;
4145
4150
  } else {
4146
- t9 = $[23];
4151
+ t12 = $[23];
4147
4152
  }
4148
- let t10;
4149
- if ($[24] !== disabled || $[25] !== handleChange || $[26] !== t8 || $[27] !== t9) {
4150
- t10 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t8, label: t9, name: "validation.lessThan", type: "number", size: "small", disabled, onChange: handleChange }) });
4153
+ let t13;
4154
+ if ($[24] !== disabled || $[25] !== handleChange || $[26] !== t11 || $[27] !== t12) {
4155
+ t13 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t11, label: t12, name: "validation.lessThan", type: "number", size: "small", disabled, onChange: handleChange }) });
4151
4156
  $[24] = disabled;
4152
4157
  $[25] = handleChange;
4153
- $[26] = t8;
4154
- $[27] = t9;
4155
- $[28] = t10;
4158
+ $[26] = t11;
4159
+ $[27] = t12;
4160
+ $[28] = t13;
4156
4161
  } else {
4157
- t10 = $[28];
4162
+ t13 = $[28];
4158
4163
  }
4159
- let t11;
4164
+ let t14;
4160
4165
  if ($[29] !== values) {
4161
- t11 = getIn(values, "validation.moreThan");
4166
+ t14 = getIn(values, "validation.moreThan");
4162
4167
  $[29] = values;
4163
- $[30] = t11;
4168
+ $[30] = t14;
4164
4169
  } else {
4165
- t11 = $[30];
4170
+ t14 = $[30];
4166
4171
  }
4167
- let t12;
4172
+ const t15 = t14;
4173
+ let t16;
4168
4174
  if ($[31] !== t) {
4169
- t12 = t("more_than");
4175
+ t16 = t("more_than");
4170
4176
  $[31] = t;
4171
- $[32] = t12;
4177
+ $[32] = t16;
4172
4178
  } else {
4173
- t12 = $[32];
4179
+ t16 = $[32];
4174
4180
  }
4175
- let t13;
4176
- if ($[33] !== disabled || $[34] !== handleChange || $[35] !== t11 || $[36] !== t12) {
4177
- t13 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t11, label: t12, name: "validation.moreThan", type: "number", size: "small", disabled, onChange: handleChange }) });
4181
+ let t17;
4182
+ if ($[33] !== disabled || $[34] !== handleChange || $[35] !== t15 || $[36] !== t16) {
4183
+ t17 = /* @__PURE__ */ jsx("div", { className: "col-span-6", children: /* @__PURE__ */ jsx(DebouncedTextField, { value: t15, label: t16, name: "validation.moreThan", type: "number", size: "small", disabled, onChange: handleChange }) });
4178
4184
  $[33] = disabled;
4179
4185
  $[34] = handleChange;
4180
- $[35] = t11;
4181
- $[36] = t12;
4182
- $[37] = t13;
4186
+ $[35] = t15;
4187
+ $[36] = t16;
4188
+ $[37] = t17;
4183
4189
  } else {
4184
- t13 = $[37];
4190
+ t17 = $[37];
4185
4191
  }
4186
- let t14;
4192
+ let t18;
4187
4193
  if ($[38] !== disabled || $[39] !== t) {
4188
- t14 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.positive", type: "checkbox", children: (t152) => {
4194
+ t18 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.positive", type: "checkbox", children: (t192) => {
4189
4195
  const {
4190
4196
  field,
4191
4197
  form
4192
- } = t152;
4198
+ } = t192;
4193
4199
  return /* @__PURE__ */ jsx(SwitchControl, { label: t("positive_value"), disabled, form, field });
4194
4200
  } }) });
4195
4201
  $[38] = disabled;
4196
4202
  $[39] = t;
4197
- $[40] = t14;
4203
+ $[40] = t18;
4198
4204
  } else {
4199
- t14 = $[40];
4205
+ t18 = $[40];
4200
4206
  }
4201
- let t15;
4207
+ let t19;
4202
4208
  if ($[41] !== disabled || $[42] !== t) {
4203
- t15 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.negative", type: "checkbox", children: (t162) => {
4209
+ t19 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.negative", type: "checkbox", children: (t202) => {
4204
4210
  const {
4205
4211
  field: field_0,
4206
4212
  form: form_0
4207
- } = t162;
4213
+ } = t202;
4208
4214
  return /* @__PURE__ */ jsx(SwitchControl, { label: t("negative_value"), disabled, form: form_0, field: field_0 });
4209
4215
  } }) });
4210
4216
  $[41] = disabled;
4211
4217
  $[42] = t;
4212
- $[43] = t15;
4218
+ $[43] = t19;
4213
4219
  } else {
4214
- t15 = $[43];
4220
+ t19 = $[43];
4215
4221
  }
4216
- let t16;
4222
+ let t20;
4217
4223
  if ($[44] !== disabled || $[45] !== t) {
4218
- t16 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.integer", type: "checkbox", children: (t172) => {
4224
+ t20 = /* @__PURE__ */ jsx("div", { className: "col-span-4", children: /* @__PURE__ */ jsx(Field, { name: "validation.integer", type: "checkbox", children: (t212) => {
4219
4225
  const {
4220
4226
  field: field_1,
4221
4227
  form: form_1
4222
- } = t172;
4228
+ } = t212;
4223
4229
  return /* @__PURE__ */ jsx(SwitchControl, { label: t("integer_value"), disabled, form: form_1, field: field_1 });
4224
4230
  } }) });
4225
4231
  $[44] = disabled;
4226
4232
  $[45] = t;
4227
- $[46] = t16;
4233
+ $[46] = t20;
4228
4234
  } else {
4229
- t16 = $[46];
4235
+ t20 = $[46];
4230
4236
  }
4231
- let t17;
4232
- if ($[47] !== t1 || $[48] !== t10 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t4 || $[54] !== t7) {
4233
- t17 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2", children: [
4237
+ let t21;
4238
+ if ($[47] !== t1 || $[48] !== t13 || $[49] !== t17 || $[50] !== t18 || $[51] !== t19 || $[52] !== t20 || $[53] !== t5 || $[54] !== t9) {
4239
+ t21 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2", children: [
4234
4240
  t1,
4235
- t4,
4236
- t7,
4237
- t10,
4241
+ t5,
4242
+ t9,
4238
4243
  t13,
4239
- t14,
4240
- t15,
4241
- t16
4244
+ t17,
4245
+ t18,
4246
+ t19,
4247
+ t20
4242
4248
  ] });
4243
4249
  $[47] = t1;
4244
- $[48] = t10;
4245
- $[49] = t13;
4246
- $[50] = t14;
4247
- $[51] = t15;
4248
- $[52] = t16;
4249
- $[53] = t4;
4250
- $[54] = t7;
4251
- $[55] = t17;
4250
+ $[48] = t13;
4251
+ $[49] = t17;
4252
+ $[50] = t18;
4253
+ $[51] = t19;
4254
+ $[52] = t20;
4255
+ $[53] = t5;
4256
+ $[54] = t9;
4257
+ $[55] = t21;
4252
4258
  } else {
4253
- t17 = $[55];
4259
+ t21 = $[55];
4254
4260
  }
4255
- return t17;
4261
+ return t21;
4256
4262
  }
4257
4263
  function NumberPropertyField(t0) {
4258
4264
  const $ = c(72);
@@ -5575,8 +5581,22 @@ function KeyValuePropertyField(t0) {
5575
5581
  return t1;
5576
5582
  }
5577
5583
  const ON_ACTION_OPTIONS = ["cascade", "restrict", "no action", "set null", "set default"];
5584
+ function getTargetSlug(target) {
5585
+ if (!target) return "";
5586
+ if (typeof target === "string") return target;
5587
+ try {
5588
+ const resolved = target();
5589
+ if (typeof resolved === "string") return resolved;
5590
+ if (resolved && typeof resolved === "object" && "slug" in resolved && typeof resolved.slug === "string") {
5591
+ return resolved.slug;
5592
+ }
5593
+ return "";
5594
+ } catch {
5595
+ return "";
5596
+ }
5597
+ }
5578
5598
  function RelationPropertyField(t0) {
5579
- const $ = c(112);
5599
+ const $ = c(107);
5580
5600
  const {
5581
5601
  disabled,
5582
5602
  showErrors
@@ -5588,341 +5608,309 @@ function RelationPropertyField(t0) {
5588
5608
  const collectionRegistry = useCollectionRegistryController();
5589
5609
  const relationName = values.relationName ?? "";
5590
5610
  let t1;
5591
- if ($[0] !== values._relationConfig) {
5592
- t1 = values._relationConfig ?? {};
5593
- $[0] = values._relationConfig;
5611
+ if ($[0] !== values.target) {
5612
+ t1 = getTargetSlug(values.target);
5613
+ $[0] = values.target;
5594
5614
  $[1] = t1;
5595
5615
  } else {
5596
5616
  t1 = $[1];
5597
5617
  }
5598
- const relationConfig = t1;
5599
- const targetSlug = relationConfig._targetSlug ?? "";
5600
- const cardinality = relationConfig.cardinality ?? "one";
5601
- const direction = relationConfig.direction ?? "owning";
5602
- const localKey = relationConfig.localKey ?? "";
5603
- const foreignKeyOnTarget = relationConfig.foreignKeyOnTarget ?? "";
5604
- const through = relationConfig.through;
5618
+ const targetSlug = t1;
5619
+ const cardinality = values.cardinality ?? "one";
5620
+ const direction = values.direction ?? "owning";
5621
+ const localKey = values.localKey ?? "";
5622
+ const foreignKeyOnTarget = values.foreignKeyOnTarget ?? "";
5623
+ const through = values.through;
5605
5624
  const throughTable = through?.table ?? "";
5606
5625
  const throughSourceColumn = through?.sourceColumn ?? "";
5607
5626
  const throughTargetColumn = through?.targetColumn ?? "";
5608
- const onUpdate = relationConfig.onUpdate ?? "no action";
5609
- const onDelete = relationConfig.onDelete ?? "no action";
5627
+ const onUpdate = values.onUpdate ?? "no action";
5628
+ const onDelete = values.onDelete ?? "no action";
5610
5629
  const showThrough = cardinality === "many" && direction === "owning";
5611
5630
  const showLocalKey = direction === "owning" && cardinality === "one";
5612
5631
  const showForeignKey = direction === "inverse";
5613
5632
  let t2;
5614
- if ($[2] !== setFieldValue || $[3] !== values._relationConfig) {
5633
+ if ($[2] !== setFieldValue || $[3] !== values.through) {
5615
5634
  t2 = (patch) => {
5616
- const current = values._relationConfig ?? {};
5617
- setFieldValue("_relationConfig", {
5618
- ...current,
5635
+ const currentThrough = values.through ?? {
5636
+ table: "",
5637
+ sourceColumn: "",
5638
+ targetColumn: ""
5639
+ };
5640
+ setFieldValue("through", {
5641
+ ...currentThrough,
5619
5642
  ...patch
5620
5643
  });
5621
5644
  };
5622
5645
  $[2] = setFieldValue;
5623
- $[3] = values._relationConfig;
5646
+ $[3] = values.through;
5624
5647
  $[4] = t2;
5625
5648
  } else {
5626
5649
  t2 = $[4];
5627
5650
  }
5628
- const updateRelationConfig = t2;
5651
+ const updateThrough = t2;
5629
5652
  let t3;
5630
- if ($[5] !== setFieldValue || $[6] !== values._relationConfig) {
5631
- t3 = (patch_0) => {
5632
- const current_0 = values._relationConfig ?? {};
5633
- const currentThrough = current_0.through ?? {};
5634
- setFieldValue("_relationConfig", {
5635
- ...current_0,
5636
- through: {
5637
- ...currentThrough,
5638
- ...patch_0
5639
- }
5640
- });
5641
- };
5642
- $[5] = setFieldValue;
5643
- $[6] = values._relationConfig;
5644
- $[7] = t3;
5645
- } else {
5646
- t3 = $[7];
5647
- }
5648
- const updateThrough = t3;
5649
5653
  let t4;
5650
- if ($[8] !== relationName || $[9] !== setFieldValue || $[10] !== targetSlug) {
5651
- t4 = () => {
5654
+ if ($[5] !== relationName || $[6] !== setFieldValue || $[7] !== targetSlug) {
5655
+ t3 = () => {
5652
5656
  if (targetSlug && !relationName) {
5653
5657
  setFieldValue("relationName", targetSlug);
5654
5658
  }
5655
5659
  };
5656
- $[8] = relationName;
5657
- $[9] = setFieldValue;
5658
- $[10] = targetSlug;
5659
- $[11] = t4;
5660
+ t4 = [targetSlug, relationName, setFieldValue];
5661
+ $[5] = relationName;
5662
+ $[6] = setFieldValue;
5663
+ $[7] = targetSlug;
5664
+ $[8] = t3;
5665
+ $[9] = t4;
5660
5666
  } else {
5661
- t4 = $[11];
5667
+ t3 = $[8];
5668
+ t4 = $[9];
5662
5669
  }
5670
+ useEffect(t3, t4);
5671
+ collectionRegistry?.collections ?? [];
5663
5672
  let t5;
5664
- if ($[12] !== targetSlug) {
5665
- t5 = [targetSlug];
5673
+ if ($[10] !== relationName || $[11] !== setFieldValue || $[12] !== targetSlug) {
5674
+ t5 = (_, value) => {
5675
+ setFieldValue("target", value);
5676
+ if (!relationName || relationName === targetSlug) {
5677
+ setFieldValue("relationName", value);
5678
+ }
5679
+ };
5680
+ $[10] = relationName;
5681
+ $[11] = setFieldValue;
5666
5682
  $[12] = targetSlug;
5667
5683
  $[13] = t5;
5668
5684
  } else {
5669
5685
  t5 = $[13];
5670
5686
  }
5671
- useEffect(t4, t5);
5672
- collectionRegistry?.collections ?? [];
5673
- let t6;
5674
- if ($[14] !== relationName || $[15] !== setFieldValue || $[16] !== targetSlug || $[17] !== updateRelationConfig) {
5675
- t6 = (_, value) => {
5676
- updateRelationConfig({
5677
- _targetSlug: value
5678
- });
5679
- if (!relationName || relationName === targetSlug) {
5680
- setFieldValue("relationName", value);
5681
- }
5682
- };
5683
- $[14] = relationName;
5684
- $[15] = setFieldValue;
5685
- $[16] = targetSlug;
5686
- $[17] = updateRelationConfig;
5687
- $[18] = t6;
5687
+ const t6 = showErrors && !targetSlug ? "You must select a target collection" : void 0;
5688
+ let t7;
5689
+ if ($[14] !== disabled || $[15] !== t5 || $[16] !== t6 || $[17] !== targetSlug) {
5690
+ t7 = /* @__PURE__ */ jsx(CollectionsSelect, { disabled, pathPath: "target", value: targetSlug, setFieldValue: t5, error: t6 });
5691
+ $[14] = disabled;
5692
+ $[15] = t5;
5693
+ $[16] = t6;
5694
+ $[17] = targetSlug;
5695
+ $[18] = t7;
5688
5696
  } else {
5689
- t6 = $[18];
5697
+ t7 = $[18];
5690
5698
  }
5691
- const t7 = showErrors && !targetSlug ? "You must select a target collection" : void 0;
5692
- let t8;
5693
- if ($[19] !== disabled || $[20] !== t6 || $[21] !== t7 || $[22] !== targetSlug) {
5694
- t8 = /* @__PURE__ */ jsx(CollectionsSelect, { disabled, pathPath: "_relationConfig._targetSlug", value: targetSlug, setFieldValue: t6, error: t7 });
5695
- $[19] = disabled;
5696
- $[20] = t6;
5697
- $[21] = t7;
5698
- $[22] = targetSlug;
5699
- $[23] = t8;
5699
+ const t8 = showErrors && !targetSlug;
5700
+ const t9 = showErrors && !targetSlug ? "You must select a target collection" : "The collection this relation points to";
5701
+ let t10;
5702
+ if ($[19] !== t8 || $[20] !== t9) {
5703
+ t10 = /* @__PURE__ */ jsx(FieldCaption, { error: t8, children: t9 });
5704
+ $[19] = t8;
5705
+ $[20] = t9;
5706
+ $[21] = t10;
5700
5707
  } else {
5701
- t8 = $[23];
5708
+ t10 = $[21];
5702
5709
  }
5703
- const t9 = showErrors && !targetSlug;
5704
- const t10 = showErrors && !targetSlug ? "You must select a target collection" : "The collection this relation points to";
5705
5710
  let t11;
5706
- if ($[24] !== t10 || $[25] !== t9) {
5707
- t11 = /* @__PURE__ */ jsx(FieldCaption, { error: t9, children: t10 });
5708
- $[24] = t10;
5709
- $[25] = t9;
5710
- $[26] = t11;
5711
+ if ($[22] !== t10 || $[23] !== t7) {
5712
+ t11 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5713
+ t7,
5714
+ t10
5715
+ ] });
5716
+ $[22] = t10;
5717
+ $[23] = t7;
5718
+ $[24] = t11;
5711
5719
  } else {
5712
- t11 = $[26];
5720
+ t11 = $[24];
5713
5721
  }
5714
5722
  let t12;
5715
- if ($[27] !== t11 || $[28] !== t8) {
5716
- t12 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5717
- t8,
5718
- t11
5719
- ] });
5720
- $[27] = t11;
5721
- $[28] = t8;
5722
- $[29] = t12;
5723
+ if ($[25] !== setFieldValue) {
5724
+ t12 = (e) => setFieldValue("relationName", e.target.value);
5725
+ $[25] = setFieldValue;
5726
+ $[26] = t12;
5723
5727
  } else {
5724
- t12 = $[29];
5728
+ t12 = $[26];
5725
5729
  }
5726
- let t13;
5727
- if ($[30] !== setFieldValue) {
5728
- t13 = (e) => setFieldValue("relationName", e.target.value);
5729
- $[30] = setFieldValue;
5730
- $[31] = t13;
5730
+ const t13 = showErrors && !relationName;
5731
+ let t14;
5732
+ if ($[27] !== disabled || $[28] !== relationName || $[29] !== t12 || $[30] !== t13) {
5733
+ t14 = /* @__PURE__ */ jsx(TextField, { value: relationName, onChange: t12, label: "Relation name", disabled, error: t13 });
5734
+ $[27] = disabled;
5735
+ $[28] = relationName;
5736
+ $[29] = t12;
5737
+ $[30] = t13;
5738
+ $[31] = t14;
5731
5739
  } else {
5732
- t13 = $[31];
5740
+ t14 = $[31];
5733
5741
  }
5734
- const t14 = showErrors && !relationName;
5735
- let t15;
5736
- if ($[32] !== disabled || $[33] !== relationName || $[34] !== t13 || $[35] !== t14) {
5737
- t15 = /* @__PURE__ */ jsx(TextField, { value: relationName, onChange: t13, label: "Relation name", disabled, error: t14 });
5738
- $[32] = disabled;
5739
- $[33] = relationName;
5740
- $[34] = t13;
5741
- $[35] = t14;
5742
- $[36] = t15;
5742
+ const t15 = showErrors && !relationName;
5743
+ const t16 = showErrors && !relationName ? "Required" : "Identifier for this relation (used to link the property to the relation config)";
5744
+ let t17;
5745
+ if ($[32] !== t15 || $[33] !== t16) {
5746
+ t17 = /* @__PURE__ */ jsx(FieldCaption, { error: t15, children: t16 });
5747
+ $[32] = t15;
5748
+ $[33] = t16;
5749
+ $[34] = t17;
5743
5750
  } else {
5744
- t15 = $[36];
5751
+ t17 = $[34];
5745
5752
  }
5746
- const t16 = showErrors && !relationName;
5747
- const t17 = showErrors && !relationName ? "Required" : "Identifier for this relation (used to link the property to the relation config)";
5748
5753
  let t18;
5749
- if ($[37] !== t16 || $[38] !== t17) {
5750
- t18 = /* @__PURE__ */ jsx(FieldCaption, { error: t16, children: t17 });
5751
- $[37] = t16;
5752
- $[38] = t17;
5753
- $[39] = t18;
5754
+ if ($[35] !== t14 || $[36] !== t17) {
5755
+ t18 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5756
+ t14,
5757
+ t17
5758
+ ] });
5759
+ $[35] = t14;
5760
+ $[36] = t17;
5761
+ $[37] = t18;
5754
5762
  } else {
5755
- t18 = $[39];
5763
+ t18 = $[37];
5756
5764
  }
5757
5765
  let t19;
5758
- if ($[40] !== t15 || $[41] !== t18) {
5759
- t19 = /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5760
- t15,
5761
- t18
5762
- ] });
5763
- $[40] = t15;
5764
- $[41] = t18;
5765
- $[42] = t19;
5766
+ if ($[38] !== setFieldValue) {
5767
+ t19 = (v) => setFieldValue("cardinality", v);
5768
+ $[38] = setFieldValue;
5769
+ $[39] = t19;
5766
5770
  } else {
5767
- t19 = $[42];
5771
+ t19 = $[39];
5768
5772
  }
5769
5773
  let t20;
5770
- if ($[43] !== updateRelationConfig) {
5771
- t20 = (v) => updateRelationConfig({
5772
- cardinality: v
5773
- });
5774
- $[43] = updateRelationConfig;
5775
- $[44] = t20;
5776
- } else {
5777
- t20 = $[44];
5778
- }
5779
- let t21;
5780
- if ($[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5781
- t21 = /* @__PURE__ */ jsx(SelectItem, { value: "one", children: /* @__PURE__ */ jsxs("div", { children: [
5774
+ if ($[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5775
+ t20 = /* @__PURE__ */ jsx(SelectItem, { value: "one", children: /* @__PURE__ */ jsxs("div", { children: [
5782
5776
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "One (has-one)" }),
5783
5777
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "This property references a single record" })
5784
5778
  ] }) });
5785
- $[45] = t21;
5779
+ $[40] = t20;
5786
5780
  } else {
5787
- t21 = $[45];
5781
+ t20 = $[40];
5788
5782
  }
5789
- let t22;
5790
- if ($[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5791
- t22 = /* @__PURE__ */ jsx(SelectItem, { value: "many", children: /* @__PURE__ */ jsxs("div", { children: [
5783
+ let t21;
5784
+ if ($[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5785
+ t21 = /* @__PURE__ */ jsx(SelectItem, { value: "many", children: /* @__PURE__ */ jsxs("div", { children: [
5792
5786
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Many (has-many)" }),
5793
5787
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "This property references multiple records" })
5794
5788
  ] }) });
5795
- $[46] = t22;
5789
+ $[41] = t21;
5796
5790
  } else {
5797
- t22 = $[46];
5791
+ t21 = $[41];
5798
5792
  }
5799
- let t23;
5800
- if ($[47] !== cardinality || $[48] !== disabled || $[49] !== t20) {
5801
- t23 = /* @__PURE__ */ jsxs(Select, { value: cardinality, onValueChange: t20, label: "Cardinality", disabled, fullWidth: true, renderValue: _temp$2, children: [
5802
- t21,
5803
- t22
5793
+ let t22;
5794
+ if ($[42] !== cardinality || $[43] !== disabled || $[44] !== t19) {
5795
+ t22 = /* @__PURE__ */ jsxs(Select, { value: cardinality, onValueChange: t19, label: "Cardinality", disabled, fullWidth: true, renderValue: _temp$2, children: [
5796
+ t20,
5797
+ t21
5804
5798
  ] });
5805
- $[47] = cardinality;
5806
- $[48] = disabled;
5807
- $[49] = t20;
5808
- $[50] = t23;
5799
+ $[42] = cardinality;
5800
+ $[43] = disabled;
5801
+ $[44] = t19;
5802
+ $[45] = t22;
5809
5803
  } else {
5810
- t23 = $[50];
5804
+ t22 = $[45];
5811
5805
  }
5812
- let t24;
5813
- if ($[51] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5814
- t24 = /* @__PURE__ */ jsx(FieldCaption, { children: "Whether the relation returns one or multiple records" });
5815
- $[51] = t24;
5806
+ let t23;
5807
+ if ($[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5808
+ t23 = /* @__PURE__ */ jsx(FieldCaption, { children: "Whether the relation returns one or multiple records" });
5809
+ $[46] = t23;
5816
5810
  } else {
5817
- t24 = $[51];
5811
+ t23 = $[46];
5818
5812
  }
5819
- let t25;
5820
- if ($[52] !== t23) {
5821
- t25 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5822
- t23,
5823
- t24
5813
+ let t24;
5814
+ if ($[47] !== t22) {
5815
+ t24 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5816
+ t22,
5817
+ t23
5824
5818
  ] });
5825
- $[52] = t23;
5826
- $[53] = t25;
5819
+ $[47] = t22;
5820
+ $[48] = t24;
5827
5821
  } else {
5828
- t25 = $[53];
5822
+ t24 = $[48];
5829
5823
  }
5830
- let t26;
5831
- if ($[54] !== updateRelationConfig) {
5832
- t26 = (v_1) => updateRelationConfig({
5833
- direction: v_1
5834
- });
5835
- $[54] = updateRelationConfig;
5836
- $[55] = t26;
5824
+ let t25;
5825
+ if ($[49] !== setFieldValue) {
5826
+ t25 = (v_1) => setFieldValue("direction", v_1);
5827
+ $[49] = setFieldValue;
5828
+ $[50] = t25;
5837
5829
  } else {
5838
- t26 = $[55];
5830
+ t25 = $[50];
5839
5831
  }
5840
- let t27;
5841
- if ($[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5842
- t27 = /* @__PURE__ */ jsx(SelectItem, { value: "owning", children: /* @__PURE__ */ jsxs("div", { children: [
5832
+ let t26;
5833
+ if ($[51] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5834
+ t26 = /* @__PURE__ */ jsx(SelectItem, { value: "owning", children: /* @__PURE__ */ jsxs("div", { children: [
5843
5835
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Owning" }),
5844
5836
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "This table stores the foreign key (or owns the junction table)" })
5845
5837
  ] }) });
5846
- $[56] = t27;
5838
+ $[51] = t26;
5847
5839
  } else {
5848
- t27 = $[56];
5840
+ t26 = $[51];
5849
5841
  }
5850
- let t28;
5851
- if ($[57] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5852
- t28 = /* @__PURE__ */ jsx(SelectItem, { value: "inverse", children: /* @__PURE__ */ jsxs("div", { children: [
5842
+ let t27;
5843
+ if ($[52] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5844
+ t27 = /* @__PURE__ */ jsx(SelectItem, { value: "inverse", children: /* @__PURE__ */ jsxs("div", { children: [
5853
5845
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Inverse" }),
5854
5846
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "The target table stores the foreign key pointing back here" })
5855
5847
  ] }) });
5856
- $[57] = t28;
5848
+ $[52] = t27;
5857
5849
  } else {
5858
- t28 = $[57];
5850
+ t27 = $[52];
5859
5851
  }
5860
- let t29;
5861
- if ($[58] !== direction || $[59] !== disabled || $[60] !== t26) {
5862
- t29 = /* @__PURE__ */ jsxs(Select, { value: direction, onValueChange: t26, label: "Direction", disabled, fullWidth: true, renderValue: _temp2$1, children: [
5863
- t27,
5864
- t28
5852
+ let t28;
5853
+ if ($[53] !== direction || $[54] !== disabled || $[55] !== t25) {
5854
+ t28 = /* @__PURE__ */ jsxs(Select, { value: direction, onValueChange: t25, label: "Direction", disabled, fullWidth: true, renderValue: _temp2$1, children: [
5855
+ t26,
5856
+ t27
5865
5857
  ] });
5866
- $[58] = direction;
5867
- $[59] = disabled;
5868
- $[60] = t26;
5869
- $[61] = t29;
5858
+ $[53] = direction;
5859
+ $[54] = disabled;
5860
+ $[55] = t25;
5861
+ $[56] = t28;
5862
+ } else {
5863
+ t28 = $[56];
5864
+ }
5865
+ let t29;
5866
+ if ($[57] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5867
+ t29 = /* @__PURE__ */ jsx(FieldCaption, { children: "Which side of the relation owns the persistence" });
5868
+ $[57] = t29;
5870
5869
  } else {
5871
- t29 = $[61];
5870
+ t29 = $[57];
5872
5871
  }
5873
5872
  let t30;
5874
- if ($[62] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5875
- t30 = /* @__PURE__ */ jsx(FieldCaption, { children: "Which side of the relation owns the persistence" });
5876
- $[62] = t30;
5873
+ if ($[58] !== t28) {
5874
+ t30 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5875
+ t28,
5876
+ t29
5877
+ ] });
5878
+ $[58] = t28;
5879
+ $[59] = t30;
5877
5880
  } else {
5878
- t30 = $[62];
5881
+ t30 = $[59];
5879
5882
  }
5880
5883
  let t31;
5881
- if ($[63] !== t29) {
5882
- t31 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5883
- t29,
5884
- t30
5884
+ if ($[60] !== disabled || $[61] !== localKey || $[62] !== setFieldValue || $[63] !== showLocalKey) {
5885
+ t31 = showLocalKey && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5886
+ /* @__PURE__ */ jsx(TextField, { value: localKey, onChange: (e_0) => setFieldValue("localKey", e_0.target.value), label: "Local key (foreign key column on this table)", disabled, placeholder: "e.g. author_id" }),
5887
+ /* @__PURE__ */ jsx(FieldCaption, { children: "Column on this table that references the target's primary key" })
5885
5888
  ] });
5886
- $[63] = t29;
5889
+ $[60] = disabled;
5890
+ $[61] = localKey;
5891
+ $[62] = setFieldValue;
5892
+ $[63] = showLocalKey;
5887
5893
  $[64] = t31;
5888
5894
  } else {
5889
5895
  t31 = $[64];
5890
5896
  }
5891
5897
  let t32;
5892
- if ($[65] !== disabled || $[66] !== localKey || $[67] !== showLocalKey || $[68] !== updateRelationConfig) {
5893
- t32 = showLocalKey && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5894
- /* @__PURE__ */ jsx(TextField, { value: localKey, onChange: (e_0) => updateRelationConfig({
5895
- localKey: e_0.target.value
5896
- }), label: "Local key (foreign key column on this table)", disabled, placeholder: "e.g. author_id" }),
5897
- /* @__PURE__ */ jsx(FieldCaption, { children: "Column on this table that references the target's primary key" })
5898
+ if ($[65] !== disabled || $[66] !== foreignKeyOnTarget || $[67] !== setFieldValue || $[68] !== showForeignKey) {
5899
+ t32 = showForeignKey && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5900
+ /* @__PURE__ */ jsx(TextField, { value: foreignKeyOnTarget, onChange: (e_1) => setFieldValue("foreignKeyOnTarget", e_1.target.value), label: "Foreign key on target table", disabled, placeholder: "e.g. post_id" }),
5901
+ /* @__PURE__ */ jsx(FieldCaption, { children: "Column on the target table that references this table's primary key" })
5898
5902
  ] });
5899
5903
  $[65] = disabled;
5900
- $[66] = localKey;
5901
- $[67] = showLocalKey;
5902
- $[68] = updateRelationConfig;
5904
+ $[66] = foreignKeyOnTarget;
5905
+ $[67] = setFieldValue;
5906
+ $[68] = showForeignKey;
5903
5907
  $[69] = t32;
5904
5908
  } else {
5905
5909
  t32 = $[69];
5906
5910
  }
5907
5911
  let t33;
5908
- if ($[70] !== disabled || $[71] !== foreignKeyOnTarget || $[72] !== showForeignKey || $[73] !== updateRelationConfig) {
5909
- t33 = showForeignKey && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5910
- /* @__PURE__ */ jsx(TextField, { value: foreignKeyOnTarget, onChange: (e_1) => updateRelationConfig({
5911
- foreignKeyOnTarget: e_1.target.value
5912
- }), label: "Foreign key on target table", disabled, placeholder: "e.g. post_id" }),
5913
- /* @__PURE__ */ jsx(FieldCaption, { children: "Column on the target table that references this table's primary key" })
5914
- ] });
5915
- $[70] = disabled;
5916
- $[71] = foreignKeyOnTarget;
5917
- $[72] = showForeignKey;
5918
- $[73] = updateRelationConfig;
5919
- $[74] = t33;
5920
- } else {
5921
- t33 = $[74];
5922
- }
5923
- let t34;
5924
- if ($[75] !== disabled || $[76] !== showThrough || $[77] !== throughSourceColumn || $[78] !== throughTable || $[79] !== throughTargetColumn || $[80] !== updateThrough) {
5925
- t34 = showThrough && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5912
+ if ($[70] !== disabled || $[71] !== showThrough || $[72] !== throughSourceColumn || $[73] !== throughTable || $[74] !== throughTargetColumn || $[75] !== updateThrough) {
5913
+ t33 = showThrough && /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
5926
5914
  /* @__PURE__ */ jsx(Typography, { variant: "label", className: "mb-2", children: "Junction table (many-to-many)" }),
5927
5915
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-4", children: [
5928
5916
  /* @__PURE__ */ jsxs("div", { className: "col-span-12", children: [
@@ -5945,133 +5933,129 @@ function RelationPropertyField(t0) {
5945
5933
  ] })
5946
5934
  ] })
5947
5935
  ] });
5948
- $[75] = disabled;
5949
- $[76] = showThrough;
5950
- $[77] = throughSourceColumn;
5951
- $[78] = throughTable;
5952
- $[79] = throughTargetColumn;
5953
- $[80] = updateThrough;
5954
- $[81] = t34;
5936
+ $[70] = disabled;
5937
+ $[71] = showThrough;
5938
+ $[72] = throughSourceColumn;
5939
+ $[73] = throughTable;
5940
+ $[74] = throughTargetColumn;
5941
+ $[75] = updateThrough;
5942
+ $[76] = t33;
5943
+ } else {
5944
+ t33 = $[76];
5945
+ }
5946
+ let t34;
5947
+ if ($[77] !== setFieldValue) {
5948
+ t34 = (v_3) => setFieldValue("onUpdate", v_3);
5949
+ $[77] = setFieldValue;
5950
+ $[78] = t34;
5955
5951
  } else {
5956
- t34 = $[81];
5952
+ t34 = $[78];
5957
5953
  }
5958
5954
  let t35;
5959
- if ($[82] !== updateRelationConfig) {
5960
- t35 = (v_3) => updateRelationConfig({
5961
- onUpdate: v_3
5962
- });
5963
- $[82] = updateRelationConfig;
5964
- $[83] = t35;
5955
+ if ($[79] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5956
+ t35 = ON_ACTION_OPTIONS.map(_temp4$1);
5957
+ $[79] = t35;
5965
5958
  } else {
5966
- t35 = $[83];
5959
+ t35 = $[79];
5967
5960
  }
5968
5961
  let t36;
5969
- if ($[84] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5970
- t36 = ON_ACTION_OPTIONS.map(_temp4$1);
5971
- $[84] = t36;
5962
+ if ($[80] !== disabled || $[81] !== onUpdate || $[82] !== t34) {
5963
+ t36 = /* @__PURE__ */ jsx(Select, { value: onUpdate, onValueChange: t34, label: "On update", disabled, fullWidth: true, renderValue: _temp3$1, children: t35 });
5964
+ $[80] = disabled;
5965
+ $[81] = onUpdate;
5966
+ $[82] = t34;
5967
+ $[83] = t36;
5972
5968
  } else {
5973
- t36 = $[84];
5969
+ t36 = $[83];
5974
5970
  }
5975
5971
  let t37;
5976
- if ($[85] !== disabled || $[86] !== onUpdate || $[87] !== t35) {
5977
- t37 = /* @__PURE__ */ jsx(Select, { value: onUpdate, onValueChange: t35, label: "On update", disabled, fullWidth: true, renderValue: _temp3$1, children: t36 });
5978
- $[85] = disabled;
5979
- $[86] = onUpdate;
5980
- $[87] = t35;
5981
- $[88] = t37;
5972
+ if ($[84] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5973
+ t37 = /* @__PURE__ */ jsx(FieldCaption, { children: "Action when the referenced record is updated" });
5974
+ $[84] = t37;
5982
5975
  } else {
5983
- t37 = $[88];
5976
+ t37 = $[84];
5984
5977
  }
5985
5978
  let t38;
5986
- if ($[89] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5987
- t38 = /* @__PURE__ */ jsx(FieldCaption, { children: "Action when the referenced record is updated" });
5988
- $[89] = t38;
5979
+ if ($[85] !== t36) {
5980
+ t38 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5981
+ t36,
5982
+ t37
5983
+ ] });
5984
+ $[85] = t36;
5985
+ $[86] = t38;
5989
5986
  } else {
5990
- t38 = $[89];
5987
+ t38 = $[86];
5991
5988
  }
5992
5989
  let t39;
5993
- if ($[90] !== t37) {
5994
- t39 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
5995
- t37,
5996
- t38
5997
- ] });
5998
- $[90] = t37;
5999
- $[91] = t39;
5990
+ if ($[87] !== setFieldValue) {
5991
+ t39 = (v_5) => setFieldValue("onDelete", v_5);
5992
+ $[87] = setFieldValue;
5993
+ $[88] = t39;
6000
5994
  } else {
6001
- t39 = $[91];
5995
+ t39 = $[88];
6002
5996
  }
6003
5997
  let t40;
6004
- if ($[92] !== updateRelationConfig) {
6005
- t40 = (v_5) => updateRelationConfig({
6006
- onDelete: v_5
6007
- });
6008
- $[92] = updateRelationConfig;
6009
- $[93] = t40;
5998
+ if ($[89] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5999
+ t40 = ON_ACTION_OPTIONS.map(_temp6);
6000
+ $[89] = t40;
6010
6001
  } else {
6011
- t40 = $[93];
6002
+ t40 = $[89];
6012
6003
  }
6013
6004
  let t41;
6014
- if ($[94] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
6015
- t41 = ON_ACTION_OPTIONS.map(_temp6);
6016
- $[94] = t41;
6005
+ if ($[90] !== disabled || $[91] !== onDelete || $[92] !== t39) {
6006
+ t41 = /* @__PURE__ */ jsx(Select, { value: onDelete, onValueChange: t39, label: "On delete", disabled, fullWidth: true, renderValue: _temp5, children: t40 });
6007
+ $[90] = disabled;
6008
+ $[91] = onDelete;
6009
+ $[92] = t39;
6010
+ $[93] = t41;
6017
6011
  } else {
6018
- t41 = $[94];
6012
+ t41 = $[93];
6019
6013
  }
6020
6014
  let t42;
6021
- if ($[95] !== disabled || $[96] !== onDelete || $[97] !== t40) {
6022
- t42 = /* @__PURE__ */ jsx(Select, { value: onDelete, onValueChange: t40, label: "On delete", disabled, fullWidth: true, renderValue: _temp5, children: t41 });
6023
- $[95] = disabled;
6024
- $[96] = onDelete;
6025
- $[97] = t40;
6026
- $[98] = t42;
6015
+ if ($[94] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
6016
+ t42 = /* @__PURE__ */ jsx(FieldCaption, { children: "Action when the referenced record is deleted" });
6017
+ $[94] = t42;
6027
6018
  } else {
6028
- t42 = $[98];
6019
+ t42 = $[94];
6029
6020
  }
6030
6021
  let t43;
6031
- if ($[99] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
6032
- t43 = /* @__PURE__ */ jsx(FieldCaption, { children: "Action when the referenced record is deleted" });
6033
- $[99] = t43;
6034
- } else {
6035
- t43 = $[99];
6036
- }
6037
- let t44;
6038
- if ($[100] !== t42) {
6039
- t44 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
6040
- t42,
6041
- t43
6022
+ if ($[95] !== t41) {
6023
+ t43 = /* @__PURE__ */ jsxs("div", { className: "col-span-12 sm:col-span-6", children: [
6024
+ t41,
6025
+ t42
6042
6026
  ] });
6043
- $[100] = t42;
6044
- $[101] = t44;
6027
+ $[95] = t41;
6028
+ $[96] = t43;
6045
6029
  } else {
6046
- t44 = $[101];
6030
+ t43 = $[96];
6047
6031
  }
6048
- let t45;
6049
- if ($[102] !== t12 || $[103] !== t19 || $[104] !== t25 || $[105] !== t31 || $[106] !== t32 || $[107] !== t33 || $[108] !== t34 || $[109] !== t39 || $[110] !== t44) {
6050
- t45 = /* @__PURE__ */ jsxs(Fragment, { children: [
6051
- t12,
6052
- t19,
6053
- t25,
6032
+ let t44;
6033
+ if ($[97] !== t11 || $[98] !== t18 || $[99] !== t24 || $[100] !== t30 || $[101] !== t31 || $[102] !== t32 || $[103] !== t33 || $[104] !== t38 || $[105] !== t43) {
6034
+ t44 = /* @__PURE__ */ jsxs(Fragment, { children: [
6035
+ t11,
6036
+ t18,
6037
+ t24,
6038
+ t30,
6054
6039
  t31,
6055
6040
  t32,
6056
6041
  t33,
6057
- t34,
6058
- t39,
6059
- t44
6042
+ t38,
6043
+ t43
6060
6044
  ] });
6061
- $[102] = t12;
6062
- $[103] = t19;
6063
- $[104] = t25;
6064
- $[105] = t31;
6065
- $[106] = t32;
6066
- $[107] = t33;
6067
- $[108] = t34;
6068
- $[109] = t39;
6069
- $[110] = t44;
6070
- $[111] = t45;
6071
- } else {
6072
- t45 = $[111];
6073
- }
6074
- return t45;
6045
+ $[97] = t11;
6046
+ $[98] = t18;
6047
+ $[99] = t24;
6048
+ $[100] = t30;
6049
+ $[101] = t31;
6050
+ $[102] = t32;
6051
+ $[103] = t33;
6052
+ $[104] = t38;
6053
+ $[105] = t43;
6054
+ $[106] = t44;
6055
+ } else {
6056
+ t44 = $[106];
6057
+ }
6058
+ return t44;
6075
6059
  }
6076
6060
  function _temp6(action_0) {
6077
6061
  return /* @__PURE__ */ jsx(SelectItem, { value: action_0, children: action_0 }, action_0);
@@ -6313,7 +6297,8 @@ function UrlPropertyField(t0) {
6313
6297
  } else {
6314
6298
  t1 = $[1];
6315
6299
  }
6316
- const urlValue = t1;
6300
+ const urlRawValue = t1;
6301
+ const urlValue = typeof urlRawValue === "string" ? urlRawValue : "[NONE]";
6317
6302
  let t2;
6318
6303
  if ($[2] !== setFieldValue) {
6319
6304
  t2 = (value) => {
@@ -8209,4 +8194,4 @@ export {
8209
8194
  supportedFields as s,
8210
8195
  updatePropertyFromWidget as u
8211
8196
  };
8212
- //# sourceMappingURL=PropertyEditView-BB5xjnhZ.js.map
8197
+ //# sourceMappingURL=PropertyEditView-CvRSV-A2.js.map