nectiasw 0.0.14 → 0.0.16

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 (36) hide show
  1. package/dist/components/Footer/index.d.ts +8 -0
  2. package/dist/components/Footer/styled.d.ts +2 -0
  3. package/dist/components/Footer/styles.d.ts +3 -0
  4. package/dist/components/Footer/svg.d.ts +6 -0
  5. package/dist/components/Layout/hooks.d.ts +1 -0
  6. package/dist/components/Layout/index.d.ts +21 -0
  7. package/dist/components/Layout/styles.d.ts +11 -0
  8. package/dist/components/Sidebar/index.d.ts +4 -0
  9. package/dist/components/Sidebar/styles.d.ts +26 -0
  10. package/dist/components/Sidebar/types.d.ts +33 -0
  11. package/dist/components/Timeline/index.d.ts +1 -0
  12. package/dist/events/index.d.ts +58 -0
  13. package/dist/hooks/usecache/config.d.ts +8 -0
  14. package/dist/hooks/usecache/index.d.ts +12 -0
  15. package/dist/index.d.ts +19 -0
  16. package/dist/index.es.js +29830 -19120
  17. package/dist/index.es.js.map +1 -1
  18. package/dist/index.umd.js +749 -352
  19. package/dist/index.umd.js.map +1 -1
  20. package/dist/providers/channel/hooks.d.ts +11 -0
  21. package/dist/providers/channel/index.d.ts +27 -0
  22. package/dist/providers/channel/types.d.ts +9 -0
  23. package/dist/providers/logger/index.d.ts +24 -0
  24. package/dist/providers/microfront/index.d.ts +17 -0
  25. package/dist/providers/microfront/types.d.ts +49 -0
  26. package/dist/providers/permissions/index.d.ts +13 -0
  27. package/dist/providers/permissions/types.d.ts +72 -0
  28. package/dist/providers/permissions/utils.d.ts +12 -0
  29. package/dist/providers/private/index.d.ts +26 -0
  30. package/dist/providers/storage/crypto.d.ts +1 -0
  31. package/dist/providers/storage/index.d.ts +5 -0
  32. package/dist/providers/storage/session/index.d.ts +54 -0
  33. package/dist/providers/storage/types.d.ts +32 -0
  34. package/dist/utils/microfront/index.d.ts +8 -0
  35. package/package.json +10 -2
  36. package/dist/components/index.d.ts +0 -62
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare global {
4
+ interface Window {
5
+ gtag: (...args: any) => void;
6
+ }
7
+ }
8
+ export declare const Footer: React.FC;
@@ -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,3 @@
1
+ export declare const classes: {
2
+ img: string;
3
+ };
@@ -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,4 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarProps } from './types';
3
+
4
+ export declare const Sidebar: React.FunctionComponent<SidebarProps>;
@@ -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,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 {};
@@ -0,0 +1,8 @@
1
+ import { useQuery, useQueryClient } from '@tanstack/react-query';
2
+
3
+ interface DefaultConfigHook {
4
+ useQuery?: typeof useQuery | null;
5
+ useQueryClient?: typeof useQueryClient | null;
6
+ }
7
+ export declare const defaultConfig: DefaultConfigHook;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ export type UseCacheOptions<T> = {
2
+ sequence?: boolean;
3
+ cacheKey: readonly string[];
4
+ defaultValue?: T;
5
+ };
6
+ export declare function useCache<T>({ defaultValue, sequence, cacheKey, }: UseCacheOptions<T>): {
7
+ cache: rq.UseQueryResult<T>;
8
+ defaultValue: T | undefined;
9
+ isStored: boolean;
10
+ store: (data: T) => void;
11
+ purge: (queryKeys?: readonly string[]) => void;
12
+ };
package/dist/index.d.ts CHANGED
@@ -49,6 +49,12 @@ 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
60
  export type { SearchItem, SearchProps, ScrollSearchProps, Client, PendingClientElement, Placeholder, } from './components/Search/types';
@@ -69,3 +75,16 @@ export { HttpClient } from './providers/https';
69
75
  export { signalHttps } from './providers/https/http.api';
70
76
  export type { Arguments } from './providers/https/http.api';
71
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, LogColors, LogLevel } from './providers/logger';
89
+ export { GrantSystem, Private } from './providers/private';
90
+ export type { GrantArgs, PrivateProps } from './providers/private';