@tesouro/embedded-components-react 0.5.214 → 0.5.216
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.
- package/dist/index.d.ts +144 -3
- package/dist/index.js +14 -13
- package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
- package/dist/lib/BankAccountOnboardingWidget.js +4 -3
- package/dist/lib/MarketingWidget.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +88 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +53 -0
- package/dist/libs/shared/util-validation/dist/index5.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +34 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +3 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +167 -156
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
|
@@ -1,16 +1,161 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button as e, Checkbox as t, Separator as n, Typography as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_FORM_SHEET_LABELS_EN as a } from "./index4.js";
|
|
3
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { FileText as l, ImageIcon as u, Loader2 as d, Trash2 as f, X as p } from "lucide-react";
|
|
2
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
function m({ view: m, isDragging: h, disabled: g, inputRef: _, onBrowseClick: v, onDragOver: y, onDragLeave: b, onDrop: x, onFilesSelect: S, onIncludeInEmailChange: C, onRemove: w, labels: T }) {
|
|
7
|
+
let E = {
|
|
8
|
+
...a,
|
|
9
|
+
...T
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ c("div", {
|
|
12
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ c("div", {
|
|
15
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
16
|
+
children: [/* @__PURE__ */ s(r, {
|
|
17
|
+
variant: "h4",
|
|
18
|
+
children: E.attachmentsHeading
|
|
19
|
+
}), /* @__PURE__ */ s(r, {
|
|
20
|
+
variant: "body2",
|
|
21
|
+
color: "muted",
|
|
22
|
+
className: "ttw:font-medium",
|
|
23
|
+
children: E.attachmentsDescription
|
|
24
|
+
})]
|
|
25
|
+
}),
|
|
26
|
+
m.showRows && /* @__PURE__ */ c("div", {
|
|
27
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
28
|
+
children: [m.emailCaption && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(r, {
|
|
29
|
+
variant: "caption",
|
|
30
|
+
color: "muted",
|
|
31
|
+
children: m.emailCaption
|
|
32
|
+
}), /* @__PURE__ */ s(n, {})] }), /* @__PURE__ */ c("ul", {
|
|
33
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
34
|
+
children: [m.attachedRows.map((n) => /* @__PURE__ */ c("li", {
|
|
35
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ s(t, {
|
|
37
|
+
checked: n.includeInEmail,
|
|
38
|
+
disabled: g,
|
|
39
|
+
"aria-label": n.includeInEmailLabel,
|
|
40
|
+
onCheckedChange: (e) => C(n.id, e === !0)
|
|
41
|
+
}), /* @__PURE__ */ c("div", {
|
|
42
|
+
className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
|
|
43
|
+
children: [/* @__PURE__ */ c("div", {
|
|
44
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:gap-1",
|
|
45
|
+
children: [/* @__PURE__ */ s(r, {
|
|
46
|
+
variant: "body2",
|
|
47
|
+
className: "ttw:truncate",
|
|
48
|
+
children: n.name
|
|
49
|
+
}), /* @__PURE__ */ c(r, {
|
|
50
|
+
variant: "body2",
|
|
51
|
+
color: "muted",
|
|
52
|
+
className: "ttw:shrink-0",
|
|
53
|
+
children: [
|
|
54
|
+
"(",
|
|
55
|
+
n.sizeLabel,
|
|
56
|
+
")"
|
|
57
|
+
]
|
|
58
|
+
})]
|
|
59
|
+
}), /* @__PURE__ */ s(e, {
|
|
60
|
+
type: "button",
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
size: "icon",
|
|
63
|
+
className: "ttw:size-4",
|
|
64
|
+
disabled: g,
|
|
65
|
+
"aria-label": n.removeLabel,
|
|
66
|
+
onClick: () => w(n.id),
|
|
67
|
+
children: /* @__PURE__ */ s(f, { className: "ttw:size-4" })
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
}, n.id)), m.pendingRows.map((t) => /* @__PURE__ */ c("li", {
|
|
71
|
+
className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
|
|
72
|
+
children: [
|
|
73
|
+
t.state === "uploading" ? /* @__PURE__ */ s(d, { className: "ttw:size-5 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ s(l, { className: "ttw:size-5 ttw:shrink-0 ttw:text-destructive" }),
|
|
74
|
+
/* @__PURE__ */ c("div", {
|
|
75
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
|
|
76
|
+
children: [/* @__PURE__ */ s(r, {
|
|
77
|
+
variant: "body2",
|
|
78
|
+
className: "ttw:truncate",
|
|
79
|
+
children: t.name
|
|
80
|
+
}), t.state === "uploading" ? /* @__PURE__ */ s(r, {
|
|
81
|
+
variant: "caption",
|
|
82
|
+
color: "muted",
|
|
83
|
+
children: t.message
|
|
84
|
+
}) : /* @__PURE__ */ s(r, {
|
|
85
|
+
variant: "caption",
|
|
86
|
+
role: "alert",
|
|
87
|
+
className: "ttw:text-destructive",
|
|
88
|
+
children: t.message
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ s(e, {
|
|
92
|
+
type: "button",
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
size: "icon",
|
|
95
|
+
disabled: g,
|
|
96
|
+
"aria-label": t.removeLabel,
|
|
97
|
+
onClick: () => w(t.id),
|
|
98
|
+
children: /* @__PURE__ */ s(p, { className: "ttw:size-4" })
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}, t.id))]
|
|
102
|
+
})]
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ c("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
disabled: g,
|
|
107
|
+
onClick: v,
|
|
108
|
+
onDragOver: (e) => {
|
|
109
|
+
e.preventDefault(), y();
|
|
110
|
+
},
|
|
111
|
+
onDragLeave: (e) => {
|
|
112
|
+
e.preventDefault(), b();
|
|
113
|
+
},
|
|
114
|
+
onDrop: (e) => {
|
|
115
|
+
e.preventDefault(), x(e.dataTransfer.files);
|
|
116
|
+
},
|
|
117
|
+
className: i("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-dashed ttw:p-6 ttw:text-center ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", h ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted"),
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ s("span", {
|
|
120
|
+
className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-border",
|
|
121
|
+
children: /* @__PURE__ */ s(u, { className: "ttw:size-5 ttw:text-muted-foreground" })
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ c(r, {
|
|
124
|
+
variant: "body2",
|
|
125
|
+
children: [
|
|
126
|
+
E.attachmentsDropPrompt,
|
|
127
|
+
" ",
|
|
128
|
+
/* @__PURE__ */ s("span", {
|
|
129
|
+
className: "ttw:text-primary ttw:underline",
|
|
130
|
+
children: E.attachmentsBrowseLink
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ s(r, {
|
|
135
|
+
variant: "caption",
|
|
136
|
+
color: "muted",
|
|
137
|
+
children: E.attachmentsFormatsHint
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
m.countLimitMessage && /* @__PURE__ */ s(r, {
|
|
142
|
+
variant: "body2",
|
|
143
|
+
role: "alert",
|
|
144
|
+
className: "ttw:text-destructive",
|
|
145
|
+
children: m.countLimitMessage
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ s("input", {
|
|
148
|
+
ref: _,
|
|
149
|
+
type: "file",
|
|
150
|
+
multiple: !0,
|
|
151
|
+
tabIndex: -1,
|
|
152
|
+
"aria-hidden": !0,
|
|
153
|
+
className: "ttw:sr-only",
|
|
154
|
+
accept: m.accept,
|
|
155
|
+
onChange: (e) => S(e.target.files)
|
|
156
|
+
})
|
|
157
|
+
]
|
|
13
158
|
});
|
|
14
159
|
}
|
|
15
160
|
//#endregion
|
|
16
|
-
export {
|
|
161
|
+
export { m as ReceivableAttachmentsSection };
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OptionRow as t } from "./index7.js";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { CalendarIcon as i } from "lucide-react";
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
5
2
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
className: "ttw:truncate",
|
|
9
|
-
children: o.paymentTermsReceiptDue
|
|
10
|
-
}) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
|
|
3
|
+
function n({ option: n }) {
|
|
4
|
+
return /* @__PURE__ */ t("span", {
|
|
11
5
|
className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
-
className: "ttw:
|
|
14
|
-
children:
|
|
15
|
-
|
|
16
|
-
children: a.dateLabel
|
|
17
|
-
})]
|
|
18
|
-
}), /* @__PURE__ */ n("span", {
|
|
6
|
+
children: [/* @__PURE__ */ e("span", {
|
|
7
|
+
className: "ttw:truncate",
|
|
8
|
+
children: n.label
|
|
9
|
+
}), n.dueDateLabel && /* @__PURE__ */ e("span", {
|
|
19
10
|
className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
|
|
20
|
-
children:
|
|
11
|
+
children: n.dueDateLabel
|
|
21
12
|
})]
|
|
22
|
-
})
|
|
13
|
+
});
|
|
23
14
|
}
|
|
24
15
|
//#endregion
|
|
25
|
-
export {
|
|
16
|
+
export { n as OptionRow };
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { OptionRow as t } from "./index8.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { CalendarIcon as i } from "lucide-react";
|
|
1
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js
|
|
2
|
-
|
|
6
|
+
function a({ selection: a, labels: o }) {
|
|
7
|
+
return a?.kind === "receiptDue" ? /* @__PURE__ */ n("span", {
|
|
8
|
+
className: "ttw:truncate",
|
|
9
|
+
children: o.paymentTermsReceiptDue
|
|
10
|
+
}) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
|
|
11
|
+
className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
|
|
12
|
+
children: [/* @__PURE__ */ r("span", {
|
|
13
|
+
className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5",
|
|
14
|
+
children: [/* @__PURE__ */ n(i, { className: e("ttw:size-4 ttw:shrink-0", !a.hasDate && "ttw:text-muted-foreground") }), /* @__PURE__ */ n("span", {
|
|
15
|
+
className: e("ttw:truncate", !a.hasDate && "ttw:text-muted-foreground"),
|
|
16
|
+
children: a.dateLabel
|
|
17
|
+
})]
|
|
18
|
+
}), /* @__PURE__ */ n("span", {
|
|
19
|
+
className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
|
|
20
|
+
children: o.paymentTermsCustomDate
|
|
21
|
+
})]
|
|
22
|
+
}) : a?.kind === "term" ? /* @__PURE__ */ n(t, { option: a.option }) : null;
|
|
23
|
+
}
|
|
3
24
|
//#endregion
|
|
4
|
-
export {
|
|
25
|
+
export { a as SelectionValue };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "./index4.js";
|
|
2
2
|
import { MARKETING_WIDGET_LABELS_EN as t } from "../../ui/dist/index2.js";
|
|
3
3
|
import { MarketingBenefitIcon as n } from "../../ui/dist/index3.js";
|
|
4
|
-
import { MarketingWidget as r } from "./
|
|
4
|
+
import { MarketingWidget as r } from "./index6.js";
|
|
5
5
|
export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { deniedNoticeExpiresAt as e } from "../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
2
|
+
import "../../../shared/feature/dist/index.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js
|
|
2
|
-
var
|
|
4
|
+
var t = {
|
|
3
5
|
Offer: "offer",
|
|
4
6
|
Resume: "resume",
|
|
5
7
|
DraftStartedByOther: "draftStartedByOther",
|
|
@@ -8,27 +10,22 @@ var e = {
|
|
|
8
10
|
DeniedByYou: "deniedByYou",
|
|
9
11
|
DeniedByOther: "deniedByOther",
|
|
10
12
|
Hidden: "hidden"
|
|
11
|
-
}
|
|
12
|
-
function n(
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let i = t.ownership === "STARTED_BY_YOU";
|
|
20
|
-
switch (t.status) {
|
|
21
|
-
case "COMPLETE": return e.Hidden;
|
|
22
|
-
case "DRAFT": return i ? e.Resume : e.DraftStartedByOther;
|
|
23
|
-
case "SUBMITTED": return i ? e.SubmittedByYou : e.SubmittedByOther;
|
|
13
|
+
};
|
|
14
|
+
function n(n, r = Date.now()) {
|
|
15
|
+
if (!n) return t.Offer;
|
|
16
|
+
let i = n.ownership === "STARTED_BY_YOU";
|
|
17
|
+
switch (n.status) {
|
|
18
|
+
case "COMPLETE": return t.Hidden;
|
|
19
|
+
case "DRAFT": return i ? t.Resume : t.DraftStartedByOther;
|
|
20
|
+
case "SUBMITTED": return i ? t.SubmittedByYou : t.SubmittedByOther;
|
|
24
21
|
case "DENIED": {
|
|
25
|
-
let a = n
|
|
26
|
-
return a !== null && r > a ?
|
|
22
|
+
let a = e(n);
|
|
23
|
+
return a !== null && r > a ? t.Hidden : i ? t.DeniedByYou : t.DeniedByOther;
|
|
27
24
|
}
|
|
28
25
|
case "DELETED":
|
|
29
|
-
case "CANCELED": return
|
|
30
|
-
default: return
|
|
26
|
+
case "CANCELED": return t.Offer;
|
|
27
|
+
default: return t.Hidden;
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
//#endregion
|
|
34
|
-
export { t as
|
|
31
|
+
export { t as MarketingApplicationView, n as marketingApplicationViewFor };
|
|
@@ -1,20 +1,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useOrganizationApplicationStatus as e } from "../../../shared/data-access/dist/lib/useOrganizationApplicationStatus.js";
|
|
6
|
+
import "../../../shared/data-access/dist/index.js";
|
|
7
|
+
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
+
import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
+
import { deniedNoticeExpiresAt as a, selectBankAccountApplication as o } from "../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { MARKETING_WIDGET_STATUS_LABELS_EN as s } from "./index4.js";
|
|
13
|
+
import { MarketingWidgetAnalyticsEvent as c, WIDGET_NAME as l } from "./index2.js";
|
|
14
|
+
import { marketingWidgetTestIds as u } from "./index3.js";
|
|
15
|
+
import { MarketingApplicationView as d, marketingApplicationViewFor as f } from "./index5.js";
|
|
16
|
+
import { MARKETING_WIDGET_LABELS_EN as p } from "../../ui/dist/index2.js";
|
|
17
|
+
import { MarketingBenefitIcon as m, MarketingWidgetStatusTone as h } from "../../ui/dist/index3.js";
|
|
18
|
+
import { MarketingWidget as g } from "../../ui/dist/index9.js";
|
|
19
|
+
import "../../ui/dist/index.js";
|
|
20
|
+
import { useCallback as _, useEffect as v, useMemo as y, useReducer as b, useState as x } from "react";
|
|
21
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
1
22
|
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js
|
|
2
|
-
var
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
var C = 2 ** 31 - 1, w = /* @__PURE__ */ new Set([
|
|
24
|
+
"ACTIVE",
|
|
25
|
+
"INACTIVE",
|
|
26
|
+
"INVITED"
|
|
27
|
+
]), T = {
|
|
28
|
+
[d.DraftStartedByOther]: "draftStartedByOther",
|
|
29
|
+
[d.SubmittedByYou]: "submittedByYou",
|
|
30
|
+
[d.SubmittedByOther]: "submittedByOther",
|
|
31
|
+
[d.DeniedByYou]: "deniedByYou",
|
|
32
|
+
[d.DeniedByOther]: "deniedByOther"
|
|
33
|
+
}, E = {
|
|
34
|
+
[d.DraftStartedByOther]: h.Brand,
|
|
35
|
+
[d.SubmittedByYou]: h.Warning,
|
|
36
|
+
[d.SubmittedByOther]: h.Warning,
|
|
37
|
+
[d.DeniedByYou]: h.Danger,
|
|
38
|
+
[d.DeniedByOther]: h.Danger
|
|
39
|
+
};
|
|
40
|
+
function D(e) {
|
|
41
|
+
return e in T;
|
|
10
42
|
}
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
function O(e) {
|
|
44
|
+
let t = s, n = (n) => ({
|
|
45
|
+
...t[n],
|
|
46
|
+
...e?.[n]
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
resumeApplication: e?.resumeApplication ?? t.resumeApplication,
|
|
50
|
+
bankNameFallback: e?.bankNameFallback ?? t.bankNameFallback,
|
|
51
|
+
formatDate: e?.formatDate ?? t.formatDate,
|
|
52
|
+
draftStartedByOther: n("draftStartedByOther"),
|
|
53
|
+
submittedByYou: n("submittedByYou"),
|
|
54
|
+
submittedByOther: n("submittedByOther"),
|
|
55
|
+
deniedByYou: n("deniedByYou"),
|
|
56
|
+
deniedByOther: n("deniedByOther")
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function k(e, t, n) {
|
|
60
|
+
let r = (e) => e ? n(e) : void 0;
|
|
61
|
+
return {
|
|
62
|
+
bankName: t,
|
|
63
|
+
applicantName: [e?.applicantFirstName, e?.applicantLastName].map((e) => e?.trim()).filter(Boolean).join(" ") || void 0,
|
|
64
|
+
startedOn: r(e?.createdAt),
|
|
65
|
+
submittedOn: r(e?.submittedAt),
|
|
66
|
+
deniedOn: r(e?.deniedAt)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function A({ content: n, onPrimaryCtaClick: s, labels: l, statusLabels: p }) {
|
|
70
|
+
let m = t(), { initResponse: h } = r(), A = i(), j = e(), [M, N] = x(!1), [P, F] = b((e) => e + 1, 0), I = y(() => o(j.applications), [j.applications]), L = a(I), R = y(() => O(p), [p]), z = f(I), B = h?.bankName || R.bankNameFallback, V = y(() => {
|
|
71
|
+
if (!D(z)) return;
|
|
72
|
+
let e = R[T[z]], t = k(I, B, R.formatDate);
|
|
73
|
+
return {
|
|
74
|
+
chipLabel: e.chipLabel,
|
|
75
|
+
chipTone: E[z],
|
|
76
|
+
heading: e.heading?.(t),
|
|
77
|
+
body: e.body(t)
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
I,
|
|
81
|
+
B,
|
|
82
|
+
R,
|
|
83
|
+
z
|
|
84
|
+
]), H = y(() => z === d.Resume ? {
|
|
85
|
+
...l,
|
|
86
|
+
applyNow: R.resumeApplication,
|
|
87
|
+
primaryCta: R.resumeApplication
|
|
88
|
+
} : l, [
|
|
89
|
+
l,
|
|
90
|
+
R.resumeApplication,
|
|
91
|
+
z
|
|
92
|
+
]);
|
|
93
|
+
v(() => {
|
|
94
|
+
m(c.Mounted);
|
|
95
|
+
}, [m]), v(() => {
|
|
96
|
+
if (L === null) return;
|
|
97
|
+
let e = L - Date.now();
|
|
98
|
+
if (e < 0) return;
|
|
99
|
+
let t = setTimeout(F, Math.min(e + 1, C));
|
|
100
|
+
return () => clearTimeout(t);
|
|
101
|
+
}, [L, P]);
|
|
102
|
+
let U = !V && z !== d.Hidden;
|
|
103
|
+
M && !U && N(!1);
|
|
104
|
+
let W = _(() => {
|
|
105
|
+
m(c.OpenModal), N(!0);
|
|
106
|
+
}, [m]), G = _(() => {
|
|
107
|
+
N(!1);
|
|
108
|
+
}, []), K = _(() => {
|
|
109
|
+
m(c.PrimaryCta), N(!1), s();
|
|
110
|
+
}, [s, m]);
|
|
111
|
+
return !h?.status || w.has(h.status) || A || !j.isResolved || z === d.Hidden ? null : /* @__PURE__ */ S(g, {
|
|
112
|
+
open: M,
|
|
113
|
+
vspLogo: n.vspLogo,
|
|
114
|
+
bankingText: n.bankingText,
|
|
115
|
+
primaryCaption: n.primaryCaption,
|
|
116
|
+
secondaryCaption: n.secondaryCaption,
|
|
117
|
+
providedByCaption: n.providedByCaption,
|
|
118
|
+
primaryModalHeader: n.primaryModalHeader,
|
|
119
|
+
howItWorksHeader: n.howItWorksHeader,
|
|
120
|
+
howItWorksSteps: n.howItWorksSteps,
|
|
121
|
+
fromDayOneHeader: n.fromDayOneHeader,
|
|
122
|
+
benefits: n.benefits,
|
|
123
|
+
appearance: n.appearance,
|
|
124
|
+
onOpenMarketingModal: W,
|
|
125
|
+
onCloseMarketingModal: G,
|
|
126
|
+
onPrimaryCtaClick: K,
|
|
127
|
+
statusMessage: V,
|
|
128
|
+
labels: H,
|
|
129
|
+
testIds: {
|
|
130
|
+
root: u.root,
|
|
131
|
+
learnMoreButton: u.learnMoreButton,
|
|
132
|
+
applyNowButton: u.applyNowButton,
|
|
133
|
+
statusMessage: u.statusMessage,
|
|
134
|
+
modal: {
|
|
135
|
+
root: u.modal,
|
|
136
|
+
primaryCtaButton: u.primaryCtaButton
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function j({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
142
|
+
return /* @__PURE__ */ S(n, {
|
|
143
|
+
widgetName: l,
|
|
144
|
+
baseUrl: e,
|
|
145
|
+
widgetToken: t,
|
|
146
|
+
organizationId: r,
|
|
147
|
+
configClient: i,
|
|
148
|
+
gatewayRouting: a,
|
|
149
|
+
linkComponent: o,
|
|
150
|
+
implementation: s,
|
|
151
|
+
uiFramework: c,
|
|
152
|
+
errorFallback: u,
|
|
153
|
+
onError: d,
|
|
154
|
+
analytics: f,
|
|
155
|
+
disclosuresAcceptance: p,
|
|
156
|
+
providerLabels: m,
|
|
157
|
+
children: /* @__PURE__ */ S(A, { ...h })
|
|
158
|
+
});
|
|
18
159
|
}
|
|
19
160
|
//#endregion
|
|
20
|
-
export {
|
|
161
|
+
export { p as MARKETING_WIDGET_LABELS_EN, s as MARKETING_WIDGET_STATUS_LABELS_EN, m as MarketingBenefitIcon, j as MarketingWidget };
|