@tesouro/embedded-components-react 0.5.225 → 0.5.227

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 (142) hide show
  1. package/README.md +21 -21
  2. package/dist/index.d.ts +23 -2
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +23 -2
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +41 -39
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
  31. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
  32. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
  33. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
  34. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
  40. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
  46. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
  48. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
  49. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
  50. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
  51. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +50 -36
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +51 -32
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +20 -1
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +17 -202
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +220 -31
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +32 -145
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -44
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +145 -117
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +46 -58
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +113 -87
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +58 -116
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +98 -225
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +111 -27
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +225 -462
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +34 -41
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +627 -34
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +39 -77
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -112
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +75 -310
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +124 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +324 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +20 -15
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +56 -53
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +33 -29
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +184 -162
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +1 -3
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +78 -69
  84. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
  85. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
  86. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
  87. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
  88. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
  89. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
  90. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
  92. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
  93. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
  94. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
  97. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
  98. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
  99. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
  100. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
  101. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +7 -6
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +20 -19
  107. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -39
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
  114. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
  116. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
  117. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
  118. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
  119. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +210 -199
  120. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +60 -52
  121. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
  122. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
  123. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
  124. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
  125. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
  126. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
  127. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
  129. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
  130. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
  131. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
  132. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
  133. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +2 -2
  136. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
  137. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
  138. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
  139. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
  141. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
  142. package/package.json +1 -1
@@ -6,58 +6,58 @@ import { diffMemberSelection as e, formatMembersCount as t } from "./index4.js";
6
6
  import { useEffect as n, useRef as r, useState as i } from "react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js
