@tesouro/embedded-components-react 0.11.122 → 0.11.124

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 (88) hide show
  1. package/README.md +6 -3
  2. package/dist/index.css +0 -10
  3. package/dist/index.d.ts +33 -6
  4. package/dist/index.js +15 -14
  5. package/dist/lib/ReceivablesWidget.d.ts +29 -6
  6. package/dist/lib/ReceivablesWidget.js +3 -1
  7. package/dist/lib/WidgetSuite.d.ts +31 -4
  8. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/labels.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/index.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index4.js → lib/BalanceHistoryCard/BalanceHistoryCard.js} +9 -9
  12. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index2.js → lib/BalanceHistoryCard/BalanceHistoryChart.js} +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index3.js → lib/BalanceHistoryCard/labels.js} +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
  82. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +30 -39
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/AccountsSection.js +2 -5
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +18 -31
  86. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js +31 -34
  87. package/package.json +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
@@ -1,47 +1,27 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { SERIES_STATUS_ICON as n } from "./index29.js";
3
+ import { RECURRENCE_CHIP_CLASS as r, RECURRENCE_DOT_CLASS as i } from "./index40.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
5
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js
4
- function r({ label: r, value: i, className: a }) {
5
- return /* @__PURE__ */ n("li", {
6
- className: e("ttw:flex ttw:items-center ttw:justify-between", a),
7
- children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("span", { children: i })]
6
+ function s({ label: i, tone: s, icon: c }) {
7
+ let l = c ? n[c] : void 0;
8
+ return /* @__PURE__ */ o(e, {
9
+ variant: "outline",
10
+ className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
11
+ children: [l ? /* @__PURE__ */ a(l, {
12
+ className: "ttw:size-3",
13
+ "aria-hidden": !0
14
+ }) : null, i]
8
15
  });
9
16
  }
10
- function i({ totals: e, labels: i }) {
11
- return /* @__PURE__ */ n("ul", {
12
- className: "ttw:flex ttw:w-full ttw:list-none ttw:flex-col ttw:gap-1.5",
13
- children: [
14
- /* @__PURE__ */ t(r, {
15
- label: i.subtotalLabel,
16
- value: e.subtotal,
17
- className: "ttw:text-sm ttw:font-normal"
18
- }),
19
- /* @__PURE__ */ t(r, {
20
- label: i.discountTotalLabel,
21
- value: e.discount,
22
- className: "ttw:text-sm ttw:font-normal"
23
- }),
24
- /* @__PURE__ */ t(r, {
25
- label: i.nonTaxableSubtotalLabel,
26
- value: e.nonTaxableSubtotal,
27
- className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
28
- }),
29
- /* @__PURE__ */ t(r, {
30
- label: i.taxableSubtotalLabel,
31
- value: e.taxableSubtotal,
32
- className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
33
- }),
34
- /* @__PURE__ */ t(r, {
35
- label: i.taxTotalLabel,
36
- value: e.tax,
37
- className: "ttw:text-sm ttw:font-normal"
38
- }),
39
- /* @__PURE__ */ t(r, {
40
- label: i.totalLabel,
41
- value: e.total,
42
- className: "ttw:text-lg ttw:font-medium"
43
- })
44
- ]
17
+ function c({ label: n, tone: s }) {
18
+ return /* @__PURE__ */ o(e, {
19
+ variant: "outline",
20
+ className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
21
+ children: [/* @__PURE__ */ a("span", {
22
+ "aria-hidden": !0,
23
+ className: t("ttw:inline-block ttw:size-2 ttw:rounded-full", i[s])
24
+ }), n]
45
25
  });
46
26
  }
47
- export { i as ReceivableFormTotals };
27
+ export { c as IterationStatusChip, s as SeriesStatusChip };
@@ -1,71 +1,88 @@
1
- import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Textarea as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { Button as e, Typography as t, cn as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ReceivableStatusBadge as r } from "../../../shared/document-status/ui/dist/index7.js";
3
+ import "../../../shared/document-status/ui/dist/index.js";
4
+ import { IterationStatusChip as i } from "./index41.js";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { ChevronRight as s } from "lucide-react";
3
7
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js
4
- function l({ id: l, value: u, error: d, disabled: f, label: p, optionalSuffix: m, placeholder: h, description: g, onChange: _ }) {
5
- return /* @__PURE__ */ s(e, { children: /* @__PURE__ */ c(t, { children: [
6
- /* @__PURE__ */ c(i, {
7
- htmlFor: l,
8
- className: "ttw:text-nowrap",
9
- children: [p, /* @__PURE__ */ s(o, {
10
- variant: "body2",
11
- component: "span",
12
- color: "muted",
13
- className: "ttw:leading-snug",
14
- children: m
15
- })]
16
- }),
17
- /* @__PURE__ */ s(a, {
18
- id: l,
19
- value: u,
20
- disabled: f,
21
- placeholder: h,
22
- className: "ttw:h-26 ttw:resize-none",
23
- "aria-invalid": !!d,
24
- onChange: (e) => _(e.target.value)
25
- }),
26
- /* @__PURE__ */ s(n, { children: g }),
27
- /* @__PURE__ */ s(r, { errors: d ? [{ message: d }] : [] })
28
- ] }) });
29
- }
30
- function u({ idPrefix: e, openingNote: t, closingNote: n, openingNoteError: r, closingNoteError: i, disabled: a, onOpeningNoteChange: u, onClosingNoteChange: d, labels: f }) {
31
- return /* @__PURE__ */ c("div", {
32
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
33
- children: [
34
- /* @__PURE__ */ c("div", {
35
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
36
- children: [/* @__PURE__ */ s(o, {
37
- variant: "h4",
38
- children: f.notesHeading
39
- }), /* @__PURE__ */ s(o, {
40
- variant: "body2",
41
- color: "muted",
42
- className: "ttw:font-medium",
43
- children: f.notesDescription
44
- })]
8
+ var c = "ttw:h-10 ttw:px-2 ttw:text-left ttw:text-sm ttw:font-medium ttw:leading-5", l = "ttw:h-9 ttw:px-2 ttw:py-2 ttw:text-left ttw:text-sm ttw:font-normal ttw:leading-5";
9
+ function u({ rows: u, labels: d }) {
10
+ return u.length === 0 ? /* @__PURE__ */ a(t, {
11
+ variant: "body2",
12
+ color: "muted",
13
+ children: d.scheduleEmpty
14
+ }) : /* @__PURE__ */ o("table", {
15
+ className: "ttw:w-full",
16
+ children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [
17
+ /* @__PURE__ */ a("th", {
18
+ scope: "col",
19
+ className: n(c, "ttw:pl-0"),
20
+ children: d.scheduleIssueDateColumn
21
+ }),
22
+ /* @__PURE__ */ a("th", {
23
+ scope: "col",
24
+ className: c,
25
+ children: d.scheduleAmountColumn
26
+ }),
27
+ /* @__PURE__ */ a("th", {
28
+ scope: "col",
29
+ className: c,
30
+ children: d.scheduleStatusColumn
45
31
  }),
46
- /* @__PURE__ */ s(l, {
47
- id: `${e}-opening-note`,
48
- value: t,
49
- error: r,
50
- disabled: a,
51
- label: f.openingNoteLabel,
52
- optionalSuffix: f.optionalSuffix,
53
- placeholder: f.openingNotePlaceholder,
54
- description: f.openingNoteDescription,
55
- onChange: u
32
+ /* @__PURE__ */ a("th", {
33
+ scope: "col",
34
+ className: c,
35
+ children: d.scheduleNumberColumn
56
36
  }),
57
- /* @__PURE__ */ s(l, {
58
- id: `${e}-closing-note`,
59
- value: n,
60
- error: i,
61
- disabled: a,
62
- label: f.closingNoteLabel,
63
- optionalSuffix: f.optionalSuffix,
64
- placeholder: f.closingNotePlaceholder,
65
- description: f.closingNoteDescription,
66
- onChange: d
37
+ /* @__PURE__ */ a("th", {
38
+ className: "ttw:h-10 ttw:w-6 ttw:pl-2",
39
+ "aria-hidden": "true"
67
40
  })
68
- ]
41
+ ] }) }), /* @__PURE__ */ a("tbody", { children: u.map((t) => {
42
+ let { onOpen: c } = t;
43
+ return /* @__PURE__ */ o("tr", {
44
+ className: "ttw:border-t ttw:border-border",
45
+ children: [
46
+ /* @__PURE__ */ a("td", {
47
+ className: n(l, "ttw:pl-0"),
48
+ children: t.issueDateLabel
49
+ }),
50
+ /* @__PURE__ */ a("td", {
51
+ className: l,
52
+ children: t.amountLabel
53
+ }),
54
+ /* @__PURE__ */ a("td", {
55
+ className: "ttw:h-9 ttw:px-2 ttw:py-2 ttw:text-left",
56
+ children: t.chip.kind === "invoice" ? /* @__PURE__ */ a(r, {
57
+ label: t.chip.label,
58
+ status: t.chip.status,
59
+ variant: "filled"
60
+ }) : /* @__PURE__ */ a(i, {
61
+ label: t.chip.label,
62
+ tone: t.chip.tone
63
+ })
64
+ }),
65
+ /* @__PURE__ */ a("td", {
66
+ className: l,
67
+ children: t.numberLabel
68
+ }),
69
+ /* @__PURE__ */ a("td", {
70
+ className: "ttw:h-9 ttw:w-6 ttw:py-2 ttw:pl-2 ttw:text-right ttw:text-muted-foreground",
71
+ children: c ? /* @__PURE__ */ a(e, {
72
+ variant: "ghost",
73
+ size: "icon",
74
+ className: "ttw:size-6",
75
+ "aria-label": t.openLabel,
76
+ onClick: c,
77
+ children: /* @__PURE__ */ a(s, {
78
+ className: "ttw:size-4",
79
+ "aria-hidden": "true"
80
+ })
81
+ }) : null
82
+ })
83
+ ]
84
+ }, t.id);
85
+ }) })]
69
86
  });
70
87
  }
71
- export { u as ReceivableNotesSection };
88
+ export { u as ScheduledInvoicesTable };