@zeniai/client-epic-state 4.19.97 → 4.19.99-beta0ND

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 (251) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +2 -0
  3. package/lib/commonStateTypes/coaBalance/coaBalanceType.js +6 -0
  4. package/lib/commonStateTypes/currencyHelper.d.ts +3 -0
  5. package/lib/commonStateTypes/currencyHelper.js +6 -1
  6. package/lib/commonStateTypes/reduceFetchState.d.ts +9 -0
  7. package/lib/commonStateTypes/reduceFetchState.js +26 -0
  8. package/lib/entity/account/accountPayload.d.ts +2 -0
  9. package/lib/entity/account/accountPayload.js +2 -0
  10. package/lib/entity/account/accountState.d.ts +2 -0
  11. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  12. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  13. package/lib/entity/customer/customerState.d.ts +0 -2
  14. package/lib/entity/customer/customerState.js +0 -5
  15. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  16. package/lib/entity/depositAccount/depositAccount.js +8 -1
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +35 -0
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -1
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +13 -0
  22. package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
  23. package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
  24. package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  27. package/lib/entity/task/taskPayload.d.ts +1 -0
  28. package/lib/entity/task/taskPayload.js +1 -0
  29. package/lib/entity/task/taskState.d.ts +1 -0
  30. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  31. package/lib/entity/tenant/tenantReducer.js +1 -0
  32. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  33. package/lib/entity/tenant/tenantSelector.js +9 -1
  34. package/lib/entity/tenant/tenantState.d.ts +1 -0
  35. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
  36. package/lib/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  37. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  38. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  39. package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
  40. package/lib/entity/userGroups/userGroupsPayload.js +10 -0
  41. package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
  42. package/lib/entity/userGroups/userGroupsReducer.js +29 -0
  43. package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
  44. package/lib/entity/userGroups/userGroupsSelector.js +12 -0
  45. package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
  46. package/lib/entity/userGroups/userGroupsState.js +2 -0
  47. package/lib/epic.d.ts +13 -1
  48. package/lib/epic.js +13 -1
  49. package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +5 -0
  50. package/lib/esm/commonStateTypes/currencyHelper.js +5 -0
  51. package/lib/esm/commonStateTypes/reduceFetchState.js +25 -0
  52. package/lib/esm/entity/account/accountPayload.js +2 -0
  53. package/lib/esm/entity/customer/customerState.js +1 -4
  54. package/lib/esm/entity/depositAccount/depositAccount.js +8 -1
  55. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  56. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  57. package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
  58. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  59. package/lib/esm/entity/task/taskPayload.js +1 -0
  60. package/lib/esm/entity/tenant/tenantReducer.js +1 -0
  61. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  62. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  63. package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
  64. package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
  65. package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
  66. package/lib/esm/entity/userGroups/userGroupsState.js +1 -0
  67. package/lib/esm/epic.js +13 -1
  68. package/lib/esm/index.js +25 -16
  69. package/lib/esm/reducer.js +6 -0
  70. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  71. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  72. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  73. package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
  74. package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
  75. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  76. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  77. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  78. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +10 -0
  79. package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
  80. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +29 -0
  81. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
  82. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
  83. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
  84. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
  85. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +33 -0
  86. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +56 -0
  87. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +77 -0
  88. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  89. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +79 -0
  90. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
  91. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  92. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  93. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +189 -1
  94. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +17 -1
  95. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +433 -2
  96. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +23 -1
  97. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
  98. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +245 -2
  99. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  100. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +17 -1
  101. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +44 -0
  102. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  103. package/lib/esm/view/financeStatement/financeStatementReducer.js +11 -8
  104. package/lib/esm/view/financeStatement/financeStatementSelector.js +24 -9
  105. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +322 -0
  106. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +9 -0
  107. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
  108. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  109. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  110. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +201 -0
  111. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +9 -7
  112. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  113. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  114. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  115. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  116. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  117. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  118. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  119. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  120. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  121. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  122. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  123. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  124. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  125. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
  126. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  127. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  128. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +65 -0
  129. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
  130. package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
  131. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
  132. package/lib/esm/zeniAPI.js +0 -2
  133. package/lib/index.d.ts +31 -21
  134. package/lib/index.js +102 -34
  135. package/lib/reducer.d.ts +6 -0
  136. package/lib/reducer.js +6 -0
  137. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  138. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  139. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  140. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  141. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  142. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  143. package/lib/view/aiCfoView/aiCfoViewState.d.ts +18 -1
  144. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  145. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  146. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
  147. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
  148. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  149. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  150. package/lib/view/classList/fetchClassListEpic.js +8 -1
  151. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  152. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  153. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  154. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  155. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +10 -0
  156. package/lib/view/expenseAutomationView/bulkUploadTiming.js +13 -0
  157. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
  158. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
  159. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +33 -0
  160. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
  161. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
  162. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
  163. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
  164. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
  165. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
  166. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
  167. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
  168. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
  169. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +37 -0
  170. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
  171. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +61 -0
  172. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
  173. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +81 -0
  174. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  175. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +25 -0
  176. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +85 -0
  177. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
  178. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
  179. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  180. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  181. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  182. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
  183. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +201 -0
  184. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  185. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +18 -2
  186. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +76 -3
  187. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +434 -2
  188. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
  189. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +24 -2
  190. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  191. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
  192. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
  193. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
  194. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  195. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +244 -1
  196. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  197. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +5 -0
  198. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +19 -0
  199. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +142 -0
  200. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +54 -1
  201. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
  202. package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  203. package/lib/view/financeStatement/financeStatementReducer.js +11 -8
  204. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  205. package/lib/view/financeStatement/financeStatementSelector.js +24 -9
  206. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +13 -0
  207. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +326 -0
  208. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +111 -0
  209. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +13 -0
  210. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +4 -2
  211. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +7 -2
  212. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  213. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +4 -0
  214. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  215. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +6 -0
  216. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +204 -0
  217. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +8 -6
  218. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  219. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  220. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  221. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  222. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  223. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  224. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  225. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  226. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  227. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  228. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  229. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  230. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  231. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  232. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  233. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  234. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  235. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +1 -0
  236. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  237. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -0
  238. package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
  239. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  240. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  241. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
  242. package/lib/view/userGroupListView/userGroupListViewReducer.js +69 -0
  243. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
  244. package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
  245. package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
  246. package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
  247. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
  248. package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
  249. package/lib/view/userListView/userListViewPayload.d.ts +2 -0
  250. package/lib/zeniAPI.js +0 -2
  251. package/package.json +2 -2
