@cm-sigoo-temp/ui 0.1.2

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 (69) hide show
  1. package/README.md +20 -0
  2. package/dist/lib/api/index.d.ts +2 -0
  3. package/dist/lib/api/permisos.d.ts +2 -0
  4. package/dist/lib/api/terminales.d.ts +2 -0
  5. package/dist/lib/auth/auth.d.ts +6 -0
  6. package/dist/lib/auth/index.d.ts +7 -0
  7. package/dist/lib/auth/openID.d.ts +50 -0
  8. package/dist/lib/cm-sigoo-temp-ui.js +22109 -0
  9. package/dist/lib/cm-sigoo-temp-ui.js.map +1 -0
  10. package/dist/lib/components/Assets/GoogleLogo.d.ts +3 -0
  11. package/dist/lib/components/Assets/SigooLogo.d.ts +3 -0
  12. package/dist/lib/components/Assets/index.d.ts +2 -0
  13. package/dist/lib/components/Auth/AuthLayout.d.ts +3 -0
  14. package/dist/lib/components/Auth/Keycloak/Keycloak.d.ts +12 -0
  15. package/dist/lib/components/Auth/Keycloak/index.d.ts +1 -0
  16. package/dist/lib/components/Auth/OpenID/GoogleButton.d.ts +1 -0
  17. package/dist/lib/components/Auth/OpenID/Login.d.ts +10 -0
  18. package/dist/lib/components/Auth/OpenID/OpenID.d.ts +14 -0
  19. package/dist/lib/components/Auth/OpenID/index.d.ts +3 -0
  20. package/dist/lib/components/Auth/estado.d.ts +16 -0
  21. package/dist/lib/components/Auth/index.d.ts +2 -0
  22. package/dist/lib/components/Decorators/StorySibling.d.ts +23 -0
  23. package/dist/lib/components/Decorators/index.d.ts +1 -0
  24. package/dist/lib/components/Drawer/Drawer.d.ts +7 -0
  25. package/dist/lib/components/Drawer/DrawerMargin.d.ts +1 -0
  26. package/dist/lib/components/Drawer/MenuItem.d.ts +8 -0
  27. package/dist/lib/components/Drawer/SubMenuItem.d.ts +6 -0
  28. package/dist/lib/components/Drawer/index.d.ts +4 -0
  29. package/dist/lib/components/Layout/Layout.d.ts +5 -0
  30. package/dist/lib/components/Layout/index.d.ts +1 -0
  31. package/dist/lib/components/Toolbar/DatosSesion/Avatar.d.ts +7 -0
  32. package/dist/lib/components/Toolbar/DatosSesion/DatosSesion.d.ts +7 -0
  33. package/dist/lib/components/Toolbar/DatosSesion/SelectorTerminal.d.ts +1 -0
  34. package/dist/lib/components/Toolbar/DatosSesion/index.d.ts +3 -0
  35. package/dist/lib/components/Toolbar/Toolbar.d.ts +9 -0
  36. package/dist/lib/components/Toolbar/index.d.ts +2 -0
  37. package/dist/lib/components/index.d.ts +4 -0
  38. package/dist/lib/constantes/colores.d.ts +20 -0
  39. package/dist/lib/constantes/drawer.d.ts +1 -0
  40. package/dist/lib/constantes/index.d.ts +3 -0
  41. package/dist/lib/constantes/tema/components.d.ts +2 -0
  42. package/dist/lib/constantes/tema/index.d.ts +1 -0
  43. package/dist/lib/constantes/tema/palette.d.ts +76 -0
  44. package/dist/lib/constantes/tema/tema.d.ts +1 -0
  45. package/dist/lib/estado/drawer.d.ts +8 -0
  46. package/dist/lib/estado/index.d.ts +2 -0
  47. package/dist/lib/estado/toolbar.d.ts +20 -0
  48. package/dist/lib/importmap.json +7 -0
  49. package/dist/lib/lib.d.ts +7 -0
  50. package/dist/lib/main.d.ts +1 -0
  51. package/dist/lib/stories/Drawer.d.ts +3 -0
  52. package/dist/lib/stories/Drawer.stories.d.ts +13 -0
  53. package/dist/lib/stories/DrawerMargin.stories.d.ts +12 -0
  54. package/dist/lib/stories/Toolbar.stories.d.ts +12 -0
  55. package/dist/lib/tipos/Api/Permisos.d.ts +39 -0
  56. package/dist/lib/tipos/Api/Terminales.d.ts +11 -0
  57. package/dist/lib/tipos/Api/Usuarios.d.ts +38 -0
  58. package/dist/lib/tipos/Api/index.d.ts +2 -0
  59. package/dist/lib/tipos/Auth/Keycloak.d.ts +25 -0
  60. package/dist/lib/tipos/Auth/OpenID.d.ts +58 -0
  61. package/dist/lib/tipos/Auth/index.d.ts +2 -0
  62. package/dist/lib/tipos/Drawer.d.ts +26 -0
  63. package/dist/lib/tipos/Layout.d.ts +8 -0
  64. package/dist/lib/tipos/Toolbar.d.ts +20 -0
  65. package/dist/lib/tipos/index.d.ts +5 -0
  66. package/dist/lib/utils/URL.d.ts +1 -0
  67. package/dist/lib/utils/cookies.d.ts +13 -0
  68. package/dist/lib/utils/index.d.ts +2 -0
  69. package/package.json +92 -0
