@firecms/core 3.0.0-canary.179 → 3.0.0-canary.180
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/index.es.js +121 -113
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +121 -113
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/core/EntityEditView.tsx +0 -1
- package/src/core/EntitySidePanel.tsx +7 -9
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -0
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
package/dist/index.es.js
CHANGED
|
@@ -11699,7 +11699,6 @@ function EntityEditViewInner({
|
|
|
11699
11699
|
}
|
|
11700
11700
|
}, [authController, usedEntity, status]);
|
|
11701
11701
|
const readOnly = !canEdit;
|
|
11702
|
-
console.log("readOnly", readOnly);
|
|
11703
11702
|
const onPreSaveHookError = useCallback((e) => {
|
|
11704
11703
|
setSaving(false);
|
|
11705
11704
|
snackbarController.open({
|
|
@@ -18208,7 +18207,7 @@ const SwitchFieldBinding = function SwitchFieldBinding2(t0) {
|
|
|
18208
18207
|
return t11;
|
|
18209
18208
|
};
|
|
18210
18209
|
function DateTimeFieldBinding(t0) {
|
|
18211
|
-
const $ = c(
|
|
18210
|
+
const $ = c(34);
|
|
18212
18211
|
const {
|
|
18213
18212
|
propertyKey,
|
|
18214
18213
|
value,
|
|
@@ -18270,51 +18269,52 @@ function DateTimeFieldBinding(t0) {
|
|
|
18270
18269
|
t8 = $[12];
|
|
18271
18270
|
}
|
|
18272
18271
|
let t9;
|
|
18273
|
-
if ($[13] !==
|
|
18274
|
-
t9 = /* @__PURE__ */ jsx(DateTimeField, { value: internalValue, onChange: t2, size: "large", mode: t3, clearable: t4, locale, error: showError, label: t8 });
|
|
18275
|
-
$[13] =
|
|
18276
|
-
$[14] =
|
|
18277
|
-
$[15] =
|
|
18278
|
-
$[16] = property.
|
|
18279
|
-
$[17] =
|
|
18280
|
-
$[18] =
|
|
18281
|
-
$[19] =
|
|
18282
|
-
$[20] =
|
|
18272
|
+
if ($[13] !== disabled || $[14] !== internalValue || $[15] !== locale || $[16] !== property.clearable || $[17] !== property.mode || $[18] !== showError || $[19] !== t2 || $[20] !== t8) {
|
|
18273
|
+
t9 = /* @__PURE__ */ jsx(DateTimeField, { value: internalValue, onChange: t2, size: "large", mode: t3, clearable: t4, locale, error: showError, disabled, label: t8 });
|
|
18274
|
+
$[13] = disabled;
|
|
18275
|
+
$[14] = internalValue;
|
|
18276
|
+
$[15] = locale;
|
|
18277
|
+
$[16] = property.clearable;
|
|
18278
|
+
$[17] = property.mode;
|
|
18279
|
+
$[18] = showError;
|
|
18280
|
+
$[19] = t2;
|
|
18281
|
+
$[20] = t8;
|
|
18282
|
+
$[21] = t9;
|
|
18283
18283
|
} else {
|
|
18284
|
-
t9 = $[
|
|
18284
|
+
t9 = $[21];
|
|
18285
18285
|
}
|
|
18286
18286
|
let t10;
|
|
18287
|
-
if ($[
|
|
18287
|
+
if ($[22] !== propertyKey || $[23] !== t9) {
|
|
18288
18288
|
t10 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t9 });
|
|
18289
|
-
$[
|
|
18290
|
-
$[
|
|
18291
|
-
$[
|
|
18289
|
+
$[22] = propertyKey;
|
|
18290
|
+
$[23] = t9;
|
|
18291
|
+
$[24] = t10;
|
|
18292
18292
|
} else {
|
|
18293
|
-
t10 = $[
|
|
18293
|
+
t10 = $[24];
|
|
18294
18294
|
}
|
|
18295
18295
|
let t11;
|
|
18296
|
-
if ($[
|
|
18296
|
+
if ($[25] !== disabled || $[26] !== error || $[27] !== includeDescription || $[28] !== property || $[29] !== showError) {
|
|
18297
18297
|
t11 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
|
|
18298
|
-
$[
|
|
18299
|
-
$[
|
|
18300
|
-
$[
|
|
18301
|
-
$[
|
|
18302
|
-
$[
|
|
18303
|
-
$[
|
|
18298
|
+
$[25] = disabled;
|
|
18299
|
+
$[26] = error;
|
|
18300
|
+
$[27] = includeDescription;
|
|
18301
|
+
$[28] = property;
|
|
18302
|
+
$[29] = showError;
|
|
18303
|
+
$[30] = t11;
|
|
18304
18304
|
} else {
|
|
18305
|
-
t11 = $[
|
|
18305
|
+
t11 = $[30];
|
|
18306
18306
|
}
|
|
18307
18307
|
let t12;
|
|
18308
|
-
if ($[
|
|
18308
|
+
if ($[31] !== t10 || $[32] !== t11) {
|
|
18309
18309
|
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18310
18310
|
t10,
|
|
18311
18311
|
t11
|
|
18312
18312
|
] });
|
|
18313
|
-
$[
|
|
18314
|
-
$[
|
|
18315
|
-
$[
|
|
18313
|
+
$[31] = t10;
|
|
18314
|
+
$[32] = t11;
|
|
18315
|
+
$[33] = t12;
|
|
18316
18316
|
} else {
|
|
18317
|
-
t12 = $[
|
|
18317
|
+
t12 = $[33];
|
|
18318
18318
|
}
|
|
18319
18319
|
return t12;
|
|
18320
18320
|
}
|
|
@@ -18723,7 +18723,7 @@ function useWrappedComponent({
|
|
|
18723
18723
|
return wrapperRef.current;
|
|
18724
18724
|
}
|
|
18725
18725
|
function MapFieldBinding(t0) {
|
|
18726
|
-
const $ = c(
|
|
18726
|
+
const $ = c(43);
|
|
18727
18727
|
const {
|
|
18728
18728
|
propertyKey,
|
|
18729
18729
|
value,
|
|
@@ -18770,12 +18770,21 @@ function MapFieldBinding(t0) {
|
|
|
18770
18770
|
} else {
|
|
18771
18771
|
mapProperties = property.properties;
|
|
18772
18772
|
}
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18773
|
+
const t1 = minimalistView && property.widthPercentage !== void 0 ? "mt-8" : void 0;
|
|
18774
|
+
let t2;
|
|
18775
|
+
if ($[4] !== t1) {
|
|
18776
|
+
t2 = cls("py-1 flex flex-col space-y-2", t1);
|
|
18777
|
+
$[4] = t1;
|
|
18778
|
+
$[5] = t2;
|
|
18779
|
+
} else {
|
|
18780
|
+
t2 = $[5];
|
|
18781
|
+
}
|
|
18782
|
+
let t3;
|
|
18783
|
+
if ($[6] !== autoFocus || $[7] !== context || $[8] !== disabled || $[9] !== includeDescription || $[10] !== mapProperties || $[11] !== onPropertyChange || $[12] !== propertyKey || $[13] !== underlyingValueHasChanged) {
|
|
18784
|
+
let t42;
|
|
18785
|
+
if ($[15] !== autoFocus || $[16] !== context || $[17] !== disabled || $[18] !== includeDescription || $[19] !== onPropertyChange || $[20] !== propertyKey || $[21] !== underlyingValueHasChanged) {
|
|
18786
|
+
t42 = (t52, index) => {
|
|
18787
|
+
const [entryKey, childProperty] = t52;
|
|
18779
18788
|
const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.disabled);
|
|
18780
18789
|
const fieldBindingProps = {
|
|
18781
18790
|
propertyKey: `${propertyKey}.${entryKey}`,
|
|
@@ -18797,86 +18806,87 @@ function MapFieldBinding(t0) {
|
|
|
18797
18806
|
};
|
|
18798
18807
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
|
|
18799
18808
|
};
|
|
18800
|
-
$[
|
|
18801
|
-
$[
|
|
18802
|
-
$[
|
|
18803
|
-
$[
|
|
18804
|
-
$[
|
|
18805
|
-
$[
|
|
18806
|
-
$[
|
|
18807
|
-
$[
|
|
18809
|
+
$[15] = autoFocus;
|
|
18810
|
+
$[16] = context;
|
|
18811
|
+
$[17] = disabled;
|
|
18812
|
+
$[18] = includeDescription;
|
|
18813
|
+
$[19] = onPropertyChange;
|
|
18814
|
+
$[20] = propertyKey;
|
|
18815
|
+
$[21] = underlyingValueHasChanged;
|
|
18816
|
+
$[22] = t42;
|
|
18808
18817
|
} else {
|
|
18809
|
-
|
|
18810
|
-
}
|
|
18811
|
-
|
|
18812
|
-
$[
|
|
18813
|
-
$[
|
|
18814
|
-
$[
|
|
18815
|
-
$[
|
|
18816
|
-
$[
|
|
18817
|
-
$[
|
|
18818
|
-
$[
|
|
18819
|
-
$[
|
|
18820
|
-
$[
|
|
18818
|
+
t42 = $[22];
|
|
18819
|
+
}
|
|
18820
|
+
t3 = Object.entries(mapProperties).filter(_temp$7).map(t42);
|
|
18821
|
+
$[6] = autoFocus;
|
|
18822
|
+
$[7] = context;
|
|
18823
|
+
$[8] = disabled;
|
|
18824
|
+
$[9] = includeDescription;
|
|
18825
|
+
$[10] = mapProperties;
|
|
18826
|
+
$[11] = onPropertyChange;
|
|
18827
|
+
$[12] = propertyKey;
|
|
18828
|
+
$[13] = underlyingValueHasChanged;
|
|
18829
|
+
$[14] = t3;
|
|
18821
18830
|
} else {
|
|
18822
|
-
|
|
18831
|
+
t3 = $[14];
|
|
18823
18832
|
}
|
|
18824
|
-
let
|
|
18825
|
-
if ($[
|
|
18826
|
-
|
|
18827
|
-
$[
|
|
18828
|
-
$[
|
|
18833
|
+
let t4;
|
|
18834
|
+
if ($[23] !== t2 || $[24] !== t3) {
|
|
18835
|
+
t4 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: t2, children: t3 }) });
|
|
18836
|
+
$[23] = t2;
|
|
18837
|
+
$[24] = t3;
|
|
18838
|
+
$[25] = t4;
|
|
18829
18839
|
} else {
|
|
18830
|
-
|
|
18840
|
+
t4 = $[25];
|
|
18831
18841
|
}
|
|
18832
|
-
const mapFormView =
|
|
18833
|
-
let
|
|
18834
|
-
if ($[
|
|
18835
|
-
|
|
18842
|
+
const mapFormView = t4;
|
|
18843
|
+
let t5;
|
|
18844
|
+
if ($[26] !== expanded || $[27] !== mapFormView || $[28] !== minimalistView || $[29] !== onPropertyChange || $[30] !== property || $[31] !== propertyKey) {
|
|
18845
|
+
t5 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, onExpandedChange: (expanded_0) => {
|
|
18836
18846
|
onPropertyChange?.({
|
|
18837
18847
|
expanded: expanded_0
|
|
18838
18848
|
});
|
|
18839
18849
|
}, className: property.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, className: "text-text-secondary dark:text-text-secondary-dark" }), children: mapFormView });
|
|
18840
|
-
$[
|
|
18841
|
-
$[
|
|
18842
|
-
$[
|
|
18843
|
-
$[
|
|
18844
|
-
$[
|
|
18845
|
-
$[
|
|
18846
|
-
$[
|
|
18847
|
-
} else {
|
|
18848
|
-
|
|
18849
|
-
}
|
|
18850
|
-
const
|
|
18851
|
-
const
|
|
18852
|
-
const
|
|
18853
|
-
let
|
|
18854
|
-
if ($[
|
|
18855
|
-
|
|
18856
|
-
$[
|
|
18857
|
-
$[
|
|
18858
|
-
$[
|
|
18859
|
-
$[
|
|
18860
|
-
$[
|
|
18861
|
-
$[
|
|
18850
|
+
$[26] = expanded;
|
|
18851
|
+
$[27] = mapFormView;
|
|
18852
|
+
$[28] = minimalistView;
|
|
18853
|
+
$[29] = onPropertyChange;
|
|
18854
|
+
$[30] = property;
|
|
18855
|
+
$[31] = propertyKey;
|
|
18856
|
+
$[32] = t5;
|
|
18857
|
+
} else {
|
|
18858
|
+
t5 = $[32];
|
|
18859
|
+
}
|
|
18860
|
+
const t6 = minimalistView && mapFormView;
|
|
18861
|
+
const t7 = showError ?? false;
|
|
18862
|
+
const t8 = error ? typeof error === "string" ? error : "A property of this map has an error" : void 0;
|
|
18863
|
+
let t9;
|
|
18864
|
+
if ($[33] !== disabled || $[34] !== includeDescription || $[35] !== property || $[36] !== t7 || $[37] !== t8) {
|
|
18865
|
+
t9 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError: t7, error: t8, disabled, property });
|
|
18866
|
+
$[33] = disabled;
|
|
18867
|
+
$[34] = includeDescription;
|
|
18868
|
+
$[35] = property;
|
|
18869
|
+
$[36] = t7;
|
|
18870
|
+
$[37] = t8;
|
|
18871
|
+
$[38] = t9;
|
|
18862
18872
|
} else {
|
|
18863
|
-
|
|
18873
|
+
t9 = $[38];
|
|
18864
18874
|
}
|
|
18865
|
-
let
|
|
18866
|
-
if ($[
|
|
18867
|
-
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18875
|
+
let t10;
|
|
18876
|
+
if ($[39] !== t5 || $[40] !== t6 || $[41] !== t9) {
|
|
18877
|
+
t10 = /* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
18878
|
+
t5,
|
|
18879
|
+
t6,
|
|
18880
|
+
t9
|
|
18871
18881
|
] });
|
|
18872
|
-
$[
|
|
18873
|
-
$[
|
|
18874
|
-
$[
|
|
18875
|
-
$[
|
|
18882
|
+
$[39] = t5;
|
|
18883
|
+
$[40] = t6;
|
|
18884
|
+
$[41] = t9;
|
|
18885
|
+
$[42] = t10;
|
|
18876
18886
|
} else {
|
|
18877
|
-
|
|
18887
|
+
t10 = $[42];
|
|
18878
18888
|
}
|
|
18879
|
-
return
|
|
18889
|
+
return t10;
|
|
18880
18890
|
}
|
|
18881
18891
|
function _temp$7(t0) {
|
|
18882
18892
|
const [, property_0] = t0;
|
|
@@ -21525,18 +21535,16 @@ function EntitySidePanel(props) {
|
|
|
21525
21535
|
return navigationController.getParentCollectionIds(props.path);
|
|
21526
21536
|
}, [navigationController, props.path]);
|
|
21527
21537
|
const collection = useMemo(() => {
|
|
21528
|
-
if (
|
|
21529
|
-
|
|
21538
|
+
if (props.collection) {
|
|
21539
|
+
return props.collection;
|
|
21540
|
+
}
|
|
21530
21541
|
const registryCollection = navigationController.getCollection(props.path);
|
|
21531
21542
|
if (registryCollection) {
|
|
21532
|
-
|
|
21533
|
-
}
|
|
21534
|
-
if (!usedCollection) {
|
|
21535
|
-
console.error("ERROR: No collection found in path `", props.path, "`. Entity id: ", props.entityId);
|
|
21536
|
-
throw Error("ERROR: No collection found in path `" + props.path + "`. Make sure you have defined a collection for this path in the root navigation.");
|
|
21543
|
+
return registryCollection;
|
|
21537
21544
|
}
|
|
21538
|
-
|
|
21539
|
-
|
|
21545
|
+
console.error("ERROR: No collection found in path `", props.path, "`. Entity id: ", props.entityId);
|
|
21546
|
+
throw Error("ERROR: No collection found in path `" + props.path + "`. Make sure you have defined a collection for this path in the root navigation.");
|
|
21547
|
+
}, [navigationController, props.collection]);
|
|
21540
21548
|
useEffect(() => {
|
|
21541
21549
|
function beforeunload(e) {
|
|
21542
21550
|
if (blocked && collection) {
|