@kong/kongponents 9.49.10-pr.3057.fc5d26a.0 → 9.50.1-pr.3076.f01c8af.0
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/kongponents.es105.js +3 -3
- package/dist/kongponents.es107.js +3 -3
- package/dist/kongponents.es109.js +3 -3
- package/dist/kongponents.es115.js +3 -3
- package/dist/kongponents.es117.js +1 -1
- package/dist/kongponents.es119.js +8 -8
- package/dist/kongponents.es122.js +5 -5
- package/dist/kongponents.es124.js +5 -5
- package/dist/kongponents.es130.js +1 -1
- package/dist/kongponents.es132.js +8 -8
- package/dist/kongponents.es139.js +2 -2
- package/dist/kongponents.es141.js +1 -1
- package/dist/kongponents.es143.js +4 -4
- package/dist/kongponents.es147.js +2 -2
- package/dist/kongponents.es149.js +2 -2
- package/dist/kongponents.es154.js +2 -2
- package/dist/kongponents.es156.js +4 -4
- package/dist/kongponents.es158.js +2 -2
- package/dist/kongponents.es160.js +10 -10
- package/dist/kongponents.es171.js +1 -1
- package/dist/kongponents.es172.js +1 -1
- package/dist/kongponents.es173.js +1 -1
- package/dist/kongponents.es174.js +1 -1
- package/dist/kongponents.es175.js +1 -1
- package/dist/kongponents.es176.js +1 -1
- package/dist/kongponents.es178.js +102 -108
- package/dist/kongponents.es179.js +162 -115
- package/dist/kongponents.es180.js +5 -119
- package/dist/kongponents.es181.js +119 -5
- package/dist/kongponents.es182.js +113 -96
- package/dist/kongponents.es183.js +105 -163
- package/dist/kongponents.es184.js +5 -119
- package/dist/kongponents.es185.js +19 -19
- package/dist/kongponents.es186.js +115 -313
- package/dist/kongponents.es187.js +118 -38
- package/dist/kongponents.es188.js +19 -93
- package/dist/kongponents.es189.js +313 -115
- package/dist/kongponents.es190.js +38 -118
- package/dist/kongponents.es191.js +97 -118
- package/dist/kongponents.es192.js +18 -18
- package/dist/kongponents.es193.js +22 -23
- package/dist/kongponents.es194.js +15 -15
- package/dist/kongponents.es195.js +16 -16
- package/dist/kongponents.es196.js +120 -18
- package/dist/kongponents.es197.js +117 -50
- package/dist/kongponents.es198.js +22 -22
- package/dist/kongponents.es199.js +20 -0
- package/dist/kongponents.es20.js +7 -7
- package/dist/kongponents.es200.js +50 -117
- package/dist/kongponents.es201.js +119 -5
- package/dist/kongponents.es202.js +119 -8
- package/dist/kongponents.es203.js +118 -59
- package/dist/kongponents.es204.js +119 -5
- package/dist/kongponents.es205.js +119 -5
- package/dist/kongponents.es206.js +4 -4
- package/dist/kongponents.es207.js +5 -119
- package/dist/kongponents.es208.js +5 -119
- package/dist/kongponents.es209.js +5 -119
- package/dist/kongponents.es210.js +5 -24
- package/dist/kongponents.es211.js +5 -114
- package/dist/kongponents.es212.js +5 -17
- package/dist/kongponents.es213.js +5 -396
- package/dist/kongponents.es214.js +4 -4
- package/dist/kongponents.es215.js +4 -4
- package/dist/kongponents.es216.js +2 -2
- package/dist/kongponents.es217.js +6 -4
- package/dist/kongponents.es218.js +5 -5
- package/dist/kongponents.es219.js +189 -5
- package/dist/kongponents.es22.js +2 -2
- package/dist/kongponents.es220.js +5 -119
- package/dist/kongponents.es221.js +114 -5
- package/dist/kongponents.es222.js +17 -5
- package/dist/kongponents.es223.js +396 -5
- package/dist/kongponents.es224.js +36 -36
- package/dist/kongponents.es225.js +119 -7
- package/dist/kongponents.es227.js +119 -15
- package/dist/kongponents.es228.js +5 -119
- package/dist/kongponents.es229.js +8 -5
- package/dist/kongponents.es230.js +60 -5
- package/dist/kongponents.es231.js +15 -15
- package/dist/kongponents.es232.js +29 -29
- package/dist/kongponents.es233.js +5 -119
- package/dist/kongponents.es234.js +10 -119
- package/dist/kongponents.es235.js +22 -22
- package/dist/kongponents.es236.js +15 -119
- package/dist/kongponents.es237.js +119 -5
- package/dist/kongponents.es238.js +119 -10
- package/dist/kongponents.es240.js +1 -1
- package/dist/kongponents.es242.js +56 -6
- package/dist/kongponents.es244.js +5 -319
- package/dist/kongponents.es245.js +40 -184
- package/dist/kongponents.es246.js +322 -0
- package/dist/kongponents.es249.js +2 -48
- package/dist/kongponents.es252.js +50 -0
- package/dist/{kongponents.es255.js → kongponents.es258.js} +1 -1
- package/dist/kongponents.es26.js +4 -4
- package/dist/kongponents.es262.js +186 -0
- package/dist/kongponents.es264.js +52 -2
- package/dist/kongponents.es266.js +2 -5
- package/dist/kongponents.es267.js +118 -19
- package/dist/kongponents.es268.js +119 -4
- package/dist/kongponents.es269.js +119 -5
- package/dist/kongponents.es270.js +217 -6
- package/dist/kongponents.es271.js +89 -9
- package/dist/kongponents.es273.js +45 -4
- package/dist/kongponents.es275.js +180 -4
- package/dist/kongponents.es277.js +85 -7
- package/dist/kongponents.es279.js +41 -2
- package/dist/kongponents.es28.js +2 -2
- package/dist/kongponents.es281.js +4 -9
- package/dist/kongponents.es282.js +5 -5
- package/dist/kongponents.es283.js +20 -4
- package/dist/kongponents.es284.js +4 -3
- package/dist/kongponents.es285.js +4 -3
- package/dist/kongponents.es286.js +5 -7
- package/dist/kongponents.es287.js +8 -6
- package/dist/kongponents.es288.js +6 -5
- package/dist/kongponents.es289.js +3 -9
- package/dist/kongponents.es290.js +16 -5
- package/dist/kongponents.es291.js +4 -9
- package/dist/kongponents.es292.js +7 -6
- package/dist/kongponents.es293.js +6 -17
- package/dist/kongponents.es294.js +3 -11
- package/dist/kongponents.es295.js +2 -7
- package/dist/kongponents.es296.js +5 -12
- package/dist/kongponents.es297.js +9 -9
- package/dist/kongponents.es298.js +4 -5
- package/dist/kongponents.es299.js +4 -9
- package/dist/kongponents.es300.js +3 -16
- package/dist/kongponents.es301.js +2 -16
- package/dist/kongponents.es302.js +7 -5
- package/dist/kongponents.es303.js +6 -10
- package/dist/kongponents.es304.js +4 -6
- package/dist/kongponents.es305.js +9 -7
- package/dist/kongponents.es306.js +4 -4
- package/dist/kongponents.es307.js +9 -7
- package/dist/kongponents.es308.js +6 -9
- package/dist/kongponents.es309.js +17 -7
- package/dist/kongponents.es310.js +11 -3
- package/dist/kongponents.es311.js +5 -4
- package/dist/kongponents.es312.js +12 -15
- package/dist/kongponents.es313.js +10 -2
- package/dist/kongponents.es314.js +6 -119
- package/dist/kongponents.es315.js +9 -119
- package/dist/kongponents.es316.js +16 -119
- package/dist/kongponents.es317.js +17 -216
- package/dist/kongponents.es318.js +6 -89
- package/dist/kongponents.es319.js +13 -0
- package/dist/kongponents.es320.js +7 -45
- package/dist/kongponents.es321.js +10 -0
- package/dist/kongponents.es322.js +8 -0
- package/dist/kongponents.es323.js +6 -8
- package/dist/kongponents.es324.js +9 -6
- package/dist/kongponents.es325.js +7 -7
- package/dist/kongponents.es326.js +3 -4
- package/dist/kongponents.es327.js +5 -9
- package/dist/kongponents.es328.js +15 -8
- package/dist/kongponents.es329.js +63 -636
- package/dist/kongponents.es331.js +369 -4
- package/dist/kongponents.es332.js +129 -19
- package/dist/kongponents.es333.js +8 -4
- package/dist/kongponents.es334.js +7 -18
- package/dist/kongponents.es335.js +7 -7
- package/dist/kongponents.es336.js +3 -4
- package/dist/kongponents.es337.js +9 -8
- package/dist/kongponents.es338.js +8 -7
- package/dist/kongponents.es339.js +636 -4
- package/dist/kongponents.es340.js +73 -20
- package/dist/kongponents.es341.js +5 -5
- package/dist/kongponents.es342.js +17 -108
- package/dist/kongponents.es343.js +4 -171
- package/dist/kongponents.es344.js +18 -5
- package/dist/kongponents.es345.js +7 -6
- package/dist/kongponents.es346.js +6 -5
- package/dist/kongponents.es347.js +9 -5
- package/dist/kongponents.es348.js +7 -69
- package/dist/kongponents.es349.js +5 -2
- package/dist/kongponents.es350.js +20 -179
- package/dist/kongponents.es351.js +7 -0
- package/dist/kongponents.es352.js +109 -83
- package/dist/kongponents.es353.js +174 -0
- package/dist/kongponents.es354.js +5 -41
- package/dist/kongponents.es355.js +9 -0
- package/dist/kongponents.es356.js +5 -370
- package/dist/kongponents.es357.js +5 -130
- package/dist/kongponents.es358.js +45 -5749
- package/dist/kongponents.es359.js +2 -6
- package/dist/kongponents.es360.js +1554 -61
- package/dist/kongponents.es361.js +7 -0
- package/dist/kongponents.es362.js +2 -8
- package/dist/kongponents.es363.js +5773 -5
- package/dist/kongponents.es364.js +6 -9
- package/dist/kongponents.es365.js +95 -6
- package/dist/kongponents.es367.js +25 -15
- package/dist/kongponents.es368.js +8 -3
- package/dist/kongponents.es369.js +5 -7
- package/dist/kongponents.es370.js +9 -3
- package/dist/kongponents.es371.js +7 -8
- package/dist/kongponents.es372.js +14 -7
- package/dist/kongponents.es373.js +5 -5
- package/dist/kongponents.es374.js +3 -2
- package/dist/kongponents.es375.js +6 -11
- package/dist/kongponents.es376.js +2 -4
- package/dist/kongponents.es377.js +11 -3
- package/dist/kongponents.es378.js +8 -26
- package/dist/kongponents.es379.js +6 -4
- package/dist/kongponents.es380.js +2 -4
- package/dist/kongponents.es381.js +13 -4
- package/dist/kongponents.es382.js +5 -4
- package/dist/kongponents.es383.js +3 -4
- package/dist/kongponents.es384.js +25 -14
- package/dist/kongponents.es385.js +4 -6
- package/dist/kongponents.es386.js +4 -30
- package/dist/kongponents.es387.js +4 -27
- package/dist/kongponents.es388.js +4 -16
- package/dist/kongponents.es389.js +4 -10
- package/dist/kongponents.es390.js +14 -4
- package/dist/kongponents.es391.js +5 -13
- package/dist/kongponents.es392.js +29 -8
- package/dist/kongponents.es393.js +27 -3
- package/dist/kongponents.es394.js +15 -5
- package/dist/kongponents.es395.js +9 -5
- package/dist/kongponents.es396.js +4 -7
- package/dist/kongponents.es397.js +13 -5
- package/dist/kongponents.es398.js +8 -10
- package/dist/kongponents.es399.js +3 -6
- package/dist/kongponents.es400.js +5 -4
- package/dist/kongponents.es401.js +5 -4
- package/dist/kongponents.es402.js +7 -5
- package/dist/kongponents.es403.js +6 -8
- package/dist/kongponents.es404.js +10 -6
- package/dist/kongponents.es405.js +6 -10
- package/dist/kongponents.es406.js +4 -6
- package/dist/kongponents.es407.js +4 -21
- package/dist/kongponents.es408.js +5 -6
- package/dist/kongponents.es409.js +8 -7
- package/dist/kongponents.es410.js +6 -6
- package/dist/kongponents.es411.js +10 -9
- package/dist/kongponents.es412.js +7 -2
- package/dist/kongponents.es413.js +22 -25
- package/dist/kongponents.es414.js +6 -10
- package/dist/kongponents.es415.js +6 -10
- package/dist/kongponents.es416.js +6 -12
- package/dist/kongponents.es417.js +8 -10
- package/dist/kongponents.es418.js +10 -18
- package/dist/kongponents.es419.js +10 -5
- package/dist/kongponents.es420.js +13 -55
- package/dist/kongponents.es421.js +11 -2
- package/dist/kongponents.es422.js +18 -1556
- package/dist/kongponents.es423.js +6 -5
- package/dist/kongponents.es424.js +53 -93
- package/dist/kongponents.es425.js +4 -0
- package/dist/kongponents.es426.js +15 -69
- package/dist/kongponents.es427.js +2 -2
- package/dist/kongponents.es429.js +11 -16
- package/dist/kongponents.es430.js +69 -19
- package/dist/kongponents.es431.js +2 -21
- package/dist/kongponents.es432.js +20 -647
- package/dist/kongponents.es433.js +20 -82
- package/dist/kongponents.es434.js +17 -11
- package/dist/kongponents.es435.js +649 -26
- package/dist/kongponents.es436.js +82 -15
- package/dist/kongponents.es437.js +12 -12
- package/dist/kongponents.es438.js +22 -12
- package/dist/kongponents.es439.js +14 -12
- package/dist/kongponents.es440.js +14 -23
- package/dist/kongponents.es441.js +16 -17
- package/dist/kongponents.es442.js +15 -2
- package/dist/kongponents.es443.js +23 -17
- package/dist/kongponents.es450.js +2 -2
- package/dist/kongponents.es451.js +5 -5
- package/dist/kongponents.es456.js +2 -2
- package/dist/kongponents.es457.js +2 -2
- package/dist/kongponents.es458.js +2 -2
- package/dist/kongponents.es459.js +1 -1
- package/dist/kongponents.es463.js +1 -1
- package/dist/kongponents.es464.js +5 -5
- package/dist/kongponents.es466.js +1 -1
- package/dist/kongponents.es467.js +5 -5
- package/dist/kongponents.es468.js +1 -1
- package/dist/kongponents.es469.js +2 -2
- package/dist/kongponents.es470.js +2 -2
- package/dist/kongponents.es471.js +4 -4
- package/dist/kongponents.es472.js +4 -4
- package/dist/kongponents.es479.js +2 -2
- package/dist/kongponents.es480.js +2 -19
- package/dist/kongponents.es481.js +19 -2
- package/dist/kongponents.es482.js +2 -22
- package/dist/kongponents.es483.js +22 -2
- package/dist/kongponents.es484.js +2 -16
- package/dist/kongponents.es485.js +16 -2
- package/dist/kongponents.es486.js +2 -23
- package/dist/kongponents.es487.js +18 -18
- package/dist/kongponents.es488.js +18 -21
- package/dist/kongponents.es489.js +21 -18
- package/dist/kongponents.es490.js +20 -29
- package/dist/kongponents.es491.js +29 -13
- package/dist/kongponents.es492.js +14 -65
- package/dist/kongponents.es493.js +67 -2
- package/dist/kongponents.es494.js +2 -2
- package/dist/kongponents.es495.js +2 -2
- package/dist/kongponents.es496.js +2 -2
- package/dist/kongponents.es497.js +2 -2
- package/dist/kongponents.es498.js +2 -30
- package/dist/kongponents.es499.js +30 -2
- package/dist/kongponents.es501.js +29 -4
- package/dist/kongponents.es502.js +119 -9
- package/dist/kongponents.es503.js +29 -5
- package/dist/kongponents.es504.js +8 -2
- package/dist/kongponents.es505.js +13 -5
- package/dist/kongponents.es506.js +32 -3
- package/dist/kongponents.es507.js +29 -3
- package/dist/kongponents.es508.js +10 -4
- package/dist/kongponents.es509.js +12 -4
- package/dist/kongponents.es510.js +17 -10
- package/dist/kongponents.es511.js +23 -6
- package/dist/kongponents.es512.js +16 -6
- package/dist/kongponents.es513.js +96 -4
- package/dist/kongponents.es514.js +45 -29
- package/dist/kongponents.es515.js +27 -118
- package/dist/kongponents.es516.js +70 -28
- package/dist/kongponents.es517.js +50 -9
- package/dist/kongponents.es518.js +34 -13
- package/dist/kongponents.es519.js +38 -29
- package/dist/kongponents.es520.js +3 -28
- package/dist/kongponents.es521.js +3 -10
- package/dist/kongponents.es522.js +9 -12
- package/dist/kongponents.es523.js +5 -17
- package/dist/kongponents.es524.js +4 -23
- package/dist/kongponents.es525.js +5 -16
- package/dist/kongponents.es526.js +3 -97
- package/dist/kongponents.es527.js +4 -44
- package/dist/kongponents.es528.js +4 -28
- package/dist/kongponents.es529.js +9 -70
- package/dist/kongponents.es530.js +6 -51
- package/dist/kongponents.es531.js +6 -34
- package/dist/kongponents.es532.js +4 -41
- package/dist/kongponents.es542.js +2 -2
- package/dist/kongponents.es543.js +2 -2
- package/dist/kongponents.es546.js +4 -4
- package/dist/kongponents.es547.js +4 -4
- package/dist/kongponents.es557.js +2 -6
- package/dist/kongponents.es558.js +4 -3
- package/dist/kongponents.es559.js +15 -3
- package/dist/kongponents.es560.js +3 -3
- package/dist/kongponents.es561.js +9 -15
- package/dist/kongponents.es562.js +4 -3
- package/dist/kongponents.es563.js +5 -9
- package/dist/kongponents.es564.js +9 -4
- package/dist/kongponents.es565.js +7 -5
- package/dist/kongponents.es566.js +4 -9
- package/dist/kongponents.es567.js +3 -7
- package/dist/kongponents.es568.js +4 -5
- package/dist/kongponents.es569.js +11 -3
- package/dist/kongponents.es570.js +10 -4
- package/dist/kongponents.es571.js +30 -11
- package/dist/kongponents.es572.js +23 -8
- package/dist/kongponents.es573.js +50 -29
- package/dist/kongponents.es574.js +3 -24
- package/dist/kongponents.es575.js +8 -51
- package/dist/kongponents.es576.js +20 -3
- package/dist/kongponents.es577.js +7 -8
- package/dist/kongponents.es578.js +6 -20
- package/dist/kongponents.es579.js +5 -7
- package/dist/kongponents.es580.js +7 -6
- package/dist/kongponents.es581.js +15 -5
- package/dist/kongponents.es582.js +4 -7
- package/dist/kongponents.es583.js +6 -15
- package/dist/kongponents.es584.js +34 -4
- package/dist/kongponents.es585.js +8 -6
- package/dist/kongponents.es586.js +7 -34
- package/dist/kongponents.es587.js +3 -9
- package/dist/kongponents.es597.js +1 -1
- package/dist/kongponents.es599.js +1 -1
- package/dist/kongponents.es600.js +1 -1
- package/dist/kongponents.es601.js +1 -1
- package/dist/kongponents.es602.js +1 -1
- package/dist/kongponents.es604.js +3 -3
- package/dist/kongponents.es605.js +4 -4
- package/dist/kongponents.es607.js +2 -2
- package/dist/kongponents.es608.js +2 -2
- package/dist/kongponents.es609.js +2 -2
- package/dist/kongponents.es75.js +1 -1
- package/dist/kongponents.es77.js +1 -1
- package/dist/kongponents.es83.js +1 -1
- package/dist/kongponents.es87.js +2 -2
- package/dist/kongponents.es89.js +13 -13
- package/dist/kongponents.es94.js +1 -1
- package/dist/kongponents.es96.js +5 -5
- package/dist/kongponents.es99.js +1 -1
- package/dist/kongponents.umd.js +1 -1
- package/dist/kongponents105.cjs +1 -1
- package/dist/kongponents107.cjs +1 -1
- package/dist/kongponents109.cjs +1 -1
- package/dist/kongponents115.cjs +1 -1
- package/dist/kongponents117.cjs +1 -1
- package/dist/kongponents119.cjs +1 -1
- package/dist/kongponents122.cjs +1 -1
- package/dist/kongponents124.cjs +1 -1
- package/dist/kongponents130.cjs +1 -1
- package/dist/kongponents132.cjs +1 -1
- package/dist/kongponents139.cjs +1 -1
- package/dist/kongponents141.cjs +1 -1
- package/dist/kongponents143.cjs +1 -1
- package/dist/kongponents147.cjs +1 -1
- package/dist/kongponents149.cjs +1 -1
- package/dist/kongponents154.cjs +1 -1
- package/dist/kongponents156.cjs +1 -1
- package/dist/kongponents158.cjs +1 -1
- package/dist/kongponents160.cjs +1 -1
- package/dist/kongponents171.cjs +1 -1
- package/dist/kongponents172.cjs +1 -1
- package/dist/kongponents173.cjs +1 -1
- package/dist/kongponents174.cjs +1 -1
- package/dist/kongponents175.cjs +1 -1
- package/dist/kongponents176.cjs +1 -1
- package/dist/kongponents178.cjs +5 -1
- package/dist/kongponents179.cjs +1 -1
- package/dist/kongponents180.cjs +1 -1
- package/dist/kongponents181.cjs +1 -1
- package/dist/kongponents182.cjs +1 -5
- package/dist/kongponents183.cjs +1 -1
- package/dist/kongponents184.cjs +1 -1
- package/dist/kongponents185.cjs +1 -1
- package/dist/kongponents186.cjs +1 -1
- package/dist/kongponents187.cjs +1 -1
- package/dist/kongponents188.cjs +1 -2
- package/dist/kongponents189.cjs +1 -1
- package/dist/kongponents190.cjs +1 -1
- package/dist/kongponents191.cjs +2 -1
- package/dist/kongponents192.cjs +1 -1
- package/dist/kongponents193.cjs +1 -2
- package/dist/kongponents194.cjs +1 -1
- package/dist/kongponents195.cjs +1 -1
- package/dist/kongponents196.cjs +2 -1
- package/dist/kongponents197.cjs +1 -1
- package/dist/kongponents198.cjs +1 -1
- package/dist/kongponents199.cjs +1 -0
- package/dist/kongponents20.cjs +1 -1
- package/dist/kongponents200.cjs +1 -1
- package/dist/kongponents201.cjs +1 -1
- package/dist/kongponents202.cjs +1 -1
- package/dist/kongponents203.cjs +1 -1
- package/dist/kongponents204.cjs +1 -1
- package/dist/kongponents205.cjs +1 -1
- package/dist/kongponents206.cjs +1 -1
- package/dist/kongponents207.cjs +1 -1
- package/dist/kongponents208.cjs +1 -1
- package/dist/kongponents209.cjs +1 -1
- package/dist/kongponents210.cjs +1 -1
- package/dist/kongponents211.cjs +1 -1
- package/dist/kongponents212.cjs +1 -1
- package/dist/kongponents213.cjs +1 -1
- package/dist/kongponents214.cjs +1 -1
- package/dist/kongponents215.cjs +1 -1
- package/dist/kongponents216.cjs +1 -1
- package/dist/kongponents217.cjs +1 -1
- package/dist/kongponents218.cjs +1 -1
- package/dist/kongponents219.cjs +1 -1
- package/dist/kongponents22.cjs +1 -1
- package/dist/kongponents220.cjs +1 -1
- package/dist/kongponents221.cjs +1 -1
- package/dist/kongponents222.cjs +1 -1
- package/dist/kongponents223.cjs +1 -1
- package/dist/kongponents224.cjs +1 -1
- package/dist/kongponents225.cjs +1 -1
- package/dist/kongponents227.cjs +1 -1
- package/dist/kongponents228.cjs +1 -1
- package/dist/kongponents229.cjs +1 -1
- package/dist/kongponents230.cjs +1 -1
- package/dist/kongponents231.cjs +1 -1
- package/dist/kongponents232.cjs +1 -1
- package/dist/kongponents233.cjs +1 -1
- package/dist/kongponents234.cjs +1 -1
- package/dist/kongponents235.cjs +1 -1
- package/dist/kongponents236.cjs +1 -1
- package/dist/kongponents237.cjs +1 -1
- package/dist/kongponents238.cjs +1 -1
- package/dist/kongponents240.cjs +1 -1
- package/dist/kongponents242.cjs +1 -1
- package/dist/kongponents244.cjs +1 -1
- package/dist/kongponents245.cjs +1 -1
- package/dist/kongponents246.cjs +1 -0
- package/dist/kongponents249.cjs +1 -1
- package/dist/kongponents252.cjs +1 -0
- package/dist/{kongponents255.cjs → kongponents258.cjs} +1 -1
- package/dist/kongponents26.cjs +1 -1
- package/dist/kongponents262.cjs +1 -0
- package/dist/kongponents264.cjs +1 -1
- package/dist/kongponents266.cjs +1 -1
- package/dist/kongponents267.cjs +1 -1
- package/dist/kongponents268.cjs +1 -1
- package/dist/kongponents269.cjs +1 -1
- package/dist/kongponents270.cjs +4 -1
- package/dist/kongponents271.cjs +1 -1
- package/dist/kongponents273.cjs +1 -1
- package/dist/kongponents275.cjs +1 -1
- package/dist/kongponents277.cjs +1 -1
- package/dist/kongponents279.cjs +1 -1
- package/dist/kongponents28.cjs +1 -1
- package/dist/kongponents281.cjs +1 -1
- package/dist/kongponents282.cjs +1 -1
- package/dist/kongponents283.cjs +1 -1
- package/dist/kongponents284.cjs +1 -1
- package/dist/kongponents285.cjs +1 -1
- package/dist/kongponents286.cjs +1 -1
- package/dist/kongponents287.cjs +1 -1
- package/dist/kongponents288.cjs +1 -1
- package/dist/kongponents289.cjs +1 -1
- package/dist/kongponents290.cjs +1 -1
- package/dist/kongponents291.cjs +1 -1
- package/dist/kongponents292.cjs +1 -1
- package/dist/kongponents293.cjs +1 -1
- package/dist/kongponents294.cjs +1 -1
- package/dist/kongponents295.cjs +1 -1
- package/dist/kongponents296.cjs +1 -1
- package/dist/kongponents297.cjs +1 -1
- package/dist/kongponents298.cjs +1 -1
- package/dist/kongponents299.cjs +1 -1
- package/dist/kongponents300.cjs +1 -1
- package/dist/kongponents301.cjs +1 -1
- package/dist/kongponents302.cjs +1 -1
- package/dist/kongponents303.cjs +1 -1
- package/dist/kongponents304.cjs +1 -1
- package/dist/kongponents305.cjs +1 -1
- package/dist/kongponents306.cjs +1 -1
- package/dist/kongponents307.cjs +1 -1
- package/dist/kongponents308.cjs +1 -1
- package/dist/kongponents309.cjs +1 -1
- package/dist/kongponents310.cjs +1 -1
- package/dist/kongponents311.cjs +1 -1
- package/dist/kongponents312.cjs +1 -1
- package/dist/kongponents313.cjs +1 -1
- package/dist/kongponents314.cjs +1 -1
- package/dist/kongponents315.cjs +1 -1
- package/dist/kongponents316.cjs +1 -1
- package/dist/kongponents317.cjs +1 -4
- package/dist/kongponents318.cjs +1 -1
- package/dist/kongponents319.cjs +1 -0
- package/dist/kongponents320.cjs +1 -1
- package/dist/kongponents321.cjs +1 -0
- package/dist/kongponents322.cjs +1 -0
- package/dist/kongponents323.cjs +1 -1
- package/dist/kongponents324.cjs +1 -1
- package/dist/kongponents325.cjs +1 -1
- package/dist/kongponents326.cjs +1 -1
- package/dist/kongponents327.cjs +1 -1
- package/dist/kongponents328.cjs +1 -1
- package/dist/kongponents329.cjs +1 -1
- package/dist/kongponents331.cjs +1 -1
- package/dist/kongponents332.cjs +1 -1
- package/dist/kongponents333.cjs +1 -1
- package/dist/kongponents334.cjs +1 -1
- package/dist/kongponents335.cjs +1 -1
- package/dist/kongponents336.cjs +1 -1
- package/dist/kongponents337.cjs +1 -1
- package/dist/kongponents338.cjs +1 -1
- package/dist/kongponents339.cjs +1 -1
- package/dist/kongponents340.cjs +1 -1
- package/dist/kongponents341.cjs +1 -1
- package/dist/kongponents342.cjs +1 -1
- package/dist/kongponents343.cjs +1 -1
- package/dist/kongponents344.cjs +1 -1
- package/dist/kongponents345.cjs +1 -1
- package/dist/kongponents346.cjs +1 -1
- package/dist/kongponents347.cjs +1 -1
- package/dist/kongponents348.cjs +1 -1
- package/dist/kongponents349.cjs +1 -1
- package/dist/kongponents350.cjs +1 -1
- package/dist/kongponents351.cjs +1 -0
- package/dist/kongponents352.cjs +1 -1
- package/dist/kongponents353.cjs +1 -0
- package/dist/kongponents354.cjs +1 -1
- package/dist/kongponents355.cjs +1 -0
- package/dist/kongponents356.cjs +1 -1
- package/dist/kongponents357.cjs +1 -1
- package/dist/kongponents358.cjs +1 -1
- package/dist/kongponents359.cjs +1 -1
- package/dist/kongponents360.cjs +10 -1
- package/dist/kongponents361.cjs +1 -0
- package/dist/kongponents362.cjs +1 -1
- package/dist/kongponents363.cjs +1 -1
- package/dist/kongponents364.cjs +1 -1
- package/dist/kongponents365.cjs +1 -1
- package/dist/kongponents367.cjs +1 -1
- package/dist/kongponents368.cjs +1 -1
- package/dist/kongponents369.cjs +1 -1
- package/dist/kongponents370.cjs +1 -1
- package/dist/kongponents371.cjs +1 -1
- package/dist/kongponents372.cjs +1 -1
- package/dist/kongponents373.cjs +1 -1
- package/dist/kongponents374.cjs +1 -1
- package/dist/kongponents375.cjs +1 -1
- package/dist/kongponents376.cjs +1 -1
- package/dist/kongponents377.cjs +1 -1
- package/dist/kongponents378.cjs +1 -1
- package/dist/kongponents379.cjs +1 -1
- package/dist/kongponents380.cjs +1 -1
- package/dist/kongponents381.cjs +1 -1
- package/dist/kongponents382.cjs +1 -1
- package/dist/kongponents383.cjs +1 -1
- package/dist/kongponents384.cjs +1 -1
- package/dist/kongponents385.cjs +1 -1
- package/dist/kongponents386.cjs +1 -1
- package/dist/kongponents387.cjs +1 -1
- package/dist/kongponents388.cjs +1 -1
- package/dist/kongponents389.cjs +1 -1
- package/dist/kongponents390.cjs +1 -1
- package/dist/kongponents391.cjs +1 -1
- package/dist/kongponents392.cjs +1 -1
- package/dist/kongponents393.cjs +1 -1
- package/dist/kongponents394.cjs +1 -1
- package/dist/kongponents395.cjs +1 -1
- package/dist/kongponents396.cjs +1 -1
- package/dist/kongponents397.cjs +1 -1
- package/dist/kongponents398.cjs +1 -1
- package/dist/kongponents399.cjs +1 -1
- package/dist/kongponents400.cjs +1 -1
- package/dist/kongponents401.cjs +1 -1
- package/dist/kongponents402.cjs +1 -1
- package/dist/kongponents403.cjs +1 -1
- package/dist/kongponents404.cjs +1 -1
- package/dist/kongponents405.cjs +1 -1
- package/dist/kongponents406.cjs +1 -1
- package/dist/kongponents407.cjs +1 -1
- package/dist/kongponents408.cjs +1 -1
- package/dist/kongponents409.cjs +1 -1
- package/dist/kongponents410.cjs +1 -1
- package/dist/kongponents411.cjs +1 -1
- package/dist/kongponents412.cjs +1 -1
- package/dist/kongponents413.cjs +1 -1
- package/dist/kongponents414.cjs +1 -1
- package/dist/kongponents415.cjs +1 -1
- package/dist/kongponents416.cjs +1 -1
- package/dist/kongponents417.cjs +1 -1
- package/dist/kongponents418.cjs +1 -1
- package/dist/kongponents419.cjs +1 -1
- package/dist/kongponents420.cjs +1 -1
- package/dist/kongponents421.cjs +1 -1
- package/dist/kongponents422.cjs +1 -10
- package/dist/kongponents423.cjs +1 -1
- package/dist/kongponents424.cjs +1 -1
- package/dist/kongponents425.cjs +1 -0
- package/dist/kongponents426.cjs +1 -1
- package/dist/kongponents429.cjs +1 -1
- package/dist/kongponents430.cjs +1 -1
- package/dist/kongponents431.cjs +1 -1
- package/dist/kongponents432.cjs +1 -1
- package/dist/kongponents433.cjs +1 -1
- package/dist/kongponents434.cjs +1 -1
- package/dist/kongponents435.cjs +1 -1
- package/dist/kongponents436.cjs +1 -1
- package/dist/kongponents437.cjs +1 -1
- package/dist/kongponents438.cjs +1 -1
- package/dist/kongponents439.cjs +1 -1
- package/dist/kongponents440.cjs +1 -1
- package/dist/kongponents441.cjs +1 -1
- package/dist/kongponents442.cjs +1 -1
- package/dist/kongponents443.cjs +1 -1
- package/dist/kongponents450.cjs +1 -1
- package/dist/kongponents451.cjs +1 -1
- package/dist/kongponents456.cjs +1 -1
- package/dist/kongponents457.cjs +1 -1
- package/dist/kongponents458.cjs +1 -1
- package/dist/kongponents459.cjs +1 -1
- package/dist/kongponents463.cjs +1 -1
- package/dist/kongponents464.cjs +1 -1
- package/dist/kongponents466.cjs +1 -1
- package/dist/kongponents467.cjs +1 -1
- package/dist/kongponents468.cjs +1 -1
- package/dist/kongponents469.cjs +1 -1
- package/dist/kongponents470.cjs +1 -1
- package/dist/kongponents471.cjs +1 -1
- package/dist/kongponents472.cjs +1 -1
- package/dist/kongponents480.cjs +1 -1
- package/dist/kongponents481.cjs +1 -1
- package/dist/kongponents482.cjs +1 -1
- package/dist/kongponents483.cjs +1 -1
- package/dist/kongponents484.cjs +1 -1
- package/dist/kongponents485.cjs +1 -1
- package/dist/kongponents486.cjs +1 -1
- package/dist/kongponents487.cjs +1 -1
- package/dist/kongponents488.cjs +1 -1
- package/dist/kongponents489.cjs +1 -1
- package/dist/kongponents490.cjs +1 -1
- package/dist/kongponents491.cjs +1 -1
- package/dist/kongponents492.cjs +1 -1
- package/dist/kongponents493.cjs +1 -1
- package/dist/kongponents494.cjs +1 -1
- package/dist/kongponents495.cjs +1 -1
- package/dist/kongponents496.cjs +1 -1
- package/dist/kongponents497.cjs +1 -1
- package/dist/kongponents498.cjs +1 -1
- package/dist/kongponents499.cjs +1 -1
- package/dist/kongponents501.cjs +1 -1
- package/dist/kongponents502.cjs +1 -1
- package/dist/kongponents503.cjs +1 -1
- package/dist/kongponents504.cjs +1 -1
- package/dist/kongponents505.cjs +1 -1
- package/dist/kongponents506.cjs +1 -1
- package/dist/kongponents507.cjs +1 -1
- package/dist/kongponents508.cjs +1 -1
- package/dist/kongponents509.cjs +1 -1
- package/dist/kongponents510.cjs +1 -1
- package/dist/kongponents511.cjs +1 -1
- package/dist/kongponents512.cjs +1 -1
- package/dist/kongponents513.cjs +1 -1
- package/dist/kongponents514.cjs +1 -1
- package/dist/kongponents515.cjs +1 -1
- package/dist/kongponents516.cjs +1 -1
- package/dist/kongponents517.cjs +1 -1
- package/dist/kongponents518.cjs +1 -1
- package/dist/kongponents519.cjs +1 -1
- package/dist/kongponents520.cjs +1 -1
- package/dist/kongponents521.cjs +1 -1
- package/dist/kongponents522.cjs +1 -1
- package/dist/kongponents523.cjs +1 -1
- package/dist/kongponents524.cjs +1 -1
- package/dist/kongponents525.cjs +1 -1
- package/dist/kongponents526.cjs +1 -1
- package/dist/kongponents527.cjs +1 -1
- package/dist/kongponents528.cjs +1 -1
- package/dist/kongponents529.cjs +1 -1
- package/dist/kongponents530.cjs +1 -1
- package/dist/kongponents531.cjs +1 -1
- package/dist/kongponents532.cjs +1 -1
- package/dist/kongponents542.cjs +1 -1
- package/dist/kongponents543.cjs +1 -1
- package/dist/kongponents546.cjs +1 -1
- package/dist/kongponents547.cjs +1 -1
- package/dist/kongponents557.cjs +1 -1
- package/dist/kongponents558.cjs +1 -1
- package/dist/kongponents559.cjs +1 -1
- package/dist/kongponents560.cjs +1 -1
- package/dist/kongponents561.cjs +1 -1
- package/dist/kongponents562.cjs +1 -1
- package/dist/kongponents563.cjs +1 -1
- package/dist/kongponents564.cjs +1 -1
- package/dist/kongponents565.cjs +1 -1
- package/dist/kongponents566.cjs +1 -1
- package/dist/kongponents567.cjs +1 -1
- package/dist/kongponents568.cjs +1 -1
- package/dist/kongponents569.cjs +1 -1
- package/dist/kongponents570.cjs +1 -1
- package/dist/kongponents571.cjs +1 -1
- package/dist/kongponents572.cjs +1 -1
- package/dist/kongponents573.cjs +1 -1
- package/dist/kongponents574.cjs +1 -1
- package/dist/kongponents575.cjs +1 -1
- package/dist/kongponents576.cjs +1 -1
- package/dist/kongponents577.cjs +1 -1
- package/dist/kongponents578.cjs +1 -1
- package/dist/kongponents579.cjs +1 -1
- package/dist/kongponents580.cjs +1 -1
- package/dist/kongponents581.cjs +1 -1
- package/dist/kongponents582.cjs +1 -1
- package/dist/kongponents583.cjs +1 -1
- package/dist/kongponents584.cjs +1 -1
- package/dist/kongponents585.cjs +1 -1
- package/dist/kongponents586.cjs +1 -1
- package/dist/kongponents587.cjs +1 -1
- package/dist/kongponents597.cjs +1 -1
- package/dist/kongponents599.cjs +1 -1
- package/dist/kongponents600.cjs +1 -1
- package/dist/kongponents601.cjs +1 -1
- package/dist/kongponents602.cjs +1 -1
- package/dist/kongponents604.cjs +1 -1
- package/dist/kongponents605.cjs +1 -1
- package/dist/kongponents75.cjs +1 -1
- package/dist/kongponents77.cjs +1 -1
- package/dist/kongponents83.cjs +1 -1
- package/dist/kongponents87.cjs +1 -1
- package/dist/kongponents89.cjs +1 -1
- package/dist/kongponents94.cjs +1 -1
- package/dist/kongponents96.cjs +1 -1
- package/dist/kongponents99.cjs +1 -1
- package/package.json +1 -1
- package/dist/kongponents.es226.js +0 -191
- package/dist/kongponents.es243.js +0 -42
- package/dist/kongponents.es259.js +0 -54
- package/dist/kongponents.es261.js +0 -58
- package/dist/kongponents.es265.js +0 -7
- package/dist/kongponents.es272.js +0 -8
- package/dist/kongponents.es274.js +0 -19
- package/dist/kongponents.es276.js +0 -10
- package/dist/kongponents.es278.js +0 -6
- package/dist/kongponents.es280.js +0 -8
- package/dist/kongponents.es330.js +0 -76
- package/dist/kongponents.es366.js +0 -12
- package/dist/kongponents226.cjs +0 -1
- package/dist/kongponents243.cjs +0 -1
- package/dist/kongponents259.cjs +0 -1
- package/dist/kongponents261.cjs +0 -1
- package/dist/kongponents265.cjs +0 -1
- package/dist/kongponents272.cjs +0 -1
- package/dist/kongponents274.cjs +0 -1
- package/dist/kongponents276.cjs +0 -1
- package/dist/kongponents278.cjs +0 -1
- package/dist/kongponents280.cjs +0 -1
- package/dist/kongponents330.cjs +0 -1
- package/dist/kongponents366.cjs +0 -1
- /package/dist/{kongponents.es263.js → kongponents.es248.js} +0 -0
- /package/dist/{kongponents.es247.js → kongponents.es250.js} +0 -0
- /package/dist/{kongponents.es251.js → kongponents.es254.js} +0 -0
- /package/dist/{kongponents.es253.js → kongponents.es256.js} +0 -0
- /package/dist/{kongponents.es257.js → kongponents.es260.js} +0 -0
- /package/dist/{kongponents263.cjs → kongponents248.cjs} +0 -0
- /package/dist/{kongponents247.cjs → kongponents250.cjs} +0 -0
- /package/dist/{kongponents251.cjs → kongponents254.cjs} +0 -0
- /package/dist/{kongponents253.cjs → kongponents256.cjs} +0 -0
- /package/dist/{kongponents257.cjs → kongponents260.cjs} +0 -0
package/dist/kongponents115.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("./kongponents178.cjs"),T=require("./kongponents179.cjs"),C=require("./kongponents32.cjs"),$=require("./kongponents172.cjs"),N=require("./kongponents177.cjs"),h=require("./kongponents180.cjs"),A=["aria-label"],O={key:0,class:"modal-header"},D={key:0,class:"modal-title"},z={class:"modal-footer"},L={class:"footer-actions"},q=e.defineComponent({inheritAttrs:!1,__name:"KModal",props:{visible:{type:Boolean},title:{default:""},actionButtonText:{default:"Submit"},actionButtonAppearance:{default:"primary"},actionButtonDisabled:{type:Boolean},hideCancelButton:{type:Boolean},cancelButtonText:{default:"Cancel"},cancelButtonAppearance:{default:"tertiary"},cancelButtonDisabled:{type:Boolean},tabbableOptions:{default:()=>({})},maxWidth:{default:"500px"},maxHeight:{default:"calc(100vh - 200px)"},closeOnBackdropClick:{type:Boolean},closeOnEscape:{type:Boolean,default:!0},hideCloseIcon:{type:Boolean},fullScreen:{type:Boolean},inputAutofocus:{type:Boolean},zIndex:{default:1100}},emits:["proceed","cancel"],setup(o,{emit:p}){e.useCssVars(t=>({v5582ddaa:t.zIndex,v1ae56e5d:V.value,ee977890:g.value}));const E=p,i=e.useSlots(),m=e.useAttrs(),S=T.useTextSelection(),f=`k-modal-${e.useId()}-overflow-hidden`,c=e.ref(null),v=e.ref(null),V=e.computed(()=>o.fullScreen&&!i.content?"95%":h.normalizeSize(o.maxWidth)),g=e.computed(()=>o.fullScreen&&!i.content?"95vh":h.normalizeSize(o.maxHeight)),w=e.computed(()=>{const t=Object.assign({},m);return delete t.class,t}),y=e.computed(()=>!!o.title||!!i.title||!o.hideCloseIcon),b=t=>{o.visible&&o.closeOnEscape&&t.key==="Escape"&&B(!0)},B=(t=!1,a)=>{var l,n;(t||(n=(l=a==null?void 0:a.target)==null?void 0:l.classList)!=null&&n.contains("modal-backdrop")&&o.closeOnBackdropClick&&!S.text.value)&&E("cancel")},d=async t=>{var a,l;t?(await e.nextTick(),await new Promise(n=>setTimeout(n,0)),(a=c.value)==null||a.activate()):(l=c.value)==null||l.deactivate()},r=t=>{typeof document<"u"&&(t?document==null||document.addEventListener("keydown",b):document==null||document.removeEventListener("keydown",b))},k=()=>{var a,l,n;const t=(n=(l=(a=c.value)==null?void 0:a.$el)==null?void 0:l.querySelector(".modal-content"))==null?void 0:n.querySelectorAll("input");t!=null&&t.length&&Array.from(t).every(u=>!u.disabled&&!u.readOnly?(u.focus(),!1):!0)};e.watch(()=>o.visible,async t=>{var a,l;t?(await d(!0),o.inputAutofocus&&k(),r(!0)):(await d(!1),r(!1)),typeof document<"u"&&((l=(a=document==null?void 0:document.body)==null?void 0:a.classList)==null||l.toggle(f,t))},{immediate:!0}),e.watch(()=>o.inputAutofocus,async t=>{t&&(await e.nextTick(),k())});const s=e.ref(null);return e.onMounted(()=>{typeof document<"u"&&(s.value=document.createElement("style"),s.value.textContent=`body.${f} { overflow: hidden; }`,document.head.appendChild(s.value))}),e.onBeforeUnmount(async()=>{await d(!1),r(!1)}),e.onUnmounted(()=>{var t;(t=s.value)==null||t.remove()}),(t,a)=>o.visible?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,"aria-label":o.title,"aria-modal":"true",class:["k-modal",[e.unref(m).class]]},w.value,{role:"dialog"}),[e.createElementVNode("div",{ref_key:"modalWrapperElement",ref:v,class:e.normalizeClass(["modal-backdrop",{"modal-full-screen":o.fullScreen&&!t.$slots.content}]),onClick:a[3]||(a[3]=l=>B(!1,l))},[e.createVNode(e.unref(x.FocusTrap),{ref_key:"focusTrapElement",ref:c,active:!1,"fallback-focus":()=>v.value,"tabbable-options":o.tabbableOptions},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["modal-container",{"custom-content":t.$slots.content}]),tabindex:"-1"},[e.renderSlot(t.$slots,"content",{},()=>[y.value?(e.openBlock(),e.createElementBlock("div",O,[o.title||t.$slots.title?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)])):e.createCommentVNode("",!0),o.hideCloseIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,"aria-label":"Close",class:"close-icon","data-testid":"modal-close-icon",type:"button",onClick:a[0]||(a[0]=l=>t.$emit("cancel"))},[e.createVNode(e.unref($.default),{color:`var(--kui-color-text-neutral, ${e.unref(N.KUI_COLOR_TEXT_NEUTRAL)})`,decorative:""},null,8,["color"])]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["modal-content",{"no-header":!y.value}])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2),e.createElementVNode("div",z,[e.renderSlot(t.$slots,"footer",{},()=>[e.createElementVNode("div",L,[e.renderSlot(t.$slots,"footer-actions",{},()=>[o.hideCancelButton?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:0,appearance:o.cancelButtonAppearance,"data-testid":"modal-cancel-button",disabled:o.cancelButtonDisabled,onClick:a[1]||(a[1]=l=>t.$emit("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelButtonText),1)]),_:1},8,["appearance","disabled"])),e.createVNode(C.default,{appearance:o.actionButtonAppearance,"data-testid":"modal-action-button",disabled:o.actionButtonDisabled,onClick:a[2]||(a[2]=l=>t.$emit("proceed"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.actionButtonText),1)]),_:1},8,["appearance","disabled"])],!0)])],!0)])],!0)],2)]),_:3},8,["fallback-focus","tabbable-options"])],2)],16,A)):e.createCommentVNode("",!0)}});exports.default=q;
|
package/dist/kongponents117.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./kongponents32.cjs"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./kongponents32.cjs"),m=require("./kongponents203.cjs"),f=require("./kongponents177.cjs"),y=["aria-label"],p={class:"k-modal-fullscreen-body-header"},h={key:0,class:"body-header"},k={key:1,class:"body-header-description"},b={class:"k-modal-fullscreen-body"},V={class:"k-modal-fullscreen-header"},v={"aria-level":"2",class:"k-modal-fullscreen-header-description",role:"heading"},g={class:"k-modal-fullscreen-title"},N={class:"header-icon"},S={class:"header-content"},B={class:"k-modal-fullscreen-action"},E={class:"k-modal-fullscreen-action-buttons"},C={key:0,class:"k-modal-fullscreen-footer"},T={class:"k-modal-fullscreen-action"},w={class:"k-modal-fullscreen-action-buttons"},$=e.defineComponent({__name:"KModalFullscreen",props:{title:{type:String,required:!0},bodyHeader:{type:String,default:""},bodyHeaderDescription:{type:String,default:""},isVisible:{type:Boolean,default:!1},cancelButtonText:{type:String,default:"Cancel"},actionButtonText:{type:String,default:"Save"},actionButtonAppearance:{type:String,default:"primary"},cancelButtonAppearance:{type:String,default:"secondary"},iconString:{type:String,default:"kong"}},emits:["canceled","proceed"],setup(o,{emit:i}){const a=o,c=i,l=e.ref(null),u=e.computed(()=>!!a.isVisible);e.watch(()=>a.isVisible,async()=>{typeof document>"u"||(u.value?(document.body.style.overflow="hidden",await e.nextTick(),l.value&&l.value.focus()):document.body.style.overflow="")});const s=t=>{a.isVisible&&(t.keyCode===27?d():t.keyCode===13&&n())},d=()=>{c("canceled")},n=()=>{c("proceed")};return e.onMounted(()=>{document.addEventListener("keydown",s),console.warn(`The Kongponents 'KModalFullscreen' component is deprecated and will be removed in the next major release.
|
|
2
2
|
We suggest using 'KModal' component instead.
|
|
3
3
|
Docs: https://kongponents.konghq.com/components/modal.html#fullscreen`)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",s)}),e.onUnmounted(()=>{document.body.style.overflow=""}),(t,D)=>o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,"aria-label":o.title,"aria-modal":"true",class:"k-modal-fullscreen isOpen",role:"dialog",onKeyup:[e.withKeys(n,["enter"]),e.withKeys(d,["esc"])]},[e.createElementVNode("div",{ref_key:"modalBodyContent",ref:l,class:e.normalizeClass(["k-modal-fullscreen-dialog",{"has-footer":t.$slots["footer-content"]}]),tabindex:"0"},[e.createElementVNode("div",p,[t.$slots["body-header"]||o.bodyHeader?(e.openBlock(),e.createElementBlock("div",h,[e.renderSlot(t.$slots,"body-header",{},()=>[e.createTextVNode(e.toDisplayString(o.bodyHeader),1)],!0)])):e.createCommentVNode("",!0),t.$slots["body-header-description"]||o.bodyHeaderDescription?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(t.$slots,"body-header-description",{},()=>[e.createTextVNode(e.toDisplayString(o.bodyHeaderDescription),1)],!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",b,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",V,[e.createElementVNode("div",v,[e.createElementVNode("div",g,[e.createElementVNode("span",N,[e.renderSlot(t.$slots,"header-icon",{},()=>[e.createVNode(e.unref(m.default),{color:e.unref(f.KUI_COLOR_TEXT_DECORATIVE_AQUA)},null,8,["color"])],!0)]),e.createElementVNode("span",S,[e.renderSlot(t.$slots,"header-content",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)])]),e.createElementVNode("div",B,[e.createElementVNode("div",E,[e.renderSlot(t.$slots,"action-buttons",{},()=>[e.createVNode(r.default,{appearance:o.cancelButtonAppearance,class:"cancel-button",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelButtonText),1)]),_:1},8,["appearance"]),e.createVNode(r.default,{appearance:o.actionButtonAppearance,class:"proceed-button",onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.actionButtonText),1)]),_:1},8,["appearance"])],!0)])])])]),t.$slots["footer-content"]?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"footer-content",{},void 0,!0),e.createElementVNode("div",T,[e.createElementVNode("div",w,[e.renderSlot(t.$slots,"action-buttons",{},()=>[e.createVNode(r.default,{appearance:o.actionButtonAppearance,class:"proceed-button",onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.actionButtonText),1)]),_:1},8,["appearance"])],!0)])])])):e.createCommentVNode("",!0)],2)],40,y)):e.createCommentVNode("",!0)}});exports.default=$;
|
package/dist/kongponents119.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Le=require("./kongponents178.cjs"),L=require("./kongponents30.cjs"),ge=require("./kongponents48.cjs"),Ue=require("./kongponents50.cjs"),Re=require("./kongponents55.cjs"),Oe=require("./kongponents23.cjs"),He=require("./kongponents24.cjs");;/* empty css */const Ge=require("./kongponents229.cjs"),We=require("./kongponents230.cjs"),Je=require("./kongponents208.cjs"),Z=require("./kongponents172.cjs"),Ze=require("./kongponents193.cjs"),U=require("./kongponents177.cjs"),je=require("./kongponents210.cjs"),Qe=require("./kongponents168.cjs"),Xe=require("./kongponents183.cjs"),Ye=require("./kongponents151.cjs"),ye=require("./kongponents181.cjs"),_e={"data-testid":"multiselect-container"},et=["id","tabindex"],tt={key:0},lt={key:1,class:"expanded-selection-empty"},at={class:"multiselect-selection-badge-label"},ot=["aria-label","onClick"],ut={class:"multiselect-icons-container"},st={key:0,class:"multiselect-input-wrapper"},nt={key:2,class:"multiselect-empty","data-propagate-clicks":"false"},it={key:1,class:"help-text"},rt={key:2,"aria-hidden":"true",class:"staging-area"},ct={class:"multiselect-selection-badge-label"},dt=36,vt="Filter...",ft=e.defineComponent({inheritAttrs:!1,__name:"KMultiselect",props:{modelValue:{default:()=>[]},label:{default:""},help:{default:""},error:{type:Boolean},labelAttributes:{default:()=>({})},placeholder:{default:""},searchPlaceholder:{default:""},kpopAttributes:{default:()=>({})},dropdownMaxHeight:{default:"300px"},width:{default:"100%"},selectedRowCount:{default:1},collapsedContext:{type:Boolean},items:{default:()=>[]},filterFunction:{type:Function,default:u=>u.items.filter(R=>{var $,z;return(z=R.label)==null?void 0:z.toLowerCase().includes(($=u.query)==null?void 0:$.toLowerCase())})},autosuggest:{type:Boolean},enableItemCreation:{type:Boolean},loading:{type:Boolean},dropdownFooterText:{default:""},dropdownFooterTextPosition:{default:"sticky"},itemCreationValidator:{type:Function,default:()=>!0}},emits:["selected","input","change","update:modelValue","query-change","item-added","item-removed"],setup(u,{emit:R}){e.useCssVars(t=>({v2fa9d9e4:Ne.value}));const $=t=>{const l=[],o=a=>{"value"in a?l.push(a.value):"items"in a&&Array.isArray(a.items)&&a.items.forEach(s=>l.push(s.value))};return t.forEach(o),l},z=t=>{const l=$(t),o=new Set(l);return l.length===o.size},be=t=>{for(const l of t)if("value"in l){if(l.label===void 0||l.value===void 0)return!1}else if("items"in l&&Array.isArray(l.items)){if(l.label===void 0)return!1;for(const o of l.items)if(o.label===void 0||o.value===void 0)return!1}return!0},f=e.useAttrs(),j=e.useSlots(),{cloneDeep:M,stripRequiredLabel:ke}=Le.default();e.watch(()=>u.items,t=>{!t.length||be(t)&&z(t)||console.warn("KMultiselect: Items must have a label & value and value must be unique")},{immediate:!0});const b=R,Q=e.useTemplateRef("kMultiselectItems"),X=e.computed(()=>f.required!==void 0&&String(f.required)!=="false"),we=e.computed(()=>ke(u.label,X.value)),Ce=e.computed(()=>{var t,l;return!!((t=u.labelAttributes)!=null&&t.help||(l=u.labelAttributes)!=null&&l.info||j["label-tooltip"])}),Y=t=>E.value||I.value||t!=null&&t.disabled?"neutral":u.error?"danger":"info",_={hideCaret:!0,placement:"bottom-start",popoverTimeout:0,popoverClasses:"k-multiselect-popover multiselect-popover"},T=e.ref(0),N=e.ref(0),Se=e.useId(),ee=e.computed(()=>f.id?String(f.id):Se),te=e.useId(),F=e.useTemplateRef("multiselectElement"),Ie=e.useTemplateRef("multiselectDropdownInputElement"),le=e.useTemplateRef("multiselectSelectionsStagingElement"),O=e.computed(()=>u.selectedRowCount*dt),p=e.ref(""),ae=e.computed(()=>!(!p.value||r.value.filter(t=>t.label===p.value).length)),S=e.ref(null),r=e.ref([]),k=e.ref([]),P=e.ref([]),d=e.ref([]),m=e.ref([]),h=e.ref([]),w=new Set,H=e.ref([]),A=e.ref([]),xe=e.computed(()=>A.value.map(t=>t.label).join(", ")),oe=e.ref(!1),q=e.ref(!1),G=e.ref(!1),E=e.computed(()=>(f==null?void 0:f.disabled)!==void 0&&String(f==null?void 0:f.disabled)!=="false"),I=e.computed(()=>(f==null?void 0:f.readonly)!==void 0&&String(f==null?void 0:f.readonly)!=="false"),Ee=e.computed({get(){return u.modelValue},set(t){const l=r.value.filter(o=>t.includes(o.value));l.length?re(l):t.length||J()}}),Be=e.computed(()=>{const t={...f};return delete t.class,t}),Ve=e.computed(()=>{var t;return{..._,...u.kpopAttributes,popoverClasses:`${_.popoverClasses} ${((t=u.kpopAttributes)==null?void 0:t.popoverClasses)??""} ${u.dropdownFooterText||j["dropdown-footer-text"]?"has-dropdown-footer":""}`,width:K.value+"px",maxWidth:K.value+"px",disabled:f.disabled!==void 0&&String(f.disabled)!=="false"||f.readonly!==void 0&&String(f.readonly)!=="false"}}),Ne=e.computed(()=>ye.normalizeSize(u.dropdownMaxHeight)),Ae=e.computed(()=>({...Ve.value})),qe=e.computed(()=>{const t=u.width?u.width:"300";return ye.normalizeSize(t)}),Ke=e.computed(()=>({width:qe.value})),ue=e.computed(()=>({width:K.value+"px"})),se=e.computed(()=>{if(d.value.length===0){if(!u.collapsedContext&&u.placeholder)return u.placeholder;if(u.collapsedContext&&u.searchPlaceholder)return u.searchPlaceholder}return d.value.length===1?`${d.value.length} item selected`:`${d.value.length} items selected`}),$e=e.computed(()=>u.autosuggest?r.value:u.filterFunction({items:r.value,query:p.value})),ne=e.computed(()=>{if(u.autosuggest||!p.value)return k.value;const t=$e.value,l=new Set(t.map(a=>a.value)),o=[];for(const a of k.value)if(C(a)){const s=a.items.filter(n=>l.has(n.value));s.length>0&&o.push({label:a.label,key:a.key,items:s})}else l.has(a.value)&&o.push(a);return o}),ze=t=>{var l;(E.value||((l=t==null?void 0:t.target)==null?void 0:l.dataset.propagateClicks)==="false")&&t.stopPropagation()},ie=async(t,l,o)=>{var a,s;if(t){if(!l.value){p.value="",o(),ve(),await e.nextTick();const n=(s=(a=Ie.value)==null?void 0:a.$el)==null?void 0:s.querySelector("input");n==null||n.focus({preventScroll:!0})}}else l.value&&(p.value="",o())},V=()=>{setTimeout(()=>{const t=le.value;if(u.collapsedContext){N.value++;return}if(t){if(t.clientHeight>O.value){const o=Array.from(t.querySelectorAll(".multiselect-selection-badge")).filter(n=>n.offsetTop>=O.value),a=m.value.length-o.length,s=m.value.splice(a,o.length);for(const n of s)w.has(n.value)||(w.add(n.value),h.value.push(n))}N.value++}},0)},re=t=>{t.forEach(l=>{var a;const o=((a=r.value.filter(s=>s.value===l.value))==null?void 0:a[0])||null;o&&(o.selected=!0,d.value.filter(s=>s.value===o.value).length||(d.value.push(o),m.value.push(o)))}),V()},Me=(t,l=!1)=>{const o=new Set(t.map(a=>a.value));d.value=d.value.filter(a=>!o.has(a.value)),m.value=m.value.filter(a=>!o.has(a.value)),h.value=h.value.filter(a=>!o.has(a.value)),t.forEach(a=>{if(w.delete(a.value),a.selected=!1,h.value.length){const s=h.value.pop();s&&(m.value.push(s),w.delete(s.value))}u.enableItemCreation&&a.custom&&(r.value=r.value.filter(s=>s.value!==a.value),k.value=k.value.filter(s=>C(s)?!0:s.value!==a.value),b("item-removed",a))}),l&&V()},W=(t,l)=>{var n,g;let o=!1,a=l?t:((n=r.value.filter(c=>c.value===t.value))==null?void 0:n[0])||null;if(u.enableItemCreation&&(a!=null&&a.custom)&&(o=!0),a===null&&(a=((g=d.value.filter(c=>c.value===t.value))==null?void 0:g[0])||null),a===null)return;if(a.selected){if(d.value=d.value.filter(c=>c.value!==t.value),m.value.filter(c=>c.value===t.value).length?m.value=m.value.filter(c=>c.value!==t.value):w.delete(t.value)&&(h.value=h.value.filter(c=>c.value!==t.value)),a.selected=!1,h.value.length){const c=h.value.pop();c&&(m.value.push(c),w.delete(c.value))}o&&(r.value=r.value.filter(c=>c.value!==t.value),k.value=k.value.filter(c=>C(c)?!0:c.value!==t.value),b("item-removed",t))}else a.selected=!0,d.value.push(a),m.value.push(a),l&&(a.custom=!0,r.value.push(a),k.value.unshift(a));V();const s=d.value.map(c=>c.value);b("selected",d.value),b("change",a),b("update:modelValue",s)},ce=t=>{u.enableItemCreation&&de(),t.preventDefault()},de=()=>{var o;if(!u.enableItemCreation||!p.value||!ae.value||!u.itemCreationValidator(p.value))return;const t=r.value.length+1,l={label:p.value.trim(),value:Ye.getUniqueStringId(),key:`${(o=Qe.sanitizeInput(p.value.trim()).replace(/ /gi,"-"))==null?void 0:o.replace(/[^a-z0-9-_]/gi,"")}-${t}`};b("item-added",l),W(l,!0),p.value=""},C=t=>"items"in t&&Array.isArray(t.items),ve=()=>{const t=[],l=[],o=[];for(const n of ne.value)C(n)?o.push(n):l.push(n);const a=l.filter(n=>n.selected),s=l.filter(n=>!n.selected);t.push(...a,...s);for(const n of o){const g=n.items.filter(i=>i.selected),c=n.items.filter(i=>!i.selected);t.push({label:n.label,key:n.key,items:[...g,...c]})}P.value=t},J=()=>{r.value.forEach(l=>{l.disabled||(l.selected=!1,l.custom&&b("item-removed",l))}),r.value=r.value.filter(l=>!(l.custom&&!l.disabled)),k.value=k.value.filter(l=>C(l)?!0:!(l.custom&&!l.disabled)),d.value=d.value.filter(l=>l.disabled),m.value=m.value.filter(l=>l.disabled),h.value=h.value.filter(l=>(l.disabled||w.delete(l.value),l.disabled)),p.value="",V();const t=d.value.map(l=>l.value);b("selected",d.value),b("update:modelValue",t),b("query-change","")},fe=t=>{p.value=t.trim(),b("query-change",t.trim())},Te=(t,l)=>{var o;t.keyCode===27&&(l.value=!1),(t.key==="ArrowDown"||t.key==="ArrowUp")&&((o=Q.value)==null||o.setFocus(t.key==="ArrowDown"?"down":"up"))},me=()=>{var t;(t=S.value)==null||t.showPopover()},Fe=t=>{var l;(t.key==="ArrowDown"||t.key==="ArrowUp")&&((l=Q.value)==null||l.setFocus(t.key==="ArrowDown"?"down":"up"))},Pe=async()=>{G.value=!0,pe()},pe=()=>{oe.value||(oe.value=!0,b("query-change",""))};e.watch(N,()=>{setTimeout(()=>{const t=le.value;if(u.collapsedContext){H.value=M(m.value),A.value=[],T.value++;return}if(t)if(t.clientHeight>O.value){const o=m.value.pop();o&&!w.has(o.value)&&(h.value.push(o),w.add(o.value)),N.value++}else H.value=M(m.value),A.value=M(h.value),T.value++},0)}),e.watch(T,async()=>{S.value&&typeof S.value.updatePopper=="function"&&(await e.nextTick(),S.value.updatePopper())}),e.watch(ne,()=>{ve()}),e.watch(Ee,(t,l)=>{if(JSON.stringify(t)!==JSON.stringify(l)){if(!t.length){J();return}const o=new Set(l),a=new Set(t),s=r.value.filter(g=>a.has(g.value)),n=d.value.filter(g=>!a.has(g.value)&&o.has(g.value));n.length&&Me(n),s.length&&re(s)}}),e.watch(()=>u.items,(t,l)=>{var g,c;if(JSON.stringify(t)===JSON.stringify(l))return;const o=M(u.items),a=o.some(i=>C(i)),s=[],n=[];if(a)for(const i of o)C(i)?s.push(...i.items):s.push(i);else{const i=new Map;for(const v of o)C(v)||(v.group&&(i.has(v.group)||i.set(v.group,[]),i.get(v.group).push(v)),s.push(v));const x=Array.from(i.keys()).sort((v,B)=>v.toLowerCase().localeCompare(B.toLowerCase())),y=s.filter(v=>!v.group);n.push(...y);for(const v of x)n.push({label:v,items:i.get(v)})}r.value=s;for(let i=0;i<r.value.length;i++){r.value[i].selected===void 0&&(r.value[i].selected=!1);let x=`${(c=(g=r.value[i].label)==null?void 0:g.replace(/ /gi,"-"))==null?void 0:c.replace(/[^a-z0-9-_]/gi,"")}-${i}`;if(x.includes("undefined")&&(x=`multiselect-item-label-${i}`),r.value[i].key=x,u.modelValue.includes(r.value[i].value)||r.value[i].selected){const y=r.value[i];y.selected=!0,d.value.filter(v=>v.value===y.value).length||d.value.push(y),m.value.filter(v=>v.value===y.value).length||m.value.push(y)}}if(a){const i=[],x=[];for(const y of o)if(C(y)){const v=y.items.map(B=>r.value.find(De=>De.value===B.value)).filter(B=>B!==void 0);x.push({label:y.label,key:y.key,items:v})}else{const v=r.value.find(B=>B.value===y.value);v&&i.push(v)}n.push(...i,...x)}k.value=n,V(),S.value&&typeof S.value.updatePopper=="function"&&e.nextTick(()=>{S.value.updatePopper()})},{deep:!0,immediate:!0});const K=e.ref(300),he=async()=>{var t;K.value=300,await e.nextTick(),K.value=((t=F.value)==null?void 0:t.clientWidth)||300,V()},D=e.ref();return e.onMounted(()=>{Xe.useEventListener("resize",he),D.value=je.ResizeObserverHelper.create(he),D.value.observe(F.value)}),e.onBeforeUnmount(()=>{D.value&&F.value&&D.value.unobserve(F.value)}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["k-multiselect",[t.$attrs.class,{"multiselect-error":u.error}]]),style:e.normalizeStyle(Ke.value)},[u.label?(e.openBlock(),e.createBlock(Ue.default,e.mergeProps({key:0},u.labelAttributes,{"data-testid":u.labelAttributes["data-testid"]?u.labelAttributes["data-testid"]:"multiselect-label",for:ee.value,required:X.value}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(we.value)+" ",1)]),_:2},[Ce.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1040,["data-testid","for","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",_e,[e.createVNode(Oe.default,null,{default:e.withCtx(({isToggled:o,toggle:a})=>[e.createVNode(Re.default,e.mergeProps({ref_key:"popper",ref:S,"hide-close-icon":"",offset:e.unref(U.KUI_SPACE_40)},Ae.value,{onClose:()=>ie(!1,o,a),onOpen:()=>ie(!0,o,a)}),{content:e.withCtx(()=>[e.createElementVNode("div",{class:"multiselect-list",onClick:l[7]||(l[7]=e.withModifiers(()=>{},["stop"])),onMouseenter:l[8]||(l[8]=()=>q.value=!0),onMouseleave:l[9]||(l[9]=()=>q.value=!1)},[!u.collapsedContext&&!I.value?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(ge.default,{ref:"multiselectDropdownInputElement",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"multiselect-dropdown-input","data-testid":"multiselect-dropdown-input","model-value":p.value,name:"multiselect-options-search",placeholder:u.searchPlaceholder||vt,spellcheck:"false",type:"text",onClick:l[5]||(l[5]=e.withModifiers(()=>{},["stop"])),onFocus:pe,onKeydown:e.withKeys(ce,["enter"]),onKeyup:[Fe,l[6]||(l[6]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))],"onUpdate:modelValue":fe},null,8,["model-value","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(Ge.default,{ref:"kMultiselectItems","filter-string":p.value,"item-creation-enabled":u.enableItemCreation&&ae.value,"item-creation-valid":u.itemCreationValidator(p.value),items:P.value,onAddItem:de,onSelected:W},{content:e.withCtx(({item:s})=>[e.renderSlot(t.$slots,"item-template",{class:"multiselect-item",item:s},void 0,!0)]),_:3},8,["filter-string","item-creation-enabled","item-creation-valid","items"]),!P.value.length&&!t.$slots.empty&&!u.enableItemCreation?(e.openBlock(),e.createBlock(We.default,{key:"multiselect-empty-item",class:"multiselect-empty-item","data-testid":"multiselect-empty-item",item:{label:"No results",value:"no_results",disabled:!0}})):e.createCommentVNode("",!0),t.$slots.empty&&!u.loading&&!P.value.length?(e.openBlock(),e.createElementBlock("div",nt,[e.renderSlot(t.$slots,"empty",{},void 0,!0)])):e.createCommentVNode("",!0)],32),u.dropdownFooterText||t.$slots["dropdown-footer-text"]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dropdown-footer",`dropdown-footer-${u.dropdownFooterTextPosition}`]),"data-testid":"dropdown-footer"},[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(u.dropdownFooterText),1)],!0)],2)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",e.mergeProps({id:ee.value,ref:"multiselectElement",class:["multiselect-trigger",{focused:G.value,hovered:q.value,disabled:E.value,readonly:I.value}],"data-testid":"multiselect-trigger",role:"listbox",tabindex:E.value||I.value||u.collapsedContext?-1:0},Be.value,{onClick:ze,onKeydown:[e.withKeys(me,["enter"]),e.withKeys(me,["space"])]}),[u.collapsedContext?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(ge.default,{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:e.normalizeClass(["multiselect-input",{"is-readonly":I.value}]),"data-testid":"multiselect-input",disabled:E.value,"model-value":p.value,name:"multiselect-options-search",placeholder:se.value,readonly:I.value?!0:void 0,spellcheck:"false",type:"text",onBlur:l[0]||(l[0]=()=>G.value=!1),onClick:s=>{o.value&&s.stopPropagation()},onFocus:Pe,onKeydown:e.withKeys(ce,["enter"]),onKeyup:s=>Te(s,o),onMouseenter:l[1]||(l[1]=()=>q.value=!0),onMouseleave:l[2]||(l[2]=()=>q.value=!1),"onUpdate:modelValue":fe},null,8,["class","disabled","model-value","placeholder","readonly","onClick","onKeyup"])])):d.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,class:"selection-badges-container","data-testid":"selection-badges-container",style:e.normalizeStyle(ue.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(s,n)=>(e.openBlock(),e.createBlock(L.default,{key:`${e.unref(te)}-${s.key?s.key:n}-badge-${T.value}`,appearance:Y(s),class:"multiselect-selection-badge","icon-before":!1,tooltip:s.label,"truncation-tooltip":"",onClick:l[3]||(l[3]=e.withModifiers(()=>{},["stop"]))},e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"item-badge-icon",{item:s},void 0,!0),e.createElementVNode("span",at,e.toDisplayString(s.label),1)]),_:2},[s.selected&&!s.disabled&&!E.value&&!I.value?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":`Unselect ${s.label}`,class:"badge-dismiss-button","data-testid":"badge-dismiss-button",type:"button",onClick:g=>W(s)},[e.createVNode(e.unref(Z.default),{decorative:""})],8,ot)]),key:"0"}:void 0]),1032,["appearance","tooltip"]))),128)),A.value.length?(e.openBlock(),e.createBlock(He.default,{key:0,class:"hidden-selection-count-tooltip","max-width":"300",text:xe.value},{default:e.withCtx(()=>[e.createVNode(L.default,{appearance:Y(),class:"hidden-selection-count","data-testid":"hidden-selection-count",onClick:l[4]||(l[4]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(A.value.length),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):e.createCommentVNode("",!0)],4)):(e.openBlock(),e.createElementBlock("div",lt,e.toDisplayString(se.value),1)),e.createElementVNode("div",ut,[!u.loading&&d.value.length&&o.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":"Clear",class:"multiselect-clear-icon","data-testid":"multiselect-clear-icon",type:"button",onClick:J},[e.createVNode(e.unref(Z.default),{size:e.unref(U.KUI_ICON_SIZE_40)},null,8,["size"])])):u.loading?(e.openBlock(),e.createBlock(e.unref(Ze.default),{key:1,class:"multiselect-loading-icon",size:e.unref(U.KUI_ICON_SIZE_40),title:"Loading"},null,8,["size"])):(e.openBlock(),e.createBlock(e.unref(Je.default),{key:2,class:"multiselect-chevron-icon",decorative:"",size:e.unref(U.KUI_ICON_SIZE_40)},null,8,["size"]))])],16,et)]),_:2},1040,["offset","onClose","onOpen"])]),_:3})]),u.help?(e.openBlock(),e.createElementBlock("p",it,e.toDisplayString(u.help),1)):e.createCommentVNode("",!0),u.collapsedContext?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rt,[(e.openBlock(),e.createElementBlock("div",{key:N.value,ref:"multiselectSelectionsStagingElement",class:"selection-badges-container staging",style:e.normalizeStyle(ue.value),tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,a)=>(e.openBlock(),e.createBlock(L.default,{key:`${e.unref(te)}-${o.key?o.key:a}-badge`,"aria-hidden":"true",class:"multiselect-selection-badge","icon-before":!1},e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"item-badge-icon",{item:o},void 0,!0),e.createElementVNode("span",ct,e.toDisplayString(o.label),1)]),_:2},[o.selected&&!o.disabled&&!E.value&&!I.value?{name:"icon",fn:e.withCtx(()=>[e.createVNode(e.unref(Z.default),{"aria-hidden":"true"})]),key:"0"}:void 0]),1024))),128)),e.createVNode(L.default,{"aria-hidden":"true",class:"hidden-selection-count"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(h.value.length),1)]),_:1})],4))]))],6))}});exports.default=ft;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Le=require("./kongponents183.cjs"),L=require("./kongponents30.cjs"),ge=require("./kongponents48.cjs"),Ue=require("./kongponents50.cjs"),Re=require("./kongponents55.cjs"),Oe=require("./kongponents23.cjs"),He=require("./kongponents24.cjs");;/* empty css */const Ge=require("./kongponents206.cjs"),We=require("./kongponents207.cjs"),Je=require("./kongponents186.cjs"),Z=require("./kongponents172.cjs"),Ze=require("./kongponents196.cjs"),U=require("./kongponents177.cjs"),je=require("./kongponents188.cjs"),Qe=require("./kongponents168.cjs"),Xe=require("./kongponents179.cjs"),Ye=require("./kongponents151.cjs"),ye=require("./kongponents180.cjs"),_e={"data-testid":"multiselect-container"},et=["id","tabindex"],tt={key:0},lt={key:1,class:"expanded-selection-empty"},at={class:"multiselect-selection-badge-label"},ot=["aria-label","onClick"],ut={class:"multiselect-icons-container"},st={key:0,class:"multiselect-input-wrapper"},nt={key:2,class:"multiselect-empty","data-propagate-clicks":"false"},it={key:1,class:"help-text"},rt={key:2,"aria-hidden":"true",class:"staging-area"},ct={class:"multiselect-selection-badge-label"},dt=36,vt="Filter...",ft=e.defineComponent({inheritAttrs:!1,__name:"KMultiselect",props:{modelValue:{default:()=>[]},label:{default:""},help:{default:""},error:{type:Boolean},labelAttributes:{default:()=>({})},placeholder:{default:""},searchPlaceholder:{default:""},kpopAttributes:{default:()=>({})},dropdownMaxHeight:{default:"300px"},width:{default:"100%"},selectedRowCount:{default:1},collapsedContext:{type:Boolean},items:{default:()=>[]},filterFunction:{type:Function,default:u=>u.items.filter(R=>{var $,z;return(z=R.label)==null?void 0:z.toLowerCase().includes(($=u.query)==null?void 0:$.toLowerCase())})},autosuggest:{type:Boolean},enableItemCreation:{type:Boolean},loading:{type:Boolean},dropdownFooterText:{default:""},dropdownFooterTextPosition:{default:"sticky"},itemCreationValidator:{type:Function,default:()=>!0}},emits:["selected","input","change","update:modelValue","query-change","item-added","item-removed"],setup(u,{emit:R}){e.useCssVars(t=>({v2fa9d9e4:Ne.value}));const $=t=>{const l=[],o=a=>{"value"in a?l.push(a.value):"items"in a&&Array.isArray(a.items)&&a.items.forEach(s=>l.push(s.value))};return t.forEach(o),l},z=t=>{const l=$(t),o=new Set(l);return l.length===o.size},be=t=>{for(const l of t)if("value"in l){if(l.label===void 0||l.value===void 0)return!1}else if("items"in l&&Array.isArray(l.items)){if(l.label===void 0)return!1;for(const o of l.items)if(o.label===void 0||o.value===void 0)return!1}return!0},f=e.useAttrs(),j=e.useSlots(),{cloneDeep:M,stripRequiredLabel:ke}=Le.default();e.watch(()=>u.items,t=>{!t.length||be(t)&&z(t)||console.warn("KMultiselect: Items must have a label & value and value must be unique")},{immediate:!0});const b=R,Q=e.useTemplateRef("kMultiselectItems"),X=e.computed(()=>f.required!==void 0&&String(f.required)!=="false"),we=e.computed(()=>ke(u.label,X.value)),Ce=e.computed(()=>{var t,l;return!!((t=u.labelAttributes)!=null&&t.help||(l=u.labelAttributes)!=null&&l.info||j["label-tooltip"])}),Y=t=>E.value||I.value||t!=null&&t.disabled?"neutral":u.error?"danger":"info",_={hideCaret:!0,placement:"bottom-start",popoverTimeout:0,popoverClasses:"k-multiselect-popover multiselect-popover"},T=e.ref(0),N=e.ref(0),Se=e.useId(),ee=e.computed(()=>f.id?String(f.id):Se),te=e.useId(),F=e.useTemplateRef("multiselectElement"),Ie=e.useTemplateRef("multiselectDropdownInputElement"),le=e.useTemplateRef("multiselectSelectionsStagingElement"),O=e.computed(()=>u.selectedRowCount*dt),p=e.ref(""),ae=e.computed(()=>!(!p.value||r.value.filter(t=>t.label===p.value).length)),S=e.ref(null),r=e.ref([]),k=e.ref([]),P=e.ref([]),d=e.ref([]),m=e.ref([]),h=e.ref([]),w=new Set,H=e.ref([]),A=e.ref([]),xe=e.computed(()=>A.value.map(t=>t.label).join(", ")),oe=e.ref(!1),q=e.ref(!1),G=e.ref(!1),E=e.computed(()=>(f==null?void 0:f.disabled)!==void 0&&String(f==null?void 0:f.disabled)!=="false"),I=e.computed(()=>(f==null?void 0:f.readonly)!==void 0&&String(f==null?void 0:f.readonly)!=="false"),Ee=e.computed({get(){return u.modelValue},set(t){const l=r.value.filter(o=>t.includes(o.value));l.length?re(l):t.length||J()}}),Be=e.computed(()=>{const t={...f};return delete t.class,t}),Ve=e.computed(()=>{var t;return{..._,...u.kpopAttributes,popoverClasses:`${_.popoverClasses} ${((t=u.kpopAttributes)==null?void 0:t.popoverClasses)??""} ${u.dropdownFooterText||j["dropdown-footer-text"]?"has-dropdown-footer":""}`,width:K.value+"px",maxWidth:K.value+"px",disabled:f.disabled!==void 0&&String(f.disabled)!=="false"||f.readonly!==void 0&&String(f.readonly)!=="false"}}),Ne=e.computed(()=>ye.normalizeSize(u.dropdownMaxHeight)),Ae=e.computed(()=>({...Ve.value})),qe=e.computed(()=>{const t=u.width?u.width:"300";return ye.normalizeSize(t)}),Ke=e.computed(()=>({width:qe.value})),ue=e.computed(()=>({width:K.value+"px"})),se=e.computed(()=>{if(d.value.length===0){if(!u.collapsedContext&&u.placeholder)return u.placeholder;if(u.collapsedContext&&u.searchPlaceholder)return u.searchPlaceholder}return d.value.length===1?`${d.value.length} item selected`:`${d.value.length} items selected`}),$e=e.computed(()=>u.autosuggest?r.value:u.filterFunction({items:r.value,query:p.value})),ne=e.computed(()=>{if(u.autosuggest||!p.value)return k.value;const t=$e.value,l=new Set(t.map(a=>a.value)),o=[];for(const a of k.value)if(C(a)){const s=a.items.filter(n=>l.has(n.value));s.length>0&&o.push({label:a.label,key:a.key,items:s})}else l.has(a.value)&&o.push(a);return o}),ze=t=>{var l;(E.value||((l=t==null?void 0:t.target)==null?void 0:l.dataset.propagateClicks)==="false")&&t.stopPropagation()},ie=async(t,l,o)=>{var a,s;if(t){if(!l.value){p.value="",o(),ve(),await e.nextTick();const n=(s=(a=Ie.value)==null?void 0:a.$el)==null?void 0:s.querySelector("input");n==null||n.focus({preventScroll:!0})}}else l.value&&(p.value="",o())},V=()=>{setTimeout(()=>{const t=le.value;if(u.collapsedContext){N.value++;return}if(t){if(t.clientHeight>O.value){const o=Array.from(t.querySelectorAll(".multiselect-selection-badge")).filter(n=>n.offsetTop>=O.value),a=m.value.length-o.length,s=m.value.splice(a,o.length);for(const n of s)w.has(n.value)||(w.add(n.value),h.value.push(n))}N.value++}},0)},re=t=>{t.forEach(l=>{var a;const o=((a=r.value.filter(s=>s.value===l.value))==null?void 0:a[0])||null;o&&(o.selected=!0,d.value.filter(s=>s.value===o.value).length||(d.value.push(o),m.value.push(o)))}),V()},Me=(t,l=!1)=>{const o=new Set(t.map(a=>a.value));d.value=d.value.filter(a=>!o.has(a.value)),m.value=m.value.filter(a=>!o.has(a.value)),h.value=h.value.filter(a=>!o.has(a.value)),t.forEach(a=>{if(w.delete(a.value),a.selected=!1,h.value.length){const s=h.value.pop();s&&(m.value.push(s),w.delete(s.value))}u.enableItemCreation&&a.custom&&(r.value=r.value.filter(s=>s.value!==a.value),k.value=k.value.filter(s=>C(s)?!0:s.value!==a.value),b("item-removed",a))}),l&&V()},W=(t,l)=>{var n,g;let o=!1,a=l?t:((n=r.value.filter(c=>c.value===t.value))==null?void 0:n[0])||null;if(u.enableItemCreation&&(a!=null&&a.custom)&&(o=!0),a===null&&(a=((g=d.value.filter(c=>c.value===t.value))==null?void 0:g[0])||null),a===null)return;if(a.selected){if(d.value=d.value.filter(c=>c.value!==t.value),m.value.filter(c=>c.value===t.value).length?m.value=m.value.filter(c=>c.value!==t.value):w.delete(t.value)&&(h.value=h.value.filter(c=>c.value!==t.value)),a.selected=!1,h.value.length){const c=h.value.pop();c&&(m.value.push(c),w.delete(c.value))}o&&(r.value=r.value.filter(c=>c.value!==t.value),k.value=k.value.filter(c=>C(c)?!0:c.value!==t.value),b("item-removed",t))}else a.selected=!0,d.value.push(a),m.value.push(a),l&&(a.custom=!0,r.value.push(a),k.value.unshift(a));V();const s=d.value.map(c=>c.value);b("selected",d.value),b("change",a),b("update:modelValue",s)},ce=t=>{u.enableItemCreation&&de(),t.preventDefault()},de=()=>{var o;if(!u.enableItemCreation||!p.value||!ae.value||!u.itemCreationValidator(p.value))return;const t=r.value.length+1,l={label:p.value.trim(),value:Ye.getUniqueStringId(),key:`${(o=Qe.sanitizeInput(p.value.trim()).replace(/ /gi,"-"))==null?void 0:o.replace(/[^a-z0-9-_]/gi,"")}-${t}`};b("item-added",l),W(l,!0),p.value=""},C=t=>"items"in t&&Array.isArray(t.items),ve=()=>{const t=[],l=[],o=[];for(const n of ne.value)C(n)?o.push(n):l.push(n);const a=l.filter(n=>n.selected),s=l.filter(n=>!n.selected);t.push(...a,...s);for(const n of o){const g=n.items.filter(i=>i.selected),c=n.items.filter(i=>!i.selected);t.push({label:n.label,key:n.key,items:[...g,...c]})}P.value=t},J=()=>{r.value.forEach(l=>{l.disabled||(l.selected=!1,l.custom&&b("item-removed",l))}),r.value=r.value.filter(l=>!(l.custom&&!l.disabled)),k.value=k.value.filter(l=>C(l)?!0:!(l.custom&&!l.disabled)),d.value=d.value.filter(l=>l.disabled),m.value=m.value.filter(l=>l.disabled),h.value=h.value.filter(l=>(l.disabled||w.delete(l.value),l.disabled)),p.value="",V();const t=d.value.map(l=>l.value);b("selected",d.value),b("update:modelValue",t),b("query-change","")},fe=t=>{p.value=t.trim(),b("query-change",t.trim())},Te=(t,l)=>{var o;t.keyCode===27&&(l.value=!1),(t.key==="ArrowDown"||t.key==="ArrowUp")&&((o=Q.value)==null||o.setFocus(t.key==="ArrowDown"?"down":"up"))},me=()=>{var t;(t=S.value)==null||t.showPopover()},Fe=t=>{var l;(t.key==="ArrowDown"||t.key==="ArrowUp")&&((l=Q.value)==null||l.setFocus(t.key==="ArrowDown"?"down":"up"))},Pe=async()=>{G.value=!0,pe()},pe=()=>{oe.value||(oe.value=!0,b("query-change",""))};e.watch(N,()=>{setTimeout(()=>{const t=le.value;if(u.collapsedContext){H.value=M(m.value),A.value=[],T.value++;return}if(t)if(t.clientHeight>O.value){const o=m.value.pop();o&&!w.has(o.value)&&(h.value.push(o),w.add(o.value)),N.value++}else H.value=M(m.value),A.value=M(h.value),T.value++},0)}),e.watch(T,async()=>{S.value&&typeof S.value.updatePopper=="function"&&(await e.nextTick(),S.value.updatePopper())}),e.watch(ne,()=>{ve()}),e.watch(Ee,(t,l)=>{if(JSON.stringify(t)!==JSON.stringify(l)){if(!t.length){J();return}const o=new Set(l),a=new Set(t),s=r.value.filter(g=>a.has(g.value)),n=d.value.filter(g=>!a.has(g.value)&&o.has(g.value));n.length&&Me(n),s.length&&re(s)}}),e.watch(()=>u.items,(t,l)=>{var g,c;if(JSON.stringify(t)===JSON.stringify(l))return;const o=M(u.items),a=o.some(i=>C(i)),s=[],n=[];if(a)for(const i of o)C(i)?s.push(...i.items):s.push(i);else{const i=new Map;for(const v of o)C(v)||(v.group&&(i.has(v.group)||i.set(v.group,[]),i.get(v.group).push(v)),s.push(v));const x=Array.from(i.keys()).sort((v,B)=>v.toLowerCase().localeCompare(B.toLowerCase())),y=s.filter(v=>!v.group);n.push(...y);for(const v of x)n.push({label:v,items:i.get(v)})}r.value=s;for(let i=0;i<r.value.length;i++){r.value[i].selected===void 0&&(r.value[i].selected=!1);let x=`${(c=(g=r.value[i].label)==null?void 0:g.replace(/ /gi,"-"))==null?void 0:c.replace(/[^a-z0-9-_]/gi,"")}-${i}`;if(x.includes("undefined")&&(x=`multiselect-item-label-${i}`),r.value[i].key=x,u.modelValue.includes(r.value[i].value)||r.value[i].selected){const y=r.value[i];y.selected=!0,d.value.filter(v=>v.value===y.value).length||d.value.push(y),m.value.filter(v=>v.value===y.value).length||m.value.push(y)}}if(a){const i=[],x=[];for(const y of o)if(C(y)){const v=y.items.map(B=>r.value.find(De=>De.value===B.value)).filter(B=>B!==void 0);x.push({label:y.label,key:y.key,items:v})}else{const v=r.value.find(B=>B.value===y.value);v&&i.push(v)}n.push(...i,...x)}k.value=n,V(),S.value&&typeof S.value.updatePopper=="function"&&e.nextTick(()=>{S.value.updatePopper()})},{deep:!0,immediate:!0});const K=e.ref(300),he=async()=>{var t;K.value=300,await e.nextTick(),K.value=((t=F.value)==null?void 0:t.clientWidth)||300,V()},D=e.ref();return e.onMounted(()=>{Xe.useEventListener("resize",he),D.value=je.ResizeObserverHelper.create(he),D.value.observe(F.value)}),e.onBeforeUnmount(()=>{D.value&&F.value&&D.value.unobserve(F.value)}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["k-multiselect",[t.$attrs.class,{"multiselect-error":u.error}]]),style:e.normalizeStyle(Ke.value)},[u.label?(e.openBlock(),e.createBlock(Ue.default,e.mergeProps({key:0},u.labelAttributes,{"data-testid":u.labelAttributes["data-testid"]?u.labelAttributes["data-testid"]:"multiselect-label",for:ee.value,required:X.value}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(we.value)+" ",1)]),_:2},[Ce.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1040,["data-testid","for","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",_e,[e.createVNode(Oe.default,null,{default:e.withCtx(({isToggled:o,toggle:a})=>[e.createVNode(Re.default,e.mergeProps({ref_key:"popper",ref:S,"hide-close-icon":"",offset:e.unref(U.KUI_SPACE_40)},Ae.value,{onClose:()=>ie(!1,o,a),onOpen:()=>ie(!0,o,a)}),{content:e.withCtx(()=>[e.createElementVNode("div",{class:"multiselect-list",onClick:l[7]||(l[7]=e.withModifiers(()=>{},["stop"])),onMouseenter:l[8]||(l[8]=()=>q.value=!0),onMouseleave:l[9]||(l[9]=()=>q.value=!1)},[!u.collapsedContext&&!I.value?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(ge.default,{ref:"multiselectDropdownInputElement",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"multiselect-dropdown-input","data-testid":"multiselect-dropdown-input","model-value":p.value,name:"multiselect-options-search",placeholder:u.searchPlaceholder||vt,spellcheck:"false",type:"text",onClick:l[5]||(l[5]=e.withModifiers(()=>{},["stop"])),onFocus:pe,onKeydown:e.withKeys(ce,["enter"]),onKeyup:[Fe,l[6]||(l[6]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))],"onUpdate:modelValue":fe},null,8,["model-value","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(Ge.default,{ref:"kMultiselectItems","filter-string":p.value,"item-creation-enabled":u.enableItemCreation&&ae.value,"item-creation-valid":u.itemCreationValidator(p.value),items:P.value,onAddItem:de,onSelected:W},{content:e.withCtx(({item:s})=>[e.renderSlot(t.$slots,"item-template",{class:"multiselect-item",item:s},void 0,!0)]),_:3},8,["filter-string","item-creation-enabled","item-creation-valid","items"]),!P.value.length&&!t.$slots.empty&&!u.enableItemCreation?(e.openBlock(),e.createBlock(We.default,{key:"multiselect-empty-item",class:"multiselect-empty-item","data-testid":"multiselect-empty-item",item:{label:"No results",value:"no_results",disabled:!0}})):e.createCommentVNode("",!0),t.$slots.empty&&!u.loading&&!P.value.length?(e.openBlock(),e.createElementBlock("div",nt,[e.renderSlot(t.$slots,"empty",{},void 0,!0)])):e.createCommentVNode("",!0)],32),u.dropdownFooterText||t.$slots["dropdown-footer-text"]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dropdown-footer",`dropdown-footer-${u.dropdownFooterTextPosition}`]),"data-testid":"dropdown-footer"},[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(u.dropdownFooterText),1)],!0)],2)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",e.mergeProps({id:ee.value,ref:"multiselectElement",class:["multiselect-trigger",{focused:G.value,hovered:q.value,disabled:E.value,readonly:I.value}],"data-testid":"multiselect-trigger",role:"listbox",tabindex:E.value||I.value||u.collapsedContext?-1:0},Be.value,{onClick:ze,onKeydown:[e.withKeys(me,["enter"]),e.withKeys(me,["space"])]}),[u.collapsedContext?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(ge.default,{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:e.normalizeClass(["multiselect-input",{"is-readonly":I.value}]),"data-testid":"multiselect-input",disabled:E.value,"model-value":p.value,name:"multiselect-options-search",placeholder:se.value,readonly:I.value?!0:void 0,spellcheck:"false",type:"text",onBlur:l[0]||(l[0]=()=>G.value=!1),onClick:s=>{o.value&&s.stopPropagation()},onFocus:Pe,onKeydown:e.withKeys(ce,["enter"]),onKeyup:s=>Te(s,o),onMouseenter:l[1]||(l[1]=()=>q.value=!0),onMouseleave:l[2]||(l[2]=()=>q.value=!1),"onUpdate:modelValue":fe},null,8,["class","disabled","model-value","placeholder","readonly","onClick","onKeyup"])])):d.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,class:"selection-badges-container","data-testid":"selection-badges-container",style:e.normalizeStyle(ue.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(s,n)=>(e.openBlock(),e.createBlock(L.default,{key:`${e.unref(te)}-${s.key?s.key:n}-badge-${T.value}`,appearance:Y(s),class:"multiselect-selection-badge","icon-before":!1,tooltip:s.label,"truncation-tooltip":"",onClick:l[3]||(l[3]=e.withModifiers(()=>{},["stop"]))},e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"item-badge-icon",{item:s},void 0,!0),e.createElementVNode("span",at,e.toDisplayString(s.label),1)]),_:2},[s.selected&&!s.disabled&&!E.value&&!I.value?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":`Unselect ${s.label}`,class:"badge-dismiss-button","data-testid":"badge-dismiss-button",type:"button",onClick:g=>W(s)},[e.createVNode(e.unref(Z.default),{decorative:""})],8,ot)]),key:"0"}:void 0]),1032,["appearance","tooltip"]))),128)),A.value.length?(e.openBlock(),e.createBlock(He.default,{key:0,class:"hidden-selection-count-tooltip","max-width":"300",text:xe.value},{default:e.withCtx(()=>[e.createVNode(L.default,{appearance:Y(),class:"hidden-selection-count","data-testid":"hidden-selection-count",onClick:l[4]||(l[4]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(A.value.length),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):e.createCommentVNode("",!0)],4)):(e.openBlock(),e.createElementBlock("div",lt,e.toDisplayString(se.value),1)),e.createElementVNode("div",ut,[!u.loading&&d.value.length&&o.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":"Clear",class:"multiselect-clear-icon","data-testid":"multiselect-clear-icon",type:"button",onClick:J},[e.createVNode(e.unref(Z.default),{size:e.unref(U.KUI_ICON_SIZE_40)},null,8,["size"])])):u.loading?(e.openBlock(),e.createBlock(e.unref(Ze.default),{key:1,class:"multiselect-loading-icon",size:e.unref(U.KUI_ICON_SIZE_40),title:"Loading"},null,8,["size"])):(e.openBlock(),e.createBlock(e.unref(Je.default),{key:2,class:"multiselect-chevron-icon",decorative:"",size:e.unref(U.KUI_ICON_SIZE_40)},null,8,["size"]))])],16,et)]),_:2},1040,["offset","onClose","onOpen"])]),_:3})]),u.help?(e.openBlock(),e.createElementBlock("p",it,e.toDisplayString(u.help),1)):e.createCommentVNode("",!0),u.collapsedContext?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rt,[(e.openBlock(),e.createElementBlock("div",{key:N.value,ref:"multiselectSelectionsStagingElement",class:"selection-badges-container staging",style:e.normalizeStyle(ue.value),tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,a)=>(e.openBlock(),e.createBlock(L.default,{key:`${e.unref(te)}-${o.key?o.key:a}-badge`,"aria-hidden":"true",class:"multiselect-selection-badge","icon-before":!1},e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"item-badge-icon",{item:o},void 0,!0),e.createElementVNode("span",ct,e.toDisplayString(o.label),1)]),_:2},[o.selected&&!o.disabled&&!E.value&&!I.value?{name:"icon",fn:e.withCtx(()=>[e.createVNode(e.unref(Z.default),{"aria-hidden":"true"})]),key:"0"}:void 0]),1024))),128)),e.createVNode(L.default,{"aria-hidden":"true",class:"hidden-selection-count"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(h.value.length),1)]),_:1})],4))]))],6))}});exports.default=ft;
|
package/dist/kongponents122.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),K=require("./kongponents43.cjs"),x=require("./kongponents32.cjs"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),K=require("./kongponents43.cjs"),x=require("./kongponents32.cjs"),j=require("./kongponents184.cjs"),L=require("./kongponents185.cjs"),U=require("./kongponents186.cjs"),W=require("./kongponents187.cjs"),R=require("./kongponents188.cjs"),Z=require("./kongponents169.cjs"),Q={class:"pagination-text large-screen","data-testid":"visible-items"},X={class:"pagination-text-pages"},Y={class:"pagination-button-container"},_={key:0},ee={key:1,class:"pagination-button placeholder"},te=["aria-current","aria-label","data-testid","onClick"],ae={key:2,class:"pagination-button placeholder"},le={key:3},ne={class:"page-size-select"},oe={key:0,class:"pagination-text small-screen","data-testid":"visible-items"},ue={class:"pagination-text-pages"},ie=e.defineComponent({__name:"KPagination",props:{items:{default:()=>[]},totalCount:{default:0},pageSizes:{default:()=>[15,30,50,75,100]},initialPageSize:{default:null},neighbors:{default:1},currentPage:{default:null},disablePageJump:{type:Boolean},offset:{type:Boolean},offsetPreviousButtonDisabled:{type:Boolean},offsetNextButtonDisabled:{type:Boolean}},emits:["pageChange","pageSizeChange","getNextOffset","getPreviousOffset"],setup(t,{emit:$}){const J={placement:"top"},k=$,f=e.ref(null),C=e.ref(),l=e.ref(t.currentPage?t.currentPage:1),s=e.ref(t.initialPageSize?t.initialPageSize:t.pageSizes[0]??Z.DEFAULT_PAGE_SIZE),o=e.computed(()=>Math.ceil(t.totalCount/s.value)),P=t.pageSizes.map((a,u)=>({label:`${a}`,key:`size-${u}`,value:a,selected:a===s.value})),q=e.computed(()=>`${s.value} ${s.value===1?"item per page":" items per page"}`),n=e.ref(t.neighbors),r=e.ref(3),G=async()=>(await e.nextTick(),f.value?f.value.scrollWidth>f.value.clientWidth:!1),z=async()=>{await G()&&(n.value>1||r.value>1)&&(n.value>1?n.value--:r.value>1&&r.value--,b.value=y(l.value,o.value,g.value,c.value))},y=(a,u,i,S)=>{if(t.disablePageJump)return[];let d=[...Array(u).keys()].map(v=>v+1);const H=r.value+2+2*n.value;return d.length<=H||(i?i&&S?d=d.filter(v=>v>a-n.value-1&&v<a+n.value+1):i&&!S&&(d=d.filter(v=>v>u-n.value*2-r.value)):d=d.filter(v=>v<=n.value*2+r.value)),d},V=e.ref(l.value===1),B=e.ref(l.value===o.value),h=e.computed(()=>(l.value-1)*s.value+1),N=e.computed(()=>{const a=h.value-1+s.value;return a>t.totalCount?t.totalCount:a}),w=e.computed(()=>`${h.value} to ${N.value}`),D=e.computed(()=>` of ${t.totalCount}`),m=e.computed(()=>t.currentPage?t.currentPage:l.value),O=e.computed(()=>5+2*n.value),g=e.ref(m.value>=n.value+(r.value+1)&&o.value>O.value),c=e.ref(o.value>r.value+2+2*n.value),b=e.ref(y(m.value,o.value,g.value,c.value)),I=()=>{l.value++,E()},T=()=>{l.value--,E()},p=a=>{l.value=a,E()},E=()=>{const a=(l.value-1)*s.value+s.value;B.value=a>=t.totalCount,V.value=l.value===1,o.value<=O.value?(g.value=!1,c.value=!1):(g.value=l.value>=n.value+(r.value+1),c.value=l.value<=o.value-n.value-r.value),b.value=y(l.value,o.value,g.value,c.value),k("pageChange",{page:l.value,pageCount:o.value,firstItem:h.value,lastItem:N.value,visibleItems:t.items.slice(h.value-1,N.value)})},A=a=>{s.value!==a.value&&(s.value=a.value,k("pageSizeChange",{pageSize:s.value,pageCount:o.value}),t.currentPage!==1&&p(1))},F=()=>{k("getNextOffset")},M=()=>{k("getPreviousOffset")};return e.watch(()=>t.currentPage,(a,u)=>{a!==u&&a&&p(a)}),e.watch(o,(a,u)=>{a!==u&&(B.value=l.value===a,c.value=a>r.value+2+2*n.value,b.value=y(m.value,a,!1,c.value))}),e.watch(b,()=>{!t.disablePageJump&&!t.offset&&z()}),e.onMounted(()=>{!t.disablePageJump&&!t.offset&&(C.value=R.ResizeObserverHelper.create(z),C.value.observe(f.value))}),e.onBeforeUnmount(()=>{var a;!t.disablePageJump&&!t.offset&&((a=C.value)==null||a.unobserve(f.value))}),(a,u)=>(e.openBlock(),e.createElementBlock("nav",{ref_key:"kPaginationElement",ref:f,class:e.normalizeClass(["k-pagination",{"page-jump":!t.disablePageJump&&!t.offset}]),"data-testid":"k-pagination"},[t.offset?(e.openBlock(),e.createBlock(j.default,{key:1,"next-button-disabled":t.offsetNextButtonDisabled,"previous-button-disabled":t.offsetPreviousButtonDisabled,onGetNextOffset:F,onGetPreviousOffset:M},null,8,["next-button-disabled","previous-button-disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Q,[e.createElementVNode("span",X,e.toDisplayString(w.value),1),e.createTextVNode(" "+e.toDisplayString(D.value),1)]),e.createElementVNode("ul",Y,[e.createElementVNode("li",null,[e.createVNode(x.default,{appearance:"tertiary","aria-label":"Go to the previous page",class:"pagination-button arrow","data-testid":"previous-button",disabled:V.value,icon:"",size:"small",type:"button",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(L.default),{class:"pagination-arrow-icon",decorative:""})]),_:1},8,["disabled"])]),!t.disablePageJump&&g.value?(e.openBlock(),e.createElementBlock("li",_,[e.createElementVNode("button",{"aria-label":"Go to the first page",class:"pagination-button","data-testid":"page-1-button",type:"button",onClick:u[0]||(u[0]=i=>p(1))}," 1 ")])):e.createCommentVNode("",!0),!t.disablePageJump&&g.value?(e.openBlock(),e.createElementBlock("li",ee," ... ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,i=>(e.openBlock(),e.createElementBlock("li",{key:i},[e.createElementVNode("button",{"aria-current":i==m.value&&"page"||void 0,"aria-label":`Go to page ${i}`,class:e.normalizeClass(["pagination-button",{active:i==m.value}]),"data-testid":`page-${i}-button`,type:"button",onClick:S=>p(i)},e.toDisplayString(i),11,te)]))),128)),!t.disablePageJump&&c.value?(e.openBlock(),e.createElementBlock("li",ae," ... ")):e.createCommentVNode("",!0),!t.disablePageJump&&c.value?(e.openBlock(),e.createElementBlock("li",le,[e.createElementVNode("button",{"aria-label":"Go to the last page",class:"pagination-button","data-testid":"last-button",type:"button",onClick:u[1]||(u[1]=i=>p(o.value))},e.toDisplayString(o.value),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",null,[e.createVNode(x.default,{appearance:"tertiary","aria-label":"Go to the next page",class:"pagination-button arrow","data-testid":"next-button",disabled:B.value?!0:void 0,icon:"",size:"small",type:"button",onClick:I},{default:e.withCtx(()=>[e.createVNode(e.unref(W.default),{class:"pagination-arrow-icon",decorative:""})]),_:1},8,["disabled"])])])],64)),e.createElementVNode("div",ne,[!t.disablePageJump&&!t.offset?(e.openBlock(),e.createElementBlock("span",oe,[e.createElementVNode("span",ue,e.toDisplayString(w.value),1),e.createTextVNode(" "+e.toDisplayString(D.value),1)])):e.createCommentVNode("",!0),e.createVNode(K.default,{class:"page-size-dropdown","data-testid":"page-size-dropdown",disabled:e.unref(P).length<=1,items:e.unref(P),"kpop-attributes":J,"selection-menu":"",onChange:A},{default:e.withCtx(()=>[e.createVNode(x.default,{appearance:"tertiary",class:"page-size-dropdown-trigger","data-testid":"page-size-dropdown-trigger",disabled:e.unref(P).length<=1,size:"small",type:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(q.value)+" ",1),e.unref(P).length>1?(e.openBlock(),e.createBlock(e.unref(U.default),{key:0,decorative:""})):e.createCommentVNode("",!0)]),_:1},8,["disabled"])]),_:1},8,["disabled","items"])])],2))}});exports.default=ie;
|
package/dist/kongponents124.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),$=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),$=require("./kongponents221.cjs"),D=require("./kongponents32.cjs"),M=require("./kongponents172.cjs"),S=require("./kongponents177.cjs"),F=require("./kongponents222.cjs"),d=require("./kongponents179.cjs"),f=require("./kongponents180.cjs"),m=require("./kongponents223.cjs"),Z=["id","aria-labelledby","x-placement"],j=["tabindex"],R={key:1,class:"popover-header"},G=["id"],J={key:2,class:"popover-footer"},Q=e.defineComponent({__name:"KPop",props:{buttonText:{default:""},title:{default:""},placement:{default:"auto"},trigger:{default:"click"},popoverTimeout:{default:300},hideCloseIcon:{type:Boolean},hideCaret:{type:Boolean},closeOnPopoverClick:{type:Boolean},disabled:{type:Boolean},width:{default:"200px"},maxWidth:{default:"none"},maxHeight:{default:"none"},popoverClasses:{default:""},popoverElementAttributes:{default:()=>({})},tag:{default:"div"},zIndex:{default:1e3},offset:{default:()=>S.KUI_SPACE_60},target:{default:null}},emits:["open","close","popover-click"],setup(t,{expose:B,emit:z}){const g=z,s=e.useSlots(),h=e.useId(),E=e.useId(),u=e.ref(null),i=e.ref(null),n=e.ref(!1),r=e.computed(()=>{var o,a;return u.value&&((o=u.value)!=null&&o.children[0])?(a=u.value)==null?void 0:a.children[0]:null}),C=e.ref(null),I=()=>{n.value?l():v()},y=e.ref(),k=()=>{y.value&&y.value()},N=()=>{k(),r.value&&i.value&&(y.value=m.autoUpdate(r.value,i.value,U))},v=async()=>{t.disabled||(C.value&&clearTimeout(C.value),N(),n.value=!0)},l=()=>{C.value=setTimeout(()=>{k(),n.value=!1},t.trigger==="hover"?t.popoverTimeout:0)},P=()=>{I()},V=()=>{g("popover-click"),t.closeOnPopoverClick&&l()},T=o=>{var w,x;if(!n.value)return;const a=o.target,O=(w=u.value)==null?void 0:w.contains(a),W=(x=i.value)==null?void 0:x.contains(a);O||W||l()},b=e.computed(()=>t.placement.trim().replace(/ /g,"-").replace(/[A-Z]+(?![a-z])|[A-Z]/g,(o,a)=>(a?"-":"")+o.toLowerCase()).replace(/--+/g,"-").replace(/-+$/g,"")),{floatingStyles:q,placement:c,update:U}=$.useFloating(r,i,{...b.value==="auto"&&{middleware:[m.autoPlacement()]},...b.value!=="auto"&&{placement:b.value,middleware:[m.shift(),m.flip()]},strategy:"fixed",transform:!1}),p=e.computed(()=>f.normalizeSize(t.offset)),K=e.computed(()=>c.value.includes("top")?{marginBottom:p.value}:c.value.includes("bottom")?{marginTop:p.value}:c.value.includes("right")?{marginLeft:p.value}:c.value.includes("left")?{marginRight:p.value}:{}),A=e.computed(()=>({...q.value,zIndex:t.zIndex})),L=e.computed(()=>({...K.value,width:f.normalizeSize(t.width),maxWidth:f.normalizeSize(t.maxWidth),maxHeight:f.normalizeSize(t.maxHeight)})),H=e.computed(()=>[t.popoverClasses,{"hide-caret":t.hideCaret}]);return B({hidePopover:l,showPopover:v}),e.onMounted(()=>{if(d.useEventListener(window,"mousedown",T,{capture:!0}),r.value){const o=r.value.querySelector('button[data-dropdown-trigger="true"]')||r.value;o.hasAttribute("aria-controls")||o.setAttribute("aria-controls",h)}t.trigger==="hover"&&[i.value,r.value].forEach(o=>{o&&(d.useEventListener(o,"mouseenter",v),d.useEventListener(o,"focusin",v),d.useEventListener(o,"mouseleave",l),d.useEventListener(o,"focusout",l))})}),e.onBeforeUnmount(()=>{k()}),e.watch(n,o=>{g(o?"open":"close")}),(o,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:"k-popover",onKeydown:e.withKeys(e.withModifiers(l,["stop"]),["esc"])},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"triggerWrapperElement",ref:u,class:"popover-trigger-wrapper",onClick:P},[e.renderSlot(o.$slots,"default",{},()=>[e.createVNode(D.default,{"aria-controls":e.unref(h),"data-testid":"popover-button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["aria-controls"])],!0)],512),e.createVNode(F.default,{target:t.target,"use-teleport":!!t.target},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"kongponents-fade-transition"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",e.mergeProps(t.popoverElementAttributes,{id:e.unref(h),ref_key:"popoverElement",ref:i,"aria-labelledby":s.title||t.title?e.unref(E):void 0,class:["popover",H.value],role:"dialog",style:A.value,"x-placement":e.unref(c),onClick:V}),[e.createElementVNode("div",{class:"popover-container",style:e.normalizeStyle(L.value)},[t.hideCloseIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,ref:"popoverCloseButton","aria-label":"Close popover",class:"popover-close-button",tabindex:n.value?0:-1,type:"button",onClick:l},[e.createVNode(e.unref(M.default),{class:"popover-close-icon",decorative:"",size:e.unref(S.KUI_ICON_SIZE_30)},null,8,["size"])],8,j)),s.title||t.title?(e.openBlock(),e.createElementBlock("div",R,[s.title||t.title?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(E),class:e.normalizeClass(["popover-title",{"close-icon-spacing":!t.hideCloseIcon}])},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)],10,G)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["popover-content",{"close-icon-spacing":!t.hideCloseIcon&&!(s.title||t.title)}])},[e.renderSlot(o.$slots,"content",{},void 0,!0)],2),s.footer?(e.openBlock(),e.createElementBlock("div",J,[e.renderSlot(o.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],4)],16,Z),[[e.vShow,n.value]])]),_:3})]),_:3},8,["target","use-teleport"])]),_:3},40,["onKeydown"]))}});exports.default=Q;
|
package/dist/kongponents130.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),g=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),g=require("./kongponents218.cjs"),f={class:"k-segmented-control"},k=["data-testid","disabled","onClick"],y=l.defineComponent({__name:"KSegmentedControl",props:{modelValue:{},options:{},size:{default:"small"},disabled:{type:Boolean}},emits:["click","update:modelValue"],setup(a,{emit:u}){const i=t=>t.every(e=>e.value!==void 0),c=t=>{const e=[];return t.forEach(n=>e.push(n.value+"")),e},d=t=>{const e=c(t),n=new Set(e);return e.length===n.size},o=t=>t.map(e=>({label:typeof e=="string"?e:e.label||e.value+"",value:typeof e=="string"?e.toLocaleLowerCase().replace(" ","-"):e.value,disabled:typeof e=="string"?!1:e.disabled})),v=t=>{const e=typeof t[0]=="string",n=o(t),s=d(n);return e?s&&i(n):s};l.watch(()=>a.options,t=>{v(t)||g.warnInvalidProp("options","The options prop must be an array of unique strings or objects with a unique value property.")},{immediate:!0});const r=u,m=l.computed(()=>o(a.options)),p=t=>!!t.disabled||a.disabled,b=t=>{r("click",t.value),r("update:modelValue",t.value)};return(t,e)=>(l.openBlock(),l.createElementBlock("div",f,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value,n=>(l.openBlock(),l.createElementBlock("button",{key:`${n.value}-option`,class:l.normalizeClass(["segmented-control-button",[a.size,{selected:a.modelValue===n.value}]]),"data-testid":`${n.value}-option`,disabled:p(n),type:"button",onClick:s=>b(n)},[l.renderSlot(t.$slots,"option-label",{option:n},()=>[l.createTextVNode(l.toDisplayString(n.label),1)],!0)],10,k))),128))]))}});exports.default=y;
|
package/dist/kongponents132.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Ce=require("./kongponents178.cjs"),we=require("./kongponents50.cjs"),Se=require("./kongponents48.cjs"),Ie=require("./kongponents55.cjs"),Be=require("./kongponents23.cjs"),Fe=require("./kongponents221.cjs"),qe=require("./kongponents222.cjs"),$e=require("./kongponents208.cjs"),Ne=require("./kongponents172.cjs"),xe=require("./kongponents193.cjs"),Ee=require("./kongponents210.cjs"),J=require("./kongponents168.cjs"),Ae=require("./kongponents183.cjs"),Ve=require("./kongponents151.cjs"),Q=require("./kongponents181.cjs"),Te=require("./kongponents177.cjs"),Ke=["id"],Pe=["aria-live"],ze={key:0,class:"select-loading","data-propagate-clicks":"false","data-testid":"select-loading"},De={key:1,class:"select-items-container","data-propagate-clicks":"false"},Oe={key:1,class:"dropdown-footer dropdown-footer-static"},Re={key:2,class:"select-empty","data-propagate-clicks":"false"},Le={key:0,class:"dropdown-footer dropdown-footer-sticky"},Me=e.defineComponent({inheritAttrs:!1,__name:"KSelect",props:{modelValue:{default:""},kpopAttributes:{default:()=>({})},dropdownMaxHeight:{default:"300px"},label:{default:""},labelAttributes:{default:()=>({})},width:{default:"100%"},placeholder:{default:""},items:{default:()=>[]},enableFiltering:{type:Boolean},filterFunction:{default:()=>(l=>{var B;return(B=l.items)==null?void 0:B.filter(x=>{var f,v;return(v=x.label)==null?void 0:v.toLowerCase().includes((f=l.query)==null?void 0:f.toLowerCase())})})},loading:{type:Boolean},clearable:{type:Boolean},dropdownFooterText:{default:""},dropdownFooterTextPosition:{default:"sticky"},reuseItemTemplate:{type:Boolean},enableItemCreation:{type:Boolean},itemCreationValidator:{type:Function,default:()=>!0},error:{type:Boolean},help:{default:""}},emits:["selected","input","change","update:modelValue","query-change","item-added","item-removed"],setup(l,{emit:B}){e.useCssVars(t=>({v74ae4111:le.value,de945f02:$.value,v7010b8b0:re.value}));const{stripRequiredLabel:x}=Ce.default(),f=B,v=e.useAttrs(),g=e.useSlots(),j=e.useId(),P=e.computed(()=>v.id?String(v.id):j),E=e.ref(!1),A=e.ref(),Y=e.computed(()=>{var t;return!!((t=l.labelAttributes)!=null&&t.info||g["label-tooltip"])}),z=e.computed(()=>v.required!==void 0&&String(v.required)!=="false"),C=e.computed(()=>v.disabled!==void 0&&String(v.disabled)!=="false"),F=e.computed(()=>v.readonly!==void 0&&String(v.readonly)!=="false"),D={popoverClasses:`k-select-popover select-popover ${l.dropdownFooterText||g["dropdown-footer-text"]?`has-${l.dropdownFooterTextPosition}-dropdown-footer`:""}`,popoverTimeout:0,placement:"bottom-start",hideCaret:!0},X=e.ref(0),Z=e.useTemplateRef("inputElement"),_=e.computed(()=>x(l.label,z.value)),w=e.ref(!1),i=e.ref(""),O=e.computed(()=>{var t,o;return!(!i.value||(o=(t=u.value)==null?void 0:t.filter(a=>a.label===i.value))!=null&&o.length)}),ee=e.useId(),d=e.ref(null),u=e.ref([]),q=e.ref([]),S=e.ref(!1),V=e.useTemplateRef("popperElement"),y=e.useTemplateRef("selectWrapperElement"),te=e.computed({get(){return l.modelValue},set(t){var a;const o=(a=u.value)==null?void 0:a.filter(n=>n.value===t);o!=null&&o.length?N(o[0]):t||K()}}),le=e.computed(()=>Q.normalizeSize(l.width||"100%")),$=e.ref(""),oe=e.computed(()=>{const t={...v};return delete t.class,t}),ae=e.computed(()=>{var t;return{...D,...l.kpopAttributes,popoverClasses:`${D.popoverClasses} ${((t=l.kpopAttributes)==null?void 0:t.popoverClasses)??""}`,width:String($.value),maxWidth:String($.value),disabled:C.value||F.value}}),re=e.computed(()=>Q.normalizeSize(l.dropdownMaxHeight)),ne=e.computed(()=>({...ae.value})),se=e.computed(()=>l.placeholder||v.placeholder||"Select..."),ue=e.computed(()=>!C.value&&l.clearable&&!!d.value),R=e.computed(()=>!!(d.value&&(g["selected-item-template"]||l.reuseItemTemplate&&g["item-template"]))),I=t=>"items"in t&&Array.isArray(t.items),T=e.computed(()=>{if(!l.enableFiltering||!i.value)return q.value;const t=l.filterFunction({query:i.value,items:u.value}),o=t===!0?u.value:t,a=new Set(o.map(r=>r.value)),n=[];for(const r of q.value)if(I(r)){const p=r.items.filter(b=>a.has(b.value));p.length>0&&n.push({label:r.label,key:r.key,items:p})}else a.has(r.value)&&n.push(r);return n}),ie=t=>{if(!l.enableFiltering)return t.preventDefault(),!1},ce=t=>{l.enableItemCreation&&L(),t.preventDefault()},L=()=>{var a,n;if(!l.enableItemCreation||!i.value||!O.value||!l.itemCreationValidator(i.value))return;const t=(((a=u.value)==null?void 0:a.length)||0)+1,o={label:J.sanitizeInput(i.value),value:Ve.getUniqueStringId(),key:`${(n=J.sanitizeInput(i.value).replace(/ /gi,"-"))==null?void 0:n.replace(/[^a-z0-9-_]/gi,"")}-${t}`,custom:!0};f("item-added",o),N(o,!0),i.value=""},N=(t,o)=>{var a,n;o&&((a=u.value)==null||a.push(t),q.value.unshift(t)),(n=u.value)==null||n.forEach((r,p)=>{var b;r.key===t.key?(r.selected=!0,d.value=r):r.selected?(r.selected=!1,r.custom&&((b=u.value)==null||b.splice(p,1),f("item-removed",r))):r.selected=!1}),w.value=!0,i.value=t.label},K=()=>{var t;(t=u.value)==null||t.forEach((o,a)=>{var n;o.selected=!1,o.custom&&((n=u.value)==null||n.splice(a,1),f("item-removed",o))}),d.value=null,i.value="",f("input",null),f("change",null),f("update:modelValue",null)},M=e.useTemplateRef("kSelectItems"),de=(t,o)=>{var n,r;if(t.keyCode===27){o.value=!1;return}const a=(n=y.value)==null?void 0:n.children[0];!o.value&&a&&a.click(),(t.key==="ArrowDown"||t.key==="ArrowUp")&&o.value&&((r=M.value)==null||r.setFocus(t.key==="ArrowDown"?"down":"up"))},fe=t=>{i.value!==t&&(i.value=t)},ve=()=>{S.value=!0},pe=()=>{S.value=!1},me=()=>{var t,o,a;l.enableFiltering||(a=(o=(t=Z.value)==null?void 0:t.$el)==null?void 0:o.querySelector("input"))==null||a.blur()},be=t=>{var o;(C.value||((o=t==null?void 0:t.target)==null?void 0:o.dataset.propagateClicks)==="false")&&t.stopPropagation()},he=t=>{t()},ke=(t,o)=>{E.value=!1,d.value?(w.value=!0,i.value=d.value.label):i.value="",o&&t()},ye=t=>{E.value=!0,l.enableFiltering&&(i.value=""),t()};return e.watch(te,(t,o)=>{var a;if(t!==o){const n=(a=u.value)==null?void 0:a.filter(r=>r.value===t);n!=null&&n.length?N(n[0]):t||K()}}),e.watch(()=>l.items,(t,o)=>{var b,W,U,H,G;if(JSON.stringify(t)===JSON.stringify(o))return;const a=JSON.parse(JSON.stringify(l.items)),n=a.some(s=>I(s)),r=[],p=[];if(n)for(const s of a)I(s)?r.push(...s.items):r.push(s);else{const s=new Map;for(const c of a)I(c)||(c.group&&(s.has(c.group)||s.set(c.group,[]),s.get(c.group).push(c)),r.push(c));const m=Array.from(s.keys()).sort((c,k)=>c.toLowerCase().localeCompare(k.toLowerCase())),h=r.filter(c=>!c.group);p.push(...h);for(const c of m)p.push({label:c,items:s.get(c)})}u.value=r,(b=u.value)!=null&&b.length&&(d.value=null);for(let s=0;s<((W=u.value)==null?void 0:W.length);s++){u.value[s].selected===void 0&&(u.value[s].selected=!1);let m=`${(H=(U=u.value[s].label)==null?void 0:U.replace(/ /gi,"-"))==null?void 0:H.replace(/[^a-z0-9-_]/gi,"")}-${s}`;m.includes("undefined")&&(m=`select-item-label-${s}`),u.value[s].key=m,(u.value[s].value===l.modelValue||u.value[s].selected)&&(u.value[s].selected=!0,d.value=u.value[s],S.value||(w.value=!0,i.value=d.value.label)),((G=d.value)==null?void 0:G.value)===u.value[s].value&&(u.value[s].selected=!0)}if(n){const s=[],m=[];for(const h of a)if(I(h)){const c=h.items.map(k=>u.value.find(ge=>ge.value===k.value)).filter(k=>k!==void 0);m.push({label:h.label,key:h.key,items:c})}else{const c=u.value.find(k=>k.value===h.value);c&&s.push(c)}p.push(...s,...m)}q.value=p,V.value&&typeof V.value.updatePopper=="function"&&e.nextTick(()=>{V.value.updatePopper()})},{deep:!0,immediate:!0}),e.watch(i,t=>{w.value&&t||(f("query-change",t),w.value=!1)}),e.watch(d,(t,o)=>{t&&t!==o&&(f("selected",t),f("input",t.value),f("change",t),f("update:modelValue",t.value))},{deep:!0}),e.onMounted(()=>{y.value&&(A.value=Ee.ResizeObserverHelper.create(()=>{var t;$.value=`${(t=y.value)==null?void 0:t.offsetWidth}px`}),A.value.observe(y.value)),Ae.useEventListener(document,"keydown",t=>{var o,a;!l.enableFiltering&&((o=document.activeElement)==null?void 0:o.tagName)==="BODY"&&!S.value&&E.value&&(t.key==="ArrowDown"||t.key==="ArrowUp")&&(t.preventDefault(),(a=M.value)==null||a.setFocus(t.key==="ArrowDown"?"down":"up"))})}),e.onBeforeUnmount(()=>{var t;y.value&&((t=A.value)==null||t.unobserve(y.value))}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["k-select",[t.$attrs.class]])},[l.label?(e.openBlock(),e.createBlock(we.default,e.mergeProps({key:0,"data-testid":"select-label"},l.labelAttributes,{for:P.value,required:z.value}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value)+" ",1)]),_:2},[Y.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1040,["for","required"])):e.createCommentVNode("",!0),e.createVNode(Be.default,null,{default:e.withCtx(({toggle:a,isToggled:n})=>[e.createVNode(Ie.default,e.mergeProps({ref:"popperElement"},ne.value,{"close-on-popover-click":"","hide-close-icon":"",offset:e.unref(Te.KUI_SPACE_40),onClose:()=>ke(a,n.value),onOpen:()=>ye(a),onPopoverClick:()=>he(a)}),{content:e.withCtx(()=>[e.createElementVNode("div",{"aria-live":l.enableFiltering?"polite":"off"},[l.enableFiltering&&l.loading?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(xe.default),{class:"loading-icon",title:"Loading"})],!0)])):(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(Fe.default,{ref:"kSelectItems","filter-string":i.value,"item-creation-enabled":l.enableItemCreation&&O.value,"item-creation-valid":l.itemCreationValidator(i.value),items:T.value,onAddItem:L,onSelected:N},{content:e.withCtx(({item:r})=>[e.renderSlot(t.$slots,"item-template",{item:r},void 0,!0)]),_:3},8,["filter-string","item-creation-enabled","item-creation-valid","items"]),!T.value.length&&!t.$slots.empty&&!l.enableItemCreation?(e.openBlock(),e.createBlock(qe.default,{key:0,item:{label:"No results",value:"no_results",disabled:!0}})):e.createCommentVNode("",!0),(l.dropdownFooterText||t.$slots["dropdown-footer-text"])&&l.dropdownFooterTextPosition==="static"?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(l.dropdownFooterText),1)],!0)])):e.createCommentVNode("",!0)])),!l.loading&&!T.value.length&&t.$slots.empty?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(t.$slots,"empty",{},void 0,!0)])):e.createCommentVNode("",!0)],8,Pe),(l.dropdownFooterText||t.$slots["dropdown-footer-text"])&&l.dropdownFooterTextPosition==="sticky"?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(l.dropdownFooterText),1)],!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",{id:e.unref(ee),ref:"selectWrapperElement",class:"select-wrapper","data-testid":"select-wrapper",role:"listbox",onClick:be},[(e.openBlock(),e.createBlock(Se.default,e.mergeProps({id:P.value,key:X.value,ref:"inputElement",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:["select-input",{"filtering-disabled":!l.enableFiltering,"hide-model-value":R.value&&(!l.enableFiltering||!n.value),"input-has-focus":S.value||n.value}],"data-testid":"select-input",disabled:C.value,error:l.error,"model-value":i.value,name:"select-options-search",placeholder:d.value&&!l.enableFiltering?d.value.label:se.value,readonly:F.value,spellcheck:"false"},oe.value,{onBlur:pe,onClick:me,onFocus:ve,onKeydown:e.withKeys(ce,["enter"]),onKeypress:ie,onKeyup:[r=>de(r,n),o[0]||(o[0]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))],"onUpdate:modelValue":fe}),e.createSlots({after:e.withCtx(()=>[ue.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":"Clear",class:"clear-selection-button","data-testid":"clear-selection-icon",type:"button",onClick:e.withModifiers(K,["stop"])},[e.createVNode(e.unref(Ne.default),{decorative:""})])):e.createCommentVNode("",!0),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref($e.default),{key:1,class:e.normalizeClass(["chevron-down-icon",{disabled:C.value}]),decorative:""},null,8,["class"]))]),_:2},[g.before?{name:"before",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"before",{},void 0,!0)]),key:"0"}:void 0,t.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"1"}:void 0]),1040,["id","class","disabled","error","model-value","placeholder","readonly","onKeyup"])),e.createVNode(e.Transition,{name:"kongponents-fade-transition"},{default:e.withCtx(()=>[R.value&&(!l.enableFiltering||!n.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["custom-selected-item-wrapper",{clearable:l.clearable,readonly:F.value}])},[e.renderSlot(t.$slots,"selected-item-template",{item:d.value},()=>[e.renderSlot(t.$slots,"item-template",{item:d.value},void 0,!0)],!0)],2)):e.createCommentVNode("",!0)]),_:2},1024)],8,Ke)]),_:2},1040,["offset","onClose","onOpen","onPopoverClick"])]),_:3}),l.help?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(["help-text",{"select-error":l.error}])},e.toDisplayString(l.help),3)):e.createCommentVNode("",!0)],2))}});exports.default=Me;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Ce=require("./kongponents183.cjs"),we=require("./kongponents50.cjs"),Se=require("./kongponents48.cjs"),Ie=require("./kongponents55.cjs"),Be=require("./kongponents23.cjs"),Fe=require("./kongponents208.cjs"),qe=require("./kongponents209.cjs"),$e=require("./kongponents186.cjs"),Ne=require("./kongponents172.cjs"),xe=require("./kongponents196.cjs"),Ee=require("./kongponents188.cjs"),J=require("./kongponents168.cjs"),Ae=require("./kongponents179.cjs"),Ve=require("./kongponents151.cjs"),Q=require("./kongponents180.cjs"),Te=require("./kongponents177.cjs"),Ke=["id"],Pe=["aria-live"],ze={key:0,class:"select-loading","data-propagate-clicks":"false","data-testid":"select-loading"},De={key:1,class:"select-items-container","data-propagate-clicks":"false"},Oe={key:1,class:"dropdown-footer dropdown-footer-static"},Re={key:2,class:"select-empty","data-propagate-clicks":"false"},Le={key:0,class:"dropdown-footer dropdown-footer-sticky"},Me=e.defineComponent({inheritAttrs:!1,__name:"KSelect",props:{modelValue:{default:""},kpopAttributes:{default:()=>({})},dropdownMaxHeight:{default:"300px"},label:{default:""},labelAttributes:{default:()=>({})},width:{default:"100%"},placeholder:{default:""},items:{default:()=>[]},enableFiltering:{type:Boolean},filterFunction:{default:()=>(l=>{var B;return(B=l.items)==null?void 0:B.filter(x=>{var f,v;return(v=x.label)==null?void 0:v.toLowerCase().includes((f=l.query)==null?void 0:f.toLowerCase())})})},loading:{type:Boolean},clearable:{type:Boolean},dropdownFooterText:{default:""},dropdownFooterTextPosition:{default:"sticky"},reuseItemTemplate:{type:Boolean},enableItemCreation:{type:Boolean},itemCreationValidator:{type:Function,default:()=>!0},error:{type:Boolean},help:{default:""}},emits:["selected","input","change","update:modelValue","query-change","item-added","item-removed"],setup(l,{emit:B}){e.useCssVars(t=>({v74ae4111:le.value,de945f02:$.value,v7010b8b0:re.value}));const{stripRequiredLabel:x}=Ce.default(),f=B,v=e.useAttrs(),g=e.useSlots(),j=e.useId(),P=e.computed(()=>v.id?String(v.id):j),E=e.ref(!1),A=e.ref(),Y=e.computed(()=>{var t;return!!((t=l.labelAttributes)!=null&&t.info||g["label-tooltip"])}),z=e.computed(()=>v.required!==void 0&&String(v.required)!=="false"),C=e.computed(()=>v.disabled!==void 0&&String(v.disabled)!=="false"),F=e.computed(()=>v.readonly!==void 0&&String(v.readonly)!=="false"),D={popoverClasses:`k-select-popover select-popover ${l.dropdownFooterText||g["dropdown-footer-text"]?`has-${l.dropdownFooterTextPosition}-dropdown-footer`:""}`,popoverTimeout:0,placement:"bottom-start",hideCaret:!0},X=e.ref(0),Z=e.useTemplateRef("inputElement"),_=e.computed(()=>x(l.label,z.value)),w=e.ref(!1),i=e.ref(""),O=e.computed(()=>{var t,o;return!(!i.value||(o=(t=u.value)==null?void 0:t.filter(a=>a.label===i.value))!=null&&o.length)}),ee=e.useId(),d=e.ref(null),u=e.ref([]),q=e.ref([]),S=e.ref(!1),V=e.useTemplateRef("popperElement"),y=e.useTemplateRef("selectWrapperElement"),te=e.computed({get(){return l.modelValue},set(t){var a;const o=(a=u.value)==null?void 0:a.filter(n=>n.value===t);o!=null&&o.length?N(o[0]):t||K()}}),le=e.computed(()=>Q.normalizeSize(l.width||"100%")),$=e.ref(""),oe=e.computed(()=>{const t={...v};return delete t.class,t}),ae=e.computed(()=>{var t;return{...D,...l.kpopAttributes,popoverClasses:`${D.popoverClasses} ${((t=l.kpopAttributes)==null?void 0:t.popoverClasses)??""}`,width:String($.value),maxWidth:String($.value),disabled:C.value||F.value}}),re=e.computed(()=>Q.normalizeSize(l.dropdownMaxHeight)),ne=e.computed(()=>({...ae.value})),se=e.computed(()=>l.placeholder||v.placeholder||"Select..."),ue=e.computed(()=>!C.value&&l.clearable&&!!d.value),R=e.computed(()=>!!(d.value&&(g["selected-item-template"]||l.reuseItemTemplate&&g["item-template"]))),I=t=>"items"in t&&Array.isArray(t.items),T=e.computed(()=>{if(!l.enableFiltering||!i.value)return q.value;const t=l.filterFunction({query:i.value,items:u.value}),o=t===!0?u.value:t,a=new Set(o.map(r=>r.value)),n=[];for(const r of q.value)if(I(r)){const p=r.items.filter(b=>a.has(b.value));p.length>0&&n.push({label:r.label,key:r.key,items:p})}else a.has(r.value)&&n.push(r);return n}),ie=t=>{if(!l.enableFiltering)return t.preventDefault(),!1},ce=t=>{l.enableItemCreation&&L(),t.preventDefault()},L=()=>{var a,n;if(!l.enableItemCreation||!i.value||!O.value||!l.itemCreationValidator(i.value))return;const t=(((a=u.value)==null?void 0:a.length)||0)+1,o={label:J.sanitizeInput(i.value),value:Ve.getUniqueStringId(),key:`${(n=J.sanitizeInput(i.value).replace(/ /gi,"-"))==null?void 0:n.replace(/[^a-z0-9-_]/gi,"")}-${t}`,custom:!0};f("item-added",o),N(o,!0),i.value=""},N=(t,o)=>{var a,n;o&&((a=u.value)==null||a.push(t),q.value.unshift(t)),(n=u.value)==null||n.forEach((r,p)=>{var b;r.key===t.key?(r.selected=!0,d.value=r):r.selected?(r.selected=!1,r.custom&&((b=u.value)==null||b.splice(p,1),f("item-removed",r))):r.selected=!1}),w.value=!0,i.value=t.label},K=()=>{var t;(t=u.value)==null||t.forEach((o,a)=>{var n;o.selected=!1,o.custom&&((n=u.value)==null||n.splice(a,1),f("item-removed",o))}),d.value=null,i.value="",f("input",null),f("change",null),f("update:modelValue",null)},M=e.useTemplateRef("kSelectItems"),de=(t,o)=>{var n,r;if(t.keyCode===27){o.value=!1;return}const a=(n=y.value)==null?void 0:n.children[0];!o.value&&a&&a.click(),(t.key==="ArrowDown"||t.key==="ArrowUp")&&o.value&&((r=M.value)==null||r.setFocus(t.key==="ArrowDown"?"down":"up"))},fe=t=>{i.value!==t&&(i.value=t)},ve=()=>{S.value=!0},pe=()=>{S.value=!1},me=()=>{var t,o,a;l.enableFiltering||(a=(o=(t=Z.value)==null?void 0:t.$el)==null?void 0:o.querySelector("input"))==null||a.blur()},be=t=>{var o;(C.value||((o=t==null?void 0:t.target)==null?void 0:o.dataset.propagateClicks)==="false")&&t.stopPropagation()},he=t=>{t()},ke=(t,o)=>{E.value=!1,d.value?(w.value=!0,i.value=d.value.label):i.value="",o&&t()},ye=t=>{E.value=!0,l.enableFiltering&&(i.value=""),t()};return e.watch(te,(t,o)=>{var a;if(t!==o){const n=(a=u.value)==null?void 0:a.filter(r=>r.value===t);n!=null&&n.length?N(n[0]):t||K()}}),e.watch(()=>l.items,(t,o)=>{var b,W,U,H,G;if(JSON.stringify(t)===JSON.stringify(o))return;const a=JSON.parse(JSON.stringify(l.items)),n=a.some(s=>I(s)),r=[],p=[];if(n)for(const s of a)I(s)?r.push(...s.items):r.push(s);else{const s=new Map;for(const c of a)I(c)||(c.group&&(s.has(c.group)||s.set(c.group,[]),s.get(c.group).push(c)),r.push(c));const m=Array.from(s.keys()).sort((c,k)=>c.toLowerCase().localeCompare(k.toLowerCase())),h=r.filter(c=>!c.group);p.push(...h);for(const c of m)p.push({label:c,items:s.get(c)})}u.value=r,(b=u.value)!=null&&b.length&&(d.value=null);for(let s=0;s<((W=u.value)==null?void 0:W.length);s++){u.value[s].selected===void 0&&(u.value[s].selected=!1);let m=`${(H=(U=u.value[s].label)==null?void 0:U.replace(/ /gi,"-"))==null?void 0:H.replace(/[^a-z0-9-_]/gi,"")}-${s}`;m.includes("undefined")&&(m=`select-item-label-${s}`),u.value[s].key=m,(u.value[s].value===l.modelValue||u.value[s].selected)&&(u.value[s].selected=!0,d.value=u.value[s],S.value||(w.value=!0,i.value=d.value.label)),((G=d.value)==null?void 0:G.value)===u.value[s].value&&(u.value[s].selected=!0)}if(n){const s=[],m=[];for(const h of a)if(I(h)){const c=h.items.map(k=>u.value.find(ge=>ge.value===k.value)).filter(k=>k!==void 0);m.push({label:h.label,key:h.key,items:c})}else{const c=u.value.find(k=>k.value===h.value);c&&s.push(c)}p.push(...s,...m)}q.value=p,V.value&&typeof V.value.updatePopper=="function"&&e.nextTick(()=>{V.value.updatePopper()})},{deep:!0,immediate:!0}),e.watch(i,t=>{w.value&&t||(f("query-change",t),w.value=!1)}),e.watch(d,(t,o)=>{t&&t!==o&&(f("selected",t),f("input",t.value),f("change",t),f("update:modelValue",t.value))},{deep:!0}),e.onMounted(()=>{y.value&&(A.value=Ee.ResizeObserverHelper.create(()=>{var t;$.value=`${(t=y.value)==null?void 0:t.offsetWidth}px`}),A.value.observe(y.value)),Ae.useEventListener(document,"keydown",t=>{var o,a;!l.enableFiltering&&((o=document.activeElement)==null?void 0:o.tagName)==="BODY"&&!S.value&&E.value&&(t.key==="ArrowDown"||t.key==="ArrowUp")&&(t.preventDefault(),(a=M.value)==null||a.setFocus(t.key==="ArrowDown"?"down":"up"))})}),e.onBeforeUnmount(()=>{var t;y.value&&((t=A.value)==null||t.unobserve(y.value))}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["k-select",[t.$attrs.class]])},[l.label?(e.openBlock(),e.createBlock(we.default,e.mergeProps({key:0,"data-testid":"select-label"},l.labelAttributes,{for:P.value,required:z.value}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value)+" ",1)]),_:2},[Y.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1040,["for","required"])):e.createCommentVNode("",!0),e.createVNode(Be.default,null,{default:e.withCtx(({toggle:a,isToggled:n})=>[e.createVNode(Ie.default,e.mergeProps({ref:"popperElement"},ne.value,{"close-on-popover-click":"","hide-close-icon":"",offset:e.unref(Te.KUI_SPACE_40),onClose:()=>ke(a,n.value),onOpen:()=>ye(a),onPopoverClick:()=>he(a)}),{content:e.withCtx(()=>[e.createElementVNode("div",{"aria-live":l.enableFiltering?"polite":"off"},[l.enableFiltering&&l.loading?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(xe.default),{class:"loading-icon",title:"Loading"})],!0)])):(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(Fe.default,{ref:"kSelectItems","filter-string":i.value,"item-creation-enabled":l.enableItemCreation&&O.value,"item-creation-valid":l.itemCreationValidator(i.value),items:T.value,onAddItem:L,onSelected:N},{content:e.withCtx(({item:r})=>[e.renderSlot(t.$slots,"item-template",{item:r},void 0,!0)]),_:3},8,["filter-string","item-creation-enabled","item-creation-valid","items"]),!T.value.length&&!t.$slots.empty&&!l.enableItemCreation?(e.openBlock(),e.createBlock(qe.default,{key:0,item:{label:"No results",value:"no_results",disabled:!0}})):e.createCommentVNode("",!0),(l.dropdownFooterText||t.$slots["dropdown-footer-text"])&&l.dropdownFooterTextPosition==="static"?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(l.dropdownFooterText),1)],!0)])):e.createCommentVNode("",!0)])),!l.loading&&!T.value.length&&t.$slots.empty?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(t.$slots,"empty",{},void 0,!0)])):e.createCommentVNode("",!0)],8,Pe),(l.dropdownFooterText||t.$slots["dropdown-footer-text"])&&l.dropdownFooterTextPosition==="sticky"?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(t.$slots,"dropdown-footer-text",{},()=>[e.createTextVNode(e.toDisplayString(l.dropdownFooterText),1)],!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",{id:e.unref(ee),ref:"selectWrapperElement",class:"select-wrapper","data-testid":"select-wrapper",role:"listbox",onClick:be},[(e.openBlock(),e.createBlock(Se.default,e.mergeProps({id:P.value,key:X.value,ref:"inputElement",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:["select-input",{"filtering-disabled":!l.enableFiltering,"hide-model-value":R.value&&(!l.enableFiltering||!n.value),"input-has-focus":S.value||n.value}],"data-testid":"select-input",disabled:C.value,error:l.error,"model-value":i.value,name:"select-options-search",placeholder:d.value&&!l.enableFiltering?d.value.label:se.value,readonly:F.value,spellcheck:"false"},oe.value,{onBlur:pe,onClick:me,onFocus:ve,onKeydown:e.withKeys(ce,["enter"]),onKeypress:ie,onKeyup:[r=>de(r,n),o[0]||(o[0]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))],"onUpdate:modelValue":fe}),e.createSlots({after:e.withCtx(()=>[ue.value?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":"Clear",class:"clear-selection-button","data-testid":"clear-selection-icon",type:"button",onClick:e.withModifiers(K,["stop"])},[e.createVNode(e.unref(Ne.default),{decorative:""})])):e.createCommentVNode("",!0),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref($e.default),{key:1,class:e.normalizeClass(["chevron-down-icon",{disabled:C.value}]),decorative:""},null,8,["class"]))]),_:2},[g.before?{name:"before",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"before",{},void 0,!0)]),key:"0"}:void 0,t.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"1"}:void 0]),1040,["id","class","disabled","error","model-value","placeholder","readonly","onKeyup"])),e.createVNode(e.Transition,{name:"kongponents-fade-transition"},{default:e.withCtx(()=>[R.value&&(!l.enableFiltering||!n.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["custom-selected-item-wrapper",{clearable:l.clearable,readonly:F.value}])},[e.renderSlot(t.$slots,"selected-item-template",{item:d.value},()=>[e.renderSlot(t.$slots,"item-template",{item:d.value},void 0,!0)],!0)],2)):e.createCommentVNode("",!0)]),_:2},1024)],8,Ke)]),_:2},1040,["offset","onClose","onOpen","onPopoverClick"])]),_:3}),l.help?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(["help-text",{"select-error":l.error}])},e.toDisplayString(l.help),3)):e.createCommentVNode("",!0)],2))}});exports.default=Me;
|
package/dist/kongponents139.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./kongponents179.cjs"),u=require("./kongponents172.cjs"),f=require("./kongponents177.cjs"),m=require("./kongponents180.cjs"),v={class:"k-slideout"},k={key:0,ref:"slideoutContainerElement",class:"slideout-container","data-testid":"slideout-container"},y={class:"slideout-header"},C={key:0,class:"slideout-title","data-testid":"slideout-title"},E={class:"slideout-content"},h=e.defineComponent({__name:"KSlideout",props:{visible:{type:Boolean},hasOverlay:{type:Boolean,default:!0},offsetTop:{default:0},closeOnBlur:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},title:{default:""},maxWidth:{default:"500px"},zIndex:{default:9999}},emits:["close"],setup(o,{emit:a}){e.useCssVars(t=>({fe411dca:c.value,v097e7e0e:t.maxWidth,v3afc0278:t.zIndex}));const s=a,d=e.useTemplateRef("slideoutContainerElement"),c=e.computed(()=>m.normalizeSize(o.offsetTop));r.onClickOutside(d,t=>{t.isTrusted&&o.closeOnBlur&&s("close")});const i=(t,n=!1)=>{(o.visible&&t.keyCode===27&&o.closeOnEscape||n)&&s("close")},l=t=>{typeof document<"u"&&(t?document==null||document.addEventListener("keydown",i):document==null||document.removeEventListener("keydown",i))};return e.watch(()=>o.visible,async t=>{l(!!t)},{immediate:!0}),e.onUnmounted(()=>{l(!1)}),(t,n)=>(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.Transition,{name:"kongponents-fade-transition"},{default:e.withCtx(()=>[o.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["slideout-backdrop",{"backdrop-transparent":!o.hasOverlay}])},null,2)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"kongponents-slide-in-transition"},{default:e.withCtx(()=>[o.visible?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",y,[o.title||t.$slots.title?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("button",{"aria-label":"Close",class:"slideout-close-icon","data-testid":"slideout-close-icon",type:"button",onClick:n[0]||(n[0]=e.withModifiers(B=>t.$emit("close"),["stop"]))},[e.createVNode(e.unref(u.default),{color:`var(--kui-color-text-neutral, ${e.unref(f.KUI_COLOR_TEXT_NEUTRAL)})`,decorative:""},null,8,["color"])])]),e.createElementVNode("div",E,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],512)):e.createCommentVNode("",!0)]),_:3})]))}});exports.default=h;
|
package/dist/kongponents141.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("./kongponents216.cjs"),n={key:0,class:"k-stepper"},r=e.defineComponent({__name:"KStepper",props:{steps:{},maxLabelWidth:{default:"170px"}},setup(t){return(s,c)=>t.steps&&t.steps.length?(e.openBlock(),e.createElementBlock("ol",n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,l=>(e.openBlock(),e.createBlock(a.default,{key:`step-${l.label.replace(/ /gi,"-")}`,label:l.label,"max-label-width":t.maxLabelWidth,state:l.state},null,8,["label","max-label-width","state"]))),128))])):e.createCommentVNode("",!0)}});exports.default=r;
|
package/dist/kongponents143.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ve=require("./kongponents32.cjs"),fe=require("./kongponents45.cjs"),De=require("./kongponents20.cjs");;/* empty css */const Ge=require("./kongponents54.cjs"),Je=require("./kongponents24.cjs");;/* empty css */const Xe=require("./kongponents189.cjs"),Ze=require("./kongponents174.cjs"),Qe=require("./kongponents178.cjs");require("./kongponents5.cjs");require("./kongponents10.cjs");const Ye=require("./kongponents11.cjs"),K=require("./kongponents177.cjs"),_e=require("./kongponents223.cjs"),et=require("./kongponents181.cjs"),ge=require("./kongponents169.cjs"),tt={class:"k-table"},at={key:0,class:"table-toolbar","data-testid":"table-toolbar"},lt={key:0,class:"toolbar-default-items-container"},ot={key:2,class:"table-error-state","data-testid":"table-error-state"},rt={key:3,class:"table-empty-state","data-testid":"table-empty-state"},nt={key:4,class:"table-container"},st=["data-tableid"],it=["aria-sort","data-testid","onClick","onMouseover"],ut=["onMousedown","onMouseover"],ct=["aria-describedby"],dt=["onMousedown","onMouseover"],vt=["role","tabindex"],ft=e.defineComponent({__name:"KTable",props:{resizeColumns:{type:Boolean,default:!1},tablePreferences:{type:Object,default:()=>({})},clientSort:{type:Boolean,default:!1},rowHover:{type:Boolean,default:!0},sortHandlerFunction:{type:Function,default:()=>({})},rowAttrs:{type:Function,default:()=>({})},cellAttrs:{type:Function,default:()=>({})},loading:{type:Boolean,default:!1},emptyStateTitle:{type:String,default:"No Data"},emptyStateMessage:{type:String,default:"There is no data to display."},emptyStateActionRoute:{type:[Object,String],default:""},emptyStateActionMessage:{type:String,default:""},emptyStateIconVariant:{type:String,default:Ye.EmptyStateIconVariants.Default},error:{type:Boolean,default:!1},errorStateTitle:{type:String,default:"An error occurred"},errorStateMessage:{type:String,default:"Data cannot be displayed due to an error."},errorStateActionRoute:{type:[Object,String],default:""},errorStateActionMessage:{type:String,default:""},fetcher:{type:Function,default:void 0,required:!0},fetcherCacheKey:{type:String,default:""},cacheIdentifier:{type:String,default:""},searchInput:{type:String,default:""},headers:{type:Array,default:()=>[]},initialFetcherParams:{type:Object,default:null},paginationNeighbors:{type:Number,default:1},paginationPageSizes:{type:Array,default:()=>[15,30,50,75,100],validator:r=>!!r.length&&r.every(L=>typeof L=="number")},paginationTotalItems:{type:Number,default:null},disablePaginationPageJump:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},disablePagination:{type:Boolean,default:!1},paginationOffset:{type:Boolean,default:!1},hidePaginationWhenOptional:{type:Boolean,default:!1},maxHeight:{type:String,default:"none"}},emits:["cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","state"],setup(r,{emit:L}){e.useCssVars(t=>({ae6ef3f8:Ee.value}));const{useDebounce:W,useRequest:pe,useSwrvState:me,clientSideSorter:D}=Qe.default(),o=r,V=L,G=e.useAttrs(),ye=e.useSlots(),m=e.useId(),C={pageSize:15,page:1,query:"",sortColumnKey:"",sortColumnOrder:"desc",offset:null},p=e.ref([]),J=e.ref(),P=e.ref([]),y=e.ref([]),O=e.ref(""),z=e.ref(""),T=e.ref(""),X=e.computed(()=>P.value.filter(t=>t.hidable).length>0),A=e.computed(()=>!!(X.value&&!o.error&&!S.value&&!o.loading&&p.value&&p.value.length)),be=e.computed(()=>P.value.filter(t=>t.hidable)),he=e.computed(()=>A.value?o.tablePreferences.columnVisibility||{}:{}),M=e.ref(A.value?o.tablePreferences.columnVisibility||{}:{}),F=e.ref(0),B=e.ref(!1),u=e.ref(1),N=e.ref(15),Z=e.ref(""),f=e.ref(""),d=e.ref("desc"),k=e.ref(null),b=e.ref([]),Q=e.ref(!0),H=e.ref(!1),R=e.ref(!1),ke=e.computed(()=>!!ye.toolbar||A.value),Se=e.computed(()=>({maxHeight:et.normalizeSize(o.maxHeight)})),Ce=t=>`column-${t}`,E=t=>`tooltip-${t}`,x=t=>t,Y=(t,l)=>(a,n)=>{const s=/^on[^a-z]/,i={};for(const c in l)s.test(c)&&l[c]&&(i[c]=l[c]);return Object.keys(i).reduce((c,h)=>{if(h.indexOf(t)===0){const v=h.split(t);c[v[1]]=g=>i[h](g,a,n)}return c},{})},ze=e.computed(()=>(t,l)=>{const a=Y("onRow:",G)(l,"row"),n=Y("onCell:",G)(t,"cell"),s=["a","button","label","input","select"];return a.click&&(H.value=!0),{...a,...n,click(i){const c=i.target.className;let h=s.includes(i.target.tagName.toLowerCase()),v=!1;typeof c=="string"||Array.isArray(c)?v=c.includes("k-popover"):typeof c=="object"&&(v=Object.keys(c).includes("k-popover")),i.target.closest(".popover-content")!==null&&(v=!0);for(let g=0;g<s.length;g++)if(i.target.closest(s[g])!==null){h=!0;break}if((!h||i.target.hasAttribute("disabled"))&&!v&&(a.click||n.click))if(n.click){V("cell-click",{data:t});const g=n.click(i,t,"cell");typeof g=="function"&&g(i,t)}else{V("row-click",{data:l});const g=a.click(i,l,"row");typeof g=="function"&&g(i,l)}}}}),w=e.ref(o.resizeColumns?o.tablePreferences.columnWidths||{}:{}),_=e.computed(()=>{const t={};for(const l in w.value){if(!w.value[l])continue;const a=w.value[l]+"px";t[l]={width:a,maxWidth:a,minWidth:a}}return t}),Be=(t,l)=>({"resize-hover":ee.value===t.key&&o.resizeColumns&&l!==y.value.length-1,resizable:o.resizeColumns,sortable:o.sortable&&!t.hideLabel&&!!t.sortable,"active-sort":o.sortable&&!t.hideLabel&&!!t.sortable&&t.key===f.value,[d.value]:o.sortable&&t.key===f.value&&!t.hideLabel,"is-scrolled":B.value,"has-tooltip":!!t.tooltip}),Ne=e.computed(()=>O.value?"resizing":z.value?"resize-hover":T.value?"th-hover":""),ee=e.computed(()=>{switch(Ne.value){case"resizing":return O.value;case"resize-hover":return z.value;case"th-hover":return T.value;default:return""}}),te=e.computed(()=>{var t;return(t=J.value)==null?void 0:t.querySelectorAll("th.resizable")}),Ee=e.computed(()=>{var l;const t=(l=te.value)==null?void 0:l.item(0);if(t){const a=window==null?void 0:window.getComputedStyle(t);if(a!=null&&a.height)return`${parseInt(a.height,10)}px`}return"auto"}),ae=(t,l)=>{var h;if(t.button!==0)return;let a=0,n=0;O.value=l;let s=null;(h=te.value)==null||h.forEach(v=>{v.getAttribute("data-testid")===`table-header-${l}`&&(s=document==null?void 0:document.querySelector(`[data-tableid="${m}"] [data-testid="table-header-${l}"]`))});const i=v=>{const g=v.clientX-a;s==null||s.setAttribute("style",`width: ${n+g}px`),w.value[l]=n+g},c=()=>{O.value="",document==null||document.removeEventListener("mousemove",i),document==null||document.removeEventListener("mouseup",c),q()};if(a=t.clientX,s){const v=window==null?void 0:window.getComputedStyle(s);v!=null&&v.width&&(n=parseInt(v.width,10)),document==null||document.addEventListener("mousemove",i),document==null||document.addEventListener("mouseup",c)}},le=e.ref(!0),Pe=async()=>{var a,n;const t=o.searchInput,l=await o.fetcher({pageSize:N.value,page:u.value,query:t||Z.value,sortColumnKey:f.value,sortColumnOrder:d.value,offset:k.value});return p.value=l.data,F.value=o.paginationTotalItems||l.total||((a=l.data)==null?void 0:a.length),o.paginationOffset&&((n=l.pagination)!=null&&n.offset?($.value=l.pagination.offset,b.value[u.value]||b.value.push(l.pagination.offset)):$.value=null,Q.value=l.pagination&&"hasNextPage"in l.pagination?l.pagination.hasNextPage:!0),p.value.length===0&&u.value>1&&(u.value=1,b.value=[null],k.value=null),le.value=!1,l},Oe=()=>{const t={...C,...o.initialFetcherParams};u.value=t.page??C.page,N.value=t.pageSize??C.pageSize,Z.value=t.query??C.query,f.value=t.sortColumnKey??C.sortColumnKey,d.value=t.sortColumnOrder??C.sortColumnOrder,o.clientSort&&f.value&&d.value&&D(f.value,"",d.value,p.value),o.paginationOffset&&(k.value=t.offset,b.value.push(t.offset)),o.headers&&o.headers.length&&(P.value=o.headers),R.value=!0};e.watch(()=>o.headers,t=>{t&&t.length&&(P.value=t)},{deep:!0});const j=e.computed(()=>b.value[u.value-1]),$=e.ref(null),Ae=e.computed(()=>{if(!o.fetcher||!R.value)return"";let t=m;return o.cacheIdentifier&&(t=o.cacheIdentifier),o.fetcherCacheKey&&(t+=`-${o.fetcherCacheKey}`),`k-table_${t}`}),oe=e.ref(""),{debouncedFn:we,generateDebouncedFn:$e}=W(t=>{oe.value=t},350),Ie=$e(0),{data:re,error:ne,revalidate:Ve,isValidating:Te}=pe(()=>Ae.value,()=>Pe(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:U,hasData:Me,swrvState:se}=me(re,ne,Te),S=e.ref(!0),ie=e.computed(()=>({hasData:Me.value,state:U.value})),ue=e.computed(()=>S.value?"loading":ne.value?"error":"success"),{debouncedFn:ce,generateDebouncedFn:He}=W(Ve,500),qe=He(0),Ke=t=>{const{key:l,useSortHandlerFunction:a}=t,n=f.value+"";u.value=1,f.value?l===f.value?d.value==="asc"?d.value="desc":d.value="asc":(f.value=l,d.value="asc",b.value=[null]):(f.value=l,d.value="asc",b.value=[null]),o.clientSort?a&&o.sortHandlerFunction?o.sortHandlerFunction({key:l,prevKey:n,sortColumnOrder:d.value,data:p.value}):D(l,n,d.value,p.value):o.paginationOffset||ce(),q()},Le=({page:t})=>{u.value=t},Fe=({pageSize:t})=>{b.value=[null],k.value=null,N.value=t,u.value=1,q()},Re=t=>{t&&t.target&&typeof t.target.scrollTop=="number"&&(t.target.scrollTop>1?B.value=!0:t.target.scrollTop===0&&(B.value=!B.value))},xe=e.computed(()=>({pageSize:N.value,sortColumnKey:f.value,sortColumnOrder:d.value,...o.resizeColumns?{columnWidths:w.value}:{},...X.value?{columnVisibility:M.value}:{}})),q=()=>{ue.value==="success"&&V("update:table-preferences",xe.value)},je=()=>{u.value++,k.value=$.value},Ue=()=>{u.value--,k.value=j.value},We=e.computed(()=>!!(o.fetcher&&!o.disablePagination&&!(!o.paginationOffset&&o.hidePaginationWhenOptional&&F.value<=(o.paginationPageSizes[0]??ge.DEFAULT_PAGE_SIZE))&&!(o.paginationOffset&&o.hidePaginationWhenOptional&&!j.value&&!$.value&&p.value.length<(o.paginationPageSizes[0]??ge.DEFAULT_PAGE_SIZE)))),de=t=>t.toLowerCase().replace(/[^[a-z0-9]/gi,"-");e.watch([M,P],t=>{const l=t[0],n=t[1].filter(s=>l[s.key]!==!1);JSON.stringify(n)!==JSON.stringify(y.value)&&(y.value=n,q())},{deep:!0,immediate:!0}),e.watch(re,t=>{t!=null&&t.length&&!p.value.length&&(p.value=t)},{deep:!0,immediate:!0}),e.watch(U,()=>{switch(U.value){case se.PENDING:S.value=!0;break;case se.VALIDATING_HAS_DATA:S.value=I.value;break;default:S.value=!1;break}},{immediate:!0}),e.watch([ie,ue],t=>{var l;V("state",{state:t==null?void 0:t[1],hasData:(l=t==null?void 0:t[0])==null?void 0:l.hasData})}),e.watch(()=>o.searchInput,t=>{u.value!==1&&(u.value=1),t===""?Ie(t):we(t)},{immediate:!0});const I=e.ref(!1);return e.watch([oe,u,N],async(t,l)=>{const a=l==null?void 0:l[0],n=t[0],s=t[1];n!==a&&s!==1&&(u.value=1,b.value=[null],k.value=null),R.value&&!le.value&&(I.value=!0,n!==""&&n!==a?await ce():await qe(),I.value=!1)},{deep:!0,immediate:!0}),e.watch(A,t=>{t&&(M.value=o.tablePreferences.columnVisibility||{})},{immediate:!0}),e.onMounted(()=>{console.warn(`The Kongponents 'KTable' component is deprecated and will be removed in the next major release.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ve=require("./kongponents32.cjs"),fe=require("./kongponents45.cjs"),De=require("./kongponents20.cjs");;/* empty css */const Ge=require("./kongponents54.cjs"),Je=require("./kongponents24.cjs");;/* empty css */const Xe=require("./kongponents192.cjs"),Ze=require("./kongponents174.cjs"),Qe=require("./kongponents183.cjs");require("./kongponents5.cjs");require("./kongponents10.cjs");const Ye=require("./kongponents11.cjs"),K=require("./kongponents177.cjs"),_e=require("./kongponents220.cjs"),et=require("./kongponents180.cjs"),ge=require("./kongponents169.cjs"),tt={class:"k-table"},at={key:0,class:"table-toolbar","data-testid":"table-toolbar"},lt={key:0,class:"toolbar-default-items-container"},ot={key:2,class:"table-error-state","data-testid":"table-error-state"},rt={key:3,class:"table-empty-state","data-testid":"table-empty-state"},nt={key:4,class:"table-container"},st=["data-tableid"],it=["aria-sort","data-testid","onClick","onMouseover"],ut=["onMousedown","onMouseover"],ct=["aria-describedby"],dt=["onMousedown","onMouseover"],vt=["role","tabindex"],ft=e.defineComponent({__name:"KTable",props:{resizeColumns:{type:Boolean,default:!1},tablePreferences:{type:Object,default:()=>({})},clientSort:{type:Boolean,default:!1},rowHover:{type:Boolean,default:!0},sortHandlerFunction:{type:Function,default:()=>({})},rowAttrs:{type:Function,default:()=>({})},cellAttrs:{type:Function,default:()=>({})},loading:{type:Boolean,default:!1},emptyStateTitle:{type:String,default:"No Data"},emptyStateMessage:{type:String,default:"There is no data to display."},emptyStateActionRoute:{type:[Object,String],default:""},emptyStateActionMessage:{type:String,default:""},emptyStateIconVariant:{type:String,default:Ye.EmptyStateIconVariants.Default},error:{type:Boolean,default:!1},errorStateTitle:{type:String,default:"An error occurred"},errorStateMessage:{type:String,default:"Data cannot be displayed due to an error."},errorStateActionRoute:{type:[Object,String],default:""},errorStateActionMessage:{type:String,default:""},fetcher:{type:Function,default:void 0,required:!0},fetcherCacheKey:{type:String,default:""},cacheIdentifier:{type:String,default:""},searchInput:{type:String,default:""},headers:{type:Array,default:()=>[]},initialFetcherParams:{type:Object,default:null},paginationNeighbors:{type:Number,default:1},paginationPageSizes:{type:Array,default:()=>[15,30,50,75,100],validator:r=>!!r.length&&r.every(L=>typeof L=="number")},paginationTotalItems:{type:Number,default:null},disablePaginationPageJump:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},disablePagination:{type:Boolean,default:!1},paginationOffset:{type:Boolean,default:!1},hidePaginationWhenOptional:{type:Boolean,default:!1},maxHeight:{type:String,default:"none"}},emits:["cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","state"],setup(r,{emit:L}){e.useCssVars(t=>({ae6ef3f8:Ee.value}));const{useDebounce:W,useRequest:pe,useSwrvState:me,clientSideSorter:D}=Qe.default(),o=r,V=L,G=e.useAttrs(),ye=e.useSlots(),m=e.useId(),C={pageSize:15,page:1,query:"",sortColumnKey:"",sortColumnOrder:"desc",offset:null},p=e.ref([]),J=e.ref(),P=e.ref([]),y=e.ref([]),O=e.ref(""),z=e.ref(""),T=e.ref(""),X=e.computed(()=>P.value.filter(t=>t.hidable).length>0),A=e.computed(()=>!!(X.value&&!o.error&&!S.value&&!o.loading&&p.value&&p.value.length)),be=e.computed(()=>P.value.filter(t=>t.hidable)),he=e.computed(()=>A.value?o.tablePreferences.columnVisibility||{}:{}),M=e.ref(A.value?o.tablePreferences.columnVisibility||{}:{}),F=e.ref(0),B=e.ref(!1),u=e.ref(1),N=e.ref(15),Z=e.ref(""),f=e.ref(""),d=e.ref("desc"),k=e.ref(null),b=e.ref([]),Q=e.ref(!0),H=e.ref(!1),R=e.ref(!1),ke=e.computed(()=>!!ye.toolbar||A.value),Se=e.computed(()=>({maxHeight:et.normalizeSize(o.maxHeight)})),Ce=t=>`column-${t}`,E=t=>`tooltip-${t}`,x=t=>t,Y=(t,l)=>(a,n)=>{const s=/^on[^a-z]/,i={};for(const c in l)s.test(c)&&l[c]&&(i[c]=l[c]);return Object.keys(i).reduce((c,h)=>{if(h.indexOf(t)===0){const v=h.split(t);c[v[1]]=g=>i[h](g,a,n)}return c},{})},ze=e.computed(()=>(t,l)=>{const a=Y("onRow:",G)(l,"row"),n=Y("onCell:",G)(t,"cell"),s=["a","button","label","input","select"];return a.click&&(H.value=!0),{...a,...n,click(i){const c=i.target.className;let h=s.includes(i.target.tagName.toLowerCase()),v=!1;typeof c=="string"||Array.isArray(c)?v=c.includes("k-popover"):typeof c=="object"&&(v=Object.keys(c).includes("k-popover")),i.target.closest(".popover-content")!==null&&(v=!0);for(let g=0;g<s.length;g++)if(i.target.closest(s[g])!==null){h=!0;break}if((!h||i.target.hasAttribute("disabled"))&&!v&&(a.click||n.click))if(n.click){V("cell-click",{data:t});const g=n.click(i,t,"cell");typeof g=="function"&&g(i,t)}else{V("row-click",{data:l});const g=a.click(i,l,"row");typeof g=="function"&&g(i,l)}}}}),w=e.ref(o.resizeColumns?o.tablePreferences.columnWidths||{}:{}),_=e.computed(()=>{const t={};for(const l in w.value){if(!w.value[l])continue;const a=w.value[l]+"px";t[l]={width:a,maxWidth:a,minWidth:a}}return t}),Be=(t,l)=>({"resize-hover":ee.value===t.key&&o.resizeColumns&&l!==y.value.length-1,resizable:o.resizeColumns,sortable:o.sortable&&!t.hideLabel&&!!t.sortable,"active-sort":o.sortable&&!t.hideLabel&&!!t.sortable&&t.key===f.value,[d.value]:o.sortable&&t.key===f.value&&!t.hideLabel,"is-scrolled":B.value,"has-tooltip":!!t.tooltip}),Ne=e.computed(()=>O.value?"resizing":z.value?"resize-hover":T.value?"th-hover":""),ee=e.computed(()=>{switch(Ne.value){case"resizing":return O.value;case"resize-hover":return z.value;case"th-hover":return T.value;default:return""}}),te=e.computed(()=>{var t;return(t=J.value)==null?void 0:t.querySelectorAll("th.resizable")}),Ee=e.computed(()=>{var l;const t=(l=te.value)==null?void 0:l.item(0);if(t){const a=window==null?void 0:window.getComputedStyle(t);if(a!=null&&a.height)return`${parseInt(a.height,10)}px`}return"auto"}),ae=(t,l)=>{var h;if(t.button!==0)return;let a=0,n=0;O.value=l;let s=null;(h=te.value)==null||h.forEach(v=>{v.getAttribute("data-testid")===`table-header-${l}`&&(s=document==null?void 0:document.querySelector(`[data-tableid="${m}"] [data-testid="table-header-${l}"]`))});const i=v=>{const g=v.clientX-a;s==null||s.setAttribute("style",`width: ${n+g}px`),w.value[l]=n+g},c=()=>{O.value="",document==null||document.removeEventListener("mousemove",i),document==null||document.removeEventListener("mouseup",c),q()};if(a=t.clientX,s){const v=window==null?void 0:window.getComputedStyle(s);v!=null&&v.width&&(n=parseInt(v.width,10)),document==null||document.addEventListener("mousemove",i),document==null||document.addEventListener("mouseup",c)}},le=e.ref(!0),Pe=async()=>{var a,n;const t=o.searchInput,l=await o.fetcher({pageSize:N.value,page:u.value,query:t||Z.value,sortColumnKey:f.value,sortColumnOrder:d.value,offset:k.value});return p.value=l.data,F.value=o.paginationTotalItems||l.total||((a=l.data)==null?void 0:a.length),o.paginationOffset&&((n=l.pagination)!=null&&n.offset?($.value=l.pagination.offset,b.value[u.value]||b.value.push(l.pagination.offset)):$.value=null,Q.value=l.pagination&&"hasNextPage"in l.pagination?l.pagination.hasNextPage:!0),p.value.length===0&&u.value>1&&(u.value=1,b.value=[null],k.value=null),le.value=!1,l},Oe=()=>{const t={...C,...o.initialFetcherParams};u.value=t.page??C.page,N.value=t.pageSize??C.pageSize,Z.value=t.query??C.query,f.value=t.sortColumnKey??C.sortColumnKey,d.value=t.sortColumnOrder??C.sortColumnOrder,o.clientSort&&f.value&&d.value&&D(f.value,"",d.value,p.value),o.paginationOffset&&(k.value=t.offset,b.value.push(t.offset)),o.headers&&o.headers.length&&(P.value=o.headers),R.value=!0};e.watch(()=>o.headers,t=>{t&&t.length&&(P.value=t)},{deep:!0});const j=e.computed(()=>b.value[u.value-1]),$=e.ref(null),Ae=e.computed(()=>{if(!o.fetcher||!R.value)return"";let t=m;return o.cacheIdentifier&&(t=o.cacheIdentifier),o.fetcherCacheKey&&(t+=`-${o.fetcherCacheKey}`),`k-table_${t}`}),oe=e.ref(""),{debouncedFn:we,generateDebouncedFn:$e}=W(t=>{oe.value=t},350),Ie=$e(0),{data:re,error:ne,revalidate:Ve,isValidating:Te}=pe(()=>Ae.value,()=>Pe(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:U,hasData:Me,swrvState:se}=me(re,ne,Te),S=e.ref(!0),ie=e.computed(()=>({hasData:Me.value,state:U.value})),ue=e.computed(()=>S.value?"loading":ne.value?"error":"success"),{debouncedFn:ce,generateDebouncedFn:He}=W(Ve,500),qe=He(0),Ke=t=>{const{key:l,useSortHandlerFunction:a}=t,n=f.value+"";u.value=1,f.value?l===f.value?d.value==="asc"?d.value="desc":d.value="asc":(f.value=l,d.value="asc",b.value=[null]):(f.value=l,d.value="asc",b.value=[null]),o.clientSort?a&&o.sortHandlerFunction?o.sortHandlerFunction({key:l,prevKey:n,sortColumnOrder:d.value,data:p.value}):D(l,n,d.value,p.value):o.paginationOffset||ce(),q()},Le=({page:t})=>{u.value=t},Fe=({pageSize:t})=>{b.value=[null],k.value=null,N.value=t,u.value=1,q()},Re=t=>{t&&t.target&&typeof t.target.scrollTop=="number"&&(t.target.scrollTop>1?B.value=!0:t.target.scrollTop===0&&(B.value=!B.value))},xe=e.computed(()=>({pageSize:N.value,sortColumnKey:f.value,sortColumnOrder:d.value,...o.resizeColumns?{columnWidths:w.value}:{},...X.value?{columnVisibility:M.value}:{}})),q=()=>{ue.value==="success"&&V("update:table-preferences",xe.value)},je=()=>{u.value++,k.value=$.value},Ue=()=>{u.value--,k.value=j.value},We=e.computed(()=>!!(o.fetcher&&!o.disablePagination&&!(!o.paginationOffset&&o.hidePaginationWhenOptional&&F.value<=(o.paginationPageSizes[0]??ge.DEFAULT_PAGE_SIZE))&&!(o.paginationOffset&&o.hidePaginationWhenOptional&&!j.value&&!$.value&&p.value.length<(o.paginationPageSizes[0]??ge.DEFAULT_PAGE_SIZE)))),de=t=>t.toLowerCase().replace(/[^[a-z0-9]/gi,"-");e.watch([M,P],t=>{const l=t[0],n=t[1].filter(s=>l[s.key]!==!1);JSON.stringify(n)!==JSON.stringify(y.value)&&(y.value=n,q())},{deep:!0,immediate:!0}),e.watch(re,t=>{t!=null&&t.length&&!p.value.length&&(p.value=t)},{deep:!0,immediate:!0}),e.watch(U,()=>{switch(U.value){case se.PENDING:S.value=!0;break;case se.VALIDATING_HAS_DATA:S.value=I.value;break;default:S.value=!1;break}},{immediate:!0}),e.watch([ie,ue],t=>{var l;V("state",{state:t==null?void 0:t[1],hasData:(l=t==null?void 0:t[0])==null?void 0:l.hasData})}),e.watch(()=>o.searchInput,t=>{u.value!==1&&(u.value=1),t===""?Ie(t):we(t)},{immediate:!0});const I=e.ref(!1);return e.watch([oe,u,N],async(t,l)=>{const a=l==null?void 0:l[0],n=t[0],s=t[1];n!==a&&s!==1&&(u.value=1,b.value=[null],k.value=null),R.value&&!le.value&&(I.value=!0,n!==""&&n!==a?await ce():await qe(),I.value=!1)},{deep:!0,immediate:!0}),e.watch(A,t=>{t&&(M.value=o.tablePreferences.columnVisibility||{})},{immediate:!0}),e.onMounted(()=>{console.warn(`The Kongponents 'KTable' component is deprecated and will be removed in the next major release.
|
|
2
2
|
We suggest using 'KTableData' component instead.
|
|
3
3
|
Docs: https://kongponents.konghq.com/components/table-data.html`),Oe()}),(t,l)=>(e.openBlock(),e.createElementBlock("div",tt,[ke.value?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"toolbar",{state:ie.value},void 0,!0),A.value?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(_e.default,{columns:be.value,"table-id":e.unref(m),"visibility-preferences":he.value,onUpdate:l[0]||(l[0]=a=>M.value=a)},null,8,["columns","table-id","visibility-preferences"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(S.value||r.loading||I.value)&&!r.error?(e.openBlock(),e.createBlock(De.default,{key:1,"data-testid":"table-skeleton",type:"table"})):r.error?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(t.$slots,"error-state",{},()=>[e.createVNode(fe.default,{"icon-variant":"error",message:r.errorStateMessage,title:r.errorStateTitle},e.createSlots({_:2},[r.errorStateActionMessage?{name:"action",fn:e.withCtx(()=>[e.createVNode(ve.default,{"data-testid":de(r.errorStateActionMessage),to:r.errorStateActionRoute?r.errorStateActionRoute:void 0,onClick:l[1]||(l[1]=a=>t.$emit("error-action-click"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.errorStateActionMessage),1)]),_:1},8,["data-testid","to"])]),key:"0"}:void 0]),1032,["message","title"])],!0)])):!r.error&&!S.value&&!r.loading&&!I.value&&p.value&&!p.value.length?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(t.$slots,"empty-state",{},()=>[e.createVNode(fe.default,{"icon-variant":r.emptyStateIconVariant,message:r.emptyStateMessage,title:r.emptyStateTitle},e.createSlots({_:2},[r.emptyStateActionMessage?{name:"action",fn:e.withCtx(()=>[e.createVNode(ve.default,{appearance:r.searchInput?"tertiary":"primary","data-testid":de(r.emptyStateActionMessage),to:r.emptyStateActionRoute?r.emptyStateActionRoute:void 0,onClick:l[2]||(l[2]=a=>t.$emit("empty-state-action-click"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"empty-state-action-icon",{},void 0,!0),e.createTextVNode(" "+e.toDisplayString(r.emptyStateActionMessage),1)]),_:3},8,["appearance","data-testid","to"])]),key:"0"}:void 0]),1032,["icon-variant","message","title"])],!0)])):(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",{class:"table-wrapper",style:e.normalizeStyle(Se.value),onScrollPassive:Re},[e.createElementVNode("table",{class:e.normalizeClass(["table",{"has-hover":r.rowHover,"is-clickable":H.value}]),"data-tableid":e.unref(m)},[e.createElementVNode("thead",{class:e.normalizeClass({"is-scrolled":B.value})},[e.createElementVNode("tr",{ref_key:"headerRow",ref:J,class:e.normalizeClass({"is-scrolled":B.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{key:`table-${e.unref(m)}-headers-${n}`,"aria-sort":r.sortable&&a.key===f.value?d.value==="asc"?"ascending":"descending":void 0,class:e.normalizeClass(["table-headers",Be(a,n)]),"data-testid":`table-header-${a.key}`,style:e.normalizeStyle(_.value[a.key]),onClick:()=>{r.sortable&&a.sortable&&(t.$emit("sort",{prevKey:f.value,sortColumnKey:a.key,sortColumnOrder:d.value==="asc"?"desc":"asc"}),Ke(a))},onMouseleave:l[7]||(l[7]=s=>T.value=""),onMouseover:s=>T.value=a.key},[r.resizeColumns&&n!==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resize-handle previous",onClick:l[3]||(l[3]=e.withModifiers(()=>{},["stop"])),onMousedown:s=>ae(s,y.value[n-1].key),onMouseleave:l[4]||(l[4]=s=>z.value=""),onMouseover:s=>z.value=y.value[n-1].key},null,40,ut)):e.createCommentVNode("",!0),e.createElementVNode("div",{"aria-describedby":a.tooltip||t.$slots[E(a.key)]?`${E(a.key)}-${e.unref(m)}`:void 0,class:e.normalizeClass(["table-headers-container",{resized:O.value===a.key}])},[e.renderSlot(t.$slots,Ce(a.key),{column:x(a)},()=>[e.createElementVNode("span",{class:e.normalizeClass(["table-header-label",{"sr-only":a.hideLabel}])},e.toDisplayString(a.label?a.label:a.key),3)],!0),a.tooltip||t.$slots[E(a.key)]?(e.openBlock(),e.createBlock(Je.default,{key:0,"data-testid":E(a.key),"tooltip-id":`${E(a.key)}-${e.unref(m)}`},{content:e.withCtx(()=>[e.renderSlot(t.$slots,E(a.key),{column:x(a)},()=>[e.createTextVNode(e.toDisplayString(a.tooltip),1)],!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(Ze.default),{class:"header-tooltip-trigger",color:`var(--kui-color-text-neutral, ${e.unref(K.KUI_COLOR_TEXT_NEUTRAL)})`,size:e.unref(K.KUI_ICON_SIZE_30)},null,8,["color","size"])]),_:2},1032,["data-testid","tooltip-id"])):e.createCommentVNode("",!0),r.sortable&&!a.hideLabel&&a.sortable?(e.openBlock(),e.createBlock(e.unref(Xe.default),{key:1,class:"sort-icon",color:`var(--kui-color-text-neutral, ${e.unref(K.KUI_COLOR_TEXT_NEUTRAL)})`,size:e.unref(K.KUI_ICON_SIZE_30)},null,8,["color","size"])):e.createCommentVNode("",!0)],10,ct),r.resizeColumns&&n!==y.value.length-1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"resize-handle",onClick:l[5]||(l[5]=e.withModifiers(()=>{},["stop"])),onMousedown:s=>ae(s,a.key),onMouseleave:l[6]||(l[6]=s=>z.value=""),onMouseover:s=>z.value=a.key},null,40,dt)):e.createCommentVNode("",!0)],46,it))),128))],2)],2),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",e.mergeProps({ref_for:!0},r.rowAttrs(a),{key:`table-${e.unref(m)}-row-${n}`,role:H.value?"link":null,tabindex:H.value?0:null}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(s,i)=>(e.openBlock(),e.createElementBlock("td",e.mergeProps({ref_for:!0},r.cellAttrs({headerKey:s.key,row:a,rowIndex:n,colIndex:i}),{key:`table-${e.unref(m)}-cell-${i}`,class:{"resize-hover":r.resizeColumns&&ee.value===s.key&&i!==y.value.length-1},style:_.value[s.key]},e.toHandlers(ze.value(a[s.key],a),!0)),[e.renderSlot(t.$slots,s.key,{row:x(a),rowKey:n,rowValue:a[s.key]},()=>[e.createTextVNode(e.toDisplayString(a[s.key]),1)],!0)],16))),128))],16,vt))),128))])],10,st)],36),We.value?(e.openBlock(),e.createBlock(Ge.default,{key:0,class:"table-pagination","current-page":u.value,"data-testid":"table-pagination","disable-page-jump":r.disablePaginationPageJump,"initial-page-size":N.value,neighbors:r.paginationNeighbors,offset:r.paginationOffset,"offset-next-button-disabled":!$.value||!Q.value,"offset-previous-button-disabled":!j.value,"page-sizes":r.paginationPageSizes,"total-count":F.value,onGetNextOffset:je,onGetPreviousOffset:Ue,onPageChange:Le,onPageSizeChange:Fe},null,8,["current-page","disable-page-jump","initial-page-size","neighbors","offset","offset-next-button-disabled","offset-previous-button-disabled","page-sizes","total-count"])):e.createCommentVNode("",!0)]))]))}});exports.default=ft;
|
package/dist/kongponents147.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("./kongponents183.cjs"),R=require("./kongponents50.cjs"),u=require("./kongponents199.cjs"),q=["data-value"],D=["id","aria-invalid","rows","value"],h=2048,p=u.IS_MAYBE_FIREFOX?0:u.getScrollbarSize(),S=u.cssSupports("field-sizing","content"),F=e.defineComponent({inheritAttrs:!1,__name:"KTextArea",props:{modelValue:{default:""},label:{default:""},labelAttributes:{default:()=>({})},characterLimit:{type:[Boolean,Number],default:()=>h},rows:{default:5},error:{type:Boolean},resizable:{type:Boolean},autosize:{type:Boolean},help:{default:""},isResizable:{type:Boolean},hasError:{type:Boolean}},emits:["input","update:modelValue","char-limit-exceeded"],setup(a,{emit:E}){e.useCssVars(t=>({v521818f8:t.rows})),e.watch(()=>a.isResizable,t=>{t&&console.warn("KTextArea: `isResizable` prop is deprecated in favor of `resizable` prop. See the migration guide for more details: https://kongponents.konghq.com/guide/migrating-to-version-9.html#ktextarea")},{immediate:!0}),e.watch(()=>a.hasError,t=>{t&&console.warn("KTextArea: `hasError` prop is deprecated. Please use `error` prop instead. See the migration guide for more details: https://kongponents.konghq.com/guide/migrating-to-version-9.html#ktextarea")},{immediate:!0});const s=E,r=e.useAttrs(),c=e.useSlots(),{stripRequiredLabel:k}=C.default(),v=e.computed(()=>(r==null?void 0:r.required)!==void 0&&String(r==null?void 0:r.required)!=="false"),i=e.ref(""),x=e.computed(()=>k(a.label,v.value)),y=e.computed(()=>{var t,l;return!!((t=a.labelAttributes)!=null&&t.help||(l=a.labelAttributes)!=null&&l.info||c["label-tooltip"])}),T=e.computed(()=>a.error||a.hasError||n.value?!0:void 0),f=e.ref(0),A=e.computed({get(){return a.modelValue},set(t){d({target:{value:t}})}}),L=e.useId(),g=e.computed(()=>r.id?String(r.id):L),z=e.computed(()=>{const t={...r};return delete t.class,t}),n=e.computed(()=>typeof a.characterLimit=="boolean"?a.characterLimit?i.value.length>h:!1:i.value.length>a.characterLimit),d=t=>{var o;const l=JSON.parse(JSON.stringify((o=t==null?void 0:t.target)==null?void 0:o.value));s("input",l),s("update:modelValue",l),i.value=l},B=e.computed(()=>!n.value&&!!(a.help||c.help)),m=e.computed(()=>{var l;const t=typeof a.characterLimit=="number"?a.characterLimit:h;return n.value?`${(l=i.value)==null?void 0:l.toString().length} / ${t}`:a.help});e.watch(n,(t,l)=>{t!==l&&(s("char-limit-exceeded",{value:i.value,length:i.value.length,characterLimit:Number(a.characterLimit),limitExceeded:t}),f.value+=1)}),e.watch(A,(t,l)=>{t!==l&&d({target:{value:t}})});const w=()=>i.value?i.value:a.modelValue,b=u.IS_MAYBE_FIREFOX?()=>{}:t=>{const{target:l,clientX:o,clientY:I}=t;if(!(l instanceof HTMLTextAreaElement))return;const{right:N,bottom:V}=l.getBoundingClientRect();o>N-p&&I>V-p&&(l.style.height="")};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["k-textarea",[t.$attrs.class,{"input-error":a.error||a.hasError||n.value}]])},[a.label?(e.openBlock(),e.createBlock(R.default,e.mergeProps({key:0,for:g.value},a.labelAttributes,{required:v.value}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value)+" ",1)]),_:2},[y.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1040,["for","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["input-textarea-wrapper",{autosize:a.autosize,legacy:a.autosize&&!e.unref(S)}]),"data-allow-mismatch":"class","data-value":e.unref(S)?null:i.value},[e.createElementVNode("textarea",e.mergeProps({id:g.value},z.value,{"aria-invalid":T.value,class:["input-textarea",{resizable:a.resizable||a.isResizable}],rows:a.rows,value:w(),onDblclick:l[0]||(l[0]=(...o)=>e.unref(b)&&e.unref(b)(...o)),onInput:d}),null,16,D)],10,q),e.createVNode(e.Transition,{mode:"out-in",name:"kongponents-fade-transition"},{default:e.withCtx(()=>[m.value||c.help?(e.openBlock(),e.createElementBlock("p",{key:String(f.value),class:"help-text"},[B.value?e.renderSlot(t.$slots,"help",{key:0},()=>[e.createTextVNode(e.toDisplayString(m.value),1)],!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(m.value),1)],64))])):e.createCommentVNode("",!0)]),_:3})],2))}});exports.default=F;
|
package/dist/kongponents149.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./kongponents171.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./kongponents171.cjs"),u=require("./kongponents237.cjs"),d=require("./kongponents172.cjs"),s=require("./kongponents174.cjs"),_=require("./kongponents203.cjs"),k=require("./kongponents176.cjs"),n=require("./kongponents177.cjs"),m={class:"toaster-icon-container"},p={class:"toaster-content"},f={key:0,class:"toaster-title"},g={key:1,class:"toaster-message"},I=["onClick"],v=e.defineComponent({__name:"KToaster",props:{toasterState:{default:()=>[]},zIndex:{default:1e4}},emits:["close"],setup(r,{emit:c}){e.useCssVars(o=>({v4785992e:o.zIndex}));const a=c,l=o=>{switch(o){case"info":return s.default;case"success":return i.default;case"warning":return k.default;case"danger":return u.default;case"system":return _.default;default:return s.default}};return(o,C)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{class:"k-toaster",name:"kongponents-slide-up-transition",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.toasterState,t=>(e.openBlock(),e.createElementBlock("div",{key:t.key,class:e.normalizeClass(["toaster",`${t.appearance}`]),role:"alert"},[e.createElementVNode("div",m,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(t.appearance)),{class:"toaster-icon",color:`var(--kui-color-text, ${e.unref(n.KUI_COLOR_TEXT)})`,decorative:""},null,8,["color"]))]),e.createElementVNode("div",p,[t.title?(e.openBlock(),e.createElementBlock("span",f,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.message?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{"aria-label":"Close",class:"toaster-close-icon","data-testid":"toaster-close-icon",type:"button",onClick:e.withModifiers(B=>a("close",t.key),["stop"])},[e.createVNode(e.unref(d.default),{color:`var(--kui-color-text-neutral-weak, ${e.unref(n.KUI_COLOR_TEXT_NEUTRAL_WEAK)})`,size:e.unref(n.KUI_ICON_SIZE_50)},null,8,["color","size"])],8,I)],2))),128))]),_:1}))}});exports.default=v;
|
package/dist/kongponents154.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./kongponents238.cjs"),l=require("./kongponents177.cjs"),n=require("./kongponents167.cjs"),a=require("./kongponents218.cjs"),u=["href"],c=e.defineComponent({__name:"KExternalLink",props:{href:{},hideIcon:{type:Boolean}},setup(r){e.watch(()=>r.href,t=>{n.isValidUrl(t)||a.warnInvalidProp("href",`\`href\` should be a valid URL, but got "${t}".`)},{immediate:!0});const o=e.computed(()=>!!n.isValidUrl(r.href));return(t,s)=>o.value?(e.openBlock(),e.createElementBlock("a",{key:0,class:"k-external-link",href:r.href,rel:"noopener",target:"_blank"},[e.renderSlot(t.$slots,"default",{},void 0,!0),r.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.default),{key:0,decorative:"",size:e.unref(l.KUI_ICON_SIZE_30)},null,8,["size"]))],8,u)):e.createCommentVNode("",!0)}});exports.default=c;
|
package/dist/kongponents156.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("./kongponents235.cjs"),k=require("./kongponents177.cjs"),H=require("./kongponents188.cjs"),N=require("./kongponents180.cjs"),S=require("./kongponents218.cjs"),w=require("./kongponents32.cjs"),V={key:0,class:"truncate-expand-controls"},E={key:0,"data-testid":"expand-trigger-wrapper"},z=["aria-label"],$={key:0,"data-testid":"collapse-trigger-wrapper"},q={key:0,"data-testid":"expand-trigger-wrapper"},I={key:1},M=e.defineComponent({__name:"KTruncate",props:{rows:{default:1},truncateText:{type:Boolean},expanded:{type:Boolean},width:{default:"100%"}},setup(a){e.useCssVars(t=>({v47663137:p.value,v5a8ca8b3:e.unref(m),v11e4b8c8:t.rows})),e.watch(()=>a.rows,t=>{t<0&&S.warnInvalidProp("rows",`\`rows\` prop cannot be less than 0, but got "${t}".`)},{immediate:!0});const n=e.ref(a.expanded),d=e.ref(!1),f=e.ref(),o=e.ref(),i=e.ref(),g=e.ref(),p=e.ref("0px"),m=k.KUI_SPACE_40,s=e.ref(0),x=()=>{var t;if(!a.truncateText&&o.value&&(t=o.value.children)!=null&&t.length){const r=o.value.children,T=Number(String(m).replace(/px$/gi,""));let c=0;for(let u=0;u<r.length;u++)c=r[u].offsetHeight>c?r[u].offsetHeight:c;const h=(a.rows===1?0:(a.rows-1)*T)+c*a.rows+6,y=o.value.offsetHeight>h?`${h}px`:"auto";window.requestAnimationFrame(()=>{p.value=y,window.requestAnimationFrame(v)})}},v=()=>{if(o.value&&i.value){const t=a.truncateText?o.value.scrollHeight:o.value.offsetHeight,r=g.value?g.value.offsetHeight:0;d.value=t>i.value.offsetHeight-r,b()}},b=()=>{if(!a.truncateText&&(s.value=0,o.value&&i.value)){const t=o.value.children;for(let r=0;r<t.length;r++)t[r].offsetTop>i.value.offsetHeight?(s.value+=1,t[r].getAttribute("tabindex")&&(t[r].tabIndex=-1)):t[r].getAttribute("tabindex")&&(t[r].tabIndex=0)}},l=async()=>{n.value=!n.value,await e.nextTick(),v()},C=e.computed(()=>({width:N.normalizeSize(a.width)}));return e.onMounted(()=>{f.value=H.ResizeObserverHelper.create(x),f.value.observe(o.value),a.truncateText&&v()}),e.onBeforeUnmount(()=>{var t;(t=f.value)==null||t.unobserve(o.value)}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"kTruncateWrapper",ref:i,class:e.normalizeClass(["k-truncate",[n.value?"expanded":"",`truncate-${a.truncateText?"text":"content"}`]]),style:e.normalizeStyle(C.value)},[!a.truncateText&&d.value?(e.openBlock(),e.createElementBlock("div",V,[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"expand-trigger",{expand:l,truncatedCount:s.value},()=>[e.createElementVNode("button",{"aria-label":`Show ${s.value} more items`,class:"expand-trigger",type:"button",onClick:e.withModifiers(l,["stop"])},e.toDisplayString(s.value),9,z)],!0)]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"kTruncateContainer",ref:o,class:"truncate-container"},[e.renderSlot(t.$slots,"default",{},void 0,!0),!a.truncateText&&n.value?(e.openBlock(),e.createElementBlock("div",$,[e.renderSlot(t.$slots,"collapse-trigger",{collapse:l},()=>[e.createElementVNode("button",{"aria-label":"Collapse content",class:"collapse-trigger",type:"button",onClick:e.withModifiers(l,["stop"])},[e.createVNode(e.unref(B.default),{decorative:"",size:e.unref(k.KUI_ICON_SIZE_30)},null,8,["size"])])],!0)])):e.createCommentVNode("",!0)],512),a.truncateText&&(d.value||n.value)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"textToggleControls",ref:g,class:"truncate-collapse-controls"},[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(t.$slots,"expand-trigger",{expand:l},()=>[e.createVNode(w.default,{appearance:"tertiary",size:"small",onClick:e.withModifiers(l,["stop"])},{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createTextVNode(" Show more ",-1)])]),_:1})],!0)])),n.value?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(t.$slots,"collapse-trigger",{collapse:l},()=>[e.createVNode(w.default,{appearance:"tertiary",size:"small",onClick:e.withModifiers(l,["stop"])},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createTextVNode(" Show less ",-1)])]),_:1})],!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)],6))}});exports.default=M;
|
package/dist/kongponents158.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("./kongponents188.cjs"),C=require("./kongponents194.cjs"),h=require("./kongponents19.cjs"),m=require("./kongponents24.cjs");;/* empty css */const k=require("./kongponents177.cjs"),B={class:"k-copy"},L={key:0,class:"copy-badge-text"},w=["id","aria-label","onClick"],E=e.defineComponent({__name:"KCopy",props:{badgeLabel:{default:""},text:{},textTooltip:{default:""},copyTooltip:{default:""},format:{default:"default"},badge:{type:Boolean},monospace:{type:Boolean},truncate:{type:Boolean},successTooltip:{default:"Copied!"},truncationLimit:{default:8}},setup(t,{expose:f}){const u=e.useId(),l=e.ref(""),d=e.computed(()=>!t.badgeLabel||t.copyTooltip?t.copyTooltip||"Copy":`Copy ${t.badgeLabel.replace(/:$/,"")}`);e.watch(d,a=>{l.value=a},{immediate:!0});const v=e.computed(()=>`copy-tooltip-wrapper ${t.truncate&&c.value||t.badge?"truncate-content":""}`),b=e.computed(()=>t.format==="redacted"?"*****":t.format==="deleted"?`*${String(t.text||"").substring(0,5)}`:t.truncate&&t.truncationLimit&&i.value?i.value.replace(/^"(.*)"$/,"$1"):t.text),y=e.computed(()=>{if(t.textTooltip)return t.textTooltip;if(!(t.format==="redacted"||!c.value))return t.text}),s=a=>{l.value=a||t.successTooltip,setTimeout(()=>{l.value=d.value},1800)},x=async a=>{if(!await a(t.text)){s("Failed to copy");return}s()};f({copy:()=>{var a;document!=null&&document.getElementById(u)&&((a=document==null?void 0:document.getElementById(u))==null||a.click())}});const o=e.ref(),n=e.ref(),i=e.computed(()=>t.truncate&&typeof t.truncationLimit=="number"?`${String(t.text||"").substring(0,t.truncationLimit)+"..."}`:null),c=e.ref(!1),p=()=>{var a,r;t.truncate&&(t.truncationLimit!=="auto"&&i.value?c.value=!0:t.truncationLimit==="auto"&&o.value&&(c.value=((a=o.value)==null?void 0:a.offsetWidth)<((r=o.value)==null?void 0:r.scrollWidth)))};return e.onMounted(()=>{n.value=T.ResizeObserverHelper.create(p),n.value.observe(o.value)}),e.onBeforeUnmount(()=>{n.value&&n.value.unobserve(o.value)}),(a,r)=>(e.openBlock(),e.createElementBlock("div",B,[t.badge&&t.badgeLabel?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(t.badgeLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["copy-container",{"copy-element":t.truncate||t.badge,"badge-styles":t.badge}])},[t.format!=="hidden"?(e.openBlock(),e.createBlock(m.default,{key:0,class:e.normalizeClass([v.value]),"data-testid":"copy-tooltip-wrapper","max-width":"500px",placement:"bottom-start",text:y.value},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"copyTextElement",ref:o,class:e.normalizeClass(["copy-text",{monospace:t.monospace||!t.badge}])},e.toDisplayString(b.value),3)]),_:1},8,["class","text"])):e.createCommentVNode("",!0),e.createVNode(m.default,{class:"text-icon-wrapper","max-width":"500px",placement:"bottom-start",text:l.value},{default:e.withCtx(()=>[e.createVNode(h.default,null,{default:e.withCtx(({copyToClipboard:g})=>[e.createElementVNode("button",{id:e.unref(u),"aria-label":l.value,class:"copy-to-clipboard-button","data-testid":"copy-to-clipboard",type:"button",onClick:e.withModifiers(N=>x(g),["stop"])},[e.createVNode(e.unref(C.default),{class:"text-icon",decorative:"",size:e.unref(k.KUI_ICON_SIZE_30)},null,8,["size"])],8,w)]),_:1})]),_:1},8,["text"])],2)]))}});exports.default=E;
|