@@ -0,0 +1,3 @@
1
+ import { FC, SVGProps } from 'react';
2
+ export type GoogleLogoProps = Omit<SVGProps<SVGSVGElement>, 'viewBox' | 'fill' | 'xmlns'>;
3
+ export declare const GoogleLogo: FC<GoogleLogoProps>;
@@ -0,0 +1,3 @@
1
+ import { FC, SVGProps } from 'react';
2
+ export type SigooLogoProps = Omit<SVGProps<SVGSVGElement>, 'viewBox' | 'fill' | 'xmlns'>;
3
+ export declare const SigooLogo: FC<SigooLogoProps>;
@@ -0,0 +1,2 @@
1
+ export * from './GoogleLogo';
2
+ export * from './SigooLogo';
@@ -0,0 +1,3 @@
1
+ export declare const AuthLayout: {
2
+ OpenID: import('react').FC<import('./OpenID').AuthOpenIDProps>;
3
+ };
@@ -0,0 +1,12 @@
1
+ import { FConstruirMenuKeycloakProps, TMenuDrawer } from '../../../tipos';
2
+ import { KeycloakConfig } from 'keycloak-js';
3
+ import { FC, PropsWithChildren } from 'react';
4
+ export type AuthKeycloakProps = PropsWithChildren<{
5
+ idApp: string;
6
+ keycloakConfig: KeycloakConfig;
7
+ silentCheckSsoRedirectUri: string;
8
+ nombreApp?: string;
9
+ menus: TMenuDrawer[];
10
+ onConstruirMenuProps?: FConstruirMenuKeycloakProps;
11
+ }>;
12
+ export declare const AuthKeycloak: FC<AuthKeycloakProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const GoogleButtonOpenID: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { SvgIconTypeMap } from '@mui/material';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ import { FC, ReactNode } from 'react';
4
+ export type LoginOpenIDProps = {
5
+ label?: ReactNode;
6
+ icon?: string | (OverridableComponent<SvgIconTypeMap<unknown, 'svg'>> & {
7
+ muiName: string;
8
+ });
9
+ };
10
+ export declare const LoginOpenID: FC<LoginOpenIDProps>;
@@ -0,0 +1,14 @@
1
+ import { FConstruirMenuOpenIDProps, TMenuDrawer } from '../../../tipos';
2
+ import { SvgIconTypeMap } from '@mui/material';
3
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
4
+ import { FC, PropsWithChildren } from 'react';
5
+ export type AuthOpenIDProps = PropsWithChildren<{
6
+ idApp: string;
7
+ icon?: string | (OverridableComponent<SvgIconTypeMap<unknown, 'svg'>> & {
8
+ muiName: string;
9
+ });
10
+ nombreApp?: string;
11
+ menus: TMenuDrawer[];
12
+ onConstruirMenuProps?: FConstruirMenuOpenIDProps;
13
+ }>;
14
+ export declare const AuthOpenID: FC<AuthOpenIDProps>;
@@ -0,0 +1,3 @@
1
+ export * from './GoogleButton';
2
+ export * from './Login';
3
+ export * from './OpenID';
@@ -0,0 +1,16 @@
1
+ import { TAplicacionPermisos, TSesionOpenID, TUsuarioKeycloak, TUsuarioOpenID } from '../../tipos';
2
+ import { JWTPayload } from 'jose';
3
+ export type CamposEstadoAuth = {
4
+ permisos?: TAplicacionPermisos;
5
+ aplicaciones?: TAplicacionPermisos[];
6
+ openID: {
7
+ sesion: TSesionOpenID & JWTPayload;
8
+ usuario?: (TUsuarioOpenID & JWTPayload) | null;
9
+ } | null;
10
+ keycloack: {
11
+ usuario: TUsuarioKeycloak;
12
+ } | null;
13
+ };
14
+ export type EstadoAuth = CamposEstadoAuth;
15
+ export declare const estadoAuth: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoAuth>>;
16
+ export declare const useEstadoAuth: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoAuth>>;
@@ -0,0 +1,2 @@
1
+ export * from './AuthLayout';
2
+ export * from './estado';
@@ -0,0 +1,23 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { StoreApi, UseBoundStore } from 'zustand';
3
+ export type EstructuraStory = {
4
+ story: string;
5
+ flex?: boolean;
6
+ toolbar?: boolean;
7
+ imports?: {
8
+ lib?: string[];
9
+ mui?: string[];
10
+ };
11
+ botones?: {
12
+ nombre: string;
13
+ onClick: () => void;
14
+ }[];
15
+ props?: {
16
+ nombre: string;
17
+ fun: unknown;
18
+ }[];
19
+ };
20
+ export type StorySiblingDecoratorProps = PropsWithChildren<EstructuraStory & {
21
+ estado: UseBoundStore<StoreApi<unknown>>;
22
+ }>;
23
+ export declare const StorySiblingDecorator: FC<StorySiblingDecoratorProps>;
@@ -0,0 +1 @@
1
+ export * from './StorySibling';
@@ -0,0 +1,7 @@
1
+ import { FConstruirMenuProps, TMenuDrawer } from '../../tipos';
2
+ import { FC } from 'react';
3
+ export type DrawerProps = {
4
+ menus: TMenuDrawer[];
5
+ onConstruirMenuProps?: FConstruirMenuProps;
6
+ };
7
+ export declare const Drawer: FC<DrawerProps>;
@@ -0,0 +1 @@
1
+ export declare const DrawerMargin: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { FConstruirMenuProps, TMenuDrawer, TMenuProps } from '../../tipos';
2
+ import { FC } from 'react';
3
+ export type MenuItemDrawerProps = Omit<TMenuProps, 'ocultar'> & {
4
+ menu: TMenuDrawer;
5
+ separar?: boolean;
6
+ contruirSubMenuProps?: FConstruirMenuProps;
7
+ };
8
+ export declare const MenuItemDrawer: FC<MenuItemDrawerProps>;
@@ -0,0 +1,6 @@
1
+ import { TMenuProps, TSubMenuDrawer } from '../../tipos';
2
+ import { FC } from 'react';
3
+ export type SubMenuItemDrawerProps = Omit<TMenuProps, 'ocultar'> & {
4
+ subMenu: TSubMenuDrawer;
5
+ };
6
+ export declare const SubMenuItemDrawer: FC<SubMenuItemDrawerProps>;
@@ -0,0 +1,4 @@
1
+ export * from './Drawer';
2
+ export * from './DrawerMargin';
3
+ export * from './MenuItem';
4
+ export * from './SubMenuItem';
@@ -0,0 +1,5 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { DrawerProps } from '../Drawer';
3
+ import { ToolbarProps } from '../Toolbar';
4
+ export type LayoutProps = PropsWithChildren<DrawerProps & Omit<ToolbarProps, 'menus' | 'botonDrawer'> & {}>;
5
+ export declare const Layout: FC<LayoutProps>;
@@ -0,0 +1 @@
1
+ export * from './Layout';
@@ -0,0 +1,7 @@
1
+ import { TAccionToolbar } from '../../../tipos';
2
+ import { FC } from 'react';
3
+ export type AvatarToolbarProps = {
4
+ onCerrarSesion?: () => void;
5
+ acciones?: TAccionToolbar[];
6
+ };
7
+ export declare const AvatarToolbar: FC<AvatarToolbarProps>;
@@ -0,0 +1,7 @@
1
+ import { TAccionToolbar } from '../../../tipos';
2
+ import { FC } from 'react';
3
+ export type DatosSesionToolbarProps = {
4
+ acciones?: TAccionToolbar[];
5
+ onCerrarSesion?: () => void;
6
+ };
7
+ export declare const DatosSesionToolbar: FC<DatosSesionToolbarProps>;
@@ -0,0 +1 @@
1
+ export declare const SelectorTerminalToolbar: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './Avatar';
2
+ export * from './DatosSesion';
3
+ export * from './SelectorTerminal';
@@ -0,0 +1,9 @@
1
+ import { TAccionToolbar } from '../../tipos';
2
+ import { FC, ReactNode } from 'react';
3
+ export type ToolbarProps = {
4
+ nombreApp?: ReactNode;
5
+ botonDrawer?: boolean;
6
+ acciones?: TAccionToolbar[];
7
+ onCerrarSesion?: () => void;
8
+ };
9
+ export declare const Toolbar: FC<ToolbarProps>;
@@ -0,0 +1,2 @@
1
+ export * from './DatosSesion';
2
+ export * from './Toolbar';
@@ -0,0 +1,4 @@
1
+ export * from './Assets';
2
+ export * from './Decorators';
3
+ export * from './Drawer';
4
+ export * from './Toolbar';
@@ -0,0 +1,20 @@
1
+ export declare const colores: {
2
+ primary: string;
3
+ secondary: string;
4
+ coordiBlue: string;
5
+ coordiBlue2: string;
6
+ coordiRed: string;
7
+ green: string;
8
+ orange: string;
9
+ yellow: string;
10
+ black87: string;
11
+ black60: string;
12
+ black38: string;
13
+ black12: string;
14
+ black5: string;
15
+ black54: string;
16
+ gray3: string;
17
+ gray2: string;
18
+ gray1: string;
19
+ whiteBackdrop: string;
20
+ };
@@ -0,0 +1 @@
1
+ export declare const DRAWER_WIDTH = 256;
@@ -0,0 +1,3 @@
1
+ export * from './colores';
2
+ export * from './drawer';
3
+ export * from './tema';
@@ -0,0 +1,2 @@
1
+ import { Components, Theme } from '@mui/material';
2
+ export declare const components: Components<Omit<Theme, 'components'>>;
@@ -0,0 +1 @@
1
+ export * from './tema';
@@ -0,0 +1,76 @@
1
+ import { PaletteColor, PaletteColorOptions, PaletteOptions } from '@mui/material';
2
+ declare module '@mui/material/styles' {
3
+ interface Palette {
4
+ coordiBlue: PaletteColor;
5
+ coordiBlue2: PaletteColor;
6
+ coordiRed: PaletteColor;
7
+ green: PaletteColor;
8
+ orange: PaletteColor;
9
+ yellow: PaletteColor;
10
+ black87: PaletteColor;
11
+ black60: PaletteColor;
12
+ black38: PaletteColor;
13
+ black12: PaletteColor;
14
+ black5: PaletteColor;
15
+ black54: PaletteColor;
16
+ gray3: PaletteColor;
17
+ gray2: PaletteColor;
18
+ gray1: PaletteColor;
19
+ }
20
+ interface PaletteOptions {
21
+ coordiBlue?: PaletteColorOptions;
22
+ coordiBlue2?: PaletteColorOptions;
23
+ coordiRed?: PaletteColorOptions;
24
+ green?: PaletteColorOptions;
25
+ orange?: PaletteColorOptions;
26
+ yellow?: PaletteColorOptions;
27
+ black87?: PaletteColorOptions;
28
+ black60?: PaletteColorOptions;
29
+ black38?: PaletteColorOptions;
30
+ black12?: PaletteColorOptions;
31
+ black5?: PaletteColorOptions;
32
+ black54?: PaletteColorOptions;
33
+ gray3?: PaletteColorOptions;
34
+ gray2?: PaletteColorOptions;
35
+ gray1?: PaletteColorOptions;
36
+ }
37
+ }
38
+ declare module '@mui/material/Button' {
39
+ interface ButtonPropsColorOverrides {
40
+ coordiBlue: true;
41
+ coordiBlue2: true;
42
+ coordiRed: true;
43
+ green: true;
44
+ orange: true;
45
+ yellow: true;
46
+ black87: true;
47
+ black60: true;
48
+ black38: true;
49
+ black12: true;
50
+ black5: true;
51
+ black54: true;
52
+ gray3: true;
53
+ gray2: true;
54
+ gray1: true;
55
+ }
56
+ }
57
+ declare module '@mui/material/IconButton' {
58
+ interface IconButtonPropsColorOverrides {
59
+ coordiBlue: true;
60
+ coordiBlue2: true;
61
+ coordiRed: true;
62
+ green: true;
63
+ orange: true;
64
+ yellow: true;
65
+ black87: true;
66
+ black60: true;
67
+ black38: true;
68
+ black12: true;
69
+ black5: true;
70
+ black54: true;
71
+ gray3: true;
72
+ gray2: true;
73
+ gray1: true;
74
+ }
75
+ }
76
+ export declare const palette: PaletteOptions;
@@ -0,0 +1 @@
1
+ export declare let tema: import('@mui/material').Theme;
@@ -0,0 +1,8 @@
1
+ export type CamposEstadoDrawer = {
2
+ abierto?: boolean;
3
+ cargando?: boolean;
4
+ toolbar?: boolean;
5
+ };
6
+ export type EstadoDrawer = CamposEstadoDrawer;
7
+ export declare const estadoDrawer: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoDrawer>>;
8
+ export declare const useEstadoDrawer: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoDrawer>>;
@@ -0,0 +1,2 @@
1
+ export * from './drawer';
2
+ export * from './toolbar';
@@ -0,0 +1,20 @@
1
+ import { TTerminalToolbar, TUsuarioToolbar } from '../tipos';
2
+ export type CargandoEstadoToolbar = {
3
+ terminales?: boolean;
4
+ nombreApp?: boolean;
5
+ avatar?: boolean;
6
+ nombreUsuario?: boolean;
7
+ apps?: boolean;
8
+ };
9
+ export type CamposEstadoToolbar = {
10
+ terminales: TTerminalToolbar[];
11
+ terminal?: number;
12
+ cargando?: CargandoEstadoToolbar;
13
+ botonDrawer?: boolean;
14
+ usuario?: TUsuarioToolbar;
15
+ setTerminal: (terminal?: number) => void;
16
+ setCargando: (componente: keyof CargandoEstadoToolbar, cargando: boolean) => void;
17
+ };
18
+ export type EstadoToolbar = CamposEstadoToolbar;
19
+ export declare const estadoToolbar: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoToolbar>>;
20
+ export declare const useEstadoToolbar: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoToolbar>>;
@@ -0,0 +1,7 @@
1
+ {
2
+ "imports": {
3
+ "react": "https://esm.sh/react@19.1.0&dev",
4
+ "react-dom": "https://esm.sh/react-dom@19.1.0&dev",
5
+ "@cm-sigoo-temp/ui": "https://cm-sigoo-temp-ui-dev.firebaseapp.com/lib/cm-sigoo-temp-ui.js"
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ export * from './api';
2
+ export * from './auth';
3
+ export * from './components';
4
+ export * from './constantes';
5
+ export * from './estado';
6
+ export * from './tipos';
7
+ export * from './utils';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { DrawerProps } from '../components';
2
+ import { FC } from 'react';
3
+ export declare const DrawerExample: FC<DrawerProps>;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('../components').DrawerProps>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Drawer: Story;
13
+ export declare const Contruir_Menu_Props: Story;
@@ -0,0 +1,12 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: () => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const DrawerMargin: Story;
@@ -0,0 +1,12 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<import('../components').ToolbarProps>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Toolbar: Story;
@@ -0,0 +1,39 @@
1
+ export type TTerminalPermisos = {
2
+ id: string;
3
+ abreviatura: string;
4
+ };
5
+ export type TAccionSubMenuAplicacionPermisos = {
6
+ id: string;
7
+ nombre: string;
8
+ };
9
+ export type TSubMenuAplicacionPermisos = {
10
+ id: string;
11
+ nombre: string;
12
+ acciones?: TAccionSubMenuAplicacionPermisos[];
13
+ };
14
+ export type TMenuAplicacionPermisos = {
15
+ id: string;
16
+ nombre: string;
17
+ submenu?: TSubMenuAplicacionPermisos[];
18
+ };
19
+ export type TAplicacionPermisos = {
20
+ id: string;
21
+ nombre: string;
22
+ menus?: TMenuAplicacionPermisos[];
23
+ };
24
+ export type TPermiso = {
25
+ aplicaciones: TAplicacionPermisos[];
26
+ };
27
+ export type TPermisos = {
28
+ usuario: string;
29
+ tipo: string;
30
+ idplataforma: string;
31
+ lastuser: string;
32
+ terminales: TTerminalPermisos[];
33
+ permisos: TPermiso;
34
+ };
35
+ export type TPermisosResponse = {
36
+ isError?: boolean;
37
+ response?: TPermisos[];
38
+ error_stack?: string;
39
+ };
@@ -0,0 +1,11 @@
1
+ export type TTerminal = {
2
+ codigo_terminal: number;
3
+ nombre: string;
4
+ abreviado: string | null;
5
+ nombre_departamento: string | null;
6
+ };
7
+ export type TResponseTerminales = {
8
+ isError: false;
9
+ status: 'success';
10
+ data: TTerminal[];
11
+ };
@@ -0,0 +1,38 @@
1
+ export interface TResustaUsuarios {
2
+ isError: boolean;
3
+ data: TUsuario;
4
+ timestamp: string;
5
+ id: string;
6
+ }
7
+ export interface TUsuario {
8
+ id: string;
9
+ createdTimestamp: number;
10
+ username: string;
11
+ enabled: boolean;
12
+ totp: boolean;
13
+ emailVerified: boolean;
14
+ firstName: string;
15
+ lastName: string;
16
+ email: string;
17
+ attributes: Attributes;
18
+ disableableCredentialTypes: [];
19
+ requiredActions: [];
20
+ notBefore: number;
21
+ access: Access;
22
+ }
23
+ export interface Attributes {
24
+ codigo_cm: string[];
25
+ telefono_celular: string[];
26
+ compañia: string[];
27
+ cedula: string[];
28
+ terminal: string[];
29
+ cargo: string[];
30
+ codigo_ciudad: string[];
31
+ }
32
+ export interface Access {
33
+ manageGroupMembership: boolean;
34
+ view: boolean;
35
+ mapRoles: boolean;
36
+ impersonate: boolean;
37
+ manage: boolean;
38
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Permisos';
2
+ export * from './Terminales';
@@ -0,0 +1,25 @@
1
+ import { TMenuAplicacionPermisos } from '../Api';
2
+ import { TMenuProps } from '../Drawer';
3
+ export type TUsuarioKeycloak = Partial<{
4
+ acr: string;
5
+ at_hash: string;
6
+ aud: string;
7
+ auth_time: number;
8
+ azp: string;
9
+ email: string;
10
+ email_verified: boolean;
11
+ exp: number;
12
+ family_name: string;
13
+ given_name: string;
14
+ iat: number;
15
+ iss: string;
16
+ jti: string;
17
+ name: string;
18
+ nonce: string;
19
+ preferred_username: string;
20
+ session_state: string;
21
+ sid: string;
22
+ sub: string;
23
+ typ: string;
24
+ }>;
25
+ export type FConstruirMenuKeycloakProps = (permisos: TMenuAplicacionPermisos[], idMenu: string, idSubMenu?: string) => TMenuProps;
@@ -0,0 +1,58 @@
1
+ import { TMenuAplicacionPermisos } from '../Api';
2
+ import { TMenuProps } from '../Drawer';
3
+ export type TUsuarioOpenID = Partial<{
4
+ iss: string;
5
+ azp: string;
6
+ aud: string;
7
+ sub: string;
8
+ hd: string;
9
+ email: string;
10
+ email_verified: boolean;
11
+ at_hash: string;
12
+ name: string;
13
+ picture: string;
14
+ given_name: string;
15
+ family_name: string;
16
+ iat: number;
17
+ exp: number;
18
+ }>;
19
+ export type TAttributesDataSesionOpenID = Partial<{
20
+ terminal: string[];
21
+ codigo_cm: string[];
22
+ telefono_celular: string[];
23
+ codigo_ciudad: string[];
24
+ }>;
25
+ export type TAccessDataSesionOpenID = Partial<{
26
+ manageGroupMembership: boolean;
27
+ view: boolean;
28
+ mapRoles: boolean;
29
+ impersonate: boolean;
30
+ manage: boolean;
31
+ }>;
32
+ export type TDataSesionOpenID = Partial<{
33
+ id: string;
34
+ createdTimestamp: number;
35
+ username: string;
36
+ enabled: boolean;
37
+ totp: boolean;
38
+ emailVerified: boolean;
39
+ firstName: string;
40
+ lastName: string;
41
+ email: string;
42
+ attributes: TAttributesDataSesionOpenID;
43
+ disableableCredentialTypes: unknown[];
44
+ requiredActions: unknown[];
45
+ notBefore: number;
46
+ access: TAccessDataSesionOpenID;
47
+ }>;
48
+ export type TSesionOpenID = {
49
+ isError: boolean;
50
+ data?: TDataSesionOpenID;
51
+ timestamp?: string;
52
+ id?: string;
53
+ accessToken?: string;
54
+ idToken?: string;
55
+ iat?: number;
56
+ cerrar_sesion?: boolean;
57
+ };
58
+ export type FConstruirMenuOpenIDProps = (permisos: TMenuAplicacionPermisos[], idMenu: string, idSubMenu?: string) => TMenuProps;
@@ -0,0 +1,2 @@
1
+ export * from './Keycloak';
2
+ export * from './OpenID';
@@ -0,0 +1,26 @@
1
+ import { ListItemButtonProps, SvgIconTypeMap } from '@mui/material';
2
+ import { OverridableComponent } from '@mui/material/OverridableComponent';
3
+ export type TSubMenuDrawer = {
4
+ id: string;
5
+ nombre: string;
6
+ icono: string | (OverridableComponent<SvgIconTypeMap<object, 'svg'>> & {
7
+ muiName: string;
8
+ });
9
+ };
10
+ export type TMenuDrawer = {
11
+ id: string;
12
+ nombre: string;
13
+ icono?: string | (OverridableComponent<SvgIconTypeMap<object, 'svg'>> & {
14
+ muiName: string;
15
+ });
16
+ subMenus?: TSubMenuDrawer[];
17
+ };
18
+ export type TMenuProps = {
19
+ key?: string;
20
+ ocultar?: boolean;
21
+ seleccionado?: boolean;
22
+ slotProps?: {
23
+ ListItemButton?: ListItemButtonProps;
24
+ };
25
+ };
26
+ export type FConstruirMenuProps = (idMenu: string, idSubMenu?: string) => TMenuProps;