@tesouro/embedded-components-react 0.3.49 → 0.3.51

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 (144) hide show
  1. package/dist/index.css +8 -2
  2. package/dist/index.js +2 -2
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/lib/LinkedAccountsWidget.js +1 -1
  5. package/dist/libs/shared/util-validation/dist/{index22.js → index23.js} +1 -1
  6. package/dist/libs/shared/util-validation/dist/index7.js +6 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
  132. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index8.js +95 -94
  133. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index.js +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js +45 -0
  135. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index7.js +18 -55
  136. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +46 -265
  137. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +273 -34
  138. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +1 -1
  139. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
  140. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
  141. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  142. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
  143. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  144. package/package.json +1 -1
@@ -1,2 +1,47 @@
1
- import "./index95.js";
2
- import "./index96.js";
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 { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index96.js";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js
5
+ function u({ open: u, onSaveDraft: d, onDiscard: f, onCancel: p, isSaving: m, isSaveDraftDisabled: h, labels: g, testId: _, saveDraftTestId: v, discardTestId: y }) {
6
+ let b = {
7
+ ...s,
8
+ ...g
9
+ };
10
+ return /* @__PURE__ */ c(e, {
11
+ open: u,
12
+ onOpenChange: (e) => {
13
+ !e && !m && p();
14
+ },
15
+ children: /* @__PURE__ */ l(t, {
16
+ "data-testid": _,
17
+ children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: b.title }), /* @__PURE__ */ c(n, { children: b.description })] }), /* @__PURE__ */ l(r, { children: [
18
+ /* @__PURE__ */ c(o, {
19
+ type: "button",
20
+ variant: "outline",
21
+ onClick: p,
22
+ disabled: m,
23
+ children: b.cancelButton
24
+ }),
25
+ /* @__PURE__ */ c(o, {
26
+ type: "button",
27
+ variant: "outline",
28
+ onClick: f,
29
+ disabled: m,
30
+ "data-testid": y,
31
+ children: b.discardButton
32
+ }),
33
+ /* @__PURE__ */ c(o, {
34
+ type: "button",
35
+ variant: "default",
36
+ loading: m,
37
+ disabled: m || h,
38
+ onClick: d,
39
+ "data-testid": v,
40
+ children: b.saveDraftButton
41
+ })
42
+ ] })]
43
+ })
44
+ });
45
+ }
46
+ //#endregion
47
+ export { u as UnsavedBillDialog, u as default };
@@ -0,0 +1,2 @@
1
+ import "./index96.js";
2
+ import "./index97.js";
@@ -15,32 +15,33 @@ import { WidgetProvider as s } from "../../../shared/feature/dist/lib/WidgetProv
15
15
  import { getStateOptions as ee } from "../../../shared/util/dist/lib/usStates.js";
16
16
  import { useWidgetConfig as te } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
17
17
  import "../../../shared/feature/dist/index.js";
18
+ import { filterUsersForOrganization as ne } from "../../../../shared/util-validation/dist/index7.js";
18
19
  import { CREATE_CARD_WIDGET_LABELS_EN as c } from "../../ui/dist/lib/CreateCardWidget/labels.js";
19
20
  import { CreateCardView as l, MailingOptionValue as u } from "../../ui/dist/lib/CreateCardWidget/types.js";
20
- import { CreateCardWidget as ne } from "../../ui/dist/lib/CreateCardWidget/CreateCardWidget.js";
21
+ import { CreateCardWidget as re } from "../../ui/dist/lib/CreateCardWidget/CreateCardWidget.js";
21
22
  import "../../ui/dist/index.js";
