@tesouro/embedded-components-react 0.5.280 → 0.5.282

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 (53) hide show
  1. package/dist/index.css +8 -0
  2. package/dist/index.d.ts +2 -2
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +2 -2
  4. package/dist/lib/WidgetSuite.d.ts +2 -2
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +1 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +8 -8
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +7 -28
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +8 -160
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +20 -13
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +148 -27
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +21 -96
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +37 -79
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +98 -3
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +83 -54
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +3 -113
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +54 -184
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +108 -75
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +181 -29
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +74 -83
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +27 -412
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +88 -12
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +413 -77
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +13 -80
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +77 -226
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +78 -41
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +216 -234
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +44 -23
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +233 -611
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +25 -4
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +647 -39
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +4 -243
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +42 -3
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +250 -3
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +2 -66
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +5 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +67 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +1 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +11 -11
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +47 -47
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js +19 -19
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index4.js +15 -15
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2 -0
  49. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +1 -0
  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/ui/dist/lib/OnboardingShell/OnboardingShell.js +1 -1
  52. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +2 -2
  53. package/package.json +1 -1
@@ -1,35 +1,187 @@
1
+ import { AWAITING_APPROVAL_LABEL_EN as e, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as t, BILL_DETAIL_ACTIONS_LABELS_EN as n, PAYMENT_HISTORY_LABELS_EN as r, SCHEDULED_RELATIVE_DAY_LABELS_EN as i, SCHEDULED_STATUS_BADGE_LABEL_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o, mergeBillDetailActionsLabels as s, mergePaymentHistoryMethodLabels as c } from "../../../util/dist/lib/billDetailLabels.js";
2
+ import { APPROVAL_POLICY_RULE_COPY_EN as l } from "./index8.js";
3
+ import { PAYABLE_AUDIT_HISTORY_LABELS_EN as u } from "./index23.js";
4
+ import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as d } from "./index24.js";
5
+ import { ACH_FIELD_GROUP_LABELS_EN as f } from "../../../../shared/counterpart-management/ui/dist/index2.js";
6
+ import "../../../../shared/counterpart-management/ui/dist/index.js";
7
+ import { BILL_REJECTED_BANNER_LABELS_EN as p } from "../../ui/dist/index39.js";
8
+ import { DISCARD_CHANGES_DIALOG_LABELS_EN as m } from "../../ui/dist/index42.js";
9
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as h } from "../../ui/dist/index51.js";
10
+ import "../../ui/dist/index.js";
1
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js
2
- function e(e) {
3
- return e?.trim() ?? "";
4
- }
5
- function t(t) {
6
- let n = e(t);
7
- return n.length === 2 ? n.toUpperCase() : "";
8
- }
9
- function n(t) {
10
- let n = e(t.bank_account?.routing_number), r = e(t.bank_account?.account_number);
11
- if (n || r) return {
12
- accountHolderName: e(t.bank_account?.account_holder_name) || e(t.name),
13
- routingNumber: n,
14
- accountNumber: r
12
+ var g = {
13
+ unmappedValidationError: (e, t) => `${e}: ${t}`,
14
+ unknownValidationField: "(unknown field)",
15
+ requiredField: "This field is required.",
16
+ saveFailed: "We could not save this bill. Try again.",
17
+ discountTaxBlockedByLineItems: "Discount and Tax can't be saved on a bill with line items. Remove them, then save again.",
18
+ vendorResolutionFailed: "We couldn't create this vendor automatically. Select or add a vendor before submitting.",
19
+ finalizeFailed: "We could not submit this bill. Try again.",
20
+ draftSaved: "Bill saved as a draft.",
21
+ submittedSaved: "Bill updated.",
22
+ submittedDemoted: "Bill updated. It moved back to Drafts because some required details are missing.",
23
+ billFinalized: "Bill submitted for approval.",
24
+ numbersOnly: "Enter numbers only.",
25
+ unreadableMoney: "Enter a valid amount.",
26
+ unusableQuantity: "Enter a quantity greater than 0.",
27
+ lineItemsNeedAttention: "Check the highlighted line items before saving.",
28
+ unreadableDiscount: "Enter a valid discount amount.",
29
+ unreadableTax: "Enter a valid tax amount.",
30
+ unreadableTotal: "Enter a valid total amount.",
31
+ totalNotGreaterThanZero: "Total amount must be greater than $0.",
32
+ poNumberTooLong: "PO number must be 255 characters or fewer.",
33
+ implausibleInvoiceDate: "Enter an invoice date within the last 10 years, no more than 30 days from today.",
34
+ implausibleDueDate: "Enter a due date within the last 10 years and next 5 years.",
35
+ dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
36
+ }, _ = {
37
+ paymentInstructionsValue: (e) => `Account ending in ${e}`,
38
+ noMethod: "No payment method on file",
39
+ paymentMethodLoading: "Loading payment method...",
40
+ paymentMethodUnavailable: "We could not load payment methods. Try again.",
41
+ searchFailed: "We could not load vendors. Try again.",
42
+ vendorDetailsFailed: "We could not load this vendor. Try again.",
43
+ pendingVendorDescription: "Will be created when submitted",
44
+ bankAccountSaveFailed: "We could not save these payment instructions. Try again."
45
+ }, v = {
46
+ attachFailed: "We could not attach that file. Try again.",
47
+ deleteFailed: "We could not remove that document. Try again.",
48
+ noDocument: "No document attached to this bill.",
49
+ pendingDeletionNotice: "This document will be removed when you save this bill.",
50
+ preview: d
51
+ }, y = {
52
+ ...r,
53
+ notProvided: "Not provided",
54
+ paymentInstructionsValue: (e) => `Account ending in ${e}`,
55
+ paymentInstructionsNotSet: "Not set",
56
+ invoiceDateRow: "Invoice date",
57
+ dueDateRow: "Due date",
58
+ invoiceNumberRow: "Invoice number",
59
+ glCodeMissing: "GL code not specified",
60
+ glCodeUnavailable: "GL code unavailable",
61
+ qtyPriceValue: (e, t) => `${e} x ${t}`,
62
+ qtyOnlyValue: (e) => e,
63
+ subtotalRow: "Subtotal",
64
+ taxRow: "Tax",
65
+ discountRow: "Discounts",
66
+ totalRow: "Total",
67
+ paidOnLabel: (e) => `Paid on ${e}`,
68
+ paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
69
+ paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
70
+ rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
71
+ rejectedOn: (e) => `Rejected on ${e}`,
72
+ rejectionMessage: (e) => `"${e}"`
73
+ }, b = {
74
+ newTitle: "New bill",
75
+ extractedTitle: (e) => `Bill from ${e}`,
76
+ viewTitle: (e) => `Bill from ${e}`,
77
+ readOnlyTitle: "Bill details",
78
+ addedOn: (e) => `Added on ${e}`,
79
+ unsavedChanges: h,
80
+ discardChanges: m,
81
+ scheduledRelativeDay: i,
82
+ scheduledSummary: o,
83
+ scheduledStatusBadge: a,
84
+ awaitingApprovalNotice: e,
85
+ awaitingApprovalUnknownNotice: t,
86
+ actions: n,
87
+ detail: y,
88
+ history: u,
89
+ approvalPolicyCopy: l,
90
+ deleteDraft: {
91
+ menuItem: "Delete draft",
92
+ dialog: {
93
+ title: "Delete this draft?",
94
+ description: "The draft and anything entered on it are removed. This can't be undone.",
95
+ confirmButton: "Delete draft"
96
+ },
97
+ error: "Couldn't delete this draft. Try again."
98
+ },
99
+ lineItemsGlCodeUnavailable: {
100
+ loadError: "Couldn't load GL codes",
101
+ noAccess: "You don't have access to GL codes",
102
+ empty: "No GL codes set up yet"
103
+ },
104
+ rejectedBanner: p
105
+ };
106
+ function x(e) {
107
+ return {
108
+ ...b,
109
+ ...e,
110
+ actions: s(e?.actions),
111
+ detail: {
112
+ ...b.detail,
113
+ ...e?.detail,
114
+ paymentHistoryMethodLabels: c(e?.detail?.paymentHistoryMethodLabels)
115
+ },
116
+ history: {
117
+ ...b.history,
118
+ ...e?.history
119
+ },
120
+ lineItemsGlCodeUnavailable: {
121
+ ...b.lineItemsGlCodeUnavailable,
122
+ ...e?.lineItemsGlCodeUnavailable
123
+ },
124
+ unsavedChanges: {
125
+ ...b.unsavedChanges,
126
+ ...e?.unsavedChanges
127
+ },
128
+ discardChanges: {
129
+ ...b.discardChanges,
130
+ ...e?.discardChanges
131
+ },
132
+ rejectedBanner: {
133
+ ...b.rejectedBanner,
134
+ ...e?.rejectedBanner
135
+ },
136
+ approvalPolicyCopy: {
137
+ ...b.approvalPolicyCopy,
138
+ ...e?.approvalPolicyCopy
139
+ },
140
+ scheduledRelativeDay: {
141
+ ...b.scheduledRelativeDay,
142
+ ...e?.scheduledRelativeDay
143
+ },
144
+ deleteDraft: {
145
+ ...b.deleteDraft,
146
+ ...e?.deleteDraft,
147
+ dialog: (() => {
148
+ let t = {
149
+ ...b.deleteDraft.dialog,
150
+ ...e?.deleteDraft?.dialog
151
+ };
152
+ return delete t.reason, t;
153
+ })()
154
+ }
15
155
  };
16
156
  }
17
- function r(r) {
18
- if (!r) return;
19
- let i = {
20
- legalName: e(r.name),
21
- email: e(r.email),
22
- phone: e(r.phone),
23
- address: {
24
- line1: e(r.address?.line1),
25
- line2: e(r.address?.line2),
26
- city: e(r.address?.city),
27
- state: t(r.address?.state),
28
- postalCode: e(r.address?.postal_code)
29
- },
30
- bankAccount: n(r)
157
+ var S = {
158
+ createTitle: "New vendor",
159
+ editTitle: "Edit vendor",
160
+ switchVendorFieldLabel: "Switch to a different vendor",
161
+ nameLabel: "Business name",
162
+ addAddress: "Add address (optional)",
163
+ cancel: "Cancel",
164
+ save: "Save",
165
+ cancelAriaLabel: "Cancel vendor",
166
+ saveAriaLabel: "Save vendor",
167
+ paymentInstructionsHeading: "Payment instructions",
168
+ paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
169
+ paymentInstructionsExtracted: "We read these from the bill. Check them before saving.",
170
+ ach: f
171
+ };
172
+ function C(e) {
173
+ return {
174
+ ...S,
175
+ ...e,
176
+ ach: {
177
+ ...S.ach,
178
+ ...e?.ach,
179
+ fieldMarkers: {
180
+ ...S.ach.fieldMarkers,
181
+ ...e?.ach?.fieldMarkers
182
+ }
183
+ }
31
184
  };
32
- return i.legalName || i.email || i.phone || Object.values(i.address).some(Boolean) || i.bankAccount ? i : void 0;
33
185
  }
34
186
  //#endregion
35
- export { r as buildVendorPrefill };
187
+ export { g as BILL_CREATE_MESSAGE_LABELS_EN, b as BILL_CREATE_SCREEN_LABELS_EN, y as BILL_DETAIL_VIEW_LABELS_EN, v as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, S as VENDOR_INLINE_FORM_LABELS_EN, _ as VENDOR_SECTION_PROPS_LABELS_EN, x as mergeBillCreateScreenCopy, C as mergeVendorInlineFormLabels };
@@ -2,91 +2,82 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.js";
7
- import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
8
- import { CounterpartFormFields as r, useFocusFirstInvalidField as i } from "../../../../shared/counterpart-management/ui/dist/index9.js";
9
- import "../../../../shared/counterpart-management/ui/dist/index.js";
10
- import { VendorSearchCombobox as a } from "../../ui/dist/index24.js";
5
+ import { createSourceDocumentPreview as e } from "./index24.js";
6
+ import { SourceDocumentPanel as t } from "../../ui/dist/index49.js";
11
7
  import "../../ui/dist/index.js";
12
- import { mergeVendorInlineFormLabels as o } from "./index23.js";
13
- import "../../../../shared/counterpart-management/feature/dist/index.js";
14
- import { useMemo as s } from "react";
15
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as n } from "./index25.js";
9
+ import { useAttachPayableFileMutation as r } from "../../data-access/dist/index5.js";
10
+ import "../../data-access/dist/index.js";
11
+ import { useEffect as i, useState as a } from "react";
12
+ import { jsx as o } from "react/jsx-runtime";
16
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js
17
- function u({ mode: u, values: d, errors: f, onChange: p, onAddressChange: m, sectionsToExpand: h, onAddressExpand: g, onCancel: _, onSave: v, isSaving: y = !1, search: b, paymentInstructions: x, labels: S }) {
18
- let C = s(() => o(S), [S]), w = s(() => t(), []), T = i(f ?? {});
19
- return /* @__PURE__ */ l("div", {
20
- ref: T,
21
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
22
- children: [
23
- /* @__PURE__ */ c("p", {
24
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
25
- children: u === "edit" ? C.editTitle : C.createTitle
26
- }),
27
- u === "edit" && b ? /* @__PURE__ */ c(a, {
28
- ...b,
29
- labels: { fieldLabel: C.switchVendorFieldLabel }
30
- }) : null,
31
- /* @__PURE__ */ c(r, {
32
- mode: u,
33
- counterpartMode: "vendor",
34
- values: d,
35
- errors: f,
36
- stateOptions: w,
37
- onChange: p,
38
- onAddressChange: m,
39
- sections: {
40
- entityType: !0,
41
- profileHeading: !1,
42
- title: !1,
43
- taxId: !1,
44
- address: "collapsible",
45
- bankAccount: !1
46
- },
47
- sectionsToExpand: h,
48
- onAddressExpand: g,
49
- labels: { businessNameLabel: C.nameLabel }
50
- }),
51
- x ? /* @__PURE__ */ l("div", {
52
- className: "ttw:flex ttw:flex-col ttw:gap-3",
53
- children: [/* @__PURE__ */ l("div", {
54
- className: "ttw:flex ttw:flex-col ttw:gap-1",
55
- children: [/* @__PURE__ */ c("p", {
56
- className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
57
- children: C.paymentInstructionsHeading
58
- }), /* @__PURE__ */ c("p", {
59
- className: "ttw:text-sm ttw:text-muted-foreground",
60
- children: x.isExtracted ? C.paymentInstructionsExtracted : C.paymentInstructionsDescription
61
- })]
62
- }), /* @__PURE__ */ c(n, {
63
- idPrefix: "vendor-inline-ach",
64
- values: x.values,
65
- errors: x.errors,
66
- onChange: x.onChange,
67
- labels: C.ach
68
- })]
69
- }) : null,
70
- /* @__PURE__ */ l("div", {
71
- className: "ttw:flex ttw:justify-end ttw:gap-2",
72
- children: [/* @__PURE__ */ c(e, {
73
- type: "button",
74
- variant: "outline",
75
- onClick: _,
76
- "aria-label": C.cancelAriaLabel,
77
- disabled: y,
78
- children: C.cancel
79
- }), v ? /* @__PURE__ */ c(e, {
80
- type: "button",
81
- onClick: v,
82
- "aria-label": C.saveAriaLabel,
83
- loading: y,
84
- disabled: y,
85
- children: C.save
86
- }) : null]
87
- })
88
- ]
14
+ function s(e) {
15
+ let [t, n] = a();
16
+ return i(() => {
17
+ if (!e) {
18
+ n(void 0);
19
+ return;
20
+ }
21
+ let t = URL.createObjectURL(e);
22
+ return n(t), () => URL.revokeObjectURL(t);
23
+ }, [e]), t;
24
+ }
25
+ function c({ payableId: i, file: a, isDocumentPending: c, pendingFileName: l, readOnly: u, staging: d, deletion: f, labels: p }) {
26
+ let { stagedFile: m, onFileStaged: h, onClearStagedFile: g, isSaving: _ } = d ?? {}, { isPending: v, onRequest: y, onDetachNow: b, isDeleting: x, hasFailed: S } = f ?? {}, C = {
27
+ ...n,
28
+ ...p,
29
+ preview: {
30
+ ...n.preview,
31
+ ...p?.preview
32
+ }
33
+ }, w = r(), T = s(m), E = !!(a && !v || m);
34
+ if (!E && (c || w.isPending)) return /* @__PURE__ */ o(t, {
35
+ mode: "loading",
36
+ fileName: l,
37
+ labels: p?.panel
38
+ });
39
+ if (!E && u) return /* @__PURE__ */ o("div", {
40
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:text-sm ttw:text-muted-foreground",
41
+ children: C.noDocument
42
+ });
43
+ if (!E) return /* @__PURE__ */ o(t, {
44
+ mode: "upload",
45
+ labels: p?.panel,
46
+ uploadStatus: w.isPending || x ? "uploading" : "idle",
47
+ uploadErrorMessage: w.isError ? C.attachFailed : S ? C.deleteFailed : void 0,
48
+ noticeMessage: v && !S ? C.pendingDeletionNotice : void 0,
49
+ onFilesSelected: (e) => {
50
+ let [t] = e;
51
+ if (t) {
52
+ if (i) {
53
+ let e = () => w.mutate({
54
+ path: { payable_id: i },
55
+ file: t
56
+ });
57
+ if (v && b) {
58
+ b().then(e, () => void 0);
59
+ return;
60
+ }
61
+ e();
62
+ } else h?.(t);
63
+ }
64
+ }
65
+ });
66
+ let D = a?.name ?? m?.name ?? "", O = e(a || {
67
+ name: D,
68
+ url: T ?? "",
69
+ mimetype: m?.type ?? ""
70
+ }, C.preview);
71
+ return /* @__PURE__ */ o(t, {
72
+ mode: "document",
73
+ labels: p?.panel,
74
+ fileName: D,
75
+ preview: O,
76
+ isDeleting: x,
77
+ deleteErrorMessage: S ? C.deleteFailed : void 0,
78
+ onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
79
+ onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
89
80
  });
90
81
  }
91
82
  //#endregion
92
- export { u as VendorInlineForm, u as default };
83
+ export { c as SourceDocumentContainer, c as default };