nectiasw 0.0.12 → 0.0.14

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.
@@ -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
+ }
package/dist/index.d.ts CHANGED
@@ -13,14 +13,14 @@ export type { DropdownProps } from './components/Dropdown';
13
13
  export { Flex, FlexItem } from './components/Flex';
14
14
  export type { FlexProps, FlexItemProps } from './components/Flex';
15
15
  export { Select } from './components/Select';
16
- export type { SelectProps } from './components/Select';
16
+ export type { SelectProps, Option, OptionListProps } from './components/Select';
17
17
  export { Switch } from './components/Switch';
18
18
  export type { SwitchProps } from './components/Switch';
19
19
  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,7 +43,7 @@ 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, } from './components/DeadlineChart';
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';
@@ -51,7 +51,7 @@ export { Badge } from './components/Badge';
51
51
  export { BadgeStatus } from './components/Badge/types';
52
52
  export { Search } from './components/Search';
53
53
  export { ScrollSearch } from './components/Search/variants/ScrollSearch';
54
- export type { SearchItem, SearchProps, ScrollSearchProps, Client, PendingClientElement, Placeholder } from './components/Search/types';
54
+ export type { SearchItem, SearchProps, ScrollSearchProps, Client, PendingClientElement, Placeholder, } from './components/Search/types';
55
55
  export { Pagination } from './components/Pagination';
56
56
  export type { PaginationProps } from './components/Pagination/types';
57
57
  export { Card, DangerTitle, AlertTitle, CheckTitle } from './components/Card';
@@ -62,3 +62,10 @@ export { TotalHours } from './components/Totalhours';
62
62
  export type { TotalHoursProps } from './components/Totalhours';
63
63
  export type { Session, Systems, SystemRole, UserSystem, SessionState, SignalConnection, CommonSignalConnection, } from './typings';
64
64
  export { LocalStorageKeys, UrlSSOParams } from './typings';
65
+ export { useSignal } from './context/hooks';
66
+ export { SignalContext } from './context';
67
+ export type { SignalProps, RefUser, ContextProps } from './context';
68
+ export { HttpClient } from './providers/https';
69
+ export { signalHttps } from './providers/https/http.api';
70
+ export type { Arguments } from './providers/https/http.api';
71
+ export type { HttpClientOptions, HttpResponse } from './providers/https';