@mcurros2/microm 1.1.283-0 → 1.1.284-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.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,16 @@ 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;
34365
34368
  const resolvedSelectProps = {
34366
34369
  ...selectProps ?? {},
34370
+ readOnly: readonly_condition,
34367
34371
  miw: selectProps?.miw ?? (minWidth !== 'auto' && minWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[minWidth] : undefined,
34368
34372
  maw: selectProps?.maw ?? (maxWidth !== 'auto' && maxWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[maxWidth] : undefined,
34369
34373
  label: selectProps?.label ?? column.prompt,
34374
+ autoFocus: autoFocus === 'autoFocusOnAdd' ? add_autofocus : autoFocus === 'autoFocusOnEdit' ? edit_autofocus : autoFocus,
34370
34375
  description: showDescription ? selectProps?.description ?? column.description : ''
34371
34376
  };
34372
34377
  (0, $hAMyt.useFieldConfiguration)({