identity-admin-ui 1.2.0 → 1.4.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.
Files changed (28) hide show
  1. package/lib/cjs/index.js +12 -12
  2. package/lib/cjs/types/components/IdentitySnackAlert.d.ts +10 -0
  3. package/lib/cjs/types/context/AppConfigurationsContext.d.ts +2 -2
  4. package/lib/cjs/types/context/SnackAlertContext.d.ts +19 -0
  5. package/lib/cjs/types/helpers/CrudHelper/List/ListProps.d.ts +6 -1
  6. package/lib/cjs/types/hooks/useAppConfigurations.d.ts +12 -0
  7. package/lib/cjs/types/hooks/useCredentials.d.ts +2 -0
  8. package/lib/cjs/types/hooks/usePaths.d.ts +8 -0
  9. package/lib/cjs/types/hooks/useResources.d.ts +5 -0
  10. package/lib/cjs/types/hooks/useSnackAlert.d.ts +6 -0
  11. package/lib/cjs/types/layout/dashboard/config-navigation.d.ts +4 -4
  12. package/lib/cjs/types/routes/AdminRouter.d.ts +10 -10
  13. package/lib/cjs/types/routes/paths.d.ts +5 -5
  14. package/lib/esm/index.js +7 -7
  15. package/lib/esm/types/components/IdentitySnackAlert.d.ts +10 -0
  16. package/lib/esm/types/context/AppConfigurationsContext.d.ts +2 -2
  17. package/lib/esm/types/context/SnackAlertContext.d.ts +19 -0
  18. package/lib/esm/types/helpers/CrudHelper/List/ListProps.d.ts +6 -1
  19. package/lib/esm/types/hooks/useAppConfigurations.d.ts +12 -0
  20. package/lib/esm/types/hooks/useCredentials.d.ts +2 -0
  21. package/lib/esm/types/hooks/usePaths.d.ts +8 -0
  22. package/lib/esm/types/hooks/useResources.d.ts +5 -0
  23. package/lib/esm/types/hooks/useSnackAlert.d.ts +6 -0
  24. package/lib/esm/types/layout/dashboard/config-navigation.d.ts +4 -4
  25. package/lib/esm/types/routes/AdminRouter.d.ts +10 -10
  26. package/lib/esm/types/routes/paths.d.ts +5 -5
  27. package/lib/index.d.ts +18 -3
  28. package/package.json +78 -77
