@tesouro/embedded-components-react 0.7.57 → 0.7.59
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 +0 -28
- package/dist/lib/monite-sdk.d.ts +1411 -3171
- package/dist/lib/monite-sdk.js +53 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +58 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index100.js +51 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index102.js +150 -103
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +1224 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index104.js +174 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index106.js +15 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +48 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index110.js +3 -153
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index112.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +10 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index114.js +56 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index116.js +71 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +39 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +12 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +10 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +50 -1222
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +66 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +168 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +6 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +2 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +64 -167
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +78 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +1 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +35 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +0 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index13.js +2 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +57 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +40 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +564 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +1 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +148 -557
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +27 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index14.js +18 -173
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +10 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +19 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +27 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +1 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +17 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +71 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +162 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +24 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index152.js +41 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +49 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +60 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index155.js +1 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index156.js +27 -47
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +39 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index158.js +80 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +3 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index16.js +3 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index161.js +37 -65
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +81 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +113 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +4 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index165.js +10 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +10 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +18 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +75 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index17.js +59 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +125 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +1 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +50 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +17 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +1 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +64 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +119 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index18.js +20 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +5 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +34 -119
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +7 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +56 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +73 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +26 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +1 -58
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +57 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +18 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index19.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index190.js +182 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +1 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +29 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +3 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +35 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +16 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +17 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +5 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +15 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +21 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index202.js +20 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +5 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +14 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +17 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +9 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +23 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index21.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +23 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +14 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +81 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +14 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +97 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +42 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +30 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +1 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +101 -109
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +89 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +34 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +173 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +11 -197
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +68 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +209 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +89 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +20 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index23.js +23 -164
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +17 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +158 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +95 -352
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +4 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +20 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +73 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +6 -182
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index24.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +9 -99
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +131 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +5 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +5 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +215 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +34 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +33 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index25.js +12 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +72 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +184 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +14 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +206 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +100 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +63 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +54 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +91 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +40 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index26.js +7 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +76 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +85 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +12 -305
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +26 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +17 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +22 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +22 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index27.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +2 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +23 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +15 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +28 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +29 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +2 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index28.js +5 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index29.js +156 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index30.js +1 -99
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index31.js +9 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index32.js +10 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index33.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index34.js +827 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index35.js +21 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index37.js +5 -155
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index38.js +9 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +6 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index41.js +14 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index42.js +14 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +42 -929
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +23 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +5 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index48.js +32 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index49.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +9 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index51.js +5 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +12 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index57.js +6 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index58.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index59.js +19 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index60.js +30 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index61.js +12 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index62.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index63.js +52 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index65.js +19 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index66.js +47 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index67.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index68.js +15 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index69.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index70.js +46 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index71.js +37 -69
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index72.js +63 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index73.js +36 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index74.js +37 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index75.js +22 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index76.js +12 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index77.js +17 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index78.js +53 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index79.js +12 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index80.js +24 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index81.js +69 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index82.js +78 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index83.js +1 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index84.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index85.js +26 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index86.js +2 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +19 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +2 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index90.js +55 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index91.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index92.js +37 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index93.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index94.js +104 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index95.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index96.js +54 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +52 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index99.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +0 -189
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +0 -134
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +0 -211
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +0 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +0 -242
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +0 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +0 -167
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +0 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +0 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +0 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +0 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +0 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +0 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +0 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +0 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +0 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +0 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +0 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +0 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +0 -106
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +0 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +0 -173
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +0 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +0 -212
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +0 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +0 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +0 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +0 -104
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +0 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +0 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +0 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +0 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +0 -133
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +0 -222
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +0 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +0 -184
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +0 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +0 -206
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +0 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +0 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +0 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +0 -94
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +0 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +0 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +0 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +0 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +0 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +0 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +0 -97
|
@@ -1,569 +1,160 @@
|
|
|
1
|
-
import { useMoniteContext as e } from "./
|
|
2
|
-
import { getCounterpartName as t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import "./
|
|
13
|
-
import {
|
|
14
|
-
import "./index105.js";
|
|
15
|
-
import { AutocompleteRoles as ie } from "./index106.js";
|
|
16
|
-
import "./index107.js";
|
|
17
|
-
import { AutocompleteUser as ae } from "./index108.js";
|
|
18
|
-
import "./index109.js";
|
|
19
|
-
import { CurrencyEnumSchema as s } from "./index110.js";
|
|
20
|
-
import { MoniteCurrency as oe } from "./index119.js";
|
|
21
|
-
import "./index126.js";
|
|
22
|
-
import "./index128.js";
|
|
23
|
-
import { DialogFooter as se } from "./index129.js";
|
|
24
|
-
import "./index130.js";
|
|
25
|
-
import { DialogHeader as ce } from "./index133.js";
|
|
26
|
-
import { RHFTextField as c } from "./index134.js";
|
|
1
|
+
import { useMoniteContext as e } from "./index36.js";
|
|
2
|
+
import { getCounterpartName as t } from "./index42.js";
|
|
3
|
+
import { useDialog as n } from "./index124.js";
|
|
4
|
+
import { useApprovalPolicyTrigger as r } from "./index81.js";
|
|
5
|
+
import { User as i } from "./index63.js";
|
|
6
|
+
import "./index64.js";
|
|
7
|
+
import { useApprovalPolicyScript as a } from "./index90.js";
|
|
8
|
+
import { Role as o } from "./index92.js";
|
|
9
|
+
import "./index93.js";
|
|
10
|
+
import "./index125.js";
|
|
11
|
+
import { DialogFooter as s } from "./index126.js";
|
|
12
|
+
import "./index127.js";
|
|
13
|
+
import { DialogHeader as c } from "./index130.js";
|
|
27
14
|
import "./index135.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { Box as ue, DialogContent as de, Grid as g, MenuItem as _, Stack as fe, Typography as v } from "@mui/material";
|
|
33
|
-
import { Trans as pe, useLingui as me } from "@lingui/react";
|
|
34
|
-
import { FormProvider as he, useForm as ge } from "react-hook-form";
|
|
35
|
-
import { zodResolver as _e } from "@hookform/resolvers/zod";
|
|
15
|
+
import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { toast as f } from "react-hot-toast";
|
|
17
|
+
import { Chip as p, DialogContent as m, Paper as h, Stack as g, Table as _, TableBody as v, TableCell as y, TableHead as b, TableRow as x, Typography as S } from "@mui/material";
|
|
18
|
+
import { Trans as C, useLingui as w } from "@lingui/react";
|
|
36
19
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]).optional(),
|
|
64
|
-
amountValue: d.number().positive(e._("Amount must be a positive number")).optional(),
|
|
65
|
-
amountRangeLeftValue: d.number().positive(e._("Amount must be a positive number")).optional(),
|
|
66
|
-
amountRangeRightValue: d.number().positive(e._("Amount must be a positive number")).optional(),
|
|
67
|
-
amountCurrency: s.optional(),
|
|
68
|
-
scriptType: d.union([
|
|
69
|
-
d.literal("single_user"),
|
|
70
|
-
d.literal("users_from_list"),
|
|
71
|
-
d.literal("roles_from_list"),
|
|
72
|
-
d.literal("approval_chain")
|
|
73
|
-
]).nullish(),
|
|
74
|
-
rules: d.object({
|
|
75
|
-
single_user: d.any().optional(),
|
|
76
|
-
users_from_list: d.array(d.any()).optional(),
|
|
77
|
-
roles_from_list: d.array(d.any()).optional(),
|
|
78
|
-
approval_chain: d.array(d.any()).optional()
|
|
79
|
-
}),
|
|
80
|
-
usersFromListCount: d.number().min(1, e._("Minimum number of approvals required must be at least 1")).optional(),
|
|
81
|
-
rolesFromListCount: d.number().min(1, e._("Minimum number of approvals required must be at least 1")).optional()
|
|
82
|
-
}).superRefine((t, n) => {
|
|
83
|
-
let r = t.rules?.users_from_list;
|
|
84
|
-
r && r.length > 0 && t.usersFromListCount !== void 0 && t.usersFromListCount > r.length && n.addIssue({
|
|
85
|
-
code: d.ZodIssueCode.custom,
|
|
86
|
-
message: e._("Cannot exceed the number of selected users ({selectedUsersLength})", { selectedUsersLength: r.length }),
|
|
87
|
-
path: ["usersFromListCount"]
|
|
88
|
-
});
|
|
89
|
-
}), ye = (e) => ({
|
|
90
|
-
name: e.name,
|
|
91
|
-
description: e.description,
|
|
92
|
-
trigger: { all: [
|
|
93
|
-
"{event_name == 'submitted_for_approval'}",
|
|
94
|
-
...e.triggers.was_created_by_user_id?.length && e.triggers.was_created_by_user_id?.length > 0 ? [{
|
|
95
|
-
operator: a.IN,
|
|
96
|
-
left_operand: { name: `invoice.${i.WAS_CREATED_BY_USER_ID}` },
|
|
97
|
-
right_operand: e.triggers.was_created_by_user_id.map((e) => e.id)
|
|
98
|
-
}] : [],
|
|
99
|
-
...e.triggers.counterpart_id?.length && e.triggers.counterpart_id?.length > 0 ? [{
|
|
100
|
-
operator: a.IN,
|
|
101
|
-
left_operand: { name: `invoice.${i.COUNTERPART_ID}` },
|
|
102
|
-
right_operand: e.triggers.counterpart_id.map((e) => e.id)
|
|
103
|
-
}] : [],
|
|
104
|
-
...e.triggers.amount?.value?.length && e.triggers.amount?.value?.length > 0 ? [...e.triggers.amount.value.map((e) => ({
|
|
105
|
-
operator: e[0],
|
|
106
|
-
left_operand: { name: `invoice.${i.AMOUNT}` },
|
|
107
|
-
right_operand: typeof e[1] == "number" ? e[1] : parseInt(e[1])
|
|
108
|
-
})), {
|
|
109
|
-
operator: a.EQUALS,
|
|
110
|
-
left_operand: { name: `invoice.${i.CURRENCY}` },
|
|
111
|
-
right_operand: e.triggers.amount.currency
|
|
112
|
-
}] : []
|
|
113
|
-
] },
|
|
114
|
-
script: [{
|
|
115
|
-
if: {
|
|
116
|
-
run_concurrently: !1,
|
|
117
|
-
all: [
|
|
118
|
-
...e.rules.single_user ? [{
|
|
119
|
-
call: "ApprovalRequests.request_approval_by_users",
|
|
120
|
-
params: {
|
|
121
|
-
user_ids: [e.rules.single_user.id],
|
|
122
|
-
required_approval_count: 1
|
|
123
|
-
}
|
|
124
|
-
}] : [],
|
|
125
|
-
...e.rules.users_from_list && e.rules.users_from_list?.length > 0 ? [{
|
|
126
|
-
call: "ApprovalRequests.request_approval_by_users",
|
|
127
|
-
params: {
|
|
128
|
-
user_ids: e.rules.users_from_list.map((e) => e.id) || [],
|
|
129
|
-
required_approval_count: e.usersFromListCount ? typeof e.usersFromListCount == "number" ? e.usersFromListCount : parseInt(e.usersFromListCount) : 0
|
|
130
|
-
}
|
|
131
|
-
}] : [],
|
|
132
|
-
...e.rules.roles_from_list && e.rules.roles_from_list?.length > 0 ? [{
|
|
133
|
-
call: "ApprovalRequests.request_approval_by_roles",
|
|
134
|
-
params: {
|
|
135
|
-
role_ids: e.rules.roles_from_list.map((e) => e.id) || [],
|
|
136
|
-
required_approval_count: e.rolesFromListCount ? typeof e.rolesFromListCount == "number" ? e.rolesFromListCount : parseInt(e.rolesFromListCount) : 0
|
|
137
|
-
}
|
|
138
|
-
}] : [],
|
|
139
|
-
...e.rules.approval_chain && e.rules.approval_chain?.length > 0 ? [{
|
|
140
|
-
run_concurrently: !1,
|
|
141
|
-
all: [...e.rules.approval_chain.map((e) => ({
|
|
142
|
-
call: "ApprovalRequests.request_approval_by_users",
|
|
143
|
-
params: {
|
|
144
|
-
user_ids: [e.id],
|
|
145
|
-
required_approval_count: 1
|
|
146
|
-
}
|
|
147
|
-
})) || []]
|
|
148
|
-
}] : []
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
|
-
then: ["{Payables.approve(invoice.id)}"],
|
|
152
|
-
else: ["{Payables.reject(invoice.id)}"]
|
|
153
|
-
}]
|
|
154
|
-
}), y = ({ approvalPolicy: i, setIsEdit: a, onCreated: s, onUpdated: d }) => {
|
|
155
|
-
let { i18n: y } = me(), be = r(), { api: b, queryClient: x } = e(), { formatFromMinorUnits: S, formatToMinorUnits: C } = n(), w = !!i, xe = `Monite-Form-approvalPolicyBuilder-${le()}`, { triggers: T, getTriggerName: E } = ee({ approvalPolicy: i }), { rules: D } = ne({ approvalPolicy: i }), [O, k] = u(!1), [A, j] = u(!1), [M, N] = u(null), [P, F] = u(null), [I, L] = u(null), { data: Se } = b.finops.getApprovalPolicies.useQuery({ query: { object_type: "payable" } }, { enabled: !w }), { data: R } = b.finops.getEntityUsers.useQuery({ query: { id__in: Array.isArray(T?.was_created_by_user_id) ? T.was_created_by_user_id : [] } }, { enabled: !!T?.was_created_by_user_id?.length }), { data: z } = b.finops.getCounterparts.useQuery({ query: { id__in: Array.isArray(T?.counterpart_id) ? T.counterpart_id : [] } }, { enabled: !!T?.counterpart_id?.length }), { data: B } = b.finops.getEntityUsersId.useQuery({ path: { entity_user_id: D?.single_user?.userId ?? "" } }, { enabled: !!D?.single_user?.userId }), { data: V } = b.finops.getEntityUsers.useQuery({ query: { id__in: Array.isArray(D?.users_from_list?.userIds) ? D.users_from_list.userIds : [] } }, { enabled: !!D?.users_from_list?.userIds?.length }), { data: H } = b.finops.getRoles.useQuery({ query: { id__in: Array.isArray(D?.roles_from_list?.roleIds) ? D.roles_from_list.roleIds : [] } }, { enabled: !!D?.roles_from_list?.roleIds?.length }), { data: U } = b.finops.getEntityUsers.useQuery({ query: { id__in: Array.isArray(D?.approval_chain?.chainUserIds) ? D.approval_chain.chainUserIds : [] } }, { enabled: !!D?.approval_chain?.chainUserIds?.length }), Ce = b.finops.postApprovalPolicies.useMutation({}, {
|
|
156
|
-
onSuccess: async (e) => {
|
|
157
|
-
await Promise.all([b.finops.getApprovalPolicies.invalidateQueries(x), b.finops.getApprovalPoliciesId.invalidateQueries({ parameters: { path: { approval_policy_id: e.id } } }, x)]), h.success(y._("Approval policy created"));
|
|
158
|
-
},
|
|
159
|
-
onError: async () => {
|
|
160
|
-
h.error(y._("Error creating approval policy"));
|
|
161
|
-
}
|
|
162
|
-
}), we = b.finops.patchApprovalPoliciesId.useMutation(void 0, {
|
|
163
|
-
onSuccess: async (e) => {
|
|
164
|
-
await Promise.all([b.finops.getApprovalPolicies.invalidateQueries(x), b.finops.getApprovalPoliciesId.invalidateQueries({ parameters: { path: { approval_policy_id: e.id } } }, x)]), h.success(y._("Approval policy updated"));
|
|
165
|
-
},
|
|
166
|
-
onError: async () => {
|
|
167
|
-
h.error(y._("Error updating approval policy"));
|
|
20
|
+
var T = ({ approvalPolicy: T, setIsEdit: E }) => {
|
|
21
|
+
let { i18n: D } = w(), O = n(), { api: k, queryClient: A } = e(), { triggers: j, getTriggerLabel: M, getAmountLabel: N } = r({ approvalPolicy: T }), { rules: P, getRuleLabel: F } = a({ approvalPolicy: T }), { data: I } = k.finops.getCounterparts.useQuery({ query: { id__in: Array.isArray(j?.counterpart_id) ? j.counterpart_id : [] } }, { enabled: !!j?.counterpart_id?.length }), L = k.finops.deleteApprovalPoliciesId.useMutation(void 0, { onSuccess: async () => {
|
|
22
|
+
await Promise.all([k.finops.getApprovalPolicies.invalidateQueries(A), k.finops.getApprovalPoliciesId.invalidateQueries({ parameters: { path: { approval_policy_id: T.id } } }, A)]), f.success(D._("Approval policy has been deleted"));
|
|
23
|
+
} }), R = Object.keys(j).map((e) => {
|
|
24
|
+
let n = M(e), r;
|
|
25
|
+
switch (e) {
|
|
26
|
+
case "was_created_by_user_id":
|
|
27
|
+
Array.isArray(j[e]) && (r = /* @__PURE__ */ u(g, {
|
|
28
|
+
direction: "row",
|
|
29
|
+
gap: 1,
|
|
30
|
+
sx: { flexWrap: "wrap" },
|
|
31
|
+
children: j[e].map((e) => /* @__PURE__ */ u(i, { userId: e }, e))
|
|
32
|
+
}));
|
|
33
|
+
break;
|
|
34
|
+
case "counterpart_id":
|
|
35
|
+
r = /* @__PURE__ */ u(g, {
|
|
36
|
+
direction: "row",
|
|
37
|
+
gap: 1,
|
|
38
|
+
sx: { flexWrap: "wrap" },
|
|
39
|
+
children: I?.data.map((e) => /* @__PURE__ */ u(p, { label: t(e) }, e.id))
|
|
40
|
+
});
|
|
41
|
+
break;
|
|
42
|
+
case "amount":
|
|
43
|
+
r = /* @__PURE__ */ u("p", { children: N(j.amount?.value ?? [], j.amount?.currency ?? "EUR") });
|
|
44
|
+
break;
|
|
45
|
+
default: r = e;
|
|
168
46
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
47
|
+
return {
|
|
48
|
+
label: n,
|
|
49
|
+
value: r
|
|
50
|
+
};
|
|
51
|
+
}), z = P && Object.keys(P)?.map((e) => {
|
|
52
|
+
if (!P[e]) return null;
|
|
53
|
+
switch (e) {
|
|
54
|
+
case "single_user": return {
|
|
55
|
+
label: F(e),
|
|
56
|
+
value: /* @__PURE__ */ u(i, { userId: P[e].userId })
|
|
57
|
+
};
|
|
58
|
+
case "users_from_list": return {
|
|
59
|
+
label: F(e, P[e].count),
|
|
60
|
+
value: /* @__PURE__ */ u(g, {
|
|
61
|
+
direction: "column",
|
|
62
|
+
gap: 1,
|
|
63
|
+
sx: { flexWrap: "wrap" },
|
|
64
|
+
children: P[e].userIds?.map((e) => /* @__PURE__ */ u(i, { userId: e }, e))
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
case "roles_from_list": return {
|
|
68
|
+
label: F(e),
|
|
69
|
+
value: /* @__PURE__ */ u(g, {
|
|
70
|
+
direction: "row",
|
|
71
|
+
gap: 1,
|
|
72
|
+
sx: { flexWrap: "wrap" },
|
|
73
|
+
children: P[e].roleIds?.map((e) => /* @__PURE__ */ u(o, {
|
|
74
|
+
roleId: e,
|
|
75
|
+
quoted: !0
|
|
76
|
+
}, e))
|
|
77
|
+
})
|
|
78
|
+
};
|
|
79
|
+
case "approval_chain": return {
|
|
80
|
+
label: F(e),
|
|
81
|
+
value: /* @__PURE__ */ u(g, {
|
|
82
|
+
direction: "column",
|
|
83
|
+
spacing: .5,
|
|
84
|
+
children: P[e].chainUserIds?.map((e) => e ? /* @__PURE__ */ u(i, { userId: e }, e) : null)
|
|
85
|
+
})
|
|
86
|
+
};
|
|
198
87
|
}
|
|
199
|
-
})
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"amountRangeLeftValue",
|
|
205
|
-
"amountRangeRightValue",
|
|
206
|
-
"amountCurrency",
|
|
207
|
-
"triggerType",
|
|
208
|
-
"scriptType",
|
|
209
|
-
"usersFromListCount",
|
|
210
|
-
"rolesFromListCount"
|
|
211
|
-
]);
|
|
212
|
-
l(() => {
|
|
213
|
-
w && (R?.data && R?.data.length > 0 && G("triggers.was_created_by_user_id", R?.data), (z?.data?.length ?? 0) > 0 && G("triggers.counterpart_id", z?.data.map((e) => ({
|
|
214
|
-
id: e.id,
|
|
215
|
-
label: t(e)
|
|
216
|
-
}))), T.amount && T.amount?.value?.length > 0 && (G("triggers.amount", T.amount), T.amount.value.length === 2 ? (G("amountOperator", "range"), G("amountRangeLeftValue", S(typeof T.amount.value[0][1] == "number" ? T.amount.value[0][1] : parseInt(T.amount.value[0][1]), T.amount.currency) || 0), G("amountRangeRightValue", S(typeof T.amount.value[1][1] == "number" ? T.amount.value[1][1] : parseInt(T.amount.value[1][1]), T.amount.currency) || 0), G("amountCurrency", T.amount.currency)) : (G("amountOperator", T.amount.value[0][0]), G("amountValue", S(typeof T.amount.value[0][1] == "number" ? T.amount.value[0][1] : parseInt(T.amount.value[0][1]), T.amount.currency) || 0), G("amountCurrency", T.amount.currency))), B && G("rules.single_user", B), V?.data && V?.data.length > 0 && (G("rules.users_from_list", V?.data), G("usersFromListCount", D?.users_from_list?.count)), H?.data && H?.data.length > 0 && (G("rules.roles_from_list", H?.data), G("rolesFromListCount", D?.roles_from_list?.count)), U?.data && U?.data.length > 0 && G("rules.approval_chain", U?.data));
|
|
217
|
-
}, [
|
|
218
|
-
R?.data,
|
|
219
|
-
z?.data,
|
|
220
|
-
B,
|
|
221
|
-
V?.data,
|
|
222
|
-
H?.data,
|
|
223
|
-
U?.data,
|
|
224
|
-
w,
|
|
225
|
-
G
|
|
226
|
-
]), l(() => {
|
|
227
|
-
M && G("triggerType", M);
|
|
228
|
-
}, [G, M]), l(() => {
|
|
229
|
-
I && G("scriptType", I);
|
|
230
|
-
}, [G, I]), l(() => {
|
|
231
|
-
J && (J === "range" && X && Z ? G("triggers.amount", {
|
|
232
|
-
currency: Q ?? "USD",
|
|
233
|
-
value: [[">=", C(typeof X == "number" ? X : parseInt(X), Q ?? "USD") || 0], ["<=", C(typeof Z == "number" ? Z : parseInt(Z), Q ?? "USD") || 0]]
|
|
234
|
-
}) : Y && G("triggers.amount", {
|
|
235
|
-
currency: Q ?? "USD",
|
|
236
|
-
value: [[J, C(typeof Y == "number" ? Y : parseInt(Y), Q ?? "USD") || 0]]
|
|
237
|
-
}));
|
|
238
|
-
}, [
|
|
239
|
-
C,
|
|
240
|
-
J,
|
|
241
|
-
X,
|
|
242
|
-
Z,
|
|
243
|
-
Y,
|
|
244
|
-
Q,
|
|
245
|
-
G
|
|
246
|
-
]);
|
|
247
|
-
let Pe = () => {
|
|
248
|
-
!O && M === "was_created_by_user_id" && G("triggers.was_created_by_user_id", P?.triggers?.was_created_by_user_id || []), !O && M === "counterpart_id" && G("triggers.counterpart_id", P?.triggers?.counterpart_id || []), !O && M === "amount" && (G("triggers.amount", P?.triggers?.amount || void 0), G("amountOperator", P?.amountOperator || void 0), G("amountValue", P?.amountValue || void 0), G("amountRangeLeftValue", P?.amountRangeLeftValue || void 0), G("amountRangeRightValue", P?.amountRangeRightValue || void 0), G("amountCurrency", P?.amountCurrency || void 0)), O && P?.triggers && G("triggers", P?.triggers), !A && I === "single_user" && G("rules.single_user", P?.rules?.single_user || void 0), !A && I === "users_from_list" && (G("rules.users_from_list", P?.rules?.users_from_list || void 0), G("usersFromListCount", P?.usersFromListCount || 1)), !A && I === "roles_from_list" && (G("rules.roles_from_list", P?.rules?.roles_from_list || void 0), G("rolesFromListCount", P?.rolesFromListCount || 1)), !A && I === "approval_chain" && G("rules.approval_chain", P?.rules?.approval_chain || void 0), A && P?.rules && G("rules", P?.rules), N(null), L(null), k(!1), j(!1), F(null), G("triggerType", null), G("scriptType", null);
|
|
249
|
-
}, Fe = !!M || !!I || O || A;
|
|
250
|
-
return /* @__PURE__ */ m(f, { children: [
|
|
251
|
-
/* @__PURE__ */ p(ce, {
|
|
252
|
-
secondaryLevel: w || Fe,
|
|
253
|
-
title: M ? y._("Edit Condition") : O ? y._("Add Condition") : I ? y._("Edit Rule") : A ? y._("Add Rule") : w ? y._("Edit Approval Policy") : y._("Create Approval Policy"),
|
|
254
|
-
previousLevelTitle: (() => {
|
|
255
|
-
if (Fe) return w ? y._("Edit Approval Policy") : y._("Create Approval Policy");
|
|
256
|
-
})(),
|
|
257
|
-
closeSecondaryLevelDialog: Pe
|
|
88
|
+
});
|
|
89
|
+
return /* @__PURE__ */ d(l, { children: [
|
|
90
|
+
/* @__PURE__ */ u(c, {
|
|
91
|
+
title: T?.name,
|
|
92
|
+
closeButtonTooltip: D._("Close approval policy details")
|
|
258
93
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
fullWidth: !0,
|
|
283
|
-
required: !0,
|
|
284
|
-
select: !0,
|
|
285
|
-
value: M || void 0,
|
|
286
|
-
disabled: !!M,
|
|
287
|
-
children: [
|
|
288
|
-
(!P?.triggers?.amount || M === "amount") && /* @__PURE__ */ p(_, {
|
|
289
|
-
value: "amount",
|
|
290
|
-
children: E("amount")
|
|
291
|
-
}),
|
|
292
|
-
(!P?.triggers?.counterpart_id || M === "counterpart_id") && /* @__PURE__ */ p(_, {
|
|
293
|
-
value: "counterpart_id",
|
|
294
|
-
children: E("counterpart_id")
|
|
295
|
-
}),
|
|
296
|
-
(!P?.triggers?.was_created_by_user_id || M === "was_created_by_user_id") && /* @__PURE__ */ p(_, {
|
|
297
|
-
value: "was_created_by_user_id",
|
|
298
|
-
children: E("was_created_by_user_id")
|
|
299
|
-
})
|
|
300
|
-
]
|
|
301
|
-
}),
|
|
302
|
-
(I || A) && /* @__PURE__ */ m(c, {
|
|
303
|
-
label: y._("Approval flow"),
|
|
304
|
-
name: "scriptType",
|
|
305
|
-
control: W,
|
|
306
|
-
fullWidth: !0,
|
|
307
|
-
required: !0,
|
|
308
|
-
select: !0,
|
|
309
|
-
value: I,
|
|
310
|
-
disabled: !!I,
|
|
311
|
-
children: [
|
|
312
|
-
(!P?.rules?.single_user || I === "single_user") && /* @__PURE__ */ p(_, {
|
|
313
|
-
value: "single_user",
|
|
314
|
-
children: y._("Single user")
|
|
315
|
-
}),
|
|
316
|
-
(!P?.rules?.users_from_list || I === "users_from_list") && /* @__PURE__ */ p(_, {
|
|
317
|
-
value: "users_from_list",
|
|
318
|
-
children: y._("Users from the list - Any")
|
|
319
|
-
}),
|
|
320
|
-
I === "roles_from_list" && /* @__PURE__ */ p(_, {
|
|
321
|
-
value: "roles_from_list",
|
|
322
|
-
children: y._("Any user that has user role")
|
|
323
|
-
}),
|
|
324
|
-
(!P?.rules?.approval_chain || I === "approval_chain") && /* @__PURE__ */ p(_, {
|
|
325
|
-
value: "approval_chain",
|
|
326
|
-
children: y._("Users from list - One by one")
|
|
327
|
-
})
|
|
328
|
-
]
|
|
329
|
-
}),
|
|
330
|
-
(M === "was_created_by_user_id" || O && je === "was_created_by_user_id") && /* @__PURE__ */ p(o, {
|
|
331
|
-
control: W,
|
|
332
|
-
name: "triggers.was_created_by_user_id",
|
|
333
|
-
label: y._("Users")
|
|
334
|
-
}),
|
|
335
|
-
(M === "amount" || O && je === "amount") && /* @__PURE__ */ m(g, {
|
|
336
|
-
container: !0,
|
|
337
|
-
spacing: 2,
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ p(g, {
|
|
340
|
-
item: !0,
|
|
341
|
-
xs: 4,
|
|
342
|
-
children: /* @__PURE__ */ m(c, {
|
|
343
|
-
label: y._("If amount is"),
|
|
344
|
-
name: "amountOperator",
|
|
345
|
-
control: W,
|
|
346
|
-
select: !0,
|
|
347
|
-
fullWidth: !0,
|
|
348
|
-
children: [
|
|
349
|
-
/* @__PURE__ */ p(_, {
|
|
350
|
-
value: ">",
|
|
351
|
-
children: y._("Greater than")
|
|
352
|
-
}),
|
|
353
|
-
/* @__PURE__ */ p(_, {
|
|
354
|
-
value: "<",
|
|
355
|
-
children: y._("Less than")
|
|
356
|
-
}),
|
|
357
|
-
/* @__PURE__ */ p(_, {
|
|
358
|
-
value: ">=",
|
|
359
|
-
children: y._("Greater than or equal to")
|
|
360
|
-
}),
|
|
361
|
-
/* @__PURE__ */ p(_, {
|
|
362
|
-
value: "<=",
|
|
363
|
-
children: y._("Less than or equal to")
|
|
364
|
-
}),
|
|
365
|
-
/* @__PURE__ */ p(_, {
|
|
366
|
-
value: "==",
|
|
367
|
-
children: y._("Equal to")
|
|
368
|
-
}),
|
|
369
|
-
/* @__PURE__ */ p(_, {
|
|
370
|
-
value: "range",
|
|
371
|
-
children: y._("In range")
|
|
372
|
-
})
|
|
373
|
-
]
|
|
374
|
-
})
|
|
375
|
-
}),
|
|
376
|
-
J === "range" ? /* @__PURE__ */ m(g, {
|
|
377
|
-
item: !0,
|
|
378
|
-
container: !0,
|
|
379
|
-
spacing: 2,
|
|
380
|
-
children: [/* @__PURE__ */ p(g, {
|
|
381
|
-
item: !0,
|
|
382
|
-
xs: 6,
|
|
383
|
-
children: /* @__PURE__ */ p(c, {
|
|
384
|
-
label: y._("From (including)"),
|
|
385
|
-
name: "amountRangeLeftValue",
|
|
386
|
-
control: W,
|
|
387
|
-
type: "number",
|
|
388
|
-
fullWidth: !0
|
|
389
|
-
})
|
|
390
|
-
}), /* @__PURE__ */ p(g, {
|
|
391
|
-
item: !0,
|
|
392
|
-
xs: 6,
|
|
393
|
-
children: /* @__PURE__ */ p(c, {
|
|
394
|
-
label: y._("To (including)"),
|
|
395
|
-
name: "amountRangeRightValue",
|
|
396
|
-
control: W,
|
|
397
|
-
type: "number",
|
|
398
|
-
fullWidth: !0
|
|
399
|
-
})
|
|
400
|
-
})]
|
|
401
|
-
}) : /* @__PURE__ */ p(g, {
|
|
402
|
-
item: !0,
|
|
403
|
-
xs: 4,
|
|
404
|
-
children: /* @__PURE__ */ p(c, {
|
|
405
|
-
label: y._("Amount"),
|
|
406
|
-
name: "amountValue",
|
|
407
|
-
control: W,
|
|
408
|
-
type: "number",
|
|
409
|
-
fullWidth: !0
|
|
410
|
-
})
|
|
411
|
-
}),
|
|
412
|
-
/* @__PURE__ */ p(g, {
|
|
413
|
-
item: !0,
|
|
414
|
-
xs: 4,
|
|
415
|
-
children: /* @__PURE__ */ p(oe, {
|
|
416
|
-
name: "amountCurrency",
|
|
417
|
-
control: W,
|
|
418
|
-
showCodeOnly: !0
|
|
419
|
-
})
|
|
420
|
-
})
|
|
421
|
-
]
|
|
422
|
-
}),
|
|
423
|
-
(I === "single_user" || A && $ === "single_user") && /* @__PURE__ */ p(f, { children: /* @__PURE__ */ p(ae, {
|
|
424
|
-
control: W,
|
|
425
|
-
name: "rules.single_user",
|
|
426
|
-
label: y._("User allowed to approve")
|
|
427
|
-
}) }),
|
|
428
|
-
(I === "users_from_list" || A && $ === "users_from_list") && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(o, {
|
|
429
|
-
control: W,
|
|
430
|
-
name: "rules.users_from_list",
|
|
431
|
-
label: y._("Users allowed to approve")
|
|
432
|
-
}), /* @__PURE__ */ p(c, {
|
|
433
|
-
control: W,
|
|
434
|
-
label: y._("Minimum number of approvals required"),
|
|
435
|
-
name: "usersFromListCount",
|
|
436
|
-
type: "number",
|
|
437
|
-
required: !0,
|
|
438
|
-
inputProps: {
|
|
439
|
-
min: 1,
|
|
440
|
-
max: q?.users_from_list?.length || void 0
|
|
441
|
-
}
|
|
442
|
-
})] }),
|
|
443
|
-
(I === "roles_from_list" || A && $ === "roles_from_list") && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ie, {
|
|
444
|
-
control: W,
|
|
445
|
-
name: "rules.roles_from_list",
|
|
446
|
-
label: y._("Any user that has user role")
|
|
447
|
-
}), /* @__PURE__ */ p(c, {
|
|
448
|
-
control: W,
|
|
449
|
-
label: y._("Minimum number of approvals required"),
|
|
450
|
-
name: "rolesFromListCount",
|
|
451
|
-
type: "number",
|
|
452
|
-
required: !0,
|
|
453
|
-
inputProps: { min: 1 }
|
|
454
|
-
})] }),
|
|
455
|
-
(I === "approval_chain" || A && $ === "approval_chain") && /* @__PURE__ */ p(o, {
|
|
456
|
-
control: W,
|
|
457
|
-
name: "rules.approval_chain",
|
|
458
|
-
label: y._("Users allowed to approve")
|
|
459
|
-
}),
|
|
460
|
-
!M && !I && !O && !A && /* @__PURE__ */ m(f, { children: [
|
|
461
|
-
/* @__PURE__ */ p(c, {
|
|
462
|
-
label: y._("Policy Name"),
|
|
463
|
-
name: "name",
|
|
464
|
-
control: W,
|
|
465
|
-
fullWidth: !0,
|
|
466
|
-
required: !0
|
|
467
|
-
}),
|
|
468
|
-
/* @__PURE__ */ p(c, {
|
|
469
|
-
label: y._("Description"),
|
|
470
|
-
name: "description",
|
|
471
|
-
control: W,
|
|
472
|
-
fullWidth: !0,
|
|
473
|
-
multiline: !0,
|
|
474
|
-
rows: 4
|
|
475
|
-
}),
|
|
476
|
-
/* @__PURE__ */ m(ue, { children: [
|
|
477
|
-
/* @__PURE__ */ p(v, {
|
|
478
|
-
variant: "h5",
|
|
479
|
-
mt: 4,
|
|
480
|
-
mb: 1,
|
|
481
|
-
children: y._("Conditions")
|
|
482
|
-
}),
|
|
483
|
-
/* @__PURE__ */ p(v, {
|
|
484
|
-
variant: "body1",
|
|
485
|
-
mb: 1,
|
|
486
|
-
children: /* @__PURE__ */ p(pe, {
|
|
487
|
-
id: "INKhSX",
|
|
488
|
-
components: { 0: /* @__PURE__ */ p("strong", {}) }
|
|
489
|
-
})
|
|
490
|
-
}),
|
|
491
|
-
/* @__PURE__ */ p(te, {
|
|
492
|
-
triggers: Ae,
|
|
493
|
-
onAddTrigger: () => {
|
|
494
|
-
k(!0), F({
|
|
495
|
-
triggers: { ...K("triggers") },
|
|
496
|
-
amountOperator: K("amountOperator"),
|
|
497
|
-
amountValue: K("amountValue"),
|
|
498
|
-
amountRangeLeftValue: K("amountRangeLeftValue"),
|
|
499
|
-
amountRangeRightValue: K("amountRangeRightValue"),
|
|
500
|
-
amountCurrency: K("amountCurrency")
|
|
501
|
-
});
|
|
502
|
-
},
|
|
503
|
-
onEditTrigger: (e) => {
|
|
504
|
-
N(e), F({
|
|
505
|
-
triggers: { ...K("triggers") },
|
|
506
|
-
amountOperator: K("amountOperator"),
|
|
507
|
-
amountValue: K("amountValue"),
|
|
508
|
-
amountRangeLeftValue: K("amountRangeLeftValue"),
|
|
509
|
-
amountRangeRightValue: K("amountRangeRightValue"),
|
|
510
|
-
amountCurrency: K("amountCurrency")
|
|
511
|
-
});
|
|
512
|
-
},
|
|
513
|
-
onDeleteTrigger: (e) => {
|
|
514
|
-
let t = { ...Ae };
|
|
515
|
-
delete t[e], G("triggers", t), G("amountOperator", void 0), G("amountValue", void 0), G("amountRangeLeftValue", void 0), G("amountRangeRightValue", void 0), G("amountCurrency", void 0);
|
|
516
|
-
}
|
|
517
|
-
}),
|
|
518
|
-
/* @__PURE__ */ p(v, {
|
|
519
|
-
variant: "h5",
|
|
520
|
-
mt: 4,
|
|
521
|
-
mb: 1,
|
|
522
|
-
children: y._("Approval flow")
|
|
523
|
-
}),
|
|
524
|
-
/* @__PURE__ */ p(re, {
|
|
525
|
-
rules: q,
|
|
526
|
-
usersFromListCount: Me,
|
|
527
|
-
rolesFromListCount: Ne,
|
|
528
|
-
onAddRule: () => {
|
|
529
|
-
j(!0), F({
|
|
530
|
-
rules: { ...K("rules") },
|
|
531
|
-
usersFromListCount: K("usersFromListCount"),
|
|
532
|
-
rolesFromListCount: K("rolesFromListCount")
|
|
533
|
-
});
|
|
534
|
-
},
|
|
535
|
-
onEditRule: (e) => {
|
|
536
|
-
L(e), F({
|
|
537
|
-
rules: { ...K("rules") },
|
|
538
|
-
usersFromListCount: K("usersFromListCount"),
|
|
539
|
-
rolesFromListCount: K("rolesFromListCount")
|
|
540
|
-
});
|
|
541
|
-
},
|
|
542
|
-
onDeleteRule: (e) => {
|
|
543
|
-
let t = { ...q };
|
|
544
|
-
delete t[e], G("rules", t), G("usersFromListCount", void 0), G("rolesFromListCount", void 0);
|
|
545
|
-
}
|
|
546
|
-
})
|
|
547
|
-
] })
|
|
548
|
-
] })
|
|
549
|
-
]
|
|
94
|
+
/* @__PURE__ */ d(m, { children: [
|
|
95
|
+
/* @__PURE__ */ u(S, {
|
|
96
|
+
variant: "h5",
|
|
97
|
+
mt: 2,
|
|
98
|
+
mb: 1,
|
|
99
|
+
children: D._("Description")
|
|
100
|
+
}),
|
|
101
|
+
T?.description && /* @__PURE__ */ u(S, {
|
|
102
|
+
variant: "body1",
|
|
103
|
+
children: T.description
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ u(S, {
|
|
106
|
+
variant: "h5",
|
|
107
|
+
mt: 4,
|
|
108
|
+
mb: 1,
|
|
109
|
+
children: D._("Conditions")
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ u(S, {
|
|
112
|
+
variant: "body1",
|
|
113
|
+
mb: 1,
|
|
114
|
+
children: /* @__PURE__ */ u(C, {
|
|
115
|
+
id: "INKhSX",
|
|
116
|
+
components: { 0: /* @__PURE__ */ u("strong", {}) }
|
|
550
117
|
})
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ u(h, {
|
|
120
|
+
variant: "outlined",
|
|
121
|
+
children: /* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(b, { children: /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(y, { children: D._("Condition") }), /* @__PURE__ */ u(y, { children: D._("Criteria") })] }) }), /* @__PURE__ */ u(v, { children: R.length > 0 ? R.map((e) => /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(y, { children: e.label }), /* @__PURE__ */ u(y, { children: e.value })] }, e.label)) : /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(y, {
|
|
122
|
+
colSpan: 2,
|
|
123
|
+
children: D._("No conditions")
|
|
124
|
+
}) }) })] })
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ u(S, {
|
|
127
|
+
variant: "h5",
|
|
128
|
+
mt: 4,
|
|
129
|
+
mb: 1,
|
|
130
|
+
children: D._("Approval flow")
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ u(S, {
|
|
133
|
+
variant: "body1",
|
|
134
|
+
mb: 1,
|
|
135
|
+
children: D._("Who needs to approve the document and how:")
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ u(h, {
|
|
138
|
+
variant: "outlined",
|
|
139
|
+
children: /* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(b, { children: /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(y, { children: D._("Approval type") }), /* @__PURE__ */ u(y, { children: D._("Users or Roles") })] }) }), /* @__PURE__ */ u(v, { children: z && z.length > 0 ? z.map((e) => /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(y, { children: e?.label }), /* @__PURE__ */ u(y, { children: e?.value })] }, e?.label)) : /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(y, {
|
|
140
|
+
colSpan: 2,
|
|
141
|
+
children: D._("No rules")
|
|
142
|
+
}) }) })] })
|
|
551
143
|
})
|
|
552
|
-
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
primaryButton:
|
|
555
|
-
label:
|
|
556
|
-
onClick: (
|
|
557
|
-
e?.preventDefault(), N(null), L(null), k(!1), j(!1), G("triggerType", null), G("scriptType", null);
|
|
558
|
-
}
|
|
559
|
-
} : {
|
|
560
|
-
label: y._("Save"),
|
|
561
|
-
formId: xe,
|
|
562
|
-
isLoading: we.isPending || Ce.isPending
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ u(s, {
|
|
146
|
+
primaryButton: {
|
|
147
|
+
label: D._("Edit"),
|
|
148
|
+
onClick: () => E(!0)
|
|
563
149
|
},
|
|
564
|
-
|
|
150
|
+
deleteButton: {
|
|
151
|
+
onClick: () => {
|
|
152
|
+
L.mutate({ path: { approval_policy_id: T.id } }, { onSuccess: () => O?.onClose?.() });
|
|
153
|
+
},
|
|
154
|
+
isLoading: L.isPending
|
|
155
|
+
}
|
|
565
156
|
})
|
|
566
157
|
] });
|
|
567
158
|
};
|
|
568
159
|
//#endregion
|
|
569
|
-
export {
|
|
160
|
+
export { T as ApprovalPolicyView };
|