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