@tesouro/embedded-components-react 0.2.107 → 0.2.109

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 (374) hide show
  1. package/dist/index.css +6 -0
  2. package/dist/lib/ReceivablesWidget.js +20 -20
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +148 -35
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +59 -5
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +7 -0
  7. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +6 -17
  8. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index6.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +17 -6
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +19 -19
  12. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index10.js +2 -2
  13. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +2 -2
  14. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index11.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +12 -23
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +10 -10
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +23 -32
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +10 -35
  25. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +9 -4
  26. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +33 -2
  27. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +35 -25
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +4 -1271
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +2 -10
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +24 -8
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +1270 -12
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index13.js +14 -14
  33. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +60 -8
  34. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +397 -25
  35. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +69 -9
  36. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +2 -46
  37. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +406 -75
  38. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +9 -58
  39. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +45 -196
  40. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +75 -11
  41. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +58 -14
  42. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +196 -38
  43. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index14.js +12 -12
  44. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +10 -24
  45. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +14 -82
  46. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +39 -9
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +22 -76
  48. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +82 -29
  49. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +9 -64
  50. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +76 -38
  51. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +29 -7
  52. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +64 -5
  53. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +38 -114
  54. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +4 -4
  55. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +7 -70
  56. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +5 -190
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +117 -30
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +68 -109
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +188 -135
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +30 -19
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +108 -18
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +134 -20
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +16 -23
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +21 -183
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +22 -12
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +21 -16
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +183 -50
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +13 -4
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +22 -5
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +50 -88
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +7 -36
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +4 -8
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +24 -45
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +5 -50
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +86 -203
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +33 -423
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +6 -22
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +45 -74
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +50 -6
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +205 -33
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +422 -27
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +24 -12
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +76 -12
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +6 -26
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +33 -14
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +30 -10
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +12 -121
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +12 -12
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +24 -47
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +12 -47
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +8 -10
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +116 -41
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +12 -15
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +48 -10
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index19.js +1 -1
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index190.js +44 -147
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +12 -55
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +45 -70
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +15 -29
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +11 -3
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +146 -93
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +57 -57
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +71 -27
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +25 -9
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +3 -20
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index2.js +20 -20
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +96 -18
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +57 -2
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +25 -10
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +9 -18
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +18 -20
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +20 -26
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +2 -117
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +10 -68
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +20 -12
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +22 -12
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +27 -26
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +107 -86
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +65 -96
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +12 -16
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +12 -14
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +25 -13
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +96 -7
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +98 -32
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +17 -59
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +13 -397
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +13 -68
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +7 -2
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +34 -406
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +3 -3
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +11 -11
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +1 -1
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +2 -2
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +4 -4
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +1 -1
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +1 -1
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +4 -4
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +4 -4
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +7 -7
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +2 -2
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +62 -46
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +26 -27
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +126 -4
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +44 -77
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +73 -32
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +40 -19
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +347 -22
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +299 -53
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +101 -27
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +155 -53
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +262 -15
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +23 -489
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +18 -166
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +10 -42
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +156 -58
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +28 -31
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +28 -113
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +78 -22
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +30 -32
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +58 -53
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +31 -14
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +111 -77
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +22 -77
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +41 -41
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +56 -72
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +490 -62
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +164 -24
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +2 -127
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +96 -44
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +97 -149
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +191 -9
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +13 -18
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +73 -58
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +77 -43
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +41 -22
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index3.js +3 -3
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +149 -141
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +19 -112
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +21 -79
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +31 -282
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +62 -46
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +43 -15
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +21 -82
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +136 -220
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +109 -36
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +81 -10
  187. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +282 -8
  188. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +46 -8
  189. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +15 -12
  190. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +85 -6
  191. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +225 -2
  192. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +34 -36
  193. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +11 -347
  194. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +8 -300
  195. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +7 -99
  196. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +10 -160
  197. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +6 -266
  198. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +2 -25
  199. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +19 -18
  200. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +43 -2
  201. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +22 -96
  202. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +56 -96
  203. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +29 -192
  204. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +58 -20
  205. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +18 -16
  206. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +94 -17
  207. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +16 -170
  208. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +81 -130
  209. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +17 -162
  210. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +47 -9
  211. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +11 -18
  212. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +48 -61
  213. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +17 -65
  214. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +28 -58
  215. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +38 -4
  216. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +61 -9
  217. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +93 -59
  218. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +109 -21
  219. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +85 -60
  220. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +67 -14
  221. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +40 -89
  222. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +28 -16
  223. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +5 -85
  224. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +77 -17
  225. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +32 -50
  226. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +19 -11
  227. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +21 -49
  228. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +17 -159
  229. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +19 -28
  230. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +169 -27
  231. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +132 -76
  232. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +158 -63
  233. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +10 -19
  234. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +18 -42
  235. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +60 -21
  236. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +64 -30
  237. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +11 -11
  238. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +58 -18
  239. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +6 -28
  240. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +6 -37
  241. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +58 -59
  242. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +22 -94
  243. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +59 -108
  244. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +14 -88
  245. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index37.js +10 -10
  246. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +1 -1
  247. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +1 -1
  248. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +5 -5
  249. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +10 -255
  250. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +10 -9
  251. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index38.js +9 -9
  252. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +255 -11
  253. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +32 -7
  254. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +117 -48
  255. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +18 -18
  256. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +16 -123
  257. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +16 -18
  258. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +10 -10
  259. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +6 -6
  260. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +73 -16
  261. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +13 -13
  262. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +24 -24
  263. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +16 -73
  264. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +10 -10
  265. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +11 -16
  266. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +10 -16
  267. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +96 -11
  268. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +34 -71
  269. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +33 -66
  270. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +20 -37
  271. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +67 -2
  272. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +18 -9
  273. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index4.js +5 -5
  274. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +4 -4
  275. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +20 -66
  276. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +13 -19
  277. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +14 -21
  278. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +8 -32
  279. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +65 -31
  280. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +20 -31
  281. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -85
  282. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +4 -23
  283. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +32 -11
  284. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +4 -104
  285. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index41.js +1 -1
  286. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +127 -112
  287. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +12 -16
  288. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +28 -23
  289. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +23 -49
  290. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +38 -31
  291. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +33 -5
  292. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +84 -126
  293. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +24 -12
  294. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +11 -67
  295. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +98 -89
  296. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index42.js +2 -2
  297. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +110 -36
  298. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +18 -31
  299. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +27 -28
  300. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +37 -23
  301. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +68 -38
  302. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +47 -8
  303. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +25 -19
  304. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +31 -16
  305. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +53 -20
  306. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +34 -14
  307. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +12 -12
  308. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +20 -15
  309. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +8 -14
  310. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +7 -21
  311. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +54 -5
  312. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +15 -66
  313. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +67 -39
  314. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +67 -27
  315. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +39 -29
  316. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +29 -69
  317. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +48 -36
  318. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +5 -5
  319. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +46 -30
  320. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +38 -31
  321. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +11 -21
  322. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +23 -53
  323. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +47 -33
  324. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +2 -2
  325. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +2 -2
  326. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +11 -11
  327. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +3 -3
  328. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +1 -1
  329. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +1 -1
  330. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +2 -2
  331. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +1 -1
  332. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +33 -19
  333. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +9 -9
  334. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +2 -2
  335. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +1 -1
  336. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +1 -1
  337. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +42 -33
  338. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +35 -41
  339. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +14 -35
  340. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +18 -15
  341. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +51 -19
  342. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +7 -7
  343. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +55 -47
  344. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +30 -56
  345. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +49 -28
  346. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +14 -52
  347. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +19 -15
  348. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +1 -1
  349. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +2 -2
  350. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +51 -19
  351. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +53 -49
  352. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +35 -48
  353. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index48.js +2 -2
  354. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +17 -40
  355. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +39 -47
  356. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +47 -39
  357. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index5.js +9 -9
  358. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +1 -1
  359. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +9 -9
  360. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +4 -4
  361. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +2 -2
  362. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +1 -1
  363. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index6.js +10 -10
  364. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index8.js +3 -3
  365. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index86.js +1 -1
  366. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +2 -2
  367. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +6 -6
  368. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +4 -4
  369. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +12 -12
  370. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +19 -19
  371. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  372. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +20 -20
  373. package/package.json +1 -1
  374. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +0 -174
