@tesouro/embedded-components-react 0.7.26 → 0.7.28
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/lib/monite-sdk.d.ts +224 -236
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +9 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index20.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/lib/monite-sdk.d.ts
CHANGED
|
@@ -69856,80 +69856,10 @@ declare const FILTER_TYPE_SEARCH$3 = "search";
|
|
|
69856
69856
|
declare const FILTER_TYPE_TYPE$1 = "type";
|
|
69857
69857
|
declare const FILTER_TYPE_IS_CUSTOMER = "is_customer";
|
|
69858
69858
|
|
|
69859
|
-
interface BaseCounterpartOCR {
|
|
69860
|
-
email: string;
|
|
69861
|
-
phone?: string;
|
|
69862
|
-
isCustomer: boolean;
|
|
69863
|
-
isVendor: boolean;
|
|
69864
|
-
line1: string;
|
|
69865
|
-
line2: string;
|
|
69866
|
-
city: string;
|
|
69867
|
-
state: string;
|
|
69868
|
-
postalCode: string;
|
|
69869
|
-
country?: components['schemas']['AllowedCountries'];
|
|
69870
|
-
}
|
|
69871
|
-
interface DefaultValuesOCR<T extends BaseCounterpartOCR> {
|
|
69872
|
-
tax_id: string;
|
|
69873
|
-
counterpart: T;
|
|
69874
|
-
}
|
|
69875
|
-
type DefaultValuesOCRIndividual = DefaultValuesOCR<BaseCounterpartOCR & {
|
|
69876
|
-
firstName?: string;
|
|
69877
|
-
lastName?: string;
|
|
69878
|
-
}>;
|
|
69879
|
-
type DefaultValuesOCROrganization = DefaultValuesOCR<BaseCounterpartOCR & {
|
|
69880
|
-
companyName: string;
|
|
69881
|
-
}>;
|
|
69882
69859
|
/**
|
|
69883
69860
|
* Represents the type of a counterpart in the system.
|
|
69884
69861
|
*/
|
|
69885
69862
|
type CustomerType = 'customer' | 'vendor';
|
|
69886
|
-
/**
|
|
69887
|
-
* Array of available customer types, an array that should contain either customer, vendor, or both.
|
|
69888
|
-
* This array can't be empty and if only one option is passed, the customer type section will be hidden
|
|
69889
|
-
* and the default customer type will be the one passed.
|
|
69890
|
-
* It is set to undefined at component level but defaults to ['customer', 'vendor'] through componentSettings
|
|
69891
|
-
*/
|
|
69892
|
-
type CustomerTypes = CustomerType[];
|
|
69893
|
-
interface GenericCounterpartContact {
|
|
69894
|
-
id: string;
|
|
69895
|
-
counterpart_id: string;
|
|
69896
|
-
/**
|
|
69897
|
-
* @description Is default contact person
|
|
69898
|
-
*/
|
|
69899
|
-
is_default?: boolean;
|
|
69900
|
-
/** @description The address of a contact person. */
|
|
69901
|
-
address?: components['schemas']['CounterpartAddress'];
|
|
69902
|
-
/**
|
|
69903
|
-
* Format: email
|
|
69904
|
-
* @description The email address of a contact person.
|
|
69905
|
-
* @example contact@example.org
|
|
69906
|
-
*/
|
|
69907
|
-
email?: string;
|
|
69908
|
-
/**
|
|
69909
|
-
* @description The person's first name.
|
|
69910
|
-
* @example Adnan
|
|
69911
|
-
*/
|
|
69912
|
-
first_name: string;
|
|
69913
|
-
/** @description Indicates if the counterpart is a customer. */
|
|
69914
|
-
is_customer: boolean;
|
|
69915
|
-
/** @description Indicates if the counterpart is a vendor. */
|
|
69916
|
-
is_vendor: boolean;
|
|
69917
|
-
/**
|
|
69918
|
-
* @description The person's last name.
|
|
69919
|
-
* @example Singh
|
|
69920
|
-
*/
|
|
69921
|
-
last_name: string;
|
|
69922
|
-
/**
|
|
69923
|
-
* @description The person's phone number.
|
|
69924
|
-
* @example 5553211234
|
|
69925
|
-
*/
|
|
69926
|
-
phone?: string;
|
|
69927
|
-
/**
|
|
69928
|
-
* @description The person's title or honorific. Examples: Mr., Ms., Dr., Prof.
|
|
69929
|
-
* @example Mr.
|
|
69930
|
-
*/
|
|
69931
|
-
title?: string;
|
|
69932
|
-
}
|
|
69933
69863
|
type Filters$1 = {
|
|
69934
69864
|
[FILTER_TYPE_SEARCH$3]?: string | null;
|
|
69935
69865
|
[FILTER_TYPE_TYPE$1]?: components['schemas']['CounterpartType'] | null;
|
|
@@ -69969,6 +69899,39 @@ type CounterPartProps = {
|
|
|
69969
69899
|
};
|
|
69970
69900
|
declare const Counterparts: (props: CounterPartProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
69971
69901
|
|
|
69902
|
+
type OptionalFields = {
|
|
69903
|
+
invoiceDate?: boolean;
|
|
69904
|
+
};
|
|
69905
|
+
type OcrRequiredField = 'currency' | 'invoiceDate' | 'counterpart' | 'invoiceNumber' | 'counterpartBankAccount' | 'document_issued_at_date' | 'dueDate' | 'counterpartName' | 'contactPerson' | 'issueDate' | 'amount' | 'appliedPolicy' | 'addedByUser' | 'addedOn' | 'updatedOn';
|
|
69906
|
+
type OcrRequiredFields = Partial<Record<OcrRequiredField, boolean>> | undefined;
|
|
69907
|
+
type PaymentRecordWithIntent = {
|
|
69908
|
+
intent: string;
|
|
69909
|
+
record: components['schemas']['PaymentRecordResponse'];
|
|
69910
|
+
};
|
|
69911
|
+
interface BaseCounterpartOCR {
|
|
69912
|
+
email: string;
|
|
69913
|
+
phone?: string;
|
|
69914
|
+
isCustomer: boolean;
|
|
69915
|
+
isVendor: boolean;
|
|
69916
|
+
line1: string;
|
|
69917
|
+
line2: string;
|
|
69918
|
+
city: string;
|
|
69919
|
+
state: string;
|
|
69920
|
+
postalCode: string;
|
|
69921
|
+
country?: components['schemas']['AllowedCountries'];
|
|
69922
|
+
}
|
|
69923
|
+
interface DefaultValuesOCR<T extends BaseCounterpartOCR> {
|
|
69924
|
+
tax_id: string;
|
|
69925
|
+
counterpart: T;
|
|
69926
|
+
}
|
|
69927
|
+
type DefaultValuesOCRIndividual = DefaultValuesOCR<BaseCounterpartOCR & {
|
|
69928
|
+
firstName?: string;
|
|
69929
|
+
lastName?: string;
|
|
69930
|
+
}>;
|
|
69931
|
+
type DefaultValuesOCROrganization = DefaultValuesOCR<BaseCounterpartOCR & {
|
|
69932
|
+
companyName: string;
|
|
69933
|
+
}>;
|
|
69934
|
+
|
|
69972
69935
|
interface CounterpartsAutocompleteOptionProps {
|
|
69973
69936
|
id: string;
|
|
69974
69937
|
label: string;
|
|
@@ -70028,6 +69991,155 @@ interface CustomersTableProps {
|
|
|
70028
69991
|
}
|
|
70029
69992
|
declare const CustomersTable: (props: CustomersTableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
70030
69993
|
|
|
69994
|
+
type CounterpartResponse = components['schemas']['CounterpartIndividualRootResponse'] | components['schemas']['CounterpartOrganizationRootResponse'];
|
|
69995
|
+
declare const useCounterpartList: (parameters?: Services["finops"]["getCounterparts"]["types"]["parameters"]) => _tanstack_react_query.UseQueryResult<{
|
|
69996
|
+
data: components["schemas"]["CounterpartResponse"][];
|
|
69997
|
+
next_pagination_token?: string;
|
|
69998
|
+
prev_pagination_token?: string;
|
|
69999
|
+
}, {
|
|
70000
|
+
error: components["schemas"]["ErrorSchema"];
|
|
70001
|
+
} | {
|
|
70002
|
+
detail?: components["schemas"]["ValidationError"][];
|
|
70003
|
+
} | Error>;
|
|
70004
|
+
|
|
70005
|
+
declare function getCounterpartName(counterpart: CounterpartResponse | undefined): string;
|
|
70006
|
+
|
|
70007
|
+
interface ApprovalPolicyDetailsProps {
|
|
70008
|
+
/** Approval policy ID */
|
|
70009
|
+
id?: string;
|
|
70010
|
+
/** Callback is fired when a policy is created and sync with server is successful
|
|
70011
|
+
*
|
|
70012
|
+
* @param id - the ID of the created policy
|
|
70013
|
+
*/
|
|
70014
|
+
onCreated?: (id: string) => void;
|
|
70015
|
+
/** Callback is fired when a policy is updated and sync with server is successful
|
|
70016
|
+
*
|
|
70017
|
+
* @param id - the ID of the updated policy
|
|
70018
|
+
*/
|
|
70019
|
+
onUpdated?: (id: string) => void;
|
|
70020
|
+
}
|
|
70021
|
+
/**
|
|
70022
|
+
* ApprovalPolicyDetails component
|
|
70023
|
+
*
|
|
70024
|
+
* This component renders the approval policy details form. It includes fields for the policy name, description, trigger, and script.
|
|
70025
|
+
* The `useApprovalPolicyDetails` hook is used to handle the creation of a new approval policy.
|
|
70026
|
+
*
|
|
70027
|
+
*/
|
|
70028
|
+
declare const ApprovalPolicyDetails: ({ id, onCreated, onUpdated, }: ApprovalPolicyDetailsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
70029
|
+
|
|
70030
|
+
type API = Services;
|
|
70031
|
+
interface CreateMoniteAPIClientResult {
|
|
70032
|
+
requestFn: typeof requestFn;
|
|
70033
|
+
api: API;
|
|
70034
|
+
version: string;
|
|
70035
|
+
}
|
|
70036
|
+
interface CreateMoniteAPIClientOptions {
|
|
70037
|
+
context?: Context<QraftContextValue>;
|
|
70038
|
+
/** Custom headers to include in every request (e.g. x-widget-token) */
|
|
70039
|
+
customHeaders?: Record<string, string>;
|
|
70040
|
+
}
|
|
70041
|
+
declare const createAPIClient: ({ customHeaders, ...qraftClientOptions }?: CreateMoniteAPIClientOptions | undefined) => CreateMoniteAPIClientResult;
|
|
70042
|
+
|
|
70043
|
+
type FilterTypes$1 = Partial<{
|
|
70044
|
+
[FILTER_TYPE_SEARCH$2]: string | null;
|
|
70045
|
+
[FILTER_TYPE_STATUS]: components['schemas']['PayableStateEnum'] | null;
|
|
70046
|
+
[FILTER_TYPE_DUE_DATE]: Date | null;
|
|
70047
|
+
[FILTER_TYPE_SUMMARY_CARD]: PayablesTabFilter | null;
|
|
70048
|
+
}>;
|
|
70049
|
+
type FilterValue$2 = components['schemas']['PayableStateEnum'] | 'all' | Date | string | null;
|
|
70050
|
+
type FieldValueTypes = 'counterpart_id' | 'document_id' | 'amount' | 'due_date' | 'was_created_by_user_id' | 'created_at' | 'issued_at' | 'status' | 'pay';
|
|
70051
|
+
interface MonitePayableTableProps {
|
|
70052
|
+
isShowingSummaryCards?: boolean;
|
|
70053
|
+
fieldOrder?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
70054
|
+
summaryCardFilters?: Record<string, PayablesTabFilter | null>;
|
|
70055
|
+
requiredColumns?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
70056
|
+
displayColumns?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
70057
|
+
}
|
|
70058
|
+
type PayablesTabFilter = NonNullable<API['finops']['getPayables']['types']['parameters']['query']>;
|
|
70059
|
+
|
|
70060
|
+
declare const FILTER_TYPE_SEARCH$2 = "search";
|
|
70061
|
+
declare const FILTER_TYPE_STATUS = "status";
|
|
70062
|
+
declare const FILTER_TYPE_CREATED_AT = "created_at";
|
|
70063
|
+
declare const FILTER_TYPE_DUE_DATE = "due_date";
|
|
70064
|
+
declare const FILTER_TYPE_SUMMARY_CARD = "summary_card_filter";
|
|
70065
|
+
|
|
70066
|
+
declare const FILTER_TYPE_SEARCH$1 = "search";
|
|
70067
|
+
declare const FILTER_TYPE_CREATED_BY = "created_by";
|
|
70068
|
+
|
|
70069
|
+
type FilterTypes = {
|
|
70070
|
+
[FILTER_TYPE_SEARCH$1]?: string | null;
|
|
70071
|
+
[FILTER_TYPE_CREATED_AT]?: Date | null;
|
|
70072
|
+
[FILTER_TYPE_CREATED_BY]?: string | null;
|
|
70073
|
+
};
|
|
70074
|
+
type FilterValue$1 = Date | string | null;
|
|
70075
|
+
|
|
70076
|
+
interface onFilterChangeParams {
|
|
70077
|
+
field: keyof FilterTypes;
|
|
70078
|
+
value: FilterValue$1;
|
|
70079
|
+
}
|
|
70080
|
+
interface ApprovalPoliciesTableProps {
|
|
70081
|
+
onChangeFilter?: (filter: onFilterChangeParams) => void;
|
|
70082
|
+
onRowClick?: (id: string) => void;
|
|
70083
|
+
onCreateClick?: () => void;
|
|
70084
|
+
}
|
|
70085
|
+
/**
|
|
70086
|
+
* ApprovalPoliciesTable component
|
|
70087
|
+
*
|
|
70088
|
+
* This component renders a table of approval policies. It includes pagination and filtering functionality.
|
|
70089
|
+
*/
|
|
70090
|
+
declare const ApprovalPoliciesTable: (props: ApprovalPoliciesTableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
70091
|
+
|
|
70092
|
+
/**
|
|
70093
|
+
* ApprovalPolicies component
|
|
70094
|
+
* TODO: Check if this component is still needed
|
|
70095
|
+
*
|
|
70096
|
+
* This component renders the approval policies page. It includes a table of approval policies, a dialog for creating new approval policies,
|
|
70097
|
+
* and a header with a button for opening the create dialog.
|
|
70098
|
+
*/
|
|
70099
|
+
declare const ApprovalPolicies: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
70100
|
+
|
|
70101
|
+
declare const ApprovalRequests: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
70102
|
+
|
|
70103
|
+
type ApprovalRequestsTableRowAction = 'approve' | 'reject';
|
|
70104
|
+
interface UseApprovalRequestActionsCellProps {
|
|
70105
|
+
/**
|
|
70106
|
+
* The event handler for an approval row action.
|
|
70107
|
+
* If not provided, the action menu will not be displayed.
|
|
70108
|
+
* @param props.id - The identifier of the clicked row, a string.
|
|
70109
|
+
* @param props.action - The action to be performed, an `InvoicesTableRowAction`.
|
|
70110
|
+
*/
|
|
70111
|
+
onRowActionClick: (props: {
|
|
70112
|
+
id: string;
|
|
70113
|
+
action: ApprovalRequestsTableRowAction;
|
|
70114
|
+
}) => Promise<components['schemas']['ApprovalRequestResourceWithMetadata']> | undefined;
|
|
70115
|
+
}
|
|
70116
|
+
|
|
70117
|
+
interface ApprovalRequestsTableBaseProps {
|
|
70118
|
+
/**
|
|
70119
|
+
* The event handler for a row click.
|
|
70120
|
+
*
|
|
70121
|
+
* @param id - The identifier of the clicked row, a string.
|
|
70122
|
+
*/
|
|
70123
|
+
onRowClick?: (id: string) => void;
|
|
70124
|
+
}
|
|
70125
|
+
type ApprovalRequestsTableProps = ApprovalRequestsTableBaseProps | (ApprovalRequestsTableBaseProps & UseApprovalRequestActionsCellProps);
|
|
70126
|
+
declare const ApprovalRequestsTable: (props: ApprovalRequestsTableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
70127
|
+
|
|
70128
|
+
type FinanceStepListItem = {
|
|
70129
|
+
id: string;
|
|
70130
|
+
text: string;
|
|
70131
|
+
};
|
|
70132
|
+
type FinanceStep = {
|
|
70133
|
+
id: number | string;
|
|
70134
|
+
title: string;
|
|
70135
|
+
description: string;
|
|
70136
|
+
description2?: string;
|
|
70137
|
+
list?: {
|
|
70138
|
+
listTitle: string;
|
|
70139
|
+
listItems: FinanceStepListItem[];
|
|
70140
|
+
};
|
|
70141
|
+
};
|
|
70142
|
+
|
|
70031
70143
|
declare const useCounterpartById: (id?: string) => _tanstack_react_query.UseQueryResult<{
|
|
70032
70144
|
id: string;
|
|
70033
70145
|
created_at: string;
|
|
@@ -70066,17 +70178,6 @@ declare const useCounterpartById: (id?: string) => _tanstack_react_query.UseQuer
|
|
|
70066
70178
|
detail?: components["schemas"]["ValidationError"][];
|
|
70067
70179
|
} | Error>;
|
|
70068
70180
|
|
|
70069
|
-
type CounterpartResponse = components['schemas']['CounterpartIndividualRootResponse'] | components['schemas']['CounterpartOrganizationRootResponse'];
|
|
70070
|
-
declare const useCounterpartList: (parameters?: Services["finops"]["getCounterparts"]["types"]["parameters"]) => _tanstack_react_query.UseQueryResult<{
|
|
70071
|
-
data: components["schemas"]["CounterpartResponse"][];
|
|
70072
|
-
next_pagination_token?: string;
|
|
70073
|
-
prev_pagination_token?: string;
|
|
70074
|
-
}, {
|
|
70075
|
-
error: components["schemas"]["ErrorSchema"];
|
|
70076
|
-
} | {
|
|
70077
|
-
detail?: components["schemas"]["ValidationError"][];
|
|
70078
|
-
} | Error>;
|
|
70079
|
-
|
|
70080
70181
|
declare const useCounterpartAddresses: (counterpartId?: string) => _tanstack_react_query.UseQueryResult<{
|
|
70081
70182
|
data: components["schemas"]["CounterpartAddressResponseWithCounterpartID"][];
|
|
70082
70183
|
}, {
|
|
@@ -70108,6 +70209,46 @@ declare const useCounterpartContactList: (counterpartId: string | undefined) =>
|
|
|
70108
70209
|
} | null;
|
|
70109
70210
|
isLoading: boolean;
|
|
70110
70211
|
};
|
|
70212
|
+
interface GenericCounterpartContact {
|
|
70213
|
+
id: string;
|
|
70214
|
+
counterpart_id: string;
|
|
70215
|
+
/**
|
|
70216
|
+
* @description Is default contact person
|
|
70217
|
+
*/
|
|
70218
|
+
is_default?: boolean;
|
|
70219
|
+
/** @description The address of a contact person. */
|
|
70220
|
+
address?: components['schemas']['CounterpartAddress'];
|
|
70221
|
+
/**
|
|
70222
|
+
* Format: email
|
|
70223
|
+
* @description The email address of a contact person.
|
|
70224
|
+
* @example contact@example.org
|
|
70225
|
+
*/
|
|
70226
|
+
email?: string;
|
|
70227
|
+
/**
|
|
70228
|
+
* @description The person's first name.
|
|
70229
|
+
* @example Adnan
|
|
70230
|
+
*/
|
|
70231
|
+
first_name: string;
|
|
70232
|
+
/** @description Indicates if the counterpart is a customer. */
|
|
70233
|
+
is_customer: boolean;
|
|
70234
|
+
/** @description Indicates if the counterpart is a vendor. */
|
|
70235
|
+
is_vendor: boolean;
|
|
70236
|
+
/**
|
|
70237
|
+
* @description The person's last name.
|
|
70238
|
+
* @example Singh
|
|
70239
|
+
*/
|
|
70240
|
+
last_name: string;
|
|
70241
|
+
/**
|
|
70242
|
+
* @description The person's phone number.
|
|
70243
|
+
* @example 5553211234
|
|
70244
|
+
*/
|
|
70245
|
+
phone?: string;
|
|
70246
|
+
/**
|
|
70247
|
+
* @description The person's title or honorific. Examples: Mr., Ms., Dr., Prof.
|
|
70248
|
+
* @example Mr.
|
|
70249
|
+
*/
|
|
70250
|
+
title?: string;
|
|
70251
|
+
}
|
|
70111
70252
|
|
|
70112
70253
|
declare const useEntityUserById: (id: string | undefined) => _tanstack_react_query.UseQueryResult<{
|
|
70113
70254
|
id: string;
|
|
@@ -70943,18 +71084,9 @@ declare const useMyEntity: () => {
|
|
|
70943
71084
|
} | Error>>;
|
|
70944
71085
|
fetchStatus: FetchStatus;
|
|
70945
71086
|
};
|
|
71087
|
+
type EntityResponse = components['schemas']['EntityOrganizationResponse'] | components['schemas']['EntityIndividualResponse'];
|
|
70946
71088
|
declare const getEntityName: (entity?: EntityResponse) => string;
|
|
70947
71089
|
|
|
70948
|
-
type OptionalFields = {
|
|
70949
|
-
invoiceDate?: boolean;
|
|
70950
|
-
};
|
|
70951
|
-
type OcrRequiredField = 'currency' | 'invoiceDate' | 'counterpart' | 'invoiceNumber' | 'counterpartBankAccount' | 'document_issued_at_date' | 'dueDate' | 'counterpartName' | 'contactPerson' | 'issueDate' | 'amount' | 'appliedPolicy' | 'addedByUser' | 'addedOn' | 'updatedOn';
|
|
70952
|
-
type OcrRequiredFields = Partial<Record<OcrRequiredField, boolean>> | undefined;
|
|
70953
|
-
type PaymentRecordWithIntent = {
|
|
70954
|
-
intent: string;
|
|
70955
|
-
record: components['schemas']['PaymentRecordResponse'];
|
|
70956
|
-
};
|
|
70957
|
-
|
|
70958
71090
|
declare const usePaymentRecords: (query: Services["finops"]["getPaymentRecords"]["types"]["parameters"]["query"], enabled?: boolean) => _tanstack_react_query.UseQueryResult<{
|
|
70959
71091
|
data: components["schemas"]["PaymentRecordResponse"][];
|
|
70960
71092
|
next_pagination_token?: string;
|
|
@@ -71385,145 +71517,6 @@ declare const useGetReceivablesAnalytics: (query: Services["finops"]["getAnalyti
|
|
|
71385
71517
|
detail?: components["schemas"]["ValidationError"][];
|
|
71386
71518
|
} | Error>;
|
|
71387
71519
|
|
|
71388
|
-
declare function getCounterpartName(counterpart: CounterpartResponse | undefined): string;
|
|
71389
|
-
type EntityResponse = components['schemas']['EntityOrganizationResponse'] | components['schemas']['EntityIndividualResponse'];
|
|
71390
|
-
|
|
71391
|
-
interface ApprovalPolicyDetailsProps {
|
|
71392
|
-
/** Approval policy ID */
|
|
71393
|
-
id?: string;
|
|
71394
|
-
/** Callback is fired when a policy is created and sync with server is successful
|
|
71395
|
-
*
|
|
71396
|
-
* @param id - the ID of the created policy
|
|
71397
|
-
*/
|
|
71398
|
-
onCreated?: (id: string) => void;
|
|
71399
|
-
/** Callback is fired when a policy is updated and sync with server is successful
|
|
71400
|
-
*
|
|
71401
|
-
* @param id - the ID of the updated policy
|
|
71402
|
-
*/
|
|
71403
|
-
onUpdated?: (id: string) => void;
|
|
71404
|
-
}
|
|
71405
|
-
/**
|
|
71406
|
-
* ApprovalPolicyDetails component
|
|
71407
|
-
*
|
|
71408
|
-
* This component renders the approval policy details form. It includes fields for the policy name, description, trigger, and script.
|
|
71409
|
-
* The `useApprovalPolicyDetails` hook is used to handle the creation of a new approval policy.
|
|
71410
|
-
*
|
|
71411
|
-
*/
|
|
71412
|
-
declare const ApprovalPolicyDetails: ({ id, onCreated, onUpdated, }: ApprovalPolicyDetailsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
71413
|
-
|
|
71414
|
-
type API = Services;
|
|
71415
|
-
interface CreateMoniteAPIClientResult {
|
|
71416
|
-
requestFn: typeof requestFn;
|
|
71417
|
-
api: API;
|
|
71418
|
-
version: string;
|
|
71419
|
-
}
|
|
71420
|
-
interface CreateMoniteAPIClientOptions {
|
|
71421
|
-
context?: Context<QraftContextValue>;
|
|
71422
|
-
/** Custom headers to include in every request (e.g. x-widget-token) */
|
|
71423
|
-
customHeaders?: Record<string, string>;
|
|
71424
|
-
}
|
|
71425
|
-
declare const createAPIClient: ({ customHeaders, ...qraftClientOptions }?: CreateMoniteAPIClientOptions | undefined) => CreateMoniteAPIClientResult;
|
|
71426
|
-
|
|
71427
|
-
type FilterTypes$1 = Partial<{
|
|
71428
|
-
[FILTER_TYPE_SEARCH$2]: string | null;
|
|
71429
|
-
[FILTER_TYPE_STATUS]: components['schemas']['PayableStateEnum'] | null;
|
|
71430
|
-
[FILTER_TYPE_DUE_DATE]: Date | null;
|
|
71431
|
-
[FILTER_TYPE_SUMMARY_CARD]: PayablesTabFilter | null;
|
|
71432
|
-
}>;
|
|
71433
|
-
type FilterValue$2 = components['schemas']['PayableStateEnum'] | 'all' | Date | string | null;
|
|
71434
|
-
type FieldValueTypes = 'counterpart_id' | 'document_id' | 'amount' | 'due_date' | 'was_created_by_user_id' | 'created_at' | 'issued_at' | 'status' | 'pay';
|
|
71435
|
-
interface MonitePayableTableProps {
|
|
71436
|
-
isShowingSummaryCards?: boolean;
|
|
71437
|
-
fieldOrder?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
71438
|
-
summaryCardFilters?: Record<string, PayablesTabFilter | null>;
|
|
71439
|
-
requiredColumns?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
71440
|
-
displayColumns?: [FieldValueTypes, ...FieldValueTypes[]];
|
|
71441
|
-
}
|
|
71442
|
-
type PayablesTabFilter = NonNullable<API['finops']['getPayables']['types']['parameters']['query']>;
|
|
71443
|
-
|
|
71444
|
-
declare const FILTER_TYPE_SEARCH$2 = "search";
|
|
71445
|
-
declare const FILTER_TYPE_STATUS = "status";
|
|
71446
|
-
declare const FILTER_TYPE_CREATED_AT = "created_at";
|
|
71447
|
-
declare const FILTER_TYPE_DUE_DATE = "due_date";
|
|
71448
|
-
declare const FILTER_TYPE_SUMMARY_CARD = "summary_card_filter";
|
|
71449
|
-
|
|
71450
|
-
declare const FILTER_TYPE_SEARCH$1 = "search";
|
|
71451
|
-
declare const FILTER_TYPE_CREATED_BY = "created_by";
|
|
71452
|
-
|
|
71453
|
-
type FilterTypes = {
|
|
71454
|
-
[FILTER_TYPE_SEARCH$1]?: string | null;
|
|
71455
|
-
[FILTER_TYPE_CREATED_AT]?: Date | null;
|
|
71456
|
-
[FILTER_TYPE_CREATED_BY]?: string | null;
|
|
71457
|
-
};
|
|
71458
|
-
type FilterValue$1 = Date | string | null;
|
|
71459
|
-
|
|
71460
|
-
interface onFilterChangeParams {
|
|
71461
|
-
field: keyof FilterTypes;
|
|
71462
|
-
value: FilterValue$1;
|
|
71463
|
-
}
|
|
71464
|
-
interface ApprovalPoliciesTableProps {
|
|
71465
|
-
onChangeFilter?: (filter: onFilterChangeParams) => void;
|
|
71466
|
-
onRowClick?: (id: string) => void;
|
|
71467
|
-
onCreateClick?: () => void;
|
|
71468
|
-
}
|
|
71469
|
-
/**
|
|
71470
|
-
* ApprovalPoliciesTable component
|
|
71471
|
-
*
|
|
71472
|
-
* This component renders a table of approval policies. It includes pagination and filtering functionality.
|
|
71473
|
-
*/
|
|
71474
|
-
declare const ApprovalPoliciesTable: (props: ApprovalPoliciesTableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
71475
|
-
|
|
71476
|
-
/**
|
|
71477
|
-
* ApprovalPolicies component
|
|
71478
|
-
* TODO: Check if this component is still needed
|
|
71479
|
-
*
|
|
71480
|
-
* This component renders the approval policies page. It includes a table of approval policies, a dialog for creating new approval policies,
|
|
71481
|
-
* and a header with a button for opening the create dialog.
|
|
71482
|
-
*/
|
|
71483
|
-
declare const ApprovalPolicies: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
71484
|
-
|
|
71485
|
-
declare const ApprovalRequests: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
71486
|
-
|
|
71487
|
-
type ApprovalRequestsTableRowAction = 'approve' | 'reject';
|
|
71488
|
-
interface UseApprovalRequestActionsCellProps {
|
|
71489
|
-
/**
|
|
71490
|
-
* The event handler for an approval row action.
|
|
71491
|
-
* If not provided, the action menu will not be displayed.
|
|
71492
|
-
* @param props.id - The identifier of the clicked row, a string.
|
|
71493
|
-
* @param props.action - The action to be performed, an `InvoicesTableRowAction`.
|
|
71494
|
-
*/
|
|
71495
|
-
onRowActionClick: (props: {
|
|
71496
|
-
id: string;
|
|
71497
|
-
action: ApprovalRequestsTableRowAction;
|
|
71498
|
-
}) => Promise<components['schemas']['ApprovalRequestResourceWithMetadata']> | undefined;
|
|
71499
|
-
}
|
|
71500
|
-
|
|
71501
|
-
interface ApprovalRequestsTableBaseProps {
|
|
71502
|
-
/**
|
|
71503
|
-
* The event handler for a row click.
|
|
71504
|
-
*
|
|
71505
|
-
* @param id - The identifier of the clicked row, a string.
|
|
71506
|
-
*/
|
|
71507
|
-
onRowClick?: (id: string) => void;
|
|
71508
|
-
}
|
|
71509
|
-
type ApprovalRequestsTableProps = ApprovalRequestsTableBaseProps | (ApprovalRequestsTableBaseProps & UseApprovalRequestActionsCellProps);
|
|
71510
|
-
declare const ApprovalRequestsTable: (props: ApprovalRequestsTableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
71511
|
-
|
|
71512
|
-
type FinanceStepListItem = {
|
|
71513
|
-
id: string;
|
|
71514
|
-
text: string;
|
|
71515
|
-
};
|
|
71516
|
-
type FinanceStep = {
|
|
71517
|
-
id: number | string;
|
|
71518
|
-
title: string;
|
|
71519
|
-
description: string;
|
|
71520
|
-
description2?: string;
|
|
71521
|
-
list?: {
|
|
71522
|
-
listTitle: string;
|
|
71523
|
-
listItems: FinanceStepListItem[];
|
|
71524
|
-
};
|
|
71525
|
-
};
|
|
71526
|
-
|
|
71527
71520
|
type OcrMismatchField = keyof Pick<PayableResponseSchema$1, 'amount_to_pay' | 'counterpart_bank_account_id'>;
|
|
71528
71521
|
type OcrMismatchFields = Partial<Record<OcrMismatchField, boolean>> | undefined;
|
|
71529
71522
|
interface MonitePayableDetailsInfoProps {
|
|
@@ -71781,11 +71774,6 @@ interface ComponentSettings {
|
|
|
71781
71774
|
} & TablePaginationSettings;
|
|
71782
71775
|
counterparts: {
|
|
71783
71776
|
pageSizeOptions: number[];
|
|
71784
|
-
/**
|
|
71785
|
-
* @see {@link CustomerTypes}
|
|
71786
|
-
* @param customerTypes - Array of customer types, defaults to ['customer', 'vendor']
|
|
71787
|
-
*/
|
|
71788
|
-
customerTypes?: CustomerTypes;
|
|
71789
71777
|
} & TablePaginationSettings;
|
|
71790
71778
|
payables: Partial<PayableSettings>;
|
|
71791
71779
|
products: {
|
|
@@ -74341,4 +74329,4 @@ declare const MoniteAPIProvider: ({ children, APIContext, }: {
|
|
|
74341
74329
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
74342
74330
|
|
|
74343
74331
|
export { schema_d as APISchema, ApprovalPolicies, ApprovalPoliciesTable, ApprovalPolicyDetails, ApprovalRequests, ApprovalRequestsTable, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CounterpartAutocomplete, CounterpartDetails, Counterparts, CreateProduct, CustomersTable, Dialog, FinanceBanner, FinanceIntegrationCard, FinanceInvoice, FinanceTab, Integrations, LOGO_MAX_FILE_SIZE_IN_MB, LOGO_SUPPORTED_FORMATS, MoniteAPIProvider, MoniteProvider, MoniteScopedProviders, OCR_SUPPORTED_FORMATS, PageHeader, PayableDetails, Payables, PayablesTable, ProductDetails, Products, ProductsTable, RootElementsProvider, VendorsTable, breakpoints, countryCurrencyList, createAPIClient, dateStringToLocalDate, defaultAvailableCountries, defaultAvailableCurrencies, defaultCounterpartColumnWidth, filterOptions, formatDateRangeFilterChip, formatFilterChipMultiSelectValueSegment, getCounterpartName, getCountries, getCountriesArray, getCurrencies, getCurrenciesArray, getEntityName, getGroupTitleForOption, getIndividualName, getIndividualNameWithFallback, getPayableRefetchInterval, getUserDisplayName, rateMajorToMinor, rateMinorToMajor, sortCurrencyOptionsByGroup, useApprovalPolicyById, useAreCounterpartsLoading, useAutosizeGridColumns, useCancelPayableById, useComboboxAnchor, useComponentSettings, useCounterpartAddresses, useCounterpartById, useCounterpartContactList, useCounterpartList, useCounterpartVatList, useCreatePayable, useCreatePayableLineItem, useCreatePaymentRecord, useCurrencies, useDebounce, useDebounceCallback, useDeletePayable, useDeletePayableLineItem, useDialog, useEntitySettings, useEntityUserByAuthToken, useEntityUserById, useEntityUserNames, useFileById, useFileInput, useForceApprovePayable, useForceRejectPayable, useFormPersist, useGetPayableApprovalRequests, useGetPayableById, useGetPayableCounterpart, useGetPayableLineItems, useGetPayablesAnalytics, useGetReceivableById, useGetReceivables, useGetReceivablesAnalytics, useIsDesktopScreen, useIsExtraLargeDesktopScreen, useIsLargeDesktopScreen, useIsLargerThan, useIsMobile, useIsMobileScreen, useIsMounted, useIsSmallerThan, useIsTabletScreen, useLedgerAccounts, useLocalStorageFields, useMe, useMediaQuery, useMenuButton, useMoniteContext, useMyEntity, useOptionalFields, usePatchEntitiesIdSettings, usePayButtonVisibility, usePayableCallbacks, usePayableDetailsThemeProps, usePayablePaymentIntentsAndRecords, usePaymentIntentById, usePaymentRecordById, usePaymentRecords, useReopenPayable, useRootElements, useSubmitPayableForApproval, useUpdatePayable, useUpdatePayableLineItem };
|
|
74344
|
-
export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, UseEntityUserNamesParams, UseFileInputOptions, VendorDetailsProps, VendorsTableProps };
|
|
74332
|
+
export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, GenericCounterpartContact, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, UseEntityUserNamesParams, UseFileInputOptions, VendorDetailsProps, VendorsTableProps };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
-
import {
|
|
3
|
-
import { VAT_SUPPORTED_COUNTRIES as r } from "./index142.js";
|
|
2
|
+
import { VAT_SUPPORTED_COUNTRIES as t } from "./index142.js";
|
|
4
3
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js
|
|
5
|
-
var
|
|
4
|
+
var n = () => {
|
|
6
5
|
let { api: t } = e();
|
|
7
6
|
return t.finops.getEntityUsersMe.useQuery({}, {
|
|
8
7
|
retry: !1,
|
|
@@ -10,13 +9,13 @@ var i = () => {
|
|
|
10
9
|
refetchOnMount: !1,
|
|
11
10
|
refetchOnWindowFocus: !1
|
|
12
11
|
});
|
|
13
|
-
},
|
|
14
|
-
let { api:
|
|
12
|
+
}, r = () => {
|
|
13
|
+
let { api: n, entityId: r } = e(), i = n.finops.getEntityUsersMyEntity.useQuery({}, {
|
|
15
14
|
retry: !1,
|
|
16
15
|
staleTime: Infinity,
|
|
17
16
|
refetchOnMount: !1,
|
|
18
17
|
refetchOnWindowFocus: !1
|
|
19
|
-
}), { data: a } =
|
|
18
|
+
}), { data: a } = n.finops.getEntitiesIdSettings.useQuery({ path: { entity_id: r } }), s = !!(i.data?.address && t.includes(i.data?.address.country)), c = !!(i.data?.address && i.data?.address.country === "US"), l = a?.receivable_edit_flow === "non_compliant", u = o(i.data);
|
|
20
19
|
return {
|
|
21
20
|
...i,
|
|
22
21
|
entityName: u,
|
|
@@ -24,13 +23,13 @@ var i = () => {
|
|
|
24
23
|
isUSEntity: c,
|
|
25
24
|
isNonCompliantFlow: l
|
|
26
25
|
};
|
|
27
|
-
}, o = (e) => {
|
|
26
|
+
}, i = (e) => e?.type === "individual", a = (e) => e?.type === "organization", o = (e) => {
|
|
28
27
|
if (!e) return "";
|
|
29
|
-
if (
|
|
28
|
+
if (i(e)) {
|
|
30
29
|
let { first_name: t, last_name: n } = e.individual;
|
|
31
30
|
return `${t} ${n}`;
|
|
32
31
|
}
|
|
33
|
-
return
|
|
32
|
+
return a(e) ? e.organization.legal_name : "";
|
|
34
33
|
};
|
|
35
34
|
//#endregion
|
|
36
|
-
export { o as getEntityName,
|
|
35
|
+
export { o as getEntityName, n as useMe, r as useMyEntity };
|
|
@@ -24,8 +24,7 @@ var a = [10, 25], o = (o, s) => ({
|
|
|
24
24
|
pageSizeOptions: s?.counterparts?.pageSizeOptions || a,
|
|
25
25
|
paginationLayout: s?.counterparts?.paginationLayout,
|
|
26
26
|
navigationPosition: s?.counterparts?.navigationPosition,
|
|
27
|
-
pageSizePosition: s?.counterparts?.pageSizePosition
|
|
28
|
-
customerTypes: s?.counterparts?.customerTypes || ["customer", "vendor"]
|
|
27
|
+
pageSizePosition: s?.counterparts?.pageSizePosition
|
|
29
28
|
},
|
|
30
29
|
payables: {
|
|
31
30
|
pageSizeOptions: s?.payables?.pageSizeOptions || a,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { fromMinorUnits as e, toMinorUnits as t } from "./index13.js";
|
|
2
2
|
import "./index18.js";
|
|
3
|
-
import "./index53.js";
|
|
4
3
|
import { resolveNullableUpdate as n } from "./index285.js";
|
|
5
4
|
import { format as r } from "date-fns";
|
|
6
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { getIndividualName as e } from "./index15.js";
|
|
2
|
-
import "./index18.js";
|
|
3
|
-
import "date-fns";
|
|
4
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js
|
|
5
3
|
var t = (e) => e.type === "individual", n = (e) => e.type === "organization";
|
|
6
4
|
function r(r) {
|
|
@@ -15,6 +13,5 @@ function r(r) {
|
|
|
15
13
|
}
|
|
16
14
|
return "";
|
|
17
15
|
}
|
|
18
|
-
var i = (e) => e?.type === "individual", a = (e) => e?.type === "organization";
|
|
19
16
|
//#endregion
|
|
20
|
-
export { r as getCounterpartName, t as isIndividualCounterpart,
|
|
17
|
+
export { r as getCounterpartName, t as isIndividualCounterpart, n as isOrganizationCounterpart };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.7.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.7.28", n = "025c33f1e3659888a23ec8e3ee94d8ca2574d2fd", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|