@tesouro/embedded-components-react 0.11.20 → 0.11.22

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/dist/index.css CHANGED
@@ -2055,9 +2055,6 @@
2055
2055
  .ttw\:border-\[\#D0D5DD\] {
2056
2056
  border-color: #D0D5DD;
2057
2057
  }
2058
- .ttw\:border-\[\#E0E4EA\] {
2059
- border-color: #E0E4EA;
2060
- }
2061
2058
  .ttw\:border-\[\#EAECF0\] {
2062
2059
  border-color: #EAECF0;
2063
2060
  }
@@ -2250,9 +2247,6 @@
2250
2247
  .ttw\:bg-\[\#EFF8FF\] {
2251
2248
  background-color: #EFF8FF;
2252
2249
  }
2253
- .ttw\:bg-\[\#F0F2FD\] {
2254
- background-color: #F0F2FD;
2255
- }
2256
2250
  .ttw\:bg-\[\#F2F4F7\] {
2257
2251
  background-color: #F2F4F7;
2258
2252
  }
@@ -5647,14 +5641,6 @@
5647
5641
  .ttw\:hover\:bg-primary:hover {
5648
5642
  background-color: var(--ttw-primary);
5649
5643
  }
5650
- .ttw\:hover\:bg-primary\/10:hover {
5651
- background-color: var(--ttw-primary);
5652
- }
5653
- @supports (color: color-mix(in lab, red, red)) {
5654
- .ttw\:hover\:bg-primary\/10:hover {
5655
- background-color: color-mix(in oklab, var(--ttw-primary) 10%, transparent);
5656
- }
5657
- }
5658
5644
  .ttw\:hover\:bg-primary\/15:hover {
5659
5645
  background-color: var(--ttw-primary);
5660
5646
  }