@@ -1,227 +1,143 @@
1
- import { jsxs as c, jsx as e, Fragment as p } from "@emotion/react/jsx-runtime";
2
- import { useLingui as U } from "@lingui/react";
3
- import { useFormContext as W, Controller as m } from "react-hook-form";
4
- import { Field as h, FieldContent as _ } from "./index192.js";
5
- import { Select as D, SelectTrigger as k, SelectValue as C, SelectContent as S, SelectItem as d, SelectSeparator as K } from "./index289.js";
6
- import { Typography as w } from "./index85.js";
7
- import { DatePicker as j } from "./index407.js";
8
- import { Input as E } from "./index127.js";
9
- import { RECEIPT_DUE_PAYMENT_TERM as z, CUSTOM_DATE_PAYMENT_TERM as B } from "./index152.js";
10
- const G = ["day", "week", "month"], $ = (t) => {
11
- (t.key === "." || t.key === ",") && t.preventDefault();
12
- }, J = (t) => {
13
- const o = ["th", "st", "nd", "rd"], s = t % 100;
14
- return `${t}${o[(s - 20) % 10] ?? o[s] ?? o[0]}`;
15
- }, Q = Array.from({
16
- length: 31
17
- }, (t, o) => o + 1), F = ["recurrence_start_date", "recurrence_end_date", "recurrence_issue_mode", "recurrence_days_of_week", "recurrence_end_mode", "recurrence_max_occurrences"], A = {
18
- su: 0,
19
- mo: 1,
20
- tu: 2,
21
- we: 3,
22
- th: 4,
23
- fr: 5,
24
- sa: 6
25
- }, P = () => {
26
- const t = /* @__PURE__ */ new Date();
27
- return t.setHours(0, 0, 0, 0), t;
28
- }, X = (t) => {
29
- const o = P(), s = (A[t] - o.getDay() + 7) % 7, f = new Date(o);
30
- return f.setDate(o.getDate() + s), f;
31
- }, ie = () => {
1
+ import { jsxs as P, jsx as i } from "@emotion/react/jsx-runtime";
2
+ import { useState as x, useCallback as p, useMemo as w, useEffect as J } from "react";
3
+ import { useMoniteContext as R } from "./index57.js";
4
+ import { useCurrencies as X } from "./index58.js";
5
+ import "./index92.js";
6
+ import { useLingui as Y } from "@lingui/react";
7
+ import "react-dom";
8
+ import "@mui/x-data-grid";
9
+ import { useUserPermissions as Z } from "./index166.js";
10
+ import "../../shared/data-access/dist/lib/rest/client/utils.gen.js";
11
+ import "../../shared/data-access/dist/lib/EmbedApiContext.js";
12
+ import "../../shared/data-access/dist/lib/rest/client.gen.js";
13
+ import "@tanstack/react-query";
14
+ import "../../shared/data-access/dist/lib/rest/zod.gen.js";
15
+ import { Scope as $ } from "../../shared/data-access/dist/lib/scopes.js";
16
+ import { Combobox as ee, ComboboxInput as te, ComboboxContent as ne, ComboboxList as ie, ComboboxEmpty as ae, ComboboxItem as oe } from "./index90.js";
17
+ import { InputGroupAddon as re } from "./index101.js";
18
+ import { Loader2 as M } from "lucide-react";
19
+ const se = "custom", Pe = ({
20
+ fieldName: a,
21
+ error: V,
22
+ disabled: j,
23
+ index: B = 0,
24
+ defaultCurrency: D,
25
+ measureUnits: C,
26
+ container: E,
27
+ onChange: l
28
+ }) => {
32
29
  const {
33
- i18n: t
34
- } = U(), {
35
- control: o,
36
- watch: s,
37
- clearErrors: f,
38
- setValue: l
39
- } = W(), i = s("frequency"), R = s("payment_terms_id"), g = s("recurrence_issue_mode"), V = s("recurrence_end_mode"), x = s("recurrence_days_of_week"), Y = s("recurrence_max_occurrences"), v = Number(Y) === 1, M = s("recurrence_start_date"), y = M ? new Date(M) : void 0, T = s("recurrence_end_date"), b = T ? new Date(T) : void 0, q = (r) => {
40
- if (r < P()) return !0;
41
- if (i === "week")
42
- return x ? r.getDay() !== A[x] : !1;
43
- if (i !== "month" || !g) return !1;
44
- const n = r.getDate(), a = new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate();
45
- if (g === "first_day") return n !== 1;
46
- if (g === "last_day") return n !== a;
47
- const u = Number(g);
48
- return Number.isNaN(u) ? !1 : n !== Math.min(u, a);
49
- }, I = (r) => {
50
- if (q(r)) return !0;
51
- if (!y) return !1;
52
- const n = new Date(y);
53
- return n.setHours(0, 0, 0, 0), r < n;
54
- }, O = (r) => {
55
- if (q(r)) return !0;
56
- if (!b) return !1;
57
- const n = new Date(b);
58
- return n.setHours(0, 0, 0, 0), r > n;
59
- }, H = () => {
60
- switch (i) {
61
- case "once":
62
- case "day":
63
- case "quarter":
64
- case "year":
65
- default:
66
- return null;
67
- case "month":
68
- return /* @__PURE__ */ c(p, { children: [
69
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("on the") }),
70
- /* @__PURE__ */ e(m, { name: "recurrence_issue_mode", control: o, render: ({
71
- field: r,
72
- fieldState: {
73
- error: n
74
- }
75
- }) => /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ c(D, { value: r.value, onValueChange: (a) => {
76
- r.onChange(a), f("recurrence_issue_mode"), l("recurrence_start_date", void 0, {
77
- shouldDirty: !1
78
- });
79
- }, children: [
80
- /* @__PURE__ */ e(k, { id: "recurrence_issue_mode", className: "ttw:min-w-21 ttw:w-fit", "aria-invalid": !!n, children: /* @__PURE__ */ e(C, {}) }),
81
- /* @__PURE__ */ c(S, { children: [
82
- /* @__PURE__ */ e(d, { value: "first_day", children: t._("First day") }),
83
- /* @__PURE__ */ e(d, { value: "last_day", children: t._("Last day") }),
84
- /* @__PURE__ */ e(K, {}),
85
- Q.map((a) => /* @__PURE__ */ e(d, { value: String(a), children: J(a) }, a))
86
- ] })
87
- ] }) }) }) }),
88
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("day of every month") })
89
- ] });
90
- case "week":
91
- return /* @__PURE__ */ c(p, { children: [
92
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", children: t._("on") }),
93
- /* @__PURE__ */ e(m, { name: "recurrence_days_of_week", control: o, render: ({
94
- field: r,
95
- fieldState: {
96
- error: n
97
- }
98
- }) => {
99
- const a = r.value, u = (N) => {
100
- a !== N && (r.onChange(N), l("recurrence_start_date", X(N), {
101
- shouldDirty: !0
102
- }), f("recurrence_start_date"));
103
- };
104
- return /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ c("div", { "aria-invalid": !!n, className: "ttw:flex ttw:border ttw:border-border ttw:rounded-md ttw:h-8 ttw:w-56 ttw:aria-invalid:border-destructive", children: [
105
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "mo", "data-active": a === "mo", onClick: () => u("mo"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Mo") }),
106
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "tu", "data-active": a === "tu", onClick: () => u("tu"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Tu") }),
107
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "we", "data-active": a === "we", onClick: () => u("we"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("We") }),
108
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "th", "data-active": a === "th", onClick: () => u("th"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Th") }),
109
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "fr", "data-active": a === "fr", onClick: () => u("fr"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Fr") }),
110
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "sa", "data-active": a === "sa", onClick: () => u("sa"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:border-r ttw:border-border ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Sa") }),
111
- /* @__PURE__ */ e("button", { type: "button", "aria-pressed": a === "su", "data-active": a === "su", onClick: () => u("su"), className: "ttw:hover:cursor-pointer ttw:transition-colors ttw:hover:bg-muted ttw:data-[active=true]:bg-muted ttw:text-sm ttw:font-medium ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center", children: t._("Su") })
112
- ] }) }) });
113
- } })
114
- ] });
30
+ i18n: f
31
+ } = Y(), k = D, [g, m] = x(""), [b, I] = x(!1), [q, y] = x(null), [_, u] = x(!1), {
32
+ api: z
33
+ } = R(), {
34
+ formatCurrencyToDisplay: A
35
+ } = X(), d = Z().has($.ProductWriteOrg), {
36
+ data: N,
37
+ isLoading: F,
38
+ fetchNextPage: S,
39
+ hasNextPage: T,
40
+ isFetchingNextPage: v
41
+ } = z.finops.getProducts.useInfiniteQuery({
42
+ query: {
43
+ limit: 20,
44
+ currency: k
115
45
  }
116
- }, L = () => {
117
- switch (i) {
118
- case "once":
119
- default:
120
- return null;
121
- case "day":
122
- return /* @__PURE__ */ c(p, { children: [
123
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("and end") }),
124
- /* @__PURE__ */ e(m, { name: "recurrence_end_mode", control: o, render: ({
125
- field: r,
126
- fieldState: {
127
- error: n
128
- }
129
- }) => /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ c(D, { value: r.value, onValueChange: (a) => {
130
- r.onChange(a), a === "after" ? l("recurrence_end_date", void 0, {
131
- shouldDirty: !1
132
- }) : l("recurrence_max_occurrences", void 0, {
133
- shouldDirty: !1
134
- });
135
- }, children: [
136
- /* @__PURE__ */ e(k, { id: "recurrence_end_mode", className: "ttw:w-21", "aria-invalid": !!n, children: /* @__PURE__ */ e(C, {}) }),
137
- /* @__PURE__ */ c(S, { children: [
138
- /* @__PURE__ */ e(d, { value: "after", children: t._("After") }),
139
- /* @__PURE__ */ e(d, { value: "on", children: t._("On") })
140
- ] })
141
- ] }) }) }) }),
142
- V === "on" ? /* @__PURE__ */ e(m, { control: o, name: "recurrence_end_date", render: ({
143
- field: r,
144
- fieldState: {
145
- error: n
146
- }
147
- }) => /* @__PURE__ */ e(h, { className: "ttw:grow-0 ttw:w-44", children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(j, { ...r, selected: r.value ? new Date(r.value) : void 0, onSelect: r.onChange, showOutsideDays: !1, disabled: I, "aria-invalid": !!n, startMonth: y ? new Date(y.getFullYear(), y.getMonth(), 1) : /* @__PURE__ */ new Date(), endMonth: new Date(2050, 11) }) }) }) }) : /* @__PURE__ */ c(p, { children: [
148
- /* @__PURE__ */ e(m, { name: "recurrence_max_occurrences", control: o, render: ({
149
- field: r,
150
- fieldState: {
151
- error: n
152
- }
153
- }) => /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ e(E, { ...r, className: "ttw:w-16", value: r.value ?? "", type: "number", min: 0, max: 1e3, onKeyDown: $, "aria-invalid": !!n }) }) }) }),
154
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: v ? t._("day") : t._("days") })
155
- ] })
156
- ] });
157
- case "month":
158
- case "quarter":
159
- case "year":
160
- case "week":
161
- return /* @__PURE__ */ c(p, { children: [
162
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("and end after") }),
163
- /* @__PURE__ */ e(m, { name: "recurrence_max_occurrences", control: o, render: ({
164
- field: r,
165
- fieldState: {
166
- error: n
167
- }
168
- }) => /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ e(E, { ...r, className: "ttw:w-16", value: r.value ?? "", type: "number", min: 0, max: 1e3, onKeyDown: $, "aria-invalid": !!n }) }) }) }),
169
- /* @__PURE__ */ c(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: [
170
- i === "month" && (v ? t._("month") : t._("months")),
171
- i === "quarter" && (v ? t._("quarter") : t._("quarters")),
172
- i === "week" && (v ? t._("week") : t._("weeks")),
173
- i === "year" && (v ? t._("year") : t._("years"))
174
- ] })
175
- ] });
46
+ }, {
47
+ initialPageParam: {
48
+ query: {
49
+ pagination_token: void 0
50
+ }
51
+ },
52
+ getNextPageParam: (e) => {
53
+ if (e.next_pagination_token)
54
+ return {
55
+ query: {
56
+ pagination_token: e.next_pagination_token
57
+ }
58
+ };
59
+ },
60
+ enabled: !!k
61
+ }), H = p((e) => {
62
+ const {
63
+ scrollTop: t,
64
+ scrollHeight: r,
65
+ clientHeight: L
66
+ } = e.currentTarget;
67
+ r - t - L < 100 && T && !v && S();
68
+ }, [S, T, v]), o = w(() => N ? N.pages.flatMap((e) => e.data).sort((e, t) => (e.name ?? "").localeCompare(t.name ?? "")) : [], [N]), c = w(() => !o || o.length === 0 ? [] : o.map((e) => {
69
+ const t = C ? C.data.find((r) => r.id === e.measure_unit_id) : void 0;
70
+ return {
71
+ id: e.id,
72
+ label: e.name,
73
+ description: e.description,
74
+ price: e.price,
75
+ smallestAmount: e.smallest_amount,
76
+ measureUnit: t
77
+ };
78
+ }), [o, C]);
79
+ J(() => {
80
+ !b && a && a.length > 0 && !g.length && (o?.find((e) => e?.name === a) || m(a));
81
+ }, [a, b, o, g]);
82
+ let n = o?.find((e) => e?.id === q);
83
+ if (!b && a && a.length > 0 && !g.length && !n) {
84
+ const e = o?.find((t) => t?.name === a);
85
+ e && (n = e);
86
+ }
87
+ const O = n ? n.id : null, h = n ? n.name : g, s = w(() => {
88
+ const e = h.toLowerCase().trim();
89
+ return !e || n && n.name.toLowerCase() === e ? c : c.filter((t) => t.label.toLowerCase().includes(e));
90
+ }, [h, c, n]), W = w(() => s.map((e) => e.id), [s]), G = p(() => {
91
+ I(!0), u(!0);
92
+ }, []), K = p(() => {
93
+ I(!1);
94
+ }, []), U = p((e) => {
95
+ if (!e) {
96
+ y(null), m(""), l({
97
+ id: "",
98
+ label: ""
99
+ }, !1);
100
+ return;
176
101
  }
177
- };
178
- return /* @__PURE__ */ c("section", { className: "ttw:flex ttw:flex-col ttw:gap-2.5", children: [
179
- /* @__PURE__ */ c("div", { className: "ttw:flex ttw:items-center ttw:gap-2.5", children: [
180
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("Repeat this invoice") }),
181
- /* @__PURE__ */ e(m, { name: "frequency", control: o, render: ({
182
- field: r
183
- }) => /* @__PURE__ */ e(h, { className: "ttw:w-fit", children: /* @__PURE__ */ e(_, { className: "ttw:grow-0", children: /* @__PURE__ */ c(D, { value: r.value, onValueChange: (n) => {
184
- f(F), F.forEach((a) => {
185
- l(a, void 0, {
186
- shouldDirty: !1
187
- });
188
- }), G.includes(n) ? (l("payment_terms_id", z, {
189
- shouldDirty: !0
190
- }), l("payment_terms_custom_date", null, {
191
- shouldDirty: !1
192
- }), l("payment_reminder_id", "", {
193
- shouldDirty: !0
194
- })) : n !== "once" && R === B && (l("payment_terms_id", "", {
195
- shouldDirty: !0
196
- }), l("payment_terms_custom_date", null, {
197
- shouldDirty: !1
198
- })), r.onChange(n);
199
- }, children: [
200
- /* @__PURE__ */ e(k, { id: "frequency", className: "ttw:w-31", children: /* @__PURE__ */ e(C, {}) }),
201
- /* @__PURE__ */ c(S, { children: [
202
- /* @__PURE__ */ e(d, { value: "once", children: t._("Once") }),
203
- /* @__PURE__ */ e(d, { value: "day", children: t._("Daily") }),
204
- /* @__PURE__ */ e(d, { value: "week", children: t._("Weekly") }),
205
- /* @__PURE__ */ e(d, { value: "month", children: t._("Monthly") }),
206
- /* @__PURE__ */ e(d, { value: "quarter", children: t._("Quarterly") }),
207
- /* @__PURE__ */ e(d, { value: "year", children: t._("Annually") })
208
- ] })
209
- ] }) }) }) }),
210
- H()
211
- ] }),
212
- i !== "once" && /* @__PURE__ */ c("div", { className: "ttw:flex ttw:items-center ttw:gap-2.5", children: [
213
- /* @__PURE__ */ e(w, { variant: "body2", color: "muted", className: "ttw:text-nowrap", children: t._("Start on") }),
214
- /* @__PURE__ */ e(m, { control: o, name: "recurrence_start_date", render: ({
215
- field: r,
216
- fieldState: {
217
- error: n
218
- }
219
- }) => /* @__PURE__ */ e(h, { className: "ttw:grow-0 ttw:w-44", children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(j, { ...r, selected: r.value ? new Date(r.value) : void 0, onSelect: r.onChange, showOutsideDays: !1, shouldDisableButton: i === "week" && !x, disabled: O, "aria-invalid": !!n, startMonth: /* @__PURE__ */ new Date(), endMonth: b ? new Date(b.getFullYear(), b.getMonth(), 1) : new Date(2050, 11) }) }) }) }),
220
- L()
221
- ] }),
222
- ["month", "quarter", "year"].includes(i) && /* @__PURE__ */ e(w, { variant: "caption", color: "muted", children: t._("If the issue day doesn't exist in a given month, e.g., the 31st, then the invoice will be sent on the last day of that month.") })
102
+ const t = c.find((r) => r.id === e);
103
+ t && (y(t.id), m(""), l(t, !0));
104
+ }, [c, l]), Q = p((e, t) => {
105
+ if (t.reason !== "input-change") {
106
+ d || m("");
107
+ return;
108
+ }
109
+ m(e), y(null), d && l(e.trim() ? {
110
+ id: se,
111
+ label: e
112
+ } : {
113
+ id: "",
114
+ label: ""
115
+ }, !1);
116
+ }, [d, l]);
117
+ return /* @__PURE__ */ P(ee, { value: O, onValueChange: U, inputValue: h, onInputValueChange: Q, items: W, filter: () => !0, disabled: j, open: _, onOpenChange: u, children: [
118
+ /* @__PURE__ */ i(te, { id: `item-selector-${B}`, placeholder: d ? f._("e.g., The machine that goes ping") : f._("Search for an item"), "aria-invalid": V || void 0, maxLength: 100, onFocus: G, onBlur: K, onClick: () => {
119
+ _ || u(!0);
120
+ }, onKeyDown: (e) => {
121
+ if (e.key === "Enter")
122
+ e.preventDefault(), u(!1);
123
+ else if (e.key === "Tab" && _) {
124
+ const t = h.toLowerCase().trim();
125
+ if (!t) return;
126
+ const r = s.find((L) => L.label.toLowerCase() === t) ?? (s.length === 1 ? s[0] : void 0);
127
+ r && (U(r.id), u(!1));
128
+ }
129
+ }, className: "ttw:w-full", children: F && /* @__PURE__ */ i(re, { align: "inline-start", children: /* @__PURE__ */ i(M, { className: "ttw:size-4 ttw:animate-spin ttw:text-muted-foreground" }) }) }),
130
+ /* @__PURE__ */ i(ne, { container: E, className: "ttw:min-w-138", children: /* @__PURE__ */ P(ie, { onScroll: H, children: [
131
+ /* @__PURE__ */ i(ae, { children: d ? f._("No saved items found - type to add an item") : f._("No saved items found") }),
132
+ s.map((e) => /* @__PURE__ */ P(oe, { value: e.id, children: [
133
+ /* @__PURE__ */ i("span", { className: "ttw:flex-1 ttw:min-w-0 ttw:truncate", children: e.label }),
134
+ /* @__PURE__ */ i("span", { className: "ttw:shrink-0 ttw:text-right ttw:text-xs ttw:text-muted-foreground", children: [e.price && A(e.price.value, e.price.currency), e.measureUnit?.name].filter(Boolean).join(" ") })
135
+ ] }, e.id)),
136
+ v && /* @__PURE__ */ i("div", { className: "ttw:flex ttw:justify-center ttw:py-1", children: /* @__PURE__ */ i(M, { className: "ttw:size-4 ttw:animate-spin ttw:text-muted-foreground" }) })
137
+ ] }) })
223
138
  ] });
224
139
  };
225
140
  export {
226
- ie as RecurrenceSection
141
+ se as CUSTOM_ID,
142
+ Pe as ItemSelector
227
143
  };
@@ -1,41 +1,114 @@
1
- import { jsxs as r, jsx as e, Fragment as h } from "@emotion/react/jsx-runtime";
2
- import { useLingui as y } from "@lingui/react";
3
- import { Switch as g } from "./index408.js";
4
- import { useState as v } from "react";
5
- import { useFormContext as x } from "react-hook-form";
6
- import { Typography as l } from "./index85.js";
7
- import { ReminderBeforeDueDate as b } from "./index409.js";
8
- import { ReminderOverdue as N } from "./index410.js";
9
- import { RECEIPT_DUE_PAYMENT_TERM as D } from "./index152.js";
10
- const I = ({
11
- disabled: a
1
+ import { useCreateInvoiceProductsTable as N } from "./index404.js";
2
+ import { sanitizeLineItems as W } from "./index309.js";
3
+ import { useCurrencies as k } from "./index58.js";
4
+ import { useRef as z, useState as J, useCallback as u, useEffect as x, useMemo as O } from "react";
5
+ import "./index92.js";
6
+ import "@emotion/react/jsx-runtime";
7
+ import "@lingui/react";
8
+ import "react-dom";
9
+ import "./index57.js";
10
+ import "@mui/x-data-grid";
11
+ import { useIsMounted as j } from "./index68.js";
12
+ import { generateUniqueId as B } from "./index406.js";
13
+ import { useFormContext as G, useFieldArray as H } from "react-hook-form";
14
+ const oe = ({
15
+ defaultCurrency: p,
16
+ isInclusivePricing: C
12
17
  }) => {
13
18
  const {
14
- i18n: i
15
- } = y(), {
16
- watch: t,
17
- setValue: d
18
- } = x(), n = t("payment_terms_id"), c = t("payment_terms_custom_date"), p = t("payment_reminder_id"), u = t("overdue_reminder_id"), o = !!(n || c), w = !!(p || u), f = n !== D, [m, _] = v(o || w);
19
- return /* @__PURE__ */ r("section", { className: "ttw:flex ttw:flex-col ttw:gap-6", children: [
20
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-center ttw:gap-3", children: [
21
- /* @__PURE__ */ e(g, { checked: m, disabled: !o, onCheckedChange: (s) => {
22
- s || (d("payment_reminder_id", "", {
23
- shouldDirty: !0
24
- }), d("overdue_reminder_id", "", {
25
- shouldDirty: !0
26
- })), _(s);
27
- }, "aria-label": i._("Payment reminders") }),
28
- /* @__PURE__ */ e(l, { variant: "body2", children: i._("Send reminders when an invoice is approaching its due date or past due.") })
29
- ] }),
30
- m && /* @__PURE__ */ r(h, { children: [
31
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:w-full ttw:xl:flex-row", children: [
32
- f && /* @__PURE__ */ e(b, { disabled: a }),
33
- /* @__PURE__ */ e(N, { disabled: a })
34
- ] }),
35
- /* @__PURE__ */ e(l, { variant: "body2", color: "muted", className: "ttw:font-medium", children: i._("New reminders will be saved to your organization's library and can be managed via Invoice settings") })
36
- ] })
37
- ] });
19
+ control: P,
20
+ formState: {
21
+ errors: o
22
+ },
23
+ setValue: l,
24
+ getValues: t,
25
+ watch: f,
26
+ clearErrors: m,
27
+ trigger: h,
28
+ reset: g
29
+ } = G(), {
30
+ fields: n,
31
+ append: y,
32
+ remove: v
33
+ } = H({
34
+ control: P,
35
+ name: "line_items",
36
+ shouldUnregister: !1
37
+ }), c = j(), s = z(!1), [I, b] = J(!1), V = f("line_items"), T = f("tax_rate"), D = W(V), {
38
+ formatCurrencyToDisplay: L
39
+ } = k(), {
40
+ subtotalPrice: R,
41
+ totalPrice: S,
42
+ totalTaxes: q
43
+ } = N({
44
+ lineItems: D,
45
+ actualCurrency: p,
46
+ isInclusivePricing: C,
47
+ formatCurrencyToDisplay: L,
48
+ taxRate: Number(T) || void 0
49
+ }), i = u((e) => {
50
+ const r = {
51
+ name: e?.product?.name || "",
52
+ price: {
53
+ currency: p,
54
+ value: e?.product?.price?.value || 0
55
+ },
56
+ measure_unit_id: e?.product?.measure_unit_id || "",
57
+ type: e?.product?.type || "product"
58
+ };
59
+ return {
60
+ id: e?.id ?? B(),
61
+ product_id: e?.product_id || "",
62
+ product: r,
63
+ quantity: e?.quantity ?? 1,
64
+ tax_rate_value: e?.tax_rate_value ? e?.tax_rate_value ?? 0 : void 0,
65
+ ...e?.measure_unit ? {
66
+ measure_unit: e.measure_unit
67
+ } : {},
68
+ taxable: !0
69
+ };
70
+ }, [p]), A = u(() => {
71
+ if (s.current) return;
72
+ s.current = !0, y(i());
73
+ const e = t("line_items");
74
+ e && e.length > 0 && m(`line_items.${e.length - 1}`);
75
+ }, [y, i, t, m]);
76
+ x(() => {
77
+ s.current && Promise.resolve().then(() => {
78
+ c.current && (s.current = !1);
79
+ });
80
+ }, [n.length, c]), x(() => {
81
+ !c.current || I || !t("line_items")?.length && !s.current && (g({
82
+ ...t(),
83
+ line_items: [i()]
84
+ }), b(!0));
85
+ }, [c, I, t, g, i]);
86
+ const E = u((e) => v(e), [v, t]), F = u(() => {
87
+ const e = t("line_items");
88
+ if (!e?.length) return;
89
+ const r = e.filter((a) => !!a?.product?.name?.trim()), d = e.find((a) => !a?.product?.name?.trim()), _ = r.length > 0 ? r : e.length > 0 ? [i(d || void 0)] : [];
90
+ (_.length !== e.length || !_.every((a, w) => a.id === e[w]?.id)) && (m("line_items"), l("line_items", _, {
91
+ shouldValidate: !1,
92
+ shouldDirty: !0
93
+ }));
94
+ }, [t, l, m, i]), M = u((e, r, d) => {
95
+ l(e, r, {
96
+ shouldDirty: !0,
97
+ ...d
98
+ }), d?.shouldValidate && h(e);
99
+ }, [l, h]), U = JSON.stringify(o.line_items), $ = O(() => Array.isArray(o.line_items) ? n.map((e, r) => o.line_items?.[r] ?? {}) : n.map(() => ({})), [o.line_items, U, n]);
100
+ return {
101
+ fields: n,
102
+ subtotalPrice: R,
103
+ totalPrice: S,
104
+ totalTaxes: q,
105
+ lineItemErrors: $,
106
+ handleAddRow: A,
107
+ handleRemoveItem: E,
108
+ setValueWithValidationLocal: M,
109
+ cleanUpLineItemsForSubmission: F
110
+ };
38
111
  };
