@mcurros2/microm 1.1.38-0 → 1.1.40-0
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.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34053,7 +34053,7 @@ const $97c59bfb4e85608a$export$9c2b2ccf03658905 = {
|
|
|
34053
34053
|
};
|
|
34054
34054
|
function $97c59bfb4e85608a$export$710993ff54d9590c(props) {
|
|
34055
34055
|
var _a, _b, _c;
|
|
34056
|
-
const { entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, autoFocus: autoFocus, label: label, parentKeys: parentKeys, column: column, required: required, readonly: readonly, disabled: disabled, idMaxWidth: idMaxWidth, icon: icon, iconVariant: iconVariant, requiredLabel: requiredLabel, description: description, size: size, onLookupPerformed: onLookupPerformed } = (0, $b4te3$mantinecore.useComponentDefaultProps)("Lookup", $97c59bfb4e85608a$export$9c2b2ccf03658905, props);
|
|
34056
|
+
const { entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, autoFocus: autoFocus, label: label, parentKeys: parentKeys, column: column, required: required, readonly: readonly, disabled: disabled, idMaxWidth: idMaxWidth, icon: icon, iconVariant: iconVariant, requiredLabel: requiredLabel, description: description, size: size, onLookupPerformed: onLookupPerformed, enableAdd: enableAdd, enableEdit: enableEdit, enableDelete: enableDelete, enableView: enableView } = (0, $b4te3$mantinecore.useComponentDefaultProps)("Lookup", $97c59bfb4e85608a$export$9c2b2ccf03658905, props);
|
|
34057
34057
|
const theme = (0, $b4te3$mantinecore.useMantineTheme)();
|
|
34058
34058
|
const HTMLDescriptionRef = (0, $b4te3$react.useRef)(null);
|
|
34059
34059
|
const lookupAPI = (0, $2Zki2.useLookup)({
|
|
@@ -34063,7 +34063,11 @@ function $97c59bfb4e85608a$export$710993ff54d9590c(props) {
|
|
|
34063
34063
|
column: column.name,
|
|
34064
34064
|
parentKeys: parentKeys,
|
|
34065
34065
|
required: required,
|
|
34066
|
-
HTMLDescriptionRef: HTMLDescriptionRef
|
|
34066
|
+
HTMLDescriptionRef: HTMLDescriptionRef,
|
|
34067
|
+
enableAdd: enableAdd,
|
|
34068
|
+
enableEdit: enableEdit,
|
|
34069
|
+
enableDelete: enableDelete,
|
|
34070
|
+
enableView: enableView
|
|
34067
34071
|
});
|
|
34068
34072
|
(0, $b4te3$react.useEffect)(()=>{
|
|
34069
34073
|
if (required !== null && required !== void 0 ? required : !column.hasFlag((0, $4H7ea.EntityColumnFlags).nullable)) entityForm.configureField(column, (0, $b4te3$mantineform.isNotEmpty)(requiredLabel));
|
|
@@ -36474,6 +36478,7 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
36474
36478
|
});
|
|
36475
36479
|
const { handleLoadMore: handleLoadMore } = dataViewAPI;
|
|
36476
36480
|
const limit_number = parseInt(limit || "0");
|
|
36481
|
+
const effectiveFormMode = formMode || (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode) || "view";
|
|
36477
36482
|
return (0, $b4te3$reactjsxruntime.jsx)("section", {
|
|
36478
36483
|
ref: ref,
|
|
36479
36484
|
children: (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Stack), {
|
|
@@ -36526,7 +36531,7 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
36526
36531
|
actionsButtonVariant: actionsButtonVariant,
|
|
36527
36532
|
clientActions: entity ? entity.def.clientActions : {},
|
|
36528
36533
|
handleExecuteAction: dataViewAPI.handleExecuteAction,
|
|
36529
|
-
parentFormMode:
|
|
36534
|
+
parentFormMode: effectiveFormMode
|
|
36530
36535
|
})),
|
|
36531
36536
|
dataViewAPI.isLoading && (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
|
|
36532
36537
|
children: [
|
|
@@ -36572,9 +36577,9 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
36572
36577
|
EntityCard: Card,
|
|
36573
36578
|
recordIndex: index,
|
|
36574
36579
|
entity: entity,
|
|
36575
|
-
enableDelete: enableDelete,
|
|
36576
|
-
enableEdit: enableEdit,
|
|
36577
|
-
enableView: enableView,
|
|
36580
|
+
enableDelete: effectiveFormMode !== "view" && enableDelete,
|
|
36581
|
+
enableEdit: effectiveFormMode !== "view" && enableEdit,
|
|
36582
|
+
enableView: enableView || effectiveFormMode === "view",
|
|
36578
36583
|
handleSelectRecord: dataViewAPI.handleSelectRecord,
|
|
36579
36584
|
handleDeselectRecord: dataViewAPI.handleDeselectRecord,
|
|
36580
36585
|
handleDeleteClick: dataViewAPI.handleDeleteRecord,
|