@tesouro/embedded-components-react 0.5.46 → 0.5.47

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 (54) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +3 -3
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +7 -49
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +46 -36
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +34 -184
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +163 -75
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +75 -21
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -93
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +88 -317
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +322 -12
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -64
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +57 -50
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +52 -214
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +215 -35
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +35 -234
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -21
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -532
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +536 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -42
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -230
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +234 -3
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -11
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +11 -127
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +129 -3
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -47
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +44 -18
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +241 -122
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +125 -211
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +219 -3
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -7
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +5 -98
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +100 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -26
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +27 -0
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +28 -28
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +4 -4
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/user/useOrganizationUserNames.js +13 -1
  52. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +137 -0
  53. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  54. package/package.json +1 -1
@@ -1 +1,100 @@
1
- import "./index85.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
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";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
+ 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";
13
+ import "../../../shared/feature/dist/index.js";
14
+ import { BillPayWidgetUi as o } from "../../ui/dist/index53.js";
15
+ import { BillUploadStatusTray as s } from "../../ui/dist/index85.js";
16
+ import "../../ui/dist/index.js";
17
+ import { useBillUploadQueue as c } from "./index71.js";
18
+ import "./index72.js";
19
+ import { billsTabTestIds as l } from "./index77.js";
20
+ import { BillsTab as u } from "./index83.js";
21
+ import "./index84.js";
22
+ import { BillPayWidgetAnalyticsEvent as d, WIDGET_NAME as f } from "./index66.js";
23
+ import { DEFAULT_TABS_LABELS as p } from "./index85.js";
24
+ import { CounterpartsWidget as m } from "../../../counterparts-widget/feature/dist/index8.js";
25
+ import "../../../counterparts-widget/feature/dist/index.js";
26
+ import { useCallback as h, useEffect as g, useState as _ } from "react";
27
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
28
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js
29
+ var x = {
30
+ Bills: "bills",
31
+ Vendors: "vendors"
32
+ }, S = [x.Bills, x.Vendors];
33
+ function C({ labels: i, initialTab: f = x.Bills, tabsLabels: C, vendorLabels: w, poweredByBankName: T, onSettingsClick: E }) {
34
+ let D = r();
35
+ g(() => {
36
+ D(d.Mounted);
37
+ }, [D]);
38
+ let O = {
39
+ ...p,
40
+ ...C
41
+ }, { initResponse: k } = a(), A = e(k?.scopes, [t.ApprovalPolicyWriteOrg]) && e(k?.scopes, [t.PayableWriteOrg]) && e(k?.scopes, [t.RoleReadOrg]) && e(k?.scopes, [t.UserReadOrg]), [j, M] = _(f), [N, P] = _(), F = h((e) => {
42
+ M(x.Bills), P(e);
43
+ }, []), I = c({ onOpenBill: F }), L = [{
44
+ id: x.Bills,
45
+ label: O.bills,
46
+ content: /* @__PURE__ */ y(u, {
47
+ onEnqueueFiles: I.enqueue,
48
+ openPayableId: N,
49
+ onOpenPayableHandled: () => P(void 0),
50
+ poweredByBankName: T,
51
+ onSettingsClick: E && A ? E : void 0
52
+ })
53
+ }, {
54
+ id: x.Vendors,
55
+ label: O.vendors,
56
+ content: /* @__PURE__ */ y(m, {
57
+ ...w,
58
+ counterpartType: "vendor",
59
+ onViewAllDocuments: () => M(x.Bills)
60
+ })
61
+ }], R = L.some((e) => e.id === j) ? j : S.find((e) => L.some((t) => t.id === e)) ?? L[0]?.id ?? "";
62
+ return /* @__PURE__ */ b(v, { children: [
63
+ /* @__PURE__ */ y(n, {}),
64
+ /* @__PURE__ */ y(o, {
65
+ labels: i,
66
+ tabs: L,
67
+ selectedTabId: R,
68
+ onTabChange: M
69
+ }),
70
+ I.isVisible ? /* @__PURE__ */ y(s, {
71
+ sections: I.sections,
72
+ summaryLabel: I.summaryLabel,
73
+ collapsed: I.collapsed,
74
+ onToggleCollapsed: I.onToggleCollapsed,
75
+ onClose: I.onClose,
76
+ testId: l.uploadTray
77
+ }) : null
78
+ ] });
79
+ }
80
+ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: p, providerLabels: m, ...h }) {
81
+ return /* @__PURE__ */ y(i, {
82
+ widgetName: f,
83
+ baseUrl: e,
84
+ widgetToken: t,
85
+ organizationId: n,
86
+ configClient: r,
87
+ gatewayRouting: a,
88
+ linkComponent: o,
89
+ implementation: s,
90
+ uiFramework: c,
91
+ errorFallback: l,
92
+ onError: u,
93
+ analytics: d,
94
+ disclosuresAcceptance: p,
95
+ providerLabels: m,
96
+ children: /* @__PURE__ */ y(C, { ...h })
97
+ });
98
+ }
99
+ //#endregion
100
+ export { w as BillPayWidgetNative, w as default };
@@ -1,27 +1 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
- import "../../../shared/feature/dist/index.js";
8
- import { BillPayWidgetMonite as n } from "./index66.js";
9
- import "./index67.js";
10
- import { BillPayWidgetNative as r } from "./index85.js";
11
1
  import "./index86.js";