@@ -12,7 +12,149 @@ export interface MissingReceiptsViewUIState {
12
12
  sortKey: MissingReceiptsSortKey;
13
13
  sortOrder: SortOrder;
14
14
  }
15
+ /**
16
+ * Minimum trimmed query length before manual-match search calls the expense-automation API.
17
+ * Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
18
+ */
19
+ export declare const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
20
+ export declare const toBatchStatusValue: (v: string) => "pending" | "processing" | "completed";
21
+ export type BatchStatusValue = ReturnType<typeof toBatchStatusValue>;
22
+ /** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
23
+ export declare const BATCH_FILE_STATUSES: readonly ["exact_match", "possible_matches", "no_match", "failed"];
24
+ export declare const toBatchFileStatus: (v: string) => "failed" | "exact_match" | "possible_matches" | "no_match";
25
+ export type BatchFileStatus = ReturnType<typeof toBatchFileStatus>;
26
+ /** True for files that belong in the Unmatched tab (possible matches or no match). */
27
+ export declare function isUnmatchedTabFileStatus(status: BatchFileStatus): boolean;
28
+ export declare const toBulkUploadPhase: (v: string) => "completed" | "idle" | "uploading" | "matching";
29
+ export type BulkUploadPhase = ReturnType<typeof toBulkUploadPhase>;
30
+ export declare const toBulkUploadResultsTab: (v: string) => "completed" | "unmatched";
31
+ export type BulkUploadResultsTab = ReturnType<typeof toBulkUploadResultsTab>;
32
+ export declare const toMissingReceiptsTab: (v: string) => "completed" | "unmatched" | "missing";
33
+ export type MissingReceiptsTab = ReturnType<typeof toMissingReceiptsTab>;
34
+ export declare const toCompletedSubTab: (v: string) => "all" | "manual" | "ai_accountant";
35
+ export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
36
+ export declare const toMatchSource: (v: string) => "manual" | "ai";
37
+ export type MatchSource = ReturnType<typeof toMatchSource>;
38
+ export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
39
+ export type BulkUploadSortKey = ReturnType<typeof toBulkUploadSortKey>;
40
+ export interface CandidateRef {
41
+ matchScore: number;
42
+ transactionId: ID;
43
+ }
44
+ export interface MatchCandidate {
45
+ amount: number;
46
+ currencyCode: string;
47
+ matchScore: number;
48
+ transactionDate: string;
49
+ transactionId: ID;
50
+ transactionType: string;
51
+ vendorName: string;
52
+ vendorLogo?: string;
53
+ }
54
+ export interface BatchFile {
55
+ attachmentId: ID;
56
+ fileDownloadUrl: string | null;
57
+ fileId: ID;
58
+ filename: string;
59
+ filePreviewUrl: string | null;
60
+ status: BatchFileStatus;
61
+ candidates?: CandidateRef[];
62
+ matchedTransactionId?: ID;
63
+ matchSource?: MatchSource;
64
+ }
65
+ export interface BatchSummary {
66
+ failed: number;
67
+ matched: number;
68
+ noMatch: number;
69
+ possibleMatches: number;
70
+ total: number;
71
+ }
72
+ export interface BatchStatus {
73
+ batchId: ID;
74
+ progress: {
75
+ processed: number;
76
+ total: number;
77
+ };
78
+ status: BatchStatusValue;
79
+ }
80
+ export interface BatchDetails {
81
+ batchId: ID;
82
+ createdAt: string;
83
+ files: BatchFile[];
84
+ status: BatchStatusValue;
85
+ summary: BatchSummary;
86
+ }
87
+ export interface BatchListItem {
88
+ batchId: ID;
89
+ createdAt: string;
90
+ failedCount: number;
91
+ matchedCount: number;
92
+ noMatchCount: number;
93
+ possibleMatchesCount: number;
94
+ status: string;
95
+ totalFiles: number;
96
+ }
97
+ export interface ManualSearchResult {
98
+ amount: number;
99
+ currencyCode: string;
100
+ entityId: string;
101
+ memo: string;
102
+ transactionDate: string;
103
+ transactionId: ID;
104
+ transactionType: string;
105
+ vendorName: string;
106
+ /** Present when API/merged transaction state supplies a logo URL. */
107
+ vendorLogo?: string;
108
+ }
109
+ export interface ManualSearchState {
110
+ fetchState: FetchStateAndError;
111
+ /** True while appending the next page (initial search uses fetchState only). */
112
+ isLoadingMore: boolean;
113
+ nextPageToken: string | null;
114
+ pageSize: number;
115
+ results: ManualSearchResult[];
116
+ searchQuery: string;
117
+ totalCount: number;
118
+ }
119
+ /** Same union as {@link CompletedSubTab} — used for completed-transactions API `match_type`. */
120
+ export type CompletedTransactionsMatchType = CompletedSubTab;
121
+ export interface CompletedTransactionsState {
122
+ fetchState: FetchStateAndError;
123
+ nextPageToken: string | null;
124
+ totalCount: number;
125
+ transactionIds: ID[];
126
+ }
127
+ export interface BulkUploadState {
128
+ batchDetailsById: Record<ID, BatchDetails>;
129
+ batchDetailsPaginationState: FetchStateAndError;
130
+ batchListByPeriod: Record<MonthYearPeriodId, BatchListItem[]>;
131
+ batchListFetchState: FetchStateAndError;
132
+ batchStatusById: Record<ID, BatchStatus>;
133
+ completedSubTab: CompletedSubTab;
134
+ completedTransactionsByPeriod: Record<string, CompletedTransactionsState>;
135
+ confirmMatchStatus: FetchStateAndError;
136
+ currentResultsTab: BulkUploadResultsTab;
137
+ failedBatchDetailIds: ID[];
138
+ /**
139
+ * Incremented when manual search Redux state is cleared so Unmatched `ManualSearchInput`
140
+ * instances remount and drop local query text.
141
+ */
142
+ manualSearch: ManualSearchState;
143
+ manualSearchUiResetKey: number;
144
+ phase: BulkUploadPhase;
145
+ sortKey: BulkUploadSortKey;
146
+ sortOrder: SortOrder;
147
+ uploadProgress: number;
148
+ uploadStatus: FetchStateAndError;
149
+ currentBatchId?: ID;
150
+ }
15
151
  export interface MissingReceiptsViewState extends FetchedState {
152
+ bulkUpload: BulkUploadState;
153
+ /**
154
+ * When set, the app shell should switch the Missing Receipts sub-tab (e.g. to Unmatched)
155
+ * once, then clear via `clearMissingReceiptsTabNavigation`.
156
+ */
157
+ pendingMissingReceiptsTabNavigation: BulkUploadResultsTab | null;
16
158
  refreshStatus: FetchStateAndError;
17
159
  transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
18
160
  uiState: MissingReceiptsViewUIState;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toMissingReceiptsSortKey = void 0;
3
+ exports.toBulkUploadSortKey = exports.toMatchSource = exports.toCompletedSubTab = exports.toMissingReceiptsTab = exports.toBulkUploadResultsTab = exports.toBulkUploadPhase = exports.toBatchFileStatus = exports.BATCH_FILE_STATUSES = exports.toBatchStatusValue = exports.MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = exports.toMissingReceiptsSortKey = void 0;
4
+ exports.isUnmatchedTabFileStatus = isUnmatchedTabFileStatus;
4
5
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
6
  const MISSING_RECEIPTS_SORT_KEYS = [
6
7
  'vendor',
@@ -11,3 +12,55 @@ const MISSING_RECEIPTS_SORT_KEYS = [
11
12
  ];
12
13
  const toMissingReceiptsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, MISSING_RECEIPTS_SORT_KEYS);
13
14
  exports.toMissingReceiptsSortKey = toMissingReceiptsSortKey;
15
+ // -- Bulk Receipt Upload Types --
16
+ /**
17
+ * Minimum trimmed query length before manual-match search calls the expense-automation API.
18
+ * Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
19
+ */
20
+ exports.MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
21
+ const BATCH_STATUS_VALUES = ['pending', 'processing', 'completed'];
22
+ const toBatchStatusValue = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BATCH_STATUS_VALUES);
23
+ exports.toBatchStatusValue = toBatchStatusValue;
24
+ /** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
25
+ exports.BATCH_FILE_STATUSES = [
26
+ 'exact_match',
27
+ 'possible_matches',
28
+ 'no_match',
29
+ 'failed',
30
+ ];
31
+ const toBatchFileStatus = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase().replace(/-/g, '_'), exports.BATCH_FILE_STATUSES);
32
+ exports.toBatchFileStatus = toBatchFileStatus;
33
+ const UNMATCHED_TAB_FILE_STATUSES = ['possible_matches', 'no_match'];
34
+ /** True for files that belong in the Unmatched tab (possible matches or no match). */
35
+ function isUnmatchedTabFileStatus(status) {
36
+ return UNMATCHED_TAB_FILE_STATUSES.includes(status);
37
+ }
38
+ const BULK_UPLOAD_PHASES = [
39
+ 'idle',
40
+ 'uploading',
41
+ 'matching',
42
+ 'completed',
43
+ ];
44
+ const toBulkUploadPhase = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_PHASES);
45
+ exports.toBulkUploadPhase = toBulkUploadPhase;
46
+ const BULK_UPLOAD_RESULTS_TABS = ['completed', 'unmatched'];
47
+ const toBulkUploadResultsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_RESULTS_TABS);
48
+ exports.toBulkUploadResultsTab = toBulkUploadResultsTab;
49
+ const MISSING_RECEIPTS_TABS = ['missing', 'completed', 'unmatched'];
50
+ const toMissingReceiptsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MISSING_RECEIPTS_TABS);
51
+ exports.toMissingReceiptsTab = toMissingReceiptsTab;
52
+ const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
53
+ const toCompletedSubTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
54
+ exports.toCompletedSubTab = toCompletedSubTab;
55
+ const MATCH_SOURCES = ['ai', 'manual'];
56
+ const toMatchSource = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MATCH_SOURCES);
57
+ exports.toMatchSource = toMatchSource;
58
+ const BULK_UPLOAD_SORT_KEYS = [
59
+ 'amount',
60
+ 'category',
61
+ 'class',
62
+ 'date',
63
+ 'vendor',
64
+ ];
65
+ const toBulkUploadSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_SORT_KEYS);
66
+ exports.toBulkUploadSortKey = toBulkUploadSortKey;
@@ -15,7 +15,7 @@ import { VendorBase } from '../../../entity/vendor/vendorState';
15
15
  import { ZeniDate } from '../../../zeniDayJS';
