@tesouro/embedded-components-react 0.5.158 → 0.5.159

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.
@@ -13,7 +13,9 @@ var t = {
13
13
  cancelAction: "Cancel",
14
14
  saveAction: "Save",
15
15
  saveAriaLabel: "Save payment instructions",
16
- ach: e
16
+ ach: e,
17
+ detailsWarning: "Some vendor details couldn't load, so editing the vendor profile is unavailable right now.",
18
+ retryAction: "Retry"
17
19
  };
18
20
  //#endregion
19
21
  export { t as VENDOR_SUMMARY_CARD_LABELS_EN };
@@ -6,19 +6,19 @@ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { ChevronRightIcon as o, Plus as s } from "lucide-react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js
8
8
  var c = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", l = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground", u = "ttw:-mx-2 ttw:-my-1 ttw:flex ttw:flex-1 ttw:items-center ttw:justify-between ttw:gap-3 ttw:rounded-md ttw:px-2 ttw:py-1 ttw:text-left ttw:hover:bg-muted";
9
- function d({ summary: d, onEdit: f, paymentInstructions: p, showPaymentInstructions: m = !0, testId: h, labels: g }) {
10
- let _ = r(() => ({
9
+ function d({ summary: d, onEdit: f, paymentInstructions: p, showPaymentInstructions: m = !0, detailsWarning: h, testId: g, labels: _ }) {
10
+ let v = r(() => ({
11
11
  ...t,
12
- ...g,
12
+ ..._,
13
13
  ach: {
14
14
  ...t.ach,
15
- ...g?.ach,
15
+ ..._?.ach,
16
16
  fieldMarkers: {
17
17
  ...t.ach.fieldMarkers,
18
- ...g?.ach?.fieldMarkers
18
+ ..._?.ach?.fieldMarkers
19
19
  }
20
20
  }
21
- }), [g]), v = !!p?.isOpen, y = !!p?.canEditExisting && d.hasPaymentInstructions, b = /* @__PURE__ */ a("div", {
21
+ }), [_]), y = !!p?.isOpen, b = !!p?.canEditExisting && d.hasPaymentInstructions, x = /* @__PURE__ */ a("div", {
22
22
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
23
23
  children: [
24
24
  /* @__PURE__ */ i("span", {
@@ -34,13 +34,13 @@ function d({ summary: d, onEdit: f, paymentInstructions: p, showPaymentInstructi
34
34
  children: d.description
35
35
  }) : null
36
36
  ]
37
- }), x;
38
- return x = p && v ? /* @__PURE__ */ i(n, {
37
+ }), S;
38
+ return S = p && y ? /* @__PURE__ */ i(n, {
39
39
  paymentInstructions: p,
40
- labels: _
41
- }) : d.hasPaymentInstructions ? y ? /* @__PURE__ */ a("button", {
40
+ labels: v
41
+ }) : d.hasPaymentInstructions ? b ? /* @__PURE__ */ a("button", {
42
42
  type: "button",
43
- "aria-label": _.editPaymentInstructionsAction,
43
+ "aria-label": v.editPaymentInstructionsAction,
44
44
  onClick: p?.onOpen,
45
45
  className: u,
46
46
  children: [/* @__PURE__ */ i("span", {
@@ -59,66 +59,78 @@ function d({ summary: d, onEdit: f, paymentInstructions: p, showPaymentInstructi
59
59
  className: "ttw:flex ttw:flex-col ttw:gap-1",
60
60
  children: [/* @__PURE__ */ i("p", {
61
61
  className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
62
- children: _.paymentInstructionsHeading
62
+ children: v.paymentInstructionsHeading
63
63
  }), /* @__PURE__ */ i("p", {
64
64
  className: "ttw:text-sm ttw:text-muted-foreground",
65
- children: _.paymentInstructionsDescription
65
+ children: v.paymentInstructionsDescription
66
66
  })]
67
67
  }), p ? /* @__PURE__ */ a(e, {
68
68
  type: "button",
69
69
  variant: "link",
70
70
  className: "ttw:w-fit ttw:px-0",
71
71
  onClick: p.onOpen,
72
- children: [/* @__PURE__ */ i(s, { className: "ttw:size-4" }), _.addPaymentInstructions]
72
+ children: [/* @__PURE__ */ i(s, { className: "ttw:size-4" }), v.addPaymentInstructions]
73
73
  }) : /* @__PURE__ */ i("p", {
74
74
  className: "ttw:text-sm ttw:text-muted-foreground",
75
75
  children: d.methodLabel
76
76
  })]
77
77
  }), /* @__PURE__ */ a("div", {
78
- "data-testid": h,
79
- children: [/* @__PURE__ */ i("h3", {
80
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
81
- children: _.payToHeading
82
- }), /* @__PURE__ */ a("div", {
83
- className: "ttw:mt-3 ttw:flex ttw:flex-col ttw:divide-y ttw:divide-border",
84
- children: [/* @__PURE__ */ a("div", {
85
- className: c,
86
- children: [/* @__PURE__ */ i("span", {
87
- className: l,
88
- children: _.vendorLabel
89
- }), f && !v ? /* @__PURE__ */ a("button", {
78
+ "data-testid": g,
79
+ children: [
80
+ /* @__PURE__ */ i("h3", {
81
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
82
+ children: v.payToHeading
83
+ }),
84
+ h ? /* @__PURE__ */ a("p", {
85
+ className: "ttw:mt-1 ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-x-1.5 ttw:text-sm ttw:text-muted-foreground",
86
+ children: [v.detailsWarning, h.onRetry ? /* @__PURE__ */ i("button", {
90
87
  type: "button",
91
- "aria-label": _.editAction,
92
- onClick: f,
93
- className: u,
94
- children: [b, /* @__PURE__ */ i(o, {
95
- "aria-hidden": "true",
96
- className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
88
+ onClick: h.onRetry,
89
+ className: "ttw:font-medium ttw:text-foreground ttw:underline ttw:underline-offset-2 ttw:hover:no-underline",
90
+ children: v.retryAction
91
+ }) : null]
92
+ }) : null,
93
+ /* @__PURE__ */ a("div", {
94
+ className: "ttw:mt-3 ttw:flex ttw:flex-col ttw:divide-y ttw:divide-border",
95
+ children: [/* @__PURE__ */ a("div", {
96
+ className: c,
97
+ children: [/* @__PURE__ */ i("span", {
98
+ className: l,
99
+ children: v.vendorLabel
100
+ }), f && !y ? /* @__PURE__ */ a("button", {
101
+ type: "button",
102
+ "aria-label": v.editAction,
103
+ onClick: f,
104
+ className: u,
105
+ children: [x, /* @__PURE__ */ i(o, {
106
+ "aria-hidden": "true",
107
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
108
+ })]
109
+ }) : /* @__PURE__ */ i("div", {
110
+ className: "ttw:flex ttw:flex-1",
111
+ children: x
97
112
  })]
98
- }) : /* @__PURE__ */ i("div", {
99
- className: "ttw:flex ttw:flex-1",
100
- children: b
101
- })]
102
- }), m && v ? /* @__PURE__ */ a("div", {
103
- className: c,
104
- children: [/* @__PURE__ */ i("span", {
105
- className: l,
106
- children: _.achBankAccountLabel
107
- }), /* @__PURE__ */ i("div", {
108
- className: "ttw:flex-1",
109
- children: x
110
- })]
111
- }) : m ? /* @__PURE__ */ a("div", {
112
- className: c,
113
- children: [/* @__PURE__ */ i("span", {
114
- className: l,
115
- children: _.achBankAccountLabel
116
- }), /* @__PURE__ */ i("div", {
117
- className: "ttw:flex ttw:flex-1",
118
- children: x
119
- })]
120
- }) : null]
121
- })]
113
+ }), m && y ? /* @__PURE__ */ a("div", {
114
+ className: c,
115
+ children: [/* @__PURE__ */ i("span", {
116
+ className: l,
117
+ children: v.achBankAccountLabel
118
+ }), /* @__PURE__ */ i("div", {
119
+ className: "ttw:flex-1",
120
+ children: S
121
+ })]
122
+ }) : m ? /* @__PURE__ */ a("div", {
123
+ className: c,
124
+ children: [/* @__PURE__ */ i("span", {
125
+ className: l,
126
+ children: v.achBankAccountLabel
127
+ }), /* @__PURE__ */ i("div", {
128
+ className: "ttw:flex ttw:flex-1",
129
+ children: S
130
+ })]
131
+ }) : null]
132
+ })
133
+ ]
122
134
  });
123
135
  }
124
136
  //#endregion
@@ -156,12 +156,14 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
156
156
  children: [P.editForm, /* @__PURE__ */ y(p, {
157
157
  summary: D.payTo,
158
158
  paymentInstructions: q,
159
+ detailsWarning: P?.detailsWarning,
159
160
  labels: G
160
161
  })]
161
162
  }) : /* @__PURE__ */ y(p, {
162
163
  summary: D.payTo,
163
164
  onEdit: P?.onEdit,
164
165
  paymentInstructions: q,
166
+ detailsWarning: P?.detailsWarning,
165
167
  labels: G
166
168
  }),
167
169
  D.paymentHistory.length || I || L ? /* @__PURE__ */ b("section", {
@@ -24,6 +24,7 @@ function o(o) {
24
24
  onEdit: s,
25
25
  paymentInstructions: d ? void 0 : o.paymentInstructions,
26
26
  showPaymentInstructions: o.showPaymentInstructions,
27
+ detailsWarning: d ? void 0 : o.detailsWarning,
27
28
  labels: f.summaryCard
28
29
  }) : d ? /* @__PURE__ */ i(e, {
29
30
  variant: "body2",
@@ -38,6 +39,7 @@ function o(o) {
38
39
  summary: o.summary,
39
40
  paymentInstructions: o.paymentInstructions,
40
41
  showPaymentInstructions: o.showPaymentInstructions,
42
+ detailsWarning: o.detailsWarning,
41
43
  labels: f.summaryCard
42
44
  })]
43
45
  }) : o.newVendorForm,
@@ -34,6 +34,7 @@ function o({ selectedId: o, enabled: s = !0 }) {
34
34
  isAddressesLoading: p.isLoading,
35
35
  isAddressesFetching: p.isFetching,
36
36
  isAddressesError: p.isError,
37
+ refetchAddresses: p.refetch,
37
38
  primaryAddress: g,
38
39
  detailsView: _,
39
40
  bankAccounts: m.data?.data,
@@ -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.158", n = "7fecb9df9bd32de0dd66abdc4583c3149eeb5238", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.159", n = "b49d4046193e5fde2fb3321c9ee8af787d00c507", 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.158",
3
+ "version": "0.5.159",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {