@tesouro/embedded-components-react 0.11.71 → 0.11.73

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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +35 -192
  3. package/dist/index.d.ts +75 -71
  4. package/dist/lib/SettingsWidget.d.ts +5 -1
  5. package/dist/lib/WidgetSuite.d.ts +4 -0
  6. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
  7. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
  8. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
  17. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
  18. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
  19. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
  20. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
  21. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
  22. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
  23. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
  42. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
  43. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
  45. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
  46. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
  47. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
  56. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
  57. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
  58. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
  59. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
  60. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
  61. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
  62. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
  63. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
  64. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
  65. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
  67. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
  68. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
  69. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
  70. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
  71. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
  73. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
  74. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
  75. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
  76. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
  77. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
  78. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
  79. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
  80. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
  82. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
  83. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
  84. package/dist/packages/shared-ui-shadcn/dist/index.js +2302 -2284
  85. package/package.json +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
  87. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
  88. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
@@ -1,125 +1,132 @@
1
- import { Checkbox as e, Field as t, FieldContent as n, FieldError as r, FieldLabel as i, Input as a, Typography as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { INVOICE_NUMBERING_SECTION_LABELS_EN as s } from "./index5.js";
3
- import { useId as c } from "react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { Checkbox as e, Field as t, FieldContent as n, FieldError as r, FieldLabel as i, FieldRequirement as a, Heading as o, Input as s, Typography as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { INVOICE_NUMBERING_SECTION_LABELS_EN as l } from "./index5.js";
3
+ import { useId as u } from "react";
4
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
5
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js
6
- function d({ previewValue: d, invoicePrefix: f, startingNumber: p, digitCount: m, includeDate: h, errors: g, onInvoicePrefixChange: _, onStartingNumberChange: v, onDigitCountChange: y, onIncludeDateChange: b, labels: x }) {
7
- let S = {
8
- ...s,
9
- ...x
10
- }, C = c(), w = (e) => `${C}-${e}`, T = (e) => `${C}-${e}-error`, E = (e, t) => t ? T(e) : void 0;
11
- return /* @__PURE__ */ u("div", {
6
+ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g, includeDate: _, errors: v, onInvoicePrefixChange: y, onStartingNumberChange: b, onDigitCountChange: x, onIncludeDateChange: S, labels: C }) {
7
+ let w = {
8
+ ...l,
9
+ ...C
10
+ }, T = u(), E = (e) => `${T}-${e}`, D = (e) => `${T}-${e}-error`, O = (e, t) => t ? D(e) : void 0;
11
+ return /* @__PURE__ */ f("div", {
12
12
  className: "ttw:flex ttw:flex-col ttw:gap-2.5",
13
13
  children: [
14
- /* @__PURE__ */ u("div", {
14
+ /* @__PURE__ */ f("div", {
15
15
  className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:pt-5 ttw:pb-2.5",
16
- children: [/* @__PURE__ */ l(o, {
17
- variant: "h3",
18
- children: S.title
19
- }), /* @__PURE__ */ l(o, {
16
+ children: [/* @__PURE__ */ d(o, {
17
+ variant: "section",
18
+ level: 3,
19
+ children: w.title
20
+ }), /* @__PURE__ */ d(c, {
20
21
  variant: "body2",
21
22
  color: "muted",
22
- children: S.description
23
+ children: w.description
23
24
  })]
24
25
  }),
25
- /* @__PURE__ */ u("div", {
26
- className: "ttw:flex ttw:flex-col ttw:w-94 ttw:gap-0.5 ttw:p-4 ttw:bg-muted ttw:rounded-xl",
27
- children: [/* @__PURE__ */ l(o, {
26
+ /* @__PURE__ */ f("div", {
27
+ className: "ttw:flex ttw:flex-col ttw:w-full ttw:max-w-96 ttw:gap-1 ttw:p-4 ttw:bg-muted ttw:rounded-xl",
28
+ children: [/* @__PURE__ */ d(c, {
28
29
  variant: "body2",
29
30
  color: "muted",
30
- children: S.previewLabel
31
- }), /* @__PURE__ */ l(o, {
32
- variant: "h4",
31
+ children: w.previewLabel
32
+ }), /* @__PURE__ */ d(c, {
33
+ variant: "body1",
33
34
  className: "ttw:font-semibold ttw:truncate",
34
- title: d,
35
- children: d
35
+ title: p,
36
+ children: p
36
37
  })]
37
38
  }),
38
- /* @__PURE__ */ u("div", {
39
- className: "ttw:flex ttw:w-min ttw:gap-2 ttw:p-2",
39
+ /* @__PURE__ */ f("div", {
40
+ className: "ttw:flex ttw:flex-wrap ttw:gap-4",
40
41
  children: [
41
- /* @__PURE__ */ l(t, { children: /* @__PURE__ */ u(n, {
42
- className: "ttw:grow-0",
42
+ /* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
43
+ className: "ttw:min-w-32 ttw:flex-1",
43
44
  children: [
44
- /* @__PURE__ */ l(i, {
45
- htmlFor: w("invoice-prefix"),
46
- children: S.invoicePrefixLabel
45
+ /* @__PURE__ */ d(i, {
46
+ htmlFor: E("invoice-prefix"),
47
+ requirement: a.Required,
48
+ children: w.invoicePrefixLabel
47
49
  }),
48
- /* @__PURE__ */ l(a, {
49
- id: w("invoice-prefix"),
50
- value: f,
51
- "aria-invalid": !!g?.invoicePrefix || void 0,
52
- "aria-describedby": E("invoice-prefix", g?.invoicePrefix),
53
- onChange: (e) => _(e.target.value),
54
- className: "ttw:w-29 ttw:min-w-29 ttw:bg-background"
50
+ /* @__PURE__ */ d(s, {
51
+ id: E("invoice-prefix"),
52
+ required: !0,
53
+ value: m,
54
+ "aria-invalid": !!v?.invoicePrefix || void 0,
55
+ "aria-describedby": O("invoice-prefix", v?.invoicePrefix),
56
+ onChange: (e) => y(e.target.value),
57
+ className: "ttw:w-full"
55
58
  }),
56
- /* @__PURE__ */ l(r, {
57
- id: T("invoice-prefix"),
58
- children: g?.invoicePrefix
59
+ /* @__PURE__ */ d(r, {
60
+ id: D("invoice-prefix"),
61
+ children: v?.invoicePrefix
59
62
  })
60
63
  ]
61
64
  }) }),
62
- /* @__PURE__ */ l(t, { children: /* @__PURE__ */ u(n, {
63
- className: "ttw:grow-0",
65
+ /* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
66
+ className: "ttw:min-w-32 ttw:flex-1",
64
67
  children: [
65
- /* @__PURE__ */ l(i, {
66
- htmlFor: w("starting-number"),
67
- children: S.startingNumberLabel
68
+ /* @__PURE__ */ d(i, {
69
+ htmlFor: E("starting-number"),
70
+ requirement: a.Required,
71
+ children: w.startingNumberLabel
68
72
  }),
69
- /* @__PURE__ */ l(a, {
70
- id: w("starting-number"),
73
+ /* @__PURE__ */ d(s, {
74
+ id: E("starting-number"),
75
+ required: !0,
71
76
  type: "number",
72
- value: p,
73
- "aria-invalid": !!g?.startingNumber || void 0,
74
- "aria-describedby": E("starting-number", g?.startingNumber),
75
- onChange: (e) => v(e.target.value),
76
- className: "ttw:w-29 ttw:min-w-29 ttw:bg-background"
77
+ value: h,
78
+ "aria-invalid": !!v?.startingNumber || void 0,
79
+ "aria-describedby": O("starting-number", v?.startingNumber),
80
+ onChange: (e) => b(e.target.value),
81
+ className: "ttw:w-full"
77
82
  }),
78
- /* @__PURE__ */ l(r, {
79
- id: T("starting-number"),
80
- children: g?.startingNumber
83
+ /* @__PURE__ */ d(r, {
84
+ id: D("starting-number"),
85
+ children: v?.startingNumber
81
86
  })
82
87
  ]
83
88
  }) }),
84
- /* @__PURE__ */ l(t, { children: /* @__PURE__ */ u(n, {
85
- className: "ttw:grow-0",
89
+ /* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
90
+ className: "ttw:min-w-32 ttw:flex-1",
86
91
  children: [
87
- /* @__PURE__ */ l(i, {
88
- htmlFor: w("digit-count"),
89
- children: S.digitCountLabel
92
+ /* @__PURE__ */ d(i, {
93
+ htmlFor: E("digit-count"),
94
+ requirement: a.Required,
95
+ children: w.digitCountLabel
90
96
  }),
91
- /* @__PURE__ */ l(a, {
92
- id: w("digit-count"),
97
+ /* @__PURE__ */ d(s, {
98
+ id: E("digit-count"),
99
+ required: !0,
93
100
  type: "number",
94
- value: m,
95
- "aria-invalid": !!g?.digitCount || void 0,
96
- "aria-describedby": E("digit-count", g?.digitCount),
97
- onChange: (e) => y(e.target.value),
98
- className: "ttw:bg-background ttw:w-29 ttw:max-w-29"
101
+ value: g,
102
+ "aria-invalid": !!v?.digitCount || void 0,
103
+ "aria-describedby": O("digit-count", v?.digitCount),
104
+ onChange: (e) => x(e.target.value),
105
+ className: "ttw:w-full"
99
106
  }),
100
- /* @__PURE__ */ l(r, {
101
- id: T("digit-count"),
102
- children: g?.digitCount
107
+ /* @__PURE__ */ d(r, {
108
+ id: D("digit-count"),
109
+ children: v?.digitCount
103
110
  })
104
111
  ]
105
112
  }) })
106
113
  ]
107
114
  }),
108
- /* @__PURE__ */ l("div", {
115
+ /* @__PURE__ */ d("div", {
109
116
  className: "ttw:bg-transparent ttw:w-full ttw:p-2",
110
- children: /* @__PURE__ */ l(t, {
117
+ children: /* @__PURE__ */ d(t, {
111
118
  orientation: "horizontal",
112
- children: /* @__PURE__ */ u(n, {
119
+ children: /* @__PURE__ */ f(n, {
113
120
  className: "ttw:flex-row ttw:items-center",
114
- children: [/* @__PURE__ */ l(e, {
115
- id: w("include-date"),
116
- checked: h,
117
- onCheckedChange: (e) => b(e === !0),
121
+ children: [/* @__PURE__ */ d(e, {
122
+ id: E("include-date"),
123
+ checked: _,
124
+ onCheckedChange: (e) => S(e === !0),
118
125
  className: "ttw:bg-background"
119
- }), /* @__PURE__ */ l(i, {
120
- htmlFor: w("include-date"),
126
+ }), /* @__PURE__ */ d(i, {
127
+ htmlFor: E("include-date"),
121
128
  className: "ttw:font-normal",
122
- children: S.includeDateLabel
129
+ children: w.includeDateLabel
123
130
  })]
124
131
  })
125
132
  })
@@ -127,4 +134,4 @@ function d({ previewValue: d, invoicePrefix: f, startingNumber: p, digitCount: m
127
134
  ]
128
135
  });
129
136
  }
130
- export { d as InvoiceNumberingSection, d as default };
137
+ export { p as InvoiceNumberingSection, p as default };
@@ -1,73 +1,74 @@
1
- import { Switch as e, Typography as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { PDF_SETTINGS_SECTION_LABELS_EN as n } from "./index8.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { Checkbox as e, Heading as t, Typography as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { PDF_SETTINGS_SECTION_LABELS_EN as r } from "./index8.js";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
4
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js
5
- function a({ displayBankDetails: a, updatePaidInvoices: o, onDisplayBankDetailsChange: s, onUpdatePaidInvoicesChange: c, labels: l }) {
6
- let u = {
7
- ...n,
8
- ...l
5
+ function o({ displayBankDetails: o, updatePaidInvoices: s, onDisplayBankDetailsChange: c, onUpdatePaidInvoicesChange: l, labels: u }) {
6
+ let d = {
7
+ ...r,
8
+ ...u
9
9
  };
10
- return /* @__PURE__ */ i("div", {
10
+ return /* @__PURE__ */ a("div", {
11
11
  className: "ttw:flex ttw:flex-col ttw:gap-2.5",
12
- children: [/* @__PURE__ */ i("div", {
12
+ children: [/* @__PURE__ */ a("div", {
13
13
  className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:pt-5 ttw:pb-2.5",
14
- children: [/* @__PURE__ */ r(t, {
15
- variant: "h3",
16
- children: u.title
17
- }), /* @__PURE__ */ r(t, {
14
+ children: [/* @__PURE__ */ i(t, {
15
+ variant: "section",
16
+ level: 3,
17
+ children: d.title
18
+ }), /* @__PURE__ */ i(n, {
18
19
  variant: "body2",
19
20
  color: "muted",
20
- children: u.description
21
+ children: d.description
21
22
  })]
22
- }), /* @__PURE__ */ i("div", {
23
+ }), /* @__PURE__ */ a("div", {
23
24
  className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-lg",
24
- children: [/* @__PURE__ */ i("section", {
25
+ children: [/* @__PURE__ */ a("section", {
25
26
  className: "ttw:flex ttw:justify-between ttw:gap-4",
26
- children: [/* @__PURE__ */ i("div", {
27
+ children: [/* @__PURE__ */ a("div", {
27
28
  className: "ttw:flex ttw:flex-col ttw:gap-1",
28
- children: [/* @__PURE__ */ r(t, {
29
+ children: [/* @__PURE__ */ i(n, {
29
30
  variant: "body1",
30
31
  className: "ttw:font-medium",
31
- children: u.bankDetailsTitle
32
- }), /* @__PURE__ */ r(t, {
32
+ children: d.bankDetailsTitle
33
+ }), /* @__PURE__ */ i(n, {
33
34
  variant: "body2",
34
35
  color: "muted",
35
- children: u.bankDetailsDescription
36
+ children: d.bankDetailsDescription
36
37
  })]
37
- }), /* @__PURE__ */ r(e, {
38
- checked: a,
39
- onCheckedChange: s,
40
- "aria-label": u.bankDetailsToggle
38
+ }), /* @__PURE__ */ i(e, {
39
+ checked: o,
40
+ onCheckedChange: (e) => c(e === !0),
41
+ "aria-label": d.bankDetailsToggle
41
42
  })]
42
- }), /* @__PURE__ */ i("section", {
43
+ }), /* @__PURE__ */ a("section", {
43
44
  className: "ttw:flex ttw:justify-between ttw:gap-4",
44
- children: [/* @__PURE__ */ i("div", {
45
+ children: [/* @__PURE__ */ a("div", {
45
46
  className: "ttw:flex ttw:flex-col ttw:gap-1",
46
47
  children: [
47
- /* @__PURE__ */ r(t, {
48
+ /* @__PURE__ */ i(n, {
48
49
  variant: "body1",
49
50
  className: "ttw:font-medium",
50
- children: u.paidInvoicesTitle
51
+ children: d.paidInvoicesTitle
51
52
  }),
52
- /* @__PURE__ */ r(t, {
53
+ /* @__PURE__ */ i(n, {
53
54
  variant: "body2",
54
55
  color: "muted",
55
- children: u.paidInvoicesDescription
56
+ children: d.paidInvoicesDescription
56
57
  }),
57
- /* @__PURE__ */ r(t, {
58
+ /* @__PURE__ */ i(n, {
58
59
  variant: "body2",
59
60
  color: "muted",
60
61
  className: "ttw:font-medium",
61
- children: u.paidInvoicesWarning
62
+ children: d.paidInvoicesWarning
62
63
  })
63
64
  ]
64
- }), /* @__PURE__ */ r(e, {
65
- checked: o,
66
- onCheckedChange: c,
67
- "aria-label": u.paidInvoicesToggle
65
+ }), /* @__PURE__ */ i(e, {
66
+ checked: s,
67
+ onCheckedChange: (e) => l(e === !0),
68
+ "aria-label": d.paidInvoicesToggle
68
69
  })]
69
70
  })]
70
71
  })]
71
72
  });
72
73
  }
73
- export { a as PdfSettingsSection, a as default };
74
+ export { o as PdfSettingsSection, o as default };
@@ -36,62 +36,62 @@ function _(e) {
36
36
  n
37
37
  ].filter((e) => !!e?.trim()).join(", ");
38
38
  }
39
- function v({ labels: i, featureLabels: c, contactUrl: v }) {
40
- let y = {
39
+ function v({ labels: i, featureLabels: c, contactUrl: v, showHeader: y }) {
40
+ let b = {
41
41
  ...o,
42
42
  ...c
43
- }, b = r();
43
+ }, x = r();
44
44
  f(() => {
45
- b(s.Mounted);
46
- }, [b]);
47
- let [x, S] = p(h.Personal), C = d((e) => {
48
- (e === h.Personal || e === h.Business) && S(e);
49
- }, []), { initResponse: w } = a(), T = w?.bankName ?? void 0, E = t(w?.scopes, [n.OrganizationReadOrg]), { userQuery: D, organizationQuery: O } = l({ readOrganization: E }), k = D.data, A = O.data, j = !E || x === h.Personal, M = j ? D : O, N = M.isLoading, P = M.isError, F = y.emptyValue, I = g(k?.name, F), L = g(A?.legalName, F), R = j ? [
45
+ x(s.Mounted);
46
+ }, [x]);
47
+ let [S, C] = p(h.Personal), w = d((e) => {
48
+ (e === h.Personal || e === h.Business) && C(e);
49
+ }, []), { initResponse: T } = a(), E = T?.bankName ?? void 0, D = t(T?.scopes, [n.OrganizationReadOrg]), { userQuery: O, organizationQuery: k } = l({ readOrganization: D }), A = O.data, j = k.data, M = !D || S === h.Personal, N = M ? O : k, P = N.isLoading, F = N.isError, I = b.emptyValue, L = g(A?.name, I), R = g(j?.legalName, I), z = M ? [
50
50
  {
51
- label: y.nameLabel,
52
- value: I
51
+ label: b.nameLabel,
52
+ value: L
53
53
  },
54
54
  {
55
- label: y.phoneLabel,
56
- value: e(k?.phoneNumber, F)
55
+ label: b.phoneLabel,
56
+ value: e(A?.phoneNumber, I)
57
57
  },
58
58
  {
59
- label: y.emailLabel,
60
- value: g(k?.email, F)
59
+ label: b.emailLabel,
60
+ value: g(A?.email, I)
61
61
  }
62
62
  ] : [
63
63
  {
64
- label: y.legalNameLabel,
65
- value: L
64
+ label: b.legalNameLabel,
65
+ value: R
66
66
  },
67
67
  {
68
- label: y.companyAddressLabel,
69
- value: g(_(A?.address), F)
68
+ label: b.companyAddressLabel,
69
+ value: g(_(j?.address), I)
70
70
  },
71
71
  {
72
- label: y.companyPhoneLabel,
73
- value: e(A?.phoneNumber, F)
72
+ label: b.companyPhoneLabel,
73
+ value: e(j?.phoneNumber, I)
74
74
  }
75
75
  ];
76
76
  return /* @__PURE__ */ m(u, {
77
77
  labels: i,
78
78
  tabs: [{
79
79
  id: h.Personal,
80
- label: y.personalTab
81
- }, ...E ? [{
80
+ label: b.personalTab
81
+ }, ...D ? [{
82
82
  id: h.Business,
83
- label: y.businessTab
83
+ label: b.businessTab
84
84
  }] : []],
85
- activeTabId: j ? h.Personal : h.Business,
86
- onTabChange: C,
87
- bannerTone: j ? "primary" : "secondary",
88
- title: j ? I : L,
89
- subtitle: y.subtitle,
90
- bankName: T,
85
+ activeTabId: M ? h.Personal : h.Business,
86
+ onTabChange: w,
87
+ title: M ? L : R,
88
+ subtitle: b.subtitle,
89
+ bankName: E,
91
90
  contactUrl: v,
92
- fields: R,
93
- isLoading: N,
94
- isError: P
91
+ showHeader: y,
92
+ fields: z,
93
+ isLoading: P,
94
+ isError: F
95
95
  });
96
96
  }
97
97
  function y({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, uiFramework: s, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...h }) {
@@ -1,7 +1,7 @@
1
1
  // ../../libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js
2
2
  var e = {
3
3
  loadingLabel: "Loading profile",
4
- errorLabel: "Unable to load profile",
4
+ errorLabel: "Couldn't load profile",
5
5
  contactPrefix: "To change this information, please contact",
6
6
  contactLinkText: "here"
7
7
  };
@@ -2,55 +2,50 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Skeleton as e, Tabs as t, TabsContent as n, TabsList as r, TabsTrigger as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { SectionHeading as a } from "../../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
5
+ import { DescriptionList as e, Skeleton as t, Tabs as n, TabsContent as r, TabsList as i, TabsTrigger as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { ErrorState as o } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
7
+ import { LoadingRegion as s } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
8
+ import { SectionHeading as c } from "../../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
7
9
  import "../../../../shared/ui/dist/index.js";
8
- import { DEFAULT_LABELS as o } from "./index2.js";
9
- import { Fragment as s } from "react";
10
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
10
+ import { DEFAULT_LABELS as l } from "./index2.js";
11
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
11
12
  // ../../libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js
12
- var d = {
13
- Primary: "primary",
14
- Secondary: "secondary"
15
- }, f = {
16
- primary: "ttw:bg-gradient-to-r ttw:from-sky-200 ttw:via-rose-300 ttw:to-purple-400",
17
- secondary: "ttw:bg-gradient-to-r ttw:from-sky-400 ttw:via-red-400 ttw:to-violet-400"
18
- };
19
- function p({ labels: p, tabs: m, activeTabId: h, onTabChange: g, bannerTone: _ = d.Primary, title: v, subtitle: y, bankName: b, contactUrl: x, fields: S, isLoading: C = !1, isError: w = !1 }) {
13
+ function p({ labels: p, tabs: m, activeTabId: h, onTabChange: g, title: _, subtitle: v, bankName: y, contactUrl: b, fields: x, isLoading: S = !1, isError: C = !1, showHeader: w = !0 }) {
20
14
  let T = {
21
- ...o,
15
+ ...l,
22
16
  ...p
23
17
  };
24
- return /* @__PURE__ */ u("div", {
18
+ return /* @__PURE__ */ f("div", {
25
19
  className: "ttw:overflow-hidden ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background",
26
20
  children: [
27
- /* @__PURE__ */ l("div", {
28
- "aria-hidden": !0,
29
- className: `ttw:h-28 ttw:w-full ${f[_]}`
30
- }),
31
- /* @__PURE__ */ l("div", {
32
- className: "ttw:px-6 ttw:pt-5 ttw:pb-2",
33
- children: C ? /* @__PURE__ */ u("div", {
21
+ w ? /* @__PURE__ */ d("div", {
22
+ "aria-hidden": "true",
23
+ "data-testid": "profile-card-header",
24
+ className: "ttw:h-28 ttw:w-full ttw:bg-gradient-to-r ttw:from-primary/10 ttw:via-primary/40 ttw:to-primary/20"
25
+ }) : null,
26
+ /* @__PURE__ */ d("div", {
27
+ className: "ttw:px-6 ttw:pt-6 ttw:pb-2",
28
+ children: S ? /* @__PURE__ */ f("div", {
34
29
  "aria-hidden": !0,
35
- children: [/* @__PURE__ */ l(e, {
30
+ children: [/* @__PURE__ */ d(t, {
36
31
  width: 150,
37
32
  height: 32
38
- }), /* @__PURE__ */ l(e, {
33
+ }), /* @__PURE__ */ d(t, {
39
34
  width: 250,
40
35
  height: 20
41
36
  })]
42
- }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(a, {
37
+ }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(c, {
43
38
  className: "ttw:truncate ttw:mb-0",
44
- children: v
45
- }), x && b ? /* @__PURE__ */ u("p", {
39
+ children: _
40
+ }), b && y ? /* @__PURE__ */ f("p", {
46
41
  className: "ttw:truncate ttw:text-sm ttw:text-muted-foreground",
47
42
  children: [
48
43
  T.contactPrefix,
49
44
  " ",
50
- b,
45
+ y,
51
46
  " ",
52
- /* @__PURE__ */ l("a", {
53
- href: x,
47
+ /* @__PURE__ */ d("a", {
48
+ href: b,
54
49
  target: "_blank",
55
50
  rel: "noopener noreferrer",
56
51
  className: "ttw:font-medium ttw:text-primary ttw:underline",
@@ -58,59 +53,49 @@ function p({ labels: p, tabs: m, activeTabId: h, onTabChange: g, bannerTone: _ =
58
53
  }),
59
54
  "."
60
55
  ]
61
- }) : y ? /* @__PURE__ */ l("p", {
56
+ }) : v ? /* @__PURE__ */ d("p", {
62
57
  className: "ttw:truncate ttw:text-sm ttw:text-muted-foreground",
63
- children: y
58
+ children: v
64
59
  }) : null] })
65
60
  }),
66
- /* @__PURE__ */ u(t, {
61
+ /* @__PURE__ */ f(n, {
67
62
  value: h,
68
63
  onValueChange: g,
69
64
  className: "ttw:px-6 ttw:py-4",
70
- children: [/* @__PURE__ */ l(r, { children: m.map((e) => /* @__PURE__ */ l(i, {
65
+ children: [/* @__PURE__ */ d(i, { children: m.map((e) => /* @__PURE__ */ d(a, {
71
66
  value: e.id,
72
67
  children: e.label
73
- }, e.id)) }), /* @__PURE__ */ l(n, {
68
+ }, e.id)) }), /* @__PURE__ */ d(r, {
74
69
  value: h,
75
- children: C ? /* @__PURE__ */ u("div", {
76
- role: "status",
77
- "aria-label": T.loadingLabel,
78
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-2 ttw:py-4",
79
- children: [
80
- /* @__PURE__ */ l(e, {
81
- width: 100,
82
- height: 20
83
- }),
84
- /* @__PURE__ */ l(e, {
85
- width: 100,
86
- height: 20
87
- }),
88
- /* @__PURE__ */ l(e, {
89
- width: 100,
90
- height: 20
91
- }),
92
- /* @__PURE__ */ l(e, {
93
- width: 100,
94
- height: 20
95
- })
96
- ]
97
- }) : w ? /* @__PURE__ */ l("div", {
98
- role: "alert",
99
- className: "ttw:py-4 ttw:text-sm ttw:text-destructive",
100
- children: T.errorLabel
101
- }) : /* @__PURE__ */ l("dl", {
102
- className: "ttw:grid ttw:grid-cols-[50%_1fr] ttw:gap-x-6 ttw:gap-y-4 ttw:py-4",
103
- children: S.map((e) => /* @__PURE__ */ u(s, { children: [/* @__PURE__ */ l("dt", {
104
- className: "ttw:text-sm ttw:font-medium ttw:text-muted-foreground",
105
- children: e.label
106
- }), /* @__PURE__ */ l("dd", {
107
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
108
- children: e.value
109
- })] }, e.label))
70
+ children: /* @__PURE__ */ d(s, {
71
+ isLoading: S,
72
+ loadingLabel: T.loadingLabel,
73
+ children: S ? /* @__PURE__ */ f("div", {
74
+ "aria-hidden": !0,
75
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-2 ttw:py-4",
76
+ children: [
77
+ /* @__PURE__ */ d(t, {
78
+ width: 100,
79
+ height: 20
80
+ }),
81
+ /* @__PURE__ */ d(t, {
82
+ width: 100,
83
+ height: 20
84
+ }),
85
+ /* @__PURE__ */ d(t, {
86
+ width: 100,
87
+ height: 20
88
+ }),
89
+ /* @__PURE__ */ d(t, {
90
+ width: 100,
91
+ height: 20
92
+ })
93
+ ]
94
+ }) : C ? /* @__PURE__ */ d(o, { title: T.errorLabel }) : /* @__PURE__ */ d(e, { items: x })
110
95
  })
111
96
  })]
112
97
  })
113
98
  ]
114
99
  });
115
100
  }
116
- export { p as ProfileCard, p as default, d as ProfileCardBannerTone };
101
+ export { p as ProfileCard, p as default };
@@ -45,6 +45,9 @@ function s({ userId: s, accounts: c, enabled: l }) {
45
45
  accessibleAccountIds: t,
46
46
  isLoading: h && e.some((e) => e.isLoading),
47
47
  isError: e.some((e) => e.isError),
48
+ refetch: () => {
49
+ for (let t of e) t.isError && t.refetch();
50
+ },
48
51
  isComplete: h && e.length > 0 && e.every((e) => e.isSuccess)
49
52
  };
50
53
  }