@tesouro/embedded-components-react 0.5.252 → 0.5.255

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 (67) hide show
  1. package/dist/index.d.ts +95 -79
  2. package/dist/lib/ReceivablesWidget.d.ts +25 -9
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +4 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +214 -209
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +162 -145
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +3 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +32 -23
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +5 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillPayWidgetNative.js +48 -48
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +32 -24
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/labels.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -21
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +38 -51
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +11 -39
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +18 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -14
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +9 -16
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +78 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -78
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +29 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +4 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +26 -25
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -4
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +5 -28
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +34 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -7
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +16 -11
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +54 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +1 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +2 -16
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +16 -17
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +15 -11
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +89 -88
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +55 -74
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +8 -1
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +71 -0
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +123 -164
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +40 -37
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +91 -0
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +83 -78
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +7 -3
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +2 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +15 -8
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +206 -89
  60. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  61. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +38 -38
  62. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  63. package/dist/packages/shared-ui-shadcn/dist/index.js +8 -7
  64. package/package.json +1 -1
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -11
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +0 -34
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +0 -2
@@ -6,9 +6,9 @@ import "./index7.js";
6
6
  import { PaymentHistoryList as p } from "./index8.js";
7
7
  import "./index9.js";
8
8
  import { BillActionButtons as m, NO_BILL_ACTIONS as h } from "../../../ui/dist/index2.js";
9
- import { BillOverflowMenu as g } from "../../../ui/dist/index10.js";
10
- import { BillStatusBadge as _ } from "../../../ui/dist/index16.js";
11
- import { DueDateValue as v } from "../../../ui/dist/index24.js";
9
+ import { BillOverflowMenu as g } from "../../../ui/dist/index7.js";
10
+ import { BillStatusBadge as _ } from "../../../ui/dist/index14.js";
11
+ import { DueDateValue as v } from "../../../ui/dist/index22.js";
12
12
  import "../../../ui/dist/index.js";
13
13
  import { ScheduledSummaryBadge as y } from "./index5.js";
14
14
  import { BILL_DETAILS_SHEET_LABELS_EN as b } from "./index33.js";
@@ -1,6 +1,6 @@
1
1
  import { Alert as e, AlertTitle as t, Badge as n, Button as r, cn as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillOverflowMenu as a } from "../../../ui/dist/index10.js";
3
- import { BillStatusBadge as o } from "../../../ui/dist/index16.js";
2
+ import { BillOverflowMenu as a } from "../../../ui/dist/index7.js";
3
+ import { BillStatusBadge as o } from "../../../ui/dist/index14.js";
4
4
  import "../../../ui/dist/index.js";
5
5
  import { BILL_DUPLICATE_NOTICE_LABELS_EN as s } from "./index36.js";
6
6
  import { useState as c } from "react";
@@ -1,4 +1,4 @@
1
- import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index18.js";
1
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index16.js";
2
2
  import "../../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js