12
- import { jsx as i } from "react/jsx-runtime";
13
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js
14
- function a({ implementation: a, initialTab: o, onSettingsClick: s, ...c }) {
15
- let l = t().implementation, u = a ?? l ?? e.Monite;
16
- return u === e.Native ? /* @__PURE__ */ i(r, {
17
- implementation: u,
18
- initialTab: o,
19
- onSettingsClick: s,
20
- ...c
21
- }) : /* @__PURE__ */ i(n, {
22
- implementation: u,
23
- ...c
24
- });
25
- }
26
- //#endregion
27
- export { a as BillPayWidget, a as default };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
+ import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
+ import "../../../shared/feature/dist/index.js";
8
+ import { BillPayWidgetMonite as n } from "./index67.js";
9
+ import "./index68.js";
10
+ import { BillPayWidgetNative as r } from "./index86.js";
11
+ import "./index87.js";
12
+ import { jsx as i } from "react/jsx-runtime";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js
14
+ function a({ implementation: a, initialTab: o, onSettingsClick: s, ...c }) {
15
+ let l = t().implementation, u = a ?? l ?? e.Monite;
16
+ return u === e.Native ? /* @__PURE__ */ i(r, {
17
+ implementation: u,
18
+ initialTab: o,
19
+ onSettingsClick: s,
20
+ ...c
21
+ }) : /* @__PURE__ */ i(n, {
22
+ implementation: u,
23
+ ...c
24
+ });
25
+ }
26
+ //#endregion
27
+ export { a as BillPayWidget, a as default };
@@ -11,7 +11,7 @@ import "./index12.js";
11
11
  import "./index13.js";
12
12
  import "./index14.js";
13
13
  import "./index17.js";
14
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index18.js";
14
+ import "./index18.js";
15
15
  import "./index19.js";
16
16
  import "./index20.js";
17
17
  import "./index21.js";
@@ -35,19 +35,19 @@ import "./index39.js";
35
35
  import "./index40.js";
36
36
  import "./index41.js";
37
37
  import "./index42.js";
38
- import { VendorSearchCombobox as n } from "./index43.js";
38
+ import { VendorSearchCombobox as t } from "./index43.js";
39
39
  import "./index44.js";
40
40
  import "./index45.js";
41
41
  import "./index46.js";
42
42
  import "./index47.js";
43
43
  import "./index48.js";
44
- import { BillCreateScreen as r } from "./index50.js";
44
+ import { BillCreateScreen as n } from "./index50.js";
45
45
  import "./index51.js";
46
46
  import "./index52.js";
47
- import { BillPayWidgetUi as i } from "./index53.js";
47
+ import { BillPayWidgetUi as r } from "./index53.js";
48
48
  import "./index54.js";
