@layerfi/components 0.1.68 → 0.1.69

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
@@ -66,6 +66,7 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
66
66
  direction?: 'INFLOW' | 'OUTFLOW';
67
67
  startDate?: string;
68
68
  endDate?: string;
69
+ tagFilterString?: string;
69
70
  sortOrder?: 'ASC' | 'DESC';
70
71
  sortBy?: string;
71
72
  }
@@ -2615,7 +2616,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2615
2616
  };
2616
2617
  const ProfitAndLoss: {
2617
2618
  ({ children, tagFilter, reportingBasis, asContainer, }: Props): React.JSX.Element;
2618
- Chart: ({ forceRerenderOnDataChange, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
2619
+ Chart: ({ forceRerenderOnDataChange, tagFilter, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
2619
2620
  Context: React.Context<{
2620
2621
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
2621
2622
  filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
@@ -2652,14 +2653,14 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2652
2653
  }>;
2653
2654
  }>;
2654
2655
  DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
2655
- CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2656
+ CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2656
2657
  Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, }: {
2657
2658
  vertical?: boolean | undefined;
2658
2659
  actionable?: boolean | undefined;
2659
2660
  revenueLabel?: string | undefined;
2660
2661
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2661
2662
  }) => React.JSX.Element;
2662
- Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfilAndLostTableProps) => React.JSX.Element;
2663
+ Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
2663
2664
  DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
2664
2665
  scope?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
2665
2666
  hideClose?: boolean | undefined;
@@ -2703,8 +2704,12 @@ declare module '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossC
2703
2704
  import React from 'react';
2704
2705
  export interface Props {
2705
2706
  forceRerenderOnDataChange?: boolean;
2707
+ tagFilter?: {
2708
+ key: string;
2709
+ values: string[];
2710
+ };
2706
2711
  }
2707
- export const ProfitAndLossChart: ({ forceRerenderOnDataChange, }: Props) => React.JSX.Element;
2712
+ export const ProfitAndLossChart: ({ forceRerenderOnDataChange, tagFilter, }: Props) => React.JSX.Element;
2708
2713
 
2709
2714
  }
2710
2715
  declare module '@layerfi/components/components/ProfitAndLossChart/index' {
@@ -2729,11 +2734,12 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/Profi
2729
2734
  tagKey: string;
2730
2735
  tagValues: string[];
2731
2736
  } | 'None';
2737
+ export const tagFilterToQueryString: (tagFilter: TagFilterInput) => string;
2732
2738
  export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2733
2739
 
2734
2740
  }
2735
2741
  declare module '@layerfi/components/components/ProfitAndLossCompareOptions/index' {
2736
- export { ProfitAndLossCompareOptions } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2742
+ export { ProfitAndLossCompareOptions, ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2737
2743
 
2738
2744
  }
2739
2745
  declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
@@ -2872,7 +2878,7 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
2872
2878
  import { View as ViewType } from '@layerfi/components/types/general';
2873
2879
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
2874
2880
  import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
2875
- import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
2881
+ import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/index';
2876
2882
  type ViewBreakpoint = ViewType | undefined;
2877
2883
  export interface ProfitAndLossReportProps {
2878
2884
  stringOverrides?: ReportsStringOverrides;
@@ -2937,18 +2943,18 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
2937
2943
  profitBeforeTaxesLabel?: string;
2938
2944
  netProfitLabel?: string;
2939
2945
  }
2940
- export type ProfilAndLostTableProps = {
2946
+ export type ProfitAndLossTableProps = {
2941
2947
  lockExpanded?: boolean;
2942
2948
  asContainer?: boolean;
2943
2949
  stringOverrides?: ProfitAndLossTableStringOverrides;
2944
2950
  };
2945
- export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }: ProfilAndLostTableProps) => React.JSX.Element;
2951
+ export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }: ProfitAndLossTableProps) => React.JSX.Element;
2946
2952
 
2947
2953
  }
2948
2954
  declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableWithProvider' {
2949
2955
  import React from 'react';
2950
- import { ProfilAndLostTableProps } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent';
2951
- export const ProfitAndLossTableWithProvider: (props: ProfilAndLostTableProps) => React.JSX.Element;
2956
+ import { ProfitAndLossTableProps } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent';
2957
+ export const ProfitAndLossTableWithProvider: (props: ProfitAndLossTableProps) => React.JSX.Element;
2952
2958
 
2953
2959
  }
2954
2960
  declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_and_loss_report' {
@@ -3394,13 +3400,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3394
3400
  floating: HTMLElement | null;