package/dist/index.d.ts CHANGED
@@ -3632,9 +3632,11 @@ declare function ExpenseManagementWidget({ screenLabels, headerLabels, transacti
3632
3632
 
3633
3633
  interface InsightsWidgetLabels {
3634
3634
  widgetTitle: string;
3635
+ filterTabsLabel: string;
3635
3636
  activeTab: string;
3636
3637
  dismissedTab: string;
3637
3638
  noInsightsFound: string;
3639
+ noInsightsDescription: string;
3638
3640
  /** Screen-reader only: names the wait while insights load. */
3639
3641
  loadingLabel: string;
3640
3642
  loadErrorTitle: string;
@@ -3650,7 +3652,6 @@ interface InsightRowView {
3650
3652
  displayText: string;
3651
3653
  createdDate: string;
3652
3654
  badgeLabel: string;
3653
- badgeIcon: ReactElement;
3654
3655
  showDismissButton: boolean;
3655
3656
  showToggle: boolean;
3656
3657
  toggleLabel?: string;
@@ -1,13 +1,15 @@
1
1
  import * as React from 'react';
2
- import { ReactElement, ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
2
+ import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
3
3
  import { RowData } from '@tanstack/react-table';
4
4
  import { FallbackProps } from 'react-error-boundary';
5
5
 
6
6
  interface InsightsWidgetLabels {
7
7
  widgetTitle: string;
8
+ filterTabsLabel: string;
8
9
  activeTab: string;
9
10
  dismissedTab: string;
10
11
  noInsightsFound: string;
12
+ noInsightsDescription: string;
11
13
  /** Screen-reader only: names the wait while insights load. */
12
14
  loadingLabel: string;
13
15
  loadErrorTitle: string;
@@ -23,7 +25,6 @@ interface InsightRowView {
23
25
  displayText: string;
24
26
  createdDate: string;
25
27
  badgeLabel: string;
26
- badgeIcon: ReactElement;
27
28
  showDismissButton: boolean;
28
29
  showToggle: boolean;
29
30
  toggleLabel?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo, ReactElement } from 'react';
2
+ import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
3
3
  import { RowData } from '@tanstack/react-table';
4
4
  import { FallbackProps } from 'react-error-boundary';
5
5
  import { PartialDeep } from 'type-fest';
@@ -2568,9 +2568,11 @@ type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidge
2568
2568
 
2569
2569
  interface InsightsWidgetLabels {
2570
2570
  widgetTitle: string;
2571
+ filterTabsLabel: string;
2571
2572
  activeTab: string;
2572
2573
  dismissedTab: string;
2573
2574
  noInsightsFound: string;
2575
+ noInsightsDescription: string;
2574
2576
  /** Screen-reader only: names the wait while insights load. */
2575
2577
  loadingLabel: string;
2576
2578
  loadErrorTitle: string;
@@ -2585,7 +2587,6 @@ interface InsightRowView {
2585
2587
  displayText: string;
2586
2588
  createdDate: string;
2587
2589
  badgeLabel: string;
2588
- badgeIcon: ReactElement;
2589
2590
  showDismissButton: boolean;
2590
2591
  showToggle: boolean;
2591
2592
  toggleLabel?: string;
@@ -9,7 +9,11 @@ var a = "PENDING_ACTIVATION", o = {
9
9
  [e.Credit]: i.filter((e) => e !== "fundingAccount" && e !== "limit"),
10
10
  [e.Debit]: i.filter((e) => e !== "limit")
11
11
  };
12
- function s(e) {
12
+ function s({ cardProgram: e, canReadFundingAccounts: t }) {
13
+ let n = o[e];
14
+ return t ? n : n.filter((e) => e !== "fundingAccount");
15
+ }
16
+ function c(e) {
13
17
  return e.map((e) => ({
14
18
  id: e.id,
15
19
  userId: e.userId,
@@ -22,7 +26,7 @@ function s(e) {
22
26
  limitCurrencyCode: e.currentBalance?.currencyCode
23
27
  }));
24
28
  }
25
- function c(e) {
29
+ function l(e) {
26
30
  return e.map((e) => ({
27
31
  id: e.id,
28
32
  userId: e.userId,
@@ -34,7 +38,7 @@ function c(e) {
34
38
  fundingAccountId: e.bankAccountId
35
39
  }));
36
40
  }
37
- function l(e, { labels: i, fundingAccountNames: o, canActivate: s, onCardSelect: c, onActivateCard: l }) {
41
+ function u(e, { labels: i, fundingAccountNames: o, canActivate: s, onCardSelect: c, onActivateCard: l }) {
38
42
  return e.map((e) => {
39
43
  let u = s && e.status === a, d = e.fundingAccountId ? o?.get(e.fundingAccountId) : void 0;
40
44
  return {
@@ -56,4 +60,4 @@ function l(e, { labels: i, fundingAccountNames: o, canActivate: s, onCardSelect:
56
60
  };
57
61
  });
58
62
  }
59
- export { o as CARD_COLUMNS_BY_PROGRAM, l as toCardRows, s as toCreditCardListItems, c as toDebitCardListItems };
63
+ export { o as CARD_COLUMNS_BY_PROGRAM, u as toCardRows, c as toCreditCardListItems, l as toDebitCardListItems, s as visibleCardColumns };
@@ -14,7 +14,7 @@ import { resolveCardsFeatureLabels as ae } from "./labels.js";
14
14
  import { getCardsPermissions as oe } from "./permissions.js";
15
15
  import { CardsWidgetAnalyticsEvent as se } from "./analytics/events.js";
16
16
  import { maskAccountNumber as ce } from "./formatters.js";
17
- import { CARD_COLUMNS_BY_PROGRAM as le, toCardRows as ue, toCreditCardListItems as de, toDebitCardListItems as fe } from "./rows.js";
17
+ import { toCardRows as le, toCreditCardListItems as ue, toDebitCardListItems as de, visibleCardColumns as fe } from "./rows.js";
18
18
  import { useCreditCardsQuery as pe } from "../../../data-access/dist/index2.js";
19
19
  import { useDebitCardsQuery as me } from "../../../data-access/dist/index3.js";
20
20
  import "../../../data-access/dist/index.js";
@@ -36,18 +36,18 @@ function u(e) {
36
36
  pageSize: t
37
37
  };
38
38
  }
39
- function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationChange: ye, featureLabels: p, selectedCardId: be, defaultSelectedCardId: xe, onSelectedCardIdChange: Se, onCreateCard: m, onActivateCard: h }) {
40
- let g = o(() => ae(p), [p]), _ = te();
39
+ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationChange: p, featureLabels: m, selectedCardId: ye, defaultSelectedCardId: be, onSelectedCardIdChange: xe, onCreateCard: Se, onActivateCard: Ce }) {
40
+ let h = o(() => ae(m), [m]), g = te();
41
41
  a(() => {
42
- _(se.Mounted);
43
- }, [_]);
44
- let { organizationId: v, widgetToken: Ce, initResponse: y } = ne(), b = y?.userId ?? void 0, we = ie(), { organizationStatus: x } = n(), Te = t(x), S = !!re(), Ee = !!(v && Ce) || !!Ce && x === e.Rotating, C = o(() => oe({
42
+ g(se.Mounted);
43
+ }, [g]);
44
+ let { organizationId: _, widgetToken: v, initResponse: y } = ne(), b = y?.userId ?? void 0, we = ie(), { organizationStatus: x } = n(), Te = t(x), S = !!re(), Ee = !!(_ && v) || !!v && x === e.Rotating, C = o(() => oe({
45
45
  cardProgram: c,
46
46
  scopes: y?.scopes
47
47
  }), [c, y?.scopes]), w = Ee && C.canRead && !!y, De = o(() => u(d), [d?.pageSize, d?.paginationToken]), T = o(() => u(f), [f?.pageSize, f?.paginationToken]), [E, Oe] = s(b);
48
48
  b !== void 0 && b !== E && Oe(b);
49
- let [D, ke] = s(v);
50
- v !== void 0 && v !== D && ke(v);
49
+ let [D, ke] = s(_);
50
+ _ !== void 0 && _ !== D && ke(_);
51
51
  let O = [
52
52
  c,
53
53
  D === null ? ve : D ?? "",
@@ -61,9 +61,9 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
61
61
  paginationToken: T.paginationToken,
62
62
  pageSize: T.pageSize
63
63
  })), [Ae, N] = s(!1), [je, P] = ge({
64
- prop: be,
65
- defaultProp: xe ?? null,
66
- onChange: Se,
64
+ prop: ye,
65
+ defaultProp: be ?? null,
66
+ onChange: xe,
67
67
  caller: "CardsWidget"
68
68
  }), F = he({
69
69
  cardProgram: c,
@@ -117,114 +117,117 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
117
117
  e.set(t.id, n ? {
118
118
  name: n,
119
119
  lastFour: t.accountNumber?.trim().slice(-4) || void 0
120
- } : { name: ce(t.accountNumber) ?? g.untitledFundingAccount });
120
+ } : { name: ce(t.accountNumber) ?? h.untitledFundingAccount });
121
121
  }
122
122
  return e;
123
123
  }, [
124
124
  K.data?.data,
125
- g.untitledFundingAccount,
125
+ h.untitledFundingAccount,
126
126
  C.canReadFundingAccounts
127
- ]), J = G && K.isError, Fe = G && !J && (K.isLoading || K.isFetchingNextPage || !!K.hasNextPage), Y = o(() => w ? c === r.Credit ? de(H.data?.data ?? []) : fe(U.data?.data ?? []) : [], [
127
+ ]), Fe = G && K.isError, Ie = G && !Fe && (K.isLoading || K.isFetchingNextPage || !!K.hasNextPage), J = o(() => w ? c === r.Credit ? ue(H.data?.data ?? []) : de(U.data?.data ?? []) : [], [
128
128
  w,
129
129
  c,
130
130
  H.data?.data,
131
131
  U.data?.data
132
- ]), Ie = o(() => ue(Y, {
133
- labels: g,
132
+ ]), Le = o(() => fe({
133
+ cardProgram: c,
134
+ canReadFundingAccounts: C.canReadFundingAccounts
135
+ }), [c, C.canReadFundingAccounts]), Re = o(() => le(J, {
136
+ labels: h,
134
137
  fundingAccountNames: q,
135
138
  canActivate: C.canActivate,
136
139
  onCardSelect: I,
137
- onActivateCard: h
140
+ onActivateCard: Ce
138
141
  }), [
139
- Y,
142
+ J,
140
143
  q,
141
144
  I,
142
- g,
143
145
  h,
146
+ Ce,
144
147
  C.canActivate
145
- ]), X = W.data?.nextPaginationToken ?? void 0, Z = W.data?.prevPaginationToken ?? void 0, Le = !!W.data, Re = w && (W.isError || J), [Q, ze] = s({
148
+ ]), Y = W.data?.nextPaginationToken ?? void 0, X = W.data?.prevPaginationToken ?? void 0, ze = !!W.data, Z = w && (W.isError || Fe), [Q, Be] = s({
146
149
  key: O,
147
150
  value: !1
148
151
  });
149
- if (w && !L && Le) {
150
- let e = Q.key !== O, t = !!b && Y.some((e) => e.userId !== b) || !e && Q.value;
151
- (e || Q.value !== t) && ze({
152
+ if (w && !L && ze) {
153
+ let e = Q.key !== O, t = !!b && J.some((e) => e.userId !== b) || !e && Q.value;
154
+ (e || Q.value !== t) && Be({
152
155
  key: O,
153
156
  value: t
154
157
  });
155
- } else Q.key !== O && ze({
158
+ } else Q.key !== O && Be({
156
159
  key: O,
157
160
  value: !1
158
161
  });
159
- let Be = Q.value, $ = i((e) => {
162
+ let Ve = Q.value, $ = i((e) => {
160
163
  A || M({
161
164
  resetKey: k,
162
165
  paginationToken: e.paginationToken,
163
166
  pageSize: e.pageSize
164
- }), ye?.(e);
167
+ }), p?.(e);
165
168
  }, [
166
169
  A,
167
- ye,
170
+ p,
168
171
  k
169
- ]), Ve = i(() => {
172
+ ]), He = i(() => {
170
173
  $({
171
174
  paginationToken: void 0,
172
175
  pageSize: z
173
176
  });
174
- }, [$, z]), He = i((e) => {
177
+ }, [$, z]), Ue = i((e) => {
175
178
  $({
176
179
  paginationToken: void 0,
177
180
  pageSize: e
178
181
  });
179
- }, [$]), Ue = i((e) => {
180
- N(e), Ve();
181
- }, [Ve]), We = i(() => {
182
+ }, [$]), We = i((e) => {
183
+ N(e), He();
184
+ }, [He]), Ge = i(() => {
182
185
  $({
183
- paginationToken: Z,
186
+ paginationToken: X,
184
187
  pageSize: z
185
188
  });
186
189
  }, [
187
190
  $,
188
191
  z,
189
- Z
190
- ]), Ge = i(() => {
192
+ X
193
+ ]), Ke = i(() => {
191
194
  $({
192
- paginationToken: X,
195
+ paginationToken: Y,
193
196
  pageSize: z
194
197
  });
195
198
  }, [
196
199
  $,
197
- X,
200
+ Y,
198
201
  z
199
- ]), Ke = W.refetch, qe = K.refetch, Je = i(() => {
200
- Ke(), G && qe();
202
+ ]), qe = W.refetch, Je = K.refetch, Ye = i(() => {
203
+ qe(), G && Je();
201
204
  }, [
202
205
  G,
203
- Ke,
204
- qe
206
+ qe,
207
+ Je
205
208
  ]);
206
209
  return {
207
- rows: Ie,
210
+ rows: Re,
208
211
  selectedCardId: Me ? null : je,
209
212
  onSelectCard: I,
210
213
  canReadCards: C.canRead,
211
- columns: le[c],
212
- isLoading: !S && (Te && !W.data || we && !y || w && (W.isLoading || Fe)),
213
- isError: S || Re,
214
- canToggleShowMyCards: C.canRead && !!b && Be,
214
+ columns: Le,
215
+ isLoading: !S && (Te && !W.data || we && !y || w && (W.isLoading || Ie)),
216
+ isError: S || Z,
217
+ canToggleShowMyCards: C.canRead && !!b && Ve,
215
218
  isShowingMyCards: L,
216
- onShowMyCardsChange: Ue,
217
- canCreateCard: C.canCreate && (!!m || C.canComposeDebitCreate),
218
- onCreateCardClick: m,
219
- onRetry: Je,
220
- isPaginationVisible: w && Le && !Re,
219
+ onShowMyCardsChange: We,
220
+ canCreateCard: C.canCreate && (!!Se || C.canComposeDebitCreate),
221
+ onCreateCardClick: Se,
222
+ onRetry: Ye,
223
+ isPaginationVisible: w && ze && !Z,
221
224
  pageSize: z,
222
225
  pageSizeOptions: _e,
223
- isPreviousPageDisabled: !Z,
224
- isNextPageDisabled: !X,
225
- onPageSizeChange: He,
226
- onPreviousPageClick: We,
227
- onNextPageClick: Ge
226
+ isPreviousPageDisabled: !X,
227
+ isNextPageDisabled: !Y,
228
+ onPageSizeChange: Ue,
229
+ onPreviousPageClick: Ge,
230
+ onNextPageClick: Ke
228
231
  };
229
232
  }
230
233
  export { d as useCardsWidget };
@@ -2,115 +2,123 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { OrganizationStatus as e } from "../../../../../shared/data-access/dist/lib/organizationStatus.js";
6
- import { useEmbedApi as t } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
- import { useAllBankAccountsQuery as n } from "../../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
8
- import { useAllExternalBankAccountsQuery as r } from "../../../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
5
+ import { DATE_DISPLAY_LOCALE as e, DATE_DISPLAY_OPTIONS as t } from "../../../../../shared/util/dist/lib/dateDisplay.js";
6
+ import "../../../../../shared/util/dist/index.js";
7
+ import { OrganizationStatus as n } from "../../../../../shared/data-access/dist/lib/organizationStatus.js";
8
+ import { useEmbedApi as ee } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { useAllBankAccountsQuery as r } from "../../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
10
+ import { useAllExternalBankAccountsQuery as i } from "../../../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
9
11
  import "../../../../../shared/data-access/dist/index.js";
10
- import { useRefetchWidget as i, useWidgetConfig as a, useWidgetError as o, useWidgetLoading as s } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
+ import { useRefetchWidget as a, useWidgetConfig as o, useWidgetError as s, useWidgetLoading as te } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
13
  import "../../../../../shared/feature/dist/index.js";
12
14
  import { INSIGHTS_FEATURE_LABELS_EN as c } from "./labels.js";
13
- import { useDismissedInsightIds as l } from "./useDismissedInsightIds.js";
14
- import { shouldShowRoutingOnboardingInsight as u } from "./shouldShowRoutingOnboardingInsight.js";
15
- import { getInsightsPermissions as d } from "./permissions.js";
16
- import { createContext as f, useCallback as p, useContext as m, useMemo as h, useState as g } from "react";
17
- import { jsx as ee } from "react/jsx-runtime";
15
+ import { useDismissedInsightIds as ne } from "./useDismissedInsightIds.js";
16
+ import { shouldShowRoutingOnboardingInsight as l } from "./shouldShowRoutingOnboardingInsight.js";
17
+ import { getInsightsPermissions as u } from "./permissions.js";
18
+ import { createContext as d, useCallback as f, useContext as p, useMemo as m, useState as h } from "react";
19
+ import { jsx as g } from "react/jsx-runtime";
18
20
  // ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/InsightsWidgetContext.js
19
- var _ = f({
21
+ var _ = d({
20
22
  activeFilter: "active",
21
23
  setActiveFilter: () => {},
22
24
  filteredInsights: [],
25
+ activeCount: 0,
26
+ dismissedCount: 0,
23
27
  isLoading: !1,
24
28
  isError: !1,
25
29
  refetch: async () => void 0,
26
30
  onDismissClick: () => {},
27
31
  featureLabels: c,
28
32
  createdDateLabel: ""
29
- }), v = () => m(_), y = ({ children: f, routingEnabled: m = !1, onRoutingToggleChange: v, onLinkExternalAccountClick: y, featureLabels: b }) => {
30
- let { initResponse: x } = a(), te = s(), { organizationStatus: ne } = t(), S = o(), C = i(), w = h(() => u(x?.scopes), [x?.scopes]), { canReadBankAccounts: T, canReadExternalBankAccounts: E } = h(() => d(x?.scopes), [x?.scopes]), D = h(() => ({
33
+ }), v = () => p(_), y = ({ children: d, routingEnabled: p = !1, onRoutingToggleChange: v, onLinkExternalAccountClick: y, featureLabels: b }) => {
34
+ let { initResponse: x } = o(), S = te(), { organizationStatus: C } = ee(), w = s(), T = a(), E = m(() => l(x?.scopes), [x?.scopes]), { canReadBankAccounts: D, canReadExternalBankAccounts: O } = m(() => u(x?.scopes), [x?.scopes]), k = m(() => ({
31
35
  ...c,
32
36
  ...b
33
- }), [b]), [O, k] = g("active"), [A, j] = g(!1), M = v !== void 0, N = M ? m : A, P = M ? v : j, { dismissedIds: F, isLoading: I, refetch: L, dismissInsight: R } = l(), { data: z, isLoading: B, isError: V, refetch: H } = n({ enabled: T }), { data: U, isLoading: W, isError: G, refetch: K } = r({ enabled: E }), q = z?.data, J = U?.data, Y = !T || q !== void 0 || V, X = !E || J !== void 0 || G, re = ne === e.None, Z = te || B || W || I || !(Y && X) && !S && !re, Q = !!S || (T || E) && !(T && !V) && !(E && !G), ie = p(() => (C(), Promise.all([
34
- T ? H() : void 0,
35
- E ? K() : void 0,
36
- L()
37
+ }), [b]), [A, re] = h("active"), [ie, ae] = h(!1), j = v !== void 0, M = j ? p : ie, N = j ? v : ae, { dismissedIds: P, isLoading: F, refetch: I, dismissInsight: L } = ne(), { data: R, isLoading: z, isError: B, refetch: V } = r({ enabled: D }), { data: H, isLoading: U, isError: W, refetch: G } = i({ enabled: O }), K = R?.data, q = H?.data, oe = !D || K !== void 0 || B, se = !O || q !== void 0 || W, ce = C === n.None, J = S || z || U || F || !(oe && se) && !w && !ce, Y = !!w || (D || O) && !(D && !B) && !(O && !W), le = f(() => (T(), Promise.all([
38
+ D ? V() : void 0,
39
+ O ? G() : void 0,
40
+ I()
37
41
  ])), [
38
- C,
39
- H,
40
- K,
41
- L,
42
42
  T,
43
- E
44
- ]), ae = h(() => (/* @__PURE__ */ new Date()).toLocaleDateString(), []), $ = h(() => {
45
- if (Z || Q) return [];
43
+ V,
44
+ G,
45
+ I,
46
+ D,
47
+ O
48
+ ]), X = m(() => new Intl.DateTimeFormat(e, t).format(/* @__PURE__ */ new Date()), []), Z = m(() => {
49
+ if (J || Y) return [];
46
50
  let e = [];
47
- if (w && e.push({
51
+ if (E && e.push({
48
52
  id: "insight-routing-onboarding",
49
- isDismissed: F.includes("insight-routing-onboarding"),
53
+ isDismissed: P.includes("insight-routing-onboarding"),
50
54
  canDismiss: !0,
51
55
  showToggle: !0,
52
- displayText: D.routingOnboardingText,
53
- toggleLabel: D.enableRoutingToggle,
54
- toggleChecked: N,
55
- onToggle: P
56
- }), q !== void 0 && q.length === 0 && e.push({
56
+ displayText: k.routingOnboardingText,
57
+ toggleLabel: k.enableRoutingToggle,
58
+ toggleChecked: M,
59
+ onToggle: N
60
+ }), K !== void 0 && K.length === 0 && e.push({
57
61
  id: "insight-create-embedded-account",
58
- isDismissed: F.includes("insight-create-embedded-account"),
62
+ isDismissed: P.includes("insight-create-embedded-account"),
59
63
  canDismiss: !0,
60
64
  showToggle: !1,
61
- displayText: D.createAccountText
62
- }), J !== void 0 && J.length === 0 && e.push({
65
+ displayText: k.createAccountText
66
+ }), q !== void 0 && q.length === 0 && e.push({
63
67
  id: "insight-connect-external-account",
64
- isDismissed: F.includes("insight-connect-external-account"),
68
+ isDismissed: P.includes("insight-connect-external-account"),
65
69
  canDismiss: !0,
66
70
  showToggle: !1,
67
- displayText: D.connectExternalText,
68
- actionText: y ? D.linkAccountAction : void 0,
71
+ displayText: k.connectExternalText,
72
+ actionText: y ? k.linkAccountAction : void 0,
69
73
  onActionClick: y
70
- }), J !== void 0) {
71
- for (let t of J) if (t.verificationStatus !== "VERIFIED") {
74
+ }), q !== void 0) {
75
+ for (let t of q) if (t.verificationStatus !== "VERIFIED") {
72
76
  let n = `insight-verify-external-${t.id}`;
73
77
  e.push({
74
78
  id: n,
75
- isDismissed: F.includes(n),
79
+ isDismissed: P.includes(n),
76
80
  canDismiss: !0,
77
81
  showToggle: !1,
78
- displayText: D.verifyExternalAccountText(t.nickname ?? "")
82
+ displayText: k.verifyExternalAccountText(t.nickname ?? "")
79
83
  });
80
84
  }
81
85
  }
82
86
  return e;
83
87
  }, [
88
+ K,
84
89
  q,
85
90
  J,
86
- Z,
87
- Q,
88
- F,
89
- w,
90
- N,
91
+ Y,
91
92
  P,
93
+ E,
94
+ M,
95
+ N,
92
96
  y,
93
- D
94
- ]), oe = p((e) => {
95
- R(e);
96
- }, [R]), se = h(() => O === "dismissed" ? $.filter((e) => F.includes(e.id)) : $.filter((e) => !F.includes(e.id)), [
97
- $,
98
- O,
99
- F
100
- ]);
101
- return /* @__PURE__ */ ee(_.Provider, {
97
+ k
98
+ ]), ue = f((e) => {
99
+ L(e);
100
+ }, [L]), { activeInsights: Q, dismissedInsights: $ } = m(() => {
101
+ let e = Z.filter((e) => P.includes(e.id));
102
+ return {
103
+ activeInsights: Z.filter((e) => !P.includes(e.id)),
104
+ dismissedInsights: e
105
+ };
106
+ }, [Z, P]), de = A === "dismissed" ? $ : Q;
107
+ return /* @__PURE__ */ g(_.Provider, {
102
108
  value: {
103
- activeFilter: O,
104
- setActiveFilter: k,
105
- filteredInsights: se,
106
- isLoading: Z,
107
- isError: Q,
108
- refetch: ie,
109
- onDismissClick: oe,
110
- featureLabels: D,
111
- createdDateLabel: ae
109
+ activeFilter: A,
110
+ setActiveFilter: re,
111
+ filteredInsights: de,
112
+ activeCount: Q.length,
113
+ dismissedCount: $.length,
114
+ isLoading: J,
115
+ isError: Y,
116
+ refetch: le,
117
+ onDismissClick: ue,
118
+ featureLabels: k,
119
+ createdDateLabel: X
112
120
  },
113
- children: f
121
+ children: d
114
122
  });
115
123
  };
116
124
  export { y as InsightsWidgetContextProvider, v as useInsightsWidgetContext };
@@ -20,27 +20,29 @@ function d({ labels: t, singleInsightLabels: n }) {
20
20
  l(() => {
21
21
  a(i.Mounted);
22
22
  }, [a]);
23
- let { activeFilter: d, setActiveFilter: f, filteredInsights: p, isLoading: m, isError: h, refetch: g, onDismissClick: _, featureLabels: v, createdDateLabel: y } = r();
23
+ let { activeFilter: d, setActiveFilter: f, filteredInsights: p, activeCount: m, dismissedCount: h, isLoading: g, isError: _, refetch: v, onDismissClick: y, featureLabels: b, createdDateLabel: x } = r();
24
24
  return /* @__PURE__ */ u(s, {
25
25
  hasInsights: p.length > 0,
26
- isLoading: m,
27
- isError: h,
28
- onRetry: h ? () => void g() : void 0,
26
+ isLoading: g,
27
+ isError: _,
28
+ onRetry: _ ? () => void v() : void 0,
29
29
  activeFilter: d,
30
30
  setActiveFilter: f,
31
+ activeCount: String(m),
32
+ dismissedCount: String(h),
31
33
  labels: t,
32
34
  testIds: {
33
35
  activeTab: o.activeTab,
34
36
  skeleton: o.skeleton,
35
37
  error: o.error,
36
- retry: o.retry,
38
+ empty: o.empty,
37
39
  list: o.list
38
40
  },
39
41
  children: p.map((e) => /* @__PURE__ */ u(c, {
40
42
  insight: e,
41
- createdDate: y,
42
- featureLabels: v,
43
- onDismissClick: _,
43
+ createdDate: x,
44
+ featureLabels: b,
45
+ onDismissClick: y,
44
46
  labels: n
45
47
  }, e.id))
46
48
  });
@@ -1,22 +1,16 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { ClipboardCheck as t } from "lucide-react";
3
1
  // ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/mapInsightToRowView.js
4
- function n(n, r, i) {
2
+ function e(e, t, n) {
5
3
  return {
6
- displayText: n.displayText,
7
- createdDate: i,
8
- badgeLabel: r.onboardingBadgeLabel,
9
- badgeIcon: /* @__PURE__ */ e(t, {
10
- className: "ttw:size-4",
11
- "aria-hidden": !0
12
- }),
13
- showDismissButton: n.canDismiss && !n.isDismissed,
14
- showToggle: n.showToggle,
15
- toggleLabel: n.toggleLabel,
16
- toggleChecked: n.toggleChecked,
17
- onToggle: n.onToggle,
18
- actionText: n.actionText,
19
- onActionClick: n.onActionClick
4
+ displayText: e.displayText,
5
+ createdDate: n,
6
+ badgeLabel: t.onboardingBadgeLabel,
7
+ showDismissButton: e.canDismiss && !e.isDismissed,
8
+ showToggle: e.showToggle,
9
+ toggleLabel: e.toggleLabel,
10
+ toggleChecked: e.toggleChecked,
11
+ onToggle: e.onToggle,
12
+ actionText: e.actionText,
13
+ onActionClick: e.onActionClick
20
14
  };
21
15
  }
22
- export { n as mapInsightToRowView };
16
+ export { e as mapInsightToRowView };
@@ -2,7 +2,7 @@
2
2
  var e = {
3
3
  skeleton: "insights-widget-skeleton",
4
4
  error: "insights-widget-error",
5
- retry: "insights-widget-retry",
5
+ empty: "insights-widget-empty",
6
6
  activeTab: "insights-widget-active-tab",
7
7
  list: "insights-widget-list",
8
8
  singleInsight: "insights-widget-single-insight",
@@ -1,85 +1,72 @@
1
- import { Button as e, Skeleton as t, Typography as n, cn as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { WidgetContainer as i } from "../../../../../shared/ui/dist/lib/WidgetContainer/WidgetContainer.js";
1
+ import { Skeleton as e, Tabs as t, TabsContent as n, TabsList as r, TabsTrigger as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { WidgetContainer as a } from "../../../../../shared/ui/dist/lib/WidgetContainer/WidgetContainer.js";
3
+ import { EmptyState as o } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
4
+ import { ErrorState as s } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
5
+ import { LoadingRegion as c } from "../../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
6
  import "../../../../../shared/ui/dist/index.js";
4
- import { INSIGHTS_WIDGET_LABELS_EN as a } from "./labels.js";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { Sparkles as l } from "lucide-react";
7
+ import { INSIGHTS_WIDGET_LABELS_EN as l } from "./labels.js";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import { Sparkles as f } from "lucide-react";
7
10
  // ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js
8
- var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isLoading: m, isError: h, onRetry: g, labels: _, testIds: v }) => {
9
- let y = {
10
- ...a,
11
- ..._
11
+ var p = (e) => e === "active" || e === "dismissed", m = ({ hasInsights: m, children: h, activeFilter: g, setActiveFilter: _, activeCount: v, dismissedCount: y, isLoading: b, isError: x, onRetry: S, labels: C, testIds: w }) => {
12
+ let T = {
13
+ ...l,
14
+ ...C
12
15
  };
13
- return /* @__PURE__ */ s(i, {
14
- icon: /* @__PURE__ */ s(l, {
15
- className: "ttw:size-[18px] ttw:shrink-0 ttw:text-primary",
16
- "aria-hidden": !0
17
- }),
18
- title: y.widgetTitle,
19
- children: m ? /* @__PURE__ */ c("div", {
20
- role: "status",
21
- "aria-busy": !0,
22
- children: [/* @__PURE__ */ s("span", {
23
- className: "ttw:sr-only",
24
- children: y.loadingLabel
25
- }), /* @__PURE__ */ s(t, {
26
- "data-testid": v?.skeleton,
16
+ return /* @__PURE__ */ u(a, {
17
+ icon: /* @__PURE__ */ u(f, {}),
18
+ title: T.widgetTitle,
19
+ children: b ? /* @__PURE__ */ u(c, {
20
+ isLoading: !0,
21
+ loadingLabel: T.loadingLabel,
22
+ children: /* @__PURE__ */ u(e, {
23
+ "data-testid": w?.skeleton,
27
24
  height: 80,
28
25
  width: "100%",
29
26
  className: "ttw:rounded-md"
30
- })]
31
- }) : h ? /* @__PURE__ */ c("div", {
32
- className: "ttw:flex ttw:flex-col ttw:gap-3",
33
- "data-testid": v?.error,
27
+ })
28
+ }) : x ? /* @__PURE__ */ u(s, {
29
+ title: T.loadErrorTitle,
30
+ description: T.loadErrorDescription,
31
+ retryLabel: T.loadErrorRetry,
32
+ onRetry: S,
33
+ testId: w?.error
34
+ }) : /* @__PURE__ */ d(t, {
35
+ value: g,
36
+ onValueChange: (e) => {
37
+ p(e) && _(e);
38
+ },
39
+ className: "ttw:gap-4",
34
40
  children: [
35
- /* @__PURE__ */ s(n, {
36
- component: "p",
37
- variant: "body1",
38
- className: "ttw:font-semibold",
39
- children: y.loadErrorTitle
41
+ /* @__PURE__ */ d(r, {
42
+ variant: "pills",
43
+ "aria-label": T.filterTabsLabel,
44
+ children: [/* @__PURE__ */ u(i, {
45
+ value: "active",
46
+ count: v,
47
+ "data-testid": w?.activeTab,
48
+ children: T.activeTab
49
+ }), /* @__PURE__ */ u(i, {
50
+ value: "dismissed",
51
+ count: y,
52
+ children: T.dismissedTab
53
+ })]
40
54
  }),
41
- /* @__PURE__ */ s(n, {
42
- component: "p",
43
- variant: "body2",
44
- color: "muted",
45
- children: y.loadErrorDescription
46
- }),
47
- g ? /* @__PURE__ */ s(e, {
48
- type: "button",
49
- variant: "outline",
50
- size: "sm",
51
- className: "ttw:self-start ttw:cursor-pointer",
52
- onClick: g,
53
- "data-testid": v?.retry,
54
- children: y.loadErrorRetry
55
- }) : null
55
+ /* @__PURE__ */ u(n, { value: g === "active" ? "dismissed" : "active" }),
56
+ /* @__PURE__ */ u(n, {
57
+ value: g,
58
+ children: m ? /* @__PURE__ */ u("div", {
59
+ className: "ttw:flex ttw:max-h-80 ttw:flex-col ttw:gap-2 ttw:overflow-y-auto",
60
+ "data-testid": w?.list,
61
+ children: h
62
+ }) : /* @__PURE__ */ u(o, {
63
+ title: T.noInsightsFound,
64
+ description: g === "active" ? T.noInsightsDescription : void 0,
65
+ testId: w?.empty
66
+ })
67
+ })
56
68
  ]
57
- }) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ c("div", {
58
- className: "ttw:mb-2 ttw:flex ttw:flex-row ttw:gap-1",
59
- children: [/* @__PURE__ */ s(e, {
60
- type: "button",
61
- "data-testid": v?.activeTab,
62
- variant: f === "active" ? "default" : "outline",
63
- size: "sm",
64
- className: r("ttw:cursor-pointer ttw:rounded-md ttw:font-normal", f !== "active" && "ttw:border-border ttw:text-foreground"),
65
- onClick: () => p("active"),
66
- children: y.activeTab
67
- }), /* @__PURE__ */ s(e, {
68
- type: "button",
69
- variant: f === "dismissed" ? "default" : "outline",
70
- size: "sm",
71
- className: r("ttw:cursor-pointer ttw:rounded-md ttw:font-normal", f !== "dismissed" && "ttw:border-border ttw:text-foreground"),
72
- onClick: () => p("dismissed"),
73
- children: y.dismissedTab
74
- })]
75
- }), u ? /* @__PURE__ */ s("div", {
76
- className: "ttw:flex ttw:max-h-80 ttw:flex-col ttw:gap-1.5 ttw:overflow-y-auto ttw:rounded-2xl ttw:bg-[#F0F2FD] ttw:p-2",
77
- "data-testid": v?.list,
78
- children: d
79
- }) : /* @__PURE__ */ s(n, {
80
- color: "muted",
81
- children: y.noInsightsFound
82
- })] })
69
+ })
83
70
  });
84
71
  };
85
- export { a as INSIGHTS_WIDGET_LABELS_EN, u as InsightsWidget };
72
+ export { l as INSIGHTS_WIDGET_LABELS_EN, m as InsightsWidget };
@@ -1,93 +1,90 @@
1
- import { Badge as e, Button as t, Switch as n, Typography as r } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { SINGLE_INSIGHT_LABELS_EN as i } from "./labels.js";
3
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
- import { ArrowRight as s, X as c } from "lucide-react";
1
+ import { Badge as e, Button as t, Switch as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o, Typography as s } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { SINGLE_INSIGHT_LABELS_EN as c } from "./labels.js";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { ArrowRight as d, X as f } from "lucide-react";
5
5
  // ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js
6
- var l = ({ row: l, onDismissClick: u, labels: d, testIds: f }) => {
7
- let p = {
8
- ...i,
9
- ...d
10
- }, m = l.showToggle || !!(l.navigationLinkText && l.onNavigationClick) || !!(l.actionText && l.onActionClick);
11
- return /* @__PURE__ */ o("div", {
12
- className: "ttw:rounded-xl ttw:border ttw:border-[#E0E4EA] ttw:bg-background ttw:p-2",
13
- "data-testid": f?.root,
6
+ var p = ({ row: p, onDismissClick: m, labels: h, testIds: g }) => {
7
+ let _ = {
8
+ ...c,
9
+ ...h
10
+ }, v = p.showToggle || !!(p.navigationLinkText && p.onNavigationClick) || !!(p.actionText && p.onActionClick);
11
+ return /* @__PURE__ */ u("div", {
12
+ className: "ttw:rounded-lg ttw:bg-muted ttw:p-3",
13
+ "data-testid": g?.root,
14
14
  children: [
15
- /* @__PURE__ */ o("div", {
16
- className: "ttw:mb-1 ttw:flex ttw:flex-row ttw:items-center ttw:justify-between",
17
- children: [/* @__PURE__ */ o("div", {
18
- className: "ttw:flex ttw:flex-row ttw:items-center ttw:gap-1",
19
- children: [/* @__PURE__ */ o(e, {
20
- variant: "outline",
21
- className: "ttw:gap-1 ttw:border-primary/30 ttw:bg-primary/10 ttw:font-medium ttw:text-primary ttw:hover:bg-primary/10 ttw:hover:text-primary",
22
- children: [l.badgeIcon, l.badgeLabel]
23
- }), /* @__PURE__ */ a(r, {
15
+ /* @__PURE__ */ u("div", {
16
+ className: "ttw:mb-1 ttw:flex ttw:flex-row ttw:items-center ttw:justify-between ttw:gap-2",
17
+ children: [/* @__PURE__ */ u("div", {
18
+ className: "ttw:flex ttw:min-w-0 ttw:flex-row ttw:items-center ttw:gap-2",
19
+ children: [/* @__PURE__ */ l(e, {
20
+ tone: "neutral",
21
+ children: p.badgeLabel
22
+ }), /* @__PURE__ */ l(s, {
24
23
  variant: "body2",
25
24
  color: "muted",
26
25
  component: "span",
27
- children: l.createdDate
26
+ children: p.createdDate
28
27
  })]
29
- }), l.showDismissButton && u ? /* @__PURE__ */ a(t, {
30
- type: "button",
31
- variant: "ghost",
32
- size: "icon-sm",
33
- className: "ttw:size-8 ttw:shrink-0 ttw:cursor-pointer",
34
- "aria-label": p.dismissInsightAriaLabel,
35
- onClick: u,
36
- "data-testid": f?.dismiss,
37
- children: /* @__PURE__ */ a(c, {
38
- className: "ttw:size-4",
39
- "aria-hidden": !0
28
+ }), p.showDismissButton && m ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
29
+ asChild: !0,
30
+ "aria-describedby": void 0,
31
+ children: /* @__PURE__ */ l(t, {
32
+ type: "button",
33
+ variant: "ghost",
34
+ size: "icon-sm",
35
+ className: "ttw:shrink-0",
36
+ "aria-label": _.dismissInsightAriaLabel,
37
+ onClick: m,
38
+ "data-testid": g?.dismiss,
39
+ children: /* @__PURE__ */ l(f, { "aria-hidden": !0 })
40
40
  })
41
- }) : null]
41
+ }), /* @__PURE__ */ l(i, {
42
+ sideOffset: 4,
43
+ children: _.dismissInsightAriaLabel
44
+ })] }) }) : null]
42
45
  }),
43
- /* @__PURE__ */ a(r, {
46
+ /* @__PURE__ */ l(s, {
44
47
  variant: "body1",
45
48
  component: "p",
46
- className: m ? "ttw:mb-1" : "",
47
- children: l.displayText
49
+ className: v ? "ttw:mb-1" : "",
50
+ children: p.displayText
48
51
  }),
49
- l.showToggle ? /* @__PURE__ */ o("div", {
52
+ p.showToggle ? /* @__PURE__ */ u("div", {
50
53
  className: "ttw:mt-1 ttw:flex ttw:flex-row ttw:items-center ttw:gap-2",
51
- children: [l.onToggle ? /* @__PURE__ */ a(n, {
52
- checked: l.toggleChecked ?? !1,
53
- onCheckedChange: l.onToggle,
54
- "data-testid": f?.toggle
55
- }) : null, l.toggleLabel ? /* @__PURE__ */ a(r, {
54
+ children: [p.onToggle ? /* @__PURE__ */ l(n, {
55
+ checked: p.toggleChecked ?? !1,
56
+ onCheckedChange: p.onToggle,
57
+ "data-testid": g?.toggle
58
+ }) : null, p.toggleLabel ? /* @__PURE__ */ l(s, {
56
59
  variant: "body2",
57
60
  component: "span",
58
- color: l.onToggle ? void 0 : "muted",
59
- children: l.toggleLabel
61
+ color: p.onToggle ? void 0 : "muted",
62
+ children: p.toggleLabel
60
63
  }) : null]
61
64
  }) : null,
62
- l.navigationLinkText && l.onNavigationClick ? /* @__PURE__ */ a("div", {
65
+ p.navigationLinkText && p.onNavigationClick ? /* @__PURE__ */ l("div", {
63
66
  className: "ttw:mt-1",
64
- children: /* @__PURE__ */ o(t, {
67
+ children: /* @__PURE__ */ u(t, {
65
68
  type: "button",
66
69
  variant: "link",
67
- className: "ttw:h-auto ttw:gap-0.5 ttw:p-0 ttw:font-medium",
68
- onClick: l.onNavigationClick,
69
- "data-testid": f?.navigation,
70
- children: [l.navigationLinkText, /* @__PURE__ */ a(s, {
71
- className: "ttw:size-[18px] ttw:shrink-0",
72
- "aria-hidden": !0
73
- })]
70
+ className: "ttw:h-auto ttw:gap-1 ttw:p-0 ttw:font-medium",
71
+ onClick: p.onNavigationClick,
72
+ "data-testid": g?.navigation,
73
+ children: [p.navigationLinkText, /* @__PURE__ */ l(d, { "aria-hidden": !0 })]
74
74
  })
75
75
  }) : null,
76
- l.actionText && l.onActionClick ? /* @__PURE__ */ a("div", {
76
+ p.actionText && p.onActionClick ? /* @__PURE__ */ l("div", {
77
77
  className: "ttw:mt-1",
78
- children: /* @__PURE__ */ o(t, {
78
+ children: /* @__PURE__ */ u(t, {
79
79
  type: "button",
80
80
  variant: "link",
81
- className: "ttw:h-auto ttw:gap-0.5 ttw:p-0 ttw:font-medium",
82
- onClick: l.onActionClick,
83
- "data-testid": f?.action,
84
- children: [l.actionText, /* @__PURE__ */ a(s, {
85
- className: "ttw:size-[18px] ttw:shrink-0",
86
- "aria-hidden": !0
87
- })]
81
+ className: "ttw:h-auto ttw:gap-1 ttw:p-0 ttw:font-medium",
82
+ onClick: p.onActionClick,
83
+ "data-testid": g?.action,
84
+ children: [p.actionText, /* @__PURE__ */ l(d, { "aria-hidden": !0 })]
88
85
  })
89
86
  }) : null
90
87
  ]
91
88
  });
92
89
  };
93
- export { i as SINGLE_INSIGHT_LABELS_EN, l as SingleInsight };
90
+ export { c as SINGLE_INSIGHT_LABELS_EN, p as SingleInsight };
@@ -1,12 +1,14 @@
1
1
  // ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js
2
2
  var e = {
3
3
  widgetTitle: "Insights",
4
+ filterTabsLabel: "Filter insights",
4
5
  activeTab: "Active",
5
6
  dismissedTab: "Dismissed",
6
7
  noInsightsFound: "No insights found",
8
+ noInsightsDescription: "New insights appear here as your accounts change.",
7
9
  loadingLabel: "Loading insights",
8
- loadErrorTitle: "Could not load insights",
9
- loadErrorDescription: "Something went wrong while loading account data. Please try again.",
10
- loadErrorRetry: "Retry"
10
+ loadErrorTitle: "Couldn't load insights",
11
+ loadErrorDescription: "Check your connection, then try again.",
12
+ loadErrorRetry: "Try again"
11
13
  };
12
14
  export { e as INSIGHTS_WIDGET_LABELS_EN };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.20", n = "ab43b4d17b325635ddbc7e553d2ff810b4f48a00", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.22", n = "d6d93340077c75b7b61c54229654d01ba0cbbc53", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,34 +1,34 @@
1
1
  import { coerceAmountValueToMinorUnits as e } from "./lib/coerceAmountValueToMinorUnits.js";
2
2
  import { createCurrencyFormatter as t } from "./lib/createCurrencyFormatter.js";
3
3
  import { amountOutputToMajorUnits as n, minorExponentForCurrency as r } from "./lib/amountOutputToMajorUnits.js";
4
- import "./lib/dateDisplay.js";
5
- import { formatCalendarDate as i } from "./lib/formatCalendarDate.js";
6
- import { formatTimestampDate as a } from "./lib/formatTimestampDate.js";
7
- import { formatRejectionDate as o } from "./lib/formatRejectionDate.js";
8
- import { currencySymbolForCode as s, formatMoneyExact as c } from "./lib/formatMoneyExact.js";
9
- import { formatPhoneDisplay as l } from "./lib/formatPhoneDisplay.js";
10
- import { getInitials as u } from "./lib/getInitials.js";
11
- import { isValidAchAccountNumber as d } from "./lib/isValidAchAccountNumber.js";
12
- import { mergeLabelTree as f } from "./lib/mergeLabelTree.js";
13
- import { normalizeAmountOutputCurrencyCode as p } from "./lib/normalizeAmountOutputCurrencyCode.js";
14
- import { parseAmountOutputMajorUnits as m } from "./lib/parseAmountOutputMajorUnits.js";
15
- import { parseCalendarDate as h, parseDateOrTimestamp as g } from "./lib/parseCalendarDate.js";
16
- import { getRelativeCalendarDay as _ } from "./lib/relativeCalendarDay.js";
17
- import { parseDecimalAmountToMinorUnits as v } from "./lib/parseDecimalAmountToMinorUnits.js";
18
- import { sumAmountOutputsMajorUnits as y } from "./lib/sumAmountOutputsMajorUnits.js";
19
- import { getStateOptions as b, isStateValid as x } from "./lib/usStates.js";
20
- import { createWidgetTokenManager as S } from "./lib/widgetTokenManager.js";
21
- import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as C, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as w, emitWidgetDomEvent as T } from "./lib/widgetDomEvents.js";
22
- import { extractApiErrorMessage as E } from "./lib/apiErrors.js";
23
- import { parseApiValidationErrors as D } from "./lib/apiValidationErrors.js";
4
+ import { DATE_DISPLAY_LOCALE as i, DATE_DISPLAY_OPTIONS as a } from "./lib/dateDisplay.js";
5
+ import { formatCalendarDate as o } from "./lib/formatCalendarDate.js";
6
+ import { formatTimestampDate as s } from "./lib/formatTimestampDate.js";
7
+ import { formatRejectionDate as c } from "./lib/formatRejectionDate.js";
8
+ import { currencySymbolForCode as l, formatMoneyExact as u } from "./lib/formatMoneyExact.js";
9
+ import { formatPhoneDisplay as d } from "./lib/formatPhoneDisplay.js";
10
+ import { getInitials as f } from "./lib/getInitials.js";
11
+ import { isValidAchAccountNumber as p } from "./lib/isValidAchAccountNumber.js";
12
+ import { mergeLabelTree as m } from "./lib/mergeLabelTree.js";
13
+ import { normalizeAmountOutputCurrencyCode as h } from "./lib/normalizeAmountOutputCurrencyCode.js";
14
+ import { parseAmountOutputMajorUnits as g } from "./lib/parseAmountOutputMajorUnits.js";
15
+ import { parseCalendarDate as _, parseDateOrTimestamp as v } from "./lib/parseCalendarDate.js";
16
+ import { getRelativeCalendarDay as y } from "./lib/relativeCalendarDay.js";
17
+ import { parseDecimalAmountToMinorUnits as b } from "./lib/parseDecimalAmountToMinorUnits.js";
18
+ import { sumAmountOutputsMajorUnits as x } from "./lib/sumAmountOutputsMajorUnits.js";
19
+ import { getStateOptions as S, isStateValid as C } from "./lib/usStates.js";
20
+ import { createWidgetTokenManager as w } from "./lib/widgetTokenManager.js";
21
+ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as T, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as E, emitWidgetDomEvent as D } from "./lib/widgetDomEvents.js";
22
+ import { extractApiErrorMessage as O } from "./lib/apiErrors.js";
23
+ import { parseApiValidationErrors as k } from "./lib/apiValidationErrors.js";
24
24
  import "./lib/auditHistory/auditHistoryActor.js";
25
- import { buildReceivableAuditHistory as O } from "./lib/auditHistory/buildReceivableAuditHistory.js";
26
- import { buildPayableAuditHistory as k, hasUnattributedAuditRows as A } from "./lib/auditHistory/buildPayableAuditHistory.js";
25
+ import { buildReceivableAuditHistory as A } from "./lib/auditHistory/buildReceivableAuditHistory.js";
26
+ import { buildPayableAuditHistory as j, hasUnattributedAuditRows as M } from "./lib/auditHistory/buildPayableAuditHistory.js";
27
27
  import "./lib/theme/color.js";
28
- import { THEME_TOKEN_NAMES as j } from "./lib/theme/themeTokens.js";
28
+ import { THEME_TOKEN_NAMES as N } from "./lib/theme/themeTokens.js";
29
29
  import "./lib/theme/toneColors.js";
30
- import { createTheme as M, isThemeDevelopmentBuild as N, readThemeTokens as P, reportThemeIssues as F, themeIssues as I, themeToCss as L } from "./lib/theme/createTheme.js";
30
+ import { createTheme as P, isThemeDevelopmentBuild as F, readThemeTokens as I, reportThemeIssues as L, themeIssues as R, themeToCss as z } from "./lib/theme/createTheme.js";
31
31
  import "./lib/theme/index.js";
32
- import { configureCsp as R, installStyleNonce as z } from "./lib/csp.js";
33
- import { resolvePdfWorkerSrc as B } from "./lib/pdfWorkerSrc.js";
34
- export { C as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, w as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, j as THEME_TOKEN_NAMES, n as amountOutputToMajorUnits, k as buildPayableAuditHistory, O as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, R as configureCsp, t as createCurrencyFormatter, M as createTheme, S as createWidgetTokenManager, s as currencySymbolForCode, T as emitWidgetDomEvent, E as extractApiErrorMessage, i as formatCalendarDate, c as formatMoneyExact, l as formatPhoneDisplay, o as formatRejectionDate, a as formatTimestampDate, u as getInitials, _ as getRelativeCalendarDay, b as getStateOptions, A as hasUnattributedAuditRows, z as installStyleNonce, x as isStateValid, N as isThemeDevelopmentBuild, d as isValidAchAccountNumber, f as mergeLabelTree, r as minorExponentForCurrency, p as normalizeAmountOutputCurrencyCode, m as parseAmountOutputMajorUnits, D as parseApiValidationErrors, h as parseCalendarDate, g as parseDateOrTimestamp, v as parseDecimalAmountToMinorUnits, P as readThemeTokens, F as reportThemeIssues, B as resolvePdfWorkerSrc, y as sumAmountOutputsMajorUnits, I as themeIssues, L as themeToCss };
32
+ import { configureCsp as B, installStyleNonce as V } from "./lib/csp.js";
33
+ import { resolvePdfWorkerSrc as H } from "./lib/pdfWorkerSrc.js";
34
+ export { i as DATE_DISPLAY_LOCALE, a as DATE_DISPLAY_OPTIONS, T as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, E as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, N as THEME_TOKEN_NAMES, n as amountOutputToMajorUnits, j as buildPayableAuditHistory, A as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, B as configureCsp, t as createCurrencyFormatter, P as createTheme, w as createWidgetTokenManager, l as currencySymbolForCode, D as emitWidgetDomEvent, O as extractApiErrorMessage, o as formatCalendarDate, u as formatMoneyExact, d as formatPhoneDisplay, c as formatRejectionDate, s as formatTimestampDate, f as getInitials, y as getRelativeCalendarDay, S as getStateOptions, M as hasUnattributedAuditRows, V as installStyleNonce, C as isStateValid, F as isThemeDevelopmentBuild, p as isValidAchAccountNumber, m as mergeLabelTree, r as minorExponentForCurrency, h as normalizeAmountOutputCurrencyCode, g as parseAmountOutputMajorUnits, k as parseApiValidationErrors, _ as parseCalendarDate, v as parseDateOrTimestamp, b as parseDecimalAmountToMinorUnits, I as readThemeTokens, L as reportThemeIssues, H as resolvePdfWorkerSrc, x as sumAmountOutputsMajorUnits, R as themeIssues, z as themeToCss };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.20",
3
+ "version": "0.11.22",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [