@tesouro/embedded-components-react 0.5.228 → 0.5.231

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 (185) hide show
  1. package/README.md +22 -21
  2. package/dist/index.css +10 -0
  3. package/dist/index.d.ts +55 -21
  4. package/dist/index.js +3 -3
  5. package/dist/lib/ExpenseManagementWidget.d.ts +22 -21
  6. package/dist/lib/ExpenseManagementWidget.js +1 -1
  7. package/dist/lib/ReceivablesWidget.d.ts +34 -1
  8. package/dist/lib/ReceivablesWidget.js +1 -1
  9. package/dist/lib/UploadReceiptWidget.d.ts +2 -2
  10. package/dist/lib/UploadReceiptWidget.js +2 -2
  11. package/dist/lib/WidgetSuite.d.ts +17 -15
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index.js +3 -0
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index2.js +5 -0
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{feature/dist/index24.js → approval-policies/feature/dist/index3.js} +7 -7
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{feature/dist/index25.js → approval-policies/feature/dist/index4.js} +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{feature/dist/index26.js → approval-policies/feature/dist/index5.js} +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{feature/dist/index27.js → approval-policies/feature/dist/index6.js} +53 -53
  18. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +8 -0
  19. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/types.js → approval-policies/ui/dist/index2.js} +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/labels.js → approval-policies/ui/dist/index3.js} +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/conditionLabel.js → approval-policies/ui/dist/index4.js} +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/EmptyApprovalRules.js → approval-policies/ui/dist/index5.js} +3 -3
  23. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js → approval-policies/ui/dist/index6.js} +5 -5
  24. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js → approval-policies/ui/dist/index7.js} +4 -4
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js → approval-policies/ui/dist/index8.js} +7 -7
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index.js +18 -19
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/invalidation.js +2 -0
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index20.js → lib/invalidateTransactionViews.js} +4 -4
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index10.js → lib/queryKeys.js} +4 -4
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index5.js → lib/useEntityUsersByIdsQuery.js} +6 -6
  31. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index8.js → lib/useExpenseHistoryQuery.js} +6 -6
  32. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index7.js → lib/useExpenseLedgerAccountsQuery.js} +3 -3
  33. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index17.js → lib/useExpenseReceiptsCountQuery.js} +5 -5
  34. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index16.js → lib/useExpenseTransactionIdsQuery.js} +2 -2
  35. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index15.js → lib/useExpenseTransactionsCountQuery.js} +5 -5
  36. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index19.js → lib/useGetApprovalRequestsQuery.js} +5 -5
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index9.js → lib/useGetTransactionQuery.js} +5 -5
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index3.js → lib/useGetTransactionsQuery.js} +5 -5
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useHasDirectReportsQuery.js +34 -0
  40. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index4.js → lib/useOrganizationDepartmentsQuery.js} +6 -6
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index6.js → lib/useOrganizationLocationsQuery.js} +6 -6
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index11.js → lib/usePatchReceiptMutation.js} +7 -7
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index14.js → lib/useTrackReceiptMatching.js} +7 -7
  44. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index21.js → lib/useTransactionReviewMutations.js} +6 -6
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index18.js → lib/useTransactionValidationsQuery.js} +5 -5
  46. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/{index13.js → lib/useUploadReceiptMutation.js} +7 -7
  47. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +10 -10
  48. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +77 -160
  49. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +356 -63
  50. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +36 -71
  51. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +130 -344
  52. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +223 -36
  53. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index15.js +192 -137
  54. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index16.js +11 -227
  55. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index17.js +81 -186
  56. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index18.js +37 -11
  57. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index19.js +309 -82
  58. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js +30 -87
  59. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index20.js +1 -39
  60. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +3 -2
  61. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +23 -257
  62. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +18 -2
  63. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +160 -59
  64. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +62 -28
  65. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +28 -18
  66. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/data-access/dist/index.js +3 -0
  67. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{data-access → receipt-match/data-access}/dist/index2.js +5 -5
  68. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/data-access/dist/index3.js +40 -0
  69. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index.js +2 -0
  70. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +256 -0
  71. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index3.js +5 -0
  72. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index4.js +65 -0
  73. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index.js +8 -0
  74. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/labels.js → receipt-match/ui/dist/index2.js} +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/ReceiptInboxItem.js → receipt-match/ui/dist/index3.js} +3 -3
  76. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/ReceiptInboxStep.js → receipt-match/ui/dist/index4.js} +6 -6
  77. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js → receipt-match/ui/dist/index5.js} +27 -27
  78. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/MatchConfirmationStep.js → receipt-match/ui/dist/index6.js} +3 -3
  79. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchSidebar.js → receipt-match/ui/dist/index7.js} +6 -6
  80. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js → receipt-match/ui/dist/index8.js} +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +9 -28
  82. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +7 -12
  83. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +1 -7
  84. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +61 -55
  85. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/labels.js +2 -1
  86. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +42 -44
  87. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +6 -6
  88. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +137 -138
  89. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +82 -80
  90. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/{ui → util}/dist/lib/isPdf.js +1 -1
  91. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/util/dist/lib/widgetName.js +4 -0
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +1 -1
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +1 -1
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +32 -33
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +34 -32
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +120 -52
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +44 -100
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +93 -337
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +356 -211
  102. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +225 -157
  103. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +152 -21
  104. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +18 -221
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +224 -56
  106. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -231
  107. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +53 -298
  108. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +232 -43
  109. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +295 -118
  110. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +38 -145
  111. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +126 -46
  112. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +145 -117
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +38 -91
  114. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +113 -107
  115. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +94 -27
  116. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +104 -619
  117. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -41
  118. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +635 -34
  119. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +39 -77
  120. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +34 -117
  121. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +75 -318
  122. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +139 -0
  123. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +340 -0
  124. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +55 -468
  126. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +443 -97
  127. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +24 -21
  128. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +32 -2
  129. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +205 -84
  130. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +161 -3
  131. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +12 -20
  132. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +23 -40
  133. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -17
  134. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +90 -68
  135. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -20
  136. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +20 -12
  137. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +40 -30
  138. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +14 -7
  139. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +15 -301
  140. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +73 -1
  141. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +17 -45
  142. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +12 -68
  143. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +26 -490
  144. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +294 -95
  145. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +1 -0
  146. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +48 -2
  147. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +72 -4
  148. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +496 -1
  149. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +121 -27
  150. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +97 -91
  151. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +2 -236
  152. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -2
  153. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +1 -249
  154. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +89 -82
  155. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +23 -54
  156. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +223 -340
  157. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -0
  158. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +249 -0
  159. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +100 -216
  160. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +93 -0
  161. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +59 -0
  162. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +353 -0
  163. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +35 -29
  164. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -216
  165. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +9 -159
  166. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +27 -14
  167. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +216 -23
  168. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
  169. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  170. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
  171. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatTimestampDate.js +13 -0
  172. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/index.js +4 -0
  173. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/index2.js +91 -0
  174. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index.js +4 -0
  175. package/dist/libs/tesouro-embedded-components-react/{expense-management-widget/ui/dist/lib/UploadReceiptWidget/labels.js → upload-receipt-widget/ui/dist/index2.js} +1 -1
  176. package/dist/libs/tesouro-embedded-components-react/{expense-management-widget/ui/dist/lib/UploadReceiptWidget/UploadReceiptButton.js → upload-receipt-widget/ui/dist/index3.js} +3 -3
  177. package/dist/libs/tesouro-embedded-components-react/{expense-management-widget/ui/dist/lib/UploadReceiptWidget/UploadReceiptModal.js → upload-receipt-widget/ui/dist/index4.js} +3 -3
  178. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +1 -1
  179. package/package.json +1 -1
  180. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js +0 -39
  181. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js +0 -297
  182. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index22.js +0 -1
  183. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index23.js +0 -4
  184. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/labels.js +0 -13
  185. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +0 -28
