@tesouro/embedded-components-react 0.11.235 → 0.11.236
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/README.md +2 -2
- package/dist/index.css +12 -0
- package/dist/index.d.ts +24 -0
- package/dist/lib/ReceivablesWidget.d.ts +24 -0
- package/dist/lib/WidgetSuite.d.ts +24 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +198 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +76 -194
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +67 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +111 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +459 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +101 -449
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +9 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +85 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +67 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +246 -71
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +40 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +237 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +21 -244
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +529 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +4 -530
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +44 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +242 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +3 -245
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +63 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +386 -354
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +260 -258
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +219 -179
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +31 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +40 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +30 -63
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +463 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +15 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +19 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +15 -66
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +66 -391
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +148 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +173 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +3 -71
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +37 -432
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +66 -188
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +455 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +191 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +5 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +261 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +2 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +122 -230
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +27 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +216 -224
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +3 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +228 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +29 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +152 -109
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +140 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index65.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/document-preview.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +122 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +0 -2
|
@@ -2,125 +2,136 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../../../node_modules/sonner/dist/index.js";
|
|
6
|
+
import { hasAnyScope as t } from "../../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as n } from "../../../../../shared/data-access/dist/lib/scopes.js";
|
|
7
8
|
import "../../../../../shared/data-access/dist/index.js";
|
|
8
|
-
import
|
|
9
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
+
import { useRefetchWidget as r, useWidgetConfig as i, useWidgetError as ee, useWidgetInitStaleForToken as te, useWidgetLoading as ne } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
11
|
import "../../../../../shared/feature/dist/index.js";
|
|
10
|
-
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as
|
|
12
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as re } from "../../../../../shared/document-status/ui/dist/index6.js";
|
|
11
13
|
import "../../../../../shared/document-status/ui/dist/index.js";
|
|
12
|
-
import { getDocumentTitle as
|
|
13
|
-
import { hasSelectedText as
|
|
14
|
+
import { getDocumentTitle as a } from "./helpers.js";
|
|
15
|
+
import { hasSelectedText as ie } from "../../../../../shared/product-catalog/feature/dist/lib/helpers.js";
|
|
14
16
|
import "../../../../../shared/product-catalog/feature/dist/index.js";
|
|
15
|
-
import { getCreateFollowUp as
|
|
16
|
-
import { RECEIVABLE_MESSAGE_LABELS_EN as
|
|
17
|
-
import { getReceivablePermissions as
|
|
18
|
-
import { useReceivableActions as
|
|
19
|
-
import { useReceivableActionsModal as
|
|
20
|
-
import { useReceivableDetails as
|
|
21
|
-
import { useReceivableForm as
|
|
22
|
-
import { useReceivablesTable as
|
|
23
|
-
import { useRecurringSeriesTable as
|
|
17
|
+
import { getCreateFollowUp as ae } from "./actionsModal.js";
|
|
18
|
+
import { RECEIVABLE_MESSAGE_LABELS_EN as oe } from "./labels.js";
|
|
19
|
+
import { getReceivablePermissions as se } from "./permissions.js";
|
|
20
|
+
import { useReceivableActions as ce } from "./useReceivableActions.js";
|
|
21
|
+
import { useReceivableActionsModal as le } from "./useReceivableActionsModal.js";
|
|
22
|
+
import { useReceivableDetails as ue } from "./useReceivableDetails.js";
|
|
23
|
+
import { useReceivableForm as de } from "./useReceivableForm.js";
|
|
24
|
+
import { useReceivablesTable as fe } from "./useReceivablesTable.js";
|
|
25
|
+
import { useRecurringSeriesTable as pe } from "./useRecurringSeriesTable.js";
|
|
24
26
|
import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
25
27
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js
|
|
26
|
-
function
|
|
27
|
-
let { initResponse: g, widgetToken:
|
|
28
|
-
...
|
|
28
|
+
function d({ auditHistoryLabels: d, counterpartMessageLabels: me, embeddedBankName: he, filterLabels: ge, initialCounterpartId: p, initialView: m, messageLabels: _e, onReceivableCreated: ve, onReceivableOpened: h, onStatusCardChange: ye, pageSizeOptions: be, screenLabels: xe, selectedStatusCard: Se, isRecurringTabActive: Ce = !1 }) {
|
|
29
|
+
let { initResponse: g, widgetToken: we } = i(), Te = ne(), Ee = ee(), De = r(), Oe = te(), _ = !!g && !Oe, v = c(() => se(g?.scopes), [g?.scopes]), ke = !!g && Oe, y = !!g && v.canRead, b = !!g && v.canWrite, x = _ && v.canRead, S = _ && v.canWrite, C = !!Ee && !_ && !Te, w = !_ && !C && !!(we || Te), T = c(() => ({
|
|
30
|
+
...oe,
|
|
29
31
|
..._e
|
|
30
|
-
}), [_e]),
|
|
31
|
-
...
|
|
32
|
-
...
|
|
33
|
-
}), [
|
|
34
|
-
|
|
35
|
-
let [
|
|
36
|
-
|
|
37
|
-
}, []),
|
|
38
|
-
|
|
39
|
-
}, []),
|
|
40
|
-
|
|
41
|
-
}, []),
|
|
42
|
-
let r =
|
|
43
|
-
r.openDetails && (
|
|
32
|
+
}), [_e]), E = xe?.statusBadge, D = c(() => ({
|
|
33
|
+
...re,
|
|
34
|
+
...E
|
|
35
|
+
}), [E]), [O, k] = u(), [A, j] = u(!1), [M, Ae] = u(O);
|
|
36
|
+
O && O !== M && Ae(O);
|
|
37
|
+
let [N, P] = u(!1), [je, Me] = u("screen"), [Ne, F] = u(), [Pe, Fe] = u(!1), Ie = o((e) => {
|
|
38
|
+
Fe(!0), F(e);
|
|
39
|
+
}, []), Le = o((e) => {
|
|
40
|
+
Fe(!1), F(e);
|
|
41
|
+
}, []), Re = t(g?.scopes, [n.CounterpartReadOrg]), ze = o(() => F(void 0), []), [Be, Ve] = u(!1), He = o(() => Ve(!0), []), I = o(() => Ve(!1), []), Ue = o((e) => {
|
|
42
|
+
k(e), j(!0);
|
|
43
|
+
}, []), L = le({ messages: T }), R = L.open, We = o((e, t, n) => {
|
|
44
|
+
let r = ae(n);
|
|
45
|
+
r.openDetails && (k(e), j(!0)), r.actionsModal && R({
|
|
44
46
|
action: n.mode,
|
|
45
47
|
receivableId: e,
|
|
46
48
|
counterpartId: n.counterpartId,
|
|
47
49
|
inlineItems: n.inlineItems,
|
|
48
50
|
showEmailStep: r.actionsModal.showEmailStep
|
|
49
51
|
}), ve?.(e, t);
|
|
50
|
-
}, [ve,
|
|
51
|
-
initialCounterpartId:
|
|
52
|
-
selectedStatusCard:
|
|
52
|
+
}, [ve, R]), z = fe({
|
|
53
|
+
initialCounterpartId: m === "create" ? void 0 : p,
|
|
54
|
+
selectedStatusCard: Se,
|
|
53
55
|
onStatusCardChange: ye,
|
|
54
|
-
messages:
|
|
55
|
-
statusLabels:
|
|
56
|
+
messages: T,
|
|
57
|
+
statusLabels: D,
|
|
56
58
|
filterLabels: ge,
|
|
57
|
-
pageSizeOptions:
|
|
58
|
-
enabled:
|
|
59
|
-
visible:
|
|
60
|
-
}),
|
|
61
|
-
messages:
|
|
59
|
+
pageSizeOptions: be,
|
|
60
|
+
enabled: x,
|
|
61
|
+
visible: y
|
|
62
|
+
}), B = pe({
|
|
63
|
+
messages: T,
|
|
62
64
|
filterLabels: ge,
|
|
63
|
-
pageSizeOptions:
|
|
64
|
-
enabled:
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
selectedReceivableId:
|
|
69
|
-
enabled:
|
|
70
|
-
canWrite:
|
|
71
|
-
messages:
|
|
72
|
-
statusLabels:
|
|
73
|
-
auditHistoryLabels:
|
|
74
|
-
onOpenReceivable:
|
|
75
|
-
onOpenCustomer:
|
|
76
|
-
}),
|
|
77
|
-
let r = n.mode === "issue"
|
|
78
|
-
|
|
65
|
+
pageSizeOptions: be,
|
|
66
|
+
enabled: x && Ce
|
|
67
|
+
}), V = o((e) => {
|
|
68
|
+
k(e), j(!0), h?.(e, "invoice");
|
|
69
|
+
}, [h]), H = ue({
|
|
70
|
+
selectedReceivableId: O,
|
|
71
|
+
enabled: A && x,
|
|
72
|
+
canWrite: b,
|
|
73
|
+
messages: T,
|
|
74
|
+
statusLabels: D,
|
|
75
|
+
auditHistoryLabels: d,
|
|
76
|
+
onOpenReceivable: V,
|
|
77
|
+
onOpenCustomer: Re ? Ie : void 0
|
|
78
|
+
}), U = l("edit"), Ge = o((e, t, n) => {
|
|
79
|
+
let r = n.mode === "issue";
|
|
80
|
+
r && (k(e), P(!0));
|
|
81
|
+
let i = r && U.current !== "issue" && n.hasCustomerEmail;
|
|
82
|
+
(i || n.inlineItems.length !== 0) && R({
|
|
79
83
|
action: r || n.mode === "recurrence" ? n.mode : "update",
|
|
80
84
|
receivableId: e,
|
|
81
85
|
counterpartId: n.counterpartId,
|
|
82
86
|
inlineItems: n.inlineItems,
|
|
83
87
|
showEmailStep: i
|
|
84
88
|
});
|
|
85
|
-
}, [
|
|
86
|
-
messages:
|
|
89
|
+
}, [R]), W = de({
|
|
90
|
+
messages: T,
|
|
87
91
|
counterpartMessageLabels: me,
|
|
88
92
|
embeddedBankName: he,
|
|
89
|
-
canCreateCustomer:
|
|
90
|
-
onCreated:
|
|
91
|
-
onUpdated:
|
|
92
|
-
}), { openCreate:
|
|
93
|
-
|
|
94
|
-
}, [
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
canCreateCustomer: v.canCreateCustomer,
|
|
94
|
+
onCreated: We,
|
|
95
|
+
onUpdated: Ge
|
|
96
|
+
}), { openCreate: G, openEdit: K } = W, { open: q, close: J } = W, Ke = o((e, t, n) => {
|
|
97
|
+
q && n.status === "draft" ? (k(e), K(n)) : (q && J(), Ue(e));
|
|
98
|
+
}, [
|
|
99
|
+
J,
|
|
100
|
+
Ue,
|
|
101
|
+
q,
|
|
102
|
+
K
|
|
103
|
+
]), qe = o(() => {
|
|
104
|
+
S && G("invoice");
|
|
105
|
+
}, [S, G]), Je = o(() => {
|
|
106
|
+
S && G("invoice", { recurring: !0 });
|
|
107
|
+
}, [S, G]), Ye = l(!1);
|
|
97
108
|
s(() => {
|
|
98
|
-
|
|
109
|
+
Ye.current || m === "create" && S && (Ye.current = !0, G("invoice", { customerId: p }));
|
|
99
110
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
S,
|
|
112
|
+
G,
|
|
113
|
+
p,
|
|
114
|
+
m
|
|
104
115
|
]);
|
|
105
|
-
let
|
|
106
|
-
selectedReceivable:
|
|
107
|
-
selectedRecurrence:
|
|
108
|
-
messages:
|
|
109
|
-
onCreated:
|
|
116
|
+
let Y = ce({
|
|
117
|
+
selectedReceivable: H.receivable,
|
|
118
|
+
selectedRecurrence: H.recurrence,
|
|
119
|
+
messages: T,
|
|
120
|
+
onCreated: Ke,
|
|
110
121
|
onDeleted: (e) => {
|
|
111
|
-
e ===
|
|
122
|
+
e === O && (k(void 0), j(!1)), e === W.editingReceivable?.id && (P(!1), W.close());
|
|
112
123
|
},
|
|
113
124
|
onCompleteBeforeIssue: (e, t) => {
|
|
114
|
-
|
|
125
|
+
U.current = t, K(e, { highlightForIssue: !0 }), A && P(!0), j(!1);
|
|
115
126
|
},
|
|
116
|
-
onIssuedForSend: (e, t) =>
|
|
127
|
+
onIssuedForSend: (e, t) => R({
|
|
117
128
|
action: "issue",
|
|
118
129
|
receivableId: e,
|
|
119
130
|
counterpartId: t,
|
|
120
131
|
inlineItems: [],
|
|
121
132
|
showEmailStep: !0
|
|
122
133
|
}),
|
|
123
|
-
onResend: (e, t) =>
|
|
134
|
+
onResend: (e, t) => R({
|
|
124
135
|
action: "issue",
|
|
125
136
|
receivableId: e,
|
|
126
137
|
counterpartId: t,
|
|
@@ -130,136 +141,165 @@ function pe({ auditHistoryLabels: pe, counterpartMessageLabels: me, embeddedBank
|
|
|
130
141
|
})
|
|
131
142
|
});
|
|
132
143
|
s(() => {
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
|
|
144
|
+
W.open || (U.current = "edit");
|
|
145
|
+
}, [W.open]), s(() => {
|
|
146
|
+
W.open || L.isOpen || !N || (P(!1), j(!0));
|
|
136
147
|
}, [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
148
|
+
L.isOpen,
|
|
149
|
+
W.open,
|
|
150
|
+
N
|
|
140
151
|
]);
|
|
141
|
-
let
|
|
152
|
+
let Xe = _ && !v.canWrite, Ze = W.open || W.counterpartView !== "none" || !!Y.actionTarget || Y.payment.isOpen || L.isOpen || Be, Qe = W.counterpartForm.close, { closeAction: $e } = Y, et = Y.payment.close, X = L.close;
|
|
142
153
|
s(() => {
|
|
143
|
-
|
|
154
|
+
Xe && Ze && (J(), Qe(), $e(), et(), X(), I());
|
|
144
155
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
$e,
|
|
157
|
+
X,
|
|
158
|
+
Qe,
|
|
159
|
+
J,
|
|
160
|
+
I,
|
|
161
|
+
et,
|
|
162
|
+
Ze,
|
|
163
|
+
Xe
|
|
153
164
|
]);
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
165
|
+
let { getReceivableById: tt } = z, nt = o((e) => {
|
|
166
|
+
if (ie()) return;
|
|
167
|
+
let t = S && e.status === "draft" ? tt(e.id) : void 0;
|
|
168
|
+
t ? (U.current = "edit", K(t)) : (k(e.id), j(!0)), h?.(e.id, e.type);
|
|
169
|
+
}, [
|
|
170
|
+
S,
|
|
171
|
+
tt,
|
|
172
|
+
h,
|
|
173
|
+
K
|
|
174
|
+
]), rt = o(() => Me("screen"), []), it = o(() => Me("sheet"), []), at = o((e) => {
|
|
175
|
+
ie() || V(e.id);
|
|
176
|
+
}, [V]), Z = o(() => {
|
|
177
|
+
j(!1), k(void 0), F(void 0);
|
|
178
|
+
}, []), { showCustomer: ot } = z, st = o((e) => {
|
|
179
|
+
Z(), ot(e.id);
|
|
180
|
+
}, [Z, ot]), ct = o((e) => {
|
|
181
|
+
S && (Z(), G("invoice", { customerId: e.id }));
|
|
164
182
|
}, [
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
]),
|
|
169
|
-
|
|
183
|
+
S,
|
|
184
|
+
Z,
|
|
185
|
+
G
|
|
186
|
+
]), lt = o((e, t) => {
|
|
187
|
+
S && (e === "edit" ? H.receivable && (U.current = "edit", K(H.receivable), P(!0), j(!1)) : Y.openAction(e, {
|
|
170
188
|
id: t.id,
|
|
171
|
-
title:
|
|
189
|
+
title: H.receivable ? a(H.receivable, T) : t.title,
|
|
172
190
|
type: t.type
|
|
173
|
-
},
|
|
191
|
+
}, H.receivable ?? null));
|
|
174
192
|
}, [
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
])
|
|
193
|
+
Y,
|
|
194
|
+
S,
|
|
195
|
+
H.receivable,
|
|
196
|
+
K,
|
|
197
|
+
T
|
|
198
|
+
]), Q = S && W.editingReceivable?.status === "draft" ? W.editingReceivable : void 0, ut = Q && {
|
|
199
|
+
disabled: Y.pendingActions.includes("clone") || !!W.attachmentsUploading,
|
|
200
|
+
onClone: () => {
|
|
201
|
+
W.hasPendingChanges() ? e.error(T.cloneUnsavedChanges) : Y.openAction("clone", dt(Q), null);
|
|
202
|
+
},
|
|
203
|
+
onDelete: () => Y.openAction("delete", dt(Q), null)
|
|
204
|
+
};
|
|
205
|
+
function dt(e) {
|
|
206
|
+
return {
|
|
207
|
+
id: e.id,
|
|
208
|
+
type: "invoice",
|
|
209
|
+
title: a(e, T)
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
let $ = A && y;
|
|
181
213
|
return {
|
|
182
|
-
canWrite:
|
|
183
|
-
canEditSettings:
|
|
184
|
-
actionsSuspended:
|
|
185
|
-
isAccessRestricted:
|
|
186
|
-
table:
|
|
187
|
-
...
|
|
214
|
+
canWrite: b,
|
|
215
|
+
canEditSettings: y && v.canEditSettings,
|
|
216
|
+
actionsSuspended: ke,
|
|
217
|
+
isAccessRestricted: _ && !v.canRead,
|
|
218
|
+
table: y ? z : {
|
|
219
|
+
...z,
|
|
188
220
|
rows: [],
|
|
189
221
|
statusCards: void 0,
|
|
190
222
|
isError: !1
|
|
191
223
|
},
|
|
192
|
-
isTableLoading:
|
|
193
|
-
isError:
|
|
194
|
-
onRetry:
|
|
195
|
-
series:
|
|
196
|
-
...
|
|
224
|
+
isTableLoading: y ? z.isLoading || w && z.rows.length === 0 : w,
|
|
225
|
+
isError: C || y && z.isError,
|
|
226
|
+
onRetry: C ? De : z.onRetry,
|
|
227
|
+
series: y ? B : {
|
|
228
|
+
...B,
|
|
197
229
|
rows: [],
|
|
198
230
|
isError: !1
|
|
199
231
|
},
|
|
200
|
-
isSeriesLoading:
|
|
201
|
-
isSeriesError:
|
|
202
|
-
onSeriesRetry:
|
|
203
|
-
details:
|
|
204
|
-
detailsOpen:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
232
|
+
isSeriesLoading: y ? B.isLoading || w && B.rows.length === 0 : w,
|
|
233
|
+
isSeriesError: C || y && B.isError,
|
|
234
|
+
onSeriesRetry: C ? De : B.onRetry,
|
|
235
|
+
details: H,
|
|
236
|
+
detailsOpen: $,
|
|
237
|
+
detailsScreenOpen: $ && je === "screen",
|
|
238
|
+
detailsSheetOpen: $ && je === "sheet",
|
|
239
|
+
expandDetails: rt,
|
|
240
|
+
collapseDetails: it,
|
|
241
|
+
draftMenu: ut,
|
|
242
|
+
onDetailsOpenChange: (e) => {
|
|
243
|
+
e || Z();
|
|
244
|
+
},
|
|
245
|
+
closeDetails: Z,
|
|
246
|
+
detailsPanelKey: M,
|
|
247
|
+
customerDetailsId: Ne,
|
|
248
|
+
closeCustomerDetails: ze,
|
|
249
|
+
openCustomerDetails: Re ? Le : void 0,
|
|
250
|
+
customerDetailsActions: Pe ? {
|
|
251
|
+
onViewAllDocuments: y ? st : void 0,
|
|
252
|
+
onCreateDocument: b ? ct : void 0
|
|
213
253
|
} : {},
|
|
214
254
|
customersTabActions: {
|
|
215
|
-
onViewAllDocuments:
|
|
216
|
-
onCreateDocument:
|
|
255
|
+
onViewAllDocuments: y ? st : void 0,
|
|
256
|
+
onCreateDocument: b ? ct : void 0
|
|
217
257
|
},
|
|
218
|
-
canCreateCustomer:
|
|
219
|
-
messages:
|
|
258
|
+
canCreateCustomer: v.canCreateCustomer,
|
|
259
|
+
messages: T,
|
|
220
260
|
form: {
|
|
221
|
-
...
|
|
222
|
-
open:
|
|
223
|
-
counterpartView:
|
|
261
|
+
...W,
|
|
262
|
+
open: b && W.open,
|
|
263
|
+
counterpartView: b ? W.counterpartView : "none",
|
|
224
264
|
counterpartForm: {
|
|
225
|
-
...
|
|
226
|
-
submit:
|
|
265
|
+
...W.counterpartForm,
|
|
266
|
+
submit: f(S, W.counterpartForm.submit)
|
|
227
267
|
},
|
|
228
|
-
submit:
|
|
229
|
-
submitDraft:
|
|
230
|
-
submitPrimary:
|
|
268
|
+
submit: f(S, W.submit),
|
|
269
|
+
submitDraft: f(S, W.submitDraft),
|
|
270
|
+
submitPrimary: f(S, W.submitPrimary)
|
|
231
271
|
},
|
|
232
|
-
openCreate:
|
|
233
|
-
openCreateRecurring:
|
|
234
|
-
measureUnitsOpen:
|
|
235
|
-
openMeasureUnits:
|
|
236
|
-
closeMeasureUnits:
|
|
272
|
+
openCreate: qe,
|
|
273
|
+
openCreateRecurring: Je,
|
|
274
|
+
measureUnitsOpen: b && Be,
|
|
275
|
+
openMeasureUnits: He,
|
|
276
|
+
closeMeasureUnits: I,
|
|
237
277
|
actions: {
|
|
238
|
-
...
|
|
239
|
-
actionDialog:
|
|
240
|
-
openAction:
|
|
241
|
-
confirmAction:
|
|
278
|
+
...Y,
|
|
279
|
+
actionDialog: b ? Y.actionDialog : void 0,
|
|
280
|
+
openAction: f(S, Y.openAction),
|
|
281
|
+
confirmAction: f(S, Y.confirmAction),
|
|
242
282
|
payment: {
|
|
243
|
-
...
|
|
244
|
-
isOpen:
|
|
245
|
-
save:
|
|
246
|
-
confirm:
|
|
283
|
+
...Y.payment,
|
|
284
|
+
isOpen: b && Y.payment.isOpen,
|
|
285
|
+
save: f(S, Y.payment.save),
|
|
286
|
+
confirm: f(S, Y.payment.confirm)
|
|
247
287
|
}
|
|
248
288
|
},
|
|
249
289
|
actionsModal: {
|
|
250
|
-
...
|
|
251
|
-
isOpen:
|
|
252
|
-
send:
|
|
253
|
-
saveItems:
|
|
290
|
+
...L,
|
|
291
|
+
isOpen: b && L.isOpen,
|
|
292
|
+
send: f(S, L.send),
|
|
293
|
+
saveItems: f(S, L.saveItems)
|
|
254
294
|
},
|
|
255
|
-
handleRowClick:
|
|
256
|
-
handleSeriesRowClick:
|
|
257
|
-
handleDetailsActionClick:
|
|
295
|
+
handleRowClick: nt,
|
|
296
|
+
handleSeriesRowClick: at,
|
|
297
|
+
handleDetailsActionClick: lt
|
|
258
298
|
};
|
|
259
299
|
}
|
|
260
|
-
function
|
|
300
|
+
function f(e, t) {
|
|
261
301
|
return (...n) => {
|
|
262
302
|
e && t(...n);
|
|
263
303
|
};
|
|
264
304
|
}
|
|
265
|
-
export {
|
|
305
|
+
export { d as useReceivablesWidget };
|
|
@@ -12,31 +12,32 @@ import "./index15.js";
|
|
|
12
12
|
import "./index16.js";
|
|
13
13
|
import "./index17.js";
|
|
14
14
|
import "./index18.js";
|
|
15
|
-
import "./index19.js";
|
|
16
|
-
import { ReceivableActionDialog as
|
|
17
|
-
import { ReceivableBankAccountSection as
|
|
18
|
-
import { ReceivableAttachmentsSection as
|
|
19
|
-
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as
|
|
20
|
-
import { ReceivableBillingSection as
|
|
15
|
+
import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as o } from "./index19.js";
|
|
16
|
+
import { ReceivableActionDialog as s } from "./index20.js";
|
|
17
|
+
import { ReceivableBankAccountSection as c } from "./index21.js";
|
|
18
|
+
import { ReceivableAttachmentsSection as l } from "./index22.js";
|
|
19
|
+
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as u, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as d } from "./index25.js";
|
|
20
|
+
import { ReceivableBillingSection as f } from "./index26.js";
|
|
21
21
|
import "./index27.js";
|
|
22
|
-
import { ReceivableCustomerSection as
|
|
22
|
+
import { ReceivableCustomerSection as p } from "./index28.js";
|
|
23
23
|
import "./index29.js";
|
|
24
24
|
import "./index30.js";
|
|
25
|
-
import { RECEIVABLE_DETAILS_SECTION as
|
|
26
|
-
import { ReceivableDetailsPanel as
|
|
27
|
-
import "./
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import "./
|
|
31
|
-
import
|
|
32
|
-
import "./
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import "./
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import "./
|
|
41
|
-
import
|
|
42
|
-
|
|
25
|
+
import { RECEIVABLE_DETAILS_SECTION as m } from "./index38.js";
|
|
26
|
+
import { ReceivableDetailsPanel as h } from "./index43.js";
|
|
27
|
+
import { ReceivableDetailsScreen as g } from "./index44.js";
|
|
28
|
+
import "./index45.js";
|
|
29
|
+
import { ReceivableFormDialog as _ } from "./index48.js";
|
|
30
|
+
import { ReceivablePaymentDialog as v } from "./index49.js";
|
|
31
|
+
import "./index50.js";
|
|
32
|
+
import { ReceivablePreview as y } from "./index53.js";
|
|
33
|
+
import "./index54.js";
|
|
34
|
+
import { ReceivableRecurrenceEmailDialog as b } from "./index55.js";
|
|
35
|
+
import { ReceivableRecurrenceSection as x } from "./index57.js";
|
|
36
|
+
import "./index58.js";
|
|
37
|
+
import { ReceivableRemindersSection as S } from "./index59.js";
|
|
38
|
+
import { ReceivablesScreen as C } from "./index61.js";
|
|
39
|
+
import { RECURRING_SERIES_SCREEN_LABELS_EN as w } from "./index62.js";
|
|
40
|
+
import { RecurringSeriesScreen as T } from "./index63.js";
|
|
41
|
+
import "./index64.js";
|
|
42
|
+
import { UnsavedInvoiceDialog as E } from "./index65.js";
|
|
43
|
+
export { n as INVOICING_TABS_LABELS_EN, t as InvoicesFilterBar, e as InvoicesFilterField, r as InvoicingHeader, i as InvoicingTabs, o as RECEIVABLE_DETAILS_PANEL_LABELS_EN, m as RECEIVABLE_DETAILS_SECTION, u as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, d as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, w as RECURRING_SERIES_SCREEN_LABELS_EN, s as ReceivableActionDialog, a as ReceivableActionsModal, l as ReceivableAttachmentsSection, c as ReceivableBankAccountSection, f as ReceivableBillingSection, p as ReceivableCustomerSection, h as ReceivableDetailsPanel, g as ReceivableDetailsScreen, _ as ReceivableFormDialog, v as ReceivablePaymentDialog, y as ReceivablePreview, b as ReceivableRecurrenceEmailDialog, x as ReceivableRecurrenceSection, S as ReceivableRemindersSection, C as ReceivablesScreen, T as RecurringSeriesScreen, E as UnsavedInvoiceDialog };
|
|
@@ -51,6 +51,9 @@ var a = {
|
|
|
51
51
|
editTitle: "Edit invoice",
|
|
52
52
|
editDescription: "Invoice details",
|
|
53
53
|
closeButton: "Close",
|
|
54
|
+
moreActionsButton: "More actions",
|
|
55
|
+
duplicateButton: "Duplicate",
|
|
56
|
+
deleteButton: "Delete",
|
|
54
57
|
dueDateLabel: "Due date",
|
|
55
58
|
lineItemsHeading: "Products and services",
|
|
56
59
|
lineItemsDescription: "Add the products and services on this invoice. You'll have the option to save new items to your inventory.",
|
|
@@ -132,6 +135,18 @@ var a = {
|
|
|
132
135
|
moreActionsLabel: "More actions",
|
|
133
136
|
viewPdfButton: "View PDF",
|
|
134
137
|
closeButton: "Close",
|
|
138
|
+
expandButton: "Open full screen",
|
|
139
|
+
collapseButton: "Exit full screen",
|
|
140
|
+
documentPaneRegion: "Invoice PDF",
|
|
141
|
+
downloadPdfButton: "Download PDF",
|
|
142
|
+
pdfUnavailable: "The PDF for this invoice is not available yet.",
|
|
143
|
+
pdfPagesRegion: "Invoice PDF pages",
|
|
144
|
+
pdfPreviewFailed: "The PDF could not be shown here.",
|
|
145
|
+
openPdfButton: "Open PDF",
|
|
146
|
+
lineItemsDescriptionColumn: "Description",
|
|
147
|
+
lineItemsQuantityColumn: "Qty",
|
|
148
|
+
lineItemsPriceColumn: "Price",
|
|
149
|
+
lineItemsAmountColumn: "Amount",
|
|
135
150
|
invoiceDateCaption: "Invoice date",
|
|
136
151
|
paymentHistoryHeading: "Payment history",
|
|
137
152
|
paymentHistoryEmpty: "You've received no payments yet.",
|