Interface for the OutletModalProps class.

interface IOutletModalProps<
    Data extends {} = Record<string, any>,
    Payload = IAnything,
    Params = IAnything,
> {
    AfterTitle?: any;
    BeforeTitle?: any;
    data?: null | Data;
    fallback?: (e: Error) => void;
    fetchState?:
        | TupleState<string, any, any, any, any, any, any, any, any, any, any>
        | ObjectState<string, any>;
    fullScreen?: boolean;
    hidden?: boolean;
    mapInitialData?: (
        id: string,
        data: Record<string, any>[],
    ) => Data | Promise<Data>;
    mapParams?: (
        id: string,
        data: Record<string, any>[],
    ) => Params | Promise<Params>;
    mapPayload?: (
        id: string,
        data: Record<string, any>[],
    ) => Payload | Promise<Payload>;
    onClose?: () => void;
    onLoadEnd?: (isOk: boolean) => void;
    onLoadStart?: () => void;
    onMount?: () => void;
    onSubmit?: (
        id: string,
        data: null | Data,
        payload: Payload,
    ) => boolean | Promise<boolean>;
    onUnmount?: () => void;
    outletIdSubject: TBehaviorSubject<null | string>;
    reloadSubject?: TSubject<void>;
    routes: IOutletModal<Data, Payload, Params>[];
    sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number };
    submitIcon?: any;
    submitLabel?: string;
    throwError?: boolean;
    title?: string;
    withActionButton?: boolean;
    withStaticAction?: boolean;
    [key: string]: BoxProps;
    [key: number]: BoxProps;
    [key: symbol]: BoxProps;
}

Type Parameters

  • Data extends {} = Record<string, any>

    The data type for storing the data.

  • Payload = IAnything

    The payload type.

  • Params = IAnything

    The params type.

Hierarchy

  • Omit<
        IOutletViewProps<Data, Payload, Params, ModalOtherProps>,
        keyof {
            data: never;
            id: never;
            initialData: never;
            onSubmit: never;
            otherProps: never;
            params: never;
            payload: never;
            routes: never;
        },
    >
    • IOutletModalProps

Indexable

  • [key: string]: BoxProps
  • [key: number]: BoxProps
  • [key: symbol]: BoxProps

Properties

AfterTitle?: any

Represents the AfterTitle component.

The component props.

The function to be called when closing the component.

The data to be displayed in the component.

The unique identifier for the component.

  • The rendered AfterTitle component or null if data is null.
BeforeTitle?: any

BeforeTitle is a React component that renders a title with a close button.

The props object that contains the following properties:

The callback function to be called when the close button is clicked.

The data to be displayed in the component. Can be null if there is no data.

The unique identifier for the component.

The BeforeTitle component.

data?: null | Data
fallback?: (e: Error) => void
fetchState?:
    | TupleState<string, any, any, any, any, any, any, any, any, any, any>
    | ObjectState<string, any>
fullScreen?: boolean
hidden?: boolean
mapInitialData?: (
    id: string,
    data: Record<string, any>[],
) => Data | Promise<Data>

Represents a function to initialize data based on given ID and data.

Type declaration

    • (id: string, data: Record<string, any>[]): Data | Promise<Data>
    • Parameters

      • id: string

        The ID for initialization.

      • data: Record<string, any>[]

        An array of data records.

      Returns Data | Promise<Data>

      • The initialized data or a promise of the initialized data.
mapParams?: (
    id: string,
    data: Record<string, any>[],
) => Params | Promise<Params>

Maps the given data into parameters based on the provided id.

Type declaration

    • (id: string, data: Record<string, any>[]): Params | Promise<Params>
    • Parameters

      • id: string

        The identifier to map the data.

      • data: Record<string, any>[]

        The data to be mapped.

      Returns Params | Promise<Params>

      The mapped parameters.

mapPayload?: (
    id: string,
    data: Record<string, any>[],
) => Payload | Promise<Payload>

Maps the payload with the given ID and data.

Type declaration

    • (id: string, data: Record<string, any>[]): Payload | Promise<Payload>
    • Parameters

      • id: string

        The ID of the payload.

      • data: Record<string, any>[]

        The data to be mapped.

      Returns Payload | Promise<Payload>

      • The mapped payload.
onClose?: () => void
onLoadEnd?: (isOk: boolean) => void
onLoadStart?: () => void
onMount?: () => void
onSubmit?: (
    id: string,
    data: null | Data,
    payload: Payload,
) => boolean | Promise<boolean>

Handles the onSubmit event.

Type declaration

    • (id: string, data: null | Data, payload: Payload): boolean | Promise<boolean>
    • Parameters

      • id: string

        The identifier.

      • data: null | Data

        The data or null.

      • payload: Payload

        The payload.

      Returns boolean | Promise<boolean>

      A promise resolving to a boolean or a boolean value.

onUnmount?: () => void
outletIdSubject: TBehaviorSubject<null | string>
reloadSubject?: TSubject<void>

Represents an array of outlet modals routes.

The type of data provided by the outlet modals.

The type of payload accepted by the outlet modals.

The type of parameters expected by the outlet modals.

sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number }
submitIcon?: any
submitLabel?: string
throwError?: boolean
title?: string
withActionButton?: boolean

Specifies whether the component should include an action button.

false
withStaticAction?: boolean

Indicates whether the action being performed is static or not.