@tesouro/embedded-components-react 0.7.44 → 0.7.46
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 +30 -39
- package/dist/lib/CounterpartsWidget.d.ts +29 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +29 -22
- package/dist/lib/CustomersWidget.d.ts +29 -22
- package/dist/lib/LinkedAccountsWidget.d.ts +1 -0
- package/dist/lib/ReceivablesWidget.d.ts +1 -0
- package/dist/lib/WidgetSuite.d.ts +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +8 -25
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/forms.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/permissions.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +200 -191
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/linkedAccounts.js +87 -79
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organization/useOrganizationQuery.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
|
@@ -1,11 +1,29 @@
|
|
|
1
|
+
import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { useState as r } from "react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
1
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
function o({ children: o, date: s }) {
|
|
6
|
+
let [c, l] = r(!1);
|
|
7
|
+
return /* @__PURE__ */ a(e, {
|
|
8
|
+
open: c,
|
|
9
|
+
onOpenChange: l,
|
|
10
|
+
children: [/* @__PURE__ */ i(n, {
|
|
11
|
+
type: "button",
|
|
12
|
+
className: "ttw:cursor-default",
|
|
13
|
+
onPointerEnter: (e) => {
|
|
14
|
+
e.pointerType === "mouse" && l(!0);
|
|
15
|
+
},
|
|
16
|
+
onPointerLeave: (e) => {
|
|
17
|
+
e.pointerType === "mouse" && l(!1);
|
|
18
|
+
},
|
|
19
|
+
onClick: (e) => e.stopPropagation(),
|
|
20
|
+
children: o
|
|
21
|
+
}), /* @__PURE__ */ i(t, {
|
|
22
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
23
|
+
className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
|
|
24
|
+
children: s
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
10
28
|
//#endregion
|
|
11
|
-
export {
|
|
29
|
+
export { o as DateDisclosure };
|
|
@@ -1,78 +1,4 @@
|
|
|
1
|
-
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { InlineErrorAlert as t } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
-
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as n } from "./index16.js";
|
|
5
|
-
import { useRef as r, useState as i } from "react";
|
|
6
|
-
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
import { Loader2 as c, Upload as l } from "lucide-react";
|
|
8
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js
|
|
9
|
-
|
|
10
|
-
let n = t.split(",").map((e) => e.trim()).filter(Boolean);
|
|
11
|
-
return n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type === t);
|
|
12
|
-
}
|
|
13
|
-
function d(e, t, n = !0) {
|
|
14
|
-
let r = e.filter((e) => u(e, t));
|
|
15
|
-
return n ? r : r.slice(0, 1);
|
|
16
|
-
}
|
|
17
|
-
function f({ status: u = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
|
|
18
|
-
let y = {
|
|
19
|
-
...n,
|
|
20
|
-
...v
|
|
21
|
-
}, b = r(null), [x, S] = i(!1), C = u === "uploading";
|
|
22
|
-
return /* @__PURE__ */ s("div", {
|
|
23
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
24
|
-
"data-testid": _,
|
|
25
|
-
children: [
|
|
26
|
-
/* @__PURE__ */ s("button", {
|
|
27
|
-
type: "button",
|
|
28
|
-
disabled: C,
|
|
29
|
-
className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8", x ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
|
|
30
|
-
onClick: () => b.current?.click(),
|
|
31
|
-
onDragOver: (e) => {
|
|
32
|
-
e.preventDefault(), S(!0);
|
|
33
|
-
},
|
|
34
|
-
onDragLeave: (e) => {
|
|
35
|
-
e.preventDefault(), S(!1);
|
|
36
|
-
},
|
|
37
|
-
onDrop: (e) => {
|
|
38
|
-
if (e.preventDefault(), S(!1), C) return;
|
|
39
|
-
let t = d(e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], p, m);
|
|
40
|
-
t.length > 0 && g(t);
|
|
41
|
-
},
|
|
42
|
-
children: [C ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:animate-spin ttw:text-primary" }) : /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ s("span", {
|
|
43
|
-
className: "ttw:flex ttw:flex-col ttw:items-start",
|
|
44
|
-
children: [/* @__PURE__ */ o("span", {
|
|
45
|
-
className: "ttw:text-sm ttw:text-primary",
|
|
46
|
-
children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
|
|
47
|
-
y.dropPrefix,
|
|
48
|
-
" ",
|
|
49
|
-
/* @__PURE__ */ o("span", {
|
|
50
|
-
className: "ttw:underline",
|
|
51
|
-
children: y.browseAction
|
|
52
|
-
})
|
|
53
|
-
] })
|
|
54
|
-
}), /* @__PURE__ */ o("span", {
|
|
55
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
56
|
-
children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
|
|
57
|
-
})]
|
|
58
|
-
})]
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ o("input", {
|
|
61
|
-
ref: b,
|
|
62
|
-
type: "file",
|
|
63
|
-
accept: p,
|
|
64
|
-
multiple: m,
|
|
65
|
-
disabled: C,
|
|
66
|
-
"aria-label": y.fileInput,
|
|
67
|
-
className: "ttw:hidden",
|
|
68
|
-
onChange: (e) => {
|
|
69
|
-
let t = d(e.target.files ? Array.from(e.target.files) : [], p, m);
|
|
70
|
-
t.length > 0 && g(t), e.target.value = "";
|
|
71
|
-
}
|
|
72
|
-
}),
|
|
73
|
-
u === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
2
|
+
var e = { overdue: "Overdue" };
|
|
77
3
|
//#endregion
|
|
78
|
-
export {
|
|
4
|
+
export { e as DUE_DATE_VALUE_LABELS_EN };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { DUE_DATE_VALUE_LABELS_EN as t } from "./index17.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { AlertTriangleIcon as i } from "lucide-react";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js
|
|
6
|
+
function a({ value: a, tone: o = "default", labels: s, className: c }) {
|
|
7
|
+
let l = {
|
|
8
|
+
...t,
|
|
9
|
+
...s
|
|
10
|
+
};
|
|
11
|
+
return o === "danger" ? /* @__PURE__ */ r("span", {
|
|
12
|
+
className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ n(i, {
|
|
15
|
+
"aria-hidden": !0,
|
|
16
|
+
className: "ttw:size-3.5 ttw:shrink-0"
|
|
17
|
+
}),
|
|
18
|
+
a,
|
|
19
|
+
/* @__PURE__ */ n("span", {
|
|
20
|
+
className: "ttw:sr-only",
|
|
21
|
+
children: l.overdue
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}) : /* @__PURE__ */ n("span", {
|
|
25
|
+
className: c,
|
|
26
|
+
children: a
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { a as DueDateValue, a as default };
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { useState as r } from "react";
|
|
3
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onOpenChange: l,
|
|
10
|
-
children: [/* @__PURE__ */ i(n, {
|
|
11
|
-
type: "button",
|
|
12
|
-
className: "ttw:cursor-default",
|
|
13
|
-
onPointerEnter: (e) => {
|
|
14
|
-
e.pointerType === "mouse" && l(!0);
|
|
15
|
-
},
|
|
16
|
-
onPointerLeave: (e) => {
|
|
17
|
-
e.pointerType === "mouse" && l(!1);
|
|
18
|
-
},
|
|
19
|
-
onClick: (e) => e.stopPropagation(),
|
|
20
|
-
children: o
|
|
21
|
-
}), /* @__PURE__ */ i(t, {
|
|
22
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
23
|
-
className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
|
|
24
|
-
children: s
|
|
25
|
-
})]
|
|
26
|
-
});
|
|
27
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
revealValue: "Show value",
|
|
4
|
+
hideValue: "Hide value"
|
|
5
|
+
};
|
|
28
6
|
//#endregion
|
|
29
|
-
export {
|
|
7
|
+
export { e as REVEALABLE_FIELD_LABELS_EN };
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
+
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { REVEALABLE_FIELD_LABELS_EN as t } from "./index20.js";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Eye as a, EyeOff as o } from "lucide-react";
|
|
1
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
|
|
2
|
-
|
|
7
|
+
function s({ field: s, labels: c }) {
|
|
8
|
+
let l = {
|
|
9
|
+
...t,
|
|
10
|
+
...c
|
|
11
|
+
}, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
|
|
12
|
+
return /* @__PURE__ */ i("div", {
|
|
13
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
|
|
14
|
+
children: [/* @__PURE__ */ i("div", {
|
|
15
|
+
className: "ttw:min-w-0",
|
|
16
|
+
children: [/* @__PURE__ */ r("dt", {
|
|
17
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
18
|
+
children: s.label
|
|
19
|
+
}), /* @__PURE__ */ r("dd", {
|
|
20
|
+
className: "ttw:break-words ttw:text-sm ttw:font-medium",
|
|
21
|
+
children: f
|
|
22
|
+
})]
|
|
23
|
+
}), s.maskedValue ? /* @__PURE__ */ r(e, {
|
|
24
|
+
type: "button",
|
|
25
|
+
variant: "ghost",
|
|
26
|
+
size: "icon",
|
|
27
|
+
"aria-label": u ? l.hideValue : l.revealValue,
|
|
28
|
+
onClick: () => d((e) => !e),
|
|
29
|
+
children: r(u ? o : a, { className: "ttw:size-4" })
|
|
30
|
+
}) : null]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
3
33
|
//#endregion
|
|
4
|
-
export {
|
|
34
|
+
export { s as RevealableField, s as default };
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { AlertTriangleIcon as i } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js
|
|
6
|
-
function a({ value: a, tone: o = "default", labels: s, className: c }) {
|
|
7
|
-
let l = {
|
|
8
|
-
...t,
|
|
9
|
-
...s
|
|
10
|
-
};
|
|
11
|
-
return o === "danger" ? /* @__PURE__ */ r("span", {
|
|
12
|
-
className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ n(i, {
|
|
15
|
-
"aria-hidden": !0,
|
|
16
|
-
className: "ttw:size-3.5 ttw:shrink-0"
|
|
17
|
-
}),
|
|
18
|
-
a,
|
|
19
|
-
/* @__PURE__ */ n("span", {
|
|
20
|
-
className: "ttw:sr-only",
|
|
21
|
-
children: l.overdue
|
|
22
|
-
})
|
|
23
|
-
]
|
|
24
|
-
}) : /* @__PURE__ */ n("span", {
|
|
25
|
-
className: c,
|
|
26
|
-
children: a
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { a as DueDateValue, a as default };
|
|
1
|
+
import "./index20.js";
|
|
2
|
+
import "./index21.js";
|
|
@@ -3,5 +3,4 @@ import "./index3.js";
|
|
|
3
3
|
import { useCreateDebitCardMutation as t } from "./index4.js";
|
|
4
4
|
import { useCreateVelocityControlMutation as n } from "./index5.js";
|
|
5
5
|
import { useManageDebitCardAccessMutation as r } from "./index6.js";
|
|
6
|
-
|
|
7
|
-
export { e as useCreateCard, i as useCreateCardOrganizationQuery, t as useCreateDebitCardMutation, n as useCreateVelocityControlMutation, r as useManageDebitCardAccessMutation };
|
|
6
|
+
export { e as useCreateCard, t as useCreateDebitCardMutation, n as useCreateVelocityControlMutation, r as useManageDebitCardAccessMutation };
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js
CHANGED
|
@@ -7,30 +7,30 @@ import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.
|
|
|
7
7
|
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
8
8
|
import { useAllBankAccountsQuery as r } from "../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
9
9
|
import { useAllMerchantCategoryGroupsQuery as i } from "../../../../shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
|
|
10
|
-
import {
|
|
10
|
+
import { useOrganizationQuery as a } from "../../../../shared/data-access/dist/lib/organization/useOrganizationQuery.js";
|
|
11
|
+
import { useAllOrganizationUsersQuery as o } from "../../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
11
12
|
import "../../../../shared/data-access/dist/index.js";
|
|
12
|
-
import { EmbeddedToaster as
|
|
13
|
+
import { EmbeddedToaster as ee } from "../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
13
14
|
import "../../../../shared/ui/dist/index.js";
|
|
14
|
-
import { useAnalyticsTrack as
|
|
15
|
+
import { useAnalyticsTrack as te } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
15
16
|
import { WidgetProvider as s } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
16
|
-
import { useWidgetConfig as
|
|
17
|
+
import { useWidgetConfig as ne } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
17
18
|
import "../../../../shared/feature/dist/index.js";
|
|
18
|
-
import { filterUsersForOrganization as
|
|
19
|
+
import { filterUsersForOrganization as re } from "../../../../../shared/util-validation/dist/index7.js";
|
|
19
20
|
import { CREATE_CARD_WIDGET_LABELS_EN as c } from "../../ui/dist/lib/CreateCardWidget/labels.js";
|
|
20
21
|
import { CreateCardView as l, MailingOptionValue as u } from "../../ui/dist/lib/CreateCardWidget/types.js";
|
|
21
|
-
import { CreateCardWidget as
|
|
22
|
+
import { CreateCardWidget as ie } from "../../ui/dist/lib/CreateCardWidget/CreateCardWidget.js";
|
|
22
23
|
import "../../ui/dist/index.js";
|
|
23
|
-
import { CardFormatValue as d, buildCreateDebitCardRequest as
|
|
24
|
-
import { resolveCreateCardFeatureLabels as
|
|
25
|
-
import { CreateCardWidgetAnalyticsEvent as
|
|
26
|
-
import { SpendLimitPeriodValue as f, buildPerTransactionMaximumVelocityControlRequest as
|
|
27
|
-
import { getCreateCardPermissions as
|
|
28
|
-
import { useCreateCardCardholderOptions as
|
|
29
|
-
import { useCreateCard as
|
|
30
|
-
import { useCreateDebitCardMutation as
|
|
31
|
-
import { useCreateVelocityControlMutation as
|
|
32
|
-
import { useManageDebitCardAccessMutation as
|
|
33
|
-
import { useCreateCardOrganizationQuery as xe } from "../../data-access/dist/index7.js";
|
|
24
|
+
import { CardFormatValue as d, buildCreateDebitCardRequest as ae, createDebitCardReference as oe, formatBusinessAddress as se, isBusinessAddressComplete as ce, isManualAddressComplete as le } from "./index3.js";
|
|
25
|
+
import { resolveCreateCardFeatureLabels as ue } from "./index5.js";
|
|
26
|
+
import { CreateCardWidgetAnalyticsEvent as de, WIDGET_NAME as fe } from "./index2.js";
|
|
27
|
+
import { SpendLimitPeriodValue as f, buildPerTransactionMaximumVelocityControlRequest as pe, buildSpendLimitVelocityControlRequest as me, parseControlAmountToMinorUnits as he } from "./index4.js";
|
|
28
|
+
import { getCreateCardPermissions as ge } from "./index6.js";
|
|
29
|
+
import { useCreateCardCardholderOptions as _e } from "./index7.js";
|
|
30
|
+
import { useCreateCard as ve } from "../../data-access/dist/index2.js";
|
|
31
|
+
import { useCreateDebitCardMutation as ye } from "../../data-access/dist/index4.js";
|
|
32
|
+
import { useCreateVelocityControlMutation as be } from "../../data-access/dist/index5.js";
|
|
33
|
+
import { useManageDebitCardAccessMutation as xe } from "../../data-access/dist/index6.js";
|
|
34
34
|
import "../../data-access/dist/index.js";
|
|
35
35
|
import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
36
36
|
import { Fragment as Se, jsx as _, jsxs as Ce } from "react/jsx-runtime";
|
|
@@ -59,8 +59,8 @@ function ke(e, t) {
|
|
|
59
59
|
let n = e.nickname?.trim(), r = Oe(e.accountNumber);
|
|
60
60
|
return n && r ? `${n} (${r})` : n || r || t;
|
|
61
61
|
}
|
|
62
|
-
function y({ cardArtSrc: n, labels: s, featureLabels:
|
|
63
|
-
let Me =
|
|
62
|
+
function y({ cardArtSrc: n, labels: s, featureLabels: fe, className: Oe, onClose: y, onCancel: Ae, onViewCard: je }) {
|
|
63
|
+
let Me = te(), { isReady: b } = ve(), { initResponse: Ne, organizationId: x } = ne(), S = m(() => ge(Ne?.scopes), [Ne?.scopes]), C = ue(fe), w = {
|
|
64
64
|
...c,
|
|
65
65
|
...s,
|
|
66
66
|
setup: {
|
|
@@ -81,12 +81,12 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
81
81
|
p(() => (W.current = !0, () => {
|
|
82
82
|
W.current = !1;
|
|
83
83
|
}), []), p(() => {
|
|
84
|
-
Me(
|
|
84
|
+
Me(de.Mounted);
|
|
85
85
|
}, [Me]);
|
|
86
|
-
let { options: Ye, isError: G, refetch: Xe } =
|
|
86
|
+
let { options: Ye, isError: G, refetch: Xe } = _e({ enabled: b && S.canReadUsers }), K = o({
|
|
87
87
|
enabled: b && S.canReadUsers,
|
|
88
88
|
permissions: [we]
|
|
89
|
-
}), Ze = m(() => !b || !S.canReadUsers || K.isResolving || K.isError ? [] :
|
|
89
|
+
}), Ze = m(() => !b || !S.canReadUsers || K.isResolving || K.isError ? [] : re(K.data?.data ?? [], x).map((e) => e.id), [
|
|
90
90
|
K.data?.data,
|
|
91
91
|
K.isError,
|
|
92
92
|
K.isResolving,
|
|
@@ -116,7 +116,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
116
116
|
C.toast.retry,
|
|
117
117
|
q
|
|
118
118
|
]);
|
|
119
|
-
let $e =
|
|
119
|
+
let $e = a({ enabled: b && S.canReadOrganization }), Y = r({ enabled: b && S.canReadFundingAccounts }), et = i({ enabled: b && S.canReadMerchantCategoryGroups }), tt = ye(), nt = be(), rt = xe(), X = !!Y.isError && b && S.canReadFundingAccounts, Z = m(() => X ? [] : (Y.data?.data ?? []).map((e) => ({
|
|
120
120
|
value: e.id,
|
|
121
121
|
label: ke(e, C.untitledFundingAccount)
|
|
122
122
|
})), [
|
|
@@ -126,7 +126,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
126
126
|
]), Q = m(() => (et.data?.data ?? []).map((e) => ({
|
|
127
127
|
value: e.id,
|
|
128
128
|
label: e.name
|
|
129
|
-
})), [et.data?.data]), $ = ze ?? (Z.length === 1 ? Z[0].value : null), it = $e.data?.address, at =
|
|
129
|
+
})), [et.data?.data]), $ = ze ?? (Z.length === 1 ? Z[0].value : null), it = $e.data?.address, at = se(it), ot = ce(it), st = D === d.Physical, ct = st && O === u.BusinessAddress && !!at, lt = st && O === u.DifferentAddress, ut = X || Z.length > 0, dt = b && S.canWriteAuthorizationControls, ft = m(() => [
|
|
130
130
|
{
|
|
131
131
|
value: f.OneTime,
|
|
132
132
|
label: C.spendLimit.periodOneTime
|
|
@@ -165,7 +165,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
165
165
|
C.spendLimit.monthlyResetNotice,
|
|
166
166
|
C.spendLimit.oneTimeWarningDescription,
|
|
167
167
|
C.spendLimit.oneTimeWarningTitle
|
|
168
|
-
]), mt = A && (
|
|
168
|
+
]), mt = A && (he(M) === null || P === null), ht = I && he(R) === null, gt = B && H.length === 0, _t = Q.length === 0 && !B;
|
|
169
169
|
dt || (A && j(!1), M !== "" && N(""), P !== null && F(null), I && L(!1), R !== "" && z(""), B && V(!1), H.length > 0 && U([]));
|
|
170
170
|
let vt = m(() => ({
|
|
171
171
|
isSpendLimitEnabled: A,
|
|
@@ -202,7 +202,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
202
202
|
M,
|
|
203
203
|
pt,
|
|
204
204
|
ft
|
|
205
|
-
]), yt = !b || !S.canIssue || tt.isPending || nt.isPending || rt.isPending || G || X || q || Qe || !E || !D || !$ || mt || ht || gt || D === d.Physical && (!O || O === u.BusinessAddress && !ot || O === u.DifferentAddress && !
|
|
205
|
+
]), yt = !b || !S.canIssue || tt.isPending || nt.isPending || rt.isPending || G || X || q || Qe || !E || !D || !$ || mt || ht || gt || D === d.Physical && (!O || O === u.BusinessAddress && !ot || O === u.DifferentAddress && !le(Ve)), bt = m(() => {
|
|
206
206
|
let e = De(Ge, C);
|
|
207
207
|
return {
|
|
208
208
|
...s,
|
|
@@ -217,7 +217,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
217
217
|
s
|
|
218
218
|
]), xt = async () => {
|
|
219
219
|
if (!b) return;
|
|
220
|
-
let t =
|
|
220
|
+
let t = oe(), n = ae({
|
|
221
221
|
cardholderUserId: E,
|
|
222
222
|
format: D,
|
|
223
223
|
bankAccountId: $,
|
|
@@ -238,7 +238,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
238
238
|
We(t.id), Ke(t.cardStatus);
|
|
239
239
|
let i = [];
|
|
240
240
|
if (A) {
|
|
241
|
-
let e =
|
|
241
|
+
let e = me({
|
|
242
242
|
cardId: t.id,
|
|
243
243
|
amount: M,
|
|
244
244
|
period: P,
|
|
@@ -248,7 +248,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
248
248
|
e && i.push(e);
|
|
249
249
|
}
|
|
250
250
|
if (I) {
|
|
251
|
-
let e =
|
|
251
|
+
let e = pe({
|
|
252
252
|
cardId: t.id,
|
|
253
253
|
amount: R,
|
|
254
254
|
id: crypto.randomUUID(),
|
|
@@ -316,7 +316,7 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
|
-
return /* @__PURE__ */ Ce(Se, { children: [/* @__PURE__ */ _(
|
|
319
|
+
return /* @__PURE__ */ Ce(Se, { children: [/* @__PURE__ */ _(ee, {}), /* @__PURE__ */ _(ie, {
|
|
320
320
|
view: Ie,
|
|
321
321
|
cardArtSrc: n,
|
|
322
322
|
labels: bt,
|
|
@@ -367,9 +367,9 @@ function y({ cardArtSrc: n, labels: s, featureLabels: de, className: Oe, onClose
|
|
|
367
367
|
} : void 0
|
|
368
368
|
})] });
|
|
369
369
|
}
|
|
370
|
-
function Ae({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: ee, errorFallback: te, onError: ne, analytics:
|
|
370
|
+
function Ae({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: ee, errorFallback: te, onError: ne, analytics: re, disclosuresAcceptance: c, providerLabels: l, ...u }) {
|
|
371
371
|
return /* @__PURE__ */ _(s, {
|
|
372
|
-
widgetName:
|
|
372
|
+
widgetName: fe,
|
|
373
373
|
baseUrl: e,
|
|
374
374
|
widgetToken: t,
|
|
375
375
|
organizationId: n,
|
|
@@ -380,10 +380,10 @@ function Ae({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, ga
|
|
|
380
380
|
uiFramework: ee,
|
|
381
381
|
errorFallback: te,
|
|
382
382
|
onError: ne,
|
|
383
|
-
analytics:
|
|
384
|
-
disclosuresAcceptance:
|
|
385
|
-
providerLabels:
|
|
386
|
-
children: /* @__PURE__ */ _(y, { ...
|
|
383
|
+
analytics: re,
|
|
384
|
+
disclosuresAcceptance: c,
|
|
385
|
+
providerLabels: l,
|
|
386
|
+
children: /* @__PURE__ */ _(y, { ...u })
|
|
387
387
|
});
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|