nectiasw 0.0.13 → 0.0.15
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/components/Footer/index.d.ts +8 -0
- package/dist/components/Footer/styled.d.ts +2 -0
- package/dist/components/Footer/styles.d.ts +3 -0
- package/dist/components/Footer/svg.d.ts +6 -0
- package/dist/components/Layout/hooks.d.ts +1 -0
- package/dist/components/Layout/index.d.ts +21 -0
- package/dist/components/Layout/styles.d.ts +11 -0
- package/dist/components/Sidebar/index.d.ts +4 -0
- package/dist/components/Sidebar/styles.d.ts +26 -0
- package/dist/components/Sidebar/types.d.ts +33 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/context/hooks.d.ts +1 -0
- package/dist/context/index.d.ts +32 -0
- package/dist/context/types.d.ts +49 -0
- package/dist/events/index.d.ts +58 -0
- package/dist/index.d.ts +27 -3
- package/dist/index.es.js +31418 -18932
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +721 -319
- package/dist/index.umd.js.map +1 -1
- package/dist/providers/channel/hooks.d.ts +11 -0
- package/dist/providers/channel/index.d.ts +27 -0
- package/dist/providers/channel/types.d.ts +9 -0
- package/dist/providers/https/http.api.d.ts +28 -0
- package/dist/providers/https/index.d.ts +65 -0
- package/dist/providers/logger/index.d.ts +24 -0
- package/dist/providers/microfront/index.d.ts +17 -0
- package/dist/providers/microfront/types.d.ts +49 -0
- package/dist/providers/permissions/index.d.ts +13 -0
- package/dist/providers/permissions/types.d.ts +72 -0
- package/dist/providers/permissions/utils.d.ts +12 -0
- package/dist/providers/storage/crypto.d.ts +1 -0
- package/dist/providers/storage/index.d.ts +5 -0
- package/dist/providers/storage/session/index.d.ts +54 -0
- package/dist/providers/storage/types.d.ts +32 -0
- package/dist/utils/bearer/index.d.ts +6 -0
- package/dist/utils/microfront/index.d.ts +8 -0
- package/package.json +11 -2
- package/dist/components/index.d.ts +0 -62
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const FooterContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Icons: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const LogoSVG: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const WorldSVG: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const LinkedinSVG: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const YoutubeSVG: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomEvent<T>(event: string, callback: (value: T) => void): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { SidebarProps } from '@nectiasw/components/Sidebar/types';
|
|
3
|
+
|
|
4
|
+
export type LayoutProps = {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
includeNavbar?: boolean;
|
|
7
|
+
includeSidebar?: boolean;
|
|
8
|
+
includeFooter?: boolean;
|
|
9
|
+
menu?: Pick<SidebarProps, "panel" | "options"> | undefined;
|
|
10
|
+
previousPath?: string | boolean;
|
|
11
|
+
includeNavbarDropdown?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @description
|
|
15
|
+
* A layout component that includes a navbar, sidebar and a container.
|
|
16
|
+
* @example
|
|
17
|
+
* <TwLayout>
|
|
18
|
+
* <h1>My Page</h1>
|
|
19
|
+
* </TwLayout>
|
|
20
|
+
*/
|
|
21
|
+
export declare const Layout: React.FunctionComponent<LayoutProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
open: boolean;
|
|
3
|
+
}>> & string;
|
|
4
|
+
export declare const SidebarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const PageContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const classes: {
|
|
7
|
+
grid: string;
|
|
8
|
+
open: string;
|
|
9
|
+
close: string;
|
|
10
|
+
container: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* This file contains the styles for the navbar component.
|
|
4
|
+
*/
|
|
5
|
+
export declare const classes: {
|
|
6
|
+
content: string;
|
|
7
|
+
container: string;
|
|
8
|
+
show: string;
|
|
9
|
+
hidden: string;
|
|
10
|
+
background: string;
|
|
11
|
+
backgroundSize: {
|
|
12
|
+
open: string;
|
|
13
|
+
closed: string;
|
|
14
|
+
};
|
|
15
|
+
icontainer: string;
|
|
16
|
+
list: {
|
|
17
|
+
container: string;
|
|
18
|
+
item: string;
|
|
19
|
+
wrap: string;
|
|
20
|
+
};
|
|
21
|
+
menu: {
|
|
22
|
+
icon: string;
|
|
23
|
+
title: string;
|
|
24
|
+
};
|
|
25
|
+
separator: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IN_Permission, SP_Permission } from '@nectiasw/providers/permissions/types';
|
|
2
|
+
|
|
3
|
+
export declare enum System {
|
|
4
|
+
SIGN = "Firma Digital",
|
|
5
|
+
SP_V2 = "Sistema de Perfilamiento v2",
|
|
6
|
+
OPTIMUS = "Integra Negocio"
|
|
7
|
+
}
|
|
8
|
+
export type Args = {
|
|
9
|
+
roles?: IN_Permission[];
|
|
10
|
+
system?: System;
|
|
11
|
+
defaultSystemInterception?: System;
|
|
12
|
+
};
|
|
13
|
+
export type Rule = {
|
|
14
|
+
allow?: IN_Permission[] | SP_Permission[];
|
|
15
|
+
system?: string;
|
|
16
|
+
systems?: System[];
|
|
17
|
+
passport?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type SidebarOptions = {
|
|
20
|
+
path: string;
|
|
21
|
+
title: string;
|
|
22
|
+
rules?: Rule;
|
|
23
|
+
icon?: React.JSX.Element;
|
|
24
|
+
except?: (string | RegExp)[];
|
|
25
|
+
};
|
|
26
|
+
export type SidebarProps = {
|
|
27
|
+
open?: boolean;
|
|
28
|
+
title?: string;
|
|
29
|
+
panel?: SidebarOptions[];
|
|
30
|
+
selected?: string;
|
|
31
|
+
options?: SidebarOptions[];
|
|
32
|
+
onToggle?: () => void;
|
|
33
|
+
};
|
|
@@ -97,6 +97,7 @@ export type DetailTimelineProps = {
|
|
|
97
97
|
onClick?: () => void;
|
|
98
98
|
onActive?: () => void;
|
|
99
99
|
onInactive?: () => void;
|
|
100
|
+
children?: React.ReactNode;
|
|
100
101
|
details: ParticipantDetailProps;
|
|
101
102
|
};
|
|
102
103
|
export declare const DetailTimeline: React.FC<DetailTimelineProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useSignal(): import('.').ContextProps;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { BrowserHistory } from 'history';
|
|
3
|
+
import { CommonSignalConnection } from './types';
|
|
4
|
+
|
|
5
|
+
export type SignalProps = {
|
|
6
|
+
ref: ContextProps;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* Context props.
|
|
12
|
+
*/
|
|
13
|
+
export type ContextProps = Partial<CommonSignalConnection> & {
|
|
14
|
+
ref?: RefUser;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
expanded?: boolean;
|
|
17
|
+
history?: BrowserHistory;
|
|
18
|
+
environment?: Record<string, string>;
|
|
19
|
+
onExpand?: (status?: boolean) => void;
|
|
20
|
+
onSignal?: (signal?: CommonSignalConnection) => void;
|
|
21
|
+
onAcessDenied?: (route: string) => void;
|
|
22
|
+
};
|
|
23
|
+
export type RefUser = {
|
|
24
|
+
role: string;
|
|
25
|
+
lastName: string;
|
|
26
|
+
firstName: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @description
|
|
30
|
+
* A context to be used in the components that need to communicate with each other.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SignalContext: React.Context<ContextProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UserSystem } from '../typings';
|
|
2
|
+
|
|
3
|
+
export interface Info {
|
|
4
|
+
exp: number;
|
|
5
|
+
iat: number;
|
|
6
|
+
jti: string;
|
|
7
|
+
iss: string;
|
|
8
|
+
aud: string;
|
|
9
|
+
sub: string;
|
|
10
|
+
typ: string;
|
|
11
|
+
azp: string;
|
|
12
|
+
session_state: string;
|
|
13
|
+
acr: string;
|
|
14
|
+
"allowed-origins": string[];
|
|
15
|
+
realm_access: RealmAccess;
|
|
16
|
+
resource_access: ResourceAccess;
|
|
17
|
+
scope: string;
|
|
18
|
+
sid: string;
|
|
19
|
+
email_verified: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
preferred_username: string;
|
|
22
|
+
given_name: string;
|
|
23
|
+
family_name: string;
|
|
24
|
+
email: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RealmAccess {
|
|
27
|
+
roles: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ResourceAccess {
|
|
30
|
+
account: Account;
|
|
31
|
+
}
|
|
32
|
+
export interface Account {
|
|
33
|
+
roles: string[];
|
|
34
|
+
}
|
|
35
|
+
export type SessionState = {
|
|
36
|
+
token?: string;
|
|
37
|
+
expiresAt?: string;
|
|
38
|
+
refreshToken?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface CommonSignalConnection {
|
|
41
|
+
info?: Info;
|
|
42
|
+
user?: UserSystem;
|
|
43
|
+
session?: SessionState;
|
|
44
|
+
environment: Record<string, string>;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface SignalConnection extends CommonSignalConnection {
|
|
48
|
+
onSignal?: (data: CommonSignalConnection) => void;
|
|
49
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const ON_CONNECT_APP = "@CCC/onConnectApp";
|
|
2
|
+
declare const ON_REHYDRATE_APP = "@CCC/onRehydrateApp";
|
|
3
|
+
declare const ON_DISCONNECT_APP = "@CCC/onDisconnectApp";
|
|
4
|
+
declare const GET_ZUSTAND_INSTANCE = "@CCC/getZustandInstance";
|
|
5
|
+
declare const UPDATE_ZUSTAND_INSTANCE = "@CCC/updateZustandInstance";
|
|
6
|
+
declare const SSO_LOGIN = "@CCC/SSO";
|
|
7
|
+
declare const SSO_LOGOUT = "@CCC/SSO/logout";
|
|
8
|
+
declare const SSO_REFRESH = "@CCC/SSO/refresh";
|
|
9
|
+
declare const SSO_ATTEMPT = "@CCC/SSO/attempt";
|
|
10
|
+
declare const SSO_ERROR = "@CCC/SSO/failure";
|
|
11
|
+
declare const SSO_SUCCESS = "@CCC/SSO/success";
|
|
12
|
+
declare const SSO_EXPIRED = "@CCC/SSO/expired";
|
|
13
|
+
declare const SIGNAL = "@CCC/signal";
|
|
14
|
+
/**
|
|
15
|
+
* @description
|
|
16
|
+
* This is the list of all the events that the client can emit.
|
|
17
|
+
* - ON_CONNECT_APP: This event is emitted when the app is connected.
|
|
18
|
+
* - ON_REHYDRATE_APP: This event is emitted when the app is rehydrated.
|
|
19
|
+
* - ON_DISCONNECT_APP: This event is emitted when the app is disconnected.
|
|
20
|
+
* - GET_ZUSTAND_INSTANCE: This event is emitted when the app needs to get the zustand instance.
|
|
21
|
+
* - UPDATE_ZUSTAND_INSTANCE: This event is emitted when the app needs to update the zustand instance.
|
|
22
|
+
* - SSO_LOGIN: This event is emitted when the app needs to login.
|
|
23
|
+
* - SSO_LOGOUT: This event is emitted when the app needs to logout.
|
|
24
|
+
* - SSO_REFRESH: This event is emitted when the app needs to refresh the token.
|
|
25
|
+
* - SSO_ATTEMPT: This event is emitted when the app needs to attempt to login.
|
|
26
|
+
* - SSO_ERROR: This event is emitted when the app needs to attempt to login.
|
|
27
|
+
* - SIGNAL: This event is emitted when the app needs to attempt to login.
|
|
28
|
+
*/
|
|
29
|
+
export type Event = typeof ON_CONNECT_APP | typeof ON_DISCONNECT_APP | typeof ON_REHYDRATE_APP | typeof GET_ZUSTAND_INSTANCE | typeof UPDATE_ZUSTAND_INSTANCE | typeof SSO_LOGIN | typeof SSO_LOGOUT | typeof SSO_REFRESH | typeof SSO_ATTEMPT | typeof SSO_ERROR | typeof SSO_SUCCESS | typeof SIGNAL | typeof SSO_EXPIRED;
|
|
30
|
+
/**
|
|
31
|
+
* @description
|
|
32
|
+
* This is the list of all the events that the client can emit.
|
|
33
|
+
* - ON_CONNECT_APP: This event is emitted when the app is connected.
|
|
34
|
+
* - ON_REHYDRATE_APP: This event is emitted when the app is rehydrated.
|
|
35
|
+
* - ON_DISCONNECT_APP: This event is emitted when the app is disconnected.
|
|
36
|
+
* - GET_ZUSTAND_INSTANCE: This event is emitted when the app needs to get the zustand instance.
|
|
37
|
+
* - UPDATE_ZUSTAND_INSTANCE: This event is emitted when the app needs to update the zustand instance.
|
|
38
|
+
* - SSO_LOGIN: This event is emitted when the app needs to login.
|
|
39
|
+
* - SSO_LOGOUT: This event is emitted when the app needs to logout.
|
|
40
|
+
* - SSO_REFRESH: This event is emitted when the app needs to refresh the token.
|
|
41
|
+
* - SSO_ATTEMPT: This event is emitted when the app needs to attempt to login.
|
|
42
|
+
*/
|
|
43
|
+
export declare enum EventMap {
|
|
44
|
+
SSO_LOGIN = "@CCC/SSO",
|
|
45
|
+
SSO_ERROR = "@CCC/SSO/failure",
|
|
46
|
+
SSO_LOGOUT = "@CCC/SSO/logout",
|
|
47
|
+
SSO_REFRESH = "@CCC/SSO/refresh",
|
|
48
|
+
SSO_ATTEMPT = "@CCC/SSO/attempt",
|
|
49
|
+
SSO_EXPIRED = "@CCC/SSO/expired",
|
|
50
|
+
SSO_SUCCESS = "@CCC/SSO/success",
|
|
51
|
+
ON_CONNECT_APP = "@CCC/onConnectApp",
|
|
52
|
+
ON_REHYDRATE_APP = "@CCC/onRehydrateApp",
|
|
53
|
+
ON_DISCONNECT_APP = "@CCC/onDisconnectApp",
|
|
54
|
+
GET_ZUSTAND_INSTANCE = "@CCC/getZustandInstance",
|
|
55
|
+
UPDATE_ZUSTAND_INSTANCE = "@CCC/updateZustandInstance",
|
|
56
|
+
SIGNAL = "@CCC/signal"
|
|
57
|
+
}
|
|
58
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { Datepicker } from './components/Datepicker';
|
|
|
20
20
|
export type { DatepickerProps } from './components/Datepicker';
|
|
21
21
|
export { RadioButton } from './components/RadioButton';
|
|
22
22
|
export type { RadioButtonProps } from './components/RadioButton';
|
|
23
|
-
export { Text, Error, Title, Success, Subtitle, Description } from './components/Text';
|
|
23
|
+
export { Text, Error, Title, Success, Subtitle, Description, } from './components/Text';
|
|
24
24
|
export type { CommonTextProps } from './components/Text';
|
|
25
25
|
export { Input } from './components/Input';
|
|
26
26
|
export { InputTable } from './components/Input/variants/InputTable';
|
|
@@ -43,15 +43,21 @@ export type { EmptyProps } from './components/Empty';
|
|
|
43
43
|
export { Loading, Wait } from './components/Loading';
|
|
44
44
|
export type { LoadingProps } from './components/Loading';
|
|
45
45
|
export { SingleDeadlineChart } from './components/DeadlineChart';
|
|
46
|
-
export type { SingleDeadlineChartProps
|
|
46
|
+
export type { SingleDeadlineChartProps } from './components/DeadlineChart';
|
|
47
47
|
export { Collapse } from './components/Collapse';
|
|
48
48
|
export type { CollapseProps } from './components/Collapse';
|
|
49
49
|
export type { BadgeProps } from './components/Badge';
|
|
50
50
|
export { Badge } from './components/Badge';
|
|
51
51
|
export { BadgeStatus } from './components/Badge/types';
|
|
52
|
+
export { Navbar } from './components/Navbar';
|
|
53
|
+
export { Footer } from './components/Footer';
|
|
54
|
+
export { Layout } from './components/Layout';
|
|
55
|
+
export { Sidebar } from './components/Sidebar';
|
|
56
|
+
export type { NavbarProps } from './components/Navbar';
|
|
57
|
+
export type { SidebarProps } from './components/Sidebar/types';
|
|
52
58
|
export { Search } from './components/Search';
|
|
53
59
|
export { ScrollSearch } from './components/Search/variants/ScrollSearch';
|
|
54
|
-
export type { SearchItem, SearchProps, ScrollSearchProps, Client, PendingClientElement, Placeholder } from './components/Search/types';
|
|
60
|
+
export type { SearchItem, SearchProps, ScrollSearchProps, Client, PendingClientElement, Placeholder, } from './components/Search/types';
|
|
55
61
|
export { Pagination } from './components/Pagination';
|
|
56
62
|
export type { PaginationProps } from './components/Pagination/types';
|
|
57
63
|
export { Card, DangerTitle, AlertTitle, CheckTitle } from './components/Card';
|
|
@@ -62,3 +68,21 @@ export { TotalHours } from './components/Totalhours';
|
|
|
62
68
|
export type { TotalHoursProps } from './components/Totalhours';
|
|
63
69
|
export type { Session, Systems, SystemRole, UserSystem, SessionState, SignalConnection, CommonSignalConnection, } from './typings';
|
|
64
70
|
export { LocalStorageKeys, UrlSSOParams } from './typings';
|
|
71
|
+
export { useSignal } from './context/hooks';
|
|
72
|
+
export { SignalContext } from './context';
|
|
73
|
+
export type { SignalProps, RefUser, ContextProps } from './context';
|
|
74
|
+
export { HttpClient } from './providers/https';
|
|
75
|
+
export { signalHttps } from './providers/https/http.api';
|
|
76
|
+
export type { Arguments } from './providers/https/http.api';
|
|
77
|
+
export type { HttpClientOptions, HttpResponse } from './providers/https';
|
|
78
|
+
export { destroy, observe, dispatch, broadcast, useObserver, destroySignal, useBroadcaster, unsubscribeEvent, $events, $channels, $observers, takeSignal, createSignal, createObserver, } from './providers/channel';
|
|
79
|
+
export { EventMap } from './events';
|
|
80
|
+
export type { Event } from './events';
|
|
81
|
+
export { createRef, initialState, resetAllStores, useSessionStore, } from './providers/storage';
|
|
82
|
+
export { Permissions } from './providers/permissions';
|
|
83
|
+
export type { PermissionsProps, AuthorizationProps, AuthorizationFilterArgs, AuthorizationSystemFlag, } from './providers/permissions/types';
|
|
84
|
+
export { checkSystems, authorization } from './providers/permissions/utils';
|
|
85
|
+
export { SP_Permission, IN_Permission } from './providers/permissions/types';
|
|
86
|
+
export { MicrofrontHost } from './providers/microfront';
|
|
87
|
+
export type { Wrapper, UIArguments, MicrofrontProps, WrappedComponentProps, SignalLayoutConnection, CommonSignalConnection as CommonSignal, } from './providers/microfront/types';
|
|
88
|
+
export { Logger } from './providers/logger';
|