@powerhousedao/contributor-billing 0.1.22 → 0.1.23

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 (580) hide show
  1. package/dist/document-models/billing-statement/actions.d.ts +18 -0
  2. package/dist/document-models/billing-statement/actions.d.ts.map +1 -0
  3. package/dist/document-models/billing-statement/actions.js +9 -0
  4. package/dist/document-models/billing-statement/gen/creators.d.ts +3 -0
  5. package/dist/document-models/billing-statement/gen/creators.d.ts.map +1 -1
  6. package/dist/document-models/billing-statement/gen/creators.js +3 -0
  7. package/dist/document-models/billing-statement/gen/document-model.d.ts +2 -2
  8. package/dist/document-models/billing-statement/gen/document-model.d.ts.map +1 -1
  9. package/dist/document-models/billing-statement/gen/document-schema.d.ts +294 -0
  10. package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -0
  11. package/dist/document-models/billing-statement/gen/document-schema.js +33 -0
  12. package/dist/document-models/billing-statement/gen/document-type.d.ts +2 -0
  13. package/dist/document-models/billing-statement/gen/document-type.d.ts.map +1 -0
  14. package/dist/document-models/billing-statement/gen/document-type.js +1 -0
  15. package/dist/document-models/billing-statement/gen/general/actions.js +1 -1
  16. package/dist/document-models/billing-statement/gen/general/creators.d.ts +2 -2
  17. package/dist/document-models/billing-statement/gen/general/creators.d.ts.map +1 -1
  18. package/dist/document-models/billing-statement/gen/general/creators.js +5 -5
  19. package/dist/document-models/billing-statement/gen/general/operations.js +3 -1
  20. package/dist/document-models/billing-statement/gen/index.d.ts +9 -3
  21. package/dist/document-models/billing-statement/gen/index.d.ts.map +1 -1
  22. package/dist/document-models/billing-statement/gen/index.js +9 -2
  23. package/dist/document-models/billing-statement/gen/line-items/actions.js +1 -1
  24. package/dist/document-models/billing-statement/gen/line-items/creators.d.ts +2 -2
  25. package/dist/document-models/billing-statement/gen/line-items/creators.d.ts.map +1 -1
  26. package/dist/document-models/billing-statement/gen/line-items/creators.js +4 -4
  27. package/dist/document-models/billing-statement/gen/line-items/operations.js +3 -1
  28. package/dist/document-models/billing-statement/gen/ph-factories.d.ts +6 -10
  29. package/dist/document-models/billing-statement/gen/ph-factories.d.ts.map +1 -1
  30. package/dist/document-models/billing-statement/gen/ph-factories.js +1 -4
  31. package/dist/document-models/billing-statement/gen/reducer.d.ts +1 -3
  32. package/dist/document-models/billing-statement/gen/reducer.d.ts.map +1 -1
  33. package/dist/document-models/billing-statement/gen/reducer.js +18 -21
  34. package/dist/document-models/billing-statement/gen/schema/index.d.ts +1 -1
  35. package/dist/document-models/billing-statement/gen/schema/index.d.ts.map +1 -1
  36. package/dist/document-models/billing-statement/gen/schema/index.js +1 -1
  37. package/dist/document-models/billing-statement/gen/tags/actions.js +1 -1
  38. package/dist/document-models/billing-statement/gen/tags/creators.d.ts +2 -2
  39. package/dist/document-models/billing-statement/gen/tags/creators.d.ts.map +1 -1
  40. package/dist/document-models/billing-statement/gen/tags/creators.js +3 -3
  41. package/dist/document-models/billing-statement/gen/tags/operations.js +3 -1
  42. package/dist/document-models/billing-statement/gen/types.d.ts +9 -7
  43. package/dist/document-models/billing-statement/gen/types.d.ts.map +1 -1
  44. package/dist/document-models/billing-statement/gen/types.js +1 -1
  45. package/dist/document-models/billing-statement/gen/utils.d.ts +13 -20
  46. package/dist/document-models/billing-statement/gen/utils.d.ts.map +1 -1
  47. package/dist/document-models/billing-statement/gen/utils.js +45 -36
  48. package/dist/document-models/billing-statement/hooks.d.ts +11 -0
  49. package/dist/document-models/billing-statement/hooks.d.ts.map +1 -0
  50. package/dist/document-models/billing-statement/hooks.js +26 -0
  51. package/dist/document-models/billing-statement/index.d.ts +5 -25
  52. package/dist/document-models/billing-statement/index.d.ts.map +1 -1
  53. package/dist/document-models/billing-statement/index.js +5 -17
  54. package/dist/document-models/billing-statement/module.d.ts +5 -0
  55. package/dist/document-models/billing-statement/module.d.ts.map +1 -0
  56. package/dist/document-models/billing-statement/module.js +10 -0
  57. package/dist/document-models/billing-statement/src/index.d.ts +2 -0
  58. package/dist/document-models/billing-statement/src/index.d.ts.map +1 -0
  59. package/dist/document-models/billing-statement/src/index.js +1 -0
  60. package/dist/document-models/billing-statement/src/reducers/general.d.ts +2 -7
  61. package/dist/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
  62. package/dist/document-models/billing-statement/src/reducers/general.js +2 -7
  63. package/dist/document-models/billing-statement/src/reducers/line-items.d.ts +2 -7
  64. package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
  65. package/dist/document-models/billing-statement/src/reducers/line-items.js +1 -6
  66. package/dist/document-models/billing-statement/src/reducers/tags.d.ts +2 -7
  67. package/dist/document-models/billing-statement/src/reducers/tags.d.ts.map +1 -1
  68. package/dist/document-models/billing-statement/src/reducers/tags.js +1 -6
  69. package/dist/document-models/billing-statement/src/tests/document-model.test.js +3 -3
  70. package/dist/document-models/billing-statement/src/tests/general.test.js +3 -2
  71. package/dist/document-models/billing-statement/src/tests/line-items.test.js +2 -1
  72. package/dist/document-models/billing-statement/src/tests/tags.test.js +2 -1
  73. package/dist/document-models/billing-statement/utils.d.ts +14 -0
  74. package/dist/document-models/billing-statement/utils.d.ts.map +1 -0
  75. package/dist/document-models/billing-statement/utils.js +7 -0
  76. package/dist/document-models/document-models.d.ts +3 -0
  77. package/dist/document-models/document-models.d.ts.map +1 -0
  78. package/dist/document-models/document-models.js +10 -0
  79. package/dist/document-models/expense-report/actions.d.ts +27 -0
  80. package/dist/document-models/expense-report/actions.d.ts.map +1 -0
  81. package/dist/document-models/expense-report/actions.js +4 -0
  82. package/dist/document-models/expense-report/gen/creators.d.ts +1 -0
  83. package/dist/document-models/expense-report/gen/creators.d.ts.map +1 -1
  84. package/dist/document-models/expense-report/gen/creators.js +1 -0
  85. package/dist/document-models/expense-report/gen/document-model.d.ts +2 -2
  86. package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
  87. package/dist/document-models/expense-report/gen/document-schema.d.ts +199 -0
  88. package/dist/document-models/expense-report/gen/document-schema.d.ts.map +1 -0
  89. package/dist/document-models/expense-report/gen/document-schema.js +33 -0
  90. package/dist/document-models/expense-report/gen/document-type.d.ts +2 -0
  91. package/dist/document-models/expense-report/gen/document-type.d.ts.map +1 -0
  92. package/dist/document-models/expense-report/gen/document-type.js +1 -0
  93. package/dist/document-models/expense-report/gen/expense-report/actions.js +1 -1
  94. package/dist/document-models/expense-report/gen/expense-report/creators.d.ts +2 -2
  95. package/dist/document-models/expense-report/gen/expense-report/creators.d.ts.map +1 -1
  96. package/dist/document-models/expense-report/gen/expense-report/creators.js +3 -3
  97. package/dist/document-models/expense-report/gen/expense-report/operations.js +3 -1
  98. package/dist/document-models/expense-report/gen/index.d.ts +7 -3
  99. package/dist/document-models/expense-report/gen/index.d.ts.map +1 -1
  100. package/dist/document-models/expense-report/gen/index.js +7 -2
  101. package/dist/document-models/expense-report/gen/ph-factories.d.ts +6 -10
  102. package/dist/document-models/expense-report/gen/ph-factories.d.ts.map +1 -1
  103. package/dist/document-models/expense-report/gen/ph-factories.js +1 -4
  104. package/dist/document-models/expense-report/gen/reducer.d.ts +1 -3
  105. package/dist/document-models/expense-report/gen/reducer.d.ts.map +1 -1
  106. package/dist/document-models/expense-report/gen/reducer.js +34 -37
  107. package/dist/document-models/expense-report/gen/schema/index.d.ts +1 -1
  108. package/dist/document-models/expense-report/gen/schema/index.d.ts.map +1 -1
  109. package/dist/document-models/expense-report/gen/schema/index.js +1 -1
  110. package/dist/document-models/expense-report/gen/types.d.ts +9 -7
  111. package/dist/document-models/expense-report/gen/types.d.ts.map +1 -1
  112. package/dist/document-models/expense-report/gen/types.js +1 -1
  113. package/dist/document-models/expense-report/gen/utils.d.ts +13 -20
  114. package/dist/document-models/expense-report/gen/utils.d.ts.map +1 -1
  115. package/dist/document-models/expense-report/gen/utils.js +44 -35
  116. package/dist/document-models/expense-report/gen/wallet/actions.js +1 -1
  117. package/dist/document-models/expense-report/gen/wallet/creators.d.ts +2 -2
  118. package/dist/document-models/expense-report/gen/wallet/creators.d.ts.map +1 -1
  119. package/dist/document-models/expense-report/gen/wallet/creators.js +17 -17
  120. package/dist/document-models/expense-report/gen/wallet/operations.js +3 -1
  121. package/dist/document-models/expense-report/hooks.d.ts +11 -0
  122. package/dist/document-models/expense-report/hooks.d.ts.map +1 -0
  123. package/dist/document-models/expense-report/hooks.js +26 -0
  124. package/dist/document-models/expense-report/index.d.ts +5 -34
  125. package/dist/document-models/expense-report/index.d.ts.map +1 -1
  126. package/dist/document-models/expense-report/index.js +5 -17
  127. package/dist/document-models/expense-report/module.d.ts +5 -0
  128. package/dist/document-models/expense-report/module.d.ts.map +1 -0
  129. package/dist/document-models/expense-report/module.js +10 -0
  130. package/dist/document-models/expense-report/src/index.d.ts +2 -0
  131. package/dist/document-models/expense-report/src/index.d.ts.map +1 -0
  132. package/dist/document-models/expense-report/src/index.js +1 -0
  133. package/dist/document-models/expense-report/src/reducers/wallet.d.ts +2 -2
  134. package/dist/document-models/expense-report/src/reducers/wallet.d.ts.map +1 -1
  135. package/dist/document-models/expense-report/src/reducers/wallet.js +1 -1
  136. package/dist/document-models/expense-report/src/tests/document-model.test.js +4 -4
  137. package/dist/document-models/expense-report/src/tests/expense-report.test.js +3 -3
  138. package/dist/document-models/expense-report/src/tests/wallet.test.js +3 -3
  139. package/dist/document-models/expense-report/utils.d.ts +14 -0
  140. package/dist/document-models/expense-report/utils.d.ts.map +1 -0
  141. package/dist/document-models/expense-report/utils.js +7 -0
  142. package/dist/document-models/index.d.ts +8 -4
  143. package/dist/document-models/index.d.ts.map +1 -1
  144. package/dist/document-models/index.js +8 -4
  145. package/dist/document-models/integrations/actions.d.ts +15 -0
  146. package/dist/document-models/integrations/actions.d.ts.map +1 -0
  147. package/dist/document-models/integrations/actions.js +4 -0
  148. package/dist/document-models/integrations/gen/creators.d.ts +1 -0
  149. package/dist/document-models/integrations/gen/creators.d.ts.map +1 -1
  150. package/dist/document-models/integrations/gen/creators.js +1 -0
  151. package/dist/document-models/integrations/gen/document-model.d.ts +2 -2
  152. package/dist/document-models/integrations/gen/document-model.d.ts.map +1 -1
  153. package/dist/document-models/integrations/gen/document-schema.d.ts +180 -0
  154. package/dist/document-models/integrations/gen/document-schema.d.ts.map +1 -0
  155. package/dist/document-models/integrations/gen/document-schema.js +33 -0
  156. package/dist/document-models/integrations/gen/document-type.d.ts +2 -0
  157. package/dist/document-models/integrations/gen/document-type.d.ts.map +1 -0
  158. package/dist/document-models/integrations/gen/document-type.js +1 -0
  159. package/dist/document-models/integrations/gen/index.d.ts +7 -3
  160. package/dist/document-models/integrations/gen/index.d.ts.map +1 -1
  161. package/dist/document-models/integrations/gen/index.js +7 -2
  162. package/dist/document-models/integrations/gen/integrations/actions.js +1 -1
  163. package/dist/document-models/integrations/gen/integrations/creators.d.ts +2 -2
  164. package/dist/document-models/integrations/gen/integrations/creators.d.ts.map +1 -1
  165. package/dist/document-models/integrations/gen/integrations/creators.js +5 -5
  166. package/dist/document-models/integrations/gen/integrations/operations.js +3 -1
  167. package/dist/document-models/integrations/gen/ph-factories.d.ts +6 -10
  168. package/dist/document-models/integrations/gen/ph-factories.d.ts.map +1 -1
  169. package/dist/document-models/integrations/gen/ph-factories.js +4 -18
  170. package/dist/document-models/integrations/gen/reducer.d.ts +1 -3
  171. package/dist/document-models/integrations/gen/reducer.d.ts.map +1 -1
  172. package/dist/document-models/integrations/gen/reducer.js +10 -13
  173. package/dist/document-models/integrations/gen/schema/index.d.ts +1 -1
  174. package/dist/document-models/integrations/gen/schema/index.d.ts.map +1 -1
  175. package/dist/document-models/integrations/gen/schema/index.js +1 -1
  176. package/dist/document-models/integrations/gen/types.d.ts +9 -7
  177. package/dist/document-models/integrations/gen/types.d.ts.map +1 -1
  178. package/dist/document-models/integrations/gen/types.js +1 -1
  179. package/dist/document-models/integrations/gen/utils.d.ts +13 -20
  180. package/dist/document-models/integrations/gen/utils.d.ts.map +1 -1
  181. package/dist/document-models/integrations/gen/utils.js +47 -49
  182. package/dist/document-models/integrations/hooks.d.ts +11 -0
  183. package/dist/document-models/integrations/hooks.d.ts.map +1 -0
  184. package/dist/document-models/integrations/hooks.js +26 -0
  185. package/dist/document-models/integrations/index.d.ts +5 -22
  186. package/dist/document-models/integrations/index.d.ts.map +1 -1
  187. package/dist/document-models/integrations/index.js +5 -17
  188. package/dist/document-models/integrations/module.d.ts +5 -0
  189. package/dist/document-models/integrations/module.d.ts.map +1 -0
  190. package/dist/document-models/integrations/module.js +10 -0
  191. package/dist/document-models/integrations/src/index.d.ts +2 -0
  192. package/dist/document-models/integrations/src/index.d.ts.map +1 -0
  193. package/dist/document-models/integrations/src/index.js +1 -0
  194. package/dist/document-models/integrations/src/reducers/integrations.d.ts +2 -7
  195. package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
  196. package/dist/document-models/integrations/src/reducers/integrations.js +1 -6
  197. package/dist/document-models/integrations/src/tests/document-model.test.js +4 -4
  198. package/dist/document-models/integrations/src/tests/integrations.test.js +2 -1
  199. package/dist/document-models/integrations/utils.d.ts +14 -0
  200. package/dist/document-models/integrations/utils.d.ts.map +1 -0
  201. package/dist/document-models/integrations/utils.js +7 -0
  202. package/dist/document-models/invoice/actions.d.ts +40 -0
  203. package/dist/document-models/invoice/actions.d.ts.map +1 -0
  204. package/dist/document-models/invoice/actions.js +10 -0
  205. package/dist/document-models/invoice/gen/creators.d.ts +4 -0
  206. package/dist/document-models/invoice/gen/creators.d.ts.map +1 -1
  207. package/dist/document-models/invoice/gen/creators.js +4 -0
  208. package/dist/document-models/invoice/gen/document-model.d.ts +2 -2
  209. package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -1
  210. package/dist/document-models/invoice/gen/document-schema.d.ts +465 -0
  211. package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -0
  212. package/dist/document-models/invoice/gen/document-schema.js +33 -0
  213. package/dist/document-models/invoice/gen/document-type.d.ts +2 -0
  214. package/dist/document-models/invoice/gen/document-type.d.ts.map +1 -0
  215. package/dist/document-models/invoice/gen/document-type.js +1 -0
  216. package/dist/document-models/invoice/gen/general/actions.js +1 -1
  217. package/dist/document-models/invoice/gen/general/creators.d.ts +2 -2
  218. package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -1
  219. package/dist/document-models/invoice/gen/general/creators.js +7 -7
  220. package/dist/document-models/invoice/gen/general/operations.js +3 -1
  221. package/dist/document-models/invoice/gen/index.d.ts +10 -3
  222. package/dist/document-models/invoice/gen/index.d.ts.map +1 -1
  223. package/dist/document-models/invoice/gen/index.js +10 -2
  224. package/dist/document-models/invoice/gen/items/actions.js +1 -1
  225. package/dist/document-models/invoice/gen/items/creators.d.ts +2 -2
  226. package/dist/document-models/invoice/gen/items/creators.d.ts.map +1 -1
  227. package/dist/document-models/invoice/gen/items/creators.js +7 -7
  228. package/dist/document-models/invoice/gen/items/operations.js +3 -1
  229. package/dist/document-models/invoice/gen/parties/actions.js +1 -1
  230. package/dist/document-models/invoice/gen/parties/creators.d.ts +2 -2
  231. package/dist/document-models/invoice/gen/parties/creators.d.ts.map +1 -1
  232. package/dist/document-models/invoice/gen/parties/creators.js +8 -8
  233. package/dist/document-models/invoice/gen/parties/operations.js +3 -1
  234. package/dist/document-models/invoice/gen/ph-factories.d.ts +6 -10
  235. package/dist/document-models/invoice/gen/ph-factories.d.ts.map +1 -1
  236. package/dist/document-models/invoice/gen/ph-factories.js +5 -5
  237. package/dist/document-models/invoice/gen/reducer.d.ts +1 -3
  238. package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -1
  239. package/dist/document-models/invoice/gen/reducer.js +63 -66
  240. package/dist/document-models/invoice/gen/schema/index.d.ts +1 -1
  241. package/dist/document-models/invoice/gen/schema/index.d.ts.map +1 -1
  242. package/dist/document-models/invoice/gen/schema/index.js +1 -1
  243. package/dist/document-models/invoice/gen/schema/types.d.ts +1 -1
  244. package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
  245. package/dist/document-models/invoice/gen/transitions/actions.js +1 -1
  246. package/dist/document-models/invoice/gen/transitions/creators.d.ts +2 -2
  247. package/dist/document-models/invoice/gen/transitions/creators.d.ts.map +1 -1
  248. package/dist/document-models/invoice/gen/transitions/creators.js +14 -14
  249. package/dist/document-models/invoice/gen/transitions/operations.js +3 -1
  250. package/dist/document-models/invoice/gen/types.d.ts +9 -7
  251. package/dist/document-models/invoice/gen/types.d.ts.map +1 -1
  252. package/dist/document-models/invoice/gen/types.js +1 -1
  253. package/dist/document-models/invoice/gen/utils.d.ts +13 -20
  254. package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
  255. package/dist/document-models/invoice/gen/utils.js +48 -36
  256. package/dist/document-models/invoice/hooks.d.ts +11 -0
  257. package/dist/document-models/invoice/hooks.d.ts.map +1 -0
  258. package/dist/document-models/invoice/hooks.js +26 -0
  259. package/dist/document-models/invoice/index.d.ts +5 -47
  260. package/dist/document-models/invoice/index.d.ts.map +1 -1
  261. package/dist/document-models/invoice/index.js +5 -17
  262. package/dist/document-models/invoice/module.d.ts +5 -0
  263. package/dist/document-models/invoice/module.d.ts.map +1 -0
  264. package/dist/document-models/invoice/module.js +10 -0
  265. package/dist/document-models/invoice/src/index.d.ts +2 -0
  266. package/dist/document-models/invoice/src/index.d.ts.map +1 -0
  267. package/dist/document-models/invoice/src/index.js +1 -0
  268. package/dist/document-models/invoice/src/reducers/general.d.ts +2 -7
  269. package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
  270. package/dist/document-models/invoice/src/reducers/general.js +1 -6
  271. package/dist/document-models/invoice/src/reducers/items.d.ts +2 -7
  272. package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
  273. package/dist/document-models/invoice/src/reducers/items.js +1 -6
  274. package/dist/document-models/invoice/src/reducers/parties.d.ts +2 -7
  275. package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
  276. package/dist/document-models/invoice/src/reducers/parties.js +1 -6
  277. package/dist/document-models/invoice/src/reducers/transitions.d.ts +2 -2
  278. package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
  279. package/dist/document-models/invoice/src/reducers/transitions.js +1 -1
  280. package/dist/document-models/invoice/src/tests/document-model.test.js +3 -3
  281. package/dist/document-models/invoice/src/tests/general.test.js +4 -4
  282. package/dist/document-models/invoice/src/tests/items.test.js +5 -5
  283. package/dist/document-models/invoice/src/tests/parties.test.js +8 -8
  284. package/dist/document-models/invoice/src/tests/transitions.test.js +2 -1
  285. package/dist/document-models/invoice/utils.d.ts +14 -0
  286. package/dist/document-models/invoice/utils.d.ts.map +1 -0
  287. package/dist/document-models/invoice/utils.js +7 -0
  288. package/dist/editors/billing-statement/components/objectSetTable.js +3 -1
  289. package/dist/editors/billing-statement/config.d.ts +3 -0
  290. package/dist/editors/billing-statement/config.d.ts.map +1 -0
  291. package/dist/editors/billing-statement/config.js +3 -0
  292. package/dist/editors/billing-statement/editor.d.ts.map +1 -1
  293. package/dist/editors/billing-statement/editor.js +18 -10
  294. package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts +2 -2
  295. package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
  296. package/dist/editors/billing-statement/lineItemTags/lineItemTags.js +2 -2
  297. package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts +2 -2
  298. package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts.map +1 -1
  299. package/dist/editors/billing-statement/lineItemTags/tagMapping.js +2 -0
  300. package/dist/editors/billing-statement/module.d.ts +3 -0
  301. package/dist/editors/billing-statement/module.d.ts.map +1 -0
  302. package/dist/editors/billing-statement/module.js +9 -0
  303. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +2 -9
  304. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
  305. package/dist/editors/contributor-billing/components/DriveExplorer.js +13 -20
  306. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +8 -1
  307. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -1
  308. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +90 -5
  309. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.js +3 -3
  310. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +4 -4
  311. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -1
  312. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +7 -6
  313. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -1
  314. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.js +3 -8
  315. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +3 -3
  316. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -1
  317. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.js +1 -1
  318. package/dist/editors/contributor-billing/config.d.ts +3 -0
  319. package/dist/editors/contributor-billing/config.d.ts.map +1 -0
  320. package/dist/editors/contributor-billing/config.js +7 -0
  321. package/dist/editors/contributor-billing/editor.d.ts +2 -1
  322. package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
  323. package/dist/editors/contributor-billing/editor.js +7 -2
  324. package/dist/editors/contributor-billing/module.d.ts +3 -0
  325. package/dist/editors/contributor-billing/module.d.ts.map +1 -0
  326. package/dist/editors/contributor-billing/module.js +9 -0
  327. package/dist/editors/editors.d.ts +3 -0
  328. package/dist/editors/editors.d.ts.map +1 -0
  329. package/dist/editors/editors.js +12 -0
  330. package/dist/editors/expense-report/components/AddBillingStatementModal.js +2 -2
  331. package/dist/editors/expense-report/components/WalletsTable.d.ts.map +1 -1
  332. package/dist/editors/expense-report/components/WalletsTable.js +15 -8
  333. package/dist/editors/expense-report/config.d.ts +3 -0
  334. package/dist/editors/expense-report/config.d.ts.map +1 -0
  335. package/dist/editors/expense-report/config.js +3 -0
  336. package/dist/editors/expense-report/editor.d.ts +1 -1
  337. package/dist/editors/expense-report/editor.d.ts.map +1 -1
  338. package/dist/editors/expense-report/editor.js +12 -3
  339. package/dist/editors/expense-report/hooks/useSyncWallet.js +2 -2
  340. package/dist/editors/expense-report/hooks/useWalletSync.js +2 -2
  341. package/dist/editors/expense-report/module.d.ts +3 -0
  342. package/dist/editors/expense-report/module.d.ts.map +1 -0
  343. package/dist/editors/expense-report/module.js +9 -0
  344. package/dist/editors/hooks/useExpenseReportDocument.d.ts +2 -2
  345. package/dist/editors/hooks/useExpenseReportDocument.d.ts.map +1 -1
  346. package/dist/editors/hooks/useIntegrationsDocument.d.ts +2 -2
  347. package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +1 -1
  348. package/dist/editors/index.d.ts +5 -5
  349. package/dist/editors/index.d.ts.map +1 -1
  350. package/dist/editors/index.js +5 -5
  351. package/dist/editors/integrations/config.d.ts +3 -0
  352. package/dist/editors/integrations/config.d.ts.map +1 -0
  353. package/dist/editors/integrations/config.js +3 -0
  354. package/dist/editors/integrations/editor.d.ts.map +1 -1
  355. package/dist/editors/integrations/editor.js +74 -52
  356. package/dist/editors/integrations/module.d.ts +3 -0
  357. package/dist/editors/integrations/module.d.ts.map +1 -0
  358. package/dist/editors/integrations/module.js +9 -0
  359. package/dist/editors/invoice/InvoicePDF.d.ts +1 -1
  360. package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -1
  361. package/dist/editors/invoice/components/confirmationModal.js +1 -0
  362. package/dist/editors/invoice/components/countryForm.d.ts +1 -1
  363. package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
  364. package/dist/editors/invoice/components/countryForm.js +1 -0
  365. package/dist/editors/invoice/components/currencyForm.d.ts +1 -1
  366. package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -1
  367. package/dist/editors/invoice/components/currencyForm.js +1 -0
  368. package/dist/editors/invoice/components/datePicker.js +1 -0
  369. package/dist/editors/invoice/components/inputField.d.ts +1 -1
  370. package/dist/editors/invoice/components/inputField.d.ts.map +1 -1
  371. package/dist/editors/invoice/components/inputField.js +1 -0
  372. package/dist/editors/invoice/components/selectField.d.ts.map +1 -1
  373. package/dist/editors/invoice/components/selectField.js +0 -12
  374. package/dist/editors/invoice/components/statusModalComponents.js +4 -4
  375. package/dist/editors/invoice/config.d.ts +3 -0
  376. package/dist/editors/invoice/config.d.ts.map +1 -0
  377. package/dist/editors/invoice/config.js +3 -0
  378. package/dist/editors/invoice/editor.d.ts.map +1 -1
  379. package/dist/editors/invoice/editor.js +103 -95
  380. package/dist/editors/invoice/exportUBL.d.ts +1 -1
  381. package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
  382. package/dist/editors/invoice/ingestPDF.d.ts +1 -1
  383. package/dist/editors/invoice/ingestPDF.d.ts.map +1 -1
  384. package/dist/editors/invoice/ingestPDF.js +34 -18
  385. package/dist/editors/invoice/ingestUBL.d.ts +1 -1
  386. package/dist/editors/invoice/ingestUBL.d.ts.map +1 -1
  387. package/dist/editors/invoice/invoiceToGnosis.js +2 -2
  388. package/dist/editors/invoice/legalEntity/bankSection.d.ts +3 -3
  389. package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
  390. package/dist/editors/invoice/legalEntity/common.d.ts +1 -1
  391. package/dist/editors/invoice/legalEntity/common.d.ts.map +1 -1
  392. package/dist/editors/invoice/legalEntity/legalEntity.d.ts +3 -3
  393. package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
  394. package/dist/editors/invoice/legalEntity/legalEntity.js +1 -0
  395. package/dist/editors/invoice/legalEntity/walletSection.d.ts +3 -3
  396. package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
  397. package/dist/editors/invoice/legalEntity/walletSection.js +5 -6
  398. package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts +2 -2
  399. package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
  400. package/dist/editors/invoice/lineItemTags/lineItemTags.js +2 -2
  401. package/dist/editors/invoice/lineItemTags/tagMapping.d.ts +1 -1
  402. package/dist/editors/invoice/lineItemTags/tagMapping.d.ts.map +1 -1
  403. package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts +2 -2
  404. package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -1
  405. package/dist/editors/invoice/lineItemTags/tagMobileModal.js +2 -2
  406. package/dist/editors/invoice/lineItems.d.ts.map +1 -1
  407. package/dist/editors/invoice/lineItems.js +3 -1
  408. package/dist/editors/invoice/module.d.ts +3 -0
  409. package/dist/editors/invoice/module.d.ts.map +1 -0
  410. package/dist/editors/invoice/module.js +9 -0
  411. package/dist/editors/invoice/requestFinance.js +3 -3
  412. package/dist/editors/invoice/uploadPdfChunked.js +1 -1
  413. package/dist/editors/invoice/utils/utils.d.ts +25 -0
  414. package/dist/editors/invoice/utils/utils.d.ts.map +1 -1
  415. package/dist/editors/invoice/utils/utils.js +66 -0
  416. package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
  417. package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
  418. package/dist/editors/invoice/validation/validationHandler.js +1 -1
  419. package/dist/editors/invoice/validation/validationManager.d.ts +1 -1
  420. package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
  421. package/dist/editors/invoice/validation/validationManager.js +1 -0
  422. package/dist/editors/invoice/validation/validationRules.d.ts +1 -1
  423. package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
  424. package/dist/index.d.ts +3 -3
  425. package/dist/index.d.ts.map +1 -1
  426. package/dist/index.js +2 -4
  427. package/dist/processors/index.d.ts +1 -1
  428. package/dist/processors/index.d.ts.map +1 -1
  429. package/dist/processors/line-item-processor/index.d.ts +2 -2
  430. package/dist/processors/line-item-processor/index.d.ts.map +1 -1
  431. package/dist/processors/line-item-processor/index.js +2 -1
  432. package/dist/scripts/invoice/autoTagging.d.ts +32 -0
  433. package/dist/scripts/invoice/autoTagging.d.ts.map +1 -0
  434. package/dist/scripts/invoice/autoTagging.js +341 -0
  435. package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -1
  436. package/dist/scripts/invoice/gnosisTransactionBuilder.js +4 -9
  437. package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
  438. package/dist/scripts/invoice/pdfToClaudeAI.js +8 -4
  439. package/dist/style.css +276 -4773
  440. package/dist/subgraphs/billing-statement/index.d.ts +2 -2
  441. package/dist/subgraphs/billing-statement/index.d.ts.map +1 -1
  442. package/dist/subgraphs/billing-statement/index.js +2 -2
  443. package/dist/subgraphs/billing-statement/resolvers.d.ts +2 -2
  444. package/dist/subgraphs/billing-statement/resolvers.d.ts.map +1 -1
  445. package/dist/subgraphs/billing-statement/resolvers.js +1 -0
  446. package/dist/subgraphs/expense-report/index.d.ts +2 -2
  447. package/dist/subgraphs/expense-report/index.d.ts.map +1 -1
  448. package/dist/subgraphs/expense-report/index.js +2 -2
  449. package/dist/subgraphs/expense-report/resolvers.d.ts +2 -2
  450. package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
  451. package/dist/subgraphs/expense-report/resolvers.js +1 -0
  452. package/dist/subgraphs/integrations/index.d.ts +2 -2
  453. package/dist/subgraphs/integrations/index.d.ts.map +1 -1
  454. package/dist/subgraphs/integrations/index.js +2 -2
  455. package/dist/subgraphs/integrations/resolvers.d.ts +2 -2
  456. package/dist/subgraphs/integrations/resolvers.d.ts.map +1 -1
  457. package/dist/subgraphs/integrations/resolvers.js +1 -0
  458. package/dist/subgraphs/invoice/index.d.ts +2 -2
  459. package/dist/subgraphs/invoice/index.d.ts.map +1 -1
  460. package/dist/subgraphs/invoice/index.js +2 -2
  461. package/dist/subgraphs/invoice/resolvers.d.ts +2 -2
  462. package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
  463. package/dist/subgraphs/invoice/resolvers.js +1 -0
  464. package/dist/vite.config.d.ts +3 -0
  465. package/dist/vite.config.d.ts.map +1 -0
  466. package/dist/vite.config.js +13 -0
  467. package/package.json +66 -49
  468. package/dist/document-models/billing-statement/gen/general/object.d.ts +0 -9
  469. package/dist/document-models/billing-statement/gen/general/object.d.ts.map +0 -1
  470. package/dist/document-models/billing-statement/gen/general/object.js +0 -13
  471. package/dist/document-models/billing-statement/gen/line-items/object.d.ts +0 -8
  472. package/dist/document-models/billing-statement/gen/line-items/object.d.ts.map +0 -1
  473. package/dist/document-models/billing-statement/gen/line-items/object.js +0 -10
  474. package/dist/document-models/billing-statement/gen/object.d.ts +0 -19
  475. package/dist/document-models/billing-statement/gen/object.d.ts.map +0 -1
  476. package/dist/document-models/billing-statement/gen/object.js +0 -33
  477. package/dist/document-models/billing-statement/gen/tags/object.d.ts +0 -7
  478. package/dist/document-models/billing-statement/gen/tags/object.d.ts.map +0 -1
  479. package/dist/document-models/billing-statement/gen/tags/object.js +0 -7
  480. package/dist/document-models/expense-report/gen/expense-report/object.d.ts +0 -7
  481. package/dist/document-models/expense-report/gen/expense-report/object.d.ts.map +0 -1
  482. package/dist/document-models/expense-report/gen/expense-report/object.js +0 -7
  483. package/dist/document-models/expense-report/gen/object.d.ts +0 -15
  484. package/dist/document-models/expense-report/gen/object.d.ts.map +0 -1
  485. package/dist/document-models/expense-report/gen/object.js +0 -25
  486. package/dist/document-models/expense-report/gen/wallet/object.d.ts +0 -21
  487. package/dist/document-models/expense-report/gen/wallet/object.d.ts.map +0 -1
  488. package/dist/document-models/expense-report/gen/wallet/object.js +0 -49
  489. package/dist/document-models/integrations/gen/integrations/object.d.ts +0 -9
  490. package/dist/document-models/integrations/gen/integrations/object.d.ts.map +0 -1
  491. package/dist/document-models/integrations/gen/integrations/object.js +0 -13
  492. package/dist/document-models/integrations/gen/object.d.ts +0 -15
  493. package/dist/document-models/integrations/gen/object.d.ts.map +0 -1
  494. package/dist/document-models/integrations/gen/object.js +0 -25
  495. package/dist/document-models/invoice/gen/general/object.d.ts +0 -11
  496. package/dist/document-models/invoice/gen/general/object.d.ts.map +0 -1
  497. package/dist/document-models/invoice/gen/general/object.js +0 -19
  498. package/dist/document-models/invoice/gen/items/object.d.ts +0 -11
  499. package/dist/document-models/invoice/gen/items/object.d.ts.map +0 -1
  500. package/dist/document-models/invoice/gen/items/object.js +0 -19
  501. package/dist/document-models/invoice/gen/object.d.ts +0 -21
  502. package/dist/document-models/invoice/gen/object.d.ts.map +0 -1
  503. package/dist/document-models/invoice/gen/object.js +0 -36
  504. package/dist/document-models/invoice/gen/parties/object.d.ts +0 -12
  505. package/dist/document-models/invoice/gen/parties/object.d.ts.map +0 -1
  506. package/dist/document-models/invoice/gen/parties/object.js +0 -22
  507. package/dist/document-models/invoice/gen/transitions/object.d.ts +0 -18
  508. package/dist/document-models/invoice/gen/transitions/object.d.ts.map +0 -1
  509. package/dist/document-models/invoice/gen/transitions/object.js +0 -40
  510. package/dist/editors/billing-statement/index.d.ts +0 -4
  511. package/dist/editors/billing-statement/index.d.ts.map +0 -1
  512. package/dist/editors/billing-statement/index.js +0 -12
  513. package/dist/editors/contributor-billing/components/CreateDocument.d.ts +0 -6
  514. package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +0 -1
  515. package/dist/editors/contributor-billing/components/CreateDocument.js +0 -23
  516. package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts +0 -12
  517. package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts.map +0 -1
  518. package/dist/editors/contributor-billing/components/DocumentDispatch.js +0 -20
  519. package/dist/editors/contributor-billing/components/EditorContainer.d.ts +0 -10
  520. package/dist/editors/contributor-billing/components/EditorContainer.d.ts.map +0 -1
  521. package/dist/editors/contributor-billing/components/EditorContainer.js +0 -56
  522. package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts +0 -12
  523. package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts.map +0 -1
  524. package/dist/editors/contributor-billing/components/FileItemsGrid.js +0 -7
  525. package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts +0 -17
  526. package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts.map +0 -1
  527. package/dist/editors/contributor-billing/components/FolderItemsGrid.js +0 -14
  528. package/dist/editors/contributor-billing/components/FolderTree.d.ts +0 -13
  529. package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +0 -1
  530. package/dist/editors/contributor-billing/components/FolderTree.js +0 -38
  531. package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts +0 -9
  532. package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts.map +0 -1
  533. package/dist/editors/contributor-billing/hooks/useDispatchMap.js +0 -21
  534. package/dist/editors/contributor-billing/hooks/useDrop.d.ts +0 -22
  535. package/dist/editors/contributor-billing/hooks/useDrop.d.ts.map +0 -1
  536. package/dist/editors/contributor-billing/hooks/useDrop.js +0 -57
  537. package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts +0 -8
  538. package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts.map +0 -1
  539. package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.js +0 -19
  540. package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts +0 -3
  541. package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts.map +0 -1
  542. package/dist/editors/contributor-billing/hooks/useTransformedNodes.js +0 -32
  543. package/dist/editors/contributor-billing/index.d.ts +0 -4
  544. package/dist/editors/contributor-billing/index.d.ts.map +0 -1
  545. package/dist/editors/contributor-billing/index.js +0 -19
  546. package/dist/editors/contributor-billing/utils/withDropZone.d.ts +0 -4
  547. package/dist/editors/contributor-billing/utils/withDropZone.d.ts.map +0 -1
  548. package/dist/editors/contributor-billing/utils/withDropZone.js +0 -19
  549. package/dist/editors/expense-report/index.d.ts +0 -3
  550. package/dist/editors/expense-report/index.d.ts.map +0 -1
  551. package/dist/editors/expense-report/index.js +0 -11
  552. package/dist/editors/integrations/index.d.ts +0 -4
  553. package/dist/editors/integrations/index.d.ts.map +0 -1
  554. package/dist/editors/integrations/index.js +0 -12
  555. package/dist/editors/invoice/assets/custom.d.ts +0 -4
  556. package/dist/editors/invoice/assets/powerhouseLogo.png +0 -0
  557. package/dist/editors/invoice/index.d.ts +0 -4
  558. package/dist/editors/invoice/index.d.ts.map +0 -1
  559. package/dist/editors/invoice/index.js +0 -12
  560. package/dist/migrate-zip.d.ts +0 -2
  561. package/dist/migrate-zip.d.ts.map +0 -1
  562. package/dist/migrate-zip.js +0 -56
  563. package/dist/reducers/general.d.ts +0 -8
  564. package/dist/reducers/general.d.ts.map +0 -1
  565. package/dist/reducers/general.js +0 -73
  566. package/dist/reducers/items.d.ts +0 -8
  567. package/dist/reducers/items.d.ts.map +0 -1
  568. package/dist/reducers/items.js +0 -195
  569. package/dist/reducers/parties.d.ts +0 -8
  570. package/dist/reducers/parties.d.ts.map +0 -1
  571. package/dist/reducers/parties.js +0 -266
  572. package/dist/reducers/transitions.d.ts +0 -8
  573. package/dist/reducers/transitions.d.ts.map +0 -1
  574. package/dist/reducers/transitions.js +0 -162
  575. package/dist/scripts/invoice/pdfToDocumentAi.d.ts +0 -5
  576. package/dist/scripts/invoice/pdfToDocumentAi.d.ts.map +0 -1
  577. package/dist/scripts/invoice/pdfToDocumentAi.js +0 -659
  578. package/dist/tailwind.config.d.ts +0 -13
  579. package/dist/tailwind.config.d.ts.map +0 -1
  580. package/dist/tailwind.config.js +0 -16