39
112
  export {
40
- I as RemindersSection
113
+ oe as useLineItemManagement
41
114
  };
@@ -1,13 +1,84 @@
1
- import { jsx as t } from "@emotion/react/jsx-runtime";
2
- import { cn as i } from "./index100.js";
3
- import * as r from "@radix-ui/react-checkbox";
4
- import { CheckIcon as o } from "lucide-react";
5
- function c({
6
- className: e,
7
- ...a
8
- }) {
9
- return /* @__PURE__ */ t(r.Root, { "data-slot": "checkbox", className: i("ttw:peer ttw:border-input ttw:dark:bg-input/30 ttw:data-[state=checked]:bg-primary ttw:data-[state=checked]:text-primary-foreground ttw:dark:data-[state=checked]:bg-primary ttw:data-[state=checked]:border-primary ttw:focus-visible:border-ring ttw:focus-visible:ring-ring/50 ttw:aria-invalid:ring-destructive/20 ttw:dark:aria-invalid:ring-destructive/40 ttw:aria-invalid:border-destructive ttw:size-4 ttw:shrink-0 ttw:rounded-[4px] ttw:border ttw:shadow-xs ttw:transition-shadow ttw:outline-none ttw:focus-visible:ring-[3px] ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", e), ...a, children: /* @__PURE__ */ t(r.Indicator, { "data-slot": "checkbox-indicator", className: "ttw:flex ttw:items-center ttw:justify-center ttw:text-current ttw:transition-none", children: /* @__PURE__ */ t(o, { className: "ttw:size-3.5" }) }) });
1
+ import { rateMinorToMajor as p, rateMajorToMinor as f } from "./index94.js";
2
+ import { generateUniqueId as l } from "./index406.js";
3
+ const c = (t, e) => {
4
+ let r = t;
5
+ for (const n of e) {
6
+ if (typeof r != "object" || r === null || !(n in r))
7
+ return;
8
+ r = r[n];
9
+ }
10
+ return typeof r == "object" && r !== null && "message" in r && typeof r.message == "string" ? String(r.message) : void 0;
11
+ };
12
+ function m(t, e) {
13
+ if (!t)
14
+ return;
15
+ const r = typeof t == "object";
16
+ if (r && "message" in t && typeof t.message == "string")
17
+ return t.message;
18
+ const n = e.split("."), s = !Array.isArray(t);
19
+ if (s && r)
20
+ return c(t, n);
21
+ if (s) return;
22
+ const a = t.find((o) => {
23
+ if (!o || typeof o != "object" || o === null) return !1;
24
+ let i = o;
25
+ for (const u of n) {
26
+ if (typeof i != "object" || i === null || !(u in i))
27
+ return !1;
28
+ i = i[u];
29
+ }
30
+ return typeof i == "object" && i !== null && "message" in i && typeof i.message == "string";
31
+ });
32
+ if (a)
33
+ return c(a, n);
10
34
  }
35
+ const d = (t, e) => m(t, e), M = (t) => {
36
+ let e = t.replace(/[^0-9.]/g, "");
37
+ const r = e.indexOf(".");
38
+ if (r !== -1 && (e = e.slice(0, r + 1) + e.slice(r + 1).replace(/\./g, ""), e = e.slice(0, r + 3)), e.length > 1 && e.startsWith("0") && e[1] !== "." && (e = e.replace(/^0+/, "") || "0"), e === "" || e === ".")
39
+ return e;
40
+ const n = Number(e);
41
+ return !isNaN(n) && n > 100 ? "100" : e;
42
+ }, j = (t, e) => {
43
+ if (t === void 0 || isNaN(t)) return "";
44
+ const r = p(t);
45
+ return e.format(r);
46
+ }, b = (t, e, r) => {
47
+ if (t.trim() === "") return 0;
48
+ let n = t;
49
+ if (r) {
50
+ const a = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
51
+ n = n.replace(new RegExp(a, "g"), "");
52
+ }
53
+ n = n.replace(e, ".");
54
+ const s = parseFloat(n);
55
+ return isNaN(s) ? 0 : f(s);
56
+ }, _ = (t) => !t || !Array.isArray(t) ? [] : t.filter((e) => !!e?.product?.name).map((e) => ({
57
+ ...e,
58
+ id: e.product_id || l(),
59
+ quantity: e.quantity ?? 1,
60
+ product: {
61
+ ...e.product,
62
+ type: e.product?.type,
63
+ price: {
64
+ ...e.product?.price || {},
65
+ value: e.product?.price?.value ?? 0,
66
+ currency: e.product?.price?.currency || "USD"
67
+ },
68
+ measure_unit_id: e.product?.measure_unit_id || ""
69
+ },
70
+ ...e.measure_unit?.name ? {
71
+ measure_unit: {
72
+ name: e.measure_unit.name,
73
+ id: null
74
+ }
75
+ } : {}
76
+ }));
11
77
  export {
12
- c as Checkbox
78
+ j as formatMinorToMajorCurrency,
79
+ m as getErrorMessage,
80
+ d as getLineItemErrorMessage,
81
+ b as parseMajorToMinorCurrency,
82
+ _ as sanitizeLineItems,
83
+ M as sanitizeTaxRateInput
13
84
  };