@tesouro/embedded-components-react 0.3.1 → 0.3.2
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 +7 -10
- package/dist/experimental/WidgetSuite.d.ts +2 -2
- package/dist/experimental/index.d.ts +2 -2
- package/dist/index.d.ts +1 -23
- package/dist/lib/BankAccountsWidget.d.ts +0 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +1 -5
- package/dist/lib/CounterpartsWidget.d.ts +0 -9
- package/dist/lib/ExpenseManagementWidget.d.ts +0 -1
- package/dist/lib/ProductsWidget.d.ts +0 -1
- package/dist/lib/ReceivablesWidget.d.ts +0 -1
- package/dist/lib/SettingsWidget.d.ts +0 -1
- package/dist/lib/TagsWidget.d.ts +0 -1
- package/dist/lib/TeamWidget.d.ts +0 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +64 -65
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +35 -36
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +35 -42
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
- package/package.json +1 -1
|
@@ -14,24 +14,24 @@ import { AcceptDisclosuresWidget as c } from "../../../accept-disclosures-widget
|
|
|
14
14
|
import "../../../accept-disclosures-widget/feature/dist/index.js";
|
|
15
15
|
import { WIDGET_SUITE_CONTENT_LABELS_EN as l, WIDGET_SUITE_DISCLOSURE_LABELS_EN as u, WIDGET_SUITE_SECTION_LABELS_EN as d, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as f } from "./index4.js";
|
|
16
16
|
import { WidgetSuiteProvider as p, useWidgetSuiteProvider as m } from "./index6.js";
|
|
17
|
-
import { WIDGET_SUITE_SECTIONS as h } from "./index7.js";
|
|
18
|
-
import { WIDGET_NAME as
|
|
19
|
-
import { needsDisclosureAcceptance as
|
|
20
|
-
import { WidgetSuiteShell as
|
|
21
|
-
import { SectionPageTitle as
|
|
17
|
+
import { WIDGET_SUITE_SECTIONS as h, WidgetSuiteSectionId as g } from "./index7.js";
|
|
18
|
+
import { WIDGET_NAME as _, WidgetSuiteAnalyticsEvent as v } from "./index2.js";
|
|
19
|
+
import { needsDisclosureAcceptance as y } from "./index3.js";
|
|
20
|
+
import { WidgetSuiteShell as b } from "../../ui/dist/index3.js";
|
|
21
|
+
import { SectionPageTitle as x } from "../../ui/dist/index4.js";
|
|
22
22
|
import "../../ui/dist/index.js";
|
|
23
|
-
import { useCallback as
|
|
24
|
-
import { Fragment as
|
|
23
|
+
import { useCallback as S, useEffect as C, useMemo as w, useState as T } from "react";
|
|
24
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
25
25
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js
|
|
26
|
-
var
|
|
26
|
+
var k = {
|
|
27
27
|
initFailed: "widget-suite-init-failed",
|
|
28
28
|
disclosuresRefreshFailed: "widget-suite-disclosures-refresh-failed"
|
|
29
29
|
};
|
|
30
|
-
function
|
|
31
|
-
let { availableSections:
|
|
30
|
+
function A({ labels: e, sectionLabels: n, sectionTitleLabels: r, disclosureLabels: l, showSectionTitle: p = !0 }) {
|
|
31
|
+
let { availableSections: _, activeSection: v, navigate: w } = m(), { initResponse: A } = a(), j = o(), M = s(), N = i(), P = {
|
|
32
32
|
...d,
|
|
33
33
|
...n
|
|
34
|
-
},
|
|
34
|
+
}, F = S((e) => w({ section: e }), [w]), [I, L] = T(!1), R = S(() => L(!0), []), z = y(A), B = {
|
|
35
35
|
...u,
|
|
36
36
|
...l,
|
|
37
37
|
initFailedState: {
|
|
@@ -43,58 +43,58 @@ function k({ labels: e, sectionLabels: n, sectionTitleLabels: r, disclosureLabel
|
|
|
43
43
|
...l?.refreshFailedState
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
!
|
|
48
|
-
}, [
|
|
49
|
-
let
|
|
50
|
-
if (!
|
|
46
|
+
C(() => {
|
|
47
|
+
!z && I && L(!1);
|
|
48
|
+
}, [I, z]);
|
|
49
|
+
let V = !!(A && M);
|
|
50
|
+
if (!A && !j || V && !j) return /* @__PURE__ */ D(b, {
|
|
51
51
|
isLoading: !0,
|
|
52
52
|
sections: [],
|
|
53
53
|
selectedSectionId: "",
|
|
54
|
-
onSectionChange:
|
|
54
|
+
onSectionChange: F,
|
|
55
55
|
labels: e
|
|
56
56
|
});
|
|
57
|
-
if ((!
|
|
58
|
-
title:
|
|
59
|
-
description:
|
|
60
|
-
retryLabel:
|
|
61
|
-
onRetry:
|
|
62
|
-
testId:
|
|
57
|
+
if ((!A || V) && j) return /* @__PURE__ */ D(t, {
|
|
58
|
+
title: B.initFailedState.title,
|
|
59
|
+
description: B.initFailedState.body,
|
|
60
|
+
retryLabel: B.initFailedState.retryButton,
|
|
61
|
+
onRetry: N,
|
|
62
|
+
testId: k.initFailed
|
|
63
63
|
});
|
|
64
|
-
if (
|
|
65
|
-
title:
|
|
66
|
-
description:
|
|
67
|
-
retryLabel:
|
|
68
|
-
onRetry:
|
|
69
|
-
testId:
|
|
70
|
-
}) : /* @__PURE__ */
|
|
71
|
-
let
|
|
64
|
+
if (z) return I && j ? /* @__PURE__ */ D(t, {
|
|
65
|
+
title: B.refreshFailedState.title,
|
|
66
|
+
description: B.refreshFailedState.body,
|
|
67
|
+
retryLabel: B.refreshFailedState.retryButton,
|
|
68
|
+
onRetry: N,
|
|
69
|
+
testId: k.disclosuresRefreshFailed
|
|
70
|
+
}) : /* @__PURE__ */ D(c, { onAccepted: R });
|
|
71
|
+
let H = A?.bankName?.trim(), U = H ? {
|
|
72
72
|
...f,
|
|
73
73
|
...r
|
|
74
|
-
}.bankTagline.replaceAll("{bankName}",
|
|
75
|
-
let { Content: t
|
|
74
|
+
}.bankTagline.replaceAll("{bankName}", H) : void 0, W = _.map((e) => {
|
|
75
|
+
let { Content: t } = h[e], n = P[e], r = e === g.Accounts ? void 0 : U;
|
|
76
76
|
return {
|
|
77
77
|
id: e,
|
|
78
|
-
label:
|
|
79
|
-
content: p
|
|
80
|
-
title:
|
|
81
|
-
bankTagline:
|
|
82
|
-
}), /* @__PURE__ */
|
|
78
|
+
label: n,
|
|
79
|
+
content: p ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(x, {
|
|
80
|
+
title: n,
|
|
81
|
+
bankTagline: r
|
|
82
|
+
}), /* @__PURE__ */ D(t, {})] }) : /* @__PURE__ */ D(t, {})
|
|
83
83
|
};
|
|
84
84
|
});
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
sections:
|
|
87
|
-
selectedSectionId:
|
|
88
|
-
onSectionChange:
|
|
85
|
+
return /* @__PURE__ */ D(b, {
|
|
86
|
+
sections: W,
|
|
87
|
+
selectedSectionId: v ?? "",
|
|
88
|
+
onSectionChange: F,
|
|
89
89
|
labels: e
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function j({ sections: t, selection: r, defaultSelection: i, onSelectionChange: o, contentLabels: s, ...c }) {
|
|
93
93
|
let u = n();
|
|
94
|
-
|
|
95
|
-
u(
|
|
94
|
+
C(() => {
|
|
95
|
+
u(v.Mounted);
|
|
96
96
|
}, [u]);
|
|
97
|
-
let { initResponse: d } = a(), f = d?.scopes, m =
|
|
97
|
+
let { initResponse: d } = a(), f = d?.scopes, m = w(() => ({
|
|
98
98
|
creditCards: {
|
|
99
99
|
...l.creditCards,
|
|
100
100
|
...s?.creditCards
|
|
@@ -111,7 +111,7 @@ function A({ sections: t, selection: r, defaultSelection: i, onSelectionChange:
|
|
|
111
111
|
let n = h[t];
|
|
112
112
|
return !!n && (!n.anyOfScopes || e(f, n.anyOfScopes));
|
|
113
113
|
});
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ D(p, {
|
|
115
115
|
sections: t,
|
|
116
116
|
availableSections: g,
|
|
117
117
|
grantedScopes: f,
|
|
@@ -119,12 +119,12 @@ function A({ sections: t, selection: r, defaultSelection: i, onSelectionChange:
|
|
|
119
119
|
selection: r,
|
|
120
120
|
defaultSelection: i,
|
|
121
121
|
onSelectionChange: o,
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ D(A, { ...c })
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
widgetName:
|
|
125
|
+
function M({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...p }) {
|
|
126
|
+
return /* @__PURE__ */ D(r, {
|
|
127
|
+
widgetName: _,
|
|
128
128
|
baseUrl: e,
|
|
129
129
|
widgetToken: t,
|
|
130
130
|
organizationId: n,
|
|
@@ -137,8 +137,8 @@ function j({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
|
|
|
137
137
|
onError: u,
|
|
138
138
|
analytics: d,
|
|
139
139
|
disclosuresAcceptance: f,
|
|
140
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */ D(j, { ...p })
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
|
-
export {
|
|
144
|
+
export { k as WIDGET_SUITE_TEST_IDS, M as WidgetSuite, M as default };
|