@zeniai/client-epic-state 4.19.99-betaVR3 → 4.19.100

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 (262) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +0 -2
  3. package/lib/commonStateTypes/coaBalance/coaBalanceType.js +0 -6
  4. package/lib/commonStateTypes/currencyHelper.d.ts +0 -3
  5. package/lib/commonStateTypes/currencyHelper.js +1 -6
  6. package/lib/commonStateTypes/reduceFetchState.d.ts +0 -9
  7. package/lib/commonStateTypes/reduceFetchState.js +0 -26
  8. package/lib/entity/account/accountPayload.d.ts +0 -2
  9. package/lib/entity/account/accountPayload.js +0 -2
  10. package/lib/entity/account/accountState.d.ts +0 -2
  11. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  12. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  13. package/lib/entity/customer/customerState.d.ts +2 -0
  14. package/lib/entity/customer/customerState.js +5 -0
  15. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  16. package/lib/entity/depositAccount/depositAccount.js +1 -8
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
  22. package/lib/entity/reimbursement/reimbursementPayload.d.ts +0 -2
  23. package/lib/entity/reimbursement/reimbursementPayload.js +0 -7
  24. package/lib/entity/reimbursement/reimbursementState.d.ts +0 -2
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  27. package/lib/entity/task/taskPayload.d.ts +0 -1
  28. package/lib/entity/task/taskPayload.js +0 -1
  29. package/lib/entity/task/taskState.d.ts +0 -1
  30. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  31. package/lib/entity/tenant/tenantReducer.js +0 -1
  32. package/lib/entity/tenant/tenantSelector.d.ts +0 -1
  33. package/lib/entity/tenant/tenantSelector.js +1 -9
  34. package/lib/entity/tenant/tenantState.d.ts +0 -1
  35. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
  36. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  37. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  38. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  39. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  40. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
  41. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  42. package/lib/epic.d.ts +1 -13
  43. package/lib/epic.js +1 -13
  44. package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +0 -5
  45. package/lib/esm/commonStateTypes/currencyHelper.js +0 -5
  46. package/lib/esm/commonStateTypes/reduceFetchState.js +0 -25
  47. package/lib/esm/entity/account/accountPayload.js +0 -2
  48. package/lib/esm/entity/customer/customerState.js +4 -1
  49. package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
  50. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  51. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  52. package/lib/esm/entity/reimbursement/reimbursementPayload.js +0 -7
  53. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  54. package/lib/esm/entity/task/taskPayload.js +0 -1
  55. package/lib/esm/entity/tenant/tenantReducer.js +0 -1
  56. package/lib/esm/entity/tenant/tenantSelector.js +0 -7
  57. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  58. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  59. package/lib/esm/epic.js +1 -13
  60. package/lib/esm/index.js +16 -25
  61. package/lib/esm/reducer.js +0 -6
  62. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  63. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  64. package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
  65. package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
  66. package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
  67. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  68. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  69. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  70. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  71. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  72. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  73. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -189
  74. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  75. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
  76. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
  77. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  78. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  79. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +5 -256
  80. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  81. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +7 -14
  82. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
  83. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
  84. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  85. package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
  86. package/lib/esm/view/financeStatement/financeStatementSelector.js +9 -24
  87. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
  88. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  89. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  90. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +7 -9
  91. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  92. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  93. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  94. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  95. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  96. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  97. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  98. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  99. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  100. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  101. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  102. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  103. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  104. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -3
  105. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  106. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  107. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  108. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +0 -11
  109. package/lib/esm/zeniAPI.js +2 -0
  110. package/lib/index.d.ts +21 -31
  111. package/lib/index.js +34 -102
  112. package/lib/reducer.d.ts +0 -6
  113. package/lib/reducer.js +0 -6
  114. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  115. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  116. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  117. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  118. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  119. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  120. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
  121. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
  122. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  123. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  124. package/lib/view/classList/fetchClassListEpic.js +1 -8
  125. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  126. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  127. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  128. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  129. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  130. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  131. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  132. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  133. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  134. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -118
  135. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
  136. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  137. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  138. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
  139. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
  140. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
  141. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
  142. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  143. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
  144. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
  145. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  146. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  147. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  148. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -255
  149. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  150. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -13
  151. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  152. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
  153. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
  154. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
  155. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
  156. package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  157. package/lib/view/financeStatement/financeStatementReducer.js +8 -11
  158. package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
  159. package/lib/view/financeStatement/financeStatementSelector.js +9 -24
  160. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
  161. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -7
  162. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  163. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -4
  164. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  165. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +6 -8
  166. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  167. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  168. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  169. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  170. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  171. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  172. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  173. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  174. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  175. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  176. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  177. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  178. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  179. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  180. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  181. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  182. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  183. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +0 -1
  184. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  185. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +0 -2
  186. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -3
  187. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  188. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  189. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  190. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  191. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +1 -3
  192. package/lib/view/userListView/fetchUserListByTypeEpic.js +0 -11
  193. package/lib/view/userListView/userListViewPayload.d.ts +0 -2
  194. package/lib/zeniAPI.js +2 -0
  195. package/package.json +2 -2
  196. package/lib/entity/userGroups/userGroupsPayload.d.ts +0 -7
  197. package/lib/entity/userGroups/userGroupsPayload.js +0 -10
  198. package/lib/entity/userGroups/userGroupsReducer.d.ts +0 -8
  199. package/lib/entity/userGroups/userGroupsReducer.js +0 -29
  200. package/lib/entity/userGroups/userGroupsSelector.d.ts +0 -4
  201. package/lib/entity/userGroups/userGroupsSelector.js +0 -12
  202. package/lib/entity/userGroups/userGroupsState.d.ts +0 -9
  203. package/lib/entity/userGroups/userGroupsState.js +0 -2
  204. package/lib/esm/entity/userGroups/userGroupsPayload.js +0 -7
  205. package/lib/esm/entity/userGroups/userGroupsReducer.js +0 -25
  206. package/lib/esm/entity/userGroups/userGroupsSelector.js +0 -8
  207. package/lib/esm/entity/userGroups/userGroupsState.js +0 -1
  208. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  209. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
  210. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
  211. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
  212. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
  213. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
  214. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
  215. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
  216. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
  217. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
  218. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -80
  219. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
  220. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -317
  221. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -9
  222. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -282
  223. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +0 -65
  224. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +0 -16
  225. package/lib/esm/view/userGroupListView/userGroupListViewState.js +0 -1
  226. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  227. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  228. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
  229. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
  230. package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
  231. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
  232. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
  233. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
  234. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
  235. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
  236. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
  237. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
  238. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
  239. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
  240. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
  241. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
  242. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
  243. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
  244. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
  245. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
  246. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
  247. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
  248. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -86
  249. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
  250. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
  251. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
  252. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -321
  253. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -111
  254. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -13
  255. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +0 -6
  256. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -285
  257. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +0 -23
  258. package/lib/view/userGroupListView/userGroupListViewReducer.js +0 -69
  259. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +0 -7
  260. package/lib/view/userGroupListView/userGroupListViewSelector.js +0 -20
  261. package/lib/view/userGroupListView/userGroupListViewState.d.ts +0 -8
  262. package/lib/view/userGroupListView/userGroupListViewState.js +0 -2
