@tesouro/embedded-components-react 0.2.160 → 0.2.162
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.css +21 -0
- package/dist/index.d.ts +9 -0
- package/dist/lib/ReceivablesWidget.js +21 -21
- package/dist/lib/WidgetProvider.d.ts +9 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index5.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index6.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index3.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +88 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +28 -10
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/data-access/dist/index2.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/data-access/dist/index6.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +6 -17
- 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 +17 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index6.js +16 -53
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index7.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index8.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index9.js +15 -16
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index4.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/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 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +23 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +34 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +4 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +25 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +1269 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +32 -1270
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index13.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index14.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +22 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +13 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +20 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +19 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +9 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +22 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +20 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +27 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +114 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +68 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +14 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +12 -222
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +9 -469
- 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 -535
- 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 +221 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +465 -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 +524 -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 +96 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index190.js +57 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index24.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +37 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +52 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +29 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +5 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +74 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +32 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +18 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index26.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +22 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +53 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +27 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +54 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +37 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +344 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +299 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +100 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +160 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index27.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +263 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +25 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +19 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +20 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +18 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +19 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +171 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +126 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +158 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index28.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +10 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +18 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +59 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +62 -199
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +58 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +6 -489
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +7 -164
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +62 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +22 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +61 -95
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +14 -213
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +21 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +31 -59
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +73 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +44 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +66 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +149 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +10 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +19 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +6 -345
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index30.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +470 -282
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +158 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +38 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +56 -261
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +30 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +118 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +23 -149
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +43 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +57 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +62 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +156 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +27 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +28 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +78 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +25 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +127 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +47 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +115 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +106 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +50 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +194 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +68 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +30 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +18 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +30 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +32 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +29 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +50 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +10 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +19 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +28 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +40 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +59 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +94 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +109 -168
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +84 -130
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +2 -162
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +94 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index34.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +97 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +210 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +19 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +40 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +76 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +42 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +25 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +127 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +7 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +53 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +15 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +91 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +38 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +29 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +66 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index37.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +47 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +21 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +5 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +21 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +45 -264
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +11 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +80 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +17 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index38.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +82 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +262 -134
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +36 -109
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +63 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +41 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +24 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +138 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +110 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +81 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +16 -284
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +11 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +2 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +284 -126
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +45 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +15 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +118 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +18 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +74 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +16 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +3 -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 +32 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +25 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +32 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +19 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +9 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +48 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +47 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +65 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +15 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +16 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +15 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +66 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +21 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +2 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +53 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +34 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +24 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +31 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +31 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +4 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +127 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +29 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index435.js +48 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index436.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index437.js +41 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index438.js +8 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index439.js +43 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +36 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +13 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +91 -107
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +14 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +75 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +19 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +9 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +56 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +71 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +20 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index450.js +14 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +18 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +50 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +59 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +29 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +71 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +86 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +51 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +51 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +53 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +29 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +35 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +45 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +50 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +50 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +18 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +32 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +85 -86
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +24 -55
- 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 +101 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +107 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +74 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +66 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +35 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +11 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +28 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +37 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +79 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +38 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +9 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +65 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +47 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +36 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +17 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +51 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +55 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +42 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index58.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index79.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index8.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index86.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index94.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +165 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/queryKeys.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +71 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/labels.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +125 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +327 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +58 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index10.js +130 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index13.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +65 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index15.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +99 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +236 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index2.js +117 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js +46 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index8.js +41 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/amountCoverage.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/amountInput.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/policyPriority.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/policyScript.js +98 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/policyTrigger.js +136 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/util/dist/lib/validatePolicyDraft.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +119 -119
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +52 -52
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1671 -1613
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/tags-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index10.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index11.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index12.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index16.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index20.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index21.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index22.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index3.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index8.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
- package/dist/packages/shared-ui-shadcn/dist/index.js +1668 -1662
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index10.js +0 -23
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h, useId as y } from "react";
|
|
3
|
+
import { CircleAlert as v } from "lucide-react";
|
|
4
|
+
import { TooltipProvider as f, Typography as c, Input as g, Tooltip as C, TooltipTrigger as S, TooltipContent as x } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
5
|
+
import { AmountConditionBuilderDefaultLabels as A } from "./index3.js";
|
|
6
|
+
function m({
|
|
7
|
+
value: a,
|
|
8
|
+
onChange: n,
|
|
9
|
+
onBlur: l,
|
|
10
|
+
currencySymbol: i,
|
|
11
|
+
placeholder: d,
|
|
12
|
+
error: r,
|
|
13
|
+
disabled: t,
|
|
14
|
+
ariaLabel: o,
|
|
15
|
+
testId: p
|
|
16
|
+
}) {
|
|
17
|
+
const u = y();
|
|
18
|
+
return /* @__PURE__ */ s("div", { className: "ttw:relative ttw:w-39", children: [
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
className: "ttw:absolute ttw:left-3 ttw:top-1/2 ttw:-translate-y-1/2 ttw:text-sm ttw:text-muted-foreground ttw:pointer-events-none",
|
|
24
|
+
children: i
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
g,
|
|
29
|
+
{
|
|
30
|
+
value: a,
|
|
31
|
+
onChange: (w) => n(w.target.value),
|
|
32
|
+
onBlur: l,
|
|
33
|
+
"aria-invalid": !!r,
|
|
34
|
+
"aria-label": o,
|
|
35
|
+
"aria-describedby": r ? u : void 0,
|
|
36
|
+
placeholder: d,
|
|
37
|
+
inputMode: "decimal",
|
|
38
|
+
disabled: t,
|
|
39
|
+
"data-testid": p,
|
|
40
|
+
style: {
|
|
41
|
+
paddingLeft: "1.75rem",
|
|
42
|
+
paddingRight: r ? "2rem" : void 0
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
r ? /* @__PURE__ */ s(b, { children: [
|
|
47
|
+
/* @__PURE__ */ s(C, { children: [
|
|
48
|
+
/* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ e(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
type: "button",
|
|
52
|
+
"aria-labelledby": u,
|
|
53
|
+
className: "ttw:absolute ttw:right-2 ttw:top-1/2 ttw:-translate-y-1/2 ttw:inline-flex ttw:items-center ttw:rounded",
|
|
54
|
+
children: /* @__PURE__ */ e(v, { className: "ttw:size-4 ttw:text-destructive" })
|
|
55
|
+
}
|
|
56
|
+
) }),
|
|
57
|
+
/* @__PURE__ */ e(x, { side: "top", children: r })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ e("span", { id: u, role: "alert", className: "ttw:sr-only", children: r })
|
|
60
|
+
] }) : null
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
const P = ({
|
|
64
|
+
value: a,
|
|
65
|
+
onChange: n,
|
|
66
|
+
onFieldBlur: l,
|
|
67
|
+
errors: i,
|
|
68
|
+
disabled: d,
|
|
69
|
+
labels: r
|
|
70
|
+
}) => {
|
|
71
|
+
const t = h(
|
|
72
|
+
() => ({ ...A, ...r }),
|
|
73
|
+
[r]
|
|
74
|
+
);
|
|
75
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ s(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
"data-testid": "amount-condition-builder",
|
|
79
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ e(c, { variant: "body2", className: "ttw:font-medium", children: t.IfAmountIsBetween }),
|
|
82
|
+
/* @__PURE__ */ e(
|
|
83
|
+
m,
|
|
84
|
+
{
|
|
85
|
+
value: a.lower,
|
|
86
|
+
onChange: (o) => n({ ...a, lower: o }),
|
|
87
|
+
onBlur: l ? () => l("lower") : void 0,
|
|
88
|
+
currencySymbol: t.CurrencySymbol,
|
|
89
|
+
placeholder: t.LowerPlaceholder,
|
|
90
|
+
error: i?.lower,
|
|
91
|
+
disabled: d,
|
|
92
|
+
ariaLabel: t.LowerAmountAriaLabel,
|
|
93
|
+
testId: "amount-condition-lower-input"
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ e(c, { variant: "body2", className: "ttw:font-medium", children: t.And }),
|
|
97
|
+
/* @__PURE__ */ e(
|
|
98
|
+
m,
|
|
99
|
+
{
|
|
100
|
+
value: a.upper,
|
|
101
|
+
onChange: (o) => n({ ...a, upper: o }),
|
|
102
|
+
onBlur: l ? () => l("upper") : void 0,
|
|
103
|
+
currencySymbol: t.CurrencySymbol,
|
|
104
|
+
placeholder: t.UpperPlaceholder,
|
|
105
|
+
error: i?.upper,
|
|
106
|
+
disabled: d,
|
|
107
|
+
ariaLabel: t.UpperAmountAriaLabel,
|
|
108
|
+
testId: "amount-condition-upper-input"
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
P as AmountConditionBuilder
|
|
117
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
IfAmountIsBetween: "If the amount is between",
|
|
3
|
+
And: "and",
|
|
4
|
+
CurrencySymbol: "$",
|
|
5
|
+
LowerPlaceholder: "0.00",
|
|
6
|
+
UpperPlaceholder: "No limit",
|
|
7
|
+
LowerAmountAriaLabel: "Minimum amount",
|
|
8
|
+
UpperAmountAriaLabel: "Maximum amount",
|
|
9
|
+
OverlapAmount: "Overlaps another rule"
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as AmountConditionBuilderDefaultLabels
|
|
13
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { PlusIcon as i } from "lucide-react";
|
|
4
|
+
import { Typography as a, Button as d } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
5
|
+
import { NoPolicyBannerDefaultLabels as c } from "./index5.js";
|
|
6
|
+
const x = ({
|
|
7
|
+
onCreateRule: l,
|
|
8
|
+
disabled: s,
|
|
9
|
+
labels: o
|
|
10
|
+
}) => {
|
|
11
|
+
const e = n(
|
|
12
|
+
() => ({ ...c, ...o }),
|
|
13
|
+
[o]
|
|
14
|
+
);
|
|
15
|
+
return (
|
|
16
|
+
// Same card chrome as a policy card: the empty state sits on the host
|
|
17
|
+
// page's own background, which is not guaranteed to be white.
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
"data-testid": "no-policy-banner",
|
|
22
|
+
className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-10",
|
|
23
|
+
children: /* @__PURE__ */ r("div", { className: "ttw:mx-auto ttw:flex ttw:max-w-[600px] ttw:flex-col ttw:items-center ttw:gap-2 ttw:px-6", children: [
|
|
24
|
+
/* @__PURE__ */ t(a, { variant: "h5", children: e.Title }),
|
|
25
|
+
/* @__PURE__ */ t(a, { variant: "body2", color: "muted", className: "ttw:text-center", children: e.Body }),
|
|
26
|
+
/* @__PURE__ */ r(
|
|
27
|
+
d,
|
|
28
|
+
{
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: l,
|
|
31
|
+
disabled: s,
|
|
32
|
+
className: "ttw:mt-2",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ t(i, {}),
|
|
35
|
+
e.CreateRule
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] })
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
x as NoPolicyBanner
|
|
46
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { Info as d, ArrowRight as w } from "lucide-react";
|
|
4
|
+
import { GapCoverageAlertDefaultLabels as c } from "./index7.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
gaps: s,
|
|
7
|
+
onSelectGap: i,
|
|
8
|
+
disabled: o,
|
|
9
|
+
labels: r
|
|
10
|
+
}) => {
|
|
11
|
+
const l = n(
|
|
12
|
+
() => ({ ...c, ...r }),
|
|
13
|
+
[r]
|
|
14
|
+
);
|
|
15
|
+
return (
|
|
16
|
+
// Hand-laid out rather than built on the shared `Alert`: that component's
|
|
17
|
+
// icon/title/description grid puts the title in a second column whose
|
|
18
|
+
// offset the design does not have, and the warning tone it needs has no
|
|
19
|
+
// semantic token (see the UI conventions on status colors).
|
|
20
|
+
/* @__PURE__ */ a(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-testid": "gap-coverage-alert",
|
|
24
|
+
role: "status",
|
|
25
|
+
className: "ttw:w-full ttw:rounded-lg ttw:border ttw:border-orange-400 ttw:bg-orange-50 ttw:px-4 ttw:py-3 ttw:text-sm ttw:text-orange-950",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ a("div", { className: "ttw:flex ttw:items-center ttw:gap-2", children: [
|
|
28
|
+
/* @__PURE__ */ t(d, { "aria-hidden": "true", className: "ttw:size-4 ttw:shrink-0" }),
|
|
29
|
+
/* @__PURE__ */ t("span", { className: "ttw:font-medium", children: l.Title })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ t("ul", { className: "ttw:my-1.5 ttw:list-disc ttw:space-y-1 ttw:pl-7", children: s.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ a(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:text-primary ttw:disabled:pointer-events-none ttw:disabled:opacity-60 hover:ttw:underline",
|
|
36
|
+
disabled: o,
|
|
37
|
+
onClick: () => i(e.id),
|
|
38
|
+
children: [
|
|
39
|
+
e.label,
|
|
40
|
+
/* @__PURE__ */ t(w, { className: "ttw:size-3" })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
) }, e.id)) }),
|
|
44
|
+
/* @__PURE__ */ t("p", { children: l.Footer })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
u as GapCoverageAlert
|
|
52
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { Plus as d } from "lucide-react";
|
|
4
|
+
import { Typography as l, Button as p } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
5
|
+
import { ApprovalPoliciesHeaderDefaultLabels as m } from "./index9.js";
|
|
6
|
+
const w = ({
|
|
7
|
+
onAddRule: o,
|
|
8
|
+
addRuleDisabled: s,
|
|
9
|
+
labels: i,
|
|
10
|
+
headingComponent: r = "h1"
|
|
11
|
+
}) => {
|
|
12
|
+
const t = n(
|
|
13
|
+
() => ({ ...m, ...i }),
|
|
14
|
+
[i]
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ e("div", { className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4", children: [
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "ttw:flex ttw:flex-col ttw:gap-1.5", children: [
|
|
18
|
+
/* @__PURE__ */ a(l, { variant: "h3", component: r, children: t.Title }),
|
|
19
|
+
/* @__PURE__ */ a(l, { variant: "body2", color: "muted", children: t.Description })
|
|
20
|
+
] }),
|
|
21
|
+
o ? /* @__PURE__ */ e(
|
|
22
|
+
p,
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
variant: "outline",
|
|
26
|
+
size: "sm",
|
|
27
|
+
onClick: o,
|
|
28
|
+
disabled: s,
|
|
29
|
+
"data-testid": "approval-policies-add-rule-button",
|
|
30
|
+
className: "ttw:shrink-0",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ a(d, {}),
|
|
33
|
+
t.AddRule
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
) : null
|
|
37
|
+
] });
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
w as ApprovalPoliciesHeader
|
|
41
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
Title: "Approval policies",
|
|
3
|
+
AddRule: "Add rule",
|
|
4
|
+
Description: "Set the rules and conditions under which bills require approval before payment. Policies are applied automatically when a bill matches their conditions."
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
e as ApprovalPoliciesHeaderDefaultLabels
|
|
8
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
function a(m) {
|
|
2
|
+
return {
|
|
3
|
+
min: m.min ?? 0,
|
|
4
|
+
max: m.max ?? 1 / 0
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
function r({ min: m, max: i }) {
|
|
8
|
+
return i === 1 / 0 ? { min: m } : { min: m, max: i };
|
|
9
|
+
}
|
|
10
|
+
function u(m) {
|
|
11
|
+
const i = [...m].sort((n, t) => n.min - t.min), o = [];
|
|
12
|
+
for (const n of i) {
|
|
13
|
+
const t = o[o.length - 1];
|
|
14
|
+
if (t && n.min <= t.max + 1) {
|
|
15
|
+
t.max = Math.max(t.max, n.max);
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
o.push({ ...n });
|
|
19
|
+
}
|
|
20
|
+
return o;
|
|
21
|
+
}
|
|
22
|
+
function e(m) {
|
|
23
|
+
const i = u(m.map(a));
|
|
24
|
+
if (i.length === 0)
|
|
25
|
+
return [{ min: 0 }];
|
|
26
|
+
const o = [];
|
|
27
|
+
let n = 0;
|
|
28
|
+
for (const t of i)
|
|
29
|
+
t.min > n && o.push(r({ min: n, max: t.min - 1 })), n = Math.max(n, t.max + 1);
|
|
30
|
+
return n !== 1 / 0 && o.push({ min: n }), o;
|
|
31
|
+
}
|
|
32
|
+
function s(m, i) {
|
|
33
|
+
const o = a(m), n = a(i);
|
|
34
|
+
return o.min <= n.max && n.min <= o.max;
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
s as amountConditionsOverlap,
|
|
38
|
+
e as computeUncoveredAmountRanges
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const i = /^\$?\s*(\d{1,3}(,\d{3})*|\d+)(\.\d{1,2})?$/;
|
|
2
|
+
function u(n) {
|
|
3
|
+
const t = n.trim();
|
|
4
|
+
if (t === "")
|
|
5
|
+
return { status: "blank" };
|
|
6
|
+
if (!i.test(t))
|
|
7
|
+
return { status: "invalid" };
|
|
8
|
+
const s = t.replace(/[$,\s]/g, ""), [r, a = ""] = s.split("."), o = Number(r) * 100 + Number(a.padEnd(2, "0"));
|
|
9
|
+
return Number.isSafeInteger(o) ? { status: "ok", minorUnits: o } : { status: "invalid" };
|
|
10
|
+
}
|
|
11
|
+
function e(n) {
|
|
12
|
+
const t = n < 0, s = Math.abs(Math.round(n)), r = Math.floor(s / 100), a = s % 100;
|
|
13
|
+
return `${t ? "-" : ""}${r}.${String(a).padStart(2, "0")}`;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
e as formatMinorUnitsAsAmountInput,
|
|
17
|
+
u as parseAmountInputToMinorUnits
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function n(i) {
|
|
2
|
+
const r = new Set(
|
|
3
|
+
i.filter((e) => Number.isSafeInteger(e))
|
|
4
|
+
), t = Math.max(0, ...r);
|
|
5
|
+
if (t < 32767)
|
|
6
|
+
return t + 1;
|
|
7
|
+
for (let e = 32766; e >= 1; e -= 1)
|
|
8
|
+
if (!r.has(e))
|
|
9
|
+
return e;
|
|
10
|
+
return 32767;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
n as nextPolicyPriority
|
|
14
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const f = "{Payables.approve(invoice.id)}", y = "{Payables.reject(invoice.id)}", i = {
|
|
2
|
+
ByRoles: "ApprovalRequests.request_approval_by_role",
|
|
3
|
+
ByUsers: "ApprovalRequests.request_approval_by_users"
|
|
4
|
+
}, A = "ApprovalRequests.request_approval_by_roles", d = 1;
|
|
5
|
+
function I(r) {
|
|
6
|
+
return {
|
|
7
|
+
call: i.ByRoles,
|
|
8
|
+
params: {
|
|
9
|
+
role_ids: r,
|
|
10
|
+
required_approval_count: d
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function _(r) {
|
|
15
|
+
return {
|
|
16
|
+
call: i.ByUsers,
|
|
17
|
+
params: {
|
|
18
|
+
user_ids: r,
|
|
19
|
+
required_approval_count: d
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function v(r) {
|
|
24
|
+
const e = r.roleIds.length > 0, s = r.userIds.length > 0;
|
|
25
|
+
if (e && s)
|
|
26
|
+
throw new Error(
|
|
27
|
+
"An approval group cannot mix roles and users: the OR-ed `any` node this would need is unreadable by the Monite compatibility readers."
|
|
28
|
+
);
|
|
29
|
+
return e ? I(r.roleIds) : _(r.userIds);
|
|
30
|
+
}
|
|
31
|
+
function g(r) {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
if: {
|
|
35
|
+
// Sequential, so the groups read top-to-bottom as an approval chain
|
|
36
|
+
// rather than firing every request at once.
|
|
37
|
+
run_concurrently: !1,
|
|
38
|
+
all: r.map(v)
|
|
39
|
+
},
|
|
40
|
+
then: [f],
|
|
41
|
+
else: [y]
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
function u(r) {
|
|
46
|
+
return typeof r == "object" && r !== null && !Array.isArray(r) ? r : void 0;
|
|
47
|
+
}
|
|
48
|
+
function c(r) {
|
|
49
|
+
const e = r.call;
|
|
50
|
+
if (typeof e != "string")
|
|
51
|
+
return;
|
|
52
|
+
const s = u(r.params) ?? {}, o = s.required_approval_count, a = (n) => {
|
|
53
|
+
const l = s[n];
|
|
54
|
+
return Array.isArray(l) ? l.map((p) => String(p)) : [];
|
|
55
|
+
}, t = o === void 0 || o === d;
|
|
56
|
+
return e === i.ByRoles || e === A ? { refs: { roleIds: a("role_ids"), userIds: [] }, isSupported: t } : e === i.ByUsers ? { refs: { roleIds: [], userIds: a("user_ids") }, isSupported: t } : { refs: { roleIds: [], userIds: [] }, isSupported: !1 };
|
|
57
|
+
}
|
|
58
|
+
function h(r) {
|
|
59
|
+
const e = u(r);
|
|
60
|
+
if (!e)
|
|
61
|
+
return { refs: { roleIds: [], userIds: [] }, isSupported: !1 };
|
|
62
|
+
const s = e.any;
|
|
63
|
+
if (Array.isArray(s)) {
|
|
64
|
+
const o = { roleIds: [], userIds: [] };
|
|
65
|
+
for (const a of s) {
|
|
66
|
+
const t = u(a), n = t ? c(t) : void 0;
|
|
67
|
+
n && (o.roleIds.push(...n.refs.roleIds), o.userIds.push(...n.refs.userIds));
|
|
68
|
+
}
|
|
69
|
+
return { refs: o, isSupported: !1 };
|
|
70
|
+
}
|
|
71
|
+
return Array.isArray(e.all) ? { refs: { roleIds: [], userIds: [] }, isSupported: !1 } : c(e) ?? { refs: { roleIds: [], userIds: [] }, isSupported: !1 };
|
|
72
|
+
}
|
|
73
|
+
function S(r) {
|
|
74
|
+
const e = r.then, s = r.else;
|
|
75
|
+
return Array.isArray(e) && e.length === 1 && e[0] === f && (s === void 0 || Array.isArray(s) && s.length === 1 && s[0] === y);
|
|
76
|
+
}
|
|
77
|
+
function b(r) {
|
|
78
|
+
if (!Array.isArray(r) || r.length !== 1)
|
|
79
|
+
return { groups: [], isSupported: !1 };
|
|
80
|
+
const e = u(r[0]), s = e ? u(e.if) : void 0, o = s ? s.all : void 0;
|
|
81
|
+
if (!e || !s || !Array.isArray(o))
|
|
82
|
+
return { groups: [], isSupported: !1 };
|
|
83
|
+
const a = s.run_concurrently !== !0;
|
|
84
|
+
let t = S(e) && a;
|
|
85
|
+
const n = [];
|
|
86
|
+
for (const l of o) {
|
|
87
|
+
const p = h(l);
|
|
88
|
+
t = t && p.isSupported, n.push(p.refs);
|
|
89
|
+
}
|
|
90
|
+
return n.length === 0 ? { groups: [], isSupported: !1 } : { groups: n, isSupported: t };
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
f as APPROVE_ACTION,
|
|
94
|
+
y as REJECT_ACTION,
|
|
95
|
+
i as RequestApprovalCall,
|
|
96
|
+
g as buildApprovalPolicyScript,
|
|
97
|
+
b as parseApprovalPolicyScript
|
|
98
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const p = "invoice.amount", m = "invoice.currency", T = "USD", _ = "{event_name == 'submitted_for_approval'}", i = {
|
|
2
|
+
GreaterThan: ">",
|
|
3
|
+
GreaterThanOrEqual: ">=",
|
|
4
|
+
LessThan: "<",
|
|
5
|
+
LessThanOrEqual: "<=",
|
|
6
|
+
Equals: "=="
|
|
7
|
+
};
|
|
8
|
+
function l(n, o) {
|
|
9
|
+
return n === void 0 && o !== void 0 ? { type: "lessThanOrEqual", max: o } : { type: "between", min: n, max: o };
|
|
10
|
+
}
|
|
11
|
+
function O(n, o = "USD") {
|
|
12
|
+
const e = [_];
|
|
13
|
+
return n.min !== void 0 && e.push({
|
|
14
|
+
operator: i.GreaterThanOrEqual,
|
|
15
|
+
left_operand: { name: p },
|
|
16
|
+
right_operand: n.min
|
|
17
|
+
}), n.max !== void 0 && e.push({
|
|
18
|
+
operator: i.LessThanOrEqual,
|
|
19
|
+
left_operand: { name: p },
|
|
20
|
+
right_operand: n.max
|
|
21
|
+
}), e.push({
|
|
22
|
+
operator: i.Equals,
|
|
23
|
+
left_operand: { name: m },
|
|
24
|
+
right_operand: o
|
|
25
|
+
}), { all: e };
|
|
26
|
+
}
|
|
27
|
+
function y(n) {
|
|
28
|
+
return typeof n == "object" && n !== null && "operator" in n && "left_operand" in n;
|
|
29
|
+
}
|
|
30
|
+
function h(n, o) {
|
|
31
|
+
return n === void 0 ? o : Math.max(n, o);
|
|
32
|
+
}
|
|
33
|
+
function v(n, o) {
|
|
34
|
+
return n === void 0 ? o : Math.min(n, o);
|
|
35
|
+
}
|
|
36
|
+
function E(n) {
|
|
37
|
+
return typeof n == "number" && Number.isSafeInteger(n) && n >= 0 ? n : void 0;
|
|
38
|
+
}
|
|
39
|
+
function A(n) {
|
|
40
|
+
const o = n.left_operand;
|
|
41
|
+
if (typeof o == "object" && o !== null && "name" in o) {
|
|
42
|
+
const { name: e } = o;
|
|
43
|
+
return typeof e == "string" ? e : void 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function g(n) {
|
|
47
|
+
if (n == null || n === !0)
|
|
48
|
+
return {
|
|
49
|
+
condition: l(void 0, void 0),
|
|
50
|
+
isSupported: !0,
|
|
51
|
+
// "Every amount" is a real, readable range, not a fallback guess.
|
|
52
|
+
hasKnownAmountBounds: !0,
|
|
53
|
+
hasWrittenGuards: !1
|
|
54
|
+
};
|
|
55
|
+
if (typeof n != "object" || Array.isArray(n) || !("all" in n))
|
|
56
|
+
return {
|
|
57
|
+
condition: l(void 0, void 0),
|
|
58
|
+
isSupported: !1,
|
|
59
|
+
hasKnownAmountBounds: !1,
|
|
60
|
+
hasWrittenGuards: !1
|
|
61
|
+
};
|
|
62
|
+
const o = n.all;
|
|
63
|
+
if (!Array.isArray(o))
|
|
64
|
+
return {
|
|
65
|
+
condition: l(void 0, void 0),
|
|
66
|
+
isSupported: !1,
|
|
67
|
+
hasKnownAmountBounds: !1,
|
|
68
|
+
hasWrittenGuards: !1
|
|
69
|
+
};
|
|
70
|
+
let e, s, u, t = !0, f = !0, d = !1;
|
|
71
|
+
for (const r of o) {
|
|
72
|
+
if (typeof r == "string") {
|
|
73
|
+
r === _ ? d = !0 : (t = !1, f = !1);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!y(r)) {
|
|
77
|
+
t = !1, f = !1;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const c = A(r);
|
|
81
|
+
if (c === p) {
|
|
82
|
+
const a = E(r.right_operand);
|
|
83
|
+
if (a === void 0) {
|
|
84
|
+
t = !1, f = !1;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (r.operator === i.GreaterThanOrEqual)
|
|
88
|
+
e = h(e, a);
|
|
89
|
+
else if (r.operator === i.GreaterThan)
|
|
90
|
+
e = h(e, a + 1);
|
|
91
|
+
else if (r.operator === i.LessThanOrEqual)
|
|
92
|
+
s = v(s, a);
|
|
93
|
+
else if (r.operator === i.LessThan) {
|
|
94
|
+
if (a === 0) {
|
|
95
|
+
t = !1, f = !1;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
s = v(s, a - 1);
|
|
99
|
+
} else
|
|
100
|
+
t = !1, f = !1;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (c === m && r.operator === i.Equals) {
|
|
104
|
+
const a = typeof r.right_operand == "string" ? r.right_operand : void 0;
|
|
105
|
+
if (a === void 0 || u !== void 0 && u !== a) {
|
|
106
|
+
t = !1, f = !1;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
u = a;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
t = !1;
|
|
113
|
+
}
|
|
114
|
+
return e !== void 0 && s !== void 0 && s < e ? {
|
|
115
|
+
condition: l(void 0, void 0),
|
|
116
|
+
currency: u,
|
|
117
|
+
isSupported: !1,
|
|
118
|
+
hasKnownAmountBounds: !1,
|
|
119
|
+
hasWrittenGuards: d && u !== void 0
|
|
120
|
+
} : {
|
|
121
|
+
condition: l(e, s),
|
|
122
|
+
currency: u,
|
|
123
|
+
isSupported: t,
|
|
124
|
+
hasKnownAmountBounds: f,
|
|
125
|
+
hasWrittenGuards: d && u !== void 0
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
p as POLICY_AMOUNT_OPERAND,
|
|
130
|
+
m as POLICY_CURRENCY_OPERAND,
|
|
131
|
+
T as POLICY_DEFAULT_CURRENCY,
|
|
132
|
+
_ as POLICY_EVENT_GUARD,
|
|
133
|
+
l as amountConditionFromBounds,
|
|
134
|
+
O as buildApprovalPolicyTrigger,
|
|
135
|
+
g as parseApprovalPolicyTrigger
|
|
136
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { amountConditionsOverlap as v } from "./amountCoverage.js";
|
|
2
|
+
import { parseAmountInputToMinorUnits as u } from "./amountInput.js";
|
|
3
|
+
import { amountConditionFromBounds as m } from "./policyTrigger.js";
|
|
4
|
+
const t = {
|
|
5
|
+
/** Not a non-negative amount. */
|
|
6
|
+
Invalid: "invalid",
|
|
7
|
+
/** Upper bound is below the lower bound. */
|
|
8
|
+
LowerAboveUpper: "lowerAboveUpper",
|
|
9
|
+
/** The range collides with another policy's range. */
|
|
10
|
+
Overlap: "overlap"
|
|
11
|
+
}, d = {
|
|
12
|
+
/** An approval group with no approvers would approve nothing. */
|
|
13
|
+
Empty: "empty"
|
|
14
|
+
};
|
|
15
|
+
function g(r) {
|
|
16
|
+
const e = u(r.amount.lower), i = u(r.amount.upper), o = {};
|
|
17
|
+
e.status === "invalid" && (o.lower = t.Invalid), i.status === "invalid" && (o.upper = t.Invalid);
|
|
18
|
+
const p = e.status === "ok" ? e.minorUnits : void 0, s = i.status === "ok" ? i.minorUnits : void 0, l = m(p, s);
|
|
19
|
+
p !== void 0 && s !== void 0 && s < p && (o.upper = t.LowerAboveUpper), !(o.lower ?? o.upper) && r.otherConditions.some(
|
|
20
|
+
(n) => v(l, n)
|
|
21
|
+
) && (o.lower = t.Overlap, o.upper = t.Overlap);
|
|
22
|
+
const a = {};
|
|
23
|
+
for (const n of r.groups)
|
|
24
|
+
n.approverIds.length === 0 && (a[n.id] = d.Empty);
|
|
25
|
+
return { isValid: Object.keys(o).length === 0 && Object.keys(a).length === 0 && // No auto-approve, ever: a policy always requires at least one group.
|
|
26
|
+
r.groups.length > 0, condition: l, amountErrors: o, groupErrors: a };
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
t as PolicyAmountError,
|
|
30
|
+
d as PolicyGroupError,
|
|
31
|
+
g as validatePolicyDraft
|
|
32
|
+
};
|