@unifiedsoftware/react-components 1.0.0

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,184 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ReactNode, FC } from 'react';
4
+ import * as styled_components from 'styled-components';
5
+ import * as _unifiedsoftware_react_router from '@unifiedsoftware/react-router';
6
+
7
+ interface IDropEnumList {
8
+ dataEnum: object;
9
+ description: Map<any, Map<number, string>>;
10
+ width: number;
11
+ defaultValue: number;
12
+ onChange: (number: any) => void;
13
+ }
14
+ declare const DropEnumList: React.FC<IDropEnumList>;
15
+
16
+ interface IBreadCrumbContext {
17
+ active: string;
18
+ setActive: (value: string) => void;
19
+ path: string;
20
+ setPath: (value: string) => void;
21
+ routes: {
22
+ route: string | -1;
23
+ title: string;
24
+ }[];
25
+ setRoutes: (value: {
26
+ route: string | -1;
27
+ title: string;
28
+ }[]) => void;
29
+ pathChild: string;
30
+ setPathChild: (value: string) => void;
31
+ goBack: boolean;
32
+ setGoBack: (value: boolean) => void;
33
+ }
34
+ declare const BreadCrumbContext: react.Context<IBreadCrumbContext>;
35
+ interface Props$5 {
36
+ children: ReactNode;
37
+ }
38
+ declare const BreadCrumbContextProvider: ({ children }: Props$5) => react_jsx_runtime.JSX.Element;
39
+
40
+ interface IDrawerContext {
41
+ active: boolean;
42
+ setActive: (value: boolean) => void;
43
+ }
44
+ declare const DrawerContext: react.Context<IDrawerContext>;
45
+ interface Props$4 {
46
+ children: ReactNode;
47
+ }
48
+ declare const DrawerContextProvider: FC<Props$4>;
49
+
50
+ interface GlobalProps {
51
+ children: ReactNode;
52
+ }
53
+ declare function GlobalProvider({ children }: GlobalProps): react_jsx_runtime.JSX.Element;
54
+
55
+ interface HistoryPath {
56
+ path: string;
57
+ name: string;
58
+ date?: Date;
59
+ }
60
+ interface IHistoryContext {
61
+ list: HistoryPath[];
62
+ updateList: (list: HistoryPath) => void;
63
+ }
64
+ declare const HistoryContext: react.Context<IHistoryContext>;
65
+ interface Props$3 {
66
+ children: React.ReactNode;
67
+ }
68
+ declare const HistoryContextProvider: ({ children }: Props$3) => react_jsx_runtime.JSX.Element;
69
+
70
+ interface ISidebarMainContext {
71
+ open: boolean;
72
+ setOpen: (value: boolean) => void;
73
+ }
74
+ declare const SidebarMainContext: react.Context<ISidebarMainContext>;
75
+ interface Props$2 {
76
+ children: ReactNode;
77
+ }
78
+ declare const SidebarMainContextProvider: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
79
+
80
+ interface Props$1 {
81
+ title?: string;
82
+ paths?: {
83
+ route: string | -1;
84
+ title: string;
85
+ }[];
86
+ }
87
+ declare const AppBreadCrumb: ({ title, paths }: Props$1) => react_jsx_runtime.JSX.Element;
88
+ declare const AppBreadCrumbNav: ({ paths }: {
89
+ paths?: {
90
+ route: string;
91
+ title: string;
92
+ }[] | undefined;
93
+ }) => react_jsx_runtime.JSX.Element;
94
+
95
+ type LoadingType = 'window' | 'page' | 'grid' | 'button' | 'card' | 'div' | 'none';
96
+ /**
97
+ * If the gridContent exists, render the loader in the gridContent, otherwise, if the reportContent
98
+ * exists, render the loader in the reportContent, otherwise, render the loader in the current
99
+ * component.
100
+ * @returns A React component that is a portal.
101
+ */
102
+ declare const LoaderGrid: () => react_jsx_runtime.JSX.Element;
103
+ interface ILoaderProps {
104
+ type?: LoadingType;
105
+ parent?: string;
106
+ minDuration?: number;
107
+ }
108
+ /**
109
+ * It's a React component that renders a loading indicator in a parent element.
110
+ * @param props - {type?: LoadingType; parent?: string; minDuration?: number;}
111
+ * @returns A React component that is a function.
112
+ */
113
+ declare const AppLoader: FC<ILoaderProps>;
114
+
115
+ interface CustomBtns {
116
+ title?: string;
117
+ render?: React.ReactNode;
118
+ Icon?: ({ className }: {
119
+ className: string;
120
+ }) => JSX.Element;
121
+ onAction?: () => void;
122
+ }
123
+ interface CustomExcel {
124
+ title: string;
125
+ classNameIcon: string;
126
+ onAction: () => void;
127
+ }
128
+ interface ICustomizeColumns {
129
+ disabled?: boolean;
130
+ className?: string;
131
+ entityType: number;
132
+ data: any[];
133
+ onFetched: (columns: any[]) => void;
134
+ }
135
+ interface NavOptionsProps {
136
+ exportExcel?: CustomExcel[];
137
+ customButtons?: CustomBtns[];
138
+ onCreate?: () => void;
139
+ onRefresh?: () => void;
140
+ onSelect?: () => void;
141
+ onClear?: () => void;
142
+ onExpandScreen?: () => void;
143
+ }
144
+ declare const NavOptions: FC<NavOptionsProps>;
145
+
146
+ interface Props {
147
+ title?: string;
148
+ }
149
+ declare const Title: ({ title }: Props) => react_jsx_runtime.JSX.Element;
150
+
151
+ declare const Breadcrumb: styled_components.StyledComponent<"div", any, {}, never>;
152
+ declare const BreadCrumbTitle: styled_components.StyledComponent<"div", any, {}, never>;
153
+
154
+ interface MenuItemProps {
155
+ type?: 'row' | 'col';
156
+ width?: string;
157
+ }
158
+ declare const MenuItem: styled_components.StyledComponent<react.ForwardRefExoticComponent<_unifiedsoftware_react_router.LinkProps & react.RefAttributes<HTMLAnchorElement>>, any, MenuItemProps, never>;
159
+ declare const MenuTitle: styled_components.StyledComponent<"p", any, {}, never>;
160
+
161
+ interface NavbarProps {
162
+ gradient?: boolean;
163
+ }
164
+ declare const Navbar: styled_components.StyledComponent<"nav", any, NavbarProps, never>;
165
+
166
+ declare const MenuOptions: styled_components.StyledComponent<"div", any, {}, never>;
167
+
168
+ interface SidebarProps {
169
+ width?: string;
170
+ active?: boolean;
171
+ fixed?: boolean;
172
+ shadow?: boolean;
173
+ }
174
+ declare const ItemSidebar: styled_components.StyledComponent<"div", any, {}, never>;
175
+ declare const SidebarNavigation: styled_components.StyledComponent<"nav", any, SidebarProps, never>;
176
+ declare const ItemLinkSidebar: styled_components.StyledComponent<react.ForwardRefExoticComponent<_unifiedsoftware_react_router.LinkProps & react.RefAttributes<HTMLAnchorElement>>, any, {}, never>;
177
+
178
+ interface MainProps {
179
+ activeDrawer: boolean;
180
+ }
181
+ declare const Main: styled_components.StyledComponent<"main", any, MainProps, never>;
182
+ declare const CloseIcon: styled_components.StyledComponent<"button", any, {}, never>;
183
+
184
+ export { AppBreadCrumb, AppBreadCrumbNav, AppLoader, BreadCrumbContext, BreadCrumbContextProvider, BreadCrumbTitle, Breadcrumb, CloseIcon, CustomBtns, CustomExcel, DrawerContext, DrawerContextProvider, DropEnumList, GlobalProps, GlobalProvider, HistoryContext, HistoryContextProvider, IBreadCrumbContext, ICustomizeColumns, ILoaderProps, ItemLinkSidebar, ItemSidebar, LoaderGrid, LoadingType, Main, MenuItem as MenuItems, MenuOptions, MenuTitle, NavOptions, NavOptionsProps, Navbar, SidebarMainContext, SidebarMainContextProvider, SidebarNavigation, Title };
@@ -0,0 +1,184 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ReactNode, FC } from 'react';
4
+ import * as styled_components from 'styled-components';
5
+ import * as _unifiedsoftware_react_router from '@unifiedsoftware/react-router';
6
+
7
+ interface IDropEnumList {
8
+ dataEnum: object;
9
+ description: Map<any, Map<number, string>>;
10
+ width: number;
11
+ defaultValue: number;
12
+ onChange: (number: any) => void;
13
+ }
14
+ declare const DropEnumList: React.FC<IDropEnumList>;
15
+
16
+ interface IBreadCrumbContext {
17
+ active: string;
18
+ setActive: (value: string) => void;
19
+ path: string;
20
+ setPath: (value: string) => void;
21
+ routes: {
22
+ route: string | -1;
23
+ title: string;
24
+ }[];
25
+ setRoutes: (value: {
26
+ route: string | -1;
27
+ title: string;
28
+ }[]) => void;
29
+ pathChild: string;
30
+ setPathChild: (value: string) => void;
31
+ goBack: boolean;
32
+ setGoBack: (value: boolean) => void;
33
+ }
34
+ declare const BreadCrumbContext: react.Context<IBreadCrumbContext>;
35
+ interface Props$5 {
36
+ children: ReactNode;
37
+ }
38
+ declare const BreadCrumbContextProvider: ({ children }: Props$5) => react_jsx_runtime.JSX.Element;
39
+
40
+ interface IDrawerContext {
41
+ active: boolean;
42
+ setActive: (value: boolean) => void;
43
+ }
44
+ declare const DrawerContext: react.Context<IDrawerContext>;
45
+ interface Props$4 {
46
+ children: ReactNode;
47
+ }
48
+ declare const DrawerContextProvider: FC<Props$4>;
49
+
50
+ interface GlobalProps {
51
+ children: ReactNode;
52
+ }
53
+ declare function GlobalProvider({ children }: GlobalProps): react_jsx_runtime.JSX.Element;
54
+
55
+ interface HistoryPath {
56
+ path: string;
57
+ name: string;
58
+ date?: Date;
59
+ }
60
+ interface IHistoryContext {
61
+ list: HistoryPath[];
62
+ updateList: (list: HistoryPath) => void;
63
+ }
64
+ declare const HistoryContext: react.Context<IHistoryContext>;
65
+ interface Props$3 {
66
+ children: React.ReactNode;
67
+ }
68
+ declare const HistoryContextProvider: ({ children }: Props$3) => react_jsx_runtime.JSX.Element;
69
+
70
+ interface ISidebarMainContext {
71
+ open: boolean;
72
+ setOpen: (value: boolean) => void;
73
+ }
74
+ declare const SidebarMainContext: react.Context<ISidebarMainContext>;
75
+ interface Props$2 {
76
+ children: ReactNode;
77
+ }
78
+ declare const SidebarMainContextProvider: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
79
+
80
+ interface Props$1 {
81
+ title?: string;
82
+ paths?: {
83
+ route: string | -1;
84
+ title: string;
85
+ }[];
86
+ }
87
+ declare const AppBreadCrumb: ({ title, paths }: Props$1) => react_jsx_runtime.JSX.Element;
88
+ declare const AppBreadCrumbNav: ({ paths }: {
89
+ paths?: {
90
+ route: string;
91
+ title: string;
92
+ }[] | undefined;
93
+ }) => react_jsx_runtime.JSX.Element;
94
+
95
+ type LoadingType = 'window' | 'page' | 'grid' | 'button' | 'card' | 'div' | 'none';
96
+ /**
97
+ * If the gridContent exists, render the loader in the gridContent, otherwise, if the reportContent
98
+ * exists, render the loader in the reportContent, otherwise, render the loader in the current
99
+ * component.
100
+ * @returns A React component that is a portal.
101
+ */
102
+ declare const LoaderGrid: () => react_jsx_runtime.JSX.Element;
103
+ interface ILoaderProps {
104
+ type?: LoadingType;
105
+ parent?: string;
106
+ minDuration?: number;
107
+ }
108
+ /**
109
+ * It's a React component that renders a loading indicator in a parent element.
110
+ * @param props - {type?: LoadingType; parent?: string; minDuration?: number;}
111
+ * @returns A React component that is a function.
112
+ */
113
+ declare const AppLoader: FC<ILoaderProps>;
114
+
115
+ interface CustomBtns {
116
+ title?: string;
117
+ render?: React.ReactNode;
118
+ Icon?: ({ className }: {
119
+ className: string;
120
+ }) => JSX.Element;
121
+ onAction?: () => void;
122
+ }
123
+ interface CustomExcel {
124
+ title: string;
125
+ classNameIcon: string;
126
+ onAction: () => void;
127
+ }
128
+ interface ICustomizeColumns {
129
+ disabled?: boolean;
130
+ className?: string;
131
+ entityType: number;
132
+ data: any[];
133
+ onFetched: (columns: any[]) => void;
134
+ }
135
+ interface NavOptionsProps {
136
+ exportExcel?: CustomExcel[];
137
+ customButtons?: CustomBtns[];
138
+ onCreate?: () => void;
139
+ onRefresh?: () => void;
140
+ onSelect?: () => void;
141
+ onClear?: () => void;
142
+ onExpandScreen?: () => void;
143
+ }
144
+ declare const NavOptions: FC<NavOptionsProps>;
145
+
146
+ interface Props {
147
+ title?: string;
148
+ }
149
+ declare const Title: ({ title }: Props) => react_jsx_runtime.JSX.Element;
150
+
151
+ declare const Breadcrumb: styled_components.StyledComponent<"div", any, {}, never>;
152
+ declare const BreadCrumbTitle: styled_components.StyledComponent<"div", any, {}, never>;
153
+
154
+ interface MenuItemProps {
155
+ type?: 'row' | 'col';
156
+ width?: string;
157
+ }
158
+ declare const MenuItem: styled_components.StyledComponent<react.ForwardRefExoticComponent<_unifiedsoftware_react_router.LinkProps & react.RefAttributes<HTMLAnchorElement>>, any, MenuItemProps, never>;
159
+ declare const MenuTitle: styled_components.StyledComponent<"p", any, {}, never>;
160
+
161
+ interface NavbarProps {
162
+ gradient?: boolean;
163
+ }
164
+ declare const Navbar: styled_components.StyledComponent<"nav", any, NavbarProps, never>;
165
+
166
+ declare const MenuOptions: styled_components.StyledComponent<"div", any, {}, never>;
167
+
168
+ interface SidebarProps {
169
+ width?: string;
170
+ active?: boolean;
171
+ fixed?: boolean;
172
+ shadow?: boolean;
173
+ }
174
+ declare const ItemSidebar: styled_components.StyledComponent<"div", any, {}, never>;
175
+ declare const SidebarNavigation: styled_components.StyledComponent<"nav", any, SidebarProps, never>;
176
+ declare const ItemLinkSidebar: styled_components.StyledComponent<react.ForwardRefExoticComponent<_unifiedsoftware_react_router.LinkProps & react.RefAttributes<HTMLAnchorElement>>, any, {}, never>;
177
+
178
+ interface MainProps {
179
+ activeDrawer: boolean;
180
+ }
181
+ declare const Main: styled_components.StyledComponent<"main", any, MainProps, never>;
182
+ declare const CloseIcon: styled_components.StyledComponent<"button", any, {}, never>;
183
+
184
+ export { AppBreadCrumb, AppBreadCrumbNav, AppLoader, BreadCrumbContext, BreadCrumbContextProvider, BreadCrumbTitle, Breadcrumb, CloseIcon, CustomBtns, CustomExcel, DrawerContext, DrawerContextProvider, DropEnumList, GlobalProps, GlobalProvider, HistoryContext, HistoryContextProvider, IBreadCrumbContext, ICustomizeColumns, ILoaderProps, ItemLinkSidebar, ItemSidebar, LoaderGrid, LoadingType, Main, MenuItem as MenuItems, MenuOptions, MenuTitle, NavOptions, NavOptionsProps, Navbar, SidebarMainContext, SidebarMainContextProvider, SidebarNavigation, Title };