@tesouro/embedded-components-react 0.3.24 → 0.3.26

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 (80) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +2 -2
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +17 -12
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +5 -5
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +8 -4
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +33 -30
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -40
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +23 -266
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +46 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +273 -45
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -18
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +45 -282
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +19 -13
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +273 -107
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +13 -9
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +113 -92
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +9 -10
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +95 -54
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +9 -50
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +53 -137
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +138 -37
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -5
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +37 -88
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +5 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +88 -12
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -77
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +11 -253
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -13
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +82 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +264 -8
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +9 -45
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +0 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +7 -36
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +47 -10
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -201
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +39 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +3 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +188 -301
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +3 -10
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +12 -4
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +317 -81
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -0
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +8 -2
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +91 -16
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +14 -3
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +109 -26
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +3 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +26 -30
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +4 -9
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +30 -102
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +9 -14
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +85 -104
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +10 -11
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +123 -8
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -170
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +18 -2
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +7 -11
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +158 -96
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +14 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +108 -0
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -0
  78. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +0 -113
@@ -0,0 +1,108 @@
1
+ import { Button as e, Skeleton as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BillUploadDropzone as n } from "./index3.js";
3
+ import "./index5.js";
4
+ import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index92.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Download as o, Trash2 as s } from "lucide-react";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js
8
+ function c(c) {
9
+ let { mode: l, testId: u, labels: d } = c, f = {
10
+ ...r,
11
+ ...d,
12
+ dropzone: {
13
+ ...r.dropzone,
14
+ ...d?.dropzone
15
+ }
16
+ };
17
+ if (l === "loading") return /* @__PURE__ */ a("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ "data-testid": u,
20
+ children: [/* @__PURE__ */ i("div", {
21
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
22
+ children: /* @__PURE__ */ i("span", {
23
+ "aria-live": "polite",
24
+ className: "ttw:text-sm ttw:text-muted-foreground",
25
+ children: c.fileName ? f.scanningAttachment(c.fileName) : f.scanning
26
+ })
27
+ }), /* @__PURE__ */ a("div", {
28
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
29
+ children: [
30
+ /* @__PURE__ */ i(t, { className: "ttw:h-6 ttw:w-2/5" }),
31
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-3/5" }),
32
+ /* @__PURE__ */ i(t, { className: "ttw:mt-4 ttw:h-4 ttw:w-full" }),
33
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-full" }),
34
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-4/5" }),
35
+ /* @__PURE__ */ i(t, { className: "ttw:mt-auto ttw:h-24 ttw:w-full" })
36
+ ]
37
+ })]
38
+ });
39
+ if (l === "document") {
40
+ let { fileName: t, preview: n, onDownload: r, onDelete: l, isDeleting: d, deleteErrorMessage: p } = c;
41
+ return /* @__PURE__ */ a("div", {
42
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
43
+ "data-testid": u,
44
+ children: [
45
+ /* @__PURE__ */ a("div", {
46
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
47
+ children: [
48
+ /* @__PURE__ */ i("span", {
49
+ className: "ttw:text-sm ttw:text-muted-foreground",
50
+ children: f.scannedAttachment(t ?? "")
51
+ }),
52
+ r ? /* @__PURE__ */ i(e, {
53
+ type: "button",
54
+ variant: "ghost",
55
+ size: "icon",
56
+ "aria-label": f.download,
57
+ onClick: r,
58
+ children: /* @__PURE__ */ i(o, { className: "ttw:size-4" })
59
+ }) : null,
60
+ l ? /* @__PURE__ */ i(e, {
61
+ type: "button",
62
+ variant: "ghost",
63
+ size: "icon",
64
+ "aria-label": f.delete,
65
+ disabled: d,
66
+ onClick: l,
67
+ children: /* @__PURE__ */ i(s, { className: "ttw:size-4" })
68
+ }) : null
69
+ ]
70
+ }),
71
+ p ? /* @__PURE__ */ i("p", {
72
+ role: "alert",
73
+ className: "ttw:text-sm ttw:text-destructive",
74
+ "data-testid": u ? `${u}-delete-error` : void 0,
75
+ children: p
76
+ }) : null,
77
+ /* @__PURE__ */ i("div", {
78
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:items-start ttw:justify-center ttw:overflow-auto ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
79
+ children: n
80
+ })
81
+ ]
82
+ });
83
+ }
84
+ return /* @__PURE__ */ a("div", {
85
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
86
+ "data-testid": u,
87
+ children: [
88
+ /* @__PURE__ */ i("p", {
89
+ className: "ttw:mb-3 ttw:text-sm ttw:font-medium ttw:text-foreground",
90
+ children: f.uploadHeading
91
+ }),
92
+ c.noticeMessage ? /* @__PURE__ */ i("p", {
93
+ "aria-live": "polite",
94
+ className: "ttw:mb-3 ttw:text-sm ttw:text-muted-foreground",
95
+ "data-testid": u ? `${u}-notice` : void 0,
96
+ children: c.noticeMessage
97
+ }) : null,
98
+ /* @__PURE__ */ i(n, {
99
+ status: c.uploadStatus,
100
+ errorMessage: c.uploadErrorMessage,
101
+ onFilesSelected: c.onFilesSelected,
102
+ labels: f.dropzone
103
+ })
104
+ ]
105
+ });
106
+ }
107
+ //#endregion
108
+ export { c as SourceDocumentPanel, c as default };
@@ -0,0 +1,2 @@
1
+ import "./index92.js";
2
+ import "./index93.js";
@@ -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.3.24", n = "8df13afb00375de265bcab691a761c4d4681cb83", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.3.26", n = "6314167adeab19b610feccf4152434cf2d05ff93", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -1,113 +0,0 @@
1
- import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, Table as c, TableBody as l, TableCell as u, TableHead as d, TableHeader as f, TableRow as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillDuplicateBadge as m } from "./index54.js";
3
- import "./index55.js";
4
- import { DUPLICATE_BILLS_DIALOG_LABELS_EN as h } from "./index70.js";
5
- import { useMemo as g } from "react";
6
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { Ban as y, ChevronRightIcon as b, CopyX as x } from "lucide-react";
8
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js
9
- function S({ open: S, onOpenChange: C, rows: w, selectAllChecked: T = !1, onToggleAllRows: E, onKeepSelected: D, onCancelDuplicates: O, isActionDisabled: k, labels: A }) {
10
- let j = g(() => ({
11
- ...h,
12
- ...A
13
- }), [A]);
14
- return /* @__PURE__ */ _(n, {
15
- open: S,
16
- onOpenChange: C,
17
- children: /* @__PURE__ */ v(r, {
18
- className: "ttw:flex ttw:flex-col ttw:gap-8 ttw:sm:max-w-208.75",
19
- showCloseButton: !0,
20
- children: [
21
- /* @__PURE__ */ v(o, {
22
- className: "ttw:items-center ttw:gap-3 ttw:text-center ttw:sm:text-center",
23
- children: [
24
- /* @__PURE__ */ _("div", {
25
- className: "ttw:flex ttw:items-center ttw:justify-center ttw:border ttw:rounded-full ttw:size-11 ttw:border-orange-300 ttw:bg-orange-200",
26
- children: /* @__PURE__ */ _(x, {
27
- className: "ttw:size-4 ttw:text-orange-950",
28
- "aria-hidden": !0
29
- })
30
- }),
31
- /* @__PURE__ */ _(s, { children: j.title }),
32
- /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _("span", {
33
- className: "ttw:block",
34
- children: j.descriptionFirstLine
35
- }), /* @__PURE__ */ _("span", {
36
- className: "ttw:block",
37
- children: j.descriptionSecondLine
38
- })] })
39
- ]
40
- }),
41
- /* @__PURE__ */ _("div", {
42
- className: "ttw:max-h-80 ttw:overflow-y-auto",
43
- children: /* @__PURE__ */ v(c, { children: [/* @__PURE__ */ _(f, {
44
- className: "ttw:sticky ttw:top-0 ttw:bg-background",
45
- children: /* @__PURE__ */ v(p, { children: [
46
- /* @__PURE__ */ _(d, {
47
- className: "ttw:w-10",
48
- children: /* @__PURE__ */ _(t, {
49
- "aria-label": j.selectAllRows,
50
- checked: T,
51
- onCheckedChange: E
52
- })
53
- }),
54
- /* @__PURE__ */ _(d, { children: j.columnDuplicate }),
55
- /* @__PURE__ */ _(d, { children: j.columnVendor }),
56
- /* @__PURE__ */ _(d, { children: j.columnInvoiceNumber }),
57
- /* @__PURE__ */ _(d, { children: j.columnAmount }),
58
- /* @__PURE__ */ _(d, { children: j.columnInvoiceDate }),
59
- /* @__PURE__ */ _(d, { children: j.columnAddedOn }),
60
- /* @__PURE__ */ _(d, {
61
- className: "ttw:w-10",
62
- children: /* @__PURE__ */ _("span", {
63
- className: "ttw:sr-only",
64
- children: j.columnActions
65
- })
66
- })
67
- ] })
68
- }), /* @__PURE__ */ _(l, { children: w.map((n) => /* @__PURE__ */ v(p, { children: [
69
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(t, {
70
- "aria-label": n.selectLabel,
71
- checked: n.isSelected ?? !1,
72
- onCheckedChange: n.onToggleSelected
73
- }) }),
74
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(m, { ...n.duplicateBadge }) }),
75
- /* @__PURE__ */ _(u, { children: n.vendorLabel }),
76
- /* @__PURE__ */ _(u, { children: n.invoiceNumberLabel }),
77
- /* @__PURE__ */ _(u, { children: n.amountLabel }),
78
- /* @__PURE__ */ _(u, { children: n.invoiceDateLabel }),
79
- /* @__PURE__ */ _(u, { children: n.addedOnLabel }),
80
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _("div", {
81
- className: "ttw:flex ttw:justify-end",
82
- children: /* @__PURE__ */ _(e, {
83
- variant: "ghost",
84
- size: "icon",
85
- "aria-label": n.openLabel,
86
- onClick: n.onOpen,
87
- children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
88
- })
89
- }) })
90
- ] }, n.id)) })] })
91
- }),
92
- D || O ? /* @__PURE__ */ v(a, {
93
- className: "ttw:flex-row",
94
- children: [D ? /* @__PURE__ */ _(e, {
95
- variant: "outline",
96
- className: "ttw:flex-1",
97
- disabled: k,
98
- onClick: D,
99
- children: j.keepSelectedButton
100
- }) : null, O ? /* @__PURE__ */ v(e, {
101
- variant: "destructive",
102
- className: "ttw:flex-1",
103
- disabled: k,
104
- onClick: O,
105
- children: [/* @__PURE__ */ _(y, {}), j.cancelDuplicatesButton]
106
- }) : null]
107
- }) : null
108
- ]
109
- })
110
- });
111
- }
112
- //#endregion
113
- export { S as DuplicateBillsDialog, S as default };