16
16
  import { EntityRecommendationKey } from '../../recommendation/recommendationState';
17
17
  import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
18
- export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class" | "memo" | "transaction_type";
18
+ export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class" | "payment_account" | "transaction_type" | "memo_and_receipt";
19
19
  export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
20
20
  export declare const TRANSACTIONS_TABS: readonly ["review", "autoCategorized"];
21
21
  export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
@@ -97,6 +97,7 @@ export interface TransactionsTabViewState extends FetchedState {
97
97
  transactionIdsWithUnsavedData: ID[];
98
98
  transactionReviewLocalDataById: Record<ID | TransactionDetailKey, SupportedTransactionCategorization>;
99
99
  uiState: TransactionsViewUIState;
100
+ uploadReceiptStatusById: Record<ID, FetchStateAndError>;
100
101
  selectedTransactionId?: ID;
101
102
  selectedTransactionLineId?: ID;
102
103
  }
@@ -7,10 +7,11 @@ const TRANSACTIONS_SORT_KEYS = [
7
7
  'vendor',
8
8
  'amount',
9
9
  'transaction_type',
10
+ 'payment_account',
10
11
  'date',
11
12
  'category',
12
13
  'class',
13
- 'memo',
14
+ 'memo_and_receipt',
14
15
  ];
15
16
  const toTransactionsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_SORT_KEYS);
