@tesouro/embedded-components-react 0.5.13 → 0.5.14

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 (19) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +3 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/lib/SettingsWidget.d.ts +3 -0
  5. package/dist/lib/WidgetSuite.d.ts +3 -0
  6. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +1 -0
  7. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +1 -0
  8. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +57 -49
  9. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/data-access/dist/index.js +3 -0
  10. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/index.js +2 -0
  11. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js +64 -0
  12. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/collectDisclosureDocuments.js +9 -0
  13. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/testIds.js +9 -0
  14. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/analytics/events.js +4 -0
  15. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/ui/dist/index.js +3 -0
  16. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/ui/dist/index2.js +20 -0
  17. package/dist/libs/tesouro-embedded-components-react/shared/bank-disclosures/ui/dist/index3.js +80 -0
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  19. package/package.json +1 -1
package/README.md CHANGED
@@ -530,6 +530,7 @@ A composite settings widget that combines Monite document settings, tags, GL cod
530
530
  | `accountingContent` | `ReactNode` | Chart of accounts widget | Replaces accounting content. |
531
531
  | `tagsContent` | `ReactNode` | Monite tags | Replaces tags content. |
532
532
  | `expenseContent` | `ReactNode` | Expense policies and requirements | Replaces expense content. |
533
+ | `legalContent` | `ReactNode` | Bank disclosures widget | Replaces the Legal section content. |
533
534
  | `profileContactUrl` | `string` | `undefined` | Forwarded to the Profile section's widget — where its "to change this information, contact your bank" line links. Left unset, the card shows the plain unlinked sentence instead; the bank name comes from widget init. |
534
535
  | `selectedSection` | `SettingsWidgetSectionId` | `undefined` | The section to show. Leave unset to let the widget own the selection; supply it (with `onSelectedSectionChange`) to drive navigation from a route or search param. A section the user's scopes hide falls back to the first visible one. |
535
536
  | `defaultSelectedSection` | `SettingsWidgetSectionId` | First visible section | The section to open on, for a host that wants a deep link without owning the selection. Read once per mount and ignored when `selectedSection` is supplied. Scopes arrive with widget init, so a section this names opens as soon as it becomes visible; one the user's scopes never grant leaves the first visible section on screen. |
package/dist/index.css CHANGED
@@ -3213,6 +3213,9 @@
3213
3213
  .ttw\:text-\[1\.35rem\] {
3214
3214
  font-size: 1.35rem;
3215
3215
  }
3216
+ .ttw\:text-\[9px\] {
3217
+ font-size: 9px;
3218
+ }
3216
3219
  .ttw\:text-\[10px\] {
3217
3220
  font-size: 10px;
3218
3221
  }
package/dist/index.d.ts CHANGED
@@ -2514,6 +2514,7 @@ interface FeatureLabels$2 {
2514
2514
  accountingSection: string;
2515
2515
  tagsSection: string;
2516
2516
  expenseSection: string;
2517
+ legalSection: string;
2517
2518
  helpSection: string;
2518
2519
  expenseApprovalsTab: string;
2519
2520
  expenseRequirementsTab: string;
@@ -2532,6 +2533,7 @@ declare const SettingsSection: {
2532
2533
  readonly BillPay: "bill-pay";
2533
2534
  readonly Accounting: "accounting";
2534
2535
  readonly Tags: "tags";
2536
+ readonly Legal: "legal";
2535
2537
  readonly Help: "help";
2536
2538
  };
2537
2539
  type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
@@ -2610,6 +2612,7 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
2610
2612
  accountingContent?: ReactNode;
2611
2613
  tagsContent?: ReactNode;
2612
2614
  invoiceContent?: ReactNode;
2615
+ legalContent?: ReactNode;
2613
2616
  }
2614
2617
  declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
2615
2618
 
