@tesouro/embedded-components-react 0.2.267 → 0.2.270
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 +15 -12
- package/dist/experimental/WidgetSuite.d.ts +25 -1
- package/dist/experimental/index.d.ts +25 -1
- package/dist/index.css +3 -0
- package/dist/index.d.ts +46 -22
- package/dist/lib/AcceptDisclosuresWidget.d.ts +25 -1
- package/dist/lib/BalancesWidget.d.ts +24 -0
- package/dist/lib/BankAccountOnboardingWidget.d.ts +25 -1
- package/dist/lib/BankAccountsWidget.d.ts +25 -1
- package/dist/lib/BillPayWidget.d.ts +24 -0
- package/dist/lib/CardDetailsWidget.d.ts +25 -1
- package/dist/lib/CardsWidget.d.ts +25 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +25 -1
- package/dist/lib/CounterpartsWidget.d.ts +25 -1
- package/dist/lib/CreateCardWidget.d.ts +25 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +25 -1
- package/dist/lib/ExpenseManagementWidget.d.ts +25 -1
- package/dist/lib/ExpenseRequirementsWidget.d.ts +25 -1
- package/dist/lib/HelpWidget.d.ts +25 -1
- package/dist/lib/InsightsWidget.d.ts +24 -0
- package/dist/lib/InvoicingWidget.d.ts +25 -1
- package/dist/lib/LinkedAccountsWidget.d.ts +25 -1
- package/dist/lib/ProductsWidget.d.ts +25 -1
- package/dist/lib/ProfileWidget.d.ts +25 -1
- package/dist/lib/ReceiptMatchWidget.d.ts +25 -1
- package/dist/lib/ReceivablesWidget.d.ts +25 -1
- package/dist/lib/SettingsWidget.d.ts +25 -1
- package/dist/lib/TagsWidget.d.ts +25 -1
- package/dist/lib/TeamWidget.d.ts +25 -1
- package/dist/lib/TransfersWidget.d.ts +24 -0
- package/dist/lib/WidgetProvider.d.ts +25 -1
- package/dist/lib/WidgetProviderPublic.d.ts +24 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +122 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +94 -93
- package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/widgetGatewayHosts.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +76 -67
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +107 -101
- 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/analytics/client.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +106 -105
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +9 -8
- package/package.json +1 -1
|
@@ -19,23 +19,24 @@ function c(n) {
|
|
|
19
19
|
i(t.Mounted);
|
|
20
20
|
}, [i]), /* @__PURE__ */ o(r, { ...n });
|
|
21
21
|
}
|
|
22
|
-
function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a,
|
|
22
|
+
function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, implementation: d, uiFramework: f, errorFallback: p, onError: m, finopsThemeColors: h, analytics: g, pageTitleComponent: _ = s, ...v }) {
|
|
23
23
|
return /* @__PURE__ */ o(i, {
|
|
24
24
|
widgetName: n,
|
|
25
25
|
baseUrl: e,
|
|
26
26
|
widgetToken: t,
|
|
27
27
|
organizationId: r,
|
|
28
28
|
configClient: a,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
gatewayRouting: l,
|
|
30
|
+
linkComponent: u,
|
|
31
|
+
implementation: d,
|
|
32
|
+
uiFramework: f,
|
|
33
|
+
errorFallback: p,
|
|
34
|
+
onError: m,
|
|
35
|
+
finopsThemeColors: h,
|
|
36
|
+
analytics: g,
|
|
36
37
|
children: /* @__PURE__ */ o(c, {
|
|
37
|
-
...
|
|
38
|
-
pageTitleComponent:
|
|
38
|
+
...v,
|
|
39
|
+
pageTitleComponent: _
|
|
39
40
|
})
|
|
40
41
|
});
|
|
41
42
|
}
|
|
@@ -92,20 +92,21 @@ function w({ labels: i, tabsLabels: f, approvalPolicyLabels: w, approvalPolicyCo
|
|
|
92
92
|
}) : null
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
|
-
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r,
|
|
95
|
+
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...p }) {
|
|
96
96
|
return /* @__PURE__ */ b(i, {
|
|
97
97
|
widgetName: f,
|
|
98
98
|
baseUrl: e,
|
|
99
99
|
widgetToken: t,
|
|
100
100
|
organizationId: n,
|
|
101
101
|
configClient: r,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
gatewayRouting: a,
|
|
103
|
+
linkComponent: o,
|
|
104
|
+
implementation: s,
|
|
105
|
+
uiFramework: c,
|
|
106
|
+
errorFallback: l,
|
|
107
|
+
onError: u,
|
|
108
|
+
analytics: d,
|
|
109
|
+
children: /* @__PURE__ */ b(w, { ...p })
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js
CHANGED
|
@@ -83,20 +83,21 @@ function w({ cardId: r, cardProgram: l, onClose: w, labels: T, featureLabels: E,
|
|
|
83
83
|
onRetry: N === d.Supported ? G : void 0
|
|
84
84
|
})] });
|
|
85
85
|
}
|
|
86
|
-
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i,
|
|
86
|
+
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, ...p }) {
|
|
87
87
|
return /* @__PURE__ */ S(r, {
|
|
88
88
|
widgetName: l,
|
|
89
89
|
baseUrl: e,
|
|
90
90
|
widgetToken: t,
|
|
91
91
|
organizationId: n,
|
|
92
92
|
configClient: i,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
gatewayRouting: a,
|
|
94
|
+
linkComponent: o,
|
|
95
|
+
implementation: s,
|
|
96
|
+
uiFramework: c,
|
|
97
|
+
errorFallback: u,
|
|
98
|
+
onError: d,
|
|
99
|
+
analytics: f,
|
|
100
|
+
children: /* @__PURE__ */ S(w, { ...p })
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
//#endregion
|
|
@@ -58,7 +58,7 @@ function u({ cardProgram: s, pagination: u, defaultPagination: d, onPaginationCh
|
|
|
58
58
|
resetKey: O,
|
|
59
59
|
paginationToken: T.paginationToken,
|
|
60
60
|
pageSize: T.pageSize
|
|
61
|
-
})), [De, Oe] = o(!
|
|
61
|
+
})), [De, Oe] = o(!0), [ke, M] = he({
|
|
62
62
|
prop: ve,
|
|
63
63
|
defaultProp: ye ?? null,
|
|
64
64
|
onChange: be,
|
|
@@ -68,20 +68,21 @@ function m({ cardProgram: e, pagination: t, defaultPagination: m, onPaginationCh
|
|
|
68
68
|
}, V)
|
|
69
69
|
})] });
|
|
70
70
|
}
|
|
71
|
-
function h({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a,
|
|
71
|
+
function h({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: p, ...h }) {
|
|
72
72
|
return /* @__PURE__ */ f(e, {
|
|
73
73
|
widgetName: t,
|
|
74
74
|
baseUrl: n,
|
|
75
75
|
widgetToken: r,
|
|
76
76
|
organizationId: i,
|
|
77
77
|
configClient: a,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
gatewayRouting: o,
|
|
79
|
+
linkComponent: s,
|
|
80
|
+
implementation: c,
|
|
81
|
+
uiFramework: l,
|
|
82
|
+
errorFallback: u,
|
|
83
|
+
onError: d,
|
|
84
|
+
analytics: p,
|
|
85
|
+
children: /* @__PURE__ */ f(m, { ...h })
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -24,7 +24,7 @@ function w({ columnCount: e }) {
|
|
|
24
24
|
children: Array.from({ length: e }).map((e, n) => /* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(t, { className: "ttw:h-4 ttw:w-24" }) }, n))
|
|
25
25
|
}, r)) });
|
|
26
26
|
}
|
|
27
|
-
function T({ rows: t, columns: _, isLoading: C = !1, isError: T = !1, canToggleShowMyCards: E = !1, isShowingMyCards: D = !
|
|
27
|
+
function T({ rows: t, columns: _, isLoading: C = !1, isError: T = !1, canToggleShowMyCards: E = !1, isShowingMyCards: D = !0, onShowMyCardsChange: O, canCreateCard: k = !1, onCreateCardClick: A, onRetry: j, isPaginationVisible: M = !1, pageSize: N = 10, pageSizeOptions: P = S, rangeLabel: F = "", isPreviousPageDisabled: I = !1, isNextPageDisabled: L = !1, onPageSizeChange: R, onPreviousPageClick: z, onNextPageClick: B, labels: V }) {
|
|
28
28
|
let H = h(), U = g(() => p(V), [V]), W = !!(k && A), G = R && z && B ? {
|
|
29
29
|
onPageSizeChange: R,
|
|
30
30
|
onPreviousPageClick: z,
|
|
@@ -19,7 +19,7 @@ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, children: p
|
|
|
19
19
|
},
|
|
20
20
|
children: /* @__PURE__ */ c(t, {
|
|
21
21
|
showCloseButton: !1,
|
|
22
|
-
className: i("ttw:w-168 ttw:sm:max-w-168", f ?? "ttw:overflow-y-auto"),
|
|
22
|
+
className: i("ttw:w-168 ttw:sm:max-w-168", "ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ s(r, {
|
|
25
25
|
className: "ttw:sr-only",
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js
CHANGED
|
@@ -198,20 +198,21 @@ function g({ counterpartType: t, pageSizeOptions: s = c, showTitle: g, onViewAll
|
|
|
198
198
|
})
|
|
199
199
|
] });
|
|
200
200
|
}
|
|
201
|
-
function _({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i,
|
|
201
|
+
function _({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, ...p }) {
|
|
202
202
|
return /* @__PURE__ */ m(t, {
|
|
203
203
|
widgetName: s,
|
|
204
204
|
baseUrl: e,
|
|
205
205
|
widgetToken: n,
|
|
206
206
|
organizationId: r,
|
|
207
207
|
configClient: i,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
208
|
+
gatewayRouting: a,
|
|
209
|
+
linkComponent: o,
|
|
210
|
+
implementation: c,
|
|
211
|
+
uiFramework: l,
|
|
212
|
+
errorFallback: u,
|
|
213
|
+
onError: d,
|
|
214
|
+
analytics: f,
|
|
215
|
+
children: /* @__PURE__ */ m(g, { ...p }, p.counterpartType)
|
|
215
216
|
});
|
|
216
217
|
}
|
|
217
218
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js
CHANGED
|
@@ -16,25 +16,25 @@ import { CREATE_CARD_WIDGET_LABELS_EN as o } from "../../ui/dist/lib/CreateCardW
|
|
|
16
16
|
import { CreateCardView as s, MailingOptionValue as c } from "../../ui/dist/lib/CreateCardWidget/types.js";
|
|
17
17
|
import { CreateCardWidget as te } from "../../ui/dist/lib/CreateCardWidget/CreateCardWidget.js";
|
|
18
18
|
import "../../ui/dist/index.js";
|
|
19
|
-
import { CardFormatValue as l, buildCreateDebitCardRequest as
|
|
20
|
-
import { resolveCreateCardFeatureLabels as
|
|
21
|
-
import { CreateCardWidgetAnalyticsEvent as
|
|
22
|
-
import { getCreateCardPermissions as
|
|
23
|
-
import { useCreateCardCardholderOptions as
|
|
24
|
-
import { useCreateCard as
|
|
25
|
-
import { useCreateDebitCardMutation as
|
|
26
|
-
import { useCreateCardOrganizationQuery as
|
|
19
|
+
import { CardFormatValue as l, buildCreateDebitCardRequest as u, createDebitCardReference as ne, formatBusinessAddress as re, isBusinessAddressComplete as ie, isManualAddressComplete as ae } from "./index3.js";
|
|
20
|
+
import { resolveCreateCardFeatureLabels as oe } from "./index4.js";
|
|
21
|
+
import { CreateCardWidgetAnalyticsEvent as se, WIDGET_NAME as d } from "./index2.js";
|
|
22
|
+
import { getCreateCardPermissions as ce } from "./index5.js";
|
|
23
|
+
import { useCreateCardCardholderOptions as le } from "./index6.js";
|
|
24
|
+
import { useCreateCard as ue } from "../../data-access/dist/index2.js";
|
|
25
|
+
import { useCreateDebitCardMutation as de } from "../../data-access/dist/index4.js";
|
|
26
|
+
import { useCreateCardOrganizationQuery as fe } from "../../data-access/dist/index5.js";
|
|
27
27
|
import "../../data-access/dist/index.js";
|
|
28
|
-
import { useEffect as
|
|
29
|
-
import { Fragment as
|
|
28
|
+
import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
29
|
+
import { Fragment as pe, jsx as g, jsxs as me } from "react/jsx-runtime";
|
|
30
30
|
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js
|
|
31
|
-
var
|
|
31
|
+
var _ = {
|
|
32
32
|
street: "",
|
|
33
33
|
city: "",
|
|
34
34
|
state: "",
|
|
35
35
|
zip: ""
|
|
36
|
-
},
|
|
37
|
-
function
|
|
36
|
+
}, he = 3e3, ge = 5e3;
|
|
37
|
+
function _e(e, t) {
|
|
38
38
|
if (e === "PENDING_ACTIVATION") return {
|
|
39
39
|
title: t.success.pendingActivationTitle,
|
|
40
40
|
description: t.success.pendingActivationDescription
|
|
@@ -44,157 +44,158 @@ function ve(e, t) {
|
|
|
44
44
|
description: t.success.createdDescription
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function v(e) {
|
|
48
48
|
let t = e?.trim().slice(-4);
|
|
49
49
|
return t ? `••••${t}` : void 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let n = e.nickname?.trim(), r =
|
|
51
|
+
function y(e, t) {
|
|
52
|
+
let n = e.nickname?.trim(), r = v(e.accountNumber);
|
|
53
53
|
return n && r ? `${n} (${r})` : n || r || t;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
let
|
|
55
|
+
function b({ cardArtSrc: ee, labels: d, featureLabels: v, className: b, onClose: x, onCancel: ve, onViewCard: S }) {
|
|
56
|
+
let C = r(), { isReady: w } = ue(), { initResponse: T, organizationId: E } = a(), D = p(() => ce(T?.scopes), [T?.scopes]), O = oe(v), k = {
|
|
57
57
|
...o,
|
|
58
|
-
...
|
|
58
|
+
...d,
|
|
59
59
|
setup: {
|
|
60
60
|
...o.setup,
|
|
61
|
-
...
|
|
61
|
+
...d?.setup
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, ye = p(() => [{
|
|
64
64
|
value: l.Virtual,
|
|
65
|
-
label:
|
|
65
|
+
label: k.setup.cardFormatVirtual
|
|
66
66
|
}, {
|
|
67
67
|
value: l.Physical,
|
|
68
|
-
label:
|
|
69
|
-
}], [
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}), []),
|
|
77
|
-
|
|
78
|
-
}, [
|
|
79
|
-
let { options:
|
|
68
|
+
label: k.setup.cardFormatPhysical
|
|
69
|
+
}], [k.setup.cardFormatPhysical, k.setup.cardFormatVirtual]), be = p(() => i(), []), [xe, A] = h(s.Setup), [j, M] = h(null), [N, P] = h(null), [Se, F] = h(null), [I, L] = h(null), [R, z] = h(_), [B, V] = h(null), [H, U] = h(null), W = () => {
|
|
70
|
+
M(null), P(null), F(null), L(null), z(_), V(null), U(null), A(s.Setup);
|
|
71
|
+
}, G = m(E);
|
|
72
|
+
E && E !== G.current && (G.current = E, W());
|
|
73
|
+
let K = m(!0);
|
|
74
|
+
f(() => (K.current = !0, () => {
|
|
75
|
+
K.current = !1;
|
|
76
|
+
}), []), f(() => {
|
|
77
|
+
C(se.Mounted);
|
|
78
|
+
}, [C]);
|
|
79
|
+
let { options: Ce, isError: q, refetch: we } = le({ enabled: w && D.canReadUsers && D.canReadRoles }), Te = fe({ enabled: w && D.canReadOrganization }), J = t({ enabled: w && D.canReadFundingAccounts }), Ee = de(), Y = !!J.isError && w && D.canReadFundingAccounts, X = p(() => Y ? [] : (J.data?.data ?? []).map((e) => ({
|
|
80
80
|
value: e.id,
|
|
81
|
-
label:
|
|
81
|
+
label: y(e, O.untitledFundingAccount)
|
|
82
82
|
})), [
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
J.data?.data,
|
|
84
|
+
O.untitledFundingAccount,
|
|
85
85
|
Y
|
|
86
|
-
]), Z =
|
|
87
|
-
let e =
|
|
86
|
+
]), Z = Se ?? (X.length === 1 ? X[0].value : null), Q = Te.data?.address, De = re(Q), Oe = ie(Q), $ = N === l.Physical, ke = $ && I === c.BusinessAddress && !!De, Ae = $ && I === c.DifferentAddress, je = Y || X.length > 0, Me = !w || !D.canIssue || Ee.isPending || q || Y || !j || !N || !Z || N === l.Physical && (!I || I === c.BusinessAddress && !Oe || I === c.DifferentAddress && !ae(R)), Ne = p(() => {
|
|
87
|
+
let e = _e(H, O);
|
|
88
88
|
return {
|
|
89
|
-
...
|
|
89
|
+
...d,
|
|
90
90
|
success: {
|
|
91
|
-
...
|
|
91
|
+
...d?.success,
|
|
92
92
|
...e
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}, [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
H,
|
|
97
|
+
O,
|
|
98
|
+
d
|
|
99
99
|
]), Pe = async () => {
|
|
100
|
-
if (!
|
|
101
|
-
let t =
|
|
102
|
-
cardholderUserId:
|
|
103
|
-
format:
|
|
100
|
+
if (!w) return;
|
|
101
|
+
let t = ne(), n = u({
|
|
102
|
+
cardholderUserId: j,
|
|
103
|
+
format: N,
|
|
104
104
|
bankAccountId: Z,
|
|
105
105
|
reference: t,
|
|
106
|
-
mailingOption:
|
|
106
|
+
mailingOption: I,
|
|
107
107
|
orgAddress: Q,
|
|
108
|
-
manualAddress:
|
|
108
|
+
manualAddress: R
|
|
109
109
|
});
|
|
110
110
|
if (!n) return;
|
|
111
|
-
|
|
112
|
-
let r = e.loading(
|
|
111
|
+
A(s.Preparing);
|
|
112
|
+
let r = e.loading(O.toast.creating);
|
|
113
113
|
try {
|
|
114
|
-
let t = await
|
|
115
|
-
if (!
|
|
114
|
+
let t = await Ee.mutateAsync({ body: n });
|
|
115
|
+
if (!K.current) {
|
|
116
116
|
e.dismiss(r);
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
V(t.id), U(t.cardStatus), A(s.Success), e.success(O.toast.success, {
|
|
120
120
|
id: r,
|
|
121
|
-
duration:
|
|
121
|
+
duration: he
|
|
122
122
|
});
|
|
123
123
|
} catch {
|
|
124
|
-
if (!
|
|
124
|
+
if (!K.current) {
|
|
125
125
|
e.dismiss(r);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
A(s.Setup), e.error(O.toast.error, {
|
|
129
129
|
id: r,
|
|
130
|
-
duration:
|
|
130
|
+
duration: ge
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
view:
|
|
134
|
+
return /* @__PURE__ */ me(pe, { children: [/* @__PURE__ */ g(n, {}), /* @__PURE__ */ g(te, {
|
|
135
|
+
view: xe,
|
|
136
136
|
cardArtSrc: ee,
|
|
137
137
|
labels: Ne,
|
|
138
|
-
className:
|
|
139
|
-
cardholderOptions:
|
|
140
|
-
selectedCardholder:
|
|
141
|
-
onCardholderSelect:
|
|
142
|
-
isCardholderError:
|
|
143
|
-
onCardholderRetry:
|
|
144
|
-
cardFormatOptions:
|
|
145
|
-
selectedCardFormat:
|
|
138
|
+
className: b,
|
|
139
|
+
cardholderOptions: Ce,
|
|
140
|
+
selectedCardholder: j,
|
|
141
|
+
onCardholderSelect: M,
|
|
142
|
+
isCardholderError: q,
|
|
143
|
+
onCardholderRetry: q ? we : void 0,
|
|
144
|
+
cardFormatOptions: ye,
|
|
145
|
+
selectedCardFormat: N,
|
|
146
146
|
onCardFormatSelect: (e) => {
|
|
147
|
-
|
|
147
|
+
P(e), L(null);
|
|
148
148
|
},
|
|
149
149
|
isFundingAccountVisible: je,
|
|
150
150
|
fundingAccountOptions: X,
|
|
151
151
|
selectedFundingAccount: Z,
|
|
152
|
-
onFundingAccountSelect:
|
|
152
|
+
onFundingAccountSelect: F,
|
|
153
153
|
isFundingAccountError: Y,
|
|
154
154
|
onFundingAccountRetry: Y ? () => {
|
|
155
|
-
|
|
155
|
+
J.refetch();
|
|
156
156
|
} : void 0,
|
|
157
157
|
isMailingSectionVisible: $,
|
|
158
|
-
selectedMailingOption:
|
|
159
|
-
onMailingOptionSelect:
|
|
158
|
+
selectedMailingOption: I,
|
|
159
|
+
onMailingOptionSelect: L,
|
|
160
160
|
businessAddress: De,
|
|
161
161
|
isBusinessAddressVisible: ke,
|
|
162
162
|
isManualAddressVisible: Ae,
|
|
163
|
-
manualAddress:
|
|
164
|
-
onManualAddressChange: (e) =>
|
|
163
|
+
manualAddress: R,
|
|
164
|
+
onManualAddressChange: (e) => z((t) => ({
|
|
165
165
|
...t,
|
|
166
166
|
...e
|
|
167
167
|
})),
|
|
168
|
-
stateOptions:
|
|
168
|
+
stateOptions: be,
|
|
169
169
|
isCreateDisabled: Me,
|
|
170
170
|
onCreateClick: () => {
|
|
171
171
|
Pe();
|
|
172
172
|
},
|
|
173
173
|
onCancelClick: () => {
|
|
174
|
-
|
|
174
|
+
ve?.(), x?.();
|
|
175
175
|
},
|
|
176
|
-
onClose:
|
|
177
|
-
onCreateAnotherClick:
|
|
178
|
-
onViewCardClick:
|
|
179
|
-
|
|
176
|
+
onClose: x,
|
|
177
|
+
onCreateAnotherClick: W,
|
|
178
|
+
onViewCardClick: S && B ? () => {
|
|
179
|
+
S(B);
|
|
180
180
|
} : void 0
|
|
181
181
|
})] });
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
widgetName:
|
|
183
|
+
function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: te, analytics: l, ...u }) {
|
|
184
|
+
return /* @__PURE__ */ g(ee, {
|
|
185
|
+
widgetName: d,
|
|
186
186
|
baseUrl: e,
|
|
187
187
|
widgetToken: t,
|
|
188
188
|
organizationId: n,
|
|
189
189
|
configClient: r,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
gatewayRouting: i,
|
|
191
|
+
linkComponent: a,
|
|
192
|
+
implementation: o,
|
|
193
|
+
uiFramework: s,
|
|
194
|
+
errorFallback: c,
|
|
195
|
+
onError: te,
|
|
196
|
+
analytics: l,
|
|
197
|
+
children: /* @__PURE__ */ g(b, { ...u })
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
//#endregion
|
|
200
|
-
export {
|
|
201
|
+
export { x as CreateCardWidget, y as formatFundingAccountLabel };
|
|
@@ -201,18 +201,19 @@ function R() {
|
|
|
201
201
|
onDeleteRule: (e) => void le(e)
|
|
202
202
|
})] });
|
|
203
203
|
}
|
|
204
|
-
function z({ token: e, orgId: t, widgetToken: n, organizationId: r, baseUrl: i, configClient: a,
|
|
204
|
+
function z({ token: e, orgId: t, widgetToken: n, organizationId: r, baseUrl: i, configClient: a, gatewayRouting: s, linkComponent: c, implementation: l, uiFramework: u, errorFallback: d, onError: p } = {}) {
|
|
205
205
|
return /* @__PURE__ */ S(o, {
|
|
206
206
|
widgetName: f,
|
|
207
207
|
baseUrl: i,
|
|
208
208
|
widgetToken: n ?? e,
|
|
209
209
|
organizationId: r ?? t,
|
|
210
210
|
configClient: a,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
gatewayRouting: s,
|
|
212
|
+
linkComponent: c,
|
|
213
|
+
implementation: l,
|
|
214
|
+
uiFramework: u,
|
|
215
|
+
errorFallback: d,
|
|
216
|
+
onError: p,
|
|
216
217
|
children: /* @__PURE__ */ S(R, {})
|
|
217
218
|
});
|
|
218
219
|
}
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js
CHANGED
|
@@ -29,20 +29,21 @@ function u({ labels: t, receiptUpload: r, receiptsContent: u, matchingContent: d
|
|
|
29
29
|
requirementsContent: p ?? /* @__PURE__ */ l(o, {})
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function d({ baseUrl: e, widgetToken: n, organizationId: i, configClient: a,
|
|
32
|
+
function d({ baseUrl: e, widgetToken: n, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, ...h }) {
|
|
33
33
|
return /* @__PURE__ */ l(t, {
|
|
34
34
|
widgetName: r,
|
|
35
35
|
baseUrl: e,
|
|
36
36
|
widgetToken: n,
|
|
37
37
|
organizationId: i,
|
|
38
38
|
configClient: a,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
gatewayRouting: o,
|
|
40
|
+
linkComponent: s,
|
|
41
|
+
implementation: c,
|
|
42
|
+
uiFramework: d,
|
|
43
|
+
errorFallback: f,
|
|
44
|
+
onError: p,
|
|
45
|
+
analytics: m,
|
|
46
|
+
children: /* @__PURE__ */ l(u, { ...h })
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
//#endregion
|
|
@@ -46,24 +46,25 @@ function m({ isOpen: e, onClose: t, ...n }) {
|
|
|
46
46
|
...n
|
|
47
47
|
}) : null;
|
|
48
48
|
}
|
|
49
|
-
function h({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i,
|
|
49
|
+
function h({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: f, isOpen: p, preSelectedReceiptIds: h, onClose: g, targetTransactionId: _, onSingleTransactionUpdate: v }) {
|
|
50
50
|
return /* @__PURE__ */ d(n, {
|
|
51
51
|
widgetName: o,
|
|
52
52
|
baseUrl: e,
|
|
53
53
|
widgetToken: t,
|
|
54
54
|
organizationId: r,
|
|
55
55
|
configClient: i,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
gatewayRouting: a,
|
|
57
|
+
linkComponent: s,
|
|
58
|
+
implementation: c,
|
|
59
|
+
uiFramework: l,
|
|
60
|
+
errorFallback: u,
|
|
61
|
+
onError: f,
|
|
61
62
|
children: /* @__PURE__ */ d(m, {
|
|
62
|
-
isOpen:
|
|
63
|
-
preSelectedReceiptIds:
|
|
64
|
-
onClose:
|
|
65
|
-
targetTransactionId:
|
|
66
|
-
onSingleTransactionUpdate:
|
|
63
|
+
isOpen: p,
|
|
64
|
+
preSelectedReceiptIds: h,
|
|
65
|
+
onClose: g,
|
|
66
|
+
targetTransactionId: _,
|
|
67
|
+
onSingleTransactionUpdate: v
|
|
67
68
|
})
|
|
68
69
|
});
|
|
69
70
|
}
|
|
@@ -63,18 +63,19 @@ function x() {
|
|
|
63
63
|
})]
|
|
64
64
|
})] });
|
|
65
65
|
}
|
|
66
|
-
function S({ token: e, orgId: t, widgetToken: n, organizationId: r, baseUrl: a, configClient: o,
|
|
66
|
+
function S({ token: e, orgId: t, widgetToken: n, organizationId: r, baseUrl: a, configClient: o, gatewayRouting: s, linkComponent: c, implementation: u, uiFramework: d, errorFallback: f, onError: p } = {}) {
|
|
67
67
|
return /* @__PURE__ */ h(i, {
|
|
68
68
|
widgetName: l,
|
|
69
69
|
baseUrl: a,
|
|
70
70
|
widgetToken: n ?? e,
|
|
71
71
|
organizationId: r ?? t,
|
|
72
72
|
configClient: o,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
gatewayRouting: s,
|
|
74
|
+
linkComponent: c,
|
|
75
|
+
implementation: u,
|
|
76
|
+
uiFramework: d,
|
|
77
|
+
errorFallback: f,
|
|
78
|
+
onError: p,
|
|
78
79
|
children: /* @__PURE__ */ h(x, {})
|
|
79
80
|
});
|
|
80
81
|
}
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js
CHANGED
|
@@ -111,20 +111,21 @@ function b({ onEdit: r, onDelete: o, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
111
111
|
})
|
|
112
112
|
] })] });
|
|
113
113
|
}
|
|
114
|
-
function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i,
|
|
114
|
+
function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, analytics: u, errorFallback: d, onError: f, ...p }) {
|
|
115
115
|
return /* @__PURE__ */ _(r, {
|
|
116
116
|
widgetName: o,
|
|
117
117
|
baseUrl: e,
|
|
118
118
|
widgetToken: t,
|
|
119
119
|
organizationId: n,
|
|
120
120
|
configClient: i,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
gatewayRouting: a,
|
|
122
|
+
linkComponent: s,
|
|
123
|
+
implementation: c,
|
|
124
|
+
uiFramework: l,
|
|
125
|
+
analytics: u,
|
|
126
|
+
errorFallback: d,
|
|
127
|
+
onError: f,
|
|
128
|
+
children: /* @__PURE__ */ _(b, { ...p })
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
//#endregion
|