@mcurros2/microm 1.1.473-0 → 1.1.474-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 CHANGED
@@ -1,6 +1,5 @@
1
- import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, ButtonProps, Variants, StepperProps, SelectItem, BadgeVariant, MantineSize, CardProps, MantineTheme, ImageProps, MantineColor, TextareaProps, TextInputProps, PasswordInputProps, NotificationProps, CheckboxProps, ActionIconProps, NumberInputProps, MultiSelectProps, SimpleGridProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps, BreadcrumbsProps, MenuProps as _MenuProps1, TitleOrder, CSSObject, StackProps, NavbarProps, TooltipProps } from "@mantine/core";
2
- import { JSX } from "react/jsx-runtime";
3
- import React, { JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent, Dispatch, RefObject, SetStateAction, ComponentType, CSSProperties, MutableRefObject, useState, KeyboardEvent, ComponentPropsWithoutRef, Context, ReactPortal } from "react";
1
+ import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, ButtonProps, Variants, StepperProps, SelectItem, BadgeVariant, MantineSize, CardProps, MantineTheme, ImageProps, MantineColor, BoxProps, TextareaProps, TextInputProps, PasswordInputProps, NotificationProps, CheckboxProps, ActionIconProps, NumberInputProps, MultiSelectProps, SimpleGridProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps, BreadcrumbsProps, MenuProps as _MenuProps1, TitleOrder, CSSObject, StackProps, NavbarProps, TooltipProps } from "@mantine/core";
2
+ import React, { JSX, JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent, Dispatch, RefObject, SetStateAction, ComponentType, CSSProperties, MutableRefObject, useState, KeyboardEvent, ComponentPropsWithoutRef, Context, ReactPortal } from "react";
4
3
  import { hasLength, isNotEmpty, matches, UseFormReturnType } from "@mantine/form";
5
4
  import { ModalSettings } from "@mantine/modals/lib/context";
6
5
  import { IconProps, Icon } from "@tabler/icons-react";
@@ -1922,6 +1921,13 @@ export const ACTDownloadImportedFileDefaultProps: {
1922
1921
  downloadImportedFileErrorLabel: string;
1923
1922
  };
1924
1923
  export const ACTDownloadImportedFile: EntityClientAction;
