@tesouro/embedded-components-react 0.5.212 → 0.5.214
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.
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index38.js → bill-upload/data-access/dist/index2.js} +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index3.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index35.js → bill-upload/data-access/dist/index4.js} +6 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index2.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +133 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index5.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index6.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index7.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index8.js +56 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index9.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index3.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index4.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index6.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +29 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index6.js → lib/invalidatePayableQueries/approvalDecisionQueries.js} +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index7.js → lib/invalidatePayableQueries/approvalRequestWatch.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index3.js → lib/invalidatePayableQueries/cleanUpDeletedPayableQueries.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index9.js → lib/invalidatePayableQueries/hasLiveScheduledRecord.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/index.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index8.js → lib/invalidatePayableQueries/invalidateDeletedPayableQueries.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index4.js → lib/invalidatePayableQueries/invalidatePayableQueries.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index5.js → lib/invalidatePayableQueries/payableProjectionPolling.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index10.js → lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index12.js → lib/invalidatePayableQueries/reconcileSubmittedForApprovalQueries.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index13.js → lib/payableOcrQueryOptions.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index40.js → lib/payablePolicyAssignmentQueryOptions.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index2.js → lib/queryKeys.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index21.js → lib/useApplyDuplicateVerdictsMutation.js} +23 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index16.js → lib/usePayableApprovalRequests.js} +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index17.js → lib/usePayableHistoryQuery.js} +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index18.js → lib/usePayableLineItems.js} +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/index.js +12 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index22.js → lib/usePayableMutations/useAttachPayableFileMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index23.js → lib/usePayableMutations/useCancelPayableMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCancelScheduledPaymentMutation.js +40 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCreatePayableMutation.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableFileMutation.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableMutation.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index28.js → lib/usePayableMutations/useForceApprovePayableMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index29.js → lib/usePayableMutations/useForceRejectPayableMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index32.js → lib/usePayableMutations/useReopenPayableMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index33.js → lib/usePayableMutations/useSubmitPayableForApprovalMutation.js} +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index34.js → lib/usePayableMutations/useUpdatePayableMutation.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index36.js → lib/usePayableMutations/useValidatePayableMutation.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index19.js → lib/usePayablePaymentRecordsQuery.js} +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index47.js → lib/usePayableSuggestionsQuery.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/index.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index39.js → lib/usePayablesQueries/useFirstPayablesPagesQuery.js} +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index41.js → lib/usePayablesQueries/usePayableQuery.js} +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index42.js → lib/usePayablesQueries/usePayablesByIdsQueries.js} +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index43.js → lib/usePayablesQueries/usePayablesCountQueries.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index44.js → lib/usePayablesQueries/usePayablesQuery.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/usePayablesTotalCountQuery.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +11 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +11 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +12 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +66 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +9 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +29 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +160 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +26 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +22 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +38 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +92 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +82 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +6 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +44 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +112 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +184 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +72 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +31 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +89 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +401 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +12 -161
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +83 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +79 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +222 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +38 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +247 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +612 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +27 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +232 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +15 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +3 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +36 -405
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +1 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +124 -228
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +8 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +81 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +38 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +20 -625
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +28 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +82 -256
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +50 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +260 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +27 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +396 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +332 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +217 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +5 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +107 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +24 -129
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +84 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +46 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +12 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index30.js → pay-bill/data-access/dist/index2.js} +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index3.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index11.js → pay-bill/data-access/dist/index4.js} +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index20.js → pay-bill/data-access/dist/index5.js} +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +179 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +51 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index12.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index13.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index15.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index3.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +72 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index6.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index7.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +41 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index108.js → pay-bill/ui/dist/index10.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index103.js → pay-bill/ui/dist/index2.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index104.js → pay-bill/ui/dist/index3.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index101.js → pay-bill/ui/dist/index6.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index106.js → pay-bill/ui/dist/index8.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index107.js → pay-bill/ui/dist/index9.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +3 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +28 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +12 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +8 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/duplicateVerdict.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupDuplicates.js +40 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/payableRemoval.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +0 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index24.js +0 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index26.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index27.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index31.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index37.js +0 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index45.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index46.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +0 -86
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +0 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +0 -262
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +0 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +0 -395
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +0 -310
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +0 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +0 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +0 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +0 -2
|
@@ -1,28 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useEffect as e, useState as t } from "react";
|
|
1
|
+
import { parseDecimalAmountToMinorUnits as e } from "../../../shared/util/dist/lib/parseDecimalAmountToMinorUnits.js";
|
|
6
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
var t = "USD";
|
|
4
|
+
function n(n) {
|
|
5
|
+
return e(n, t);
|
|
6
|
+
}
|
|
7
|
+
function r(e) {
|
|
8
|
+
let t = e.trim();
|
|
9
|
+
if (!t) return null;
|
|
10
|
+
let n = Number(t);
|
|
11
|
+
return Number.isFinite(n) && n > 0 ? n : null;
|
|
12
|
+
}
|
|
13
|
+
function i(e) {
|
|
14
|
+
return !!(e.description.trim() || e.glCode.trim() || n(e.price) !== null || n(e.amount) !== null);
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
return n(e) ?? 0;
|
|
18
|
+
}
|
|
19
|
+
function o(e) {
|
|
20
|
+
let t = Number.parseFloat(e);
|
|
21
|
+
return Number.isFinite(t) ? t : 0;
|
|
22
|
+
}
|
|
23
|
+
function s(e) {
|
|
24
|
+
let t = n(e);
|
|
25
|
+
return t === null ? e : c(t);
|
|
26
|
+
}
|
|
27
|
+
function c(e) {
|
|
28
|
+
return (e / 100).toFixed(2);
|
|
29
|
+
}
|
|
30
|
+
function l({ values: e, initialLineItems: r, counterpartId: i, clearCounterpart: a, counterpartBankAccountId: o, editedTotals: s, currentTotals: c, lineItems: l, document: f, includeBlankPoNumber: p = !0 }) {
|
|
31
|
+
let m = { currency: t };
|
|
32
|
+
i ? m.counterpart_id = i : a && (m.counterpart_id = null), i ? m.counterpart_bank_account_id = o ?? null : a && (m.counterpart_bank_account_id = null), e.invoiceNumber && (m.document_id = e.invoiceNumber), e.invoiceDate && (m.issued_at = e.invoiceDate), e.dueDate && (m.due_date = e.dueDate);
|
|
33
|
+
let h = e.poNumber.trim();
|
|
34
|
+
if ((h || p) && (m.purchase_order_number = h || null), f && (m.base64_encoded_file = f.base64EncodedFile, m.file_name = f.fileName), s && (m.discount = n(s.discount) ?? 0, m.tax_amount = n(s.tax) ?? 0, s.total !== void 0 && (m.total_amount = n(s.total) ?? 0)), c && l) {
|
|
35
|
+
let e = d(l), t = n(c.tax) ?? 0, r = n(c.discount) ?? 0, i = c.total === void 0 ? (e ?? 0) - r + t : n(c.total) ?? 0;
|
|
36
|
+
e !== void 0 && (m.subtotal = e), m.discount = r, m.tax_amount = t, m.total_amount = i;
|
|
37
|
+
} else if (r && !("total_amount" in m)) {
|
|
38
|
+
let e = u(r, {
|
|
39
|
+
tax: s?.tax,
|
|
40
|
+
discount: s?.discount
|
|
41
|
+
});
|
|
42
|
+
e !== void 0 && (m.total_amount = e);
|
|
43
|
+
}
|
|
44
|
+
return m;
|
|
45
|
+
}
|
|
46
|
+
function u(e, { tax: t, discount: r }) {
|
|
47
|
+
let i = d(e);
|
|
48
|
+
if (i !== void 0) return i + (t ? n(t) ?? 0 : 0) - (r ? n(r) ?? 0 : 0);
|
|
49
|
+
}
|
|
50
|
+
function d(e) {
|
|
51
|
+
let t = !1, r = e.reduce((e, r) => {
|
|
52
|
+
if (!i(r)) return e;
|
|
53
|
+
let a = n(r.amount);
|
|
54
|
+
return a === null ? e : (t = !0, e + a);
|
|
55
|
+
}, 0);
|
|
56
|
+
if (t) return r;
|
|
57
|
+
}
|
|
58
|
+
function f({ lineItems: e, editedTotals: t }) {
|
|
59
|
+
let r = d(e), i = n(t.tax) ?? 0, a = n(t.discount) ?? 0, o = {
|
|
60
|
+
discount: a,
|
|
61
|
+
tax_amount: i
|
|
62
|
+
};
|
|
63
|
+
return r !== void 0 && (o.subtotal = r), t.total === void 0 ? r !== void 0 && (o.total_amount = r - a + i) : o.total_amount = n(t.total) ?? 0, o;
|
|
64
|
+
}
|
|
65
|
+
function p(e) {
|
|
66
|
+
return e.filter(i).map((e) => {
|
|
67
|
+
let t = n(e.amount), i = r(e.quantity) ?? 1, a = n(e.price) ?? (t === null ? 0 : Math.round(t / i)), o = Math.round(i * a), s = t ?? o;
|
|
68
|
+
return {
|
|
69
|
+
name: e.description,
|
|
70
|
+
quantity: i,
|
|
71
|
+
unit_price: a,
|
|
72
|
+
tax: 0,
|
|
73
|
+
subtotal: s,
|
|
74
|
+
tax_amount: 0,
|
|
75
|
+
total: s,
|
|
76
|
+
...e.glCode ? { ledger_account_id: e.glCode } : {}
|
|
24
77
|
};
|
|
25
|
-
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function m(e, t) {
|
|
81
|
+
return c(Math.round(o(e) * a(t)));
|
|
82
|
+
}
|
|
83
|
+
function h(e, t, n) {
|
|
84
|
+
return c(e.reduce((e, t) => e + a(t.amount), 0) + a(t) - a(n));
|
|
26
85
|
}
|
|
27
86
|
//#endregion
|
|
28
|
-
export { i as
|
|
87
|
+
export { h as calculateTotal, m as displayLineAmount, i as isPersistableLineItem, l as mapBillFormToPayload, p as mapLineItemsToPayload, f as mapPayableAmountFieldsToPayload, s as normalizeMoneyOnBlur, n as parseMoneyToMinorUnits, r as parseQuantity };
|
|
@@ -1,26 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { useWidgetConfig as n } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
|
-
import "../../../shared/feature/dist/index.js";
|
|
10
|
-
import { isLiveScheduledPaymentRecord as r } from "../../util/dist/lib/isLiveScheduledPaymentRecord.js";
|
|
11
|
-
import { usePayablePaymentRecordsQuery as i } from "../../data-access/dist/index19.js";
|
|
12
|
-
import "../../data-access/dist/index.js";
|
|
1
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index24.js";
|
|
2
|
+
import { isPersistableLineItem as t, parseMoneyToMinorUnits as n, parseQuantity as r } from "./index30.js";
|
|
13
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/, a = 255, o = 10, s = 5, c = 30, l = 864e5;
|
|
5
|
+
function u() {
|
|
6
|
+
let e = /* @__PURE__ */ new Date();
|
|
7
|
+
return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
8
|
+
}
|
|
9
|
+
function d() {
|
|
10
|
+
let e = new Date(u());
|
|
11
|
+
return e.setUTCFullYear(e.getUTCFullYear() - o), e;
|
|
12
|
+
}
|
|
13
|
+
function f(e) {
|
|
14
|
+
let t = new Date(e);
|
|
15
|
+
if (Number.isNaN(t.getTime())) return !1;
|
|
16
|
+
let n = new Date(u() + c * l);
|
|
17
|
+
return t < d() || t > n;
|
|
18
|
+
}
|
|
19
|
+
function p(e) {
|
|
20
|
+
let t = new Date(e);
|
|
21
|
+
if (Number.isNaN(t.getTime())) return !1;
|
|
22
|
+
let n = new Date(u());
|
|
23
|
+
return n.setUTCFullYear(n.getUTCFullYear() + s), t < d() || t > n;
|
|
24
|
+
}
|
|
25
|
+
function m(t, n = e) {
|
|
26
|
+
let r = {};
|
|
27
|
+
return t.poNumber.length > a && (r.poNumber = n.poNumberTooLong), Object.keys(r).length ? r : void 0;
|
|
28
|
+
}
|
|
29
|
+
function h(e) {
|
|
30
|
+
let t = e.trim();
|
|
31
|
+
return !t || n(t) !== null ? !0 : i.test(t) ? Number(t.replaceAll(",", "")) === 0 : !1;
|
|
32
|
+
}
|
|
33
|
+
function g(t, i = e) {
|
|
34
|
+
let a = {};
|
|
35
|
+
for (let e of t) {
|
|
36
|
+
let t = n(e.price), o = n(e.amount), s = {};
|
|
37
|
+
e.price.trim() && t === null && (s.price = i.unreadableMoney), e.amount.trim() && o === null && (s.amount = i.unreadableMoney), r(e.quantity) === null && (e.quantity.trim() || t !== null || o !== null) && (s.quantity = i.unusableQuantity), Object.keys(s).length && (a[e.id] = s);
|
|
38
|
+
}
|
|
39
|
+
return Object.keys(a).length ? a : void 0;
|
|
40
|
+
}
|
|
41
|
+
function _(i, a, o, s = e) {
|
|
42
|
+
let c = {};
|
|
43
|
+
a || (c.vendor = s.requiredField), i.invoiceNumber.trim() || (c.invoiceNumber = s.requiredField);
|
|
44
|
+
let l = i.invoiceDate.trim(), u = i.dueDate.trim();
|
|
45
|
+
l ? f(l) && (c.invoiceDate = s.implausibleInvoiceDate) : c.invoiceDate = s.requiredField, u ? p(u) ? c.dueDate = s.implausibleDueDate : l && u < l && (c.dueDate = s.dueBeforeInvoiceDate) : c.dueDate = s.requiredField;
|
|
46
|
+
let d = {};
|
|
47
|
+
return o.forEach((e, i) => {
|
|
48
|
+
if (i > 0 && !t(e)) return;
|
|
49
|
+
let a = {};
|
|
50
|
+
e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (d[e.id] = a);
|
|
51
|
+
}), {
|
|
52
|
+
formErrors: Object.keys(c).length ? c : void 0,
|
|
53
|
+
lineItemErrors: Object.keys(d).length ? d : void 0
|
|
23
54
|
};
|
|
24
55
|
}
|
|
56
|
+
function v(e) {
|
|
57
|
+
let t = e.trim();
|
|
58
|
+
if (!t) return !0;
|
|
59
|
+
let n = t.startsWith("-") ? t.slice(1) : t;
|
|
60
|
+
return i.test(n) ? Number(t.replaceAll(",", "")) <= 0 : !1;
|
|
61
|
+
}
|
|
62
|
+
function y(e, t) {
|
|
63
|
+
if (n(e) === null) return v(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
|
|
64
|
+
}
|
|
65
|
+
function b(t, n = e) {
|
|
66
|
+
let r = y(t, n);
|
|
67
|
+
return r ? { total: r } : void 0;
|
|
68
|
+
}
|
|
69
|
+
function x(t, r = e) {
|
|
70
|
+
if (t === void 0) return;
|
|
71
|
+
let i = n(t);
|
|
72
|
+
if (i !== null) return i > 0 ? void 0 : { total: r.totalNotGreaterThanZero };
|
|
73
|
+
}
|
|
74
|
+
function S(t, n, r, i = e) {
|
|
75
|
+
let a = {};
|
|
76
|
+
if (h(t) || (a.discount = i.unreadableDiscount), h(n) || (a.tax = i.unreadableTax), r !== void 0) {
|
|
77
|
+
let e = y(r, i);
|
|
78
|
+
e && (a.total = e);
|
|
79
|
+
}
|
|
80
|
+
return Object.keys(a).length ? a : void 0;
|
|
81
|
+
}
|
|
25
82
|
//#endregion
|
|
26
|
-
export {
|
|
83
|
+
export { h as isReadableMoneyOrZero, _ as validateBillCompleteness, b as validateBillTotalIsPayable, S as validateBillTotals, m as validateBillValues, g as validateLineItems, x as validateStoredAmountDue };
|
|
@@ -3,42 +3,234 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import "../../../shared/data-access/dist/index.js";
|
|
6
|
+
import { extractApiErrorMessage as t } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
9
7
|
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import "
|
|
12
|
-
import {
|
|
8
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as n } from "./index24.js";
|
|
9
|
+
import { encodeFileToBase64 as r } from "./index29.js";
|
|
10
|
+
import { mapBillFormToPayload as i, mapLineItemsToPayload as a, mapPayableAmountFieldsToPayload as o } from "./index30.js";
|
|
11
|
+
import { validateBillCompleteness as s, validateBillTotalIsPayable as c, validateBillTotals as l, validateBillValues as u, validateLineItems as d, validateStoredAmountDue as ee } from "./index31.js";
|
|
12
|
+
import { useReplacePayableLineItemsMutation as f } from "../../data-access/dist/lib/usePayableLineItems.js";
|
|
13
|
+
import { useCreatePayableMutation as p } from "../../data-access/dist/lib/usePayableMutations/useCreatePayableMutation.js";
|
|
14
|
+
import { useDeletePayableFileMutation as m } from "../../data-access/dist/lib/usePayableMutations/useDeletePayableFileMutation.js";
|
|
15
|
+
import { useSubmitPayableForApprovalMutation as te } from "../../data-access/dist/lib/usePayableMutations/useSubmitPayableForApprovalMutation.js";
|
|
16
|
+
import { useUpdatePayableMutation as h } from "../../data-access/dist/lib/usePayableMutations/useUpdatePayableMutation.js";
|
|
17
|
+
import { useValidatePayableMutation as g } from "../../data-access/dist/lib/usePayableMutations/useValidatePayableMutation.js";
|
|
13
18
|
import "../../data-access/dist/index.js";
|
|
14
|
-
import { useState as
|
|
19
|
+
import { useCallback as _, useRef as ne, useState as v } from "react";
|
|
15
20
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
var y = {
|
|
22
|
+
document_id: "invoiceNumber",
|
|
23
|
+
issued_at: "invoiceDate",
|
|
24
|
+
due_date: "dueDate",
|
|
25
|
+
counterpart_id: "vendor",
|
|
26
|
+
purchase_order_number: "poNumber"
|
|
27
|
+
}, b = { tax_amount: "tax" };
|
|
28
|
+
function x(e) {
|
|
29
|
+
return e.type === "type_error.none.not_allowed" || e.msg === "none is not an allowed value";
|
|
30
|
+
}
|
|
31
|
+
var re = "pending-vendor";
|
|
32
|
+
function S(e) {
|
|
33
|
+
return !!t(e)?.includes("line_items_enabled");
|
|
34
|
+
}
|
|
35
|
+
function C(e) {
|
|
36
|
+
return !!t(e)?.includes("A vendor could not be linked or created for this payable");
|
|
37
|
+
}
|
|
38
|
+
function w(e, t = n) {
|
|
39
|
+
let r = {}, i = {}, a = [];
|
|
40
|
+
for (let n of e) {
|
|
41
|
+
let e = n.loc[0] ?? t.unknownValidationField, o = y[e], s = b[e], c = x(n) ? t.requiredField : n.msg;
|
|
42
|
+
o ? r[o] = c : s ? i[s] = c : a.push(t.unmappedValidationError(e, c));
|
|
43
|
+
}
|
|
44
|
+
return a.length && (r.form = a.join(" ")), {
|
|
45
|
+
formErrors: r,
|
|
46
|
+
totalsErrors: Object.keys(i).length ? i : void 0
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function ie(e, t) {
|
|
50
|
+
if (!e && !t) return;
|
|
51
|
+
let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
|
|
52
|
+
for (let i of r) n[i] = {
|
|
53
|
+
...e?.[i],
|
|
54
|
+
...t?.[i]
|
|
55
|
+
};
|
|
56
|
+
return n;
|
|
57
|
+
}
|
|
58
|
+
function T({ payableId: t, form: y, counterpartId: b, isVendorPending: x, clearCounterpart: T, prepareVendorForSave: E, onSaved: D, onPayableCreated: O, readSavedStatus: k, onDraftSaved: A, onFinalized: j, labels: M }) {
|
|
59
|
+
let N = {
|
|
60
|
+
...n,
|
|
61
|
+
...M
|
|
62
|
+
}, [P, F] = v(), I = t ?? P, [L, R] = v(), ae = _(() => R(void 0), []), [z, B] = v(!1), oe = _(() => B(!0), []), [V, H] = v(), U = ne(!1), [se, ce] = v(0), W = _(() => ce((e) => e + 1), []), G = p(), K = m(), q = h(), J = f(), Y = g(), X = te(), Z = _(() => y.isTotalsDirty ? l(y.discount, y.tax, y.totalOverride, N) : void 0, [y, N]), Q = _(() => {
|
|
63
|
+
let t = u(y.values, N), n = d(y.lineItems, N), r = Z();
|
|
64
|
+
return y.setErrors(t), y.setLineItemErrors(n), y.setTotalsErrors(r), !t && !n && !r || (n && e.error(N.lineItemsNeedAttention), W(), !1);
|
|
65
|
+
}, [
|
|
66
|
+
y,
|
|
67
|
+
N,
|
|
68
|
+
W,
|
|
69
|
+
Z
|
|
70
|
+
]), $ = _(async (e, t) => {
|
|
71
|
+
let n = !I && L ? {
|
|
72
|
+
base64EncodedFile: await r(L),
|
|
73
|
+
fileName: L.name
|
|
74
|
+
} : void 0, s = y.isTotalsDirty ? {
|
|
75
|
+
discount: y.discount,
|
|
76
|
+
tax: y.tax,
|
|
77
|
+
total: y.totalOverride
|
|
78
|
+
} : void 0, c = i({
|
|
79
|
+
values: y.values,
|
|
80
|
+
initialLineItems: I ? void 0 : y.lineItems,
|
|
81
|
+
counterpartId: t ?? b,
|
|
82
|
+
clearCounterpart: T,
|
|
83
|
+
counterpartBankAccountId: e,
|
|
84
|
+
currentTotals: {
|
|
85
|
+
discount: y.discount,
|
|
86
|
+
tax: y.tax,
|
|
87
|
+
total: y.totalOverride
|
|
31
88
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
89
|
+
lineItems: y.lineItems,
|
|
90
|
+
editedTotals: s,
|
|
91
|
+
document: n
|
|
92
|
+
}), l = I;
|
|
93
|
+
if (l ? await q.mutateAsync({
|
|
94
|
+
path: { payable_id: l },
|
|
95
|
+
body: c
|
|
96
|
+
}) : (l = (await G.mutateAsync({ body: c }))?.id, l && (F(l), O?.(l), n && R(void 0))), !l) throw Error("Payable was created without an id");
|
|
97
|
+
if (z) {
|
|
98
|
+
try {
|
|
99
|
+
await K.mutateAsync({ path: { payable_id: l } });
|
|
100
|
+
} catch {}
|
|
101
|
+
B(!1);
|
|
102
|
+
}
|
|
103
|
+
return await J.mutateAsync({
|
|
104
|
+
path: { payable_id: l },
|
|
105
|
+
body: { data: a(y.lineItems) }
|
|
106
|
+
}), s && await q.mutateAsync({
|
|
107
|
+
path: { payable_id: l },
|
|
108
|
+
body: o({
|
|
109
|
+
lineItems: y.lineItems,
|
|
110
|
+
editedTotals: s
|
|
111
|
+
})
|
|
112
|
+
}), l;
|
|
113
|
+
}, [
|
|
114
|
+
b,
|
|
115
|
+
T,
|
|
116
|
+
G,
|
|
117
|
+
K,
|
|
118
|
+
z,
|
|
119
|
+
y.discount,
|
|
120
|
+
y.isTotalsDirty,
|
|
121
|
+
y.lineItems,
|
|
122
|
+
y.tax,
|
|
123
|
+
y.totalOverride,
|
|
124
|
+
y.values,
|
|
125
|
+
O,
|
|
126
|
+
I,
|
|
127
|
+
J,
|
|
128
|
+
L,
|
|
129
|
+
q
|
|
130
|
+
]), le = _(async () => {
|
|
131
|
+
I && (await K.mutateAsync({ path: { payable_id: I } }), B(!1));
|
|
132
|
+
}, [K, I]);
|
|
133
|
+
return {
|
|
134
|
+
saveDraft: _(async () => {
|
|
135
|
+
if (!U.current && Q()) {
|
|
136
|
+
U.current = !0, H("draft");
|
|
137
|
+
try {
|
|
138
|
+
let t = await E?.();
|
|
139
|
+
if (t && !t.ok) return;
|
|
140
|
+
let n = await $(t?.counterpartBankAccountId, t?.counterpartId);
|
|
141
|
+
y.setErrors(void 0), D?.(n), A?.(n);
|
|
142
|
+
let r = await k?.();
|
|
143
|
+
return e.success(r === "draft" ? N.submittedDemoted : N.draftSaved), n;
|
|
144
|
+
} catch (e) {
|
|
145
|
+
y.setSaveFailureMessage(S(e) ? N.discountTaxBlockedByLineItems : N.saveFailed), W();
|
|
146
|
+
return;
|
|
147
|
+
} finally {
|
|
148
|
+
H(void 0), U.current = !1;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, [
|
|
152
|
+
y,
|
|
153
|
+
Q,
|
|
154
|
+
N.discountTaxBlockedByLineItems,
|
|
155
|
+
N.draftSaved,
|
|
156
|
+
N.saveFailed,
|
|
157
|
+
N.submittedDemoted,
|
|
158
|
+
A,
|
|
159
|
+
D,
|
|
160
|
+
k,
|
|
161
|
+
E,
|
|
162
|
+
$,
|
|
163
|
+
W
|
|
164
|
+
]),
|
|
165
|
+
finalize: _(async () => {
|
|
166
|
+
if (U.current) return;
|
|
167
|
+
let t = d(y.lineItems, N), n = u(y.values, N), r = Z(), i = c(y.total, N), a = y.isTotalsDirty ? ee(y.totalOverride, N) : void 0, o = r || i || a ? {
|
|
168
|
+
...a,
|
|
169
|
+
...i,
|
|
170
|
+
...r
|
|
171
|
+
} : void 0, { formErrors: l, lineItemErrors: f } = s(y.values, b ?? (x ? re : void 0), y.lineItems, N), p = ie(f, t);
|
|
172
|
+
y.setLineItemErrors(p), y.setTotalsErrors(o);
|
|
173
|
+
let m = {
|
|
174
|
+
...l,
|
|
175
|
+
...n
|
|
176
|
+
};
|
|
177
|
+
if (y.setErrors(Object.keys(m).length ? m : void 0), t && e.error(N.lineItemsNeedAttention), p || o || Object.keys(m).length) {
|
|
178
|
+
W();
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
U.current = !0, H("finalize");
|
|
182
|
+
try {
|
|
183
|
+
let t;
|
|
184
|
+
try {
|
|
185
|
+
let e = await E?.();
|
|
186
|
+
if (e && !e.ok) return;
|
|
187
|
+
t = await $(e?.counterpartBankAccountId, e?.counterpartId);
|
|
188
|
+
} catch (e) {
|
|
189
|
+
y.setSaveFailureMessage(S(e) ? N.discountTaxBlockedByLineItems : N.saveFailed), W();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
D?.(t);
|
|
193
|
+
try {
|
|
194
|
+
let n = await Y.mutateAsync({ path: { payable_id: t } });
|
|
195
|
+
if (n.validation_errors.length) {
|
|
196
|
+
let e = w(n.validation_errors, N);
|
|
197
|
+
y.setErrors(e.formErrors), y.setTotalsErrors(e.totalsErrors), W();
|
|
198
|
+
return;
|
|
37
199
|
}
|
|
38
|
-
|
|
200
|
+
await X.mutateAsync({ path: { payable_id: t } }), y.setErrors(void 0), j?.(t), e.success(N.billFinalized);
|
|
201
|
+
} catch (e) {
|
|
202
|
+
C(e) ? y.setErrors({ vendor: N.vendorResolutionFailed }) : y.setSaveFailureMessage(N.finalizeFailed), W();
|
|
203
|
+
}
|
|
204
|
+
} finally {
|
|
205
|
+
H(void 0), U.current = !1;
|
|
39
206
|
}
|
|
40
|
-
}
|
|
207
|
+
}, [
|
|
208
|
+
b,
|
|
209
|
+
x,
|
|
210
|
+
y,
|
|
211
|
+
N,
|
|
212
|
+
j,
|
|
213
|
+
D,
|
|
214
|
+
E,
|
|
215
|
+
$,
|
|
216
|
+
W,
|
|
217
|
+
X,
|
|
218
|
+
Z,
|
|
219
|
+
Y
|
|
220
|
+
]),
|
|
221
|
+
payableId: I,
|
|
222
|
+
isSavingDraft: V === "draft",
|
|
223
|
+
isFinalizing: V === "finalize",
|
|
224
|
+
stagedFile: L,
|
|
225
|
+
stageFile: R,
|
|
226
|
+
clearStagedFile: ae,
|
|
227
|
+
scrollToErrorToken: se,
|
|
228
|
+
isFileDeletionPending: z,
|
|
229
|
+
requestFileDeletion: oe,
|
|
230
|
+
detachFileNow: le,
|
|
231
|
+
isDeletingFile: K.isPending,
|
|
232
|
+
hasFileDeletionFailed: K.isError
|
|
41
233
|
};
|
|
42
234
|
}
|
|
43
235
|
//#endregion
|
|
44
|
-
export {
|
|
236
|
+
export { w as mapValidationErrorsToForm, T as useBillCreateController };
|
|
@@ -1,101 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { formatBillMoney as n } from "../../util/dist/lib/formatBillMoney.js";
|
|
4
|
-
import { resolveLineItemAmountMinorUnits as r } from "../../util/dist/lib/resolveLineItemAmount.js";
|
|
5
|
-
import { resolveLineItemQuantity as i } from "../../util/dist/lib/resolveLineItemQuantity.js";
|
|
6
|
-
import { resolveVendor as a, resolveVendorName as o } from "../../util/dist/lib/resolveVendor.js";
|
|
1
|
+
import { resolveLineItemAmountMinorUnits as e } from "../../util/dist/lib/resolveLineItemAmount.js";
|
|
2
|
+
import { resolveLineItemQuantity as t } from "../../util/dist/lib/resolveLineItemQuantity.js";
|
|
7
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js
|
|
8
|
-
function
|
|
9
|
-
return
|
|
4
|
+
function n() {
|
|
5
|
+
return {
|
|
6
|
+
id: crypto.randomUUID(),
|
|
7
|
+
description: "",
|
|
8
|
+
glCode: "",
|
|
9
|
+
quantity: "1",
|
|
10
|
+
price: "",
|
|
11
|
+
amount: ""
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function r(e) {
|
|
15
|
+
return typeof e == "number" ? (e / 100).toFixed(2) : "";
|
|
10
16
|
}
|
|
11
|
-
function
|
|
17
|
+
function i(e) {
|
|
12
18
|
return typeof e == "string" ? e : "";
|
|
13
19
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
label: p.invoiceNumberRow,
|
|
33
|
-
value: l.document_id || p.notProvided
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: p.issueDateRow,
|
|
37
|
-
value: w
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: p.dueDateRow,
|
|
41
|
-
value: T
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: p.poNumberRow,
|
|
45
|
-
value: c(l.purchase_order_number) || p.notProvided
|
|
46
|
-
}
|
|
47
|
-
], k = new Map(f.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), A = d.map((e) => {
|
|
48
|
-
let t = b(e.unit_price), n = String(i(e));
|
|
49
|
-
return {
|
|
50
|
-
id: e.id,
|
|
51
|
-
description: e.name ?? e.description ?? "",
|
|
52
|
-
glCodeLabel: (e.ledger_account_id ? k.get(e.ledger_account_id) : void 0) || p.glCodeMissing,
|
|
53
|
-
quantityLabel: t ? p.quantityValue(n, t) : p.quantityOnlyValue(n),
|
|
54
|
-
amountLabel: b(r(e)) ?? ""
|
|
55
|
-
};
|
|
56
|
-
}), j = [
|
|
57
|
-
{
|
|
58
|
-
label: p.subtotalRow,
|
|
59
|
-
value: l.subtotal
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: p.discountsRow,
|
|
63
|
-
value: l.discount
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: p.taxRow,
|
|
67
|
-
value: l.tax_amount
|
|
68
|
-
}
|
|
69
|
-
].map(({ label: e, value: t }) => ({
|
|
70
|
-
label: e,
|
|
71
|
-
value: b(t)
|
|
72
|
-
})).filter((e) => !!e.value), M = b(s(l));
|
|
73
|
-
M && j.push({
|
|
74
|
-
label: p.totalRow,
|
|
75
|
-
value: M,
|
|
76
|
-
emphasis: !0
|
|
77
|
-
});
|
|
78
|
-
let N = u(l);
|
|
20
|
+
function a(e) {
|
|
21
|
+
return e.total_amount ?? e.amount_due ?? void 0;
|
|
22
|
+
}
|
|
23
|
+
function o({ payable: o, lineItems: s }) {
|
|
24
|
+
let c = {
|
|
25
|
+
invoiceNumber: o.document_id ?? "",
|
|
26
|
+
invoiceDate: o.issued_at ?? "",
|
|
27
|
+
dueDate: o.due_date ?? "",
|
|
28
|
+
poNumber: i(o.purchase_order_number)
|
|
29
|
+
}, l = s.map((n) => ({
|
|
30
|
+
id: n.id,
|
|
31
|
+
description: n.name ?? "",
|
|
32
|
+
glCode: n.ledger_account_id ?? "",
|
|
33
|
+
quantity: String(t(n)),
|
|
34
|
+
price: r(n.unit_price),
|
|
35
|
+
amount: r(e(n))
|
|
36
|
+
})), u = a(o);
|
|
79
37
|
return {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
amountPaidLabel: N ? b(l.amount_paid) : void 0,
|
|
86
|
-
paidOnLabel: N ? p.paidOnLabel(N) : void 0,
|
|
87
|
-
invoiceDateLabel: w,
|
|
88
|
-
dueDateLabel: T,
|
|
89
|
-
dueDateTone: x.isOverdue ? "danger" : "default",
|
|
90
|
-
payToItems: E,
|
|
91
|
-
invoiceItems: O,
|
|
92
|
-
lineItems: A,
|
|
93
|
-
totals: j,
|
|
94
|
-
rejection: g
|
|
38
|
+
values: c,
|
|
39
|
+
lineItems: l.length ? l : [n()],
|
|
40
|
+
discount: r(o.discount),
|
|
41
|
+
tax: r(o.tax_amount),
|
|
42
|
+
total: u ? r(u) : ""
|
|
95
43
|
};
|
|
96
44
|
}
|
|
97
|
-
function u(t) {
|
|
98
|
-
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
99
|
-
}
|
|
100
45
|
//#endregion
|
|
101
|
-
export {
|
|
46
|
+
export { n as emptyLineItem, o as mapPayableToBillForm };
|