@rebasepro/admin 0.4.0 → 0.5.0
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/README.md +135 -0
- package/dist/{CollectionEditorDialog-Bo86h-d-.js → CollectionEditorDialog-C8E440oK.js} +3 -3
- package/dist/CollectionEditorDialog-C8E440oK.js.map +1 -0
- package/dist/{CollectionsStudioView-bsg4AT_Z.js → CollectionsStudioView-Brr_b06v.js} +4 -4
- package/dist/{CollectionsStudioView-bsg4AT_Z.js.map → CollectionsStudioView-Brr_b06v.js.map} +1 -1
- package/dist/{ExportCollectionAction-Cf-Id5uO.js → ExportCollectionAction-D3TTYXrq.js} +2 -2
- package/dist/{ExportCollectionAction-Cf-Id5uO.js.map → ExportCollectionAction-D3TTYXrq.js.map} +1 -1
- package/dist/{ImportCollectionAction-LN5sreK9.js → ImportCollectionAction-Dn7lya6E.js} +2 -2
- package/dist/{ImportCollectionAction-LN5sreK9.js.map → ImportCollectionAction-Dn7lya6E.js.map} +1 -1
- package/dist/{PropertyEditView-jCWCxmCz.js → PropertyEditView-ChBleIbN.js} +4 -4
- package/dist/PropertyEditView-ChBleIbN.js.map +1 -0
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +1 -0
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +1 -1
- package/dist/collection_editor_ui.js +3 -3
- package/dist/{index-z3H8iqsj.js → index-D3S9x_RP.js} +2 -2
- package/dist/{index-z3H8iqsj.js.map → index-D3S9x_RP.js.map} +1 -1
- package/dist/{index-Cb0bPnzZ.js → index-D9RNzm01.js} +3 -3
- package/dist/index-D9RNzm01.js.map +1 -0
- package/dist/{index-BrqSvMG0.js → index-DrrT332R.js} +3 -3
- package/dist/index-DrrT332R.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/{util-CvNp6A-r.js → util-COYYD8zr.js} +79 -110
- package/dist/util-COYYD8zr.js.map +1 -0
- package/package.json +9 -10
- package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +2 -2
- package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/products_template.ts +1 -1
- package/src/collection_editor/ui/collection_editor/templates/users_template.ts +1 -1
- package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +5 -2
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +3 -4
- package/src/components/EntityDetailView.tsx +6 -9
- package/src/components/EntityEditView.tsx +9 -15
- package/src/components/EntitySidePanel.tsx +3 -0
- package/src/form/PropertyFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MapFieldBinding.tsx +3 -45
- package/dist/CollectionEditorDialog-Bo86h-d-.js.map +0 -1
- package/dist/PropertyEditView-jCWCxmCz.js.map +0 -1
- package/dist/index-BrqSvMG0.js.map +0 -1
- package/dist/index-Cb0bPnzZ.js.map +0 -1
- package/dist/util-CvNp6A-r.js.map +0 -1
|
@@ -9,7 +9,7 @@ import { isPropertyBuilder, enumToObjectEntries, getLabelOrConfigFrom, resolveAr
|
|
|
9
9
|
import { EntityRelation, EntityReference, GeoPoint, getDataSourceCapabilities, Vector } from "@rebasepro/types";
|
|
10
10
|
import { useFormex, setIn, Field, getIn, useCreateFormex, Formex } from "@rebasepro/formex";
|
|
11
11
|
import { inferTypeFromValue } from "@rebasepro/schema-inference";
|
|
12
|
-
import { hydrateRegExp, getValueInPath, mergeDeep, getHashValue,
|
|
12
|
+
import { hydrateRegExp, getValueInPath, mergeDeep, getHashValue, randomString, toArray, defaultDateFormat, isObject } from "@rebasepro/utils";
|
|
13
13
|
import { deepEqual as deepEqual$1 } from "fast-equals";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { useSensor, PointerSensor, KeyboardSensor, useSensors, DndContext, closestCenter, useDroppable, DragOverlay, pointerWithin, rectIntersection } from "@dnd-kit/core";
|
|
@@ -2708,7 +2708,7 @@ function EntityJsonPreview(t0) {
|
|
|
2708
2708
|
const MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
|
|
2709
2709
|
const JSON_TAB_VALUE = "__json";
|
|
2710
2710
|
const HISTORY_TAB_VALUE = "__rebase_history";
|
|
2711
|
-
const EntityHistoryView$1 = lazy(() => import("./index-
|
|
2711
|
+
const EntityHistoryView$1 = lazy(() => import("./index-D3S9x_RP.js").then((m) => ({
|
|
2712
2712
|
default: m.EntityHistoryView
|
|
2713
2713
|
})));
|
|
2714
2714
|
function EntityDetailView(t0) {
|
|
@@ -2818,22 +2818,18 @@ function EntityDetailViewInner({
|
|
|
2818
2818
|
status: "existing",
|
|
2819
2819
|
entityId
|
|
2820
2820
|
}), [collection, entityId]);
|
|
2821
|
-
const
|
|
2821
|
+
const userHasChangedTab = useRef(false);
|
|
2822
2822
|
const [selectedTab, setSelectedTab] = useState(() => {
|
|
2823
2823
|
const val = selectedTabProp ?? defaultSelectedView ?? MAIN_TAB_VALUE;
|
|
2824
|
-
hasAppliedDefault.current = true;
|
|
2825
2824
|
return val === "edit" ? MAIN_TAB_VALUE : val;
|
|
2826
2825
|
});
|
|
2827
2826
|
useEffect(() => {
|
|
2828
|
-
const val_0 =
|
|
2827
|
+
const val_0 = userHasChangedTab.current ? selectedTabProp ?? MAIN_TAB_VALUE : selectedTabProp ?? defaultSelectedView ?? MAIN_TAB_VALUE;
|
|
2829
2828
|
const target = val_0 === "edit" ? MAIN_TAB_VALUE : val_0;
|
|
2830
|
-
if (!hasAppliedDefault.current) {
|
|
2831
|
-
hasAppliedDefault.current = true;
|
|
2832
|
-
}
|
|
2833
2829
|
if (target !== selectedTab) {
|
|
2834
2830
|
setSelectedTab(target);
|
|
2835
2831
|
}
|
|
2836
|
-
}, [selectedTabProp]);
|
|
2832
|
+
}, [selectedTabProp, defaultSelectedView]);
|
|
2837
2833
|
const subcollections = getSubcollections(collection).filter((c2) => !c2.hideFromNavigation);
|
|
2838
2834
|
const subcollectionsCount = subcollections?.length ?? 0;
|
|
2839
2835
|
const customViews = collection.entityViews ?? [];
|
|
@@ -2918,6 +2914,7 @@ function EntityDetailViewInner({
|
|
|
2918
2914
|
] }, `subcol_${subcollectionId}`);
|
|
2919
2915
|
}).filter(Boolean);
|
|
2920
2916
|
const onSideTabClick = useCallback((value) => {
|
|
2917
|
+
userHasChangedTab.current = true;
|
|
2921
2918
|
setSelectedTab(value);
|
|
2922
2919
|
onTabChange?.({
|
|
2923
2920
|
path,
|
|
@@ -8488,7 +8485,7 @@ function EntityActionButton(t0) {
|
|
|
8488
8485
|
}
|
|
8489
8486
|
return t5;
|
|
8490
8487
|
}
|
|
8491
|
-
const EntityHistoryView = lazy(() => import("./index-
|
|
8488
|
+
const EntityHistoryView = lazy(() => import("./index-D3S9x_RP.js").then((m) => ({
|
|
8492
8489
|
default: m.EntityHistoryView
|
|
8493
8490
|
})));
|
|
8494
8491
|
function EntityEditView(t0) {
|
|
@@ -8651,22 +8648,18 @@ function EntityEditViewInner({
|
|
|
8651
8648
|
status,
|
|
8652
8649
|
entityId
|
|
8653
8650
|
}), [collection, status, entityId]);
|
|
8654
|
-
const
|
|
8651
|
+
const userHasChangedTab = useRef(false);
|
|
8655
8652
|
const [selectedTab, setSelectedTab] = useState(() => {
|
|
8656
8653
|
const val = selectedTabProp ?? defaultSelectedView ?? MAIN_TAB_VALUE;
|
|
8657
|
-
hasAppliedDefault.current = true;
|
|
8658
8654
|
return val === "edit" ? MAIN_TAB_VALUE : val;
|
|
8659
8655
|
});
|
|
8660
8656
|
useEffect(() => {
|
|
8661
|
-
const val_0 =
|
|
8657
|
+
const val_0 = userHasChangedTab.current ? selectedTabProp ?? MAIN_TAB_VALUE : selectedTabProp ?? defaultSelectedView ?? MAIN_TAB_VALUE;
|
|
8662
8658
|
const target = val_0 === "edit" ? MAIN_TAB_VALUE : val_0;
|
|
8663
|
-
if (!hasAppliedDefault.current) {
|
|
8664
|
-
hasAppliedDefault.current = true;
|
|
8665
|
-
}
|
|
8666
8659
|
if (target !== selectedTab) {
|
|
8667
8660
|
setSelectedTab(target);
|
|
8668
8661
|
}
|
|
8669
|
-
}, [selectedTabProp]);
|
|
8662
|
+
}, [selectedTabProp, defaultSelectedView]);
|
|
8670
8663
|
const subcollections = getSubcollections(collection).filter((c2) => !c2.hideFromNavigation);
|
|
8671
8664
|
const subcollectionsCount = subcollections?.length ?? 0;
|
|
8672
8665
|
const customViews = collection.entityViews ?? [];
|
|
@@ -8746,6 +8739,7 @@ function EntityEditViewInner({
|
|
|
8746
8739
|
] }, `subcol_${subcollectionId}`);
|
|
8747
8740
|
}).filter(Boolean);
|
|
8748
8741
|
const onSideTabClick = useCallback((value_0) => {
|
|
8742
|
+
userHasChangedTab.current = true;
|
|
8749
8743
|
setSelectedTab(value_0);
|
|
8750
8744
|
if (status === "existing") {
|
|
8751
8745
|
onTabChange?.({
|
|
@@ -9004,6 +8998,9 @@ function EntitySidePanel(props) {
|
|
|
9004
8998
|
setShowEditInPanel(selectedTab === "edit");
|
|
9005
8999
|
}, [entityId, selectedTab]);
|
|
9006
9000
|
const hasCorrectedDefaultView = useRef(false);
|
|
9001
|
+
useEffect(() => {
|
|
9002
|
+
hasCorrectedDefaultView.current = false;
|
|
9003
|
+
}, [entityId]);
|
|
9007
9004
|
useEffect(() => {
|
|
9008
9005
|
if (hasCorrectedDefaultView.current) return;
|
|
9009
9006
|
if (selectedTab) return;
|
|
@@ -11809,7 +11806,6 @@ function FieldInternal({
|
|
|
11809
11806
|
propertyKey,
|
|
11810
11807
|
property,
|
|
11811
11808
|
Component,
|
|
11812
|
-
// Cast component here since it is a generic component type
|
|
11813
11809
|
plugins
|
|
11814
11810
|
});
|
|
11815
11811
|
const UsedComponent = WrappedComponent ?? Component;
|
|
@@ -13619,10 +13615,9 @@ function gettype(value) {
|
|
|
13619
13615
|
return void 0;
|
|
13620
13616
|
}
|
|
13621
13617
|
function MapFieldBinding(t0) {
|
|
13622
|
-
const $ = c(
|
|
13618
|
+
const $ = c(37);
|
|
13623
13619
|
const {
|
|
13624
13620
|
propertyKey,
|
|
13625
|
-
value,
|
|
13626
13621
|
showError,
|
|
13627
13622
|
error,
|
|
13628
13623
|
disabled,
|
|
@@ -13634,52 +13629,26 @@ function MapFieldBinding(t0) {
|
|
|
13634
13629
|
context,
|
|
13635
13630
|
onPropertyChange
|
|
13636
13631
|
} = t0;
|
|
13637
|
-
const pickOnlySomeKeys = property.pickOnlySomeKeys || false;
|
|
13638
13632
|
const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
|
|
13639
13633
|
const minimalistView = minimalistViewProp || property.ui?.minimalistView;
|
|
13640
13634
|
useTranslation();
|
|
13641
13635
|
if (!property.properties) {
|
|
13642
13636
|
throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${propertyKey}`);
|
|
13643
13637
|
}
|
|
13644
|
-
|
|
13645
|
-
if (pickOnlySomeKeys) {
|
|
13646
|
-
if (value) {
|
|
13647
|
-
let t12;
|
|
13648
|
-
if ($[0] !== property.properties || $[1] !== value) {
|
|
13649
|
-
t12 = pick(property.properties, ...Object.keys(value).filter((key) => key in property.properties));
|
|
13650
|
-
$[0] = property.properties;
|
|
13651
|
-
$[1] = value;
|
|
13652
|
-
$[2] = t12;
|
|
13653
|
-
} else {
|
|
13654
|
-
t12 = $[2];
|
|
13655
|
-
}
|
|
13656
|
-
mapProperties = t12;
|
|
13657
|
-
} else {
|
|
13658
|
-
let t12;
|
|
13659
|
-
if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
13660
|
-
t12 = {};
|
|
13661
|
-
$[3] = t12;
|
|
13662
|
-
} else {
|
|
13663
|
-
t12 = $[3];
|
|
13664
|
-
}
|
|
13665
|
-
mapProperties = t12;
|
|
13666
|
-
}
|
|
13667
|
-
} else {
|
|
13668
|
-
mapProperties = property.properties;
|
|
13669
|
-
}
|
|
13638
|
+
const mapProperties = property.properties;
|
|
13670
13639
|
const t1 = minimalistView && property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0;
|
|
13671
13640
|
let t2;
|
|
13672
|
-
if ($[
|
|
13641
|
+
if ($[0] !== t1) {
|
|
13673
13642
|
t2 = cls("py-1 flex flex-col space-y-2", t1);
|
|
13674
|
-
$[
|
|
13675
|
-
$[
|
|
13643
|
+
$[0] = t1;
|
|
13644
|
+
$[1] = t2;
|
|
13676
13645
|
} else {
|
|
13677
|
-
t2 = $[
|
|
13646
|
+
t2 = $[1];
|
|
13678
13647
|
}
|
|
13679
13648
|
let t3;
|
|
13680
|
-
if ($[
|
|
13649
|
+
if ($[2] !== autoFocus || $[3] !== context || $[4] !== disabled || $[5] !== includeDescription || $[6] !== mapProperties || $[7] !== onPropertyChange || $[8] !== propertyKey) {
|
|
13681
13650
|
let t42;
|
|
13682
|
-
if ($[
|
|
13651
|
+
if ($[10] !== autoFocus || $[11] !== context || $[12] !== disabled || $[13] !== includeDescription || $[14] !== onPropertyChange || $[15] !== propertyKey) {
|
|
13683
13652
|
t42 = (t52, index) => {
|
|
13684
13653
|
const [entryKey, childProperty] = t52;
|
|
13685
13654
|
const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.ui?.disabled);
|
|
@@ -13702,40 +13671,40 @@ function MapFieldBinding(t0) {
|
|
|
13702
13671
|
};
|
|
13703
13672
|
return /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
|
|
13704
13673
|
};
|
|
13705
|
-
$[
|
|
13706
|
-
$[
|
|
13707
|
-
$[
|
|
13708
|
-
$[
|
|
13709
|
-
$[
|
|
13710
|
-
$[
|
|
13711
|
-
$[
|
|
13674
|
+
$[10] = autoFocus;
|
|
13675
|
+
$[11] = context;
|
|
13676
|
+
$[12] = disabled;
|
|
13677
|
+
$[13] = includeDescription;
|
|
13678
|
+
$[14] = onPropertyChange;
|
|
13679
|
+
$[15] = propertyKey;
|
|
13680
|
+
$[16] = t42;
|
|
13712
13681
|
} else {
|
|
13713
|
-
t42 = $[
|
|
13682
|
+
t42 = $[16];
|
|
13714
13683
|
}
|
|
13715
13684
|
t3 = Object.entries(mapProperties).filter(_temp$h).map(t42);
|
|
13716
|
-
$[
|
|
13717
|
-
$[
|
|
13718
|
-
$[
|
|
13719
|
-
$[
|
|
13720
|
-
$[
|
|
13721
|
-
$[
|
|
13722
|
-
$[
|
|
13723
|
-
$[
|
|
13685
|
+
$[2] = autoFocus;
|
|
13686
|
+
$[3] = context;
|
|
13687
|
+
$[4] = disabled;
|
|
13688
|
+
$[5] = includeDescription;
|
|
13689
|
+
$[6] = mapProperties;
|
|
13690
|
+
$[7] = onPropertyChange;
|
|
13691
|
+
$[8] = propertyKey;
|
|
13692
|
+
$[9] = t3;
|
|
13724
13693
|
} else {
|
|
13725
|
-
t3 = $[
|
|
13694
|
+
t3 = $[9];
|
|
13726
13695
|
}
|
|
13727
13696
|
let t4;
|
|
13728
|
-
if ($[
|
|
13697
|
+
if ($[17] !== t2 || $[18] !== t3) {
|
|
13729
13698
|
t4 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: t2, children: t3 }) });
|
|
13730
|
-
$[
|
|
13731
|
-
$[
|
|
13732
|
-
$[
|
|
13699
|
+
$[17] = t2;
|
|
13700
|
+
$[18] = t3;
|
|
13701
|
+
$[19] = t4;
|
|
13733
13702
|
} else {
|
|
13734
|
-
t4 = $[
|
|
13703
|
+
t4 = $[19];
|
|
13735
13704
|
}
|
|
13736
13705
|
const mapFormView = t4;
|
|
13737
13706
|
let t5;
|
|
13738
|
-
if ($[
|
|
13707
|
+
if ($[20] !== expanded || $[21] !== mapFormView || $[22] !== minimalistView || $[23] !== onPropertyChange || $[24] !== property || $[25] !== propertyKey) {
|
|
13739
13708
|
t5 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, onExpandedChange: (expanded_0) => {
|
|
13740
13709
|
onPropertyChange?.({
|
|
13741
13710
|
ui: {
|
|
@@ -13744,44 +13713,44 @@ function MapFieldBinding(t0) {
|
|
|
13744
13713
|
}
|
|
13745
13714
|
});
|
|
13746
13715
|
}, className: property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0, innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-white dark:bg-surface-900", title: /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name ?? propertyKey, className: "text-text-secondary dark:text-text-secondary-dark" }), children: mapFormView });
|
|
13747
|
-
$[
|
|
13748
|
-
$[
|
|
13749
|
-
$[
|
|
13750
|
-
$[
|
|
13751
|
-
$[
|
|
13752
|
-
$[
|
|
13753
|
-
$[
|
|
13716
|
+
$[20] = expanded;
|
|
13717
|
+
$[21] = mapFormView;
|
|
13718
|
+
$[22] = minimalistView;
|
|
13719
|
+
$[23] = onPropertyChange;
|
|
13720
|
+
$[24] = property;
|
|
13721
|
+
$[25] = propertyKey;
|
|
13722
|
+
$[26] = t5;
|
|
13754
13723
|
} else {
|
|
13755
|
-
t5 = $[
|
|
13724
|
+
t5 = $[26];
|
|
13756
13725
|
}
|
|
13757
13726
|
const t6 = minimalistView && mapFormView;
|
|
13758
13727
|
const t7 = showError ?? false;
|
|
13759
13728
|
const t8 = error && !partOfArray ? error : void 0;
|
|
13760
13729
|
let t9;
|
|
13761
|
-
if ($[
|
|
13730
|
+
if ($[27] !== disabled || $[28] !== includeDescription || $[29] !== property || $[30] !== t7 || $[31] !== t8) {
|
|
13762
13731
|
t9 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError: t7, error: t8, disabled, property });
|
|
13763
|
-
$[
|
|
13764
|
-
$[
|
|
13765
|
-
$[
|
|
13766
|
-
$[
|
|
13767
|
-
$[
|
|
13768
|
-
$[
|
|
13732
|
+
$[27] = disabled;
|
|
13733
|
+
$[28] = includeDescription;
|
|
13734
|
+
$[29] = property;
|
|
13735
|
+
$[30] = t7;
|
|
13736
|
+
$[31] = t8;
|
|
13737
|
+
$[32] = t9;
|
|
13769
13738
|
} else {
|
|
13770
|
-
t9 = $[
|
|
13739
|
+
t9 = $[32];
|
|
13771
13740
|
}
|
|
13772
13741
|
let t10;
|
|
13773
|
-
if ($[
|
|
13742
|
+
if ($[33] !== t5 || $[34] !== t6 || $[35] !== t9) {
|
|
13774
13743
|
t10 = /* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
13775
13744
|
t5,
|
|
13776
13745
|
t6,
|
|
13777
13746
|
t9
|
|
13778
13747
|
] });
|
|
13779
|
-
$[
|
|
13780
|
-
$[
|
|
13781
|
-
$[
|
|
13782
|
-
$[
|
|
13748
|
+
$[33] = t5;
|
|
13749
|
+
$[34] = t6;
|
|
13750
|
+
$[35] = t9;
|
|
13751
|
+
$[36] = t10;
|
|
13783
13752
|
} else {
|
|
13784
|
-
t10 = $[
|
|
13753
|
+
t10 = $[36];
|
|
13785
13754
|
}
|
|
13786
13755
|
return t10;
|
|
13787
13756
|
}
|
|
@@ -18606,10 +18575,10 @@ function EditorCollectionAction(t0) {
|
|
|
18606
18575
|
}
|
|
18607
18576
|
return t8;
|
|
18608
18577
|
}
|
|
18609
|
-
const ImportCollectionAction = lazy(() => import("./index-
|
|
18578
|
+
const ImportCollectionAction = lazy(() => import("./index-DrrT332R.js").then((m) => ({
|
|
18610
18579
|
default: m.ImportCollectionAction
|
|
18611
18580
|
})));
|
|
18612
|
-
const ExportCollectionAction = lazy(() => import("./index-
|
|
18581
|
+
const ExportCollectionAction = lazy(() => import("./index-D9RNzm01.js").then((m) => ({
|
|
18613
18582
|
default: m.ExportCollectionAction
|
|
18614
18583
|
})));
|
|
18615
18584
|
function EntityCollectionViewActions(t0) {
|
|
@@ -19107,9 +19076,8 @@ function resolveRelationDisplayName(relation, prop) {
|
|
|
19107
19076
|
return String(values[targetTitleKey]);
|
|
19108
19077
|
}
|
|
19109
19078
|
const isHiddenProp = (p) => {
|
|
19110
|
-
|
|
19111
|
-
if (ui?.
|
|
19112
|
-
if (ui?.disabled?.hidden) return true;
|
|
19079
|
+
if (p.ui?.hideFromCollection) return true;
|
|
19080
|
+
if (typeof p.ui?.disabled === "object" && p.ui.disabled.hidden) return true;
|
|
19113
19081
|
return false;
|
|
19114
19082
|
};
|
|
19115
19083
|
const isDisplayCandidate = (p) => {
|
|
@@ -19145,7 +19113,7 @@ function resolveRelationDisplayName(relation, prop) {
|
|
|
19145
19113
|
const id = "id" in relation ? relation.id : void 0;
|
|
19146
19114
|
if (id !== void 0 && targetCollection) {
|
|
19147
19115
|
try {
|
|
19148
|
-
const slug = targetCollection.slug ?? targetCollection.table;
|
|
19116
|
+
const slug = targetCollection.slug ?? ("table" in targetCollection ? targetCollection.table : void 0);
|
|
19149
19117
|
if (slug) {
|
|
19150
19118
|
const cacheKey = `${slug}/${id}`;
|
|
19151
19119
|
const cached = getEntityFromCache(cacheKey);
|
|
@@ -23240,6 +23208,7 @@ const resetPasswordAction = {
|
|
|
23240
23208
|
return Promise.resolve(void 0);
|
|
23241
23209
|
}
|
|
23242
23210
|
};
|
|
23211
|
+
const innerClicked = /* @__PURE__ */ new WeakSet();
|
|
23243
23212
|
function useDraggable({
|
|
23244
23213
|
containerRef,
|
|
23245
23214
|
innerRef,
|
|
@@ -23251,7 +23220,7 @@ function useDraggable({
|
|
|
23251
23220
|
let relY = 0;
|
|
23252
23221
|
const listeningRef = React__default.useRef(false);
|
|
23253
23222
|
const onMouseDown = useCallback((event) => {
|
|
23254
|
-
if (event.button !== 0 || !containerRef.current || event.defaultPrevented || event
|
|
23223
|
+
if (event.button !== 0 || !containerRef.current || event.defaultPrevented || innerClicked.has(event)) {
|
|
23255
23224
|
return;
|
|
23256
23225
|
}
|
|
23257
23226
|
const {
|
|
@@ -23266,7 +23235,7 @@ function useDraggable({
|
|
|
23266
23235
|
listeningRef.current = true;
|
|
23267
23236
|
}, [containerRef, onMove]);
|
|
23268
23237
|
const onMouseDownInner = useCallback((event_0) => {
|
|
23269
|
-
event_0
|
|
23238
|
+
innerClicked.add(event_0);
|
|
23270
23239
|
}, []);
|
|
23271
23240
|
const onSelect = useCallback((event_1) => {
|
|
23272
23241
|
event_1.preventDefault();
|
|
@@ -27038,7 +27007,7 @@ function useLocalCollectionsConfigController(clientOrUrl, baseCollections = [],
|
|
|
27038
27007
|
}
|
|
27039
27008
|
const EMPTY_PLUGINS = [];
|
|
27040
27009
|
const EMPTY_COLLECTIONS = [];
|
|
27041
|
-
const CollectionsStudioView = lazy(() => import("./CollectionsStudioView-
|
|
27010
|
+
const CollectionsStudioView = lazy(() => import("./CollectionsStudioView-Brr_b06v.js").then((n) => n.b).then((m) => ({
|
|
27042
27011
|
default: m.CollectionsStudioView
|
|
27043
27012
|
})));
|
|
27044
27013
|
function RebaseNavigation({
|
|
@@ -27276,10 +27245,10 @@ function _temp$3(event) {
|
|
|
27276
27245
|
event.preventDefault();
|
|
27277
27246
|
event.stopPropagation();
|
|
27278
27247
|
}
|
|
27279
|
-
const CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-
|
|
27248
|
+
const CollectionEditorDialog = lazy(() => import("./CollectionEditorDialog-C8E440oK.js").then((m) => ({
|
|
27280
27249
|
default: m.CollectionEditorDialog
|
|
27281
27250
|
})));
|
|
27282
|
-
const PropertyFormDialog = lazy(() => import("./PropertyEditView-
|
|
27251
|
+
const PropertyFormDialog = lazy(() => import("./PropertyEditView-ChBleIbN.js").then((n) => n.P).then((m) => ({
|
|
27283
27252
|
default: m.PropertyFormDialog
|
|
27284
27253
|
})));
|
|
27285
27254
|
function CollectionEditorDialogs() {
|
|
@@ -30502,4 +30471,4 @@ export {
|
|
|
30502
30471
|
EntityCollectionTable as y,
|
|
30503
30472
|
EntityCollectionView as z
|
|
30504
30473
|
};
|
|
30505
|
-
//# sourceMappingURL=util-
|
|
30474
|
+
//# sourceMappingURL=util-COYYD8zr.js.map
|