1924
+ export type FieldAutoFocus = 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
1925
+ export interface FieldWidthProps {
1926
+ maxWidth?: keyof typeof MicroMWidthSizes;
1927
+ minWidth?: keyof typeof MicroMWidthSizes;
1928
+ maw?: BoxProps['maw'];
1929
+ miw?: BoxProps['miw'];
1930
+ }
1925
1931
  export interface useTextTransformProps {
1926
1932
  entityForm: UseEntityFormReturnType;
1927
1933
  column: EntityColumn<Value>;
@@ -1931,7 +1937,7 @@ export interface useTextTransformProps {
1931
1937
  export function useTextTransform(props: useTextTransformProps): (text: string) => string;
1932
1938
  type TextAreaFieldAllowedValidators = 'regex' | 'length' | 'field' | 'required';
1933
1939
  export type TextAreaFieldValidatorConfiguration = Partial<Record<TextAreaFieldAllowedValidators, ValidatorConfigurationParms>>;
1934
- export interface TextAreaFieldProps extends Omit<TextareaProps, 'autoFocus'>, Omit<useTextTransformProps, 'entityForm' | 'column' | 'onBlur' | 'mantineOnBlur'> {
1940
+ export interface TextAreaFieldProps extends Omit<TextareaProps, 'autoFocus'>, FieldWidthProps, Omit<useTextTransformProps, 'entityForm' | 'column' | 'onBlur' | 'mantineOnBlur'> {
1935
1941
  column: EntityColumn<Value>;
1936
1942
  entityForm: UseEntityFormReturnType;
1937
1943
  validate?: TextAreaFieldValidatorConfiguration;
@@ -2220,7 +2226,7 @@ export const UseLoginDefaultProps: Partial<useLoginOptions>;
2220
2226
  export function useLogin(props: useLoginOptions): () => Promise<void>;
2221
2227
  type PasswordFieldAllowedValidators = 'regex' | 'length' | 'field' | 'required';
2222
2228
  export type PasswordFieldValidatorConfiguration = Partial<Record<PasswordFieldAllowedValidators, ValidatorConfigurationParms>>;
2223
- export interface PasswordFieldProps extends PasswordInputProps {
2229
+ export interface PasswordFieldProps extends Omit<PasswordInputProps, 'autoFocus'> {
2224
2230
  column: EntityColumn<string>;
2225
2231
  entityForm: UseEntityFormReturnType;
2226
2232
  loading?: boolean;
@@ -2230,6 +2236,7 @@ export interface PasswordFieldProps extends PasswordInputProps {
2230
2236
  validationContainer?: React.ComponentType<{
2231
2237
  children: ReactNode;
2232
2238
  }>;
2239
+ autoFocus?: FieldAutoFocus;
2233
2240
  autoMaxWidth?: {
2234
2241
  columnLenghtLessThanOrEqual: number;
2235
2242
  maxWidth: string;
@@ -2260,11 +2267,12 @@ export interface NotifyBitFieldProps extends NotificationProps {
2260
2267
  }
2261
2268
  export const NotifyBitFieldDefaultProps: Partial<NotifyBitFieldProps>;
2262
2269
  export function NotifyBitField(props: NotifyBitFieldProps): JSX.Element;
2263
- export interface CheckboxFieldProps extends CheckboxProps {
2270
+ export interface CheckboxFieldProps extends Omit<CheckboxProps, 'autoFocus'>, FieldWidthProps {
2264
2271
  column: EntityColumn<Value>;
2265
2272
  entityForm: UseEntityFormReturnType;
2266
2273
  loading?: boolean;
2267
2274
  disableOnLoading?: boolean;
2275
+ autoFocus?: FieldAutoFocus;
2268
2276
  requiredMessage?: ReactNode;
2269
2277
  }
2270
2278
  export function CheckboxField(props: CheckboxFieldProps): JSX.Element;
@@ -2463,10 +2471,9 @@ export interface SearchFilterInputProps extends MultiSelectProps {
2463
2471
  autoFocus?: boolean;
2464
2472
  addFilterLabel?: string;
2465
2473
  iconVariant?: ActionIconVariant;
2466
- [x: string]: any;
2467
2474
  }
2468
2475
  export const SearchFilterInputDefaultProps: Partial<SearchFilterInputProps>;
2469
- export const SearchFilterInput: ForwardRefExoticComponent<Omit<SearchFilterInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
2476
+ export const SearchFilterInput: ForwardRefExoticComponent<SearchFilterInputProps & RefAttributes<HTMLInputElement>>;
2470
2477
  export function useFirstVisible(ref: React.RefObject<HTMLElement>, options?: IntersectionObserverInit): boolean;
2471
2478
  export interface OpenFormProps {
2472
2479
  entity: Entity<EntityDefinition>;
@@ -2552,7 +2559,7 @@ export interface UseLookupReturnType {
2552
2559
  onBlur: (bindingColumn: string, force?: boolean, event?: React.FocusEvent | null) => void;
2553
2560
  }
2554
2561
  export const useLookup: ({ entityForm, entity, lookupDefName, column, parentKeys, required, HTMLDescriptionRef, enableAdd, enableEdit, enableDelete, enableView, transform }: UseLookupOptions) => UseLookupReturnType;
2555
- interface LookupCommonProps extends Omit<useTextTransformProps, 'entityForm' | 'column'> {
2562
+ interface LookupCommonProps extends Omit<useTextTransformProps, 'entityForm' | 'column'>, FieldWidthProps {
2556
2563
  parentKeys?: ValuesObject;
2557
2564
  autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
2558
2565
  entityForm: UseEntityFormReturnType;
@@ -2560,6 +2567,7 @@ interface LookupCommonProps extends Omit<useTextTransformProps, 'entityForm' | '
2560
2567
  lookupDefName: string;
2561
2568
  required?: boolean;
2562
2569
  readonly?: boolean;
2570
+ readOnly?: boolean;
2563
2571
  disabled?: boolean;
2564
2572
  label?: string;
2565
2573
  idMaxWidth?: string;
@@ -2697,7 +2705,7 @@ export interface WeekPickerProps extends CalendarProps {
2697
2705
  allowDeselect?: boolean;
2698
2706
  }
2699
2707
  export function WeekPicker(props: WeekPickerProps): JSX.Element;
2700
- export interface WeekPickerFieldProps extends Omit<WeekPickerProps, 'weekStartDatevalue' | 'setWeekStartValue' | 'setWeekEndValue'> {
2708
+ export interface WeekPickerFieldProps extends Omit<WeekPickerProps, 'weekStartDatevalue' | 'setWeekStartValue' | 'setWeekEndValue' | 'autoFocus'>, FieldWidthProps {
2701
2709
  weekStartDateColumn: EntityColumn<Date | null>;
2702
2710
  weekEndDateColumn?: EntityColumn<Date | null>;
2703
2711
  entityForm: UseEntityFormReturnType;
@@ -2714,13 +2722,15 @@ export interface WeekPickerFieldProps extends Omit<WeekPickerProps, 'weekStartDa
2714
2722
  size?: MantineSize;
2715
2723
  required?: boolean;
2716
2724
  readonly?: boolean;
2725
+ readOnly?: boolean;
2726
+ autoFocus?: FieldAutoFocus;
2717
2727
  disabled?: boolean;
2718
2728
  label?: string;
2719
2729
  description?: string;
2720
2730
  }
2721
2731
  export const WeekPickerFieldDefaultProps: Partial<WeekPickerFieldProps>;
2722
2732
  export function WeekPickerField(props: WeekPickerFieldProps): JSX.Element;
2723
- export interface PinFieldProps extends Omit<PinInputProps, 'validate' | 'autoFocus'>, Omit<useTextTransformProps, 'entityForm' | 'column'> {
2733
+ export interface PinFieldProps extends Omit<PinInputProps, 'validate' | 'autoFocus'>, FieldWidthProps, Omit<useTextTransformProps, 'entityForm' | 'column'> {
2724
2734
  column: EntityColumn<Value>;
2725
2735
  entityForm: UseEntityFormReturnType;
2726
2736
  validate?: ValidatorConfiguration;
@@ -2748,11 +2758,12 @@ export interface UseCompleteFieldFromOtherProps {
2748
2758
  transformValue?: (value: Value) => Value;
2749
2759
  }
2750
2760
  export function useCompleteFieldFromOther({ form, originalColumn, targetColumn, onlyIfEmpty, transformValue }: UseCompleteFieldFromOtherProps): void;
2751
- export interface SwitchFieldProps extends SwitchProps {
2761
+ export interface SwitchFieldProps extends Omit<SwitchProps, 'autoFocus'>, FieldWidthProps {
2752
2762
  column: EntityColumn<Value>;
2753
2763
  entityForm: UseEntityFormReturnType;
2754
2764
  loading?: boolean;
2755
2765
  disableOnLoading?: boolean;
2766
+ autoFocus?: FieldAutoFocus;
2756
2767
  requiredMessage?: ReactNode;
2757
2768
  }
2758
2769
  export function SwitchField(props: SwitchFieldProps): JSX.Element;
@@ -2805,7 +2816,7 @@ export interface MoneyRangeFieldProps extends Omit<NumberFieldProps, 'parser' |
2805
2816
  }
2806
2817
  export const MoneyRangeFieldDefaultProps: Partial<MoneyRangeFieldProps>;
2807
2818
  export function MoneyRangeField(props: MoneyRangeFieldProps): JSX.Element;
2808
- export interface RadioGroupFieldProps extends ComponentPropsWithoutRef<typeof Radio.Group> {
2819
+ export interface RadioGroupFieldProps extends Omit<ComponentPropsWithoutRef<typeof Radio.Group>, 'autoFocus'>, FieldWidthProps {
2809
2820
  column: EntityColumn<Value>;
2810
2821
  entityForm: UseEntityFormReturnType;
2811
2822
  validate?: ValidatorConfiguration;
@@ -2813,12 +2824,13 @@ export interface RadioGroupFieldProps extends ComponentPropsWithoutRef<typeof Ra
2813
2824
  validationContainer?: React.ComponentType<{
2814
2825
  children: ReactNode;
2815
2826
  }>;
2816
- autoFocus?: boolean;
2827
+ autoFocus?: FieldAutoFocus;
2817
2828
  readOnly?: boolean;
2829
+ disabled?: boolean;
2818
2830
  showDescription?: boolean;
2819
2831
  }
2820
2832
  export const RadioGroupFieldDefaultProps: Partial<RadioGroupFieldProps>;
2821
- export const RadioGroupField: ForwardRefExoticComponent<RadioGroupFieldProps & RefAttributes<HTMLInputElement>>;
2833
+ export const RadioGroupField: ForwardRefExoticComponent<RadioGroupFieldProps & RefAttributes<HTMLDivElement>>;
2822
2834
  type SizeInput = {
2823
2835
  width: string;
2824
2836
  height: string;
@@ -2943,7 +2955,8 @@ export function useLookupMultiSelectInputProps(props: UseLookupMultiSelectInputP
2943
2955
  onFocus?: any;
2944
2956
  onBlur?: any;
2945
2957
  };
2946
- export interface LookupMultiSelectProps extends Omit<MultiSelectProps, 'data'> {
2958
+ export interface LookupMultiSelectProps extends Omit<MultiSelectProps, 'data' | 'autoFocus'> {
2959
+ autoFocus?: FieldAutoFocus;
2947
2960
  parentKeys?: ValuesObject;
2948
2961
  column: EntityColumn<Value>;
2949
2962
  formStatus?: OperationStatus<DBStatusResult | DataResult | ValuesObject>;
@@ -3477,7 +3490,7 @@ export interface AddressAutocompleteResult {
3477
3490
  utcOffsetMinutes?: number;
3478
3491
  formattedAddress?: string;
3479
3492
  }
3480
- export interface AddressAutocompleteProps extends Omit<GoogleAddressAutocompleteProps, 'restrictions' | 'onAddressFound'> {
3493
+ export interface AddressAutocompleteProps extends Omit<GoogleAddressAutocompleteProps, 'restrictions' | 'onAddressFound' | 'autoFocus'>, FieldWidthProps {
3481
3494
  column: EntityColumn<Value>;
3482
3495
  entityForm: UseEntityFormReturnType;
3483
3496
  validate?: ValidatorConfiguration;
@@ -3485,7 +3498,7 @@ export interface AddressAutocompleteProps extends Omit<GoogleAddressAutocomplete
3485
3498
  validationContainer?: React.ComponentType<{
3486
3499
  children: ReactNode;
3487
3500
  }>;
3488
- autoFocus?: boolean;
3501
+ autoFocus?: FieldAutoFocus;
3489
3502
  countries: string[];
3490
3503
  onAddressFound?: (addressResult?: AddressAutocompleteResult) => void;
3491
3504
  }