@mcurros2/microm 1.1.375-0 → 1.1.377-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 +319 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1320 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, Variants, StepperProps, MantineTheme, TextareaProps, TextInputProps, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps, SelectItem, BadgeVariant, MantineSize, CardProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps } from "@mantine/core";
|
|
1
|
+
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, Variants, StepperProps, MantineTheme, TextareaProps, TextInputProps, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps, SelectItem, BadgeVariant, MantineSize, CardProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps, BreadcrumbsProps, MenuProps as _MenuProps1, TitleOrder, CSSObject, SimpleGridProps, StackProps, NavbarProps, TooltipProps } from "@mantine/core";
|
|
2
2
|
import { JSX } from "react/jsx-runtime";
|
|
3
3
|
import React, { JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent, ComponentType, MutableRefObject, useState, Dispatch, SetStateAction, KeyboardEvent, RefObject, CSSProperties, ComponentPropsWithoutRef, Context, ReactPortal } from "react";
|
|
4
4
|
import { hasLength, isNotEmpty, matches, UseFormReturnType } from "@mantine/form";
|
|
@@ -2678,6 +2678,7 @@ export function useMenuContent(props: UseMenuContentProps): UseMenuContentResult
|
|
|
2678
2678
|
export type UseMenuContentReturnType = UseMenuContentResult;
|
|
2679
2679
|
export function normalizeTextToLowercaseWithoutAccents(value: string): string;
|
|
2680
2680
|
export function caseInsensitveAccentInsensitiveFilter(query: string, actions: SpotlightAction[]): SpotlightAction[];
|
|
2681
|
+
export function getMainMenuId(menuConfig: Record<string, MenuConfigItem>): string;
|
|
2681
2682
|
export type AvatarImageProcessingOptions = BrowserImageProcessingOptions;
|
|
2682
2683
|
export interface useAvatarUploaderProps {
|
|
2683
2684
|
client: MicroMClient;
|
|
@@ -4045,6 +4046,323 @@ export interface CustomWindowEventDefinition {
|
|
|
4045
4046
|
}
|
|
4046
4047
|
export type CustomWindowEvent<T extends CustomWindowEventDefinition> = T;
|
|
4047
4048
|
export function triggerCustomWindowEvent<T extends CustomWindowEventDefinition>(eventName: T["eventName"], payload: T["payload"]): void;
|
|
4049
|
+
export type EntityBuilderProps = {
|
|
4050
|
+
entity: Entity<EntityDefinition>;
|
|
4051
|
+
view: string;
|
|
4052
|
+
Card: ComponentType<EntityCardProps<ValuesObject>>;
|
|
4053
|
+
};
|
|
4054
|
+
export type EntityGridBuilderProps = Omit<EntityBuilderProps, 'Card'>;
|
|
4055
|
+
export type EntityLoader = (client: MicroMClient, parentKeys?: ValuesObject) => Promise<Entity<EntityDefinition>>;
|
|
4056
|
+
export type EntityBuilder<TEntity, TClient> = new (client: TClient, parentKeys?: ValuesObject) => TEntity;
|
|
4057
|
+
export type EntitySource<TResult> = {
|
|
4058
|
+
/** Builds the result synchronously */
|
|
4059
|
+
entityConstructor: (client: MicroMClient, parentKeys?: ValuesObject) => TResult;
|
|
4060
|
+
entityLoader?: never;
|
|
4061
|
+
} | {
|
|
4062
|
+
entityConstructor?: never;
|
|
4063
|
+
/** Loads the result asynchronously (e.g. via dynamic import) */
|
|
4064
|
+
entityLoader: (client: MicroMClient, parentKeys?: ValuesObject) => Promise<TResult>;
|
|
4065
|
+
};
|
|
4066
|
+
export type EntitySourceProps = EntitySource<Entity<EntityDefinition>>;
|
|
4067
|
+
export type EntityBuilderSourceProps = EntitySource<EntityBuilderProps>;
|
|
4068
|
+
export type EntityGridSourceProps = EntitySource<EntityGridBuilderProps>;
|
|
4069
|
+
export function importEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>): (client: TClient, parentKeys?: ValuesObject) => Promise<TEntity>;
|
|
4070
|
+
export function getEntity<TClient, TEntity, TModule, TCard>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string, importCard: () => Promise<TCard>): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityBuilderProps>;
|
|
4071
|
+
export function getEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityGridBuilderProps>;
|
|
4072
|
+
export interface UseResolvedEntityBuilderResult<TResult> {
|
|
4073
|
+
result: TResult | null;
|
|
4074
|
+
ready: boolean;
|
|
4075
|
+
}
|
|
4076
|
+
export function useResolvedEntityBuilder<TResult>(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySource<TResult>): UseResolvedEntityBuilderResult<TResult>;
|
|
4077
|
+
export interface UseResolvedEntityConstructorResult {
|
|
4078
|
+
entityConstructor: EntityConstructor | null;
|
|
4079
|
+
loading: boolean;
|
|
4080
|
+
error: unknown | null;
|
|
4081
|
+
}
|
|
4082
|
+
export function useResolvedEntityConstructor(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySourceProps): UseResolvedEntityConstructorResult;
|
|
4083
|
+
export interface MenuHostProps {
|
|
4084
|
+
client: MicroMClient;
|
|
4085
|
+
mainMenuId: string;
|
|
4086
|
+
menuId: string;
|
|
4087
|
+
menu: MenuContentResult;
|
|
4088
|
+
menus: Record<string, MenuContentResult>;
|
|
4089
|
+
emptyNodeMessage?: ReactNode;
|
|
4090
|
+
defaultLoadingComponent?: ReactNode;
|
|
4091
|
+
}
|
|
4092
|
+
export interface APPMenuConfigProps extends MenuConfigItem {
|
|
4093
|
+
hostPanel?: ComponentType<MenuHostProps>;
|
|
4094
|
+
}
|
|
4095
|
+
interface MenuCardBreadcrumbsProps extends Omit<BreadcrumbsProps, 'children'> {
|
|
4096
|
+
items: {
|
|
4097
|
+
title: string;
|
|
4098
|
+
path: string;
|
|
4099
|
+
}[];
|
|
4100
|
+
menuID: string;
|
|
4101
|
+
maxItems?: number;
|
|
4102
|
+
titleSize?: TitleOrder;
|
|
4103
|
+
textColor?: DefaultMantineColor | 'dimmed';
|
|
4104
|
+
/** Node shown in place of the collapsed items */
|
|
4105
|
+
collapsedIndicator?: ReactNode;
|
|
4106
|
+
/** Props for the dropdown menu that lists the collapsed items. Replaces the default object entirely when set per instance */
|
|
4107
|
+
collapsedMenuProps?: Partial<Omit<_MenuProps1, 'children'>>;
|
|
4108
|
+
}
|
|
4109
|
+
export interface MenuCardItemProps extends Omit<CardProps, 'children'> {
|
|
4110
|
+
item: MenuItem;
|
|
4111
|
+
routeBuilder?: (path: string) => string;
|
|
4112
|
+
/** Styles applied to the card on hover */
|
|
4113
|
+
hoverStyles?: CSSObject;
|
|
4114
|
+
/** Heading order for the item title */
|
|
4115
|
+
titleOrder?: TitleOrder;
|
|
4116
|
+
/** Title color in light color scheme */
|
|
4117
|
+
titleColorLight?: DefaultMantineColor;
|
|
4118
|
+
/** Title color in dark color scheme */
|
|
4119
|
+
titleColorDark?: DefaultMantineColor;
|
|
4120
|
+
/** Spacing between the icon and the title */
|
|
4121
|
+
headerSpacing?: MantineNumberSize;
|
|
4122
|
+
/** Spacing between shortcut links */
|
|
4123
|
+
shortcutSpacing?: MantineNumberSize;
|
|
4124
|
+
/** Font size of shortcut links */
|
|
4125
|
+
shortcutSize?: MantineSize;
|
|
4126
|
+
/** Node rendered between shortcut links */
|
|
4127
|
+
shortcutSeparator?: ReactNode;
|
|
4128
|
+
/** Left indent applied to shortcuts when the item has no icon */
|
|
4129
|
+
noIconIndent?: MantineNumberSize;
|
|
4130
|
+
}
|
|
4131
|
+
export const MenuCardItemDefaultProps: Partial<MenuCardItemProps>;
|
|
4132
|
+
export function MenuCardItem(props: MenuCardItemProps): JSX.Element;
|
|
4133
|
+
export interface MenuCardGridProps extends Omit<SimpleGridProps, 'children'> {
|
|
4134
|
+
items: MenuItem[];
|
|
4135
|
+
routeBuilder?: (path: string) => string;
|
|
4136
|
+
}
|
|
4137
|
+
export const MenuCardGridDefaultProps: Partial<MenuCardGridProps>;
|
|
4138
|
+
export function MenuCardGrid(props: MenuCardGridProps): JSX.Element;
|
|
4139
|
+
export interface MenuCardRootProps extends Omit<StackProps, 'children'> {
|
|
4140
|
+
items: MenuItem[];
|
|
4141
|
+
breadcrumbs: MenuCardBreadcrumbsProps['items'];
|
|
4142
|
+
rootID: string;
|
|
4143
|
+
renderBreadcrumbs?: boolean;
|
|
4144
|
+
routeBuilder?: (path: string) => string;
|
|
4145
|
+
}
|
|
4146
|
+
export const MenuCardRootDefaultProps: Partial<MenuCardRootProps>;
|
|
4147
|
+
export function MenuCardRoot(props: MenuCardRootProps): JSX.Element | null;
|
|
4148
|
+
export interface MenuCardPanelProps {
|
|
4149
|
+
menuId: string;
|
|
4150
|
+
menu: MenuContentResult;
|
|
4151
|
+
breadcrumbsPrefix?: MenuCardBreadcrumbsProps["items"];
|
|
4152
|
+
renderBreadcrumbs?: boolean;
|
|
4153
|
+
emptyNodeMessage?: ReactNode;
|
|
4154
|
+
defaultLoadingComponent?: ReactNode;
|
|
4155
|
+
}
|
|
4156
|
+
export const MenuCardPanelDefaultProps: Partial<MenuCardPanelProps>;
|
|
4157
|
+
export function MenuCardPanel(props: MenuCardPanelProps): JSX.Element;
|
|
4158
|
+
export interface GestionarPanelProps extends MenuHostProps, Omit<StackProps, 'children'> {
|
|
4159
|
+
header?: ReactNode;
|
|
4160
|
+
homeLabel?: string;
|
|
4161
|
+
}
|
|
4162
|
+
export const GestionarPanelDefaultProps: Partial<GestionarPanelProps>;
|
|
4163
|
+
export function ContextualMenuPanel(props: GestionarPanelProps): JSX.Element;
|
|
4164
|
+
/**
|
|
4165
|
+
* Shades and scales used by the navbar style functions. To override only some
|
|
4166
|
+
* values, spread the defaults: `{ ...NavBarVariantStylesDefaults, hoverScale: 1.5 }`.
|
|
4167
|
+
*/
|
|
4168
|
+
export interface NavBarVariantStyles {
|
|
4169
|
+
/** Color shade (0-9) for the navbar background in light color scheme */
|
|
4170
|
+
backgroundShade: number;
|
|
4171
|
+
/** Focus ring width */
|
|
4172
|
+
focusOutlineWidth: string;
|
|
4173
|
+
/** Color shade (0-9) for the focus ring */
|
|
4174
|
+
focusOutlineShade: number;
|
|
4175
|
+
/** Focus ring offset */
|
|
4176
|
+
focusOutlineOffset: string;
|
|
4177
|
+
/** Scale applied to an item on hover (icons mode) */
|
|
4178
|
+
hoverScale: number;
|
|
4179
|
+
/** Scale applied to the active item */
|
|
4180
|
+
activeScale: number;
|
|
4181
|
+
/** Color shade (0-9) for the active item background */
|
|
4182
|
+
activeBackgroundShade: number;
|
|
4183
|
+
/** Scale applied to the item icon on hover (text mode) */
|
|
4184
|
+
hoverIconScale: number;
|
|
4185
|
+
/** Color shade (0-9) for the icon background on hover (text mode) */
|
|
4186
|
+
hoverIconBackgroundShade: number;
|
|
4187
|
+
/** Color shade (0-9) for the row background on hover/active (text mode) */
|
|
4188
|
+
hoverBackgroundShade: number;
|
|
4189
|
+
/** Color shade (0-9) for the item label and icon color */
|
|
4190
|
+
labelShade: number;
|
|
4191
|
+
}
|
|
4192
|
+
export const NavBarVariantStylesDefaults: NavBarVariantStyles;
|
|
4193
|
+
export function getNavBarButtonsColor(theme: MantineTheme, brandColor?: DefaultMantineColor): DefaultMantineColor;
|
|
4194
|
+
export function getNavBarBackgroundColor(theme: MantineTheme, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles): string | undefined;
|
|
4195
|
+
export function getNavBarItemActiveStyles(theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles): {
|
|
4196
|
+
transform?: undefined;
|
|
4197
|
+
backgroundColor?: undefined;
|
|
4198
|
+
'&:hover'?: undefined;
|
|
4199
|
+
} | {
|
|
4200
|
+
transform: string;
|
|
4201
|
+
backgroundColor: string;
|
|
4202
|
+
'&:hover': {
|
|
4203
|
+
backgroundColor: string;
|
|
4204
|
+
};
|
|
4205
|
+
};
|
|
4206
|
+
export function getNavBarIconItemStyles(theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles): {
|
|
4207
|
+
transform?: undefined;
|
|
4208
|
+
backgroundColor?: undefined;
|
|
4209
|
+
'&:hover': {
|
|
4210
|
+
transform: string;
|
|
4211
|
+
};
|
|
4212
|
+
'&:focus-visible': {
|
|
4213
|
+
outline: string;
|
|
4214
|
+
outlineOffset: string;
|
|
4215
|
+
};
|
|
4216
|
+
'&:focus:not(:focus-visible)': {
|
|
4217
|
+
outline: string;
|
|
4218
|
+
};
|
|
4219
|
+
} | {
|
|
4220
|
+
transform: string;
|
|
4221
|
+
backgroundColor: string;
|
|
4222
|
+
'&:hover': {
|
|
4223
|
+
backgroundColor: string;
|
|
4224
|
+
};
|
|
4225
|
+
'&:focus-visible': {
|
|
4226
|
+
outline: string;
|
|
4227
|
+
outlineOffset: string;
|
|
4228
|
+
};
|
|
4229
|
+
'&:focus:not(:focus-visible)': {
|
|
4230
|
+
outline: string;
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
export function getNavBarTextItemStyles(theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles): {
|
|
4234
|
+
'&:focus-visible': {
|
|
4235
|
+
outline: string;
|
|
4236
|
+
outlineOffset: string;
|
|
4237
|
+
};
|
|
4238
|
+
'&:focus:not(:focus-visible)': {
|
|
4239
|
+
outline: string;
|
|
4240
|
+
};
|
|
4241
|
+
backgroundColor?: string | undefined;
|
|
4242
|
+
'&:hover .menu-card-navbar-item-icon': {
|
|
4243
|
+
transform: string;
|
|
4244
|
+
backgroundColor: string;
|
|
4245
|
+
};
|
|
4246
|
+
'&:hover': {
|
|
4247
|
+
backgroundColor: string;
|
|
4248
|
+
};
|
|
4249
|
+
};
|
|
4250
|
+
/**
|
|
4251
|
+
* Style functions used by the navbar components. Provide your own implementations
|
|
4252
|
+
* to fully replace the styling logic. To replace only some functions, spread the
|
|
4253
|
+
* defaults: `{ ...NavBarThemeFunctionsDefaults, getNavBarBackgroundColor: mine }`.
|
|
4254
|
+
* The `styles` argument arrives already resolved (a complete NavBarVariantStyles).
|
|
4255
|
+
* Note: the composite functions (getNavBarIconItemStyles / getNavBarTextItemStyles)
|
|
4256
|
+
* are self-contained — overriding getNavBarItemActiveStyles does not change what
|
|
4257
|
+
* the default composites produce.
|
|
4258
|
+
*/
|
|
4259
|
+
export interface NavBarThemeFunctions {
|
|
4260
|
+
/** Resolves the base color used by the navbar buttons */
|
|
4261
|
+
getNavBarButtonsColor: (theme: MantineTheme, brandColor?: DefaultMantineColor) => DefaultMantineColor;
|
|
4262
|
+
/** Navbar background color; return undefined to keep the color scheme default */
|
|
4263
|
+
getNavBarBackgroundColor: (theme: MantineTheme, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles) => DefaultMantineColor | undefined;
|
|
4264
|
+
/** Styles applied to the active item icon */
|
|
4265
|
+
getNavBarItemActiveStyles: (theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles) => CSSObject;
|
|
4266
|
+
/** Styles for an item in icons mode (focus + hover + active) */
|
|
4267
|
+
getNavBarIconItemStyles: (theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles) => CSSObject;
|
|
4268
|
+
/** Styles for an item row in text mode (hover + active + focus) */
|
|
4269
|
+
getNavBarTextItemStyles: (theme: MantineTheme, active: boolean, brandColor?: DefaultMantineColor, styles?: NavBarVariantStyles) => CSSObject;
|
|
4270
|
+
}
|
|
4271
|
+
export const NavBarThemeFunctionsDefaults: NavBarThemeFunctions;
|
|
4272
|
+
export type NavBarMode = 'icons' | 'text';
|
|
4273
|
+
export type MenuMode = NavBarMode | 'collapsed';
|
|
4274
|
+
type NavBarItemOverrides = Partial<Pick<MenuCardNavBarItemProps, 'iconSize' | 'tooltipProps' | 'radius' | 'textColor' | 'mb'>>;
|
|
4275
|
+
export interface MenuCardNavBarPanelProps extends Omit<NavbarProps, 'children' | 'width'> {
|
|
4276
|
+
isLoggedIn?: boolean;
|
|
4277
|
+
rootItems: MenuItem[];
|
|
4278
|
+
Logo?: ReactNode;
|
|
4279
|
+
logoTooltip?: string;
|
|
4280
|
+
mode: NavBarMode;
|
|
4281
|
+
homeMenuId: string;
|
|
4282
|
+
homeLabel?: string;
|
|
4283
|
+
searchLabel?: string;
|
|
4284
|
+
brandColor?: DefaultMantineColor;
|
|
4285
|
+
/** Navbar width in icons mode */
|
|
4286
|
+
widthIcons?: number;
|
|
4287
|
+
/** Navbar width in text mode */
|
|
4288
|
+
widthText?: number;
|
|
4289
|
+
/** Icon for the home item */
|
|
4290
|
+
homeIcon?: ReactNode;
|
|
4291
|
+
/** Icon for the search item */
|
|
4292
|
+
searchIcon?: ReactNode;
|
|
4293
|
+
/** Shades and scales used to style the navbar and its items. Replaces the default object entirely — spread NavBarVariantStylesDefaults to override selectively */
|
|
4294
|
+
variantStyles?: NavBarVariantStyles;
|
|
4295
|
+
/** Style functions for the navbar and its items. Replaces the default object entirely — spread NavBarThemeFunctionsDefaults to override selectively */
|
|
4296
|
+
themeFunctions?: NavBarThemeFunctions;
|
|
4297
|
+
/** Overrides applied to every navbar item. Replaces the default object entirely when set per instance */
|
|
4298
|
+
itemProps?: NavBarItemOverrides;
|
|
4299
|
+
/** Overrides applied to the search item only, after itemProps. Replaces the default object entirely when set per instance */
|
|
4300
|
+
searchItemProps?: NavBarItemOverrides;
|
|
4301
|
+
}
|
|
4302
|
+
export const MenuCardNavBarPanelDefaultProps: Partial<MenuCardNavBarPanelProps>;
|
|
4303
|
+
export function MenuCardNavBarPanel(props: MenuCardNavBarPanelProps): JSX.Element;
|
|
4304
|
+
export interface MenuCardNavBarItemProps {
|
|
4305
|
+
icon: ReactNode;
|
|
4306
|
+
label: string;
|
|
4307
|
+
active: boolean;
|
|
4308
|
+
mode: NavBarMode;
|
|
4309
|
+
href?: string;
|
|
4310
|
+
onClick?: () => void;
|
|
4311
|
+
radius?: MantineNumberSize;
|
|
4312
|
+
mb?: MantineNumberSize;
|
|
4313
|
+
brandColor?: DefaultMantineColor;
|
|
4314
|
+
textColor?: DefaultMantineColor;
|
|
4315
|
+
/** Size of the icon container */
|
|
4316
|
+
iconSize?: MantineNumberSize;
|
|
4317
|
+
/** Props for the tooltip shown in icons mode. Replaces the default object entirely when set per instance */
|
|
4318
|
+
tooltipProps?: Omit<TooltipProps, 'label' | 'children'>;
|
|
4319
|
+
/** Shades and scales used to style the item. Replaces the default object entirely — spread NavBarVariantStylesDefaults to override selectively */
|
|
4320
|
+
variantStyles?: NavBarVariantStyles;
|
|
4321
|
+
/** Style functions for the item. Replaces the default object entirely — spread NavBarThemeFunctionsDefaults to override selectively */
|
|
4322
|
+
themeFunctions?: NavBarThemeFunctions;
|
|
4323
|
+
}
|
|
4324
|
+
export const MenuCardNavBarItemDefaultProps: Partial<MenuCardNavBarItemProps>;
|
|
4325
|
+
export function MenuCardNavBarItem(props: MenuCardNavBarItemProps): JSX.Element;
|
|
4326
|
+
export type MenuModalCloseBehavior = {
|
|
4327
|
+
route?: string;
|
|
4328
|
+
onClosed?: () => void;
|
|
4329
|
+
lastLevel?: boolean;
|
|
4330
|
+
};
|
|
4331
|
+
export function useMenuModalCloseNavigator(closeBehavior?: MenuModalCloseBehavior): () => void;
|
|
4332
|
+
export type MenuEntityActionModalProps = EntitySourceProps & {
|
|
4333
|
+
client: MicroMClient;
|
|
4334
|
+
parentKeys?: ValuesObject;
|
|
4335
|
+
actionName: string;
|
|
4336
|
+
selectedKeys?: ValuesObject[];
|
|
4337
|
+
closeBehavior?: MenuModalCloseBehavior;
|
|
4338
|
+
errorComponent?: (error: unknown, close: () => void) => ReactNode;
|
|
4339
|
+
errorTitle?: string;
|
|
4340
|
+
backLabel?: string;
|
|
4341
|
+
actionNotFoundLabel?: string;
|
|
4342
|
+
selectionRequiredLabel?: string;
|
|
4343
|
+
};
|
|
4344
|
+
export const MenuEntityActionModalDefaultProps: Partial<MenuEntityActionModalProps>;
|
|
4345
|
+
export function MenuEntityActionModal(props: MenuEntityActionModalProps): JSX.Element | null;
|
|
4346
|
+
type PassthroughProps = Omit<EntityFormModalProps, "entityConstructor" | "openState" | "setOpenState" | "onModalClosed" | "client">;
|
|
4347
|
+
export type MenuEntityFormModalProps = PassthroughProps & EntitySourceProps & {
|
|
4348
|
+
client: MicroMClient;
|
|
4349
|
+
parentKeys?: ValuesObject;
|
|
4350
|
+
closeBehavior?: MenuModalCloseBehavior;
|
|
4351
|
+
errorComponent?: (error: unknown, close: () => void) => ReactNode;
|
|
4352
|
+
errorTitle?: string;
|
|
4353
|
+
backLabel?: string;
|
|
4354
|
+
};
|
|
4355
|
+
export const MenuEntityFormModalDefaultProps: Partial<MenuEntityFormModalProps>;
|
|
4356
|
+
export function MenuEntityFormModal(props: MenuEntityFormModalProps): JSX.Element | null;
|
|
4357
|
+
export interface MenuRouteHostProps {
|
|
4358
|
+
client: MicroMClient;
|
|
4359
|
+
menuConfig: Record<string, APPMenuConfigProps>;
|
|
4360
|
+
menus: Record<string, MenuContentResult>;
|
|
4361
|
+
emptyNodeMessage?: ReactNode;
|
|
4362
|
+
defaultLoadingComponent?: ReactNode;
|
|
4363
|
+
}
|
|
4364
|
+
export const MenuRouteHostDefaultProps: Partial<MenuRouteHostProps>;
|
|
4365
|
+
export function MenuRouteHost(props: MenuRouteHostProps): JSX.Element | null;
|
|
4048
4366
|
export interface MicroMError extends Error {
|
|
4049
4367
|
status: number;
|
|
4050
4368
|
message: string;
|