49
49
  import "./index55.js";
50
- import { BillDecisionDialog as a } from "./index56.js";
50
+ import { BillDecisionDialog as i } from "./index56.js";
51
51
  import "./index57.js";
52
52
  import "./index58.js";
53
53
  import "./index59.js";
@@ -55,50 +55,50 @@ import "./index60.js";
55
55
  import "./index61.js";
56
56
  import "./index62.js";
57
57
  import "./index63.js";
58
- import { BILL_DETAILS_SHEET_LABELS_EN as o } from "./index64.js";
59
- import { BillDetailsSheet as s } from "./index65.js";
60
- import { DISCARD_CHANGES_DIALOG_LABELS_EN as c } from "./index66.js";
61
- import { DiscardChangesDialog as l } from "./index67.js";
58
+ import { BILL_DETAILS_SHEET_LABELS_EN as a } from "./index64.js";
59
+ import { BillDetailsSheet as o } from "./index65.js";
60
+ import { DISCARD_CHANGES_DIALOG_LABELS_EN as s } from "./index66.js";
61
+ import { DiscardChangesDialog as c } from "./index67.js";
62
62
  import "./index68.js";
63
63
  import "./index69.js";
64
64
  import "./index70.js";
65
65
  import "./index71.js";
66
- import { BillDuplicateNotice as u } from "./index72.js";
66
+ import { BillDuplicateNotice as l } from "./index72.js";
67
67
  import "./index73.js";
68
- import { BILL_REJECTED_BANNER_LABELS_EN as d } from "./index74.js";
69
- import { BillRejectedBanner as f } from "./index75.js";
68
+ import { BILL_REJECTED_BANNER_LABELS_EN as u } from "./index74.js";
69
+ import { BillRejectedBanner as d } from "./index75.js";
70
70
  import "./index76.js";
71
71
  import "./index77.js";
72
- import { BillsFilterField as p } from "./index78.js";
72
+ import { BillsFilterField as f } from "./index78.js";
73
73
  import "./index79.js";
74
74
  import "./index80.js";
75
- import { BillColumn as m } from "./index81.js";
76
- import { BillsScreen as h } from "./index82.js";
75
+ import { BillColumn as p } from "./index81.js";
76
+ import { BillsScreen as m } from "./index82.js";
77
77
  import "./index83.js";
78
- import { BillUploadStatusTray as g } from "./index85.js";
78
+ import { BillUploadStatusTray as h } from "./index85.js";
79
79
  import "./index87.js";
80
80
  import "./index89.js";
81
- import { DuplicateBillsDialog as _ } from "./index90.js";
81
+ import { DuplicateBillsDialog as g } from "./index90.js";
82
82
  import "./index91.js";
83
83
  import "./index92.js";
84
- import { ExtractionNotice as v } from "./index93.js";
84
+ import { ExtractionNotice as _ } from "./index93.js";
85
85
  import "./index94.js";
86
86
  import "./index95.js";
87
87
  import "./index96.js";
88
88
  import "./index97.js";
89
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as y } from "./index98.js";
90
- import { ReviewTransactionDialog as b } from "./index99.js";
89
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as v } from "./index98.js";
90
+ import { ReviewTransactionDialog as y } from "./index99.js";
91
91
  import "./index100.js";
92
- import { MARK_AS_PAID_DIALOG_LABELS_EN as x } from "./index101.js";
93
- import { MarkAsPaidDialog as S } from "./index102.js";
92
+ import { MARK_AS_PAID_DIALOG_LABELS_EN as b } from "./index101.js";
93
+ import { MarkAsPaidDialog as x } from "./index102.js";
94
94
  import "./index103.js";
95
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as C } from "./index104.js";
96
- import { SchedulePaymentDialog as w } from "./index106.js";
95
+ import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as S } from "./index104.js";
96
+ import { SchedulePaymentDialog as C } from "./index106.js";
97
97
  import "./index107.js";
98
98
  import "./index108.js";
