@tesouro/embedded-components-react 0.5.107 → 0.5.109
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 +6 -5
- package/dist/index.d.ts +16 -2
- package/dist/lib/CounterpartsWidget.d.ts +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +327 -327
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +11 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +78 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +149 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +31 -18
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +125 -121
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +195 -193
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -38,17 +38,21 @@ function C({ labels: i, initialTab: f = x.Bills, tabsLabels: C, vendorLabels: w,
|
|
|
38
38
|
let O = {
|
|
39
39
|
...p,
|
|
40
40
|
...C
|
|
41
|
-
}, { initResponse: k } = a(), A = e(k?.scopes, [t.ApprovalPolicyWriteOrg]) && e(k?.scopes, [t.PayableWriteOrg]) && e(k?.scopes, [t.RoleReadOrg]) && e(k?.scopes, [t.UserReadOrg]), [
|
|
42
|
-
|
|
43
|
-
}, []),
|
|
41
|
+
}, { initResponse: k } = a(), A = e(k?.scopes, [t.PayableReadOrg]), j = e(k?.scopes, [t.PayableWriteOrg]), M = e(k?.scopes, [t.ApprovalPolicyWriteOrg]) && e(k?.scopes, [t.PayableWriteOrg]) && e(k?.scopes, [t.RoleReadOrg]) && e(k?.scopes, [t.UserReadOrg]), [N, P] = _(f), [F, I] = _(), L = h((e) => {
|
|
42
|
+
P(x.Bills), I(e);
|
|
43
|
+
}, []), R = c({ onOpenBill: L }), [z, B] = _(), V = h((e) => {
|
|
44
|
+
P(x.Bills), B(e);
|
|
45
|
+
}, []), H = [{
|
|
44
46
|
id: x.Bills,
|
|
45
47
|
label: O.bills,
|
|
46
48
|
content: /* @__PURE__ */ y(u, {
|
|
47
|
-
onEnqueueFiles:
|
|
48
|
-
openPayableId:
|
|
49
|
-
onOpenPayableHandled: () =>
|
|
49
|
+
onEnqueueFiles: R.enqueue,
|
|
50
|
+
openPayableId: F,
|
|
51
|
+
onOpenPayableHandled: () => I(void 0),
|
|
52
|
+
vendorIntent: z,
|
|
53
|
+
onVendorIntentHandled: () => B(void 0),
|
|
50
54
|
poweredByBankName: T,
|
|
51
|
-
onSettingsClick: E &&
|
|
55
|
+
onSettingsClick: E && M ? E : void 0
|
|
52
56
|
})
|
|
53
57
|
}, {
|
|
54
58
|
id: x.Vendors,
|
|
@@ -56,23 +60,32 @@ function C({ labels: i, initialTab: f = x.Bills, tabsLabels: C, vendorLabels: w,
|
|
|
56
60
|
content: /* @__PURE__ */ y(m, {
|
|
57
61
|
...w,
|
|
58
62
|
counterpartType: "vendor",
|
|
59
|
-
onViewAllDocuments: () =>
|
|
63
|
+
onViewAllDocuments: A ? (e) => V({
|
|
64
|
+
vendorId: e.id,
|
|
65
|
+
vendorName: e.name,
|
|
66
|
+
action: "viewBills"
|
|
67
|
+
}) : void 0,
|
|
68
|
+
onCreateDocument: j ? (e) => V({
|
|
69
|
+
vendorId: e.id,
|
|
70
|
+
vendorName: e.name,
|
|
71
|
+
action: "createBill"
|
|
72
|
+
}) : void 0
|
|
60
73
|
})
|
|
61
|
-
}],
|
|
74
|
+
}], U = H.some((e) => e.id === N) ? N : S.find((e) => H.some((t) => t.id === e)) ?? H[0]?.id ?? "";
|
|
62
75
|
return /* @__PURE__ */ b(v, { children: [
|
|
63
76
|
/* @__PURE__ */ y(n, {}),
|
|
64
77
|
/* @__PURE__ */ y(o, {
|
|
65
78
|
labels: i,
|
|
66
|
-
tabs:
|
|
67
|
-
selectedTabId:
|
|
68
|
-
onTabChange:
|
|
79
|
+
tabs: H,
|
|
80
|
+
selectedTabId: U,
|
|
81
|
+
onTabChange: P
|
|
69
82
|
}),
|
|
70
|
-
|
|
71
|
-
sections:
|
|
72
|
-
summaryLabel:
|
|
73
|
-
collapsed:
|
|
74
|
-
onToggleCollapsed:
|
|
75
|
-
onClose:
|
|
83
|
+
R.isVisible ? /* @__PURE__ */ y(s, {
|
|
84
|
+
sections: R.sections,
|
|
85
|
+
summaryLabel: R.summaryLabel,
|
|
86
|
+
collapsed: R.collapsed,
|
|
87
|
+
onToggleCollapsed: R.onToggleCollapsed,
|
|
88
|
+
onClose: R.onClose,
|
|
76
89
|
testId: l.uploadTray
|
|
77
90
|
}) : null
|
|
78
91
|
] });
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js
CHANGED
|
@@ -16,194 +16,198 @@ import { CounterpartsScreen as l } from "../../ui/dist/index3.js";
|
|
|
16
16
|
import { CounterpartDetailsSheet as u } from "../../ui/dist/index4.js";
|
|
17
17
|
import "../../ui/dist/index.js";
|
|
18
18
|
import { useCounterpartsWidget as d } from "./index7.js";
|
|
19
|
-
import { useEffect as f } from "react";
|
|
20
|
-
import { Fragment as
|
|
19
|
+
import { useEffect as f, useMemo as p } from "react";
|
|
20
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
21
21
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js
|
|
22
|
-
function
|
|
23
|
-
let
|
|
22
|
+
function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _, onCreateDocument: v, screenLabels: y, formLabels: b, detailsLabels: x, bankAccountLabels: S, addressLabels: C, deleteLabels: w, messageLabels: T }) {
|
|
23
|
+
let E = e();
|
|
24
24
|
f(() => {
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
let { stateOptions:
|
|
25
|
+
E(o.Mounted);
|
|
26
|
+
}, [E]);
|
|
27
|
+
let { stateOptions: D, selectedId: O, view: k, table: A, details: j, detailsSheetView: M, permissions: N, isPermissionLoading: P, form: F, bank: I, address: L, del: R, handleRowClick: z, closeDetails: B } = d({
|
|
28
28
|
counterpartType: t,
|
|
29
|
-
detailsLabels:
|
|
30
|
-
messageLabels:
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
detailsLabels: x,
|
|
30
|
+
messageLabels: T
|
|
31
|
+
}), V = p(() => O && M ? {
|
|
32
|
+
id: O,
|
|
33
|
+
name: M.name
|
|
34
|
+
} : void 0, [M, O]);
|
|
35
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
36
|
+
/* @__PURE__ */ h(l, {
|
|
34
37
|
mode: t,
|
|
35
|
-
counterparts:
|
|
36
|
-
isLoading:
|
|
37
|
-
isError:
|
|
38
|
-
sorting:
|
|
39
|
-
onSortingChange:
|
|
40
|
-
pageSize:
|
|
41
|
-
onPageSizeChange:
|
|
38
|
+
counterparts: A.rows,
|
|
39
|
+
isLoading: P || A.isLoading,
|
|
40
|
+
isError: A.isError,
|
|
41
|
+
sorting: A.sorting,
|
|
42
|
+
onSortingChange: A.onSortingChange,
|
|
43
|
+
pageSize: A.pageSize,
|
|
44
|
+
onPageSizeChange: A.onPageSizeChange,
|
|
42
45
|
pageSizeOptions: s,
|
|
43
|
-
hasNextPage:
|
|
44
|
-
hasPrevPage:
|
|
45
|
-
onNextPage:
|
|
46
|
-
onPrevPage:
|
|
47
|
-
searchValue:
|
|
48
|
-
onSearchChange:
|
|
49
|
-
entityFilter:
|
|
50
|
-
onEntityFilterChange:
|
|
51
|
-
isFiltering:
|
|
52
|
-
canCreate:
|
|
53
|
-
isAccessRestricted: !
|
|
54
|
-
onCreateClick:
|
|
55
|
-
onRowClick:
|
|
56
|
-
onRetry:
|
|
57
|
-
labels:
|
|
46
|
+
hasNextPage: A.hasNextPage,
|
|
47
|
+
hasPrevPage: A.hasPrevPage,
|
|
48
|
+
onNextPage: A.onNextPage,
|
|
49
|
+
onPrevPage: A.onPrevPage,
|
|
50
|
+
searchValue: A.searchValue,
|
|
51
|
+
onSearchChange: A.onSearchChange,
|
|
52
|
+
entityFilter: A.entityFilter,
|
|
53
|
+
onEntityFilterChange: A.onEntityFilterChange,
|
|
54
|
+
isFiltering: A.isFiltering,
|
|
55
|
+
canCreate: N.canCreate,
|
|
56
|
+
isAccessRestricted: !P && !N.canRead,
|
|
57
|
+
onCreateClick: N.canCreate ? F.openCreate : () => void 0,
|
|
58
|
+
onRowClick: z,
|
|
59
|
+
onRetry: A.onRetry,
|
|
60
|
+
labels: y,
|
|
58
61
|
emptyStateTestId: "counterparts-widget-empty-state",
|
|
59
62
|
accessRestrictedTestId: "counterparts-widget-access-restricted"
|
|
60
63
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
open:
|
|
64
|
+
/* @__PURE__ */ h(n, {
|
|
65
|
+
open: k === "create",
|
|
63
66
|
onOpenChange: (e) => {
|
|
64
|
-
e ||
|
|
67
|
+
e || F.close();
|
|
65
68
|
},
|
|
66
69
|
mode: "create",
|
|
67
70
|
counterpartMode: t,
|
|
68
|
-
values:
|
|
69
|
-
errors:
|
|
70
|
-
stateOptions:
|
|
71
|
-
inProgress:
|
|
72
|
-
submitDisabled:
|
|
73
|
-
onChange: (e) =>
|
|
71
|
+
values: F.values,
|
|
72
|
+
errors: F.errors,
|
|
73
|
+
stateOptions: D,
|
|
74
|
+
inProgress: F.isSubmitting,
|
|
75
|
+
submitDisabled: F.isSubmitting,
|
|
76
|
+
onChange: (e) => F.setValues((t) => ({
|
|
74
77
|
...t,
|
|
75
78
|
...e
|
|
76
79
|
})),
|
|
77
|
-
onAddressChange: (e) =>
|
|
80
|
+
onAddressChange: (e) => F.setValues((t) => ({
|
|
78
81
|
...t,
|
|
79
82
|
address: {
|
|
80
83
|
...t.address,
|
|
81
84
|
...e
|
|
82
85
|
}
|
|
83
86
|
})),
|
|
84
|
-
onBankAccountChange: (e) =>
|
|
87
|
+
onBankAccountChange: (e) => F.setValues((t) => ({
|
|
85
88
|
...t,
|
|
86
89
|
bankAccount: {
|
|
87
90
|
...t.bankAccount,
|
|
88
91
|
...e
|
|
89
92
|
}
|
|
90
93
|
})),
|
|
91
|
-
onSubmit:
|
|
92
|
-
onCancel:
|
|
94
|
+
onSubmit: F.submit,
|
|
95
|
+
onCancel: F.close,
|
|
93
96
|
sections: { address: "collapsible" },
|
|
94
|
-
sectionsToExpand:
|
|
95
|
-
onAddressExpand:
|
|
96
|
-
labels:
|
|
97
|
+
sectionsToExpand: F.sectionsToExpand,
|
|
98
|
+
onAddressExpand: F.expandAddress,
|
|
99
|
+
labels: b
|
|
97
100
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
open:
|
|
101
|
+
/* @__PURE__ */ h(u, {
|
|
102
|
+
open: O !== void 0 && (k === "none" || k === "edit"),
|
|
100
103
|
onOpenChange: (e) => {
|
|
101
|
-
e ||
|
|
104
|
+
e || B();
|
|
102
105
|
},
|
|
103
|
-
privacyResetKey:
|
|
106
|
+
privacyResetKey: O,
|
|
104
107
|
mode: t,
|
|
105
|
-
counterpart:
|
|
106
|
-
isLoading:
|
|
107
|
-
isError:
|
|
108
|
-
canEdit:
|
|
109
|
-
canDelete:
|
|
110
|
-
onEdit:
|
|
111
|
-
onDelete:
|
|
112
|
-
onClose:
|
|
113
|
-
onAddAddress:
|
|
114
|
-
onEditAddress:
|
|
115
|
-
onAddBankAccount:
|
|
116
|
-
onEditBankAccount:
|
|
117
|
-
onViewAllDocuments:
|
|
118
|
-
|
|
108
|
+
counterpart: M,
|
|
109
|
+
isLoading: j.isLoading,
|
|
110
|
+
isError: j.isError,
|
|
111
|
+
canEdit: N.canUpdate && !(t === "vendor" && (j.isBankAccountsLoading || j.isBankAccountsError)),
|
|
112
|
+
canDelete: N.canDelete,
|
|
113
|
+
onEdit: F.openEdit,
|
|
114
|
+
onDelete: R.requestDeleteCounterpart,
|
|
115
|
+
onClose: B,
|
|
116
|
+
onAddAddress: L.openCreate,
|
|
117
|
+
onEditAddress: L.openEdit,
|
|
118
|
+
onAddBankAccount: I.form.openCreate,
|
|
119
|
+
onEditBankAccount: I.form.openEdit,
|
|
120
|
+
onViewAllDocuments: _ && V ? () => _(V) : void 0,
|
|
121
|
+
onCreateDocument: v && V ? () => v(V) : void 0,
|
|
122
|
+
onDeleteBankAccount: (e) => R.requestDelete({
|
|
119
123
|
kind: "bankAccount",
|
|
120
124
|
id: e,
|
|
121
|
-
label:
|
|
125
|
+
label: j.bankItems.find((t) => t.id === e)?.primary ?? ""
|
|
122
126
|
}),
|
|
123
|
-
editForm:
|
|
124
|
-
values:
|
|
125
|
-
errors:
|
|
126
|
-
stateOptions:
|
|
127
|
-
inProgress:
|
|
128
|
-
submitDisabled:
|
|
129
|
-
onChange: (e) =>
|
|
127
|
+
editForm: k === "edit" ? {
|
|
128
|
+
values: F.values,
|
|
129
|
+
errors: F.errors,
|
|
130
|
+
stateOptions: D,
|
|
131
|
+
inProgress: F.isSubmitting,
|
|
132
|
+
submitDisabled: F.isSubmitting,
|
|
133
|
+
onChange: (e) => F.setValues((t) => ({
|
|
130
134
|
...t,
|
|
131
135
|
...e
|
|
132
136
|
})),
|
|
133
|
-
onAddressChange: (e) =>
|
|
137
|
+
onAddressChange: (e) => F.setValues((t) => ({
|
|
134
138
|
...t,
|
|
135
139
|
address: {
|
|
136
140
|
...t.address,
|
|
137
141
|
...e
|
|
138
142
|
}
|
|
139
143
|
})),
|
|
140
|
-
onBankAccountChange: (e) =>
|
|
144
|
+
onBankAccountChange: (e) => F.setValues((t) => ({
|
|
141
145
|
...t,
|
|
142
146
|
bankAccount: {
|
|
143
147
|
...t.bankAccount,
|
|
144
148
|
...e
|
|
145
149
|
}
|
|
146
150
|
})),
|
|
147
|
-
onSubmit:
|
|
148
|
-
onCancel:
|
|
151
|
+
onSubmit: F.submit,
|
|
152
|
+
onCancel: F.close,
|
|
149
153
|
sections: { address: "collapsible" },
|
|
150
|
-
sectionsToExpand:
|
|
151
|
-
labels:
|
|
154
|
+
sectionsToExpand: F.sectionsToExpand,
|
|
155
|
+
labels: b
|
|
152
156
|
} : void 0,
|
|
153
|
-
labels:
|
|
157
|
+
labels: x
|
|
154
158
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
open:
|
|
159
|
+
/* @__PURE__ */ h(r, {
|
|
160
|
+
open: I.form.sheet.open,
|
|
157
161
|
onOpenChange: (e) => {
|
|
158
|
-
e ||
|
|
162
|
+
e || I.form.close();
|
|
159
163
|
},
|
|
160
|
-
mode:
|
|
161
|
-
values:
|
|
162
|
-
errors:
|
|
163
|
-
currencyOptions:
|
|
164
|
-
inProgress:
|
|
165
|
-
onChange: (e) =>
|
|
164
|
+
mode: I.form.sheet.mode,
|
|
165
|
+
values: I.form.values,
|
|
166
|
+
errors: I.form.errors,
|
|
167
|
+
currencyOptions: I.currencyOptions,
|
|
168
|
+
inProgress: I.inProgress,
|
|
169
|
+
onChange: (e) => I.form.setValues((t) => ({
|
|
166
170
|
...t,
|
|
167
171
|
...e
|
|
168
172
|
})),
|
|
169
|
-
onSubmit:
|
|
170
|
-
onCancel:
|
|
171
|
-
labels:
|
|
173
|
+
onSubmit: I.form.submit,
|
|
174
|
+
onCancel: I.form.close,
|
|
175
|
+
labels: S
|
|
172
176
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
open:
|
|
177
|
+
/* @__PURE__ */ h(i, {
|
|
178
|
+
open: L.open,
|
|
175
179
|
onOpenChange: (e) => {
|
|
176
|
-
e ||
|
|
180
|
+
e || L.close();
|
|
177
181
|
},
|
|
178
|
-
values:
|
|
179
|
-
errors:
|
|
180
|
-
stateOptions:
|
|
181
|
-
inProgress:
|
|
182
|
-
formError:
|
|
183
|
-
onChange: (e) =>
|
|
182
|
+
values: L.values,
|
|
183
|
+
errors: L.errors,
|
|
184
|
+
stateOptions: D,
|
|
185
|
+
inProgress: L.isPending,
|
|
186
|
+
formError: L.formError,
|
|
187
|
+
onChange: (e) => L.setValues((t) => ({
|
|
184
188
|
...t,
|
|
185
189
|
...e
|
|
186
190
|
})),
|
|
187
|
-
onSubmit:
|
|
188
|
-
onCancel:
|
|
189
|
-
labels:
|
|
191
|
+
onSubmit: L.submit,
|
|
192
|
+
onCancel: L.close,
|
|
193
|
+
labels: C
|
|
190
194
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
open:
|
|
195
|
+
/* @__PURE__ */ h(a, {
|
|
196
|
+
open: R.target !== null,
|
|
193
197
|
onOpenChange: (e) => {
|
|
194
|
-
e ||
|
|
198
|
+
e || R.close();
|
|
195
199
|
},
|
|
196
|
-
title:
|
|
197
|
-
message:
|
|
198
|
-
isDeleting:
|
|
199
|
-
onConfirm:
|
|
200
|
-
onCancel:
|
|
201
|
-
labels:
|
|
200
|
+
title: R.dialogTitle,
|
|
201
|
+
message: R.dialogMessage,
|
|
202
|
+
isDeleting: R.isDeleting,
|
|
203
|
+
onConfirm: R.confirm,
|
|
204
|
+
onCancel: R.close,
|
|
205
|
+
labels: w
|
|
202
206
|
})
|
|
203
207
|
] });
|
|
204
208
|
}
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */
|
|
209
|
+
function v({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...g }) {
|
|
210
|
+
return /* @__PURE__ */ h(t, {
|
|
207
211
|
widgetName: s,
|
|
208
212
|
baseUrl: e,
|
|
209
213
|
widgetToken: n,
|
|
@@ -217,9 +221,9 @@ function _({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
|
|
|
217
221
|
onError: d,
|
|
218
222
|
analytics: f,
|
|
219
223
|
disclosuresAcceptance: p,
|
|
220
|
-
providerLabels:
|
|
221
|
-
children: /* @__PURE__ */
|
|
224
|
+
providerLabels: m,
|
|
225
|
+
children: /* @__PURE__ */ h(_, { ...g }, g.counterpartType)
|
|
222
226
|
});
|
|
223
227
|
}
|
|
224
228
|
//#endregion
|
|
225
|
-
export {
|
|
229
|
+
export { v as CounterpartsWidget, v as default };
|