@tesouro/embedded-components-react 0.11.235 → 0.11.236

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 (75) hide show
  1. package/README.md +2 -2
  2. package/dist/index.css +12 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/lib/ReceivablesWidget.d.ts +24 -0
  5. package/dist/lib/WidgetSuite.d.ts +24 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +198 -118
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +76 -194
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +67 -75
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +111 -69
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +459 -108
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +101 -449
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +9 -117
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +85 -8
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +67 -73
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +246 -71
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +40 -251
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +237 -38
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +21 -244
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +529 -21
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +4 -530
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +44 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +242 -41
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +3 -245
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +63 -4
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -64
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +386 -354
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +260 -258
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +219 -179
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -25
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +15 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +31 -40
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -17
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +40 -8
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +30 -63
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +463 -27
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +15 -29
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -18
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +18 -18
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +19 -30
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +15 -66
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +66 -391
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +148 -2
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +173 -43
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +3 -71
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +37 -432
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +66 -188
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +455 -22
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +191 -5
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +23 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +5 -265
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +261 -125
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +2 -27
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +122 -230
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +27 -3
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +216 -224
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +3 -30
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +228 -168
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +29 -21
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +152 -109
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +22 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +140 -43
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +2 -0
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index65.js +47 -0
  70. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/document-preview.js +1 -0
  71. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +122 -0
  73. package/package.json +1 -1
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +0 -1
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +0 -2
@@ -1,187 +1,247 @@
1
- import { Badge as e, Button as t, DataTable as n, Skeleton as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as a } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as o } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
- import { DueDateText as s } from "../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
5
- import "../../../shared/ui/dist/index.js";
6
- import { TabRowAction as c } from "./index8.js";
7
- import { RECEIVABLES_SCREEN_LABELS_EN as l } from "./index19.js";
8
- import { StatusBadge as u } from "./index30.js";
9
- import { ReceivableStatusCards as d } from "./index58.js";
10
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
- import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, LockKeyholeIcon as _ } from "lucide-react";
1
+ import { Alert as e, AlertDescription as t, Button as n, Input as r, Label as i, RadioGroup as a, RadioGroupItem as o, Switch as s, Typography as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_FORM_DIALOG_LABELS_EN as l } from "./index19.js";
3
+ import { Fragment as u } from "react";
4
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
+ import { PlusIcon as m, TriangleAlert as h } from "lucide-react";
12
6
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js
13
- var v = [
14
- 10,
15
- 25,
16
- 50,
17
- 100
18
- ];
19
- function y({ label: e, ariaLabel: n, column: r }) {
20
- let i = r.getIsSorted();
21
- return /* @__PURE__ */ p("div", {
22
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
23
- children: [e, /* @__PURE__ */ f(t, {
24
- variant: "ghost",
25
- size: "icon-sm",
26
- "aria-label": n,
27
- onClick: () => r.toggleSorting(i === "asc"),
28
- children: f(i === "asc" ? g : i === "desc" ? m : h, { className: "ttw:size-4" })
7
+ function g(e) {
8
+ e.key === "Enter" && e.preventDefault();
9
+ }
10
+ var _ = "ttw:border ttw:border-border ttw:rounded-lg ttw:min-h-28 ttw:p-2.5 ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:xl:w-1/2";
11
+ function v({ id: e, value: t, label: n }) {
12
+ return /* @__PURE__ */ p("li", {
13
+ className: "ttw:flex ttw:items-center ttw:gap-2",
14
+ children: [/* @__PURE__ */ f(o, {
15
+ value: t,
16
+ id: e
17
+ }), /* @__PURE__ */ f(i, {
18
+ htmlFor: e,
19
+ className: "ttw:text-sm ttw:font-normal ttw:leading-snug",
20
+ children: n
29
21
  })]
30
22
  });
31
23
  }
32
- function b({ row: t }) {
33
- if (t.customerState === "resolving") return /* @__PURE__ */ f(r, { className: "ttw:h-4 ttw:w-full" });
34
- let n = /* @__PURE__ */ f("span", {
35
- className: i("ttw:min-w-0", t.customerState === "missing" && "ttw:opacity-40"),
36
- children: t.customerLabel
24
+ function y({ idPrefix: e, options: t, selectedId: n, noneLabel: r, onSelect: i }) {
25
+ return /* @__PURE__ */ f(a, {
26
+ className: "ttw:contents",
27
+ value: n,
28
+ onValueChange: i,
29
+ children: /* @__PURE__ */ p("ul", {
30
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
31
+ children: [/* @__PURE__ */ f(v, {
32
+ id: `${e}-none`,
33
+ value: "",
34
+ label: r
35
+ }), t.map((t) => /* @__PURE__ */ f(v, {
36
+ id: `${e}-${t.value}`,
37
+ value: t.value,
38
+ label: t.label
39
+ }, t.value))]
40
+ })
37
41
  });
38
- return t.recurringBadgeLabel ? /* @__PURE__ */ p("span", {
39
- className: "ttw:flex ttw:items-center ttw:gap-2",
40
- children: [n, /* @__PURE__ */ f(e, {
41
- tone: "neutral",
42
- className: "ttw:shrink-0",
43
- children: t.recurringBadgeLabel
44
- })]
45
- }) : n;
46
42
  }
47
- function x({ rows: e, isLoading: t, isError: r, isAccessRestricted: i, sorting: m, onSortingChange: h, pageSize: g, onPageSizeChange: x, pageSizeOptions: S = v, pageInfo: C, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, statusCards: O, onStatusCardSelect: k, filterBar: A, isFiltering: j, onCreateClick: M, headerActionContainer: N, onRowClick: P, onRetry: F, labels: I }) {
48
- let L = {
49
- ...l,
50
- ...I,
51
- statusBadge: {
52
- ...l.statusBadge,
53
- ...I?.statusBadge
54
- }
55
- }, R = [
56
- {
57
- accessorKey: "customerLabel",
58
- header: L.columnCustomer,
59
- cell: ({ row: e }) => /* @__PURE__ */ f(b, { row: e.original }),
60
- minSize: 180
61
- },
62
- {
63
- accessorKey: "documentLabel",
64
- enableSorting: !0,
65
- header: ({ column: e }) => /* @__PURE__ */ f(y, {
66
- column: e,
67
- label: L.columnNumber,
68
- ariaLabel: L.sortByNumber
69
- })
70
- },
71
- {
72
- accessorKey: "status",
73
- enableSorting: !0,
74
- header: ({ column: e }) => /* @__PURE__ */ f(y, {
75
- column: e,
76
- label: L.columnStatus,
77
- ariaLabel: L.sortByStatus
43
+ function b({ direction: e, directionClassName: t, labels: n }) {
44
+ return /* @__PURE__ */ p(c, {
45
+ variant: "body2",
46
+ children: [
47
+ n.reminderNumberOfDays,
48
+ " ",
49
+ /* @__PURE__ */ f("span", {
50
+ className: t,
51
+ children: e
78
52
  }),
79
- cell: ({ row: e }) => /* @__PURE__ */ f(u, {
80
- label: e.original.statusLabel,
81
- color: e.original.statusColor
82
- })
83
- },
84
- {
85
- accessorKey: "issueDateLabel",
86
- enableSorting: !0,
87
- header: ({ column: e }) => /* @__PURE__ */ f(y, {
88
- column: e,
89
- label: L.columnIssueDate,
90
- ariaLabel: L.sortByIssueDate
91
- })
92
- },
93
- {
94
- accessorKey: "dueDateLabel",
95
- enableSorting: !0,
96
- header: ({ column: e }) => /* @__PURE__ */ f(y, {
97
- column: e,
98
- label: L.columnDueDate,
99
- ariaLabel: L.sortByDueDate
53
+ " ",
54
+ n.reminderDueDate
55
+ ]
56
+ });
57
+ }
58
+ function x({ idPrefix: i, view: a, labels: o, onSelect: s, onInputChange: l, onSave: u }) {
59
+ let { create: d } = a, m = `${i}-error`;
60
+ return /* @__PURE__ */ p("div", {
61
+ className: _,
62
+ children: [
63
+ /* @__PURE__ */ f(b, {
64
+ direction: o.reminderBefore,
65
+ directionClassName: "ttw:font-semibold",
66
+ labels: o
100
67
  }),
101
- cell: ({ row: e }) => /* @__PURE__ */ f(s, {
102
- label: e.original.dueDateLabel,
103
- overdueLabel: e.original.dueDateOverdueLabel,
104
- accessibleLabel: e.original.dueDateAccessibleLabel
105
- })
106
- },
107
- {
108
- accessorKey: "totalLabel",
109
- enableSorting: !0,
110
- header: ({ column: e }) => /* @__PURE__ */ f("div", {
111
- className: "ttw:flex ttw:justify-end",
112
- children: /* @__PURE__ */ f(y, {
113
- column: e,
114
- label: L.columnAmount,
115
- ariaLabel: L.sortByAmount
116
- })
68
+ /* @__PURE__ */ f(y, {
69
+ idPrefix: `${i}-option`,
70
+ options: a.options,
71
+ selectedId: a.selectedId,
72
+ noneLabel: o.reminderNone,
73
+ onSelect: s
117
74
  }),
118
- cell: ({ row: e }) => /* @__PURE__ */ f("div", {
119
- className: "ttw:text-right ttw:tabular-nums",
120
- children: e.original.totalLabel
121
- })
122
- },
123
- {
124
- accessorKey: "balanceDueLabel",
125
- header: () => /* @__PURE__ */ f("div", {
126
- className: "ttw:text-right",
127
- children: L.columnBalanceDue
75
+ d && /* @__PURE__ */ p("div", {
76
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5",
77
+ children: [
78
+ d.caption && /* @__PURE__ */ f(c, {
79
+ variant: "caption",
80
+ color: "muted",
81
+ children: d.caption
82
+ }),
83
+ /* @__PURE__ */ p("div", {
84
+ className: "ttw:flex ttw:items-center ttw:gap-2.5",
85
+ children: [
86
+ /* @__PURE__ */ f(r, {
87
+ type: "text",
88
+ inputMode: "numeric",
89
+ value: d.value,
90
+ onChange: (e) => l(e.target.value),
91
+ onKeyDown: g,
92
+ disabled: d.inputDisabled,
93
+ className: "ttw:text-right ttw:w-full ttw:p-1.5 ttw:max-w-56",
94
+ placeholder: o.reminderPlaceholder,
95
+ "aria-label": o.reminderBeforeDueInputLabel,
96
+ "aria-invalid": !!d.error,
97
+ "aria-describedby": d.error ? m : void 0
98
+ }),
99
+ /* @__PURE__ */ f(c, {
100
+ variant: "body2",
101
+ children: d.unitLabel
102
+ }),
103
+ /* @__PURE__ */ f(n, {
104
+ type: "button",
105
+ variant: "secondary",
106
+ className: "ttw:hover:brightness-95 ttw:text-secondary-foreground ttw:text-xs",
107
+ disabled: d.saveDisabled,
108
+ loading: d.isSaving,
109
+ onClick: u,
110
+ children: o.reminderSaveButton
111
+ })
112
+ ]
113
+ }),
114
+ d.error && /* @__PURE__ */ f(c, {
115
+ id: m,
116
+ variant: "caption",
117
+ color: "destructive",
118
+ children: d.error
119
+ })
120
+ ]
128
121
  }),
129
- cell: ({ row: e }) => /* @__PURE__ */ f("div", {
130
- className: "ttw:text-right ttw:tabular-nums",
131
- children: e.original.balanceDueLabel
122
+ a.warning && /* @__PURE__ */ p(e, {
123
+ variant: "warning",
124
+ children: [/* @__PURE__ */ f(h, { "aria-hidden": "true" }), /* @__PURE__ */ f(t, { children: a.warning })]
132
125
  })
133
- }
134
- ], z = !i && !r && !j && e.length === 0;
126
+ ]
127
+ });
128
+ }
129
+ function S({ idPrefix: e, view: t, labels: i, onSelect: a, onTermChange: o, onAddTerm: s, onClear: l, onSave: d }) {
130
+ let { create: h } = t;
135
131
  return /* @__PURE__ */ p("div", {
136
- className: "ttw:flex ttw:flex-col ttw:gap-4",
132
+ className: _,
137
133
  children: [
138
- M && !z && /* @__PURE__ */ f(c, {
139
- container: N,
140
- label: L.createInvoiceButton,
141
- onClick: M
134
+ /* @__PURE__ */ f(b, {
135
+ direction: i.reminderAfter,
136
+ directionClassName: "ttw:font-semibold",
137
+ labels: i
142
138
  }),
143
- !i && O && k && /* @__PURE__ */ f(d, {
144
- view: O,
145
- onSelect: k,
146
- labels: {
147
- group: L.statusCardsGroup,
148
- loading: L.statusCardsLoading
149
- }
139
+ /* @__PURE__ */ f(y, {
140
+ idPrefix: `${e}-option`,
141
+ options: t.options,
142
+ selectedId: t.selectedId,
143
+ noneLabel: i.reminderNone,
144
+ onSelect: a
150
145
  }),
151
- i ? /* @__PURE__ */ f(o, {
152
- icon: /* @__PURE__ */ f(_, { className: "ttw:size-8 ttw:text-primary" }),
153
- title: L.accessRestrictedTitle,
154
- description: L.accessRestrictedDescription
155
- }) : /* @__PURE__ */ f(n, {
156
- columns: R,
157
- data: e,
158
- isLoading: t,
159
- sorting: m,
160
- onSortingChange: h,
161
- pageSize: g,
162
- onPageSizeChange: x,
163
- pageSizeOptions: S,
164
- pageInfo: C,
165
- hasNextPage: w,
166
- hasPrevPage: T,
167
- onNextPage: E,
168
- onPrevPage: D,
169
- onRowClick: P,
170
- rowAriaLabel: (e) => L.openRow(e.documentLabel),
171
- filterComponent: A,
172
- children: r && !j ? /* @__PURE__ */ f(o, {
173
- title: L.errorTitle,
174
- description: L.errorDescription,
175
- retryLabel: F ? L.errorRetry : void 0,
176
- onRetry: F
177
- }) : /* @__PURE__ */ f(a, {
178
- title: j ? L.filterEmptyTitle : L.emptyTitle,
179
- description: j ? void 0 : L.emptyDescription,
180
- actionLabel: j ? void 0 : L.createInvoiceButton,
181
- onAction: j ? void 0 : M
182
- })
146
+ h && /* @__PURE__ */ p("div", {
147
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5",
148
+ children: [
149
+ /* @__PURE__ */ f(c, {
150
+ variant: "caption",
151
+ color: "muted",
152
+ children: h.caption
153
+ }),
154
+ /* @__PURE__ */ p("div", {
155
+ className: "ttw:flex ttw:items-center ttw:gap-2.5",
156
+ children: [h.terms.map((e, t) => /* @__PURE__ */ p(u, { children: [/* @__PURE__ */ f(r, {
157
+ type: "text",
158
+ inputMode: "numeric",
159
+ value: e.value,
160
+ onChange: (e) => o(t, e.target.value),
161
+ onKeyDown: g,
162
+ disabled: h.inputsDisabled,
163
+ className: "ttw:text-right ttw:w-15 ttw:p-1.5",
164
+ placeholder: e.showPlaceholder ? i.reminderPlaceholder : void 0,
165
+ "aria-label": e.ariaLabel
166
+ }), /* @__PURE__ */ f(c, {
167
+ variant: "body2",
168
+ children: e.unitLabel
169
+ })] }, t)), h.showAddTerm && /* @__PURE__ */ p(n, {
170
+ type: "button",
171
+ variant: "ghost",
172
+ className: "ttw:text-xs ttw:text-primary ttw:hover:text-primary",
173
+ disabled: h.addTermDisabled,
174
+ onClick: s,
175
+ children: [/* @__PURE__ */ f(m, {}), i.reminderAddTermButton]
176
+ })]
177
+ }),
178
+ /* @__PURE__ */ p("div", {
179
+ className: "ttw:flex ttw:items-center ttw:gap-2.5",
180
+ children: [/* @__PURE__ */ f(n, {
181
+ type: "button",
182
+ variant: "ghost",
183
+ className: "ttw:text-xs",
184
+ disabled: h.clearDisabled,
185
+ onClick: l,
186
+ children: i.reminderClearButton
187
+ }), /* @__PURE__ */ f(n, {
188
+ type: "button",
189
+ variant: "secondary",
190
+ className: "ttw:hover:brightness-95 ttw:text-secondary-foreground ttw:text-xs",
191
+ disabled: h.saveDisabled,
192
+ loading: h.isSaving,
193
+ onClick: d,
194
+ children: i.reminderSaveButton
195
+ })]
196
+ })
197
+ ]
183
198
  })
184
199
  ]
185
200
  });
186
201
  }
187
- export { x as ReceivablesScreen, x as default };
202
+ function C({ idPrefix: e, view: t, onToggle: n, onPaymentReminderSelect: r, onOverdueReminderSelect: i, onBeforeDueInputChange: a, onBeforeDueSave: o, onOverdueTermChange: u, onOverdueAddTerm: m, onOverdueClear: h, onOverdueSave: g, labels: _ }) {
203
+ let v = {
204
+ ...l,
205
+ ..._
206
+ }, { cards: y } = t;
207
+ return /* @__PURE__ */ p("section", {
208
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
209
+ children: [/* @__PURE__ */ p("div", {
210
+ className: "ttw:flex ttw:items-center ttw:gap-3",
211
+ children: [/* @__PURE__ */ f(s, {
212
+ checked: t.checked,
213
+ disabled: t.toggleDisabled,
214
+ onCheckedChange: n,
215
+ "aria-label": v.remindersToggleLabel
216
+ }), /* @__PURE__ */ f(c, {
217
+ variant: "body2",
218
+ children: v.remindersDescription
219
+ })]
220
+ }), y && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("div", {
221
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:w-full ttw:xl:flex-row",
222
+ children: [y.beforeDue && /* @__PURE__ */ f(x, {
223
+ idPrefix: `${e}-before`,
224
+ view: y.beforeDue,
225
+ labels: v,
226
+ onSelect: r,
227
+ onInputChange: a,
228
+ onSave: o
229
+ }), /* @__PURE__ */ f(S, {
230
+ idPrefix: `${e}-overdue`,
231
+ view: y.overdue,
232
+ labels: v,
233
+ onSelect: i,
234
+ onTermChange: u,
235
+ onAddTerm: m,
236
+ onClear: h,
237
+ onSave: g
238
+ })]
239
+ }), /* @__PURE__ */ f(c, {
240
+ variant: "body2",
241
+ color: "muted",
242
+ className: "ttw:font-medium",
243
+ children: v.remindersLibraryNote
244
+ })] })]
245
+ });
246
+ }
247
+ export { C as ReceivableRemindersSection };
@@ -1,22 +1,30 @@
1
+ import { Skeleton as e, SummaryCard as t, SummaryCardGroup as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LoadingRegion as r } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { RECEIVABLE_STATUS_CARDS_LABELS_EN as i } from "./index19.js";
5
+ import { jsx as a } from "react/jsx-runtime";
1
6
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js
2
- var e = {
3
- createButton: "Create recurring invoice",
4
- columnCustomer: "Customer",
5
- columnRepeats: "Repeats",
6
- columnNextInvoice: "Next invoice",
7
- columnStatus: "Status",
8
- columnAmount: "Amount",
9
- openRow: (e) => `View series — ${e}`,
10
- searchPlaceholder: "Search series",
11
- searchLabel: "Search series",
12
- emptyTitle: "No recurring invoices",
13
- emptyDescription: "You don’t have any recurring invoices yet.",
14
- filterEmptyTitle: "No series found",
15
- filterEmptyAction: "Clear filters",
16
- errorTitle: "Couldn’t load recurring invoices",
17
- errorDescription: "There was an error loading recurring invoices.",
18
- errorRetry: "Try again",
19
- accessRestrictedTitle: "Access restricted",
20
- accessRestrictedDescription: "You don’t have permissions to view this page. Contact your system administrator for details."
21
- };
22
- export { e as RECURRING_SERIES_SCREEN_LABELS_EN };
7
+ var o = 4;
8
+ function s({ view: s, onSelect: c, labels: l }) {
9
+ let u = {
10
+ ...i,
11
+ ...l
12
+ }, d = s.kind === "loading";
13
+ return /* @__PURE__ */ a(r, {
14
+ isLoading: d,
15
+ loadingLabel: u.loading,
16
+ children: /* @__PURE__ */ a(n, {
17
+ "aria-label": u.group,
18
+ children: s.kind === "loading" ? Array.from({ length: o }).map((t, n) => /* @__PURE__ */ a(e, { className: "ttw:h-28 ttw:rounded-lg" }, n)) : s.cards.map((e) => /* @__PURE__ */ a(t, {
19
+ label: e.label,
20
+ labelTone: e.labelTone,
21
+ amount: e.amountLabel,
22
+ caption: e.captionLabel,
23
+ selected: e.selected,
24
+ disabled: e.disabled,
25
+ onClick: () => c(e.value)
26
+ }, e.value))
27
+ })
28
+ });
29
+ }
30
+ export { s as ReceivableStatusCards, s as default };