@bigbinary/neeto-commons-frontend 0.0.1 → 0.0.2

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,99 @@
1
+ import { AvatarProps, TooltipProps, TypographyProps } from "@bigbinary/neetoui";
2
+ import { LinkType, NavLinkItemType } from "@bigbinary/neetoui/layouts";
3
+ import React from "react";
4
+ import { RouteProps } from "react-router-dom";
5
+ import { ObjectAndPrimitives } from "./pure";
6
+ import { DateTimeType, timeFormat } from "./utils";
7
+
8
+ export const HoneybadgerErrorBoundary: React.FC<{
9
+ ErrorComponent?: React.ReactNode | React.ComponentType<any>;
10
+ }>;
11
+ export function PrivateRoute(
12
+ props: {
13
+ condition?: boolean;
14
+ redirectRoute: string;
15
+ } & RouteProps
16
+ ): JSX.Element;
17
+ export const Sidebar: React.FC<{
18
+ navLinks: NavLinkItemType[];
19
+ appName: string;
20
+ profileInfoOverrides?: {
21
+ name?: string;
22
+ email?: string;
23
+ topLinks?: LinkType[];
24
+ bottomLinks?: LinkType[];
25
+ customContent?: React.ReactNode;
26
+ changelogProps?: LinkType;
27
+ helpProps?: LinkType;
28
+ "data-cy"?: string;
29
+ } & AvatarProps;
30
+ organizationInfoOverrides?: {
31
+ logo?: React.ReactNode;
32
+ name?: React.ReactNode;
33
+ subdomain?: React.ReactNode;
34
+ };
35
+ extraTopLinks?: LinkType[];
36
+ showAppSwitcher?: boolean;
37
+ }>;
38
+
39
+ type OptionsType = {
40
+ root?: Element | null,
41
+ rootMargin?: String,
42
+ threshold?: Number | Number[]
43
+ }
44
+ export function useIsElementVisibleInDom(target: Element | null, options?: OptionsType): Boolean
45
+ export function useDebounce<T>(value: T, delay?: number): T;
46
+ export function useFuncDebounce<F extends Function>(
47
+ func: F,
48
+ delay?: number
49
+ ): F & { cancel: () => void };
50
+ export function useLocalStorage<T>(
51
+ key: string,
52
+ initialValue?: T
53
+ ): [T, (value: T) => void];
54
+ export function useOnClickOutside<T>(
55
+ ref: React.MutableRefObject<T>,
56
+ handler: (event: MouseEvent | TouchEvent) => any
57
+ );
58
+ export function usePrevious<T>(value: T): T;
59
+ export function useUpdateEffect(effect: () => void, deps: any[]): void;
60
+
61
+ export function createContext<T>(initialValue: T): {
62
+ Provider: React.FC<{}>;
63
+ useState: T;
64
+ useSetState: React.Dispatch<React.SetStateAction<T>>;
65
+ useContext: [T, React.Dispatch<React.SetStateAction<T>>];
66
+ };
67
+ type ActionType<T> = {
68
+ type: string;
69
+ payload: Partial<T> | ObjectAndPrimitives;
70
+ };
71
+ export function createContext<T>(
72
+ initialValue: T,
73
+ reducer: (prevState: T, action: ActionType<T>) => T
74
+ ): {
75
+ Provider: React.FC<{}>;
76
+ useState: T;
77
+ useDispatch: (action: ActionType<T>) => void;
78
+ useContext: [T, (action: ActionType<T>) => void];
79
+ };
80
+
81
+ export const ErrorPage: React.FC<{ homeUrl?: string }>;
82
+ export const LoginPage: React.FC<{
83
+ handleSubmit: (data: {
84
+ user: {
85
+ email: string;
86
+ password: string;
87
+ };
88
+ }) => any;
89
+ }>;
90
+
91
+ export const DateFormat: {
92
+ [key in Capitalize<keyof typeof timeFormat>]: React.FC<{
93
+ date: DateTimeType;
94
+ typographyProps?: Partial<TypographyProps>;
95
+ tooltipProps?: Partial<TooltipProps>;
96
+ }>;
97
+ };
98
+
99
+ export const TimeFormat: typeof DateFormat;