22
- import { CardFormatValue as d, buildCreateDebitCardRequest as re, createDebitCardReference as ie, formatBusinessAddress as ae, isBusinessAddressComplete as oe, isManualAddressComplete as se } from "./index3.js";
23
- import { resolveCreateCardFeatureLabels as ce } from "./index5.js";
24
- import { CreateCardWidgetAnalyticsEvent as le, WIDGET_NAME as ue } from "./index2.js";
25
- import { SpendLimitPeriodValue as f, buildPerTransactionMaximumVelocityControlRequest as de, buildSpendLimitVelocityControlRequest as fe, parseControlAmountToMinorUnits as pe } from "./index4.js";
26
- import { getCreateCardPermissions as me } from "./index6.js";
27
- import { useCreateCardCardholderOptions as he } from "./index7.js";
28
- import { useCreateCard as ge } from "../../data-access/dist/index2.js";
29
- import { useCreateDebitCardMutation as _e } from "../../data-access/dist/index4.js";
30
- import { useCreateVelocityControlMutation as ve } from "../../data-access/dist/index5.js";
31
- import { useManageDebitCardAccessMutation as ye } from "../../data-access/dist/index6.js";
32
- import { useCreateCardOrganizationQuery as be } from "../../data-access/dist/index7.js";
23
+ import { CardFormatValue as d, buildCreateDebitCardRequest as ie, createDebitCardReference as ae, formatBusinessAddress as oe, isBusinessAddressComplete as se, isManualAddressComplete as ce } from "./index3.js";
24
+ import { resolveCreateCardFeatureLabels as le } from "./index5.js";
25
+ import { CreateCardWidgetAnalyticsEvent as ue, WIDGET_NAME as de } from "./index2.js";
26
+ import { SpendLimitPeriodValue as f, buildPerTransactionMaximumVelocityControlRequest as fe, buildSpendLimitVelocityControlRequest as pe, parseControlAmountToMinorUnits as me } from "./index4.js";
27
+ import { getCreateCardPermissions as he } from "./index6.js";
28
+ import { useCreateCardCardholderOptions as ge } from "./index7.js";
29
+ import { useCreateCard as _e } from "../../data-access/dist/index2.js";
30
+ import { useCreateDebitCardMutation as ve } from "../../data-access/dist/index4.js";
31
+ import { useCreateVelocityControlMutation as ye } from "../../data-access/dist/index5.js";
32
+ import { useManageDebitCardAccessMutation as be } from "../../data-access/dist/index6.js";
33
+ import { useCreateCardOrganizationQuery as xe } from "../../data-access/dist/index7.js";
33
34
  import "../../data-access/dist/index.js";
34
35
  import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
35
- import { Fragment as xe, jsx as _, jsxs as Se } from "react/jsx-runtime";
36
+ import { Fragment as Se, jsx as _, jsxs as Ce } from "react/jsx-runtime";
36
37
  //#region ../../libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index8.js
