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