nectiasw 0.0.293 → 0.0.295

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 (191) hide show
  1. package/README.md +30 -30
  2. package/package.json +110 -110
  3. package/dist/App.d.ts +0 -2
  4. package/dist/components/Alert/Alert.stories.d.ts +0 -13
  5. package/dist/components/Alert/index.d.ts +0 -2
  6. package/dist/components/Alert/types.d.ts +0 -9
  7. package/dist/components/Badge/Bagde.stories.d.ts +0 -17
  8. package/dist/components/Badge/index.d.ts +0 -16
  9. package/dist/components/Badge/types.d.ts +0 -5
  10. package/dist/components/Box/index.d.ts +0 -3
  11. package/dist/components/Box/styles.d.ts +0 -9
  12. package/dist/components/Box/types.d.ts +0 -105
  13. package/dist/components/Button/builder.d.ts +0 -20
  14. package/dist/components/Button/index.d.ts +0 -9
  15. package/dist/components/Button/styled.d.ts +0 -4
  16. package/dist/components/Button/styles.d.ts +0 -4
  17. package/dist/components/Button/types.d.ts +0 -25
  18. package/dist/components/Button/variants/Weekday/Weekday.stories.d.ts +0 -6
  19. package/dist/components/Button/variants/Weekday/index.d.ts +0 -3
  20. package/dist/components/Button/variants/Weekday/styled.d.ts +0 -13
  21. package/dist/components/Button/variants/Weekday/types.d.ts +0 -15
  22. package/dist/components/Card/Card.stories.d.ts +0 -13
  23. package/dist/components/Card/index.d.ts +0 -6
  24. package/dist/components/Card/styles.d.ts +0 -17
  25. package/dist/components/Card/types.d.ts +0 -10
  26. package/dist/components/Card/variants/Schedule/index.d.ts +0 -4
  27. package/dist/components/Card/variants/Schedule/styled.d.ts +0 -3
  28. package/dist/components/Card/variants/Schedule/types.d.ts +0 -13
  29. package/dist/components/Chart/Chart.stories.d.ts +0 -40
  30. package/dist/components/Chart/index.d.ts +0 -47
  31. package/dist/components/Chart/styles.d.ts +0 -5
  32. package/dist/components/Checkbox/index.d.ts +0 -27
  33. package/dist/components/Checkbox/styled.d.ts +0 -22
  34. package/dist/components/Checkbox/styles.d.ts +0 -7
  35. package/dist/components/Col/index.d.ts +0 -3
  36. package/dist/components/Col/styled.d.ts +0 -2
  37. package/dist/components/Col/types.d.ts +0 -13
  38. package/dist/components/Collapse/index.d.ts +0 -16
  39. package/dist/components/Collapse/styles.d.ts +0 -17
  40. package/dist/components/Container/index.d.ts +0 -12
  41. package/dist/components/Counter/index.d.ts +0 -11
  42. package/dist/components/Counter/styles.d.ts +0 -9
  43. package/dist/components/Datepicker/index.d.ts +0 -29
  44. package/dist/components/Datepicker/styled.d.ts +0 -8
  45. package/dist/components/Datepicker/styles.d.ts +0 -5
  46. package/dist/components/DeadlineChart/index.d.ts +0 -53
  47. package/dist/components/DeadlineChart/styles.d.ts +0 -11
  48. package/dist/components/Detail/Detail.stories.d.ts +0 -9
  49. package/dist/components/Detail/index.d.ts +0 -37
  50. package/dist/components/Detail/styles.d.ts +0 -14
  51. package/dist/components/Dragarea/index.d.ts +0 -3
  52. package/dist/components/Dragarea/styled.d.ts +0 -5
  53. package/dist/components/Dragarea/svg.d.ts +0 -5
  54. package/dist/components/Dragarea/types.d.ts +0 -38
  55. package/dist/components/Dropdown/index.d.ts +0 -41
  56. package/dist/components/Dropdown/styles.d.ts +0 -21
  57. package/dist/components/Empty/index.d.ts +0 -13
  58. package/dist/components/EnterprisesFilter/EnterpriseContext.d.ts +0 -17
  59. package/dist/components/EnterprisesFilter/index.d.ts +0 -21
  60. package/dist/components/FirstModal/index.d.ts +0 -3
  61. package/dist/components/FirstModal/styled.d.ts +0 -6
  62. package/dist/components/FirstModal/types.d.ts +0 -14
  63. package/dist/components/Flex/index.d.ts +0 -25
  64. package/dist/components/Flex/styles.d.ts +0 -8
  65. package/dist/components/Footer/index.d.ts +0 -7
  66. package/dist/components/Footer/styled.d.ts +0 -2
  67. package/dist/components/Footer/styles.d.ts +0 -3
  68. package/dist/components/Footer/svg.d.ts +0 -5
  69. package/dist/components/Grid/index.d.ts +0 -37
  70. package/dist/components/Input/index.d.ts +0 -59
  71. package/dist/components/Input/styles.d.ts +0 -8
  72. package/dist/components/Input/variants/InputTable.d.ts +0 -3
  73. package/dist/components/Layout/hooks.d.ts +0 -1
  74. package/dist/components/Layout/index.d.ts +0 -20
  75. package/dist/components/Layout/styles.d.ts +0 -11
  76. package/dist/components/Loading/index.d.ts +0 -16
  77. package/dist/components/Loading/styles.d.ts +0 -19
  78. package/dist/components/Modal/index.d.ts +0 -8
  79. package/dist/components/Modal/styles.d.ts +0 -25
  80. package/dist/components/Modal/variant/TCModal.d.ts +0 -4
  81. package/dist/components/Modal/variant/TCModal.stories.d.ts +0 -7
  82. package/dist/components/Modal/variant/styles.d.ts +0 -11
  83. package/dist/components/Modal/variant/svg.d.ts +0 -1
  84. package/dist/components/Modal/variant/types.d.ts +0 -14
  85. package/dist/components/ModalUnathorized/index.d.ts +0 -4
  86. package/dist/components/Navbar/Navbar.stories.d.ts +0 -7
  87. package/dist/components/Navbar/index.d.ts +0 -24
  88. package/dist/components/Navbar/styles.d.ts +0 -49
  89. package/dist/components/Pagination/index.d.ts +0 -3
  90. package/dist/components/Pagination/styles.d.ts +0 -26
  91. package/dist/components/Pagination/types.d.ts +0 -19
  92. package/dist/components/RadioButton/index.d.ts +0 -13
  93. package/dist/components/RadioButton/styles.d.ts +0 -7
  94. package/dist/components/Row/index.d.ts +0 -14
  95. package/dist/components/Search/index.d.ts +0 -7
  96. package/dist/components/Search/styled.d.ts +0 -12
  97. package/dist/components/Search/styles.d.ts +0 -20
  98. package/dist/components/Search/types.d.ts +0 -75
  99. package/dist/components/Search/variants/ScrollSearch.d.ts +0 -4
  100. package/dist/components/Search/variants/styled.d.ts +0 -21
  101. package/dist/components/Select/Select.stories.d.ts +0 -15
  102. package/dist/components/Select/builder.d.ts +0 -27
  103. package/dist/components/Select/index.d.ts +0 -46
  104. package/dist/components/Select/styled.d.ts +0 -1
  105. package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -36
  106. package/dist/components/Sidebar/index.d.ts +0 -2
  107. package/dist/components/Sidebar/styles.d.ts +0 -26
  108. package/dist/components/Sidebar/types.d.ts +0 -37
  109. package/dist/components/Stepper/index.d.ts +0 -17
  110. package/dist/components/Stepper/styles.d.ts +0 -15
  111. package/dist/components/Switch/index.d.ts +0 -18
  112. package/dist/components/Table/Table.stories.d.ts +0 -8
  113. package/dist/components/Table/builder.d.ts +0 -18
  114. package/dist/components/Table/index.d.ts +0 -32
  115. package/dist/components/Table/styled.d.ts +0 -30
  116. package/dist/components/Table/styles.d.ts +0 -27
  117. package/dist/components/Table/svg.d.ts +0 -1
  118. package/dist/components/Table/types.d.ts +0 -98
  119. package/dist/components/Tableinput/index.d.ts +0 -40
  120. package/dist/components/Tableinput/styles.d.ts +0 -3
  121. package/dist/components/Tableinput/types.d.ts +0 -8
  122. package/dist/components/Text/index.d.ts +0 -47
  123. package/dist/components/Text/styles.d.ts +0 -23
  124. package/dist/components/Textarea/TextArea.stories.d.ts +0 -10
  125. package/dist/components/Textarea/index.d.ts +0 -15
  126. package/dist/components/Textarea/styled.d.ts +0 -2
  127. package/dist/components/Textarea/styles.d.ts +0 -23
  128. package/dist/components/Timeline/index.d.ts +0 -3
  129. package/dist/components/Timeline/styled.d.ts +0 -12
  130. package/dist/components/Timeline/styles.d.ts +0 -26
  131. package/dist/components/Timeline/types.d.ts +0 -26
  132. package/dist/components/Tooltip/index.d.ts +0 -16
  133. package/dist/components/Tooltip/styled.d.ts +0 -22
  134. package/dist/components/Tooltip/styles.d.ts +0 -3
  135. package/dist/components/Totalhours/index.d.ts +0 -48
  136. package/dist/constants/index.d.ts +0 -11
  137. package/dist/events/index.d.ts +0 -58
  138. package/dist/hooks/usecache/config.d.ts +0 -7
  139. package/dist/hooks/usecache/index.d.ts +0 -13
  140. package/dist/hooks/usecheckbox/index.d.ts +0 -12
  141. package/dist/hooks/usetoggle/index.d.ts +0 -14
  142. package/dist/index.d.ts +0 -133
  143. package/dist/index.es.js +0 -35384
  144. package/dist/index.es.js.map +0 -1
  145. package/dist/index.umd.js +0 -2126
  146. package/dist/index.umd.js.map +0 -1
  147. package/dist/main.d.ts +0 -0
  148. package/dist/providers/channel/hooks.d.ts +0 -11
  149. package/dist/providers/channel/index.d.ts +0 -26
  150. package/dist/providers/channel/types.d.ts +0 -8
  151. package/dist/providers/context/hooks.d.ts +0 -1
  152. package/dist/providers/context/index.d.ts +0 -31
  153. package/dist/providers/context/types.d.ts +0 -48
  154. package/dist/providers/https/http.api.d.ts +0 -27
  155. package/dist/providers/https/index.d.ts +0 -68
  156. package/dist/providers/logger/index.d.ts +0 -24
  157. package/dist/providers/microfront/index.d.ts +0 -16
  158. package/dist/providers/microfront/types.d.ts +0 -50
  159. package/dist/providers/permissions/index.d.ts +0 -12
  160. package/dist/providers/permissions/types.d.ts +0 -86
  161. package/dist/providers/permissions/utils.d.ts +0 -11
  162. package/dist/providers/private/index.d.ts +0 -25
  163. package/dist/providers/storage/crypto.d.ts +0 -1
  164. package/dist/providers/storage/index.d.ts +0 -4
  165. package/dist/providers/storage/session/index.d.ts +0 -53
  166. package/dist/providers/storage/types.d.ts +0 -32
  167. package/dist/providers/taggeo/tagEvent.d.ts +0 -12
  168. package/dist/stories/Button.d.ts +0 -26
  169. package/dist/stories/Button.stories.d.ts +0 -23
  170. package/dist/stories/Header.d.ts +0 -11
  171. package/dist/stories/Header.stories.d.ts +0 -18
  172. package/dist/stories/Page.d.ts +0 -2
  173. package/dist/stories/Page.stories.d.ts +0 -12
  174. package/dist/style.css +0 -1
  175. package/dist/theme/index.d.ts +0 -12
  176. package/dist/typings/index.d.ts +0 -150
  177. package/dist/utils/amount/index.d.ts +0 -1
  178. package/dist/utils/bearer/index.d.ts +0 -6
  179. package/dist/utils/cache/index.d.ts +0 -7
  180. package/dist/utils/capitalize/index.d.ts +0 -6
  181. package/dist/utils/download/index.d.ts +0 -6
  182. package/dist/utils/index.d.ts +0 -13
  183. package/dist/utils/mapping/index.d.ts +0 -19
  184. package/dist/utils/microfront/index.d.ts +0 -8
  185. package/dist/utils/responsive/index.d.ts +0 -5
  186. package/dist/utils/revert/index.d.ts +0 -5
  187. package/dist/utils/slots/index.d.ts +0 -14
  188. package/dist/utils/sort/index.d.ts +0 -6
  189. package/dist/utils/stack/index.d.ts +0 -5
  190. package/dist/utils/time/index.d.ts +0 -7
  191. package/dist/vite.svg +0 -1