37
- var Ce = t.DebitCardIssueOrg, we = {
38
+ var we = t.DebitCardIssueOrg, Te = {
38
39
  street: "",
39
40
  city: "",
40
41
  state: "",
41
42
  zip: ""
42
- }, Te = 3e3, v = 5e3;
43
- function Ee(e, t) {
43
+ }, Ee = 3e3, v = 5e3;
44
+ function De(e, t) {
44
45
  if (e === "PENDING_ACTIVATION") return {
45
46
  title: t.success.pendingActivationTitle,
46
47
  description: t.success.pendingActivationDescription
@@ -50,49 +51,49 @@ function Ee(e, t) {
50
51
  description: t.success.createdDescription
51
52
  };
52
53
  }
53
- function De(e) {
54
+ function Oe(e) {
54
55
  let t = e?.trim().slice(-4);
55
56
  return t ? `••••${t}` : void 0;
56
57
  }
57
- function Oe(e, t) {
58
- let n = e.nickname?.trim(), r = De(e.accountNumber);
58
+ function ke(e, t) {
59
+ let n = e.nickname?.trim(), r = Oe(e.accountNumber);
59
60
  return n && r ? `${n} (${r})` : n || r || t;
60
61
  }
61
- function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose: y, onCancel: ke, onViewCard: Ae }) {
62
- let je = o(), { isReady: b } = ge(), { initResponse: Me, organizationId: x } = te(), S = m(() => me(Me?.scopes), [Me?.scopes]), C = ce(ue), w = {
62
+ function y({ cardArtSrc: t, labels: s, featureLabels: de, className: Oe, onClose: y, onCancel: Ae, onViewCard: je }) {
63
+ let Me = o(), { isReady: b } = _e(), { initResponse: Ne, organizationId: x } = te(), S = m(() => he(Ne?.scopes), [Ne?.scopes]), C = le(de), w = {
63
64
  ...c,
64
65
  ...s,
65
66
  setup: {
66
67
  ...c.setup,
67
68
  ...s?.setup
68
69
  }
69
- }, Ne = m(() => [{
70
+ }, Pe = m(() => [{
70
71
  value: d.Virtual,
71
72
  label: w.setup.cardFormatVirtual
72
73
  }, {
73
74
  value: d.Physical,
74
75
  label: w.setup.cardFormatPhysical
75
- }], [w.setup.cardFormatPhysical, w.setup.cardFormatVirtual]), Pe = m(() => ee(), []), [Fe, T] = g(l.Setup), [E, Ie] = g(null), [D, Le] = g(null), [Re, ze] = g(null), [O, k] = g(null), [A, Be] = g(we), [Ve, He] = g(null), [Ue, We] = g(null), [j, M] = g(!1), [N, P] = g(""), [F, I] = g(null), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(!1), [U, W] = g([]), Ge = () => {
76
- Ie(null), Le(null), ze(null), k(null), Be(we), He(null), We(null), M(!1), P(""), I(null), R(!1), B(""), H(!1), W([]), T(l.Setup);
77
- }, Ke = h(x);
78
- x && x !== Ke.current && (Ke.current = x, Ge());
76
+ }], [w.setup.cardFormatPhysical, w.setup.cardFormatVirtual]), Fe = m(() => ee(), []), [Ie, T] = g(l.Setup), [E, Le] = g(null), [D, Re] = g(null), [ze, Be] = g(null), [O, k] = g(null), [A, Ve] = g(Te), [He, Ue] = g(null), [We, Ge] = g(null), [j, M] = g(!1), [N, P] = g(""), [F, I] = g(null), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(!1), [U, W] = g([]), Ke = () => {
77
+ Le(null), Re(null), Be(null), k(null), Ve(Te), Ue(null), Ge(null), M(!1), P(""), I(null), R(!1), B(""), H(!1), W([]), T(l.Setup);
78
+ }, qe = h(x);
79
+ x && x !== qe.current && (qe.current = x, Ke());
79
80
  let G = h(!0);
80
81
  p(() => (G.current = !0, () => {
81
82
  G.current = !1;
82
83
  }), []), p(() => {
83
- je(le.Mounted);
84
- }, [je]);
85
- let { options: qe, isError: K, refetch: Je } = he({ enabled: b && S.canReadUsers }), q = i({
84
+ Me(ue.Mounted);
85
+ }, [Me]);
86
+ let { options: Je, isError: K, refetch: Ye } = ge({ enabled: b && S.canReadUsers }), q = i({
86
87
  enabled: b && S.canReadUsers,
87
- permissions: [Ce]
88
- }), Ye = m(() => !b || !S.canReadUsers || q.isResolving || q.isError ? [] : (q.data?.data ?? []).filter((e) => e.organizationId === x).map((e) => e.id), [
88
+ permissions: [we]
89
+ }), Xe = m(() => !b || !S.canReadUsers || q.isResolving || q.isError ? [] : ne(q.data?.data ?? [], x).map((e) => e.id), [
89
90
  q.data?.data,
90
91
  q.isError,
91
92
  q.isResolving,
92
93
  b,
93
94
  x,
94
95
  S.canReadUsers
95
- ]), J = !!q.isError && b && S.canReadUsers, Xe = b && S.canReadUsers && q.isResolving, Y = h(null);
96
+ ]), J = !!q.isError && b && S.canReadUsers, Ze = b && S.canReadUsers && q.isResolving, Y = h(null);
96
97
  p(() => {
97
98
  if (!J) {
98
99
  Y.current !== null && (e.dismiss(Y.current), Y.current = null);
@@ -115,17 +116,17 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
115
116
  C.toast.retry,
116
117
  J
117
118
  ]);
118
- let Ze = be({ enabled: b && S.canReadOrganization }), X = n({ enabled: b && S.canReadFundingAccounts }), Qe = r({ enabled: b && S.canReadMerchantCategoryGroups }), $e = _e(), et = ve(), tt = ye(), Z = !!X.isError && b && S.canReadFundingAccounts, Q = m(() => Z ? [] : (X.data?.data ?? []).map((e) => ({
119
+ let Qe = xe({ enabled: b && S.canReadOrganization }), X = n({ enabled: b && S.canReadFundingAccounts }), $e = r({ enabled: b && S.canReadMerchantCategoryGroups }), et = ve(), tt = ye(), nt = be(), Z = !!X.isError && b && S.canReadFundingAccounts, Q = m(() => Z ? [] : (X.data?.data ?? []).map((e) => ({
119
120
  value: e.id,
120
- label: Oe(e, C.untitledFundingAccount)
121
+ label: ke(e, C.untitledFundingAccount)
121
122
  })), [
122
123
  X.data?.data,
123
124
  C.untitledFundingAccount,
124
125
  Z
125
- ]), nt = m(() => (Qe.data?.data ?? []).map((e) => ({
126
+ ]), $ = m(() => ($e.data?.data ?? []).map((e) => ({
126
127
  value: e.id,
127
128
  label: e.name
128
- })), [Qe.data?.data]), rt = Re ?? (Q.length === 1 ? Q[0].value : null), it = Ze.data?.address, at = ae(it), ot = oe(it), $ = D === d.Physical, st = $ && O === u.BusinessAddress && !!at, ct = $ && O === u.DifferentAddress, lt = Z || Q.length > 0, ut = b && S.canWriteAuthorizationControls, dt = m(() => [
129
+ })), [$e.data?.data]), rt = ze ?? (Q.length === 1 ? Q[0].value : null), it = Qe.data?.address, at = oe(it), ot = se(it), st = D === d.Physical, ct = st && O === u.BusinessAddress && !!at, lt = st && O === u.DifferentAddress, ut = Z || Q.length > 0, dt = b && S.canWriteAuthorizationControls, ft = m(() => [
129
130
  {
130
131
  value: f.OneTime,
131
132
  label: C.spendLimit.periodOneTime
@@ -142,7 +143,7 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
142
143
  C.spendLimit.periodDaily,
143
144
  C.spendLimit.periodMonthly,
144
145
  C.spendLimit.periodOneTime
145
- ]), ft = m(() => [
146
+ ]), pt = m(() => [
146
147
  {
147
148
  value: f.OneTime,
148
149
  variant: "warning",
@@ -164,45 +165,45 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
164
165
  C.spendLimit.monthlyResetNotice,
165
166
  C.spendLimit.oneTimeWarningDescription,
166
167
  C.spendLimit.oneTimeWarningTitle
167
- ]), pt = j && (pe(N) === null || F === null), mt = L && pe(z) === null, ht = V && U.length === 0, gt = nt.length === 0 && !V;
168
- ut || (j && M(!1), N !== "" && P(""), F !== null && I(null), L && R(!1), z !== "" && B(""), V && H(!1), U.length > 0 && W([]));
169
- let _t = m(() => ({
168
+ ]), mt = j && (me(N) === null || F === null), ht = L && me(z) === null, gt = V && U.length === 0, _t = $.length === 0 && !V;
169
+ dt || (j && M(!1), N !== "" && P(""), F !== null && I(null), L && R(!1), z !== "" && B(""), V && H(!1), U.length > 0 && W([]));
170
+ let vt = m(() => ({
170
171
  isSpendLimitEnabled: j,
171
172
  onSpendLimitEnabledChange: (e) => {
172
173
  M(e), e && I((e) => e ?? f.Monthly);
173
174
  },
174
175
  spendLimitAmount: N,
175
176
  onSpendLimitAmountChange: P,
176
- spendLimitPeriodOptions: dt,
177
+ spendLimitPeriodOptions: ft,
177
178
  selectedSpendLimitPeriod: F,
178
179
  onSpendLimitPeriodSelect: I,
179
- spendLimitPeriodNotices: ft,
180
+ spendLimitPeriodNotices: pt,
180
181
  isMerchantCategoriesEnabled: V,
181
182
  onMerchantCategoriesEnabledChange: H,
182
- merchantCategoryOptions: nt,
183
+ merchantCategoryOptions: $,
183
184
  selectedMerchantCategories: U,
184
185
  onMerchantCategoryToggle: (e) => {
185
186
  W((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
186
187
  },
187
- isMerchantCategoriesToggleDisabled: gt,
188
+ isMerchantCategoriesToggleDisabled: _t,
188
189
  isPerTransactionMaximumEnabled: L,
189
190
  onPerTransactionMaximumEnabledChange: R,
190
191
  perTransactionMaximumAmount: z,
191
192
  onPerTransactionMaximumAmountChange: B
192
193
  }), [
193
194
  V,
194
- gt,
195
+ _t,
195
196
  L,
196
197
  j,
197
- nt,
198
+ $,
198
199
  z,
199
200
  U,
200
201
  F,
201
202
  N,
202
- ft,
203
- dt
204
- ]), vt = !b || !S.canIssue || $e.isPending || et.isPending || tt.isPending || K || Z || J || Xe || !E || !D || !rt || pt || mt || ht || D === d.Physical && (!O || O === u.BusinessAddress && !ot || O === u.DifferentAddress && !se(A)), yt = m(() => {
205
- let e = Ee(Ue, C);
203
+ pt,
204
+ ft
205
+ ]), yt = !b || !S.canIssue || et.isPending || tt.isPending || nt.isPending || K || Z || J || Ze || !E || !D || !rt || mt || ht || gt || D === d.Physical && (!O || O === u.BusinessAddress && !ot || O === u.DifferentAddress && !ce(A)), bt = m(() => {
206
+ let e = De(We, C);
206
207
  return {
207
208
  ...s,
208
209
  success: {
@@ -211,12 +212,12 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
211
212
  }
212
213
  };
213
214
  }, [
214
- Ue,
215
+ We,
215
216
  C,
216
217
  s
217
- ]), bt = async () => {
218
+ ]), xt = async () => {
218
219
  if (!b) return;
219
- let t = ie(), n = re({
220
+ let t = ae(), n = ie({
220
221
  cardholderUserId: E,
221
222
  format: D,
222
223
  bankAccountId: rt,
@@ -229,15 +230,15 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
229
230
  T(l.Preparing);
230
231
  let r = e.loading(C.toast.creating);
231
232
  try {
232
- let t = await $e.mutateAsync({ body: n });
233
+ let t = await et.mutateAsync({ body: n });
233
234
  if (!G.current) {
234
235
  e.dismiss(r);
235
236
  return;
236
237
  }
237
- He(t.id), We(t.cardStatus);
238
+ Ue(t.id), Ge(t.cardStatus);
238
239
  let i = [];
239
240
  if (j) {
240
- let e = fe({
241
+ let e = pe({
241
242
  cardId: t.id,
242
243
  amount: N,
243
244
  period: F,
@@ -247,7 +248,7 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
247
248
  e && i.push(e);
248
249
  }
249
250
  if (L) {
250
- let e = de({
251
+ let e = fe({
251
252
  cardId: t.id,
252
253
  amount: z,
253
254
  id: crypto.randomUUID(),
@@ -257,7 +258,7 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
257
258
  }
258
259
  let a = !1;
259
260
  if (i.length > 0) try {
260
- await Promise.all(i.map((e) => et.mutateAsync({ body: e })));
261
+ await Promise.all(i.map((e) => tt.mutateAsync({ body: e })));
261
262
  } catch {
262
263
  a = !0;
263
264
  }
@@ -266,11 +267,11 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
266
267
  return;
267
268
  }
268
269
  let o = !1;
269
- if (Ye.length > 0) try {
270
- await tt.mutateAsync({ body: {
270
+ if (Xe.length > 0) try {
271
+ await nt.mutateAsync({ body: {
271
272
  debitCardIds: [t.id],
272
273
  type: "GRANT",
273
- userIds: Ye
274
+ userIds: Xe
274
275
  } });
275
276
  } catch {
276
277
  o = !0;
@@ -302,7 +303,7 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
302
303
  }
303
304
  e.success(C.toast.success, {
304
305
  id: r,
305
- duration: Te
306
+ duration: Ee
306
307
  });
307
308
  } catch {
308
309
  if (!G.current) {
@@ -315,60 +316,60 @@ function y({ cardArtSrc: t, labels: s, featureLabels: ue, className: De, onClose
315
316
  });
316
317
  }
317
318
  };
318
- return /* @__PURE__ */ Se(xe, { children: [/* @__PURE__ */ _(a, {}), /* @__PURE__ */ _(ne, {
319
- view: Fe,
319
+ return /* @__PURE__ */ Ce(Se, { children: [/* @__PURE__ */ _(a, {}), /* @__PURE__ */ _(re, {
320
+ view: Ie,
320
321
  cardArtSrc: t,
321
- labels: yt,
322
- className: De,
323
- cardholderOptions: qe,
322
+ labels: bt,
323
+ className: Oe,
324
+ cardholderOptions: Je,
324
325
  selectedCardholder: E,
325
- onCardholderSelect: Ie,
326
+ onCardholderSelect: Le,
326
327
  isCardholderError: K,
327
- onCardholderRetry: K ? Je : void 0,
328
- cardFormatOptions: Ne,
328
+ onCardholderRetry: K ? Ye : void 0,
329
+ cardFormatOptions: Pe,
329
330
  selectedCardFormat: D,
330
331
  onCardFormatSelect: (e) => {
331
- Le(e), k(null);
332
+ Re(e), k(null);
332
333
  },
333
- isFundingAccountVisible: lt,
334
+ isFundingAccountVisible: ut,
334
335
  fundingAccountOptions: Q,
335
336
  selectedFundingAccount: rt,
336
- onFundingAccountSelect: ze,
337
+ onFundingAccountSelect: Be,
337
338
  isFundingAccountError: Z,
338
339
  onFundingAccountRetry: Z ? () => {
339
340
  X.refetch();
340
341
  } : void 0,
341
- isMailingSectionVisible: $,
342
+ isMailingSectionVisible: st,
342
343
  selectedMailingOption: O,
343
344
  onMailingOptionSelect: k,
344
345
  businessAddress: at,
345
- isBusinessAddressVisible: st,
346
- isManualAddressVisible: ct,
346
+ isBusinessAddressVisible: ct,
347
+ isManualAddressVisible: lt,
347
348
  manualAddress: A,
348
- onManualAddressChange: (e) => Be((t) => ({
349
+ onManualAddressChange: (e) => Ve((t) => ({
349
350
  ...t,
350
351
  ...e
351
352
  })),
352
- stateOptions: Pe,
353
- isCardControlsSectionVisible: ut,
354
- cardControls: _t,
355
- isCreateDisabled: vt,
353
+ stateOptions: Fe,
354
+ isCardControlsSectionVisible: dt,
355
+ cardControls: vt,
356
+ isCreateDisabled: yt,
356
357
  onCreateClick: () => {
357
- bt();
358
+ xt();
358
359
  },
359
360
  onCancelClick: () => {
360
- ke?.(), y?.();
361
+ Ae?.(), y?.();
361
362
  },
362
363
  onClose: y,
363
- onCreateAnotherClick: Ge,
364
- onViewCardClick: Ae && Ve ? () => {
365
- Ae(Ve);
364
+ onCreateAnotherClick: Ke,
365
+ onViewCardClick: je && He ? () => {
366
+ je(He);
366
367
  } : void 0
367
368
  })] });
368
369
  }
369
- function ke({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: ee, errorFallback: te, onError: c, analytics: l, disclosuresAcceptance: u, providerLabels: ne, ...d }) {
370
+ function Ae({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: ee, errorFallback: te, onError: ne, analytics: c, disclosuresAcceptance: l, providerLabels: u, ...re }) {
370
371
  return /* @__PURE__ */ _(s, {
371
- widgetName: ue,
372
+ widgetName: de,
372
373
  baseUrl: e,
373
374
  widgetToken: t,
374
375
  organizationId: n,
@@ -378,12 +379,12 @@ function ke({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, ga
378
379
  implementation: o,
379
380
  uiFramework: ee,
380
381
  errorFallback: te,
381
- onError: c,
382
- analytics: l,
383
- disclosuresAcceptance: u,
384
- providerLabels: ne,
385
- children: /* @__PURE__ */ _(y, { ...d })
382
+ onError: ne,
383
+ analytics: c,
384
+ disclosuresAcceptance: l,
385
+ providerLabels: u,
386
+ children: /* @__PURE__ */ _(y, { ...re })
386
387
  });
387
388
  }
388
389
  //#endregion
389
- export { ke as CreateCardWidget, Oe as formatFundingAccountLabel };
390
+ export { Ae as CreateCardWidget, ke as formatFundingAccountLabel };
@@ -1,3 +1,3 @@
1
1
  import "./index4.js";
2
- import { LinkedAccountsWidget as e } from "./index9.js";
2
+ import { LinkedAccountsWidget as e } from "./index10.js";
3
3
  export { e as LinkedAccountsWidget };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { EmbeddedToaster as e } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
6
+ import "../../../shared/ui/dist/index.js";
7
+ import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
8
+ import "../../../shared/feature/dist/index.js";
9
+ import { WIDGET_NAME as n } from "./index2.js";
10
+ import { LinkedAccountsWidgetUi as r } from "../../ui/dist/index16.js";
11
+ import "../../ui/dist/index.js";
12
+ import { useLinkedAccountsWidget as i } from "./index9.js";
13
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
14
+ //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js
15
+ function c({ labels: t, featureLabels: n }) {
16
+ let c = i({
17
+ labels: t,
18
+ featureLabels: n
19
+ });
20
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(e, {}), /* @__PURE__ */ o(r, {
21
+ labels: t,
22
+ ...c
23
+ })] });
24
+ }
25
+ function l({ baseUrl: e, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: s, linkComponent: l, implementation: u, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
26
+ return /* @__PURE__ */ o(t, {
27
+ widgetName: n,
28
+ baseUrl: e,
29
+ widgetToken: r,
30
+ organizationId: i,
31
+ configClient: a,
32
+ gatewayRouting: s,
33
+ linkComponent: l,
34
+ implementation: u,
35
+ uiFramework: d,
36
+ errorFallback: f,
37
+ onError: p,
38
+ analytics: m,
39
+ disclosuresAcceptance: h,
40
+ providerLabels: g,
41
+ children: /* @__PURE__ */ o(c, { ..._ })
42
+ });
43
+ }
44
+ //#endregion
45
+ export { l as LinkedAccountsWidget, l as default };
@@ -1,59 +1,22 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useAllOrganizationUsersQuery as e } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
6
+ import { filterUsersForOrganization as t } from "../../../../shared/util-validation/dist/index7.js";
7
+ import "../../data-access/dist/index.js";
8
+ import { useMemo as n } from "react";
1
9
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index7.js
2
- function e(e) {
3
- return e.filter((e) => {
4
- let t = e.status?.toUpperCase() ?? "";
5
- return !!e.key.trim() && (t === "ACTIVE" || t === "");
6
- }).map((e) => ({
7
- key: e.key.trim(),
8
- name: e.name,
9
- description: e.description?.trim() || e.name
10
- }));
11
- }
12
- function t(e, t) {
13
- let n = t?.trim() ?? "";
14
- if (!n) return;
15
- let r = n.toLowerCase(), i = e.find((e) => e.key.toLowerCase() === r);
16
- if (i) return i.key;
17
- let a = e.find((e) => e.name.toLowerCase() === r);
18
- if (a) return a.key;
19
- }
20
- function n(e, n) {
21
- let r = t(e, n);
22
- if (r) return e.find((e) => e.key.toLowerCase() === r.toLowerCase())?.name;
23
- }
24
- function r(e, n) {
25
- let r = t(e, n);
26
- if (r) return e.find((e) => e.key.toLowerCase() === r.toLowerCase())?.description;
27
- }
28
- function i(e) {
29
- let t = e?.trim().toLowerCase() ?? "", n = t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
30
- return n === "admin" || n === "administrator";
31
- }
32
- function a(e) {
33
- return e.trim() ? e.split("_").filter(Boolean).map((e) => e.length <= 3 && e === e.toUpperCase() ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ") : "";
34
- }
35
- function o(e, o) {
36
- return e.map((e) => {
37
- let s = e.role ?? "", c = t(o, s) || s.trim(), l = n(o, s) || a(c), u = r(o, s) ?? "";
38
- return {
39
- id: e.id,
40
- name: e.name,
41
- role: l,
42
- roleDescription: u,
43
- locked: i(c) || i(s)
44
- };
10
+ function r({ enabled: r, permissionKey: i, organizationId: a }) {
11
+ let o = e({
12
+ enabled: r,
13
+ permissions: [i]
45
14
  });
46
- }
47
- function s(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggle: i }) {
48
- return e.map((e) => ({
49
- key: e.id,
50
- name: e.name,
51
- role: e.role,
52
- roleTooltip: e.roleDescription || r,
53
- checked: e.locked || t.includes(e.id),
54
- disabled: n || e.locked,
55
- onToggle: (t) => i(e.id, t)
56
- }));
15
+ return {
16
+ userIds: n(() => new Set(t(o.data?.data ?? [], a).map((e) => e.id)), [o.data?.data, a]),
17
+ isResolving: o.isResolving,
18
+ isError: o.isError
19
+ };
57
20
  }
58
21
  //#endregion
59
- export { i as isAdminRoleKey, r as resolveOrganizationRoleDescription, n as resolveOrganizationRoleDisplayName, t as resolveOrganizationRoleKey, s as toAccessRows, e as toOrganizationRoleOptions, o as toTeamMembers };
22
+ export { r as useAdminEligibleUserIds };