3395
3401
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3396
3402
  context: {
3397
- update: () => void;
3403
+ placement: import("@floating-ui/utils").Placement;
3398
3404
  x: number;
3399
3405
  y: number;
3400
- placement: import("@floating-ui/utils").Placement;
3401
3406
  strategy: import("@floating-ui/utils").Strategy;
3402
3407
  middlewareData: import("@floating-ui/core").MiddlewareData;
3403
3408
  isPositioned: boolean;
3409
+ update: () => void;
3404
3410
  floatingStyles: React.CSSProperties;
3405
3411
  open: boolean;
3406
3412
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -3443,13 +3449,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3443
3449
  floating: HTMLElement | null;
3444
3450
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
3445
3451
  context: {
3446
- update: () => void;
3452
+ placement: import("@floating-ui/utils").Placement;
3447
3453
  x: number;
3448
3454
  y: number;
3449
- placement: import("@floating-ui/utils").Placement;
3450
3455
  strategy: import("@floating-ui/utils").Strategy;
3451
3456
  middlewareData: import("@floating-ui/core").MiddlewareData;
3452
3457
  isPositioned: boolean;
3458
+ update: () => void;
3453
3459
  floatingStyles: React.CSSProperties;
3454
3460
  open: boolean;
3455
3461
  onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
@@ -3479,8 +3485,12 @@ declare module '@layerfi/components/components/TransactionToReviewCard/Transacti
3479
3485
  export interface TransactionToReviewCardProps {
3480
3486
  onClick?: () => void;
3481
3487
  usePnlDateRange?: boolean;
3488
+ tagFilter?: {
3489
+ key: string;
3490
+ values: string[];
3491
+ };
3482
3492
  }
3483
- export const TransactionToReviewCard: ({ onClick, usePnlDateRange, }: TransactionToReviewCardProps) => React.JSX.Element;
3493
+ export const TransactionToReviewCard: ({ onClick, usePnlDateRange, tagFilter, }: TransactionToReviewCardProps) => React.JSX.Element;
3484
3494
 
3485
3495
  }
3486
3496
  declare module '@layerfi/components/components/TransactionToReviewCard/index' {
@@ -3998,6 +4008,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/index' {
3998
4008
 
3999
4009
  }
4000
4010
  declare module '@layerfi/components/hooks/useBankTransactions/types' {
4011
+ import { TagFilterInput } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
4001
4012
  import { BankTransaction, CategoryUpdate, DateRange, Direction, DisplayState, Metadata } from '@layerfi/components/types';
4002
4013
  import { LoadedStatus } from '@layerfi/components/types/general';
4003
4014
  export interface NumericRangeFilter {
@@ -4014,6 +4025,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
4014
4025
  direction?: Direction[];
4015
4026
  categorizationStatus?: DisplayState;
4016
4027
  dateRange?: Partial<DateRange>;
4028
+ tagFilter?: TagFilterInput;
4017
4029
  }
4018
4030
  export type UseBankTransactions = (params?: {
4019
4031
  scope?: DisplayState;
@@ -4299,13 +4311,14 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
4299
4311
  import { LineBaseItem } from '@layerfi/components/types/line_item';
4300
4312
  export type Scope = 'expenses' | 'revenue';
4301
4313
  export type SidebarScope = Scope | undefined;
4314
+ export type PnlTagFilter = {
4315
+ key: string;
4316
+ values: string[];
4317
+ };
4302
4318
  type Props = {
4303
4319
  startDate?: Date;
4304
4320
  endDate?: Date;
4305
- tagFilter?: {
4306
- key: string;
4307
- values: string[];
4308
- };
4321
+ tagFilter?: PnlTagFilter;
4309
4322
  reportingBasis?: ReportingBasis;
4310
4323
  };
4311
4324
  type ProfitAndLossFilter = {
@@ -4838,6 +4851,7 @@ declare module '@layerfi/components/index' {
4838
4851
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
4839
4852
  export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
4840
4853
  export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
4854
+ export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/index';
4841
4855
  export { Reports } from '@layerfi/components/views/Reports/index';
4842
4856
  export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
4843
4857
  export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
@@ -5942,6 +5956,7 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
5942
5956
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
5943
5957
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
5944
5958
  import { OnboardingStep } from '@layerfi/components/types/layer_context';
5959
+ import { TagOption } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
5945
5960
  interface AccountingOverviewStringOverrides {
5946
5961
  header?: string;
5947
5962
  profitAndLoss?: {
@@ -5958,8 +5973,10 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
5958
5973
  middleBanner?: ReactNode;
5959
5974
  chartColorsList?: string[];
5960
5975
  stringOverrides?: AccountingOverviewStringOverrides;
5976
+ tagFilter?: TagOption;
5977
+ showTransactionsToReview?: boolean;
5961
5978
  }
5962
- export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, }: AccountingOverviewProps) => React.JSX.Element;
5979
+ export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter, showTransactionsToReview, }: AccountingOverviewProps) => React.JSX.Element;
5963
5980
  export {};
5964
5981
 
5965
5982
  }
@@ -6049,6 +6066,32 @@ declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
6049
6066
  declare module '@layerfi/components/views/GeneralLedger/index' {
6050
6067
  export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/GeneralLedger';
6051
6068
 
6069
+ }
6070
+ declare module '@layerfi/components/views/ProjectProfitability/ProjectProfitability' {
6071
+ import React from 'react';
6072
+ import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
6073
+ import { MoneyFormat } from '@layerfi/components/types';
6074
+ export type TagOption = {
6075
+ label: string;
6076
+ tagKey: string;
6077
+ tagValues: string[];
6078
+ };
6079
+ export interface ProjectsStringOverrides {
6080
+ title?: string;
6081
+ }
6082
+ export interface ProjectProfitabilityProps {
6083
+ valueOptions: TagOption[];
6084
+ showTitle?: boolean;
6085
+ stringOverrides?: ProjectsStringOverrides;
6086
+ datePickerMode?: DateRangeDatePickerModes;
6087
+ csvMoneyFormat?: MoneyFormat;
6088
+ }
6089
+ export const ProjectProfitabilityView: ({ valueOptions, showTitle, stringOverrides, datePickerMode, csvMoneyFormat, }: ProjectProfitabilityProps) => React.JSX.Element;
6090
+
6091
+ }
6092
+ declare module '@layerfi/components/views/ProjectProfitability/index' {
6093
+ export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
6094
+
6052
6095
  }
6053
6096
  declare module '@layerfi/components/views/Reports/Reports' {
6054
6097
  import React, { RefObject } from 'react';