slim-select 2.2.1 → 2.2.3
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/helpers.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/slimselect.cjs.js +68 -52
- package/dist/slimselect.es.js +68 -52
- package/dist/slimselect.global.js +68 -52
- package/dist/slimselect.js +68 -52
- package/dist/slimselect.min.js +1 -1
- package/dist/slimselect.umd.js +68 -52
- package/dist/slimselect.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/slim-select/helpers.ts +4 -0
- package/src/slim-select/index.ts +26 -2
- package/src/slim-select/render.ts +0 -1
- package/src/slim-select/select.ts +12 -3
- package/src/slim-select/store.ts +19 -16
- package/src/vue/dist/slim-select/helpers.d.ts +1 -0
- package/src/vue/dist/slim-select/index.d.ts +1 -1
- package/src/vue/dist/slim-select/select.d.ts +1 -1
- package/src/vue/dist/slimselectvue.es.js +120 -55
- package/src/vue/dist/slimselectvue.global.js +120 -55
- package/src/vue/dist/slimselectvue.ssr.js +120 -55
- package/src/vue/dist/vue/slimselect.vue.d.ts +50 -27
- package/src/vue/package.json +1 -1
- package/src/vue/rollup.config.mjs +3 -3
- package/src/vue/slimselect.vue +66 -2
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/code/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/semanticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/syntacticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/068e7904209e205518dbc9726d632bbaf28bfc55 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/06b75ecfe63fda3fcfaa42593fa1f22167f3a9f8 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/2aa9d56fc4a9661ee8e3de277da5ee3f960713de +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/2c58b356be1a9572c64469d50a7a25c46f94aaeb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/36d3fb579feb4cad7a15b7a2f509f338caf72fa0 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/388b297c3f73fcba25b8174fda975235e5d12b5a +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/40e43895ec63e1e25aa7e278ca1e8c3adefc815d +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/645e188194be07518ebbb0a5b4304f5170fee599 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/65515bf3a44aaf1306f589073f1c8b98be747f5f +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/6a357fe7542e07f7919ea9b22401027dd1e8a0c1 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/72087cac150d02ed6d19e37d6f1436566d5ac798 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/9ff120b6426a4c7a03236428f26a92772586c3e5 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/a6917de673fc74a6cfca5133913982e54e58a7fb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/aa4aee440d13b06b4bb05c36eee326513aa6c040 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/b02a4d0c40fac4c7f9ea7acd7944ee8844afcedf +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/b21a02b948881426bc4dcff649fc4fba07ca34d2 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/c10c11f9c426095ab3f504dd8b7622ad7ba7c8ed +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_1e8d68e0803222688213218fda500c83f6c6476e/types/cache/dc186595636217ded2d4a4cfbb789d68ea485b6b +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/code/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/semanticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/syntacticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/068e7904209e205518dbc9726d632bbaf28bfc55 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/06b75ecfe63fda3fcfaa42593fa1f22167f3a9f8 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/2aa9d56fc4a9661ee8e3de277da5ee3f960713de +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/2c58b356be1a9572c64469d50a7a25c46f94aaeb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/36d3fb579feb4cad7a15b7a2f509f338caf72fa0 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/388b297c3f73fcba25b8174fda975235e5d12b5a +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/40e43895ec63e1e25aa7e278ca1e8c3adefc815d +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/645e188194be07518ebbb0a5b4304f5170fee599 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/65515bf3a44aaf1306f589073f1c8b98be747f5f +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/6a357fe7542e07f7919ea9b22401027dd1e8a0c1 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/72087cac150d02ed6d19e37d6f1436566d5ac798 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/9ff120b6426a4c7a03236428f26a92772586c3e5 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/a6917de673fc74a6cfca5133913982e54e58a7fb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/aa4aee440d13b06b4bb05c36eee326513aa6c040 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/b02a4d0c40fac4c7f9ea7acd7944ee8844afcedf +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/b21a02b948881426bc4dcff649fc4fba07ca34d2 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/c10c11f9c426095ab3f504dd8b7622ad7ba7c8ed +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_2e1b3e4caed5e16ec3a087e96a7fe6e4f5ea8a82/types/cache/dc186595636217ded2d4a4cfbb789d68ea485b6b +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/code/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/semanticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/05b27cf262de47962f4beeba3d4b4f67616bdf24 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/26c90bc22e366b540ff134ba7de2ab3715155a20 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/7a2b654bed9256f52421aec7d04cd8553486335b +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/80fdd1aafff88316e6a7f63509fb7304c94ae6d3 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/88c6c8bf5346a961efcdff848fba6e3f2d24b26c +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/a8a4a8a1b06b6c8069e965f4a30a4b42013b830a +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/b2f217f16a7744eb13543dc90442443538b724b8 +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/syntacticDiagnostics/cache/be60813c21c2fbc627fcf99127ca2a96a3065fba +0 -1
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/068e7904209e205518dbc9726d632bbaf28bfc55 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/06b75ecfe63fda3fcfaa42593fa1f22167f3a9f8 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/2aa9d56fc4a9661ee8e3de277da5ee3f960713de +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/2c58b356be1a9572c64469d50a7a25c46f94aaeb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/36d3fb579feb4cad7a15b7a2f509f338caf72fa0 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/388b297c3f73fcba25b8174fda975235e5d12b5a +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/40e43895ec63e1e25aa7e278ca1e8c3adefc815d +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/645e188194be07518ebbb0a5b4304f5170fee599 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/65515bf3a44aaf1306f589073f1c8b98be747f5f +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/6a357fe7542e07f7919ea9b22401027dd1e8a0c1 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/72087cac150d02ed6d19e37d6f1436566d5ac798 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/9ff120b6426a4c7a03236428f26a92772586c3e5 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/a6917de673fc74a6cfca5133913982e54e58a7fb +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/aa4aee440d13b06b4bb05c36eee326513aa6c040 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/b02a4d0c40fac4c7f9ea7acd7944ee8844afcedf +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/b21a02b948881426bc4dcff649fc4fba07ca34d2 +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/c10c11f9c426095ab3f504dd8b7622ad7ba7c8ed +0 -0
- package/src/vue/node_modules/.cache/rollup-plugin-typescript2/rpt2_6eed9deea87cc005768ee2b80168901d42458ef9/types/cache/dc186595636217ded2d4a4cfbb789d68ea485b6b +0 -0
package/dist/helpers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function generateID(): string;
|
|
2
2
|
export declare function hasClassInTree(element: HTMLElement, className: string): any;
|
|
3
3
|
export declare function debounce(func: (...params: any[]) => void, wait?: number, immediate?: boolean): () => void;
|
|
4
|
+
export declare function isEqual(a: any, b: any): boolean;
|
|
4
5
|
export declare function kebabCase(str: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import Settings, { SettingsPartial } from './settings';
|
|
1
2
|
import Render from './render';
|
|
2
3
|
import Select from './select';
|
|
3
|
-
import Settings, { SettingsPartial } from './settings';
|
|
4
4
|
import Store, { DataArray, DataArrayPartial, Option, OptionOptional } from './store';
|
|
5
5
|
export interface Config {
|
|
6
6
|
select: string | Element;
|
package/dist/select.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export default class Select {
|
|
|
15
15
|
removeSelectChangeListener(): void;
|
|
16
16
|
addValueChangeListener(func: (value: string[]) => void): void;
|
|
17
17
|
removeValueChangeListener(): void;
|
|
18
|
-
valueChange(ev: Event):
|
|
18
|
+
valueChange(ev: Event): boolean;
|
|
19
19
|
private observeWrapper;
|
|
20
20
|
private addObserver;
|
|
21
21
|
private connectObserver;
|
package/dist/slimselect.cjs.js
CHANGED
|
@@ -44,11 +44,50 @@ function debounce(func, wait = 50, immediate = false) {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
function isEqual(a, b) {
|
|
48
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
49
|
+
}
|
|
47
50
|
function kebabCase(str) {
|
|
48
51
|
const result = str.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, (match) => '-' + match.toLowerCase());
|
|
49
52
|
return str[0] === str[0].toUpperCase() ? result.substring(1) : result;
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
class Settings {
|
|
56
|
+
constructor(settings) {
|
|
57
|
+
this.id = '';
|
|
58
|
+
this.style = '';
|
|
59
|
+
this.class = [];
|
|
60
|
+
this.isMultiple = false;
|
|
61
|
+
this.isOpen = false;
|
|
62
|
+
this.triggerFocus = true;
|
|
63
|
+
this.intervalMove = null;
|
|
64
|
+
if (!settings) {
|
|
65
|
+
settings = {};
|
|
66
|
+
}
|
|
67
|
+
this.id = 'ss-' + generateID();
|
|
68
|
+
this.style = settings.style || '';
|
|
69
|
+
this.class = settings.class || [];
|
|
70
|
+
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
71
|
+
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
72
|
+
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
73
|
+
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
74
|
+
this.searchText = settings.searchText || 'No Results';
|
|
75
|
+
this.searchingText = settings.searchingText || 'Searching...';
|
|
76
|
+
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
77
|
+
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
78
|
+
this.contentLocation = settings.contentLocation || document.body;
|
|
79
|
+
this.contentPosition = settings.contentPosition || 'absolute';
|
|
80
|
+
this.openPosition = settings.openPosition || 'auto';
|
|
81
|
+
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
82
|
+
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
83
|
+
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
84
|
+
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
85
|
+
this.minSelected = settings.minSelected || 0;
|
|
86
|
+
this.maxSelected = settings.maxSelected || 1000;
|
|
87
|
+
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
52
91
|
class Optgroup {
|
|
53
92
|
constructor(optgroup) {
|
|
54
93
|
this.id = !optgroup.id || optgroup.id === '' ? generateID() : optgroup.id;
|
|
@@ -228,23 +267,21 @@ class Store {
|
|
|
228
267
|
const dataSearch = [];
|
|
229
268
|
this.data.forEach((dataObj) => {
|
|
230
269
|
if (dataObj instanceof Optgroup) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
270
|
+
let optOptions = [];
|
|
271
|
+
dataObj.options.forEach((option) => {
|
|
272
|
+
if (!filter || filter(option)) {
|
|
273
|
+
if (!includeOptgroup) {
|
|
274
|
+
dataSearch.push(new Option(option));
|
|
235
275
|
}
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
let optOptions = [];
|
|
240
|
-
dataObj.options.forEach((option) => {
|
|
241
|
-
if (!filter || filter(option)) {
|
|
276
|
+
else {
|
|
242
277
|
optOptions.push(new Option(option));
|
|
243
278
|
}
|
|
244
|
-
});
|
|
245
|
-
if (optOptions.length > 0) {
|
|
246
|
-
dataSearch.push(new Optgroup(dataObj));
|
|
247
279
|
}
|
|
280
|
+
});
|
|
281
|
+
if (optOptions.length > 0) {
|
|
282
|
+
let optgroup = new Optgroup(dataObj);
|
|
283
|
+
optgroup.options = optOptions;
|
|
284
|
+
dataSearch.push(optgroup);
|
|
248
285
|
}
|
|
249
286
|
}
|
|
250
287
|
if (dataObj instanceof Option) {
|
|
@@ -942,7 +979,6 @@ class Render {
|
|
|
942
979
|
optgroupClosableSvg.classList.add(this.classes.arrow);
|
|
943
980
|
optgroupClosable.appendChild(optgroupClosableSvg);
|
|
944
981
|
const optgroupClosableArrow = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
945
|
-
optgroupClosableArrow.setAttribute('d', this.classes.arrow);
|
|
946
982
|
optgroupClosableSvg.appendChild(optgroupClosableArrow);
|
|
947
983
|
if (d.options.some((o) => o.selected)) {
|
|
948
984
|
optgroupClosable.classList.add(this.classes.open);
|
|
@@ -1195,16 +1231,19 @@ class Select {
|
|
|
1195
1231
|
}
|
|
1196
1232
|
addValueChangeListener(func) {
|
|
1197
1233
|
this.onValueChange = func;
|
|
1198
|
-
this.select.addEventListener('change', this.valueChange.bind(this)
|
|
1234
|
+
this.select.addEventListener('change', this.valueChange.bind(this), {
|
|
1235
|
+
passive: true,
|
|
1236
|
+
});
|
|
1199
1237
|
}
|
|
1200
1238
|
removeValueChangeListener() {
|
|
1201
1239
|
this.onValueChange = undefined;
|
|
1202
1240
|
this.select.removeEventListener('change', this.valueChange.bind(this));
|
|
1203
1241
|
}
|
|
1204
1242
|
valueChange(ev) {
|
|
1205
|
-
if (this.onValueChange) {
|
|
1243
|
+
if (this.listen && this.onValueChange) {
|
|
1206
1244
|
this.onValueChange(this.getSelectedValues());
|
|
1207
1245
|
}
|
|
1246
|
+
return true;
|
|
1208
1247
|
}
|
|
1209
1248
|
observeWrapper(mutations) {
|
|
1210
1249
|
if (this.onSelectChange) {
|
|
@@ -1349,6 +1388,7 @@ class Select {
|
|
|
1349
1388
|
this.select.appendChild(this.createOption(d));
|
|
1350
1389
|
}
|
|
1351
1390
|
}
|
|
1391
|
+
this.select.dispatchEvent(new Event('change'));
|
|
1352
1392
|
this.changeListen(true);
|
|
1353
1393
|
}
|
|
1354
1394
|
createOptgroup(optgroup) {
|
|
@@ -1408,42 +1448,6 @@ class Select {
|
|
|
1408
1448
|
}
|
|
1409
1449
|
}
|
|
1410
1450
|
|
|
1411
|
-
class Settings {
|
|
1412
|
-
constructor(settings) {
|
|
1413
|
-
this.id = '';
|
|
1414
|
-
this.style = '';
|
|
1415
|
-
this.class = [];
|
|
1416
|
-
this.isMultiple = false;
|
|
1417
|
-
this.isOpen = false;
|
|
1418
|
-
this.triggerFocus = true;
|
|
1419
|
-
this.intervalMove = null;
|
|
1420
|
-
if (!settings) {
|
|
1421
|
-
settings = {};
|
|
1422
|
-
}
|
|
1423
|
-
this.id = 'ss-' + generateID();
|
|
1424
|
-
this.style = settings.style || '';
|
|
1425
|
-
this.class = settings.class || [];
|
|
1426
|
-
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
1427
|
-
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
1428
|
-
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
1429
|
-
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
1430
|
-
this.searchText = settings.searchText || 'No Results';
|
|
1431
|
-
this.searchingText = settings.searchingText || 'Searching...';
|
|
1432
|
-
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
1433
|
-
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
1434
|
-
this.contentLocation = settings.contentLocation || document.body;
|
|
1435
|
-
this.contentPosition = settings.contentPosition || 'absolute';
|
|
1436
|
-
this.openPosition = settings.openPosition || 'auto';
|
|
1437
|
-
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
1438
|
-
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
1439
|
-
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
1440
|
-
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
1441
|
-
this.minSelected = settings.minSelected || 0;
|
|
1442
|
-
this.maxSelected = settings.maxSelected || 1000;
|
|
1443
|
-
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
1451
|
class SlimSelect {
|
|
1448
1452
|
constructor(config) {
|
|
1449
1453
|
this.events = {
|
|
@@ -1576,6 +1580,7 @@ class SlimSelect {
|
|
|
1576
1580
|
return this.store.getData();
|
|
1577
1581
|
}
|
|
1578
1582
|
setData(data) {
|
|
1583
|
+
const selected = this.store.getSelected();
|
|
1579
1584
|
const err = this.store.validateDataArray(data);
|
|
1580
1585
|
if (err) {
|
|
1581
1586
|
if (this.events.error) {
|
|
@@ -1588,23 +1593,34 @@ class SlimSelect {
|
|
|
1588
1593
|
this.select.updateOptions(dataClean);
|
|
1589
1594
|
this.render.renderValues();
|
|
1590
1595
|
this.render.renderOptions(dataClean);
|
|
1596
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1597
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1598
|
+
}
|
|
1591
1599
|
}
|
|
1592
1600
|
getSelected() {
|
|
1593
1601
|
return this.store.getSelected();
|
|
1594
1602
|
}
|
|
1595
1603
|
setSelected(value) {
|
|
1604
|
+
const selected = this.store.getSelected();
|
|
1596
1605
|
this.store.setSelectedBy('value', Array.isArray(value) ? value : [value]);
|
|
1597
1606
|
const data = this.store.getData();
|
|
1598
1607
|
this.select.updateOptions(data);
|
|
1599
1608
|
this.render.renderValues();
|
|
1600
1609
|
this.render.renderOptions(data);
|
|
1610
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1611
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1612
|
+
}
|
|
1601
1613
|
}
|
|
1602
1614
|
addOption(option) {
|
|
1615
|
+
const selected = this.store.getSelected();
|
|
1603
1616
|
this.store.addOption(option);
|
|
1604
1617
|
const data = this.store.getData();
|
|
1605
1618
|
this.select.updateOptions(data);
|
|
1606
1619
|
this.render.renderValues();
|
|
1607
1620
|
this.render.renderOptions(data);
|
|
1621
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1622
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1623
|
+
}
|
|
1608
1624
|
}
|
|
1609
1625
|
open() {
|
|
1610
1626
|
if (!this.settings.isEnabled || this.settings.isOpen) {
|
package/dist/slimselect.es.js
CHANGED
|
@@ -42,11 +42,50 @@ function debounce(func, wait = 50, immediate = false) {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
function isEqual(a, b) {
|
|
46
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
47
|
+
}
|
|
45
48
|
function kebabCase(str) {
|
|
46
49
|
const result = str.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, (match) => '-' + match.toLowerCase());
|
|
47
50
|
return str[0] === str[0].toUpperCase() ? result.substring(1) : result;
|
|
48
51
|
}
|
|
49
52
|
|
|
53
|
+
class Settings {
|
|
54
|
+
constructor(settings) {
|
|
55
|
+
this.id = '';
|
|
56
|
+
this.style = '';
|
|
57
|
+
this.class = [];
|
|
58
|
+
this.isMultiple = false;
|
|
59
|
+
this.isOpen = false;
|
|
60
|
+
this.triggerFocus = true;
|
|
61
|
+
this.intervalMove = null;
|
|
62
|
+
if (!settings) {
|
|
63
|
+
settings = {};
|
|
64
|
+
}
|
|
65
|
+
this.id = 'ss-' + generateID();
|
|
66
|
+
this.style = settings.style || '';
|
|
67
|
+
this.class = settings.class || [];
|
|
68
|
+
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
69
|
+
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
70
|
+
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
71
|
+
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
72
|
+
this.searchText = settings.searchText || 'No Results';
|
|
73
|
+
this.searchingText = settings.searchingText || 'Searching...';
|
|
74
|
+
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
75
|
+
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
76
|
+
this.contentLocation = settings.contentLocation || document.body;
|
|
77
|
+
this.contentPosition = settings.contentPosition || 'absolute';
|
|
78
|
+
this.openPosition = settings.openPosition || 'auto';
|
|
79
|
+
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
80
|
+
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
81
|
+
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
82
|
+
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
83
|
+
this.minSelected = settings.minSelected || 0;
|
|
84
|
+
this.maxSelected = settings.maxSelected || 1000;
|
|
85
|
+
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
50
89
|
class Optgroup {
|
|
51
90
|
constructor(optgroup) {
|
|
52
91
|
this.id = !optgroup.id || optgroup.id === '' ? generateID() : optgroup.id;
|
|
@@ -226,23 +265,21 @@ class Store {
|
|
|
226
265
|
const dataSearch = [];
|
|
227
266
|
this.data.forEach((dataObj) => {
|
|
228
267
|
if (dataObj instanceof Optgroup) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
268
|
+
let optOptions = [];
|
|
269
|
+
dataObj.options.forEach((option) => {
|
|
270
|
+
if (!filter || filter(option)) {
|
|
271
|
+
if (!includeOptgroup) {
|
|
272
|
+
dataSearch.push(new Option(option));
|
|
233
273
|
}
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
let optOptions = [];
|
|
238
|
-
dataObj.options.forEach((option) => {
|
|
239
|
-
if (!filter || filter(option)) {
|
|
274
|
+
else {
|
|
240
275
|
optOptions.push(new Option(option));
|
|
241
276
|
}
|
|
242
|
-
});
|
|
243
|
-
if (optOptions.length > 0) {
|
|
244
|
-
dataSearch.push(new Optgroup(dataObj));
|
|
245
277
|
}
|
|
278
|
+
});
|
|
279
|
+
if (optOptions.length > 0) {
|
|
280
|
+
let optgroup = new Optgroup(dataObj);
|
|
281
|
+
optgroup.options = optOptions;
|
|
282
|
+
dataSearch.push(optgroup);
|
|
246
283
|
}
|
|
247
284
|
}
|
|
248
285
|
if (dataObj instanceof Option) {
|
|
@@ -940,7 +977,6 @@ class Render {
|
|
|
940
977
|
optgroupClosableSvg.classList.add(this.classes.arrow);
|
|
941
978
|
optgroupClosable.appendChild(optgroupClosableSvg);
|
|
942
979
|
const optgroupClosableArrow = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
943
|
-
optgroupClosableArrow.setAttribute('d', this.classes.arrow);
|
|
944
980
|
optgroupClosableSvg.appendChild(optgroupClosableArrow);
|
|
945
981
|
if (d.options.some((o) => o.selected)) {
|
|
946
982
|
optgroupClosable.classList.add(this.classes.open);
|
|
@@ -1193,16 +1229,19 @@ class Select {
|
|
|
1193
1229
|
}
|
|
1194
1230
|
addValueChangeListener(func) {
|
|
1195
1231
|
this.onValueChange = func;
|
|
1196
|
-
this.select.addEventListener('change', this.valueChange.bind(this)
|
|
1232
|
+
this.select.addEventListener('change', this.valueChange.bind(this), {
|
|
1233
|
+
passive: true,
|
|
1234
|
+
});
|
|
1197
1235
|
}
|
|
1198
1236
|
removeValueChangeListener() {
|
|
1199
1237
|
this.onValueChange = undefined;
|
|
1200
1238
|
this.select.removeEventListener('change', this.valueChange.bind(this));
|
|
1201
1239
|
}
|
|
1202
1240
|
valueChange(ev) {
|
|
1203
|
-
if (this.onValueChange) {
|
|
1241
|
+
if (this.listen && this.onValueChange) {
|
|
1204
1242
|
this.onValueChange(this.getSelectedValues());
|
|
1205
1243
|
}
|
|
1244
|
+
return true;
|
|
1206
1245
|
}
|
|
1207
1246
|
observeWrapper(mutations) {
|
|
1208
1247
|
if (this.onSelectChange) {
|
|
@@ -1347,6 +1386,7 @@ class Select {
|
|
|
1347
1386
|
this.select.appendChild(this.createOption(d));
|
|
1348
1387
|
}
|
|
1349
1388
|
}
|
|
1389
|
+
this.select.dispatchEvent(new Event('change'));
|
|
1350
1390
|
this.changeListen(true);
|
|
1351
1391
|
}
|
|
1352
1392
|
createOptgroup(optgroup) {
|
|
@@ -1406,42 +1446,6 @@ class Select {
|
|
|
1406
1446
|
}
|
|
1407
1447
|
}
|
|
1408
1448
|
|
|
1409
|
-
class Settings {
|
|
1410
|
-
constructor(settings) {
|
|
1411
|
-
this.id = '';
|
|
1412
|
-
this.style = '';
|
|
1413
|
-
this.class = [];
|
|
1414
|
-
this.isMultiple = false;
|
|
1415
|
-
this.isOpen = false;
|
|
1416
|
-
this.triggerFocus = true;
|
|
1417
|
-
this.intervalMove = null;
|
|
1418
|
-
if (!settings) {
|
|
1419
|
-
settings = {};
|
|
1420
|
-
}
|
|
1421
|
-
this.id = 'ss-' + generateID();
|
|
1422
|
-
this.style = settings.style || '';
|
|
1423
|
-
this.class = settings.class || [];
|
|
1424
|
-
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
1425
|
-
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
1426
|
-
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
1427
|
-
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
1428
|
-
this.searchText = settings.searchText || 'No Results';
|
|
1429
|
-
this.searchingText = settings.searchingText || 'Searching...';
|
|
1430
|
-
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
1431
|
-
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
1432
|
-
this.contentLocation = settings.contentLocation || document.body;
|
|
1433
|
-
this.contentPosition = settings.contentPosition || 'absolute';
|
|
1434
|
-
this.openPosition = settings.openPosition || 'auto';
|
|
1435
|
-
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
1436
|
-
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
1437
|
-
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
1438
|
-
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
1439
|
-
this.minSelected = settings.minSelected || 0;
|
|
1440
|
-
this.maxSelected = settings.maxSelected || 1000;
|
|
1441
|
-
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
1449
|
class SlimSelect {
|
|
1446
1450
|
constructor(config) {
|
|
1447
1451
|
this.events = {
|
|
@@ -1574,6 +1578,7 @@ class SlimSelect {
|
|
|
1574
1578
|
return this.store.getData();
|
|
1575
1579
|
}
|
|
1576
1580
|
setData(data) {
|
|
1581
|
+
const selected = this.store.getSelected();
|
|
1577
1582
|
const err = this.store.validateDataArray(data);
|
|
1578
1583
|
if (err) {
|
|
1579
1584
|
if (this.events.error) {
|
|
@@ -1586,23 +1591,34 @@ class SlimSelect {
|
|
|
1586
1591
|
this.select.updateOptions(dataClean);
|
|
1587
1592
|
this.render.renderValues();
|
|
1588
1593
|
this.render.renderOptions(dataClean);
|
|
1594
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1595
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1596
|
+
}
|
|
1589
1597
|
}
|
|
1590
1598
|
getSelected() {
|
|
1591
1599
|
return this.store.getSelected();
|
|
1592
1600
|
}
|
|
1593
1601
|
setSelected(value) {
|
|
1602
|
+
const selected = this.store.getSelected();
|
|
1594
1603
|
this.store.setSelectedBy('value', Array.isArray(value) ? value : [value]);
|
|
1595
1604
|
const data = this.store.getData();
|
|
1596
1605
|
this.select.updateOptions(data);
|
|
1597
1606
|
this.render.renderValues();
|
|
1598
1607
|
this.render.renderOptions(data);
|
|
1608
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1609
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1610
|
+
}
|
|
1599
1611
|
}
|
|
1600
1612
|
addOption(option) {
|
|
1613
|
+
const selected = this.store.getSelected();
|
|
1601
1614
|
this.store.addOption(option);
|
|
1602
1615
|
const data = this.store.getData();
|
|
1603
1616
|
this.select.updateOptions(data);
|
|
1604
1617
|
this.render.renderValues();
|
|
1605
1618
|
this.render.renderOptions(data);
|
|
1619
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1620
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1621
|
+
}
|
|
1606
1622
|
}
|
|
1607
1623
|
open() {
|
|
1608
1624
|
if (!this.settings.isEnabled || this.settings.isOpen) {
|
|
@@ -45,11 +45,50 @@ var SlimSelect = (function () {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
function isEqual(a, b) {
|
|
49
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
50
|
+
}
|
|
48
51
|
function kebabCase(str) {
|
|
49
52
|
const result = str.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, (match) => '-' + match.toLowerCase());
|
|
50
53
|
return str[0] === str[0].toUpperCase() ? result.substring(1) : result;
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
class Settings {
|
|
57
|
+
constructor(settings) {
|
|
58
|
+
this.id = '';
|
|
59
|
+
this.style = '';
|
|
60
|
+
this.class = [];
|
|
61
|
+
this.isMultiple = false;
|
|
62
|
+
this.isOpen = false;
|
|
63
|
+
this.triggerFocus = true;
|
|
64
|
+
this.intervalMove = null;
|
|
65
|
+
if (!settings) {
|
|
66
|
+
settings = {};
|
|
67
|
+
}
|
|
68
|
+
this.id = 'ss-' + generateID();
|
|
69
|
+
this.style = settings.style || '';
|
|
70
|
+
this.class = settings.class || [];
|
|
71
|
+
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
72
|
+
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
73
|
+
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
74
|
+
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
75
|
+
this.searchText = settings.searchText || 'No Results';
|
|
76
|
+
this.searchingText = settings.searchingText || 'Searching...';
|
|
77
|
+
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
78
|
+
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
79
|
+
this.contentLocation = settings.contentLocation || document.body;
|
|
80
|
+
this.contentPosition = settings.contentPosition || 'absolute';
|
|
81
|
+
this.openPosition = settings.openPosition || 'auto';
|
|
82
|
+
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
83
|
+
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
84
|
+
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
85
|
+
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
86
|
+
this.minSelected = settings.minSelected || 0;
|
|
87
|
+
this.maxSelected = settings.maxSelected || 1000;
|
|
88
|
+
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
53
92
|
class Optgroup {
|
|
54
93
|
constructor(optgroup) {
|
|
55
94
|
this.id = !optgroup.id || optgroup.id === '' ? generateID() : optgroup.id;
|
|
@@ -229,23 +268,21 @@ var SlimSelect = (function () {
|
|
|
229
268
|
const dataSearch = [];
|
|
230
269
|
this.data.forEach((dataObj) => {
|
|
231
270
|
if (dataObj instanceof Optgroup) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
271
|
+
let optOptions = [];
|
|
272
|
+
dataObj.options.forEach((option) => {
|
|
273
|
+
if (!filter || filter(option)) {
|
|
274
|
+
if (!includeOptgroup) {
|
|
275
|
+
dataSearch.push(new Option(option));
|
|
236
276
|
}
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
let optOptions = [];
|
|
241
|
-
dataObj.options.forEach((option) => {
|
|
242
|
-
if (!filter || filter(option)) {
|
|
277
|
+
else {
|
|
243
278
|
optOptions.push(new Option(option));
|
|
244
279
|
}
|
|
245
|
-
});
|
|
246
|
-
if (optOptions.length > 0) {
|
|
247
|
-
dataSearch.push(new Optgroup(dataObj));
|
|
248
280
|
}
|
|
281
|
+
});
|
|
282
|
+
if (optOptions.length > 0) {
|
|
283
|
+
let optgroup = new Optgroup(dataObj);
|
|
284
|
+
optgroup.options = optOptions;
|
|
285
|
+
dataSearch.push(optgroup);
|
|
249
286
|
}
|
|
250
287
|
}
|
|
251
288
|
if (dataObj instanceof Option) {
|
|
@@ -943,7 +980,6 @@ var SlimSelect = (function () {
|
|
|
943
980
|
optgroupClosableSvg.classList.add(this.classes.arrow);
|
|
944
981
|
optgroupClosable.appendChild(optgroupClosableSvg);
|
|
945
982
|
const optgroupClosableArrow = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
946
|
-
optgroupClosableArrow.setAttribute('d', this.classes.arrow);
|
|
947
983
|
optgroupClosableSvg.appendChild(optgroupClosableArrow);
|
|
948
984
|
if (d.options.some((o) => o.selected)) {
|
|
949
985
|
optgroupClosable.classList.add(this.classes.open);
|
|
@@ -1196,16 +1232,19 @@ var SlimSelect = (function () {
|
|
|
1196
1232
|
}
|
|
1197
1233
|
addValueChangeListener(func) {
|
|
1198
1234
|
this.onValueChange = func;
|
|
1199
|
-
this.select.addEventListener('change', this.valueChange.bind(this)
|
|
1235
|
+
this.select.addEventListener('change', this.valueChange.bind(this), {
|
|
1236
|
+
passive: true,
|
|
1237
|
+
});
|
|
1200
1238
|
}
|
|
1201
1239
|
removeValueChangeListener() {
|
|
1202
1240
|
this.onValueChange = undefined;
|
|
1203
1241
|
this.select.removeEventListener('change', this.valueChange.bind(this));
|
|
1204
1242
|
}
|
|
1205
1243
|
valueChange(ev) {
|
|
1206
|
-
if (this.onValueChange) {
|
|
1244
|
+
if (this.listen && this.onValueChange) {
|
|
1207
1245
|
this.onValueChange(this.getSelectedValues());
|
|
1208
1246
|
}
|
|
1247
|
+
return true;
|
|
1209
1248
|
}
|
|
1210
1249
|
observeWrapper(mutations) {
|
|
1211
1250
|
if (this.onSelectChange) {
|
|
@@ -1350,6 +1389,7 @@ var SlimSelect = (function () {
|
|
|
1350
1389
|
this.select.appendChild(this.createOption(d));
|
|
1351
1390
|
}
|
|
1352
1391
|
}
|
|
1392
|
+
this.select.dispatchEvent(new Event('change'));
|
|
1353
1393
|
this.changeListen(true);
|
|
1354
1394
|
}
|
|
1355
1395
|
createOptgroup(optgroup) {
|
|
@@ -1409,42 +1449,6 @@ var SlimSelect = (function () {
|
|
|
1409
1449
|
}
|
|
1410
1450
|
}
|
|
1411
1451
|
|
|
1412
|
-
class Settings {
|
|
1413
|
-
constructor(settings) {
|
|
1414
|
-
this.id = '';
|
|
1415
|
-
this.style = '';
|
|
1416
|
-
this.class = [];
|
|
1417
|
-
this.isMultiple = false;
|
|
1418
|
-
this.isOpen = false;
|
|
1419
|
-
this.triggerFocus = true;
|
|
1420
|
-
this.intervalMove = null;
|
|
1421
|
-
if (!settings) {
|
|
1422
|
-
settings = {};
|
|
1423
|
-
}
|
|
1424
|
-
this.id = 'ss-' + generateID();
|
|
1425
|
-
this.style = settings.style || '';
|
|
1426
|
-
this.class = settings.class || [];
|
|
1427
|
-
this.isEnabled = settings.isEnabled !== undefined ? settings.isEnabled : true;
|
|
1428
|
-
this.alwaysOpen = settings.alwaysOpen !== undefined ? settings.alwaysOpen : false;
|
|
1429
|
-
this.showSearch = settings.showSearch !== undefined ? settings.showSearch : true;
|
|
1430
|
-
this.searchPlaceholder = settings.searchPlaceholder || 'Search';
|
|
1431
|
-
this.searchText = settings.searchText || 'No Results';
|
|
1432
|
-
this.searchingText = settings.searchingText || 'Searching...';
|
|
1433
|
-
this.searchHighlight = settings.searchHighlight !== undefined ? settings.searchHighlight : false;
|
|
1434
|
-
this.closeOnSelect = settings.closeOnSelect !== undefined ? settings.closeOnSelect : true;
|
|
1435
|
-
this.contentLocation = settings.contentLocation || document.body;
|
|
1436
|
-
this.contentPosition = settings.contentPosition || 'absolute';
|
|
1437
|
-
this.openPosition = settings.openPosition || 'auto';
|
|
1438
|
-
this.placeholderText = settings.placeholderText || 'Select Value';
|
|
1439
|
-
this.allowDeselect = settings.allowDeselect !== undefined ? settings.allowDeselect : false;
|
|
1440
|
-
this.hideSelected = settings.hideSelected !== undefined ? settings.hideSelected : false;
|
|
1441
|
-
this.showOptionTooltips = settings.showOptionTooltips !== undefined ? settings.showOptionTooltips : false;
|
|
1442
|
-
this.minSelected = settings.minSelected || 0;
|
|
1443
|
-
this.maxSelected = settings.maxSelected || 1000;
|
|
1444
|
-
this.timeoutDelay = settings.timeoutDelay || 200;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
1452
|
class SlimSelect {
|
|
1449
1453
|
constructor(config) {
|
|
1450
1454
|
this.events = {
|
|
@@ -1577,6 +1581,7 @@ var SlimSelect = (function () {
|
|
|
1577
1581
|
return this.store.getData();
|
|
1578
1582
|
}
|
|
1579
1583
|
setData(data) {
|
|
1584
|
+
const selected = this.store.getSelected();
|
|
1580
1585
|
const err = this.store.validateDataArray(data);
|
|
1581
1586
|
if (err) {
|
|
1582
1587
|
if (this.events.error) {
|
|
@@ -1589,23 +1594,34 @@ var SlimSelect = (function () {
|
|
|
1589
1594
|
this.select.updateOptions(dataClean);
|
|
1590
1595
|
this.render.renderValues();
|
|
1591
1596
|
this.render.renderOptions(dataClean);
|
|
1597
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1598
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1599
|
+
}
|
|
1592
1600
|
}
|
|
1593
1601
|
getSelected() {
|
|
1594
1602
|
return this.store.getSelected();
|
|
1595
1603
|
}
|
|
1596
1604
|
setSelected(value) {
|
|
1605
|
+
const selected = this.store.getSelected();
|
|
1597
1606
|
this.store.setSelectedBy('value', Array.isArray(value) ? value : [value]);
|
|
1598
1607
|
const data = this.store.getData();
|
|
1599
1608
|
this.select.updateOptions(data);
|
|
1600
1609
|
this.render.renderValues();
|
|
1601
1610
|
this.render.renderOptions(data);
|
|
1611
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1612
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1613
|
+
}
|
|
1602
1614
|
}
|
|
1603
1615
|
addOption(option) {
|
|
1616
|
+
const selected = this.store.getSelected();
|
|
1604
1617
|
this.store.addOption(option);
|
|
1605
1618
|
const data = this.store.getData();
|
|
1606
1619
|
this.select.updateOptions(data);
|
|
1607
1620
|
this.render.renderValues();
|
|
1608
1621
|
this.render.renderOptions(data);
|
|
1622
|
+
if (this.events.afterChange && !isEqual(selected, this.store.getSelected())) {
|
|
1623
|
+
this.events.afterChange(this.store.getSelectedOptions());
|
|
1624
|
+
}
|
|
1609
1625
|
}
|
|
1610
1626
|
open() {
|
|
1611
1627
|
if (!this.settings.isEnabled || this.settings.isOpen) {
|