@tesouro/embedded-components-react 0.5.279 → 0.5.281

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 (153) hide show
  1. package/dist/index.css +8 -0
  2. package/dist/index.d.ts +23 -8
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +2 -2
  4. package/dist/lib/ReceivablesWidget.d.ts +21 -6
  5. package/dist/lib/WidgetSuite.d.ts +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +1 -0
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +8 -8
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +7 -28
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +8 -160
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +20 -13
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +148 -27
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +21 -96
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +37 -79
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +98 -3
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +83 -54
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +3 -113
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +54 -184
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +108 -75
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +181 -29
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +74 -83
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +27 -412
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +88 -12
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +413 -77
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +13 -80
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +77 -226
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +78 -41
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +216 -234
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +44 -23
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +233 -611
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +25 -4
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +647 -39
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +4 -243
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +42 -3
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +250 -3
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +2 -66
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +5 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +67 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +1 -0
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +11 -11
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +47 -47
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/invalidatePayableQueries.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js +19 -19
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +1 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index4.js +15 -15
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +14 -13
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +24 -168
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +173 -44
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +42 -94
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +91 -76
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +67 -173
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +186 -17
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +27 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +11 -13
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +42 -27
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +28 -132
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +137 -16
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +16 -62
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +66 -28
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +28 -34
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +38 -0
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +304 -287
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/customer.js +58 -0
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +15 -15
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -6
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/permissions.js +2 -1
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +62 -62
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +41 -35
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/totals.js +21 -13
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +124 -124
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +11 -11
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableCustomerPicker.js +109 -0
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +6 -6
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +520 -476
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +10 -10
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +6 -6
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js +1 -1
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +92 -77
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +11 -11
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +4 -4
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +79 -75
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +3 -3
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -23
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +9 -25
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +26 -228
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +227 -52
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +50 -212
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +193 -138
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +157 -12
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +10 -19
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +23 -2
  102. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +2 -116
  103. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +118 -3
  104. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +3 -39
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +209 -53
  106. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +2 -23
  107. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +36 -7
  108. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +53 -77
  109. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +17 -35
  110. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +8 -18
  111. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +73 -37
  112. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +36 -26
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +17 -19
  114. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +39 -8
  115. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +26 -33
  116. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +20 -14
  117. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +8 -24
  118. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +34 -84
  119. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +14 -492
  120. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +28 -2
  121. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +79 -39
  122. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +490 -68
  123. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -487
  124. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +41 -217
  125. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +70 -21
  126. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +440 -5
  127. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +224 -0
  128. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +21 -263
  129. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +8 -2
  130. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +261 -24
  131. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +2 -237
  132. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +100 -3
  133. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +21 -242
  134. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +226 -82
  135. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +3 -60
  136. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +233 -178
  137. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +85 -37
  138. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +60 -0
  139. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +194 -0
  140. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +45 -0
  141. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +9 -9
  142. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +2 -23
  143. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +2 -51
  144. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +8 -8
  145. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +4 -80
  146. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -22
  147. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2 -0
  148. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +1 -0
  149. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  150. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +1 -1
  151. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +2 -2
  152. package/package.json +1 -1
  153. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +0 -100
@@ -1,93 +1,237 @@
1
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Input as s, Label as c, Textarea as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_SEND_DIALOG_LABELS_EN as u } from "./index13.js";
3
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
1
+ import { Button as e, DatePicker as t, FieldError as n, Input as r, Label as i, Select as a, SelectContent as o, SelectItem as s, SelectSeparator as c, SelectTrigger as l, SelectValue as u, Typography as d, cn as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_RECURRENCE_SECTION_LABELS_EN as p } from "./index13.js";
3
+ import { CreationModeOption as m } from "./index52.js";
4
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
4
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js
5
- function p({ message: e }) {
6
- return e ? /* @__PURE__ */ d("p", {
7
- className: "ttw:text-sm ttw:text-destructive",
8
- children: e
9
- }) : null;
10
- }
11
- function m({ open: m, onOpenChange: h, values: g, errors: _, inProgress: v, onChange: y, onSubmit: b, onCancel: x, labels: S }) {
12
- let C = {
13
- ...u,
14
- ...S
15
- };
16
- return /* @__PURE__ */ d(t, {
17
- open: m,
18
- onOpenChange: h,
19
- children: /* @__PURE__ */ f(n, { children: [
20
- /* @__PURE__ */ f(a, { children: [/* @__PURE__ */ d(o, { children: C.title }), /* @__PURE__ */ d(r, { children: C.description })] }),
21
- /* @__PURE__ */ f("div", {
22
- className: "ttw:flex ttw:flex-col ttw:gap-4",
6
+ var v = "ttw:text-sm ttw:font-normal ttw:text-nowrap ttw:text-muted-foreground";
7
+ function y({ idPrefix: y, view: b, disabled: x, onFrequencyChange: S, onMonthDayChange: C, onWeekdayChange: w, onStartDateChange: T, onEndModeChange: E, onEndDateChange: D, onMaxOccurrencesChange: O, onCreationModeChange: k, onSetUpEmailClick: A, emailDialog: j, labels: M }) {
8
+ let N = {
9
+ ...p,
10
+ ...M
11
+ }, P = {
12
+ frequency: `${y}-frequency`,
13
+ monthDay: `${y}-issue-mode`,
14
+ startDate: `${y}-start-date`,
15
+ endMode: `${y}-end-mode`,
16
+ endDate: `${y}-end-date`,
17
+ occurrences: `${y}-max-occurrences`,
18
+ creationMode: `${y}-automation-level`,
19
+ emailError: `${y}-email-error`
20
+ }, { schedule: F, creationMode: I } = b, L = (e, n, r) => /* @__PURE__ */ g("div", {
21
+ className: "ttw:w-44",
22
+ children: /* @__PURE__ */ g(t, {
23
+ id: e,
24
+ value: n.value,
25
+ onChange: r,
26
+ placeholder: N.recurrenceDatePlaceholder,
27
+ disabled: x || n.disabled,
28
+ minDate: n.minDate,
29
+ maxDate: n.maxDate,
30
+ defaultMonth: n.minDate,
31
+ disabledDates: n.isDateDisabled,
32
+ "aria-invalid": n.invalid || void 0,
33
+ className: "ttw:flex-row-reverse ttw:justify-between ttw:text-foreground ttw:[&>svg]:mr-0"
34
+ })
35
+ }), R = (e) => /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(r, {
36
+ id: P.occurrences,
37
+ className: "ttw:w-16",
38
+ type: "text",
39
+ inputMode: "numeric",
40
+ value: e.value,
41
+ disabled: x,
42
+ "aria-invalid": e.invalid || void 0,
43
+ "aria-describedby": F?.maxOccurrencesError ? `${P.occurrences}-error` : void 0,
44
+ onChange: (e) => O(e.target.value)
45
+ }), /* @__PURE__ */ g(i, {
46
+ htmlFor: P.occurrences,
47
+ className: v,
48
+ children: e.unitLabel
49
+ })] });
50
+ return /* @__PURE__ */ _("section", {
51
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5",
52
+ children: [
53
+ /* @__PURE__ */ _("div", {
54
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2.5",
23
55
  children: [
24
- _?.form && /* @__PURE__ */ d("p", {
25
- className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
26
- children: _.form
56
+ /* @__PURE__ */ g(i, {
57
+ htmlFor: P.frequency,
58
+ className: v,
59
+ children: N.recurrenceRepeatLabel
27
60
  }),
28
- /* @__PURE__ */ f("div", {
29
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
30
- children: [
31
- /* @__PURE__ */ d(c, { children: C.toLabel }),
32
- /* @__PURE__ */ d(s, {
33
- value: g.to,
34
- onChange: (e) => y({ to: e.target.value })
35
- }),
36
- /* @__PURE__ */ d(p, { message: _?.to })
37
- ]
61
+ /* @__PURE__ */ _(a, {
62
+ value: b.frequency.value,
63
+ disabled: x || b.frequency.disabled,
64
+ onValueChange: S,
65
+ children: [/* @__PURE__ */ g(l, {
66
+ id: P.frequency,
67
+ className: "ttw:w-31",
68
+ children: /* @__PURE__ */ g(u, {})
69
+ }), /* @__PURE__ */ g(o, { children: b.frequency.options.map((e) => /* @__PURE__ */ g(s, {
70
+ value: e.value,
71
+ children: e.label
72
+ }, e.value)) })]
38
73
  }),
39
- /* @__PURE__ */ f("div", {
40
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
41
- children: [/* @__PURE__ */ f("div", {
42
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
43
- children: [/* @__PURE__ */ d(c, { children: C.ccLabel }), /* @__PURE__ */ d(s, {
44
- value: g.cc,
45
- onChange: (e) => y({ cc: e.target.value })
46
- })]
47
- }), /* @__PURE__ */ f("div", {
48
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
49
- children: [/* @__PURE__ */ d(c, { children: C.bccLabel }), /* @__PURE__ */ d(s, {
50
- value: g.bcc,
51
- onChange: (e) => y({ bcc: e.target.value })
52
- })]
53
- })]
74
+ b.monthDay && /* @__PURE__ */ _(h, { children: [
75
+ /* @__PURE__ */ g(i, {
76
+ htmlFor: P.monthDay,
77
+ className: v,
78
+ children: N.recurrenceMonthDayLead
79
+ }),
80
+ /* @__PURE__ */ _(a, {
81
+ value: b.monthDay.value,
82
+ disabled: x || b.monthDay.disabled,
83
+ onValueChange: C,
84
+ children: [/* @__PURE__ */ g(l, {
85
+ id: P.monthDay,
86
+ className: "ttw:w-fit ttw:min-w-21",
87
+ "aria-invalid": b.monthDay.invalid || void 0,
88
+ children: /* @__PURE__ */ g(u, {})
89
+ }), /* @__PURE__ */ _(o, { children: [
90
+ b.monthDay.edgeOptions.map((e) => /* @__PURE__ */ g(s, {
91
+ value: e.value,
92
+ children: e.label
93
+ }, e.value)),
94
+ /* @__PURE__ */ g(c, {}),
95
+ b.monthDay.dayOptions.map((e) => /* @__PURE__ */ g(s, {
96
+ value: e.value,
97
+ children: e.label
98
+ }, e.value))
99
+ ] })]
100
+ }),
101
+ /* @__PURE__ */ g(d, {
102
+ variant: "body2",
103
+ color: "muted",
104
+ component: "span",
105
+ className: "ttw:text-nowrap",
106
+ children: N.recurrenceMonthDayTrail
107
+ })
108
+ ] }),
109
+ b.weekday && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
110
+ variant: "body2",
111
+ color: "muted",
112
+ component: "span",
113
+ children: N.recurrenceWeekdayLead
114
+ }), /* @__PURE__ */ g("div", {
115
+ className: f("ttw:flex ttw:h-8 ttw:w-56 ttw:rounded-md ttw:border ttw:border-border", b.weekday.invalid && "ttw:border-destructive", b.weekday.disabled && "ttw:opacity-50"),
116
+ children: b.weekday.options.map((e, t, n) => /* @__PURE__ */ g("button", {
117
+ type: "button",
118
+ disabled: x || b.weekday?.disabled,
119
+ "aria-pressed": e.pressed,
120
+ onClick: () => w(e.value),
121
+ className: f("ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center ttw:text-sm ttw:font-medium ttw:transition-colors ttw:hover:cursor-pointer ttw:hover:bg-muted ttw:disabled:pointer-events-none", e.pressed && "ttw:bg-muted", t < n.length - 1 && "ttw:border-r ttw:border-border"),
122
+ children: e.label
123
+ }, e.value))
124
+ })] })
125
+ ]
126
+ }),
127
+ F && /* @__PURE__ */ _("div", {
128
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2.5",
129
+ children: [
130
+ /* @__PURE__ */ g(i, {
131
+ htmlFor: P.startDate,
132
+ className: v,
133
+ children: N.recurrenceStartOnLabel
134
+ }),
135
+ L(P.startDate, F.start, T),
136
+ F.end.kind === "choice" ? /* @__PURE__ */ _(h, { children: [
137
+ /* @__PURE__ */ g(i, {
138
+ htmlFor: P.endMode,
139
+ className: v,
140
+ children: N.recurrenceEndChoiceLead
141
+ }),
142
+ /* @__PURE__ */ _(a, {
143
+ value: F.end.mode.value,
144
+ disabled: x,
145
+ onValueChange: E,
146
+ children: [/* @__PURE__ */ g(l, {
147
+ id: P.endMode,
148
+ className: "ttw:w-21",
149
+ "aria-invalid": F.end.mode.invalid || void 0,
150
+ children: /* @__PURE__ */ g(u, {})
151
+ }), /* @__PURE__ */ g(o, { children: F.end.mode.options.map((e) => /* @__PURE__ */ g(s, {
152
+ value: e.value,
153
+ children: e.label
154
+ }, e.value)) })]
155
+ }),
156
+ F.end.date && L(P.endDate, F.end.date, D),
157
+ F.end.occurrences && R(F.end.occurrences)
158
+ ] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(i, {
159
+ htmlFor: P.occurrences,
160
+ className: v,
161
+ children: N.recurrenceEndCountLead
162
+ }), R(F.end.occurrences)] })
163
+ ]
164
+ }),
165
+ F?.maxOccurrencesError && /* @__PURE__ */ g(n, {
166
+ id: `${P.occurrences}-error`,
167
+ errors: [{ message: F.maxOccurrencesError }]
168
+ }),
169
+ j,
170
+ b.lastDayCaption && /* @__PURE__ */ g(d, {
171
+ variant: "caption",
172
+ color: "muted",
173
+ children: b.lastDayCaption
174
+ }),
175
+ I && /* @__PURE__ */ _("div", {
176
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:pt-1.5",
177
+ children: [
178
+ /* @__PURE__ */ g(i, {
179
+ htmlFor: P.creationMode,
180
+ children: /* @__PURE__ */ _(d, {
181
+ variant: "body2",
182
+ component: "span",
183
+ className: "ttw:block",
184
+ children: [
185
+ N.recurrenceCreationModeQuestion,
186
+ " ",
187
+ /* @__PURE__ */ g(d, {
188
+ variant: "body2",
189
+ component: "span",
190
+ color: "muted",
191
+ children: N.recurrenceCreationModeHint
192
+ })
193
+ ]
194
+ })
54
195
  }),
55
- /* @__PURE__ */ f("div", {
56
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
57
- children: [
58
- /* @__PURE__ */ d(c, { children: C.subjectLabel }),
59
- /* @__PURE__ */ d(s, {
60
- value: g.subject,
61
- onChange: (e) => y({ subject: e.target.value })
62
- }),
63
- /* @__PURE__ */ d(p, { message: _?.subject })
64
- ]
196
+ /* @__PURE__ */ _(a, {
197
+ value: I.value,
198
+ disabled: x,
199
+ onValueChange: (e) => k(e),
200
+ children: [/* @__PURE__ */ g(l, {
201
+ id: P.creationMode,
202
+ "aria-invalid": !!I.emailError || void 0,
203
+ "aria-describedby": I.emailError ? P.emailError : void 0,
204
+ className: "ttw:h-auto! ttw:w-full ttw:py-2.5 ttw:*:data-[slot=select-value]:line-clamp-none",
205
+ children: /* @__PURE__ */ g(u, {})
206
+ }), /* @__PURE__ */ g(o, { children: I.options.map((e) => /* @__PURE__ */ g(s, {
207
+ value: e.value,
208
+ children: /* @__PURE__ */ g(m, { option: e })
209
+ }, e.value)) })]
65
210
  }),
66
- /* @__PURE__ */ f("div", {
67
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
68
- children: [
69
- /* @__PURE__ */ d(c, { children: C.bodyLabel }),
70
- /* @__PURE__ */ d(l, {
71
- rows: 6,
72
- value: g.body,
73
- onChange: (e) => y({ body: e.target.value })
74
- }),
75
- /* @__PURE__ */ d(p, { message: _?.body })
76
- ]
211
+ I.emailSummary !== void 0 && /* @__PURE__ */ _("div", {
212
+ className: "ttw:flex ttw:items-center ttw:gap-2",
213
+ children: [/* @__PURE__ */ g(d, {
214
+ variant: "body2",
215
+ color: "muted",
216
+ className: "ttw:truncate",
217
+ children: I.emailSummary
218
+ }), /* @__PURE__ */ g(e, {
219
+ type: "button",
220
+ variant: "link",
221
+ className: "ttw:h-auto ttw:p-0",
222
+ disabled: x,
223
+ onClick: A,
224
+ children: N.recurrenceSetUpEmail
225
+ })]
226
+ }),
227
+ I.emailError && /* @__PURE__ */ g(n, {
228
+ id: P.emailError,
229
+ errors: [{ message: I.emailError }]
77
230
  })
78
231
  ]
79
- }),
80
- /* @__PURE__ */ f(i, { children: [/* @__PURE__ */ d(e, {
81
- variant: "ghost",
82
- onClick: x,
83
- children: C.cancelButton
84
- }), /* @__PURE__ */ d(e, {
85
- loading: v,
86
- onClick: b,
87
- children: C.sendButton
88
- })] })
89
- ] })
232
+ })
233
+ ]
90
234
  });
91
235
  }
92
236
  //#endregion
93
- export { m as ReceivableSendDialog, m as default };
237
+ export { y as ReceivableRecurrenceSection, y as default };
@@ -1,60 +1,3 @@
1
- import { Skeleton as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_STATUS_CARDS_LABELS_EN as n } from "./index13.js";
3
- import { ReceivableStatusBadge as r } from "./index22.js";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js
6
- var o = 6;
7
- function s({ selected: e, onClick: n, children: r }) {
8
- return /* @__PURE__ */ i("button", {
9
- type: "button",
10
- "aria-pressed": e,
11
- onClick: n,
12
- className: t("ttw:flex ttw:w-42 ttw:shrink-0 ttw:cursor-pointer ttw:flex-col ttw:gap-2 ttw:rounded-xl ttw:border ttw:bg-card ttw:px-4 ttw:py-2 ttw:text-left ttw:transition-colors", e ? "ttw:border-primary" : "ttw:border-card ttw:hover:border-primary"),
13
- children: r
14
- });
15
- }
16
- function c({ view: t, onSelect: c, labels: l }) {
17
- let u = {
18
- ...n,
19
- ...l
20
- };
21
- return t.kind === "loading" ? /* @__PURE__ */ i("div", {
22
- className: "ttw:flex ttw:gap-2",
23
- children: Array.from({ length: o }).map((t, n) => /* @__PURE__ */ i(e, { className: "ttw:h-16.5 ttw:w-42 ttw:rounded-xl" }, n))
24
- }) : /* @__PURE__ */ a("div", {
25
- className: "ttw:mb-6 ttw:flex ttw:gap-2 ttw:overflow-x-auto ttw:[scrollbar-width:none] ttw:[&::-webkit-scrollbar]:hidden",
26
- children: [/* @__PURE__ */ a(s, {
27
- selected: t.all.selected,
28
- onClick: () => c(t.all.value),
29
- children: [/* @__PURE__ */ i("span", {
30
- className: "ttw:text-xs ttw:font-medium ttw:text-foreground",
31
- children: u.all
32
- }), /* @__PURE__ */ i("span", {
33
- className: "ttw:text-2xl ttw:font-medium ttw:leading-8 ttw:tabular-nums ttw:text-foreground",
34
- children: t.all.countLabel
35
- })]
36
- }), t.statuses.map((e) => /* @__PURE__ */ i(s, {
37
- selected: e.selected,
38
- onClick: () => c(e.value),
39
- children: /* @__PURE__ */ a("div", {
40
- className: "ttw:flex ttw:flex-col",
41
- children: [/* @__PURE__ */ a("div", {
42
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
43
- children: [/* @__PURE__ */ i(r, {
44
- label: e.statusLabel,
45
- status: e.value,
46
- variant: "filled"
47
- }), /* @__PURE__ */ i("span", {
48
- className: "ttw:text-xs ttw:font-medium ttw:leading-4.5 ttw:tabular-nums ttw:text-foreground",
49
- children: e.countLabel
50
- })]
51
- }), /* @__PURE__ */ i("span", {
52
- className: "ttw:overflow-hidden ttw:text-ellipsis ttw:whitespace-nowrap ttw:text-2xl ttw:font-medium ttw:leading-8 ttw:tabular-nums ttw:text-foreground",
53
- children: e.amountLabel
54
- })]
55
- })
56
- }, e.value))]
57
- });
58
- }
59
- //#endregion
60
- export { c as ReceivableStatusCards, c as default };
1
+ import "./index13.js";
2
+ import "./index51.js";
3
+ import "./index53.js";