@@ -0,0 +1,10 @@
1
+ import { AlertColor } from '@mui/material';
2
+ export interface ISnackAlert {
3
+ message?: string;
4
+ open: boolean;
5
+ severity?: AlertColor;
6
+ horizontalPosition?: 'left' | 'center' | 'right';
7
+ verticalPosition?: 'top' | 'bottom';
8
+ onClose: () => void;
9
+ }
10
+ export declare function IdentitySnackAlert({ open, message, severity, horizontalPosition, verticalPosition, onClose }: ISnackAlert): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { SizeType } from '../helpers/Types';
3
- interface AppConfigurations {
3
+ type AppConfigurations = {
4
4
  textFieldSize: SizeType;
5
5
  themeLayout?: 'vertical' | 'horizontal' | 'mini';
6
6
  defaultRowsPerPage: number;
@@ -9,7 +9,7 @@ interface AppConfigurations {
9
9
  loadingLoago?: string;
10
10
  navBarLogo?: string;
11
11
  miniNavBarLogo?: string;
12
- }
12
+ };
13
13
  declare const AppConfigurationsContext: import("react").Context<AppConfigurations>;
14
14
  declare const AppConfigurationsContextProvider: (props: any) => import("react/jsx-runtime").JSX.Element;
15
15
  export { AppConfigurationsContext, AppConfigurationsContextProvider };
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { AlertColor } from '@mui/material';
3
+ import { SnackbarOrigin } from 'notistack';
4
+ export interface ISnackMessageProps {
5
+ state: boolean;
6
+ message?: string | undefined;
7
+ severity?: AlertColor | undefined;
8
+ position?: SnackbarOrigin;
9
+ }
10
+ declare const SnackAlertContext: import("react").Context<{
11
+ setAlert: (message: string, severity: AlertColor, position?: SnackbarOrigin) => void;
12
+ setErrorAlert: (message: string, position?: SnackbarOrigin) => void;
13
+ setSuccessAlert: (message: string, position?: SnackbarOrigin) => void;
14
+ }>;
15
+ type SnackAlertProviderProps = {
16
+ children: ReactNode;
17
+ };
18
+ declare function SnackAlertProvider({ children }: SnackAlertProviderProps): import("react/jsx-runtime").JSX.Element;
19
+ export { SnackAlertContext, SnackAlertProvider };
@@ -1,10 +1,15 @@
1
1
  /// <reference types="react" />
2
+ import { ListParams } from '../../../components/dataGrid/GridTypes';
2
3
  export interface IListProps {
3
4
  apiRoute: string;
4
5
  key?: string;
5
6
  path: string;
6
7
  modelName: string;
7
8
  }
9
+ export interface IActionsProps {
10
+ initialQueryParams: ListParams;
11
+ setParams: React.Dispatch<React.SetStateAction<ListParams>>;
12
+ }
8
13
  export interface IListRecordsProps extends IListProps {
9
- Actions?: (props: any) => JSX.Element;
14
+ Actions?: (props: IActionsProps) => JSX.Element;
10
15
  }
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare const useAppConfigurations: () => {
3
+ textFieldSize: import("../helpers/Types").SizeType;
4
+ themeLayout?: "horizontal" | "vertical" | "mini" | undefined;
5
+ defaultRowsPerPage: number;
6
+ themeStretch: boolean;
7
+ setThemeLayout?: import("react").Dispatch<import("react").SetStateAction<"horizontal" | "vertical" | "mini">> | undefined;
8
+ loadingLoago?: string | undefined;
9
+ navBarLogo?: string | undefined;
10
+ miniNavBarLogo?: string | undefined;
11
+ };
12
+ export default useAppConfigurations;
@@ -0,0 +1,2 @@
1
+ declare const useCredentials: () => import("../context").CredentialKeys;
2
+ export default useCredentials;
@@ -0,0 +1,8 @@
1
+ declare const usePaths: () => {
2
+ paths: {
3
+ [key: string]: import("../context").ResourcePaths;
4
+ };
5
+ root: string;
6
+ home: string;
7
+ };
8
+ export default usePaths;
@@ -0,0 +1,5 @@
1
+ declare const useResources: () => {
2
+ resources: import("../context").ResourceResponse;
3
+ getResources: () => void;
4
+ };
5
+ export default useResources;
@@ -0,0 +1,6 @@
1
+ declare const useSnackAlert: () => {
2
+ setAlert: (message: string, severity: import("@mui/material").AlertColor, position?: import("notistack").SnackbarOrigin | undefined) => void;
3
+ setErrorAlert: (message: string, position?: import("notistack").SnackbarOrigin | undefined) => void;
4
+ setSuccessAlert: (message: string, position?: import("notistack").SnackbarOrigin | undefined) => void;
5
+ };
6
+ export default useSnackAlert;
@@ -1,4 +1,4 @@
1
- export declare function useNavData(): {
2
- subheader: string;
3
- items: any;
4
- }[];
1
+ export declare function useNavData(): {
2
+ subheader: string;
3
+ items: any;
4
+ }[];
@@ -1,10 +1,10 @@
1
- import { SizeType } from '../helpers/Types';
2
- export declare var SIZE: SizeType;
3
- export default function AdminRouter(): {
4
- path: any;
5
- children: {
6
- path: string;
7
- element: import("react/jsx-runtime").JSX.Element;
8
- children: any[];
9
- }[];
10
- };
1
+ import { SizeType } from '../helpers/Types';
2
+ export declare var SIZE: SizeType;
3
+ export default function AdminRouter(): {
4
+ path: any;
5
+ children: {
6
+ path: string;
7
+ element: import("react/jsx-runtime").JSX.Element;
8
+ children: any[];
9
+ }[];
10
+ };
@@ -1,5 +1,5 @@
1
- export declare function path(root: string, sublink: string): string;
2
- export declare const ADMIN_ROOT = "/admin";
3
- export declare var ADMIN_PATH: {
4
- [key: string]: any;
5
- };
1
+ export declare function path(root: string, sublink: string): string;
2
+ export declare const ADMIN_ROOT = "/admin";
3
+ export declare var ADMIN_PATH: {
4
+ [key: string]: any;
5
+ };