@@ -8,8 +8,8 @@ import { loadUBLFile } from "./ingestUBL.js";
8
8
  import PDFUploader from "./ingestPDF.js";
9
9
  import RequestFinance from "./requestFinance.js";
10
10
  import InvoiceToGnosis from "./invoiceToGnosis.js";
11
- import { toast, ToastContainer } from "@powerhousedao/design-system";
12
- import { PDFDownloadLink } from "@react-pdf/renderer";
11
+ import { toast, ToastContainer } from "@powerhousedao/design-system/connect";
12
+ import { PDFDownloadLink, PDFViewer } from "@react-pdf/renderer";
13
13
  import { InvoicePDF } from "./InvoicePDF.js";
14
14
  import { createRoot } from "react-dom/client";
15
15
  import { downloadUBL } from "./exportUBL.js";
@@ -24,6 +24,8 @@ import { ClosePaymentModalContent, ConfirmPaymentModalContent, FinalRejectionMod
24
24
  import { InvoiceStateSchema } from "../../document-models/invoice/gen/schema/zod.js";
25
25
  import validateStatusBeforeContinue from "./validation/validationHandler.js";
26
26
  import { useSelectedInvoiceDocument } from "../hooks/useInvoiceDocument.js";
27
+ import { DocumentToolbar } from "@powerhousedao/design-system/connect";
28
+ import { setSelectedNode, useParentFolderForSelectedNode, } from "@powerhousedao/reactor-browser";
27
29
  function isFiatCurrency(currency) {
28
30
  return currencyList.find((c) => c.ticker === currency)?.crypto === false;
29
31
  }
@@ -86,7 +88,6 @@ export default function Editor(props) {
86
88
  const [paymentIssue, setPaymentIssue] = useState("");
87
89
  const [paymentAmount, setPaymentAmount] = useState("");
88
90
  const [editingItemValues, setEditingItemValues] = useState(null);
89
- const prevStatus = useRef(state.status);
90
91
  useEffect(() => {
91
92
  setFiatMode(isFiatCurrency(state.currency));
92
93
  }, [state.currency, state]);
@@ -366,107 +367,114 @@ export default function Editor(props) {
366
367
  reportPaymentIssue: "Confirm",
367
368
  // Add more labels as needed
368
369
  };
369
- return (_jsxs("div", { className: "editor-container", children: [_jsx(ToastContainer, { position: "bottom-right", autoClose: 5000, hideProgressBar: false, newestOnTop: false, closeOnClick: false, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: "light" }), _jsxs("div", { className: "mb-6", children: [_jsxs("div", { className: "hidden md:flex flex-row items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-row items-center gap-4 flex-wrap", children: [_jsx("h1", { className: "text-3xl font-bold whitespace-nowrap", children: "Invoice" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
370
- const newValue = e.target.value;
371
- if (newValue !== state.invoiceNo) {
372
- dispatch(actions.editInvoice({ invoiceNo: newValue }));
373
- }
374
- }, input: invoiceNoInput, validation: invoiceValidation }), _jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
375
- handleFileUpload(e);
376
- setUploadDropdownOpen(false);
377
- }, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsx("button", { onClick: () => {
378
- handleExportUBL();
379
- setExportDropdownOpen(false);
380
- }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
381
- handleExportPDF();
382
- setExportDropdownOpen(false);
383
- }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] }), _jsxs("div", { className: "flex flex-row items-center gap-4", children: [_jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
384
- handleCurrencyChange(e.target.value);
385
- }, validation: currencyValidation }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] })] }), _jsxs("div", { className: "md:hidden", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Invoice" }), _jsx("button", { onClick: () => setMobileHeaderOpen(!mobileHeaderOpen), className: "inline-flex items-center justify-center w-10 h-10 rounded-lg bg-gray-100 hover:bg-gray-200 transition-colors cursor-pointer", "aria-label": "Toggle invoice settings", children: mobileHeaderOpen ? (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })) : (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })) })] }), !mobileHeaderOpen && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 mb-2", children: [_jsx("span", { className: "font-medium", children: state.invoiceNo || "No invoice #" }), _jsx("span", { children: "\u2022" }), _jsx("span", { children: state.currency }), _jsx("span", { children: "\u2022" }), _jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800", children: state.status })] })), mobileHeaderOpen && (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg p-4 space-y-4 shadow-sm", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Invoice Number" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
370
+ // Get the parent folder node for the currently selected node
371
+ const parentFolder = useParentFolderForSelectedNode();
372
+ // Set the selected node to the parent folder node (close the editor)
373
+ function handleClose() {
374
+ setSelectedNode(parentFolder?.id);
375
+ }
376
+ return (_jsxs("div", { children: [_jsx(DocumentToolbar, { document: doc, onClose: handleClose }), _jsxs("div", { className: "editor-container", children: [_jsx(ToastContainer, { position: "bottom-right", autoClose: 5000, hideProgressBar: false, newestOnTop: false, closeOnClick: false, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: "light" }), _jsxs("div", { className: "mb-6", children: [_jsxs("div", { className: "hidden md:flex flex-row items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-row items-center gap-4 flex-wrap", children: [_jsx("h1", { className: "text-3xl font-bold whitespace-nowrap", children: "Invoice" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
386
377
  const newValue = e.target.value;
387
378
  if (newValue !== state.invoiceNo) {
388
379
  dispatch(actions.editInvoice({ invoiceNo: newValue }));
389
380
  }
390
- }, input: invoiceNoInput, validation: invoiceValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Currency" }), _jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
391
- handleCurrencyChange(e.target.value);
392
- }, validation: currencyValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Status" }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] }), _jsxs("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: [_jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
381
+ }, input: invoiceNoInput, validation: invoiceValidation }), _jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
393
382
  handleFileUpload(e);
394
383
  setUploadDropdownOpen(false);
395
- }, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsx("button", { onClick: () => {
384
+ }, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsx("button", { onClick: () => {
396
385
  handleExportUBL();
397
386
  setExportDropdownOpen(false);
398
387
  }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
399
388
  handleExportPDF();
400
389
  setExportDropdownOpen(false);
401
- }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] })] }))] })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-0 lg:gap-4", children: [_jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Issuer" }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Issue Date:" }), _jsx(DatePicker, { name: "issueDate", className: String.raw `w-full p-0`, onChange: (e) => {
402
- const newDate = e.target.value.split("T")[0];
403
- dispatch(actions.editInvoice({
404
- dateIssued: newDate,
405
- }));
406
- }, value: state.dateIssued })] }), _jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Delivery Date:" }), _jsx(DatePicker, { name: "deliveryDate", className: String.raw `w-full p-0`, onChange: (e) => {
407
- const newValue = e.target.value.split("T")[0];
408
- if (newValue !== state.dateDelivered) {
409
- dispatch(actions.editInvoice({ dateDelivered: newValue }));
410
- }
411
- }, value: state.dateDelivered || "" })] })] }), _jsx(LegalEntityForm, { legalEntity: state.issuer, onChangeInfo: (input) => dispatch(actions.editIssuer(input)), onChangeBank: (input) => dispatch(actions.editIssuerBank(input)), onChangeWallet: (input) => dispatch(actions.editIssuerWallet(input)), basicInfoDisabled: false, bankDisabled: !fiatMode, walletDisabled: fiatMode, currency: state.currency, status: state.status, walletvalidation: walletValidation, mainCountryValidation: mainCountryValidation, bankCountryValidation: bankCountryValidation, ibanvalidation: ibanValidation, bicvalidation: bicValidation, banknamevalidation: bankNameValidation, streetaddressvalidation: streetAddressValidation, cityvalidation: cityValidation, postalcodevalidation: postalCodeValidation, payeremailvalidation: payerEmailValidation, routingNumbervalidation: routingNumberValidation, accountNumbervalidation: accountNumberValidation })] }), _jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Payer" }), _jsxs("div", { className: "mb-2 w-64", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Due Date:" }), _jsx(DatePicker, { name: "dateDue", className: String.raw `w-full p-0`, onChange: (e) => dispatch(actions.editInvoice({
412
- dateDue: e.target.value.split("T")[0],
413
- })), value: state.dateDue })] }), _jsx(LegalEntityForm, { bankDisabled: true, legalEntity: state.payer, onChangeInfo: (input) => dispatch(actions.editPayer(input)), currency: state.currency, status: state.status, payeremailvalidation: payerEmailValidation })] })] }), _jsx("div", { className: "mb-8", children: _jsx(LineItemsTable, { currency: state.currency, lineItems: state.lineItems.map((item) => ({
414
- ...item,
415
- lineItemTag: item.lineItemTag ?? [],
416
- })), onAddItem: (item) => dispatch(actions.addLineItem(item)), onDeleteItem: (input) => dispatch(actions.deleteLineItem(input)), onUpdateCurrency: (input) => {
417
- setFiatMode(input.currency !== "USDS");
418
- dispatch(actions.editInvoice(input));
419
- }, onUpdateItem: (item) => dispatch(actions.editLineItem(item)), onEditingItemChange: setEditingItemValues, dispatch: dispatch, paymentAccounts: state.invoiceTags || [] }) }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx("div", { className: "col-span-1", children: _jsx("div", { className: "", children: _jsx(Textarea, { label: "Notes", placeholder: "Add notes", autoExpand: true, rows: 4, multiline: true, value: notes, onBlur: (e) => {
420
- const newValue = e.target.value;
421
- if (newValue !== state.notes) {
422
- dispatch(actions.editInvoice({ notes: newValue }));
423
- }
424
- }, onChange: (e) => {
425
- setNotes(e.target.value);
426
- }, className: "p-2 mb-4" }) }) }), _jsx("div", { className: "col-span-1", children: _jsx("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-6 shadow-sm h-32", children: _jsxs("div", { className: "", children: [_jsxs("div", { className: "flex justify-between text-gray-700", children: [_jsx("span", { className: "font-medium", children: "Subtotal (excl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxExcl), " ", state.currency] })] }), _jsxs("div", { className: "flex justify-between border-t border-gray-200 pt-6 text-lg font-bold text-gray-900", children: [_jsx("span", { children: "Total (incl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxIncl), " ", state.currency] })] })] }) }) })] }), activeModal && (_jsx(ConfirmationModal, { open: !!activeModal, header: modalHeaders[activeModal], onCancel: () => setActiveModal(null), onContinue: () => {
427
- if (activeModal === "issueInvoice") {
428
- dispatch(actions.issue({
429
- invoiceNo: invoiceNoInput,
430
- dateIssued: state.dateIssued,
431
- }));
432
- }
433
- if (activeModal === "rejectInvoice") {
434
- dispatch(actions.reject({
435
- final: finalReason,
436
- id: generateId(),
437
- reason: rejectReason,
438
- }));
439
- }
440
- if (activeModal === "schedulePayment") {
441
- dispatch(actions.schedulePayment({
442
- id: generateId(),
443
- processorRef: paymentRef,
444
- }));
445
- }
446
- if (activeModal === "closePayment") {
447
- dispatch(actions.closePayment({
448
- closureReason: closureReason,
449
- }));
450
- }
451
- if (activeModal === "registerPayment") {
452
- dispatch(actions.registerPaymentTx({
453
- id: state.payments[state.payments.length - 1].id,
454
- timestamp: paymentDate,
455
- txRef: txnRef,
456
- }));
457
- }
458
- if (activeModal === "reportPaymentIssue") {
459
- dispatch(actions.reportPaymentIssue({
460
- id: state.payments[state.payments.length - 1].id,
461
- issue: paymentIssue,
462
- }));
463
- }
464
- if (activeModal === "confirmPayment") {
465
- dispatch(actions.confirmPayment({
466
- id: state.payments[state.payments.length - 1].id,
467
- amount: parseFloat(paymentAmount) || 0,
468
- }));
469
- }
470
- setActiveModal(null);
471
- }, continueLabel: modalContinueLabels[activeModal], continueDisabled: modalWarning, children: modalContentMap[activeModal] })), (state.status === "ACCEPTED" || state.status === "PAYMENTSCHEDULED") && (_jsx("div", { className: "mt-8", children: !isFiatCurrency(state.currency) ? (_jsx(InvoiceToGnosis, { docState: state, dispatch: dispatch })) : (_jsx(RequestFinance, { docState: state, dispatch: dispatch })) }))] }));
390
+ }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] }), _jsxs("div", { className: "flex flex-row items-center gap-4", children: [_jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
391
+ handleCurrencyChange(e.target.value);
392
+ }, validation: currencyValidation }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] })] }), _jsxs("div", { className: "md:hidden", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Invoice" }), _jsx("button", { onClick: () => setMobileHeaderOpen(!mobileHeaderOpen), className: "inline-flex items-center justify-center w-10 h-10 rounded-lg bg-gray-100 hover:bg-gray-200 transition-colors cursor-pointer", "aria-label": "Toggle invoice settings", children: mobileHeaderOpen ? (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })) : (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })) })] }), !mobileHeaderOpen && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 mb-2", children: [_jsx("span", { className: "font-medium", children: state.invoiceNo || "No invoice #" }), _jsx("span", { children: "\u2022" }), _jsx("span", { children: state.currency }), _jsx("span", { children: "\u2022" }), _jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800", children: state.status })] })), mobileHeaderOpen && (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg p-4 space-y-4 shadow-sm", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Invoice Number" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
393
+ const newValue = e.target.value;
394
+ if (newValue !== state.invoiceNo) {
395
+ dispatch(actions.editInvoice({ invoiceNo: newValue }));
396
+ }
397
+ }, input: invoiceNoInput, validation: invoiceValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Currency" }), _jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
398
+ handleCurrencyChange(e.target.value);
399
+ }, validation: currencyValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Status" }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] }), _jsxs("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: [_jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
400
+ handleFileUpload(e);
401
+ setUploadDropdownOpen(false);
402
+ }, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsx("button", { onClick: () => {
403
+ handleExportUBL();
404
+ setExportDropdownOpen(false);
405
+ }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
406
+ handleExportPDF();
407
+ setExportDropdownOpen(false);
408
+ }, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] })] }))] })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-0 lg:gap-4", children: [_jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Issuer" }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Issue Date:" }), _jsx(DatePicker, { name: "issueDate", className: String.raw `w-full p-0 bg-white`, onChange: (e) => {
409
+ const newDate = e.target.value.split("T")[0];
410
+ dispatch(actions.editInvoice({
411
+ dateIssued: newDate,
412
+ }));
413
+ }, value: state.dateIssued })] }), _jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Delivery Date:" }), _jsx(DatePicker, { name: "deliveryDate", className: String.raw `w-full p-0 bg-white`, onChange: (e) => {
414
+ const newValue = e.target.value.split("T")[0];
415
+ if (newValue !== state.dateDelivered) {
416
+ dispatch(actions.editInvoice({ dateDelivered: newValue }));
417
+ }
418
+ }, value: state.dateDelivered || "" })] })] }), _jsx(LegalEntityForm, { legalEntity: state.issuer, onChangeInfo: (input) => dispatch(actions.editIssuer(input)), onChangeBank: (input) => dispatch(actions.editIssuerBank(input)), onChangeWallet: (input) => dispatch(actions.editIssuerWallet(input)), basicInfoDisabled: false, bankDisabled: !fiatMode, walletDisabled: fiatMode, currency: state.currency, status: state.status, walletvalidation: walletValidation, mainCountryValidation: mainCountryValidation, bankCountryValidation: bankCountryValidation, ibanvalidation: ibanValidation, bicvalidation: bicValidation, banknamevalidation: bankNameValidation, streetaddressvalidation: streetAddressValidation, cityvalidation: cityValidation, postalcodevalidation: postalCodeValidation, payeremailvalidation: payerEmailValidation, routingNumbervalidation: routingNumberValidation, accountNumbervalidation: accountNumberValidation })] }), _jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Payer" }), _jsxs("div", { className: "mb-2 w-64", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Due Date:" }), _jsx(DatePicker, { name: "dateDue", className: String.raw `w-full p-0 bg-white`, onChange: (e) => dispatch(actions.editInvoice({
419
+ dateDue: e.target.value.split("T")[0],
420
+ })), value: state.dateDue })] }), _jsx(LegalEntityForm, { bankDisabled: true, legalEntity: state.payer, onChangeInfo: (input) => dispatch(actions.editPayer(input)), currency: state.currency, status: state.status, payeremailvalidation: payerEmailValidation })] })] }), _jsx("div", { className: "mb-8", children: _jsx(LineItemsTable, { currency: state.currency, lineItems: state.lineItems.map((item) => ({
421
+ ...item,
422
+ lineItemTag: item.lineItemTag ?? [],
423
+ })), onAddItem: (item) => dispatch(actions.addLineItem(item)), onDeleteItem: (input) => dispatch(actions.deleteLineItem(input)), onUpdateCurrency: (input) => {
424
+ setFiatMode(input.currency !== "USDS");
425
+ dispatch(actions.editInvoice(input));
426
+ }, onUpdateItem: (item) => dispatch(actions.editLineItem(item)), onEditingItemChange: setEditingItemValues, dispatch: dispatch, paymentAccounts: state.invoiceTags || [] }) }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx("div", { className: "col-span-1", children: _jsx("div", { className: "", children: _jsx(Textarea, { label: "Notes", placeholder: "Add notes", autoExpand: true, rows: 4, multiline: true, value: notes, onBlur: (e) => {
427
+ const newValue = e.target.value;
428
+ if (newValue !== state.notes) {
429
+ dispatch(actions.editInvoice({ notes: newValue }));
430
+ }
431
+ }, onChange: (e) => {
432
+ setNotes(e.target.value);
433
+ }, className: "p-2 mb-4" }) }) }), _jsx("div", { className: "col-span-1", children: _jsx("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-6 shadow-sm h-32", children: _jsxs("div", { className: "", children: [_jsxs("div", { className: "flex justify-between text-gray-700", children: [_jsx("span", { className: "font-medium", children: "Subtotal (excl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxExcl), " ", state.currency] })] }), _jsxs("div", { className: "flex justify-between border-t border-gray-200 pt-6 text-lg font-bold text-gray-900", children: [_jsx("span", { children: "Total (incl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxIncl), " ", state.currency] })] })] }) }) })] }), activeModal && (_jsx(ConfirmationModal, { open: !!activeModal, header: modalHeaders[activeModal], onCancel: () => setActiveModal(null), onContinue: () => {
434
+ if (activeModal === "issueInvoice") {
435
+ dispatch(actions.issue({
436
+ invoiceNo: invoiceNoInput,
437
+ dateIssued: state.dateIssued,
438
+ }));
439
+ }
440
+ if (activeModal === "rejectInvoice") {
441
+ dispatch(actions.reject({
442
+ final: finalReason,
443
+ id: generateId(),
444
+ reason: rejectReason,
445
+ }));
446
+ }
447
+ if (activeModal === "schedulePayment") {
448
+ dispatch(actions.schedulePayment({
449
+ id: generateId(),
450
+ processorRef: paymentRef,
451
+ }));
452
+ }
453
+ if (activeModal === "closePayment") {
454
+ dispatch(actions.closePayment({
455
+ closureReason: closureReason,
456
+ }));
457
+ }
458
+ if (activeModal === "registerPayment") {
459
+ dispatch(actions.registerPaymentTx({
460
+ id: state.payments[state.payments.length - 1].id,
461
+ timestamp: paymentDate,
462
+ txRef: txnRef,
463
+ }));
464
+ }
465
+ if (activeModal === "reportPaymentIssue") {
466
+ dispatch(actions.reportPaymentIssue({
467
+ id: state.payments[state.payments.length - 1].id,
468
+ issue: paymentIssue,
469
+ }));
470
+ }
471
+ if (activeModal === "confirmPayment") {
472
+ dispatch(actions.confirmPayment({
473
+ id: state.payments[state.payments.length - 1].id,
474
+ amount: parseFloat(paymentAmount) || 0,
475
+ }));
476
+ }
477
+ setActiveModal(null);
478
+ }, continueLabel: modalContinueLabels[activeModal], continueDisabled: modalWarning, children: modalContentMap[activeModal] })), (state.status === "ACCEPTED" ||
479
+ state.status === "PAYMENTSCHEDULED") && (_jsx("div", { className: "mt-8", children: !isFiatCurrency(state.currency) ? (_jsx(InvoiceToGnosis, { docState: state, dispatch: dispatch })) : (_jsx(RequestFinance, { docState: state, dispatch: dispatch })) }))] })] }));
472
480
  }