99
- import { SourceDocumentPanel as T } from "./index109.js";
99
+ import { SourceDocumentPanel as w } from "./index109.js";
100
100
  import "./index110.js";
101
- import { UNSAVED_BILL_DIALOG_LABELS_EN as E } from "./index111.js";
102
- import { UnsavedBillDialog as D } from "./index112.js";
101
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as T } from "./index111.js";
102
+ import { UnsavedBillDialog as E } from "./index112.js";
103
103
  import "./index113.js";
104
- export { e as AddBillDialog, o as BILL_DETAILS_SHEET_LABELS_EN, d as BILL_REJECTED_BANNER_LABELS_EN, t as BILL_STATUS_BADGE_LABELS_EN, m as BillColumn, r as BillCreateScreen, a as BillDecisionDialog, s as BillDetailsSheet, u as BillDuplicateNotice, i as BillPayWidgetUi, f as BillRejectedBanner, g as BillUploadStatusTray, p as BillsFilterField, h as BillsScreen, c as DISCARD_CHANGES_DIALOG_LABELS_EN, l as DiscardChangesDialog, _ as DuplicateBillsDialog, v as ExtractionNotice, x as MARK_AS_PAID_DIALOG_LABELS_EN, S as MarkAsPaidDialog, y as REVIEW_TRANSACTION_DIALOG_LABELS_EN, b as ReviewTransactionDialog, C as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, w as SchedulePaymentDialog, T as SourceDocumentPanel, E as UNSAVED_BILL_DIALOG_LABELS_EN, D as UnsavedBillDialog, n as VendorSearchCombobox };
104
+ export { e as AddBillDialog, a as BILL_DETAILS_SHEET_LABELS_EN, u as BILL_REJECTED_BANNER_LABELS_EN, p as BillColumn, n as BillCreateScreen, i as BillDecisionDialog, o as BillDetailsSheet, l as BillDuplicateNotice, r as BillPayWidgetUi, d as BillRejectedBanner, h as BillUploadStatusTray, f as BillsFilterField, m as BillsScreen, s as DISCARD_CHANGES_DIALOG_LABELS_EN, c as DiscardChangesDialog, g as DuplicateBillsDialog, _ as ExtractionNotice, b as MARK_AS_PAID_DIALOG_LABELS_EN, x as MarkAsPaidDialog, v as REVIEW_TRANSACTION_DIALOG_LABELS_EN, y as ReviewTransactionDialog, S as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, C as SchedulePaymentDialog, w as SourceDocumentPanel, T as UNSAVED_BILL_DIALOG_LABELS_EN, E as UnsavedBillDialog, t as VendorSearchCombobox };
@@ -14,8 +14,8 @@ import { RefreshingRootWidgetProvider as m } from "./lib/WidgetProvider/Refreshi
14
14
  import { useDisclosuresAcceptanceSurface as h, useOwnWidgetConfig as g, useRefetchWidget as _, useWidgetConfig as v, useWidgetError as y, useWidgetInitStaleForToken as b, useWidgetLoading as x } from "./lib/WidgetProvider/hooks.js";
15
15
  import "./lib/WidgetProvider/index.js";
16
16
  import { getNaicsOptions as S } from "./lib/naicsCodeMap.js";
17
- import "./lib/user/useOrganizationUserNames.js";
18
- import { CardProgram as C } from "./lib/card/cardProgram.js";
19
- import { CARD_STATUS_LABELS_EN as w, CARD_STATUS_TONE as T, CARD_TYPE_LABELS_EN as E } from "./lib/card/cardPresentation.js";
17
+ import { useOrganizationUserNames as C } from "./lib/user/useOrganizationUserNames.js";
18
+ import { CardProgram as w } from "./lib/card/cardProgram.js";
19
+ import { CARD_STATUS_LABELS_EN as T, CARD_STATUS_TONE as E, CARD_TYPE_LABELS_EN as D } from "./lib/card/cardPresentation.js";
20
20
  import "./lib/analytics/index.js";
