@tesouro/embedded-components-react 0.3.1 → 0.3.5

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 (50) hide show
  1. package/README.md +7 -10
  2. package/dist/experimental/WidgetSuite.d.ts +2 -2
  3. package/dist/experimental/index.d.ts +2 -2
  4. package/dist/index.d.ts +1 -23
  5. package/dist/lib/BankAccountsWidget.d.ts +0 -1
  6. package/dist/lib/ChartOfAccountsWidget.d.ts +1 -5
  7. package/dist/lib/CounterpartsWidget.d.ts +0 -9
  8. package/dist/lib/ExpenseManagementWidget.d.ts +0 -1
  9. package/dist/lib/ProductsWidget.d.ts +0 -1
  10. package/dist/lib/ReceivablesWidget.d.ts +0 -1
  11. package/dist/lib/SettingsWidget.d.ts +0 -1
  12. package/dist/lib/TagsWidget.d.ts +0 -1
  13. package/dist/lib/TeamWidget.d.ts +0 -3
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +64 -65
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +35 -36
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +35 -42
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +0 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +3 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
  24. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
  25. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
  26. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
  27. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
  31. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
  32. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
  35. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
  36. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
  42. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2781 -2775
  43. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index9.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
  46. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
  47. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
  48. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
  49. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
  50. 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 g, WidgetSuiteAnalyticsEvent as _ } from "./index2.js";
19
- import { needsDisclosureAcceptance as v } from "./index3.js";
20
- import { WidgetSuiteShell as y } from "../../ui/dist/index3.js";
21
- import { SectionPageTitle as b } from "../../ui/dist/index4.js";
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 x, useEffect as S, useMemo as C, useState as w } from "react";
24
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
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 O = {
26
+ var k = {
27
27
  initFailed: "widget-suite-init-failed",
28
28
  disclosuresRefreshFailed: "widget-suite-disclosures-refresh-failed"
29
29
  };
30
- function k({ labels: e, sectionLabels: n, sectionTitleLabels: r, disclosureLabels: l, showSectionTitle: p = !0 }) {
31
- let { availableSections: g, activeSection: _, navigate: C } = m(), { initResponse: k } = a(), A = o(), j = s(), M = i(), N = {
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
- }, P = x((e) => C({ section: e }), [C]), [F, I] = w(!1), L = x(() => I(!0), []), R = v(k), z = {
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
- S(() => {
47
- !R && F && I(!1);
48
- }, [F, R]);
49
- let B = !!(k && j);
50
- if (!k && !A || B && !A) return /* @__PURE__ */ E(y, {
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: P,
54
+ onSectionChange: F,
55
55
  labels: e
56
56
  });
57
- if ((!k || B) && A) return /* @__PURE__ */ E(t, {
58
- title: z.initFailedState.title,
59
- description: z.initFailedState.body,
60
- retryLabel: z.initFailedState.retryButton,
61
- onRetry: M,
62
- testId: O.initFailed
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 (R) return F && A ? /* @__PURE__ */ E(t, {
65
- title: z.refreshFailedState.title,
66
- description: z.refreshFailedState.body,
67
- retryLabel: z.refreshFailedState.retryButton,
68
- onRetry: M,
69
- testId: O.disclosuresRefreshFailed
70
- }) : /* @__PURE__ */ E(c, { onAccepted: L });
71
- let V = k?.bankName?.trim(), H = V ? {
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}", V) : void 0, U = g.map((e) => {
75
- let { Content: t, rendersOwnTitle: n } = h[e], r = N[e];
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: r,
79
- content: p && !n ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(b, {
80
- title: r,
81
- bankTagline: H
82
- }), /* @__PURE__ */ E(t, {})] }) : /* @__PURE__ */ E(t, {})
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__ */ E(y, {
86
- sections: U,
87
- selectedSectionId: _ ?? "",
88
- onSectionChange: P,
85
+ return /* @__PURE__ */ D(b, {
86
+ sections: W,
87
+ selectedSectionId: v ?? "",
88
+ onSectionChange: F,
89
89
  labels: e
90
90
  });
91
91
  }
92
- function A({ sections: t, selection: r, defaultSelection: i, onSelectionChange: o, contentLabels: s, ...c }) {
92
+ function j({ sections: t, selection: r, defaultSelection: i, onSelectionChange: o, contentLabels: s, ...c }) {
93
93
  let u = n();
94
- S(() => {
95
- u(_.Mounted);
94
+ C(() => {
95
+ u(v.Mounted);
96
96
  }, [u]);
97
- let { initResponse: d } = a(), f = d?.scopes, m = C(() => ({
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__ */ E(p, {
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__ */ E(k, { ...c })
122
+ children: /* @__PURE__ */ D(A, { ...c })
123
123
  });
124
124
  }
125
- function j({ 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__ */ E(r, {
127
- widgetName: g,
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__ */ E(A, { ...p })
140
+ children: /* @__PURE__ */ D(j, { ...p })
141
141
  });
142
142
  }
143
143
  //#endregion
144
- export { O as WIDGET_SUITE_TEST_IDS, j as WidgetSuite, j as default };
144
+ export { k as WIDGET_SUITE_TEST_IDS, M as WidgetSuite, M as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.3.1",
3
+ "version": "0.3.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {