@tesouro/embedded-components-react 0.2.5 → 0.2.6
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/ReceivablesWidget.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +17 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index110.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +22 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +23 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +2 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +35 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +4 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +25 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +1269 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index13.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +32 -1270
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +12 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +97 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +8 -398
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +57 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +26 -406
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +19 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +76 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index14.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +39 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +19 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +5 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +10 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +18 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +76 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +27 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +113 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +68 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +33 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +9 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +15 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +11 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +12 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +39 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +75 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +58 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +196 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +14 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +26 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +76 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +28 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +41 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +7 -121
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +253 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +181 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +109 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +101 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +109 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +53 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +62 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +75 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +48 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +24 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +54 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +148 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +72 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +70 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +234 -195
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +124 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +32 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +53 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +33 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index190.js +26 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +67 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +24 -251
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +18 -180
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +12 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +10 -115
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +19 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +49 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +5 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index2.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +54 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +8 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +21 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +18 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +11 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +12 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +91 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +32 -236
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +12 -124
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +12 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +23 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +12 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +10 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +117 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +9 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +47 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +47 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +10 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +43 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +11 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +152 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +27 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +3 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +25 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +93 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +98 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +10 -89
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +13 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +57 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +397 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +68 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +406 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +32 -141
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +47 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +25 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +5 -183
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +74 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +32 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +19 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +38 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +345 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +299 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +103 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +161 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +250 -474
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +23 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +18 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +149 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +10 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +19 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +145 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +85 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +20 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +183 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +24 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +23 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +32 -190
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +62 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +49 -343
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +27 -302
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +124 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +44 -162
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +72 -266
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +157 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +29 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +78 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +21 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +15 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +171 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +129 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +14 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +157 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +12 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +15 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +62 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +66 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +60 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +8 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +9 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +61 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +22 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index3.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +63 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +14 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +2 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +93 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +96 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +192 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +22 -190
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +55 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +27 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +56 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +60 -300
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +12 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +46 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +40 -255
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +34 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +6 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +99 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +21 -207
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +25 -154
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +31 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +53 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +18 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +12 -113
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +23 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +37 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +50 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +95 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +42 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +39 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +17 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +57 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +87 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +124 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +36 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +37 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +9 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +38 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +41 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +53 -98
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +11 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +62 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +70 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +34 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +186 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +25 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +155 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +74 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +22 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +302 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +44 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +15 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +21 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +40 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +75 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +85 -126
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +44 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +255 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +45 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +49 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +203 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +158 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +111 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +51 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +71 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +112 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +42 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +479 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index37.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +163 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +38 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +59 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +31 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +113 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +21 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +41 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +55 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +15 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +27 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index38.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +40 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +58 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +96 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +109 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +88 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +94 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +37 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +33 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +11 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +4 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +32 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +5 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +127 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +25 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +24 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +12 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +22 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +47 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +22 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +28 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index4.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +38 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +51 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +16 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +66 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +47 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +24 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +31 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +19 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +23 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index41.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +74 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +93 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +35 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +34 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +32 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +15 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +6 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +85 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +33 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index42.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +8 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +10 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +64 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +13 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +14 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +11 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +61 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +21 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +56 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +115 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +9 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +21 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +28 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +22 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +38 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +53 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +32 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +22 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +30 -65
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +31 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +139 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +19 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +80 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +66 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +67 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +74 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +46 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +27 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +30 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index450.js +121 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +17 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +16 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +16 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +16 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +72 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +16 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +16 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +16 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +11 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +31 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +50 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +92 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +14 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +74 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +9 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +68 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +20 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +40 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +34 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +16 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +15 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +51 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +57 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +29 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +32 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +68 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +55 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index48.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +39 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +16 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +15 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +132 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +16 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +20 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +74 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +86 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +53 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +52 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index49.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +52 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +29 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +38 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +46 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +51 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +42 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +11 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +17 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +83 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index5.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +38 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +74 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +4 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +60 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +48 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +39 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +18 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index57.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index6.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index60.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index8.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index80.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index90.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index91.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index96.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +25 -25
- package/package.json +1 -1
|
@@ -1,123 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { zodResolver as B } from "@hookform/resolvers/zod";
|
|
8
|
-
import { Button as C } from "./index86.js";
|
|
9
|
-
import { getUpdateCounterpartValidationSchema as O } from "./index250.js";
|
|
10
|
-
import "./index59.js";
|
|
11
|
-
import { toast as x } from "react-hot-toast";
|
|
12
|
-
import "date-fns";
|
|
13
|
-
import { getCounterpartName as N } from "./index7.js";
|
|
14
|
-
import { useUpdateCounterpartAddress as R } from "./index327.js";
|
|
15
|
-
import { LanguageCodeEnum as q } from "./index252.js";
|
|
16
|
-
import { LoadingSpinner as G } from "./index152.js";
|
|
17
|
-
const de = ({
|
|
18
|
-
customerType: g,
|
|
19
|
-
counterpart: t,
|
|
20
|
-
counterpartAddress: a,
|
|
21
|
-
handleClose: z,
|
|
22
|
-
onUpdate: i
|
|
23
|
-
}) => {
|
|
24
|
-
const {
|
|
25
|
-
i18n: o
|
|
26
|
-
} = V(), S = `vendor-form-${j()}`, {
|
|
27
|
-
mutate: y,
|
|
28
|
-
isPending: b
|
|
29
|
-
} = M(), {
|
|
30
|
-
mutateAsync: m,
|
|
31
|
-
isPending: E
|
|
32
|
-
} = R({
|
|
33
|
-
counterpartId: a?.counterpart_id ?? "",
|
|
34
|
-
addressId: a?.id ?? ""
|
|
35
|
-
}), v = E || b, r = t.type, l = "individual" in t ? t.individual.email : t.organization.email, p = ("individual" in t ? t.individual.phone : t.organization.phone) ?? "", u = "individual" in t ? t.individual.last_name : "", n = "organization" in t ? t.organization.legal_name : t.individual.first_name, $ = k(() => ({
|
|
36
|
-
remindersEnabled: t.reminders_enabled,
|
|
37
|
-
isCustomer: t.is_customer,
|
|
38
|
-
isVendor: t.is_vendor,
|
|
39
|
-
tax_id: t.tax_id ?? "",
|
|
40
|
-
email: l,
|
|
41
|
-
phone: p,
|
|
42
|
-
line1: a?.line1,
|
|
43
|
-
line2: a?.line2 ?? "",
|
|
44
|
-
city: a?.city,
|
|
45
|
-
state: a?.state,
|
|
46
|
-
country: a?.country,
|
|
47
|
-
postalCode: a?.postal_code,
|
|
48
|
-
firstName: n,
|
|
49
|
-
lastName: u,
|
|
50
|
-
companyName: n
|
|
51
|
-
}), [t, a]), s = I({
|
|
52
|
-
resolver: B(O(o, r, g)),
|
|
53
|
-
defaultValues: $
|
|
54
|
-
}), L = D((c) => {
|
|
55
|
-
c.preventDefault(), c.stopPropagation(), s.handleSubmit(async (e) => {
|
|
56
|
-
const P = q.find((f) => f === o.locale.split("-")[0]) ?? "en", h = {
|
|
57
|
-
city: e.city,
|
|
58
|
-
country: e.country,
|
|
59
|
-
line1: e.line1,
|
|
60
|
-
line2: e.line2,
|
|
61
|
-
state: e.state,
|
|
62
|
-
postal_code: e.postalCode
|
|
63
|
-
}, U = e.city !== a?.city || e.country !== a?.country || e.line1 !== a?.line1 || (e.line2 ?? "") !== (a?.line2 ?? "") || e.state !== a?.state || e.postalCode !== a?.postal_code, w = {
|
|
64
|
-
reminders_enabled: e.remindersEnabled,
|
|
65
|
-
is_customer: t.is_customer,
|
|
66
|
-
is_vendor: t.is_vendor,
|
|
67
|
-
tax_id: e.tax_id
|
|
68
|
-
};
|
|
69
|
-
if (e.remindersEnabled !== !!t.reminders_enabled || e.tax_id !== (t.tax_id ?? "") || e.phone !== p || e.email !== l || r === "organization" && e.companyName !== n || r === "individual" && e.firstName !== n || r === "individual" && e.lastName !== u) {
|
|
70
|
-
U && await m(h);
|
|
71
|
-
const f = r === "individual" ? {
|
|
72
|
-
...w,
|
|
73
|
-
individual: {
|
|
74
|
-
first_name: e.firstName,
|
|
75
|
-
last_name: e.lastName,
|
|
76
|
-
phone: e.phone,
|
|
77
|
-
email: e.email
|
|
78
|
-
}
|
|
79
|
-
} : {
|
|
80
|
-
...w,
|
|
81
|
-
language: t.language ?? P,
|
|
82
|
-
organization: {
|
|
83
|
-
legal_name: e.companyName,
|
|
84
|
-
phone: e.phone,
|
|
85
|
-
email: e.email
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return y({
|
|
89
|
-
path: {
|
|
90
|
-
counterpart_id: t.id
|
|
91
|
-
},
|
|
92
|
-
body: f
|
|
93
|
-
}, {
|
|
94
|
-
onSuccess: ({
|
|
95
|
-
id: F
|
|
96
|
-
}) => {
|
|
97
|
-
i && i(F);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
} else
|
|
101
|
-
return m(h, {
|
|
102
|
-
onSuccess: () => {
|
|
103
|
-
x.success(o._("{name} has been updated.", {
|
|
104
|
-
name: N(t)
|
|
105
|
-
})), i && i(t.id);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
})(c);
|
|
109
|
-
}, [y, m, x, N, i, r, s.handleSubmit, o, n, p, l, u]);
|
|
110
|
-
return /* @__PURE__ */ d(A, { ...s, children: /* @__PURE__ */ _("form", { id: S, onSubmit: L, className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100", children: [
|
|
111
|
-
/* @__PURE__ */ d(T, { counterpartType: r, isLoading: b, isEditMode: !0, customerType: g }),
|
|
112
|
-
/* @__PURE__ */ _("div", { className: "ttw:flex ttw:gap-4 ttw:pt-6", children: [
|
|
113
|
-
/* @__PURE__ */ d(C, { type: "button", variant: "outline", className: "ttw:border-border ttw:flex-1", onClick: z, children: o._("Cancel") }),
|
|
114
|
-
/* @__PURE__ */ _(C, { type: "submit", className: "ttw:flex-1", disabled: v || !s.formState.isDirty && t.type === r, children: [
|
|
115
|
-
v && /* @__PURE__ */ d(G, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }),
|
|
116
|
-
o._("Save")
|
|
117
|
-
] })
|
|
118
|
-
] })
|
|
119
|
-
] }) });
|
|
120
|
-
};
|
|
1
|
+
function s(...r) {
|
|
2
|
+
let o = "";
|
|
3
|
+
for (const t of r)
|
|
4
|
+
t && (o += t + " ");
|
|
5
|
+
return o;
|
|
6
|
+
}
|
|
121
7
|
export {
|
|
122
|
-
|
|
8
|
+
s as classNames
|
|
123
9
|
};
|
|
@@ -1,14 +1,258 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as le } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { EntitySection as pe } from "./index181.js";
|
|
3
|
+
import { ItemsSection as _e } from "./index182.js";
|
|
4
|
+
import { getUpdateInvoiceValidationSchema as ce } from "./index185.js";
|
|
5
|
+
import { CreateInvoiceReminderDialog as fe } from "./index187.js";
|
|
6
|
+
import { EditInvoiceReminderDialog as ve } from "./index189.js";
|
|
7
|
+
import { RemindersSection as ye } from "./index190.js";
|
|
8
|
+
import { INVOICE_DOCUMENT_AUTO_ID as ge } from "./index289.js";
|
|
9
|
+
import { useInvoiceReminderDialogs as he } from "./index197.js";
|
|
10
|
+
import { useMeasureUnitsMapping as be } from "./index313.js";
|
|
11
|
+
import { useUpdateReceivable as xe } from "./index314.js";
|
|
12
|
+
import { useUpdateReceivableLineItems as we } from "./index315.js";
|
|
13
|
+
import { useLineItemSubmitCleanup as Ce } from "./index194.js";
|
|
14
|
+
import { useCounterpartById as De } from "./index72.js";
|
|
15
|
+
import "@tanstack/react-query";
|
|
16
|
+
import "./index59.js";
|
|
17
|
+
import { useCounterpartAddresses as Ie } from "./index74.js";
|
|
18
|
+
import { format as Se } from "date-fns";
|
|
19
|
+
import { useMyEntity as Re } from "./index80.js";
|
|
20
|
+
import { useMemo as U, useState as $, useCallback as Ne, useId as Me } from "react";
|
|
21
|
+
import "react-hot-toast";
|
|
22
|
+
import { useLingui as Te } from "@lingui/react";
|
|
23
|
+
import { rateMinorToMajor as Ue, rateMajorToMinor as $e } from "./index198.js";
|
|
24
|
+
import { ConfirmationModal as ke } from "./index249.js";
|
|
25
|
+
import { Dialog as Ve, DialogContent as Ee, DialogHeader as Fe, DialogTitle as Le, DialogDescription as Oe, DialogClose as Pe } from "./index178.js";
|
|
26
|
+
import { Button as k } from "./index86.js";
|
|
27
|
+
import { zodResolver as je } from "@hookform/resolvers/zod";
|
|
28
|
+
import { useForm as qe, FormProvider as Ae } from "react-hook-form";
|
|
29
|
+
import { X as Be } from "lucide-react";
|
|
30
|
+
import { InvoicePreview as ze } from "./index184.js";
|
|
31
|
+
import { useGetPaymentTerms as Ge } from "./index316.js";
|
|
32
|
+
import { useGetMeasureUnits as He } from "./index201.js";
|
|
33
|
+
import { CreateProduct as Xe } from "./index46.js";
|
|
34
|
+
const Nt = (e) => /* @__PURE__ */ r(Je, { ...e }), Je = ({
|
|
35
|
+
invoice: e,
|
|
36
|
+
onCancel: c,
|
|
37
|
+
onUpdated: V,
|
|
38
|
+
isOpen: E
|
|
39
|
+
}) => {
|
|
3
40
|
const {
|
|
4
|
-
|
|
5
|
-
} =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
41
|
+
i18n: n
|
|
42
|
+
} = Te(), {
|
|
43
|
+
data: F,
|
|
44
|
+
isLoading: L,
|
|
45
|
+
isNonVatSupported: s
|
|
46
|
+
} = Re(), {
|
|
47
|
+
data: O
|
|
48
|
+
} = Ge(), {
|
|
49
|
+
data: y,
|
|
50
|
+
isLoading: P
|
|
51
|
+
} = He(), j = U(() => ({
|
|
52
|
+
/** Customer section */
|
|
53
|
+
counterpart_id: e.counterpart_id,
|
|
54
|
+
default_shipping_address_id: e.counterpart_shipping_address?.id ?? "",
|
|
55
|
+
default_billing_address_id: e.counterpart_billing_address?.id ?? "",
|
|
56
|
+
/** Entity section */
|
|
57
|
+
fulfillment_date: e.fulfillment_date ? new Date(e.fulfillment_date) : null,
|
|
58
|
+
purchase_order: e.purchase_order ?? "",
|
|
59
|
+
footer: e.footer ?? "",
|
|
60
|
+
/** Items section */
|
|
61
|
+
line_items: e.line_items.map((t) => {
|
|
62
|
+
const a = t.product.measure_unit?.name, d = t.product.measure_unit?.id;
|
|
63
|
+
return {
|
|
64
|
+
quantity: t.quantity,
|
|
65
|
+
product_id: t.product.id,
|
|
66
|
+
tax_rate_id: t.product.tax_rate.id ?? void 0,
|
|
67
|
+
vat_rate_value: t.product.tax_rate.value,
|
|
68
|
+
product: {
|
|
69
|
+
name: t.product.name,
|
|
70
|
+
price: e.tax_mode === "inclusive" ? t.product.price_after_tax : t.product.price,
|
|
71
|
+
// Get measure_unit_id directly from the API response if available
|
|
72
|
+
measure_unit_id: d && d !== "" ? d : void 0,
|
|
73
|
+
// Store the measure unit name separately for custom units
|
|
74
|
+
measure_unit_name: !d && a ? a : void 0,
|
|
75
|
+
type: t.product.type || "product"
|
|
76
|
+
},
|
|
77
|
+
// For custom measure units that don't have an ID but have a name
|
|
78
|
+
measure_unit: !d && a ? {
|
|
79
|
+
name: a,
|
|
80
|
+
id: null
|
|
81
|
+
} : void 0,
|
|
82
|
+
tax_rate_value: s && t.product.tax_rate.value !== void 0 ? Ue(t.product.tax_rate.value) : void 0
|
|
83
|
+
};
|
|
84
|
+
}),
|
|
85
|
+
tax_exemption_rationale: e.tax_exemption_rationale ?? "",
|
|
86
|
+
memo: e.memo ?? "",
|
|
87
|
+
/** Payment section */
|
|
88
|
+
bank_account_id: e.bank_account_id ?? "",
|
|
89
|
+
payment_terms_id: e.payment_terms?.id ?? "",
|
|
90
|
+
/** Reminders section */
|
|
91
|
+
payment_reminder_id: e.payment_reminder_id ?? "",
|
|
92
|
+
overdue_reminder_id: e.overdue_reminder_id ?? "",
|
|
93
|
+
tax_mode: e.tax_mode ?? "exclusive"
|
|
94
|
+
}), [e, s]), g = qe({
|
|
95
|
+
resolver: je(ce(n, s)),
|
|
96
|
+
defaultValues: j
|
|
97
|
+
}), f = e.currency, {
|
|
98
|
+
handleSubmit: q,
|
|
99
|
+
formState: {
|
|
100
|
+
isDirty: h
|
|
101
|
+
},
|
|
102
|
+
getValues: b,
|
|
103
|
+
setValue: x,
|
|
104
|
+
reset: A,
|
|
105
|
+
watch: o
|
|
106
|
+
} = g, {
|
|
107
|
+
registerLineItemCleanupFn: B,
|
|
108
|
+
runLineItemCleanup: z
|
|
109
|
+
} = Ce();
|
|
110
|
+
be(y, b, A);
|
|
111
|
+
const [G, w] = $(!1), [C, v] = $(!1), H = Ne(() => {
|
|
112
|
+
if (!h) {
|
|
113
|
+
c();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
w(!0);
|
|
117
|
+
}, [h, c]), D = we(e.id), I = xe(e.id), X = o("line_items"), J = o("payment_terms_id"), Y = o("fulfillment_date"), K = o("memo"), Q = o("footer"), W = o("purchase_order"), Z = o("bank_account_id"), ee = o("tax_mode"), S = o("counterpart_id"), R = o("default_billing_address_id"), {
|
|
118
|
+
data: te
|
|
119
|
+
} = De(S), {
|
|
120
|
+
data: N
|
|
121
|
+
} = Ie(S), ae = U(() => N?.data?.find((t) => t.id === R), [R, N?.data]), l = D.isPending || I.isPending || L || P, M = `Monite-Form-receivablesDetailsForm-${Me()}`, {
|
|
122
|
+
createReminderDialog: T,
|
|
123
|
+
editReminderDialog: p,
|
|
124
|
+
onCreateReminder: re,
|
|
125
|
+
onEditOverdueReminder: ie,
|
|
126
|
+
onEditPaymentReminder: ne,
|
|
127
|
+
closeCreateReminderDialog: oe,
|
|
128
|
+
closeUpdateReminderDialog: de
|
|
129
|
+
} = he({
|
|
130
|
+
getValues: b
|
|
10
131
|
});
|
|
132
|
+
return /* @__PURE__ */ m(le, { children: [
|
|
133
|
+
/* @__PURE__ */ r(Ve, { open: E, modal: !1, children: /* @__PURE__ */ m(Ee, { fullScreen: !0, showCloseButton: !1, className: "ttw:flex", onInteractOutside: (t) => t.preventDefault(), children: [
|
|
134
|
+
/* @__PURE__ */ m("div", { className: "ttw:flex-1/2 ttw:overflow-y-auto ttw:pr-14", children: [
|
|
135
|
+
/* @__PURE__ */ m(Fe, { className: "ttw:flex-row ttw:justify-between ttw:bg-white ttw:pb-4 ttw:sticky ttw:top-0 ttw:z-9999", children: [
|
|
136
|
+
/* @__PURE__ */ r(Le, { className: "ttw:sr-only", children: n._("Edit invoice") }),
|
|
137
|
+
/* @__PURE__ */ r(Oe, { className: "ttw:sr-only", children: n._("Edit invoice") }),
|
|
138
|
+
/* @__PURE__ */ r(Pe, { asChild: !0, children: /* @__PURE__ */ r(k, { variant: "ghost", onClick: H, disabled: l, "aria-label": n._("Close"), children: /* @__PURE__ */ r(Be, {}) }) }),
|
|
139
|
+
/* @__PURE__ */ r(k, { type: "submit", form: M, disabled: l, children: n._("Update") })
|
|
140
|
+
] }),
|
|
141
|
+
/* @__PURE__ */ r(Ae, { ...g, children: /* @__PURE__ */ r("form", { id: M, noValidate: !0, onSubmit: async (t) => {
|
|
142
|
+
t.preventDefault(), z(), await q((a) => {
|
|
143
|
+
const d = {
|
|
144
|
+
data: a.line_items.map((i) => {
|
|
145
|
+
const u = i;
|
|
146
|
+
let _;
|
|
147
|
+
if (u.product.measure_unit_id) {
|
|
148
|
+
const se = u.product.measure_unit_id;
|
|
149
|
+
_ = y?.data?.find((ue) => ue.id === se)?.name;
|
|
150
|
+
} else (u.product.measure_unit_name || u.measure_unit?.name) && (_ = u.product.measure_unit_name || u.measure_unit?.name);
|
|
151
|
+
return {
|
|
152
|
+
quantity: i.quantity,
|
|
153
|
+
tax_status: "taxable",
|
|
154
|
+
product: {
|
|
155
|
+
name: i.product.name,
|
|
156
|
+
type: i.product.type,
|
|
157
|
+
measure_unit: _ ? {
|
|
158
|
+
name: _
|
|
159
|
+
} : void 0,
|
|
160
|
+
price: i.product.price ? {
|
|
161
|
+
currency: i.product.price.currency ?? "USD",
|
|
162
|
+
value: Math.round(i.product.price.value ?? 0)
|
|
163
|
+
} : void 0
|
|
164
|
+
},
|
|
165
|
+
// For non-VAT supported regions, use tax_rate_value
|
|
166
|
+
...s ? {
|
|
167
|
+
tax_rate_value: i.tax_rate_value !== void 0 ? $e(i.tax_rate_value) : void 0
|
|
168
|
+
} : {
|
|
169
|
+
vat_rate_id: i.vat_rate_id
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
})
|
|
173
|
+
}, me = {
|
|
174
|
+
invoice: {
|
|
175
|
+
/** Customer section */
|
|
176
|
+
counterpart_id: a.counterpart_id,
|
|
177
|
+
currency: f,
|
|
178
|
+
memo: a.memo,
|
|
179
|
+
tax_exemption_rationale: a.tax_exemption_rationale,
|
|
180
|
+
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
181
|
+
counterpart_shipping_address_id: a?.default_shipping_address_id || null,
|
|
182
|
+
counterpart_billing_address_id: a?.default_billing_address_id,
|
|
183
|
+
/** We shouldn't send an empty string to the server if the value is not set */
|
|
184
|
+
bank_account_id: e.bank_account_id,
|
|
185
|
+
bank_account_type: e.bank_account_type,
|
|
186
|
+
payment_terms_id: a.payment_terms_id,
|
|
187
|
+
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
188
|
+
fulfillment_date: a.fulfillment_date ? (
|
|
189
|
+
/**
|
|
190
|
+
* We have to change the date as Backend accepts it.
|
|
191
|
+
* There is no `time` in request, only year, month and date
|
|
192
|
+
*/
|
|
193
|
+
Se(a.fulfillment_date, "yyyy-MM-dd")
|
|
194
|
+
) : null,
|
|
195
|
+
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
196
|
+
payment_reminder_id: a.payment_reminder_id || null,
|
|
197
|
+
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
198
|
+
overdue_reminder_id: a.overdue_reminder_id || null
|
|
199
|
+
/** !!! Note !!! Backend is not supported to edit `purchase_order` so we have to remove it */
|
|
200
|
+
// purchase_order: values.purchase_order || undefined,
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
D.mutate(d, {
|
|
204
|
+
onSuccess: () => {
|
|
205
|
+
I.mutate(me, {
|
|
206
|
+
onSuccess: (i) => {
|
|
207
|
+
V(i);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
})(t);
|
|
213
|
+
}, className: "ttw:mb-14", children: /* @__PURE__ */ m("div", { className: "ttw:flex ttw:flex-col ttw:gap-8", children: [
|
|
214
|
+
/* @__PURE__ */ m("h1", { className: "ttw:text-2xl ttw:font-bold", children: [
|
|
215
|
+
n._("Invoice"),
|
|
216
|
+
" ",
|
|
217
|
+
/* @__PURE__ */ m("span", { className: "ttw:text-gray-500", children: [
|
|
218
|
+
"#",
|
|
219
|
+
e.document_id ?? ge
|
|
220
|
+
] })
|
|
221
|
+
] }),
|
|
222
|
+
/* @__PURE__ */ r(_e, { isNonVatSupported: s, actualCurrency: f, isVatSelectionDisabled: !0, shouldOverrideVatRateDefaults: !0, registerLineItemCleanupFn: B, handleOpenCreateProductDialog: () => v(!0) }),
|
|
223
|
+
/* @__PURE__ */ r(pe, { disabled: l, hidden: ["purchase_order"], visibleFields: {
|
|
224
|
+
isFooterShown: typeof e.footer == "string" && e.footer?.trim() !== "",
|
|
225
|
+
isPurchaseOrderShown: typeof e.purchase_order == "string" && e.purchase_order?.trim() !== ""
|
|
226
|
+
} }),
|
|
227
|
+
/* @__PURE__ */ r(ye, { disabled: l, onUpdateOverdueReminder: ie, onUpdatePaymentReminder: ne, onCreateReminder: re })
|
|
228
|
+
] }) }) })
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ r("div", { className: "ttw:flex-1/2 ttw:w-1/2", children: /* @__PURE__ */ r(ze, { invoiceData: {
|
|
231
|
+
payment_terms_id: J,
|
|
232
|
+
line_items: (X || []).map((t) => ({
|
|
233
|
+
...t,
|
|
234
|
+
id: t.id || `temp-${Math.random().toString(36).substr(2, 9)}`
|
|
235
|
+
})),
|
|
236
|
+
fulfillment_date: Y,
|
|
237
|
+
memo: K,
|
|
238
|
+
footer: Q,
|
|
239
|
+
bank_account_id: Z,
|
|
240
|
+
bank_account_type: e.bank_account_type,
|
|
241
|
+
tax_mode: ee,
|
|
242
|
+
purchase_order: W || void 0
|
|
243
|
+
}, counterpart: te, currency: f, isNonVatSupported: s, entityData: F, address: ae, paymentTerms: O }) })
|
|
244
|
+
] }) }),
|
|
245
|
+
C && /* @__PURE__ */ r(Xe, { open: C, onClose: () => v(!1), onCreated: () => v(!1) }),
|
|
246
|
+
/* @__PURE__ */ r(ke, { open: G, title: n._("Cancel without saving?"), message: n._("There are unsaved changes. If you leave, they will be lost."), confirmLabel: n._("Yes"), cancelLabel: n._("No"), onClose: () => w(!1), onConfirm: c }),
|
|
247
|
+
/* @__PURE__ */ r(fe, { open: T.open, reminderType: T.reminderType, onClose: oe, onCreate: ({
|
|
248
|
+
reminderId: t,
|
|
249
|
+
reminderType: a
|
|
250
|
+
}) => {
|
|
251
|
+
a === "payment" ? x("payment_reminder_id", t) : a === "overdue" && x("overdue_reminder_id", t);
|
|
252
|
+
} }),
|
|
253
|
+
p.reminderId && /* @__PURE__ */ r(ve, { open: p.open, reminderId: p.reminderId, reminderType: p.reminderType, onClose: de })
|
|
254
|
+
] });
|
|
11
255
|
};
|
|
12
256
|
export {
|
|
13
|
-
|
|
257
|
+
Nt as EditInvoiceDetails
|
|
14
258
|
};
|
|
@@ -1,14 +1,185 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as Q } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useMemo as q, useEffect as J, useState as U, useId as W, useCallback as Y } from "react";
|
|
3
|
+
import { useForm as X } from "react-hook-form";
|
|
4
|
+
import { toast as Z } from "react-hot-toast";
|
|
5
|
+
import { useMoniteContext as ee } from "./index59.js";
|
|
6
|
+
import { MoniteScopedProviders as te } from "./index85.js";
|
|
7
|
+
import { useCounterpartById as ie } from "./index72.js";
|
|
8
|
+
import "@tanstack/react-query";
|
|
9
|
+
import { useCounterpartContactList as oe } from "./index76.js";
|
|
10
|
+
import { useMe as ne, useMyEntity as ae } from "./index80.js";
|
|
11
|
+
import { useLingui as $ } from "@lingui/react";
|
|
12
|
+
import { useGetReceivableById as se } from "./index84.js";
|
|
13
|
+
import { CenteredContentBox as re } from "./index246.js";
|
|
14
|
+
import { IconWrapper as de } from "./index247.js";
|
|
15
|
+
import { zodResolver as me } from "@hookform/resolvers/zod";
|
|
16
|
+
import ce from "@mui/icons-material/ArrowBack";
|
|
17
|
+
import le from "@mui/icons-material/Close";
|
|
18
|
+
import { Dialog as ue } from "./index52.js";
|
|
19
|
+
import { DialogTitle as pe, Toolbar as fe, Grid as D, Stack as R, Button as j, Typography as ye, DialogContent as he, CircularProgress as ve } from "@mui/material";
|
|
20
|
+
import { getEmailInvoiceDetailsSchema as be } from "./index185.js";
|
|
21
|
+
import { Form as ge, FormContent as Ie } from "./index317.js";
|
|
22
|
+
import { getDefaultContact as _e } from "./index318.js";
|
|
23
|
+
import { useIssueReceivableById as Ce } from "./index319.js";
|
|
24
|
+
import { useSendReceivableById as xe } from "./index320.js";
|
|
25
|
+
import { PreviewEmail as Ee } from "./index321.js";
|
|
26
|
+
const Ye = (t) => {
|
|
3
27
|
const {
|
|
4
|
-
|
|
5
|
-
} =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, {
|
|
9
|
-
|
|
10
|
-
|
|
28
|
+
i18n: n
|
|
29
|
+
} = $(), {
|
|
30
|
+
data: a,
|
|
31
|
+
isLoading: m
|
|
32
|
+
} = ne(), {
|
|
33
|
+
data: o,
|
|
34
|
+
isLoading: b
|
|
35
|
+
} = se(t.invoiceId), {
|
|
36
|
+
entityName: s,
|
|
37
|
+
isLoading: l
|
|
38
|
+
} = ae(), {
|
|
39
|
+
data: g,
|
|
40
|
+
isLoading: i
|
|
41
|
+
} = oe(o?.counterpart_id), {
|
|
42
|
+
data: u
|
|
43
|
+
} = ie(o?.counterpart_id), r = _e(g, u), I = r?.email ?? "", p = r && a ? n._(`Hi {firstName},
|
|
44
|
+
|
|
45
|
+
Please find the invoice attached as discussed.
|
|
46
|
+
|
|
47
|
+
Kind Regards,
|
|
48
|
+
{senderName}`, {
|
|
49
|
+
firstName: r.first_name,
|
|
50
|
+
senderName: a.first_name
|
|
51
|
+
}) : n._(`Please find the invoice attached as discussed.
|
|
52
|
+
|
|
53
|
+
Kind Regards,
|
|
54
|
+
{senderName}`, {
|
|
55
|
+
senderName: a?.first_name ?? ""
|
|
56
|
+
}), _ = o && s ? o.document_id ? n._("Invoice {documentId} from {entityName}", {
|
|
57
|
+
documentId: o.document_id,
|
|
58
|
+
entityName: s
|
|
59
|
+
}) : n._("Invoice from {entityName}", {
|
|
60
|
+
entityName: s
|
|
61
|
+
}) : "";
|
|
62
|
+
return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Pe, { ...t, to: I, body: p, subject: _, isLoading: i || b || m || l, isIssued: o?.status !== "draft", isOpen: t.isOpen }) });
|
|
63
|
+
}, d = {
|
|
64
|
+
Edit: "form",
|
|
65
|
+
Preview: "preview"
|
|
66
|
+
}, Pe = ({
|
|
67
|
+
invoiceId: t,
|
|
68
|
+
subject: n,
|
|
69
|
+
body: a,
|
|
70
|
+
to: m,
|
|
71
|
+
isLoading: o,
|
|
72
|
+
isIssued: b,
|
|
73
|
+
onClose: s,
|
|
74
|
+
onSendEmail: l,
|
|
75
|
+
isOpen: g
|
|
76
|
+
}) => {
|
|
77
|
+
const {
|
|
78
|
+
i18n: i
|
|
79
|
+
} = $(), {
|
|
80
|
+
api: u,
|
|
81
|
+
entityId: r
|
|
82
|
+
} = ee(), {
|
|
83
|
+
control: I,
|
|
84
|
+
handleSubmit: p,
|
|
85
|
+
getValues: _,
|
|
86
|
+
trigger: A,
|
|
87
|
+
reset: S
|
|
88
|
+
} = X({
|
|
89
|
+
resolver: me(be(i)),
|
|
90
|
+
defaultValues: q(() => ({
|
|
91
|
+
subject: n,
|
|
92
|
+
body: a,
|
|
93
|
+
to: m
|
|
94
|
+
}), [n, a, m])
|
|
95
|
+
}), {
|
|
96
|
+
subject: F,
|
|
97
|
+
body: T
|
|
98
|
+
} = _();
|
|
99
|
+
J(() => {
|
|
100
|
+
S({
|
|
101
|
+
subject: n,
|
|
102
|
+
body: a,
|
|
103
|
+
to: m
|
|
104
|
+
});
|
|
105
|
+
}, [a, S, n, m]);
|
|
106
|
+
const C = xe(t), x = Ce(t), E = u.finops.postPaymentLinks.useMutation({}), {
|
|
107
|
+
data: P
|
|
108
|
+
} = u.finops.getEntitiesIdPaymentMethods.useQuery({
|
|
109
|
+
path: {
|
|
110
|
+
entity_id: r
|
|
111
|
+
}
|
|
112
|
+
}), [f, k] = U(d.Edit), w = `Monite-Form-emailInvoiceDetails-${W()}`, O = Y((L) => {
|
|
113
|
+
L.preventDefault();
|
|
114
|
+
const G = E.mutateAsync, H = x.mutateAsync, K = C.mutate;
|
|
115
|
+
p(async (v) => {
|
|
116
|
+
const M = P ? P.data.filter(({
|
|
117
|
+
status: N,
|
|
118
|
+
direction: z
|
|
119
|
+
}) => N === "active" && z === "receive") : [];
|
|
120
|
+
M.length === 0 ? Z.error(i._("You haven't onboarded for any payment method. Invoice is issued without a payment link.")) : (await H(void 0), await G({
|
|
121
|
+
recipient: {
|
|
122
|
+
id: r,
|
|
123
|
+
type: "entity"
|
|
124
|
+
},
|
|
125
|
+
payment_methods: M.map((N) => N.type),
|
|
126
|
+
object: {
|
|
127
|
+
id: t,
|
|
128
|
+
type: "receivable"
|
|
129
|
+
}
|
|
130
|
+
}));
|
|
131
|
+
const V = {
|
|
132
|
+
body_text: v.body,
|
|
133
|
+
subject_text: v.subject,
|
|
134
|
+
recipients: v.to ? {
|
|
135
|
+
to: [v.to]
|
|
136
|
+
} : void 0
|
|
137
|
+
};
|
|
138
|
+
K(V, {
|
|
139
|
+
onSuccess: () => {
|
|
140
|
+
l?.(t), s();
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
})(L);
|
|
144
|
+
}, [E.mutateAsync, x.mutateAsync, p, i, t, r, s, l, P, C.mutate]), y = x.isPending || C.isPending || E.isPending, B = "Monite-EmailInvoiceDetails", h = f == d.Preview;
|
|
145
|
+
return /* @__PURE__ */ c(ue, { open: g, fullScreen: !0, onClose: s, children: [
|
|
146
|
+
/* @__PURE__ */ e(pe, { className: B + "-Title", children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ c(D, { container: !0, children: [
|
|
147
|
+
/* @__PURE__ */ e(D, { item: !0, xs: 6, children: /* @__PURE__ */ c(R, { direction: "row", alignItems: "center", spacing: 2, children: [
|
|
148
|
+
f == d.Edit && /* @__PURE__ */ c(Q, { children: [
|
|
149
|
+
/* @__PURE__ */ e(j, { variant: "text", color: "primary", onClick: s, startIcon: /* @__PURE__ */ e(ce, {}), disabled: y, "data-testid": "back-button", children: i._("Back") }),
|
|
150
|
+
/* @__PURE__ */ e(ye, { variant: "h3", children: i._("Compose email") })
|
|
151
|
+
] }),
|
|
152
|
+
h && /* @__PURE__ */ e(de, { edge: "start", color: "inherit", onClick: () => {
|
|
153
|
+
k(d.Edit);
|
|
154
|
+
}, "aria-label": i._("Back to edit"), "data-testid": "close-preview-button", children: /* @__PURE__ */ e(le, {}) })
|
|
155
|
+
] }) }),
|
|
156
|
+
/* @__PURE__ */ e(D, { item: !0, xs: 6, children: /* @__PURE__ */ c(R, { direction: "row", alignItems: "center", justifyContent: "end", spacing: 2, children: [
|
|
157
|
+
f == d.Edit && /* @__PURE__ */ e(j, { variant: "outlined", color: "primary", type: "button", form: w, disabled: y || o, onClick: async () => {
|
|
158
|
+
await A() && k(d.Preview);
|
|
159
|
+
}, "data-testid": "preview-button", children: i._("Preview email") }),
|
|
160
|
+
/* @__PURE__ */ e(j, { variant: "contained", color: "primary", type: "submit", form: w, disabled: y || o, "data-testid": "issue-and-send-button", children: b ? i._("Send") : i._("Issue and Send") })
|
|
161
|
+
] }) })
|
|
162
|
+
] }) }) }),
|
|
163
|
+
/* @__PURE__ */ e(he, { className: B + "-Content", sx: {
|
|
164
|
+
mt: h ? 0 : 4,
|
|
165
|
+
p: h ? 0 : "0 32px 32px 32px",
|
|
166
|
+
height: "100%",
|
|
167
|
+
width: "100%",
|
|
168
|
+
display: "flex",
|
|
169
|
+
flexDirection: "column"
|
|
170
|
+
}, children: /* @__PURE__ */ c(ge, { formName: w, handleIssueAndSend: O, style: {
|
|
171
|
+
display: "flex",
|
|
172
|
+
flexDirection: "column",
|
|
173
|
+
flex: 1,
|
|
174
|
+
minHeight: 0,
|
|
175
|
+
width: "100%"
|
|
176
|
+
}, children: [
|
|
177
|
+
o ? /* @__PURE__ */ e(re, { className: "Monite-LoadingPage", children: /* @__PURE__ */ e(ve, {}) }) : f == d.Edit && /* @__PURE__ */ e(Ie, { invoiceId: t, control: I, isDisabled: y }),
|
|
178
|
+
h && /* @__PURE__ */ e(Ee, { invoiceId: t, body: T, subject: F })
|
|
179
|
+
] }) })
|
|
180
|
+
] });
|
|
11
181
|
};
|
|
12
182
|
export {
|
|
13
|
-
|
|
183
|
+
Ye as EmailInvoiceDetails,
|
|
184
|
+
Pe as EmailInvoiceDetailsBase
|
|
14
185
|
};
|
|
@@ -1,51 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { cn as w } from "./index102.js";
|
|
4
|
-
import { useLingui as u } from "@lingui/react";
|
|
5
|
-
import { cva as _ } from "class-variance-authority";
|
|
6
|
-
import { isBillOverdue as f } from "./index175.js";
|
|
7
|
-
function m(t) {
|
|
8
|
-
return t === "waiting_to_be_paid" || t === "partially_paid" ? "ready_to_pay" : t === "new" || t === "draft" ? "draft" : t === "approve_in_progress" ? "pending_approval" : t === "rejected" ? "rejected" : t === "paid" ? "paid" : "cancelled";
|
|
9
|
-
}
|
|
10
|
-
function v(t, a, r) {
|
|
11
|
-
const e = {
|
|
12
|
-
overdue: t._("Overdue"),
|
|
13
|
-
ready_to_pay: t._("Ready to pay"),
|
|
14
|
-
pending_approval: t._("Pending approval"),
|
|
15
|
-
rejected: t._("Rejected"),
|
|
16
|
-
draft: t._("New"),
|
|
17
|
-
paid: t._("Paid"),
|
|
18
|
-
cancelled: t._("Cancelled")
|
|
19
|
-
};
|
|
20
|
-
return r ? e.overdue : e[a];
|
|
21
|
-
}
|
|
22
|
-
const b = _("", {
|
|
23
|
-
variants: {
|
|
24
|
-
variant: {
|
|
25
|
-
overdue: "ttw:bg-red-100 ttw:text-red-700",
|
|
26
|
-
ready_to_pay: "ttw:bg-green-100 ttw:text-green-700",
|
|
27
|
-
pending_approval: "ttw:bg-blue-100 ttw:text-blue-700",
|
|
28
|
-
rejected: "ttw:bg-orange-100 ttw:text-orange-700",
|
|
29
|
-
draft: "ttw:bg-neutral-100 ttw:text-neutral-700",
|
|
30
|
-
paid: "ttw:bg-white ttw:text-green-700",
|
|
31
|
-
cancelled: "ttw:bg-white ttw:text-neutral-400"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}), C = ({
|
|
35
|
-
status: t,
|
|
36
|
-
dueDate: a,
|
|
37
|
-
className: r,
|
|
38
|
-
showBadgeBackground: e = !0,
|
|
39
|
-
showOverdueBadge: i = !1,
|
|
40
|
-
ref: o
|
|
41
|
-
}) => {
|
|
1
|
+
import { useMoniteContext as t } from "./index59.js";
|
|
2
|
+
const c = (e) => {
|
|
42
3
|
const {
|
|
43
|
-
|
|
44
|
-
} =
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
4
|
+
api: r
|
|
5
|
+
} = t();
|
|
6
|
+
return r.finops.getRecurrencesId.useQuery({
|
|
7
|
+
path: {
|
|
8
|
+
recurrence_id: e ?? ""
|
|
9
|
+
}
|
|
10
|
+
}, {
|
|
11
|
+
enabled: !!e
|
|
12
|
+
});
|
|
48
13
|
};
|
|
49
14
|
export {
|
|
50
|
-
|
|
15
|
+
c as useGetRecurrenceById
|
|
51
16
|
};
|