@@ -1,4 +1,4 @@
1
- import { InvoiceState } from "../../document-models/invoice/index.js";
1
+ import type { InvoiceState } from "../../document-models/invoice/index.js";
2
2
  interface ExportUBLOptions {
3
3
  invoice: InvoiceState;
4
4
  filename?: string;
@@ -1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H,OAAO,CAAC,YAAY;CAarB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,QAAwB,EACxB,OAAO,GACR,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlC;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,QAAwB,EACxB,OAAO,GACR,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlC"}
@@ -1,4 +1,4 @@
1
- import { InvoiceAction } from "../../document-models/invoice/index.js";
1
+ import { type InvoiceAction } from "../../document-models/invoice/index.js";
2
2
  export declare function loadPDFFile({ file, dispatch, }: {
3
3
  file: File;
4
4
  dispatch: (action: InvoiceAction) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ingestPDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestPDF.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAW,MAAM,wCAAwC,CAAC;AAYhF,wBAAsB,WAAW,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C,iBAUA;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AA0BD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,kBAAkB,GACnB,EAAE,gBAAgB,2CA0QlB"}
1
+ {"version":3,"file":"ingestPDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestPDF.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,wCAAwC,CAAC;AAYrF,wBAAsB,WAAW,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C,iBAUA;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AA0BD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,kBAAkB,GACnB,EAAE,gBAAgB,2CAqSlB"}
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
2
+ import React, { useState } from "react";
3
3
  import { actions } from "../../document-models/invoice/index.js";
4
- import { toast } from "@powerhousedao/design-system";
4
+ import { toast } from "@powerhousedao/design-system/connect";
5
5
  import { uploadPdfChunked } from "./uploadPdfChunked.js";
6
- import { getCountryCodeFromName } from "./utils/utils.js";
6
+ import { getCountryCodeFromName, mapChainNameToConfig } from "./utils/utils.js";
7
7
  import { LoaderCircle } from "lucide-react";
8
8
  let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
9
9
  if (!window.document.baseURI.includes("localhost")) {
10
- GRAPHQL_URL = "https://jetstream.powerhouse.io/api/graphql/invoice";
10
+ GRAPHQL_URL = "https://switchboard-dev.powerhouse.xyz/graphql/invoice";
11
11
  }
12
12
  export async function loadPDFFile({ file, dispatch, }) {
13
13
  if (!file)
@@ -77,6 +77,7 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
77
77
  // If we have line items, dispatch them
78
78
  if (invoiceData.lineItems && invoiceData.lineItems.length > 0) {
79
79
  invoiceData.lineItems.forEach((item) => {
80
+ // Add the line item first
80
81
  dispatch(actions.addLineItem({
81
82
  id: item.id,
82
83
  description: item.description,
@@ -88,6 +89,17 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
88
89
  totalPriceTaxExcl: item.totalPriceTaxExcl,
89
90
  totalPriceTaxIncl: item.totalPriceTaxIncl,
90
91
  }));
92
+ // If auto-tagging assigned tags, add them
93
+ if (item.lineItemTag && Array.isArray(item.lineItemTag)) {
94
+ item.lineItemTag.forEach((tag) => {
95
+ dispatch(actions.setLineItemTag({
96
+ lineItemId: item.id,
97
+ dimension: tag.dimension,
98
+ value: tag.value,
99
+ label: tag.label,
100
+ }));
101
+ });
102
+ }
91
103
  });
92
104
  }
93
105
  // If we have issuer data, dispatch it
@@ -127,11 +139,12 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
127
139
  }
128
140
  // Add crypto wallet information dispatch
129
141
  if (invoiceData.issuer.paymentRouting?.wallet) {
142
+ const chainConfig = mapChainNameToConfig(invoiceData.issuer.paymentRouting.wallet.chainName);
130
143
  dispatch(actions.editIssuerWallet({
131
144
  address: invoiceData.issuer.paymentRouting.wallet.address || "",
132
- chainId: invoiceData.issuer.paymentRouting.wallet.chainId || "",
133
- chainName: invoiceData.issuer.paymentRouting.wallet.chainName || "",
134
- rpc: invoiceData.issuer.paymentRouting.wallet.rpc || "",
145
+ chainId: invoiceData.issuer.paymentRouting.wallet.chainId || chainConfig.chainId,
146
+ chainName: invoiceData.issuer.paymentRouting.wallet.chainName || chainConfig.chainName,
147
+ rpc: invoiceData.issuer.paymentRouting.wallet.rpc || chainConfig.rpc,
135
148
  }));
136
149
  }
137
150
  }
@@ -165,11 +178,12 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
165
178
  }
166
179
  // Add payer crypto wallet information if present
167
180
  if (invoiceData.payer.paymentRouting?.wallet) {
181
+ const payerChainConfig = mapChainNameToConfig(invoiceData.payer.paymentRouting.wallet.chainName);
168
182
  dispatch(actions.editPayerWallet({
169
183
  address: invoiceData.payer.paymentRouting.wallet.address || "",
170
- chainId: invoiceData.payer.paymentRouting.wallet.chainId || "",
171
- chainName: invoiceData.payer.paymentRouting.wallet.chainName || "",
172
- rpc: invoiceData.payer.paymentRouting.wallet.rpc || "",
184
+ chainId: invoiceData.payer.paymentRouting.wallet.chainId || payerChainConfig.chainId,
185
+ chainName: invoiceData.payer.paymentRouting.wallet.chainName || payerChainConfig.chainName,
186
+ rpc: invoiceData.payer.paymentRouting.wallet.rpc || payerChainConfig.rpc,
173
187
  }));
174
188
  }
175
189
  }