@@ -1,282 +0,0 @@
1
- import { defaultCustomerCurrency } from '../../commonStateTypes/currencyHelper';
2
- import { HORIZONTAL_CLASS_TOTAL_BALANCE_ID, } from './profitAndLossClassesByClassHorizontalSelectorTypes';
3
- /**
4
- * Populates `sectionHeaderBalancesSlice`, and per-account `accountReportData`, so the
5
- * web layer only maps selector output to tree nodes.
6
- */
7
- export function enrichProfitAndLossByClassHorizontalReport(report) {
8
- if (report.fetchState !== 'Completed' || report.selectedPeriod == null) {
9
- return;
10
- }
11
- for (const section of Object.values(report.sections)) {
12
- if (section != null) {
13
- enrichHorizontalSection(report, section);
14
- }
15
- }
16
- for (const calc of Object.values(report.calculatedSections)) {
17
- if (calc != null) {
18
- enrichHorizontalCalculatedSection(report, calc);
19
- }
20
- }
21
- }
22
- function enrichHorizontalSection(report, section) {
23
- const classAmounts = report.classColumns.map((col) => {
24
- const total = section.classTotals.find((ct) => ct.classId === col.classId);
25
- return total?.balance.amount ?? 0;
26
- });
27
- section.sectionHeaderBalancesSlice = buildHorizontalClassColumnBalancesSlice(report, classAmounts, section.sectionTotal.amount);
28
- const parentIndices = computeHorizontalAccountParentIndices(section.accounts);
29
- const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(parentIndices);
30
- const childrenRecord = {};
31
- childrenRowIndicesByParent.forEach((childIndices, parentIndex) => {
32
- childrenRecord[parentIndex] = childIndices;
33
- });
34
- section.treeLayout = {
35
- rootAccountRowIndices: section.accounts
36
- .map((_, i) => (parentIndices[i] === -1 ? i : -1))
37
- .filter((i) => i >= 0),
38
- childrenRowIndicesByParent: childrenRecord,
39
- };
40
- const siblingsPerRow = buildSiblingIndicesPerRow(section.accounts, parentIndices);
41
- const hasChildFlags = computeHorizontalHasChildFlags(parentIndices);
42
- for (let i = 0; i < section.accounts.length; i++) {
43
- const row = section.accounts[i];
44
- // Same column order as `report.classColumns` (see `pivotSectionToHorizontal`).
45
- const classRowAmounts = row.classBalances.map((b) => b.balance.amount);
46
- row.accountReportData = {
47
- accountId: row.accountId,
48
- accountName: row.accountName,
49
- accountType: row.accountType,
50
- depth: row.depth,
51
- balancesInTimeframe: buildHorizontalClassColumnBalancesSlice(report, classRowAmounts, row.rowTotal.amount),
52
- horizontalTreeView: buildHorizontalTreeViewFromPrecomputed(section.accounts, i, parentIndices, siblingsPerRow, hasChildFlags),
53
- };
54
- }
55
- }
56
- function enrichHorizontalCalculatedSection(report, calcSection) {
57
- const classAmounts = report.classColumns.map((col) => {
58
- const total = calcSection.classTotals.find((ct) => ct.classId === col.classId);
59
- return total?.balance.amount ?? 0;
60
- });
61
- calcSection.sectionHeaderBalancesSlice =
62
- buildHorizontalClassColumnBalancesSlice(report, classAmounts, calcSection.sectionTotal.amount);
63
- }
64
- function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmount) {
65
- const fallback = defaultCustomerCurrency;
66
- const firstHeader = report.headerBalances[0];
67
- const currencyCode = firstHeader?.balance.currencyCode ?? fallback.currencyCode;
68
- const currencySymbol = firstHeader?.balance.currencySymbol ?? fallback.currencySymbol;
69
- const timeframe = firstHeader?.balanceTimeFrame ?? 'month';
70
- const emptySlice = {
71
- balances: [],
72
- additionalBalances: [],
73
- filter: {
74
- firstMonthOfFY: report.firstMonthOfFY,
75
- timeframe,
76
- balancesRange: { numberOfPeriods: 0, orderBy: 'ascending_date' },
77
- additionalBalances: [],
78
- },
79
- };
80
- if (report.selectedPeriod == null) {
81
- return emptySlice;
82
- }
83
- const { startDate, endDate } = report.selectedPeriod;
84
- const balances = report.classColumns.map((col, i) => ({
85
- balance: {
86
- amount: classAmounts[i] ?? 0,
87
- currencyCode,
88
- currencySymbol,
89
- },
90
- balanceTimeFrame: timeframe,
91
- startDate,
92
- endDate,
93
- type: 'default',
94
- id: col.classId,
95
- label: col.className,
96
- }));
97
- balances.push({
98
- balance: {
99
- amount: totalAmount,
100
- currencyCode,
101
- currencySymbol,
102
- },
103
- balanceTimeFrame: timeframe,
104
- startDate,
105
- endDate,
106
- type: 'default',
107
- id: HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
108
- label: 'Total',
109
- });
110
- return {
111
- balances,
112
- additionalBalances: [],
113
- filter: {
114
- firstMonthOfFY: report.firstMonthOfFY,
115
- timeframe,
116
- balancesRange: {
117
- numberOfPeriods: balances.length,
118
- orderBy: 'ascending_date',
119
- },
120
- additionalBalances: [],
121
- },
122
- };
123
- }
124
- /**
125
- * Parent index per DFS row — O(n). Matches the scan in the former
126
- * `findHorizontalAccountParentIndex` (depth &lt;= 2 rows have no parent).
127
- */
128
- function computeHorizontalAccountParentIndices(rows) {
129
- const accountRowCount = rows.length;
130
- const parentIndex = new Array(accountRowCount).fill(-1);
131
- const stack = [];
132
- for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
133
- const accountRow = rows[rowIndex];
134
- if (accountRow == null) {
135
- continue;
136
- }
137
- const d = accountRow.depth;
138
- while (stack.length > 0) {
139
- const topIdx = stack[stack.length - 1];
140
- if (topIdx == null) {
141
- break;
142
- }
143
- const topRow = rows[topIdx];
144
- if (topRow == null) {
145
- stack.pop();
146
- continue;
147
- }
148
- if (topRow.depth < d) {
149
- break;
150
- }
151
- stack.pop();
152
- }
153
- if (d <= 2) {
154
- parentIndex[rowIndex] = -1;
155
- }
156
- else if (stack.length === 0) {
157
- parentIndex[rowIndex] = -1;
158
- }
159
- else {
160
- const peek = stack[stack.length - 1];
161
- if (peek == null) {
162
- parentIndex[rowIndex] = -1;
163
- }
164
- else {
165
- const parentRow = rows[peek];
166
- parentIndex[rowIndex] =
167
- parentRow != null && parentRow.depth === d - 1 ? peek : -1;
168
- }
169
- }
170
- stack.push(rowIndex);
171
- }
172
- return parentIndex;
173
- }
174
- /** Sibling row indices (same parent + depth), in traversal order — O(n). */
175
- function buildSiblingIndicesPerRow(rows, parentIndices) {
176
- const accountRowCount = rows.length;
177
- const keyToIndices = new Map();
178
- for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
179
- const parentRowIndex = parentIndices[rowIndex];
180
- const accountRow = rows[rowIndex];
181
- if (parentRowIndex == null || accountRow == null) {
182
- continue;
183
- }
184
- const key = `${parentRowIndex}:${accountRow.depth}`;
185
- let g = keyToIndices.get(key);
186
- if (g == null) {
187
- g = [];
188
- keyToIndices.set(key, g);
189
- }
190
- g.push(rowIndex);
191
- }
192
- const siblingsPerRow = new Array(accountRowCount);
193
- for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
194
- const parentRowIndex = parentIndices[rowIndex];
195
- const accountRow = rows[rowIndex];
196
- if (parentRowIndex == null || accountRow == null) {
197
- siblingsPerRow[rowIndex] = [rowIndex];
198
- continue;
199
- }
200
- const key = `${parentRowIndex}:${accountRow.depth}`;
201
- const group = keyToIndices.get(key);
202
- siblingsPerRow[rowIndex] = group != null ? group : [rowIndex];
203
- }
204
- return siblingsPerRow;
205
- }
206
- function computeHorizontalHasChildFlags(parentIndices) {
207
- const rowCount = parentIndices.length;
208
- const flags = new Array(rowCount).fill(false);
209
- for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
210
- const parentRowIndex = parentIndices[rowIndex];
211
- if (parentRowIndex != null &&
212
- parentRowIndex >= 0 &&
213
- parentRowIndex < rowCount) {
214
- flags[parentRowIndex] = true;
215
- }
216
- }
217
- return flags;
218
- }
219
- function buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags) {
220
- const chain = [];
221
- let walkRowIndex = currentRowIndex;
222
- while (walkRowIndex >= 0) {
223
- chain.unshift(walkRowIndex);
224
- const parentRowIndex = parentIndices[walkRowIndex];
225
- if (parentRowIndex == null) {
226
- break;
227
- }
228
- walkRowIndex = parentRowIndex;
229
- }
230
- return chain.map((rowIndex) => {
231
- const accountRow = dfsOrderedAccountRows[rowIndex];
232
- const siblingIndices = siblingsPerRow[rowIndex];
233
- const hasChild = hasChildFlags[rowIndex];
234
- if (accountRow == null || siblingIndices == null) {
235
- return {
236
- depth: 0,
237
- hasSibling: false,
238
- hasChildren: hasChild === true,
239
- isLastNode: true,
240
- name: '',
241
- };
242
- }
243
- return {
244
- depth: accountRow.depth - 2,
245
- hasSibling: siblingIndices.length > 1,
246
- hasChildren: hasChild === true,
247
- isLastNode: rowIndex === siblingIndices[siblingIndices.length - 1],
248
- name: accountRow.accountName,
249
- };
250
- });
251
- }
252
- function buildHorizontalTreeViewFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags) {
253
- const siblingIndices = siblingsPerRow[currentRowIndex];
254
- const accountRow = dfsOrderedAccountRows[currentRowIndex];
255
- const hasChildrenFlag = hasChildFlags[currentRowIndex];
256
- const treeDepth = accountRow != null ? Math.max(0, accountRow.depth - 2) : 0;
257
- const hasChildren = hasChildrenFlag === true;
258
- const sibs = siblingIndices ?? [currentRowIndex];
259
- return {
260
- subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags),
261
- treeDepth,
262
- hasChildren,
263
- hasSiblings: sibs.length > 1,
264
- isLeaf: !hasChildren,
265
- isLastNode: currentRowIndex === sibs[sibs.length - 1],
266
- };
267
- }
268
- function buildHorizontalAccountChildIndicesByParent(parentIndices) {
269
- const childIndicesByParentRowIndex = new Map();
270
- for (let rowIndex = 0; rowIndex < parentIndices.length; rowIndex++) {
271
- const parentRowIndex = parentIndices[rowIndex];
272
- if (parentRowIndex != null && parentRowIndex >= 0) {
273
- let childRowIndices = childIndicesByParentRowIndex.get(parentRowIndex);
274
- if (childRowIndices == null) {
275
- childRowIndices = [];
276
- childIndicesByParentRowIndex.set(parentRowIndex, childRowIndices);
277
- }
278
- childRowIndices.push(rowIndex);
279
- }
280
- }
281
- return childIndicesByParentRowIndex;
282
- }
@@ -1,65 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- const initialUserGroupList = {
3
- ids: [],
4
- fetchState: 'Not-Started',
5
- error: undefined,
6
- hasValidState() {
7
- return this.fetchState == 'Completed';
8
- },
9
- };
10
- export const initialState = {
11
- userGroupListByType: {
12
- taskManagerCandidate: initialUserGroupList,
13
- },
14
- };
15
- const userGroupListView = createSlice({
16
- name: 'userGroupListView',
17
- initialState,
18
- reducers: {
19
- fetchUserGroupListByType: {
20
- reducer(draft, action) {
21
- const { userGroupType } = action.payload;
22
- draft.userGroupListByType[userGroupType].fetchState = 'In-Progress';
23
- draft.userGroupListByType[userGroupType].error = undefined;
24
- },
25
- prepare(userGroupType, cacheOverride = false) {
26
- return {
27
- payload: {
28
- userGroupType,
29
- cacheOverride,
30
- },
31
- };
32
- },
33
- },
34
- updateUserGroupIds(draft, action) {
35
- const { userGroupType, userGroupsPayload } = action.payload;
36
- draft.userGroupListByType[userGroupType].fetchState = 'Completed';
37
- draft.userGroupListByType[userGroupType].error = undefined;
38
- draft.userGroupListByType[userGroupType].ids = userGroupsPayload.map((userGroup) => userGroup.id);
39
- },
40
- addUserGroupId(draft, action) {
41
- const { userGroupType, id } = action.payload;
42
- const index = draft.userGroupListByType[userGroupType].ids.indexOf(id);
43
- if (index < 0) {
44
- draft.userGroupListByType[userGroupType].ids.push(id);
45
- }
46
- },
47
- removeUserGroupId(draft, action) {
48
- const { userGroupType, id } = action.payload;
49
- const index = draft.userGroupListByType[userGroupType].ids.indexOf(id);
50
- if (index > -1) {
51
- draft.userGroupListByType[userGroupType].ids.splice(index, 1);
52
- }
53
- },
54
- updateUserGroupListFetchFailure(draft, action) {
55
- const { userGroupType, status } = action.payload;
56
- draft.userGroupListByType[userGroupType].fetchState = 'Error';
57
- draft.userGroupListByType[userGroupType].error = status;
58
- },
59
- clearUserGroupListView(draft) {
60
- Object.assign(draft, initialState);
61
- },
62
- },
63
- });
64
- export const { fetchUserGroupListByType, updateUserGroupIds, addUserGroupId, removeUserGroupId, updateUserGroupListFetchFailure, clearUserGroupListView, } = userGroupListView.actions;
65
- export default userGroupListView.reducer;
@@ -1,16 +0,0 @@
1
- import { getUserGroupByUserGroupId } from '../../entity/userGroups/userGroupsSelector';
2
- export const getUserGroupList = (userGroupsState, userGroupListViewState, userGroupType) => {
3
- const listState = userGroupListViewState.userGroupListByType[userGroupType];
4
- return {
5
- userGroups: getUserGroupListByIds(userGroupsState, userGroupListViewState, userGroupType),
6
- fetchState: listState?.fetchState,
7
- error: listState?.error,
8
- version: 0,
9
- };
10
- };
11
- function getUserGroupListByIds(userGroupsState, userGroupListViewState, type) {
12
- const userGroupIds = userGroupListViewState.userGroupListByType[type].ids;
13
- return userGroupIds
14
- .map((id) => getUserGroupByUserGroupId(userGroupsState, id))
15
- .filter((value) => value != null);
16
- }