@cm-sigoo-temp/ui 0.2.18 → 0.2.20
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/lib/api/permisos.d.ts +1 -1
- package/dist/lib/auth/auth.d.ts +3 -0
- package/dist/lib/auth/index.d.ts +2 -6
- package/dist/lib/auth/keycloak.d.ts +2 -0
- package/dist/lib/cm-sigoo-temp-ui.css +1 -0
- package/dist/lib/cm-sigoo-temp-ui.js +8385 -5881
- package/dist/lib/cm-sigoo-temp-ui.js.map +1 -1
- package/dist/lib/components/Auth/AuthLayout.d.ts +2 -1
- package/dist/lib/components/Auth/Keycloak/Keycloak.d.ts +4 -7
- package/dist/lib/components/Auth/Keycloak/index.d.ts +1 -1
- package/dist/lib/components/Auth/OpenID/OpenID.d.ts +3 -13
- package/dist/lib/components/Auth/estado.d.ts +0 -1
- package/dist/lib/components/Auth/index.d.ts +2 -0
- package/dist/lib/components/Auth/tipos.d.ts +14 -0
- package/dist/lib/components/Auth/utils.d.ts +6 -0
- package/dist/lib/components/Drawer/Drawer.d.ts +3 -3
- package/dist/lib/components/Drawer/MenuItem.d.ts +4 -4
- package/dist/lib/components/Drawer/SubMenuItem.d.ts +5 -3
- package/dist/lib/components/Icono/Icono.d.ts +9 -0
- package/dist/lib/components/Icono/index.d.ts +1 -0
- package/dist/lib/components/Iconos/Dresser.d.ts +3 -0
- package/dist/lib/components/Iconos/Load.d.ts +3 -0
- package/dist/lib/components/Iconos/Unload.d.ts +3 -0
- package/dist/lib/components/Iconos/index.d.ts +3 -0
- package/dist/lib/components/Layout/Layout.d.ts +1 -1
- package/dist/lib/components/Toolbar/Apps/App.d.ts +3 -0
- package/dist/lib/components/Toolbar/Apps/Card.d.ts +3 -0
- package/dist/lib/components/Toolbar/Apps/index.d.ts +2 -0
- package/dist/lib/components/Toolbar/Toolbar.d.ts +3 -9
- package/dist/lib/components/Toolbar/constantes.d.ts +11 -0
- package/dist/lib/components/Toolbar/estado.d.ts +4 -0
- package/dist/lib/components/Toolbar/index.d.ts +4 -0
- package/dist/lib/components/Toolbar/tipos.d.ts +43 -0
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/estado/cargando.d.ts +14 -0
- package/dist/lib/estado/drawer.d.ts +7 -0
- package/dist/lib/estado/index.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useTerminal.d.ts +5 -0
- package/dist/lib/main.d.ts +0 -1
- package/dist/lib/tipos/Api/Permisos.d.ts +1 -1
- package/dist/lib/tipos/Auth/Keycloak.d.ts +2 -3
- package/dist/lib/tipos/Auth/OpenID.d.ts +0 -3
- package/dist/lib/tipos/Drawer.d.ts +3 -10
- package/dist/lib/tipos/index.d.ts +0 -1
- package/dist/plugins/app.plugin.js +1 -1
- package/dist/plugins/app.plugin.js.map +1 -1
- package/package.json +43 -42
- package/dist/lib/estado/toolbar.d.ts +0 -20
- package/dist/lib/stories/Drawer.stories.d.ts +0 -13
- package/dist/lib/stories/DrawerMargin.stories.d.ts +0 -12
- package/dist/lib/stories/Toolbar.stories.d.ts +0 -12
- package/dist/lib/tipos/Layout.d.ts +0 -8
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FC, PropsWithChildren } from 'react';
|
|
1
|
+
import { TMenuDrawer } from '../../../tipos';
|
|
2
|
+
import { ElementType, PropsWithChildren } from 'react';
|
|
4
3
|
export type AuthKeycloakProps = PropsWithChildren<{
|
|
5
4
|
idApp: string;
|
|
6
|
-
keycloakConfig: KeycloakConfig;
|
|
7
|
-
silentCheckSsoRedirectUri: string;
|
|
8
5
|
nombreApp?: string;
|
|
9
6
|
menus: TMenuDrawer[];
|
|
10
|
-
|
|
7
|
+
LinkComponent?: ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
11
8
|
}>;
|
|
12
|
-
export declare
|
|
9
|
+
export declare function AuthKeycloak({ children, idApp, nombreApp: nombreAppProps, menus, LinkComponent, }: AuthKeycloakProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Keycloak';
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|
-
}>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { AuthLayoutProps } from '../tipos';
|
|
3
|
+
export type AuthOpenIDProps = AuthLayoutProps;
|
|
14
4
|
export declare const AuthOpenID: FC<AuthOpenIDProps>;
|
|
@@ -2,7 +2,6 @@ import { TAplicacionPermisos, TSesionOpenID, TUsuarioKeycloak, TUsuarioOpenID }
|
|
|
2
2
|
import { JWTPayload } from 'jose';
|
|
3
3
|
export type CamposEstadoAuth = {
|
|
4
4
|
permisos?: TAplicacionPermisos;
|
|
5
|
-
aplicaciones?: TAplicacionPermisos[];
|
|
6
5
|
openID: {
|
|
7
6
|
sesion: TSesionOpenID & JWTPayload;
|
|
8
7
|
usuario?: (TUsuarioOpenID & JWTPayload) | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TMenuDrawer, TSubMenuDrawer } from '../../tipos';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
export type TSubMenuAuthLayout = TSubMenuDrawer & {
|
|
4
|
+
permiso: string;
|
|
5
|
+
};
|
|
6
|
+
export type TMenuAuthLayout = TMenuDrawer & {
|
|
7
|
+
permiso: string;
|
|
8
|
+
subMenus?: TSubMenuAuthLayout[];
|
|
9
|
+
};
|
|
10
|
+
export type AuthLayoutProps = PropsWithChildren<{
|
|
11
|
+
idApp: string;
|
|
12
|
+
nombreApp?: string;
|
|
13
|
+
menus: TMenuAuthLayout[];
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TAplicacionPermisos, TTerminal, TTerminalPermisos } from '../../tipos';
|
|
2
|
+
import { EstadoToolbar } from '../Toolbar';
|
|
3
|
+
export declare const obtenerAppsToolbar: (permisos: TAplicacionPermisos[]) => (import('..').AppToolbarProps & {
|
|
4
|
+
id: string;
|
|
5
|
+
})[];
|
|
6
|
+
export declare const convertirTerminalesToolbar: (permisos: TTerminalPermisos[], terminales: TTerminal[]) => EstadoToolbar["terminales"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FC } from 'react';
|
|
1
|
+
import { TMenuDrawer } from '../../tipos';
|
|
2
|
+
import { ElementType, FC } from 'react';
|
|
3
3
|
export type DrawerProps = {
|
|
4
4
|
menus: TMenuDrawer[];
|
|
5
|
-
|
|
5
|
+
LinkComponent?: ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
6
6
|
};
|
|
7
7
|
export declare const Drawer: FC<DrawerProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export type MenuItemDrawerProps =
|
|
1
|
+
import { TMenuDrawer } from '../../tipos';
|
|
2
|
+
import { ElementType, FC } from 'react';
|
|
3
|
+
export type MenuItemDrawerProps = {
|
|
4
4
|
menu: TMenuDrawer;
|
|
5
5
|
separar?: boolean;
|
|
6
|
-
|
|
6
|
+
LinkComponent?: ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
7
7
|
};
|
|
8
8
|
export declare const MenuItemDrawer: FC<MenuItemDrawerProps>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export type SubMenuItemDrawerProps =
|
|
1
|
+
import { TSubMenuDrawer } from '../../tipos';
|
|
2
|
+
import { ElementType, FC } from 'react';
|
|
3
|
+
export type SubMenuItemDrawerProps = {
|
|
4
|
+
menu: string;
|
|
4
5
|
subMenu: TSubMenuDrawer;
|
|
6
|
+
LinkComponent?: ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
5
7
|
};
|
|
6
8
|
export declare const SubMenuItemDrawer: FC<SubMenuItemDrawerProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconProps, IconTypeMap, SvgIconTypeMap } from '@mui/material';
|
|
2
|
+
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
3
|
+
export type PropIcono = string | (OverridableComponent<SvgIconTypeMap<object, 'svg'>> & {
|
|
4
|
+
muiName: string;
|
|
5
|
+
});
|
|
6
|
+
export type IconoProps<RootComponent extends React.ElementType = IconTypeMap['defaultComponent'], AdditionalProps = unknown> = Omit<IconProps<RootComponent, AdditionalProps>, 'children'> & {
|
|
7
|
+
children?: PropIcono;
|
|
8
|
+
};
|
|
9
|
+
export declare const Icono: <RootComponent extends React.ElementType = "span", AdditionalProps = unknown>({ children, ...props }: IconoProps<RootComponent, AdditionalProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icono';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { DrawerProps } from '../Drawer';
|
|
3
3
|
import { ToolbarProps } from '../Toolbar';
|
|
4
|
-
export type LayoutProps = PropsWithChildren<DrawerProps &
|
|
4
|
+
export type LayoutProps = PropsWithChildren<DrawerProps & ToolbarProps & {}>;
|
|
5
5
|
export declare const Layout: FC<LayoutProps>;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
nombreApp?: ReactNode;
|
|
5
|
-
botonDrawer?: boolean;
|
|
6
|
-
acciones?: TAccionToolbar[];
|
|
7
|
-
onCerrarSesion?: () => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const Toolbar: FC<ToolbarProps>;
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { ToolbarProps } from './tipos';
|
|
3
|
+
export declare const Toolbar: <MenuItemComponent extends ElementType = "li">({ apps, nombreApp, acciones, onCerrarSesion, idApp, iconoApp, }: ToolbarProps<MenuItemComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CardAppsToolbarProps, EstadoToolbar } from './tipos';
|
|
2
|
+
export declare const keysCargandoToolbar: {
|
|
3
|
+
readonly general: symbol;
|
|
4
|
+
readonly terminales: symbol;
|
|
5
|
+
readonly nombreUsuario: symbol;
|
|
6
|
+
readonly avatar: symbol;
|
|
7
|
+
readonly nombreApp: symbol;
|
|
8
|
+
readonly apps: symbol;
|
|
9
|
+
};
|
|
10
|
+
export declare const estadoInicialToolbar: EstadoToolbar;
|
|
11
|
+
export declare const appsToolbar: CardAppsToolbarProps['apps'];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
2
|
+
import { AccionesEstadoToolbar, EstadoToolbar } from './tipos';
|
|
3
|
+
export declare const estadoToolbar: UseBoundStore<StoreApi<EstadoToolbar & AccionesEstadoToolbar>>;
|
|
4
|
+
export declare const useEstadoToolbar: UseBoundStore<StoreApi<EstadoToolbar>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MenuItemProps } from '@mui/material';
|
|
2
|
+
import { ElementType, ReactNode } from 'react';
|
|
3
|
+
import { PropIcono } from '../Icono';
|
|
4
|
+
export type ToolbarProps<MenuItemComponent extends ElementType = 'li'> = {
|
|
5
|
+
idApp?: string;
|
|
6
|
+
iconoApp?: PropIcono;
|
|
7
|
+
apps?: CardAppsToolbarProps['apps'];
|
|
8
|
+
nombreApp?: ReactNode;
|
|
9
|
+
acciones?: AccionToolbar<MenuItemComponent>[];
|
|
10
|
+
onCerrarSesion?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type AccionToolbar<MenuItemComponent extends ElementType = 'li'> = {
|
|
13
|
+
nombre: string;
|
|
14
|
+
icono?: PropIcono;
|
|
15
|
+
slotProps?: {
|
|
16
|
+
MenuItem: MenuItemProps<MenuItemComponent>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type EstadoToolbar = {
|
|
20
|
+
mostrarBotonDrawer: boolean;
|
|
21
|
+
abrirApps: boolean;
|
|
22
|
+
terminales: {
|
|
23
|
+
codigo: number;
|
|
24
|
+
nombre?: string;
|
|
25
|
+
abreviado?: string;
|
|
26
|
+
}[];
|
|
27
|
+
terminal?: number;
|
|
28
|
+
avatar?: string;
|
|
29
|
+
nombre?: string;
|
|
30
|
+
};
|
|
31
|
+
export type AccionesEstadoToolbar = {
|
|
32
|
+
setTerminal: (codigo: number) => void;
|
|
33
|
+
};
|
|
34
|
+
export type CardAppsToolbarProps = {
|
|
35
|
+
apps: (AppToolbarProps & {
|
|
36
|
+
id: string;
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
export type AppToolbarProps = {
|
|
40
|
+
link: URL;
|
|
41
|
+
nombre: string;
|
|
42
|
+
icono?: PropIcono;
|
|
43
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type StoreCargando = {
|
|
2
|
+
toolbar: (symbol | string)[];
|
|
3
|
+
cargando: (symbol | string)[];
|
|
4
|
+
};
|
|
5
|
+
export type AccionesStoreCargando = {
|
|
6
|
+
set: (key: symbol | string, valor: boolean, toolbar?: boolean) => void;
|
|
7
|
+
toggle: (key: symbol | string, toolbar?: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const storeCargando: import('zustand').UseBoundStore<import('zustand').StoreApi<StoreCargando & AccionesStoreCargando>>;
|
|
10
|
+
export declare const useStoreCargando: import('zustand').UseBoundStore<import('zustand').StoreApi<StoreCargando & AccionesStoreCargando>>;
|
|
11
|
+
export declare const useCargando: (key: string | symbol, toolbar?: boolean) => readonly [boolean, {
|
|
12
|
+
readonly setCargando: (valor: boolean) => void;
|
|
13
|
+
readonly toogleCargando: () => void;
|
|
14
|
+
}];
|
|
@@ -2,7 +2,14 @@ export type CamposEstadoDrawer = {
|
|
|
2
2
|
abierto?: boolean;
|
|
3
3
|
cargando?: boolean;
|
|
4
4
|
toolbar?: boolean;
|
|
5
|
+
inhabilitado: boolean;
|
|
6
|
+
seleccion?: {
|
|
7
|
+
menu: string;
|
|
8
|
+
submenu?: string;
|
|
9
|
+
};
|
|
5
10
|
};
|
|
6
11
|
export type EstadoDrawer = CamposEstadoDrawer;
|
|
7
12
|
export declare const estadoDrawer: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoDrawer>>;
|
|
8
13
|
export declare const useEstadoDrawer: import('zustand').UseBoundStore<import('zustand').StoreApi<CamposEstadoDrawer>>;
|
|
14
|
+
export declare const setDrawerHabilitado: (inhabilitado: boolean | ((estadoActual: boolean) => boolean)) => void;
|
|
15
|
+
export declare const setMenuSeleccionado: (menu: string, submenu?: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useTerminal';
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -14,7 +14,7 @@ export type TSubMenuAplicacionPermisos = {
|
|
|
14
14
|
export type TMenuAplicacionPermisos = {
|
|
15
15
|
id: string;
|
|
16
16
|
nombre: string;
|
|
17
|
-
|
|
17
|
+
sub_menu?: TSubMenuAplicacionPermisos[];
|
|
18
18
|
};
|
|
19
19
|
export type TAplicacionPermisos = {
|
|
20
20
|
id: string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { TMenuAplicacionPermisos } from '../Api';
|
|
2
|
-
import { TMenuProps } from '../Drawer';
|
|
3
1
|
export type TUsuarioKeycloak = Partial<{
|
|
4
2
|
acr: string;
|
|
5
3
|
at_hash: string;
|
|
6
4
|
aud: string;
|
|
7
5
|
auth_time: number;
|
|
8
6
|
azp: string;
|
|
7
|
+
codigo_empleado: string;
|
|
9
8
|
email: string;
|
|
10
9
|
email_verified: boolean;
|
|
11
10
|
exp: number;
|
|
@@ -20,6 +19,6 @@ export type TUsuarioKeycloak = Partial<{
|
|
|
20
19
|
session_state: string;
|
|
21
20
|
sid: string;
|
|
22
21
|
sub: string;
|
|
22
|
+
terminal: number;
|
|
23
23
|
typ: string;
|
|
24
24
|
}>;
|
|
25
|
-
export type FConstruirMenuKeycloakProps = (permisos: TMenuAplicacionPermisos[], idMenu: string, idSubMenu?: string) => TMenuProps;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { TMenuAplicacionPermisos } from '../Api';
|
|
2
|
-
import { TMenuProps } from '../Drawer';
|
|
3
1
|
export type TUsuarioOpenID = Partial<{
|
|
4
2
|
iss: string;
|
|
5
3
|
azp: string;
|
|
@@ -55,4 +53,3 @@ export type TSesionOpenID = {
|
|
|
55
53
|
iat?: number;
|
|
56
54
|
cerrar_sesion?: boolean;
|
|
57
55
|
};
|
|
58
|
-
export type FConstruirMenuOpenIDProps = (permisos: TMenuAplicacionPermisos[], idMenu: string, idSubMenu?: string) => TMenuProps;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvgIconTypeMap } from '@mui/material';
|
|
2
2
|
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
3
3
|
export type TSubMenuDrawer = {
|
|
4
4
|
id: string;
|
|
5
5
|
nombre: string;
|
|
6
|
+
to?: string;
|
|
6
7
|
icono: string | (OverridableComponent<SvgIconTypeMap<object, 'svg'>> & {
|
|
7
8
|
muiName: string;
|
|
8
9
|
});
|
|
@@ -10,17 +11,9 @@ export type TSubMenuDrawer = {
|
|
|
10
11
|
export type TMenuDrawer = {
|
|
11
12
|
id: string;
|
|
12
13
|
nombre: string;
|
|
14
|
+
to?: string;
|
|
13
15
|
icono?: string | (OverridableComponent<SvgIconTypeMap<object, 'svg'>> & {
|
|
14
16
|
muiName: string;
|
|
15
17
|
});
|
|
16
18
|
subMenus?: TSubMenuDrawer[];
|
|
17
19
|
};
|
|
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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createWriteStream as
|
|
1
|
+
import{createWriteStream as y,existsSync as p,readFileSync as O}from"node:fs";import{copyFile as b,mkdir as d,stat as u}from"node:fs/promises";import{get as x}from"node:https";import{tmpdir as w}from"node:os";import{dirname as U,join as f,resolve as m}from"node:path";import{fileURLToPath as I}from"node:url";var M=I(import.meta.url),P=U(M),R=w(),C="cm-sigoo-temp-ui-temp",a=f(R,C),s=f(a,"silent-check-sso.html"),l="/silent-check-sso.html",H=new URL(l,"https://cm-sigoo-temp-ui-dev.firebaseapp.com/"),n=new Date;n.setHours(0);n.setMinutes(0);n.setSeconds(0);n.setMilliseconds(0);n.setDate(n.getDate()-1);var c=async()=>{let t=y(s);await new Promise((e,o)=>x(H,r=>{r.pipe(t),t.on("finish",()=>e(null)),t.on("error",i=>o(i))}))},g=async()=>{p(a)||await d(a),p(s)||await c(),(await u(s)).birthtime<=n&&c();let e=m(P,"../../../../../","dist"),o=m(e,"silent-check-sso.html");await b(s,o)},h=async()=>(p(a)||await d(a),p(s)||await c(),(await u(s)).birthtime<=n&&c(),O(s));var _=t=>async e=>{!t||e||await g()};function S(t){let e=r=>Array.isArray(t.build?.rollupOptions?.output)?{react:"react","react-dom":"react-dom"}:typeof t.build?.rollupOptions?.output?.globals=="function"?t.build.rollupOptions.output.globals(r):{...t.build?.rollupOptions?.output?.globals,react:"react","react-dom":"react-dom"},o=Array.isArray(t.build?.rollupOptions?.output)?[...t.build.rollupOptions.output,{globals:e}]:{...t.build?.rollupOptions?.output,globals:e};return{...t,server:{...t.server,headers:{...t.server?.headers,"Content-Security-Policy":t.server?.headers?Object.keys(t.server.headers).find(r=>r.toLowerCase()==="content-security-policy"):"frame-ancestors 'self' https://cmautenticacion-dev.coordinadora.com"}},build:{...t.build,rollupOptions:{...t.build?.rollupOptions,external:["react","react-dom"],output:o}}}}var T=t=>{t.middlewares.use(async(e,o,r)=>{e.originalUrl===l?(o.setHeader("Content-Type","text/html"),o.writeHead(200),o.write(await h()),o.end()):r()})};var v=(t,e)=>o=>{let r={imports:{react:process.env.URL__IMPORTMAP__REACT,"react-dom":process.env.URL__IMPORTMAP__REACT_DOM,"@cm-sigoo-temp/ui":"https://cm-sigoo-temp-ui-dev.firebaseapp.com//lib/cm-sigoo-temp-ui.js"}},i={tag:"script",attrs:{type:"importmap"},children:JSON.stringify(r),injectTo:"head-prepend"};return{html:o,tags:[{tag:"meta",attrs:{charset:"UTF-8"},injectTo:"head-prepend"},{tag:"meta",attrs:{name:"viewport",content:"width=device-width, initial-scale=1.0"},injectTo:"head-prepend"},{tag:"title",children:t,injectTo:"head-prepend"},{tag:"link",attrs:{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/png",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com//favicon-96x96.png",sizes:"96x96"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/svg+xml",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com//favicon.svg"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"apple-touch-icon",sizes:"180x180",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com//apple-touch-icon.png"},injectTo:"head-prepend"},...e?[i]:[]]}};function Q(t){let{nombre:e}=typeof t=="string"?{nombre:t}:t,o=`Sigoo ${e} - Coordinadora S.A`,r;return{name:"cm-sigoo-temp-ui-app",config:S,configureServer:T,configResolved(i){r=i},transformIndexHtml(...i){return v(o,r.command==="build")(...i)},closeBundle(i){return _(r.command==="build")(i)}}}export{Q as default};
|
|
2
2
|
//# sourceMappingURL=app.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../node/vite/app/closeBundle.ts","../../node/vite/app/config.ts","../../node/vite/app/transformIndexHtml.ts","../../node/vite/app/app.plugin.ts"],"sourcesContent":["import { createWriteStream, existsSync } from 'node:fs';\nimport { copyFile, mkdir, stat } from 'node:fs/promises';\nimport { get } from 'node:https';\nimport { tmpdir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst temp = tmpdir();\nconst tempDir = 'cm-sigoo-temp-ui-temp';\n\nconst rutaTemp = join(temp, tempDir);\nconst rutaSCSso = join(rutaTemp, 'silent-check-sso.html');\n\nconst urlSCSso = new URL(\n '/silent-check-sso.html',\n process.env.URL__CM_SIGOO_TEMP_UI,\n);\n\nconst downloadSCSso = async () => {\n const file = createWriteStream(rutaSCSso);\n await new Promise((resolve, reject) =>\n get(urlSCSso, (response) => {\n response.pipe(file);\n file.on('finish', () => resolve(null));\n file.on('error', (error) => reject(error));\n }),\n );\n};\n\nconst fechaComparacion = new Date();\nfechaComparacion.setHours(0);\nfechaComparacion.setMinutes(0);\nfechaComparacion.setSeconds(0);\nfechaComparacion.setMilliseconds(0);\nfechaComparacion.setDate(fechaComparacion.getDate() - 1);\n\nexport const getCloseBundle = (build: boolean) => async (error?: Error) => {\n if (!build || error) return;\n\n if (!existsSync(rutaTemp)) await mkdir(rutaTemp);\n if (!existsSync(rutaSCSso)) await downloadSCSso();\n\n const tempSCSsoStat = await stat(rutaSCSso);\n if (tempSCSsoStat.birthtime <= fechaComparacion) downloadSCSso();\n\n const rutaDist = resolve(__dirname, '../../../../../', 'dist');\n const rutaDistSCSso = resolve(rutaDist, 'silent-check-sso.html');\n\n await copyFile(rutaSCSso, rutaDistSCSso);\n};\n","import { UserConfig } from 'vite';\n\nexport function config(userConfig: UserConfig) {\n const globals = (name: string) =>\n Array.isArray(userConfig.build?.rollupOptions?.output)\n ? {\n react: 'react',\n 'react-dom': 'react-dom',\n }\n : typeof userConfig.build?.rollupOptions?.output?.globals === 'function'\n ? userConfig.build.rollupOptions.output.globals(name)\n : {\n ...userConfig.build?.rollupOptions?.output?.globals,\n react: 'react',\n 'react-dom': 'react-dom',\n };\n\n const output = Array.isArray(userConfig.build?.rollupOptions?.output)\n ? [...userConfig.build.rollupOptions.output, { globals }]\n : {\n ...userConfig.build?.rollupOptions?.output,\n globals,\n };\n\n return {\n ...userConfig,\n build: {\n ...userConfig.build,\n rollupOptions: {\n ...userConfig.build?.rollupOptions,\n external: ['react', 'react-dom'],\n output,\n },\n },\n } as UserConfig;\n}\n","import { HtmlTagDescriptor, IndexHtmlTransformHook } from 'vite';\n\nexport const getTransformIndexHtml =\n (titulo: string, build: boolean): IndexHtmlTransformHook =>\n (html) => {\n const importmap = {\n imports: {\n react: process.env.URL__IMPORTMAP__REACT,\n 'react-dom': process.env.URL__IMPORTMAP__REACT_DOM,\n '@cm-sigoo-temp/ui': `${process.env.URL__CM_SIGOO_TEMP_UI}/lib/cm-sigoo-temp-ui.js`,\n },\n };\n\n const importmapScriptTag: HtmlTagDescriptor = {\n tag: 'script',\n attrs: {\n type: 'importmap',\n },\n children: JSON.stringify(importmap),\n injectTo: 'head-prepend',\n };\n\n return {\n html,\n tags: [\n {\n tag: 'meta',\n attrs: {\n charset: 'UTF-8',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'meta',\n attrs: {\n name: 'viewport',\n content: 'width=device-width, initial-scale=1.0',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'title',\n children: titulo,\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'stylesheet',\n href: 'https://fonts.googleapis.com/icon?family=Material+Icons',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/png',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon-96x96.png`,\n sizes: '96x96',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/svg+xml',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon.svg`,\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'apple-touch-icon',\n sizes: '180x180',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/apple-touch-icon.png`,\n },\n injectTo: 'head-prepend',\n },\n ...(build ? [importmapScriptTag] : []),\n ],\n };\n };\n","import { Plugin, ResolvedConfig } from 'vite';\nimport { getCloseBundle } from './closeBundle.ts';\nimport { config } from './config.ts';\nimport { getTransformIndexHtml } from './transformIndexHtml.ts';\n\nexport type ViteAppPluginOptions =\n | {\n nombre: string;\n }\n | string;\n\nexport default function (options: ViteAppPluginOptions): Plugin {\n const { nombre } =\n typeof options === 'string' ? { nombre: options } : options;\n\n const titulo = `Sigoo ${nombre} - Coordinadora S.A`;\n\n let resolvedConfig: ResolvedConfig;\n\n return {\n name: 'cm-sigoo-temp-ui-app',\n\n config,\n\n configResolved(endConfig) {\n resolvedConfig = endConfig;\n },\n\n transformIndexHtml(...args) {\n return getTransformIndexHtml(\n titulo,\n resolvedConfig.command === 'build',\n )(...args);\n },\n\n closeBundle(error) {\n return getCloseBundle(resolvedConfig.command === 'build')(error);\n },\n };\n}\n"],"mappings":"AAAA,OAAS,qBAAAA,EAAmB,cAAAC,MAAkB,UAC9C,OAAS,YAAAC,EAAU,SAAAC,EAAO,QAAAC,MAAY,mBACtC,OAAS,OAAAC,MAAW,aACpB,OAAS,UAAAC,MAAc,UACvB,OAAS,WAAAC,EAAS,QAAAC,EAA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AACE,CAAkB,EAAI,CAAC,CACtC,CACF,CACF,ECzEa,SAARC,EAAkBC,EAAuC,CAC9D,GAAM,CAAE,OAAAC,CAAO,EACb,OAAOD,GAAY,SAAW,CAAE,OAAQA,CAAQ,EAAIA,EAEhDE,EAAS,SAASD,CAAM,sBAE1BE,EAEJ,MAAO,CACL,KAAM,uBAEN,OAAAC,EAEA,eAAeC,EAAW,CACxBF,EAAiBE,CACnB,EAEA,sBAAsBC,EAAM,CAC1B,OAAOC,EACLL,EACAC,EAAe,UAAY,OAC7B,EAAE,GAAGG,CAAI,CACX,EAEA,YAAYE,EAAO,CACjB,OAAOC,EAAeN,EAAe,UAAY,OAAO,EAAEK,CAAK,CACjE,CACF,CACF","names":["createWriteStream","existsSync","copyFile","mkdir","stat","get","tmpdir","dirname","join","resolve","fileURLToPath","__filename","__dirname","temp","tempDir","rutaTemp","rutaSCSso","urlSCSso","downloadSCSso","file","reject","response","error","fechaComparacion","getCloseBundle","build","rutaDist","rutaDistSCSso","config","userConfig","globals","name","output","getTransformIndexHtml","titulo","build","html","importmapScriptTag","app_plugin_default","options","nombre","titulo","resolvedConfig","config","endConfig","args","getTransformIndexHtml","error","getCloseBundle"]}
|
|
1
|
+
{"version":3,"sources":["../../node/vite/plugins/app/SCSso.ts","../../node/vite/plugins/app/closeBundle.ts","../../node/vite/plugins/app/config.ts","../../node/vite/plugins/app/configureServer.ts","../../node/vite/plugins/app/transformIndexHtml.ts","../../node/vite/plugins/app/app.plugin.ts"],"sourcesContent":["import { createWriteStream, existsSync, readFileSync } from 'node:fs';\nimport { copyFile, mkdir, stat } from 'node:fs/promises';\nimport { get } from 'node:https';\nimport { tmpdir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst temp = tmpdir();\nconst tempDir = 'cm-sigoo-temp-ui-temp';\n\nconst rutaTemp = join(temp, tempDir);\nexport const rutaSCSso = join(rutaTemp, 'silent-check-sso.html');\n\nexport const pathDotHtml = '/silent-check-sso.html';\nexport const urlSCSso = new URL(pathDotHtml, process.env.URL__CM_SIGOO_TEMP_UI);\n\nconst fechaComparacion = new Date();\nfechaComparacion.setHours(0);\nfechaComparacion.setMinutes(0);\nfechaComparacion.setSeconds(0);\nfechaComparacion.setMilliseconds(0);\nfechaComparacion.setDate(fechaComparacion.getDate() - 1);\n\nexport const downloadToTemp = async () => {\n const file = createWriteStream(rutaSCSso);\n await new Promise((resolve, reject) =>\n get(urlSCSso, (response) => {\n response.pipe(file);\n file.on('finish', () => resolve(null));\n file.on('error', (error) => reject(error));\n }),\n );\n};\n\nexport const copyToTemp = async () => {\n if (!existsSync(rutaTemp)) await mkdir(rutaTemp);\n if (!existsSync(rutaSCSso)) await downloadToTemp();\n\n const tempSCSsoStat = await stat(rutaSCSso);\n if (tempSCSsoStat.birthtime <= fechaComparacion) downloadToTemp();\n\n const rutaDist = resolve(__dirname, '../../../../../', 'dist');\n const rutaDistSCSso = resolve(rutaDist, 'silent-check-sso.html');\n\n await copyFile(rutaSCSso, rutaDistSCSso);\n};\n\nexport const getFile = async () => {\n if (!existsSync(rutaTemp)) await mkdir(rutaTemp);\n if (!existsSync(rutaSCSso)) await downloadToTemp();\n\n const tempSCSsoStat = await stat(rutaSCSso);\n if (tempSCSsoStat.birthtime <= fechaComparacion) downloadToTemp();\n\n return readFileSync(rutaSCSso);\n};\n","import { copyToTemp } from './SCSso.ts';\n\nexport const getCloseBundle = (build: boolean) => async (error?: Error) => {\n if (!build || error) return;\n await copyToTemp();\n};\n","import { UserConfig } from 'vite';\n\nexport function config(userConfig: UserConfig) {\n const globals = (name: string) =>\n Array.isArray(userConfig.build?.rollupOptions?.output)\n ? {\n react: 'react',\n 'react-dom': 'react-dom',\n }\n : typeof userConfig.build?.rollupOptions?.output?.globals === 'function'\n ? userConfig.build.rollupOptions.output.globals(name)\n : {\n ...userConfig.build?.rollupOptions?.output?.globals,\n react: 'react',\n 'react-dom': 'react-dom',\n };\n\n const output = Array.isArray(userConfig.build?.rollupOptions?.output)\n ? [...userConfig.build.rollupOptions.output, { globals }]\n : {\n ...userConfig.build?.rollupOptions?.output,\n globals,\n };\n\n return {\n ...userConfig,\n server: {\n ...userConfig.server,\n headers: {\n ...userConfig.server?.headers,\n 'Content-Security-Policy': userConfig.server?.headers\n ? Object.keys(userConfig.server.headers).find(\n (key) => key.toLowerCase() === 'content-security-policy',\n )\n : \"frame-ancestors 'self' https://cmautenticacion-dev.coordinadora.com\",\n },\n },\n build: {\n ...userConfig.build,\n rollupOptions: {\n ...userConfig.build?.rollupOptions,\n external: ['react', 'react-dom'],\n output,\n },\n },\n } as UserConfig;\n}\n","import { ViteDevServer } from 'vite';\nimport { getFile, pathDotHtml } from './SCSso.ts';\n\nexport const configureServer = (server: ViteDevServer) => {\n server.middlewares.use(async (req, res, next) => {\n if (req.originalUrl === pathDotHtml) {\n res.setHeader('Content-Type', 'text/html');\n res.writeHead(200);\n res.write(await getFile());\n res.end();\n } else next();\n });\n};\n","import { HtmlTagDescriptor, IndexHtmlTransformHook } from 'vite';\n\nexport const getTransformIndexHtml =\n (titulo: string, build: boolean): IndexHtmlTransformHook =>\n (html) => {\n const importmap = {\n imports: {\n react: process.env.URL__IMPORTMAP__REACT,\n 'react-dom': process.env.URL__IMPORTMAP__REACT_DOM,\n '@cm-sigoo-temp/ui': `${process.env.URL__CM_SIGOO_TEMP_UI}/lib/cm-sigoo-temp-ui.js`,\n },\n };\n\n const importmapScriptTag: HtmlTagDescriptor = {\n tag: 'script',\n attrs: {\n type: 'importmap',\n },\n children: JSON.stringify(importmap),\n injectTo: 'head-prepend',\n };\n\n return {\n html,\n tags: [\n {\n tag: 'meta',\n attrs: {\n charset: 'UTF-8',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'meta',\n attrs: {\n name: 'viewport',\n content: 'width=device-width, initial-scale=1.0',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'title',\n children: titulo,\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'stylesheet',\n href: 'https://fonts.googleapis.com/icon?family=Material+Icons',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/png',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon-96x96.png`,\n sizes: '96x96',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/svg+xml',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon.svg`,\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'apple-touch-icon',\n sizes: '180x180',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/apple-touch-icon.png`,\n },\n injectTo: 'head-prepend',\n },\n ...(build ? [importmapScriptTag] : []),\n ],\n };\n };\n","import { Plugin, ResolvedConfig } from 'vite';\nimport { getCloseBundle } from './closeBundle.ts';\nimport { config } from './config.ts';\nimport { configureServer } from './configureServer.ts';\nimport { getTransformIndexHtml } from './transformIndexHtml.ts';\n\nexport type ViteAppPluginOptions =\n | {\n nombre: string;\n }\n | string;\n\nexport default function (options: ViteAppPluginOptions): Plugin {\n const { nombre } =\n typeof options === 'string' ? { nombre: options } : options;\n\n const titulo = `Sigoo ${nombre} - Coordinadora S.A`;\n\n let resolvedConfig: ResolvedConfig;\n\n return {\n name: 'cm-sigoo-temp-ui-app',\n\n config,\n\n configureServer,\n\n configResolved(endConfig) {\n resolvedConfig = endConfig;\n },\n\n transformIndexHtml(...args) {\n return getTransformIndexHtml(\n titulo,\n resolvedConfig.command === 'build',\n )(...args);\n },\n\n closeBundle(error) {\n return getCloseBundle(resolvedConfig.command === 'build')(error);\n },\n };\n}\n"],"mappings":"AAAA,OAAS,qBAAAA,EAAmB,cAAAC,EAAY,gBAAAC,MAAoB,UAC5D,OAAS,YAAAC,EAAU,SAAAC,EAAO,QAAAC,MAAY,mBACt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,UAAY,OAAO,EAAEM,CAAK,CACjE,CACF,CACF","names":["createWriteStream","existsSync","readFileSync","copyFile","mkdir","stat","get","tmpdir","dirname","join","resolve","fileURLToPath","__filename","__dirname","temp","tempDir","rutaTemp","rutaSCSso","pathDotHtml","urlSCSso","fechaComparacion","downloadToTemp","file","reject","response","error","copyToTemp","rutaDist","rutaDistSCSso","getFile","getCloseBundle","build","error","copyToTemp","config","userConfig","globals","name","output","key","configureServer","server","req","res","next","pathDotHtml","getFile","getTransformIndexHtml","titulo","build","html","importmap","importmapScriptTag","app_plugin_default","options","nombre","titulo","resolvedConfig","config","configureServer","endConfig","args","getTransformIndexHtml","error","getCloseBundle"]}
|
package/package.json
CHANGED
|
@@ -1,38 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"types": "dist/lib/lib.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist/lib/*",
|
|
9
|
-
"dist/plugins/*"
|
|
10
|
-
],
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/lib/cm-sigoo-temp-ui.js",
|
|
14
|
-
"types": "./dist/lib/lib.d.ts"
|
|
15
|
-
},
|
|
16
|
-
"./vite-app-plugin": {
|
|
17
|
-
"import": "./dist/plugins/app.plugin.js",
|
|
18
|
-
"types": "./dist/plugins/app.plugin.d.ts"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"build": "npm run build:app && npm run build:lib && npm run build:plugins && npm run build:storybook",
|
|
24
|
-
"build:lib": "tsc -b && vite build -c node/vite/vite.lib.config.ts",
|
|
25
|
-
"build:plugins": "node --experimental-strip-types node/vite/build.plugins.ts",
|
|
26
|
-
"build:app": "tsc -b && vite build -c node/vite/vite.app.config.ts",
|
|
27
|
-
"build:storybook": "storybook build -o dist/storybook",
|
|
28
|
-
"lint": "eslint .",
|
|
29
|
-
"preview": "vite preview -c node/vite.app.config.ts",
|
|
30
|
-
"prepare": "husky",
|
|
31
|
-
"storybook": "storybook dev -p 6006"
|
|
2
|
+
"commitlint": {
|
|
3
|
+
"extends": [
|
|
4
|
+
"@commitlint/config-conventional"
|
|
5
|
+
]
|
|
32
6
|
},
|
|
33
7
|
"dependencies": {
|
|
34
8
|
"@emotion/react": "^11.14.0",
|
|
35
9
|
"@emotion/styled": "^11.14.0",
|
|
10
|
+
"@fontsource-variable/roboto": "^5.2.5",
|
|
36
11
|
"@fontsource/roboto": "^5.2.5",
|
|
37
12
|
"@mui/icons-material": "^7.0.1",
|
|
38
13
|
"@mui/material": "^7.0.1",
|
|
@@ -80,11 +55,23 @@
|
|
|
80
55
|
"vite-plugin-dts": "^4.5.3",
|
|
81
56
|
"vitest": "^3.1.1"
|
|
82
57
|
},
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"proseWrap": "always",
|
|
86
|
-
"htmlWhitespaceSensitivity": "strict"
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": "^22.9.0"
|
|
87
60
|
},
|
|
61
|
+
"exports": {
|
|
62
|
+
".": {
|
|
63
|
+
"import": "./dist/lib/cm-sigoo-temp-ui.js",
|
|
64
|
+
"types": "./dist/lib/lib.d.ts"
|
|
65
|
+
},
|
|
66
|
+
"./vite-app-plugin": {
|
|
67
|
+
"import": "./dist/plugins/app.plugin.js",
|
|
68
|
+
"types": "./dist/plugins/app.plugin.d.ts"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"dist/lib/*",
|
|
73
|
+
"dist/plugins/*"
|
|
74
|
+
],
|
|
88
75
|
"lint-staged": {
|
|
89
76
|
"*.{js,jsx,ts,tsx}": [
|
|
90
77
|
"eslint --fix",
|
|
@@ -94,12 +81,26 @@
|
|
|
94
81
|
"prettier --write"
|
|
95
82
|
]
|
|
96
83
|
},
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
84
|
+
"main": "dist/lib/cm-sigoo-temp-ui.js",
|
|
85
|
+
"name": "@cm-sigoo-temp/ui",
|
|
86
|
+
"prettier": {
|
|
87
|
+
"htmlWhitespaceSensitivity": "strict",
|
|
88
|
+
"proseWrap": "always",
|
|
89
|
+
"singleQuote": true
|
|
101
90
|
},
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
"scripts": {
|
|
92
|
+
"build": "npm run build:app && npm run build:lib && npm run build:plugins && npm run build:storybook",
|
|
93
|
+
"build:app": "tsc -b && vite build -c node/vite/app.config.ts",
|
|
94
|
+
"build:lib": "tsc -b && vite build -c node/vite/lib.config.ts",
|
|
95
|
+
"build:plugins": "node --experimental-strip-types node/vite/plugins/build.ts",
|
|
96
|
+
"build:storybook": "storybook build -o dist/storybook",
|
|
97
|
+
"dev": "vite -c node/vite/app.config.ts",
|
|
98
|
+
"lint": "eslint .",
|
|
99
|
+
"prepare": "husky",
|
|
100
|
+
"preview": "vite preview -c node/vite/app.config.ts",
|
|
101
|
+
"storybook": "storybook dev -p 6006"
|
|
102
|
+
},
|
|
103
|
+
"type": "module",
|
|
104
|
+
"types": "dist/lib/lib.d.ts",
|
|
105
|
+
"version": "0.2.20"
|
|
106
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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>>;
|