8
8
  function a(a) {
9
- let { canRead: o, canWrite: s, directory: c, directoryReady: l, assignedAvatarsByGroupId: u, useListQuery: d, useEditMembers: f, useMutations: p, panelLabels: m, drawerLabels: h, countLabels: g, saveFailedMessage: _, deleteFailedMessage: v } = a, y = d(), b = p(), [x, S] = i("closed"), [C, w] = i(), [T, E] = i(""), [D, O] = i(""), [k, A] = i([]), [j, M] = i(), [N, P] = i(), [F, I] = i(), L = f(x === "edit" ? C : void 0), R = (L.data?.members?.data ?? []).map((e) => e.id), z = o ? y.data?.data ?? [] : [], B = l && (x !== "edit" || !!L.data), V = r(void 0);
9
+ let { canRead: o, canWrite: s, directory: c, directoryReady: l, assignedAvatarsByGroupId: u, useListQuery: d, useEditMembers: f, useMutations: p, panelLabels: m, drawerLabels: h, countLabels: g, saveFailedMessage: _, deleteFailedMessage: v } = a, y = d(), b = p(), x = s && !y.isPlaceholderData, [S, C] = i("closed"), [w, T] = i(), [E, D] = i(""), [O, k] = i(""), [A, j] = i([]), [M, N] = i(), [P, F] = i(), [I, L] = i(), R = f(S === "edit" ? w : void 0), z = (R.data?.members?.data ?? []).map((e) => e.id), B = o ? y.data?.data ?? [] : [], V = l && (S !== "edit" || !!R.data), H = r(void 0);
10
10
  n(() => {
11
- x === "edit" && C && V.current !== C && L.data && l && (V.current = C, A(R.map((e) => c.idToOption.get(e)).filter((e) => !!e)));
11
+ S === "edit" && w && H.current !== w && R.data && l && (H.current = w, j(z.map((e) => c.idToOption.get(e)).filter((e) => !!e)));
12
12
  }, [
13
- x,
14
- C,
15
- L.data,
13
+ S,
14
+ w,
15
+ R.data,
16
16
  l,
17
- R,
17
+ z,
18
18
  c
19
19
  ]);
20
- let H = () => {
21
- S("closed"), w(void 0), E(""), O(""), A([]), M(void 0), V.current = void 0;
22
- }, U = () => {
23
- H(), S("create");
24
- }, W = (e) => {
25
- let t = z.find((t) => t.id === e);
26
- S("edit"), w(e), E(t?.name ?? ""), O(t?.name ?? ""), A([]), M(void 0), V.current = void 0;
27
- }, G = () => k.map((e) => c.optionToId.get(e)).filter((e) => !!e), K = async () => {
28
- let t = T.trim();
29
- if (t && B) {
30
- M(void 0);
20
+ let U = () => {
21
+ C("closed"), T(void 0), D(""), k(""), j([]), N(void 0), H.current = void 0;
22
+ }, W = () => {
23
+ U(), C("create");
24
+ }, G = (e) => {
25
+ let t = B.find((t) => t.id === e);
26
+ C("edit"), T(e), D(t?.name ?? ""), k(t?.name ?? ""), j([]), N(void 0), H.current = void 0;
27
+ }, K = () => A.map((e) => c.optionToId.get(e)).filter((e) => !!e), q = async () => {
28
+ let t = E.trim();
29
+ if (t && V) {
30
+ N(void 0);
31
31
  try {
32
- if (x === "create") {
32
+ if (S === "create") {
33
33
  let e = await b.create(t);
34
- S("edit"), w(e.id), O(t), V.current = e.id;
35
- let n = G();
34
+ C("edit"), T(e.id), k(t), H.current = e.id;
35
+ let n = K();
36
36
  n.length > 0 && await b.assignMembers(e.id, n);
37
- } else if (x === "edit" && C) {
38
- t !== D.trim() && await b.rename(C, t);
39
- let n = R.filter((e) => c.idToOption.has(e)), { toAssign: r, toRemove: i } = e(n, G());
40
- r.length > 0 && await b.assignMembers(C, r), i.length > 0 && await b.removeMembers(C, i);
37
+ } else if (S === "edit" && w) {
38
+ t !== O.trim() && await b.rename(w, t);
39
+ let n = z.filter((e) => c.idToOption.has(e)), { toAssign: r, toRemove: i } = e(n, K());
40
+ r.length > 0 && await b.assignMembers(w, r), i.length > 0 && await b.removeMembers(w, i);
41
41
  }
42
- H();
42
+ U();
43
43
  } catch {
44
- M(_);
44
+ N(_);
45
45
  }
46
46
  }
47
- }, q = (e) => {
48
- P(e), I(void 0);
49
- }, J = () => {
50
- P(void 0), I(void 0);
51
- }, Y = async () => {
52
- if (N) {
53
- I(void 0);
47
+ }, J = (e) => {
48
+ F(e), L(void 0);
49
+ }, Y = () => {
50
+ F(void 0), L(void 0);
51
+ }, X = async () => {
52
+ if (P) {
53
+ L(void 0);
54
54
  try {
55
- await b.remove(N), J(), C === N && H();
55
+ await b.remove(P), Y(), w === P && U();
56
56
  } catch {
57
- I(v);
57
+ L(v);
58
58
  }
59
59
  }
60
- }, X = z.map((e) => {
60
+ }, Z = B.map((e) => {
61
61
  let n = typeof e.memberCount == "string" ? Number.parseInt(e.memberCount, 10) : e.memberCount ?? 0, r = Number.isNaN(n) ? 0 : n, i = u?.get(e.id), a = i ? Math.max(0, r - i.length) : 0;
62
62
  return {
63
63
  key: e.id,
@@ -65,45 +65,45 @@ function a(a) {
65
65
  membersLabel: t(e.memberCount, g),
66
66
  assignedAvatars: i,
67
67
  assignedOverflowLabel: a > 0 ? `+${a}` : void 0,
68
- onEdit: s ? () => W(e.id) : void 0,
69
- onDelete: s ? () => q(e.id) : void 0
68
+ onEdit: x ? () => G(e.id) : void 0,
69
+ onDelete: x ? () => J(e.id) : void 0
70
70
  };
71
- }), Z = z.find((e) => e.id === N)?.name ?? "";
71
+ }), Q = B.find((e) => e.id === P)?.name ?? "";
72
72
  return {
73
73
  canRead: o,
74
74
  panel: {
75
- rows: X,
76
- isLoading: o && (y.isLoading || y.isComplete === !1),
75
+ rows: Z,
76
+ isLoading: o && (y.isLoading || y.isComplete === !1 && !y.isPlaceholderData),
77
77
  isError: y.isError,
78
- onAddClick: s ? U : void 0,
78
+ onAddClick: x ? W : void 0,
79
79
  labels: m
80
80
  },
81
81
  drawer: {
82
- open: x !== "closed",
83
- isEditMode: x === "edit",
84
- name: T,
85
- onNameChange: E,
82
+ open: S !== "closed",
83
+ isEditMode: S === "edit",
84
+ name: E,
85
+ onNameChange: D,
86
86
  options: c.options,
87
- selectedOptions: k,
88
- onSelectedOptionsChange: (e) => A(Array.isArray(e) ? e : [e]),
89
- isSaveDisabled: !T.trim() || b.isMutating || !B,
90
- submitErrorMessage: j,
87
+ selectedOptions: A,
88
+ onSelectedOptionsChange: (e) => j(Array.isArray(e) ? e : [e]),
89
+ isSaveDisabled: !E.trim() || b.isMutating || !V,
90
+ submitErrorMessage: M,
91
91
  onOpenChange: (e) => {
92
- e || H();
92
+ e || U();
93
93
  },
94
- onSubmit: K,
95
- onDelete: x === "edit" && C ? () => q(C) : void 0,
94
+ onSubmit: q,
95
+ onDelete: S === "edit" && w ? () => J(w) : void 0,
96
96
  labels: h
97
97
  },
98
98
  deleteDialog: {
99
- open: !!N,
100
- subjectName: Z,
99
+ open: !!P,
100
+ subjectName: Q,
101
101
  isConfirming: b.isMutating,
102
- errorMessage: F,
102
+ errorMessage: I,
103
103
  onOpenChange: (e) => {
104
- e || J();
104
+ e || Y();
105
105
  },
106
- onConfirm: Y
106
+ onConfirm: X
107
107
  }
108
108
  };
109
109
  }
@@ -4,21 +4,21 @@
4
4
  "use client";
5
5
  import { getApprovalPolicies as e } from "../../../../data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { deleteApprovalPoliciesIdMutation as t, getApprovalPoliciesOptions as n, patchApprovalPoliciesIdMutation as r, postApprovalPoliciesMutation as i } from "../../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { authEpochPlaceholder as a, withAuthEpoch as o } from "../../../../data-access/dist/lib/withAuthEpoch.js";
8
- import { invalidateAllClients as s, setAllClientsQueriesData as c } from "../../../../data-access/dist/lib/clientRegistry.js";
9
- import { useEmbedApi as l } from "../../../../data-access/dist/lib/EmbedApiContext.js";
10
- import { getAllPagesNextPaginationTokenParam as u, isAllPagesResolving as d, useAutoFetchNextPage as f } from "../../../../data-access/dist/lib/allPages.js";
7
+ import { withAuthEpochInfinite as a } from "../../../../data-access/dist/lib/withAuthEpoch.js";
8
+ import { invalidateAllClients as o, setAllClientsQueriesData as s } from "../../../../data-access/dist/lib/clientRegistry.js";
9
+ import { useEmbedApi as c } from "../../../../data-access/dist/lib/EmbedApiContext.js";
10
+ import { getAllPagesNextPaginationTokenParam as l, isAllPagesResolving as u, useAutoFetchNextPage as d } from "../../../../data-access/dist/lib/allPages.js";
11
11
  import "../../../../data-access/dist/index.js";
12
- import { ApprovalPolicyObjectType as p, approvalPoliciesInvalidationKey as m } from "./queryKeys.js";
13
- import { useMemo as h } from "react";
14
- import { useInfiniteQuery as g, useMutation as _, useQueryClient as v } from "@tanstack/react-query";
12
+ import { ApprovalPolicyObjectType as f, approvalPoliciesInvalidationKey as p } from "./queryKeys.js";
13
+ import { useMemo as m } from "react";
14
+ import { useInfiniteQuery as h, useMutation as g, useQueryClient as _ } from "@tanstack/react-query";
15
15
  //#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js
16
- var y = 100;
17
- function b(e, t, n) {
16
+ var v = 100;
17
+ function y(e, t, n) {
18
18
  let r = (e) => e && n(e);
19
- e.setQueriesData({ queryKey: t }, r), c(t, r);
19
+ e.setQueriesData({ queryKey: t }, r), s(t, r);
20
20
  }
21
- function x(e, t) {
21
+ function b(e, t) {
22
22
  return {
23
23
  ...e,
24
24
  pages: e.pages.map((e) => ({
@@ -27,56 +27,55 @@ function x(e, t) {
27
27
  }))
28
28
  };
29
29
  }
30
- function S({ objectType: t = p.Payable, enabled: r = !0 } = {}) {
31
- let { client: i, organizationId: s, widgetToken: c, authEpoch: m, organizationPending: _ } = l(), v = s, b = !!(v && c) && r, x = { "x-organization-id": v ?? "" }, S = { object_type: t }, C = n({
30
+ function x({ objectType: t = f.Payable, enabled: r = !0 } = {}) {
31
+ let { client: i, organizationId: o, widgetToken: s, authEpoch: p, organizationStatus: g } = c(), _ = o, y = !!(_ && s) && r, b = { "x-organization-id": _ ?? "" }, x = { object_type: t }, S = n({
32
32
  client: i,
33
- headers: x,
34
- query: S
35
- }), w = g({
36
- queryKey: [...o(C, {
37
- authEpoch: m,
38
- organizationPending: _
39
- }).queryKey, "all"],
40
- placeholderData: a(C.queryKey, _),
41
- enabled: b,
33
+ headers: b,
34
+ query: x
35
+ }), C = h({
36
+ ...a(S.queryKey, {
37
+ authEpoch: p,
38
+ organizationStatus: g
39
+ }, { suffix: ["all"] }),
40
+ enabled: y,
42
41
  initialPageParam: void 0,
43
42
  queryFn: async ({ signal: t, pageParam: n }) => {
44
43
  let { data: r } = await e({
45
44
  client: i,
46
- headers: x,
45
+ headers: b,
47
46
  query: n ? { pagination_token: n } : {
48
- ...S,
49
- limit: y
47
+ ...x,
48
+ limit: v
50
49
  },
51
50
  signal: t,
52
51
  throwOnError: !0
53
52
  });
54
53
  return r;
55
54
  },
56
- getNextPageParam: u
55
+ getNextPageParam: l
57
56
  });
58
- f(w, b);
59
- let T = h(() => w.data ? { data: w.data.pages.flatMap((e) => e.data ?? []) } : void 0, [w.data]);
57
+ d(C, y);
58
+ let w = m(() => C.data ? { data: C.data.pages.flatMap((e) => e.data ?? []) } : void 0, [C.data]);
60
59
  return {
61
- ...w,
62
- data: T,
63
- isResolving: d(w)
60
+ ...C,
61
+ data: w,
62
+ isResolving: u(C)
64
63
  };
65
64
  }
66
- function C({ objectType: e = p.Payable } = {}) {
67
- let { client: t, organizationId: n } = l(), r = v();
68
- return _({
65
+ function S({ objectType: e = f.Payable } = {}) {
66
+ let { client: t, organizationId: n } = c(), r = _();
67
+ return g({
69
68
  ...i({
70
69
  client: t,
71
70
  headers: { "x-organization-id": n ?? "" }
72
71
  }),
73
72
  onSuccess: async (i) => {
74
- b(r, m({
73
+ y(r, p({
75
74
  client: t,
76
75
  organizationId: n,
77
76
  objectType: e
78
77
  }), (e) => {
79
- if (e.pages.some((e) => e.data?.some((e) => e.id === i.id))) return x(e, (e) => e.map((e) => e.id === i.id ? i : e));
78
+ if (e.pages.some((e) => e.data?.some((e) => e.id === i.id))) return b(e, (e) => e.map((e) => e.id === i.id ? i : e));
80
79
  let t = e.pages.length - 1;
81
80
  return t < 0 ? e : {
82
81
  ...e,
@@ -85,7 +84,7 @@ function C({ objectType: e = p.Payable } = {}) {
85
84
  data: [...e.data ?? [], i]
86
85
  } : e)
87
86
  };
88
- }), await s(m({
87
+ }), await o(p({
89
88
  client: t,
90
89
  organizationId: n,
91
90
  objectType: e
@@ -93,19 +92,19 @@ function C({ objectType: e = p.Payable } = {}) {
93
92
  }
94
93
  });
95
94
  }
96
- function w({ objectType: e = p.Payable } = {}) {
97
- let { client: t, organizationId: n } = l(), i = v();
98
- return _({
95
+ function C({ objectType: e = f.Payable } = {}) {
96
+ let { client: t, organizationId: n } = c(), i = _();
97
+ return g({
99
98
  ...r({
100
99
  client: t,
101
100
  headers: { "x-organization-id": n ?? "" }
102
101
  }),
103
102
  onSuccess: async (r) => {
104
- b(i, m({
103
+ y(i, p({
105
104
  client: t,
106
105
  organizationId: n,
107
106
  objectType: e
108
- }), (e) => x(e, (e) => e.map((e) => e.id === r.id ? r : e))), await s(m({
107
+ }), (e) => b(e, (e) => e.map((e) => e.id === r.id ? r : e))), await o(p({
109
108
  client: t,
110
109
  organizationId: n,
111
110
  objectType: e
@@ -113,19 +112,19 @@ function w({ objectType: e = p.Payable } = {}) {
113
112
  }
114
113
  });
115
114
  }
116
- function T({ objectType: e = p.Payable } = {}) {
117
- let { client: n, organizationId: r } = l(), i = v();
118
- return _({
115
+ function w({ objectType: e = f.Payable } = {}) {
116
+ let { client: n, organizationId: r } = c(), i = _();
117
+ return g({
119
118
  ...t({
120
119
  client: n,
121
120
  headers: { "x-organization-id": r ?? "" }
122
121
  }),
123
122
  onSuccess: async (t, a) => {
124
- b(i, m({
123
+ y(i, p({
125
124
  client: n,
126
125
  organizationId: r,
127
126
  objectType: e
128
- }), (e) => x(e, (e) => e.filter((e) => e.id !== a.path.approval_policy_id))), await s(m({
127
+ }), (e) => b(e, (e) => e.filter((e) => e.id !== a.path.approval_policy_id))), await o(p({
129
128
  client: n,
130
129
  organizationId: r,
131
130
  objectType: e
@@ -134,4 +133,4 @@ function T({ objectType: e = p.Payable } = {}) {
134
133
  });
135
134
  }
136
135
  //#endregion
137
- export { T as useDeleteApprovalPoliciesIdMutation, S as useGetApprovalPoliciesQuery, w as usePatchApprovalPoliciesIdMutation, C as usePostApprovalPoliciesMutation };
136
+ export { w as useDeleteApprovalPoliciesIdMutation, x as useGetApprovalPoliciesQuery, C as usePatchApprovalPoliciesIdMutation, S as usePostApprovalPoliciesMutation };
@@ -14,7 +14,7 @@ import { useMemo as d } from "react";
14
14
  import { useMutation as f, useQuery as p } from "@tanstack/react-query";
15
15
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js
16
16
  function m({ enabled: e, ...t } = {}) {
17
- let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationPending: u } = s(), d = !!(r && o) && (e === !0 || e === void 0), f = i({
17
+ let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationStatus: u } = s(), d = !!(r && o) && (e === !0 || e === void 0), f = i({
18
18
  query: t,
19
19
  client: n,
20
20
  headers: c(r)
@@ -22,13 +22,13 @@ function m({ enabled: e, ...t } = {}) {
22
22
  return p({
23
23
  ...a(f, {
24
24
  authEpoch: l,
25
- organizationPending: u
25
+ organizationStatus: u
26
26
  }, { carryWithinOrg: !0 }),
27
27
  enabled: d
28
28
  });
29
29
  }
30
30
  function h(e) {
31
- let { client: t, organizationId: n, widgetToken: i, authEpoch: o, organizationPending: l } = s(), u = !!(n && i && e), d = r({
31
+ let { client: t, organizationId: n, widgetToken: i, authEpoch: o, organizationStatus: l } = s(), u = !!(n && i && e), d = r({
32
32
  client: t,
33
33
  headers: c(n),
34
34
  path: { counterpart_id: e ?? "" }
@@ -36,7 +36,7 @@ function h(e) {
36
36
  return p({
37
37
  ...a(d, {
38
38
  authEpoch: o,
39
- organizationPending: l
39
+ organizationStatus: l
40
40
  }),
41
41
  enabled: u
42
42
  });
@@ -13,7 +13,7 @@ import { counterpartBankAccountsInvalidationKey as l, counterpartInvalidationKey
13
13
  import { useMutation as d, useQuery as f } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js
15
15
  function p(e, { enabled: t = !0 } = {}) {
16
- let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationPending: u } = s(), d = !!(t && r && o && e), p = i({
16
+ let { client: n, organizationId: r, widgetToken: o, authEpoch: l, organizationStatus: u } = s(), d = !!(t && r && o && e), p = i({
17
17
  client: n,
18
18
  headers: c(r),
19
19
  path: { counterpart_id: e ?? "" }
@@ -21,7 +21,7 @@ function p(e, { enabled: t = !0 } = {}) {
21
21
  return f({
22
22
  ...a(p, {
23
23
  authEpoch: l,
24
- organizationPending: u
24
+ organizationStatus: u
25
25
  }),
26
26
  enabled: d
27
27
  });
@@ -13,7 +13,7 @@ import { counterpartAddressesInvalidationKey as s, counterpartInvalidationKey as
13
13
  import { useMutation as l, useQueries as u, useQuery as d } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js
15
15
  function f(e) {
16
- let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationPending: l } = a(), u = !!(i && s && e), f = n({
16
+ let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = !!(i && s && e), f = n({
17
17
  client: t,
18
18
  headers: o(i),
19
19
  path: { counterpart_id: e ?? "" }
@@ -21,13 +21,13 @@ function f(e) {
21
21
  return d({
22
22
  ...r(f, {
23
23
  authEpoch: c,
24
- organizationPending: l
24
+ organizationStatus: l
25
25
  }),
26
26
  enabled: u
27
27
  });
28
28
  }
29
29
  function p({ counterpartIds: e, enabled: t }) {
30
- let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
30
+ let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
31
31
  return u({ queries: e.map((e) => ({
32
32
  ...r(n({
33
33
  client: i,
@@ -35,7 +35,7 @@ function p({ counterpartIds: e, enabled: t }) {
35
35
  path: { counterpart_id: e }
36
36
  }), {
37
37
  authEpoch: l,
38
- organizationPending: d
38
+ organizationStatus: d
39
39
  }),
40
40
  enabled: f && !!e
41
41
  })) });
@@ -7,20 +7,21 @@ import "../../../ui/dist/index.js";
7
7
  import { useCounterpartSelector as t } from "./useCounterpartSelector.js";
8
8
  import { jsx as n } from "react/jsx-runtime";
9
9
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js
10
- function r({ value: r, onValueChange: i, mode: a, limit: o, debounceMs: s, disabled: c, onCreateClick: l, labels: u, typeLabels: d }) {
11
- let f = t({
10
+ function r({ value: r, onValueChange: i, mode: a, limit: o, debounceMs: s, disabled: c, invalid: l, onCreateClick: u, labels: d, typeLabels: f }) {
11
+ let p = t({
12
12
  value: r,
13
13
  onValueChange: i,
14
14
  mode: a,
15
15
  limit: o,
16
16
  debounceMs: s,
17
- typeLabels: d
17
+ typeLabels: f
18
18
  });
19
19
  return /* @__PURE__ */ n(e, {
20
- ...f,
20
+ ...p,
21
21
  disabled: c,
22
- onCreateClick: l,
23
- labels: u
22
+ invalid: l,
23
+ onCreateClick: u,
24
+ labels: d
24
25
  });
25
26
  }
26
27
  //#endregion
@@ -3,23 +3,23 @@ import { COUNTERPART_SELECTOR_LABELS_EN as c } from "./index2.js";
3
3
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
4
  import { PlusIcon as d, RotateCwIcon as f, SearchIcon as p } from "lucide-react";
5
5
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js
6
- function m({ value: m, options: h, searchValue: g, isLoading: _, isError: v, disabled: y, onSearchChange: b, onValueChange: x, onRetry: S, onCreateClick: C, labels: w }) {
7
- let T = {
6
+ function m({ value: m, options: h, searchValue: g, isLoading: _, isError: v, disabled: y, invalid: b, onSearchChange: x, onValueChange: S, onRetry: C, onCreateClick: w, labels: T }) {
7
+ let E = {
8
8
  ...c,
9
- ...w
10
- }, E = h.length > 0;
9
+ ...T
10
+ }, D = h.length > 0;
11
11
  return /* @__PURE__ */ u("div", {
12
12
  className: "ttw:flex ttw:flex-col ttw:gap-2",
13
13
  children: [
14
14
  /* @__PURE__ */ u("div", {
15
15
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
16
- children: [/* @__PURE__ */ l(n, { children: T.fieldLabel }), C ? /* @__PURE__ */ u(e, {
16
+ children: [/* @__PURE__ */ l(n, { children: E.fieldLabel }), w ? /* @__PURE__ */ u(e, {
17
17
  type: "button",
18
18
  variant: "ghost",
19
19
  size: "sm",
20
- onClick: C,
20
+ onClick: w,
21
21
  disabled: y,
22
- children: [/* @__PURE__ */ l(d, { className: "ttw:size-4" }), T.createButton]
22
+ children: [/* @__PURE__ */ l(d, { className: "ttw:size-4" }), E.createButton]
23
23
  }) : null]
24
24
  }),
25
25
  /* @__PURE__ */ u("div", {
@@ -27,9 +27,9 @@ function m({ value: m, options: h, searchValue: g, isLoading: _, isError: v, dis
27
27
  children: [/* @__PURE__ */ l(p, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ l(t, {
28
28
  className: "ttw:pl-9",
29
29
  value: g,
30
- placeholder: T.searchPlaceholder,
30
+ placeholder: E.searchPlaceholder,
31
31
  disabled: y,
32
- onChange: (e) => b(e.target.value),
32
+ onChange: (e) => x(e.target.value),
33
33
  onKeyDown: (e) => {
34
34
  e.key === "Enter" && e.preventDefault();
35
35
  }
@@ -37,11 +37,12 @@ function m({ value: m, options: h, searchValue: g, isLoading: _, isError: v, dis
37
37
  }),
38
38
  /* @__PURE__ */ u(r, {
39
39
  value: m || void 0,
40
- onValueChange: x,
41
- disabled: y || _ || v || !E,
40
+ onValueChange: S,
41
+ disabled: y || _ || v || !D,
42
42
  children: [/* @__PURE__ */ l(o, {
43
43
  className: "ttw:w-full",
44
- children: /* @__PURE__ */ l(s, { placeholder: T.selectPlaceholder })
44
+ "aria-invalid": b || void 0,
45
+ children: /* @__PURE__ */ l(s, { placeholder: E.selectPlaceholder })
45
46
  }), /* @__PURE__ */ l(i, { children: h.map((e) => /* @__PURE__ */ l(a, {
46
47
  value: e.value,
47
48
  children: /* @__PURE__ */ u("span", {
@@ -55,22 +56,22 @@ function m({ value: m, options: h, searchValue: g, isLoading: _, isError: v, dis
55
56
  }),
56
57
  _ ? /* @__PURE__ */ l("p", {
57
58
  className: "ttw:text-sm ttw:text-muted-foreground",
58
- children: T.loadingText
59
+ children: E.loadingText
59
60
  }) : v ? /* @__PURE__ */ u("div", {
60
61
  className: "ttw:flex ttw:items-center ttw:gap-2",
61
62
  children: [/* @__PURE__ */ l("p", {
62
63
  className: "ttw:text-sm ttw:text-destructive",
63
- children: T.errorText
64
- }), S ? /* @__PURE__ */ u(e, {
64
+ children: E.errorText
65
+ }), C ? /* @__PURE__ */ u(e, {
65
66
  type: "button",
66
67
  variant: "outline",
67
68
  size: "sm",
68
- onClick: S,
69
- children: [/* @__PURE__ */ l(f, { className: "ttw:size-4" }), T.retryButton]
69
+ onClick: C,
70
+ children: [/* @__PURE__ */ l(f, { className: "ttw:size-4" }), E.retryButton]
70
71
  }) : null]
71
- }) : E ? null : /* @__PURE__ */ l("p", {
72
+ }) : D ? null : /* @__PURE__ */ l("p", {
72
73
  className: "ttw:text-sm ttw:text-muted-foreground",
73
- children: T.emptyText
74
+ children: E.emptyText
74
75
  })
75
76
  ]
76
77
  });