@@ -696,6 +696,7 @@ interface FeatureLabels {
696
696
  accountingSection: string;
697
697
  tagsSection: string;
698
698
  expenseSection: string;
699
+ legalSection: string;
699
700
  helpSection: string;
700
701
  expenseApprovalsTab: string;
701
702
  expenseRequirementsTab: string;
@@ -714,6 +715,7 @@ declare const SettingsSection: {
714
715
  readonly BillPay: "bill-pay";
715
716
  readonly Accounting: "accounting";
716
717
  readonly Tags: "tags";
718
+ readonly Legal: "legal";
717
719
  readonly Help: "help";
718
720
  };
719
721
  type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
@@ -792,6 +794,7 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
792
794
  accountingContent?: ReactNode;
793
795
  tagsContent?: ReactNode;
794
796
  invoiceContent?: ReactNode;
797
+ legalContent?: ReactNode;
795
798
  }
796
799
  declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
797
800
 
@@ -1739,6 +1739,7 @@ interface FeatureLabels$1 {
1739
1739
  accountingSection: string;
1740
1740
  tagsSection: string;
1741
1741
  expenseSection: string;
1742
+ legalSection: string;
1742
1743
  helpSection: string;
1743
1744
  expenseApprovalsTab: string;
1744
1745
  expenseRequirementsTab: string;
@@ -1757,6 +1758,7 @@ declare const SettingsSection: {
1757
1758
  readonly BillPay: "bill-pay";
1758
1759
  readonly Accounting: "accounting";
1759
1760
  readonly Tags: "tags";
1761
+ readonly Legal: "legal";
1760
1762
  readonly Help: "help";
1761
1763
  };
1762
1764
  type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
@@ -1835,6 +1837,7 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
1835
1837
  accountingContent?: ReactNode;
1836
1838
  tagsContent?: ReactNode;
1837
1839
  invoiceContent?: ReactNode;
1840
+ legalContent?: ReactNode;
1838
1841
  }
1839
1842
 
