@tesouro/embedded-components-react 0.5.273 → 0.5.275

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 (34) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/lib/ReceivablesWidget.d.ts +1 -0
  4. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +10 -9
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +173 -44
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +42 -94
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +91 -76
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +67 -173
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +186 -17
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +27 -0
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +16 -62
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +66 -28
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +28 -34
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +24 -168
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +18 -17
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +9 -9
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +47 -44
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +125 -122
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +50 -47
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +3 -3
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +2 -2
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +51 -51
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +123 -119
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +54 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +41 -41
  32. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +83 -71
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
@@ -1,32 +1,70 @@
1
- import { invalidateAllClients as e, resetAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
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";
2
9
  import "../../../shared/data-access/dist/index.js";
3
- import { receivableHistoryInvalidationKey as n, receivableInvalidationKey as r, receivablePdfInvalidationKey as i, receivablesAnalyticsInvalidationKey as a, receivablesInvalidationKey as o } from "./index2.js";
10
+ import { receivableAttachmentsInvalidationKey as a, receivableInvalidationKey as o } from "./index2.js";
11
+ import { useMutation as s } from "@tanstack/react-query";
4
12
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
5
- async function s({ client: s, organizationId: c, receivableId: l, resetPdf: u = !1 }) {
6
- let d = [
7
- o({
8
- client: s,
9
- organizationId: c
10
- }),
11
- a({
12
- client: s,
13
- organizationId: c
14
- }),
15
- ...l ? [r({
16
- client: s,
17
- organizationId: c,
18
- receivableId: l
19
- }), n({
20
- client: s,
21
- organizationId: c,
22
- receivableId: l
23
- })] : []
24
- ], f = l ? i({
25
- client: s,
26
- organizationId: c,
27
- receivableId: l
28
- }) : void 0;
29
- await Promise.all([...d.map((t) => e(t)), ...f ? [u ? t(f) : e(f)] : []]);
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
+ });
30
68
  }
31
69
  //#endregion
32
- export { s as invalidateReceivable };
70
+ export { d as useDeleteReceivableAttachmentMutation, u as useUploadReceivableAttachmentMutation };
@@ -1,38 +1,32 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
- import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
- import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
1
+ import { invalidateAllClients as e, resetAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
9
2
  import "../../../shared/data-access/dist/index.js";
10
- import { receivableMailsInvalidationKey as i } from "./index2.js";
11
- import { invalidateReceivable as a } from "./index7.js";
12
- import { useMutation as o } from "@tanstack/react-query";
3
+ import { receivableHistoryInvalidationKey as n, receivableInvalidationKey as r, receivablePdfInvalidationKey as i, receivablesAnalyticsInvalidationKey as a, receivablesInvalidationKey as o } from "./index2.js";
13
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js
14
- function s() {
15
- let { client: s, organizationId: c } = n();
16
- return o({
17
- mutationFn: async ({ path: t, body: n }) => {
18
- let { data: i } = await e({
19
- client: s,
20
- headers: r(c),
21
- path: t,
22
- body: n,
23
- throwOnError: !0
24
- });
25
- return i;
26
- },
27
- onSuccess: async (e, n) => {
28
- let r = {
29
- client: s,
30
- organizationId: c,
31
- receivableId: n.path.receivable_id
32
- };
33
- await Promise.all([t(i(r)), a(r)]);
34
- }
35
- });
5
+ async function s({ client: s, organizationId: c, receivableId: l, resetPdf: u = !1 }) {
6
+ let d = [
7
+ o({
8
+ client: s,
9
+ organizationId: c
10
+ }),
11
+ a({
12
+ client: s,
13
+ organizationId: c
14
+ }),
15
+ ...l ? [r({
16
+ client: s,
17
+ organizationId: c,
18
+ receivableId: l
19
+ }), n({
20
+ client: s,
21
+ organizationId: c,
22
+ receivableId: l
23
+ })] : []
24
+ ], f = l ? i({
25
+ client: s,
26
+ organizationId: c,
27
+ receivableId: l
28
+ }) : void 0;
29
+ await Promise.all([...d.map((t) => e(t)), ...f ? [u ? t(f) : e(f)] : []]);
36
30
  }
37
31
  //#endregion
38
- export { s as useSendReceivableEmailMutation };
32
+ export { s as invalidateReceivable };
@@ -2,181 +2,37 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { deleteReceivablesId as e, patchReceivablesId as t, postReceivables as n, postReceivablesIdAccept as r, postReceivablesIdCancel as i, postReceivablesIdClone as a, postReceivablesIdDecline as o, postReceivablesIdIssue as s } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
- import { useEmbedApi as c } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
- import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
5
+ import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
+ import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
8
9
  import "../../../shared/data-access/dist/index.js";
9
- import { invalidateReceivable as u } from "./index7.js";
10
- import { useMutation as d } from "@tanstack/react-query";
10
+ import { receivableMailsInvalidationKey as i } from "./index2.js";
11
+ import { invalidateReceivable as a } from "./index8.js";
12
+ import { useMutation as o } from "@tanstack/react-query";
11
13
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js
12
- function f() {
13
- let { client: e, organizationId: t } = c();
14
- return d({
15
- mutationFn: async ({ body: r }) => {
16
- let { data: i } = await n({
17
- client: e,
18
- headers: l(t),
19
- body: r,
14
+ function s() {
15
+ let { client: s, organizationId: c } = n();
16
+ return o({
17
+ mutationFn: async ({ path: t, body: n }) => {
18
+ let { data: i } = await e({
19
+ client: s,
20
+ headers: r(c),
21
+ path: t,
22
+ body: n,
20
23
  throwOnError: !0
21
24
  });
22
25
  return i;
23
26
  },
24
- onSuccess: async () => {
25
- await u({
26
- client: e,
27
- organizationId: t
28
- });
29
- }
30
- });
31
- }
32
- function p() {
33
- let { client: e, organizationId: n } = c();
34
- return d({
35
- mutationFn: async ({ path: r, body: i }) => {
36
- let { data: a } = await t({
37
- client: e,
38
- headers: l(n),
39
- path: r,
40
- body: i,
41
- throwOnError: !0
42
- });
43
- return a;
44
- },
45
- onSuccess: async (t, r) => {
46
- await u({
47
- client: e,
48
- organizationId: n,
49
- receivableId: r.path.receivable_id,
50
- resetPdf: !0
51
- });
52
- }
53
- });
54
- }
55
- function m() {
56
- let { client: t, organizationId: n } = c();
57
- return d({
58
- mutationFn: async ({ path: r }) => {
59
- await e({
60
- client: t,
61
- headers: l(n),
62
- path: r,
63
- throwOnError: !0
64
- });
65
- },
66
- onSuccess: async (e, r) => {
67
- await u({
68
- client: t,
69
- organizationId: n,
70
- receivableId: r.path.receivable_id
71
- });
72
- }
73
- });
74
- }
75
- function h() {
76
- let { client: e, organizationId: t } = c();
77
- return d({
78
- mutationFn: async ({ path: n }) => {
79
- let { data: r } = await s({
80
- client: e,
81
- headers: l(t),
82
- path: n,
83
- throwOnError: !0
84
- });
85
- return r;
86
- },
87
- onSuccess: async (n, r) => {
88
- await u({
89
- client: e,
90
- organizationId: t,
91
- receivableId: r.path.receivable_id,
92
- resetPdf: !0
93
- });
94
- }
95
- });
96
- }
97
- function g() {
98
- let { client: e, organizationId: t } = c();
99
- return d({
100
- mutationFn: async ({ path: n }) => {
101
- await i({
102
- client: e,
103
- headers: l(t),
104
- path: n,
105
- throwOnError: !0
106
- });
107
- },
108
- onSuccess: async (n, r) => {
109
- await u({
110
- client: e,
111
- organizationId: t,
112
- receivableId: r.path.receivable_id
113
- });
114
- }
115
- });
116
- }
117
- function _() {
118
- let { client: e, organizationId: t } = c();
119
- return d({
120
- mutationFn: async ({ path: n }) => {
121
- let { data: r } = await a({
122
- client: e,
123
- headers: l(t),
124
- path: n,
125
- throwOnError: !0
126
- });
127
- return r;
128
- },
129
- onSuccess: async () => {
130
- await u({
131
- client: e,
132
- organizationId: t
133
- });
134
- }
135
- });
136
- }
137
- function v() {
138
- let { client: e, organizationId: t } = c();
139
- return d({
140
- mutationFn: async ({ path: n, body: i }) => {
141
- let { data: a } = await r({
142
- client: e,
143
- headers: l(t),
144
- path: n,
145
- body: i,
146
- throwOnError: !0
147
- });
148
- return a;
149
- },
150
- onSuccess: async (n, r) => {
151
- await u({
152
- client: e,
153
- organizationId: t,
154
- receivableId: r.path.receivable_id
155
- });
156
- }
157
- });
158
- }
159
- function y() {
160
- let { client: e, organizationId: t } = c();
161
- return d({
162
- mutationFn: async ({ path: n, body: r }) => {
163
- let { data: i } = await o({
164
- client: e,
165
- headers: l(t),
166
- path: n,
167
- body: r,
168
- throwOnError: !0
169
- });
170
- return i;
171
- },
172
- onSuccess: async (n, r) => {
173
- await u({
174
- client: e,
175
- organizationId: t,
176
- receivableId: r.path.receivable_id
177
- });
27
+ onSuccess: async (e, n) => {
28
+ let r = {
29
+ client: s,
30
+ organizationId: c,
31
+ receivableId: n.path.receivable_id
32
+ };
33
+ await Promise.all([t(i(r)), a(r)]);
178
34
  }
179
35
  });
180
36
  }
181
37
  //#endregion
182
- export { v as useAcceptReceivableMutation, g as useCancelReceivableMutation, _ as useCloneReceivableMutation, f as useCreateReceivableMutation, y as useDeclineReceivableMutation, m as useDeleteReceivableMutation, h as useIssueReceivableMutation, p as useUpdateReceivableMutation };
38
+ export { s as useSendReceivableEmailMutation };
@@ -25,13 +25,13 @@ import { ReceivableFormDialog as _ } from "../../../../ui/dist/index41.js";
25
25
  import { ReceivablePaymentDialog as v } from "../../../../ui/dist/index42.js";
26
26
  import { ReceivablePreview as y } from "../../../../ui/dist/index46.js";
27
27
  import { ReceivableRecurrenceEmailDialog as b } from "../../../../ui/dist/index48.js";
28
- import { ReceivableRecurrenceSection as ee } from "../../../../ui/dist/index50.js";
29
- import { ReceivableRemindersSection as te } from "../../../../ui/dist/index52.js";
30
- import { ReceivableSendDialog as ne } from "../../../../ui/dist/index53.js";
31
- import { ReceivablesScreen as re } from "../../../../ui/dist/index55.js";
32
- import { UnsavedInvoiceDialog as ie } from "../../../../ui/dist/index56.js";
28
+ import { ReceivableRecurrenceSection as x } from "../../../../ui/dist/index50.js";
29
+ import { ReceivableRemindersSection as ee } from "../../../../ui/dist/index52.js";
30
+ import { ReceivableSendDialog as te } from "../../../../ui/dist/index53.js";
31
+ import { ReceivablesScreen as ne } from "../../../../ui/dist/index55.js";
32
+ import { UnsavedInvoiceDialog as re } from "../../../../ui/dist/index56.js";
33
33
  import "../../../../ui/dist/index.js";
34
- import { ReceivableAttachmentsSection as x } from "./ReceivableAttachmentsSection.js";
34
+ import { ReceivableAttachmentsSection as ie } from "./ReceivableAttachmentsSection.js";
35
35
  import { MeasureUnitsManagerContainer as S } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
36
36
  import { ProductSelector as C } from "../../../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
37
37
  import "../../../../../shared/product-catalog/feature/dist/index.js";
@@ -39,7 +39,7 @@ import { useReceivablesWidget as w } from "./useReceivablesWidget.js";
39
39
  import { useEffect as T, useId as E } from "react";
40
40
  import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
41
41
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js
42
- function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A, counterpartMessageLabels: j, detailsLabels: M, embeddedBankName: N, filterBarLabels: P, filterLabels: F, formLabels: I, headerStart: L, initialCounterpartId: R, initialView: z, measureUnitDeleteLabels: B, measureUnitsLabels: ae, messageLabels: V, onReceivableCreated: H, onReceivableOpened: U, onTemplateSettingsClick: W, pageSizeOptions: G = u, paymentLabels: K, previewLabels: q, productMessageLabels: J, screenLabels: Y, sendLabels: oe, actionLabels: se, actionsModalLabels: ce }) {
42
+ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A, counterpartMessageLabels: j, detailsLabels: M, embeddedBankName: N, filterBarLabels: P, filterLabels: F, formLabels: I, headerStart: L, initialCounterpartId: ae, initialView: R, measureUnitDeleteLabels: z, measureUnitsLabels: B, messageLabels: V, onReceivableCreated: H, onReceivableOpened: U, onTemplateSettingsClick: W, pageSizeOptions: G = u, paymentLabels: K, previewLabels: q, productMessageLabels: J, screenLabels: Y, sendLabels: oe, actionLabels: se, actionsModalLabels: ce }) {
43
43
  let X = r();
44
44
  T(() => {
45
45
  X(c.Mounted);
@@ -49,16 +49,17 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
49
49
  counterpartMessageLabels: j,
50
50
  embeddedBankName: N,
51
51
  filterLabels: F,
52
- initialCounterpartId: R,
53
- initialView: z,
52
+ initialCounterpartId: ae,
53
+ initialView: R,
54
54
  messageLabels: V,
55
55
  onReceivableCreated: H,
56
56
  onReceivableOpened: U,
57
+ pageSizeOptions: G,
57
58
  screenLabels: Y
58
59
  }), le = E(), Q = E(), $ = E(), ue = E(), de = E();
59
60
  return /* @__PURE__ */ k(D, { children: [
60
61
  /* @__PURE__ */ O(n, { position: "bottom-left" }),
61
- /* @__PURE__ */ O(re, {
62
+ /* @__PURE__ */ O(ne, {
62
63
  rows: Z.table.rows,
63
64
  isLoading: Z.isTableLoading,
64
65
  isError: Z.isError,
@@ -142,7 +143,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
142
143
  ...Z.form.paymentTerms.calendar,
143
144
  onSelect: Z.form.paymentTerms.selectCustomDate
144
145
  }),
145
- recurrenceSection: Z.form.showRecurrenceSection && (Z.form.recurrenceLoading ? /* @__PURE__ */ O(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ O(ee, {
146
+ recurrenceSection: Z.form.showRecurrenceSection && (Z.form.recurrenceLoading ? /* @__PURE__ */ O(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ O(x, {
146
147
  idPrefix: Q,
147
148
  view: Z.form.recurrence.view,
148
149
  disabled: Z.form.isSubmitting,
@@ -165,7 +166,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
165
166
  }),
166
167
  labels: I
167
168
  })),
168
- remindersSection: Z.form.reminders.view && /* @__PURE__ */ O(te, {
169
+ remindersSection: Z.form.reminders.view && /* @__PURE__ */ O(ee, {
169
170
  idPrefix: ue,
170
171
  view: Z.form.reminders.view,
171
172
  onToggle: Z.form.reminders.toggle,
@@ -193,7 +194,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
193
194
  onFormCancel: Z.form.bankAccount.cancelAddAccount,
194
195
  labels: I
195
196
  }),
196
- attachmentsSection: Z.form.attachmentsView && /* @__PURE__ */ O(x, {
197
+ attachmentsSection: Z.form.attachmentsView && /* @__PURE__ */ O(ie, {
197
198
  view: Z.form.attachmentsView,
198
199
  disabled: Z.form.isSubmitting,
199
200
  onFilesSelect: Z.form.selectAttachmentFiles,
@@ -219,7 +220,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
219
220
  onPrimaryClick: Z.form.selectPrimaryMode,
220
221
  labels: I
221
222
  }),
222
- /* @__PURE__ */ O(ie, {
223
+ /* @__PURE__ */ O(re, {
223
224
  ...Z.form.unsavedPrompt,
224
225
  labels: I
225
226
  }),
@@ -243,7 +244,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
243
244
  counterpartType: "customer",
244
245
  onClose: Z.closeCustomerDetails
245
246
  }),
246
- /* @__PURE__ */ O(ne, {
247
+ /* @__PURE__ */ O(te, {
247
248
  open: Z.actions.sendOpen,
248
249
  onOpenChange: (e) => {
249
250
  e || Z.actions.closeSend();
@@ -341,8 +342,8 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
341
342
  open: Z.measureUnitsOpen,
342
343
  onClose: Z.closeMeasureUnits,
343
344
  suspended: Z.actionsSuspended,
344
- managerLabels: ae,
345
- deleteLabels: B,
345
+ managerLabels: B,
346
+ deleteLabels: z,
346
347
  messageLabels: J
347
348
  })
348
349
  ] });
@@ -2,8 +2,8 @@ import { isLineItemTaxable as e } from "./lineItems.js";
2
2
  import { buildReceivableAttachmentDetailsView as t } from "./attachments.js";
3
3
  import { allocateDiscount as n, resolveDiscountAmount as r } from "./totals.js";
4
4
  import { buildReceivableNotesView as i, formatDate as a, formatMoney as o } from "./helpers.js";
5
- import { getPaymentAccountLineLabel as s } from "./bankAccounts.js";
6
- import { formatCountryName as c, formatDeduction as l } from "./preview.js";
5
+ import { formatCountryName as s, formatDeduction as c } from "./preview.js";
6
+ import { getPaymentAccountLineLabel as l } from "./bankAccounts.js";
7
7
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js
8
8
  var u = {
9
9
  draft: {
@@ -181,7 +181,7 @@ function re(e) {
181
181
  return [
182
182
  e.line2 ? `${e.line1} ${e.line2}` : e.line1,
183
183
  t,
184
- e.country ? c(e.country) : void 0
184
+ e.country ? s(e.country) : void 0
185
185
  ].filter(Boolean).join(", ");
186
186
  }
187
187
  function C(e, t, n) {
@@ -262,7 +262,7 @@ function ie(t, i, a) {
262
262
  }), s = r({
263
263
  discount: t.discount,
264
264
  subtotal: o.taxableItemsSubtotal + o.nonTaxableItemsSubtotal
265
- }), { taxableSubtotal: c, nonTaxableSubtotal: u } = n({
265
+ }), { taxableSubtotal: l, nonTaxableSubtotal: u } = n({
266
266
  ...o,
267
267
  discountAmount: s
268
268
  }), d = s > 0, f = o.taxableItemsSubtotal > 0, p = o.nonTaxableItemsSubtotal > 0, m = [{
@@ -271,14 +271,14 @@ function ie(t, i, a) {
271
271
  }];
272
272
  d && m.push({
273
273
  label: a.previewDiscount,
274
- value: l(s, t.currency)
274
+ value: c(s, t.currency)
275
275
  }), p && (f || d) && m.push({
276
276
  label: a.previewNonTaxableSubtotal,
277
277
  value: i(u),
278
278
  tone: "muted"
279
279
  }), f && (p || d) && m.push({
280
280
  label: a.previewTaxableSubtotal,
281
- value: i(c),
281
+ value: i(l),
282
282
  tone: "muted"
283
283
  });
284
284
  for (let e of t.total_tax_amounts ?? []) m.push({
@@ -295,7 +295,7 @@ var ae = {
295
295
  primary: [],
296
296
  overflow: []
297
297
  };
298
- function w({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: c, depositAccount: l, isAccountListIncomplete: m, recurrence: v, paymentRecords: y = [], isLoadingPaymentRecords: x = !1, iterationInvoices: w = /* @__PURE__ */ new Map(), auditHistory: T, statusLabels: E, messages: D, canRecordPayment: O, canWrite: k = !0, onOpenReceivable: A, onOpenCustomer: j, now: oe }) {
298
+ function w({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: s, depositAccount: c, isAccountListIncomplete: m, recurrence: v, paymentRecords: y = [], isLoadingPaymentRecords: x = !1, iterationInvoices: w = /* @__PURE__ */ new Map(), auditHistory: T, statusLabels: E, messages: D, canRecordPayment: O, canWrite: k = !0, onOpenReceivable: A, onOpenCustomer: j, now: oe }) {
299
299
  if (!e || e.type !== "invoice") return;
300
300
  let M = e, N = (e) => o({
301
301
  amount: e ?? 0,
@@ -322,13 +322,13 @@ function w({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: c, d
322
322
  label: D.detailsPaymentReminders,
323
323
  value: h({
324
324
  paymentReminder: r,
325
- overdueReminder: c,
325
+ overdueReminder: s,
326
326
  remindersConfigured: !!(M.payment_reminder_id || M.overdue_reminder_id),
327
327
  messages: D
328
328
  })
329
329
  }, J = {
330
330
  label: D.detailsDepositAccount,
331
- value: l ? s(l, D) : m && M.bank_account_id ? "-" : D.detailsNotProvided
331
+ value: c ? l(c, D) : m && M.bank_account_id ? "-" : D.detailsNotProvided
332
332
  }, Y = {
333
333
  label: D.detailsPaymentTerms,
334
334
  value: M.payment_terms?.name ?? D.detailsPending
@@ -245,6 +245,7 @@ var e = {
245
245
  actionsSubject: "Invoice for {name}",
246
246
  actionsSendSucceeded: "Invoice sent successfully",
247
247
  actionsSendFailed: "Failed to send invoice.",
248
+ actionsSendWithoutPaymentLink: "You haven't onboarded for any payment method. Invoice is sent without a payment link.",
248
249
  actionsTitleSent: "Invoice sent",
249
250
  actionsTitleIssued: "Invoice issued",
250
251
  actionsTitleRecurrence: "Recurring billing activated",