package/dist/main.d.ts DELETED
File without changes
@@ -1,11 +0,0 @@
1
- export declare function useObserver<T>(event: string, callback: (data: T) => void): {
2
- status: boolean;
3
- pause: () => void;
4
- resume: () => void;
5
- };
6
- /**
7
- * @description
8
- * This function is used to broadcast an event.
9
- * @param event - Event name to be broadcasted.
10
- */
11
- export declare function useBroadcaster<T>(event: string, callback?: () => void, name?: string): (data: T) => void;
@@ -1,26 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { EventMap, Listener } from './types';
3
- import { EventMap as EventContext } from '../../events';
4
- export declare const $events: EventMap;
5
- export declare const $channels: Record<string, BroadcastChannel>;
6
- export declare const $observers: Listener;
7
- /**
8
- * @param $event - Event to unsubscribe from.
9
- * @returns {void}
10
- */
11
- export declare function unsubscribeEvent($event: EventContext): void;
12
- export declare function takeSignal<T>($channel: string, onNext: (data: T) => void): void;
13
- export declare function destroySignal($channel: string): void;
14
- export declare function createSignal<T>($channel: string, data: T): void;
15
- /**
16
- * @description
17
- * Dispatch
18
- * @param $name - Event name.
19
- * @param data - Data to be emitted.
20
- */
21
- export declare function dispatch<T>($name: string, data: T): void;
22
- export declare function createObserver<T>($name: string): Subject<T>;
23
- export declare function observe<T>($name: string, callback: (args: T) => void): import('rxjs').Subscription;
24
- export declare function destroy<T>($name: string): void;
25
- export declare function broadcast<T>($name: string, data: T): void;
26
- export { useBroadcaster, useObserver } from './hooks';
@@ -1,8 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { EventMap as Ref } from '../../events';
3
- export type EventMap = {
4
- [key in Ref]?: Subject<never>;
5
- };
6
- export type Listener = {
7
- [key in Ref]?: typeof Subject;
8
- };
@@ -1 +0,0 @@
1
- export declare function useSignal(): import('.').ContextProps;
@@ -1,31 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
- import { BrowserHistory } from 'history';
3
- import { CommonSignalConnection } from './types';
4
- export type SignalProps = {
5
- ref: ContextProps;
6
- children?: ReactNode;
7
- };
8
- /**
9
- * @description
10
- * Context props.
11
- */
12
- export type ContextProps = Partial<CommonSignalConnection> & {
13
- ref?: RefUser;
14
- loading?: boolean;
15
- expanded?: boolean;
16
- history?: BrowserHistory;
17
- environment?: Record<string, string>;
18
- onExpand?: (status?: boolean) => void;
19
- onSignal?: (signal?: CommonSignalConnection) => void;
20
- onAcessDenied?: (route: string) => void;
21
- };
22
- export type RefUser = {
23
- role: string;
24
- lastName: string;
25
- firstName: string;
26
- };
27
- /**
28
- * @description
29
- * A context to be used in the components that need to communicate with each other.
30
- */
31
- export declare const SignalContext: React.Context<ContextProps>;
@@ -1,48 +0,0 @@
1
- import { UserSystem } from '../../typings';
2
- export interface Info {
3
- exp: number;
4
- iat: number;
5
- jti: string;
6
- iss: string;
7
- aud: string;
8
- sub: string;
9
- typ: string;
10
- azp: string;
11
- session_state: string;
12
- acr: string;
13
- 'allowed-origins': string[];
14
- realm_access: RealmAccess;
15
- resource_access: ResourceAccess;
16
- scope: string;
17
- sid: string;
18
- email_verified: boolean;
19
- name: string;
20
- preferred_username: string;
21
- given_name: string;
22
- family_name: string;
23
- email: string;
24
- }
25
- export interface RealmAccess {
26
- roles: string[];
27
- }
28
- export interface ResourceAccess {
29
- account: Account;
30
- }
31
- export interface Account {
32
- roles: string[];
33
- }
34
- export type SessionState = {
35
- token?: string;
36
- expiresAt?: string;
37
- refreshToken?: string;
38
- };
39
- export interface CommonSignalConnection {
40
- info?: Info;
41
- user?: UserSystem;
42
- session?: SessionState;
43
- environment: Record<string, string>;
44
- loading: boolean;
45
- }
46
- export interface SignalConnection extends CommonSignalConnection {
47
- onSignal?: (data: CommonSignalConnection) => void;
48
- }
@@ -1,27 +0,0 @@
1
- import { ContextProps } from '../context';
2
- import { URLMapping } from '.';
3
- export declare enum Method {
4
- GET = "GET",
5
- PUT = "PUT",
6
- POST = "POST",
7
- PATCH = "PATCH",
8
- DELETE = "DELETE"
9
- }
10
- export type Arguments = {
11
- endpoint: string;
12
- baseURL: string;
13
- method?: Method;
14
- normalize?: boolean;
15
- };
16
- export interface FetchRequest<T> {
17
- result: T;
18
- status: number;
19
- message: string;
20
- }
21
- /**
22
- * @description
23
- * Sends a request to the server.
24
- * This is commonly used on useQuery hooks from react-query.
25
- * @param session - session object.
26
- */
27
- export declare function signalHttps<T, M = Record<string, never>, S extends ContextProps['session'] = ContextProps['session']>(session: S, args: Arguments, config?: URLMapping, mutation?: M): () => Promise<FetchRequest<T>>;
@@ -1,68 +0,0 @@
1
- import { AxiosResponse, AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
2
- export interface HttpResponse<T> extends Promise<T> {
3
- data: T;
4
- status: number;
5
- message: string;
6
- }
7
- export interface SignalResponse<T = Record<string, never>> {
8
- data: T;
9
- status: number;
10
- message: string;
11
- }
12
- export interface HttpClientOptions {
13
- baseURL?: string;
14
- timeout?: number;
15
- headers?: Record<string, string>;
16
- logger?: Console['log'];
17
- requestInterceptor?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>;
18
- responseInterceptor?: (response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>;
19
- }
20
- export interface URLMapping {
21
- provide?: string;
22
- params?: Array<string | number>;
23
- query?: Record<string, string | number | boolean>;
24
- }
25
- export declare class HttpClient {
26
- private https;
27
- private requestInterceptor;
28
- private responseInterceptor;
29
- constructor({ baseURL, timeout, headers, requestInterceptor, responseInterceptor, }?: HttpClientOptions);
30
- get<T>(url: string | URLMapping, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
31
- /**
32
- * @description
33
- * Makes a DELETE request to the specified URL.
34
- * @param url - The URL to which the request is sent.
35
- * @param config - The config to be used for the request.
36
- */
37
- delete<T>(url: string | URLMapping, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
38
- /**
39
- * @description
40
- * Makes a PATCH request to the specified URL.
41
- * @param url - The URL to which the request is sent.
42
- * @param data - The data to be sent as the request body.
43
- * @param config - The config to be used for the request.
44
- */
45
- patch<T, B>(url: string | URLMapping, data?: B, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
46
- /**
47
- * @description
48
- * Makes a POST request to the specified URL.
49
- * @param url - The URL to which the request is sent.
50
- * @param data - The data to be sent as the request body.
51
- * @param config - The config to be used for the request.
52
- */
53
- post<T, B>(url: string | URLMapping, data?: B, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
54
- /**
55
- * @description
56
- * Makes a PUT request to the specified URL.
57
- * @param url The URL to which the request is sent.
58
- * @param data The data to be sent as the request body.
59
- * @param config The config to be used for the request.
60
- */
61
- put<T, B>(url: string | URLMapping, data?: B, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>;
62
- /**
63
- * @description
64
- * Removes all interceptors, including the default ones.
65
- */
66
- removeInterceptors(): void;
67
- }
68
- export default HttpClient;
@@ -1,24 +0,0 @@
1
- export declare enum LogLevel {
2
- DEBUG = 0,
3
- INFO = 1,
4
- WARN = 2,
5
- ERROR = 3
6
- }
7
- export declare enum LogColors {
8
- INFO = "#4caf50",
9
- WARN = "#ff9800",
10
- ERROR = "#f44336",
11
- DEBUG = "#2196f3"
12
- }
13
- export declare class Logger {
14
- private logLevel;
15
- private isDevelopment;
16
- private logs;
17
- constructor(logLevel?: LogLevel, isDevelopment?: boolean);
18
- debug<T>(message: string, ...args: T[]): void;
19
- info<T>(message: string, ...args: T[]): void;
20
- warn<T>(message: string, ...args: T[]): void;
21
- error<T>(message: string, ...args: T[]): void;
22
- private log;
23
- getLogs(): string[];
24
- }
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UIArguments } from './types';
3
- /**
4
- * @param name - Name of the microfront.
5
- * @param Component - Component to be hosted.
6
- * @description
7
- * This function is used to wrap the microfront component.
8
- * It is used to pass the name of the microfront to the component.
9
- * Gives a default behavior to the microfront component;
10
- * 1. It will render the component only if the microfront is loaded.
11
- * 2. It will make a Subscription to send event to appshell to communicate.
12
- * 3. It can be used to communicate between microfronts.
13
- * @example
14
- * export default MicrofrontHost(Courses, '@courses');
15
- */
16
- export declare const MicrofrontHost: React.FC<UIArguments>;
@@ -1,50 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { UserSystem } from '../../typings';
3
- import { Root as Info } from '../storage/types';
4
- import { SidebarProps } from '../../components/Sidebar/types';
5
- export interface CommonSignalConnection {
6
- info: Info;
7
- token: string;
8
- user: UserSystem;
9
- loading: boolean;
10
- expiresAt: string;
11
- environment: Record<string, string>;
12
- refreshToken: string;
13
- }
14
- export type SignalLayoutConnection = (signal?: CommonSignalConnection, loading?: boolean) => boolean;
15
- export interface UIArguments {
16
- app: string;
17
- footer?: boolean;
18
- layout?: boolean;
19
- loading?: boolean;
20
- navbar?: SignalLayoutConnection;
21
- sidebar?: SignalLayoutConnection;
22
- includeNavbarDropdown?: boolean;
23
- previousPath?: string | boolean;
24
- observerToken?: boolean;
25
- observerSignUp?: boolean;
26
- environment: Record<string, string>;
27
- modalExpired?: boolean;
28
- children?: React.ReactNode;
29
- navigation?: Pick<SidebarProps, 'panel' | 'options'>;
30
- }
31
- export interface MicrofrontProps {
32
- args?: UIArguments;
33
- signal?: Partial<CommonSignalConnection>;
34
- children?: ReactNode;
35
- onTakeSignal?: (data: CommonSignalConnection) => void;
36
- }
37
- export interface WrappedComponentProps extends MicrofrontProps {
38
- args?: UIArguments;
39
- }
40
- export type Wrapper = <P extends WrappedComponentProps>(WrappedComponent: React.ComponentType<P>, args: UIArguments) => React.FC<P & MicrofrontProps>;
41
- export declare enum App {
42
- INDEX = "@app/index",
43
- WELCOME = "@app/welcome",
44
- DASHBOARD = "@app/dashboard",
45
- SERVICE_DASHBOARD = "@app/serviceDashboard",
46
- BACKOFFICE = "@app/backoffice",
47
- INSCRIPTIONS = "@app/inscriptions",
48
- COMMUNICATION = "@app/communication",
49
- MONITORING = "@app/monitoring"
50
- }
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PermissionsProps } from './types';
3
- /**
4
- * @description
5
- * Component to check if user has permission to see content.
6
- * It will check based on signal context and return children if user has permission.
7
- * @example
8
- * <Permissions allow={["View Dashboard"]}>
9
- * <div>Content</div>
10
- * </Permissions>
11
- */
12
- export declare const Permissions: React.FC<PermissionsProps>;
@@ -1,86 +0,0 @@
1
- import { UserSystem } from '../../typings';
2
- import { ContextProps } from '../context';
3
- /**
4
- * @description
5
- * Enum of permissions that can be used in the application.
6
- */
7
- export declare enum IN_Permission {
8
- CAN_VIEW_CARD = "CAN_VIEW_CARD",
9
- SEE_RENDITION = "SEE_RENDITION",
10
- DIGIT_RENDITION = "DIGIT_RENDITION",
11
- CAN_VIEW_MANTAINER = "CAN_VIEW_MANTAINER",
12
- CAN_EDIT_MANTAINER = "CAN_EDIT_MANTAINER",
13
- CAN_VIEW_MANAGEMENT = "CAN_VIEW_MANAGEMENT",
14
- VISUALIZE_RENDITION = "VISUALIZE_RENDITION",
15
- CAN_VIEW_ATTENDANCE = "CAN_VIEW_ATTENDANCE",
16
- CAN_ADVANCE_PAYMENT = "CAN_ADVANCE_PAYMENT",
17
- CAN_ASSIGN_RESPONSIBLE = "CAN_ASSIGN_RESPONSIBLE",
18
- CAN_CREATE_INSCRIPTION = "CAN_CREATE_INSCRIPTION",
19
- CAN_VIEW_COURSE_CONTENT = "CAN_VIEW_COURSE_CONTENT",
20
- CAN_EDIT_COURSE_CONTENT = "CAN_EDIT_COURSE_CONTENT",
21
- CAN_REGISTER_ATTENDANCE = "CAN_REGISTER_ATTENDANCE",
22
- CAN_GENERATE_LIQUIDATIONS = "CAN_GENERATE_LIQUIDATIONS",
23
- CAN_GENERATE_PURCHASE_ORDER = "CAN_GENERATE_PURCHASE_ORDER",
24
- CAN_DOWNLOAD_PURCHASE_ORDER = "CAN_DOWNLOAD_PURCHASE_ORDER",
25
- CAN_VIEW_FILTER_RESPONSIBLE = "CAN_VIEW_FILTER_RESPONSIBLE",
26
- CAN_VIEW_MOVILIZATION_TRAVEL = "CAN_VIEW_MOVILIZATION_TRAVEL",
27
- CAN_RECTIFY_COURSE_FRANCHISE = "CAN_RECTIFY_COURSE_FRANCHISE",
28
- CAN_RECTIFY_FINANCING_ACCOUNT = "CAN_RECTIFY_FINANCING_ACCOUNT",
29
- CAN_GENERATE_SENCE_LIQUIDATION = "CAN_GENERATE_SENCE_LIQUIDATION",
30
- CAN_REPORT_MOVILIZATION_TRAVEL = "CAN_REPORT_MOVILIZATION_TRAVEL",
31
- CAN_RECTIFY_COURSE_NO_FRANCHISE = "CAN_RECTIFY_COURSE_NO_FRANCHISE",
32
- CAN_GENERATE_SENCE_COMMUNICATION = "CAN_GENERATE_SENCE_COMMUNICATION",
33
- CAN_UPDATE_REQUIREMENTS_MANUALLY = "CAN_UPDATE_REQUIREMENTS_MANUALLY",
34
- CAN_VIEW_SERVICE = "CAN_VIEW_SERVICE",
35
- CAN_GENERATE_PURCHASE_ORDER_SERVICE = "CAN_GENERATE_PURCHASE_ORDER_SERVICE",
36
- CAN_VIEW_DASHBOARD_CLIENT = "CAN_VIEW_DASHBOARD_CLIENT",
37
- CAN_VIEW_DASHBOARD_PROVIDER = "CAN_VIEW_DASHBOARD_PROVIDER",
38
- MAKE_ADVANCE_SERVICE = "MAKE_ADVANCE_SERVICE",
39
- CAN_IMPORT_EXTENDED_DATA = "CAN_IMPORT_EXTENDED_DATA",
40
- CAN_VIEW_SERVICE_PROVIDER = "CAN_VIEW_SERVICE_PROVIDER",
41
- CAN_VIEW_SERVICE_CLIENT = "CAN_VIEW_SERVICE_CLIENT",
42
- CAN_VIEW_CLIENT = "CAN_VIEW_CLIENT",
43
- CAN_EDIT_SERVICE = "CAN_EDIT_SERVICE",
44
- CAN_CREATE_SCHEDULE = "CAN_CREATE_SCHEDULE",
45
- CAN_EDIT_PLANNED_COURSE = "CAN_EDIT_PLANNED_COURSE",
46
- CAN_SEE_REPORT = "CAN_SEE_REPORT",
47
- CAN_VIEW_SURVEY = "CAN_VIEW_SURVEY"
48
- }
49
- export declare enum SP_Permission {
50
- CAN_VIEW_MENU = "MOSTRAR_MENU_LATERAL",
51
- CAN_CREATE_SYSTEMS = "CREAR_SISTEMAS",
52
- CAN_UPDATE_SYSTEMS = "EDITAR_SISTEMAS",
53
- CAN_CREATE_PROFILES = "CREAR_PERFILES",
54
- CAN_UPDATE_PROFILES = "EDITAR_PERFILES",
55
- CAN_CREATE_FUNCTIONS = "CREAR_FUNCIONES",
56
- CAN_DELETE_SYSTEMS = "ELIMINAR_SISTEMAS",
57
- CAN_VIEW_USERS_LIST = "LISTADO_USUARIOS",
58
- CAN_TOGGLE_SYSTEMS = "HABILITAR_SISTEMAS",
59
- CAN_DELETE_PROFILES = "ELIMINAR_PERFILES",
60
- CAN_DELETE_FUNCTIONS = "ELIMINAR_FUNCIONES",
61
- CAN_VIEW_SYSTEMS_LIST = "LISTADO_DE_SISTEMAS",
62
- CAN_VIEW_PROFILES_LIST = "LISTADO_DE_PERFILES",
63
- CAN_UPDATE_USER_INFO = "EDITAR_INFORMACION_USUARIO",
64
- CAN_ASSIGN_TEMPORARY_PERMISSION = "ASIGNAR_PERMISOS_TEMPORALES",
65
- CAN_DELETE_TEMPORARY_PERMISSION = "ELIMINAR_PERMISOS_TEMPORALES",
66
- CAN_CREATE_USER = "CAN_CREATE_USER"
67
- }
68
- export type PermissionsProps = {
69
- allow?: IN_Permission[] | SP_Permission[];
70
- system?: string;
71
- systems?: string[];
72
- passport?: boolean;
73
- children?: React.ReactNode;
74
- inject?: ContextProps['user'];
75
- };
76
- export type AuthorizationFilterArgs = {
77
- allow: IN_Permission[] | SP_Permission[];
78
- user: UserSystem;
79
- system?: string;
80
- };
81
- export type AuthorizationSystemFlag = {
82
- user: UserSystem;
83
- systems: string[];
84
- passport: boolean;
85
- };
86
- export type AuthorizationProps = (args: AuthorizationFilterArgs) => boolean;
@@ -1,11 +0,0 @@
1
- import { AuthorizationProps, AuthorizationSystemFlag } from './types';
2
- /**
3
- * @description
4
- * Function to check if a user has the required permissions.
5
- * It verifies user permissions based on the provided properties and returns a boolean indicating permission status.
6
- * @example
7
- * authorization({ allow: ["View Dashboard"], user: signal.user, sys?: "Integra Negocio" })
8
- */
9
- export declare const authorization: AuthorizationProps;
10
- export declare const checkSystems: ({ user, passport, systems }: AuthorizationSystemFlag) => boolean;
11
- export declare const defaultSystem = "Integra Negocio";
@@ -1,25 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IN_Permission, SP_Permission } from '../permissions/types';
3
- export declare enum GrantSystem {
4
- IB = "Integra Negocio",
5
- SP = "Sistema de Perfilamiento v2"
6
- }
7
- export type GrantArgs = {
8
- debug?: boolean;
9
- system?: string;
10
- redirect?: string;
11
- popup?: {
12
- text: string;
13
- title: string;
14
- };
15
- };
16
- export type PrivateProps = {
17
- allow?: IN_Permission[] | SP_Permission[];
18
- grants?: GrantArgs;
19
- children?: React.ReactNode;
20
- };
21
- /**
22
- * @param Component - Component to be wrapped.
23
- * @param grants - Grants to be checked.
24
- */
25
- export declare const Private: React.FunctionComponent<PrivateProps>;
@@ -1 +0,0 @@
1
- export declare const secretKey = "HA6NDXoc9#!cC\u00A7pY";
@@ -1,4 +0,0 @@
1
- import { create } from 'zustand';
2
- export declare const createRef: typeof create;
3
- export declare const resetAllStores: () => void;
4
- export { useSessionStore, initialState } from './session';
@@ -1,53 +0,0 @@
1
- import { Response, UserSystem } from '../../../typings';
2
- import { HttpClient, HttpClientOptions } from '../../https';
3
- import { Root as Info } from '../types';
4
- type Session = {
5
- token?: string | null;
6
- expiresAt?: string | null;
7
- refreshToken?: string | null;
8
- };
9
- type State = {
10
- info: Info | null;
11
- error: Error | null;
12
- session: Session | null;
13
- user: UserSystem | null;
14
- api: HttpClient | null;
15
- active?: boolean;
16
- hasHydrated: boolean;
17
- };
18
- type Actions = {
19
- reset: () => void;
20
- setHydrated: (hydrated: boolean) => void;
21
- setHttp: (api: HttpClientOptions) => void;
22
- setError: (error: Error) => void;
23
- setUser: (user?: Session) => Promise<void>;
24
- sync: (token?: Session['token'], refreshToken?: Session['refreshToken']) => Promise<void>;
25
- attempt: (rehydrate?: boolean, args?: Partial<Session>) => Promise<AttemptResponse | void>;
26
- login: (token: string, refreshToken: string) => Promise<AttemptResponse | void>;
27
- };
28
- type AttemptResponse = Response<UserSystem & {
29
- token: string;
30
- }>;
31
- export declare const initialState: State;
32
- /**
33
- * @description
34
- * This store is used to store the session data.
35
- * - token
36
- * - refreshToken
37
- */
38
- export declare const useSessionStore: import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<State & Actions>, "setState"> & {
39
- setState<A extends string | {
40
- type: string;
41
- }>(partial: (State & Actions) | Partial<State & Actions> | ((state: State & Actions) => (State & Actions) | Partial<State & Actions>), replace?: boolean | undefined, action?: A | undefined): void;
42
- }, "persist"> & {
43
- persist: {
44
- setOptions: (options: Partial<import('zustand/middleware').PersistOptions<State & Actions, unknown>>) => void;
45
- clearStorage: () => void;
46
- rehydrate: () => Promise<void> | void;
47
- hasHydrated: () => boolean;
48
- onHydrate: (fn: (state: State & Actions) => void) => () => void;
49
- onFinishHydration: (fn: (state: State & Actions) => void) => () => void;
50
- getOptions: () => Partial<import('zustand/middleware').PersistOptions<State & Actions, unknown>>;
51
- };
52
- }>;
53
- export {};
@@ -1,32 +0,0 @@
1
- export interface Root {
2
- exp: number;
3
- iat: number;
4
- jti: string;
5
- iss: string;
6
- aud: string;
7
- sub: string;
8
- typ: string;
9
- azp: string;
10
- session_state: string;
11
- acr: string;
12
- 'allowed-origins': string[];
13
- realm_access: RealmAccess;
14
- resource_access: ResourceAccess;
15
- scope: string;
16
- sid: string;
17
- email_verified: boolean;
18
- name: string;
19
- preferred_username: string;
20
- given_name: string;
21
- family_name: string;
22
- email: string;
23
- }
24
- export interface RealmAccess {
25
- roles: string[];
26
- }
27
- export interface ResourceAccess {
28
- account: Account;
29
- }
30
- export interface Account {
31
- roles: string[];
32
- }
@@ -1,12 +0,0 @@
1
- declare global {
2
- interface Window {
3
- dataLayer: DataLayerEvent[];
4
- }
5
- }
6
- type EventParams = Record<string, any>;
7
- type DataLayerEvent = {
8
- event: string;
9
- event_params?: EventParams;
10
- };
11
- export declare const tagEvent: (event: string, eventParams?: EventParams) => void;
12
- export {};
@@ -1,26 +0,0 @@
1
- export interface ButtonProps {
2
- /**
3
- * Is this the principal call to action on the page?
4
- */
5
- primary?: boolean;
6
- /**
7
- * What background color to use
8
- */
9
- backgroundColor?: string;
10
- /**
11
- * How large should the button be?
12
- */
13
- size?: 'small' | 'medium' | 'large';
14
- /**
15
- * Button contents
16
- */
17
- label: string;
18
- /**
19
- * Optional click handler
20
- */
21
- onClick?: () => void;
22
- }
23
- /**
24
- * Primary UI component for user interaction
25
- */
26
- export declare const Button: ({ backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- declare const meta: {
3
- title: string;
4
- component: ({ backgroundColor, label, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
- parameters: {
6
- layout: string;
7
- };
8
- tags: string[];
9
- argTypes: {
10
- backgroundColor: {
11
- control: "color";
12
- };
13
- };
14
- args: {
15
- onClick: import('@vitest/spy').Mock<(...args: any[]) => any>;
16
- };
17
- };
18
- export default meta;
19
- type Story = StoryObj<typeof meta>;
20
- export declare const Primary: Story;
21
- export declare const Secondary: Story;
22
- export declare const Large: Story;
23
- export declare const Small: Story;
@@ -1,11 +0,0 @@
1
- type User = {
2
- name: string;
3
- };
4
- export interface HeaderProps {
5
- user?: User;
6
- onLogin?: () => void;
7
- onLogout?: () => void;
8
- onCreateAccount?: () => void;
9
- }
10
- export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,18 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- declare const meta: {
3
- title: string;
4
- component: ({ user, onLogin, onLogout, onCreateAccount }: import('./Header').HeaderProps) => import("react/jsx-runtime").JSX.Element;
5
- tags: string[];
6
- parameters: {
7
- layout: string;
8
- };
9
- args: {
10
- onLogin: import('@vitest/spy').Mock<(...args: any[]) => any>;
11
- onLogout: import('@vitest/spy').Mock<(...args: any[]) => any>;
12
- onCreateAccount: import('@vitest/spy').Mock<(...args: any[]) => any>;
13
- };
14
- };
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
- export declare const LoggedIn: Story;
18
- export declare const LoggedOut: Story;
@@ -1,2 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const Page: React.FC;