@mcurros2/microm 1.1.283-0 → 1.1.285-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 +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34338,7 +34338,7 @@ const $900fa559ce35569a$export$c02cdf743c1f7188 = {
|
|
|
34338
34338
|
}
|
|
34339
34339
|
};
|
|
34340
34340
|
const $900fa559ce35569a$export$4003d000af5d7585 = /*#__PURE__*/ (0, $b4te3$react.forwardRef)(function LookupSelect(props, ref) {
|
|
34341
|
-
const { parentKeys: parentKeys, column: column, formStatus: formStatus, entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, enableEdit: enableEdit, editIcon: editIcon, editIconVariant: editIconVariant, selectProps: selectProps, maxItems: maxItems, requiredLabel: requiredLabel, editLabel: editLabel, includeKeyInDescription: includeKeyInDescription, withinPortal: withinPortal, zIndex: zIndex, breadCrumbs: breadCrumbs, maxWidth: maxWidth, minWidth: minWidth } = (0, $b4te3$mantinecore.useComponentDefaultProps)('LookupSelect', $900fa559ce35569a$export$c02cdf743c1f7188, props);
|
|
34341
|
+
const { parentKeys: parentKeys, column: column, formStatus: formStatus, entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, enableEdit: enableEdit, editIcon: editIcon, editIconVariant: editIconVariant, selectProps: selectProps, maxItems: maxItems, requiredLabel: requiredLabel, editLabel: editLabel, includeKeyInDescription: includeKeyInDescription, withinPortal: withinPortal, zIndex: zIndex, breadCrumbs: breadCrumbs, maxWidth: maxWidth, minWidth: minWidth, autoFocus: autoFocus } = (0, $b4te3$mantinecore.useComponentDefaultProps)('LookupSelect', $900fa559ce35569a$export$c02cdf743c1f7188, props);
|
|
34342
34342
|
const theme = (0, $b4te3$mantinecore.useMantineTheme)();
|
|
34343
34343
|
const { formMode: formMode, form: form } = entityForm;
|
|
34344
34344
|
const triggerRefreshState = (0, $b4te3$react.useState)(true);
|
|
@@ -34362,11 +34362,17 @@ const $900fa559ce35569a$export$4003d000af5d7585 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
34362
34362
|
selectData: selectData
|
|
34363
34363
|
});
|
|
34364
34364
|
const [showDescription] = entityForm.showDescriptionState;
|
|
34365
|
+
const add_autofocus = formMode === 'add' ? true : undefined;
|
|
34366
|
+
const edit_autofocus = formStatus?.loading === false && formMode !== 'add' ? true : undefined;
|
|
34367
|
+
const readonly_condition = selectProps?.readOnly === undefined ? entityForm.formMode !== 'add' && column.hasFlag((0, $4H7ea.EntityColumnFlags).pk) : selectProps.readOnly;
|
|
34368
|
+
const autofocus_condition = autoFocus === 'autoFocusOnAdd' ? add_autofocus : autoFocus === 'autoFocusOnEdit' ? edit_autofocus : autoFocus;
|
|
34365
34369
|
const resolvedSelectProps = {
|
|
34366
34370
|
...selectProps ?? {},
|
|
34371
|
+
readOnly: readonly_condition,
|
|
34367
34372
|
miw: selectProps?.miw ?? (minWidth !== 'auto' && minWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[minWidth] : undefined,
|
|
34368
34373
|
maw: selectProps?.maw ?? (maxWidth !== 'auto' && maxWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[maxWidth] : undefined,
|
|
34369
34374
|
label: selectProps?.label ?? column.prompt,
|
|
34375
|
+
autoFocus: autofocus_condition,
|
|
34370
34376
|
description: showDescription ? selectProps?.description ?? column.description : ''
|
|
34371
34377
|
};
|
|
34372
34378
|
(0, $hAMyt.useFieldConfiguration)({
|
|
@@ -34378,6 +34384,7 @@ const $900fa559ce35569a$export$4003d000af5d7585 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
34378
34384
|
const readoOnlyResult = resolvedSelectProps?.readOnly || entityForm.formMode === 'view' || lookupSelectAPI.status.loading || formStatus?.loading || column.hasFlag((0, $4H7ea.EntityColumnFlags).pk) && entityForm.formMode !== 'add' ? true : false;
|
|
34379
34385
|
return /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Select), {
|
|
34380
34386
|
...resolvedSelectProps,
|
|
34387
|
+
"data-autofocus": autofocus_condition,
|
|
34381
34388
|
withAsterisk: resolvedSelectProps.withAsterisk ?? (!resolvedSelectProps.readOnly && !(entityForm.formMode === 'view') && (resolvedSelectProps.required ?? !column.hasFlag((0, $4H7ea.EntityColumnFlags).nullable))),
|
|
34382
34389
|
withinPortal: withinPortal,
|
|
34383
34390
|
zIndex: zIndex,
|