@tesouro/embedded-components-react 0.7.41 → 0.7.43

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 (34) hide show
  1. package/README.md +110 -23
  2. package/dist/index.css +11 -0
  3. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/acceptDisclosures.js +33 -28
  4. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/labels.js +6 -2
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +40 -22
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/labels.js +14 -2
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +8 -10
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +274 -2
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +30 -4
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +21 -272
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +65 -26
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +341 -21
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +27 -65
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +26 -341
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +72 -27
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +85 -26
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +8 -74
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +55 -83
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +7 -6
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +42 -37
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/expenseManagement.js +163 -140
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/labels.js +22 -16
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/labels.js +12 -0
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +255 -88
  30. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  31. package/dist/scenarios/index.d.ts +1 -1
  32. package/package.json +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +0 -11
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +0 -64
@@ -1,66 +1,66 @@
1
1
  import { Scope as e } from "../../../../shared/data-access/dist/lib/scopes.js";
2
2
  import "../../../../shared/data-access/dist/index.js";
3
- import { AN_ORGANIZATION as t, AN_ORGANIZATION_ROLE as n, AN_ORGANIZATION_USER as r, A_DISCLOSURES_SET as i } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
4
- import { EMPLOYEE_ROLE as a, ENGINEERING as o, HEADQUARTERS as s, REMOTE as c, SALES as l, SAM as u, TEAM as d, teamId as f } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/team.js";
5
- import { IDENTITY as p, bodyOf as m, endpoint as h, initRoute as g, json as _, noContent as v, problem as y, wait as b } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
6
- import { offsetPage as x } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/worlds.js";
7
- import { SETTINGS_LABELS as S } from "./labels.js";
3
+ import { AN_APPROVAL_POLICY as t, AN_ORGANIZATION as n, AN_ORGANIZATION_ROLE as r, AN_ORGANIZATION_USER as i, A_DISCLOSURES_SET as a } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
4
+ import { EMPLOYEE_ROLE as o, ENGINEERING as s, GRACE as c, HEADQUARTERS as l, REMOTE as ee, SALES as u, SAM as d, TEAM as f, TYLER as p, teamId as m } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/team.js";
5
+ import { FINOPS as h, IDENTITY as g, bodyOf as _, endpoint as v, initRoute as y, json as b, noContent as x, problem as S, wait as C } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
6
+ import { finopsOffsetPage as w, offsetPage as te, sortRows as ne } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/worlds.js";
7
+ import { SETTINGS_LABELS as T } from "./labels.js";
8
8
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js
9
- var C = "Example Bank", w = "https://example.test/support", T = n, E = [T, a], D = {
10
- id: r.id,
11
- organizationId: t.id,
12
- name: r.name,
13
- email: r.email,
9
+ var E = "Example Bank", D = "https://example.test/support", O = r, k = [O, o], A = {
10
+ id: i.id,
11
+ organizationId: n.id,
12
+ name: i.name,
13
+ email: i.email,
14
14
  phoneNumber: "+12175550142",
15
15
  isAuthorizedSigner: !0,
16
16
  permissions: [],
17
- role: T.key,
17
+ role: O.key,
18
18
  status: "ACTIVE"
19
- }, O = {
20
- ...t,
19
+ }, j = {
20
+ ...n,
21
21
  phoneNumber: "+12175550100"
22
- }, k = {
23
- ...i,
22
+ }, M = {
23
+ ...a,
24
24
  accepted: !0,
25
- disclosures: (i.disclosures ?? []).map((e) => ({
25
+ disclosures: (a.disclosures ?? []).map((e) => ({
26
26
  ...e,
27
27
  accepted: !0
28
28
  }))
29
- }, A = {
29
+ }, N = {
30
30
  tokenParam: "PaginationToken",
31
31
  next: "nextPaginationToken",
32
32
  prev: "prevPaginationToken"
33
33
  };
34
- function j(e, t) {
34
+ function P(e, t) {
35
35
  let n = t.has("paginationToken") ? {
36
- ...A,
36
+ ...N,
37
37
  tokenParam: "paginationToken"
38
- } : A;
39
- return x(e, t, {
38
+ } : N;
39
+ return te(e, t, {
40
40
  paging: n,
41
41
  defaultLimit: 100
42
42
  });
43
43
  }
44
- var M = (e) => `${p}${e}`, N = 500;
45
- function P({ canWrite: e }) {
46
- let t = d.map((e) => ({ ...e })), n = {
47
- departments: [o, l].map((e) => ({ ...e })),
48
- locations: [s, c].map((e) => ({ ...e }))
44
+ var F = (e) => `${g}${e}`, I = 500;
45
+ function L({ canWrite: e }) {
46
+ let t = f.map((e) => ({ ...e })), n = {
47
+ departments: [s, u].map((e) => ({ ...e })),
48
+ locations: [l, ee].map((e) => ({ ...e }))
49
49
  }, r = 0, i = {
50
50
  departments: "department",
51
51
  locations: "location"
52
- }, a = (e, n) => t.filter((t) => t[i[e]]?.id === n), p = (e) => (t) => ({
52
+ }, a = (e, n) => t.filter((t) => t[i[e]]?.id === n), o = (e) => (t) => ({
53
53
  ...t,
54
54
  memberCount: a(e, t.id).length
55
- }), g = () => y(403, "Forbidden", "This token cannot change the team."), x = (t, n, r) => h(t, M(n), async (t, n) => e ? (await b(N), r(t, n)) : g()), S = (e) => !e || e === "ALL" ? t : t.filter((t) => t.status === e), C = (e) => {
56
- let s = `/${e}`;
55
+ }), c = () => S(403, "Forbidden", "This token cannot change the team."), p = (t, n, r) => v(t, F(n), async (t, n) => e ? (await C(I), r(t, n)) : c()), h = (e) => !e || e === "ALL" ? t : t.filter((t) => t.status === e), g = (e) => {
56
+ let c = `/${e}`;
57
57
  return [
58
- h("GET", M(s), ({ query: t }) => _(j(n[e].map(p(e)), t))),
59
- h("GET", M(`${s}/:id`), ({ query: t }, { id: r }) => {
58
+ v("GET", F(c), ({ query: t }) => b(P(n[e].map(o(e)), t))),
59
+ v("GET", F(`${c}/:id`), ({ query: t }, { id: r }) => {
60
60
  let i = n[e].find((e) => e.id === r);
61
- return i ? _({
61
+ return i ? b({
62
62
  ...i,
63
- members: j(a(e, r).map((e) => ({
63
+ members: P(a(e, r).map((e) => ({
64
64
  id: e.id,
65
65
  name: e.name,
66
66
  email: e.email,
@@ -69,25 +69,25 @@ function P({ canWrite: e }) {
69
69
  createdDateTime: e.createdDateTime,
70
70
  lastLoggedInDateTime: e.lastLoggedInDateTime
71
71
  })), t)
72
- }) : y(404, "Not Found", "No such group.");
72
+ }) : S(404, "Not Found", "No such group.");
73
73
  }),
74
- x("POST", s, (t) => {
74
+ p("POST", c, (t) => {
75
75
  r += 1;
76
76
  let i = {
77
- ...o,
78
- id: f(20 + r),
79
- name: m(t)?.name ?? "New group",
77
+ ...s,
78
+ id: m(20 + r),
79
+ name: _(t)?.name ?? "New group",
80
80
  memberCount: 0
81
81
  };
82
- return n[e] = [...n[e], i], _(i, 201);
82
+ return n[e] = [...n[e], i], b(i, 201);
83
83
  }),
84
- x("PUT", `${s}/:id`, (t, { id: n }) => w(e, t, n)),
85
- x("DELETE", `${s}/:id`, (r, { id: a }) => (n[e] = n[e].filter((e) => e.id !== a), t = t.map((t) => t[i[e]]?.id === a ? {
84
+ p("PUT", `${c}/:id`, (t, { id: n }) => y(e, t, n)),
85
+ p("DELETE", `${c}/:id`, (r, { id: a }) => (n[e] = n[e].filter((e) => e.id !== a), t = t.map((t) => t[i[e]]?.id === a ? {
86
86
  ...t,
87
87
  [i[e]]: null
88
- } : t), v())),
89
- x("POST", `${s}/:id/members`, (r, { id: a }) => {
90
- let o = n[e].find((e) => e.id === a), s = m(r);
88
+ } : t), x())),
89
+ p("POST", `${c}/:id/members`, (r, { id: a }) => {
90
+ let o = n[e].find((e) => e.id === a), s = _(r);
91
91
  return !o || !s?.userIds || (t = t.map((t) => {
92
92
  if (!s.userIds?.includes(t.id)) return t;
93
93
  let n = s.type === "REMOVE" ? null : {
@@ -98,35 +98,35 @@ function P({ canWrite: e }) {
98
98
  ...t,
99
99
  [i[e]]: n
100
100
  };
101
- })), v();
101
+ })), x();
102
102
  })
103
103
  ];
104
- }, w = (e, r, a) => {
105
- let o = m(r)?.name;
106
- n[e] = n[e].map((e) => e.id === a && o ? {
104
+ }, y = (e, r, a) => {
105
+ let s = _(r)?.name;
106
+ n[e] = n[e].map((e) => e.id === a && s ? {
107
107
  ...e,
108
- name: o
109
- } : e), t = t.map((t) => t[i[e]]?.id === a && o ? {
108
+ name: s
109
+ } : e), t = t.map((t) => t[i[e]]?.id === a && s ? {
110
110
  ...t,
111
111
  [i[e]]: {
112
112
  id: a,
113
- name: o
113
+ name: s
114
114
  }
115
115
  } : t);
116
- let s = n[e].find((e) => e.id === a);
117
- return s ? _(p(e)(s)) : y(404, "Not Found", "");
116
+ let c = n[e].find((e) => e.id === a);
117
+ return c ? b(o(e)(c)) : S(404, "Not Found", "");
118
118
  };
119
119
  return [
120
- h("GET", M("/users/me"), () => _(D)),
121
- h("GET", M("/organizations/:id"), () => _(O)),
122
- h("GET", M("/disclosures"), () => _(k)),
123
- h("GET", M("/users"), ({ query: e }) => _(j(S(e.get("Status")), e))),
124
- h("GET", M("/roles"), ({ query: e }) => _(j(E, e))),
125
- h("GET", M("/roles/:id/permissions"), () => _({ data: [] })),
126
- x("POST", "/users", (e) => {
127
- let n = m(e), i = t.find((e) => e.email === n.email), a = i ?? {
128
- ...u,
129
- id: f(30 + (r += 1)),
120
+ v("GET", F("/users/me"), () => b(A)),
121
+ v("GET", F("/organizations/:id"), () => b(j)),
122
+ v("GET", F("/disclosures"), () => b(M)),
123
+ v("GET", F("/users"), ({ query: e }) => b(P(h(e.get("Status")), e))),
124
+ v("GET", F("/roles"), ({ query: e }) => b(P(k, e))),
125
+ v("GET", F("/roles/:id/permissions"), () => b({ data: [] })),
126
+ p("POST", "/users", (e) => {
127
+ let n = _(e), i = t.find((e) => e.email === n.email), a = i ?? {
128
+ ...d,
129
+ id: m(30 + (r += 1)),
130
130
  name: n.name || "New member",
131
131
  email: n.email || "new.member@example.test",
132
132
  jobTitle: n.jobTitle ?? null,
@@ -134,7 +134,7 @@ function P({ canWrite: e }) {
134
134
  role: null,
135
135
  createdDateTime: (/* @__PURE__ */ new Date()).toISOString()
136
136
  };
137
- return i || (t = [...t, a]), _({
137
+ return i || (t = [...t, a]), b({
138
138
  id: a.id,
139
139
  createdAt: a.createdDateTime,
140
140
  email: a.email,
@@ -145,57 +145,224 @@ function P({ canWrite: e }) {
145
145
  status: a.status
146
146
  }, 201);
147
147
  }),
148
- x("PATCH", "/users/:id", (e, { id: n }) => {
149
- let r = m(e);
148
+ p("PATCH", "/users/:id", (e, { id: n }) => {
149
+ let r = _(e);
150
150
  t = t.map((e) => e.id === n ? {
151
151
  ...e,
152
152
  ...r,
153
153
  id: n
154
154
  } : e);
155
155
  let i = t.find((e) => e.id === n);
156
- return i ? _(i) : y(404, "Not Found", "No such user.");
156
+ return i ? b(i) : S(404, "Not Found", "No such user.");
157
157
  }),
158
- x("POST", "/users/:id/disable", (e, { id: n }) => (t = t.map((e) => e.id === n ? {
158
+ p("POST", "/users/:id/disable", (e, { id: n }) => (t = t.map((e) => e.id === n ? {
159
159
  ...e,
160
160
  status: "INACTIVE"
161
- } : e), _({
161
+ } : e), b({
162
162
  userId: n,
163
163
  isEnabled: !1
164
164
  }))),
165
- x("POST", "/roles/:id/members", (e, { id: n }) => {
166
- let r = E.find((e) => e.id === n), i = m(e);
165
+ p("POST", "/roles/:id/members", (e, { id: n }) => {
166
+ let r = k.find((e) => e.id === n), i = _(e);
167
167
  return r && i?.userIds && (t = t.map((e) => i.userIds?.includes(e.id) ? {
168
168
  ...e,
169
169
  role: i.type === "REMOVE" ? null : r.key
170
- } : e)), v();
170
+ } : e)), x();
171
+ }),
172
+ ...g("departments"),
173
+ ...g("locations")
174
+ ];
175
+ }
176
+ var R = (e) => `${h}${e}`, z = (e) => `00000000-0000-4000-8000-000000000${String(600 + e).padStart(3, "0")}`, B = "{event_name == 'submitted_for_approval'}", V = (e, t, n) => ({
177
+ operator: t,
178
+ left_operand: { name: e },
179
+ right_operand: n
180
+ }), H = (e, n) => ({
181
+ ...t,
182
+ id: z(e),
183
+ priority: e,
184
+ ...n
185
+ }), U = (e, t) => ({ all: [
186
+ B,
187
+ V("invoice.amount", ">=", e),
188
+ ...t === void 0 ? [] : [V("invoice.amount", "<=", t)],
189
+ V("invoice.currency", "==", "USD")
190
+ ] }), W = (e) => [{
191
+ if: {
192
+ run_concurrently: !0,
193
+ all: e.map((e) => ({
194
+ call: "role_ids" in e ? "ApprovalRequests.request_approval_by_role" : "ApprovalRequests.request_approval_by_users",
195
+ params: {
196
+ ...e,
197
+ required_approval_count: 1
198
+ }
199
+ }))
200
+ },
201
+ then: ["{Payables.approve(invoice.id)}"],
202
+ else: ["{Payables.reject(invoice.id)}"]
203
+ }], G = [H(1, {
204
+ name: "Bills up to $500",
205
+ object_type: "payable",
206
+ trigger: U(0, 5e4),
207
+ script: W([{ user_ids: [p.id, c.id] }])
208
+ }), H(2, {
209
+ name: "Bills $1,000 and above",
210
+ object_type: "payable",
211
+ trigger: U(1e5),
212
+ script: W([{ user_ids: [c.id] }, { role_ids: [O.id] }])
213
+ })], K = [
214
+ H(3, {
215
+ name: "Less than $100",
216
+ object_type: "transaction",
217
+ trigger: { all: [B, V("transaction.amount", "<", 1e4)] },
218
+ script: ["{Transactions.approve(transaction.id)}"]
219
+ }),
220
+ H(4, {
221
+ name: "$100–$1000",
222
+ object_type: "transaction",
223
+ trigger: { all: [
224
+ B,
225
+ V("transaction.amount", ">=", 1e4),
226
+ V("transaction.amount", "<", 1e5)
227
+ ] },
228
+ script: [{
229
+ if: { any: [{
230
+ call: "ApprovalRequests.request_approval_from_reporting_manager",
231
+ params: { required_approval_count: 1 }
232
+ }] },
233
+ then: ["{Transactions.approve(transaction.id)}"],
234
+ else: ["{Transactions.reject(transaction.id)}"]
235
+ }]
236
+ }),
237
+ H(5, {
238
+ name: "$1000 or more",
239
+ object_type: "transaction",
240
+ trigger: { all: [B, V("transaction.amount", ">=", 1e5)] },
241
+ script: t.script
242
+ })
243
+ ], q = { required_fields: [{
244
+ field: "receipt_id",
245
+ amount_threshold: 7500
246
+ }, {
247
+ field: "description",
248
+ amount_threshold: 2e4
249
+ }] }, J = (e, t, n, r, i = !1) => ({
250
+ id: z(20 + e),
251
+ created_at: "2026-01-15T09:00:00.000Z",
252
+ updated_at: "2026-01-15T09:00:00.000Z",
253
+ name: t,
254
+ nominal_code: n,
255
+ description: r,
256
+ type: "expense",
257
+ status: "active",
258
+ is_bank_account: !1,
259
+ is_external: i,
260
+ currency: "USD"
261
+ }), Y = [
262
+ J(1, "Travel", "6200", "Flights, hotels and ground transport"),
263
+ J(2, "Meals & entertainment", "6300", "Client and team meals"),
264
+ J(3, "Software", "6500", "SaaS subscriptions and licences"),
265
+ J(4, "Office supplies", "6600", "Stationery and small equipment"),
266
+ J(5, "Rent", "6100", "Synced from QuickBooks", !0)
267
+ ];
268
+ function X() {
269
+ let e = [...G, ...K].map((e) => ({ ...e })), n = { ...q }, r = Y.map((e) => ({ ...e })), i = 0, a = (e, t, n) => v(e, R(t), async (e, t) => (await C(I), n(e, t)));
270
+ return [
271
+ v("GET", R("/approval-policies"), ({ query: t }) => {
272
+ let n = t.get("object_type");
273
+ return b(w(e.filter((e) => !n || e.object_type === n), t));
274
+ }),
275
+ a("POST", "/approval-policies", (n) => {
276
+ let r = _(n), a = {
277
+ ...t,
278
+ ...r,
279
+ id: z(40 + (i += 1)),
280
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
281
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
282
+ };
283
+ return e = [...e, a], b(a, 201);
284
+ }),
285
+ a("PATCH", "/approval-policies/:id", (t, { id: n }) => {
286
+ let r = _(t);
287
+ e = e.map((e) => e.id === n ? {
288
+ ...e,
289
+ ...r,
290
+ id: n
291
+ } : e);
292
+ let i = e.find((e) => e.id === n);
293
+ return i ? b(i) : S(404, "Not Found", "No such policy.");
294
+ }),
295
+ a("DELETE", "/approval-policies/:id", (t, { id: n }) => (e = e.filter((e) => e.id !== n), x())),
296
+ v("GET", R("/transactions/validations"), () => b(n)),
297
+ a("PUT", "/transactions/validations", (e) => (n = {
298
+ ...n,
299
+ ..._(e)
300
+ }, b(n))),
301
+ v("GET", R("/ledger-accounts"), ({ query: e }) => {
302
+ let t = ne(r, (e) => e.name ?? "", e.get("order"));
303
+ return b({
304
+ ...w(t, e),
305
+ total_count: t.length
306
+ });
307
+ }),
308
+ a("POST", "/ledger-accounts", (e) => {
309
+ let t = _(e), n = {
310
+ ...J(10 + (i += 1), "", "", ""),
311
+ ...t
312
+ };
313
+ return r = [...r, n], b(n, 201);
314
+ }),
315
+ a("PATCH", "/ledger-accounts/:id", (e, { id: t }) => {
316
+ let n = _(e);
317
+ r = r.map((e) => e.id === t ? {
318
+ ...e,
319
+ ...n,
320
+ id: t
321
+ } : e);
322
+ let i = r.find((e) => e.id === t);
323
+ return i ? b(i) : S(404, "Not Found", "No such ledger account.");
171
324
  }),
172
- ...C("departments"),
173
- ...C("locations")
325
+ a("DELETE", "/ledger-accounts/:id", (e, { id: t }) => (r = r.filter((e) => e.id !== t), x()))
174
326
  ];
175
327
  }
176
- var F = [
328
+ var Z = [
177
329
  e.UserReadOrg,
178
330
  e.RoleReadOrg,
179
331
  e.UserWriteOrg,
180
332
  e.OrganizationReadOrg
181
- ], I = [e.UserReadOrg, e.RoleReadOrg], L = (t, n, r) => ({
333
+ ], re = [e.UserReadOrg, e.RoleReadOrg], Q = [
334
+ ...Z,
335
+ e.ApprovalPolicyReadOrg,
336
+ e.ApprovalPolicyWriteOrg,
337
+ e.ExpenseWriteOrg,
338
+ e.PayableWriteOrg,
339
+ e.AccountingConfigReadOrg,
340
+ e.AccountingConfigWriteOrg
341
+ ], $ = (t, n, r) => ({
182
342
  key: t,
183
- ...S.scenarios[t],
184
- routes: () => [g(n, { bankName: C }), ...P({ canWrite: n.includes(e.UserWriteOrg) })],
343
+ ...T.scenarios[t],
344
+ routes: () => [
345
+ y(n, { bankName: E }),
346
+ ...L({ canWrite: n.includes(e.UserWriteOrg) }),
347
+ ...X()
348
+ ],
185
349
  props: {
186
- profileContactUrl: w,
350
+ profileContactUrl: D,
187
351
  ...r
188
352
  }
189
- }), R = [
190
- L("team", F, { defaultSelectedSection: "team" }),
191
- L("profile", F, { defaultSelectedSection: "profile" }),
192
- L("legal", F, { defaultSelectedSection: "legal" }),
193
- L("help", F, {
353
+ }), ie = [
354
+ $("team", Z, { defaultSelectedSection: "team" }),
355
+ $("profile", Z, { defaultSelectedSection: "profile" }),
356
+ $("legal", Z, { defaultSelectedSection: "legal" }),
357
+ $("help", Z, {
194
358
  defaultSelectedSection: "help",
195
- helpContactUrl: w
359
+ helpContactUrl: D
196
360
  }),
197
- L("read-only-team", I, { defaultSelectedSection: "team" }),
198
- L("no-team", [], { defaultSelectedSection: "team" })
361
+ $("read-only-team", re, { defaultSelectedSection: "team" }),
362
+ $("no-team", [], { defaultSelectedSection: "team" }),
363
+ $("expense", Q, { defaultSelectedSection: "expense" }),
364
+ $("bill-pay", Q, { defaultSelectedSection: "bill-pay" }),
365
+ $("accounting", Q, { defaultSelectedSection: "accounting" })
199
366
  ];
200
367
  //#endregion
201
- export { R as settingsScenarios };
368
+ export { ie as settingsScenarios };
@@ -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.7.41", n = "8fc402322752bda528f422bd8c30d412d5096566", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.7.43", n = "9c3df3210c7f4492ac607289637984bbb3a4b15d", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -546,7 +546,7 @@ declare const offerScenarios: Scenario[];
546
546
  declare const productsScenarios: Scenario[];
547
547
 
548
548
  interface SettingsDemoProps {
549
- defaultSelectedSection?: 'profile' | 'team' | 'legal' | 'help';
549
+ defaultSelectedSection?: 'profile' | 'team' | 'legal' | 'help' | 'expense' | 'bill-pay' | 'accounting';
550
550
  helpContactUrl?: string;
551
551
  profileContactUrl?: string;
552
552
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.7.41",
3
+ "version": "0.7.43",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,11 +0,0 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js
2
- var e = {
3
- title: "Delete this application?",
4
- descriptionBeforeEmphasis: "Everything you've entered so far will be permanently removed. If you'd rather come back later, use ",
5
- descriptionEmphasis: "Save and continue later",
6
- descriptionAfterEmphasis: " instead.",
7
- keepEditingButton: "Keep editing",
8
- deleteButton: "Delete application"
9
- };
10
- //#endregion
11
- export { e as DELETE_APPLICATION_DIALOG_LABELS_EN };
@@ -1,64 +0,0 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DELETE_APPLICATION_DIALOG_LABELS_EN as s } from "./index30.js";
3
- import { useRef as c } from "react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
- import { Trash2Icon as d } from "lucide-react";
6
- //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js
7
- function f({ open: f, onConfirm: p, onCancel: m, isDeleting: h = !1, labels: g, testIds: _ }) {
8
- let v = {
9
- ...s,
10
- ...g
11
- }, y = c(null);
12
- return /* @__PURE__ */ l(e, {
13
- open: f,
14
- onOpenChange: (e) => {
15
- !e && !h && m();
16
- },
17
- children: /* @__PURE__ */ u(t, {
18
- "data-testid": _?.root,
19
- onOpenAutoFocus: (e) => {
20
- e.preventDefault(), y.current?.focus();
21
- },
22
- children: [/* @__PURE__ */ u(i, {
23
- className: "ttw:items-center ttw:text-center ttw:sm:items-center ttw:sm:text-center",
24
- children: [
25
- /* @__PURE__ */ l("div", {
26
- className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive/10",
27
- "aria-hidden": !0,
28
- children: /* @__PURE__ */ l(d, { className: "ttw:size-6 ttw:text-destructive" })
29
- }),
30
- /* @__PURE__ */ l(a, { children: v.title }),
31
- /* @__PURE__ */ u(n, { children: [
32
- v.descriptionBeforeEmphasis,
33
- /* @__PURE__ */ l("strong", {
34
- className: "ttw:font-semibold ttw:text-foreground",
35
- children: v.descriptionEmphasis
36
- }),
37
- v.descriptionAfterEmphasis
38
- ] })
39
- ]
40
- }), /* @__PURE__ */ u(r, {
41
- className: "ttw:sm:justify-center",
42
- children: [/* @__PURE__ */ l(o, {
43
- ref: y,
44
- type: "button",
45
- variant: "outline",
46
- onClick: m,
47
- disabled: h,
48
- "data-testid": _?.cancel,
49
- children: v.keepEditingButton
50
- }), /* @__PURE__ */ l(o, {
51
- type: "button",
52
- variant: "destructive",
53
- loading: h,
54
- disabled: h,
55
- onClick: p,
56
- "data-testid": _?.confirm,
57
- children: v.deleteButton
58
- })]
59
- })]
60
- })
61
- });
62
- }
63
- //#endregion
64
- export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };