@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,6 +1,162 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
1
|
+
import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
|
|
2
|
+
import "../../shared/data-access/dist/index.js";
|
|
3
|
+
import { Button as t } from "./index56.js";
|
|
4
|
+
import { Sheet as n, SheetClose as r, SheetContent as i, SheetDescription as a, SheetFooter as o, SheetHeader as s, SheetTitle as c } from "./index50.js";
|
|
5
|
+
import { LoadingSpinner as l } from "./index51.js";
|
|
6
|
+
import { useCreateCounterpartBank as u } from "./index66.js";
|
|
7
|
+
import { useCreateCounterpart as d } from "./index71.js";
|
|
8
|
+
import "./index86.js";
|
|
9
|
+
import { getCreateCounterpartValidationSchema as f } from "./index96.js";
|
|
10
|
+
import { CounterpartFormContent as p } from "./index109.js";
|
|
11
|
+
import { LanguageCodeEnum as m } from "./index110.js";
|
|
12
|
+
import { useUserPermissions as h } from "./index112.js";
|
|
13
|
+
import { AccessRestriction as g } from "./index242.js";
|
|
14
|
+
import { useCallback as _, useId as v, useMemo as y, useState as b } from "react";
|
|
15
|
+
import { jsx as x, jsxs as S } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useLingui as C } from "@lingui/react";
|
|
17
|
+
import { FormProvider as w, useForm as T } from "react-hook-form";
|
|
18
|
+
import { zodResolver as E } from "@hookform/resolvers/zod";
|
|
19
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js
|
|
20
|
+
var D = ({ open: D, onClose: O, onCreate: k, getCounterpartDefaultValues: A, customerType: j }) => {
|
|
21
|
+
let { i18n: M } = C(), [N, P] = b(() => "organization"), F = `counterpart-form-${v()}`, { mutateAsync: I, isPending: L } = d(), { mutate: R, isPending: z } = u(), B = L || z, V = h().has(e.CounterpartWriteOrg), H = A?.(N), U = y(() => ({
|
|
22
|
+
remindersEnabled: j === "customer",
|
|
23
|
+
isCustomer: j === "customer",
|
|
24
|
+
isVendor: j === "vendor",
|
|
25
|
+
accountHolderName: "",
|
|
26
|
+
routingNumber: "",
|
|
27
|
+
accountNumber: "",
|
|
28
|
+
tax_id: H?.tax_id ?? "",
|
|
29
|
+
email: H?.counterpart?.email ?? "",
|
|
30
|
+
phone: H?.counterpart?.phone ?? "",
|
|
31
|
+
line1: H?.counterpart?.line1 ?? "",
|
|
32
|
+
line2: H?.counterpart?.line2 ?? "",
|
|
33
|
+
city: H?.counterpart?.city ?? "",
|
|
34
|
+
state: H?.counterpart.state ?? "",
|
|
35
|
+
country: H?.counterpart?.country ?? "US",
|
|
36
|
+
postalCode: H?.counterpart?.postalCode ?? "",
|
|
37
|
+
firstName: H && "firstName" in H.counterpart ? H.counterpart.firstName : "",
|
|
38
|
+
lastName: H && "lastName" in H.counterpart ? H.counterpart.lastName : "",
|
|
39
|
+
companyName: H && "companyName" in H.counterpart ? H.counterpart.companyName : ""
|
|
40
|
+
}), [j, H]), { watch: W, ...G } = T({
|
|
41
|
+
resolver: E(f(M, N ?? "organization", j)),
|
|
42
|
+
defaultValues: U
|
|
43
|
+
}), K = !!(W("companyName") || W("firstName") && W("lastName")) && !!W("email") && (j === "vendor" && !!W("line1") && !!W("city") && !!W("state") && !!W("postalCode") && !!W("country") || j === "customer"), q = _((e) => {
|
|
44
|
+
e.preventDefault(), e.stopPropagation(), G.handleSubmit(async (e) => {
|
|
45
|
+
let t = e.line1?.trim() && e.city?.trim() ? {
|
|
46
|
+
city: e.city ?? "",
|
|
47
|
+
country: e.country ?? "US",
|
|
48
|
+
line1: e.line1 ?? "",
|
|
49
|
+
line2: e.line2,
|
|
50
|
+
postal_code: e.postalCode ?? "",
|
|
51
|
+
state: e.state ?? ""
|
|
52
|
+
} : void 0, n = {
|
|
53
|
+
account_holder_name: e.accountHolderName,
|
|
54
|
+
routing_number: e.routingNumber,
|
|
55
|
+
account_number: e.accountNumber,
|
|
56
|
+
is_default_for_currency: !0,
|
|
57
|
+
country: "US",
|
|
58
|
+
currency: "USD"
|
|
59
|
+
}, r = !!e.accountHolderName || !!e.accountNumber || !!e.routingNumber, i = {
|
|
60
|
+
tax_id: e.tax_id,
|
|
61
|
+
is_customer: e.isCustomer,
|
|
62
|
+
is_vendor: e.isVendor,
|
|
63
|
+
language: m.find((e) => e === M.locale.split("-")[0]) ?? "en",
|
|
64
|
+
reminders_enabled: e.remindersEnabled
|
|
65
|
+
}, a = N === "individual" ? {
|
|
66
|
+
...i,
|
|
67
|
+
type: "individual",
|
|
68
|
+
individual: {
|
|
69
|
+
first_name: e.firstName ?? "",
|
|
70
|
+
last_name: e.lastName ?? "",
|
|
71
|
+
phone: e.phone ?? "",
|
|
72
|
+
email: e.email ?? "",
|
|
73
|
+
...t ? { address: t } : {}
|
|
74
|
+
}
|
|
75
|
+
} : {
|
|
76
|
+
...i,
|
|
77
|
+
type: "organization",
|
|
78
|
+
organization: {
|
|
79
|
+
legal_name: e.companyName ?? "",
|
|
80
|
+
phone: e.phone ?? "",
|
|
81
|
+
email: e.email ?? "",
|
|
82
|
+
...t ? { address: t } : {}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
if (r) {
|
|
86
|
+
let e = await I(a);
|
|
87
|
+
return R({
|
|
88
|
+
path: { counterpart_id: e.id },
|
|
89
|
+
body: n
|
|
90
|
+
}, { onSuccess: () => {
|
|
91
|
+
k && k(e.id);
|
|
92
|
+
} });
|
|
93
|
+
}
|
|
94
|
+
return I(a, { onSuccess: ({ id: e }) => {
|
|
95
|
+
k && k(e);
|
|
96
|
+
} });
|
|
97
|
+
})(e);
|
|
98
|
+
}, [
|
|
99
|
+
I,
|
|
100
|
+
N,
|
|
101
|
+
R,
|
|
102
|
+
G.handleSubmit,
|
|
103
|
+
M
|
|
104
|
+
]);
|
|
105
|
+
return /* @__PURE__ */ x(n, {
|
|
106
|
+
open: D,
|
|
107
|
+
onOpenChange: O,
|
|
108
|
+
children: /* @__PURE__ */ S(i, {
|
|
109
|
+
className: "ttw:gap-0",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ S(s, {
|
|
112
|
+
className: "ttw:border-b ttw:border-border",
|
|
113
|
+
children: [/* @__PURE__ */ x(c, {
|
|
114
|
+
className: "ttw:text-2xl",
|
|
115
|
+
children: M._("Add {customerType}", { customerType: j })
|
|
116
|
+
}), /* @__PURE__ */ x(a, {
|
|
117
|
+
className: "ttw:max-w-130",
|
|
118
|
+
children: j === "vendor" ? M._("Save the people and businesses you pay so you can send payments when bills come in.") : M._("Save the people and businesses you sell to.")
|
|
119
|
+
})]
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ x("div", {
|
|
122
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:py-8 ttw:overflow-auto",
|
|
123
|
+
children: V ? /* @__PURE__ */ x(w, {
|
|
124
|
+
...G,
|
|
125
|
+
watch: W,
|
|
126
|
+
children: /* @__PURE__ */ x("form", {
|
|
127
|
+
id: F,
|
|
128
|
+
onSubmit: q,
|
|
129
|
+
children: /* @__PURE__ */ x(p, {
|
|
130
|
+
counterpartType: N ?? "organization",
|
|
131
|
+
handleChangeCounterpartType: (e) => P(e),
|
|
132
|
+
isLoading: B,
|
|
133
|
+
customerType: j
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
}) : /* @__PURE__ */ x(g, {})
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ S(o, {
|
|
139
|
+
className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
|
|
140
|
+
children: [/* @__PURE__ */ x(r, {
|
|
141
|
+
asChild: !0,
|
|
142
|
+
children: /* @__PURE__ */ x(t, {
|
|
143
|
+
variant: "outline",
|
|
144
|
+
disabled: B,
|
|
145
|
+
className: "ttw:flex-1 ttw:border-border",
|
|
146
|
+
children: M._("Cancel")
|
|
147
|
+
})
|
|
148
|
+
}), /* @__PURE__ */ S(t, {
|
|
149
|
+
type: "submit",
|
|
150
|
+
form: F,
|
|
151
|
+
className: "ttw:flex-1",
|
|
152
|
+
title: M._("Complete the form to continue"),
|
|
153
|
+
disabled: !V || B || !K,
|
|
154
|
+
children: [B && /* @__PURE__ */ x(l, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), M._("Save {customerType}", { customerType: j })]
|
|
155
|
+
})]
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
export { D as CreateCounterpartDialog };
|
|
@@ -1,8 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
|
|
2
|
+
import "../../shared/data-access/dist/index.js";
|
|
3
|
+
import { Button as t } from "./index56.js";
|
|
4
|
+
import { MoniteScopedProviders as n } from "./index209.js";
|
|
5
|
+
import { useUserPermissions as r } from "./index112.js";
|
|
6
|
+
import { CounterpartDetails as i } from "./index235.js";
|
|
7
|
+
import { AccessRestriction as a } from "./index242.js";
|
|
8
|
+
import "./index244.js";
|
|
9
|
+
import { CustomersTable as o } from "./index248.js";
|
|
10
|
+
import { VendorsTable as s } from "./index249.js";
|
|
11
|
+
import { CreateCounterpartDialog as c } from "./index250.js";
|
|
12
|
+
import { useCallback as l, useState as u } from "react";
|
|
13
|
+
import { Fragment as d, jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
14
|
+
import { useLingui as m } from "@lingui/react";
|
|
5
15
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js
|
|
6
|
-
var
|
|
16
|
+
var h = (e) => /* @__PURE__ */ f(n, { children: /* @__PURE__ */ f(g, { ...e }) }), g = ({ type: n, pageTitleComponent: h, onPayVendor: g, onCreateInvoiceForCustomer: _, onViewVendorBills: v, onViewCustomerInvoices: y }) => {
|
|
17
|
+
let { i18n: b } = m(), [x, S] = u(void 0), [C, w] = u(!1), T = l((e) => {
|
|
18
|
+
S(e);
|
|
19
|
+
}, []), E = l(() => {
|
|
20
|
+
S(void 0);
|
|
21
|
+
}, []), D = r(), O = D.has(e.CounterpartWriteOrg), k = D.has(e.CounterpartReadOrg);
|
|
22
|
+
return /* @__PURE__ */ p(d, { children: [
|
|
23
|
+
h(/* @__PURE__ */ f(t, {
|
|
24
|
+
size: "lg",
|
|
25
|
+
onClick: () => w(!0),
|
|
26
|
+
className: "Monite-Counterparts-Actions-CreateNew",
|
|
27
|
+
disabled: !O,
|
|
28
|
+
children: b._("Create new")
|
|
29
|
+
})),
|
|
30
|
+
!k && /* @__PURE__ */ f(a, {}),
|
|
31
|
+
k && n === "customer" && /* @__PURE__ */ f(o, {
|
|
32
|
+
onRowClick: T,
|
|
33
|
+
openModal: w
|
|
34
|
+
}),
|
|
35
|
+
k && n === "vendor" && /* @__PURE__ */ f(s, {
|
|
36
|
+
onRowClick: T,
|
|
37
|
+
openModal: w
|
|
38
|
+
}),
|
|
39
|
+
x && /* @__PURE__ */ f(i, {
|
|
40
|
+
counterpartId: x,
|
|
41
|
+
open: !!x,
|
|
42
|
+
onClose: E,
|
|
43
|
+
customerType: n,
|
|
44
|
+
onPayVendor: g,
|
|
45
|
+
onCreateInvoiceForCustomer: _,
|
|
46
|
+
onViewVendorBills: v,
|
|
47
|
+
onViewCustomerInvoices: y
|
|
48
|
+
}),
|
|
49
|
+
C && /* @__PURE__ */ f(c, {
|
|
50
|
+
open: C,
|
|
51
|
+
onClose: () => w(!1),
|
|
52
|
+
onCreate: (e) => {
|
|
53
|
+
w(!1), S(e);
|
|
54
|
+
},
|
|
55
|
+
customerType: n
|
|
56
|
+
})
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
7
59
|
//#endregion
|
|
8
|
-
export {
|
|
60
|
+
export { h as Counterparts };
|
|
@@ -1 +1,60 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import { cn as e } from "./index49.js";
|
|
2
|
+
import { Button as t } from "./index56.js";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { X as r } from "lucide-react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
6
|
+
import { cva as o } from "class-variance-authority";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js
|
|
8
|
+
var s = o("ttw:relative ttw:w-full ttw:rounded-lg ttw:pl-4 ttw:pt-3 ttw:pr-3 ttw:pb-4 ttw:flex ttw:items-start ttw:gap-4", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
default: "ttw:bg-background ttw:text-foreground",
|
|
11
|
+
info: "ttw:bg-blue-50 ttw:text-blue-900 ttw:dark:bg-blue-950 ttw:dark:text-blue-100",
|
|
12
|
+
warning: "ttw:bg-yellow-50 ttw:text-yellow-900 ttw:dark:bg-yellow-950 ttw:dark:text-yellow-100",
|
|
13
|
+
error: "ttw:bg-red-50 ttw:text-red-900 ttw:dark:bg-red-950 ttw:dark:text-red-100",
|
|
14
|
+
success: "ttw:bg-green-50 ttw:text-green-900 ttw:dark:bg-green-950 ttw:dark:text-green-100"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { variant: "default" }
|
|
17
|
+
}), c = ({ className: o, variant: c, icon: l, children: u, ref: d, onClose: f, enableClose: p = !0, ...m }) => {
|
|
18
|
+
let [h, g] = n(!1);
|
|
19
|
+
return h ? null : /* @__PURE__ */ a("div", {
|
|
20
|
+
ref: d,
|
|
21
|
+
role: "alert",
|
|
22
|
+
className: e(s({ variant: c }), o),
|
|
23
|
+
...m,
|
|
24
|
+
children: [
|
|
25
|
+
l && /* @__PURE__ */ i("div", {
|
|
26
|
+
className: "ttw:shrink-0 ttw:h-8 ttw:w-8 ttw:mt-1",
|
|
27
|
+
children: l
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ i("div", {
|
|
30
|
+
className: "ttw:flex-1",
|
|
31
|
+
children: u
|
|
32
|
+
}),
|
|
33
|
+
p && /* @__PURE__ */ i(t, {
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "icon",
|
|
36
|
+
className: "ttw:h-8 ttw:w-8 ttw:rounded-md ttw:bg-transparent ttw:opacity-70 ttw:hover:opacity-100",
|
|
37
|
+
onClick: () => {
|
|
38
|
+
f && f(), g(!0);
|
|
39
|
+
},
|
|
40
|
+
"aria-label": "Close alert",
|
|
41
|
+
children: /* @__PURE__ */ i(r, {})
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
c.displayName = "Alert";
|
|
47
|
+
var l = ({ className: t, ref: n, ...r }) => /* @__PURE__ */ i("h3", {
|
|
48
|
+
ref: n,
|
|
49
|
+
className: e("ttw:mb-1 ttw:font-medium ttw:leading-none ttw:tracking-tight", t),
|
|
50
|
+
...r
|
|
51
|
+
});
|
|
52
|
+
l.displayName = "AlertTitle";
|
|
53
|
+
var u = ({ className: t, ref: n, ...r }) => /* @__PURE__ */ i("p", {
|
|
54
|
+
ref: n,
|
|
55
|
+
className: e("ttw:text-sm ttw:[&_p]:leading-relaxed ttw:font-normal", t),
|
|
56
|
+
...r
|
|
57
|
+
});
|
|
58
|
+
u.displayName = "AlertDescription";
|
|
59
|
+
//#endregion
|
|
60
|
+
export { c as Alert, u as AlertDescription, l as AlertTitle, s as alertVariants };
|
|
@@ -1,21 +1,299 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { useIsMounted as e } from "./index28.js";
|
|
2
|
+
import { getCounterpartName as t } from "./index53.js";
|
|
3
|
+
import { Button as n } from "./index56.js";
|
|
4
|
+
import { Input as ee } from "./index89.js";
|
|
5
|
+
import { Combobox as r, ComboboxChip as te, ComboboxChips as ne, ComboboxChipsInput as re, ComboboxContent as i, ComboboxEmpty as ie, ComboboxInput as ae, ComboboxItem as a, ComboboxList as o, useComboboxAnchor as oe } from "./index104.js";
|
|
6
|
+
import { useCounterpartList as se } from "./index125.js";
|
|
7
|
+
import "./index138.js";
|
|
8
|
+
import "./index189.js";
|
|
9
|
+
import { LoadingSpinner as ce } from "./index51.js";
|
|
10
|
+
import { Typography as s } from "./index62.js";
|
|
11
|
+
import { Field as c, FieldContent as l, FieldError as le, FieldLabel as u } from "./index88.js";
|
|
12
|
+
import { CreateCounterpartDialog as ue } from "./index250.js";
|
|
13
|
+
import { Alert as de, AlertDescription as fe, AlertTitle as pe } from "./index252.js";
|
|
14
|
+
import { useEffect as d, useMemo as f, useRef as me, useState as p } from "react";
|
|
15
|
+
import { Plus as m, Sparkles as he } from "lucide-react";
|
|
16
|
+
import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
17
|
+
import { useLingui as ge } from "@lingui/react";
|
|
18
|
+
import { Controller as _e, useFormContext as ve } from "react-hook-form";
|
|
5
19
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
20
|
+
var _ = "__create-new__", ye = 50, v = ({ control: v, name: y, label: b, required: x = !0, getCounterpartDefaultValues: be, multiple: S = !1, disabled: C = !1, customerType: w, counterpartRawName: T, counterpartMatchingToOCR: E, counterpartAISuggested: D, preselectedCounterpart: O, setShowEditCounterpartDialog: k, showEditCounterpartButton: xe = !1 }) => {
|
|
21
|
+
let { i18n: A } = ge(), { setValue: j, getValues: M } = ve(), N = me(null), [Se, P] = p(!1), [Ce, F] = p(!1), [I, we] = p(null), [L, R] = p(!1), [z, B] = p(!1), [V, H] = p(""), [Te, U] = p(""), [W, Ee] = p(!1), G = e(), K = oe(), { data: q, isLoading: De } = se({ query: { is_vendor: !0 } }), J = M(y), Y = w === "vendor" ? A._("New vendor") : A._("New customer"), Oe = w === "vendor" ? A._("Create new vendor") : A._("Create new customer"), X = f(() => S ? Array.isArray(J) && J.length > 0 : J != null && J !== "", [J, S]), Z = f(() => {
|
|
22
|
+
let e = [], n = q?.data.map((e) => ({
|
|
23
|
+
id: e.id,
|
|
24
|
+
label: t(e)
|
|
25
|
+
})) ?? [];
|
|
26
|
+
return !S && E && !n.some((e) => e.id === E.id) && e.push({
|
|
27
|
+
id: E.id,
|
|
28
|
+
label: t(E)
|
|
29
|
+
}), !S && D && !n.some((e) => e.id === D.id) && !e.some((e) => e.id === D.id) && e.push({
|
|
30
|
+
id: D.id,
|
|
31
|
+
label: t(D)
|
|
32
|
+
}), !S && O && !n.some((e) => e.id === O.id) && !e.some((e) => e.id === O.id) && e.push({
|
|
33
|
+
id: O.id,
|
|
34
|
+
label: t(O)
|
|
35
|
+
}), [...e, ...n];
|
|
36
|
+
}, [
|
|
37
|
+
q,
|
|
38
|
+
S,
|
|
39
|
+
E,
|
|
40
|
+
D,
|
|
41
|
+
O
|
|
42
|
+
]), ke = f(() => !S || !Array.isArray(J) ? [] : J.map((e) => e.id), [J, S]);
|
|
43
|
+
d(() => {
|
|
44
|
+
if (I) {
|
|
45
|
+
let e = M(y);
|
|
46
|
+
if (S) {
|
|
47
|
+
let t = e || [];
|
|
48
|
+
if (!t?.some((e) => e.id === I)) {
|
|
49
|
+
let e = Z.find((e) => e.id === I), n = {
|
|
50
|
+
id: I,
|
|
51
|
+
label: e ? e.label : Y
|
|
52
|
+
};
|
|
53
|
+
j(y, [...t, n]);
|
|
54
|
+
}
|
|
55
|
+
} else j(y, I, { shouldValidate: !0 });
|
|
56
|
+
}
|
|
57
|
+
}, [
|
|
58
|
+
I,
|
|
59
|
+
j,
|
|
60
|
+
y,
|
|
61
|
+
M,
|
|
62
|
+
Z,
|
|
63
|
+
S,
|
|
64
|
+
Y
|
|
65
|
+
]), d(() => {
|
|
66
|
+
if (X || D?.id) B(!0);
|
|
67
|
+
else {
|
|
68
|
+
let e = setTimeout(() => {
|
|
69
|
+
G.current && B(!0);
|
|
70
|
+
}, ye);
|
|
71
|
+
return () => clearTimeout(e);
|
|
72
|
+
}
|
|
73
|
+
}, [
|
|
74
|
+
X,
|
|
75
|
+
D?.id,
|
|
76
|
+
G
|
|
77
|
+
]), d(() => {
|
|
78
|
+
if (!S && !X && !L && G.current) {
|
|
79
|
+
let e = D || E;
|
|
80
|
+
if (e?.id) {
|
|
81
|
+
if (e === D && !z) return;
|
|
82
|
+
j(y, e.id, { shouldValidate: !0 });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}, [
|
|
86
|
+
E,
|
|
87
|
+
D,
|
|
88
|
+
S,
|
|
89
|
+
X,
|
|
90
|
+
L,
|
|
91
|
+
y,
|
|
92
|
+
j,
|
|
93
|
+
G,
|
|
94
|
+
z
|
|
95
|
+
]);
|
|
96
|
+
let Q = f(() => S ? Array.isArray(J) ? J : [] : Z.find((e) => e.id === J) || null, [
|
|
97
|
+
J,
|
|
98
|
+
Z,
|
|
99
|
+
S
|
|
100
|
+
]), $ = f(() => {
|
|
101
|
+
let e = Q ? "" : V.toLowerCase().trim();
|
|
102
|
+
return e ? Z.filter((t) => t.label.toLowerCase().includes(e)) : Z;
|
|
103
|
+
}, [
|
|
104
|
+
V,
|
|
105
|
+
Q,
|
|
106
|
+
Z
|
|
107
|
+
]), Ae = Q?.label ?? V;
|
|
108
|
+
return De && !(E || D || O) ? /* @__PURE__ */ h(c, { children: /* @__PURE__ */ g(l, { children: [/* @__PURE__ */ h(u, {
|
|
109
|
+
required: x,
|
|
110
|
+
children: b
|
|
111
|
+
}), /* @__PURE__ */ g("div", {
|
|
112
|
+
className: "ttw:relative",
|
|
113
|
+
children: [/* @__PURE__ */ h(ee, {
|
|
114
|
+
disabled: !0,
|
|
115
|
+
className: "ttw:opacity-50"
|
|
116
|
+
}), /* @__PURE__ */ h("span", {
|
|
117
|
+
className: "ttw:absolute ttw:right-3 ttw:top-1/2 ttw:-translate-y-1/2 ttw:flex ttw:items-center",
|
|
118
|
+
children: /* @__PURE__ */ h(ce, { className: "ttw:h-4 ttw:w-4" })
|
|
119
|
+
})]
|
|
120
|
+
})] }) }) : /* @__PURE__ */ g("div", {
|
|
121
|
+
ref: N,
|
|
122
|
+
children: [
|
|
123
|
+
Se && /* @__PURE__ */ h(ue, {
|
|
124
|
+
open: !0,
|
|
125
|
+
onClose: () => {
|
|
126
|
+
P(!1), F(!1);
|
|
127
|
+
},
|
|
128
|
+
onCreate: (e) => {
|
|
129
|
+
P(!1), we(e);
|
|
130
|
+
},
|
|
131
|
+
getCounterpartDefaultValues: Ce ? be : void 0,
|
|
132
|
+
customerType: w
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ h(_e, {
|
|
135
|
+
control: v,
|
|
136
|
+
name: y,
|
|
137
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ h(c, { children: /* @__PURE__ */ g(l, { children: [
|
|
138
|
+
/* @__PURE__ */ h(u, {
|
|
139
|
+
required: x,
|
|
140
|
+
children: b
|
|
141
|
+
}),
|
|
142
|
+
S ? /* @__PURE__ */ g(r, {
|
|
143
|
+
multiple: !0,
|
|
144
|
+
value: ke,
|
|
145
|
+
items: Z.map((e) => e.id),
|
|
146
|
+
filter: () => !0,
|
|
147
|
+
onInputValueChange: (e) => U(e),
|
|
148
|
+
onValueChange: (e) => {
|
|
149
|
+
R(!0), U("");
|
|
150
|
+
let t = e.map((e) => Z.find((t) => t.id === e) || {
|
|
151
|
+
id: e,
|
|
152
|
+
label: Y
|
|
153
|
+
});
|
|
154
|
+
j(y, t);
|
|
155
|
+
},
|
|
156
|
+
disabled: C || De,
|
|
157
|
+
children: [/* @__PURE__ */ g(ne, {
|
|
158
|
+
ref: K,
|
|
159
|
+
"aria-invalid": !!t || void 0,
|
|
160
|
+
children: [ke.map((e) => {
|
|
161
|
+
let t = Z.find((t) => t.id === e);
|
|
162
|
+
return /* @__PURE__ */ h(te, { children: t?.label ?? "" }, e);
|
|
163
|
+
}), /* @__PURE__ */ h(re, {})]
|
|
164
|
+
}), /* @__PURE__ */ g(i, {
|
|
165
|
+
anchor: K,
|
|
166
|
+
container: N.current,
|
|
167
|
+
children: [/* @__PURE__ */ h("div", {
|
|
168
|
+
className: "ttw:px-1 ttw:pt-1",
|
|
169
|
+
children: /* @__PURE__ */ g(n, {
|
|
170
|
+
variant: "ghost",
|
|
171
|
+
size: "sm",
|
|
172
|
+
type: "button",
|
|
173
|
+
className: "ttw:w-full ttw:justify-start ttw:text-primary ttw:font-semibold ttw:hover:text-primary ttw:focus:text-primary",
|
|
174
|
+
onClick: () => P(!0),
|
|
175
|
+
children: [/* @__PURE__ */ h(m, {}), Oe]
|
|
176
|
+
})
|
|
177
|
+
}), /* @__PURE__ */ h(o, { children: (() => {
|
|
178
|
+
let e = Te.toLowerCase().trim(), t = e ? Z.filter((t) => t.label.toLowerCase().includes(e)) : Z;
|
|
179
|
+
return t.length === 0 ? /* @__PURE__ */ h(s, {
|
|
180
|
+
variant: "body2",
|
|
181
|
+
color: "muted",
|
|
182
|
+
className: "ttw:flex ttw:w-full ttw:justify-center ttw:py-2 ttw:text-center",
|
|
183
|
+
children: A._("No {customerType} found", { customerType: w === "vendor" ? "vendors" : "customers" })
|
|
184
|
+
}) : t.map((e) => /* @__PURE__ */ h(a, {
|
|
185
|
+
value: e.id,
|
|
186
|
+
children: e.label
|
|
187
|
+
}, e.id));
|
|
188
|
+
})() })]
|
|
189
|
+
})]
|
|
190
|
+
}) : /* @__PURE__ */ g(r, {
|
|
191
|
+
value: e.value || null,
|
|
192
|
+
onValueChange: (e) => {
|
|
193
|
+
if (e === _) {
|
|
194
|
+
P(!0);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
R(!0), H(""), j(y, e ?? "", { shouldValidate: !0 });
|
|
198
|
+
},
|
|
199
|
+
inputValue: Ae,
|
|
200
|
+
onInputValueChange: (t) => {
|
|
201
|
+
t !== _ && (Z.some((e) => e.id === t) || (H(t), e.value && j(y, "")));
|
|
202
|
+
},
|
|
203
|
+
filter: () => !0,
|
|
204
|
+
open: W,
|
|
205
|
+
onOpenChange: Ee,
|
|
206
|
+
disabled: C,
|
|
207
|
+
children: [/* @__PURE__ */ g("div", {
|
|
208
|
+
className: "ttw:relative",
|
|
209
|
+
children: [/* @__PURE__ */ h(ae, {
|
|
210
|
+
className: "ttw:w-full",
|
|
211
|
+
"aria-invalid": !!t || void 0,
|
|
212
|
+
showClear: W && (!!Q || !!V),
|
|
213
|
+
disabled: C
|
|
214
|
+
}), !W && Q && xe && k && e.value && /* @__PURE__ */ h("div", {
|
|
215
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:inset-y-0 ttw:right-8 ttw:flex ttw:items-center",
|
|
216
|
+
children: /* @__PURE__ */ h(n, {
|
|
217
|
+
type: "button",
|
|
218
|
+
variant: "ghost",
|
|
219
|
+
size: "sm",
|
|
220
|
+
className: "ttw:pointer-events-auto ttw:min-w-0 ttw:px-1",
|
|
221
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
222
|
+
onClick: (e) => {
|
|
223
|
+
e.preventDefault(), k(!0);
|
|
224
|
+
},
|
|
225
|
+
children: A._("Edit")
|
|
226
|
+
})
|
|
227
|
+
})]
|
|
228
|
+
}), /* @__PURE__ */ h(i, {
|
|
229
|
+
container: N.current,
|
|
230
|
+
children: /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ g(a, {
|
|
231
|
+
value: _,
|
|
232
|
+
className: "ttw:text-primary ttw:font-semibold ttw:hover:text-primary ttw:focus:text-primary",
|
|
233
|
+
children: [/* @__PURE__ */ h(m, {}), Oe]
|
|
234
|
+
}), $.length === 0 ? /* @__PURE__ */ h(ie, { children: A._("No {customerType} found", { customerType: w === "vendor" ? "vendors" : "customers" }) }) : $.map((e) => /* @__PURE__ */ h(a, {
|
|
235
|
+
value: e.id,
|
|
236
|
+
children: e.label
|
|
237
|
+
}, e.id))] })
|
|
238
|
+
})]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ h(le, { errors: [t] })
|
|
241
|
+
] }) })
|
|
242
|
+
}),
|
|
243
|
+
D && J === D.id && /* @__PURE__ */ g(de, {
|
|
244
|
+
variant: "info",
|
|
245
|
+
className: "ttw:mt-2",
|
|
246
|
+
icon: /* @__PURE__ */ h(he, {}),
|
|
247
|
+
children: [/* @__PURE__ */ h(pe, { children: A._("Vendor auto-matched by AI") }), /* @__PURE__ */ h(fe, { children: A._("The vendor name on the bill doesn't exactly match the saved vendor, so AI selected the closest option.") })]
|
|
248
|
+
}),
|
|
249
|
+
!D && !E && T && !J && !S && /* @__PURE__ */ g(s, {
|
|
250
|
+
variant: "body2",
|
|
251
|
+
color: "muted",
|
|
252
|
+
className: "ttw:mt-1",
|
|
253
|
+
children: [
|
|
254
|
+
A._("The specified vendor has not been saved yet."),
|
|
255
|
+
" ",
|
|
256
|
+
A._("Create new vendor:"),
|
|
257
|
+
/* @__PURE__ */ h(n, {
|
|
258
|
+
variant: "link",
|
|
259
|
+
size: "sm",
|
|
260
|
+
className: "ttw:ml-0.5 ttw:p-0 ttw:h-auto ttw:text-xs ttw:underline",
|
|
261
|
+
onClick: (e) => {
|
|
262
|
+
e.preventDefault(), F(!0), P(!0);
|
|
263
|
+
},
|
|
264
|
+
children: T
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
}),
|
|
268
|
+
!D && E && J == E.id && !S && k && /* @__PURE__ */ h(de, {
|
|
269
|
+
variant: "warning",
|
|
270
|
+
className: "ttw:mt-2",
|
|
271
|
+
children: /* @__PURE__ */ g(fe, { children: [
|
|
272
|
+
A._("The vendor details in the bill don't fully match the saved vendor. Consider editing the saved vendor or creating a new one."),
|
|
273
|
+
/* @__PURE__ */ h("br", {}),
|
|
274
|
+
/* @__PURE__ */ h(n, {
|
|
275
|
+
variant: "link",
|
|
276
|
+
size: "sm",
|
|
277
|
+
className: "ttw:mr-1 ttw:p-0 ttw:h-auto ttw:font-medium ttw:text-inherit ttw:underline",
|
|
278
|
+
onClick: (e) => {
|
|
279
|
+
e.preventDefault(), k(!0);
|
|
280
|
+
},
|
|
281
|
+
children: `${A._("Edit")} ${t(E)}`
|
|
282
|
+
}),
|
|
283
|
+
A._(" or "),
|
|
284
|
+
/* @__PURE__ */ h(n, {
|
|
285
|
+
variant: "link",
|
|
286
|
+
size: "sm",
|
|
287
|
+
className: "ttw:ml-1 ttw:p-0 ttw:h-auto ttw:font-medium ttw:text-inherit ttw:underline",
|
|
288
|
+
onClick: (e) => {
|
|
289
|
+
e.preventDefault(), F(!0), P(!0);
|
|
290
|
+
},
|
|
291
|
+
children: A._("Create new vendor")
|
|
292
|
+
})
|
|
293
|
+
] })
|
|
294
|
+
})
|
|
295
|
+
]
|
|
11
296
|
});
|
|
12
|
-
}
|
|
13
|
-
function i({ className: r, ...i }) {
|
|
14
|
-
return /* @__PURE__ */ t(n.Fallback, {
|
|
15
|
-
"data-slot": "avatar-fallback",
|
|
16
|
-
className: e("ttw:bg-muted ttw:flex ttw:size-full ttw:items-center ttw:justify-center ttw:rounded-full", r),
|
|
17
|
-
...i
|
|
18
|
-
});
|
|
19
|
-
}
|
|
297
|
+
};
|
|
20
298
|
//#endregion
|
|
21
|
-
export {
|
|
299
|
+
export { v as CounterpartAutocomplete };
|