@open-mercato/ui 0.8.1-develop.7455.1.8f7e53badb → 0.8.1-develop.7458.1.3847638f67
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/backend/CrudForm.js
CHANGED
|
@@ -1121,6 +1121,13 @@ function CrudForm({
|
|
|
1121
1121
|
headerInjectionAction,
|
|
1122
1122
|
extraActions
|
|
1123
1123
|
] }) : void 0;
|
|
1124
|
+
const renderFooterActions = !hideFooterActions && !formReadOnly;
|
|
1125
|
+
const embeddedExtraActions = renderFooterActions ? void 0 : extraActions;
|
|
1126
|
+
const embeddedHeaderActions = versionHistoryEnabled || headerInjectionAction || embeddedExtraActions ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1127
|
+
versionHistoryEnabled ? versionHistoryAction : null,
|
|
1128
|
+
headerInjectionAction,
|
|
1129
|
+
embeddedExtraActions
|
|
1130
|
+
] }) : void 0;
|
|
1124
1131
|
React.useEffect(() => {
|
|
1125
1132
|
let cancelled = false;
|
|
1126
1133
|
async function load() {
|
|
@@ -2963,7 +2970,7 @@ function CrudForm({
|
|
|
2963
2970
|
submit: formReadOnly ? void 0 : { formId, pending, label: resolvedSubmitLabel, pendingLabel: savingLabel, icon: submitIcon }
|
|
2964
2971
|
}
|
|
2965
2972
|
}
|
|
2966
|
-
) :
|
|
2973
|
+
) : embeddedHeaderActions ? /* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 mb-2", children: embeddedHeaderActions }) : null,
|
|
2967
2974
|
contentHeader,
|
|
2968
2975
|
/* @__PURE__ */ jsx(
|
|
2969
2976
|
DataLoader,
|
|
@@ -2996,7 +3003,7 @@ function CrudForm({
|
|
|
2996
3003
|
}
|
|
2997
3004
|
),
|
|
2998
3005
|
formError && !Object.keys(errors).length ? /* @__PURE__ */ jsx("div", { className: "text-sm text-status-error-text", children: formError }) : null,
|
|
2999
|
-
|
|
3006
|
+
renderFooterActions ? /* @__PURE__ */ jsx(
|
|
3000
3007
|
FormFooter,
|
|
3001
3008
|
{
|
|
3002
3009
|
embedded,
|
|
@@ -3012,7 +3019,7 @@ function CrudForm({
|
|
|
3012
3019
|
submit: { pending, label: resolvedSubmitLabel, pendingLabel: savingLabel, icon: submitIcon }
|
|
3013
3020
|
}
|
|
3014
3021
|
}
|
|
3015
|
-
)
|
|
3022
|
+
) : null
|
|
3016
3023
|
] })
|
|
3017
3024
|
)
|
|
3018
3025
|
}
|
|
@@ -3041,7 +3048,7 @@ function CrudForm({
|
|
|
3041
3048
|
submit: formReadOnly ? void 0 : { formId, pending, label: resolvedSubmitLabel, pendingLabel: savingLabel, icon: submitIcon }
|
|
3042
3049
|
}
|
|
3043
3050
|
}
|
|
3044
|
-
) :
|
|
3051
|
+
) : embeddedHeaderActions ? /* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 mb-2", children: embeddedHeaderActions }) : null,
|
|
3045
3052
|
contentHeader,
|
|
3046
3053
|
/* @__PURE__ */ jsx(
|
|
3047
3054
|
DataLoader,
|
|
@@ -3095,7 +3102,7 @@ function CrudForm({
|
|
|
3095
3102
|
);
|
|
3096
3103
|
}) }),
|
|
3097
3104
|
formError && !Object.keys(errors).length ? /* @__PURE__ */ jsx("div", { className: "text-sm text-status-error-text", children: formError }) : null,
|
|
3098
|
-
|
|
3105
|
+
renderFooterActions ? /* @__PURE__ */ jsx(
|
|
3099
3106
|
FormFooter,
|
|
3100
3107
|
{
|
|
3101
3108
|
embedded,
|
|
@@ -3111,7 +3118,7 @@ function CrudForm({
|
|
|
3111
3118
|
submit: { pending, label: resolvedSubmitLabel, pendingLabel: savingLabel, icon: submitIcon }
|
|
3112
3119
|
}
|
|
3113
3120
|
}
|
|
3114
|
-
)
|
|
3121
|
+
) : null
|
|
3115
3122
|
]
|
|
3116
3123
|
}
|
|
3117
3124
|
) })
|