16
17
  exports.toTransactionsSortKey = toTransactionsSortKey;
@@ -48,19 +48,20 @@ const financeStatement = (0, toolkit_1.createSlice)({
48
48
  updateFinanceStatementThisPeriod(draft, action) {
49
49
  const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
50
50
  const { timeframe, selectedCOABalancesRange } = draft;
51
- if (coaBalances.length > 0) {
52
- const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
51
+ const safeCoaBalances = coaBalances != null ? coaBalances : [];
52
+ if (safeCoaBalances.length > 0) {
53
+ const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
53
54
  if (prevThisPeriod != null) {
54
55
  const selectedCoaBalancesRangeWithThisPeriod = {
55
56
  ...selectedCOABalancesRange,
56
57
  thisPeriod: prevThisPeriod,
57
58
  };
58
- const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
59
+ const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, safeCoaBalances);
59
60
  if (newThisPeriod != null) {
60
61
  const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
61
62
  firstMonthOfFY,
62
63
  thisPeriod: newThisPeriod,
63
- coaBalances,
64
+ coaBalances: safeCoaBalances,
64
65
  timeframe,
65
66
  maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
66
67
  currentSelection: {
@@ -79,7 +80,9 @@ const financeStatement = (0, toolkit_1.createSlice)({
79
80
  draft.selectedReportId = action.payload;
80
81
  },
81
82
  updateFinanceStatementAdditionalBalancesSelection(draft, action) {
82
- const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
83
+ const { firstMonthOfFY, additionalBalances: additionalBalancesPayload, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
84
+ const safeCoaBalances = coaBalances != null ? coaBalances : [];
85
+ const additionalBalances = additionalBalancesPayload ?? [];
83
86
  let tempAdditionalBalances = [...additionalBalances];
84
87
  if (additionalBalances.includes('this_period_vs_last_period') ||
85
88
  additionalBalances.includes('this_period_vs_last_period_percent')) {
@@ -95,8 +98,8 @@ const financeStatement = (0, toolkit_1.createSlice)({
95
98
  draft.isAdditionalBalancesShown =
96
99
  additionalBalances.length != 0 ? true : false;
97
100
  const { timeframe, selectedCOABalancesRange } = draft;
98
- if (coaBalances.length > 0) {
99
- const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
101
+ if (safeCoaBalances.length > 0) {
102
+ const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
100
103
  if (thisPeriod != null) {
101
104
  const selectedCoaBalancesRangeWithThisPeriod = {
102
105
  ...selectedCOABalancesRange,
@@ -105,7 +108,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
105
108
  const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
106
109
  firstMonthOfFY,
107
110
  thisPeriod: thisPeriod,
108
- coaBalances,
111
+ coaBalances: safeCoaBalances,
109
112
  timeframe,
110
113
  maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
111
114
  currentSelection: {
@@ -8,6 +8,7 @@ import { RootState } from '../../reducer';
8
8
  import { BalanceSheetReport } from '../balanceSheet/balanceSheetSelectorTypes';
9
9
  import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
10
10
  import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
11
+ import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
11
12
  import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
12
13
  export interface FinanceStatementReport extends SelectorReport {
13
14
  allTimeframeTicks: TimeframeTickWithMetaData[];
@@ -18,6 +19,7 @@ export interface FinanceStatementReport extends SelectorReport {
18
19
  downloadState: FetchState;
19
20
  filter: COABalancesFilter;
20
21
  isCompareModeOn: boolean;
22
+ profitAndLossByClassHorizontalReport: ProfitAndLossByClassHorizontalReport;
21
23
  profitAndLossByClassReport: ProfitAndLossClassesViewReport;
22
24
  profitAndLossReport: ProfitAndLossReport;
23
25
  reportFormat: ReportFormat;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFinanceStatement = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
+ const coaBalanceType_1 = require("../../commonStateTypes/coaBalance/coaBalanceType");
5
6
  const coaBalancesFilter_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilter");
6
7
  const coaBalancesFilterClassesView_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilterClassesView");
7
8
  const dataAvailable_1 = require("../../commonStateTypes/dataAvailable");
@@ -11,6 +12,7 @@ const thisPeriodHelpers_1 = require("../../commonStateTypes/viewAndReport/thisPe
11
12
  const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
12
13
  const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
13
14
  const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
15
+ const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
14
16
  const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
15
17
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
16
18
  const datesSorted = [
@@ -45,11 +47,11 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
45
47
  if (dataAvailable != null) {
46
48
  const noFilter = (0, coaBalancesFilter_1.newBalancesFilterForDateRange)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
47
49
  const profitAndLossForTimeframeTicks = (0, profitAndLossSelector_1.getProfitAndLossReport)(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
48
- if (profitAndLossForTimeframeTicks.sections.expenses != null) {
49
- balancesInTimeframe =
50
- profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
51
- ? profitAndLossForTimeframeTicks.sections['expenses'].balances
52
- : profitAndLossForTimeframeTicks.sections['income'].balances;
50
+ const expensesBalances = profitAndLossForTimeframeTicks.sections.expenses?.balances ?? [];
51
+ const incomeBalances = profitAndLossForTimeframeTicks.sections.income?.balances ?? [];
52
+ balancesInTimeframe =
53
+ expensesBalances.length > 0 ? expensesBalances : incomeBalances;
54
+ if (balancesInTimeframe.length > 0) {
53
55
  allTimeframeTicks = balancesInTimeframe.map((balance) => (0, timeframeTick_1.toTimeframeTick)(balance));
54
56
  }
55
57
  }
@@ -57,12 +59,22 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
57
59
  if (thisPeriod == null && balancesInTimeframe.length > 0) {
58
60
  thisPeriod = (0, timeframeTick_1.toTimeframeTick)(balancesInTimeframe[balancesInTimeframe.length - 1]);
59
61
  }
60
- const filter = (0, coaBalancesFilter_1.newBalancesFilter)(firstMonthOfFY, financeStatementState.timeframe, Math.min((0, dataAvailable_1.getNumberOfPeriods)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', financeStatementState.isAdditionalBalancesShown === true
62
+ const rawAdditionalBalances = financeStatementState.isAdditionalBalancesShown === true
61
63
  ? financeStatementState.selectedAdditionalBalances
62
- : []);
64
+ : [];
65
+ const useHorizontalClassesLayout = profitAndLossClassesViewState.uiState.classViewLayout ===
66
+ 'horizontal' &&
67
+ financeStatementState.selectedReportId === 'profit_and_loss_by_classes';
68
+ const additionalBalancesForFilter = useHorizontalClassesLayout
69
+ ? (0, coaBalanceType_1.stripCompareAdditionalBalanceTypes)(rawAdditionalBalances)
70
+ : rawAdditionalBalances;
71
+ const filter = (0, coaBalancesFilter_1.newBalancesFilter)(firstMonthOfFY, financeStatementState.timeframe, Math.min((0, dataAvailable_1.getNumberOfPeriods)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', additionalBalancesForFilter);
63
72
  const profitAndLossReport = (0, profitAndLossSelector_1.getProfitAndLossReport)(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
64
73
  const classFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
65
74
  const profitAndLossByClassReport = (0, profitAndLossClassesViewSelector_1.getProfitAndLossClassesView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
75
+ const profitAndLossByClassHorizontalReport = (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
76
+ ? thisPeriod
77
+ : undefined);
66
78
  const balanceSheetReport = (0, balanceSheetSelector_1.getBalanceSheet)(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
67
79
  const cashFlowReport = (0, cashFlowSelector_1.getCashFlow)(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
68
80
  const allReports = [
@@ -110,12 +122,15 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
110
122
  dataAvailable,
111
123
  profitAndLossReport,
112
124
  profitAndLossByClassReport,
125
+ profitAndLossByClassHorizontalReport,
113
126
  balanceSheetReport,
114
127
  cashFlowReport,
115
128
  filter,
116
129
  selectedReportId: financeStatementState.selectedReportId,
117
130
  downloadState: financeStatementState.downloadState,
118
- isCompareModeOn: financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
119
- financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
131
+ isCompareModeOn: useHorizontalClassesLayout
132
+ ? false
133
+ : financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
134
+ financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
120
135
  };
121
136
  });
@@ -0,0 +1,13 @@
1
+ import { COABalancesFilterClassesView } from '../../commonStateTypes/coaBalance/coaBalancesFilterClassesView';
2
+ import { AccountState } from '../../entity/account/accountState';
3
+ import { ClassState } from '../../entity/class/classState';
4
+ import { SectionClassesViewStateV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewState';
5
+ import { ZeniDate } from '../../zeniDayJS';
6
+ import { ProfitAndLossByClassHorizontalReport } from './profitAndLossClassesByClassHorizontalSelectorTypes';
7
+ import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID } from './profitAndLossClassesViewSelectorTypes';
8
+ import { ProfitAndLossClassesViewState } from './profitAndLossClassesViewState';
9
+ export declare const profitAndLossHorizontalIdsInOrder: (PandLReportViewSectionID | PandLReportViewCalculatedSectionID)[];
10
+ export declare const getProfitAndLossClassesHorizontalView: (filter: COABalancesFilterClassesView, accountState: AccountState, classState: ClassState, sectionsState: SectionClassesViewStateV2, profitAndLossClassesViewState: ProfitAndLossClassesViewState, selectedPeriod: {
11
+ endDate: ZeniDate;
12
+ startDate: ZeniDate;
13
+ } | undefined) => ProfitAndLossByClassHorizontalReport;