@tesouro/embedded-components-react 0.7.29 → 0.7.31
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/lib/monite-sdk.d.ts +0 -1
- package/dist/lib/monite-sdk.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +55 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +2 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +53 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +36 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +71 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +6 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +42 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +1 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +568 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +0 -577
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +27 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +93 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +10 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +18 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +73 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +1 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +127 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +0 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +54 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +5 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +64 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +120 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +21 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +35 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +6 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +56 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +69 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +25 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +1 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +61 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +17 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +181 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +1 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +64 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +31 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +6 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +29 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +42 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +11 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +4 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +12 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +32 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +8 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +20 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +111 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +62 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +199 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +0 -199
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +38 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +6 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +7 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +5 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +359 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +1 -412
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +91 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +18 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +182 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +96 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +1 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +44 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +21 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +1 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +161 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +0 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +61 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +44 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +48 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +82 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +7 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +305 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +1 -307
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +0 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +37 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +3 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +102 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +172 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +116 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +191 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +11 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +28 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +0 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +36 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +138 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +1 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +166 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +25 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +19 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +5 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +18 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +5 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +9 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +26 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +11 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +100 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +42 -98
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +27 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +1 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +105 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +35 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +166 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +202 -163
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +87 -207
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +17 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +158 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +87 -143
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +42 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +4 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +73 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +16 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +5 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +131 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +4 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +221 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +31 -219
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +34 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +180 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +14 -182
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +204 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +88 -192
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +61 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +54 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +83 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +40 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +75 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +71 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +12 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +24 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +16 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +0 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +32 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +15 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +97 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +0 -97
|
@@ -1,412 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useMoniteContext as t } from "./index45.js";
|
|
3
|
-
import { useCounterpartById as n } from "./index46.js";
|
|
4
|
-
import { useRootElements as ee } from "./index47.js";
|
|
5
|
-
import "./index48.js";
|
|
6
|
-
import { useCurrencies as te } from "./index63.js";
|
|
7
|
-
import { MoniteScopedProviders as r } from "./index129.js";
|
|
8
|
-
import { useUserPermissions as ne } from "./index111.js";
|
|
9
|
-
import { CounterpartDetails as re } from "./index133.js";
|
|
10
|
-
import { useOptionalFields as ie } from "./index163.js";
|
|
11
|
-
import { CounterpartAutocomplete as ae } from "./index175.js";
|
|
12
|
-
import "./index204.js";
|
|
13
|
-
import { MoniteCurrency as oe } from "./index213.js";
|
|
14
|
-
import "./index215.js";
|
|
15
|
-
import { classNames as se } from "./index250.js";
|
|
16
|
-
import { useGetPayableCounterpart as ce } from "./index265.js";
|
|
17
|
-
import { usePayableDetailsThemeProps as le } from "./index266.js";
|
|
18
|
-
import "./index284.js";
|
|
19
|
-
import { calculateTotalsForPayable as ue, findDefaultBankAccount as de, isFieldRequired as i, prepareDefaultValues as a, prepareSubmit as fe, resolveCreatePayableCounterpartAddressId as pe } from "./index286.js";
|
|
20
|
-
import { PayableLineItemsForm as me } from "./index289.js";
|
|
21
|
-
import "./index290.js";
|
|
22
|
-
import { usePayableDetailsForm as he } from "./index291.js";
|
|
23
|
-
import { getPayableDetailsFormSchema as ge, isFieldRequiredByValidations as o } from "./index292.js";
|
|
24
|
-
import { useProductCurrencyGroups as _e } from "./index295.js";
|
|
25
|
-
import { getBankAccountName as ve } from "./index296.js";
|
|
26
|
-
import { safeZodResolver as ye } from "./index297.js";
|
|
27
|
-
import { useEffect as s, useMemo as c, useRef as be, useState as xe } from "react";
|
|
28
|
-
import { Fragment as Se, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
29
|
-
import { Box as d, Button as f, FormControl as Ce, FormHelperText as we, Grid as p, IconButton as Te, InputLabel as Ee, MenuItem as De, Paper as m, Select as Oe, Stack as ke, Table as Ae, TableBody as je, TableCell as h, TableRow as g, TextField as _, Typography as v } from "@mui/material";
|
|
30
|
-
import { useLingui as Me } from "@lingui/react";
|
|
31
|
-
import { DatePicker as y } from "@mui/x-date-pickers";
|
|
32
|
-
import { Controller as b, FormProvider as x, useForm as Ne, useFormState as Pe } from "react-hook-form";
|
|
33
|
-
import S from "@mui/icons-material/Add";
|
|
34
|
-
import Fe from "@mui/icons-material/DeleteForever";
|
|
35
|
-
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js
|
|
36
|
-
var C = ({ ref: e, ...t }) => /* @__PURE__ */ l(r, { children: /* @__PURE__ */ l(w, {
|
|
37
|
-
ref: e,
|
|
38
|
-
...t
|
|
39
|
-
}) }), w = ({ payable: r, savePayable: C, createPayable: w, lineItems: T, payableDetailsFormId: Ie, initialCounterpartId: E, enableGLCodes: Le, hideAddDiscountButton: Re, hideAddBankAccountButton: ze, ref: Be, ...Ve }) => {
|
|
40
|
-
let { i18n: D } = Me(), { api: He, componentSettings: Ue } = t(), { root: O } = ee(), k = "Monite-PayableDetailsForm", { formatFromMinorUnits: A, formatToMinorUnits: j, formatCurrencyToDisplay: M, getSymbolFromCurrency: We } = te(), { data: N } = He.finops.getPayablesValidations.useQuery(), Ge = c(() => a(A, r, T, E), [
|
|
41
|
-
A,
|
|
42
|
-
r,
|
|
43
|
-
T,
|
|
44
|
-
E
|
|
45
|
-
]), P = Ne({
|
|
46
|
-
resolver: ye(ge(D, N)),
|
|
47
|
-
defaultValues: Ge,
|
|
48
|
-
mode: "onTouched"
|
|
49
|
-
}), { control: F, handleSubmit: Ke, watch: I, reset: L, trigger: R, setValue: z, getValues: B, getFieldState: V } = P, { dirtyFields: qe } = Pe({ control: F }), H = I("counterpart"), U = I("counterpartBankAccount"), Je = I("invoiceDate"), Ye = I("dueDate"), W = I("currency"), Xe = I("lineItems"), G = I("discount"), K = ue(Xe, G), [Ze, q] = xe(!1), { counterpartQuery: Qe, counterpartBankAccountQuery: J } = he({ currentCounterpartId: H }), { ocrRequiredFields: Y, optionalFields: $e } = le(Ve), { showInvoiceDate: et } = ie($e, { showInvoiceDate: !0 });
|
|
50
|
-
ne();
|
|
51
|
-
let X = be(!1), { counterpart: Z, counterpartRawName: tt, isCounterpartAIMatched: nt, isCounterpartMatchingToOCRFound: Q, isCounterpartLoading: rt } = ce({ payable: r }), { data: $ } = n(E);
|
|
52
|
-
s(() => {
|
|
53
|
-
L(a(A, r, T, E));
|
|
54
|
-
}, [
|
|
55
|
-
r,
|
|
56
|
-
A,
|
|
57
|
-
L,
|
|
58
|
-
T,
|
|
59
|
-
E
|
|
60
|
-
]), s(() => {
|
|
61
|
-
!H && U && z("counterpartBankAccount", "", { shouldValidate: !0 });
|
|
62
|
-
}, [
|
|
63
|
-
H,
|
|
64
|
-
U,
|
|
65
|
-
z
|
|
66
|
-
]), s(() => {
|
|
67
|
-
Q && Z && (V("counterpart").isTouched || z("counterpart", Z.id));
|
|
68
|
-
}, [
|
|
69
|
-
Z,
|
|
70
|
-
V,
|
|
71
|
-
Q,
|
|
72
|
-
z
|
|
73
|
-
]), s(() => {
|
|
74
|
-
if (J.isSuccess && J.data?.data) {
|
|
75
|
-
let e = de(J.data.data, W);
|
|
76
|
-
B("counterpartBankAccount") !== e && z("counterpartBankAccount", e, {
|
|
77
|
-
shouldDirty: !0,
|
|
78
|
-
shouldTouch: !0,
|
|
79
|
-
shouldValidate: !0
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}, [
|
|
83
|
-
J.data,
|
|
84
|
-
J.isSuccess,
|
|
85
|
-
W,
|
|
86
|
-
B,
|
|
87
|
-
z
|
|
88
|
-
]), s(() => {
|
|
89
|
-
r?.id && R();
|
|
90
|
-
}, [R, r?.id]);
|
|
91
|
-
let { currencyGroups: it, isLoadingCurrencyGroups: at } = _e();
|
|
92
|
-
return /* @__PURE__ */ u(Se, { children: [/* @__PURE__ */ l(d, {
|
|
93
|
-
className: se(e, k),
|
|
94
|
-
sx: {
|
|
95
|
-
pb: 6,
|
|
96
|
-
display: "flex",
|
|
97
|
-
flex: "1 1 auto",
|
|
98
|
-
overflow: "auto",
|
|
99
|
-
width: "100%",
|
|
100
|
-
height: 0
|
|
101
|
-
},
|
|
102
|
-
children: /* @__PURE__ */ l(x, {
|
|
103
|
-
...P,
|
|
104
|
-
children: /* @__PURE__ */ l("form", {
|
|
105
|
-
style: { width: "100%" },
|
|
106
|
-
ref: Be,
|
|
107
|
-
id: Ie,
|
|
108
|
-
noValidate: !0,
|
|
109
|
-
onBlur: () => {
|
|
110
|
-
X.current = !1;
|
|
111
|
-
},
|
|
112
|
-
onKeyDown: (e) => {
|
|
113
|
-
X.current = e.key === "Enter";
|
|
114
|
-
},
|
|
115
|
-
onSubmit: Ke(async (e) => {
|
|
116
|
-
let t = {
|
|
117
|
-
...e,
|
|
118
|
-
currency: e.currency,
|
|
119
|
-
counterpartAddressId: pe(Qe.data?.data, $, e.counterpart)
|
|
120
|
-
}, n = fe(t, j, K);
|
|
121
|
-
r ? C && C(r.id, n, e.lineItems, qe) : w && w(n, e.lineItems);
|
|
122
|
-
}),
|
|
123
|
-
children: /* @__PURE__ */ u(p, {
|
|
124
|
-
container: !0,
|
|
125
|
-
spacing: 3,
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ l(p, {
|
|
128
|
-
item: !0,
|
|
129
|
-
xs: 12,
|
|
130
|
-
children: /* @__PURE__ */ u(m, {
|
|
131
|
-
variant: "outlined",
|
|
132
|
-
sx: { p: 3 },
|
|
133
|
-
className: k + "-Details",
|
|
134
|
-
children: [/* @__PURE__ */ l(v, {
|
|
135
|
-
variant: "subtitle2",
|
|
136
|
-
mb: 2,
|
|
137
|
-
children: D._("Details")
|
|
138
|
-
}), /* @__PURE__ */ u(ke, {
|
|
139
|
-
spacing: 3,
|
|
140
|
-
children: [
|
|
141
|
-
/* @__PURE__ */ l(b, {
|
|
142
|
-
name: "invoiceNumber",
|
|
143
|
-
control: F,
|
|
144
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
|
|
145
|
-
...e,
|
|
146
|
-
id: e.name,
|
|
147
|
-
label: D._("Number"),
|
|
148
|
-
variant: "standard",
|
|
149
|
-
fullWidth: !0,
|
|
150
|
-
error: !!t,
|
|
151
|
-
helperText: t?.message,
|
|
152
|
-
required: i("invoiceNumber", Y)
|
|
153
|
-
})
|
|
154
|
-
}),
|
|
155
|
-
/* @__PURE__ */ l(ae, {
|
|
156
|
-
control: F,
|
|
157
|
-
disabled: rt,
|
|
158
|
-
name: "counterpart",
|
|
159
|
-
label: D._("Vendor"),
|
|
160
|
-
customerType: "vendor",
|
|
161
|
-
required: i("counterpart", Y) || o("counterpart_id", N),
|
|
162
|
-
getCounterpartDefaultValues: (e) => ({
|
|
163
|
-
tax_id: "",
|
|
164
|
-
counterpart: {
|
|
165
|
-
email: r?.counterpart_raw_data?.email ?? "",
|
|
166
|
-
phone: r?.counterpart_raw_data?.phone ?? "",
|
|
167
|
-
isCustomer: !1,
|
|
168
|
-
isVendor: !0,
|
|
169
|
-
line1: r?.counterpart_raw_data?.address?.line1 ?? "",
|
|
170
|
-
line2: r?.counterpart_raw_data?.address?.line2 ?? "",
|
|
171
|
-
city: r?.counterpart_raw_data?.address?.city ?? "",
|
|
172
|
-
state: r?.counterpart_raw_data?.address?.state ?? "",
|
|
173
|
-
postalCode: r?.counterpart_raw_data?.address?.postal_code ?? "",
|
|
174
|
-
country: "US",
|
|
175
|
-
...e === "individual" && { firstName: r?.counterpart_raw_data?.name ?? "" },
|
|
176
|
-
...e === "individual" && { lastName: "" },
|
|
177
|
-
...e === "organization" && { companyName: r?.counterpart_raw_data?.name ?? "" }
|
|
178
|
-
}
|
|
179
|
-
}),
|
|
180
|
-
counterpartMatchingToOCR: Q ? Z : void 0,
|
|
181
|
-
counterpartRawName: tt,
|
|
182
|
-
showEditCounterpartButton: !0,
|
|
183
|
-
setShowEditCounterpartDialog: q,
|
|
184
|
-
counterpartAISuggested: nt ? Z : void 0,
|
|
185
|
-
preselectedCounterpart: $
|
|
186
|
-
}),
|
|
187
|
-
/* @__PURE__ */ l(b, {
|
|
188
|
-
name: "counterpartBankAccount",
|
|
189
|
-
control: F,
|
|
190
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(Ce, {
|
|
191
|
-
variant: "standard",
|
|
192
|
-
fullWidth: !0,
|
|
193
|
-
error: !!t,
|
|
194
|
-
required: i("counterpartBankAccount", Y) || o("counterpart_bank_account_id", N),
|
|
195
|
-
children: [
|
|
196
|
-
/* @__PURE__ */ l(Ee, {
|
|
197
|
-
htmlFor: e.name,
|
|
198
|
-
children: D._("Bank account")
|
|
199
|
-
}),
|
|
200
|
-
/* @__PURE__ */ u(Oe, {
|
|
201
|
-
...e,
|
|
202
|
-
id: e.name,
|
|
203
|
-
labelId: e.name,
|
|
204
|
-
label: D._("Bank Account"),
|
|
205
|
-
MenuProps: { container: O },
|
|
206
|
-
disabled: !J?.data || J?.data?.data.length === 0,
|
|
207
|
-
children: [!ze && /* @__PURE__ */ l(f, {
|
|
208
|
-
variant: "text",
|
|
209
|
-
startIcon: /* @__PURE__ */ l(S, {}),
|
|
210
|
-
fullWidth: !0,
|
|
211
|
-
sx: {
|
|
212
|
-
justifyContent: "flex-start",
|
|
213
|
-
px: 2,
|
|
214
|
-
py: 1
|
|
215
|
-
},
|
|
216
|
-
onClick: () => q(!0),
|
|
217
|
-
children: D._("Add new bank account")
|
|
218
|
-
}), J?.data?.data.map((e) => /* @__PURE__ */ l(De, {
|
|
219
|
-
value: e.id,
|
|
220
|
-
children: ve(D, e)
|
|
221
|
-
}, e.id))]
|
|
222
|
-
}),
|
|
223
|
-
t && /* @__PURE__ */ l(we, { children: t.message })
|
|
224
|
-
]
|
|
225
|
-
})
|
|
226
|
-
}),
|
|
227
|
-
et && /* @__PURE__ */ l(b, {
|
|
228
|
-
name: "invoiceDate",
|
|
229
|
-
control: F,
|
|
230
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
|
|
231
|
-
maxDate: Ye,
|
|
232
|
-
slotProps: {
|
|
233
|
-
popper: { container: O },
|
|
234
|
-
dialog: { container: O },
|
|
235
|
-
actionBar: { actions: ["clear", "today"] },
|
|
236
|
-
textField: {
|
|
237
|
-
id: e.name,
|
|
238
|
-
variant: "outlined",
|
|
239
|
-
fullWidth: !0,
|
|
240
|
-
error: !!t,
|
|
241
|
-
helperText: t?.message,
|
|
242
|
-
required: i("invoiceDate", Y) || o("issued_at", N)
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
...e,
|
|
246
|
-
label: D._("Issue date"),
|
|
247
|
-
views: [
|
|
248
|
-
"year",
|
|
249
|
-
"month",
|
|
250
|
-
"day"
|
|
251
|
-
]
|
|
252
|
-
})
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ l(b, {
|
|
255
|
-
name: "dueDate",
|
|
256
|
-
control: F,
|
|
257
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
|
|
258
|
-
minDate: Je,
|
|
259
|
-
slotProps: {
|
|
260
|
-
popper: { container: O },
|
|
261
|
-
dialog: { container: O },
|
|
262
|
-
actionBar: { actions: ["clear", "today"] },
|
|
263
|
-
textField: {
|
|
264
|
-
id: e.name,
|
|
265
|
-
variant: "outlined",
|
|
266
|
-
fullWidth: !0,
|
|
267
|
-
error: !!t,
|
|
268
|
-
helperText: t?.message,
|
|
269
|
-
required: i("dueDate", Y)
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
...e,
|
|
273
|
-
label: D._("Due date"),
|
|
274
|
-
views: [
|
|
275
|
-
"year",
|
|
276
|
-
"month",
|
|
277
|
-
"day"
|
|
278
|
-
]
|
|
279
|
-
})
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ l(oe, {
|
|
282
|
-
name: "currency",
|
|
283
|
-
control: F,
|
|
284
|
-
required: i("currency", Y) || o("currency", N),
|
|
285
|
-
groups: it,
|
|
286
|
-
disabled: at,
|
|
287
|
-
allowedCurrencies: Ue?.payables?.availableCurrencies
|
|
288
|
-
})
|
|
289
|
-
]
|
|
290
|
-
})]
|
|
291
|
-
})
|
|
292
|
-
}),
|
|
293
|
-
/* @__PURE__ */ l(p, {
|
|
294
|
-
item: !0,
|
|
295
|
-
xs: 12,
|
|
296
|
-
children: /* @__PURE__ */ u(m, {
|
|
297
|
-
variant: "outlined",
|
|
298
|
-
sx: { p: 3 },
|
|
299
|
-
className: k + "-Items",
|
|
300
|
-
children: [/* @__PURE__ */ l(v, {
|
|
301
|
-
variant: "subtitle2",
|
|
302
|
-
mb: 2,
|
|
303
|
-
children: D._("Items")
|
|
304
|
-
}), /* @__PURE__ */ l(me, { enableGLCodes: Le })]
|
|
305
|
-
})
|
|
306
|
-
}),
|
|
307
|
-
/* @__PURE__ */ l(p, {
|
|
308
|
-
item: !0,
|
|
309
|
-
xs: 12,
|
|
310
|
-
className: k + "-Totals",
|
|
311
|
-
children: /* @__PURE__ */ l(m, {
|
|
312
|
-
variant: "outlined",
|
|
313
|
-
children: /* @__PURE__ */ l(Ae, { children: /* @__PURE__ */ u(je, { children: [
|
|
314
|
-
/* @__PURE__ */ u(g, {
|
|
315
|
-
className: k + "-Totals-Subtotal",
|
|
316
|
-
children: [/* @__PURE__ */ l(h, { children: D._("Subtotal") }), /* @__PURE__ */ l(h, {
|
|
317
|
-
align: "right",
|
|
318
|
-
children: /* @__PURE__ */ u(d, {
|
|
319
|
-
gap: .5,
|
|
320
|
-
alignItems: "center",
|
|
321
|
-
justifyContent: "flex-end",
|
|
322
|
-
display: "flex",
|
|
323
|
-
children: [G === null && !Re && /* @__PURE__ */ l(f, {
|
|
324
|
-
variant: "text",
|
|
325
|
-
startIcon: /* @__PURE__ */ l(S, {}),
|
|
326
|
-
size: "small",
|
|
327
|
-
sx: {
|
|
328
|
-
pl: 1.25,
|
|
329
|
-
pr: 2,
|
|
330
|
-
py: 0
|
|
331
|
-
},
|
|
332
|
-
onClick: () => {
|
|
333
|
-
let e = P.setValue;
|
|
334
|
-
e("discount", 0);
|
|
335
|
-
},
|
|
336
|
-
children: D._("Add Discount")
|
|
337
|
-
}), K.subtotal && W ? M(j(K.subtotal, W) || 0, W) : "—"]
|
|
338
|
-
})
|
|
339
|
-
})]
|
|
340
|
-
}),
|
|
341
|
-
G !== null && /* @__PURE__ */ u(g, {
|
|
342
|
-
className: k + "-Totals-Discount",
|
|
343
|
-
children: [/* @__PURE__ */ l(h, { children: D._("Discount") }), /* @__PURE__ */ l(h, {
|
|
344
|
-
align: "right",
|
|
345
|
-
children: /* @__PURE__ */ u(d, {
|
|
346
|
-
gap: .5,
|
|
347
|
-
alignItems: "center",
|
|
348
|
-
justifyContent: "flex-end",
|
|
349
|
-
display: "flex",
|
|
350
|
-
children: [/* @__PURE__ */ l(Te, {
|
|
351
|
-
"aria-label": "delete",
|
|
352
|
-
onClick: () => {
|
|
353
|
-
let e = P.setValue;
|
|
354
|
-
e("discount", null);
|
|
355
|
-
},
|
|
356
|
-
children: /* @__PURE__ */ l(Fe, {})
|
|
357
|
-
}), /* @__PURE__ */ l(b, {
|
|
358
|
-
name: "discount",
|
|
359
|
-
control: F,
|
|
360
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
|
|
361
|
-
...e,
|
|
362
|
-
id: e.name,
|
|
363
|
-
variant: "standard",
|
|
364
|
-
type: "number",
|
|
365
|
-
inputProps: {
|
|
366
|
-
min: 0,
|
|
367
|
-
step: .01
|
|
368
|
-
},
|
|
369
|
-
error: !!t,
|
|
370
|
-
sx: { width: 150 },
|
|
371
|
-
InputProps: { endAdornment: We(W) }
|
|
372
|
-
})
|
|
373
|
-
})]
|
|
374
|
-
})
|
|
375
|
-
})]
|
|
376
|
-
}),
|
|
377
|
-
/* @__PURE__ */ u(g, {
|
|
378
|
-
className: k + "-Totals-Taxes",
|
|
379
|
-
children: [/* @__PURE__ */ l(h, { children: D._("Tax total") }), /* @__PURE__ */ l(h, {
|
|
380
|
-
align: "right",
|
|
381
|
-
children: K.taxes && W ? M(j(K.taxes, W) || 0, W) : "—"
|
|
382
|
-
})]
|
|
383
|
-
}),
|
|
384
|
-
/* @__PURE__ */ u(g, {
|
|
385
|
-
className: k + "-Totals-Total",
|
|
386
|
-
children: [/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(v, {
|
|
387
|
-
variant: "subtitle1",
|
|
388
|
-
children: D._("Total")
|
|
389
|
-
}) }), /* @__PURE__ */ l(h, {
|
|
390
|
-
align: "right",
|
|
391
|
-
children: /* @__PURE__ */ l(v, {
|
|
392
|
-
variant: "subtitle1",
|
|
393
|
-
children: K.total && W ? M(j(K.total, W) || 0, W) : "—"
|
|
394
|
-
})
|
|
395
|
-
})]
|
|
396
|
-
})
|
|
397
|
-
] }) })
|
|
398
|
-
})
|
|
399
|
-
})
|
|
400
|
-
]
|
|
401
|
-
})
|
|
402
|
-
})
|
|
403
|
-
})
|
|
404
|
-
}), H && /* @__PURE__ */ l(re, {
|
|
405
|
-
counterpartId: H,
|
|
406
|
-
open: Ze,
|
|
407
|
-
onClose: () => q(!1),
|
|
408
|
-
customerType: "vendor"
|
|
409
|
-
})] });
|
|
410
|
-
};
|
|
411
|
-
//#endregion
|
|
412
|
-
export { C as PayableDetailsForm };
|
|
1
|
+
import "./index297.js";
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let { api: n } = e();
|
|
5
|
+
return n.finops.getPaymentLinksId.useQuery({ path: { payment_link_id: t ?? "" } }, { enabled: !!t });
|
|
6
|
+
}, n = () => {
|
|
7
|
+
let { api: t } = e(), n = t.finops.postPaymentLinks.useMutation({});
|
|
8
|
+
return async (e, t, r, i) => n.mutateAsync({
|
|
9
|
+
recipient: {
|
|
10
|
+
id: t,
|
|
11
|
+
type: "counterpart"
|
|
12
|
+
},
|
|
13
|
+
object: {
|
|
14
|
+
id: e,
|
|
15
|
+
type: "payable"
|
|
16
|
+
},
|
|
17
|
+
payment_methods: r,
|
|
18
|
+
expires_at: new Date(Date.now() + i * 24 * 3600 * 1e3).toISOString()
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { n as useCreatePayablePaymentLink, t as usePaymentLinkById };
|
|
@@ -1,22 +1,95 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRootElements as e } from "./index47.js";
|
|
2
|
+
import "./index48.js";
|
|
3
|
+
import { usePaymentIntentById as t } from "./index145.js";
|
|
4
|
+
import "./index148.js";
|
|
5
|
+
import { useCreatePayablePaymentLink as n, usePaymentLinkById as r } from "./index299.js";
|
|
6
|
+
import { useEffect as i, useState as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
|
|
8
|
+
import { toast as c } from "react-hot-toast";
|
|
9
|
+
import { Box as l, CircularProgress as u, Modal as d } from "@mui/material";
|
|
10
|
+
import { useLingui as f } from "@lingui/react";
|
|
2
11
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js
|
|
3
|
-
var
|
|
4
|
-
let {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
var p = (p, m, h, g) => {
|
|
13
|
+
let { i18n: _ } = f(), { root: v } = e(), y = n(), [b, x] = a(!1), [S, C] = a(null), [w, T] = a(null), [E, D] = a(!1), { data: O, isSuccess: k } = t(g ?? "");
|
|
14
|
+
i(() => {
|
|
15
|
+
k && O?.payment_link_id && g && T(O.payment_link_id);
|
|
16
|
+
}, [
|
|
17
|
+
k,
|
|
18
|
+
O,
|
|
19
|
+
g
|
|
20
|
+
]);
|
|
21
|
+
let { data: A, refetch: j, isSuccess: M, isLoading: N } = r(w ?? "");
|
|
22
|
+
return i(() => {
|
|
23
|
+
M && A?.payment_intent?.status === "processing" && h?.(p ?? "", A?.payment_intent?.status ?? "");
|
|
24
|
+
}, [
|
|
25
|
+
A,
|
|
26
|
+
M,
|
|
27
|
+
h,
|
|
28
|
+
p
|
|
29
|
+
]), {
|
|
30
|
+
handlePay: async () => {
|
|
31
|
+
if (!m) {
|
|
32
|
+
c.error(_._("Vendor not found. Please create a vendor first."));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!E) try {
|
|
36
|
+
if (N) {
|
|
37
|
+
c.error(_._("Payment link is still loading. Please wait a moment and try again."));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (!w || M && A?.payment_intent?.status !== "created") {
|
|
41
|
+
if (D(!0), !p) throw Error("Payable ID is undefined");
|
|
42
|
+
let e = await y(p, m, ["sepa_credit"], 60);
|
|
43
|
+
if (e.payment_page_url) T(e.id), C(e.payment_page_url);
|
|
44
|
+
else throw T(null), C(null), Error("No payment page URL in response");
|
|
45
|
+
} else if (A?.payment_page_url) C(A.payment_page_url);
|
|
46
|
+
else throw Error("No payment page URL in existing payment link");
|
|
47
|
+
x(!0);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
console.error("Payment link creation/retrieval error:", e), c.error(g && O?.status === "created" ? _._("Failed to retrieve payment link. Please try again.") : _._("Failed to create payment link. Please try again.")), x(!1);
|
|
50
|
+
} finally {
|
|
51
|
+
D(!1);
|
|
52
|
+
}
|
|
12
53
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
54
|
+
isCreatingPaymentLink: E,
|
|
55
|
+
modalComponent: /* @__PURE__ */ o(d, {
|
|
56
|
+
open: b,
|
|
57
|
+
onClose: async () => {
|
|
58
|
+
await j(), x(!1), C(null);
|
|
59
|
+
},
|
|
60
|
+
container: v,
|
|
61
|
+
children: /* @__PURE__ */ o(l, {
|
|
62
|
+
sx: {
|
|
63
|
+
position: "absolute",
|
|
64
|
+
top: "50%",
|
|
65
|
+
left: "50%",
|
|
66
|
+
transform: "translate(-50%, -50%)",
|
|
67
|
+
width: "80%",
|
|
68
|
+
maxWidth: 600,
|
|
69
|
+
bgcolor: "background.paper",
|
|
70
|
+
boxShadow: 24,
|
|
71
|
+
p: 4,
|
|
72
|
+
borderRadius: 2
|
|
73
|
+
},
|
|
74
|
+
children: S ? /* @__PURE__ */ o("iframe", {
|
|
75
|
+
src: S,
|
|
76
|
+
title: "Payment Page",
|
|
77
|
+
width: "100%",
|
|
78
|
+
height: "400px",
|
|
79
|
+
style: { border: "none" }
|
|
80
|
+
}) : /* @__PURE__ */ s(l, {
|
|
81
|
+
sx: {
|
|
82
|
+
display: "flex",
|
|
83
|
+
flexDirection: "column",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
gap: 2,
|
|
86
|
+
py: 4
|
|
87
|
+
},
|
|
88
|
+
children: [/* @__PURE__ */ o(u, {}), /* @__PURE__ */ o("p", { children: _._("Loading payment page...") })]
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
};
|
|
20
93
|
};
|
|
21
94
|
//#endregion
|
|
22
|
-
export {
|
|
95
|
+
export { p as usePaymentHandler };
|
|
@@ -1,95 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { useCreatePayablePaymentLink as n, usePaymentLinkById as r } from "./index300.js";
|
|
6
|
-
import { useEffect as i, useState as a } from "react";
|
|
7
|
-
import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
|
|
8
|
-
import { toast as c } from "react-hot-toast";
|
|
9
|
-
import { Box as l, CircularProgress as u, Modal as d } from "@mui/material";
|
|
10
|
-
import { useLingui as f } from "@lingui/react";
|
|
1
|
+
import { getAPIErrorMessage as e } from "./index26.js";
|
|
2
|
+
import { useMoniteContext as t } from "./index45.js";
|
|
3
|
+
import { toast as n } from "react-hot-toast";
|
|
4
|
+
import { useLingui as r } from "@lingui/react";
|
|
11
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js
|
|
12
|
-
var
|
|
13
|
-
let {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let { data: A, refetch: j, isSuccess: M, isLoading: N } = r(w ?? "");
|
|
22
|
-
return i(() => {
|
|
23
|
-
M && A?.payment_intent?.status === "processing" && h?.(p ?? "", A?.payment_intent?.status ?? "");
|
|
24
|
-
}, [
|
|
25
|
-
A,
|
|
26
|
-
M,
|
|
27
|
-
h,
|
|
28
|
-
p
|
|
29
|
-
]), {
|
|
30
|
-
handlePay: async () => {
|
|
31
|
-
if (!m) {
|
|
32
|
-
c.error(_._("Vendor not found. Please create a vendor first."));
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (!E) try {
|
|
36
|
-
if (N) {
|
|
37
|
-
c.error(_._("Payment link is still loading. Please wait a moment and try again."));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (!w || M && A?.payment_intent?.status !== "created") {
|
|
41
|
-
if (D(!0), !p) throw Error("Payable ID is undefined");
|
|
42
|
-
let e = await y(p, m, ["sepa_credit"], 60);
|
|
43
|
-
if (e.payment_page_url) T(e.id), C(e.payment_page_url);
|
|
44
|
-
else throw T(null), C(null), Error("No payment page URL in response");
|
|
45
|
-
} else if (A?.payment_page_url) C(A.payment_page_url);
|
|
46
|
-
else throw Error("No payment page URL in existing payment link");
|
|
47
|
-
x(!0);
|
|
48
|
-
} catch (e) {
|
|
49
|
-
console.error("Payment link creation/retrieval error:", e), c.error(g && O?.status === "created" ? _._("Failed to retrieve payment link. Please try again.") : _._("Failed to create payment link. Please try again.")), x(!1);
|
|
50
|
-
} finally {
|
|
51
|
-
D(!1);
|
|
52
|
-
}
|
|
6
|
+
var i = (i, a, o, s) => {
|
|
7
|
+
let { api: c, queryClient: l } = t(), { i18n: u } = r();
|
|
8
|
+
return c.finops.postApprovalRequestsIdReject.useMutation({ path: { approval_request_id: i } }, {
|
|
9
|
+
onSuccess: () => {
|
|
10
|
+
if (c.finops.getApprovalRequests.invalidateQueries(l), n.success(u._("Payable “{document_id}” has been rejected", { document_id: s })), o) return a?.(o ?? ""), new Promise((e) => {
|
|
11
|
+
setTimeout(() => {
|
|
12
|
+
Promise.all([c.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: o ?? "" } } }, l), c.finops.getPayables.invalidateQueries(l)]).then(() => e());
|
|
13
|
+
}, 500);
|
|
14
|
+
});
|
|
53
15
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
await j(), x(!1), C(null);
|
|
59
|
-
},
|
|
60
|
-
container: v,
|
|
61
|
-
children: /* @__PURE__ */ o(l, {
|
|
62
|
-
sx: {
|
|
63
|
-
position: "absolute",
|
|
64
|
-
top: "50%",
|
|
65
|
-
left: "50%",
|
|
66
|
-
transform: "translate(-50%, -50%)",
|
|
67
|
-
width: "80%",
|
|
68
|
-
maxWidth: 600,
|
|
69
|
-
bgcolor: "background.paper",
|
|
70
|
-
boxShadow: 24,
|
|
71
|
-
p: 4,
|
|
72
|
-
borderRadius: 2
|
|
73
|
-
},
|
|
74
|
-
children: S ? /* @__PURE__ */ o("iframe", {
|
|
75
|
-
src: S,
|
|
76
|
-
title: "Payment Page",
|
|
77
|
-
width: "100%",
|
|
78
|
-
height: "400px",
|
|
79
|
-
style: { border: "none" }
|
|
80
|
-
}) : /* @__PURE__ */ s(l, {
|
|
81
|
-
sx: {
|
|
82
|
-
display: "flex",
|
|
83
|
-
flexDirection: "column",
|
|
84
|
-
alignItems: "center",
|
|
85
|
-
gap: 2,
|
|
86
|
-
py: 4
|
|
87
|
-
},
|
|
88
|
-
children: [/* @__PURE__ */ o(u, {}), /* @__PURE__ */ o("p", { children: _._("Loading payment page...") })]
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
};
|
|
16
|
+
onError: (t) => {
|
|
17
|
+
n.error(e(u, t));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
93
20
|
};
|
|
94
21
|
//#endregion
|
|
95
|
-
export {
|
|
22
|
+
export { i as useRejectApprovalRequest };
|