@mcurros2/microm 1.1.318-0 → 1.1.321-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 +41 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +169 -172
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2929,6 +2929,26 @@ export interface MenuItem {
|
|
|
2929
2929
|
}
|
|
2930
2930
|
export function getMenuItemContext(item: MenuItem, context?: MenuItemContext): MenuItemContext;
|
|
2931
2931
|
export function resolveMenuItemContent(item: MenuItem, context?: MenuItemContext): ReactNode | Promise<ReactNode> | undefined;
|
|
2932
|
+
export const MENU_ROUTE_CONTEXT_VERSION: 1;
|
|
2933
|
+
export interface MenuRouteContext {
|
|
2934
|
+
version: typeof MENU_ROUTE_CONTEXT_VERSION;
|
|
2935
|
+
parentKeys: ValuesObject;
|
|
2936
|
+
contextLabel: string;
|
|
2937
|
+
originPath: string;
|
|
2938
|
+
}
|
|
2939
|
+
export interface MenuRoute {
|
|
2940
|
+
menuId: string;
|
|
2941
|
+
itemPath: string;
|
|
2942
|
+
context?: MenuRouteContext;
|
|
2943
|
+
}
|
|
2944
|
+
export interface CreateMenuRouteProps {
|
|
2945
|
+
menuId: string;
|
|
2946
|
+
itemPath?: string;
|
|
2947
|
+
context?: Omit<MenuRouteContext, "version">;
|
|
2948
|
+
}
|
|
2949
|
+
export function getMenuBasePath(menuId: string): string;
|
|
2950
|
+
export function createMenuRoute({ menuId, itemPath, context }: CreateMenuRouteProps): string;
|
|
2951
|
+
export function parseMenuRoute(route: string): MenuRoute | null;
|
|
2932
2952
|
export interface NavigationState {
|
|
2933
2953
|
navigated: boolean;
|
|
2934
2954
|
route: string;
|
|
@@ -2995,7 +3015,6 @@ export const MenuPanelDefaultProps: Partial<MenuPanelProps>;
|
|
|
2995
3015
|
export function MenuNavBarPanel(props: MenuPanelProps): JSX.Element;
|
|
2996
3016
|
export interface MenuContentProps {
|
|
2997
3017
|
client: MicroMClient;
|
|
2998
|
-
menuId: string;
|
|
2999
3018
|
setContent: Dispatch<SetStateAction<ReactNode>>;
|
|
3000
3019
|
setOpened: Dispatch<SetStateAction<boolean>>;
|
|
3001
3020
|
isLoggedIn: boolean | undefined;
|
|
@@ -3003,32 +3022,39 @@ export interface MenuContentProps {
|
|
|
3003
3022
|
loggedInInfo?: Partial<MicroMClientClaimTypes>;
|
|
3004
3023
|
theme?: MantineTheme;
|
|
3005
3024
|
}
|
|
3025
|
+
export interface MenuConfigItem {
|
|
3026
|
+
menu: (props: MenuContentProps) => MenuItem[];
|
|
3027
|
+
isMain?: boolean;
|
|
3028
|
+
}
|
|
3006
3029
|
export interface UseMenuContentProps extends MenuContentProps {
|
|
3007
|
-
|
|
3030
|
+
menus: Record<string, MenuConfigItem>;
|
|
3008
3031
|
enableMenuSecurity?: boolean;
|
|
3009
|
-
defaultLoadingComponent?: ReactNode;
|
|
3010
3032
|
searchMenuItemsWithContentOnly?: boolean;
|
|
3011
3033
|
}
|
|
3012
|
-
export const UseMenuContentDefaultProps: Partial<UseMenuContentProps>;
|
|
3013
3034
|
export interface MenuItemActionProps {
|
|
3014
3035
|
item: MenuItem;
|
|
3015
3036
|
setContent: Dispatch<SetStateAction<ReactNode>>;
|
|
3016
3037
|
setOpened: Dispatch<SetStateAction<boolean>>;
|
|
3017
3038
|
clearContent: boolean;
|
|
3018
3039
|
defaultLoadingComponent?: ReactNode;
|
|
3019
|
-
onActiveChange:
|
|
3020
|
-
onSubitemActiveChange:
|
|
3040
|
+
onActiveChange: Dispatch<SetStateAction<string>>;
|
|
3041
|
+
onSubitemActiveChange: Dispatch<SetStateAction<string>>;
|
|
3021
3042
|
autoHideNavBarOnClick?: boolean;
|
|
3022
3043
|
}
|
|
3023
|
-
export
|
|
3044
|
+
export interface MenuContentResult {
|
|
3024
3045
|
activeIDState: [string, Dispatch<SetStateAction<string>>];
|
|
3025
3046
|
subitemActiveIDState: [string, Dispatch<SetStateAction<string>>];
|
|
3026
3047
|
items: MenuItem[];
|
|
3027
3048
|
actions: SpotlightAction[];
|
|
3028
3049
|
menuPathsDictionary: Record<string, MenuItem>;
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3050
|
+
}
|
|
3051
|
+
export interface UseMenuContentResult {
|
|
3052
|
+
menus: Record<string, MenuContentResult>;
|
|
3053
|
+
mainMenuId: string;
|
|
3054
|
+
mainMenu: MenuContentResult;
|
|
3055
|
+
}
|
|
3056
|
+
export function useMenuContent({ menus: menuConfig, client, setContent, setOpened, isLoggedIn, setIsLoggedIn, loggedInInfo, theme, enableMenuSecurity, searchMenuItemsWithContentOnly }: UseMenuContentProps): UseMenuContentResult;
|
|
3057
|
+
export type UseMenuContentReturnType = UseMenuContentResult;
|
|
3032
3058
|
export function normalizeTextToLowercaseWithoutAccents(value: string): string;
|
|
3033
3059
|
export function caseInsensitveAccentInsensitiveFilter(query: string, actions: SpotlightAction[]): SpotlightAction[];
|
|
3034
3060
|
export interface useAvatarUploaderProps {
|
|
@@ -3073,27 +3099,6 @@ export interface RouteProps {
|
|
|
3073
3099
|
children: React.ReactNode;
|
|
3074
3100
|
}
|
|
3075
3101
|
export function Route(props: RouteProps): JSX.Element | null;
|
|
3076
|
-
export const CONTEXTUAL_MENU_ROUTE_VERSION: 1;
|
|
3077
|
-
export const CONTEXTUAL_MENU_ROUTE_PREFIX = "/contextual";
|
|
3078
|
-
export interface ContextualMenuRoutePayload {
|
|
3079
|
-
version: typeof CONTEXTUAL_MENU_ROUTE_VERSION;
|
|
3080
|
-
parentKeys: ValuesObject;
|
|
3081
|
-
contextLabel: string;
|
|
3082
|
-
originPath: string;
|
|
3083
|
-
}
|
|
3084
|
-
export interface ContextualMenuRoute {
|
|
3085
|
-
menuId: string;
|
|
3086
|
-
itemPath: string;
|
|
3087
|
-
payload: ContextualMenuRoutePayload;
|
|
3088
|
-
}
|
|
3089
|
-
export interface CreateContextualMenuRouteProps extends Omit<ContextualMenuRoutePayload, 'version'> {
|
|
3090
|
-
menuId: string;
|
|
3091
|
-
itemPath?: string;
|
|
3092
|
-
}
|
|
3093
|
-
export function mergeParentKeys(parentKeys?: ValuesObject, selectedKeys?: ValuesObject): ValuesObject;
|
|
3094
|
-
export const getContextualMenuBasePath: (menuId: string) => string;
|
|
3095
|
-
export function createContextualMenuRoute(props: CreateContextualMenuRouteProps): string;
|
|
3096
|
-
export function parseContextualMenuRoute(route: string): ContextualMenuRoute | null;
|
|
3097
3102
|
export const DEFAULT_MAP_CENTER: latLng;
|
|
3098
3103
|
export type GoogleMapsAddressComponentType = 'street_address' | 'route' | 'intersection' | 'political' | 'country' | 'administrative_area_level_1' | 'administrative_area_level_2' | 'administrative_area_level_3' | 'administrative_area_level_4' | 'administrative_area_level_5' | 'administrative_area_level_6' | 'administrative_area_level_7' | 'colloquial_area' | 'locality' | 'sublocality' | 'sublocality_level_1' | 'sublocality_level_2' | 'sublocality_level_3' | 'sublocality_level_4' | 'sublocality_level_5' | 'neighborhood' | 'premise' | 'subpremise' | 'plus_code' | 'postal_code' | 'natural_feature' | 'airport' | 'park' | 'point_of_interest' | 'floor' | 'establishment' | 'landmark' | 'parking' | 'post_box' | 'postal_town' | 'room' | 'street_number' | 'bus_station' | 'train_station' | 'transit_station';
|
|
3099
3104
|
export type AddressComponentValue = {
|
|
@@ -3890,10 +3895,6 @@ export class TokenWebStorage implements TokenStorage {
|
|
|
3890
3895
|
readToken(app_id: string): Promise<MicroMToken | null>;
|
|
3891
3896
|
deleteToken(app_id: string): Promise<void>;
|
|
3892
3897
|
}
|
|
3893
|
-
export interface TotpSetupStartResponse {
|
|
3894
|
-
setup_challenge_id: string;
|
|
3895
|
-
qr_code_data_url: string;
|
|
3896
|
-
}
|
|
3897
3898
|
export interface TotpAuthenticatorResponse {
|
|
3898
3899
|
authenticator_id: string;
|
|
3899
3900
|
authenticator_name: string;
|
|
@@ -3901,6 +3902,10 @@ export interface TotpAuthenticatorResponse {
|
|
|
3901
3902
|
export interface TotpAuthenticatorsResponse {
|
|
3902
3903
|
authenticators: TotpAuthenticatorResponse[];
|
|
3903
3904
|
}
|
|
3905
|
+
export interface TotpSetupStartResponse {
|
|
3906
|
+
setup_challenge_id: string;
|
|
3907
|
+
qr_code_data_url: string;
|
|
3908
|
+
}
|
|
3904
3909
|
export type APIAction = "get" | "insert" | "update" | "delete" | "lookup" | "view" | "viewstream" | "action" | "upload" | "proc" | "procstream" | "process" | "import" | "viewtoexcel" | "proctoexcel" | "timezoneoffset";
|
|
3905
3910
|
export interface FileUploadResponse {
|
|
3906
3911
|
ErrorMessage?: string;
|
|
@@ -3949,7 +3954,7 @@ export class MicroMClient {
|
|
|
3949
3954
|
listTotpAuthenticators(): Promise<TotpAuthenticatorsResponse>;
|
|
3950
3955
|
deleteTotpAuthenticator(authenticatorId: string): Promise<void>;
|
|
3951
3956
|
get TIMEZONE_OFFSET(): number;
|
|
3952
|
-
getMenus():
|
|
3957
|
+
getMenus(): Set<string>;
|
|
3953
3958
|
getDocumentURL(fileGuid: string): string;
|
|
3954
3959
|
getThumbnailURL(fileGuid: string, max_size?: number, quality?: number): string;
|
|
3955
3960
|
upload(file: File, fileprocess_id: string, abort_signal?: AbortSignal | null, max_size?: number, quality?: number, onProgress?: FetchUploadProgress): Promise<FileUploadResponse>;
|