@tesouro/embedded-components-react 0.2.216 → 0.2.217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +119 -5
- package/dist/index.js +99 -96
- package/dist/lib/ReceivablesWidget.js +23 -23
- package/dist/lib/WidgetProvider.d.ts +119 -5
- package/dist/lib/WidgetProvider.js +28 -25
- package/dist/lib/WidgetProviderPublic.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index2.js +35 -35
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index2.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +3 -13
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +13 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index2.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index2.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index2.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index2.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -1
- 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 +23 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +2 -9
- 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 +2 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +9 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +33 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +31 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +26 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +11 -1268
- 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 +12 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +121 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +216 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +10 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +49 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +47 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +44 -10
- 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 +15 -121
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +147 -213
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +25 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +56 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +68 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +10 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +27 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +64 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +39 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +78 -148
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +5 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +97 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +52 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +9 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +35 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +4 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +23 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +1270 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +31 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +13 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +9 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +43 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +74 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +56 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +24 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +77 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +28 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +7 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +226 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +468 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +110 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +539 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +23 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +25 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +19 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +2 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +11 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +22 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +24 -225
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +109 -462
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +66 -106
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +11 -536
- 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 +12 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +145 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +86 -398
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +24 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index2.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +183 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +25 -406
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +60 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +397 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +65 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +2 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +407 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +25 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +12 -214
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +10 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +214 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +12 -146
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +11 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +7 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +35 -183
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +2 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +18 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +32 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +24 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +42 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +50 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +96 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +111 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +87 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +63 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +96 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +95 -359
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +213 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +73 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +44 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +37 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +344 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +300 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +98 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index24.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +159 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +264 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +23 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +19 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +10 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +477 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +167 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +22 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +57 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +26 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +60 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +38 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +57 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +29 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +117 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +23 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +42 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +52 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index26.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +36 -147
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +80 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +30 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +66 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +359 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +2 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +117 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +6 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +18 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +12 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index27.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +13 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +14 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +19 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +53 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +27 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +23 -477
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +26 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +15 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index28.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +27 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +16 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +109 -118
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +12 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +19 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +22 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +37 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +52 -340
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +47 -298
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +30 -103
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +93 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +43 -263
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +145 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +107 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +149 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +19 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +7 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +13 -212
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +80 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +74 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index3.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index30.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +43 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +19 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +43 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +158 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +27 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +26 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +76 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +128 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +43 -122
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +113 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +104 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +43 -104
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +198 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +68 -203
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +31 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +4 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +19 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +38 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +24 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +28 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +12 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +19 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +33 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +65 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +26 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +127 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +51 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +26 -168
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +5 -134
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +73 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +32 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +21 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +16 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +17 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +169 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +132 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +156 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index34.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +10 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +18 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +63 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +65 -157
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +60 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +11 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +59 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +24 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +60 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +14 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +32 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +30 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +53 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +34 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +24 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +16 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +8 -24
- 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 +48 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +46 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +16 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +65 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +16 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +20 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +15 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +21 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +15 -14
- 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 +45 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +37 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +66 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +21 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +115 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +80 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +7 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +9 -16
- 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 +30 -121
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +5 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +127 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +7 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +115 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +16 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +16 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +72 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +16 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +16 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +16 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +3 -47
- 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 +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +11 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +31 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +43 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +69 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +92 -264
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +9 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +10 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +5 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index41.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +24 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +34 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +9 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +81 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +17 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +83 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +267 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +62 -282
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +44 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index42.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +25 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +138 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +92 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +11 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +2 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +282 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +46 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +15 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +66 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +47 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +11 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +16 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +49 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +10 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +8 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +50 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +38 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +46 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +74 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +83 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +50 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +48 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +29 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +53 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +56 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +68 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +21 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +33 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index450.js +31 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +85 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +23 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +104 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +107 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +42 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +37 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +13 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +54 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +18 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +49 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +56 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +29 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +30 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +81 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +67 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +41 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +95 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +16 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +74 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +20 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +9 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +74 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +64 -101
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +33 -106
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +17 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +12 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +28 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +23 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index48.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +36 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +64 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +9 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +47 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +39 -47
- 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 +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index58.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/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index79.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/index86.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index94.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +124 -112
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +161 -142
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetInitPublisher.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/widgetInitChannel.js +53 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index2.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index2.js +2 -2
- package/package.json +1 -1
|
@@ -1,472 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import { useCreateRecurrence as wt } from "./index322.js";
|
|
25
|
-
import { useUpdateRecurrence as Pt } from "./index323.js";
|
|
26
|
-
import { useIssueReceivableById as Rt } from "./index244.js";
|
|
27
|
-
import { useGetInvoiceRequiredFields as kt } from "./index242.js";
|
|
28
|
-
import { useSelectableBankAccounts as At } from "./index243.js";
|
|
29
|
-
import { useLineItemSubmitCleanup as Lt } from "./index324.js";
|
|
30
|
-
import { useGetMeasureUnits as St } from "./index325.js";
|
|
31
|
-
const oe = (t, i) => i ? t.find((r) => r.id === i)?.name || "" : void 0, qt = (t, i) => ({
|
|
32
|
-
// Callers only reach this in `invoice` mode (the guard runs earlier).
|
|
33
|
-
type: t.type,
|
|
34
|
-
counterpart_id: i.resolvedCounterpartId,
|
|
35
|
-
counterpart_billing_address_id: i.billingAddressId,
|
|
36
|
-
counterpart_shipping_address_id: i.shippingAddressId,
|
|
37
|
-
bank_account_id: t.bank_account_id || void 0,
|
|
38
|
-
bank_account_type: t.bank_account_id ? t.bank_account_type : void 0,
|
|
39
|
-
...ae({
|
|
40
|
-
paymentTermId: t.payment_terms_id,
|
|
41
|
-
customDueDate: t.payment_terms_custom_date
|
|
42
|
-
}),
|
|
43
|
-
line_items: t.line_items.filter((r) => !!r.product?.name?.trim()).map((r) => ({
|
|
44
|
-
quantity: r.quantity,
|
|
45
|
-
tax_status: r.taxable ? "taxable" : "non_taxable",
|
|
46
|
-
product: {
|
|
47
|
-
name: r.product.name,
|
|
48
|
-
price: {
|
|
49
|
-
currency: r.product.price.currency,
|
|
50
|
-
value: r.product.price.value
|
|
51
|
-
},
|
|
52
|
-
measure_unit: r.product.measure_unit_id ? {
|
|
53
|
-
name: oe(i.measureUnits, r.product.measure_unit_id) ?? ""
|
|
54
|
-
} : void 0,
|
|
55
|
-
type: "product"
|
|
56
|
-
},
|
|
57
|
-
tax_rate_value: r.taxable ? ne(Number(t.tax_rate) || 0) : void 0
|
|
58
|
-
})),
|
|
59
|
-
memo: t.memo,
|
|
60
|
-
footer: t.footer,
|
|
61
|
-
purchase_order: t.purchase_order || void 0,
|
|
62
|
-
currency: i.currency,
|
|
63
|
-
payment_reminder_id: t.payment_reminder_id || void 0,
|
|
64
|
-
overdue_reminder_id: t.overdue_reminder_id || void 0,
|
|
65
|
-
tag_ids: [],
|
|
66
|
-
// TODO: add support for tags, ideally values.tags?.map((tag) => tag.id)
|
|
67
|
-
tax_mode: t.tax_mode || "exclusive",
|
|
68
|
-
// `attachments` is `minItems: 1` on the payload, so omit it entirely when
|
|
69
|
-
// empty rather than sending `[]` (which 422s). Only `id`/`include_in_email`
|
|
70
|
-
// ride the request; the buffered `name`/`size` are display-only (EMBD-3617).
|
|
71
|
-
attachments: t.attachments.length ? t.attachments.map(({
|
|
72
|
-
id: r,
|
|
73
|
-
include_in_email: n
|
|
74
|
-
}) => ({
|
|
75
|
-
id: r,
|
|
76
|
-
include_in_email: n
|
|
77
|
-
})) : void 0
|
|
78
|
-
}), re = (t, i) => ({
|
|
79
|
-
data: t.line_items.filter((r) => !!r.product?.name?.trim()).map((r) => {
|
|
80
|
-
const n = r;
|
|
81
|
-
let c;
|
|
82
|
-
return n.product.measure_unit_id ? c = oe(i, n.product.measure_unit_id) : (n.product.measure_unit_name || n.measure_unit?.name) && (c = n.product.measure_unit_name || n.measure_unit?.name), {
|
|
83
|
-
quantity: r.quantity,
|
|
84
|
-
tax_status: r.taxable ? "taxable" : "non_taxable",
|
|
85
|
-
product: {
|
|
86
|
-
name: r.product.name,
|
|
87
|
-
type: r.product.type,
|
|
88
|
-
measure_unit: c ? {
|
|
89
|
-
name: c
|
|
90
|
-
} : void 0,
|
|
91
|
-
price: r.product.price ? {
|
|
92
|
-
currency: r.product.price.currency ?? "USD",
|
|
93
|
-
value: Math.round(r.product.price.value ?? 0)
|
|
94
|
-
} : void 0
|
|
95
|
-
},
|
|
96
|
-
// The backend requires a taxable line item to carry a tax rate, so send
|
|
97
|
-
// one whenever it's taxable — defaulting to 0 when none was entered
|
|
98
|
-
// (matching the create payload). Omitting it for a taxable item 422s.
|
|
99
|
-
tax_rate_value: r.taxable ? ne(Number(t.tax_rate) || 0) : void 0
|
|
100
|
-
};
|
|
101
|
-
})
|
|
102
|
-
}), ie = (t, i) => ({
|
|
103
|
-
invoice: {
|
|
104
|
-
counterpart_id: i.resolvedCounterpartId,
|
|
105
|
-
currency: i.currency,
|
|
106
|
-
memo: t.memo,
|
|
107
|
-
footer: t.footer,
|
|
108
|
-
// Send `null` (not `undefined`) when the address is empty so a cleared field
|
|
109
|
-
// is actually cleared. Omitting it leaves the previous value in place, which
|
|
110
|
-
// — after the customer was changed — would keep an address that belongs to
|
|
111
|
-
// the old counterpart (a mismatch the API rejects). Empty happens when the
|
|
112
|
-
// customer is cleared or a newly picked/inline customer has no default
|
|
113
|
-
// address. Same `null`-to-clear pattern as the reminders/attachments below.
|
|
114
|
-
// @ts-expect-error - we need to send `null` to clear, but the backend doesn't type it
|
|
115
|
-
counterpart_shipping_address_id: t?.default_shipping_address_id || null,
|
|
116
|
-
// @ts-expect-error - we need to send `null` to clear, but the backend doesn't type it
|
|
117
|
-
counterpart_billing_address_id: t?.default_billing_address_id || null,
|
|
118
|
-
bank_account_id: t.bank_account_id || void 0,
|
|
119
|
-
bank_account_type: t.bank_account_id ? t.bank_account_type : void 0,
|
|
120
|
-
/**
|
|
121
|
-
* Rebuild the payment-terms payload from the form values (a saved
|
|
122
|
-
* `payment_terms_id`, or an inline object for "Custom date" / "Due on
|
|
123
|
-
* receipt") via the shared builder, so it's the request-shaped
|
|
124
|
-
* `InlinePaymentTermsRequestPayload` the PATCH accepts.
|
|
125
|
-
*/
|
|
126
|
-
...ae({
|
|
127
|
-
paymentTermId: t.payment_terms_id,
|
|
128
|
-
customDueDate: t.payment_terms_custom_date
|
|
129
|
-
}),
|
|
130
|
-
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
131
|
-
payment_reminder_id: t.payment_reminder_id || null,
|
|
132
|
-
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
133
|
-
overdue_reminder_id: t.overdue_reminder_id || null,
|
|
134
|
-
// The backend enforces `minItems: 1` here (the generated schema is wrong),
|
|
135
|
-
// so `[]` 422s. Omitting it (`undefined`) is a no-op that leaves the existing
|
|
136
|
-
// attachments in place, so removing the last one must be sent as `null` to
|
|
137
|
-
// actually clear them. Only `id`/`include_in_email` ride the request; the
|
|
138
|
-
// buffered `name`/`size` are display-only (EMBD-3617).
|
|
139
|
-
// @ts-expect-error - we need to send `null` to clear, but the backend doesn't provide a correct type
|
|
140
|
-
attachments: t.attachments.length ? t.attachments.map(({
|
|
141
|
-
id: r,
|
|
142
|
-
include_in_email: n
|
|
143
|
-
}) => ({
|
|
144
|
-
id: r,
|
|
145
|
-
include_in_email: n
|
|
146
|
-
})) : null
|
|
147
|
-
// `purchase_order` is intentionally omitted — the backend does not support
|
|
148
|
-
// updating it, so `BillingSection` hides the field in edit.
|
|
149
|
-
}
|
|
150
|
-
}), sr = ({
|
|
151
|
-
mode: t,
|
|
152
|
-
methods: i,
|
|
153
|
-
currency: r,
|
|
154
|
-
invoice: n,
|
|
155
|
-
existingRecurrence: c,
|
|
156
|
-
hasStartedRecurrence: $ = !1,
|
|
157
|
-
onComplete: h,
|
|
158
|
-
onClose: E,
|
|
159
|
-
submitModeRef: de
|
|
1
|
+
import { jsxs as r, jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useRef as L, useMemo as g, useCallback as P } from "react";
|
|
3
|
+
import { useCurrencies as U } from "./index58.js";
|
|
4
|
+
import "./index92.js";
|
|
5
|
+
import { useLingui as M } from "@lingui/react";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
import "./index57.js";
|
|
8
|
+
import "@mui/x-data-grid";
|
|
9
|
+
import { FieldLabel as w, Field as f, FieldContent as x, FieldError as p } from "./index145.js";
|
|
10
|
+
import { InputGroup as y, InputGroupAddon as N, InputGroupInput as T, InputGroupTextarea as E } from "./index101.js";
|
|
11
|
+
import { Input as z } from "./index146.js";
|
|
12
|
+
import { Label as C } from "./index245.js";
|
|
13
|
+
import { RadioGroup as A, RadioGroupItem as _ } from "./index295.js";
|
|
14
|
+
import { Typography as d } from "./index85.js";
|
|
15
|
+
import { Combobox as B, ComboboxInput as R, ComboboxContent as V, ComboboxList as j, ComboboxEmpty as D, ComboboxCollection as W, ComboboxItem as H } from "./index90.js";
|
|
16
|
+
import { useFormContext as q, Controller as s } from "react-hook-form";
|
|
17
|
+
import { twMerge as l } from "tailwind-merge";
|
|
18
|
+
import "react-hot-toast";
|
|
19
|
+
import { useGetMeasureUnits as J } from "./index296.js";
|
|
20
|
+
const wt = ({
|
|
21
|
+
isLoading: i,
|
|
22
|
+
isEditMode: c,
|
|
23
|
+
isProduct: F
|
|
160
24
|
}) => {
|
|
161
25
|
const {
|
|
162
26
|
i18n: a
|
|
163
|
-
} =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
watch: g,
|
|
172
|
-
formState: le,
|
|
173
|
-
setValue: R,
|
|
174
|
-
clearErrors: pe,
|
|
175
|
-
trigger: fe
|
|
176
|
-
} = i, {
|
|
177
|
-
isDirty: ye
|
|
178
|
-
} = le, {
|
|
179
|
-
data: ge,
|
|
180
|
-
isLoading: ve,
|
|
181
|
-
isFetching: be
|
|
182
|
-
} = bt(), {
|
|
183
|
-
data: he,
|
|
184
|
-
isLoading: j
|
|
185
|
-
} = St(), {
|
|
186
|
-
bankAccounts: xe,
|
|
187
|
-
isLoading: z
|
|
188
|
-
} = At(P), Ce = xe.length > 0, [k, Ie] = U(!1), [we, A] = U(!1), Pe = ee("draft"), v = de ?? Pe, Re = `Monite-Form-receivablesDetailsForm-${ut()}`, [x, b] = U(null), {
|
|
189
|
-
registerLineItemCleanupFn: ke,
|
|
190
|
-
runLineItemCleanup: Ae
|
|
191
|
-
} = Lt(), {
|
|
192
|
-
mutateAsync: Le,
|
|
193
|
-
isPending: Se
|
|
194
|
-
} = ht(), {
|
|
195
|
-
mutateAsync: qe,
|
|
196
|
-
isPending: Me
|
|
197
|
-
} = (
|
|
198
|
-
// An inline counterpart is created as a side effect of saving the invoice;
|
|
199
|
-
// the invoice's own success toast is the confirmation, so skip the extra
|
|
200
|
-
// "customer added" one.
|
|
201
|
-
xt({
|
|
202
|
-
showSuccessToast: !1
|
|
203
|
-
})
|
|
204
|
-
), N = n?.id ?? x?.id ?? "", {
|
|
205
|
-
mutateAsync: G,
|
|
206
|
-
isPending: De
|
|
207
|
-
} = Ct(N), {
|
|
208
|
-
mutateAsync: H,
|
|
209
|
-
isPending: Fe
|
|
210
|
-
} = It(N), {
|
|
211
|
-
mutateAsync: Ue,
|
|
212
|
-
isPending: $e
|
|
213
|
-
} = wt(), {
|
|
214
|
-
mutateAsync: Ee,
|
|
215
|
-
isPending: Be
|
|
216
|
-
} = Pt(), {
|
|
217
|
-
mutateAsync: Te,
|
|
218
|
-
isPending: je
|
|
219
|
-
} = Rt(), O = Se || Me || De || Fe || $e || Be || je, ze = O || j || z, Q = ee(null), V = () => {
|
|
220
|
-
requestAnimationFrame(() => {
|
|
221
|
-
const e = Q.current, u = e?.querySelector('[aria-invalid="true"]');
|
|
222
|
-
if (!e || !u) return;
|
|
223
|
-
const l = u.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop - e.clientHeight / 2 + u.offsetHeight / 2;
|
|
224
|
-
e.scrollTo({
|
|
225
|
-
top: Math.max(0, l),
|
|
226
|
-
behavior: "smooth"
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
}, Ne = () => {
|
|
230
|
-
v.current = "issue", fe().then(V);
|
|
231
|
-
}, _ = g("counterpart_id"), C = g("frequency") !== "once", Ge = g("counterpart_email"), I = g("default_billing_address_id"), He = g("bank_account_id"), {
|
|
232
|
-
data: d,
|
|
233
|
-
isLoading: W,
|
|
234
|
-
isFetching: J
|
|
235
|
-
} = gt(_), {
|
|
236
|
-
data: L,
|
|
237
|
-
isLoading: Oe,
|
|
238
|
-
isFetching: Qe
|
|
239
|
-
} = vt(_), S = ct(() => L?.data?.find((e) => e.id === I), [I, L?.data]), K = !!(Ge?.trim() || _t(d)), Ve = !!_ && (W || J), {
|
|
240
|
-
data: We,
|
|
241
|
-
isLoading: Je,
|
|
242
|
-
isFetching: Ke
|
|
243
|
-
} = kt({
|
|
244
|
-
counterpart_billing_address_id: d?.id === _ && I || void 0,
|
|
245
|
-
counterpart_country: S?.id === I && S?.country || void 0,
|
|
246
|
-
counterpart_id: _ || void 0,
|
|
247
|
-
counterpart_type: d?.id === _ && d?.type || void 0
|
|
248
|
-
}), Xe = We?.entity?.tax_id?.required, X = ve || be || Je || Ke || !!_ && (W || J || Oe || Qe), Y = (e) => {
|
|
249
|
-
R("counterpart_id", e), R("counterpart_name", ""), R("counterpart_email", ""), pe(["counterpart_id", "counterpart_email"]);
|
|
250
|
-
}, Ye = () => {
|
|
251
|
-
if (k) {
|
|
252
|
-
o.error(a._("Please wait for attachments to finish uploading."));
|
|
253
|
-
return;
|
|
27
|
+
} = M(), {
|
|
28
|
+
getSymbolFromCurrency: I
|
|
29
|
+
} = U(), u = L(null), {
|
|
30
|
+
data: S
|
|
31
|
+
} = J(), m = S?.data ?? [], {
|
|
32
|
+
control: n,
|
|
33
|
+
formState: {
|
|
34
|
+
errors: k
|
|
254
35
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
36
|
+
} = q(), G = g(() => m.map((t) => t.id), [m]), h = g(() => new Map(m.map((t) => [t.id, t.name])), [m]), b = P((t) => h.get(t) ?? t, [h]);
|
|
37
|
+
return /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-4", children: [
|
|
38
|
+
c && /* @__PURE__ */ e("div", { className: "ttw:flex ttw:items-center ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border", children: /* @__PURE__ */ e(d, { variant: "body1", className: "ttw:font-medium", children: a._("Editing {type} details", {
|
|
39
|
+
type: F ? "product" : "service"
|
|
40
|
+
}) }) }),
|
|
41
|
+
/* @__PURE__ */ e(s, { name: "type", control: n, render: ({
|
|
42
|
+
field: t
|
|
43
|
+
}) => /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-1.5", children: [
|
|
44
|
+
/* @__PURE__ */ e(w, { children: a._("Type") }),
|
|
45
|
+
/* @__PURE__ */ r(A, { className: "ttw:flex", value: t.value, disabled: i, onValueChange: t.onChange, children: [
|
|
46
|
+
/* @__PURE__ */ r("div", { className: l("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", t.value === "product" && "ttw:bg-primary/10 ttw:border-primary/30"), children: [
|
|
47
|
+
/* @__PURE__ */ e(_, { value: "product", id: "type-product", className: l(t.value === "product" ? "ttw:bg-primary" : "ttw:bg-white"), dotClassName: l(t.value === "product" && "ttw:fill-white"), disabled: i }),
|
|
48
|
+
/* @__PURE__ */ r(C, { htmlFor: "type-product", className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5", children: [
|
|
49
|
+
/* @__PURE__ */ e(d, { variant: "body2", className: "ttw:leading-3.5", children: a._("Product") }),
|
|
50
|
+
/* @__PURE__ */ e(d, { variant: "caption", color: "muted", children: a._("A physical or digital item") })
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ r("div", { className: l("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", t.value === "service" && "ttw:bg-primary/10 ttw:border-primary/30"), children: [
|
|
54
|
+
/* @__PURE__ */ e(_, { value: "service", id: "type-service", className: l(t.value === "service" ? "ttw:bg-primary" : "ttw:bg-white"), dotClassName: l(t.value === "service" && "ttw:fill-white"), disabled: i }),
|
|
55
|
+
/* @__PURE__ */ r(C, { htmlFor: "type-service", className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5", children: [
|
|
56
|
+
/* @__PURE__ */ e(d, { variant: "body2", className: "ttw:leading-3.5", children: a._("Service") }),
|
|
57
|
+
/* @__PURE__ */ e(d, { variant: "caption", color: "muted", children: a._("Work or labor you provide") })
|
|
58
|
+
] })
|
|
59
|
+
] })
|
|
60
|
+
] })
|
|
61
|
+
] }) }),
|
|
62
|
+
/* @__PURE__ */ e(s, { name: "name", control: n, render: ({
|
|
63
|
+
field: t,
|
|
64
|
+
fieldState: {
|
|
65
|
+
error: o
|
|
275
66
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
reminders_enabled: !0,
|
|
289
|
-
language: lt.find((m) => m === a.locale.split("-")[0]) ?? "en",
|
|
290
|
-
organization: {
|
|
291
|
-
legal_name: e?.counterpart_name?.trim() ?? "",
|
|
292
|
-
...e.counterpart_email ? {
|
|
293
|
-
email: e.counterpart_email
|
|
294
|
-
} : {}
|
|
67
|
+
}) => /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(x, { children: [
|
|
68
|
+
/* @__PURE__ */ e(w, { htmlFor: t.name, children: a._("Name") }),
|
|
69
|
+
/* @__PURE__ */ e(z, { ...t, id: t.name, placeholder: a._("e.g. House blend espresso beans"), className: c ? "ttw:bg-white" : "", disabled: i, "aria-invalid": !!o || void 0 }),
|
|
70
|
+
/* @__PURE__ */ e(p, { errors: [o] })
|
|
71
|
+
] }) }) }),
|
|
72
|
+
/* @__PURE__ */ r("div", { className: "ttw:w-1/2 ttw:flex ttw:flex-col ttw:gap-1.5", children: [
|
|
73
|
+
/* @__PURE__ */ e(w, { children: a._("Price per unit") }),
|
|
74
|
+
/* @__PURE__ */ r("div", { className: l("ttw:flex ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow]", "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", "ttw:has-[[data-slot][aria-invalid=true]]:border-destructive ttw:has-[[data-slot][aria-invalid=true]]:ring-[3px] ttw:has-[[data-slot][aria-invalid=true]]:ring-destructive/20", c && "ttw:bg-white"), ref: u, children: [
|
|
75
|
+
/* @__PURE__ */ e(s, { name: "pricePerUnit", control: n, render: ({
|
|
76
|
+
field: t,
|
|
77
|
+
fieldState: {
|
|
78
|
+
error: o
|
|
295
79
|
}
|
|
296
|
-
})
|
|
297
|
-
|
|
298
|
-
|
|
80
|
+
}) => /* @__PURE__ */ r(y, { className: "ttw:flex-1 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0", children: [
|
|
81
|
+
/* @__PURE__ */ e(N, { align: "inline-start", children: I("USD") }),
|
|
82
|
+
/* @__PURE__ */ e(T, { type: "number", name: t.name, ref: t.ref, value: t.value ?? "", onChange: (v) => t.onChange(v.target.value === "" ? void 0 : Number(v.target.value)), className: "ttw:text-end", onBlur: t.onBlur, placeholder: "0.00", "aria-invalid": !!o || void 0, disabled: i })
|
|
83
|
+
] }) }),
|
|
84
|
+
/* @__PURE__ */ e("div", { className: "ttw:w-px ttw:shrink-0 ttw:bg-border" }),
|
|
85
|
+
/* @__PURE__ */ e(s, { name: "measureUnitId", control: n, render: ({
|
|
86
|
+
field: t
|
|
87
|
+
}) => /* @__PURE__ */ r(B, { value: t.value ?? null, onValueChange: (o) => t.onChange(o ?? void 0), items: G, itemToStringLabel: b, disabled: i, children: [
|
|
88
|
+
/* @__PURE__ */ e(R, { showClear: !!t.value, placeholder: "-", disabled: i, className: "ttw:w-28 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0" }),
|
|
89
|
+
/* @__PURE__ */ e(V, { container: u.current, children: /* @__PURE__ */ r(j, { children: [
|
|
90
|
+
/* @__PURE__ */ e(D, { children: a._("No units found") }),
|
|
91
|
+
/* @__PURE__ */ e(W, { children: (o) => /* @__PURE__ */ e(H, { value: o, children: b(o) }, o) })
|
|
92
|
+
] }) })
|
|
93
|
+
] }) })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ e(p, { errors: [k.pricePerUnit] })
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ e(s, { name: "description", control: n, render: ({
|
|
98
|
+
field: t,
|
|
99
|
+
fieldState: {
|
|
100
|
+
error: o
|
|
299
101
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
onSuccess: async () => {
|
|
315
|
-
await B.finops.getReceivables.invalidateQueries(T);
|
|
316
|
-
}
|
|
317
|
-
}), f = s.id, F = s, l && Y(p));
|
|
318
|
-
else {
|
|
319
|
-
if (!n) return;
|
|
320
|
-
await H(re(e, D)), s = await G(ie(e, {
|
|
321
|
-
resolvedCounterpartId: p,
|
|
322
|
-
currency: r
|
|
323
|
-
})), f = n.id;
|
|
324
|
-
}
|
|
325
|
-
} catch {
|
|
326
|
-
l && Y(p);
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
const w = {
|
|
330
|
-
receivableId: f,
|
|
331
|
-
counterpartId: p,
|
|
332
|
-
inlineLineItems: ot,
|
|
333
|
-
receivable: s,
|
|
334
|
-
hasCustomerEmail: K
|
|
335
|
-
}, dt = () => B.finops.getReceivablesId.fetchQuery({
|
|
336
|
-
parameters: {
|
|
337
|
-
path: {
|
|
338
|
-
receivable_id: f
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
requestFn: ce,
|
|
342
|
-
baseUrl: se
|
|
343
|
-
}, T);
|
|
344
|
-
if (C) {
|
|
345
|
-
const m = e.frequency === "day" && e.recurrence_end_mode === "on" && !!e.recurrence_end_date, Z = c ? null : void 0, y = {
|
|
346
|
-
// Never `once` here (guarded above), which the API enum doesn't include.
|
|
347
|
-
frequency: e.frequency,
|
|
348
|
-
start_date: e.recurrence_start_date ? te(new Date(e.recurrence_start_date), "yyyy-MM-dd") : void 0,
|
|
349
|
-
// The `as` sheds `null` from the type only — the backend accepts `null`
|
|
350
|
-
// to clear the field, but the generated payload types omit it.
|
|
351
|
-
max_occurrences: m ? Z : e.recurrence_max_occurrences || void 0,
|
|
352
|
-
end_date: m && e.recurrence_end_date ? te(new Date(e.recurrence_end_date), "yyyy-MM-dd") : Z,
|
|
353
|
-
subject_text: e.recurrence_subject_text || void 0,
|
|
354
|
-
body_text: e.recurrence_body_text || void 0
|
|
355
|
-
};
|
|
356
|
-
try {
|
|
357
|
-
if (c) {
|
|
358
|
-
const st = c.scheduleLocked ? {
|
|
359
|
-
max_occurrences: y.max_occurrences,
|
|
360
|
-
end_date: y.end_date,
|
|
361
|
-
subject_text: y.subject_text,
|
|
362
|
-
body_text: y.body_text
|
|
363
|
-
} : y;
|
|
364
|
-
await Ee({
|
|
365
|
-
path: {
|
|
366
|
-
recurrence_id: c.id
|
|
367
|
-
},
|
|
368
|
-
body: st
|
|
369
|
-
});
|
|
370
|
-
} else
|
|
371
|
-
await Ue({
|
|
372
|
-
body: {
|
|
373
|
-
...y,
|
|
374
|
-
invoice_id: f,
|
|
375
|
-
interval: 1,
|
|
376
|
-
automation_level: "issue"
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
} catch {
|
|
380
|
-
!x && F && b(F);
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
b(null);
|
|
384
|
-
try {
|
|
385
|
-
s = await dt();
|
|
386
|
-
} catch {
|
|
387
|
-
}
|
|
388
|
-
h({
|
|
389
|
-
mode: "recurrence",
|
|
390
|
-
...w,
|
|
391
|
-
receivable: s
|
|
392
|
-
});
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
if (v.current === "issue") {
|
|
396
|
-
try {
|
|
397
|
-
s = await Te({
|
|
398
|
-
path: {
|
|
399
|
-
receivable_id: f
|
|
400
|
-
}
|
|
401
|
-
}), b(null), h({
|
|
402
|
-
mode: "issue",
|
|
403
|
-
...w,
|
|
404
|
-
receivable: s
|
|
405
|
-
});
|
|
406
|
-
} catch {
|
|
407
|
-
o.error(a._("The invoice was saved but could not be issued.")), b(null), h({
|
|
408
|
-
mode: t === "edit" ? "update" : "draft",
|
|
409
|
-
...w
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
t === "create" ? o.success(a._("Invoice to {counterpartName} was created", {
|
|
415
|
-
counterpartName: s?.counterpart_name ?? ""
|
|
416
|
-
})) : o.success(a._("Invoice has been updated")), b(null), h({
|
|
417
|
-
mode: t === "edit" ? "update" : "draft",
|
|
418
|
-
...w
|
|
419
|
-
});
|
|
420
|
-
};
|
|
421
|
-
return {
|
|
422
|
-
formName: Re,
|
|
423
|
-
onSubmit: async (e) => {
|
|
424
|
-
e.preventDefault(), Ae();
|
|
425
|
-
const u = C && !$ || v.current === "issue";
|
|
426
|
-
if (k) {
|
|
427
|
-
o.error(a._("Please wait for attachments to finish uploading."));
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
if (j) {
|
|
431
|
-
o.error(a._("Please wait for invoice details to finish loading."));
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
if (u && X) {
|
|
435
|
-
o.error(a._("Please wait for invoice checks to finish."));
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
if (u && P && z) {
|
|
439
|
-
o.error(a._("Please wait for invoice checks to finish."));
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
if (u && !me && P && !He && !Ce) {
|
|
443
|
-
o.error(a._("Contact your company admin to set up a bank account before creating an invoice."));
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
await _e(Ze, V)(e);
|
|
447
|
-
},
|
|
448
|
-
formScrollRef: Q,
|
|
449
|
-
registerLineItemCleanupFn: ke,
|
|
450
|
-
onAttachmentsUploadingChange: Ie,
|
|
451
|
-
isLoading: ze,
|
|
452
|
-
isSaving: O,
|
|
453
|
-
attachmentsUploading: k,
|
|
454
|
-
submitModeRef: v,
|
|
455
|
-
isRecurrenceEnabled: C,
|
|
456
|
-
hasCustomerEmail: K,
|
|
457
|
-
isCustomerEmailLoading: Ve,
|
|
458
|
-
isIssuePreflightLoading: X,
|
|
459
|
-
requestClose: Ye,
|
|
460
|
-
highlightForIssue: Ne,
|
|
461
|
-
discardModal: {
|
|
462
|
-
open: we,
|
|
463
|
-
onOpenChange: A,
|
|
464
|
-
onConfirm: () => {
|
|
465
|
-
A(!1), E();
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
};
|
|
102
|
+
}) => /* @__PURE__ */ e(f, { className: "ttw:block", children: /* @__PURE__ */ r(x, { children: [
|
|
103
|
+
/* @__PURE__ */ r(w, { htmlFor: t.name, className: "ttw:gap-1", children: [
|
|
104
|
+
a._("Description"),
|
|
105
|
+
/* @__PURE__ */ e(d, { variant: "body2", color: "muted", className: "ttw:leading-snug", children: a._("(optional)") })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ r(y, { className: l(c && "ttw:bg-white"), children: [
|
|
108
|
+
/* @__PURE__ */ e(E, { ...t, id: t.name, placeholder: a._("e.g. 16oz whole bean, medium-dark roast, ground to order"), rows: 4, maxLength: 280, disabled: i, "aria-invalid": !!o || void 0 }),
|
|
109
|
+
/* @__PURE__ */ e(N, { align: "block-end", className: "ttw:cursor-default", children: /* @__PURE__ */ e(d, { variant: "caption", color: "muted", className: "ttw:leading-none", children: a._("{count}/280 characters", {
|
|
110
|
+
count: (t.value ?? "").length
|
|
111
|
+
}) }) })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ e(p, { errors: [o] })
|
|
114
|
+
] }) }) })
|
|
115
|
+
] });
|
|
469
116
|
};
|
|
470
117
|
export {
|
|
471
|
-
|
|
118
|
+
wt as ProductFormContent
|
|
472
119
|
};
|