@tesouro/embedded-components-react 0.2.79 → 0.2.81
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 +12 -12
- package/dist/index.css +13 -0
- package/dist/index.d.ts +16 -0
- package/dist/lib/BankAccountsWidget.d.ts +16 -0
- package/dist/lib/ReceivablesWidget.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +37 -20
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index11.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index12.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index2.js +199 -133
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index5.js +29 -49
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index6.js +56 -10
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index7.js +13 -17
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index8.js +16 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +156 -116
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index3.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +93 -4
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +69 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index4.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index6.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +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/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/index12.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +32 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +12 -32
- 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 +7 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +26 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +13 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +17 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +80 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +39 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +18 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +5 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +2 -12
- 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 +10 -119
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +21 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +76 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +6 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +20 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +27 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +114 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +64 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +8 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +15 -152
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +13 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +12 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +32 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +12 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +24 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +12 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +10 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +121 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +12 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +40 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +45 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +11 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +45 -196
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +11 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +148 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +54 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +71 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +26 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +3 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +59 -111
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +57 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +25 -190
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +94 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +96 -106
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +13 -132
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +12 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +10 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +96 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +9 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +46 -183
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +75 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +54 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +195 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +26 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +78 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +28 -7
- 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 +39 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +7 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +109 -387
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +67 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +190 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +31 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +108 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +134 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +25 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index2.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +19 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +15 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +183 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +12 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +19 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +48 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +4 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +5 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +88 -398
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +7 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +49 -406
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +392 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +2 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +7 -101
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +32 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +59 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +397 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +65 -97
- 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 +407 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +25 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +12 -214
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +10 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +214 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +12 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +32 -141
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +47 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +5 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +71 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +32 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +20 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +125 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +85 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +24 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +149 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +8 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +15 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +67 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +21 -343
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +51 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +44 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +73 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +29 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +486 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +163 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +39 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +59 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +30 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +113 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +22 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +44 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +52 -245
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +2 -183
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +96 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +96 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +192 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +17 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +28 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +39 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +61 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +90 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +108 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +86 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +62 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +37 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +341 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +296 -89
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +99 -108
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +157 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +267 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +23 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +20 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +22 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +56 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +27 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +53 -338
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +18 -301
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +36 -103
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +34 -162
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +54 -267
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +345 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +12 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +13 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +13 -191
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +14 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +19 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +31 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +35 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +35 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +15 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +16 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index3.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +241 -482
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +174 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +11 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +19 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +24 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +38 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +53 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +47 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +29 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +97 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +46 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +25 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +126 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +14 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +78 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +77 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +39 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +19 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +40 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +159 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +27 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +29 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +76 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +65 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +43 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +22 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +182 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +105 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +80 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +280 -154
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +48 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +15 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +86 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +221 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +20 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +14 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +17 -106
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +169 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +119 -270
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +157 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +12 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +18 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +58 -220
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +63 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +57 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +6 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +10 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +60 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +23 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +60 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +14 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +21 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +22 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +25 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +31 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +4 -103
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +127 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +12 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +21 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +47 -32
- 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 +11 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +66 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +45 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +24 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +32 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +25 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +123 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +18 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +16 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +16 -50
- 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 +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +16 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +71 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +16 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +16 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +16 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +11 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +53 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +34 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +21 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +7 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +48 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +18 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +22 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +61 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +15 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +14 -65
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +22 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index4.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +22 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +27 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +35 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +45 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +11 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +37 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +11 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +65 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +21 -28
- 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 +2 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +93 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +29 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +35 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +104 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +21 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +34 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +56 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +33 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +40 -72
- 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 +72 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +94 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +10 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +10 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +11 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +67 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +64 -108
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +35 -119
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +12 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +33 -16
- 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 +85 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +24 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +105 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +107 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +29 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +24 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +39 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +5 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +8 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +83 -29
- 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 +39 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +17 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +50 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +38 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +47 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +72 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +84 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +52 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +51 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +51 -30
- 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 +29 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +56 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +57 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +69 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +21 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +93 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +15 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +20 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +9 -43
- 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 +41 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +35 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +17 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +49 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +56 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +29 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +30 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +53 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +67 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +40 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +33 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +15 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +12 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +9 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +64 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +51 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +52 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +41 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +47 -55
- 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 +17 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +38 -18
- 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 +9 -9
- 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 +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.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/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/settings-widget/feature/dist/index2.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +207 -191
- 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 +26 -26
- package/dist/packages/shared-ui-shadcn/dist/index.js +15 -13
- package/package.json +1 -1
|
@@ -1,252 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import { useMyEntity as fe } from "./index78.js";
|
|
16
|
-
import { useMemo as M, useState as I, useCallback as ye, useId as ve } from "react";
|
|
17
|
-
import "react-hot-toast";
|
|
18
|
-
import { useLingui as be } from "@lingui/react";
|
|
19
|
-
import { rateMinorToMajor as N, rateMajorToMinor as xe } from "./index186.js";
|
|
20
|
-
import { ConfirmationModal as ge } from "./index234.js";
|
|
21
|
-
import { Dialog as he, DialogContent as we, DialogHeader as Ce, DialogTitle as De, DialogDescription as $e, DialogClose as Me } from "./index188.js";
|
|
22
|
-
import { Button as S } from "./index84.js";
|
|
23
|
-
import { zodResolver as Ie } from "@hookform/resolvers/zod";
|
|
24
|
-
import { useForm as Ne, FormProvider as Se } from "react-hook-form";
|
|
25
|
-
import { X as Te } from "lucide-react";
|
|
26
|
-
import { InvoicePreview as ke } from "./index173.js";
|
|
27
|
-
import { useGetPaymentTerms as Ee } from "./index364.js";
|
|
28
|
-
import { useGetMeasureUnits as Pe } from "./index189.js";
|
|
29
|
-
import { CreateProduct as Ue } from "./index44.js";
|
|
30
|
-
import { buildPaymentTermsPayload as Le, CUSTOM_DATE_PAYMENT_TERM as Fe, RECEIPT_DUE_PAYMENT_TERM as Oe } from "./index175.js";
|
|
31
|
-
import { NotesSection as Re } from "./index191.js";
|
|
32
|
-
const Ve = (e) => {
|
|
33
|
-
if (e?.id)
|
|
34
|
-
return {
|
|
35
|
-
payment_terms_id: e.id,
|
|
36
|
-
payment_terms_custom_date: null
|
|
37
|
-
};
|
|
38
|
-
const m = e?.term_final?.end_date;
|
|
39
|
-
return m ? {
|
|
40
|
-
payment_terms_id: Fe,
|
|
41
|
-
payment_terms_custom_date: pe(m)
|
|
42
|
-
} : e?.term_final?.number_of_days === 0 ? {
|
|
43
|
-
payment_terms_id: Oe,
|
|
44
|
-
payment_terms_custom_date: null
|
|
45
|
-
} : {
|
|
46
|
-
payment_terms_id: "",
|
|
47
|
-
payment_terms_custom_date: null
|
|
48
|
-
};
|
|
49
|
-
}, bt = (e) => /* @__PURE__ */ r(je, { ...e }), je = ({
|
|
50
|
-
invoice: e,
|
|
51
|
-
onCancel: m,
|
|
52
|
-
onUpdated: T,
|
|
53
|
-
isOpen: k
|
|
1
|
+
import { jsxs as f, jsx as s } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as c, useMemo as u } from "react";
|
|
3
|
+
import { useMoniteContext as y } from "./index57.js";
|
|
4
|
+
import { useRootElements as E } from "./index92.js";
|
|
5
|
+
import { useDebounceCallback as x, useDebounce as N } from "./index65.js";
|
|
6
|
+
import { useLingui as v } from "@lingui/react";
|
|
7
|
+
import { X as T } from "lucide-react";
|
|
8
|
+
import { SearchInput as A, DatePicker as R, Combobox as $ } from "../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
9
|
+
import { FILTER_TYPE_SEARCH as k, FILTER_TYPE_CREATED_BY as D, FILTER_TYPE_CREATED_AT as _ } from "./index256.js";
|
|
10
|
+
const C = 500, F = (t) => {
|
|
11
|
+
const e = `${t.first_name ?? ""} ${t.last_name ?? ""}`.trim();
|
|
12
|
+
return e && t.email ? `${e} (${t.email})` : e || t.email || t.id;
|
|
13
|
+
}, L = ({
|
|
14
|
+
onChange: t
|
|
54
15
|
}) => {
|
|
55
16
|
const {
|
|
56
|
-
i18n:
|
|
57
|
-
} =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
isLoading: L
|
|
65
|
-
} = Pe(), F = M(() => ({
|
|
66
|
-
/** Customer section */
|
|
67
|
-
counterpart_id: e.counterpart_id,
|
|
68
|
-
default_shipping_address_id: e.counterpart_shipping_address?.id ?? "",
|
|
69
|
-
default_billing_address_id: e.counterpart_billing_address?.id ?? "",
|
|
70
|
-
/** Entity section */
|
|
71
|
-
purchase_order: e.purchase_order ?? "",
|
|
72
|
-
footer: e.footer ?? "",
|
|
73
|
-
/** Items section */
|
|
74
|
-
tax_rate: (() => {
|
|
75
|
-
const t = e.line_items.find((a) => a.product.tax_rate?.value !== void 0);
|
|
76
|
-
return t ? String(N(t.product.tax_rate.value ?? 0)) : void 0;
|
|
77
|
-
})(),
|
|
78
|
-
line_items: e.line_items.map((t) => {
|
|
79
|
-
const a = t.product.measure_unit?.name, d = t.product.measure_unit?.id;
|
|
80
|
-
return {
|
|
81
|
-
quantity: t.quantity,
|
|
82
|
-
product_id: t.product.id,
|
|
83
|
-
taxable: t.tax_status === "taxable",
|
|
84
|
-
product: {
|
|
85
|
-
name: t.product.name,
|
|
86
|
-
price: e.tax_mode === "inclusive" ? t.product.price_after_tax : t.product.price,
|
|
87
|
-
// Get measure_unit_id directly from the API response if available
|
|
88
|
-
measure_unit_id: d && d !== "" ? d : void 0,
|
|
89
|
-
// Store the measure unit name separately for custom units
|
|
90
|
-
measure_unit_name: !d && a ? a : void 0,
|
|
91
|
-
type: t.product.type || "product"
|
|
92
|
-
},
|
|
93
|
-
// For custom measure units that don't have an ID but have a name
|
|
94
|
-
measure_unit: !d && a ? {
|
|
95
|
-
name: a,
|
|
96
|
-
id: null
|
|
97
|
-
} : void 0,
|
|
98
|
-
tax_rate_value: t.product.tax_rate.value !== void 0 ? N(t.product.tax_rate.value) : void 0
|
|
99
|
-
};
|
|
100
|
-
}),
|
|
101
|
-
memo: e.memo ?? "",
|
|
102
|
-
/** Payment section */
|
|
103
|
-
bank_account_id: e.bank_account_id ?? "",
|
|
104
|
-
...Ve(e.payment_terms),
|
|
105
|
-
/** Reminders section */
|
|
106
|
-
payment_reminder_id: e.payment_reminder_id ?? "",
|
|
107
|
-
overdue_reminder_id: e.overdue_reminder_id ?? "",
|
|
108
|
-
tax_mode: e.tax_mode ?? "exclusive"
|
|
109
|
-
}), [e]), y = Ne({
|
|
110
|
-
resolver: Ie(ne(n)),
|
|
111
|
-
defaultValues: F
|
|
112
|
-
}), c = e.currency, {
|
|
113
|
-
handleSubmit: O,
|
|
114
|
-
formState: {
|
|
115
|
-
isDirty: v
|
|
116
|
-
},
|
|
117
|
-
getValues: R,
|
|
118
|
-
reset: V,
|
|
119
|
-
watch: o
|
|
120
|
-
} = y, {
|
|
121
|
-
registerLineItemCleanupFn: j,
|
|
122
|
-
runLineItemCleanup: A
|
|
123
|
-
} = _e();
|
|
124
|
-
se(f, R, V);
|
|
125
|
-
const [q, b] = I(!1), [x, p] = I(!1), B = ye(() => {
|
|
126
|
-
if (!v) {
|
|
127
|
-
m();
|
|
128
|
-
return;
|
|
17
|
+
i18n: e
|
|
18
|
+
} = v(), {
|
|
19
|
+
api: n
|
|
20
|
+
} = y(), [r, l] = c(null), [m, a] = c(""), b = N(m, C), {
|
|
21
|
+
data: d
|
|
22
|
+
} = n.finops.getEntityUsers.useQuery({
|
|
23
|
+
query: {
|
|
24
|
+
name__istartswith: b || void 0
|
|
129
25
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
} =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
name: i.product.name,
|
|
160
|
-
type: i.product.type,
|
|
161
|
-
measure_unit: l ? {
|
|
162
|
-
name: l
|
|
163
|
-
} : void 0,
|
|
164
|
-
price: i.product.price ? {
|
|
165
|
-
currency: i.product.price.currency ?? "USD",
|
|
166
|
-
value: Math.round(i.product.price.value ?? 0)
|
|
167
|
-
} : void 0
|
|
168
|
-
},
|
|
169
|
-
tax_rate_value: i.taxable && a.tax_rate !== void 0 ? xe(Number(a.tax_rate)) : void 0
|
|
170
|
-
};
|
|
171
|
-
})
|
|
172
|
-
}, ee = {
|
|
173
|
-
invoice: {
|
|
174
|
-
/** Customer section */
|
|
175
|
-
counterpart_id: a.counterpart_id,
|
|
176
|
-
currency: c,
|
|
177
|
-
memo: a.memo,
|
|
178
|
-
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
179
|
-
counterpart_shipping_address_id: a?.default_shipping_address_id || null,
|
|
180
|
-
counterpart_billing_address_id: a?.default_billing_address_id,
|
|
181
|
-
/** We shouldn't send an empty string to the server if the value is not set */
|
|
182
|
-
bank_account_id: e.bank_account_id,
|
|
183
|
-
bank_account_type: e.bank_account_type,
|
|
184
|
-
/**
|
|
185
|
-
* Payment terms aren't editable here — rebuild the
|
|
186
|
-
* request payload from the seeded form values (a saved
|
|
187
|
-
* `payment_terms_id`, or an inline `payment_terms`
|
|
188
|
-
* object for "Custom date" / "Due on receipt") so the
|
|
189
|
-
* backend keeps the same due date. Reusing the shared
|
|
190
|
-
* builder guarantees a request-shaped
|
|
191
|
-
* `InlinePaymentTermsRequestPayload` rather than the
|
|
192
|
-
* response object, which carries id/name/description
|
|
193
|
-
* that the request type rejects.
|
|
194
|
-
*/
|
|
195
|
-
...Le({
|
|
196
|
-
paymentTermId: a.payment_terms_id,
|
|
197
|
-
customDueDate: a.payment_terms_custom_date
|
|
198
|
-
}),
|
|
199
|
-
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
200
|
-
payment_reminder_id: a.payment_reminder_id || null,
|
|
201
|
-
// @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
|
|
202
|
-
overdue_reminder_id: a.overdue_reminder_id || null
|
|
203
|
-
/** !!! Note !!! Backend is not supported to edit `purchase_order` so we have to remove it */
|
|
204
|
-
// purchase_order: values.purchase_order || undefined,
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
g.mutate(d, {
|
|
208
|
-
onSuccess: () => {
|
|
209
|
-
h.mutate(ee, {
|
|
210
|
-
onSuccess: (i) => {
|
|
211
|
-
T(i);
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
})(t);
|
|
217
|
-
}, className: "ttw:mb-14", children: /* @__PURE__ */ s("div", { className: "ttw:flex ttw:flex-col ttw:gap-8", children: [
|
|
218
|
-
/* @__PURE__ */ s("h1", { className: "ttw:text-2xl ttw:font-bold", children: [
|
|
219
|
-
n._("Invoice"),
|
|
220
|
-
" ",
|
|
221
|
-
/* @__PURE__ */ s("span", { className: "ttw:text-gray-500", children: [
|
|
222
|
-
"#",
|
|
223
|
-
e.document_id ?? de
|
|
224
|
-
] })
|
|
225
|
-
] }),
|
|
226
|
-
/* @__PURE__ */ r(ie, { defaultCurrency: c, registerLineItemCleanupFn: j, handleOpenCreateProductDialog: () => p(!0) }),
|
|
227
|
-
/* @__PURE__ */ r(Re, { disabled: _ }),
|
|
228
|
-
/* @__PURE__ */ r(oe, { disabled: _ })
|
|
229
|
-
] }) }) })
|
|
230
|
-
] }),
|
|
231
|
-
/* @__PURE__ */ r("div", { className: "ttw:flex-1/2 ttw:w-1/2", children: /* @__PURE__ */ r(ke, { invoiceData: {
|
|
232
|
-
payment_terms_id: z,
|
|
233
|
-
line_items: (Y || []).map((t) => ({
|
|
234
|
-
...t,
|
|
235
|
-
id: t.id || `temp-${Math.random().toString(36).substr(2, 9)}`
|
|
236
|
-
})),
|
|
237
|
-
memo: G,
|
|
238
|
-
footer: H,
|
|
239
|
-
bank_account_id: J,
|
|
240
|
-
bank_account_type: e.bank_account_type,
|
|
241
|
-
tax_mode: K,
|
|
242
|
-
purchase_order: X || void 0,
|
|
243
|
-
tax_rate: Q
|
|
244
|
-
}, counterpart: W, currency: c, entityData: E, address: Z, paymentTerms: U }) })
|
|
245
|
-
] }) }),
|
|
246
|
-
x && /* @__PURE__ */ r(Ue, { open: x, onClose: () => p(!1), onCreated: () => p(!1) }),
|
|
247
|
-
/* @__PURE__ */ r(ge, { open: q, title: n._("Cancel without saving?"), message: n._("There are unsaved changes. If you leave, they will be lost."), confirmLabel: n._("Yes"), cancelLabel: n._("No"), onClose: () => b(!1), onConfirm: m })
|
|
26
|
+
}), w = u(() => d?.data ?? [], [d]), i = u(() => w.map((o) => ({
|
|
27
|
+
value: o.id,
|
|
28
|
+
label: F(o)
|
|
29
|
+
})), [w]), p = u(() => !r || i.some((o) => o.value === r.value) ? i : [r, ...i], [i, r]);
|
|
30
|
+
return /* @__PURE__ */ s($, { items: p, value: r?.value ?? "", placeholder: e._("Added by"), emptyMessage: e._("No users found"), clearAriaLabel: e._("Clear selection"), onQueryChange: a, onValueChange: (o) => {
|
|
31
|
+
const h = Array.isArray(o) ? o[0] ?? "" : o ?? "";
|
|
32
|
+
l(p.find((g) => g.value === h) ?? null), t(h || void 0);
|
|
33
|
+
} });
|
|
34
|
+
}, q = ({
|
|
35
|
+
onChangeFilter: t
|
|
36
|
+
}) => {
|
|
37
|
+
const {
|
|
38
|
+
i18n: e
|
|
39
|
+
} = v(), {
|
|
40
|
+
root: n
|
|
41
|
+
} = E(), [r, l] = c(void 0), m = x((a) => {
|
|
42
|
+
t(k, a.trim() ? a : null);
|
|
43
|
+
}, C);
|
|
44
|
+
return /* @__PURE__ */ f("div", { className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-2 ttw:py-2", children: [
|
|
45
|
+
/* @__PURE__ */ s("div", { className: "ttw:flex-1", children: /* @__PURE__ */ s(A, { placeholder: e._("Search"), className: "ttw:h-9 ttw:w-full", onChange: (a) => m(a.target.value) }) }),
|
|
46
|
+
/* @__PURE__ */ s("div", { className: "ttw:w-48 ttw:shrink-0", children: /* @__PURE__ */ s(L, { onChange: (a) => t(D, a ?? null) }) }),
|
|
47
|
+
/* @__PURE__ */ f("div", { className: "ttw:relative ttw:w-44 ttw:shrink-0", children: [
|
|
48
|
+
/* @__PURE__ */ s(R, { value: r, placeholder: e._("Created at"), className: `ttw:h-9 ttw:border-border${r ? " ttw:pr-8" : ""}`, container: n, onChange: (a) => {
|
|
49
|
+
l(a), t(_, a ?? null);
|
|
50
|
+
} }),
|
|
51
|
+
r ? /* @__PURE__ */ s("button", { type: "button", "aria-label": e._("Clear created at filter"), className: "ttw:absolute ttw:right-2 ttw:top-1/2 ttw:inline-flex ttw:size-4 ttw:-translate-y-1/2 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-sm ttw:text-muted-foreground ttw:opacity-70 hover:ttw:opacity-100", onClick: () => {
|
|
52
|
+
l(void 0), t(_, null);
|
|
53
|
+
}, children: /* @__PURE__ */ s(T, { className: "ttw:size-3.5" }) }) : null
|
|
54
|
+
] })
|
|
248
55
|
] });
|
|
249
56
|
};
|
|
250
57
|
export {
|
|
251
|
-
|
|
58
|
+
q as Filters
|
|
252
59
|
};
|
|
@@ -1,185 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { useMemo as Q, useEffect as J, useState as U, useId as W, useCallback as Y } from "react";
|
|
3
|
-
import { useForm as X } from "react-hook-form";
|
|
4
|
-
import { toast as Z } from "react-hot-toast";
|
|
5
|
-
import { useMoniteContext as ee } from "./index57.js";
|
|
6
|
-
import { MoniteScopedProviders as te } from "./index83.js";
|
|
7
|
-
import { useCounterpartById as ie } from "./index70.js";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
|
-
import { useCounterpartContactList as oe } from "./index74.js";
|
|
10
|
-
import { useMe as ne, useMyEntity as ae } from "./index78.js";
|
|
11
|
-
import { useLingui as R } from "@lingui/react";
|
|
12
|
-
import { useGetReceivableById as se } from "./index82.js";
|
|
13
|
-
import { CenteredContentBox as re } from "./index228.js";
|
|
14
|
-
import { IconWrapper as de } from "./index229.js";
|
|
15
|
-
import { zodResolver as me } from "@hookform/resolvers/zod";
|
|
16
|
-
import ce from "@mui/icons-material/ArrowBack";
|
|
17
|
-
import le from "@mui/icons-material/Close";
|
|
18
|
-
import { Dialog as ue } from "./index50.js";
|
|
19
|
-
import { DialogTitle as pe, Toolbar as fe, Grid as D, Stack as $, Button as j, Typography as ye, DialogContent as he, CircularProgress as ve } from "@mui/material";
|
|
20
|
-
import { getEmailInvoiceDetailsSchema as be } from "./index174.js";
|
|
21
|
-
import { Form as ge, FormContent as Ie } from "./index365.js";
|
|
22
|
-
import { getDefaultContact as _e } from "./index366.js";
|
|
23
|
-
import { useIssueReceivableById as Ce } from "./index253.js";
|
|
24
|
-
import { useSendReceivableById as xe } from "./index367.js";
|
|
25
|
-
import { PreviewEmail as Ee } from "./index368.js";
|
|
26
|
-
const Ye = (t) => {
|
|
27
|
-
const {
|
|
28
|
-
i18n: n
|
|
29
|
-
} = R(), {
|
|
30
|
-
data: a,
|
|
31
|
-
isLoading: m
|
|
32
|
-
} = ne(), {
|
|
33
|
-
data: o,
|
|
34
|
-
isLoading: b
|
|
35
|
-
} = se(t.invoiceId), {
|
|
36
|
-
entityName: s,
|
|
37
|
-
isLoading: l
|
|
38
|
-
} = ae(), {
|
|
39
|
-
data: g,
|
|
40
|
-
isLoading: i
|
|
41
|
-
} = oe(o?.counterpart_id), {
|
|
42
|
-
data: u
|
|
43
|
-
} = ie(o?.counterpart_id), r = _e(g, u), I = r?.email ?? "", p = r && a ? n._(`Hi {firstName},
|
|
44
|
-
|
|
45
|
-
Please find the invoice attached as discussed.
|
|
46
|
-
|
|
47
|
-
Kind Regards,
|
|
48
|
-
{senderName}`, {
|
|
49
|
-
firstName: r.first_name,
|
|
50
|
-
senderName: a.first_name
|
|
51
|
-
}) : n._(`Please find the invoice attached as discussed.
|
|
52
|
-
|
|
53
|
-
Kind Regards,
|
|
54
|
-
{senderName}`, {
|
|
55
|
-
senderName: a?.first_name ?? ""
|
|
56
|
-
}), _ = o && s ? o.document_id ? n._("Invoice {documentId} from {entityName}", {
|
|
57
|
-
documentId: o.document_id,
|
|
58
|
-
entityName: s
|
|
59
|
-
}) : n._("Invoice from {entityName}", {
|
|
60
|
-
entityName: s
|
|
61
|
-
}) : "";
|
|
62
|
-
return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Pe, { ...t, to: I, body: p, subject: _, isLoading: i || b || m || l, isIssued: o?.status !== "draft", isOpen: t.isOpen }) });
|
|
63
|
-
}, d = {
|
|
64
|
-
Edit: "form",
|
|
65
|
-
Preview: "preview"
|
|
66
|
-
}, Pe = ({
|
|
67
|
-
invoiceId: t,
|
|
68
|
-
subject: n,
|
|
69
|
-
body: a,
|
|
70
|
-
to: m,
|
|
71
|
-
isLoading: o,
|
|
72
|
-
isIssued: b,
|
|
73
|
-
onClose: s,
|
|
74
|
-
onSendEmail: l,
|
|
75
|
-
isOpen: g
|
|
76
|
-
}) => {
|
|
77
|
-
const {
|
|
78
|
-
i18n: i
|
|
79
|
-
} = R(), {
|
|
80
|
-
api: u,
|
|
81
|
-
entityId: r
|
|
82
|
-
} = ee(), {
|
|
83
|
-
control: I,
|
|
84
|
-
handleSubmit: p,
|
|
85
|
-
getValues: _,
|
|
86
|
-
trigger: A,
|
|
87
|
-
reset: S
|
|
88
|
-
} = X({
|
|
89
|
-
resolver: me(be(i)),
|
|
90
|
-
defaultValues: Q(() => ({
|
|
91
|
-
subject: n,
|
|
92
|
-
body: a,
|
|
93
|
-
to: m
|
|
94
|
-
}), [n, a, m])
|
|
95
|
-
}), {
|
|
96
|
-
subject: F,
|
|
97
|
-
body: T
|
|
98
|
-
} = _();
|
|
99
|
-
J(() => {
|
|
100
|
-
S({
|
|
101
|
-
subject: n,
|
|
102
|
-
body: a,
|
|
103
|
-
to: m
|
|
104
|
-
});
|
|
105
|
-
}, [a, S, n, m]);
|
|
106
|
-
const C = xe(t), x = Ce(t), E = u.finops.postPaymentLinks.useMutation({}), {
|
|
107
|
-
data: P
|
|
108
|
-
} = u.finops.getEntitiesIdPaymentMethods.useQuery({
|
|
109
|
-
path: {
|
|
110
|
-
entity_id: r
|
|
111
|
-
}
|
|
112
|
-
}), [f, k] = U(d.Edit), w = `Monite-Form-emailInvoiceDetails-${W()}`, O = Y((L) => {
|
|
113
|
-
L.preventDefault();
|
|
114
|
-
const G = E.mutateAsync, H = x.mutateAsync, K = C.mutate;
|
|
115
|
-
p(async (v) => {
|
|
116
|
-
const M = P ? P.data.filter(({
|
|
117
|
-
status: N,
|
|
118
|
-
direction: q
|
|
119
|
-
}) => N === "active" && q === "receive") : [];
|
|
120
|
-
M.length === 0 ? Z.error(i._("You haven't onboarded for any payment method. Invoice is issued without a payment link.")) : (await H(void 0), await G({
|
|
121
|
-
recipient: {
|
|
122
|
-
id: r,
|
|
123
|
-
type: "entity"
|
|
124
|
-
},
|
|
125
|
-
payment_methods: M.map((N) => N.type),
|
|
126
|
-
object: {
|
|
127
|
-
id: t,
|
|
128
|
-
type: "receivable"
|
|
129
|
-
}
|
|
130
|
-
}));
|
|
131
|
-
const V = {
|
|
132
|
-
body_text: v.body,
|
|
133
|
-
subject_text: v.subject,
|
|
134
|
-
recipients: v.to ? {
|
|
135
|
-
to: [v.to]
|
|
136
|
-
} : void 0
|
|
137
|
-
};
|
|
138
|
-
K(V, {
|
|
139
|
-
onSuccess: () => {
|
|
140
|
-
l?.(t), s();
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
})(L);
|
|
144
|
-
}, [E.mutateAsync, x.mutateAsync, p, i, t, r, s, l, P, C.mutate]), y = x.isPending || C.isPending || E.isPending, B = "Monite-EmailInvoiceDetails", h = f == d.Preview;
|
|
145
|
-
return /* @__PURE__ */ c(ue, { open: g, fullScreen: !0, onClose: s, children: [
|
|
146
|
-
/* @__PURE__ */ e(pe, { className: B + "-Title", children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ c(D, { container: !0, children: [
|
|
147
|
-
/* @__PURE__ */ e(D, { item: !0, xs: 6, children: /* @__PURE__ */ c($, { direction: "row", alignItems: "center", spacing: 2, children: [
|
|
148
|
-
f == d.Edit && /* @__PURE__ */ c(z, { children: [
|
|
149
|
-
/* @__PURE__ */ e(j, { variant: "text", color: "primary", onClick: s, startIcon: /* @__PURE__ */ e(ce, {}), disabled: y, "data-testid": "back-button", children: i._("Back") }),
|
|
150
|
-
/* @__PURE__ */ e(ye, { variant: "h3", children: i._("Compose email") })
|
|
151
|
-
] }),
|
|
152
|
-
h && /* @__PURE__ */ e(de, { edge: "start", color: "inherit", onClick: () => {
|
|
153
|
-
k(d.Edit);
|
|
154
|
-
}, "aria-label": i._("Back to edit"), "data-testid": "close-preview-button", children: /* @__PURE__ */ e(le, {}) })
|
|
155
|
-
] }) }),
|
|
156
|
-
/* @__PURE__ */ e(D, { item: !0, xs: 6, children: /* @__PURE__ */ c($, { direction: "row", alignItems: "center", justifyContent: "end", spacing: 2, children: [
|
|
157
|
-
f == d.Edit && /* @__PURE__ */ e(j, { variant: "outlined", color: "primary", type: "button", form: w, disabled: y || o, onClick: async () => {
|
|
158
|
-
await A() && k(d.Preview);
|
|
159
|
-
}, "data-testid": "preview-button", children: i._("Preview email") }),
|
|
160
|
-
/* @__PURE__ */ e(j, { variant: "contained", color: "primary", type: "submit", form: w, disabled: y || o, "data-testid": "issue-and-send-button", children: b ? i._("Send") : i._("Issue and Send") })
|
|
161
|
-
] }) })
|
|
162
|
-
] }) }) }),
|
|
163
|
-
/* @__PURE__ */ e(he, { className: B + "-Content", sx: {
|
|
164
|
-
mt: h ? 0 : 4,
|
|
165
|
-
p: h ? 0 : "0 32px 32px 32px",
|
|
166
|
-
height: "100%",
|
|
167
|
-
width: "100%",
|
|
168
|
-
display: "flex",
|
|
169
|
-
flexDirection: "column"
|
|
170
|
-
}, children: /* @__PURE__ */ c(ge, { formName: w, handleIssueAndSend: O, style: {
|
|
171
|
-
display: "flex",
|
|
172
|
-
flexDirection: "column",
|
|
173
|
-
flex: 1,
|
|
174
|
-
minHeight: 0,
|
|
175
|
-
width: "100%"
|
|
176
|
-
}, children: [
|
|
177
|
-
o ? /* @__PURE__ */ e(re, { className: "Monite-LoadingPage", children: /* @__PURE__ */ e(ve, {}) }) : f == d.Edit && /* @__PURE__ */ e(Ie, { invoiceId: t, control: I, isDisabled: y }),
|
|
178
|
-
h && /* @__PURE__ */ e(Ee, { invoiceId: t, body: T, subject: F })
|
|
179
|
-
] }) })
|
|
180
|
-
] });
|
|
181
|
-
};
|
|
1
|
+
const s = (o) => o.source_of_payable_data === "ocr" && o.ocr_status === "processing";
|
|
182
2
|
export {
|
|
183
|
-
|
|
184
|
-
Pe as EmailInvoiceDetailsBase
|
|
3
|
+
s as isPayableInOCRProcessing
|
|
185
4
|
};
|
|
@@ -1,14 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useDragScroll as b } from "./index364.js";
|
|
3
|
+
import { PayableStatusChip as C } from "./index162.js";
|
|
4
|
+
import { useMoniteContext as M } from "./index57.js";
|
|
5
|
+
import { useCurrencies as x } from "./index58.js";
|
|
6
|
+
import { Skeleton as A } from "./index149.js";
|
|
7
|
+
import { StatusCard as D } from "./index311.js";
|
|
8
|
+
import { useLingui as j } from "@lingui/react";
|
|
9
|
+
import { useRef as L, useEffect as P } from "react";
|
|
10
|
+
import { getPayablesAnalyticsSnapshot as U } from "./index365.js";
|
|
11
|
+
const c = [{
|
|
12
|
+
groupStatus: "all",
|
|
13
|
+
apiStatuses: [],
|
|
14
|
+
representativeStatus: null
|
|
15
|
+
}, {
|
|
16
|
+
groupStatus: "draft",
|
|
17
|
+
apiStatuses: ["draft", "new"],
|
|
18
|
+
representativeStatus: "draft"
|
|
19
|
+
}, {
|
|
20
|
+
groupStatus: "pending_approval",
|
|
21
|
+
apiStatuses: ["approve_in_progress"],
|
|
22
|
+
representativeStatus: "approve_in_progress"
|
|
23
|
+
}, {
|
|
24
|
+
groupStatus: "rejected",
|
|
25
|
+
apiStatuses: ["rejected"],
|
|
26
|
+
representativeStatus: "rejected"
|
|
27
|
+
}, {
|
|
28
|
+
groupStatus: "ready_to_pay",
|
|
29
|
+
apiStatuses: ["waiting_to_be_paid", "partially_paid"],
|
|
30
|
+
representativeStatus: "waiting_to_be_paid"
|
|
31
|
+
}, {
|
|
32
|
+
groupStatus: "paid",
|
|
33
|
+
apiStatuses: ["paid"],
|
|
34
|
+
representativeStatus: "paid"
|
|
35
|
+
}, {
|
|
36
|
+
groupStatus: "cancelled",
|
|
37
|
+
apiStatuses: ["canceled"],
|
|
38
|
+
representativeStatus: "canceled"
|
|
39
|
+
}], O = ({
|
|
40
|
+
onChangeFilter: o,
|
|
41
|
+
selectedStatus: s
|
|
42
|
+
}) => {
|
|
43
|
+
const {
|
|
44
|
+
i18n: l
|
|
45
|
+
} = j(), {
|
|
46
|
+
data: r,
|
|
47
|
+
isLoading: n
|
|
48
|
+
} = k(), {
|
|
49
|
+
formatCurrencyToDisplay: m
|
|
50
|
+
} = x(), {
|
|
51
|
+
containerRef: S,
|
|
52
|
+
handleMouseDown: f,
|
|
53
|
+
handleMouseLeave: v,
|
|
54
|
+
handleMouseUp: _,
|
|
55
|
+
handleMouseMove: g
|
|
56
|
+
} = b();
|
|
57
|
+
if (n)
|
|
58
|
+
return /* @__PURE__ */ i("div", { className: "ttw:flex ttw:gap-2", children: Array.from({
|
|
59
|
+
length: 6
|
|
60
|
+
}).map((t, u) => /* @__PURE__ */ i(A, { className: "ttw:h-16.5 ttw:w-42 ttw:rounded-xl ttw:animate-pulse" }, u)) });
|
|
61
|
+
const d = r?.data ?? [], w = c.map(({
|
|
62
|
+
groupStatus: t,
|
|
63
|
+
apiStatuses: u
|
|
64
|
+
}) => {
|
|
65
|
+
if (t === "all")
|
|
66
|
+
return {
|
|
67
|
+
status: "all",
|
|
68
|
+
count: d.reduce((e, a) => e + a.count, 0),
|
|
69
|
+
sum_total_amount: d.reduce((e, a) => e + (a.sum_total_amount ?? 0), 0)
|
|
70
|
+
};
|
|
71
|
+
const p = d.filter((e) => u.includes(e.status));
|
|
72
|
+
return {
|
|
73
|
+
status: t,
|
|
74
|
+
count: p.reduce((e, a) => e + a.count, 0),
|
|
75
|
+
sum_total_amount: p.reduce((e, a) => e + (a.sum_total_amount ?? 0), 0)
|
|
76
|
+
};
|
|
77
|
+
}).filter((t) => t.status === "all" || t.count > 0), h = (t) => {
|
|
78
|
+
o("status", t === "all" ? null : t);
|
|
79
|
+
}, y = (t) => m(t, "USD") ?? "—";
|
|
80
|
+
return /* @__PURE__ */ i("div", { ref: S, className: "ttw:flex ttw:gap-2 ttw:mb-6 ttw:overflow-x-auto ttw:[scrollbar-width:none] ttw:[&::-webkit-scrollbar]:hidden ttw:cursor-grab ttw:select-none", onMouseDown: f, onMouseLeave: v, onMouseUp: _, onMouseMove: g, children: w.map((t) => {
|
|
81
|
+
const u = c.find((p) => p.groupStatus === t.status);
|
|
82
|
+
return /* @__PURE__ */ i(D, { allItemsText: l._("All bills"), isAllStatus: t.status === "all", data: t.status === "all" ? t.count ?? 0 : t.sum_total_amount ?? 0, amountOfItems: t.status !== "all" ? t.count ?? 0 : void 0, selected: s === t.status, onClick: () => h(t.status), formatAmount: y, statusChip: u?.representativeStatus ? /* @__PURE__ */ i(C, { status: u.representativeStatus }) : void 0 }, t.status);
|
|
83
|
+
}) });
|
|
84
|
+
}, k = () => {
|
|
85
|
+
const {
|
|
86
|
+
api: o,
|
|
87
|
+
queryClient: s
|
|
88
|
+
} = M(), l = o.finops.getPayablesAnalytics.useQuery({}, {
|
|
89
|
+
enabled: !!s,
|
|
90
|
+
refetchInterval: 3e3
|
|
91
|
+
}), r = U(l.data?.data), n = L(void 0);
|
|
92
|
+
return P(() => {
|
|
93
|
+
r !== void 0 && n.current !== void 0 && r !== n.current && s && o.finops.getPayables.invalidateQueries(s), n.current = r;
|
|
94
|
+
}, [r, o, s]), l;
|
|
95
|
+
};
|
|
12
96
|
export {
|
|
13
|
-
|
|
97
|
+
O as SummaryCardsFilters
|
|
14
98
|
};
|