@layerfi/components 0.1.13 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -1124,8 +1124,13 @@ declare module '@layerfi/components/components/ProfitAndLossChart/Indicator' {
1124
1124
  type Props = BaseProps & {
1125
1125
  animateFrom: number;
1126
1126
  setAnimateFrom: (x: number) => void;
1127
+ customCursorSize: {
1128
+ width: number;
1129
+ height: number;
1130
+ };
1131
+ setCustomCursorSize: (width: number, height: number, x: number) => void;
1127
1132
  };
1128
- export const Indicator: ({ viewBox, className, animateFrom, setAnimateFrom, }: Props) => React.JSX.Element | null;
1133
+ export const Indicator: ({ className, animateFrom, setAnimateFrom, customCursorSize, setCustomCursorSize, viewBox, }: Props) => React.JSX.Element | null;
1129
1134
  export {};
1130
1135
 
1131
1136
  }
@@ -1850,6 +1855,7 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
1850
1855
  values: string[];
1851
1856
  };
1852
1857
  reportingBasis?: ReportingBasis;
1858
+ fetchMultipleMonths?: boolean;
1853
1859
  };
1854
1860
  type ProfitAndLossFilter = {
1855
1861
  sortBy?: string;
@@ -1878,6 +1884,61 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
1878
1884
  export const useProfitAndLoss: UseProfitAndLoss;
1879
1885
  export {};
1880
1886
 
1887
+ }
1888
+ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossLTM' {
1889
+ import { ProfitAndLoss, ReportingBasis } from '@layerfi/components/types';
1890
+ import { LoadedStatus } from '@layerfi/components/types/general';
1891
+ type UseProfitAndLossLTMProps = {
1892
+ currentDate: Date;
1893
+ tagFilter?: {
1894
+ key: string;
1895
+ values: string[];
1896
+ };
1897
+ reportingBasis?: ReportingBasis;
1898
+ };
1899
+ type UseProfitAndLossLTMReturn = (props?: UseProfitAndLossLTMProps) => {
1900
+ data: {
1901
+ data: ProfitAndLoss | undefined;
1902
+ isLoading: boolean;
1903
+ error: any;
1904
+ startDate: Date;
1905
+ endDate: Date;
1906
+ }[];
1907
+ isLoading?: boolean;
1908
+ loaded?: LoadedStatus;
1909
+ error?: any;
1910
+ };
1911
+ /**
1912
+ * Hooks fetch Last Twelve Months sending 12 requests (one for each month).
1913
+ * Implementation is not perfect, but we cannot use loops and arrays with hooks.
1914
+ */
1915
+ export const useProfitAndLossLTM: UseProfitAndLossLTMReturn;
1916
+ export {};
1917
+
1918
+ }
1919
+ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery' {
1920
+ import { ProfitAndLoss, ReportingBasis } from '@layerfi/components/types';
1921
+ type UseProfitAndLossQueryProps = {
1922
+ startDate: Date;
1923
+ endDate: Date;
1924
+ tagFilter?: {
1925
+ key: string;
1926
+ values: string[];
1927
+ };
1928
+ reportingBasis?: ReportingBasis;
1929
+ };
1930
+ type UseProfitAndLossQueryReturn = (props?: UseProfitAndLossQueryProps) => {
1931
+ data?: ProfitAndLoss;
1932
+ isLoading: boolean;
1933
+ isValidating: boolean;
1934
+ error: any;
1935
+ refetch: () => void;
1936
+ startDate: Date;
1937
+ endDate: Date;
1938
+ };
1939
+ export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
1940
+ export {};
1941
+
1881
1942
  }
1882
1943
  declare module '@layerfi/components/icons/AlertCircle' {
1883
1944
  import * as React from 'react';
@@ -2364,6 +2425,7 @@ declare module '@layerfi/components/types/general' {
2364
2425
  label: string;
2365
2426
  value: string | number;
2366
2427
  }
2428
+ export type LoadedStatus = 'initial' | 'loading' | 'complete';
2367
2429
 
2368
2430
  }
2369
2431
  declare module '@layerfi/components/types/layer_context' {
@@ -2578,7 +2640,7 @@ declare module '@layerfi/components/types/linked_accounts' {
2578
2640
  }
2579
2641
  export type PublicToken = {
2580
2642
  public_token: string;
2581
- institution_id: PlaidInstitution | null;
2643
+ institution: PlaidInstitution | null;
2582
2644
  };
2583
2645
 
2584
2646
  }