@tesouro/embedded-components-react 0.5.200 → 0.5.202

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.
Files changed (45) hide show
  1. package/dist/index.d.ts +20 -0
  2. package/dist/index.js +1 -1
  3. package/dist/lib/ReceivablesWidget.d.ts +20 -0
  4. package/dist/lib/ReceivablesWidget.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +6 -6
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +24 -18
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +65 -2
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +174 -234
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +32 -65
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +143 -102
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +48 -221
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +303 -0
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +75 -0
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +114 -0
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +237 -0
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index4.js +14 -1
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +30 -215
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +211 -370
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +64 -62
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +409 -187
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +73 -40
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +10 -9
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +0 -9
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +4 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +10 -263
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +1 -72
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +241 -363
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +66 -100
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +406 -76
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +92 -330
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +93 -0
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +344 -0
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +10 -1
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +157 -20
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +24 -1
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +1 -3
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +3 -18
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +2 -0
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +18 -4
  41. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +37 -37
  42. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +54 -54
  43. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +115 -94
  44. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  45. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4915,6 +4915,10 @@ interface ReceivableFormSheetLabels {
4915
4915
  unitNone: string;
4916
4916
  manageUnitsOption: string;
4917
4917
  priceLabel: string;
4918
+ taxableLabel: string;
4919
+ taxRateLabel: string;
4920
+ taxRatePlaceholder: string;
4921
+ taxRateSuffix: string;
4918
4922
  decreaseQuantityButton: string;
4919
4923
  increaseQuantityButton: string;
4920
4924
  addLineItemButton: string;
@@ -4931,6 +4935,11 @@ interface ReceivableFormSheetLabels {
4931
4935
  closingNoteLabel: string;
4932
4936
  closingNotePlaceholder: string;
4933
4937
  closingNoteDescription: string;
4938
+ attachmentsHeading: string;
4939
+ attachmentsDescription: string;
4940
+ attachmentsDropPrompt: string;
4941
+ attachmentsBrowseLink: string;
4942
+ attachmentsFormatsHint: string;
4934
4943
  }
4935
4944
  interface ReceivableDetailsSheetLabels {
4936
4945
  hiddenDescription: string;
@@ -5057,6 +5066,17 @@ interface ReceivableMessageLabels {
5057
5066
  markUncollectibleTitle: string;
5058
5067
  markUncollectibleDescription: string;
5059
5068
  markUncollectibleConfirm: string;
5069
+ attachmentsEmailCaption: string;
5070
+ attachmentsRecurringEmailCaption: string;
5071
+ attachmentIncludeInEmail: string;
5072
+ attachmentRemove: string;
5073
+ attachmentUploading: string;
5074
+ attachmentUploadFailed: string;
5075
+ attachmentTooLarge: string;
5076
+ attachmentUnsupportedType: string;
5077
+ attachmentsCountLimit: string;
5078
+ attachmentIncludedInEmail: string;
5079
+ attachmentNotIncludedInEmail: string;
5060
5080
  }
5061
5081
 
5062
5082
  interface ReceivablesWidgetOwnProps {
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import { InsightsWidget as L } from "./libs/tesouro-embedded-components-react/in
27
27
  import { UploadReceiptWidget as R } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js";
28
28
  import { ExpenseManagementWidget as z } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js";
29
29
  import { InvoicingWidget as B } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js";
30
- import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js";
30
+ import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js";
31
31
  import { SettingsSection as H } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
32
32
  import { HELP_FAQ_EN as U } from "./libs/tesouro-embedded-components-react/settings-widget/help/ui/contract/dist/index3.js";
33
33
  import { SettingsWidget as W } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
@@ -959,6 +959,10 @@ interface ReceivableFormSheetLabels {
959
959
  unitNone: string;
960
960
  manageUnitsOption: string;
961
961
  priceLabel: string;
962
+ taxableLabel: string;
963
+ taxRateLabel: string;
964
+ taxRatePlaceholder: string;
965
+ taxRateSuffix: string;
962
966
  decreaseQuantityButton: string;
963
967
  increaseQuantityButton: string;
964
968
  addLineItemButton: string;
@@ -975,6 +979,11 @@ interface ReceivableFormSheetLabels {
975
979
  closingNoteLabel: string;
976
980
  closingNotePlaceholder: string;
977
981
  closingNoteDescription: string;
982
+ attachmentsHeading: string;
983
+ attachmentsDescription: string;
984
+ attachmentsDropPrompt: string;
985
+ attachmentsBrowseLink: string;
986
+ attachmentsFormatsHint: string;
978
987
  }
979
988
  interface ReceivableDetailsSheetLabels {
980
989
  hiddenDescription: string;
@@ -1101,6 +1110,17 @@ interface ReceivableMessageLabels {
1101
1110
  markUncollectibleTitle: string;
1102
1111
  markUncollectibleDescription: string;
1103
1112
  markUncollectibleConfirm: string;
1113
+ attachmentsEmailCaption: string;
1114
+ attachmentsRecurringEmailCaption: string;
1115
+ attachmentIncludeInEmail: string;
1116
+ attachmentRemove: string;
1117
+ attachmentUploading: string;
1118
+ attachmentUploadFailed: string;
1119
+ attachmentTooLarge: string;
1120
+ attachmentUnsupportedType: string;
1121
+ attachmentsCountLimit: string;
1122
+ attachmentIncludedInEmail: string;
1123
+ attachmentNotIncludedInEmail: string;
1104
1124
  }
1105
1125
 
1106
1126
  interface ReceivablesWidgetOwnProps {
@@ -1,3 +1,3 @@
1
- import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js";
1
+ import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js";
2
2
  import "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js";
3
3
  export { e as ReceivablesWidget };
@@ -2,12 +2,12 @@ import { usePaymentTermsQuery as e } from "../../../shared/data-access/dist/lib/
2
2
  import "../../../shared/data-access/dist/index.js";
3
3
  import "./index2.js";
4
4
  import "./index3.js";
5
- import "./index4.js";
6
- import { useSendReceivableEmailMutation as t } from "./index5.js";
7
- import { useAcceptReceivableMutation as n, useCancelReceivableMutation as r, useCloneReceivableMutation as i, useCreateReceivableMutation as a, useDeclineReceivableMutation as o, useDeleteReceivableMutation as s, useIssueReceivableMutation as c, useUpdateReceivableMutation as l } from "./index6.js";
5
+ import { useDeleteReceivableAttachmentMutation as t, useUploadReceivableAttachmentMutation as n } from "./index4.js";
6
+ import { useSendReceivableEmailMutation as r } from "./index5.js";
7
+ import { useAcceptReceivableMutation as i, useCancelReceivableMutation as a, useCloneReceivableMutation as o, useCreateReceivableMutation as s, useDeclineReceivableMutation as c, useDeleteReceivableMutation as l, useIssueReceivableMutation as u, useUpdateReceivableMutation as d } from "./index6.js";
8
8
  import "./index7.js";
9
- import { useMarkReceivablePaidMutation as u, useMarkReceivablePartiallyPaidMutation as d, useMarkReceivableUncollectibleMutation as f } from "./index8.js";
10
- import { useReceivableHistoryQuery as p, useReceivableMailsQuery as m, useReceivablePdfLinkQuery as h, useReceivableQuery as g, useReceivablesQuery as _ } from "./index9.js";
9
+ import { useMarkReceivablePaidMutation as f, useMarkReceivablePartiallyPaidMutation as p, useMarkReceivableUncollectibleMutation as m } from "./index8.js";
10
+ import { useReceivableHistoryQuery as h, useReceivableMailsQuery as g, useReceivablePdfLinkQuery as _, useReceivableQuery as v, useReceivablesQuery as y } from "./index9.js";
11
11
  import "./index10.js";
12
12
  import "./index11.js";
13
- export { n as useAcceptReceivableMutation, r as useCancelReceivableMutation, i as useCloneReceivableMutation, a as useCreateReceivableMutation, o as useDeclineReceivableMutation, s as useDeleteReceivableMutation, c as useIssueReceivableMutation, u as useMarkReceivablePaidMutation, d as useMarkReceivablePartiallyPaidMutation, f as useMarkReceivableUncollectibleMutation, e as usePaymentTermsQuery, p as useReceivableHistoryQuery, m as useReceivableMailsQuery, h as useReceivablePdfLinkQuery, g as useReceivableQuery, _ as useReceivablesQuery, t as useSendReceivableEmailMutation, l as useUpdateReceivableMutation };
13
+ export { i as useAcceptReceivableMutation, a as useCancelReceivableMutation, o as useCloneReceivableMutation, s as useCreateReceivableMutation, c as useDeclineReceivableMutation, t as useDeleteReceivableAttachmentMutation, l as useDeleteReceivableMutation, u as useIssueReceivableMutation, f as useMarkReceivablePaidMutation, p as useMarkReceivablePartiallyPaidMutation, m as useMarkReceivableUncollectibleMutation, e as usePaymentTermsQuery, h as useReceivableHistoryQuery, g as useReceivableMailsQuery, _ as useReceivablePdfLinkQuery, v as useReceivableQuery, y as useReceivablesQuery, r as useSendReceivableEmailMutation, d as useUpdateReceivableMutation, n as useUploadReceivableAttachmentMutation };
@@ -1,42 +1,48 @@
1
- import { getAnalyticsReceivablesQueryKey as e, getPaymentRecordsQueryKey as t, getReceivablesIdHistoryQueryKey as n, getReceivablesIdMailsQueryKey as r, getReceivablesIdPdfLinkQueryKey as i, getReceivablesIdQueryKey as a, getReceivablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
2
- import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
1
+ import { getAnalyticsReceivablesQueryKey as e, getFilesQueryKey as t, getPaymentRecordsQueryKey as n, getReceivablesIdHistoryQueryKey as r, getReceivablesIdMailsQueryKey as i, getReceivablesIdPdfLinkQueryKey as a, getReceivablesIdQueryKey as o, getReceivablesQueryKey as s } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
2
+ import { organizationHeaders as c } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
3
3
  import "../../../shared/data-access/dist/index.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js
5
- var c = ({ client: e, organizationId: t }) => {
6
- let [n] = o({
5
+ var l = ({ client: e, organizationId: t }) => {
6
+ let [n] = s({
7
7
  client: e,
8
- headers: s(t)
8
+ headers: c(t)
9
9
  }), r = { ...n };
10
10
  return delete r.query, [r];
11
- }, l = ({ client: e, organizationId: t, receivableId: n }) => a({
11
+ }, u = ({ client: e, organizationId: t, receivableId: n }) => o({
12
12
  client: e,
13
- headers: s(t),
13
+ headers: c(t),
14
14
  path: { receivable_id: n }
15
- }), u = ({ client: e, organizationId: t, receivableId: r }) => n({
16
- client: e,
17
- headers: s(t),
18
- path: { receivable_id: r }
19
15
  }), d = ({ client: e, organizationId: t, receivableId: n }) => r({
20
16
  client: e,
21
- headers: s(t),
17
+ headers: c(t),
22
18
  path: { receivable_id: n }
23
19
  }), f = ({ client: e, organizationId: t, receivableId: n }) => i({
24
20
  client: e,
25
- headers: s(t),
21
+ headers: c(t),
22
+ path: { receivable_id: n }
23
+ }), p = ({ client: e, organizationId: t, receivableId: n }) => a({
24
+ client: e,
25
+ headers: c(t),
26
26
  path: { receivable_id: n }
27
- }), p = ({ client: e, organizationId: n }) => {
27
+ }), m = ({ client: e, organizationId: n }) => {
28
28
  let [r] = t({
29
29
  client: e,
30
- headers: s(n)
30
+ headers: c(n)
31
+ }), i = { ...r };
32
+ return delete i.query, [i];
33
+ }, h = ({ client: e, organizationId: t }) => {
34
+ let [r] = n({
35
+ client: e,
36
+ headers: c(t)
31
37
  }), i = { ...r };
32
38
  return delete i.query, [i];
33
- }, m = ({ client: t, organizationId: n }) => {
39
+ }, g = ({ client: t, organizationId: n }) => {
34
40
  let [r] = e({
35
41
  client: t,
36
- headers: s(n),
42
+ headers: c(n),
37
43
  query: {}
38
44
  }), i = { ...r };
39
45
  return delete i.query, [i];
40
46
  };
41
47
  //#endregion
42
- export { p as paymentRecordsInvalidationKey, u as receivableHistoryInvalidationKey, l as receivableInvalidationKey, d as receivableMailsInvalidationKey, f as receivablePdfInvalidationKey, m as receivablesAnalyticsInvalidationKey, c as receivablesInvalidationKey };
48
+ export { h as paymentRecordsInvalidationKey, m as receivableAttachmentsInvalidationKey, d as receivableHistoryInvalidationKey, u as receivableInvalidationKey, f as receivableMailsInvalidationKey, p as receivablePdfInvalidationKey, g as receivablesAnalyticsInvalidationKey, l as receivablesInvalidationKey };
@@ -2,6 +2,69 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
+ import { deleteFilesId as e, postFiles as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { invalidateAllClients as n } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
+ import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
5
9
  import "../../../shared/data-access/dist/index.js";
6
- import "./index2.js";
7
- import "@tanstack/react-query";
10
+ import { receivableAttachmentsInvalidationKey as a, receivableInvalidationKey as o } from "./index2.js";
11
+ import { useMutation as s } from "@tanstack/react-query";
12
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js
13
+ var c = "attachments";
14
+ async function l({ client: e, organizationId: t, receivableId: r }) {
15
+ let i = [a({
16
+ client: e,
17
+ organizationId: t
18
+ }), ...r ? [o({
19
+ client: e,
20
+ organizationId: t,
21
+ receivableId: r
22
+ })] : []];
23
+ await Promise.all(i.map((e) => n(e)));
24
+ }
25
+ function u() {
26
+ let { client: e, organizationId: n } = r();
27
+ return s({
28
+ mutationFn: async ({ file: r }) => {
29
+ let { data: a } = await t({
30
+ client: e,
31
+ headers: i(n),
32
+ body: {
33
+ file: r,
34
+ file_type: c
35
+ },
36
+ throwOnError: !0
37
+ });
38
+ return a;
39
+ },
40
+ onSuccess: async (t, r) => {
41
+ await l({
42
+ client: e,
43
+ organizationId: n,
44
+ receivableId: r.receivableId
45
+ });
46
+ }
47
+ });
48
+ }
49
+ function d() {
50
+ let { client: t, organizationId: n } = r();
51
+ return s({
52
+ mutationFn: async ({ path: r }) => {
53
+ await e({
54
+ client: t,
55
+ headers: i(n),
56
+ path: r,
57
+ throwOnError: !0
58
+ });
59
+ },
60
+ onSuccess: async (e, r) => {
61
+ await l({
62
+ client: t,
63
+ organizationId: n,
64
+ receivableId: r.receivableId
65
+ });
66
+ }
67
+ });
68
+ }
69
+ //#endregion
70
+ export { d as useDeleteReceivableAttachmentMutation, u as useUploadReceivableAttachmentMutation };
@@ -1,3 +1,3 @@
1
1
  import { InvoicingWidget as e } from "./index3.js";
2
- import { ReceivablesWidget as t } from "./index13.js";
2
+ import { ReceivablesWidget as t } from "./index17.js";
3
3
  export { e as InvoicingWidget, t as ReceivablesWidget };