@tesouro/embedded-components-react 0.11.206 → 0.11.209

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 (84) hide show
  1. package/dist/index.css +13 -126
  2. package/dist/index.d.ts +6 -5
  3. package/dist/lib/ReceivablesWidget.d.ts +6 -5
  4. package/dist/lib/WidgetSuite.d.ts +6 -5
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +16 -18
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +186 -239
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +59 -52
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +5 -4
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +5 -5
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +19 -23
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusColors.js +34 -0
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +2 -6
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +5 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +16 -16
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -2
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -0
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -27
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +18 -120
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +89 -84
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +91 -36
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +41 -2
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -12
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +9 -9
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +9 -25
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +26 -208
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +209 -52
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +50 -208
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +186 -138
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +157 -12
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +10 -19
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +23 -2
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +2 -116
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +117 -3
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +3 -198
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +198 -2
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +2 -54
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +14 -19
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +22 -8
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +40 -77
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +17 -37
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +61 -38
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +27 -27
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -15
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +14 -6
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +19 -35
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +31 -14
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +67 -24
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +391 -84
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +2 -494
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +47 -2
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +62 -38
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +433 -61
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +176 -428
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +20 -224
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +6 -21
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +264 -0
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +2 -264
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +131 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +22 -126
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +235 -23
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +3 -239
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +247 -3
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +26 -244
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +183 -26
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +21 -194
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +143 -21
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +2 -143
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +47 -2
  77. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +2 -2
  78. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +2 -31
  79. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  80. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/helpers.js +1 -1
  81. package/dist/packages/shared-ui-shadcn/dist/index.js +1554 -1544
  82. package/package.json +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +0 -7
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +0 -47
@@ -1,143 +1,2 @@
1
- import { Badge as e, DataTable as t, DataTableSortableHeader 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 { NoAccessState as s } from "../../../shared/ui/dist/lib/StatePanel/NoAccessState.js";
5
- import "../../../shared/ui/dist/index.js";
6
- import { TabRowAction as c } from "./index8.js";
7
- import { RECURRING_SERIES_SCREEN_LABELS_EN as l } from "./index61.js";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
- // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js
10
- var f = [
11
- 10,
12
- 25,
13
- 50,
14
- 100
15
- ], p = [];
16
- function m({ row: e }) {
17
- return e.customerState === "resolving" ? /* @__PURE__ */ u(r, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ u("span", {
18
- className: "ttw:opacity-40",
19
- children: e.customerLabel
20
- }) : /* @__PURE__ */ u("span", { children: e.customerLabel });
21
- }
22
- function h({ row: e }) {
23
- return /* @__PURE__ */ u("span", {
24
- className: i(e.nextInvoiceMuted && "ttw:text-muted-foreground"),
25
- children: e.nextInvoiceLabel
26
- });
27
- }
28
- function g({ row: t }) {
29
- return t.status.kind === "loading" ? /* @__PURE__ */ u(r, { className: "ttw:h-4 ttw:w-full" }) : t.status.kind === "blank" ? null : /* @__PURE__ */ u(e, {
30
- tone: t.status.tone,
31
- children: t.status.label
32
- });
33
- }
34
- function _({ rows: e, isLoading: r, isError: i, isAccessRestricted: _, sorting: v, onSortingChange: y, pageSize: b, onPageSizeChange: x, pageSizeOptions: S = f, hasNextPage: C, hasPrevPage: w, onNextPage: T, onPrevPage: E, filterBar: D, isFiltering: O, onClearFilters: k, onCreateClick: A, headerActionContainer: j, onRowClick: M, onRetry: N, labels: P }) {
35
- let F = {
36
- ...l,
37
- ...P
38
- }, I = [
39
- {
40
- accessorKey: "customerLabel",
41
- header: F.columnCustomer,
42
- cell: ({ row: e }) => /* @__PURE__ */ u(m, { row: e.original }),
43
- minSize: 180
44
- },
45
- {
46
- accessorKey: "repeatsLabel",
47
- header: F.columnRepeats
48
- },
49
- {
50
- accessorKey: "nextInvoiceLabel",
51
- header: F.columnNextInvoice,
52
- cell: ({ row: e }) => /* @__PURE__ */ u(h, { row: e.original })
53
- },
54
- {
55
- id: "status",
56
- header: F.columnStatus,
57
- cell: ({ row: e }) => /* @__PURE__ */ u(g, { row: e.original })
58
- },
59
- {
60
- accessorKey: "amountLabel",
61
- enableSorting: !0,
62
- header: ({ column: e }) => /* @__PURE__ */ u("div", {
63
- className: "ttw:flex ttw:justify-end",
64
- children: /* @__PURE__ */ u(n, {
65
- column: e,
66
- title: F.columnAmount
67
- })
68
- }),
69
- cell: ({ row: e }) => /* @__PURE__ */ u("div", {
70
- className: "ttw:text-right ttw:tabular-nums",
71
- children: e.original.amountLabel
72
- })
73
- }
74
- ], L = (e) => /* @__PURE__ */ d("div", {
75
- className: "ttw:flex ttw:flex-col ttw:gap-2",
76
- children: [
77
- /* @__PURE__ */ d("div", {
78
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
79
- children: [/* @__PURE__ */ u("span", {
80
- className: "ttw:min-w-0 ttw:flex-1 ttw:font-medium",
81
- children: /* @__PURE__ */ u(m, { row: e })
82
- }), /* @__PURE__ */ u("span", {
83
- className: "ttw:tabular-nums",
84
- children: e.amountLabel
85
- })]
86
- }),
87
- [{
88
- label: F.columnRepeats,
89
- value: e.repeatsLabel
90
- }, {
91
- label: F.columnNextInvoice,
92
- value: /* @__PURE__ */ u(h, { row: e })
93
- }].map((e) => /* @__PURE__ */ d("div", {
94
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
95
- children: [/* @__PURE__ */ u("span", {
96
- className: "ttw:text-muted-foreground",
97
- children: e.label
98
- }), /* @__PURE__ */ u("span", { children: e.value })]
99
- }, e.label)),
100
- /* @__PURE__ */ u("div", { children: /* @__PURE__ */ u(g, { row: e }) })
101
- ]
102
- }), R = !_ && !i && !O && e.length === 0;
103
- return /* @__PURE__ */ d("div", {
104
- className: "ttw:flex ttw:flex-col ttw:gap-4",
105
- children: [A && !R && /* @__PURE__ */ u(c, {
106
- container: j,
107
- label: F.createButton,
108
- onClick: A
109
- }), _ ? /* @__PURE__ */ u(s, {
110
- title: F.accessRestrictedTitle,
111
- description: F.accessRestrictedDescription
112
- }) : /* @__PURE__ */ u(t, {
113
- columns: I,
114
- data: i ? p : e,
115
- isLoading: r,
116
- sorting: v,
117
- onSortingChange: y,
118
- pageSize: b,
119
- onPageSizeChange: x,
120
- pageSizeOptions: S,
121
- hasNextPage: !i && C,
122
- hasPrevPage: !i && w,
123
- onNextPage: T,
124
- onPrevPage: E,
125
- onRowClick: M,
126
- rowAriaLabel: (e) => F.openRow(e.customerLabel),
127
- filterComponent: D,
128
- renderCard: L,
129
- children: i ? /* @__PURE__ */ u(o, {
130
- title: F.errorTitle,
131
- description: F.errorDescription,
132
- retryLabel: N ? F.errorRetry : void 0,
133
- onRetry: N
134
- }) : /* @__PURE__ */ u(a, {
135
- title: O ? F.filterEmptyTitle : F.emptyTitle,
136
- description: O ? void 0 : F.emptyDescription,
137
- actionLabel: O ? F.filterEmptyAction : F.createButton,
138
- onAction: O ? k : A
139
- })
140
- })]
141
- });
142
- }
143
- export { _ as RecurringSeriesScreen, _ as default };
1
+ import "./index60.js";
2
+ import "./index61.js";
@@ -1,2 +1,47 @@
1
- import "./index61.js";
2
- import "./index62.js";
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { UNSAVED_INVOICE_DIALOG_LABELS_EN as s } from "./index19.js";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { XIcon as u } from "lucide-react";
5
+ // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js
6
+ function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _ }) {
7
+ let v = {
8
+ ...s,
9
+ ..._
10
+ };
11
+ return /* @__PURE__ */ c(e, {
12
+ open: d,
13
+ onOpenChange: (e) => {
14
+ !e && !h && m();
15
+ },
16
+ children: /* @__PURE__ */ l(t, {
17
+ showCloseButton: !1,
18
+ children: [
19
+ /* @__PURE__ */ l("button", {
20
+ type: "button",
21
+ onClick: m,
22
+ disabled: h,
23
+ className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
24
+ children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
25
+ className: "ttw:sr-only",
26
+ children: v.unsavedCloseButton
27
+ })]
28
+ }),
29
+ /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: v.unsavedTitle }), /* @__PURE__ */ c(n, { children: v.unsavedDescription })] }),
30
+ /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
31
+ type: "button",
32
+ variant: "outline",
33
+ onClick: p,
34
+ disabled: h,
35
+ children: v.unsavedDiscardButton
36
+ }), /* @__PURE__ */ c(o, {
37
+ type: "button",
38
+ loading: h,
39
+ disabled: h || g,
40
+ onClick: f,
41
+ children: v.unsavedSaveDraftButton
42
+ })] })
43
+ ]
44
+ })
45
+ });
46
+ }
47
+ export { d as UnsavedInvoiceDialog, d as default };
@@ -3,6 +3,6 @@ import { BILL_STATUS_TONE_CLASS_NAME as t } from "./index3.js";
3
3
  import { BillStatusBadge as n } from "./index4.js";