1840
1843
  interface TransfersWidgetLabels {
@@ -7,6 +7,7 @@ var e = {
7
7
  accountingSection: "Chart of accounts",
8
8
  tagsSection: "Tags",
9
9
  expenseSection: "Expenses",
10
+ legalSection: "Legal",
10
11
  helpSection: "Help",
11
12
  expenseApprovalsTab: "Approvals",
12
13
  expenseRequirementsTab: "Requirements"
@@ -7,6 +7,7 @@ var e = {
7
7
  BillPay: "bill-pay",
8
8
  Accounting: "accounting",
9
9
  Tags: "tags",
10
+ Legal: "legal",
10
11
  Help: "help"
11
12
  }, t = new Set(Object.values(e));
12
13
  function n(e, n) {
@@ -19,21 +19,23 @@ import { SettingsWidgetAnalyticsEvent as u, WIDGET_NAME as d } from "./index2.js
19
19
  import { ExpenseSettingsTabs as f } from "./index5.js";
20
20
  import { TagsWidget as p } from "../../../tags-widget/feature/dist/index11.js";
21
21
  import "../../../tags-widget/feature/dist/index.js";
22
- import { TeamWidget as m } from "../../../team-widget/feature/dist/index17.js";
22
+ import { BankDisclosuresWidget as m } from "../../../shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
23
+ import "../../../shared/bank-disclosures/feature/dist/index.js";
24
+ import { TeamWidget as h } from "../../../team-widget/feature/dist/index17.js";
23
25
  import "../../../team-widget/feature/dist/index.js";
24
- import { SettingsWidgetUi as h } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
26
+ import { SettingsWidgetUi as g } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
25
27
  import "../../ui/dist/index.js";
26
- import { ChartOfAccountsWidget as g } from "../../chart-of-accounts/feature/dist/index8.js";
28
+ import { ChartOfAccountsWidget as _ } from "../../chart-of-accounts/feature/dist/index8.js";
27
29
  import "../../chart-of-accounts/feature/dist/index.js";
28
- import { HelpWidget as _ } from "../../../help-widget/feature/dist/index3.js";
30
+ import { HelpWidget as v } from "../../../help-widget/feature/dist/index3.js";
29
31
  import "../../../help-widget/feature/dist/index.js";
30
- import { ProfileWidget as v } from "../../profile/feature/dist/index4.js";
32
+ import { ProfileWidget as y } from "../../profile/feature/dist/index4.js";
31
33
  import "../../profile/feature/dist/index.js";
32
- import { useEffect as y } from "react";
33
- import { jsx as b } from "react/jsx-runtime";
34
- import { useControllableState as x } from "@radix-ui/react-use-controllable-state";
34
+ import { useEffect as b } from "react";
35
+ import { jsx as x } from "react/jsx-runtime";
36
+ import { useControllableState as S } from "@radix-ui/react-use-controllable-state";
35
37
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js
36
- var S = {
38
+ var C = {
37
39
  [c.Profile]: [],
38
40
  [c.Team]: [t.UserReadOrg],
39
41
  [c.Invoice]: [t.OrganizationSettingsWriteOrg],
@@ -41,78 +43,84 @@ var S = {
41
43
  [c.Accounting]: [t.AccountingConfigReadOrg],
42
44
  [c.Tags]: [t.AccountingConfigReadOrg],
43
45
  [c.Expense]: [t.ApprovalPolicyWriteOrg, t.ExpenseWriteOrg],
46
+ [c.Legal]: [],
44
47
  [c.Help]: []
45
48
  };
46
- function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: d, helpContactUrl: C, helpFaq: w, profileContactUrl: T, selectedSection: E, defaultSelectedSection: D, onSelectedSectionChange: O, additionalSections: k, profileContent: A, teamContent: j, billPayContent: M, helpContent: N, expenseContent: P, accountingContent: F, tagsContent: I, invoiceContent: L }) {
47
- let R = {
49
+ function w({ labels: t, featureLabels: o, acceptInviteRedirectUri: d, helpContactUrl: w, helpFaq: T, profileContactUrl: E, selectedSection: D, defaultSelectedSection: O, onSelectedSectionChange: k, additionalSections: A, profileContent: j, teamContent: M, billPayContent: N, helpContent: P, expenseContent: F, accountingContent: I, tagsContent: L, invoiceContent: R, legalContent: z }) {
50
+ let B = {
48
51
  ...s,
49
52
  ...o
50
- }, z = n();
51
- y(() => {
52
- z(u.Mounted);
53
- }, [z]);
54
- let { initResponse: B } = r(), V = B?.scopes, H = [
53
+ }, V = n();
54
+ b(() => {
55
+ V(u.Mounted);
56
+ }, [V]);
57
+ let { initResponse: H } = r(), U = H?.scopes, W = [
55
58
  {
56
59
  id: c.Profile,
57
- label: R.profileSection,
58
- content: A ?? /* @__PURE__ */ b(v, { contactUrl: T })
60
+ label: B.profileSection,
61
+ content: j ?? /* @__PURE__ */ x(y, { contactUrl: E })
59
62
  },
60
63
  {
61
64
  id: c.Team,
62
- label: R.teamSection,
63
- content: j ?? /* @__PURE__ */ b(m, { acceptInviteRedirectUri: d })
65
+ label: B.teamSection,
66
+ content: M ?? /* @__PURE__ */ x(h, { acceptInviteRedirectUri: d })
64
67
  },
65
68
  {
66
69
  id: c.Invoice,
67
- label: R.invoiceSection,
68
- content: L ?? /* @__PURE__ */ b(a, {})
70
+ label: B.invoiceSection,
71
+ content: R ?? /* @__PURE__ */ x(a, {})
69
72
  },
70
73
  {
71
74
  id: c.Expense,
72
- label: R.expenseSection,
73
- content: P ?? /* @__PURE__ */ b(f, {
74
- approvalsLabel: R.expenseApprovalsTab,
75
- requirementsLabel: R.expenseRequirementsTab
75
+ label: B.expenseSection,
76
+ content: F ?? /* @__PURE__ */ x(f, {
77
+ approvalsLabel: B.expenseApprovalsTab,
78
+ requirementsLabel: B.expenseRequirementsTab
76
79
  })
77
80
  },
78
81
  {
79
82
  id: c.BillPay,
80
- label: R.billPaySection,
81
- content: M ?? /* @__PURE__ */ b(i, {})
83
+ label: B.billPaySection,
84
+ content: N ?? /* @__PURE__ */ x(i, {})
82
85
  },
83
86
  {
84
87
  id: c.Accounting,
85
- label: R.accountingSection,
86
- content: F ?? /* @__PURE__ */ b(g, {})
88
+ label: B.accountingSection,
89
+ content: I ?? /* @__PURE__ */ x(_, {})
87
90
  },
88
91
  {
89
92
  id: c.Tags,
90
- label: R.tagsSection,
91
- content: I ?? /* @__PURE__ */ b(p, {})
93
+ label: B.tagsSection,
94
+ content: L ?? /* @__PURE__ */ x(p, {})
95
+ },
96
+ {
97
+ id: c.Legal,
98
+ label: B.legalSection,
99
+ content: z ?? /* @__PURE__ */ x(m, {})
92
100
  },
93
101
  {
94
102
  id: c.Help,
95
- label: R.helpSection,
96
- content: N ?? /* @__PURE__ */ b(_, {
97
- contactUrl: C,
98
- faq: w
103
+ label: B.helpSection,
104
+ content: P ?? /* @__PURE__ */ x(v, {
105
+ contactUrl: w,
106
+ faq: T
99
107
  })
100
108
  }
101
- ], U = l(H.filter((t) => S[t.id].every((t) => e(V, [t]))), k ?? []), W = U[0]?.id ?? "", [G, K] = x({
102
- prop: E,
103
- defaultProp: D ?? W,
104
- onChange: O,
109
+ ], G = l(W.filter((t) => C[t.id].every((t) => e(U, [t]))), A ?? []), K = G[0]?.id ?? "", [q, J] = S({
110
+ prop: D,
111
+ defaultProp: O ?? K,
112
+ onChange: k,
105
113
  caller: "SettingsWidget"
106
- }), q = U.some((e) => e.id === G) ? G : W;
107
- return /* @__PURE__ */ b(h, {
114
+ }), Y = G.some((e) => e.id === q) ? q : K;
115
+ return /* @__PURE__ */ x(g, {
108
116
  labels: t,
109
- sections: U,
110
- selectedSectionId: q,
111
- onSectionChange: K
117
+ sections: G,
118
+ selectedSectionId: Y,
119
+ onSectionChange: J
112
120
  });
113
121
  }
114
- function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
115
- return /* @__PURE__ */ b(o, {
122
+ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
123
+ return /* @__PURE__ */ x(o, {
116
124
  widgetName: d,
117
125
  baseUrl: e,
118
126
  widgetToken: t,
@@ -128,8 +136,8 @@ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
128
136
  analytics: p,
129
137
  disclosuresAcceptance: m,
130
138
  providerLabels: h,
131
- children: /* @__PURE__ */ b(C, { ...g })
139
+ children: /* @__PURE__ */ x(w, { ...g })
132
140
  });
133
141
  }
134
142
  //#endregion
135
- export { w as SettingsWidget, w as default };
143
+ export { T as SettingsWidget, T as default };
@@ -0,0 +1,3 @@
1
+ import { useDisclosuresQuery as e } from "../../../data-access/dist/lib/disclosures/useDisclosuresQuery.js";
2
+ import "../../../data-access/dist/index.js";
3
+ export { e as useDisclosuresQuery };
@@ -0,0 +1,2 @@
1
+ import { BankDisclosuresWidget as e } from "./lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
2
+ export { e as BankDisclosuresWidget };
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useDisclosuresQuery as e } from "../../../../../data-access/dist/lib/disclosures/useDisclosuresQuery.js";
6
+ import { useAnalyticsTrack as t } from "../../../../../feature/dist/lib/analytics/hooks.js";
7
+ import { WidgetProvider as n } from "../../../../../feature/dist/lib/WidgetProvider/WidgetProvider.js";
8
+ import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../../../feature/dist/lib/WidgetProvider/hooks.js";
9
+ import "../../../../../feature/dist/index.js";
10
+ import { BankDisclosuresWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "../analytics/events.js";
11
+ import { collectDisclosureDocuments as s } from "./collectDisclosureDocuments.js";
12
+ import { bankDisclosuresWidgetTestIds as c } from "./testIds.js";
13
+ import { mergeBankDisclosuresListLabels as l } from "../../../../ui/dist/index2.js";
14
+ import { BankDisclosuresList as u } from "../../../../ui/dist/index3.js";
15
+ import "../../../../ui/dist/index.js";
16
+ import "../../../../data-access/dist/index.js";
17
+ import { useEffect as d } from "react";
18
+ import { jsx as f } from "react/jsx-runtime";
19
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js
20
+ function p({ labels: n }) {
21
+ let o = t(), { initResponse: p } = r(), m = i();
22
+ d(() => {
23
+ o(a.Mounted);
24
+ }, [o]);
25
+ let h = !!p?.userId && !m, { data: g, isLoading: _, isPlaceholderData: v, isError: y, refetch: b } = e({
26
+ userId: p?.userId ?? void 0,
27
+ enabled: h
28
+ }), x = l(n), S = s(g).map((e) => ({
29
+ ...e,
30
+ ariaLabel: x.viewButtonAriaLabel.replace("{title}", e.title)
31
+ })), C = g?.version ? x.versionLabel.replace("{version}", g.version) : void 0;
32
+ return /* @__PURE__ */ f(u, {
33
+ documents: S,
34
+ versionLabel: C,
35
+ isLoading: !h || _ || v,
36
+ isError: y,
37
+ onRetry: () => {
38
+ b();
39
+ },
40
+ labels: n,
41
+ testIds: c
42
+ });
43
+ }
44
+ function m({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
45
+ return /* @__PURE__ */ f(n, {
46
+ widgetName: o,
47
+ baseUrl: e,
48
+ widgetToken: t,
49
+ organizationId: r,
50
+ configClient: i,
51
+ gatewayRouting: a,
52
+ linkComponent: s,
53
+ implementation: c,
54
+ uiFramework: l,
55
+ errorFallback: u,
56
+ onError: d,
57
+ analytics: m,
58
+ disclosuresAcceptance: h,
59
+ providerLabels: g,
60
+ children: /* @__PURE__ */ f(p, { ..._ })
61
+ });
62
+ }
63
+ //#endregion
64
+ export { m as BankDisclosuresWidget };
@@ -0,0 +1,9 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/collectDisclosureDocuments.js
2
+ function e(e) {
3
+ if (!e) return [];
4
+ let t = e.capacities && e.capacities.length > 0 ? e.capacities.flatMap((e) => e.documents) : e.documents, n = /* @__PURE__ */ new Set(), r = [];
5
+ for (let e of t) n.has(e.url) || (n.add(e.url), r.push(e));
6
+ return r;
7
+ }
8
+ //#endregion
9
+ export { e as collectDisclosureDocuments };
@@ -0,0 +1,9 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/testIds.js
2
+ var e = {
3
+ root: "bank-disclosures-root",
4
+ loading: "bank-disclosures-loading",
5
+ error: "bank-disclosures-error",
6
+ empty: "bank-disclosures-empty"
7
+ };
8
+ //#endregion
9
+ export { e as bankDisclosuresWidgetTestIds };
@@ -0,0 +1,4 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/analytics/events.js
2
+ var e = { Mounted: "bank_disclosures.mounted" }, t = "bank_disclosures";
3
+ //#endregion
4
+ export { e as BankDisclosuresWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,3 @@
1
+ import { mergeBankDisclosuresListLabels as e } from "./index2.js";
2
+ import { BankDisclosuresList as t } from "./index3.js";
3
+ export { t as BankDisclosuresList, e as mergeBankDisclosuresListLabels };
@@ -0,0 +1,20 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/ui/dist/index2.js
2
+ var e = {
3
+ fileTypeBadge: "PDF",
4
+ viewButton: "View",
5
+ viewButtonAriaLabel: "View {title}",
6
+ versionLabel: "Version {version}",
7
+ emptyTitle: "No disclosures available",
8
+ emptyDescription: "Your bank has not published any disclosures yet.",
9
+ errorTitle: "Unable to load disclosures",
10
+ errorDescription: "Something went wrong while fetching your disclosures.",
11
+ errorRetry: "Try again"
12
+ };
13
+ function t(t) {
14
+ return {
15
+ ...e,
16
+ ...t
17
+ };
18
+ }
19
+ //#endregion
20
+ export { e as BANK_DISCLOSURES_LIST_LABELS_EN, t as mergeBankDisclosuresListLabels };
@@ -0,0 +1,80 @@
1
+ import { Button as e, Skeleton as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as n } from "../../../ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as r } from "../../../ui/dist/lib/ErrorState/ErrorState.js";
4
+ import "../../../ui/dist/index.js";
5
+ import { mergeBankDisclosuresListLabels as i } from "./index2.js";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import { ExternalLinkIcon as s, FileTextIcon as c } from "lucide-react";
8
+ //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/ui/dist/index3.js
9
+ var l = 3;
10
+ function u({ documents: u, versionLabel: d, isLoading: f = !1, isError: p = !1, onRetry: m, labels: h, testIds: g }) {
11
+ let _ = i(h);
12
+ return /* @__PURE__ */ a("div", {
13
+ "data-testid": g?.root,
14
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
15
+ children: p ? /* @__PURE__ */ a(r, {
16
+ testId: g?.error,
17
+ title: _.errorTitle,
18
+ description: _.errorDescription,
19
+ retryLabel: m ? _.errorRetry : void 0,
20
+ onRetry: m
21
+ }) : f ? /* @__PURE__ */ a("div", {
22
+ "data-testid": g?.loading,
23
+ className: "ttw:divide-y ttw:divide-border ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background",
24
+ children: Array.from({ length: l }, (e, n) => /* @__PURE__ */ o("div", {
25
+ className: "ttw:flex ttw:items-center ttw:gap-4 ttw:p-4",
26
+ children: [
27
+ /* @__PURE__ */ a(t, { className: "ttw:h-12 ttw:w-10 ttw:shrink-0" }),
28
+ /* @__PURE__ */ a(t, { className: "ttw:h-4 ttw:flex-1" }),
29
+ /* @__PURE__ */ a(t, { className: "ttw:h-9 ttw:w-20 ttw:shrink-0" })
30
+ ]
31
+ }, n))
32
+ }) : u.length === 0 ? /* @__PURE__ */ a(n, {
33
+ testId: g?.empty,
34
+ title: _.emptyTitle,
35
+ description: _.emptyDescription
36
+ }) : /* @__PURE__ */ o("div", {
37
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
38
+ children: [d ? /* @__PURE__ */ a("span", {
39
+ className: "ttw:text-xs ttw:text-muted-foreground",
40
+ children: d
41
+ }) : null, /* @__PURE__ */ a("ul", {
42
+ className: "ttw:divide-y ttw:divide-border ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background",
43
+ children: u.map((t) => /* @__PURE__ */ o("li", {
44
+ className: "ttw:flex ttw:items-center ttw:gap-4 ttw:p-4",
45
+ children: [
46
+ /* @__PURE__ */ o("div", {
47
+ "aria-hidden": !0,
48
+ className: "ttw:flex ttw:h-12 ttw:w-10 ttw:shrink-0 ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-0.5 ttw:rounded ttw:border ttw:border-border ttw:text-muted-foreground",
49
+ children: [/* @__PURE__ */ a(c, { className: "ttw:size-4" }), /* @__PURE__ */ a("span", {
50
+ className: "ttw:text-[9px] ttw:font-medium ttw:uppercase ttw:tracking-wide",
51
+ children: _.fileTypeBadge
52
+ })]
53
+ }),
54
+ /* @__PURE__ */ a("span", {
55
+ className: "ttw:flex-1 ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
56
+ children: t.title
57
+ }),
58
+ /* @__PURE__ */ a(e, {
59
+ variant: "outline",
60
+ size: "sm",
61
+ asChild: !0,
62
+ children: /* @__PURE__ */ o("a", {
63
+ href: t.url,
64
+ target: "_blank",
65
+ rel: "noopener noreferrer",
66
+ "aria-label": t.ariaLabel,
67
+ children: [/* @__PURE__ */ a(s, {
68
+ "aria-hidden": !0,
69
+ className: "ttw:size-4"
70
+ }), _.viewButton]
71
+ })
72
+ })
73
+ ]
74
+ }, t.url))
75
+ })]
76
+ })
77
+ });
78
+ }
79
+ //#endregion
80
+ export { u as BankDisclosuresList, u as default, i as mergeBankDisclosuresListLabels };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.13", n = "58e919c9cd57cd466c01c0de9fcc47169dfd8279", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.14", n = "c5753c755961765f539979c93a1bebc989f72a15", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {