@tesouro/embedded-components-react 0.2.324 → 0.2.326
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/README.md +20 -25
- package/dist/experimental/WidgetSuite.d.ts +5 -5
- package/dist/experimental/index.d.ts +5 -5
- package/dist/index.css +12 -0
- package/dist/index.d.ts +21 -41
- package/dist/lib/AcceptDisclosuresWidget.d.ts +14 -34
- package/dist/lib/BalancesWidget.d.ts +5 -5
- package/dist/lib/BankAccountOnboardingWidget.d.ts +5 -5
- package/dist/lib/BankAccountsWidget.d.ts +5 -5
- package/dist/lib/BillPayWidget.d.ts +5 -5
- package/dist/lib/CardDetailsWidget.d.ts +5 -5
- package/dist/lib/CardsWidget.d.ts +5 -5
- package/dist/lib/ChartOfAccountsWidget.d.ts +5 -5
- package/dist/lib/CounterpartsWidget.d.ts +5 -5
- package/dist/lib/CreateCardWidget.d.ts +5 -5
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +5 -5
- package/dist/lib/ExpenseManagementWidget.d.ts +5 -5
- package/dist/lib/ExpenseRequirementsWidget.d.ts +5 -5
- package/dist/lib/HelpWidget.d.ts +5 -5
- package/dist/lib/InsightsWidget.d.ts +5 -5
- package/dist/lib/InvoicingWidget.d.ts +5 -5
- package/dist/lib/LinkedAccountsWidget.d.ts +5 -5
- package/dist/lib/ProductsWidget.d.ts +5 -5
- package/dist/lib/ProfileWidget.d.ts +5 -5
- package/dist/lib/ReceiptMatchWidget.d.ts +5 -5
- package/dist/lib/ReceivablesWidget.d.ts +5 -5
- package/dist/lib/SettingsWidget.d.ts +5 -5
- package/dist/lib/TagsWidget.d.ts +5 -5
- package/dist/lib/TeamWidget.d.ts +5 -5
- package/dist/lib/TransfersWidget.d.ts +5 -5
- package/dist/lib/WidgetProvider.d.ts +12 -12
- package/dist/lib/WidgetProviderPublic.d.ts +5 -5
- package/dist/lib/monite-sdk.d.ts +8 -0
- package/dist/lib/monite-sdk.js +55 -55
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +57 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +56 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +78 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +20 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +6 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +109 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +35 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +2 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +10 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +8 -445
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +11 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +73 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +19 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +441 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +41 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +76 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +62 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +28 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +39 -121
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +2 -191
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +48 -212
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +120 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +5 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +184 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +206 -289
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +162 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +58 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +60 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +296 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +6 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +6 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +19 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +69 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +49 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +24 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +76 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +87 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +10 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +26 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +17 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +3 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +54 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +34 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +101 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +55 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +55 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +55 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +3 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +1 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +56 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +34 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +74 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +7 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +79 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +1 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +56 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +39 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +1 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +8 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +21 -167
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +62 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +57 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +169 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +0 -598
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +85 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +1 -167
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +598 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +166 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +25 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +1 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +10 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +16 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +19 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +27 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +90 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +10 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +10 -126
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +75 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +1 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +127 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +11 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +53 -119
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +5 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +62 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +120 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +21 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +6 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +35 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +9 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +52 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +70 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +26 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +1 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +61 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +18 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +22 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +180 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +1 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +29 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +3 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +61 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +29 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +9 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +31 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +44 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +5 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +10 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +8 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +6 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +6 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +33 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +18 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +16 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +14 -113
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +14 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +5 -198
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +117 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +64 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +1 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +197 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +7 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +42 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +9 -422
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +19 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +5 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +420 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +1 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +88 -186
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +15 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +20 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +190 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +99 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +1 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +42 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +19 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +1 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +157 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +1 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +10 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +61 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +44 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +51 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +79 -342
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +23 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +41 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +345 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +0 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +1 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +1 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +159 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +1 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +35 -187
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +34 -132
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +4 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +103 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +187 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +132 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +211 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +11 -240
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +17 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +27 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +1 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +0 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +36 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +140 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +1 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +163 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +26 -156
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +8 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +37 -214
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +153 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +71 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +210 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +40 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +1 -188
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +77 -162
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +14 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +185 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index450.js +166 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +12 -310
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +9 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +5 -190
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +317 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +90 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +191 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +29 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +82 -445
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +133 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +37 -144
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +58 -144
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +138 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +549 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +16 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +137 -140
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +143 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +36 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +64 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +67 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +144 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +57 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +84 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +14 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +23 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +97 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +43 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +27 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +1 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +17 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +13 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +5 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +13 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +14 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +9 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +92 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +33 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +45 -130
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +66 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +23 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +173 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +142 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +124 -428
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +78 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +246 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +7 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +6 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +435 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +21 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +17 -145
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +52 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +46 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +13 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +39 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +143 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +114 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +40 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +32 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +19 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +19 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +21 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +71 -113
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +17 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +171 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +137 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +30 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +113 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +19 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +42 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +13 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +24 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +26 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +36 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +81 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +50 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +37 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +81 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +49 -104
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +34 -779
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +1 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +131 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +109 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +49 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +782 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +90 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +101 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +6 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +23 -169
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +11 -206
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +2 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +25 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +14 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +164 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +207 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +84 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +156 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +99 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +37 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +13 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +27 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +1 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +180 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +40 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +21 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +75 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +16 -130
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +19 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +12 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +11 -220
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +130 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +6 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +4 -181
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +4 -205
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +213 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +11 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +32 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +170 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +193 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +91 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +60 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +55 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +90 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +43 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +79 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +85 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +23 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +17 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +5 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +21 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +13 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +5 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +9 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +5 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +6 -146
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +69 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +111 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +80 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +141 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +28 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +91 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +3 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +24 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +68 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +1 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +66 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +27 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +33 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index94.js +41 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +79 -80
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +1 -1
- package/package.json +1 -1
|
@@ -1,316 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../shared/data-access/dist/index.js";
|
|
1
|
+
import { getAPIErrorMessage as e } from "./index26.js";
|
|
3
2
|
import { useMoniteContext as t } from "./index47.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useCounterpartAddresses as i } from "./index126.js";
|
|
7
|
-
import { useMyEntity as ee } from "./index133.js";
|
|
8
|
-
import "./index138.js";
|
|
9
|
-
import { useCreateCounterpart as a } from "./index71.js";
|
|
10
|
-
import { LanguageCodeEnum as te } from "./index110.js";
|
|
11
|
-
import { useUserPermissions as o } from "./index112.js";
|
|
12
|
-
import { useSelectableBankAccounts as s } from "./index121.js";
|
|
13
|
-
import { useCreateReceivable as c } from "./index157.js";
|
|
14
|
-
import { useUpdateReceivableLineItems as l } from "./index158.js";
|
|
15
|
-
import { useUpdateReceivable as u } from "./index159.js";
|
|
16
|
-
import { useCreateRecurrence as d } from "./index163.js";
|
|
17
|
-
import { useGetInvoiceRequiredFields as f } from "./index166.js";
|
|
18
|
-
import { useLineItemSubmitCleanup as p } from "./index171.js";
|
|
19
|
-
import { rateMajorToMinor as m } from "./index213.js";
|
|
20
|
-
import { buildPaymentTermsPayload as h } from "./index222.js";
|
|
21
|
-
import { useUpdateRecurrence as g } from "./index448.js";
|
|
22
|
-
import { useIssueReceivableById as _ } from "./index449.js";
|
|
23
|
-
import { useGetMeasureUnits as v } from "./index450.js";
|
|
24
|
-
import { useId as ne, useMemo as re, useRef as y, useState as b } from "react";
|
|
25
|
-
import { format as ie } from "date-fns";
|
|
26
|
-
import { toast as x } from "react-hot-toast";
|
|
27
|
-
import { useLingui as ae } from "@lingui/react";
|
|
3
|
+
import { toast as n } from "react-hot-toast";
|
|
4
|
+
import { useLingui as r } from "@lingui/react";
|
|
28
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
bank_account_id: e.bank_account_id || void 0,
|
|
35
|
-
bank_account_type: e.bank_account_id ? e.bank_account_type : void 0,
|
|
36
|
-
...h({
|
|
37
|
-
paymentTermId: e.payment_terms_id,
|
|
38
|
-
customDueDate: e.payment_terms_custom_date
|
|
39
|
-
}),
|
|
40
|
-
line_items: e.line_items.filter((e) => !!e.product?.name?.trim()).map((n) => ({
|
|
41
|
-
quantity: n.quantity,
|
|
42
|
-
tax_status: n.taxable ? "taxable" : "non_taxable",
|
|
43
|
-
product: {
|
|
44
|
-
name: n.product.name,
|
|
45
|
-
price: {
|
|
46
|
-
currency: n.product.price.currency,
|
|
47
|
-
value: n.product.price.value
|
|
48
|
-
},
|
|
49
|
-
measure_unit: n.product.measure_unit_id ? { name: S(t.measureUnits, n.product.measure_unit_id) ?? "" } : void 0,
|
|
50
|
-
type: "product"
|
|
6
|
+
var i = () => {
|
|
7
|
+
let { api: i, queryClient: a } = t(), { i18n: o } = r();
|
|
8
|
+
return i.finops.patchRecurrencesId.useMutation(void 0, {
|
|
9
|
+
onError(t) {
|
|
10
|
+
n.error(e(o, t));
|
|
51
11
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
memo: e.memo,
|
|
55
|
-
footer: e.footer,
|
|
56
|
-
purchase_order: e.purchase_order || void 0,
|
|
57
|
-
currency: t.currency,
|
|
58
|
-
payment_reminder_id: e.payment_reminder_id || void 0,
|
|
59
|
-
overdue_reminder_id: e.overdue_reminder_id || void 0,
|
|
60
|
-
tag_ids: [],
|
|
61
|
-
tax_mode: e.tax_mode || "exclusive",
|
|
62
|
-
attachments: e.attachments.length ? e.attachments.map(({ id: e, include_in_email: t }) => ({
|
|
63
|
-
id: e,
|
|
64
|
-
include_in_email: t
|
|
65
|
-
})) : void 0
|
|
66
|
-
}), C = (e, t) => ({ data: e.line_items.filter((e) => !!e.product?.name?.trim()).map((n) => {
|
|
67
|
-
let r = n, i;
|
|
68
|
-
return r.product.measure_unit_id ? i = S(t, r.product.measure_unit_id) : (r.product.measure_unit_name || r.measure_unit?.name) && (i = r.product.measure_unit_name || r.measure_unit?.name), {
|
|
69
|
-
quantity: n.quantity,
|
|
70
|
-
tax_status: n.taxable ? "taxable" : "non_taxable",
|
|
71
|
-
product: {
|
|
72
|
-
name: n.product.name,
|
|
73
|
-
type: n.product.type,
|
|
74
|
-
measure_unit: i ? { name: i } : void 0,
|
|
75
|
-
price: n.product.price ? {
|
|
76
|
-
currency: n.product.price.currency ?? "USD",
|
|
77
|
-
value: Math.round(n.product.price.value ?? 0)
|
|
78
|
-
} : void 0
|
|
79
|
-
},
|
|
80
|
-
tax_rate_value: n.taxable ? m(Number(e.tax_rate) || 0) : void 0
|
|
81
|
-
};
|
|
82
|
-
}) }), w = (e, t) => ({ invoice: {
|
|
83
|
-
counterpart_id: t.resolvedCounterpartId,
|
|
84
|
-
currency: t.currency,
|
|
85
|
-
memo: e.memo,
|
|
86
|
-
footer: e.footer,
|
|
87
|
-
counterpart_shipping_address_id: e?.default_shipping_address_id || null,
|
|
88
|
-
counterpart_billing_address_id: e?.default_billing_address_id || null,
|
|
89
|
-
bank_account_id: e.bank_account_id || void 0,
|
|
90
|
-
bank_account_type: e.bank_account_id ? e.bank_account_type : void 0,
|
|
91
|
-
...h({
|
|
92
|
-
paymentTermId: e.payment_terms_id,
|
|
93
|
-
customDueDate: e.payment_terms_custom_date
|
|
94
|
-
}),
|
|
95
|
-
payment_reminder_id: e.payment_reminder_id || null,
|
|
96
|
-
overdue_reminder_id: e.overdue_reminder_id || null,
|
|
97
|
-
attachments: e.attachments.length ? e.attachments.map(({ id: e, include_in_email: t }) => ({
|
|
98
|
-
id: e,
|
|
99
|
-
include_in_email: t
|
|
100
|
-
})) : null
|
|
101
|
-
} }), T = ({ mode: m, methods: h, currency: S, invoice: T, existingRecurrence: E, hasStartedRecurrence: D = !1, onComplete: O, onClose: k, submitModeRef: se }) => {
|
|
102
|
-
let { i18n: A } = ae(), { api: j, apiUrl: ce, componentSettings: le, queryClient: ue, requestFn: de } = t(), fe = o().has(e.BankAccountWriteOrg), M = !!le?.receivables?.enableEntityBankAccount, { handleSubmit: pe, watch: N, formState: me, setValue: P, clearErrors: he, trigger: ge } = h, { isDirty: _e } = me, { data: ve, isLoading: ye, isFetching: be } = ee(), { data: xe, isLoading: F } = v(), { bankAccounts: Se, isLoading: I } = s(M), Ce = Se.length > 0, [L, we] = b(!1), [Te, R] = b(!1), Ee = y("draft"), z = se ?? Ee, De = `Monite-Form-receivablesDetailsForm-${ne()}`, [B, V] = b(null), { registerLineItemCleanupFn: Oe, runLineItemCleanup: ke } = p(), { mutateAsync: Ae, isPending: je } = c(), { mutateAsync: Me, isPending: Ne } = a({ showSuccessToast: !1 }), H = T?.id ?? B?.id ?? "", { mutateAsync: U, isPending: Pe } = u(H), { mutateAsync: W, isPending: Fe } = l(H), { mutateAsync: Ie, isPending: Le } = d(), { mutateAsync: Re, isPending: ze } = g(), { mutateAsync: Be, isPending: Ve } = _(), G = je || Ne || Pe || Fe || Le || ze || Ve, He = G || F || I, K = y(null), q = () => {
|
|
103
|
-
requestAnimationFrame(() => {
|
|
104
|
-
let e = K.current, t = e?.querySelector("[aria-invalid=\"true\"]");
|
|
105
|
-
if (!e || !t) return;
|
|
106
|
-
let n = t.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop - e.clientHeight / 2 + t.offsetHeight / 2;
|
|
107
|
-
e.scrollTo({
|
|
108
|
-
top: Math.max(0, n),
|
|
109
|
-
behavior: "smooth"
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}, Ue = () => {
|
|
113
|
-
z.current = "issue", ge().then(q);
|
|
114
|
-
}, J = N("counterpart_id"), Y = N("frequency") !== "once", We = N("counterpart_email"), X = N("default_billing_address_id"), Ge = N("bank_account_id"), { data: Z, isLoading: Ke, isFetching: qe } = n(J), { data: Q, isLoading: Je, isFetching: Ye } = i(J), $ = re(() => Q?.data?.find((e) => e.id === X), [X, Q?.data]), Xe = !!(We?.trim() || r(Z)), Ze = !!J && (Ke || qe), { data: Qe, isLoading: $e, isFetching: et } = f({
|
|
115
|
-
counterpart_billing_address_id: Z?.id === J && X || void 0,
|
|
116
|
-
counterpart_country: $?.id === X && $?.country || void 0,
|
|
117
|
-
counterpart_id: J || void 0,
|
|
118
|
-
counterpart_type: Z?.id === J && Z?.type || void 0
|
|
119
|
-
}), tt = Qe?.entity?.tax_id?.required, nt = ye || be || $e || et || !!J && (Ke || qe || Je || Ye), rt = (e) => {
|
|
120
|
-
P("counterpart_id", e), P("counterpart_name", ""), P("counterpart_email", ""), he(["counterpart_id", "counterpart_email"]);
|
|
121
|
-
}, it = () => {
|
|
122
|
-
if (L) {
|
|
123
|
-
x.error(A._("Please wait for attachments to finish uploading."));
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
_e ? R(!0) : k();
|
|
127
|
-
}, at = async (e) => {
|
|
128
|
-
if (e.type !== "invoice") {
|
|
129
|
-
x.error(A._("`type` except `invoice` is not supported yet"));
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
let t = Y && !D || z.current === "issue";
|
|
133
|
-
if (t && tt && !ve?.tax_id) {
|
|
134
|
-
x.error(A._("Set your organization's Tax ID to issue invoice"));
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
let n = !e.counterpart_id && !!e.counterpart_name?.trim(), r = Z && "organization" in Z ? Z?.organization?.email : void 0, i = Z && "individual" in Z ? Z?.individual?.email : void 0, ee = r || i, a = n ? !0 : Z?.reminders_enabled, o = n ? e.counterpart_email : ee, s = !!(e.payment_reminder_id || e.overdue_reminder_id);
|
|
138
|
-
if (t && s) {
|
|
139
|
-
if (!a && o) {
|
|
140
|
-
x.error(A._("Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off."));
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (!o && a) {
|
|
144
|
-
x.error(A._("No email address is added for the selected customer. Please add it to the customer details or turn off the reminders."));
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (!a && !o) {
|
|
148
|
-
x.error(A._("Reminders are disabled for this customer, and no email address has been added for it. Please update the details or turn off reminders."));
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
let c = e.counterpart_id ?? "";
|
|
153
|
-
if (n) try {
|
|
154
|
-
c = (await Me({
|
|
155
|
-
type: "organization",
|
|
156
|
-
is_customer: !0,
|
|
157
|
-
is_vendor: !1,
|
|
158
|
-
reminders_enabled: !0,
|
|
159
|
-
language: te.find((e) => e === A.locale.split("-")[0]) ?? "en",
|
|
160
|
-
organization: {
|
|
161
|
-
legal_name: e?.counterpart_name?.trim() ?? "",
|
|
162
|
-
...e.counterpart_email ? { email: e.counterpart_email } : {}
|
|
163
|
-
}
|
|
164
|
-
})).id;
|
|
165
|
-
} catch {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
let l = e.default_shipping_address_id, u = Q?.data?.find((e) => e.id === l), d = e.line_items.filter((e) => !e.product_id && !!e.product?.name?.trim()), f = xe?.data ?? [], p, h, g = null;
|
|
169
|
-
try {
|
|
170
|
-
if (m === "create") B ? (p = B.id, await W(C(e, f)), h = await U(w(e, {
|
|
171
|
-
resolvedCounterpartId: c,
|
|
172
|
-
currency: S
|
|
173
|
-
}))) : (h = await Ae(oe(e, {
|
|
174
|
-
resolvedCounterpartId: c,
|
|
175
|
-
billingAddressId: $?.id,
|
|
176
|
-
shippingAddressId: u?.id,
|
|
177
|
-
measureUnits: f,
|
|
178
|
-
currency: S
|
|
179
|
-
}), { onSuccess: async () => {
|
|
180
|
-
await j.finops.getReceivables.invalidateQueries(ue);
|
|
181
|
-
} }), p = h.id, g = h, n && rt(c));
|
|
182
|
-
else {
|
|
183
|
-
if (!T) return;
|
|
184
|
-
await W(C(e, f)), h = await U(w(e, {
|
|
185
|
-
resolvedCounterpartId: c,
|
|
186
|
-
currency: S
|
|
187
|
-
})), p = T.id;
|
|
188
|
-
}
|
|
189
|
-
} catch {
|
|
190
|
-
n && rt(c);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
let _ = {
|
|
194
|
-
receivableId: p,
|
|
195
|
-
counterpartId: c,
|
|
196
|
-
inlineLineItems: d,
|
|
197
|
-
receivable: h,
|
|
198
|
-
hasCustomerEmail: Xe
|
|
199
|
-
}, v = () => j.finops.getReceivablesId.fetchQuery({
|
|
200
|
-
parameters: { path: { receivable_id: p } },
|
|
201
|
-
requestFn: de,
|
|
202
|
-
baseUrl: ce
|
|
203
|
-
}, ue);
|
|
204
|
-
if (Y) {
|
|
205
|
-
let t = e.frequency === "day" && e.recurrence_end_mode === "on" && !!e.recurrence_end_date, n = E ? null : void 0, r = {
|
|
206
|
-
frequency: e.frequency,
|
|
207
|
-
start_date: e.recurrence_start_date ? ie(new Date(e.recurrence_start_date), "yyyy-MM-dd") : void 0,
|
|
208
|
-
max_occurrences: t ? n : e.recurrence_max_occurrences || void 0,
|
|
209
|
-
end_date: t && e.recurrence_end_date ? ie(new Date(e.recurrence_end_date), "yyyy-MM-dd") : n,
|
|
210
|
-
subject_text: e.recurrence_subject_text || void 0,
|
|
211
|
-
body_text: e.recurrence_body_text || void 0
|
|
212
|
-
};
|
|
213
|
-
try {
|
|
214
|
-
if (E) {
|
|
215
|
-
let e = E.scheduleLocked ? {
|
|
216
|
-
max_occurrences: r.max_occurrences,
|
|
217
|
-
end_date: r.end_date,
|
|
218
|
-
subject_text: r.subject_text,
|
|
219
|
-
body_text: r.body_text
|
|
220
|
-
} : r;
|
|
221
|
-
await Re({
|
|
222
|
-
path: { recurrence_id: E.id },
|
|
223
|
-
body: e
|
|
224
|
-
});
|
|
225
|
-
} else await Ie({ body: {
|
|
226
|
-
...r,
|
|
227
|
-
invoice_id: p,
|
|
228
|
-
interval: 1,
|
|
229
|
-
automation_level: "issue"
|
|
230
|
-
} });
|
|
231
|
-
} catch {
|
|
232
|
-
!B && g && V(g);
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
V(null);
|
|
236
|
-
try {
|
|
237
|
-
h = await v();
|
|
238
|
-
} catch {}
|
|
239
|
-
O({
|
|
240
|
-
mode: "recurrence",
|
|
241
|
-
..._,
|
|
242
|
-
receivable: h
|
|
243
|
-
});
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
if (z.current === "issue") {
|
|
247
|
-
try {
|
|
248
|
-
h = await Be({ path: { receivable_id: p } }), V(null), O({
|
|
249
|
-
mode: "issue",
|
|
250
|
-
..._,
|
|
251
|
-
receivable: h
|
|
252
|
-
});
|
|
253
|
-
} catch {
|
|
254
|
-
x.error(A._("The invoice was saved but could not be issued.")), V(null), O({
|
|
255
|
-
mode: m === "edit" ? "update" : "draft",
|
|
256
|
-
..._
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
m === "create" ? x.success(A._("Invoice to {counterpartName} was created", { counterpartName: h?.counterpart_name ?? "" })) : x.success(A._("Invoice has been updated")), V(null), O({
|
|
262
|
-
mode: m === "edit" ? "update" : "draft",
|
|
263
|
-
..._
|
|
264
|
-
});
|
|
265
|
-
};
|
|
266
|
-
return {
|
|
267
|
-
formName: De,
|
|
268
|
-
onSubmit: async (e) => {
|
|
269
|
-
e.preventDefault(), ke();
|
|
270
|
-
let t = Y && !D || z.current === "issue";
|
|
271
|
-
if (L) {
|
|
272
|
-
x.error(A._("Please wait for attachments to finish uploading."));
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
if (F) {
|
|
276
|
-
x.error(A._("Please wait for invoice details to finish loading."));
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
if (t && nt) {
|
|
280
|
-
x.error(A._("Please wait for invoice checks to finish."));
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
if (t && M && I) {
|
|
284
|
-
x.error(A._("Please wait for invoice checks to finish."));
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
if (t && !fe && M && !Ge && !Ce) {
|
|
288
|
-
x.error(A._("Contact your company admin to set up a bank account before creating an invoice."));
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
await pe(at, q)(e);
|
|
292
|
-
},
|
|
293
|
-
formScrollRef: K,
|
|
294
|
-
registerLineItemCleanupFn: Oe,
|
|
295
|
-
onAttachmentsUploadingChange: we,
|
|
296
|
-
isLoading: He,
|
|
297
|
-
isSaving: G,
|
|
298
|
-
attachmentsUploading: L,
|
|
299
|
-
submitModeRef: z,
|
|
300
|
-
isRecurrenceEnabled: Y,
|
|
301
|
-
hasCustomerEmail: Xe,
|
|
302
|
-
isCustomerEmailLoading: Ze,
|
|
303
|
-
isIssuePreflightLoading: nt,
|
|
304
|
-
requestClose: it,
|
|
305
|
-
highlightForIssue: Ue,
|
|
306
|
-
discardModal: {
|
|
307
|
-
open: Te,
|
|
308
|
-
onOpenChange: R,
|
|
309
|
-
onConfirm: () => {
|
|
310
|
-
R(!1), k();
|
|
311
|
-
}
|
|
12
|
+
async onSuccess(e, t) {
|
|
13
|
+
await Promise.all([i.finops.getReceivables.invalidateQueries(a), i.finops.getRecurrencesId.invalidateQueries({ parameters: { path: { recurrence_id: t.path.recurrence_id } } }, a)]), n.success(o._("Recurring billing updated"));
|
|
312
14
|
}
|
|
313
|
-
};
|
|
15
|
+
});
|
|
314
16
|
};
|
|
315
17
|
//#endregion
|
|
316
|
-
export {
|
|
18
|
+
export { i as useUpdateRecurrence };
|
|
@@ -1,93 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useCounterpartList as l } from "./index125.js";
|
|
5
|
-
import "./index138.js";
|
|
6
|
-
import { useRootElements as u } from "./index178.js";
|
|
7
|
-
import "./index179.js";
|
|
8
|
-
import { Field as d, FieldContent as f, FieldDescription as p, FieldError as m, FieldLabel as h } from "./index88.js";
|
|
9
|
-
import { useMemo as g, useState as _ } from "react";
|
|
10
|
-
import { Loader2 as v, Search as y } from "lucide-react";
|
|
11
|
-
import { jsx as b, jsxs as x } from "@emotion/react/jsx-runtime";
|
|
12
|
-
import { useLingui as S } from "@lingui/react";
|
|
13
|
-
import { Controller as C, useFormContext as w } from "react-hook-form";
|
|
1
|
+
import { useMoniteContext as e } from "./index47.js";
|
|
2
|
+
import { toast as t } from "react-hot-toast";
|
|
3
|
+
import { useLingui as n } from "@lingui/react";
|
|
14
4
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js
|
|
15
|
-
var
|
|
16
|
-
let { i18n:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})) : [], [N]), z = g(() => {
|
|
21
|
-
let e = L.toLowerCase().trim();
|
|
22
|
-
return e ? R.filter((t) => t.name.toLowerCase().includes(e) || t.email.toLowerCase().includes(e)) : R;
|
|
23
|
-
}, [R, L]), B = g(() => z.map((e) => e.id), [z]);
|
|
24
|
-
return /* @__PURE__ */ b(C, {
|
|
25
|
-
name: "counterpart_id",
|
|
26
|
-
control: k,
|
|
27
|
-
render: ({ field: e, fieldState: { error: t } }) => {
|
|
28
|
-
let l = (t) => {
|
|
29
|
-
A("counterpart_name", ""), A("counterpart_email", ""), M(["counterpart_id", "counterpart_email"]), e.onChange(t ?? "");
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ b(d, { children: /* @__PURE__ */ x(f, { children: [
|
|
32
|
-
/* @__PURE__ */ b(h, {
|
|
33
|
-
htmlFor: "counterpart_id",
|
|
34
|
-
children: D._("Name")
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ x(r, {
|
|
37
|
-
value: e.value || null,
|
|
38
|
-
onValueChange: l,
|
|
39
|
-
inputValue: L,
|
|
40
|
-
onInputValueChange: (t, n) => {
|
|
41
|
-
if (n.reason !== "input-change") {
|
|
42
|
-
E || A("counterpart_name", "");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
A("counterpart_name", t), e.value && e.onChange(""), E && t.trim() && M("counterpart_id");
|
|
46
|
-
},
|
|
47
|
-
items: B,
|
|
48
|
-
filter: () => !0,
|
|
49
|
-
disabled: T,
|
|
50
|
-
open: F,
|
|
51
|
-
onOpenChange: I,
|
|
52
|
-
children: [/* @__PURE__ */ b(o, {
|
|
53
|
-
id: "counterpart_id",
|
|
54
|
-
placeholder: E ? D._("Search or type to add a customer") : D._("Search for a customer"),
|
|
55
|
-
"aria-invalid": !!t,
|
|
56
|
-
onKeyDown: (e) => {
|
|
57
|
-
if (e.key === "Enter") {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (e.key === "Tab" && F) {
|
|
62
|
-
let e = L.toLowerCase().trim();
|
|
63
|
-
if (!e) return;
|
|
64
|
-
let t = z.find((t) => t.name.toLowerCase() === e) ?? (z.length === 1 ? z[0] : void 0);
|
|
65
|
-
t && (l(t.id), I(!1));
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
children: /* @__PURE__ */ b(n, {
|
|
69
|
-
align: "inline-start",
|
|
70
|
-
children: P ? /* @__PURE__ */ b(v, { className: "ttw:size-4 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ b(y, { className: "ttw:size-4 ttw:text-muted-foreground" })
|
|
71
|
-
})
|
|
72
|
-
}), /* @__PURE__ */ b(i, {
|
|
73
|
-
container: O,
|
|
74
|
-
children: /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(a, { children: E ? D._("No customers found - type to add a customer") : D._("No customers found") }), z.map((e) => /* @__PURE__ */ b(s, {
|
|
75
|
-
value: e.id,
|
|
76
|
-
children: /* @__PURE__ */ x("div", {
|
|
77
|
-
className: "ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2",
|
|
78
|
-
children: [/* @__PURE__ */ b("span", { children: e.name }), /* @__PURE__ */ b("span", {
|
|
79
|
-
className: "ttw:text-muted-foreground",
|
|
80
|
-
children: e.email
|
|
81
|
-
})]
|
|
82
|
-
})
|
|
83
|
-
}, e.id))] })
|
|
84
|
-
})]
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ b(p, { children: E ? D._("Search by customer name or email. New customers will be saved when saving the invoice.") : D._("Search by customer name or email.") }),
|
|
87
|
-
/* @__PURE__ */ b(m, { errors: t ? [t] : [] })
|
|
88
|
-
] }) });
|
|
89
|
-
}
|
|
90
|
-
});
|
|
5
|
+
var r = () => {
|
|
6
|
+
let { i18n: r } = n(), { api: i, queryClient: a } = e();
|
|
7
|
+
return i.finops.postReceivablesIdIssue.useMutation(void 0, { onSuccess: async (e) => {
|
|
8
|
+
i.finops.getReceivablesId.setQueryData({ path: { receivable_id: e.id } }, e, a), await Promise.all([i.finops.getReceivables.invalidateQueries(a), i.finops.getReceivablesIdPdfLink.resetQueries({ parameters: { path: { receivable_id: e.id } } }, a)]), t.success(r._("Invoice has been issued"));
|
|
9
|
+
} });
|
|
91
10
|
};
|
|
92
11
|
//#endregion
|
|
93
|
-
export {
|
|
12
|
+
export { r as useIssueReceivableById };
|
|
@@ -1,193 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button as n } from "./index56.js";
|
|
3
|
-
import { Input as r } from "./index89.js";
|
|
4
|
-
import { useCounterpartAddresses as i } from "./index126.js";
|
|
5
|
-
import "./index138.js";
|
|
6
|
-
import { Typography as a } from "./index62.js";
|
|
7
|
-
import { Separator as o } from "./index64.js";
|
|
8
|
-
import { Field as s, FieldContent as c, FieldError as l, FieldLabel as u } from "./index88.js";
|
|
9
|
-
import { CounterpartDetails as d } from "./index231.js";
|
|
10
|
-
import { CreateCounterpartDialog as f } from "./index246.js";
|
|
11
|
-
import { Avatar as p, AvatarFallback as m } from "./index253.js";
|
|
12
|
-
import { CounterpartSelector as h } from "./index452.js";
|
|
13
|
-
import { useCallback as g, useEffect as _, useRef as v, useState as y } from "react";
|
|
14
|
-
import { Plus as b } from "lucide-react";
|
|
15
|
-
import { Fragment as x, jsx as S, jsxs as C } from "@emotion/react/jsx-runtime";
|
|
16
|
-
import { useLingui as w } from "@lingui/react";
|
|
17
|
-
import { Controller as T, useFormContext as E } from "react-hook-form";
|
|
1
|
+
import { useMoniteContext as e } from "./index47.js";
|
|
18
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js
|
|
19
|
-
var
|
|
20
|
-
let {
|
|
21
|
-
|
|
22
|
-
}, $ = g((e) => {
|
|
23
|
-
let t = {
|
|
24
|
-
email: Z,
|
|
25
|
-
phone: "",
|
|
26
|
-
isCustomer: !0,
|
|
27
|
-
isVendor: !1,
|
|
28
|
-
line1: "",
|
|
29
|
-
line2: "",
|
|
30
|
-
city: "",
|
|
31
|
-
state: "",
|
|
32
|
-
postalCode: "",
|
|
33
|
-
country: "US"
|
|
34
|
-
};
|
|
35
|
-
if (e === "individual") {
|
|
36
|
-
let e = X.trim(), n = e.indexOf(" "), r = n === -1 ? e : e.slice(0, n), i = n === -1 ? "" : e.slice(n + 1);
|
|
37
|
-
return {
|
|
38
|
-
tax_id: "",
|
|
39
|
-
counterpart: {
|
|
40
|
-
...t,
|
|
41
|
-
firstName: r,
|
|
42
|
-
lastName: i
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
tax_id: "",
|
|
48
|
-
counterpart: {
|
|
49
|
-
...t,
|
|
50
|
-
companyName: X
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}, [X, Z]);
|
|
54
|
-
return _(() => {
|
|
55
|
-
R.current !== L && (R.current = L, P("default_billing_address_id", ""), P("default_shipping_address_id", ""));
|
|
56
|
-
}, [L, P]), _(() => {
|
|
57
|
-
if (V?.data?.length && !(!j || j.id !== L)) {
|
|
58
|
-
if (!z) {
|
|
59
|
-
let e = j.default_billing_address_id || (V.data.length === 1 ? V.data[0].id : "");
|
|
60
|
-
P("default_billing_address_id", e);
|
|
61
|
-
}
|
|
62
|
-
if (!B) {
|
|
63
|
-
let e = j.default_shipping_address_id || "";
|
|
64
|
-
P("default_shipping_address_id", e);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}, [
|
|
68
|
-
V,
|
|
69
|
-
P,
|
|
70
|
-
j,
|
|
71
|
-
L,
|
|
72
|
-
z,
|
|
73
|
-
B
|
|
74
|
-
]), /* @__PURE__ */ C("div", {
|
|
75
|
-
className: "ttw:flex ttw:flex-col ttw:p-6 ttw:gap-2.5 ttw:border ttw:border-border ttw:rounded-xl",
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ C("div", {
|
|
78
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
79
|
-
children: [/* @__PURE__ */ S(a, {
|
|
80
|
-
variant: "h4",
|
|
81
|
-
children: M._("Customer details")
|
|
82
|
-
}), /* @__PURE__ */ S(a, {
|
|
83
|
-
variant: "body2",
|
|
84
|
-
color: "muted",
|
|
85
|
-
className: "ttw:font-medium",
|
|
86
|
-
children: M._("Who are you billing?")
|
|
87
|
-
})]
|
|
88
|
-
}),
|
|
89
|
-
K ? /* @__PURE__ */ C("div", {
|
|
90
|
-
className: "ttw:flex ttw:gap-2 ttw:justify-between ttw:items-center ttw:border ttw:border-border ttw:p-3 ttw:rounded-xl",
|
|
91
|
-
children: [/* @__PURE__ */ C("div", {
|
|
92
|
-
className: "ttw:flex ttw:items-center ttw:gap-5",
|
|
93
|
-
children: [/* @__PURE__ */ S(p, {
|
|
94
|
-
className: "ttw:size-16",
|
|
95
|
-
children: /* @__PURE__ */ S(m, {
|
|
96
|
-
className: "ttw:text-sm ttw:font-normal",
|
|
97
|
-
children: Y
|
|
98
|
-
})
|
|
99
|
-
}), /* @__PURE__ */ C("div", {
|
|
100
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
101
|
-
children: [/* @__PURE__ */ S(a, {
|
|
102
|
-
variant: "body1",
|
|
103
|
-
className: "ttw:font-medium",
|
|
104
|
-
children: q
|
|
105
|
-
}), /* @__PURE__ */ S(a, {
|
|
106
|
-
variant: "body2",
|
|
107
|
-
color: "muted",
|
|
108
|
-
children: J
|
|
109
|
-
})]
|
|
110
|
-
})]
|
|
111
|
-
}), /* @__PURE__ */ C("div", {
|
|
112
|
-
className: "ttw:flex ttw:items-center",
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ S(n, {
|
|
115
|
-
type: "button",
|
|
116
|
-
variant: "ghost",
|
|
117
|
-
className: "ttw:text-primary ttw:hover:text-primary",
|
|
118
|
-
disabled: D,
|
|
119
|
-
onClick: () => U(!0),
|
|
120
|
-
children: M._("View details")
|
|
121
|
-
}),
|
|
122
|
-
/* @__PURE__ */ S(o, {
|
|
123
|
-
orientation: "vertical",
|
|
124
|
-
className: "ttw:h-6!"
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ S(n, {
|
|
127
|
-
type: "button",
|
|
128
|
-
variant: "ghost",
|
|
129
|
-
className: "ttw:text-primary ttw:hover:text-primary",
|
|
130
|
-
disabled: D,
|
|
131
|
-
onClick: Q,
|
|
132
|
-
children: M._("Clear")
|
|
133
|
-
})
|
|
134
|
-
]
|
|
135
|
-
})]
|
|
136
|
-
}) : /* @__PURE__ */ C(x, { children: [
|
|
137
|
-
/* @__PURE__ */ S(h, {
|
|
138
|
-
disabled: D,
|
|
139
|
-
canCreateCounterpart: O
|
|
140
|
-
}),
|
|
141
|
-
O && /* @__PURE__ */ S(T, {
|
|
142
|
-
name: "counterpart_email",
|
|
143
|
-
control: F,
|
|
144
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, { children: [
|
|
145
|
-
/* @__PURE__ */ S(u, {
|
|
146
|
-
htmlFor: e.name,
|
|
147
|
-
children: M._("Email")
|
|
148
|
-
}),
|
|
149
|
-
/* @__PURE__ */ S(r, {
|
|
150
|
-
...e,
|
|
151
|
-
id: e.name,
|
|
152
|
-
type: "email",
|
|
153
|
-
disabled: D,
|
|
154
|
-
"aria-invalid": !!t
|
|
155
|
-
}),
|
|
156
|
-
/* @__PURE__ */ S(l, { errors: t ? [t] : [] })
|
|
157
|
-
] }) })
|
|
158
|
-
}),
|
|
159
|
-
O && /* @__PURE__ */ C(n, {
|
|
160
|
-
onClick: () => G(!0),
|
|
161
|
-
type: "button",
|
|
162
|
-
variant: "ghost",
|
|
163
|
-
disabled: D,
|
|
164
|
-
className: "ttw:text-primary ttw:hover:text-primary ttw:w-fit",
|
|
165
|
-
children: [/* @__PURE__ */ S(b, {}), M._("Add more details including address, phone, etc.")]
|
|
166
|
-
})
|
|
167
|
-
] }),
|
|
168
|
-
W && /* @__PURE__ */ S(f, {
|
|
169
|
-
open: W,
|
|
170
|
-
onClose: () => {
|
|
171
|
-
G(!1);
|
|
172
|
-
},
|
|
173
|
-
onCreate: (e) => {
|
|
174
|
-
G(!1), P("counterpart_id", e), P("counterpart_name", ""), P("counterpart_email", ""), I(["counterpart_id", "counterpart_email"]);
|
|
175
|
-
},
|
|
176
|
-
getCounterpartDefaultValues: $,
|
|
177
|
-
customerType: "customer"
|
|
178
|
-
}),
|
|
179
|
-
(k || H) && /* @__PURE__ */ S(d, {
|
|
180
|
-
counterpartId: j?.id || "",
|
|
181
|
-
open: k || H,
|
|
182
|
-
onClose: () => {
|
|
183
|
-
k && A(!1), U(!1);
|
|
184
|
-
},
|
|
185
|
-
isEditMode: k,
|
|
186
|
-
showActionsMenu: !1,
|
|
187
|
-
customerType: "customer"
|
|
188
|
-
})
|
|
189
|
-
]
|
|
190
|
-
});
|
|
3
|
+
var t = () => {
|
|
4
|
+
let { api: t } = e();
|
|
5
|
+
return t.finops.getMeasureUnits.useQuery();
|
|
191
6
|
};
|
|
192
7
|
//#endregion
|
|
193
|
-
export {
|
|
8
|
+
export { t as useGetMeasureUnits };
|