@@ -10,7 +10,7 @@ import { useEmbedApi as l } from "../../../shared/data-access/dist/lib/EmbedApiC
10
10
  import { organizationHeaders as u } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
11
11
  import "../../../shared/data-access/dist/index.js";
12
12
  import { overdueRemindersInvalidationKey as d, paymentRemindersInvalidationKey as f, recurrenceInvalidationKey as p, recurrencesInvalidationKey as m } from "./index2.js";
13
- import { invalidateReceivable as h } from "./index6.js";
13
+ import { invalidateReceivable as h } from "./index5.js";
14
14
  import { useMutation as g, useQuery as _ } from "@tanstack/react-query";
15
15
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
16
16
  function v() {
@@ -1,37 +1,36 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
- import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
- import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
- import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
1
+ import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
9
2
  import "../../../shared/data-access/dist/index.js";
10
- import { receivableHistoryInvalidationKey as i, receivableMailsInvalidationKey as a } from "./index2.js";
11
- import { useMutation as o } from "@tanstack/react-query";
3
+ import { receivableHistoryInvalidationKey as t, receivableInvalidationKey as n, receivablePdfInvalidationKey as r, receivablesAnalyticsInvalidationKey as i, receivablesInvalidationKey as a } from "./index2.js";
12
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js
13
- function s() {
14
- let { client: s, organizationId: c } = n();
15
- return o({
16
- mutationFn: async ({ path: t, body: n }) => {
17
- let { data: i } = await e({
18
- client: s,
19
- headers: r(c),
20
- path: t,
21
- body: n,
22
- throwOnError: !0
23
- });
24
- return i;
25
- },
26
- onSuccess: async (e, n) => {
27
- let r = {
28
- client: s,
29
- organizationId: c,
30
- receivableId: n.path.receivable_id
31
- };
32
- await Promise.all([t(a(r)), t(i(r))]);
33
- }
34
- });
5
+ async function o({ client: o, organizationId: s, receivableId: c }) {
6
+ let l = [
7
+ a({
8
+ client: o,
9
+ organizationId: s
10
+ }),
11
+ i({
12
+ client: o,
13
+ organizationId: s
14
+ }),
15
+ ...c ? [
16
+ n({
17
+ client: o,
18
+ organizationId: s,
19
+ receivableId: c
20
+ }),
21
+ t({
22
+ client: o,
23
+ organizationId: s,
24
+ receivableId: c
25
+ }),
26
+ r({
27
+ client: o,
28
+ organizationId: s,
29
+ receivableId: c
30
+ })
31
+ ] : []
32
+ ];
33
+ await Promise.all(l.map((t) => e(t)));
35
34
  }
36
35
  //#endregion
37
- export { s as useSendReceivableEmailMutation };
36
+ export { o as invalidateReceivable };
@@ -1,36 +1,38 @@
1
- import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
+ import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
7
+ import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
9
  import "../../../shared/data-access/dist/index.js";
3
- import { receivableHistoryInvalidationKey as t, receivableInvalidationKey as n, receivablePdfInvalidationKey as r, receivablesAnalyticsInvalidationKey as i, receivablesInvalidationKey as a } from "./index2.js";
10
+ import { receivableMailsInvalidationKey as i } from "./index2.js";
11
+ import { invalidateReceivable as a } from "./index5.js";
12
+ import { useMutation as o } from "@tanstack/react-query";
4
13
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
5
- async function o({ client: o, organizationId: s, receivableId: c }) {
6
- let l = [
7
- a({
8
- client: o,
9
- organizationId: s
10
- }),
11
- i({
12
- client: o,
13
- organizationId: s
14
- }),
15
- ...c ? [
16
- n({
17
- client: o,
18
- organizationId: s,
19
- receivableId: c
20
- }),
21
- t({
22
- client: o,
23
- organizationId: s,
24
- receivableId: c
25
- }),
26
- r({
27
- client: o,
28
- organizationId: s,
29
- receivableId: c
30
- })
31
- ] : []
32
- ];
33
- await Promise.all(l.map((t) => e(t)));
14
+ function s() {
15
+ let { client: s, organizationId: c } = n();
16
+ return o({
17
+ mutationFn: async ({ path: t, body: n }) => {
18
+ let { data: i } = await e({
19
+ client: s,
20
+ headers: r(c),
21
+ path: t,
22
+ body: n,
23
+ throwOnError: !0
24
+ });
25
+ return i;
26
+ },
27
+ onSuccess: async (e, n) => {
28
+ let r = {
29
+ client: s,
30
+ organizationId: c,
31
+ receivableId: n.path.receivable_id
32
+ };
33
+ await Promise.all([t(i(r)), a(r)]);
34
+ }
35
+ });
34
36
  }
35
37
  //#endregion
36
- export { o as invalidateReceivable };
38
+ export { s as useSendReceivableEmailMutation };
@@ -6,7 +6,7 @@ import { deleteReceivablesId as e, patchReceivablesId as t, postReceivables as n
6
6
  import { useEmbedApi as c } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
7
  import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
- import { invalidateReceivable as u } from "./index6.js";
9
+ import { invalidateReceivable as u } from "./index5.js";
10
10
  import { useMutation as d } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
12
12
  function f() {
@@ -1,3 +1,3 @@
1
1
  import { InvoicingWidget as e } from "./index3.js";
2
- import { ReceivablesWidget as t } from "./index33.js";
2
+ import { ReceivablesWidget as t } from "./index35.js";
3
3
  export { e as InvoicingWidget, t as ReceivablesWidget };
@@ -1,59 +1,127 @@
1
- import { minorExponentForCurrency as e } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
2
- import { escapeRegex as t, getNumberSeparators as n, parseLocaleDecimal as r } from "./index6.js";
1
+ import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as e, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as t } from "../../ui/dist/index15.js";
2
+ import "../../ui/dist/index.js";
3
+ import { addDays as n, addYears as r, format as i, isValid as a, max as o, min as s, parseISO as c, subYears as l } from "date-fns";
3
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js
4
- function i(t, n) {
5
- return t === "percentage" ? 2 : e(n);
6
- }
7
- function a(e, r, a, o = n()) {
8
- let s = `0-9${t(o.digits.join(""))}${t(o.decimal)}${o.group ? t(o.group) : ""}`, c = e.replace(RegExp(`[^${s}]`, "gu"), ""), l = c.indexOf(o.decimal);
9
- return l === -1 ? c : c.slice(0, l + o.decimal.length) + Array.from(c.slice(l + o.decimal.length).split(o.decimal).join("")).slice(0, i(r, a)).join("");
10
- }
11
- function o(e, t, a, o = n()) {
12
- return Math.round(r(e, o) * 10 ** i(t, a));
13
- }
14
- function s(e, t, n) {
15
- let r = i(t, n);
16
- return new Intl.NumberFormat(void 0, {
17
- minimumFractionDigits: r,
18
- maximumFractionDigits: r
19
- }).format(e / 10 ** r);
20
- }
21
- function c(e, t, n) {
22
- let r = i(t, n), a = {
23
- minimumFractionDigits: r,
24
- maximumFractionDigits: r
25
- };
26
- return t === "percentage" ? new Intl.NumberFormat(void 0, {
27
- ...a,
28
- style: "percent"
29
- }).format(e / 10 ** (r + 2)) : new Intl.NumberFormat(void 0, {
30
- ...a,
31
- style: "currency",
32
- currency: n,
33
- currencyDisplay: "narrowSymbol"
34
- }).format(e / 10 ** r);
35
- }
36
- function l({ value: e, type: t, currency: n }) {
37
- return s(o(e, t, n), t, n);
38
- }
39
- function u(e) {
5
+ var u = "MMM d, yyyy", d = "yyyy-MM-dd", f = 10, p = 5;
6
+ function m(e) {
7
+ let t = (e) => e ? {
8
+ number_of_days: e.number_of_days ?? null,
9
+ discount: e.discount ?? null
10
+ } : null;
11
+ return JSON.stringify({
12
+ name: e.name,
13
+ description: e.description ?? null,
14
+ term_final: { number_of_days: e.term_final?.number_of_days ?? null },
15
+ term_1: t(e.term_1),
16
+ term_2: t(e.term_2)
17
+ });
18
+ }
19
+ function h(e) {
20
+ let t = /* @__PURE__ */ new Set();
21
+ return e.filter((e) => {
22
+ let n = m(e);
23
+ return !t.has(n) && (t.add(n), !0);
24
+ });
25
+ }
26
+ function g(e) {
27
+ return i(e, u);
28
+ }
29
+ function _(e, t) {
30
+ let r = e.term_final?.number_of_days;
31
+ return r ? n(t, r) : void 0;
32
+ }
33
+ function v(e, t = /* @__PURE__ */ new Date()) {
34
+ let n = c(e);
35
+ return a(n) ? n : t;
36
+ }
37
+ function y(e, t) {
38
+ let n = _(e, t);
40
39
  return {
41
- discountType: "amount",
42
- discount: s(0, "amount", e)
40
+ value: e.id,
41
+ label: e.name,
42
+ ...n ? { dueDateLabel: g(n) } : {}
43
43
  };
44
44
  }
45
- function d(e) {
46
- let t = o(e.discount, e.discountType, e.currency);
47
- return t > 0 ? {
48
- type: e.discountType,
49
- amount: t
50
- } : null;
45
+ function b(e) {
46
+ return e ? c(e) : void 0;
47
+ }
48
+ function x({ terms: e, isLoading: t, fields: n, customDatePickerOpen: r, isRecurring: i = !1, messages: a, issueDate: o = /* @__PURE__ */ new Date() }) {
49
+ if (t) return { kind: "loading" };
50
+ let s = h(e ?? []).map((e) => y(e, o)), c = b(n.paymentTermsCustomDate), l;
51
+ if (n.paymentTermsId === "receipt_due") l = { kind: "receiptDue" };
52
+ else if (n.paymentTermsId === "custom") l = {
53
+ kind: "customDate",
54
+ hasDate: !!c,
55
+ dateLabel: c ? g(c) : a.paymentTermsCustomDatePlaceholder
56
+ };
57
+ else {
58
+ let e = s.find((e) => e.value === n.paymentTermsId);
59
+ e && (l = {
60
+ kind: "term",
61
+ option: e
62
+ });
63
+ }
64
+ return {
65
+ kind: "ready",
66
+ value: n.paymentTermsId,
67
+ options: s,
68
+ selection: l,
69
+ customDatePicker: { open: r },
70
+ showCustomDate: !i,
71
+ ...i ? { description: a.recurrenceSeriesPaymentTerms } : {}
72
+ };
51
73
  }
52
- function f(e, t) {
53
- return e ? {
54
- discountType: e.type,
55
- discount: s(e.amount, e.type, t)
56
- } : u(t);
74
+ function S(e, t = /* @__PURE__ */ new Date()) {
75
+ let n = b(e), i = l(t, f), a = r(t, p);
76
+ return {
77
+ selected: n,
78
+ startMonth: n ? s([i, n]) : i,
79
+ endMonth: n ? o([a, n]) : a
80
+ };
81
+ }
82
+ function C(e, t) {
83
+ return t === "custom" ? {
84
+ paymentTermsId: t,
85
+ paymentTermsCustomDate: e.paymentTermsId === "custom" ? e.paymentTermsCustomDate : ""
86
+ } : {
87
+ paymentTermsId: t,
88
+ paymentTermsCustomDate: ""
89
+ };
90
+ }
91
+ function w(e) {
92
+ return e.paymentTermsId === "custom" && !e.paymentTermsCustomDate ? {
93
+ paymentTermsId: "",
94
+ paymentTermsCustomDate: ""
95
+ } : e;
96
+ }
97
+ function T(e) {
98
+ return e ? i(e, d) : "";
99
+ }
100
+ function E(e) {
101
+ return e.paymentTermsId === "custom" ? e.paymentTermsCustomDate ? { payment_terms: { term_final: { end_date: e.paymentTermsCustomDate } } } : { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId === "receipt_due" ? { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId ? { payment_terms_id: e.paymentTermsId } : {};
102
+ }
103
+ function D(e) {
104
+ return e.paymentTermsId ? E(e) : {
105
+ payment_terms_id: null,
106
+ payment_terms: null
107
+ };
108
+ }
109
+ function O(n) {
110
+ if (n?.id) return {
111
+ paymentTermsId: n.id,
112
+ paymentTermsCustomDate: ""
113
+ };
114
+ let r = n?.term_final?.end_date;
115
+ return r ? {
116
+ paymentTermsId: e,
117
+ paymentTermsCustomDate: r.slice(0, 10)
118
+ } : n?.term_final?.number_of_days === 0 ? {
119
+ paymentTermsId: t,
120
+ paymentTermsCustomDate: ""
121
+ } : {
122
+ paymentTermsId: "",
123
+ paymentTermsCustomDate: ""
124
+ };
57
125
  }
58
126
  //#endregion
59
- export { l as convertDiscountInput, u as createEmptyDiscount, c as decorateDiscountInput, d as discountFromDraft, o as discountInputToMinorUnits, f as discountToDraft, s as formatDiscountInput, a as sanitizeDiscountInput };
127
+ export { S as buildCustomDateCalendar, E as buildPaymentTermsPayload, D as buildPaymentTermsUpdatePayload, x as buildPaymentTermsView, w as closeCustomDatePickerFields, h as dedupePaymentTerms, g as formatTermDate, O as paymentTermsToFormFields, v as resolveIssueDate, C as selectPaymentTermsFields, _ as termDueDate, T as toCustomDateValue };
@@ -1,115 +1,59 @@
1
1
  import { minorExponentForCurrency as e } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
2
- import { isBlankLineItem as t, keepsSavedTaxRates as n, lineItemTaxRateMinorUnits as r, maxAmountLabel as i, parseQuantity as a, priceInputToMinorUnits as o } from "./index6.js";
3
- import { discountFromDraft as s } from "./index10.js";
2
+ import { escapeRegex as t, getNumberSeparators as n, parseLocaleDecimal as r } from "./index6.js";
4
3
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js
5
- var c = 1e4;
6
- function l(e, t) {
7
- return Math.round(o(e.price, t) * a(e.quantity));
4
+ function i(t, n) {
5
+ return t === "percentage" ? 2 : e(n);
8
6
  }
9
- function u({ lineItems: e, currency: t, taxRate: n }) {
10
- let r = n ? Math.round(n * 100) : 0, i = 0, a = 0;
11
- for (let n of e) {
12
- let e = l(n, t);
13
- n.taxable ? i += e : a += e;
14
- }
15
- return {
16
- taxableItemsSubtotal: i,
17
- nonTaxableItemsSubtotal: a,
18
- subtotal: i + a,
19
- rateMinorUnits: r
20
- };
7
+ function a(e, r, a, o = n()) {
8
+ let s = `0-9${t(o.digits.join(""))}${t(o.decimal)}${o.group ? t(o.group) : ""}`, c = e.replace(RegExp(`[^${s}]`, "gu"), ""), l = c.indexOf(o.decimal);
9
+ return l === -1 ? c : c.slice(0, l + o.decimal.length) + Array.from(c.slice(l + o.decimal.length).split(o.decimal).join("")).slice(0, i(r, a)).join("");
21
10
  }
22
- function d({ discount: e, subtotal: t }) {
23
- if (!e) return 0;
24
- let n = e.value ?? (e.type === "amount" ? e.amount : Math.round(t * e.amount / 1e4));
25
- return Math.min(Math.max(n, 0), t);
11
+ function o(e, t, a, o = n()) {
12
+ return Math.round(r(e, o) * 10 ** i(t, a));
26
13
  }
27
- function f({ taxableItemsSubtotal: e, nonTaxableItemsSubtotal: t, discountAmount: n }) {
28
- let r = e + t, i = r > 0 ? Math.round(e / r * n) : 0;
29
- return {
30
- taxableSubtotal: e - i,
31
- nonTaxableSubtotal: t - (n - i)
14
+ function s(e, t, n) {
15
+ let r = i(t, n);
16
+ return new Intl.NumberFormat(void 0, {
17
+ minimumFractionDigits: r,
18
+ maximumFractionDigits: r
19
+ }).format(e / 10 ** r);
20
+ }
21
+ function c(e, t, n) {
22
+ let r = i(t, n), a = {
23
+ minimumFractionDigits: r,
24
+ maximumFractionDigits: r
32
25
  };
33
- }
34
- function p({ lineItems: e, currency: t, rateMinorUnits: n, keepSavedRate: i, taxableItemsSubtotal: a, taxableSubtotal: o }) {
35
- if (a <= 0) return 0;
36
- let s = /* @__PURE__ */ new Map();
37
- for (let a of e) {
38
- if (!a.taxable) continue;
39
- let e = r(a, n, i);
40
- s.set(e, (s.get(e) ?? 0) + l(a, t));
41
- }
42
- let u = [...s], d = o, f = 0;
43
- return u.forEach(([e, t], n) => {
44
- let r = n === u.length - 1 ? d : Math.round(o * t / a);
45
- d -= r, f += r * e;
46
- }), Math.round(f / c);
47
- }
48
- function m({ lineItems: e, currency: t, taxRate: n, keepSavedRate: r = !1, discount: i }) {
49
- let a = u({
50
- lineItems: e,
51
- currency: t,
52
- taxRate: n
53
- }), o = d({
54
- discount: i,
55
- subtotal: a.subtotal
56
- }), { taxableSubtotal: s, nonTaxableSubtotal: c } = f({
26
+ return t === "percentage" ? new Intl.NumberFormat(void 0, {
57
27
  ...a,
58
- discountAmount: o
59
- }), l = p({
60
- lineItems: e,
61
- currency: t,
62
- rateMinorUnits: a.rateMinorUnits,
63
- keepSavedRate: r,
64
- taxableItemsSubtotal: a.taxableItemsSubtotal,
65
- taxableSubtotal: s
66
- }), m = a.subtotal - o;
67
- return {
28
+ style: "percent"
29
+ }).format(e / 10 ** (r + 2)) : new Intl.NumberFormat(void 0, {
68
30
  ...a,
69
- discountAmount: o,
70
- discountedSubtotal: m,
71
- taxableSubtotal: s,
72
- nonTaxableSubtotal: c,
73
- totalTaxes: l,
74
- total: m + l
75
- };
76
- }
77
- function h(e) {
78
- return m({
79
- lineItems: e.lineItems.filter((e) => !t(e)),
80
- currency: e.currency,
81
- taxRate: Number(e.taxRate) || void 0,
82
- keepSavedRate: n(e.taxRate, e.savedTaxRate),
83
- discount: s(e)
84
- });
85
- }
86
- function g(e, t) {
87
- let n = s(e);
88
- if (n) return n.type === "percentage" ? n.amount > 1e4 ? t.discountPercentageTooHigh : void 0 : n.amount > h(e).subtotal ? t.discountExceedsSubtotal : void 0;
89
- }
90
- function _(e, n) {
91
- if (e.lineItems.filter((e) => !t(e)).some((t) => o(t.price, e.currency) > 9e15)) return;
92
- let { subtotal: r, total: a } = h(e), s = i(e.currency);
93
- if (r > 9e15) return n.invoiceSubtotalTooHigh.replace("{maxAmount}", s);
94
- if (a > 9e15) return n.invoiceTotalTooHigh.replace("{maxAmount}", s);
95
- }
96
- function v(t, n, r) {
97
- return new Intl.NumberFormat(void 0, {
98
31
  style: "currency",
99
32
  currency: n,
100
- currencyDisplay: "narrowSymbol",
101
- currencySign: r
102
- }).format(t / 10 ** e(n));
33
+ currencyDisplay: "narrowSymbol"
34
+ }).format(e / 10 ** r);
35
+ }
36
+ function l({ value: e, type: t, currency: n }) {
37
+ return s(o(e, t, n), t, n);
103
38
  }
104
- function y(e, t) {
39
+ function u(e) {
105
40
  return {
106
- subtotal: v(e.subtotal, t),
107
- discount: e.discountAmount > 0 ? v(-e.discountAmount, t, "accounting") : v(0, t),
108
- nonTaxableSubtotal: v(e.nonTaxableSubtotal, t),
109
- taxableSubtotal: v(e.taxableSubtotal, t),
110
- tax: v(e.totalTaxes, t),
111
- total: v(e.total, t)
41
+ discountType: "amount",
42
+ discount: s(0, "amount", e)
112
43
  };
113
44
  }
45
+ function d(e) {
46
+ let t = o(e.discount, e.discountType, e.currency);
47
+ return t > 0 ? {
48
+ type: e.discountType,
49
+ amount: t
50
+ } : null;
51
+ }
52
+ function f(e, t) {
53
+ return e ? {
54
+ discountType: e.type,
55
+ discount: s(e.amount, e.type, t)
56
+ } : u(t);
57
+ }
114
58
  //#endregion
115
- export { c as FULL_PERCENT_MINOR_UNITS, f as allocateDiscount, y as buildFormTotalsView, h as calculateFormTotals, m as calculateInvoiceTotals, u as calculateItemsSubtotals, d as resolveDiscountAmount, g as validateDiscount, _ as validateInvoiceTotals };
59
+ export { l as convertDiscountInput, u as createEmptyDiscount, c as decorateDiscountInput, d as discountFromDraft, o as discountInputToMinorUnits, f as discountToDraft, s as formatDiscountInput, a as sanitizeDiscountInput };