4
4
  import "./index5.js";
5
5
  import { RECEIVABLE_STATUS_BADGE_LABELS_EN as r } from "./index6.js";
6
- import { ReceivableStatusBadge as i } from "./index7.js";
6
+ import "./index7.js";
7
7
  import "./index8.js";
8
- export { e as BILL_STATUS_BADGE_LABELS_EN, t as BILL_STATUS_TONE_CLASS_NAME, n as BillStatusBadge, r as RECEIVABLE_STATUS_BADGE_LABELS_EN, i as ReceivableStatusBadge };
8
+ export { e as BILL_STATUS_BADGE_LABELS_EN, t as BILL_STATUS_TONE_CLASS_NAME, n as BillStatusBadge, r as RECEIVABLE_STATUS_BADGE_LABELS_EN };
@@ -1,31 +1,2 @@
1
- import { Badge as e, cn as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_STATUS_BADGE_LABELS_EN as n } from "./index6.js";
3
- import { receivableFilledTone as r } from "../../util/dist/lib/receivableFilledTone.js";
4
- import { jsxs as i } from "react/jsx-runtime";
5
- // ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js
6
- var a = {
7
- danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
8
- info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
9
- neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
10
- success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
11
- warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
12
- }, o = {
13
- neutral: "ttw:bg-muted ttw:text-muted-foreground",
14
- cyan: "ttw:bg-cyan-100 ttw:text-cyan-700",
15
- success: "ttw:bg-green-100 ttw:text-green-700",
16
- purple: "ttw:bg-purple-100 ttw:text-purple-700",
17
- orange: "ttw:bg-orange-100 ttw:text-orange-700",
18
- danger: "ttw:bg-destructive/10 ttw:text-destructive"
19
- };
20
- function s({ status: s, label: c, tone: l = "neutral", variant: u = "outline", filledTone: d, labels: f, icon: p }) {
21
- let m = {
22
- ...n,
23
- ...f
24
- }, h = c ?? (s && Object.hasOwn(m, s) ? m[s] : void 0) ?? m.unknown;
25
- return /* @__PURE__ */ i(e, {
26
- variant: "outline",
27
- className: t(p && "ttw:gap-1", u === "filled" ? ["ttw:border-transparent", o[d ?? r(s)]] : a[l]),
28
- children: [p, h]
29
- });
30
- }
31
- export { s as ReceivableStatusBadge, s as default };
1
+ import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.206", n = "577feddba826b8546285ac126d9a7f007f45d59d", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.209", n = "c2013ecb73f19d2a63b92dd7f729042db22de841", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -44,7 +44,7 @@ function c(t) {
44
44
  var l = new Intl.DateTimeFormat(void 0, {
45
45
  year: "numeric",
46
46
  month: "short",
47
- day: "2-digit"
47
+ day: "numeric"
48
48
  });
49
49
  function u(e) {
50
50
  if (!e) return "";