21
- export { w as CARD_STATUS_LABELS_EN, T as CARD_STATUS_TONE, E as CARD_TYPE_LABELS_EN, C as CardProgram, t as Implementation, m as RefreshingRootWidgetProvider, s as RootWidgetProvider, u as WidgetProvider, d as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, S as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsCaptureException, l as useAnalyticsTrack, h as useDisclosuresAcceptanceSurface, f as useOptionalWidgetToken, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
21
+ export { T as CARD_STATUS_LABELS_EN, E as CARD_STATUS_TONE, D as CARD_TYPE_LABELS_EN, w as CardProgram, t as Implementation, m as RefreshingRootWidgetProvider, s as RootWidgetProvider, u as WidgetProvider, d as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, S as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsCaptureException, l as useAnalyticsTrack, h as useDisclosuresAcceptanceSurface, f as useOptionalWidgetToken, C as useOrganizationUserNames, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.46", n = "7ed62f1c9c42f46a440e931eb21935bfda9f5e66", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.47", n = "785e2bd58161d610aed5483b8f00f53c3713758a", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -2,5 +2,17 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
+ import { useAllOrganizationUsersQuery as e } from "../../../../data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
5
6
  import "../../../../data-access/dist/index.js";
6
- import "react";
7
+ import { useMemo as t } from "react";
8
+ //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/user/useOrganizationUserNames.js
9
+ function n({ enabled: n } = {}) {
10
+ let r = e({ enabled: n });
11
+ return {
12
+ userNames: t(() => new Map((r.data?.data ?? []).filter((e) => !!e.name).map((e) => [e.id, e.name])), [r.data]),
13
+ isResolving: r.isResolving,
14
+ isError: r.isError
15
+ };
16
+ }
17
+ //#endregion
18
+ export { n as useOrganizationUserNames };
@@ -0,0 +1,137 @@
1
+ import { resolveAuditActorName as e, withAuditActor as t } from "./auditHistoryActor.js";
2
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js
3
+ var n = /* @__PURE__ */ new Set(["approve", "approved"]), r = /* @__PURE__ */ new Set(["reject", "rejected"]);
4
+ function i(e) {
5
+ return typeof e == "string" && e ? e : void 0;
6
+ }
7
+ function a(e, t) {
8
+ return e.payable_source === "email" ? t.createdFromEmail : e.source_of_payable_data === "ocr" ? t.createdFromUpload : t.createdManually;
9
+ }
10
+ function o(e) {
11
+ return e.is_external === !1 || e.is_external !== !0 && !!e.payment_intent_id;
12
+ }
13
+ function s(e, t) {
14
+ return e === void 0 ? void 0 : t.paid(t.formatAmount(e));
15
+ }
16
+ function c(e, t, n) {
17
+ return e && t ? n.actorWithReason(e, t) : t ? n.quotedReason(t) : e;
18
+ }
19
+ function l(t, a, o, s, l) {
20
+ let u = a.action, d = a.approval_source === "force", f = e(t, s), p = i(a.reject_reason);
21
+ if (n.has(u)) {
22
+ let e = l.approved;
23
+ return d ? e = l.policyOverrideApproved : o?.required && (e = l.approvedCount(o.approved, o.required)), {
24
+ title: e,
25
+ meta: c(f, p, l),
26
+ actorInMeta: !0
27
+ };
28
+ }
29
+ if (r.has(u)) return {
30
+ title: d ? l.policyOverrideRejected : l.rejected,
31
+ meta: c(f, p, l),
32
+ actorInMeta: !0
33
+ };
34
+ }
35
+ function u(e, t, n, r) {
36
+ let c = e.event_data ?? {};
37
+ switch (e.event_type) {
38
+ case "payable_created": return {
39
+ title: t.billCreated,
40
+ meta: a(c, t)
41
+ };
42
+ case "payable_updated": return { title: t.billDetailsUpdated };
43
+ case "submitted_for_approval": return { title: t.submittedForReview };
44
+ case "approval_requested": return {
45
+ title: t.approvalRequested,
46
+ meta: i(c.approval_policy_name)
47
+ };
48
+ case "approval_action": return l(e, c, n.approval, r, t);
49
+ case "auto_approved": return {
50
+ title: t.approvedAutomatically,
51
+ meta: i(c.approval_policy_name)
52
+ };
53
+ case "status_changed": return c.new_status === "canceled" ? { title: t.cancelled } : void 0;
54
+ case "reopened": return { title: t.reopened };
55
+ case "marked_as_paid": return {
56
+ title: o(c) ? t.paymentReleased : t.billMarkedAsFullyPaid,
57
+ meta: s(n.paidIncrement, t)
58
+ };
59
+ case "marked_as_partially_paid": return {
60
+ title: o(c) ? t.paymentReleased : t.billMarkedAsPartiallyPaid,
61
+ meta: s(n.paidIncrement, t)
62
+ };
63
+ case "payment_reverted": return { title: t.paymentReverted };
64
+ case "deleted": return { title: t.draftDeleted };
65
+ case "file_attached": return {
66
+ title: t.fileAttached,
67
+ meta: i(c.file_name)
68
+ };
69
+ case "file_detached": return {
70
+ title: t.fileRemoved,
71
+ meta: i(c.file_name)
72
+ };
73
+ case "credit_note_linked": return { title: t.creditNoteLinked };
74
+ case "credit_note_unlinked": return { title: t.creditNoteUnlinked };
75
+ case "line_item_added": return {
76
+ title: t.lineItemsUpdated,
77
+ meta: t.lineItemAdded
78
+ };
79
+ case "line_item_updated": return {
80
+ title: t.lineItemsUpdated,
81
+ meta: t.lineItemUpdated
82
+ };
83
+ case "line_item_removed": return {
84
+ title: t.lineItemsUpdated,
85
+ meta: t.lineItemRemoved
86
+ };
87
+ default: return;
88
+ }
89
+ }
90
+ function d(e) {
91
+ let t = /* @__PURE__ */ new Map(), r = 0, i, a = 0, o = [...e].sort((e, t) => Date.parse(e.timestamp) - Date.parse(t.timestamp));
92
+ for (let e of o) {
93
+ let o = e.event_data ?? {};
94
+ switch (e.event_type) {
95
+ case "submitted_for_approval":
96
+ r = 0, i = void 0;
97
+ break;
98
+ case "approval_requested": {
99
+ r = 0;
100
+ let e = o.required_approval_count;
101
+ i = typeof e == "number" && e > 0 ? e : void 0;
102
+ break;
103
+ }
104
+ case "approval_action":
105
+ n.has(o.action) && o.approval_source !== "force" && (r += 1, t.set(e.id, { approval: {
106
+ approved: r,
107
+ required: i
108
+ } }));
109
+ break;
110
+ case "marked_as_paid":
111
+ case "marked_as_partially_paid":
112
+ case "payment_reverted": {
113
+ let n = o.amount_paid;
114
+ if (typeof n != "number") break;
115
+ let r = n - a;
116
+ a = n, e.event_type !== "payment_reverted" && t.set(e.id, { paidIncrement: r > 0 ? r : n });
117
+ break;
118
+ }
119
+ }
120
+ }
121
+ return t;
122
+ }
123
+ function f(e, n, r) {
124
+ let i = d(e);
125
+ return e.flatMap((e) => {
126
+ let a = u(e, r, i.get(e.id) ?? {}, n);
127
+ return a ? [{
128
+ id: e.id,
129
+ dateLabel: r.dateLabel(e.timestamp),
130
+ timeLabel: r.timeLabel(e.timestamp),
131
+ title: a.actorInMeta ? a.title : t(a.title, e, n, r),
132
+ meta: a.meta
133
+ }] : [];
134
+ });
135
+ }
136
+ //#endregion
137
+ export { f as buildPayableAuditHistory };
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
6
6
  import "../../../shared/data-access/dist/index.js";
7
- import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index87.js";
7
+ import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index88.js";
8
8
  import "../../../bill-pay-widget/feature/dist/index.js";
9
9
  import { jsx as n } from "react/jsx-runtime";
10
10
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.46",
3
+ "version": "0.5.47",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {