@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.
- package/dist/{CollectionEditorDialog-BXIh2AXg.js → CollectionEditorDialog-D0VqpLPO.js} +73 -256
- package/dist/CollectionEditorDialog-D0VqpLPO.js.map +1 -0
- package/dist/{CollectionsStudioView-jR8iz_ja.js → CollectionsStudioView-Bc3Rxxc2.js} +5 -4
- package/dist/{CollectionsStudioView-jR8iz_ja.js.map → CollectionsStudioView-Bc3Rxxc2.js.map} +1 -1
- package/dist/{ExportCollectionAction-CMdiiv1L.js → ExportCollectionAction-Ckc-09BQ.js} +4 -3
- package/dist/ExportCollectionAction-Ckc-09BQ.js.map +1 -0
- package/dist/{ImportCollectionAction-C05lE0IW.js → ImportCollectionAction-BqjIrC3Z.js} +3 -2
- package/dist/{ImportCollectionAction-C05lE0IW.js.map → ImportCollectionAction-BqjIrC3Z.js.map} +1 -1
- package/dist/{PropertyEditView-BB5xjnhZ.js → PropertyEditView-CvRSV-A2.js} +430 -445
- package/dist/PropertyEditView-CvRSV-A2.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +0 -5
- package/dist/collection_editor/index.d.ts +0 -1
- package/dist/collection_editor/types/collection_editor_controller.d.ts +0 -2
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -3
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +1 -7
- package/dist/collection_editor_ui.js +3 -3
- package/dist/components/ArrayContainer.d.ts +2 -2
- package/dist/components/DefaultAppBar.d.ts +18 -1
- package/dist/components/DefaultDrawer.d.ts +51 -3
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
- package/dist/components/EntityCollectionTable/table_bindings.d.ts +4 -3
- package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +4 -3
- package/dist/components/EntityEditView.d.ts +2 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +3 -3
- package/dist/components/PropertyCollectionView.d.ts +1 -1
- package/dist/components/PropertyIdCopyTooltip.d.ts +1 -1
- package/dist/components/SelectableTable/SelectionStore.d.ts +4 -1
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -2
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -2
- package/dist/components/admin/RolesView.d.ts +3 -3
- package/dist/components/admin/UsersView.d.ts +3 -3
- package/dist/components/app/Drawer.d.ts +8 -1
- package/dist/data_export/export/export.d.ts +3 -3
- package/dist/editor/components/editor-bubble.d.ts +5 -1
- package/dist/editor/components/image-bubble.d.ts +5 -1
- package/dist/editor/components/index.d.ts +3 -3
- package/dist/editor/components/table-bubble.d.ts +5 -1
- package/dist/editor/nodeViews/ReactNodeView.d.ts +4 -1
- package/dist/editor/useProseMirror.d.ts +2 -2
- package/dist/editor/utils/remove_classes.d.ts +1 -1
- package/dist/editor.js +15 -14
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +2 -2
- package/dist/form/components/StorageUploadProgress.d.ts +2 -2
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
- package/dist/form/validation.d.ts +3 -3
- package/dist/hooks/navigation/useResolvedCollections.d.ts +6 -0
- package/dist/hooks/navigation/useResolvedViews.d.ts +3 -4
- package/dist/{index-BAM9KCmM.js → index-BCcLwgfe.js} +3 -2
- package/dist/{index-BAM9KCmM.js.map → index-BCcLwgfe.js.map} +1 -1
- package/dist/{index-D5OQhv-T.js → index-DY2k5TtG.js} +3 -3
- package/dist/index-DY2k5TtG.js.map +1 -0
- package/dist/{index-CoSNm3e3.js → index-UQOMHwt1.js} +3 -3
- package/dist/index-UQOMHwt1.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2813 -372
- package/dist/index.js.map +1 -1
- package/dist/{markdown-z2Ir7Cgo.js → markdown-DD2JDU1X.js} +2 -2
- package/dist/markdown-DD2JDU1X.js.map +1 -0
- package/dist/preview/components/UrlComponentPreview.d.ts +1 -0
- package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
- package/dist/types/components/EntityFormProps.d.ts +2 -2
- package/dist/types/fields.d.ts +1 -1
- package/dist/{util-DtbWD7LF.js → util-ZM9gQuCv.js} +2104 -2071
- package/dist/util-ZM9gQuCv.js.map +1 -0
- package/package.json +10 -9
- package/src/collection_editor/ConfigControllerProvider.tsx +3 -13
- package/src/collection_editor/index.ts +1 -3
- package/src/collection_editor/types/collection_editor_controller.tsx +0 -3
- package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -6
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -6
- package/src/collection_editor/ui/EditorEntityAction.tsx +1 -6
- package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +7 -14
- package/src/collection_editor/ui/NewCollectionCard.tsx +1 -5
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -8
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +1 -10
- package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +8 -12
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +21 -21
- package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -4
- package/src/collection_editor/ui/collection_editor/EnumForm.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +3 -3
- package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +8 -8
- package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +37 -57
- package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +8 -8
- package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +5 -5
- package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +3 -2
- package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +4 -7
- package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +4 -4
- package/src/collection_editor/validateCollectionJson.ts +88 -1
- package/src/components/ArrayContainer.tsx +3 -3
- package/src/components/DefaultAppBar.tsx +52 -31
- package/src/components/DefaultDrawer.tsx +279 -66
- package/src/components/DrawerNavigationItem.tsx +1 -1
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -5
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +9 -7
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +5 -5
- package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +12 -9
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
- package/src/components/EntityCollectionTable/table_bindings.tsx +5 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -4
- package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
- package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +7 -6
- package/src/components/EntityDetailView.tsx +46 -24
- package/src/components/EntityEditView.tsx +51 -28
- package/src/components/EntityEditViewFormActions.tsx +4 -4
- package/src/components/EntityPreview.tsx +9 -4
- package/src/components/HomePage/HomePageDnD.tsx +3 -2
- package/src/components/PropertyCollectionView.tsx +1 -1
- package/src/components/PropertyIdCopyTooltip.tsx +1 -1
- package/src/components/RebaseLayout.tsx +5 -1
- package/src/components/RebaseNavigation.tsx +2 -2
- package/src/components/RebaseRouteDefs.tsx +4 -7
- package/src/components/RebaseShell.tsx +16 -13
- package/src/components/SearchIconsView.tsx +1 -8
- package/src/components/SelectableTable/SelectableTable.tsx +8 -11
- package/src/components/SelectableTable/SelectionStore.ts +1 -1
- package/src/components/SelectableTable/filters/BooleanFilterField.tsx +3 -3
- package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +3 -3
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +5 -5
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +3 -3
- package/src/components/SideEntityProvider.tsx +2 -1
- package/src/components/admin/RolesView.tsx +7 -2
- package/src/components/admin/UsersView.tsx +12 -6
- package/src/components/app/Drawer.tsx +9 -1
- package/src/components/app/Scaffold.tsx +5 -1
- package/src/data_export/export/export.ts +17 -17
- package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
- package/src/editor/components/editor-bubble.tsx +32 -9
- package/src/editor/components/image-bubble.tsx +27 -11
- package/src/editor/components/index.ts +3 -3
- package/src/editor/components/table-bubble.tsx +79 -17
- package/src/editor/extensions/HighlightDecorationExtension.ts +3 -2
- package/src/editor/nodeViews/ReactNodeView.tsx +1 -1
- package/src/editor/nodeViews/TaskItemComponent.tsx +9 -8
- package/src/editor/schema.ts +135 -59
- package/src/editor/selectors/link-selector.tsx +8 -5
- package/src/editor/useProseMirror.ts +2 -2
- package/src/editor/utils/remove_classes.ts +6 -5
- package/src/form/EntityForm.tsx +15 -15
- package/src/form/EntityFormActions.tsx +2 -2
- package/src/form/PropertyFieldBinding.tsx +64 -64
- package/src/form/components/FieldHelperText.tsx +4 -4
- package/src/form/components/StorageUploadProgress.tsx +2 -2
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
- package/src/form/field_bindings/BlockFieldBinding.tsx +54 -53
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +290 -289
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +2 -2
- package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -6
- package/src/form/field_bindings/RelationFieldBinding.tsx +4 -4
- package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +84 -84
- package/src/form/field_bindings/SwitchFieldBinding.tsx +16 -16
- package/src/form/field_bindings/TextFieldBinding.tsx +77 -73
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +17 -17
- package/src/form/validation.ts +43 -43
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -5
- package/src/hooks/navigation/useResolvedCollections.ts +27 -7
- package/src/hooks/navigation/useResolvedViews.tsx +24 -44
- package/src/index.ts +2 -0
- package/src/preview/PropertyPreview.tsx +2 -2
- package/src/preview/components/ImagePreview.tsx +2 -1
- package/src/preview/components/UrlComponentPreview.tsx +11 -2
- package/src/preview/components/UserPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -4
- package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +3 -3
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +3 -3
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +3 -2
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +6 -8
- package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +1 -1
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +3 -3
- package/src/preview/property_previews/MapPropertyPreview.tsx +4 -3
- package/src/preview/property_previews/NumberPropertyPreview.tsx +5 -3
- package/src/preview/property_previews/StringPropertyPreview.tsx +10 -8
- package/src/types/components/EntityFormActionsProps.tsx +1 -1
- package/src/types/components/EntityFormProps.tsx +2 -2
- package/src/types/fields.tsx +2 -2
- package/dist/CollectionEditorDialog-BXIh2AXg.js.map +0 -1
- package/dist/ContentHomePage-BQZWuOFb.js +0 -1784
- package/dist/ContentHomePage-BQZWuOFb.js.map +0 -1
- package/dist/ExportCollectionAction-CMdiiv1L.js.map +0 -1
- package/dist/PropertyEditView-BB5xjnhZ.js.map +0 -1
- package/dist/RoleChip-QtUFXeTp.js +0 -67
- package/dist/RoleChip-QtUFXeTp.js.map +0 -1
- package/dist/RolesView-CULIHWZ9.js +0 -437
- package/dist/RolesView-CULIHWZ9.js.map +0 -1
- package/dist/UsersView-D7_AtJ44.js +0 -408
- package/dist/UsersView-D7_AtJ44.js.map +0 -1
- package/dist/collection_editor/types/config_permissions.d.ts +0 -19
- package/dist/index-CoSNm3e3.js.map +0 -1
- package/dist/index-D5OQhv-T.js.map +0 -1
- package/dist/markdown-z2Ir7Cgo.js.map +0 -1
- package/dist/util-DtbWD7LF.js.map +0 -1
- 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,
|
|
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 = (
|
|
2712
|
+
t2 = (t35) => {
|
|
2712
2713
|
const {
|
|
2713
2714
|
id,
|
|
2714
2715
|
property
|
|
2715
|
-
} =
|
|
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 =
|
|
2964
|
-
const t29 =
|
|
2964
|
+
const t28 = selectedProperty;
|
|
2965
|
+
const t29 = Boolean(selectedPropertyKey);
|
|
2965
2966
|
const t30 = !selectedPropertyKey;
|
|
2966
|
-
const t31 = selectedPropertyKey
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
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] =
|
|
2977
|
-
$[63] =
|
|
2978
|
-
$[64] =
|
|
2979
|
-
$[65] =
|
|
2980
|
-
$[66] =
|
|
2981
|
-
$[67] =
|
|
2982
|
-
$[68] =
|
|
2983
|
-
$[69] =
|
|
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
|
-
|
|
2987
|
+
t33 = $[69];
|
|
2986
2988
|
}
|
|
2987
|
-
let
|
|
2988
|
-
if ($[70] !== t19 || $[71] !== t25 || $[72] !==
|
|
2989
|
-
|
|
2989
|
+
let t34;
|
|
2990
|
+
if ($[70] !== t19 || $[71] !== t25 || $[72] !== t33) {
|
|
2991
|
+
t34 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2990
2992
|
t19,
|
|
2991
2993
|
t25,
|
|
2992
|
-
|
|
2994
|
+
t33
|
|
2993
2995
|
] });
|
|
2994
2996
|
$[70] = t19;
|
|
2995
2997
|
$[71] = t25;
|
|
2996
|
-
$[72] =
|
|
2997
|
-
$[73] =
|
|
2998
|
+
$[72] = t33;
|
|
2999
|
+
$[73] = t34;
|
|
2998
3000
|
} else {
|
|
2999
|
-
|
|
3001
|
+
t34 = $[73];
|
|
3000
3002
|
}
|
|
3001
|
-
return
|
|
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
|
-
|
|
4088
|
+
const t3 = t2;
|
|
4089
|
+
let t4;
|
|
4087
4090
|
if ($[4] !== t) {
|
|
4088
|
-
|
|
4091
|
+
t4 = t("min_value");
|
|
4089
4092
|
$[4] = t;
|
|
4090
|
-
$[5] =
|
|
4093
|
+
$[5] = t4;
|
|
4091
4094
|
} else {
|
|
4092
|
-
|
|
4095
|
+
t4 = $[5];
|
|
4093
4096
|
}
|
|
4094
|
-
let
|
|
4095
|
-
if ($[6] !== disabled || $[7] !== handleChange || $[8] !==
|
|
4096
|
-
|
|
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] =
|
|
4100
|
-
$[9] =
|
|
4101
|
-
$[10] =
|
|
4102
|
+
$[8] = t3;
|
|
4103
|
+
$[9] = t4;
|
|
4104
|
+
$[10] = t5;
|
|
4102
4105
|
} else {
|
|
4103
|
-
|
|
4106
|
+
t5 = $[10];
|
|
4104
4107
|
}
|
|
4105
|
-
let
|
|
4108
|
+
let t6;
|
|
4106
4109
|
if ($[11] !== values) {
|
|
4107
|
-
|
|
4110
|
+
t6 = getIn(values, "validation.max");
|
|
4108
4111
|
$[11] = values;
|
|
4109
|
-
$[12] =
|
|
4112
|
+
$[12] = t6;
|
|
4110
4113
|
} else {
|
|
4111
|
-
|
|
4114
|
+
t6 = $[12];
|
|
4112
4115
|
}
|
|
4113
|
-
|
|
4116
|
+
const t7 = t6;
|
|
4117
|
+
let t8;
|
|
4114
4118
|
if ($[13] !== t) {
|
|
4115
|
-
|
|
4119
|
+
t8 = t("max_value");
|
|
4116
4120
|
$[13] = t;
|
|
4117
|
-
$[14] =
|
|
4121
|
+
$[14] = t8;
|
|
4118
4122
|
} else {
|
|
4119
|
-
|
|
4123
|
+
t8 = $[14];
|
|
4120
4124
|
}
|
|
4121
|
-
let
|
|
4122
|
-
if ($[15] !== disabled || $[16] !== handleChange || $[17] !==
|
|
4123
|
-
|
|
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] =
|
|
4127
|
-
$[18] =
|
|
4128
|
-
$[19] =
|
|
4130
|
+
$[17] = t7;
|
|
4131
|
+
$[18] = t8;
|
|
4132
|
+
$[19] = t9;
|
|
4129
4133
|
} else {
|
|
4130
|
-
|
|
4134
|
+
t9 = $[19];
|
|
4131
4135
|
}
|
|
4132
|
-
let
|
|
4136
|
+
let t10;
|
|
4133
4137
|
if ($[20] !== values) {
|
|
4134
|
-
|
|
4138
|
+
t10 = getIn(values, "validation.lessThan");
|
|
4135
4139
|
$[20] = values;
|
|
4136
|
-
$[21] =
|
|
4140
|
+
$[21] = t10;
|
|
4137
4141
|
} else {
|
|
4138
|
-
|
|
4142
|
+
t10 = $[21];
|
|
4139
4143
|
}
|
|
4140
|
-
|
|
4144
|
+
const t11 = t10;
|
|
4145
|
+
let t12;
|
|
4141
4146
|
if ($[22] !== t) {
|
|
4142
|
-
|
|
4147
|
+
t12 = t("less_than");
|
|
4143
4148
|
$[22] = t;
|
|
4144
|
-
$[23] =
|
|
4149
|
+
$[23] = t12;
|
|
4145
4150
|
} else {
|
|
4146
|
-
|
|
4151
|
+
t12 = $[23];
|
|
4147
4152
|
}
|
|
4148
|
-
let
|
|
4149
|
-
if ($[24] !== disabled || $[25] !== handleChange || $[26] !==
|
|
4150
|
-
|
|
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] =
|
|
4154
|
-
$[27] =
|
|
4155
|
-
$[28] =
|
|
4158
|
+
$[26] = t11;
|
|
4159
|
+
$[27] = t12;
|
|
4160
|
+
$[28] = t13;
|
|
4156
4161
|
} else {
|
|
4157
|
-
|
|
4162
|
+
t13 = $[28];
|
|
4158
4163
|
}
|
|
4159
|
-
let
|
|
4164
|
+
let t14;
|
|
4160
4165
|
if ($[29] !== values) {
|
|
4161
|
-
|
|
4166
|
+
t14 = getIn(values, "validation.moreThan");
|
|
4162
4167
|
$[29] = values;
|
|
4163
|
-
$[30] =
|
|
4168
|
+
$[30] = t14;
|
|
4164
4169
|
} else {
|
|
4165
|
-
|
|
4170
|
+
t14 = $[30];
|
|
4166
4171
|
}
|
|
4167
|
-
|
|
4172
|
+
const t15 = t14;
|
|
4173
|
+
let t16;
|
|
4168
4174
|
if ($[31] !== t) {
|
|
4169
|
-
|
|
4175
|
+
t16 = t("more_than");
|
|
4170
4176
|
$[31] = t;
|
|
4171
|
-
$[32] =
|
|
4177
|
+
$[32] = t16;
|
|
4172
4178
|
} else {
|
|
4173
|
-
|
|
4179
|
+
t16 = $[32];
|
|
4174
4180
|
}
|
|
4175
|
-
let
|
|
4176
|
-
if ($[33] !== disabled || $[34] !== handleChange || $[35] !==
|
|
4177
|
-
|
|
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] =
|
|
4181
|
-
$[36] =
|
|
4182
|
-
$[37] =
|
|
4186
|
+
$[35] = t15;
|
|
4187
|
+
$[36] = t16;
|
|
4188
|
+
$[37] = t17;
|
|
4183
4189
|
} else {
|
|
4184
|
-
|
|
4190
|
+
t17 = $[37];
|
|
4185
4191
|
}
|
|
4186
|
-
let
|
|
4192
|
+
let t18;
|
|
4187
4193
|
if ($[38] !== disabled || $[39] !== t) {
|
|
4188
|
-
|
|
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
|
-
} =
|
|
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] =
|
|
4203
|
+
$[40] = t18;
|
|
4198
4204
|
} else {
|
|
4199
|
-
|
|
4205
|
+
t18 = $[40];
|
|
4200
4206
|
}
|
|
4201
|
-
let
|
|
4207
|
+
let t19;
|
|
4202
4208
|
if ($[41] !== disabled || $[42] !== t) {
|
|
4203
|
-
|
|
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
|
-
} =
|
|
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] =
|
|
4218
|
+
$[43] = t19;
|
|
4213
4219
|
} else {
|
|
4214
|
-
|
|
4220
|
+
t19 = $[43];
|
|
4215
4221
|
}
|
|
4216
|
-
let
|
|
4222
|
+
let t20;
|
|
4217
4223
|
if ($[44] !== disabled || $[45] !== t) {
|
|
4218
|
-
|
|
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
|
-
} =
|
|
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] =
|
|
4233
|
+
$[46] = t20;
|
|
4228
4234
|
} else {
|
|
4229
|
-
|
|
4235
|
+
t20 = $[46];
|
|
4230
4236
|
}
|
|
4231
|
-
let
|
|
4232
|
-
if ($[47] !== t1 || $[48] !==
|
|
4233
|
-
|
|
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
|
-
|
|
4236
|
-
|
|
4237
|
-
t10,
|
|
4241
|
+
t5,
|
|
4242
|
+
t9,
|
|
4238
4243
|
t13,
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4244
|
+
t17,
|
|
4245
|
+
t18,
|
|
4246
|
+
t19,
|
|
4247
|
+
t20
|
|
4242
4248
|
] });
|
|
4243
4249
|
$[47] = t1;
|
|
4244
|
-
$[48] =
|
|
4245
|
-
$[49] =
|
|
4246
|
-
$[50] =
|
|
4247
|
-
$[51] =
|
|
4248
|
-
$[52] =
|
|
4249
|
-
$[53] =
|
|
4250
|
-
$[54] =
|
|
4251
|
-
$[55] =
|
|
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
|
-
|
|
4259
|
+
t21 = $[55];
|
|
4254
4260
|
}
|
|
4255
|
-
return
|
|
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(
|
|
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.
|
|
5592
|
-
t1 = values.
|
|
5593
|
-
$[0] = values.
|
|
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
|
|
5599
|
-
const
|
|
5600
|
-
const
|
|
5601
|
-
const
|
|
5602
|
-
const
|
|
5603
|
-
const
|
|
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 =
|
|
5609
|
-
const onDelete =
|
|
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.
|
|
5633
|
+
if ($[2] !== setFieldValue || $[3] !== values.through) {
|
|
5615
5634
|
t2 = (patch) => {
|
|
5616
|
-
const
|
|
5617
|
-
|
|
5618
|
-
|
|
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.
|
|
5646
|
+
$[3] = values.through;
|
|
5624
5647
|
$[4] = t2;
|
|
5625
5648
|
} else {
|
|
5626
5649
|
t2 = $[4];
|
|
5627
5650
|
}
|
|
5628
|
-
const
|
|
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 ($[
|
|
5651
|
-
|
|
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
|
-
|
|
5657
|
-
$[
|
|
5658
|
-
$[
|
|
5659
|
-
$[
|
|
5660
|
+
t4 = [targetSlug, relationName, setFieldValue];
|
|
5661
|
+
$[5] = relationName;
|
|
5662
|
+
$[6] = setFieldValue;
|
|
5663
|
+
$[7] = targetSlug;
|
|
5664
|
+
$[8] = t3;
|
|
5665
|
+
$[9] = t4;
|
|
5660
5666
|
} else {
|
|
5661
|
-
|
|
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 =
|
|
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
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
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
|
-
|
|
5697
|
+
t7 = $[18];
|
|
5690
5698
|
}
|
|
5691
|
-
const
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
$[
|
|
5697
|
-
$[
|
|
5698
|
-
$[
|
|
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
|
-
|
|
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 ($[
|
|
5707
|
-
t11 = /* @__PURE__ */
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
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 = $[
|
|
5720
|
+
t11 = $[24];
|
|
5713
5721
|
}
|
|
5714
5722
|
let t12;
|
|
5715
|
-
if ($[
|
|
5716
|
-
t12 =
|
|
5717
|
-
|
|
5718
|
-
|
|
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 = $[
|
|
5728
|
+
t12 = $[26];
|
|
5725
5729
|
}
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
$[
|
|
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
|
-
|
|
5740
|
+
t14 = $[31];
|
|
5733
5741
|
}
|
|
5734
|
-
const
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
$[
|
|
5740
|
-
$[
|
|
5741
|
-
$[
|
|
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
|
-
|
|
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 ($[
|
|
5750
|
-
t18 = /* @__PURE__ */
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
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 = $[
|
|
5763
|
+
t18 = $[37];
|
|
5756
5764
|
}
|
|
5757
5765
|
let t19;
|
|
5758
|
-
if ($[
|
|
5759
|
-
t19 =
|
|
5760
|
-
|
|
5761
|
-
|
|
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 = $[
|
|
5771
|
+
t19 = $[39];
|
|
5768
5772
|
}
|
|
5769
5773
|
let t20;
|
|
5770
|
-
if ($[
|
|
5771
|
-
t20 = (
|
|
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
|
-
$[
|
|
5779
|
+
$[40] = t20;
|
|
5786
5780
|
} else {
|
|
5787
|
-
|
|
5781
|
+
t20 = $[40];
|
|
5788
5782
|
}
|
|
5789
|
-
let
|
|
5790
|
-
if ($[
|
|
5791
|
-
|
|
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
|
-
$[
|
|
5789
|
+
$[41] = t21;
|
|
5796
5790
|
} else {
|
|
5797
|
-
|
|
5791
|
+
t21 = $[41];
|
|
5798
5792
|
}
|
|
5799
|
-
let
|
|
5800
|
-
if ($[
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
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
|
-
$[
|
|
5806
|
-
$[
|
|
5807
|
-
$[
|
|
5808
|
-
$[
|
|
5799
|
+
$[42] = cardinality;
|
|
5800
|
+
$[43] = disabled;
|
|
5801
|
+
$[44] = t19;
|
|
5802
|
+
$[45] = t22;
|
|
5809
5803
|
} else {
|
|
5810
|
-
|
|
5804
|
+
t22 = $[45];
|
|
5811
5805
|
}
|
|
5812
|
-
let
|
|
5813
|
-
if ($[
|
|
5814
|
-
|
|
5815
|
-
$[
|
|
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
|
-
|
|
5811
|
+
t23 = $[46];
|
|
5818
5812
|
}
|
|
5819
|
-
let
|
|
5820
|
-
if ($[
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
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
|
-
$[
|
|
5826
|
-
$[
|
|
5819
|
+
$[47] = t22;
|
|
5820
|
+
$[48] = t24;
|
|
5827
5821
|
} else {
|
|
5828
|
-
|
|
5822
|
+
t24 = $[48];
|
|
5829
5823
|
}
|
|
5830
|
-
let
|
|
5831
|
-
if ($[
|
|
5832
|
-
|
|
5833
|
-
|
|
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
|
-
|
|
5830
|
+
t25 = $[50];
|
|
5839
5831
|
}
|
|
5840
|
-
let
|
|
5841
|
-
if ($[
|
|
5842
|
-
|
|
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
|
-
$[
|
|
5838
|
+
$[51] = t26;
|
|
5847
5839
|
} else {
|
|
5848
|
-
|
|
5840
|
+
t26 = $[51];
|
|
5849
5841
|
}
|
|
5850
|
-
let
|
|
5851
|
-
if ($[
|
|
5852
|
-
|
|
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
|
-
$[
|
|
5848
|
+
$[52] = t27;
|
|
5857
5849
|
} else {
|
|
5858
|
-
|
|
5850
|
+
t27 = $[52];
|
|
5859
5851
|
}
|
|
5860
|
-
let
|
|
5861
|
-
if ($[
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
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
|
-
$[
|
|
5867
|
-
$[
|
|
5868
|
-
$[
|
|
5869
|
-
$[
|
|
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 = $[
|
|
5870
|
+
t29 = $[57];
|
|
5872
5871
|
}
|
|
5873
5872
|
let t30;
|
|
5874
|
-
if ($[
|
|
5875
|
-
t30 = /* @__PURE__ */
|
|
5876
|
-
|
|
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 = $[
|
|
5881
|
+
t30 = $[59];
|
|
5879
5882
|
}
|
|
5880
5883
|
let t31;
|
|
5881
|
-
if ($[63] !==
|
|
5882
|
-
t31 = /* @__PURE__ */ jsxs("div", { className: "col-span-12
|
|
5883
|
-
|
|
5884
|
-
|
|
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
|
-
$[
|
|
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] !==
|
|
5893
|
-
t32 =
|
|
5894
|
-
/* @__PURE__ */ jsx(TextField, { value:
|
|
5895
|
-
|
|
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] =
|
|
5901
|
-
$[67] =
|
|
5902
|
-
$[68] =
|
|
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] !==
|
|
5909
|
-
t33 =
|
|
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
|
-
$[
|
|
5949
|
-
$[
|
|
5950
|
-
$[
|
|
5951
|
-
$[
|
|
5952
|
-
$[
|
|
5953
|
-
$[
|
|
5954
|
-
$[
|
|
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 = $[
|
|
5952
|
+
t34 = $[78];
|
|
5957
5953
|
}
|
|
5958
5954
|
let t35;
|
|
5959
|
-
if ($[
|
|
5960
|
-
t35 = (
|
|
5961
|
-
|
|
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 = $[
|
|
5959
|
+
t35 = $[79];
|
|
5967
5960
|
}
|
|
5968
5961
|
let t36;
|
|
5969
|
-
if ($[
|
|
5970
|
-
t36 =
|
|
5971
|
-
$[
|
|
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 = $[
|
|
5969
|
+
t36 = $[83];
|
|
5974
5970
|
}
|
|
5975
5971
|
let t37;
|
|
5976
|
-
if ($[
|
|
5977
|
-
t37 = /* @__PURE__ */ jsx(
|
|
5978
|
-
$[
|
|
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 = $[
|
|
5976
|
+
t37 = $[84];
|
|
5984
5977
|
}
|
|
5985
5978
|
let t38;
|
|
5986
|
-
if ($[
|
|
5987
|
-
t38 = /* @__PURE__ */
|
|
5988
|
-
|
|
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 = $[
|
|
5987
|
+
t38 = $[86];
|
|
5991
5988
|
}
|
|
5992
5989
|
let t39;
|
|
5993
|
-
if ($[
|
|
5994
|
-
t39 =
|
|
5995
|
-
|
|
5996
|
-
|
|
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 = $[
|
|
5995
|
+
t39 = $[88];
|
|
6002
5996
|
}
|
|
6003
5997
|
let t40;
|
|
6004
|
-
if ($[
|
|
6005
|
-
t40 = (
|
|
6006
|
-
|
|
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 = $[
|
|
6002
|
+
t40 = $[89];
|
|
6012
6003
|
}
|
|
6013
6004
|
let t41;
|
|
6014
|
-
if ($[
|
|
6015
|
-
t41 =
|
|
6016
|
-
$[
|
|
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 = $[
|
|
6012
|
+
t41 = $[93];
|
|
6019
6013
|
}
|
|
6020
6014
|
let t42;
|
|
6021
|
-
if ($[
|
|
6022
|
-
t42 = /* @__PURE__ */ jsx(
|
|
6023
|
-
$[
|
|
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 = $[
|
|
6019
|
+
t42 = $[94];
|
|
6029
6020
|
}
|
|
6030
6021
|
let t43;
|
|
6031
|
-
if ($[
|
|
6032
|
-
t43 = /* @__PURE__ */
|
|
6033
|
-
|
|
6034
|
-
|
|
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
|
-
$[
|
|
6044
|
-
$[
|
|
6027
|
+
$[95] = t41;
|
|
6028
|
+
$[96] = t43;
|
|
6045
6029
|
} else {
|
|
6046
|
-
|
|
6030
|
+
t43 = $[96];
|
|
6047
6031
|
}
|
|
6048
|
-
let
|
|
6049
|
-
if ($[
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
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
|
-
|
|
6058
|
-
|
|
6059
|
-
t44
|
|
6042
|
+
t38,
|
|
6043
|
+
t43
|
|
6060
6044
|
] });
|
|
6061
|
-
$[
|
|
6062
|
-
$[
|
|
6063
|
-
$[
|
|
6064
|
-
$[
|
|
6065
|
-
$[
|
|
6066
|
-
$[
|
|
6067
|
-
$[
|
|
6068
|
-
$[
|
|
6069
|
-
$[
|
|
6070
|
-
$[
|
|
6071
|
-
} else {
|
|
6072
|
-
|
|
6073
|
-
}
|
|
6074
|
-
return
|
|
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
|
|
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-
|
|
8197
|
+
//# sourceMappingURL=PropertyEditView-CvRSV-A2.js.map
|