@bigbinary/neeto-commons-frontend 2.0.41 → 2.0.43

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
@@ -17,6 +17,7 @@ import { ObjectAndPrimitives } from "./pure";
17
17
  import { DateTimeType, timeFormat } from "./utils";
18
18
  import { History } from "history";
19
19
  import { StoreApi, UseBoundStore } from "zustand";
20
+ import { Dayjs } from "dayjs";
20
21
 
21
22
  export const HoneybadgerErrorBoundary: React.FC<{
22
23
  ErrorComponent?: React.ReactNode | React.ComponentType<any>;
@@ -131,7 +132,7 @@ export const Columns: React.FC<{
131
132
  noColumnMessage?: string;
132
133
  onChange: (columns: any[]) => any[];
133
134
  searchProps?: InputProps;
134
- }>
135
+ }>;
135
136
 
136
137
  type ZustandConfigType = (
137
138
  set: (data: any) => void,
@@ -176,6 +177,18 @@ export function useFieldSubmit(onSubmit: () => any): {
176
177
  current: HTMLInputElement & HTMLTextAreaElement;
177
178
  };
178
179
 
180
+ interface TimePeriodType {
181
+ startDate: Dayjs;
182
+ endDate: Dayjs;
183
+ rangeType: string;
184
+ }
185
+
186
+ export const DateRangeFilter: React.FC<{
187
+ timePeriod: TimePeriodType;
188
+ setTimePeriod: React.Dispatch<React.SetStateAction<TimePeriodType>>;
189
+ timePeriodOptions: TimePeriodType[];
190
+ }>;
191
+
179
192
  export const Schedule: React.FC<{
180
193
  isEditing?: boolean;
181
194
  setIsEditing?: React.Dispatch<React.SetStateAction<boolean>>;
@@ -269,8 +282,8 @@ type ConfigType = {
269
282
  enabled?: boolean;
270
283
  };
271
284
  export function useHotKeys(
272
- hotkey: string,
273
- handler: () => void,
285
+ hotkey: string | string[],
286
+ handler: (event: React.KeyboardEvent) => void,
274
287
  config?: ConfigType
275
288
  ): React.MutableRefObject | null;
276
289
 
@@ -278,3 +291,13 @@ export function useKeyboardShortcutsPaneState(): [
278
291
  boolean,
279
292
  React.Dispatch<React.SetStateAction<boolean>>
280
293
  ];
294
+
295
+ export const EmailPreview: React.FC<{
296
+ to?: string[];
297
+ subject?: string;
298
+ body?: string;
299
+ from?: string;
300
+ logo?: string;
301
+ productName?: string;
302
+ actionButtonText?: string;
303
+ }>;