@firecms/core 3.0.0-canary.219 → 3.0.0-canary.220
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 +1 -12
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/core/EntityEditView.tsx +0 -4
- package/src/form/EntityForm.tsx +1 -10
package/dist/index.es.js
CHANGED
|
@@ -13932,13 +13932,11 @@ function EntityForm({
|
|
|
13932
13932
|
showEntityPath = true,
|
|
13933
13933
|
children
|
|
13934
13934
|
}) {
|
|
13935
|
-
console.log("disabledProp", disabledProp);
|
|
13936
13935
|
if (collection.customId && collection.formAutoSave) {
|
|
13937
13936
|
console.warn(`The collection ${collection.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
|
|
13938
13937
|
}
|
|
13939
13938
|
const authController = useAuthController();
|
|
13940
13939
|
const [status, setStatus] = useState(initialStatus);
|
|
13941
|
-
const [saving, setSaving] = useState(false);
|
|
13942
13940
|
const updateStatus = (status_0) => {
|
|
13943
13941
|
setStatus(status_0);
|
|
13944
13942
|
onStatusChange?.(status_0);
|
|
@@ -14048,7 +14046,6 @@ function EntityForm({
|
|
|
14048
14046
|
authController
|
|
14049
14047
|
}), [collection, path, entityId, formex.values, formex.initialValues, customizationController.propertyConfigs]);
|
|
14050
14048
|
const onPreSaveHookError = useCallback((e_1) => {
|
|
14051
|
-
setSaving(false);
|
|
14052
14049
|
snackbarController.open({
|
|
14053
14050
|
type: "error",
|
|
14054
14051
|
message: "Error before saving: " + e_1?.message
|
|
@@ -14056,7 +14053,6 @@ function EntityForm({
|
|
|
14056
14053
|
console.error(e_1);
|
|
14057
14054
|
}, [snackbarController]);
|
|
14058
14055
|
const onSaveSuccessHookError = useCallback((e_2) => {
|
|
14059
|
-
setSaving(false);
|
|
14060
14056
|
snackbarController.open({
|
|
14061
14057
|
type: "error",
|
|
14062
14058
|
message: "Error after saving (entity is saved): " + e_2?.message
|
|
@@ -14073,7 +14069,6 @@ function EntityForm({
|
|
|
14073
14069
|
const onSaveSuccess = (updatedEntity) => {
|
|
14074
14070
|
clearDirtyCache();
|
|
14075
14071
|
onValuesModified?.(false);
|
|
14076
|
-
setSaving(false);
|
|
14077
14072
|
if (!autoSave) snackbarController.open({
|
|
14078
14073
|
type: "success",
|
|
14079
14074
|
message: `${collection.singularName ?? collection.name}: Saved correctly`
|
|
@@ -14092,7 +14087,6 @@ function EntityForm({
|
|
|
14092
14087
|
}
|
|
14093
14088
|
};
|
|
14094
14089
|
const onSaveFailure = useCallback((e_3) => {
|
|
14095
|
-
setSaving(false);
|
|
14096
14090
|
snackbarController.open({
|
|
14097
14091
|
type: "error",
|
|
14098
14092
|
message: "Error saving: " + e_3?.message
|
|
@@ -14107,7 +14101,6 @@ function EntityForm({
|
|
|
14107
14101
|
collection: collection_0,
|
|
14108
14102
|
path: path_0
|
|
14109
14103
|
}) => {
|
|
14110
|
-
setSaving(true);
|
|
14111
14104
|
return saveEntityWithCallbacks({
|
|
14112
14105
|
path: path_0,
|
|
14113
14106
|
entityId: entityId_0,
|
|
@@ -14117,7 +14110,7 @@ function EntityForm({
|
|
|
14117
14110
|
status,
|
|
14118
14111
|
dataSource,
|
|
14119
14112
|
context,
|
|
14120
|
-
onSaveSuccess
|
|
14113
|
+
onSaveSuccess,
|
|
14121
14114
|
onSaveFailure,
|
|
14122
14115
|
onPreSaveHookError,
|
|
14123
14116
|
onSaveSuccessHookError
|
|
@@ -14165,7 +14158,6 @@ function EntityForm({
|
|
|
14165
14158
|
});
|
|
14166
14159
|
};
|
|
14167
14160
|
const disabled = formex.isSubmitting || Boolean(disabledProp);
|
|
14168
|
-
console.log("disabled", disabled);
|
|
14169
14161
|
const formContext = {
|
|
14170
14162
|
// @ts-ignore
|
|
14171
14163
|
setFieldValue: useCallback(formex.setFieldValue, []),
|
|
@@ -21244,9 +21236,6 @@ function EntityEditView({
|
|
|
21244
21236
|
return entity ? canEditEntity(props.collection, authController, props.path, entity ?? null) : void 0;
|
|
21245
21237
|
}
|
|
21246
21238
|
}, [authController, entity, status]);
|
|
21247
|
-
console.log({
|
|
21248
|
-
canEdit
|
|
21249
|
-
});
|
|
21250
21239
|
if (dataLoading && !cachedValues || (!entity || canEdit === void 0) && (status === "existing" || status === "copy")) {
|
|
21251
21240
|
return /* @__PURE__ */ jsx(CircularProgressCenter, {});
|
|
21252
21241
|
}
|