@mcurros2/microm 1.1.451-0 → 1.1.455-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
@@ -6813,6 +6813,8 @@ parcelRequire("2eyXi");
6813
6813
  var $4H7ea = parcelRequire("4H7ea");
6814
6814
  parcelRequire("dC9fs");
6815
6815
  var $hAMyt = parcelRequire("hAMyt");
6816
+
6817
+ var $ciiuv = parcelRequire("ciiuv");
6816
6818
  const $9dfe1d3e4dcf7b26$var$defaultProps = {
6817
6819
  validationContainer: (0, $b4te3$mantinecore.Group),
6818
6820
  autoMaxWidth: {
@@ -6821,7 +6823,7 @@ const $9dfe1d3e4dcf7b26$var$defaultProps = {
6821
6823
  }
6822
6824
  };
6823
6825
  function $9dfe1d3e4dcf7b26$export$65ed9482db2257fa(props) {
6824
- const { column: column, loading: loading, entityForm: entityForm, maw: maw, required: required, maxLength: maxLength, disabled: disabled, disableOnLoading: disableOnLoading, label: label, validationContainer: validationContainer, validate: validate, requiredMessage: requiredMessage, description: description, readOnly: readOnly, withAsterisk: withAsterisk, autoMaxWidth: autoMaxWidth, ...others } = (0, $b4te3$mantinecore.useComponentDefaultProps)('PasswordField', $9dfe1d3e4dcf7b26$var$defaultProps, props);
6826
+ const { column: column, loading: loading, entityForm: entityForm, maw: maw, miw: miw, required: required, maxLength: maxLength, disabled: disabled, disableOnLoading: disableOnLoading, label: label, validationContainer: validationContainer, validate: validate, requiredMessage: requiredMessage, description: description, readOnly: readOnly, withAsterisk: withAsterisk, autoMaxWidth: autoMaxWidth, maxWidth: maxWidth, minWidth: minWidth, ...others } = (0, $b4te3$mantinecore.useComponentDefaultProps)('PasswordField', $9dfe1d3e4dcf7b26$var$defaultProps, props);
6825
6827
  (0, $hAMyt.useFieldConfiguration)({
6826
6828
  entityForm: entityForm,
6827
6829
  column: column,
@@ -6832,12 +6834,15 @@ function $9dfe1d3e4dcf7b26$export$65ed9482db2257fa(props) {
6832
6834
  readOnly: readOnly
6833
6835
  });
6834
6836
  const [showDescription] = entityForm.showDescriptionState;
6837
+ const resolved_maw = maw ?? (maxWidth !== 'auto' && maxWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[maxWidth] : undefined;
6838
+ const resolved_miw = miw ?? (minWidth !== 'auto' && minWidth !== undefined) ? (0, $ciiuv.MicroMWidthSizes)[minWidth] : undefined;
6835
6839
  return /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.PasswordInput), {
6836
6840
  ...others,
6837
6841
  withAsterisk: withAsterisk ?? (!readOnly && !(entityForm.formMode === 'view') && (required ?? !column.hasFlag((0, $4H7ea.EntityColumnFlags).nullable))),
6838
6842
  label: label ?? column.prompt,
6839
6843
  description: showDescription ? description ?? column.description : '',
6840
- maw: maw ?? (column.length <= autoMaxWidth.columnLenghtLessThanOrEqual ? autoMaxWidth.maxWidth : undefined),
6844
+ maw: resolved_maw ?? (column.length <= autoMaxWidth.columnLenghtLessThanOrEqual ? autoMaxWidth.maxWidth : undefined),
6845
+ miw: resolved_miw,
6841
6846
  maxLength: maxLength ?? column.length,
6842
6847
  readOnly: entityForm.formMode === 'view' ? true : readOnly,
6843
6848
  disabled: disableOnLoading ? loading : disabled,
@@ -52714,17 +52719,23 @@ var $38HqD = parcelRequire("38HqD");
52714
52719
  parcelRequire("iTpjT");
52715
52720
  var $5cUzS = parcelRequire("5cUzS");
52716
52721
  async function $a6812e14c3e91133$export$fbad52440685f436(props) {
52717
- const { entity: entity } = props;
52722
+ const { entity: entity, getDataOnInit: getDataOnInit, initialFormMode: initialFormMode } = props;
52723
+ const effectiveGetDataOnInit = getDataOnInit !== undefined ? getDataOnInit : initialFormMode !== 'add';
52718
52724
  if (!entity.Form) throw new Error("Entity does not have a form");
52719
52725
  let entity_form;
52726
+ const effectiveProps = {
52727
+ ...props,
52728
+ getDataOnInit: effectiveGetDataOnInit,
52729
+ initialFormMode: initialFormMode
52730
+ };
52720
52731
  if (entity.Form === "AutoForm") entity_form = /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $5cUzS.AutoForm), {
52721
- ...props
52732
+ ...effectiveProps
52722
52733
  });
52723
52734
  else if (entity.Form === "AutoFiltersForm") entity_form = /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $38HqD.AutoFiltersForm), {
52724
- ...props
52735
+ ...effectiveProps
52725
52736
  });
52726
52737
  else entity_form = await entity.Form.then((DynamicForm)=>/*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)(DynamicForm, {
52727
- ...props
52738
+ ...effectiveProps
52728
52739
  }));
52729
52740
  return entity_form;
52730
52741
  }
@@ -53404,11 +53415,10 @@ function $2d0bb0e8253bc1ff$export$cf62245ee3811550() {
53404
53415
  const onClosed = async ()=>{
53405
53416
  if (onModalClosed) await onModalClosed();
53406
53417
  };
53407
- const effectiveGetDataOnInit = getDataOnInit !== undefined ? getDataOnInit : initialFormMode !== 'add';
53408
53418
  const entity_form = (0, $gYKfx.createEntityForm)({
53409
53419
  entity: entity,
53410
53420
  initialFormMode: initialFormMode,
53411
- getDataOnInit: effectiveGetDataOnInit,
53421
+ getDataOnInit: getDataOnInit,
53412
53422
  navigationProtection: navigationProtection,
53413
53423
  showOK: showOK,
53414
53424
  onSaved: onSaved,