@@ -177,15 +191,17 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
177
191
  toast("Invoice uploaded successfully", {
178
192
  type: "success",
179
193
  });
180
- // Add debug logging here
181
- console.log("Final document state:", JSON.stringify({
182
- issuer: invoiceData.issuer,
183
- payer: invoiceData.payer,
184
- lineItems: invoiceData.lineItems,
185
- paymentRouting: invoiceData.issuer?.paymentRouting,
186
- bankDetails: invoiceData.issuer?.paymentRouting?.bank,
187
- }, null, 2));
188
194
  changeDropdownOpen(false);
195
+ // Debug log after all dispatch actions are completed
196
+ setTimeout(() => {
197
+ console.log("Final document state after all dispatches:", JSON.stringify({
198
+ issuer: invoiceData.issuer,
199
+ payer: invoiceData.payer,
200
+ lineItems: invoiceData.lineItems,
201
+ paymentRouting: invoiceData.issuer?.paymentRouting,
202
+ bankDetails: invoiceData.issuer?.paymentRouting?.bank,
203
+ }, null, 2));
204
+ }, 100);
189
205
  }
190
206
  else {
191
207
  const errorMsg = extractErrorMessage(result.error || "Failed to process PDF");
@@ -1,4 +1,4 @@
1
- import { InvoiceAction } from "../../document-models/invoice/index.js";
1
+ import { type InvoiceAction } from "../../document-models/invoice/index.js";
2
2
  interface LoadUBLFileProps {
3
3
  file: File;
4
4
  dispatch: (action: InvoiceAction) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ingestUBL.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestUBL.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEd,MAAM,wCAAwC,CAAC;AAEhD,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE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oB1B,OAAO,CAAC,cAAc;IA8NtB,OAAO,CAAC,gBAAgB;CA4DzB;AAED,wBAAsB,WAAW,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBlC"}
@@ -3,8 +3,8 @@ import React, { useState, useEffect } from "react";
3
3
  import { actions } from "../../document-models/invoice/index.js";
4
4
  import { generateId } from "document-model";
5
5
  let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
6
- if (!window.document.baseURI.includes("localhost")) {
7
- GRAPHQL_URL = "https://jetstream.powerhouse.io/api/graphql/invoice";
6
+ if (!window.document.baseURI.includes('localhost')) {
7
+ GRAPHQL_URL = 'https://switchboard-dev.powerhouse.xyz/graphql/invoice';
8
8
  }
9
9
  const InvoiceToGnosis = ({ docState, dispatch, }) => {
10
10
  const [isLoading, setIsLoading] = useState(false);
@@ -1,6 +1,6 @@
1
- import { ComponentPropsWithRef } from "react";
2
- import { EditLegalEntityBankInput } from "./legalEntity.js";
3
- import { ValidationResult } from "../validation/validationManager.js";
1
+ import { type ComponentPropsWithRef } from "react";
2
+ import type { EditLegalEntityBankInput } from "./legalEntity.js";
3
+ import type { ValidationResult } from "../validation/validationManager.js";
4
4
  export type LegalEntityBankSectionProps = Omit<ComponentPropsWithRef<"div">, "children"> & {
5
5
  readonly value: EditLegalEntityBankInput;
6
6
  readonly onChange: (value: EditLegalEntityBankInput) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"bankSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/bankSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAOtB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAMtE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC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AC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrD,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAmCF,eAAO,MAAM,sBAAsB,qIAoiBlC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  export declare const FieldLabel: ({ children, }: {
3
3
  readonly children: React.ReactNode;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/common.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGvC,eAAO,MAAM,UAAU,GAAI,eAExB;IACD,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,4CAEA,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,CAAC,OAAO,CAAC,4CAWvD,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,UAAU,GAAI,eAExB;IACD,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,4CAEA,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,CAAC,OAAO,CAAC,4CAWvD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, LegalEntity } from "../../../document-models/invoice/index.js";
2
- import { ComponentPropsWithRef } from "react";
3
- import { ValidationResult } from "../validation/validationManager.js";
1
+ import type { EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, LegalEntity } from "../../../document-models/invoice/index.js";
2
+ import { type ComponentPropsWithRef } from "react";
3
+ import type { ValidationResult } from "../validation/validationManager.js";
4
4
  export type EditLegalEntityWalletInput = EditIssuerWalletInput | EditPayerWalletInput;
5
5
  export type EditLegalEntityBankInput = EditIssuerBankInput | EditPayerBankInput;
6
6
  export type EditLegalEntityInput = EditIssuerInput | EditPayerInput;
@@ -1 +1 @@
1
- {"version":3,"file":"legalEntity.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/legalEntity.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,WAAW,EACZ,MAAM,2CAA2C,CAAC;AACnD,OAAc,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,MAAM,MAAM,0BAA0B,GAClC,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,cAAc,CAAC;AAMpE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,CACX,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE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C;AA+BF,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,EAAE,oBAAoB,2CA4CtB"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, {} from "react";
2
3
  import { twMerge } from "tailwind-merge";
3
4
  import { LegalEntityWalletSection } from "./walletSection.js";
4
5
  import { LegalEntityBankSection } from "./bankSection.js";
@@ -1,6 +1,6 @@
1
- import { ComponentProps } from "react";
2
- import { EditLegalEntityWalletInput } from "./legalEntity.js";
3
- import { ValidationResult } from "../validation/validationManager.js";
1
+ import { type ComponentProps } from "react";
2
+ import type { EditLegalEntityWalletInput } from "./legalEntity.js";
3
+ import type { ValidationResult } from "../validation/validationManager.js";
4
4
  export type LegalEntityWalletSectionProps = Omit<ComponentProps<"div">, "children" | "onChange"> & {
5
5
  readonly value: EditLegalEntityWalletInput;
6
6
  readonly onChange: (value: EditLegalEntityWalletInput) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"walletSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/walletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,4CA4GrC,CAAC"}
1
+ {"version":3,"file":"walletSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/walletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAI3E,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,4CA0GrC,CAAC"}
@@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
3
3
  import { twMerge } from "tailwind-merge";
4
4
  import { InputField } from "../components/inputField.js";
5
5
  import { Select } from "@powerhousedao/document-engineering";
6
+ import { getAllChainConfigs } from "../utils/utils.js";
6
7
  export const LegalEntityWalletSection = (props) => {
7
8
  const { value, onChange, disabled, currency, status, walletvalidation, ...divProps } = props;
8
9
  const [localState, setLocalState] = useState(value);
@@ -22,12 +23,10 @@ export const LegalEntityWalletSection = (props) => {
22
23
  [field]: newValue,
23
24
  });
24
25
  };
25
- const CHAIN_PRESETS = [
26
- { chainName: "Base", chainId: "8453" },
27
- { chainName: "Ethereum", chainId: "1" },
28
- { chainName: "Arbitrum One", chainId: "42161" },
29
- // { chainName: "Gnosis", chainId: "100" },
30
- ];
26
+ const CHAIN_PRESETS = getAllChainConfigs().map(config => ({
27
+ chainName: config.chainName,
28
+ chainId: config.chainId,
29
+ }));
31
30
  // Map CHAIN_PRESETS to Select options
32
31
  const chainOptions = CHAIN_PRESETS.map((preset) => ({
33
32
  label: preset.chainName,
@@ -1,5 +1,5 @@
1
- import { Dispatch } from "react";
2
- import { InvoiceTag } from "../../../document-models/invoice/index.js";
1
+ import { type Dispatch } from "react";
2
+ import { type InvoiceTag } from "../../../document-models/invoice/index.js";
3
3
  interface TagAssignmentRow {
4
4
  id: string;
5
5
  item: string;
@@ -1 +1 @@
1
- {"version":3,"file":"lineItemTags.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/lineItemTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAW,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAKhF,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,UAAU,sBAAsB;IAC9B,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