@kong/kongponents 9.66.11 → 9.66.12
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/bin/mcp-data/snapshot.json.gz +0 -0
- package/dist/kongponents.css +1 -1
- package/dist/kongponents104.cjs +1 -1
- package/dist/kongponents104.es.js +4 -4
- package/dist/kongponents115.cjs +1 -1
- package/dist/kongponents115.es.js +1 -1
- package/dist/kongponents117.cjs +1 -1
- package/dist/kongponents117.es.js +1 -1
- package/dist/kongponents121.cjs +1 -1
- package/dist/kongponents121.es.js +1 -1
- package/dist/kongponents123.cjs +1 -1
- package/dist/kongponents123.es.js +3 -3
- package/dist/kongponents127.cjs +1 -1
- package/dist/kongponents127.es.js +5 -5
- package/dist/kongponents130.cjs +1 -1
- package/dist/kongponents130.es.js +2 -2
- package/dist/kongponents132.cjs +1 -1
- package/dist/kongponents132.es.js +4 -4
- package/dist/kongponents138.cjs +1 -1
- package/dist/kongponents138.es.js +1 -1
- package/dist/kongponents140.cjs +1 -1
- package/dist/kongponents140.es.js +6 -6
- package/dist/kongponents147.cjs +1 -1
- package/dist/kongponents147.es.js +3 -3
- package/dist/kongponents149.cjs +1 -1
- package/dist/kongponents149.es.js +1 -1
- package/dist/kongponents151.cjs +1 -1
- package/dist/kongponents151.es.js +3 -3
- package/dist/kongponents155.cjs +1 -1
- package/dist/kongponents155.es.js +2 -2
- package/dist/kongponents163.cjs +1 -1
- package/dist/kongponents163.es.js +1 -1
- package/dist/kongponents165.cjs +1 -1
- package/dist/kongponents165.es.js +3 -3
- package/dist/kongponents167.cjs +1 -1
- package/dist/kongponents167.es.js +1 -1
- package/dist/kongponents169.cjs +1 -1
- package/dist/kongponents169.es.js +6 -6
- package/dist/kongponents182.cjs +1 -1
- package/dist/kongponents182.es.js +4 -97
- package/dist/kongponents184.cjs +1 -1
- package/dist/kongponents184.es.js +97 -18
- package/dist/kongponents185.cjs +1 -1
- package/dist/kongponents185.es.js +4 -4
- package/dist/kongponents186.cjs +1 -1
- package/dist/kongponents186.es.js +5 -36
- package/dist/kongponents187.cjs +1 -2
- package/dist/kongponents187.es.js +201 -86
- package/dist/kongponents188.cjs +1 -1
- package/dist/kongponents188.es.js +2 -17
- package/dist/kongponents190.cjs +1 -1
- package/dist/kongponents190.es.js +5 -52
- package/dist/kongponents191.cjs +1 -1
- package/dist/kongponents191.es.js +7 -212
- package/dist/kongponents192.cjs +1 -1
- package/dist/kongponents192.es.js +60 -2
- package/dist/kongponents193.cjs +1 -0
- package/dist/kongponents193.es.js +38 -0
- package/dist/kongponents194.cjs +2 -1
- package/dist/kongponents194.es.js +98 -5
- package/dist/kongponents195.cjs +1 -1
- package/dist/kongponents195.es.js +16 -7
- package/dist/kongponents196.cjs +1 -1
- package/dist/kongponents196.es.js +18 -59
- package/dist/kongponents197.cjs +1 -1
- package/dist/kongponents197.es.js +52 -17
- package/dist/kongponents198.cjs +1 -1
- package/dist/kongponents198.es.js +4 -4
- package/dist/kongponents199.cjs +1 -1
- package/dist/kongponents199.es.js +21 -5
- package/dist/kongponents200.cjs +1 -1
- package/dist/kongponents200.es.js +17 -5
- package/dist/kongponents201.cjs +1 -1
- package/dist/kongponents201.es.js +5 -21
- package/dist/kongponents202.cjs +1 -1
- package/dist/kongponents202.es.js +3 -3
- package/dist/kongponents203.cjs +1 -1
- package/dist/kongponents203.es.js +4 -4
- package/dist/kongponents204.cjs +1 -1
- package/dist/kongponents204.es.js +6 -4
- package/dist/kongponents205.cjs +1 -1
- package/dist/kongponents205.es.js +5 -5
- package/dist/kongponents206.cjs +1 -1
- package/dist/kongponents206.es.js +185 -5
- package/dist/kongponents207.cjs +1 -1
- package/dist/kongponents207.es.js +3 -3
- package/dist/kongponents208.cjs +1 -1
- package/dist/kongponents208.es.js +4 -4
- package/dist/kongponents209.cjs +1 -1
- package/dist/kongponents209.es.js +10 -5
- package/dist/kongponents210.cjs +1 -1
- package/dist/kongponents210.es.js +14 -4
- package/dist/kongponents211.cjs +1 -1
- package/dist/kongponents211.es.js +1 -1
- package/dist/kongponents212.cjs +1 -1
- package/dist/kongponents212.es.js +1 -1
- package/dist/kongponents213.cjs +1 -1
- package/dist/kongponents213.es.js +4 -6
- package/dist/kongponents214.cjs +1 -1
- package/dist/kongponents214.es.js +5 -185
- package/dist/kongponents215.cjs +1 -1
- package/dist/kongponents215.es.js +3 -3
- package/dist/kongponents216.cjs +1 -1
- package/dist/kongponents216.es.js +5 -15
- package/dist/kongponents217.cjs +1 -1
- package/dist/kongponents217.es.js +4 -4
- package/dist/kongponents218.cjs +1 -1
- package/dist/kongponents218.es.js +5 -10
- package/dist/kongponents219.cjs +1 -1
- package/dist/kongponents219.es.js +31 -55
- package/dist/kongponents220.cjs +1 -0
- package/dist/kongponents220.es.js +57 -0
- package/dist/kongponents222.cjs +1 -1
- package/dist/kongponents222.es.js +2 -182
- package/dist/kongponents223.cjs +1 -0
- package/dist/kongponents223.es.js +184 -0
- package/dist/kongponents225.cjs +1 -1
- package/dist/kongponents225.es.js +6 -24
- package/dist/{kongponents276.cjs → kongponents226.cjs} +1 -1
- package/dist/{kongponents276.es.js → kongponents226.es.js} +1 -1
- package/dist/kongponents231.cjs +1 -1
- package/dist/kongponents231.es.js +9 -23
- package/dist/kongponents232.cjs +1 -0
- package/dist/kongponents232.es.js +9 -0
- package/dist/kongponents233.cjs +1 -1
- package/dist/kongponents233.es.js +8 -44
- package/dist/kongponents234.cjs +1 -0
- package/dist/kongponents234.es.js +7 -0
- package/dist/kongponents235.cjs +1 -1
- package/dist/kongponents235.es.js +10 -41
- package/dist/kongponents236.cjs +1 -0
- package/dist/kongponents236.es.js +11 -0
- package/dist/kongponents237.cjs +1 -1
- package/dist/kongponents237.es.js +601 -54
- package/dist/kongponents238.cjs +1 -0
- package/dist/kongponents238.es.js +73 -0
- package/dist/kongponents239.cjs +1 -1
- package/dist/kongponents239.es.js +5 -2
- package/dist/kongponents240.cjs +1 -1
- package/dist/kongponents240.es.js +19 -8
- package/dist/kongponents241.cjs +1 -1
- package/dist/kongponents241.es.js +4 -6
- package/dist/kongponents242.cjs +1 -1
- package/dist/kongponents242.es.js +18 -8
- package/dist/kongponents243.cjs +1 -1
- package/dist/kongponents243.es.js +7 -4
- package/dist/kongponents244.cjs +1 -1
- package/dist/kongponents244.es.js +5 -9
- package/dist/kongponents245.cjs +1 -1
- package/dist/kongponents245.es.js +8 -8
- package/dist/kongponents246.cjs +1 -1
- package/dist/kongponents246.es.js +7 -601
- package/dist/kongponents247.cjs +1 -1
- package/dist/kongponents247.es.js +8 -71
- package/dist/kongponents248.cjs +1 -1
- package/dist/kongponents248.es.js +7 -4
- package/dist/kongponents249.cjs +1 -1
- package/dist/kongponents249.es.js +7 -19
- package/dist/kongponents25.cjs +1 -1
- package/dist/kongponents25.es.js +6 -6
- package/dist/kongponents250.cjs +1 -1
- package/dist/kongponents250.es.js +124 -4
- package/dist/kongponents251.cjs +2 -1
- package/dist/kongponents251.es.js +48 -17
- package/dist/kongponents252.cjs +1 -1
- package/dist/kongponents252.es.js +7 -7
- package/dist/kongponents253.cjs +1 -1
- package/dist/kongponents253.es.js +57 -6
- package/dist/kongponents254.cjs +1 -1
- package/dist/kongponents254.es.js +65 -9
- package/dist/kongponents255.cjs +1 -1
- package/dist/kongponents255.es.js +4 -7
- package/dist/kongponents256.cjs +1 -1
- package/dist/kongponents256.es.js +4 -8
- package/dist/kongponents257.cjs +1 -1
- package/dist/kongponents257.es.js +20 -7
- package/dist/kongponents258.cjs +1 -1
- package/dist/kongponents258.es.js +5 -8
- package/dist/kongponents259.cjs +1 -1
- package/dist/kongponents259.es.js +91 -119
- package/dist/kongponents260.cjs +1 -2
- package/dist/kongponents260.es.js +169 -46
- package/dist/kongponents261.cjs +1 -1
- package/dist/kongponents261.es.js +5 -8
- package/dist/kongponents262.cjs +1 -1
- package/dist/kongponents262.es.js +7 -57
- package/dist/kongponents263.cjs +1 -1
- package/dist/kongponents263.es.js +5 -65
- package/dist/kongponents264.cjs +1 -1
- package/dist/kongponents264.es.js +4 -4
- package/dist/kongponents265.cjs +1 -1
- package/dist/kongponents265.es.js +70 -4
- package/dist/kongponents266.cjs +1 -1
- package/dist/kongponents266.es.js +2 -21
- package/dist/kongponents267.cjs +1 -1
- package/dist/kongponents267.es.js +55 -5
- package/dist/kongponents269.cjs +1 -1
- package/dist/kongponents269.es.js +176 -170
- package/dist/kongponents27.cjs +1 -1
- package/dist/kongponents27.es.js +2 -2
- package/dist/kongponents271.cjs +1 -1
- package/dist/kongponents271.es.js +87 -7
- package/dist/kongponents273.cjs +1 -1
- package/dist/kongponents273.es.js +45 -5
- package/dist/kongponents275.cjs +1 -1
- package/dist/kongponents275.es.js +91 -2
- package/dist/kongponents277.cjs +1 -0
- package/dist/kongponents277.es.js +248 -0
- package/dist/kongponents279.cjs +1 -0
- package/dist/kongponents279.es.js +26 -0
- package/dist/kongponents281.cjs +1 -1
- package/dist/kongponents281.es.js +48 -5
- package/dist/kongponents283.cjs +1 -1
- package/dist/kongponents283.es.js +34 -4
- package/dist/kongponents285.cjs +1 -1
- package/dist/kongponents285.es.js +22 -5
- package/dist/kongponents287.cjs +1 -1
- package/dist/kongponents287.es.js +44 -6
- package/dist/kongponents289.cjs +1 -1
- package/dist/kongponents289.es.js +40 -16
- package/dist/kongponents291.cjs +1 -1
- package/dist/kongponents291.es.js +5 -8
- package/dist/kongponents292.cjs +1 -1
- package/dist/kongponents292.es.js +5 -7
- package/dist/kongponents293.cjs +1 -1
- package/dist/kongponents293.es.js +19 -3
- package/dist/kongponents294.cjs +1 -1
- package/dist/kongponents294.es.js +4 -2
- package/dist/kongponents295.cjs +1 -1
- package/dist/kongponents295.es.js +4 -5
- package/dist/kongponents296.cjs +1 -1
- package/dist/kongponents296.es.js +5 -9
- package/dist/kongponents297.cjs +1 -1
- package/dist/kongponents297.es.js +8 -4
- package/dist/kongponents298.cjs +1 -1
- package/dist/kongponents298.es.js +5 -3
- package/dist/kongponents299.cjs +1 -1
- package/dist/kongponents299.es.js +4 -3
- package/dist/kongponents300.cjs +1 -1
- package/dist/kongponents300.es.js +16 -3
- package/dist/kongponents301.cjs +1 -1
- package/dist/kongponents301.es.js +3 -7
- package/dist/kongponents302.cjs +1 -1
- package/dist/kongponents302.es.js +8 -7
- package/dist/kongponents303.cjs +1 -1
- package/dist/kongponents303.es.js +6 -4
- package/dist/kongponents304.cjs +1 -1
- package/dist/kongponents304.es.js +3 -9
- package/dist/kongponents305.cjs +1 -1
- package/dist/kongponents305.es.js +2 -6
- package/dist/kongponents306.cjs +1 -1
- package/dist/kongponents306.es.js +6 -9
- package/dist/kongponents307.cjs +1 -1
- package/dist/kongponents307.es.js +9 -6
- package/dist/kongponents308.cjs +1 -1
- package/dist/kongponents308.es.js +4 -17
- package/dist/kongponents309.cjs +1 -1
- package/dist/kongponents309.es.js +4 -12
- package/dist/kongponents310.cjs +1 -1
- package/dist/kongponents310.es.js +3 -7
- package/dist/kongponents311.cjs +1 -1
- package/dist/kongponents311.es.js +3 -12
- package/dist/kongponents312.cjs +1 -1
- package/dist/kongponents312.es.js +7 -9
- package/dist/kongponents313.cjs +1 -1
- package/dist/kongponents313.es.js +6 -5
- package/dist/kongponents314.cjs +1 -1
- package/dist/kongponents314.es.js +5 -9
- package/dist/kongponents315.cjs +1 -1
- package/dist/kongponents315.es.js +9 -15
- package/dist/kongponents316.cjs +1 -1
- package/dist/kongponents316.es.js +5 -17
- package/dist/kongponents317.cjs +1 -1
- package/dist/kongponents317.es.js +9 -6
- package/dist/kongponents318.cjs +1 -1
- package/dist/kongponents318.es.js +6 -10
- package/dist/kongponents319.cjs +1 -1
- package/dist/kongponents319.es.js +17 -6
- package/dist/kongponents32.cjs +1 -1
- package/dist/kongponents32.es.js +4 -4
- package/dist/kongponents320.cjs +1 -1
- package/dist/kongponents320.es.js +11 -7
- package/dist/kongponents321.cjs +1 -1
- package/dist/kongponents321.es.js +6 -5
- package/dist/kongponents322.cjs +1 -1
- package/dist/kongponents322.es.js +12 -6
- package/dist/kongponents323.cjs +1 -1
- package/dist/kongponents323.es.js +9 -9
- package/dist/kongponents324.cjs +1 -1
- package/dist/kongponents324.es.js +5 -7
- package/dist/kongponents325.cjs +1 -1
- package/dist/kongponents325.es.js +8 -3
- package/dist/kongponents326.cjs +1 -1
- package/dist/kongponents326.es.js +15 -5
- package/dist/kongponents327.cjs +1 -1
- package/dist/kongponents327.es.js +17 -15
- package/dist/kongponents328.cjs +1 -0
- package/dist/kongponents328.es.js +8 -0
- package/dist/kongponents329.cjs +1 -1
- package/dist/kongponents329.es.js +10 -86
- package/dist/kongponents330.cjs +1 -0
- package/dist/kongponents330.es.js +9 -0
- package/dist/kongponents331.cjs +1 -1
- package/dist/kongponents331.es.js +8 -45
- package/dist/kongponents332.cjs +1 -0
- package/dist/kongponents332.es.js +8 -0
- package/dist/kongponents333.cjs +1 -1
- package/dist/kongponents333.es.js +7 -91
- package/dist/kongponents334.cjs +1 -0
- package/dist/kongponents334.es.js +12 -0
- package/dist/kongponents335.cjs +1 -1
- package/dist/kongponents335.es.js +8 -246
- package/dist/kongponents336.cjs +1 -0
- package/dist/kongponents336.es.js +6 -0
- package/dist/kongponents337.cjs +1 -1
- package/dist/kongponents337.es.js +6 -178
- package/dist/kongponents338.cjs +1 -0
- package/dist/kongponents338.es.js +18 -0
- package/dist/kongponents339.cjs +1 -1
- package/dist/kongponents339.es.js +2 -2
- package/dist/kongponents340.cjs +1 -1
- package/dist/kongponents340.es.js +2 -2
- package/dist/kongponents341.cjs +1 -1
- package/dist/kongponents341.es.js +2 -2
- package/dist/kongponents342.cjs +1 -1
- package/dist/kongponents342.es.js +2 -2
- package/dist/kongponents343.cjs +1 -1
- package/dist/kongponents343.es.js +4 -4
- package/dist/kongponents346.cjs +1 -1
- package/dist/kongponents346.es.js +1 -1
- package/dist/kongponents349.cjs +1 -1
- package/dist/kongponents349.es.js +1 -1
- package/dist/kongponents350.cjs +1 -1
- package/dist/kongponents350.es.js +3 -3
- package/dist/kongponents352.cjs +1 -1
- package/dist/kongponents352.es.js +1 -1
- package/dist/kongponents353.cjs +1 -1
- package/dist/kongponents353.es.js +1 -1
- package/dist/kongponents354.cjs +1 -1
- package/dist/kongponents354.es.js +1 -1
- package/dist/kongponents355.cjs +1 -1
- package/dist/kongponents355.es.js +2 -2
- package/dist/kongponents356.cjs +1 -1
- package/dist/kongponents356.es.js +2 -2
- package/dist/kongponents357.cjs +1 -1
- package/dist/kongponents357.es.js +2 -2
- package/dist/kongponents358.cjs +1 -1
- package/dist/kongponents358.es.js +2 -2
- package/dist/kongponents359.cjs +1 -1
- package/dist/kongponents359.es.js +2 -2
- package/dist/kongponents360.cjs +1 -1
- package/dist/kongponents360.es.js +2 -2
- package/dist/kongponents361.cjs +1 -1
- package/dist/kongponents361.es.js +3 -3
- package/dist/kongponents362.cjs +1 -1
- package/dist/kongponents362.es.js +3 -3
- package/dist/kongponents363.cjs +1 -1
- package/dist/kongponents363.es.js +4 -4
- package/dist/kongponents364.cjs +1 -1
- package/dist/kongponents364.es.js +4 -4
- package/dist/kongponents365.cjs +1 -1
- package/dist/kongponents365.es.js +3 -3
- package/dist/kongponents366.cjs +1 -1
- package/dist/kongponents366.es.js +3 -3
- package/dist/kongponents367.cjs +1 -1
- package/dist/kongponents367.es.js +2 -2
- package/dist/kongponents368.cjs +1 -1
- package/dist/kongponents368.es.js +3 -3
- package/dist/kongponents369.cjs +1 -1
- package/dist/kongponents369.es.js +3 -3
- package/dist/kongponents370.cjs +1 -1
- package/dist/kongponents370.es.js +3 -3
- package/dist/kongponents371.cjs +1 -1
- package/dist/kongponents371.es.js +2 -2
- package/dist/kongponents372.cjs +1 -1
- package/dist/kongponents372.es.js +2 -2
- package/dist/kongponents373.cjs +1 -1
- package/dist/kongponents373.es.js +2 -2
- package/dist/kongponents374.cjs +1 -1
- package/dist/kongponents374.es.js +3 -3
- package/dist/kongponents375.cjs +1 -1
- package/dist/kongponents375.es.js +3 -3
- package/dist/kongponents376.cjs +1 -1
- package/dist/kongponents376.es.js +3 -3
- package/dist/kongponents377.cjs +1 -1
- package/dist/kongponents377.es.js +3 -3
- package/dist/kongponents378.cjs +1 -1
- package/dist/kongponents378.es.js +3 -3
- package/dist/kongponents379.cjs +1 -1
- package/dist/kongponents379.es.js +3 -3
- package/dist/kongponents380.cjs +1 -1
- package/dist/kongponents380.es.js +2 -2
- package/dist/kongponents381.cjs +1 -1
- package/dist/kongponents381.es.js +3 -3
- package/dist/kongponents382.cjs +1 -1
- package/dist/kongponents382.es.js +3 -3
- package/dist/kongponents383.cjs +1 -1
- package/dist/kongponents383.es.js +2 -2
- package/dist/kongponents384.cjs +1 -1
- package/dist/kongponents384.es.js +2 -2
- package/dist/kongponents400.cjs +1 -1
- package/dist/kongponents400.es.js +16 -63
- package/dist/kongponents401.cjs +1 -1
- package/dist/kongponents401.es.js +2 -5
- package/dist/kongponents402.cjs +1 -1
- package/dist/kongponents402.es.js +13 -13
- package/dist/kongponents403.cjs +1 -1
- package/dist/kongponents403.es.js +65 -2
- package/dist/kongponents404.cjs +1 -1
- package/dist/kongponents404.es.js +4 -17
- package/dist/kongponents409.cjs +1 -1
- package/dist/kongponents409.es.js +4 -19
- package/dist/kongponents410.cjs +1 -1
- package/dist/kongponents410.es.js +5 -8
- package/dist/kongponents411.cjs +1 -1
- package/dist/kongponents411.es.js +19 -5
- package/dist/kongponents413.cjs +1 -1
- package/dist/kongponents413.es.js +94 -6
- package/dist/kongponents415.cjs +1 -1
- package/dist/kongponents415.es.js +7 -14
- package/dist/kongponents416.cjs +1 -1
- package/dist/kongponents416.es.js +6 -3
- package/dist/kongponents417.cjs +1 -1
- package/dist/kongponents417.es.js +8 -7
- package/dist/kongponents418.cjs +1 -1
- package/dist/kongponents418.es.js +6 -3
- package/dist/kongponents419.cjs +1 -1
- package/dist/kongponents419.es.js +7 -8
- package/dist/kongponents420.cjs +1 -1
- package/dist/kongponents420.es.js +14 -7
- package/dist/kongponents421.cjs +1 -1
- package/dist/kongponents421.es.js +3 -6
- package/dist/kongponents422.cjs +1 -1
- package/dist/kongponents422.es.js +8 -2
- package/dist/kongponents423.cjs +1 -1
- package/dist/kongponents423.es.js +3 -13
- package/dist/kongponents424.cjs +1 -1
- package/dist/kongponents424.es.js +10 -4
- package/dist/kongponents425.cjs +1 -1
- package/dist/kongponents425.es.js +7 -5
- package/dist/kongponents426.cjs +1 -1
- package/dist/kongponents426.es.js +5 -29
- package/dist/kongponents427.cjs +1 -1
- package/dist/kongponents427.es.js +13 -3
- package/dist/kongponents428.cjs +1 -1
- package/dist/kongponents428.es.js +5 -26
- package/dist/kongponents429.cjs +1 -1
- package/dist/kongponents429.es.js +2 -4
- package/dist/kongponents430.cjs +1 -1
- package/dist/kongponents430.es.js +3 -4
- package/dist/kongponents431.cjs +1 -1
- package/dist/kongponents431.es.js +26 -4
- package/dist/kongponents432.cjs +1 -1
- package/dist/kongponents432.es.js +3 -3
- package/dist/kongponents433.cjs +1 -1
- package/dist/kongponents433.es.js +4 -4
- package/dist/kongponents434.cjs +1 -1
- package/dist/kongponents434.es.js +4 -15
- package/dist/kongponents435.cjs +1 -1
- package/dist/kongponents435.es.js +4 -27
- package/dist/kongponents436.cjs +1 -1
- package/dist/kongponents436.es.js +4 -16
- package/dist/kongponents437.cjs +1 -1
- package/dist/kongponents437.es.js +13 -8
- package/dist/kongponents438.cjs +1 -1
- package/dist/kongponents438.es.js +5 -4
- package/dist/kongponents439.cjs +1 -1
- package/dist/kongponents439.es.js +29 -13
- package/dist/kongponents440.cjs +1 -1
- package/dist/kongponents440.es.js +26 -8
- package/dist/kongponents441.cjs +1 -1
- package/dist/kongponents441.es.js +16 -3
- package/dist/kongponents442.cjs +1 -1
- package/dist/kongponents442.es.js +9 -5
- package/dist/kongponents443.cjs +1 -1
- package/dist/kongponents443.es.js +4 -5
- package/dist/kongponents444.cjs +1 -1
- package/dist/kongponents444.es.js +13 -7
- package/dist/kongponents445.cjs +1 -1
- package/dist/kongponents445.es.js +8 -5
- package/dist/kongponents446.cjs +1 -1
- package/dist/kongponents446.es.js +2 -10
- package/dist/kongponents447.cjs +1 -1
- package/dist/kongponents447.es.js +5 -5
- package/dist/kongponents448.cjs +1 -1
- package/dist/kongponents448.es.js +5 -4
- package/dist/kongponents449.cjs +1 -1
- package/dist/kongponents449.es.js +7 -4
- package/dist/kongponents450.cjs +1 -1
- package/dist/kongponents450.es.js +5 -5
- package/dist/kongponents451.cjs +1 -1
- package/dist/kongponents451.es.js +11 -8
- package/dist/kongponents452.cjs +1 -1
- package/dist/kongponents452.es.js +5 -6
- package/dist/kongponents453.cjs +1 -1
- package/dist/kongponents453.es.js +5 -10
- package/dist/kongponents454.cjs +1 -1
- package/dist/kongponents454.es.js +4 -6
- package/dist/kongponents455.cjs +1 -1
- package/dist/kongponents455.es.js +5 -21
- package/dist/kongponents456.cjs +1 -1
- package/dist/kongponents456.es.js +8 -7
- package/dist/kongponents457.cjs +1 -1
- package/dist/kongponents457.es.js +6 -6
- package/dist/kongponents458.cjs +1 -1
- package/dist/kongponents458.es.js +10 -7
- package/dist/kongponents459.cjs +1 -1
- package/dist/kongponents459.es.js +6 -8
- package/dist/kongponents460.cjs +1 -1
- package/dist/kongponents460.es.js +22 -5
- package/dist/kongponents461.cjs +1 -1
- package/dist/kongponents461.es.js +7 -5
- package/dist/kongponents462.cjs +1 -0
- package/dist/kongponents462.es.js +9 -0
- package/dist/kongponents463.cjs +1 -1
- package/dist/kongponents463.es.js +7 -121
- package/dist/kongponents464.cjs +1 -0
- package/dist/kongponents464.es.js +11 -0
- package/dist/kongponents465.cjs +1 -1
- package/dist/kongponents465.es.js +113 -86
- package/dist/kongponents467.cjs +1 -1
- package/dist/kongponents467.es.js +2 -2
- package/dist/kongponents468.cjs +1 -1
- package/dist/kongponents468.es.js +1 -1
- package/dist/kongponents469.cjs +1 -1
- package/dist/kongponents469.es.js +4 -4
- package/dist/kongponents470.cjs +1 -1
- package/dist/kongponents470.es.js +3 -3
- package/dist/kongponents477.cjs +1 -1
- package/dist/kongponents477.es.js +25 -6
- package/dist/kongponents478.cjs +1 -1
- package/dist/kongponents478.es.js +96 -5
- package/dist/kongponents479.cjs +1 -1
- package/dist/kongponents479.es.js +47 -11
- package/dist/kongponents480.cjs +1 -1
- package/dist/kongponents480.es.js +9 -7
- package/dist/kongponents481.cjs +1 -1
- package/dist/kongponents481.es.js +9 -6
- package/dist/kongponents482.cjs +1 -1
- package/dist/kongponents482.es.js +14 -25
- package/dist/kongponents483.cjs +1 -1
- package/dist/kongponents483.es.js +10 -96
- package/dist/kongponents484.cjs +1 -1
- package/dist/kongponents484.es.js +6 -47
- package/dist/kongponents485.cjs +1 -1
- package/dist/kongponents485.es.js +5 -9
- package/dist/kongponents486.cjs +1 -1
- package/dist/kongponents486.es.js +10 -9
- package/dist/kongponents487.cjs +1 -1
- package/dist/kongponents487.es.js +7 -13
- package/dist/kongponents488.cjs +1 -1
- package/dist/kongponents488.es.js +6 -10
- package/dist/kongponents491.cjs +1 -1
- package/dist/kongponents491.es.js +1 -1
- package/dist/kongponents493.cjs +1 -1
- package/dist/kongponents493.es.js +1 -1
- package/dist/kongponents495.cjs +1 -1
- package/dist/kongponents495.es.js +1 -1
- package/dist/kongponents497.cjs +1 -1
- package/dist/kongponents497.es.js +1 -1
- package/dist/kongponents498.cjs +1 -1
- package/dist/kongponents498.es.js +3 -3
- package/dist/kongponents499.cjs +1 -1
- package/dist/kongponents499.es.js +2 -2
- package/dist/kongponents500.cjs +1 -1
- package/dist/kongponents500.es.js +3 -3
- package/dist/kongponents501.cjs +1 -1
- package/dist/kongponents501.es.js +2 -2
- package/dist/kongponents502.cjs +1 -1
- package/dist/kongponents502.es.js +1 -1
- package/dist/kongponents503.cjs +1 -1
- package/dist/kongponents503.es.js +1 -1
- package/dist/kongponents512.cjs +1 -1
- package/dist/kongponents512.es.js +1 -1
- package/dist/kongponents518.cjs +1 -1
- package/dist/kongponents518.es.js +2 -2
- package/dist/kongponents519.cjs +1 -1
- package/dist/kongponents519.es.js +2 -2
- package/dist/kongponents520.cjs +1 -1
- package/dist/kongponents520.es.js +2 -2
- package/dist/kongponents521.cjs +1 -1
- package/dist/kongponents521.es.js +1 -1
- package/dist/kongponents525.cjs +1 -1
- package/dist/kongponents525.es.js +1 -1
- package/dist/kongponents526.cjs +1 -1
- package/dist/kongponents526.es.js +4 -4
- package/dist/kongponents528.cjs +1 -1
- package/dist/kongponents528.es.js +1 -1
- package/dist/kongponents535.cjs +1 -1
- package/dist/kongponents535.es.js +1 -1
- package/dist/kongponents536.es.js +2 -2
- package/dist/kongponents537.es.js +2 -2
- package/dist/kongponents540.cjs +1 -1
- package/dist/kongponents540.es.js +21 -2
- package/dist/kongponents541.cjs +1 -1
- package/dist/kongponents541.es.js +18 -15
- package/dist/kongponents542.cjs +1 -1
- package/dist/kongponents542.es.js +2 -24
- package/dist/kongponents544.cjs +1 -1
- package/dist/kongponents544.es.js +27 -2
- package/dist/kongponents545.cjs +1 -1
- package/dist/kongponents545.es.js +23 -23
- package/dist/kongponents546.cjs +1 -1
- package/dist/kongponents546.es.js +2 -27
- package/dist/kongponents548.es.js +2 -2
- package/dist/kongponents549.es.js +2 -2
- package/dist/kongponents562.cjs +1 -1
- package/dist/kongponents562.es.js +1 -1
- package/dist/kongponents575.cjs +1 -1
- package/dist/kongponents575.es.js +1 -1
- package/dist/kongponents578.cjs +1 -1
- package/dist/kongponents578.es.js +1 -1
- package/dist/kongponents580.cjs +1 -1
- package/dist/kongponents580.es.js +1 -1
- package/dist/kongponents581.cjs +1 -1
- package/dist/kongponents581.es.js +1 -1
- package/dist/kongponents582.cjs +1 -1
- package/dist/kongponents582.es.js +1 -1
- package/dist/kongponents584.es.js +2 -2
- package/dist/kongponents585.es.js +2 -2
- package/dist/kongponents586.es.js +2 -2
- package/dist/kongponents587.es.js +2 -2
- package/dist/kongponents83.cjs +1 -1
- package/dist/kongponents83.es.js +1 -1
- package/dist/kongponents85.cjs +1 -1
- package/dist/kongponents85.es.js +1 -1
- package/dist/kongponents91.cjs +1 -1
- package/dist/kongponents91.es.js +1 -1
- package/dist/kongponents97.cjs +1 -1
- package/dist/kongponents97.es.js +6 -6
- package/package.json +1 -1
- package/dist/kongponents189.cjs +0 -1
- package/dist/kongponents189.es.js +0 -7
- package/dist/kongponents221.cjs +0 -1
- package/dist/kongponents221.es.js +0 -33
- package/dist/kongponents224.cjs +0 -1
- package/dist/kongponents224.es.js +0 -8
- package/dist/kongponents227.cjs +0 -1
- package/dist/kongponents227.es.js +0 -50
- package/dist/kongponents229.cjs +0 -1
- package/dist/kongponents229.es.js +0 -36
- package/dist/kongponents268.cjs +0 -1
- package/dist/kongponents268.es.js +0 -99
- package/dist/kongponents270.cjs +0 -1
- package/dist/kongponents270.es.js +0 -7
- package/dist/kongponents272.cjs +0 -1
- package/dist/kongponents272.es.js +0 -7
- package/dist/kongponents274.cjs +0 -1
- package/dist/kongponents274.es.js +0 -72
- package/dist/kongponents280.cjs +0 -1
- package/dist/kongponents280.es.js +0 -7
- package/dist/kongponents282.cjs +0 -1
- package/dist/kongponents282.es.js +0 -22
- package/dist/kongponents284.cjs +0 -1
- package/dist/kongponents284.es.js +0 -7
- package/dist/kongponents286.cjs +0 -1
- package/dist/kongponents286.es.js +0 -11
- package/dist/kongponents288.cjs +0 -1
- package/dist/kongponents288.es.js +0 -6
- package/dist/kongponents290.cjs +0 -1
- package/dist/kongponents290.es.js +0 -6
- package/dist/kongponents412.cjs +0 -1
- package/dist/kongponents412.es.js +0 -11
- package/dist/kongponents414.cjs +0 -1
- package/dist/kongponents414.es.js +0 -12
- /package/dist/{kongponents278.cjs → kongponents228.cjs} +0 -0
- /package/dist/{kongponents278.es.js → kongponents228.es.js} +0 -0
package/dist/kongponents27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),Pe=require("./kongponents72.cjs"),ke=require("./kongponents182.cjs");require("./kongponents7.cjs");require("./kongponents12.cjs");const Fe=require("./kongponents13.cjs"),$=require("./kongponents181.cjs");require("nanoid");const Ae=require("./kongponents216.cjs"),Re=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>(()=>({}))},rowLink:{default:()=>(()=>({}))},rowBulkActionEnabled:{default:()=>(()=>!0)},rowKey:{},cellAttrs:{default:()=>(()=>({}))},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Fe.EmptyStateIconVariants.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>(()=>!1)},rowExpanded:{default:()=>(()=>!1)},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},actionsDropdownPopoverAttributes:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(a,{expose:M,emit:q}){const W=t.createPropsRestProxy(a,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),N=t.computed(()=>{const e=/^on[^a-z]/;return Ae.default(W,(n,o)=>e.test(o))}),v=q,i=t.useSlots(),{useDebounce:F,useRequest:L,useSwrvState:U,clientSideSorter:A}=ke.default(),j=t.useId(),c=t.ref([]),S=t.computed(()=>a.sortable?a.headers:a.headers.map(e=>({...e,sortable:!1}))),V=t.computed(()=>a.emptyStateButtonAppearance?a.emptyStateButtonAppearance:a.searchInput?"tertiary":"primary"),C=t.ref(0),r=t.ref(1),d=t.ref($.getInitialPageSize(a.tablePreferences,a.paginationAttributes)),p=t.ref(a.searchInput??""),l=t.ref(a.tablePreferences.sortColumnKey||a.initialFetcherParams.sortColumnKey||""),s=t.ref(a.tablePreferences.sortColumnOrder||a.initialFetcherParams.sortColumnOrder||"desc"),R=t.ref(!(l.value&&a.clientSort)),f=t.ref(null),m=t.ref([]),x=t.ref(!0),O=t.ref(!1),y={pageSize:d.value,page:r.value,query:p.value,sortColumnKey:l.value,sortColumnOrder:s.value,offset:f.value},G=t.computed(()=>({totalCount:C.value,initialPageSize:d.value,currentPage:r.value,offsetPreviousButtonDisabled:!P.value,offsetNextButtonDisabled:!b.value||!x.value,...a.paginationAttributes})),Q=e=>e.startsWith("column-"),J=e=>e.startsWith("tooltip-"),Z=e=>S.value.some(n=>n.key===e),X=t.computed(()=>i?Object.keys(i).filter(Q):[]),Y=t.computed(()=>i?Object.keys(i).filter(J):[]),_=t.computed(()=>i?Object.keys(i).filter(Z):[]),z=t.computed(()=>({sortColumnKey:l.value,sortColumnOrder:s.value})),H=t.computed(()=>({pageSize:d.value,page:r.value,query:p.value,offset:f.value,...a.clientSort?{}:z.value})),ee=t.computed(()=>({...H.value,...z.value})),te=t.ref(!0),ae=async()=>{const e=await a.fetcher(ee.value);return te.value=!1,e},oe=()=>{const e={...y,...a.initialFetcherParams};if(r.value=e.page??y.page,d.value=e.pageSize??y.pageSize,p.value=e.query??y.query,l.value=e.sortColumnKey??y.sortColumnKey,s.value=e.sortColumnOrder??y.sortColumnOrder,a.clientSort&&l.value&&s.value){const n=S.value.find(u=>u.key===l.value)||{},{useSortHandlerFunction:o}=n;if(o&&a.sortHandlerFunction){const u=a.sortHandlerFunction({key:l.value,prevKey:"",sortColumnOrder:s.value,data:c.value});u&&(c.value=[...u])}else A(l.value,"",s.value,c.value)}a.paginationAttributes?.offset&&(f.value=e.offset,m.value.push(e.offset)),O.value=!0},P=t.computed(()=>m.value[r.value-1]||null),b=t.ref(null),ne=t.computed(()=>{if(!a.fetcher||!O.value)return"";let e=j;return a.cacheIdentifier&&(e=a.cacheIdentifier),e+=`-${JSON.stringify(H.value)}`,a.fetcherCacheKey&&(e+=`-${a.fetcherCacheKey}`),`k-table_${e}`}),{debouncedFn:re,generateDebouncedFn:le}=F(e=>{p.value=e},350),ie=le(0),{data:ue,response:se,error:T,revalidate:B,isValidating:ce,isLoading:K}=L(()=>ne.value,()=>ae(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:de,hasData:fe}=U(ue,T,ce),D=t.computed(()=>({hasData:fe.value,state:de.value})),I=t.computed(()=>K.value?"loading":T.value?"error":"success"),{debouncedFn:me}=F(B,500),k=({sortColumnKey:e,prevKey:n,sortColumnOrder:o},u=!0)=>{R.value=!0;const we=S.value.find(w=>w.key===e)||{},{useSortHandlerFunction:Ce}=we;if(u&&v("sort",{prevKey:n,sortColumnKey:e,sortColumnOrder:o}),r.value=1,(!l.value||e!==l.value)&&(m.value=[null]),l.value=e,s.value=o,a.clientSort)if(Ce&&a.sortHandlerFunction){const w=a.sortHandlerFunction({key:e,prevKey:n,sortColumnOrder:s.value,data:c.value});w&&(c.value=[...w])}else A(e,n,s.value,c.value);else a.paginationAttributes?.offset||me()},ve=({page:e})=>{r.value=e},ye=({pageSize:e})=>{m.value=[null],f.value=null,d.value=e,r.value=1},ge=({columnWidths:e,columnVisibility:n})=>{g.value={...g.value,...e},h.value={...h.value,...n},he()},g=t.ref(a.tablePreferences.columnWidths||{}),h=t.ref(a.tablePreferences.columnVisibility||{}),E=t.computed(()=>({pageSize:d.value,sortColumnKey:l.value,sortColumnOrder:s.value,...g.value?{columnWidths:g.value}:{},...h.value?{columnVisibility:h.value}:{}}));t.watch(()=>a.tablePreferences,e=>{d.value=e?.pageSize?e.pageSize:d.value,g.value=e?.columnWidths?e.columnWidths:g.value,h.value=e?.columnVisibility?e.columnVisibility:h.value,(e?.sortColumnKey||e?.sortColumnOrder)&&(l.value!==e.sortColumnKey||s.value!==e.sortColumnOrder)&&k({sortColumnKey:e.sortColumnKey,prevKey:l.value,sortColumnOrder:e.sortColumnOrder},!1)});const he=()=>{I.value==="success"&&v("update:table-preferences",E.value)},pe=()=>{r.value++,f.value=b.value},be=()=>{r.value--,f.value=P.value},Se=t.computed(()=>{if(!a.fetcher||a.hidePagination)return!1;const e=a.paginationAttributes?.pageSizes?.[0]??$.DEFAULT_PAGE_SIZE;return a.hidePaginationWhenOptional&&r.value===1?a.paginationAttributes?.offset?!!P.value||!!b.value||c.value.length>=e:C.value>e:!0});return t.watch(se,e=>{e?.data&&(c.value=[...e.data],C.value=a.paginationAttributes?.totalCount||e.total||e.data?.length||0,a.paginationAttributes?.offset&&(e.pagination?.offset?(b.value=e.pagination.offset,m.value[r.value]||m.value.push(e.pagination.offset)):b.value=null,x.value=e.pagination&&"hasNextPage"in e.pagination?e.pagination.hasNextPage||!1:!0),c.value.length===0&&r.value>1&&(r.value=1,m.value=[null],f.value=null),a.sortable&&!R.value&&k({sortColumnKey:l.value,prevKey:"",sortColumnOrder:s.value},!1))},{deep:!0,immediate:!0}),t.watch([D,I],e=>{const[n,o]=e;v("state",{state:o,hasData:n.hasData})}),t.watch(()=>a.searchInput,e=>{e===""?ie(e):re(e)},{immediate:!0}),t.watch([p,d],async(e,n)=>{const[o]=n,[u]=e;u!==o&&r.value!==1&&(r.value=1,m.value=[null],f.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{oe()}),M({revalidate:()=>{B()}}),(e,n)=>(t.openBlock(),t.createBlock(Pe.default,t.mergeProps({"cell-attrs":a.cellAttrs,class:"k-table-data",data:c.value,"empty-state-action-message":a.emptyStateActionMessage,"empty-state-action-route":a.emptyStateActionRoute,"empty-state-button-appearance":V.value,"empty-state-icon-variant":a.emptyStateIconVariant,"empty-state-message":a.emptyStateMessage,"empty-state-title":a.emptyStateTitle,error:a.error,"error-state-action-message":a.errorStateActionMessage,"error-state-action-route":a.errorStateActionRoute,"error-state-message":a.errorStateMessage,"error-state-title":a.errorStateTitle,headers:S.value,"hide-headers":a.hideHeaders,"hide-pagination":a.hidePagination||!Se.value,"hide-pagination-when-optional":!1,"hide-toolbar":a.hideToolbar,loading:a.loading||t.unref(K),"max-height":a.maxHeight,nested:a.nested,"pagination-attributes":G.value,"resize-columns":a.resizeColumns,"row-attrs":a.rowAttrs,"row-bulk-action-enabled":a.rowBulkActionEnabled,"row-expandable":a.rowExpandable,"row-expanded":a.rowExpanded,"row-hover":a.rowHover,"row-key":a.rowKey,"row-link":a.rowLink,"table-preferences":E.value,"tooltip-target":a.tooltipTarget},N.value,{onEmptyStateActionClick:n[0]||(n[0]=o=>v("empty-state-action-click")),onErrorActionClick:n[1]||(n[1]=o=>v("error-action-click")),onGetNextOffset:pe,onGetPreviousOffset:be,onPageChange:ve,onPageSizeChange:ye,onRowActionsToggle:n[2]||(n[2]=o=>e.$emit("row-actions-toggle",o)),onRowSelect:n[3]||(n[3]=o=>v("row-select",o)),onSort:k,"onUpdate:rowExpanded":n[4]||(n[4]=o=>v("update:row-expanded",o)),"onUpdate:tablePreferences":ge}),t.createSlots({_:2},[i.toolbar&&!a.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"toolbar",{state:D.value})]),key:"0"}:void 0,i["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(o)))]),key:"1"}:void 0,i["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(o)))]),key:"2"}:void 0,i["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"error-state")]),key:"3"}:void 0,i["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty-state")]),key:"4"}:void 0,i["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(X.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),t.renderList(Y.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),t.renderList(_.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),i["action-items"]?{name:"action-items",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(o)))]),key:"6"}:void 0,i["row-expanded"]?{name:"row-expanded",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(o)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}});exports.default=Re;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),Pe=require("./kongponents72.cjs"),ke=require("./kongponents184.cjs");require("./kongponents7.cjs");require("./kongponents12.cjs");const Fe=require("./kongponents13.cjs"),$=require("./kongponents181.cjs");require("nanoid");const Ae=require("./kongponents210.cjs"),Re=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>(()=>({}))},rowLink:{default:()=>(()=>({}))},rowBulkActionEnabled:{default:()=>(()=>!0)},rowKey:{},cellAttrs:{default:()=>(()=>({}))},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Fe.EmptyStateIconVariants.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>(()=>!1)},rowExpanded:{default:()=>(()=>!1)},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},actionsDropdownPopoverAttributes:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(a,{expose:M,emit:q}){const W=t.createPropsRestProxy(a,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),N=t.computed(()=>{const e=/^on[^a-z]/;return Ae.default(W,(n,o)=>e.test(o))}),v=q,i=t.useSlots(),{useDebounce:F,useRequest:L,useSwrvState:U,clientSideSorter:A}=ke.default(),j=t.useId(),c=t.ref([]),S=t.computed(()=>a.sortable?a.headers:a.headers.map(e=>({...e,sortable:!1}))),V=t.computed(()=>a.emptyStateButtonAppearance?a.emptyStateButtonAppearance:a.searchInput?"tertiary":"primary"),C=t.ref(0),r=t.ref(1),d=t.ref($.getInitialPageSize(a.tablePreferences,a.paginationAttributes)),p=t.ref(a.searchInput??""),l=t.ref(a.tablePreferences.sortColumnKey||a.initialFetcherParams.sortColumnKey||""),s=t.ref(a.tablePreferences.sortColumnOrder||a.initialFetcherParams.sortColumnOrder||"desc"),R=t.ref(!(l.value&&a.clientSort)),f=t.ref(null),m=t.ref([]),x=t.ref(!0),O=t.ref(!1),y={pageSize:d.value,page:r.value,query:p.value,sortColumnKey:l.value,sortColumnOrder:s.value,offset:f.value},G=t.computed(()=>({totalCount:C.value,initialPageSize:d.value,currentPage:r.value,offsetPreviousButtonDisabled:!P.value,offsetNextButtonDisabled:!b.value||!x.value,...a.paginationAttributes})),Q=e=>e.startsWith("column-"),J=e=>e.startsWith("tooltip-"),Z=e=>S.value.some(n=>n.key===e),X=t.computed(()=>i?Object.keys(i).filter(Q):[]),Y=t.computed(()=>i?Object.keys(i).filter(J):[]),_=t.computed(()=>i?Object.keys(i).filter(Z):[]),z=t.computed(()=>({sortColumnKey:l.value,sortColumnOrder:s.value})),H=t.computed(()=>({pageSize:d.value,page:r.value,query:p.value,offset:f.value,...a.clientSort?{}:z.value})),ee=t.computed(()=>({...H.value,...z.value})),te=t.ref(!0),ae=async()=>{const e=await a.fetcher(ee.value);return te.value=!1,e},oe=()=>{const e={...y,...a.initialFetcherParams};if(r.value=e.page??y.page,d.value=e.pageSize??y.pageSize,p.value=e.query??y.query,l.value=e.sortColumnKey??y.sortColumnKey,s.value=e.sortColumnOrder??y.sortColumnOrder,a.clientSort&&l.value&&s.value){const n=S.value.find(u=>u.key===l.value)||{},{useSortHandlerFunction:o}=n;if(o&&a.sortHandlerFunction){const u=a.sortHandlerFunction({key:l.value,prevKey:"",sortColumnOrder:s.value,data:c.value});u&&(c.value=[...u])}else A(l.value,"",s.value,c.value)}a.paginationAttributes?.offset&&(f.value=e.offset,m.value.push(e.offset)),O.value=!0},P=t.computed(()=>m.value[r.value-1]||null),b=t.ref(null),ne=t.computed(()=>{if(!a.fetcher||!O.value)return"";let e=j;return a.cacheIdentifier&&(e=a.cacheIdentifier),e+=`-${JSON.stringify(H.value)}`,a.fetcherCacheKey&&(e+=`-${a.fetcherCacheKey}`),`k-table_${e}`}),{debouncedFn:re,generateDebouncedFn:le}=F(e=>{p.value=e},350),ie=le(0),{data:ue,response:se,error:T,revalidate:B,isValidating:ce,isLoading:K}=L(()=>ne.value,()=>ae(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:de,hasData:fe}=U(ue,T,ce),D=t.computed(()=>({hasData:fe.value,state:de.value})),I=t.computed(()=>K.value?"loading":T.value?"error":"success"),{debouncedFn:me}=F(B,500),k=({sortColumnKey:e,prevKey:n,sortColumnOrder:o},u=!0)=>{R.value=!0;const we=S.value.find(w=>w.key===e)||{},{useSortHandlerFunction:Ce}=we;if(u&&v("sort",{prevKey:n,sortColumnKey:e,sortColumnOrder:o}),r.value=1,(!l.value||e!==l.value)&&(m.value=[null]),l.value=e,s.value=o,a.clientSort)if(Ce&&a.sortHandlerFunction){const w=a.sortHandlerFunction({key:e,prevKey:n,sortColumnOrder:s.value,data:c.value});w&&(c.value=[...w])}else A(e,n,s.value,c.value);else a.paginationAttributes?.offset||me()},ve=({page:e})=>{r.value=e},ye=({pageSize:e})=>{m.value=[null],f.value=null,d.value=e,r.value=1},ge=({columnWidths:e,columnVisibility:n})=>{g.value={...g.value,...e},h.value={...h.value,...n},he()},g=t.ref(a.tablePreferences.columnWidths||{}),h=t.ref(a.tablePreferences.columnVisibility||{}),E=t.computed(()=>({pageSize:d.value,sortColumnKey:l.value,sortColumnOrder:s.value,...g.value?{columnWidths:g.value}:{},...h.value?{columnVisibility:h.value}:{}}));t.watch(()=>a.tablePreferences,e=>{d.value=e?.pageSize?e.pageSize:d.value,g.value=e?.columnWidths?e.columnWidths:g.value,h.value=e?.columnVisibility?e.columnVisibility:h.value,(e?.sortColumnKey||e?.sortColumnOrder)&&(l.value!==e.sortColumnKey||s.value!==e.sortColumnOrder)&&k({sortColumnKey:e.sortColumnKey,prevKey:l.value,sortColumnOrder:e.sortColumnOrder},!1)});const he=()=>{I.value==="success"&&v("update:table-preferences",E.value)},pe=()=>{r.value++,f.value=b.value},be=()=>{r.value--,f.value=P.value},Se=t.computed(()=>{if(!a.fetcher||a.hidePagination)return!1;const e=a.paginationAttributes?.pageSizes?.[0]??$.DEFAULT_PAGE_SIZE;return a.hidePaginationWhenOptional&&r.value===1?a.paginationAttributes?.offset?!!P.value||!!b.value||c.value.length>=e:C.value>e:!0});return t.watch(se,e=>{e?.data&&(c.value=[...e.data],C.value=a.paginationAttributes?.totalCount||e.total||e.data?.length||0,a.paginationAttributes?.offset&&(e.pagination?.offset?(b.value=e.pagination.offset,m.value[r.value]||m.value.push(e.pagination.offset)):b.value=null,x.value=e.pagination&&"hasNextPage"in e.pagination?e.pagination.hasNextPage||!1:!0),c.value.length===0&&r.value>1&&(r.value=1,m.value=[null],f.value=null),a.sortable&&!R.value&&k({sortColumnKey:l.value,prevKey:"",sortColumnOrder:s.value},!1))},{deep:!0,immediate:!0}),t.watch([D,I],e=>{const[n,o]=e;v("state",{state:o,hasData:n.hasData})}),t.watch(()=>a.searchInput,e=>{e===""?ie(e):re(e)},{immediate:!0}),t.watch([p,d],async(e,n)=>{const[o]=n,[u]=e;u!==o&&r.value!==1&&(r.value=1,m.value=[null],f.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{oe()}),M({revalidate:()=>{B()}}),(e,n)=>(t.openBlock(),t.createBlock(Pe.default,t.mergeProps({"cell-attrs":a.cellAttrs,class:"k-table-data",data:c.value,"empty-state-action-message":a.emptyStateActionMessage,"empty-state-action-route":a.emptyStateActionRoute,"empty-state-button-appearance":V.value,"empty-state-icon-variant":a.emptyStateIconVariant,"empty-state-message":a.emptyStateMessage,"empty-state-title":a.emptyStateTitle,error:a.error,"error-state-action-message":a.errorStateActionMessage,"error-state-action-route":a.errorStateActionRoute,"error-state-message":a.errorStateMessage,"error-state-title":a.errorStateTitle,headers:S.value,"hide-headers":a.hideHeaders,"hide-pagination":a.hidePagination||!Se.value,"hide-pagination-when-optional":!1,"hide-toolbar":a.hideToolbar,loading:a.loading||t.unref(K),"max-height":a.maxHeight,nested:a.nested,"pagination-attributes":G.value,"resize-columns":a.resizeColumns,"row-attrs":a.rowAttrs,"row-bulk-action-enabled":a.rowBulkActionEnabled,"row-expandable":a.rowExpandable,"row-expanded":a.rowExpanded,"row-hover":a.rowHover,"row-key":a.rowKey,"row-link":a.rowLink,"table-preferences":E.value,"tooltip-target":a.tooltipTarget},N.value,{onEmptyStateActionClick:n[0]||(n[0]=o=>v("empty-state-action-click")),onErrorActionClick:n[1]||(n[1]=o=>v("error-action-click")),onGetNextOffset:pe,onGetPreviousOffset:be,onPageChange:ve,onPageSizeChange:ye,onRowActionsToggle:n[2]||(n[2]=o=>e.$emit("row-actions-toggle",o)),onRowSelect:n[3]||(n[3]=o=>v("row-select",o)),onSort:k,"onUpdate:rowExpanded":n[4]||(n[4]=o=>v("update:row-expanded",o)),"onUpdate:tablePreferences":ge}),t.createSlots({_:2},[i.toolbar&&!a.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"toolbar",{state:D.value})]),key:"0"}:void 0,i["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(o)))]),key:"1"}:void 0,i["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(o)))]),key:"2"}:void 0,i["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"error-state")]),key:"3"}:void 0,i["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty-state")]),key:"4"}:void 0,i["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(X.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),t.renderList(Y.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),t.renderList(_.value,o=>({name:o,fn:t.withCtx(u=>[t.renderSlot(e.$slots,o,t.normalizeProps(t.guardReactiveProps(u)))])})),i["action-items"]?{name:"action-items",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(o)))]),key:"6"}:void 0,i["row-expanded"]?{name:"row-expanded",fn:t.withCtx(o=>[t.renderSlot(e.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(o)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}});exports.default=Re;
|
package/dist/kongponents27.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as xe, createPropsRestProxy as He, computed as l, useSlots as Te, useId as Be, ref as r, watch as P, onMounted as Ke, openBlock as ze, createBlock as De, mergeProps as Ie, unref as Ee, createSlots as $e, withCtx as d, renderSlot as f, normalizeProps as b, guardReactiveProps as p, renderList as T } from "vue";
|
|
2
2
|
import Me from "./kongponents72.es.js";
|
|
3
|
-
import We from "./
|
|
3
|
+
import We from "./kongponents184.es.js";
|
|
4
4
|
import "./kongponents7.es.js";
|
|
5
5
|
import "./kongponents12.es.js";
|
|
6
6
|
import { EmptyStateIconVariants as Ne } from "./kongponents13.es.js";
|
|
7
7
|
import { getInitialPageSize as Le, DEFAULT_PAGE_SIZE as qe } from "./kongponents181.es.js";
|
|
8
8
|
import "nanoid";
|
|
9
|
-
import Ue from "./
|
|
9
|
+
import Ue from "./kongponents210.es.js";
|
|
10
10
|
const et = /* @__PURE__ */ xe({
|
|
11
11
|
__name: "KTableData",
|
|
12
12
|
props: {
|
package/dist/kongponents271.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./kongponents202.cjs"),p={ref:"itemsContainer"},B={key:1,class:"select-group","data-propagate-clicks":"false"},g={class:"select-group-title"},v={class:"select-item-description"},u=".select-item button:not(:disabled)",w='.select-item[aria-selected="true"] button:not(:disabled)',C=e.defineComponent({__name:"KSelectItems",props:{items:{default:()=>[]},itemCreationEnabled:{type:Boolean},filterString:{default:""},itemCreationValid:{type:Boolean,default:!0}},emits:["selected","add-item"],setup(i,{expose:f,emit:E}){const k=E,a=n=>"items"in n&&Array.isArray(n.items),d=n=>k("selected",n),m=e.useTemplateRef("itemsContainer"),S=n=>{const o=m.value;if(!o)return;const t=o.querySelectorAll(u);if(!t?.length)return;const s=o.querySelector(w);if(s){const l=[...t].indexOf(s);t[n==="down"?l+1:l-1]?.focus()}else t[n==="down"?0:t.length-1]?.focus()},c=({target:n,key:o})=>{if(o==="ArrowDown"||o==="ArrowUp"){const t=m.value?.querySelectorAll(u);if(t?.length){const s=[...t].indexOf(n),l=o==="ArrowDown"?s+1:s-1;t[l]?.focus()}}};return f({setFocus:S}),(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,(t,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a(t)?`${t.key||t.label}-group`:t.key||t.value||s},[a(t)?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",g,e.toDisplayString(t.label),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,l=>(e.openBlock(),e.createBlock(r.default,{key:l.key,item:l,onKeydown:c,onSelected:d},{content:e.withCtx(()=>[e.renderSlot(n.$slots,"content",{item:l},void 0,!0)]),_:2},1032,["item"]))),128))])):(e.openBlock(),e.createBlock(r.default,{key:0,item:t,onKeydown:c,onSelected:d},{content:e.withCtx(()=>[e.renderSlot(n.$slots,"content",{item:t},void 0,!0)]),_:2},1032,["item"]))],64))),128)),i.itemCreationEnabled?(e.openBlock(),e.createBlock(r.default,{key:"select-add-item",class:"select-add-item","data-testid":"select-add-item",item:{label:`${i.filterString} (Add new value)`,value:"add_item",disabled:!i.itemCreationValid},onKeydown:c,onSelected:o[0]||(o[0]=t=>n.$emit("add-item"))},{content:e.withCtx(()=>[e.createElementVNode("div",v,[e.createTextVNode(e.toDisplayString(i.filterString)+" ",1),o[1]||(o[1]=e.createElementVNode("span",{class:"select-item-new-indicator"},"(Add new value)",-1))])]),_:1},8,["item"])):e.createCommentVNode("",!0)],512))}});exports.default=C;
|
|
@@ -1,9 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defineComponent as I, useTemplateRef as y, openBlock as s, createElementBlock as d, Fragment as c, renderList as w, createBlock as r, withCtx as m, renderSlot as C, createElementVNode as u, toDisplayString as v, createTextVNode as T, createCommentVNode as _ } from "vue";
|
|
2
|
+
import f from "./kongponents202.es.js";
|
|
3
|
+
const h = { ref: "itemsContainer" }, B = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "select-group",
|
|
6
|
+
"data-propagate-clicks": "false"
|
|
7
|
+
}, K = { class: "select-group-title" }, L = { class: "select-item-description" }, g = ".select-item button:not(:disabled)", $ = '.select-item[aria-selected="true"] button:not(:disabled)', R = /* @__PURE__ */ I({
|
|
8
|
+
__name: "KSelectItems",
|
|
9
|
+
props: {
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
itemCreationEnabled: { type: Boolean },
|
|
12
|
+
filterString: { default: "" },
|
|
13
|
+
itemCreationValid: { type: Boolean, default: !0 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["selected", "add-item"],
|
|
16
|
+
setup(i, { expose: b, emit: k }) {
|
|
17
|
+
const x = k, E = (t) => "items" in t && Array.isArray(t.items), S = (t) => x("selected", t), p = y("itemsContainer"), A = (t) => {
|
|
18
|
+
const n = p.value;
|
|
19
|
+
if (!n)
|
|
20
|
+
return;
|
|
21
|
+
const e = n.querySelectorAll(g);
|
|
22
|
+
if (!e?.length)
|
|
23
|
+
return;
|
|
24
|
+
const l = n.querySelector($);
|
|
25
|
+
if (l) {
|
|
26
|
+
const o = [...e].indexOf(l);
|
|
27
|
+
e[t === "down" ? o + 1 : o - 1]?.focus();
|
|
28
|
+
} else
|
|
29
|
+
e[t === "down" ? 0 : e.length - 1]?.focus();
|
|
30
|
+
}, a = ({ target: t, key: n }) => {
|
|
31
|
+
if (n === "ArrowDown" || n === "ArrowUp") {
|
|
32
|
+
const e = p.value?.querySelectorAll(g);
|
|
33
|
+
if (e?.length) {
|
|
34
|
+
const l = [...e].indexOf(t), o = n === "ArrowDown" ? l + 1 : l - 1;
|
|
35
|
+
e[o]?.focus();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return b({ setFocus: A }), (t, n) => (s(), d("div", h, [
|
|
40
|
+
(s(!0), d(c, null, w(i.items, (e, l) => (s(), d(c, {
|
|
41
|
+
key: E(e) ? `${e.key || e.label}-group` : e.key || e.value || l
|
|
42
|
+
}, [
|
|
43
|
+
E(e) ? (s(), d("div", B, [
|
|
44
|
+
u("span", K, v(e.label), 1),
|
|
45
|
+
(s(!0), d(c, null, w(e.items, (o) => (s(), r(f, {
|
|
46
|
+
key: o.key,
|
|
47
|
+
item: o,
|
|
48
|
+
onKeydown: a,
|
|
49
|
+
onSelected: S
|
|
50
|
+
}, {
|
|
51
|
+
content: m(() => [
|
|
52
|
+
C(t.$slots, "content", { item: o }, void 0, !0)
|
|
53
|
+
]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, ["item"]))), 128))
|
|
56
|
+
])) : (s(), r(f, {
|
|
57
|
+
key: 0,
|
|
58
|
+
item: e,
|
|
59
|
+
onKeydown: a,
|
|
60
|
+
onSelected: S
|
|
61
|
+
}, {
|
|
62
|
+
content: m(() => [
|
|
63
|
+
C(t.$slots, "content", { item: e }, void 0, !0)
|
|
64
|
+
]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, 1032, ["item"]))
|
|
67
|
+
], 64))), 128)),
|
|
68
|
+
i.itemCreationEnabled ? (s(), r(f, {
|
|
69
|
+
key: "select-add-item",
|
|
70
|
+
class: "select-add-item",
|
|
71
|
+
"data-testid": "select-add-item",
|
|
72
|
+
item: { label: `${i.filterString} (Add new value)`, value: "add_item", disabled: !i.itemCreationValid },
|
|
73
|
+
onKeydown: a,
|
|
74
|
+
onSelected: n[0] || (n[0] = (e) => t.$emit("add-item"))
|
|
75
|
+
}, {
|
|
76
|
+
content: m(() => [
|
|
77
|
+
u("div", L, [
|
|
78
|
+
T(v(i.filterString) + " ", 1),
|
|
79
|
+
n[1] || (n[1] = u("span", { class: "select-item-new-indicator" }, "(Add new value)", -1))
|
|
80
|
+
])
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["item"])) : _("", !0)
|
|
84
|
+
], 512));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
7
87
|
export {
|
|
8
|
-
|
|
88
|
+
R as default
|
|
9
89
|
};
|
package/dist/kongponents273.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=["aria-selected","data-testid"],r={class:"select-item-container"},c=["disabled","value"],m={class:"select-item-label"},u=e.defineComponent({__name:"KSelectItem",props:{item:{}},emits:["selected","arrow-down","arrow-up"],setup(t,{emit:s}){const n=s,o=i=>{if(t.item.disabled){i.stopPropagation();return}n("selected",t.item)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",{key:t.item.key,"aria-selected":t.item.selected,class:"select-item","data-testid":`select-item-${t.item.value}`,role:"option"},[e.createElementVNode("div",r,[e.createElementVNode("button",{class:e.normalizeClass({selected:t.item.selected}),disabled:t.item.disabled===!0?!0:void 0,type:"button",value:t.item.value,onClick:o,onKeydown:[l[0]||(l[0]=e.withKeys(e.withModifiers(d=>i.$emit("arrow-down"),["prevent"]),["down"])),l[1]||(l[1]=e.withKeys(e.withModifiers(d=>i.$emit("arrow-up"),["prevent"]),["up"]))]},[e.createElementVNode("span",m,[e.renderSlot(i.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.item.label),1)],!0)])],42,c)])],8,a))}});exports.default=u;
|
|
@@ -1,7 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r, openBlock as c, createElementBlock as u, createElementVNode as l, withKeys as s, withModifiers as n, normalizeClass as v, renderSlot as w, createTextVNode as b, toDisplayString as f } from "vue";
|
|
2
|
+
const k = ["aria-selected", "data-testid"], y = { class: "select-item-container" }, $ = ["disabled", "value"], h = { class: "select-item-label" }, K = /* @__PURE__ */ r({
|
|
3
|
+
__name: "KSelectItem",
|
|
4
|
+
props: {
|
|
5
|
+
item: {}
|
|
6
|
+
},
|
|
7
|
+
emits: ["selected", "arrow-down", "arrow-up"],
|
|
8
|
+
setup(e, { emit: o }) {
|
|
9
|
+
const a = o, d = (t) => {
|
|
10
|
+
if (e.item.disabled) {
|
|
11
|
+
t.stopPropagation();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
a("selected", e.item);
|
|
15
|
+
};
|
|
16
|
+
return (t, i) => (c(), u("div", {
|
|
17
|
+
key: e.item.key,
|
|
18
|
+
"aria-selected": e.item.selected,
|
|
19
|
+
class: "select-item",
|
|
20
|
+
"data-testid": `select-item-${e.item.value}`,
|
|
21
|
+
role: "option"
|
|
22
|
+
}, [
|
|
23
|
+
l("div", y, [
|
|
24
|
+
l("button", {
|
|
25
|
+
class: v({ selected: e.item.selected }),
|
|
26
|
+
disabled: e.item.disabled === !0 ? !0 : void 0,
|
|
27
|
+
type: "button",
|
|
28
|
+
value: e.item.value,
|
|
29
|
+
onClick: d,
|
|
30
|
+
onKeydown: [
|
|
31
|
+
i[0] || (i[0] = s(n((m) => t.$emit("arrow-down"), ["prevent"]), ["down"])),
|
|
32
|
+
i[1] || (i[1] = s(n((m) => t.$emit("arrow-up"), ["prevent"]), ["up"]))
|
|
33
|
+
]
|
|
34
|
+
}, [
|
|
35
|
+
l("span", h, [
|
|
36
|
+
w(t.$slots, "content", {}, () => [
|
|
37
|
+
b(f(e.item.label), 1)
|
|
38
|
+
], !0)
|
|
39
|
+
])
|
|
40
|
+
], 42, $)
|
|
41
|
+
])
|
|
42
|
+
], 8, k));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
5
45
|
export {
|
|
6
|
-
|
|
46
|
+
K as default
|
|
7
47
|
};
|
package/dist/kongponents275.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("./kongponents49.cjs"),C=require("./kongponents50.cjs"),h=require("./kongponents55.cjs"),S=require("./kongponents410.cjs"),b=require("@kong/icons"),B={key:0,class:"item-filtering-wrapper"},T={key:1,class:"no-items","data-testid":"filter-selector-no-items"},F={ref:"itemWrapper",class:"items-wrapper"},V=e.defineComponent({__name:"FilterSelector",props:{filters:{},itemFiltering:{type:Boolean,default:!1},label:{default:"Add filter"}},emits:["select"],setup(r,{emit:u}){const s=e.useTemplateRef("filterSelector"),d=e.useTemplateRef("itemWrapper"),f=e.useTemplateRef("itemFilteringInput"),a=e.ref(!1),i=e.ref(""),m=e.computed(()=>i.value.toLocaleLowerCase()),n=e.ref(!1),c=e.computed(()=>Object.entries(r.filters).filter(([,t])=>(r.itemFiltering===!1||t.label.toLocaleLowerCase().includes(m.value))&&!t.readonly).map(([t,l])=>({label:l.label,value:t,onClick:()=>v(t)}))),p=u,v=t=>{p("select",t)},g=async t=>{t?(n.value=!0,await e.nextTick(),i.value="",f.value?.input?.focus()):n.value=!1,a.value=!a.value},k=async()=>{a.value?s.value?.closeDropdown():(s.value?.openDropdown(),await e.nextTick(),d.value?.scrollTo({top:0}))};return(t,l)=>(e.openBlock(),e.createBlock(w.default,{ref:"filterSelector",width:"auto",onToggleDropdown:g},{default:e.withCtx(()=>[e.createVNode(S.default,{"data-testid":"filter-selector",label:r.label,"pill-focus":n.value,onClick:l[0]||(l[0]=e.withModifiers(()=>{},["prevent","stop"])),onTrigger:k},{"open-icon":e.withCtx(()=>[e.createVNode(e.unref(b.AddIcon),{decorative:""})]),_:1},8,["label","pill-focus"])]),items:e.withCtx(()=>[r.itemFiltering?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(h.default,{ref:"itemFilteringInput",modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=o=>i.value=o),"data-testid":"filter-selector-item-filtering",placeholder:"Search…",onClick:l[2]||(l[2]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue"])])):e.createCommentVNode("",!0),r.itemFiltering&&c.value.length===0?(e.openBlock(),e.createElementBlock("div",T," No filters found ")):e.createCommentVNode("",!0),e.createElementVNode("div",F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createBlock(C.default,{key:o.value,"data-testid":"dropdown-item-trigger",item:o,value:o.value,onClick:o.onClick},{default:e.withCtx(()=>[e.renderSlot(t.$slots,`filter-item-${o.value}`,{},()=>[e.createTextVNode(e.toDisplayString(o.label),1)],!0)]),_:2},1032,["item","value","onClick"]))),128))],512)]),_:3},512))}});exports.default=V;
|
|
@@ -1,4 +1,93 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as D, useTemplateRef as c, ref as u, computed as v, openBlock as r, createBlock as g, withCtx as a, createElementBlock as d, createVNode as m, withModifiers as w, createCommentVNode as k, createElementVNode as L, Fragment as N, renderList as x, renderSlot as B, createTextVNode as R, toDisplayString as K, unref as W, nextTick as C } from "vue";
|
|
2
|
+
import A from "./kongponents49.es.js";
|
|
3
|
+
import E from "./kongponents50.es.js";
|
|
4
|
+
import O from "./kongponents55.es.js";
|
|
5
|
+
import $ from "./kongponents410.es.js";
|
|
6
|
+
import { AddIcon as j } from "@kong/icons";
|
|
7
|
+
const M = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "item-filtering-wrapper"
|
|
10
|
+
}, P = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "no-items",
|
|
13
|
+
"data-testid": "filter-selector-no-items"
|
|
14
|
+
}, U = {
|
|
15
|
+
ref: "itemWrapper",
|
|
16
|
+
class: "items-wrapper"
|
|
17
|
+
}, X = /* @__PURE__ */ D({
|
|
18
|
+
__name: "FilterSelector",
|
|
19
|
+
props: {
|
|
20
|
+
filters: {},
|
|
21
|
+
itemFiltering: { type: Boolean, default: !1 },
|
|
22
|
+
label: { default: "Add filter" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["select"],
|
|
25
|
+
setup(o, { emit: S }) {
|
|
26
|
+
const f = c("filterSelector"), h = c("itemWrapper"), F = c("itemFilteringInput"), n = u(!1), i = u(""), b = v(() => i.value.toLocaleLowerCase()), s = u(!1), p = v(() => Object.entries(o.filters).filter(([, e]) => (o.itemFiltering === !1 || e.label.toLocaleLowerCase().includes(b.value)) && !e.readonly).map(([e, t]) => ({
|
|
27
|
+
label: t.label,
|
|
28
|
+
value: e,
|
|
29
|
+
onClick: () => y(e)
|
|
30
|
+
}))), I = S, y = (e) => {
|
|
31
|
+
I("select", e);
|
|
32
|
+
}, T = async (e) => {
|
|
33
|
+
e ? (s.value = !0, await C(), i.value = "", F.value?.input?.focus()) : s.value = !1, n.value = !n.value;
|
|
34
|
+
}, V = async () => {
|
|
35
|
+
n.value ? f.value?.closeDropdown() : (f.value?.openDropdown(), await C(), h.value?.scrollTo({ top: 0 }));
|
|
36
|
+
};
|
|
37
|
+
return (e, t) => (r(), g(A, {
|
|
38
|
+
ref: "filterSelector",
|
|
39
|
+
width: "auto",
|
|
40
|
+
onToggleDropdown: T
|
|
41
|
+
}, {
|
|
42
|
+
default: a(() => [
|
|
43
|
+
m($, {
|
|
44
|
+
"data-testid": "filter-selector",
|
|
45
|
+
label: o.label,
|
|
46
|
+
"pill-focus": s.value,
|
|
47
|
+
onClick: t[0] || (t[0] = w(() => {
|
|
48
|
+
}, ["prevent", "stop"])),
|
|
49
|
+
onTrigger: V
|
|
50
|
+
}, {
|
|
51
|
+
"open-icon": a(() => [
|
|
52
|
+
m(W(j), { decorative: "" })
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}, 8, ["label", "pill-focus"])
|
|
56
|
+
]),
|
|
57
|
+
items: a(() => [
|
|
58
|
+
o.itemFiltering ? (r(), d("div", M, [
|
|
59
|
+
m(O, {
|
|
60
|
+
ref: "itemFilteringInput",
|
|
61
|
+
modelValue: i.value,
|
|
62
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => i.value = l),
|
|
63
|
+
"data-testid": "filter-selector-item-filtering",
|
|
64
|
+
placeholder: "Search…",
|
|
65
|
+
onClick: t[2] || (t[2] = w(() => {
|
|
66
|
+
}, ["stop"]))
|
|
67
|
+
}, null, 8, ["modelValue"])
|
|
68
|
+
])) : k("", !0),
|
|
69
|
+
o.itemFiltering && p.value.length === 0 ? (r(), d("div", P, " No filters found ")) : k("", !0),
|
|
70
|
+
L("div", U, [
|
|
71
|
+
(r(!0), d(N, null, x(p.value, (l) => (r(), g(E, {
|
|
72
|
+
key: l.value,
|
|
73
|
+
"data-testid": "dropdown-item-trigger",
|
|
74
|
+
item: l,
|
|
75
|
+
value: l.value,
|
|
76
|
+
onClick: l.onClick
|
|
77
|
+
}, {
|
|
78
|
+
default: a(() => [
|
|
79
|
+
B(e.$slots, `filter-item-${l.value}`, {}, () => [
|
|
80
|
+
R(K(l.label), 1)
|
|
81
|
+
], !0)
|
|
82
|
+
]),
|
|
83
|
+
_: 2
|
|
84
|
+
}, 1032, ["item", "value", "onClick"]))), 128))
|
|
85
|
+
], 512)
|
|
86
|
+
]),
|
|
87
|
+
_: 3
|
|
88
|
+
}, 512));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
2
91
|
export {
|
|
3
|
-
|
|
92
|
+
X as default
|
|
4
93
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=require("./kongponents183.cjs"),$=require("./kongponents62.cjs"),j=require("./kongponents55.cjs"),k=require("./kongponents66.cjs"),G=require("./kongponents60.cjs"),W=require("./kongponents410.cjs"),z={class:"filter-content","data-testid":"filter-pill-content"},H={class:"default-layout"},J={key:0,class:"operator"},Q={class:"value"},X={class:"footer"},Y=e.defineComponent({inheritAttrs:!1,__name:"FilterPill",props:{filter:{},initOpen:{type:Boolean,default:!1},selection:{default:()=>{}},custom:{type:Boolean,default:!1}},emits:["apply","close","open","clear"],setup(t,{emit:h}){e.useCssVars(l=>({f988e390:E.value}));const g=e.useAttrs(),m=h,c=e.ref(!1),p=e.useTemplateRef("filterPopper"),r=e.ref(),i=e.ref(),n=e.ref(),s=e.ref(),V=e.ref(),b=e.ref(),y=e.ref(!0),w=e.useTemplateRef("inputField"),d=e.computed(()=>t.custom?"custom":t.filter.options&&!t.filter.multiple?"select":t.filter.options&&t.filter.multiple?"multiselect":"input"),q=e.computed(()=>{switch(d.value){case"input":return!i.value||i.value==="";case"select":return!n.value;case"multiselect":return!s.value||s.value.length===0;case"custom":return!y.value;default:return!1}}),f=e.computed(()=>t.filter.operators&&t.filter.operators.length?t.filter.operators:["eq"]),P=l=>{r.value=l},S=(l,a)=>{V.value=l,b.value=a},B=l=>{y.value=l},N=e.computed(()=>({value:V.value,text:b.value,options:t.filter.options,multiple:t.filter.multiple,operators:f.value,operator:r.value,setOperator:P,setValue:S,setApplyState:B})),E=e.computed(()=>f.value.some(l=>l==="lte"||l==="gte")?"205px":"120px"),T=e.computed(()=>{let l,a;switch(d.value){case"input":l=i.value,a=i.value;break;case"select":l=n.value,a=t.filter?.options?.find(({value:o})=>o===n.value)?.label??n.value?.toString();break;case"multiselect":l=s.value,a=s.value?.map(o=>t.filter.options?.find(({value:u})=>u===o))?.filter(o=>o!==void 0)?.map(({label:o})=>o)?.join(", ");break;case"custom":l=V.value,a=b.value;break}if(!(r.value===void 0||l===void 0||a===void 0))return{operator:r.value,value:l,text:a}}),A=e.computed(()=>{if(t.selection?.operatorDelimiter!==void 0)return t.selection.operatorDelimiter;switch(t.selection?.operator){case"eq":return" = ";case"neq":return" ≠ ";case"lt":return" < ";case"lte":return" ≤ ";case"gt":return" > ";case"gte":return" ≥ ";default:return": "}}),x=e.computed(()=>{const l={eq:"Equals",neq:"Not equals",contains:"Contains",exists:"Exists",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to"};return f.value.map(a=>({label:l[a],value:a}))}),O=e.computed(()=>x.value.find(({value:l})=>l===r.value)?.label??""),K=()=>{d.value==="input"&&w.value?.input?.focus()},M=()=>{r.value=t.selection?.operator??f.value?.[0],i.value=typeof t.selection?.value=="string"?t.selection.value:void 0,n.value=t.filter.options?.find(({value:l})=>l===t.selection?.value)?.value,s.value=t.filter.options?.filter(({value:l})=>{if(Array.isArray(t.selection?.value))return t.selection.value.includes(`${l}`)}).map(({value:l})=>l),V.value=t.selection?.value,b.value=t.selection?.text,y.value=!0},C=async()=>{M(),p.value&&(p.value.showPopover(),c.value=!0,await e.nextTick(),K()),m("open")},v=()=>{p.value&&(p.value.hidePopover(),c.value=!1),m("close")};e.onMounted(()=>{t.initOpen&&C()});const U=()=>{c.value&&v()},F=()=>{m("apply",T.value),v()},D=()=>{v()},I=()=>{v(),m("clear")},R=()=>{c.value?v():C()};return(l,a)=>{const o=e.resolveComponent("KButton");return e.openBlock(),e.createBlock($.default,{ref:"filterPopper","max-width":t.filter.maxWidth??"400px",offset:`var(--kui-space-30, ${e.unref(L.KUI_SPACE_30)})`,placement:t.filter.placement??"bottom-start",width:"auto",onClose:U},{default:e.withCtx(()=>[e.createVNode(W.default,e.mergeProps({"content-label":t.selection?.text,"data-testid":"filter-pill",delimiter:A.value,label:t.filter.label,"pill-focus":c.value,readonly:t.filter.readonly},e.unref(g),{onClear:I,onClick:a[0]||(a[0]=e.withModifiers(()=>{},["prevent","stop"])),onTrigger:R}),null,16,["content-label","delimiter","label","pill-focus","readonly"])]),title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.filter.label),1)]),content:e.withCtx(()=>[e.createElementVNode("div",z,[e.renderSlot(l.$slots,"default",e.normalizeProps(e.guardReactiveProps(N.value)),()=>[e.createElementVNode("div",H,[f.value.length>1?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(k.default,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=u=>r.value=u),items:x.value,"kpop-attributes":{popoverClasses:"force-operator-width"},label:"Operator",title:O.value},null,8,["modelValue","items","title"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Q,[d.value==="select"?(e.openBlock(),e.createBlock(k.default,{key:0,modelValue:n.value,"onUpdate:modelValue":a[2]||(a[2]=u=>n.value=u),"data-testid":"filter-pill-select",items:t.filter.options,label:"Value",placeholder:"Select a value"},null,8,["modelValue","items"])):d.value==="multiselect"?(e.openBlock(),e.createBlock(G.default,{key:1,modelValue:s.value,"onUpdate:modelValue":a[3]||(a[3]=u=>s.value=u),"data-testid":"filter-pill-multiselect",items:t.filter.options,label:"Value",placeholder:"Select values"},null,8,["modelValue","items"])):(e.openBlock(),e.createBlock(j.default,{key:2,ref:"inputField",modelValue:i.value,"onUpdate:modelValue":a[4]||(a[4]=u=>i.value=u),modelModifiers:{trim:!0},"data-testid":"filter-pill-input",label:"Value",placeholder:"Enter a value"},null,8,["modelValue"]))])])],!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(o,{appearance:"secondary","data-testid":"filter-pill-cancel",onClick:D},{default:e.withCtx(()=>[...a[5]||(a[5]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(o,{appearance:"primary","data-testid":"filter-pill-apply",disabled:q.value,onClick:F},{default:e.withCtx(()=>[...a[6]||(a[6]=[e.createTextVNode(" Apply ",-1)])]),_:1},8,["disabled"])])]),_:3},8,["max-width","offset","placement"])}}});exports.default=Y;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { defineComponent as X, useCssVars as Y, useAttrs as Z, ref as r, useTemplateRef as A, computed as i, onMounted as _, resolveComponent as ee, openBlock as y, createBlock as k, unref as O, withCtx as v, createElementVNode as h, createVNode as g, createTextVNode as S, renderSlot as te, normalizeProps as le, guardReactiveProps as ae, createElementBlock as oe, createCommentVNode as ie, toDisplayString as ue, mergeProps as re, withModifiers as ne, nextTick as se } from "vue";
|
|
2
|
+
import { KUI_SPACE_30 as ce } from "./kongponents183.es.js";
|
|
3
|
+
import ve from "./kongponents62.es.js";
|
|
4
|
+
import de from "./kongponents55.es.js";
|
|
5
|
+
import B from "./kongponents66.es.js";
|
|
6
|
+
import fe from "./kongponents60.es.js";
|
|
7
|
+
import me from "./kongponents410.es.js";
|
|
8
|
+
const pe = {
|
|
9
|
+
class: "filter-content",
|
|
10
|
+
"data-testid": "filter-pill-content"
|
|
11
|
+
}, ye = { class: "default-layout" }, be = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "operator"
|
|
14
|
+
}, Ve = { class: "value" }, Ce = { class: "footer" }, qe = /* @__PURE__ */ X({
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
__name: "FilterPill",
|
|
17
|
+
props: {
|
|
18
|
+
filter: {},
|
|
19
|
+
initOpen: { type: Boolean, default: !1 },
|
|
20
|
+
selection: { default: () => {
|
|
21
|
+
} },
|
|
22
|
+
custom: { type: Boolean, default: !1 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["apply", "close", "open", "clear"],
|
|
25
|
+
setup(e, { emit: E }) {
|
|
26
|
+
Y((t) => ({
|
|
27
|
+
f988e390: N.value
|
|
28
|
+
}));
|
|
29
|
+
const K = Z(), b = E, d = r(!1), V = A("filterPopper"), u = r(), n = r(), s = r(), c = r(), C = r(), x = r(), P = r(!0), U = A("inputField"), f = i(() => e.custom ? "custom" : e.filter.options && !e.filter.multiple ? "select" : e.filter.options && e.filter.multiple ? "multiselect" : "input"), F = i(() => {
|
|
30
|
+
switch (f.value) {
|
|
31
|
+
case "input":
|
|
32
|
+
return !n.value || n.value === "";
|
|
33
|
+
case "select":
|
|
34
|
+
return !s.value;
|
|
35
|
+
case "multiselect":
|
|
36
|
+
return !c.value || c.value.length === 0;
|
|
37
|
+
case "custom":
|
|
38
|
+
return !P.value;
|
|
39
|
+
default:
|
|
40
|
+
return !1;
|
|
41
|
+
}
|
|
42
|
+
}), m = i(() => e.filter.operators && e.filter.operators.length ? e.filter.operators : ["eq"]), T = (t) => {
|
|
43
|
+
u.value = t;
|
|
44
|
+
}, D = (t, l) => {
|
|
45
|
+
C.value = t, x.value = l;
|
|
46
|
+
}, I = (t) => {
|
|
47
|
+
P.value = t;
|
|
48
|
+
}, M = i(() => ({
|
|
49
|
+
value: C.value,
|
|
50
|
+
text: x.value,
|
|
51
|
+
options: e.filter.options,
|
|
52
|
+
multiple: e.filter.multiple,
|
|
53
|
+
operators: m.value,
|
|
54
|
+
operator: u.value,
|
|
55
|
+
setOperator: T,
|
|
56
|
+
setValue: D,
|
|
57
|
+
setApplyState: I
|
|
58
|
+
})), N = i(() => m.value.some((t) => t === "lte" || t === "gte") ? "205px" : "120px"), L = i(() => {
|
|
59
|
+
let t, l;
|
|
60
|
+
switch (f.value) {
|
|
61
|
+
case "input":
|
|
62
|
+
t = n.value, l = n.value;
|
|
63
|
+
break;
|
|
64
|
+
case "select":
|
|
65
|
+
t = s.value, l = e.filter?.options?.find(({ value: a }) => a === s.value)?.label ?? s.value?.toString();
|
|
66
|
+
break;
|
|
67
|
+
case "multiselect":
|
|
68
|
+
t = c.value, l = c.value?.map((a) => e.filter.options?.find(({ value: o }) => o === a))?.filter((a) => a !== void 0)?.map(({ label: a }) => a)?.join(", ");
|
|
69
|
+
break;
|
|
70
|
+
case "custom":
|
|
71
|
+
t = C.value, l = x.value;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
if (!(u.value === void 0 || t === void 0 || l === void 0))
|
|
75
|
+
return {
|
|
76
|
+
operator: u.value,
|
|
77
|
+
value: t,
|
|
78
|
+
text: l
|
|
79
|
+
};
|
|
80
|
+
}), R = i(() => {
|
|
81
|
+
if (e.selection?.operatorDelimiter !== void 0)
|
|
82
|
+
return e.selection.operatorDelimiter;
|
|
83
|
+
switch (e.selection?.operator) {
|
|
84
|
+
case "eq":
|
|
85
|
+
return " = ";
|
|
86
|
+
case "neq":
|
|
87
|
+
return " ≠ ";
|
|
88
|
+
case "lt":
|
|
89
|
+
return " < ";
|
|
90
|
+
case "lte":
|
|
91
|
+
return " ≤ ";
|
|
92
|
+
case "gt":
|
|
93
|
+
return " > ";
|
|
94
|
+
case "gte":
|
|
95
|
+
return " ≥ ";
|
|
96
|
+
default:
|
|
97
|
+
return ": ";
|
|
98
|
+
}
|
|
99
|
+
}), w = i(() => {
|
|
100
|
+
const t = {
|
|
101
|
+
eq: "Equals",
|
|
102
|
+
neq: "Not equals",
|
|
103
|
+
contains: "Contains",
|
|
104
|
+
exists: "Exists",
|
|
105
|
+
lt: "Less than",
|
|
106
|
+
lte: "Less than or equal to",
|
|
107
|
+
gt: "Greater than",
|
|
108
|
+
gte: "Greater than or equal to"
|
|
109
|
+
};
|
|
110
|
+
return m.value.map((l) => ({
|
|
111
|
+
label: t[l],
|
|
112
|
+
value: l
|
|
113
|
+
}));
|
|
114
|
+
}), $ = i(() => w.value.find(({ value: t }) => t === u.value)?.label ?? ""), G = () => {
|
|
115
|
+
f.value === "input" && U.value?.input?.focus();
|
|
116
|
+
}, W = () => {
|
|
117
|
+
u.value = e.selection?.operator ?? m.value?.[0], n.value = typeof e.selection?.value == "string" ? e.selection.value : void 0, s.value = e.filter.options?.find(({ value: t }) => t === e.selection?.value)?.value, c.value = e.filter.options?.filter(({ value: t }) => {
|
|
118
|
+
if (Array.isArray(e.selection?.value))
|
|
119
|
+
return e.selection.value.includes(`${t}`);
|
|
120
|
+
}).map(({ value: t }) => t), C.value = e.selection?.value, x.value = e.selection?.text, P.value = !0;
|
|
121
|
+
}, q = async () => {
|
|
122
|
+
W(), V.value && (V.value.showPopover(), d.value = !0, await se(), G()), b("open");
|
|
123
|
+
}, p = () => {
|
|
124
|
+
V.value && (V.value.hidePopover(), d.value = !1), b("close");
|
|
125
|
+
};
|
|
126
|
+
_(() => {
|
|
127
|
+
e.initOpen && q();
|
|
128
|
+
});
|
|
129
|
+
const j = () => {
|
|
130
|
+
d.value && p();
|
|
131
|
+
}, z = () => {
|
|
132
|
+
b("apply", L.value), p();
|
|
133
|
+
}, H = () => {
|
|
134
|
+
p();
|
|
135
|
+
}, J = () => {
|
|
136
|
+
p(), b("clear");
|
|
137
|
+
}, Q = () => {
|
|
138
|
+
d.value ? p() : q();
|
|
139
|
+
};
|
|
140
|
+
return (t, l) => {
|
|
141
|
+
const a = ee("KButton");
|
|
142
|
+
return y(), k(ve, {
|
|
143
|
+
ref: "filterPopper",
|
|
144
|
+
"max-width": e.filter.maxWidth ?? "400px",
|
|
145
|
+
offset: `var(--kui-space-30, ${O(ce)})`,
|
|
146
|
+
placement: e.filter.placement ?? "bottom-start",
|
|
147
|
+
width: "auto",
|
|
148
|
+
onClose: j
|
|
149
|
+
}, {
|
|
150
|
+
default: v(() => [
|
|
151
|
+
g(me, re({
|
|
152
|
+
"content-label": e.selection?.text,
|
|
153
|
+
"data-testid": "filter-pill",
|
|
154
|
+
delimiter: R.value,
|
|
155
|
+
label: e.filter.label,
|
|
156
|
+
"pill-focus": d.value,
|
|
157
|
+
readonly: e.filter.readonly
|
|
158
|
+
}, O(K), {
|
|
159
|
+
onClear: J,
|
|
160
|
+
onClick: l[0] || (l[0] = ne(() => {
|
|
161
|
+
}, ["prevent", "stop"])),
|
|
162
|
+
onTrigger: Q
|
|
163
|
+
}), null, 16, ["content-label", "delimiter", "label", "pill-focus", "readonly"])
|
|
164
|
+
]),
|
|
165
|
+
title: v(() => [
|
|
166
|
+
S(ue(e.filter.label), 1)
|
|
167
|
+
]),
|
|
168
|
+
content: v(() => [
|
|
169
|
+
h("div", pe, [
|
|
170
|
+
te(t.$slots, "default", le(ae(M.value)), () => [
|
|
171
|
+
h("div", ye, [
|
|
172
|
+
m.value.length > 1 ? (y(), oe("div", be, [
|
|
173
|
+
g(B, {
|
|
174
|
+
modelValue: u.value,
|
|
175
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => u.value = o),
|
|
176
|
+
items: w.value,
|
|
177
|
+
"kpop-attributes": {
|
|
178
|
+
popoverClasses: "force-operator-width"
|
|
179
|
+
},
|
|
180
|
+
label: "Operator",
|
|
181
|
+
title: $.value
|
|
182
|
+
}, null, 8, ["modelValue", "items", "title"])
|
|
183
|
+
])) : ie("", !0),
|
|
184
|
+
h("div", Ve, [
|
|
185
|
+
f.value === "select" ? (y(), k(B, {
|
|
186
|
+
key: 0,
|
|
187
|
+
modelValue: s.value,
|
|
188
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => s.value = o),
|
|
189
|
+
"data-testid": "filter-pill-select",
|
|
190
|
+
items: e.filter.options,
|
|
191
|
+
label: "Value",
|
|
192
|
+
placeholder: "Select a value"
|
|
193
|
+
}, null, 8, ["modelValue", "items"])) : f.value === "multiselect" ? (y(), k(fe, {
|
|
194
|
+
key: 1,
|
|
195
|
+
modelValue: c.value,
|
|
196
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => c.value = o),
|
|
197
|
+
"data-testid": "filter-pill-multiselect",
|
|
198
|
+
items: e.filter.options,
|
|
199
|
+
label: "Value",
|
|
200
|
+
placeholder: "Select values"
|
|
201
|
+
}, null, 8, ["modelValue", "items"])) : (y(), k(de, {
|
|
202
|
+
key: 2,
|
|
203
|
+
ref: "inputField",
|
|
204
|
+
modelValue: n.value,
|
|
205
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => n.value = o),
|
|
206
|
+
modelModifiers: { trim: !0 },
|
|
207
|
+
"data-testid": "filter-pill-input",
|
|
208
|
+
label: "Value",
|
|
209
|
+
placeholder: "Enter a value"
|
|
210
|
+
}, null, 8, ["modelValue"]))
|
|
211
|
+
])
|
|
212
|
+
])
|
|
213
|
+
], !0)
|
|
214
|
+
])
|
|
215
|
+
]),
|
|
216
|
+
footer: v(() => [
|
|
217
|
+
h("div", Ce, [
|
|
218
|
+
g(a, {
|
|
219
|
+
appearance: "secondary",
|
|
220
|
+
"data-testid": "filter-pill-cancel",
|
|
221
|
+
onClick: H
|
|
222
|
+
}, {
|
|
223
|
+
default: v(() => [...l[5] || (l[5] = [
|
|
224
|
+
S(" Cancel ", -1)
|
|
225
|
+
])]),
|
|
226
|
+
_: 1
|
|
227
|
+
}),
|
|
228
|
+
g(a, {
|
|
229
|
+
appearance: "primary",
|
|
230
|
+
"data-testid": "filter-pill-apply",
|
|
231
|
+
disabled: F.value,
|
|
232
|
+
onClick: z
|
|
233
|
+
}, {
|
|
234
|
+
default: v(() => [...l[6] || (l[6] = [
|
|
235
|
+
S(" Apply ", -1)
|
|
236
|
+
])]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["disabled"])
|
|
239
|
+
])
|
|
240
|
+
]),
|
|
241
|
+
_: 3
|
|
242
|
+
}, 8, ["max-width", "offset", "placement"]);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
export {
|
|
247
|
+
qe as default
|
|
248
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("./kongponents67.cjs"),r={class:"skeleton-loader"},l=e.defineComponent({__name:"SkeletonBase",setup(d){return(o,n)=>(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"default",{},()=>[e.createVNode(t.default,{height:"1",width:"100"}),e.createVNode(t.default,{height:"1",width:"100"}),e.createVNode(t.default,{height:"1",width:"100"})],!0)]))}});exports.default=l;
|