@bigbinary/neeto-commons-frontend 2.0.9 → 2.0.11

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.
package/react-utils.d.ts CHANGED
@@ -1,6 +1,14 @@
1
- import { AvatarProps, TooltipProps, TypographyProps } from "@bigbinary/neetoui";
2
- import { LinkType, NavLinkItemType } from "@bigbinary/neetoui/layouts";
3
1
  import React from "react";
2
+
3
+ import {
4
+ AvatarProps,
5
+ CheckboxProps,
6
+ DropdownProps,
7
+ InputProps,
8
+ TooltipProps,
9
+ TypographyProps
10
+ } from "@bigbinary/neetoui";
11
+ import { LinkType, NavLinkItemType } from "@bigbinary/neetoui/layouts";
4
12
  import { RouteProps } from "react-router-dom";
5
13
  import { ObjectAndPrimitives } from "./pure";
6
14
  import { DateTimeType, timeFormat } from "./utils";
@@ -10,7 +18,7 @@ export const HoneybadgerErrorBoundary: React.FC<{
10
18
  }>;
11
19
  export function PrivateRoute(
12
20
  props: {
13
- condition: boolean;
21
+ condition?: boolean;
14
22
  redirectRoute: string;
15
23
  } & RouteProps
16
24
  ): JSX.Element;
@@ -35,12 +43,29 @@ export const Sidebar: React.FC<{
35
43
  extraTopLinks?: LinkType[];
36
44
  showAppSwitcher?: boolean;
37
45
  }>;
46
+ type EmbedCode = React.FC<{
47
+ primaryApp?: string;
48
+ initialSelectedWidgets?: string[];
49
+ }>;
38
50
 
51
+ export const NeetoWidget: {
52
+ EmbedCode: EmbedCode;
53
+ };
54
+
55
+ type OptionsType = {
56
+ root?: Element | null;
57
+ rootMargin?: String;
58
+ threshold?: Number | Number[];
59
+ };
60
+ export function useIsElementVisibleInDom(
61
+ target: Element | null,
62
+ options?: OptionsType
63
+ ): Boolean;
39
64
  export function useDebounce<T>(value: T, delay?: number): T;
40
65
  export function useFuncDebounce<F extends Function>(
41
66
  func: F,
42
67
  delay?: number
43
- ): (F & { cancel: () => void };
68
+ ): F & { cancel: () => void };
44
69
  export function useLocalStorage<T>(
45
70
  key: string,
46
71
  initialValue?: T
@@ -72,7 +97,7 @@ export function createContext<T>(
72
97
  useContext: [T, (action: ActionType<T>) => void];
73
98
  };
74
99
 
75
- export const ErrorPage: React.FC<{}>;
100
+ export const ErrorPage: React.FC<{ homeUrl?: string }>;
76
101
  export const LoginPage: React.FC<{
77
102
  handleSubmit: (data: {
78
103
  user: {
@@ -91,3 +116,16 @@ export const DateFormat: {
91
116
  };
92
117
 
93
118
  export const TimeFormat: typeof DateFormat;
119
+
120
+ export interface ColumnsProps {
121
+ actionBlock?: React.ReactNode;
122
+ checkboxProps?: CheckboxProps;
123
+ columnData: Object[];
124
+ dropdownProps?: DropdownProps,
125
+ fixedColumns?: string[];
126
+ isSearchable?: boolean;
127
+ localStorageKey: string;
128
+ noColumnMessage?: string;
129
+ onChange: (columns: any[]) => any[];
130
+ searchProps?: InputProps;
131
+ }