@tesouro/embedded-components-react 0.2.176 → 0.2.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -2
- package/dist/lib/GlCodeTableWidget.d.ts +4 -2
- package/dist/lib/ReceivablesWidget.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index2.js +14 -7
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index2.js +50 -41
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index4.js +75 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index2.js +70 -68
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +60 -56
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index2.js +43 -42
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +76 -66
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +17 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index2.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/index2.js +22 -20
- 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/index101.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +24 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +9 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +33 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +35 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +4 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +2 -1271
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +25 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +1270 -12
- 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 +60 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +398 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +69 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +406 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +26 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +79 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +6 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +9 -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 +33 -121
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +31 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +11 -217
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +23 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +10 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +119 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +217 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +12 -15
- 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 +12 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +46 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +46 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +45 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +15 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +11 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +144 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +55 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +68 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +29 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +3 -99
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +64 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +39 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +80 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +4 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +24 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +96 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +98 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +14 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +13 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +13 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +99 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +57 -228
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +9 -470
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +41 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +74 -529
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +55 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +14 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +77 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +29 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +42 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +7 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +227 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +466 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +110 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +518 -104
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +23 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +25 -12
- 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 +13 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +18 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +19 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +2 -101
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +10 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +20 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +18 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +27 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +116 -397
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +69 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index2.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +12 -407
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +7 -101
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +35 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +100 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +25 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +12 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +7 -214
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +214 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +12 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +22 -146
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +57 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +60 -183
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +18 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +36 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +52 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +29 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +77 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +32 -356
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +146 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +86 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +20 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +183 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +22 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +36 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +50 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +82 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +34 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +66 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +353 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +2 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +117 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +6 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +14 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +12 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +19 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +19 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +25 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +37 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +35 -96
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +14 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +25 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +17 -109
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +104 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +11 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +19 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +26 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +37 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +59 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +49 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +28 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +91 -340
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +43 -299
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +137 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +103 -156
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +10 -267
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +18 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +29 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +42 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +63 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +93 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +110 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +86 -211
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +63 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +5 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +491 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +163 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +39 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +58 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +29 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +118 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +22 -111
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +41 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +57 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +20 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +17 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +17 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +167 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +132 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +159 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +11 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +18 -170
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +58 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +62 -156
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +58 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +7 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +9 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +21 -57
- 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 +61 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +17 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +40 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +14 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +80 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +25 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +122 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +49 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +114 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +96 -476
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +45 -163
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +201 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +68 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +76 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +42 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +73 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +37 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +341 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +303 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +99 -156
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +161 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +264 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +25 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +20 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +37 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +149 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +31 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +4 -128
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +18 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +35 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +27 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +32 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +28 -201
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +48 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +12 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +8 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +66 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +26 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +2 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +94 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +96 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +212 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +19 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +157 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +28 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +26 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +78 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +26 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +125 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +54 -255
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +17 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +11 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +255 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +44 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +32 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +18 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +39 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +22 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +72 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +96 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +36 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +10 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +16 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +19 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +48 -22
- 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 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +30 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +29 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +34 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +25 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +119 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +18 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +16 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +16 -54
- 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 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +16 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +72 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +16 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +16 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +16 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +11 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +18 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +22 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +35 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +8 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +47 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +50 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +16 -117
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +65 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +17 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index4.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +18 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +14 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +67 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +21 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +118 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +81 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +9 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +11 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +85 -16
- 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 +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +86 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +269 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +35 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +65 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +42 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +21 -265
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +138 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +91 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +11 -43
- 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 +2 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +276 -133
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +46 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +35 -282
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +32 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +69 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +45 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +26 -26
- 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 +31 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +126 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +29 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +67 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +57 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +28 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +9 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +5 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +18 -94
- 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 +8 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +15 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +72 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +86 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +51 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +49 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +55 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +29 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +55 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +37 -13
- 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 +43 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +70 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +21 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +49 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +81 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +39 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +33 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +85 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +24 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +101 -70
- 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 +107 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +69 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +65 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +34 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +12 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +28 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +24 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +36 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +33 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +96 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +14 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +18 -101
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +9 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +42 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +34 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +15 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +48 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +19 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +50 -28
- 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 +58 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +32 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +48 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +53 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +35 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +17 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +48 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +39 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index5.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +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 +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index6.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index8.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index86.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index94.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index2.js +42 -41
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +37 -35
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index2.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +27 -25
- package/package.json +1 -1
|
@@ -1,18 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { useCreateInvoiceProductsTable as W } from "./index402.js";
|
|
2
|
+
import { sanitizeLineItems as J } from "./index405.js";
|
|
3
|
+
import { useCurrencies as O } from "./index58.js";
|
|
4
|
+
import { useRef as j, useState as I, useCallback as u, useEffect as C, useMemo as B } from "react";
|
|
5
|
+
import "./index92.js";
|
|
6
|
+
import "@emotion/react/jsx-runtime";
|
|
7
|
+
import "@lingui/react";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
import "./index57.js";
|
|
10
|
+
import "@mui/x-data-grid";
|
|
11
|
+
import { useIsMounted as G } from "./index68.js";
|
|
12
|
+
import { generateUniqueId as H } from "./index406.js";
|
|
13
|
+
import { useFormContext as K, useFieldArray as Q } from "react-hook-form";
|
|
14
|
+
const me = ({
|
|
15
|
+
defaultCurrency: p,
|
|
16
|
+
isInclusivePricing: P
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
control: b,
|
|
20
|
+
formState: {
|
|
21
|
+
errors: o
|
|
22
|
+
},
|
|
23
|
+
setValue: l,
|
|
24
|
+
getValues: r,
|
|
25
|
+
watch: f,
|
|
26
|
+
clearErrors: m,
|
|
27
|
+
trigger: h,
|
|
28
|
+
reset: g
|
|
29
|
+
} = K(), {
|
|
30
|
+
fields: n,
|
|
31
|
+
append: y,
|
|
32
|
+
remove: v
|
|
33
|
+
} = Q({
|
|
34
|
+
control: b,
|
|
35
|
+
name: "line_items",
|
|
36
|
+
shouldUnregister: !1
|
|
37
|
+
}), c = G(), s = j(!1), [x, V] = I(!1), [F, T] = I(null), D = f("line_items"), L = f("tax_rate"), R = J(D), {
|
|
38
|
+
formatCurrencyToDisplay: S
|
|
39
|
+
} = O(), {
|
|
40
|
+
subtotalPrice: q,
|
|
41
|
+
totalPrice: A,
|
|
42
|
+
totalTaxes: E
|
|
43
|
+
} = W({
|
|
44
|
+
lineItems: R,
|
|
45
|
+
actualCurrency: p,
|
|
46
|
+
isInclusivePricing: P,
|
|
47
|
+
formatCurrencyToDisplay: S,
|
|
48
|
+
taxRate: Number(L) || void 0
|
|
49
|
+
}), i = u((e) => {
|
|
50
|
+
const t = {
|
|
51
|
+
name: e?.product?.name || "",
|
|
52
|
+
price: {
|
|
53
|
+
currency: p,
|
|
54
|
+
value: e?.product?.price?.value || 0
|
|
55
|
+
},
|
|
56
|
+
measure_unit_id: e?.product?.measure_unit_id || "",
|
|
57
|
+
type: e?.product?.type || "product"
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
id: e?.id ?? H(),
|
|
61
|
+
product_id: e?.product_id || "",
|
|
62
|
+
product: t,
|
|
63
|
+
quantity: e?.quantity ?? 1,
|
|
64
|
+
tax_rate_value: e?.tax_rate_value ? e?.tax_rate_value ?? 0 : void 0,
|
|
65
|
+
...e?.measure_unit ? {
|
|
66
|
+
measure_unit: e.measure_unit
|
|
67
|
+
} : {},
|
|
68
|
+
taxable: !0
|
|
69
|
+
};
|
|
70
|
+
}, [p]), M = u(() => {
|
|
71
|
+
if (s.current) return;
|
|
72
|
+
s.current = !0, y(i(), {
|
|
73
|
+
shouldFocus: !1
|
|
74
|
+
});
|
|
75
|
+
const e = r("line_items");
|
|
76
|
+
if (e && e.length > 0) {
|
|
77
|
+
const t = e.length - 1;
|
|
78
|
+
m(`line_items.${t}`), T(t);
|
|
79
|
+
}
|
|
80
|
+
}, [y, i, r, m]);
|
|
81
|
+
C(() => {
|
|
82
|
+
s.current && Promise.resolve().then(() => {
|
|
83
|
+
c.current && (s.current = !1);
|
|
84
|
+
});
|
|
85
|
+
}, [n.length, c]), C(() => {
|
|
86
|
+
!c.current || x || !r("line_items")?.length && !s.current && (g({
|
|
87
|
+
...r(),
|
|
88
|
+
line_items: [i()]
|
|
89
|
+
}), V(!0));
|
|
90
|
+
}, [c, x, r, g, i]);
|
|
91
|
+
const U = u((e) => v(e), [v, r]), $ = u(() => {
|
|
92
|
+
const e = r("line_items");
|
|
93
|
+
if (!e?.length) return;
|
|
94
|
+
const t = e.filter((a) => !!a?.product?.name?.trim()), d = e.find((a) => !a?.product?.name?.trim()), _ = t.length > 0 ? t : e.length > 0 ? [i(d || void 0)] : [];
|
|
95
|
+
(_.length !== e.length || !_.every((a, z) => a.id === e[z]?.id)) && (m("line_items"), l("line_items", _, {
|
|
96
|
+
shouldValidate: !1,
|
|
97
|
+
shouldDirty: !0
|
|
98
|
+
}));
|
|
99
|
+
}, [r, l, m, i]), N = u((e, t, d) => {
|
|
100
|
+
l(e, t, {
|
|
101
|
+
shouldDirty: !0,
|
|
102
|
+
...d
|
|
103
|
+
}), d?.shouldValidate && h(e);
|
|
104
|
+
}, [l, h]), k = JSON.stringify(o.line_items), w = B(() => Array.isArray(o.line_items) ? n.map((e, t) => o.line_items?.[t] ?? {}) : n.map(() => ({})), [o.line_items, k, n]);
|
|
105
|
+
return {
|
|
106
|
+
fields: n,
|
|
107
|
+
subtotalPrice: q,
|
|
108
|
+
totalPrice: A,
|
|
109
|
+
totalTaxes: E,
|
|
110
|
+
lineItemErrors: w,
|
|
111
|
+
autoFocusIndex: F,
|
|
112
|
+
handleAddRow: M,
|
|
113
|
+
handleRemoveItem: U,
|
|
114
|
+
setValueWithValidationLocal: N,
|
|
115
|
+
cleanUpLineItemsForSubmission: $
|
|
116
|
+
};
|
|
117
|
+
};
|
|
16
118
|
export {
|
|
17
|
-
|
|
119
|
+
me as useLineItemManagement
|
|
18
120
|
};
|
|
@@ -1,18 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { rateMinorToMajor as p, rateMajorToMinor as f } from "./index94.js";
|
|
2
|
+
import { generateUniqueId as l } from "./index406.js";
|
|
3
|
+
const c = (t, e) => {
|
|
4
|
+
let r = t;
|
|
5
|
+
for (const n of e) {
|
|
6
|
+
if (typeof r != "object" || r === null || !(n in r))
|
|
7
|
+
return;
|
|
8
|
+
r = r[n];
|
|
9
|
+
}
|
|
10
|
+
return typeof r == "object" && r !== null && "message" in r && typeof r.message == "string" ? String(r.message) : void 0;
|
|
11
|
+
};
|
|
12
|
+
function m(t, e) {
|
|
13
|
+
if (!t)
|
|
14
|
+
return;
|
|
15
|
+
const r = typeof t == "object";
|
|
16
|
+
if (r && "message" in t && typeof t.message == "string")
|
|
17
|
+
return t.message;
|
|
18
|
+
const n = e.split("."), s = !Array.isArray(t);
|
|
19
|
+
if (s && r)
|
|
20
|
+
return c(t, n);
|
|
21
|
+
if (s) return;
|
|
22
|
+
const a = t.find((o) => {
|
|
23
|
+
if (!o || typeof o != "object" || o === null) return !1;
|
|
24
|
+
let i = o;
|
|
25
|
+
for (const u of n) {
|
|
26
|
+
if (typeof i != "object" || i === null || !(u in i))
|
|
27
|
+
return !1;
|
|
28
|
+
i = i[u];
|
|
29
|
+
}
|
|
30
|
+
return typeof i == "object" && i !== null && "message" in i && typeof i.message == "string";
|
|
31
|
+
});
|
|
32
|
+
if (a)
|
|
33
|
+
return c(a, n);
|
|
34
|
+
}
|
|
35
|
+
const d = (t, e) => m(t, e), M = (t) => {
|
|
36
|
+
let e = t.replace(/[^0-9.]/g, "");
|
|
37
|
+
const r = e.indexOf(".");
|
|
38
|
+
if (r !== -1 && (e = e.slice(0, r + 1) + e.slice(r + 1).replace(/\./g, ""), e = e.slice(0, r + 3)), e.length > 1 && e.startsWith("0") && e[1] !== "." && (e = e.replace(/^0+/, "") || "0"), e === "" || e === ".")
|
|
39
|
+
return e;
|
|
40
|
+
const n = Number(e);
|
|
41
|
+
return !isNaN(n) && n > 100 ? "100" : e;
|
|
42
|
+
}, j = (t, e) => {
|
|
43
|
+
if (t === void 0 || isNaN(t)) return "";
|
|
44
|
+
const r = p(t);
|
|
45
|
+
return e.format(r);
|
|
46
|
+
}, b = (t, e, r) => {
|
|
47
|
+
if (t.trim() === "") return 0;
|
|
48
|
+
let n = t;
|
|
49
|
+
if (r) {
|
|
50
|
+
const a = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
51
|
+
n = n.replace(new RegExp(a, "g"), "");
|
|
52
|
+
}
|
|
53
|
+
n = n.replace(e, ".");
|
|
54
|
+
const s = parseFloat(n);
|
|
55
|
+
return isNaN(s) ? 0 : f(s);
|
|
56
|
+
}, _ = (t) => !t || !Array.isArray(t) ? [] : t.filter((e) => !!e?.product?.name).map((e) => ({
|
|
57
|
+
...e,
|
|
58
|
+
id: e.product_id || l(),
|
|
59
|
+
quantity: e.quantity ?? 1,
|
|
60
|
+
product: {
|
|
61
|
+
...e.product,
|
|
62
|
+
type: e.product?.type,
|
|
63
|
+
price: {
|
|
64
|
+
...e.product?.price || {},
|
|
65
|
+
value: e.product?.price?.value ?? 0,
|
|
66
|
+
currency: e.product?.price?.currency || "USD"
|
|
67
|
+
},
|
|
68
|
+
measure_unit_id: e.product?.measure_unit_id || ""
|
|
69
|
+
},
|
|
70
|
+
...e.measure_unit?.name ? {
|
|
71
|
+
measure_unit: {
|
|
72
|
+
name: e.measure_unit.name,
|
|
73
|
+
id: null
|
|
74
|
+
}
|
|
75
|
+
} : {}
|
|
15
76
|
}));
|
|
16
77
|
export {
|
|
17
|
-
|
|
78
|
+
j as formatMinorToMajorCurrency,
|
|
79
|
+
m as getErrorMessage,
|
|
80
|
+
d as getLineItemErrorMessage,
|
|
81
|
+
b as parseMajorToMinorCurrency,
|
|
82
|
+
_ as sanitizeLineItems,
|
|
83
|
+
M as sanitizeTaxRateInput
|
|
18
84
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (l !== void 0) return l;
|
|
3
|
-
if (e !== void 0) return null;
|
|
4
|
-
}
|
|
1
|
+
const t = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 9)}`;
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
t as generateUniqueId
|
|
7
4
|
};
|
|
@@ -1,76 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { isRoleApprovalCall as f } from "./index411.js";
|
|
4
|
-
const U = ({
|
|
5
|
-
approvalPolicy: t
|
|
6
|
-
}) => {
|
|
1
|
+
import { useMoniteContext as o } from "./index57.js";
|
|
2
|
+
const n = () => {
|
|
7
3
|
const {
|
|
8
|
-
|
|
9
|
-
} =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
if (!Array.isArray(r) || r.length !== 1) return !1;
|
|
15
|
-
const [e] = r;
|
|
16
|
-
if (typeof e != "object" || e === null || !("if" in e) || !("then" in e) || !("else" in e)) return !1;
|
|
17
|
-
const {
|
|
18
|
-
if: a,
|
|
19
|
-
then: l,
|
|
20
|
-
else: v
|
|
21
|
-
} = e;
|
|
22
|
-
if (typeof a != "object" || a === null || !("run_concurrently" in a) || !("all" in a)) return !1;
|
|
23
|
-
const {
|
|
24
|
-
run_concurrently: g,
|
|
25
|
-
all: c
|
|
26
|
-
} = a;
|
|
27
|
-
return typeof g != "boolean" || !Array.isArray(c) || !Array.isArray(l) || !Array.isArray(v) ? !1 : c.every((y) => s(y) || i(y));
|
|
28
|
-
}, n = (r) => r.call === u.REQUEST_APPROVAL_BY_USERS && Array.isArray(r.params.user_ids) && r.params.user_ids.length === 1 && r.params.required_approval_count === 1, d = (r) => r.call === u.REQUEST_APPROVAL_BY_USERS && Array.isArray(r.params.user_ids) && r.params.user_ids.length > 1 && r.params.required_approval_count > 0, A = (r) => f(r.call) && Array.isArray(r.params.role_ids) && r.params.role_ids.length >= 1 && r.params.required_approval_count > 0, R = (r) => !r.run_concurrently && r.all.length > 1 && r.all.every((e) => s(e) && n(e)), p = (r) => E(r, o), _ = (r, e) => b(r, o, e);
|
|
29
|
-
return m(t?.script) ? {
|
|
30
|
-
rules: t?.script[0].if.all.reduce((r, e) => {
|
|
31
|
-
if (i(e)) {
|
|
32
|
-
if (R(e))
|
|
33
|
-
return {
|
|
34
|
-
...r,
|
|
35
|
-
approval_chain: {
|
|
36
|
-
chainUserIds: e.all.reduce((a, l) => s(l) && n(l) && l.params.user_ids[0] && l.params.user_ids[0] ? [...a, l.params.user_ids[0]] : a, [])
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
} else if (s(e)) {
|
|
40
|
-
if (n(e))
|
|
41
|
-
return {
|
|
42
|
-
...r,
|
|
43
|
-
single_user: {
|
|
44
|
-
userId: e.params.user_ids[0]
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
if (d(e))
|
|
48
|
-
return {
|
|
49
|
-
...r,
|
|
50
|
-
users_from_list: {
|
|
51
|
-
userIds: e.params.user_ids,
|
|
52
|
-
count: e.params.required_approval_count
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
if (A(e))
|
|
56
|
-
return {
|
|
57
|
-
...r,
|
|
58
|
-
roles_from_list: {
|
|
59
|
-
roleIds: e.params.role_ids,
|
|
60
|
-
count: e.params.required_approval_count
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
return r;
|
|
65
|
-
}, {}),
|
|
66
|
-
getRuleName: p,
|
|
67
|
-
getRuleLabel: _
|
|
68
|
-
} : {
|
|
69
|
-
rules: void 0,
|
|
70
|
-
getRuleName: p,
|
|
71
|
-
getRuleLabel: _
|
|
72
|
-
};
|
|
4
|
+
api: t
|
|
5
|
+
} = o();
|
|
6
|
+
return t.finops.postFiles.useMutation({}, {
|
|
7
|
+
onError: () => {
|
|
8
|
+
}
|
|
9
|
+
});
|
|
73
10
|
};
|
|
74
11
|
export {
|
|
75
|
-
|
|
12
|
+
n as useUploadReceivableAttachment
|
|
76
13
|
};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fill: h,
|
|
12
|
-
...o
|
|
13
|
-
}, t("path", {
|
|
14
|
-
d: "M3.5,6a1,1,0,1,0,1,1A1,1,0,0,0,3.5,6Zm4,2h14a1,1,0,0,0,0-2H7.5a1,1,0,0,0,0,2Zm0,3a1,1,0,1,0,1,1A1,1,0,0,0,7.5,11Zm4,5a1,1,0,1,0,1,1A1,1,0,0,0,11.5,16Zm10-5h-10a1,1,0,0,0,0,2h10a1,1,0,0,0,0-2Zm0,5h-6a1,1,0,0,0,0,2h6a1,1,0,0,0,0-2Z"
|
|
15
|
-
}));
|
|
1
|
+
import { useMoniteContext as o } from "./index57.js";
|
|
2
|
+
const r = () => {
|
|
3
|
+
const {
|
|
4
|
+
api: e
|
|
5
|
+
} = o();
|
|
6
|
+
return e.finops.deleteFilesId.useMutation(void 0, {
|
|
7
|
+
onError: () => {
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
16
11
|
export {
|
|
17
|
-
|
|
12
|
+
r as useDeleteFile
|
|
18
13
|
};
|
|
@@ -1,18 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as t, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as S, useMemo as p } from "react";
|
|
3
|
+
import { useFormContext as $, Controller as E } from "react-hook-form";
|
|
4
|
+
import { getCounterpartEmail as V, getCounterpartName as I } from "./index7.js";
|
|
5
|
+
import { useRootElements as j } from "./index92.js";
|
|
6
|
+
import "./index57.js";
|
|
7
|
+
import { useCounterpartList as k } from "./index71.js";
|
|
8
|
+
import "react-hot-toast";
|
|
9
|
+
import { useLingui as z } from "@lingui/react";
|
|
10
|
+
import { Combobox as D, ComboboxInput as A, ComboboxContent as q, ComboboxList as B, ComboboxEmpty as G, ComboboxItem as K } from "./index90.js";
|
|
11
|
+
import { Field as M, FieldContent as O, FieldLabel as P, FieldDescription as R, FieldError as T } from "./index159.js";
|
|
12
|
+
import { InputGroupAddon as H } from "./index101.js";
|
|
13
|
+
import { Loader2 as J, Search as Q } from "lucide-react";
|
|
14
|
+
const me = ({
|
|
15
|
+
disabled: _,
|
|
16
|
+
canCreateCounterpart: i = !0
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
i18n: o
|
|
20
|
+
} = z(), {
|
|
21
|
+
root: g
|
|
22
|
+
} = j(), {
|
|
23
|
+
control: x,
|
|
24
|
+
setValue: s,
|
|
25
|
+
watch: v,
|
|
26
|
+
clearErrors: f
|
|
27
|
+
} = $(), {
|
|
28
|
+
data: d,
|
|
29
|
+
isLoading: L
|
|
30
|
+
} = k({
|
|
31
|
+
query: {
|
|
32
|
+
is_customer: !0
|
|
33
|
+
}
|
|
34
|
+
}), [h, C] = S(!1), m = v("counterpart_name") ?? "", c = p(() => d ? d.data.map((e) => ({
|
|
35
|
+
id: e.id,
|
|
36
|
+
name: I(e),
|
|
37
|
+
email: V(e)
|
|
38
|
+
})) : [], [d]), a = p(() => {
|
|
39
|
+
const e = m.toLowerCase().trim();
|
|
40
|
+
return e ? c.filter((n) => n.name.toLowerCase().includes(e) || n.email.toLowerCase().includes(e)) : c;
|
|
41
|
+
}, [c, m]), y = p(() => a.map((e) => e.id), [a]);
|
|
42
|
+
return /* @__PURE__ */ t(E, { name: "counterpart_id", control: x, render: ({
|
|
43
|
+
field: e,
|
|
44
|
+
fieldState: {
|
|
45
|
+
error: n
|
|
46
|
+
}
|
|
47
|
+
}) => {
|
|
48
|
+
const w = (r) => {
|
|
49
|
+
s("counterpart_name", ""), s("counterpart_email", ""), f(["counterpart_id", "counterpart_email"]), e.onChange(r ?? "");
|
|
50
|
+
}, N = (r, l) => {
|
|
51
|
+
if (l.reason !== "input-change") {
|
|
52
|
+
i || s("counterpart_name", "");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
s("counterpart_name", r), e.value && e.onChange(""), i && r.trim() && f("counterpart_id");
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ t(M, { children: /* @__PURE__ */ u(O, { children: [
|
|
58
|
+
/* @__PURE__ */ t(P, { htmlFor: "counterpart_id", children: o._("Name") }),
|
|
59
|
+
/* @__PURE__ */ u(D, { value: e.value || null, onValueChange: w, inputValue: m, onInputValueChange: N, items: y, filter: () => !0, disabled: _, open: h, onOpenChange: C, children: [
|
|
60
|
+
/* @__PURE__ */ t(A, { id: "counterpart_id", placeholder: i ? o._("Search or type to add a customer") : o._("Search for a customer"), "aria-invalid": !!n, onKeyDown: (r) => {
|
|
61
|
+
if (r.key === "Enter") {
|
|
62
|
+
r.preventDefault();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (r.key === "Tab" && h) {
|
|
66
|
+
const l = m.toLowerCase().trim();
|
|
67
|
+
if (!l) return;
|
|
68
|
+
const b = a.find((F) => F.name.toLowerCase() === l) ?? (a.length === 1 ? a[0] : void 0);
|
|
69
|
+
b && (w(b.id), C(!1));
|
|
70
|
+
}
|
|
71
|
+
}, children: /* @__PURE__ */ t(H, { align: "inline-start", children: L ? /* @__PURE__ */ t(J, { className: "ttw:size-4 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ t(Q, { className: "ttw:size-4 ttw:text-muted-foreground" }) }) }),
|
|
72
|
+
/* @__PURE__ */ t(q, { container: g, children: /* @__PURE__ */ u(B, { children: [
|
|
73
|
+
/* @__PURE__ */ t(G, { children: i ? o._("No customers found - type to add a customer") : o._("No customers found") }),
|
|
74
|
+
a.map((r) => /* @__PURE__ */ t(K, { value: r.id, children: /* @__PURE__ */ u("div", { className: "ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2", children: [
|
|
75
|
+
/* @__PURE__ */ t("span", { children: r.name }),
|
|
76
|
+
/* @__PURE__ */ t("span", { className: "ttw:text-muted-foreground", children: r.email })
|
|
77
|
+
] }) }, r.id))
|
|
78
|
+
] }) })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ t(R, { children: i ? o._("Search by customer name or email. New customers will be saved when saving the invoice.") : o._("Search by customer name or email.") }),
|
|
81
|
+
/* @__PURE__ */ t(T, { errors: n ? [n] : [] })
|
|
82
|
+
] }) });
|
|
83
|
+
} });
|
|
84
|
+
};
|
|
16
85
|
export {
|
|
17
|
-
|
|
86
|
+
me as CounterpartSelector
|
|
18
87
|
};
|
|
@@ -5,7 +5,7 @@ import { InvoicesTable as I } from "./index36.js";
|
|
|
5
5
|
import { QuotesTable as T } from "./index37.js";
|
|
6
6
|
import { useMoniteContext as q } from "./index57.js";
|
|
7
7
|
import { MoniteScopedProviders as $ } from "./index83.js";
|
|
8
|
-
import { classNames as R } from "./
|
|
8
|
+
import { classNames as R } from "./index183.js";
|
|
9
9
|
import { useLingui as D } from "@lingui/react";
|
|
10
10
|
import { Box as l, Tabs as N } from "@mui/material";
|
|
11
11
|
import { useState as k, useId as w } from "react";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
...
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "./index100.js";
|
|
3
|
+
import * as r from "@radix-ui/react-avatar";
|
|
4
|
+
function n({
|
|
5
|
+
className: t,
|
|
6
|
+
...a
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(r.Root, { "data-slot": "avatar", className: l("ttw:relative ttw:flex ttw:size-8 ttw:shrink-0 ttw:overflow-hidden ttw:rounded-full", t), ...a });
|
|
9
|
+
}
|
|
10
|
+
function f({
|
|
11
|
+
className: t,
|
|
12
|
+
...a
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ e(r.Fallback, { "data-slot": "avatar-fallback", className: l("ttw:bg-muted ttw:flex ttw:size-full ttw:items-center ttw:justify-center ttw:rounded-full", t), ...a });
|
|
15
|
+
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
n as Avatar,
|
|
18
|
+
f as AvatarFallback
|
|
18
19
|
};
|
|
@@ -1,5 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as e, Fragment as v, jsxs as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as k, useMemo as b } from "react";
|
|
3
|
+
import { useFormContext as Y, Controller as j } from "react-hook-form";
|
|
4
|
+
import { format as x } from "date-fns";
|
|
5
|
+
import { Calendar as A } from "lucide-react";
|
|
6
|
+
import { calculateDueDate as N } from "./index7.js";
|
|
7
|
+
import { useLingui as L } from "@lingui/react";
|
|
8
|
+
import { dedupePaymentTermsByContent as $ } from "./index456.js";
|
|
9
|
+
import { RECEIPT_DUE_PAYMENT_TERM as u, CUSTOM_DATE_PAYMENT_TERM as l } from "./index327.js";
|
|
10
|
+
import { cn as D } from "./index100.js";
|
|
11
|
+
import { Skeleton as O } from "./index139.js";
|
|
12
|
+
import { Select as R, SelectTrigger as U, SelectValue as V, SelectContent as z, SelectItem as h, SelectSeparator as I } from "./index316.js";
|
|
13
|
+
import { Popover as q, PopoverAnchor as B, PopoverContent as K } from "./index371.js";
|
|
14
|
+
import { Calendar as G } from "./index457.js";
|
|
15
|
+
import { Field as H, FieldContent as J, FieldLabel as Q, FieldDescription as W, FieldError as X } from "./index159.js";
|
|
16
|
+
const S = "MMM d, yyyy", ue = ({
|
|
17
|
+
disabled: T,
|
|
18
|
+
paymentTerms: f,
|
|
19
|
+
isLoading: E
|
|
20
|
+
}) => {
|
|
21
|
+
const {
|
|
22
|
+
i18n: a
|
|
23
|
+
} = L(), {
|
|
24
|
+
control: M,
|
|
25
|
+
watch: w,
|
|
26
|
+
setValue: _
|
|
27
|
+
} = Y(), [F, m] = k(!1), i = w("payment_terms_id"), y = w("frequency") !== "once", o = w("payment_terms_custom_date") ?? void 0, p = (r) => _("payment_terms_custom_date", r ?? null), {
|
|
28
|
+
dedupedTerms: g
|
|
29
|
+
} = b(() => $(f?.data ?? []), [f]), d = g.find((r) => r?.id === i), P = d && N(d), c = () => {
|
|
30
|
+
window.setTimeout(() => m(!0), 0);
|
|
31
|
+
}, C = (r, s) => /* @__PURE__ */ n("span", { className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2", children: [
|
|
32
|
+
/* @__PURE__ */ e("span", { className: "ttw:truncate", children: r }),
|
|
33
|
+
s && /* @__PURE__ */ e("span", { className: "ttw:text-muted-foreground ttw:shrink-0 ttw:text-xs", children: x(s, S) })
|
|
34
|
+
] });
|
|
35
|
+
return /* @__PURE__ */ e(v, { children: E ? /* @__PURE__ */ e(O, { className: "ttw:w-full ttw:h-9" }) : /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(j, { name: "payment_terms_id", control: M, render: ({
|
|
36
|
+
field: r,
|
|
37
|
+
fieldState: {
|
|
38
|
+
error: s
|
|
39
|
+
}
|
|
40
|
+
}) => /* @__PURE__ */ e(H, { children: /* @__PURE__ */ n(J, { children: [
|
|
41
|
+
/* @__PURE__ */ e(Q, { htmlFor: "payment_terms_id", children: a._("Payment terms") }),
|
|
42
|
+
/* @__PURE__ */ n(q, { open: F, onOpenChange: (t) => {
|
|
43
|
+
m(t), !t && i === l && !o && r.onChange(void 0);
|
|
44
|
+
}, children: [
|
|
45
|
+
/* @__PURE__ */ n(R, { ...r, disabled: T, value: r.value, onValueChange: (t) => {
|
|
46
|
+
if (t === l) {
|
|
47
|
+
i !== l && p(void 0), r.onChange(t), c();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
r.onChange(t), t === u && _("payment_reminder_id", "", {
|
|
51
|
+
shouldDirty: !0
|
|
52
|
+
}), p(void 0), m(!1);
|
|
53
|
+
}, children: [
|
|
54
|
+
/* @__PURE__ */ e(B, { className: "ttw:w-full", children: /* @__PURE__ */ e(U, { id: "payment_terms_id", className: "ttw:w-full", "aria-invalid": !!s, children: /* @__PURE__ */ n(V, { placeholder: a._("Select payment terms"), children: [
|
|
55
|
+
i === u && /* @__PURE__ */ e("span", { className: "ttw:truncate", children: a._("Due on receipt") }),
|
|
56
|
+
i === l && /* @__PURE__ */ n("span", { className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2", children: [
|
|
57
|
+
/* @__PURE__ */ n("span", { className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5", children: [
|
|
58
|
+
/* @__PURE__ */ e(A, { className: D("ttw:size-4 ttw:shrink-0", !o && "ttw:text-muted-foreground") }),
|
|
59
|
+
/* @__PURE__ */ e("span", { className: D("ttw:truncate", !o && "ttw:text-muted-foreground"), children: o ? x(o, S) : a._("Mon DD, YYYY") })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ e("span", { className: "ttw:text-muted-foreground ttw:shrink-0 ttw:text-xs", children: a._("Custom date") })
|
|
62
|
+
] }),
|
|
63
|
+
d && C(d.name, P)
|
|
64
|
+
] }) }) }),
|
|
65
|
+
/* @__PURE__ */ n(z, { children: [
|
|
66
|
+
/* @__PURE__ */ e(h, { value: u, children: a._("Due on receipt") }),
|
|
67
|
+
!y && /* @__PURE__ */ e(h, { value: l, onPointerUp: c, onClick: c, onKeyDown: (t) => {
|
|
68
|
+
(t.key === "Enter" || t.key === " ") && c();
|
|
69
|
+
}, children: a._("Custom date") }),
|
|
70
|
+
/* @__PURE__ */ e(I, {}),
|
|
71
|
+
g.map((t) => /* @__PURE__ */ e(h, { value: t.id, children: C(t.name, N(t)) }, t.id))
|
|
72
|
+
] })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ e(K, { className: "ttw:w-auto ttw:overflow-hidden ttw:p-0", align: "start", onFocusOutside: (t) => {
|
|
75
|
+
t.preventDefault();
|
|
76
|
+
}, children: /* @__PURE__ */ e(G, { mode: "single", captionLayout: "dropdown", selected: o, disabled: {
|
|
77
|
+
before: /* @__PURE__ */ new Date()
|
|
78
|
+
}, onSelect: (t) => {
|
|
79
|
+
p(t), m(!1);
|
|
80
|
+
} }) })
|
|
81
|
+
] }),
|
|
82
|
+
y && /* @__PURE__ */ e(W, { children: a._("Each invoice in the series will have the same payment term.") }),
|
|
83
|
+
/* @__PURE__ */ e(X, { errors: s ? [s] : [] })
|
|
84
|
+
] }) }) }) }) });
|
|
85
|
+
};
|
|
3
86
|
export {
|
|
4
|
-
|
|
87
|
+
ue as PaymentSection
|
|
5
88
|
};
|