4
4
  var t = {
@@ -1,5 +1,5 @@
1
1
  import { Button as e, Skeleton as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillUploadDropzone as n } from "../../../ui/dist/index19.js";
2
+ import { BillUploadDropzone as n } from "../../../ui/dist/index17.js";
3
3
  import "../../../ui/dist/index.js";
4
4
  import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index48.js";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BADGE_TONE_CLASS_NAME as t } from "../../../ui/dist/index6.js";
3
- import { DateDisclosure as n } from "../../../ui/dist/index22.js";
2
+ import { BADGE_TONE_CLASS_NAME as t } from "../../../ui/dist/index13.js";
3
+ import { DateDisclosure as n } from "../../../ui/dist/index20.js";
4
4
  import "../../../ui/dist/index.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
@@ -25,49 +25,49 @@ import { resolveDuplicateWarning as h } from "./index6.js";
25
25
  import { billsTableCellTestIds as g } from "./index8.js";
26
26
  import { useBillQueueCounts as _ } from "./index9.js";
27
27
  import { useEffect as v, useImperativeHandle as y, useMemo as b, useState as x } from "react";
28
- import { Fragment as S, jsx as C, jsxs as te } from "react/jsx-runtime";
28
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
29
29
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js
30
- var ne = () => void 0;
31
- function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E, maxFiles: D, onSettingsClick: O, ref: k }) {
30
+ var te = () => void 0;
31
+ function T({ labels: T, onOpenBill: ne, onEnterManually: re, onFilesSelected: E, maxFiles: D, onSettingsClick: O, ref: k }) {
32
32
  let A = b(() => ({
33
33
  ...u,
34
- ...w,
34
+ ...T,
35
35
  queues: {
36
36
  ...u.queues,
37
- ...w?.queues
37
+ ...T?.queues
38
38
  },
39
39
  scheduledRelativeDay: {
40
40
  ...u.scheduledRelativeDay,
41
- ...w?.scheduledRelativeDay
41
+ ...T?.scheduledRelativeDay
42
42
  },
43
43
  filters: {
44
44
  ...u.filters,
45
- ...w?.filters,
45
+ ...T?.filters,
46
46
  presets: {
47
47
  ...u.filters.presets,
48
- ...w?.filters?.presets
48
+ ...T?.filters?.presets
49
49
  },
50
50
  statuses: {
51
51
  ...u.filters.statuses,
52
- ...w?.filters?.statuses
52
+ ...T?.filters?.statuses
53
53
  },
54
54
  dateFieldNames: {
55
55
  ...u.filters.dateFieldNames,
56
- ...w?.filters?.dateFieldNames
56
+ ...T?.filters?.dateFieldNames
57
57
  }
58
58
  },
59
59
  filterBar: {
60
60
  ...u.filterBar,
61
- ...w?.filterBar
61
+ ...T?.filterBar
62
62
  },
63
63
  queueEmptyStates: l.reduce((e, t) => ({
64
64
  ...e,
65
65
  [t]: {
66
66
  ...u.queueEmptyStates[t],
67
- ...w?.queueEmptyStates?.[t]
67
+ ...T?.queueEmptyStates?.[t]
68
68
  }
69
69
  }), {})
70
- }), [w]), [j, M] = x(!1), [N, P] = x(d.AllBills), { initResponse: F } = i(), I = a(), L = t(F?.scopes, [r.PayableReadOrg]), R = t(F?.scopes, [r.PayableWriteOrg]), z = !F || L, B = !F || R, V = t(F?.scopes, [r.CounterpartReadOrg]), H = b(() => ({
70
+ }), [T]), [j, M] = x(!1), [N, P] = x(d.AllBills), { initResponse: F } = i(), I = a(), L = t(F?.scopes, [r.PayableReadOrg]), R = t(F?.scopes, [r.PayableWriteOrg]), z = !F || L, B = !F || R, V = t(F?.scopes, [r.CounterpartReadOrg]), H = b(() => ({
71
71
  originalBill: A.duplicateOriginalBillLabel,
72
72
  menuTrigger: A.duplicateMenuTrigger,
73
73
  notDuplicateAction: A.duplicateNotDuplicateAction,
@@ -126,7 +126,7 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
126
126
  canReadVendors: V,
127
127
  isVendorFilterPaused: I,
128
128
  filterLabels: A.filters,
129
- onOpenBill: re ?? ne,
129
+ onOpenBill: ne ?? te,
130
130
  duplicateRowNote: A.duplicateRowNote,
131
131
  attachmentLabel: A.attachmentIndicator,
132
132
  duplicateGroupLabels: H,
@@ -146,19 +146,24 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
146
146
  id: e,
147
147
  label: A.queues[e],
148
148
  badge: p(q[e])
149
- })), [A.queues, q]), Y = b(() => ({
149
+ })), [A.queues, q]), Y = T?.screen, ie = b(() => ({
150
+ ...Y,
150
151
  createButton: A.createButton,
151
152
  settingsButton: A.settingsButton,
152
- addBill: { heading: A.nonEmptyHeading }
153
+ addBill: {
154
+ ...Y?.addBill,
155
+ heading: A.nonEmptyHeading
156
+ }
153
157
  }), [
158
+ Y,
154
159
  A.createButton,
155
160
  A.settingsButton,
156
161
  A.nonEmptyHeading
157
- ]), ie = b(() => ({
162
+ ]), ae = b(() => ({
158
163
  ...W.filterBarProps,
159
164
  labels: A.filterBar
160
165
  }), [W.filterBarProps, A.filterBar]), X = () => {
161
- M(!1), T?.();
166
+ M(!1), re?.();
162
167
  }, Z = (e) => {
163
168
  M(!1), E?.(e);
164
169
  }, Q = U ? {
@@ -170,7 +175,7 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
170
175
  emailAddress: void 0,
171
176
  onCopyEmail: void 0
172
177
  }, { showVendorBills: $ } = W;
173
- return y(k, () => ({ showVendorBills: $ }), [$]), /* @__PURE__ */ te(S, { children: [
178
+ return y(k, () => ({ showVendorBills: $ }), [$]), /* @__PURE__ */ w(S, { children: [
174
179
  /* @__PURE__ */ C(c, {
175
180
  rows: W.rows,
176
181
  isLoading: W.isLoading || !F,
@@ -190,7 +195,7 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
190
195
  onFilterTabChange: W.onFilterTabChange,
191
196
  searchValue: W.searchValue,
192
197
  onSearchChange: W.onSearchChange,
193
- filters: ie,
198
+ filters: ae,
194
199
  visibleColumns: W.visibleColumns,
195
200
  cellTestIds: g,
196
201
  isSearchActive: W.isSearchActive,
@@ -213,7 +218,7 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
213
218
  },
214
219
  onClear: () => P(d.AllBills)
215
220
  },
216
- labels: Y
221
+ labels: ie
217
222
  }),
218
223
  /* @__PURE__ */ C(o, {
219
224
  open: W.cancelConfirmation.open,
@@ -238,9 +243,13 @@ function w({ labels: w, onOpenBill: re, onEnterManually: T, onFilesSelected: E,
238
243
  maxFiles: D,
239
244
  onEnterManually: X,
240
245
  ...Q,
241
- labels: { heading: W.hasAnyBills ? A.nonEmptyHeading : A.emptyHeading }
246
+ dialogLabels: T?.addBillDialog?.dialog,
247
+ labels: {
248
+ ...T?.addBillDialog?.panel,
249
+ heading: W.hasAnyBills ? A.nonEmptyHeading : A.emptyHeading
250
+ }
242
251
  }) : null
243
252
  ] });
244
253
  }
245
254
  //#endregion
246
- export { w as BillsList, w as default };
255
+ export { T as BillsList, T as default };
@@ -1,6 +1,6 @@
1
1
  import { DATA_TABLE_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../ui/dist/index15.js";
3
- import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index23.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../ui/dist/index12.js";
3
+ import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index21.js";
4
4
  import "../../../ui/dist/index.js";
5
5
  import { ADD_BILL_PANEL_LABELS_EN as r } from "./index2.js";
6
6
  import "./index4.js";
@@ -1,4 +1,4 @@
1
- import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index18.js";
1
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index16.js";
2
2
  import "../../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js
4
4
  var t = {
@@ -2,11 +2,11 @@ import { Alert as e, AlertTitle as t, Badge as n, Button as r, ContextMenuItem a
2
2
  import { EmptyState as u } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
3
  import { ErrorState as ce } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
4
  import "../../../../shared/ui/dist/index.js";
5
- import { BillOverflowMenu as le } from "../../../ui/dist/index10.js";
6
- import { BillStatusBadge as ue } from "../../../ui/dist/index16.js";
7
- import { getAcceptedBillUploadFiles as de } from "../../../ui/dist/index19.js";
8
- import { DateDisclosure as fe } from "../../../ui/dist/index22.js";
9
- import { DueDateValue as pe } from "../../../ui/dist/index24.js";
5
+ import { BillOverflowMenu as le } from "../../../ui/dist/index7.js";
6
+ import { BillStatusBadge as ue } from "../../../ui/dist/index14.js";
7
+ import { getAcceptedBillUploadFiles as de } from "../../../ui/dist/index17.js";
8
+ import { DateDisclosure as fe } from "../../../ui/dist/index20.js";
9
+ import { DueDateValue as pe } from "../../../ui/dist/index22.js";
10
10
  import "../../../ui/dist/index.js";
11
11
  import { AddBillPanel as d } from "./index3.js";
12
12
  import "./index4.js";
@@ -1,5 +1,5 @@
1
1
  import { Button as e, Typography as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillUploadDropzone as n } from "../../../ui/dist/index19.js";
2
+ import { BillUploadDropzone as n } from "../../../ui/dist/index17.js";
3
3
  import "../../../ui/dist/index.js";
4
4
  import { ADD_BILL_PANEL_LABELS_EN as r } from "./index2.js";
5
5
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -2,47 +2,46 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { hasAnyScope as e } from "../../../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { Scope as t } from "../../../../../shared/data-access/dist/lib/scopes.js";
5
+ import { mergeLabelTree as e } from "../../../../../shared/util/dist/lib/mergeLabelTree.js";
6
+ import { hasAnyScope as t } from "../../../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { Scope as n } from "../../../../../shared/data-access/dist/lib/scopes.js";
7
8
  import "../../../../../shared/data-access/dist/index.js";
8
- import { EmbeddedToaster as n } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
+ import { EmbeddedToaster as r } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
10
  import "../../../../../shared/ui/dist/index.js";
10
- import { useAnalyticsTrack as r } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
11
- import { WidgetProvider as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
- import { useWidgetConfig as a } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import { useAnalyticsTrack as i } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
12
+ import { WidgetProvider as a } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
13
+ import { useWidgetConfig as o } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
14
  import "../../../../../shared/feature/dist/index.js";
14
- import { BillPayWidgetAnalyticsEvent as o, WIDGET_NAME as s } from "../analytics/events.js";
15
- import { BillPayWidgetUi as c } from "../../../../ui/dist/index13.js";
15
+ import { BillPayWidgetAnalyticsEvent as s, WIDGET_NAME as c } from "../analytics/events.js";
16
+ import { BillPayWidgetUi as l } from "../../../../ui/dist/index10.js";
16
17
  import "../../../../ui/dist/index.js";
17
- import { BillUploadWidget as l } from "../../../../bill-upload/feature/dist/index8.js";
18
+ import { BillUploadWidget as u } from "../../../../bill-upload/feature/dist/index8.js";
18
19
  import "../../../../bill-upload/feature/dist/index.js";
19
- import { BillsTab as u } from "./BillsTab.js";
20
- import { DEFAULT_TABS_LABELS as d } from "./labels.js";
21
- import { CounterpartsWidget as f } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js";
20
+ import { BillsTab as d } from "./BillsTab.js";
21
+ import { BILL_PAY_WIDGET_NATIVE_LABELS_EN as f } from "./labels.js";
22
+ import { CounterpartsWidget as p } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js";
22
23
  import "../../../../../counterparts-widget/feature/dist/index.js";
23
- import { useCallback as p, useEffect as m, useRef as h, useState as g } from "react";
24
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
24
+ import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
25
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
25
26
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillPayWidgetNative.js
26
- var b = {
27
+ var S = {
27
28
  Bills: "bills",
28
29
  Vendors: "vendors"
29
- }, x = [b.Bills, b.Vendors];
30
- function S({ labels: i, initialTab: s = b.Bills, tabsLabels: S, vendorLabels: C, poweredByBankName: w, onSettingsClick: T }) {
31
- let E = r();
32
- m(() => {
33
- E(o.Mounted);
30
+ }, C = [S.Bills, S.Vendors];
31
+ function w({ labels: a, initialTab: c = S.Bills, poweredByBankName: w, onSettingsClick: T }) {
32
+ let E = i();
33
+ h(() => {
34
+ E(s.Mounted);
34
35
  }, [E]);
35
- let D = {
36
- ...d,
37
- ...S
38
- }, { initResponse: O } = a(), k = e(O?.scopes, [t.PayableReadOrg]), A = e(O?.scopes, [t.PayableWriteOrg]), j = e(O?.scopes, [t.ApprovalPolicyWriteOrg]) && e(O?.scopes, [t.PayableWriteOrg]) && e(O?.scopes, [t.RoleReadOrg]) && e(O?.scopes, [t.UserReadOrg]), [M, N] = g(s), [P, F] = g(), I = p((e) => {
39
- N(b.Bills), F(e);
40
- }, []), L = h(null), R = p((e) => L.current?.enqueue(e), []), [z, B] = g(), V = p((e) => {
41
- N(b.Bills), B(e);
36
+ let D = g(() => e(f, a), [a]), { initResponse: O } = o(), k = t(O?.scopes, [n.PayableReadOrg]), A = t(O?.scopes, [n.PayableWriteOrg]), j = t(O?.scopes, [n.ApprovalPolicyWriteOrg]) && t(O?.scopes, [n.PayableWriteOrg]) && t(O?.scopes, [n.RoleReadOrg]) && t(O?.scopes, [n.UserReadOrg]), [M, N] = v(c), [P, F] = v(), I = m((e) => {
37
+ N(S.Bills), F(e);
38
+ }, []), L = _(null), R = m((e) => L.current?.enqueue(e), []), [z, B] = v(), V = m((e) => {
39
+ N(S.Bills), B(e);
42
40
  }, []), H = [{
43
- id: b.Bills,
44
- label: D.bills,
45
- content: /* @__PURE__ */ v(u, {
41
+ id: S.Bills,
42
+ label: D.tabs.bills,
43
+ content: /* @__PURE__ */ b(d, {
44
+ labels: D,
46
45
  onEnqueueFiles: R,
47
46
  openPayableId: P,
48
47
  onOpenPayableHandled: () => F(void 0),
@@ -52,10 +51,10 @@ function S({ labels: i, initialTab: s = b.Bills, tabsLabels: S, vendorLabels: C,
52
51
  onSettingsClick: T && j ? T : void 0
53
52
  })
54
53
  }, {
55
- id: b.Vendors,
56
- label: D.vendors,
57
- content: /* @__PURE__ */ v(f, {
58
- ...C,
54
+ id: S.Vendors,
55
+ label: D.tabs.vendors,
56
+ content: /* @__PURE__ */ b(p, {
57
+ ...D.vendors,
59
58
  counterpartType: "vendor",
60
59
  passThrough: !0,
61
60
  onViewAllDocuments: k ? (e) => V({
@@ -69,39 +68,40 @@ function S({ labels: i, initialTab: s = b.Bills, tabsLabels: S, vendorLabels: C,
69
68
  action: "createBill"
70
69
  }) : void 0
71
70
  })
72
- }], U = H.some((e) => e.id === M) ? M : x.find((e) => H.some((t) => t.id === e)) ?? H[0]?.id ?? "";
73
- return /* @__PURE__ */ y(_, { children: [
74
- /* @__PURE__ */ v(n, {}),
75
- /* @__PURE__ */ v(c, {
76
- labels: i,
71
+ }], U = H.some((e) => e.id === M) ? M : C.find((e) => H.some((t) => t.id === e)) ?? H[0]?.id ?? "";
72
+ return /* @__PURE__ */ x(y, { children: [
73
+ /* @__PURE__ */ b(r, {}),
74
+ /* @__PURE__ */ b(l, {
75
+ labels: D.widget,
77
76
  tabs: H,
78
77
  selectedTabId: U,
79
78
  onTabChange: N
80
79
  }),
81
- /* @__PURE__ */ v(l, {
80
+ /* @__PURE__ */ b(u, {
82
81
  ref: L,
83
- onOpenBill: I
82
+ onOpenBill: I,
83
+ labels: D.billUpload
84
84
  })
85
85
  ] });
86
86
  }
87
- function C({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
88
- return /* @__PURE__ */ v(i, {
89
- widgetName: s,
87
+ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, implementation: s, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
88
+ return /* @__PURE__ */ b(a, {
89
+ widgetName: c,
90
90
  baseUrl: e,
91
91
  widgetToken: t,
92
92
  organizationId: n,
93
93
  configClient: r,
94
- gatewayRouting: a,
94
+ gatewayRouting: i,
95
95
  linkComponent: o,
96
- implementation: c,
96
+ implementation: s,
97
97
  uiFramework: l,
98
98
  errorFallback: u,
99
99
  onError: d,
100
100
  analytics: f,
101
101
  disclosuresAcceptance: p,
102
102
  providerLabels: m,
103
- children: /* @__PURE__ */ v(S, { ...h })
103
+ children: /* @__PURE__ */ b(w, { ...h })
104
104
  });
105
105
  }
106
106
  //#endregion
107
- export { C as BillPayWidgetNative, C as default };
107
+ export { T as BillPayWidgetNative, T as default };
@@ -27,10 +27,11 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
27
27
  l(() => {
28
28
  R || L(null);
29
29
  }, [R]);
30
- let z = u(() => {
30
+ let z = h?.payBill, B = u(() => {
31
31
  let e = (e) => (t) => /* @__PURE__ */ p(s, {
32
32
  ...t,
33
33
  poweredByBankName: x,
34
+ labels: z,
34
35
  openFlow: I?.surface === e ? I.flow : null,
35
36
  onOpenFlowChange: (t) => L(t ? {
36
37
  surface: e,
@@ -42,43 +43,47 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
42
43
  details: e("details"),
43
44
  view: e("view")
44
45
  };
45
- }, [I, x]), { initResponse: B } = n(), V = !B || e(B.scopes, [t.PayableWriteOrg]), H = c((e, t) => {
46
- if (t && V) {
46
+ }, [
47
+ I,
48
+ x,
49
+ z
50
+ ]), { initResponse: V } = n(), H = !V || e(V.scopes, [t.PayableWriteOrg]), U = c((e, t) => {
51
+ if (t && H) {
47
52
  T(e), D(void 0), k(!0);
48
53
  return;
49
54
  }
50
55
  j(e), F(!0);
51
- }, [V]), U = (e, t) => {
52
- k(!1), F(!1), H(e, t);
53
- }, W = () => {
54
- N(!1), F(!0);
56
+ }, [H]), W = (e, t) => {
57
+ k(!1), F(!1), U(e, t);
55
58
  }, G = () => {
56
- F(!1), N(!0);
59
+ N(!1), F(!0);
57
60
  }, K = () => {
61
+ F(!1), N(!0);
62
+ }, q = () => {
58
63
  N(!1), F(!1), T(A), D(void 0), k(!0);
59
- }, q = c((e) => {
64
+ }, J = c((e) => {
60
65
  T(void 0), D(e), k(!0);
61
66
  }, []);
62
67
  return l(() => {
63
68
  _ && (T(_), D(void 0), k(!0), v?.());
64
69
  }, [v, _]), l(() => {
65
- y && (y.action === "createBill" ? V && q(y.vendorId) : C.current?.showVendorBills({
70
+ y && (y.action === "createBill" ? H && J(y.vendorId) : C.current?.showVendorBills({
66
71
  id: y.vendorId,
67
72
  name: y.vendorName
68
73
  }), b?.());
69
74
  }, [
70
- V,
75
+ H,
71
76
  b,
72
- q,
77
+ J,
73
78
  y
74
79
  ]), /* @__PURE__ */ m("div", {
75
80
  "data-testid": r.root,
76
81
  children: [
77
82
  /* @__PURE__ */ p(o, {
78
83
  ref: C,
79
- labels: h,
80
- onOpenBill: H,
81
- onEnterManually: () => q(),
84
+ labels: h?.billsList,
85
+ onOpenBill: U,
86
+ onEnterManually: () => J(),
82
87
  onFilesSelected: g,
83
88
  maxFiles: 10,
84
89
  onSettingsClick: S
@@ -88,28 +93,31 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
88
93
  onOpenChange: k,
89
94
  payableId: w,
90
95
  initialCounterpartId: E,
91
- onOpenBill: U,
92
- renderPaymentFlows: z.create
96
+ onOpenBill: W,
97
+ renderPaymentFlows: B.create,
98
+ copy: h?.billCreate
93
99
  }, w) : null,
94
100
  M ? /* @__PURE__ */ p(a, {
95
101
  open: M,
96
102
  onOpenChange: N,
97
103
  payableId: A,
98
104
  onClose: () => N(!1),
99
- onExpand: W,
100
- onEdit: K,
105
+ onExpand: G,
106
+ onEdit: q,
101
107
  testId: r.detailsSheet,
102
- renderPaymentFlows: z.details
108
+ renderPaymentFlows: B.details,
109
+ labels: h?.billDetails
103
110
  }) : null,
104
111
  P ? /* @__PURE__ */ p(i, {
105
112
  open: P,
106
113
  onOpenChange: F,
107
114
  payableId: A,
108
115
  readOnly: !0,
109
- onCollapse: G,
110
- onEdit: K,
111
- onOpenBill: U,
112
- renderPaymentFlows: z.view
116
+ onCollapse: K,
117
+ onEdit: q,
118
+ onOpenBill: W,
119
+ renderPaymentFlows: B.view,
120
+ copy: h?.billCreate
113
121
  }, A) : null
114
122
  ]
115
123
  });
@@ -2,6 +2,6 @@
2
2
  var e = {
3
3
  bills: "Bills",
4
4
  vendors: "Vendors"
5
- };
5
+ }, t = { tabs: e };
6
6
  //#endregion
7
- export { e as DEFAULT_TABS_LABELS };
7
+ export { t as BILL_PAY_WIDGET_NATIVE_LABELS_EN, e as DEFAULT_TABS_LABELS };
@@ -1,4 +1,4 @@
1
- import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/index26.js";
1
+ import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/index24.js";
2
2
  import "../../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js
4
4
  var t = {
@@ -1,5 +1,5 @@
1
1
  import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, cn as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RevealableField as c } from "../../../ui/dist/index27.js";
2
+ import { RevealableField as c } from "../../../ui/dist/index25.js";
3
3
  import "../../../ui/dist/index.js";
4
4
  import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as l } from "./index5.js";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -2,26 +2,24 @@ import { BillActionButtons as e, NO_BILL_ACTIONS as t } from "./index2.js";
2
2
  import "./index3.js";
3
3
  import { BillDecisionDialog as n } from "./index4.js";
4
4
  import "./index5.js";
5
- import { BADGE_TONE_CLASS_NAME as r } from "./index6.js";
6
- import "./index7.js";
5
+ import { groupBySectionHeading as r } from "./index6.js";
6
+ import { BillOverflowMenu as i } from "./index7.js";
7
7
  import "./index8.js";
8
- import { groupBySectionHeading as i } from "./index9.js";
9
- import { BillOverflowMenu as a } from "./index10.js";
8
+ import "./index9.js";
9
+ import { BillPayWidgetUi as a } from "./index10.js";
10
10
  import "./index11.js";
11
- import "./index12.js";
12
- import { BillPayWidgetUi as o } from "./index13.js";
13
- import "./index14.js";
14
- import { BILL_STATUS_BADGE_LABELS_EN as s } from "./index15.js";
15
- import { BillStatusBadge as c } from "./index16.js";
16
- import "./index17.js";
17
- import { BILL_UPLOAD_DROPZONE_LABELS_EN as l } from "./index18.js";
18
- import { BillUploadDropzone as u, getAcceptedBillUploadFiles as d } from "./index19.js";
19
- import "./index21.js";
20
- import { DateDisclosure as f } from "./index22.js";
21
- import { DUE_DATE_VALUE_LABELS_EN as p } from "./index23.js";
22
- import { DueDateValue as m } from "./index24.js";
23
- import "./index25.js";
24
- import { REVEALABLE_FIELD_LABELS_EN as h } from "./index26.js";
25
- import { RevealableField as g } from "./index27.js";
26
- import "./index28.js";
27
- export { r as BADGE_TONE_CLASS_NAME, s as BILL_STATUS_BADGE_LABELS_EN, l as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, a as BillOverflowMenu, o as BillPayWidgetUi, c as BillStatusBadge, u as BillUploadDropzone, p as DUE_DATE_VALUE_LABELS_EN, f as DateDisclosure, m as DueDateValue, t as NO_BILL_ACTIONS, h as REVEALABLE_FIELD_LABELS_EN, g as RevealableField, d as getAcceptedBillUploadFiles, i as groupBySectionHeading };
11
+ import { BILL_STATUS_BADGE_LABELS_EN as o } from "./index12.js";
12
+ import { BADGE_TONE_CLASS_NAME as s } from "./index13.js";
13
+ import { BillStatusBadge as c } from "./index14.js";
14
+ import "./index15.js";
15
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as l } from "./index16.js";
16
+ import { BillUploadDropzone as u, getAcceptedBillUploadFiles as d } from "./index17.js";
17
+ import "./index19.js";
18
+ import { DateDisclosure as f } from "./index20.js";
19
+ import { DUE_DATE_VALUE_LABELS_EN as p } from "./index21.js";
20
+ import { DueDateValue as m } from "./index22.js";
21
+ import "./index23.js";
22
+ import { REVEALABLE_FIELD_LABELS_EN as h } from "./index24.js";
23
+ import { RevealableField as g } from "./index25.js";
24
+ import "./index26.js";
25
+ export { s as BADGE_TONE_CLASS_NAME, o as BILL_STATUS_BADGE_LABELS_EN, l as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, i as BillOverflowMenu, a as BillPayWidgetUi, c as BillStatusBadge, u as BillUploadDropzone, p as DUE_DATE_VALUE_LABELS_EN, f as DateDisclosure, m as DueDateValue, t as NO_BILL_ACTIONS, h as REVEALABLE_FIELD_LABELS_EN, g as RevealableField, d as getAcceptedBillUploadFiles, r as groupBySectionHeading };