slim-select 1.27.0 → 1.27.1
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/slimselect.js +32 -18
- package/dist/slimselect.min.js +1 -1
- package/dist/slimselect.min.mjs +1 -1
- package/docs/css/chunk-vendors.fa8199af.css +1 -0
- package/docs/index.html +2 -2
- package/docs/js/app.238ee382.js +2 -0
- package/docs/js/app.238ee382.js.map +1 -0
- package/docs/js/chunk-vendors.5125e3d8.js +21 -0
- package/docs/js/chunk-vendors.5125e3d8.js.map +1 -0
- package/docs/js/{home.8bcb44fd.js → home.e7b28581.js} +1 -1
- package/docs/js/{home.8bcb44fd.js.map → home.e7b28581.js.map} +1 -1
- package/docs/js/install.d4300783.js +2 -0
- package/docs/js/install.d4300783.js.map +1 -0
- package/docs/js/methods.fa1608f1.js +11 -0
- package/docs/js/methods.fa1608f1.js.map +1 -0
- package/docs/js/{options.39fe1005.js → options.2c4ceb87.js} +2 -2
- package/docs/js/{options.39fe1005.js.map → options.2c4ceb87.js.map} +1 -1
- package/docs/js/{selects.f4d0b859.js → selects.1eeba693.js} +1 -1
- package/docs/js/{selects.f4d0b859.js.map → selects.1eeba693.js.map} +1 -1
- package/package.json +13 -17
- package/src/slim-select/index.ts +9 -1
- package/src/slim-select/select.ts +1 -0
- package/src/slim-select/slim.ts +5 -0
- package/docs/css/chunk-vendors.4db6930d.css +0 -1
- package/docs/js/app.db13c724.js +0 -2
- package/docs/js/app.db13c724.js.map +0 -1
- package/docs/js/chunk-vendors.cc40aa28.js +0 -28
- package/docs/js/chunk-vendors.cc40aa28.js.map +0 -1
- package/docs/js/install.02f31028.js +0 -2
- package/docs/js/install.02f31028.js.map +0 -1
- package/docs/js/methods.1b31e988.js +0 -11
- package/docs/js/methods.1b31e988.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/docs/pages/selects.vue?5328","webpack:///./src/docs/pages/selects.vue?c8b0","webpack:///./src/docs/pages/selects.vue?7a19","webpack:///./src/docs/pages/selects.vue?64a1","webpack:///./src/docs/pages/selects.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_l","value","key","abv","domProps","selected","_s","state","food","label","option","_m","staticRenderFns","extend","data","states","foods","options","mounted","select","multiGroup","set","component"],"mappings":"2GAAA,W,oECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAM,CAAC,GAAK,oBAAoB,CAACF,EAAG,MAAM,CAACG,YAAY,WAAW,CAACH,EAAG,KAAK,CAACG,YAAY,UAAU,CAACP,EAAIQ,GAAG,YAAYJ,EAAG,IAAI,CAACJ,EAAIQ,GAAG,uHAAuHJ,EAAG,MAAM,CAACG,YAAY,gBAAgB,CAACH,EAAG,MAAM,CAACA,EAAG,KAAK,CAACJ,EAAIQ,GAAG,aAAaJ,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,WAAWN,EAAIS,GAAIT,EAAU,QAAE,SAASU,GAAO,OAAON,EAAG,SAAS,CAACO,IAAID,EAAME,IAAIC,SAAS,CAAC,MAAQH,EAAME,IAAI,SAAWF,EAAMI,WAAW,CAACd,EAAIQ,GAAGR,EAAIe,GAAGL,EAAMM,aAAY,KAAKZ,EAAG,MAAM,CAACA,EAAG,KAAK,CAACJ,EAAIQ,GAAG,eAAeJ,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,iBAAiBN,EAAIS,GAAIT,EAAS,OAAE,SAASiB,GAAM,OAAOb,EAAG,WAAW,CAACO,IAAIM,EAAKC,MAAMZ,MAAM,CAAC,MAAQW,EAAKC,QAAQlB,EAAIS,GAAIQ,EAAY,SAAE,SAASE,GAAQ,OAAOf,EAAG,SAAS,CAACO,IAAIQ,EAAON,SAAS,CAAC,MAAQM,IAAS,CAACnB,EAAIQ,GAAGR,EAAIe,GAA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OAAQ,SAAU,SAAU,cACxD,CAAER,MAAO,OAAQQ,QAAS,CAAC,OAAQ,MAAO,OAAQ,UAAW,UAAW,WACxE,CAAER,MAAO,SAAUQ,QAAS,CAAC,QAAS,SAAU,QAAS,SAAU,aAAc,YAAa,cAC9F,CAAER,MAAO,aAAcQ,QAAS,CAAC,SAAU,SAAU,WAAY,SAAU,OAAQ,UAAW,OAAQ,eAI5GC,QAhEwB,WAiEtB,IAAI,OAAW,CACbC,OAAQ,YAEV,IAAI,OAAW,CACbA,OAAQ,kBAGV,IAAI,OAAW,CACbA,OAAQ,cAEV,IAAMC,EAAa,IAAI,OAAW,CAChCD,OAAQ,oBAEVC,EAAWC,IAAI,CAAC,SAAU,QAAS,YClF6T,I,wBCQhWC,EAAY,eACd,EACAhC,EACAsB,GACA,EACA,KACA,KACA,MAIa,aAAAU,E","file":"js/selects.f4d0b859.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=style&index=0&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"selects-content\"}},[_c('div',{staticClass:\"content\"},[_c('h2',{staticClass:\"header\"},[_vm._v(\"Single\")]),_c('p',[_vm._v(\" Basic single select usage with Slim Select is extremely easy. Just set the select value to your select element. \")]),_c('div',{staticClass:\"select-split\"},[_c('div',[_c('h4',[_vm._v(\"Options\")]),_c('select',{attrs:{\"id\":\"single\"}},_vm._l((_vm.states),function(value){return _c('option',{key:value.abv,domProps:{\"value\":value.abv,\"selected\":value.selected}},[_vm._v(_vm._s(value.state))])}),0)]),_c('div',[_c('h4',[_vm._v(\"Optgroups\")]),_c('select',{attrs:{\"id\":\"single-group\"}},_vm._l((_vm.foods),function(food){return _c('optgroup',{key:food.label,attrs:{\"label\":food.label}},_vm._l((food.options),function(option){return _c('option',{key:option,domProps:{\"value\":option}},[_vm._v(_vm._s(option))])}),0)}),0)])]),_vm._m(0),_vm._m(1)]),_c('div',{staticClass:\"content\"},[_c('h2',{staticClass:\"header\"},[_vm._v(\"Multiple\")]),_c('p',[_vm._v(\" Multi selects work just the same as a single select. The only difference is setting the multiple attribute on your select. \")]),_c('div',{staticClass:\"select-split\"},[_c('div',[_c('h4',[_vm._v(\"Options\")]),_c('select',{attrs:{\"id\":\"multiple\",\"multiple\":\"\"}},_vm._l((_vm.states),function(value){return _c('option',{key:value.abv,domProps:{\"value\":value.abv,\"selected\":value.selected}},[_vm._v(_vm._s(value.state))])}),0)]),_c('div',[_c('h4',[_vm._v(\"Optgroups\")]),_c('select',{attrs:{\"id\":\"multiple-group\",\"multiple\":\"\"}},_vm._l((_vm.foods),function(food){return _c('optgroup',{key:food.label,attrs:{\"label\":food.label}},_vm._l((food.options),function(option){return _c('option',{key:option,domProps:{\"value\":option}},[_vm._v(_vm._s(option))])}),0)}),0)])]),_vm._m(2),_vm._m(3)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-javascript\"},[_vm._v(\"\\n new SlimSelect({\\n select: '#single'\\n })\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-html\"},[_vm._v(\"\\n <!-- Options -->\\n <select id=\\\"single\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </select>\\n\\n <!-- Optgroups -->\\n <select id=\\\"single-optgroups\\\">\\n <optgroup label=\\\"Label 1\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </optgroup>\\n <optgroup label=\\\"Label 2\\\">\\n <option value=\\\"value 21\\\">Value 1</option>\\n <option value=\\\"value 22\\\">Value 2</option>\\n <option value=\\\"value 23\\\">Value 3</option>\\n </optgroup>\\n </select>\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-javascript\"},[_vm._v(\"\\n new SlimSelect({\\n select: '#multiple'\\n })\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-html\"},[_vm._v(\"\\n <!-- Options -->\\n <select id=\\\"multiple\\\" multiple>\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </select>\\n\\n <!-- Optgroups -->\\n <select id=\\\"multiple-optgroups\\\" multiple>\\n <optgroup label=\\\"Label 1\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </optgroup>\\n <optgroup label=\\\"Label 2\\\">\\n <option value=\\\"value 21\\\">Value 1</option>\\n <option value=\\\"value 22\\\">Value 2</option>\\n <option value=\\\"value 23\\\">Value 3</option>\\n </optgroup>\\n </select>\\n \")]),_vm._v(\"\\n \")])}]\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue'\nimport SlimSelect from '@/slim-select'\n\nexport default Vue.extend({\n data() {\n return {\n states: [\n {abv: 'AL', state: 'Alabama'},\n {abv: 'AK', state: 'Alaska'},\n {abv: 'AZ', state: 'Arizona'},\n {abv: 'AR', state: 'Arkansas'},\n {abv: 'CA', state: 'California', selected: true},\n {abv: 'CO', state: 'Colorado'},\n {abv: 'CT', state: 'Connecticut'},\n {abv: 'DE', state: 'Delaware'},\n {abv: 'DC', state: 'District Of Columbia'},\n {abv: 'FL', state: 'Florida'},\n {abv: 'GA', state: 'Georgia'},\n {abv: 'HI', state: 'Hawaii'},\n {abv: 'ID', state: 'Idaho'},\n {abv: 'IL', state: 'Illinois', selected: true},\n {abv: 'IN', state: 'Indiana'},\n {abv: 'IA', state: 'Iowa'},\n {abv: 'KS', state: 'Kansas'},\n {abv: 'KY', state: 'Kentucky'},\n {abv: 'LA', state: 'Louisiana'},\n {abv: 'ME', state: 'Maine'},\n {abv: 'MD', state: 'Maryland'},\n {abv: 'MA', state: 'Massachusetts'},\n {abv: 'MI', state: 'Michigan'},\n {abv: 'MN', state: 'Minnesota'},\n {abv: 'MS', state: 'Mississippi'},\n {abv: 'MO', state: 'Missouri'},\n {abv: 'MT', state: 'Montana'},\n {abv: 'NE', state: 'Nebraska'},\n {abv: 'NV', state: 'Nevada'},\n {abv: 'NH', state: 'New Hampshire'},\n {abv: 'NJ', state: 'New Jersey'},\n {abv: 'NM', state: 'New Mexico'},\n {abv: 'NY', state: 'New York'},\n {abv: 'NC', state: 'North Carolina'},\n {abv: 'ND', state: 'North Dakota'},\n {abv: 'OH', state: 'Ohio'},\n {abv: 'OK', state: 'Oklahoma'},\n {abv: 'OR', state: 'Oregon'},\n {abv: 'PA', state: 'Pennsylvania'},\n {abv: 'RI', state: 'Rhode Island'},\n {abv: 'SC', state: 'South Carolina'},\n {abv: 'SD', state: 'South Dakota'},\n {abv: 'TN', state: 'Tennessee'},\n {abv: 'TX', state: 'Texas'},\n {abv: 'UT', state: 'Utah'},\n {abv: 'VT', state: 'Vermont'},\n {abv: 'VA', state: 'Virginia'},\n {abv: 'WA', state: 'Washington'},\n {abv: 'WV', state: 'West Virginia'},\n {abv: 'WI', state: 'Wisconsin'},\n {abv: 'WY', state: 'Wyoming'}\n ],\n foods: [\n { label: 'Dairy', options: ['Milk', 'Cheese', 'Butter', 'Ice Cream'] },\n { label: 'Meat', options: ['Beef', 'Ham', 'Pork', 'Sausage', 'Chicken', 'Turkey'] },\n { label: 'Fruits', options: ['Apple', 'Banana', 'Grape', 'Orange', 'Strawberry', 'Blueberry', 'Raspberry'] },\n { label: 'Vegetables', options: ['Carrot', 'Tomato', 'Broccoli', 'Celery', 'Corn', 'Pumpkin', 'Kale', 'Spinach'] }\n ]\n }\n },\n mounted() {\n new SlimSelect({\n select: '#single'\n })\n new SlimSelect({\n select: '#single-group'\n })\n\n new SlimSelect({\n select: '#multiple'\n })\n const multiGroup = new SlimSelect({\n select: '#multiple-group'\n })\n multiGroup.set(['Cheese', 'Apple', 'Corn'])\n }\n})\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./selects.vue?vue&type=template&id=fac020ec&\"\nimport script from \"./selects.vue?vue&type=script&lang=ts&\"\nexport * from \"./selects.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selects.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/docs/pages/selects.vue?b7b3","webpack:///./src/docs/pages/selects.vue?8c18","webpack:///./src/docs/pages/selects.vue?b895","webpack:///./src/docs/pages/selects.vue?fe1a","webpack:///./src/docs/pages/selects.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_l","value","key","abv","domProps","selected","_s","state","food","label","option","_m","staticRenderFns","extend","data","states","foods","options","mounted","select","multiGroup","set","component"],"mappings":"2GAAA,W,oECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAM,CAAC,GAAK,oBAAoB,CAACF,EAAG,MAAM,CAACG,YAAY,WAAW,CAACH,EAAG,KAAK,CAACG,YAAY,UAAU,CAACP,EAAIQ,GAAG,YAAYJ,EAAG,IAAI,CAACJ,EAAIQ,GAAG,uHAAuHJ,EAAG,MAAM,CAACG,YAAY,gBAAgB,CAACH,EAAG,MAAM,CAACA,EAAG,KAAK,CAACJ,EAAIQ,GAAG,aAAaJ,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,WAAWN,EAAIS,GAAIT,EAAU,QAAE,SAASU,GAAO,OAAON,EAAG,SAAS,CAACO,IAAID,EAAME,IAAIC,SAAS,CAAC,MAAQH,EAAME,IAAI,SAAWF,EAAMI,WAAW,CAACd,EAAIQ,GAAGR,EAAIe,GAAGL,EAAMM,aAAY,KAAKZ,EAAG,MAAM,CAACA,EAAG,KAAK,CAACJ,EAAIQ,GAAG,eAAeJ,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,iBAAiBN,EAAIS,GAAIT,EAAS,OAAE,SAASiB,GAAM,OAAOb,EAAG,WAAW,CAACO,IAAIM,EAAKC,MAAMZ,MAAM,CAAC,MAAQW,EAAKC,QAAQlB,EAAIS,GAAIQ,EAAY,SAAE,SAASE,GAAQ,OAA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AAMI,MAAO,aACnB,CAACJ,IAAK,KAAMI,MAAO,YAErBS,MAAO,CACL,CAAEP,MAAO,QAASQ,QAAS,CAAC,OAAQ,SAAU,SAAU,cACxD,CAAER,MAAO,OAAQQ,QAAS,CAAC,OAAQ,MAAO,OAAQ,UAAW,UAAW,WACxE,CAAER,MAAO,SAAUQ,QAAS,CAAC,QAAS,SAAU,QAAS,SAAU,aAAc,YAAa,cAC9F,CAAER,MAAO,aAAcQ,QAAS,CAAC,SAAU,SAAU,WAAY,SAAU,OAAQ,UAAW,OAAQ,eAI5GC,QAhEwB,WAiEtB,IAAI,OAAW,CACbC,OAAQ,YAEV,IAAI,OAAW,CACbA,OAAQ,kBAGV,IAAI,OAAW,CACbA,OAAQ,cAEV,IAAMC,EAAa,IAAI,OAAW,CAChCD,OAAQ,oBAEVC,EAAWC,IAAI,CAAC,SAAU,QAAS,YClF6T,I,wBCQhWC,EAAY,eACd,EACAhC,EACAsB,GACA,EACA,KACA,KACA,MAIa,aAAAU,E","file":"js/selects.1eeba693.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=style&index=0&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"selects-content\"}},[_c('div',{staticClass:\"content\"},[_c('h2',{staticClass:\"header\"},[_vm._v(\"Single\")]),_c('p',[_vm._v(\" Basic single select usage with Slim Select is extremely easy. Just set the select value to your select element. \")]),_c('div',{staticClass:\"select-split\"},[_c('div',[_c('h4',[_vm._v(\"Options\")]),_c('select',{attrs:{\"id\":\"single\"}},_vm._l((_vm.states),function(value){return _c('option',{key:value.abv,domProps:{\"value\":value.abv,\"selected\":value.selected}},[_vm._v(_vm._s(value.state))])}),0)]),_c('div',[_c('h4',[_vm._v(\"Optgroups\")]),_c('select',{attrs:{\"id\":\"single-group\"}},_vm._l((_vm.foods),function(food){return _c('optgroup',{key:food.label,attrs:{\"label\":food.label}},_vm._l((food.options),function(option){return _c('option',{key:option,domProps:{\"value\":option}},[_vm._v(_vm._s(option))])}),0)}),0)])]),_vm._m(0),_vm._m(1)]),_c('div',{staticClass:\"content\"},[_c('h2',{staticClass:\"header\"},[_vm._v(\"Multiple\")]),_c('p',[_vm._v(\" Multi selects work just the same as a single select. The only difference is setting the multiple attribute on your select. \")]),_c('div',{staticClass:\"select-split\"},[_c('div',[_c('h4',[_vm._v(\"Options\")]),_c('select',{attrs:{\"id\":\"multiple\",\"multiple\":\"\"}},_vm._l((_vm.states),function(value){return _c('option',{key:value.abv,domProps:{\"value\":value.abv,\"selected\":value.selected}},[_vm._v(_vm._s(value.state))])}),0)]),_c('div',[_c('h4',[_vm._v(\"Optgroups\")]),_c('select',{attrs:{\"id\":\"multiple-group\",\"multiple\":\"\"}},_vm._l((_vm.foods),function(food){return _c('optgroup',{key:food.label,attrs:{\"label\":food.label}},_vm._l((food.options),function(option){return _c('option',{key:option,domProps:{\"value\":option}},[_vm._v(_vm._s(option))])}),0)}),0)])]),_vm._m(2),_vm._m(3)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-javascript\"},[_vm._v(\"\\n new SlimSelect({\\n select: '#single'\\n })\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-html\"},[_vm._v(\"\\n <!-- Options -->\\n <select id=\\\"single\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </select>\\n\\n <!-- Optgroups -->\\n <select id=\\\"single-optgroups\\\">\\n <optgroup label=\\\"Label 1\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </optgroup>\\n <optgroup label=\\\"Label 2\\\">\\n <option value=\\\"value 21\\\">Value 1</option>\\n <option value=\\\"value 22\\\">Value 2</option>\\n <option value=\\\"value 23\\\">Value 3</option>\\n </optgroup>\\n </select>\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-javascript\"},[_vm._v(\"\\n new SlimSelect({\\n select: '#multiple'\\n })\\n \")]),_vm._v(\"\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',[_vm._v(\" \"),_c('code',{staticClass:\"language-html\"},[_vm._v(\"\\n <!-- Options -->\\n <select id=\\\"multiple\\\" multiple>\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </select>\\n\\n <!-- Optgroups -->\\n <select id=\\\"multiple-optgroups\\\" multiple>\\n <optgroup label=\\\"Label 1\\\">\\n <option value=\\\"value 1\\\">Value 1</option>\\n <option value=\\\"value 2\\\">Value 2</option>\\n <option value=\\\"value 3\\\">Value 3</option>\\n </optgroup>\\n <optgroup label=\\\"Label 2\\\">\\n <option value=\\\"value 21\\\">Value 1</option>\\n <option value=\\\"value 22\\\">Value 2</option>\\n <option value=\\\"value 23\\\">Value 3</option>\\n </optgroup>\\n </select>\\n \")]),_vm._v(\"\\n \")])}]\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue'\nimport SlimSelect from '@/slim-select'\n\nexport default Vue.extend({\n data() {\n return {\n states: [\n {abv: 'AL', state: 'Alabama'},\n {abv: 'AK', state: 'Alaska'},\n {abv: 'AZ', state: 'Arizona'},\n {abv: 'AR', state: 'Arkansas'},\n {abv: 'CA', state: 'California', selected: true},\n {abv: 'CO', state: 'Colorado'},\n {abv: 'CT', state: 'Connecticut'},\n {abv: 'DE', state: 'Delaware'},\n {abv: 'DC', state: 'District Of Columbia'},\n {abv: 'FL', state: 'Florida'},\n {abv: 'GA', state: 'Georgia'},\n {abv: 'HI', state: 'Hawaii'},\n {abv: 'ID', state: 'Idaho'},\n {abv: 'IL', state: 'Illinois', selected: true},\n {abv: 'IN', state: 'Indiana'},\n {abv: 'IA', state: 'Iowa'},\n {abv: 'KS', state: 'Kansas'},\n {abv: 'KY', state: 'Kentucky'},\n {abv: 'LA', state: 'Louisiana'},\n {abv: 'ME', state: 'Maine'},\n {abv: 'MD', state: 'Maryland'},\n {abv: 'MA', state: 'Massachusetts'},\n {abv: 'MI', state: 'Michigan'},\n {abv: 'MN', state: 'Minnesota'},\n {abv: 'MS', state: 'Mississippi'},\n {abv: 'MO', state: 'Missouri'},\n {abv: 'MT', state: 'Montana'},\n {abv: 'NE', state: 'Nebraska'},\n {abv: 'NV', state: 'Nevada'},\n {abv: 'NH', state: 'New Hampshire'},\n {abv: 'NJ', state: 'New Jersey'},\n {abv: 'NM', state: 'New Mexico'},\n {abv: 'NY', state: 'New York'},\n {abv: 'NC', state: 'North Carolina'},\n {abv: 'ND', state: 'North Dakota'},\n {abv: 'OH', state: 'Ohio'},\n {abv: 'OK', state: 'Oklahoma'},\n {abv: 'OR', state: 'Oregon'},\n {abv: 'PA', state: 'Pennsylvania'},\n {abv: 'RI', state: 'Rhode Island'},\n {abv: 'SC', state: 'South Carolina'},\n {abv: 'SD', state: 'South Dakota'},\n {abv: 'TN', state: 'Tennessee'},\n {abv: 'TX', state: 'Texas'},\n {abv: 'UT', state: 'Utah'},\n {abv: 'VT', state: 'Vermont'},\n {abv: 'VA', state: 'Virginia'},\n {abv: 'WA', state: 'Washington'},\n {abv: 'WV', state: 'West Virginia'},\n {abv: 'WI', state: 'Wisconsin'},\n {abv: 'WY', state: 'Wyoming'}\n ],\n foods: [\n { label: 'Dairy', options: ['Milk', 'Cheese', 'Butter', 'Ice Cream'] },\n { label: 'Meat', options: ['Beef', 'Ham', 'Pork', 'Sausage', 'Chicken', 'Turkey'] },\n { label: 'Fruits', options: ['Apple', 'Banana', 'Grape', 'Orange', 'Strawberry', 'Blueberry', 'Raspberry'] },\n { label: 'Vegetables', options: ['Carrot', 'Tomato', 'Broccoli', 'Celery', 'Corn', 'Pumpkin', 'Kale', 'Spinach'] }\n ]\n }\n },\n mounted() {\n new SlimSelect({\n select: '#single'\n })\n new SlimSelect({\n select: '#single-group'\n })\n\n new SlimSelect({\n select: '#multiple'\n })\n const multiGroup = new SlimSelect({\n select: '#multiple-group'\n })\n multiGroup.set(['Cheese', 'Apple', 'Corn'])\n }\n})\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selects.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./selects.vue?vue&type=template&id=fac020ec&\"\nimport script from \"./selects.vue?vue&type=script&lang=ts&\"\nexport * from \"./selects.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selects.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slim-select",
|
|
3
3
|
"description": "Slim advanced select dropdown",
|
|
4
|
-
"version": "1.27.
|
|
4
|
+
"version": "1.27.1",
|
|
5
5
|
"author": "Brian Voelker <brian@webiswhatido.com> (http://webiswhatido.com)",
|
|
6
6
|
"homepage": "https://slimselectjs.com",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,25 +41,21 @@
|
|
|
41
41
|
"lint": "vue-cli-service lint"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@vue/cli-plugin-babel": "^4.5.
|
|
45
|
-
"@vue/cli-plugin-typescript": "^4.5.
|
|
46
|
-
"@vue/cli-service": "^4.5.
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"clipboard": "^2.0.4",
|
|
44
|
+
"@vue/cli-plugin-babel": "^4.5.15",
|
|
45
|
+
"@vue/cli-plugin-typescript": "^4.5.15",
|
|
46
|
+
"@vue/cli-service": "^4.5.15",
|
|
47
|
+
"chance": "^1.1.8",
|
|
48
|
+
"clipboard": "^2.0.8",
|
|
50
49
|
"node-sass": "^5.0.0",
|
|
51
50
|
"optimize-css-assets-webpack-plugin": "^5.0.4",
|
|
52
|
-
"prismjs": "^1.
|
|
51
|
+
"prismjs": "^1.25.0",
|
|
53
52
|
"sass-loader": "^10.1.0",
|
|
54
|
-
"typescript": "^
|
|
53
|
+
"typescript": "^4.5.4",
|
|
55
54
|
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
56
|
-
"vue": "^2.6.
|
|
57
|
-
"vue-router": "^3.
|
|
58
|
-
"vue-template-compiler": "^2.6.
|
|
59
|
-
"vuex": "^3.6.
|
|
60
|
-
"webpack-cli": "^4.
|
|
61
|
-
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"npm-check": "^5.9.2"
|
|
55
|
+
"vue": "^2.6.14",
|
|
56
|
+
"vue-router": "^3.5.3",
|
|
57
|
+
"vue-template-compiler": "^2.6.14",
|
|
58
|
+
"vuex": "^3.6.2",
|
|
59
|
+
"webpack-cli": "^4.9.1"
|
|
64
60
|
}
|
|
65
61
|
}
|
package/src/slim-select/index.ts
CHANGED
|
@@ -177,6 +177,11 @@ export default class SlimSelect {
|
|
|
177
177
|
this.data.onDataChange() // Trigger on change callback
|
|
178
178
|
this.render()
|
|
179
179
|
|
|
180
|
+
// Close when all options are selected and hidden
|
|
181
|
+
if (this.config.hideSelectedOption && this.config.isMultiple && (this.data.getSelected() as Option[]).length === this.data.data.length) {
|
|
182
|
+
close = true
|
|
183
|
+
}
|
|
184
|
+
|
|
180
185
|
if (close) { this.close() }
|
|
181
186
|
}
|
|
182
187
|
|
|
@@ -214,7 +219,7 @@ export default class SlimSelect {
|
|
|
214
219
|
// Look for duplicate selected if so remove it
|
|
215
220
|
for (let i = 0; i < newData.length; i++) {
|
|
216
221
|
if (!newData[i].placeholder && newData[i].value === (selected as Option).value && newData[i].text === (selected as Option).text) {
|
|
217
|
-
|
|
222
|
+
newData.splice(i, 1)
|
|
218
223
|
}
|
|
219
224
|
}
|
|
220
225
|
|
|
@@ -257,6 +262,9 @@ export default class SlimSelect {
|
|
|
257
262
|
// Dont do anything if the content is already open
|
|
258
263
|
if (this.data.contentOpen) { return }
|
|
259
264
|
|
|
265
|
+
// Dont open when all options are selected and hidden
|
|
266
|
+
if (this.config.hideSelectedOption && this.config.isMultiple && (this.data.getSelected() as Option[]).length === this.data.data.length) { return }
|
|
267
|
+
|
|
260
268
|
// Run beforeOpen callback
|
|
261
269
|
if (this.beforeOpen) { this.beforeOpen() }
|
|
262
270
|
|
package/src/slim-select/slim.ts
CHANGED
|
@@ -553,6 +553,9 @@ export class Slim {
|
|
|
553
553
|
public listDiv(): HTMLDivElement {
|
|
554
554
|
const list = document.createElement('div')
|
|
555
555
|
list.classList.add(this.main.config.list)
|
|
556
|
+
list.setAttribute('role', 'listbox')
|
|
557
|
+
// @todo Link to?
|
|
558
|
+
// list.setAttribute('aria-labelledby', '')
|
|
556
559
|
return list
|
|
557
560
|
}
|
|
558
561
|
|
|
@@ -652,6 +655,8 @@ export class Slim {
|
|
|
652
655
|
|
|
653
656
|
// Add class to div element
|
|
654
657
|
optionEl.classList.add(this.main.config.option)
|
|
658
|
+
// Add WCAG attribute
|
|
659
|
+
optionEl.setAttribute('role', 'option')
|
|
655
660
|
if (data.class) {
|
|
656
661
|
data.class.split(' ').forEach((dataClass: string) => {
|
|
657
662
|
optionEl.classList.add(dataClass)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;top:.3em;right:.2em;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar .toolbar-item{display:inline-block}div.code-toolbar>.toolbar a{cursor:pointer}div.code-toolbar>.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar a,div.code-toolbar>.toolbar button,div.code-toolbar>.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:hsla(0,0%,87.8%,.2);-webkit-box-shadow:0 2px 0 0 rgba(0,0,0,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar a:focus,div.code-toolbar>.toolbar a:hover,div.code-toolbar>.toolbar button:focus,div.code-toolbar>.toolbar button:hover,div.code-toolbar>.toolbar span:focus,div.code-toolbar>.toolbar span:hover{color:inherit;text-decoration:none}
|
package/docs/js/app.db13c724.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(e){function t(t){for(var n,a,o=t[0],r=t[1],c=t[2],d=0,h=[];d<o.length;d++)a=o[d],Object.prototype.hasOwnProperty.call(s,a)&&s[a]&&h.push(s[a][0]),s[a]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);u&&u(t);while(h.length)h.shift()();return l.push.apply(l,c||[]),i()}function i(){for(var e,t=0;t<l.length;t++){for(var i=l[t],n=!0,a=1;a<i.length;a++){var o=i[a];0!==s[o]&&(n=!1)}n&&(l.splice(t--,1),e=r(r.s=i[0]))}return e}var n={},a={app:0},s={app:0},l=[];function o(e){return r.p+"js/"+({home:"home",install:"install",methods:"methods",options:"options",selects:"selects"}[e]||e)+"."+{home:"8bcb44fd",install:"02f31028",methods:"1b31e988",options:"39fe1005",selects:"f4d0b859"}[e]+".js"}function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.e=function(e){var t=[],i={home:1,install:1,methods:1,options:1,selects:1};a[e]?t.push(a[e]):0!==a[e]&&i[e]&&t.push(a[e]=new Promise((function(t,i){for(var n="css/"+({home:"home",install:"install",methods:"methods",options:"options",selects:"selects"}[e]||e)+"."+{home:"57020178",install:"baa5d3fb",methods:"728c742a",options:"b28a32ef",selects:"1a7e1e6a"}[e]+".css",s=r.p+n,l=document.getElementsByTagName("link"),o=0;o<l.length;o++){var c=l[o],d=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(d===n||d===s))return t()}var h=document.getElementsByTagName("style");for(o=0;o<h.length;o++){c=h[o],d=c.getAttribute("data-href");if(d===n||d===s)return t()}var u=document.createElement("link");u.rel="stylesheet",u.type="text/css",u.onload=t,u.onerror=function(t){var n=t&&t.target&&t.target.src||s,l=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");l.code="CSS_CHUNK_LOAD_FAILED",l.request=n,delete a[e],u.parentNode.removeChild(u),i(l)},u.href=s;var f=document.getElementsByTagName("head")[0];f.appendChild(u)})).then((function(){a[e]=0})));var n=s[e];if(0!==n)if(n)t.push(n[2]);else{var l=new Promise((function(t,i){n=s[e]=[t,i]}));t.push(n[2]=l);var c,d=document.createElement("script");d.charset="utf-8",d.timeout=120,r.nc&&d.setAttribute("nonce",r.nc),d.src=o(e);var h=new Error;c=function(t){d.onerror=d.onload=null,clearTimeout(u);var i=s[e];if(0!==i){if(i){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;h.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",h.name="ChunkLoadError",h.type=n,h.request=a,i[1](h)}s[e]=void 0}};var u=setTimeout((function(){c({type:"timeout",target:d})}),12e4);d.onerror=d.onload=c,document.head.appendChild(d)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],d=c.push.bind(c);c.push=t,c=c.slice();for(var h=0;h<c.length;h++)t(c[h]);var u=d;l.push([0,"chunk-vendors"]),i()})({0:function(e,t,i){e.exports=i("cd49")},"517e":function(e,t,i){"use strict";i("692c")},"692c":function(e,t,i){},"9d16":function(e,t,i){},ba4b:function(e,t,i){"use strict";i.d(t,"a",(function(){return S}));i("d3b7"),i("ac1f"),i("841c"),i("ddb0");var n=i("b85c"),a=i("d4ec"),s=i("bee2"),l=(i("c975"),i("1276"),function(){function e(t){Object(a["a"])(this,e),this.id="",this.isMultiple=!1,this.isAjax=!1,this.isSearching=!1,this.showSearch=!0,this.searchFocus=!0,this.searchHighlight=!1,this.closeOnSelect=!0,this.showContent="auto",this.searchPlaceholder="Search",this.searchText="No Results",this.searchingText="Searching...",this.placeholderText="Select Value",this.allowDeselect=!1,this.allowDeselectOption=!1,this.hideSelectedOption=!1,this.deselectLabel="x",this.isEnabled=!0,this.valuesUseText=!1,this.showOptionTooltips=!1,this.selectByGroup=!1,this.limit=0,this.timeoutDelay=200,this.addToBody=!1,this.main="ss-main",this.singleSelected="ss-single-selected",this.arrow="ss-arrow",this.multiSelected="ss-multi-selected",this.add="ss-add",this.plus="ss-plus",this.values="ss-values",this.value="ss-value",this.valueText="ss-value-text",this.valueDelete="ss-value-delete",this.content="ss-content",this.open="ss-open",this.openAbove="ss-open-above",this.openBelow="ss-open-below",this.search="ss-search",this.searchHighlighter="ss-search-highlight",this.addable="ss-addable",this.list="ss-list",this.optgroup="ss-optgroup",this.optgroupLabel="ss-optgroup-label",this.optgroupLabelSelectable="ss-optgroup-label-selectable",this.option="ss-option",this.optionSelected="ss-option-selected",this.highlighted="ss-highlighted",this.disabled="ss-disabled",this.hide="ss-hide",this.id="ss-"+Math.floor(1e5*Math.random()),this.style=t.select.style.cssText,this.class=t.select.className.split(" "),this.isMultiple=t.select.multiple,this.isAjax=t.isAjax,this.showSearch=!1!==t.showSearch,this.searchFocus=!1!==t.searchFocus,this.searchHighlight=!0===t.searchHighlight,this.closeOnSelect=!1!==t.closeOnSelect,t.showContent&&(this.showContent=t.showContent),this.isEnabled=!1!==t.isEnabled,t.searchPlaceholder&&(this.searchPlaceholder=t.searchPlaceholder),t.searchText&&(this.searchText=t.searchText),t.searchingText&&(this.searchingText=t.searchingText),t.placeholderText&&(this.placeholderText=t.placeholderText),this.allowDeselect=!0===t.allowDeselect,this.allowDeselectOption=!0===t.allowDeselectOption,this.hideSelectedOption=!0===t.hideSelectedOption,t.deselectLabel&&(this.deselectLabel=t.deselectLabel),t.valuesUseText&&(this.valuesUseText=t.valuesUseText),t.showOptionTooltips&&(this.showOptionTooltips=t.showOptionTooltips),t.selectByGroup&&(this.selectByGroup=t.selectByGroup),t.limit&&(this.limit=t.limit),t.searchFilter&&(this.searchFilter=t.searchFilter),null!=t.timeoutDelay&&(this.timeoutDelay=t.timeoutDelay),this.addToBody=!0===t.addToBody}return Object(s["a"])(e,[{key:"searchFilter",value:function(e,t){return-1!==e.text.toLowerCase().indexOf(t.toLowerCase())}}]),e}()),o=(i("4160"),i("b64b"),i("159b"),i("53ca"));i("99af"),i("4d63"),i("25f0"),i("466d"),i("5319"),i("498a");function r(e,t){function i(e,t){return t&&e&&e.classList&&e.classList.contains(t)?e:null}function n(e,t){return e&&e!==document?i(e,t)?e:n(e.parentNode,t):null}return i(e,t)||n(e,t)}function c(e,t){var i=e.scrollTop+e.offsetTop,n=i+e.clientHeight,a=t.offsetTop,s=a+t.clientHeight;a<i?e.scrollTop-=i-a:s>n&&(e.scrollTop+=s-n)}function d(e,t,i){var n=e.offsetHeight,a=e.getBoundingClientRect(),s=i?a.top:a.top-n,l=i?a.bottom:a.bottom+n;return s<=0?"below":l>=window.innerHeight?"above":i?t:"below"}function h(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var o=self,r=function(){t=null,n||e.apply(o,s)},c=n&&!t;clearTimeout(t),t=setTimeout(r,i),c&&e.apply(o,s)}}function u(e,t,i){if(!Array.isArray(e))return e[t]===i;var a,s=Object(n["a"])(e);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(l&&l[t]&&l[t]===i)return!0}}catch(o){s.e(o)}finally{s.f()}return!1}function f(e,t,i){var n=e,a=new RegExp("("+t.trim()+")(?![^<]*>[^<>]*</)","i");if(!e.match(a))return e;var s=e.match(a).index,l=s+e.match(a)[0].toString().length,o=e.substring(s,l);return n=n.replace(a,'<mark class="'.concat(i,'">').concat(o,"</mark>")),n}function m(e){var t=e.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(function(e){return"-"+e.toLowerCase()}));return e[0]===e[0].toUpperCase()?t.substring(1):t}(function(){var e=window;function t(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}"function"!==typeof e.CustomEvent&&(t.prototype=e.Event.prototype,e.CustomEvent=t)})();var v=function(){function e(t){Object(a["a"])(this,e),this.triggerMutationObserver=!0,this.element=t.select,this.main=t.main,this.element.disabled&&(this.main.config.isEnabled=!1),this.addAttributes(),this.addEventListeners(),this.mutationObserver=null,this.addMutationObserver();var i=this.element;i.slim=t.main}return Object(s["a"])(e,[{key:"setValue",value:function(){if(this.main.data.getSelected()){if(this.main.config.isMultiple){var e,t=this.main.data.getSelected(),i=this.element.options,a=Object(n["a"])(i);try{for(a.s();!(e=a.n()).done;){var s=e.value;s.selected=!1;var l,o=Object(n["a"])(t);try{for(o.s();!(l=o.n()).done;){var r=l.value;r.value===s.value&&(s.selected=!0)}}catch(d){o.e(d)}finally{o.f()}}}catch(d){a.e(d)}finally{a.f()}}else{var c=this.main.data.getSelected();this.element.value=c?c.value:""}this.main.data.isOnChangeEnabled=!1,this.element.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.main.data.isOnChangeEnabled=!0}}},{key:"addAttributes",value:function(){this.element.tabIndex=-1,this.element.style.display="none",this.element.dataset.ssid=this.main.config.id}},{key:"addEventListeners",value:function(){var e=this;this.element.addEventListener("change",(function(t){e.main.data.setSelectedFromSelect(),e.main.render()}))}},{key:"addMutationObserver",value:function(){var e=this;this.main.config.isAjax||(this.mutationObserver=new MutationObserver((function(t){e.triggerMutationObserver&&(e.main.data.parseSelectData(),e.main.data.setSelectedFromSelect(),e.main.render(),t.forEach((function(t){"class"===t.attributeName&&e.main.slim.updateContainerDivClass(e.main.slim.container)})))})),this.observeMutationObserver())}},{key:"observeMutationObserver",value:function(){this.mutationObserver&&this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,characterData:!0})}},{key:"disconnectMutationObserver",value:function(){this.mutationObserver&&this.mutationObserver.disconnect()}},{key:"create",value:function(e){this.element.innerHTML="";var t,i=Object(n["a"])(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.hasOwnProperty("options")){var s=a,l=document.createElement("optgroup");if(l.label=s.label,s.options){var o,r=Object(n["a"])(s.options);try{for(r.s();!(o=r.n()).done;){var c=o.value;l.appendChild(this.createOption(c))}}catch(d){r.e(d)}finally{r.f()}}this.element.appendChild(l)}else this.element.appendChild(this.createOption(a))}}catch(d){i.e(d)}finally{i.f()}}},{key:"createOption",value:function(e){var t=document.createElement("option");return t.value=""!==e.value?e.value:e.text,t.innerHTML=e.innerHTML||e.text,e.selected&&(t.selected=e.selected),!1===e.display&&(t.style.display="none"),e.disabled&&(t.disabled=!0),e.placeholder&&t.setAttribute("data-placeholder","true"),e.mandatory&&t.setAttribute("data-mandatory","true"),e.class&&e.class.split(" ").forEach((function(e){t.classList.add(e)})),e.data&&"object"===Object(o["a"])(e.data)&&Object.keys(e.data).forEach((function(i){t.setAttribute("data-"+m(i),e.data[i])})),t}}]),e}(),p=(i("a434"),i("4de4"),i("d81d"),i("fb6a"),function(){function e(t){Object(a["a"])(this,e),this.contentOpen=!1,this.contentPosition="below",this.isOnChangeEnabled=!0,this.main=t.main,this.searchValue="",this.data=[],this.filtered=null,this.parseSelectData(),this.setSelectedFromSelect()}return Object(s["a"])(e,[{key:"newOption",value:function(e){return{id:e.id?e.id:String(Math.floor(1e8*Math.random())),value:e.value?e.value:"",text:e.text?e.text:"",innerHTML:e.innerHTML?e.innerHTML:"",selected:!!e.selected&&e.selected,display:void 0===e.display||e.display,disabled:!!e.disabled&&e.disabled,placeholder:!!e.placeholder&&e.placeholder,class:e.class?e.class:void 0,data:e.data?e.data:{},mandatory:!!e.mandatory&&e.mandatory}}},{key:"add",value:function(e){this.data.push({id:String(Math.floor(1e8*Math.random())),value:e.value,text:e.text,innerHTML:"",selected:!1,display:!0,disabled:!1,placeholder:!1,class:void 0,mandatory:e.mandatory,data:{}})}},{key:"parseSelectData",value:function(){this.data=[];var e,t=this.main.select.element.childNodes,i=Object(n["a"])(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;if("OPTGROUP"===a.nodeName){var s,l=a,o={label:l.label,options:[]},r=a.childNodes,c=Object(n["a"])(r);try{for(c.s();!(s=c.n()).done;){var d=s.value;if("OPTION"===d.nodeName){var h=this.pullOptionData(d);o.options.push(h),h.placeholder&&""!==h.text.trim()&&(this.main.config.placeholderText=h.text)}}}catch(f){c.e(f)}finally{c.f()}this.data.push(o)}else if("OPTION"===a.nodeName){var u=this.pullOptionData(a);this.data.push(u),u.placeholder&&""!==u.text.trim()&&(this.main.config.placeholderText=u.text)}}}catch(f){i.e(f)}finally{i.f()}}},{key:"pullOptionData",value:function(e){return{id:!!e.dataset&&e.dataset.id||String(Math.floor(1e8*Math.random())),value:e.value,text:e.text,innerHTML:e.innerHTML,selected:e.selected,disabled:e.disabled,placeholder:"true"===e.dataset.placeholder,class:e.className,style:e.style.cssText,data:e.dataset,mandatory:!!e.dataset&&"true"===e.dataset.mandatory}}},{key:"setSelectedFromSelect",value:function(){if(this.main.config.isMultiple){var e,t=this.main.select.element.options,i=[],a=Object(n["a"])(t);try{for(a.s();!(e=a.n()).done;){var s=e.value;if(s.selected){var l=this.getObjectFromData(s.value,"value");l&&l.id&&i.push(l.id)}}}catch(d){a.e(d)}finally{a.f()}this.setSelected(i,"id")}else{var o=this.main.select.element;if(-1!==o.selectedIndex){var r=o.options[o.selectedIndex],c=r.value;this.setSelected(c,"value")}}}},{key:"setSelected",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",a=Object(n["a"])(this.data);try{for(a.s();!(t=a.n()).done;){var s=t.value;if(s.hasOwnProperty("label")){if(s.hasOwnProperty("options")){var l=s.options;if(l){var o,r=Object(n["a"])(l);try{for(r.s();!(o=r.n()).done;){var c=o.value;c.placeholder||(c.selected=this.shouldBeSelected(c,e,i))}}catch(d){r.e(d)}finally{r.f()}}}}else s.selected=this.shouldBeSelected(s,e,i)}}catch(d){a.e(d)}finally{a.f()}}},{key:"shouldBeSelected",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(Array.isArray(t)){var a,s=Object(n["a"])(t);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(i in e&&String(e[i])===String(l))return!0}}catch(o){s.e(o)}finally{s.f()}}else if(i in e&&String(e[i])===String(t))return!0;return!1}},{key:"getSelected",value:function(){var e,t={text:"",placeholder:this.main.config.placeholderText},i=[],a=Object(n["a"])(this.data);try{for(a.s();!(e=a.n()).done;){var s=e.value;if(s.hasOwnProperty("label")){if(s.hasOwnProperty("options")){var l=s.options;if(l){var o,r=Object(n["a"])(l);try{for(r.s();!(o=r.n()).done;){var c=o.value;c.selected&&(this.main.config.isMultiple?i.push(c):t=c)}}catch(d){r.e(d)}finally{r.f()}}}}else s.selected&&(this.main.config.isMultiple?i.push(s):t=s)}}catch(d){a.e(d)}finally{a.f()}return this.main.config.isMultiple?i:t}},{key:"addToSelected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";if(this.main.config.isMultiple){var i=[],a=this.getSelected();if(Array.isArray(a)){var s,l=Object(n["a"])(a);try{for(l.s();!(s=l.n()).done;){var o=s.value;i.push(o[t])}}catch(r){l.e(r)}finally{l.f()}}i.push(e),this.setSelected(i,t)}}},{key:"removeFromSelected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";if(this.main.config.isMultiple){var i,a=[],s=this.getSelected(),l=Object(n["a"])(s);try{for(l.s();!(i=l.n()).done;){var o=i.value;String(o[t])!==String(e)&&a.push(o[t])}}catch(r){l.e(r)}finally{l.f()}this.setSelected(a,t)}}},{key:"onDataChange",value:function(){this.main.onChange&&this.isOnChangeEnabled&&this.main.onChange(JSON.parse(JSON.stringify(this.getSelected())))}},{key:"getObjectFromData",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",a=Object(n["a"])(this.data);try{for(a.s();!(t=a.n()).done;){var s=t.value;if(i in s&&String(s[i])===String(e))return s;if(s.hasOwnProperty("options")){var l=s;if(l.options){var o,r=Object(n["a"])(l.options);try{for(r.s();!(o=r.n()).done;){var c=o.value;if(String(c[i])===String(e))return c}}catch(d){r.e(d)}finally{r.f()}}}}}catch(d){a.e(d)}finally{a.f()}return null}},{key:"search",value:function(e){if(this.searchValue=e,""!==e.trim()){var t=this.main.config.searchFilter,i=this.data.slice(0);e=e.trim();var n=i.map((function(i){if(i.hasOwnProperty("options")){var n=i,a=[];if(n.options&&(a=n.options.filter((function(i){return t(i,e)}))),0!==a.length){var s=Object.assign({},n);return s.options=a,s}}if(i.hasOwnProperty("text")){var l=i;if(t(l,e))return i}return null}));this.filtered=n.filter((function(e){return e}))}else this.filtered=null}}]),e}());function g(e){if(!e)return console.error("Data must be an array of objects"),!1;var t,i=!1,a=0,s=Object(n["a"])(e);try{for(s.s();!(t=s.n()).done;){var l=t.value;if(l.hasOwnProperty("label")){if(l.hasOwnProperty("options")){var o=l,r=o.options;if(r){var c,d=Object(n["a"])(r);try{for(d.s();!(c=d.n()).done;){var h=c.value;i=b(h),i||a++}}catch(f){d.e(f)}finally{d.f()}}}}else{var u=l;i=b(u),i||a++}}}catch(f){s.e(f)}finally{s.f()}return 0===a}function b(e){return void 0!==e.text||(console.error("Data object option must have at least have a text value. Check object: "+JSON.stringify(e)),!1)}var y=function(){function e(t){Object(a["a"])(this,e),this.main=t.main,this.container=this.containerDiv(),this.content=this.contentDiv(),this.search=this.searchDiv(),this.list=this.listDiv(),this.options(),this.singleSelected=null,this.multiSelected=null,this.main.config.isMultiple?(this.multiSelected=this.multiSelectedDiv(),this.multiSelected&&this.container.appendChild(this.multiSelected.container)):(this.singleSelected=this.singleSelectedDiv(),this.container.appendChild(this.singleSelected.container)),this.main.config.addToBody?(this.content.classList.add(this.main.config.id),document.body.appendChild(this.content)):this.container.appendChild(this.content),this.content.appendChild(this.search.container),this.content.appendChild(this.list)}return Object(s["a"])(e,[{key:"containerDiv",value:function(){var e=document.createElement("div");return e.style.cssText=this.main.config.style,this.updateContainerDivClass(e),e}},{key:"updateContainerDivClass",value:function(e){this.main.config.class=this.main.select.element.className.split(" "),e.className="",e.classList.add(this.main.config.id),e.classList.add(this.main.config.main);var t,i=Object(n["a"])(this.main.config.class);try{for(i.s();!(t=i.n()).done;){var a=t.value;""!==a.trim()&&e.classList.add(a)}}catch(s){i.e(s)}finally{i.f()}}},{key:"singleSelectedDiv",value:function(){var e=this,t=document.createElement("div");t.classList.add(this.main.config.singleSelected);var i=document.createElement("span");i.classList.add("placeholder"),t.appendChild(i);var n=document.createElement("span");n.innerHTML=this.main.config.deselectLabel,n.classList.add("ss-deselect"),n.onclick=function(t){t.stopPropagation(),e.main.config.isEnabled&&e.main.set("")},t.appendChild(n);var a=document.createElement("span");a.classList.add(this.main.config.arrow);var s=document.createElement("span");return s.classList.add("arrow-down"),a.appendChild(s),t.appendChild(a),t.onclick=function(){e.main.config.isEnabled&&(e.main.data.contentOpen?e.main.close():e.main.open())},{container:t,placeholder:i,deselect:n,arrowIcon:{container:a,arrow:s}}}},{key:"placeholder",value:function(){var e=this.main.data.getSelected();if(null===e||e&&e.placeholder){var t=document.createElement("span");t.classList.add(this.main.config.disabled),t.innerHTML=this.main.config.placeholderText,this.singleSelected&&(this.singleSelected.placeholder.innerHTML=t.outerHTML)}else{var i="";e&&(i=e.innerHTML&&!0!==this.main.config.valuesUseText?e.innerHTML:e.text),this.singleSelected&&(this.singleSelected.placeholder.innerHTML=e?i:"")}}},{key:"deselect",value:function(){if(this.singleSelected){if(!this.main.config.allowDeselect)return void this.singleSelected.deselect.classList.add("ss-hide");""===this.main.selected()?this.singleSelected.deselect.classList.add("ss-hide"):this.singleSelected.deselect.classList.remove("ss-hide")}}},{key:"multiSelectedDiv",value:function(){var e=this,t=document.createElement("div");t.classList.add(this.main.config.multiSelected);var i=document.createElement("div");i.classList.add(this.main.config.values),t.appendChild(i);var n=document.createElement("div");n.classList.add(this.main.config.add);var a=document.createElement("span");return a.classList.add(this.main.config.plus),a.onclick=function(t){e.main.data.contentOpen&&(e.main.close(),t.stopPropagation())},n.appendChild(a),t.appendChild(n),t.onclick=function(t){if(e.main.config.isEnabled){var i=t.target;i.classList.contains(e.main.config.valueDelete)||(e.main.data.contentOpen?e.main.close():e.main.open())}},{container:t,values:i,add:n,plus:a}}},{key:"values",value:function(){if(this.multiSelected){var e,t,i=this.multiSelected.values.childNodes,a=this.main.data.getSelected(),s=[],l=Object(n["a"])(i);try{for(l.s();!(t=l.n()).done;){var o=t.value;e=!0;var r,c=Object(n["a"])(a);try{for(c.s();!(r=c.n()).done;){var d=r.value;String(d.id)===String(o.dataset.id)&&(e=!1)}}catch(y){c.e(y)}finally{c.f()}e&&s.push(o)}}catch(y){l.e(y)}finally{l.f()}for(var h=0,u=s;h<u.length;h++){var f=u[h];f.classList.add("ss-out"),this.multiSelected.values.removeChild(f)}i=this.multiSelected.values.childNodes;for(var m=0;m<a.length;m++){e=!1;var v,p=Object(n["a"])(i);try{for(p.s();!(v=p.n()).done;){var g=v.value;String(a[m].id)===String(g.dataset.id)&&(e=!0)}}catch(y){p.e(y)}finally{p.f()}e||(0!==i.length&&HTMLElement.prototype.insertAdjacentElement?0===m?this.multiSelected.values.insertBefore(this.valueDiv(a[m]),i[m]):i[m-1].insertAdjacentElement("afterend",this.valueDiv(a[m])):this.multiSelected.values.appendChild(this.valueDiv(a[m])))}if(0===a.length){var b=document.createElement("span");b.classList.add(this.main.config.disabled),b.innerHTML=this.main.config.placeholderText,this.multiSelected.values.innerHTML=b.outerHTML}}}},{key:"valueDiv",value:function(e){var t=this,i=document.createElement("div");i.classList.add(this.main.config.value),i.dataset.id=e.id;var n=document.createElement("span");if(n.classList.add(this.main.config.valueText),n.innerHTML=e.innerHTML&&!0!==this.main.config.valuesUseText?e.innerHTML:e.text,i.appendChild(n),!e.mandatory){var a=document.createElement("span");a.classList.add(this.main.config.valueDelete),a.innerHTML=this.main.config.deselectLabel,a.onclick=function(i){i.preventDefault(),i.stopPropagation();var n=!1;if(t.main.beforeOnChange||(n=!0),t.main.beforeOnChange){for(var a=t.main.data.getSelected(),s=JSON.parse(JSON.stringify(a)),l=0;l<s.length;l++)s[l].id===e.id&&s.splice(l,1);var o=t.main.beforeOnChange(s);!1!==o&&(n=!0)}n&&(t.main.data.removeFromSelected(e.id,"id"),t.main.render(),t.main.select.setValue(),t.main.data.onDataChange())},i.appendChild(a)}return i}},{key:"contentDiv",value:function(){var e=document.createElement("div");return e.classList.add(this.main.config.content),e}},{key:"searchDiv",value:function(){var e=this,t=document.createElement("div"),i=document.createElement("input"),n=document.createElement("div");t.classList.add(this.main.config.search);var a={container:t,input:i};return this.main.config.showSearch||(t.classList.add(this.main.config.hide),i.readOnly=!0),i.type="search",i.placeholder=this.main.config.searchPlaceholder,i.tabIndex=0,i.setAttribute("aria-label",this.main.config.searchPlaceholder),i.setAttribute("autocapitalize","off"),i.setAttribute("autocomplete","off"),i.setAttribute("autocorrect","off"),i.onclick=function(t){setTimeout((function(){var i=t.target;""===i.value&&e.main.search("")}),10)},i.onkeydown=function(t){"ArrowUp"===t.key?(e.main.open(),e.highlightUp(),t.preventDefault()):"ArrowDown"===t.key?(e.main.open(),e.highlightDown(),t.preventDefault()):"Tab"===t.key?e.main.data.contentOpen?e.main.close():setTimeout((function(){e.main.close()}),e.main.config.timeoutDelay):"Enter"===t.key&&t.preventDefault()},i.onkeyup=function(t){var a=t.target;if("Enter"===t.key){if(e.main.addable&&t.ctrlKey)return n.click(),t.preventDefault(),void t.stopPropagation();var s=e.list.querySelector("."+e.main.config.highlighted);s&&s.click()}else"ArrowUp"===t.key||"ArrowDown"===t.key||("Escape"===t.key?e.main.close():e.main.config.showSearch&&e.main.data.contentOpen?e.main.search(a.value):i.value="");t.preventDefault(),t.stopPropagation()},i.onfocus=function(){e.main.open()},t.appendChild(i),this.main.addable&&(n.classList.add(this.main.config.addable),n.innerHTML="+",n.onclick=function(t){if(e.main.addable){t.preventDefault(),t.stopPropagation();var i=e.search.input.value;if(""===i.trim())return void e.search.input.focus();var n=e.main.addable(i),a="";if(!n)return;if("object"===Object(o["a"])(n)){var s=b(n);s&&(e.main.addData(n),a=n.value?n.value:n.text)}else e.main.addData(e.main.data.newOption({text:n,value:n})),a=n;e.main.search(""),setTimeout((function(){e.main.set(a,"value",!1,!1)}),100),e.main.config.closeOnSelect&&setTimeout((function(){e.main.close()}),100)}},t.appendChild(n),a.addable=n),a}},{key:"highlightUp",value:function(){var e=this.list.querySelector("."+this.main.config.highlighted),t=null;if(e){t=e.previousSibling;while(null!==t){if(!t.classList.contains(this.main.config.disabled))break;t=t.previousSibling}}else{var i=this.list.querySelectorAll("."+this.main.config.option+":not(."+this.main.config.disabled+")");t=i[i.length-1]}if(t&&t.classList.contains(this.main.config.optgroupLabel)&&(t=null),null===t){var n=e.parentNode;if(n.classList.contains(this.main.config.optgroup)&&n.previousSibling){var a=n.previousSibling.querySelectorAll("."+this.main.config.option+":not(."+this.main.config.disabled+")");a.length&&(t=a[a.length-1])}}t&&(e&&e.classList.remove(this.main.config.highlighted),t.classList.add(this.main.config.highlighted),c(this.list,t))}},{key:"highlightDown",value:function(){var e=this.list.querySelector("."+this.main.config.highlighted),t=null;if(e){t=e.nextSibling;while(null!==t){if(!t.classList.contains(this.main.config.disabled))break;t=t.nextSibling}}else t=this.list.querySelector("."+this.main.config.option+":not(."+this.main.config.disabled+")");if(null===t&&null!==e){var i=e.parentNode;if(i.classList.contains(this.main.config.optgroup)&&i.nextSibling){var n=i.nextSibling;t=n.querySelector("."+this.main.config.option+":not(."+this.main.config.disabled+")")}}t&&(e&&e.classList.remove(this.main.config.highlighted),t.classList.add(this.main.config.highlighted),c(this.list,t))}},{key:"listDiv",value:function(){var e=document.createElement("div");return e.classList.add(this.main.config.list),e}},{key:"options",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=this.main.data.filtered||this.main.data.data;if(this.list.innerHTML="",""!==t){var a=document.createElement("div");return a.classList.add(this.main.config.option),a.classList.add(this.main.config.disabled),a.innerHTML=t,void this.list.appendChild(a)}if(this.main.config.isAjax&&this.main.config.isSearching){var s=document.createElement("div");return s.classList.add(this.main.config.option),s.classList.add(this.main.config.disabled),s.innerHTML=this.main.config.searchingText,void this.list.appendChild(s)}if(0===i.length){var l=document.createElement("div");return l.classList.add(this.main.config.option),l.classList.add(this.main.config.disabled),l.innerHTML=this.main.config.searchText,void this.list.appendChild(l)}var o,r=Object(n["a"])(i);try{for(r.s();!(o=r.n()).done;){var c=o.value;c.hasOwnProperty("label")?function(){var t=c,i=document.createElement("div");i.classList.add(e.main.config.optgroup);var a=document.createElement("div");a.classList.add(e.main.config.optgroupLabel),e.main.config.selectByGroup&&e.main.config.isMultiple&&a.classList.add(e.main.config.optgroupLabelSelectable),a.innerHTML=t.label,i.appendChild(a);var s=t.options;if(s){var l,o=Object(n["a"])(s);try{for(o.s();!(l=o.n()).done;){var r=l.value;i.appendChild(e.option(r))}}catch(h){o.e(h)}finally{o.f()}if(e.main.config.selectByGroup&&e.main.config.isMultiple){var d=e;a.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var t,a=Object(n["a"])(i.children);try{for(a.s();!(t=a.n()).done;){var s=t.value;-1!==s.className.indexOf(d.main.config.option)&&s.click()}}catch(h){a.e(h)}finally{a.f()}}))}}e.list.appendChild(i)}():this.list.appendChild(this.option(c))}}catch(d){r.e(d)}finally{r.f()}}},{key:"option",value:function(e){if(e.placeholder){var t=document.createElement("div");return t.classList.add(this.main.config.option),t.classList.add(this.main.config.hide),t}var i=document.createElement("div");i.classList.add(this.main.config.option),e.class&&e.class.split(" ").forEach((function(e){i.classList.add(e)})),e.style&&(i.style.cssText=e.style);var n=this.main.data.getSelected();i.dataset.id=e.id,this.main.config.searchHighlight&&this.main.slim&&e.innerHTML&&""!==this.main.slim.search.input.value.trim()?i.innerHTML=f(e.innerHTML,this.main.slim.search.input.value,this.main.config.searchHighlighter):e.innerHTML&&(i.innerHTML=e.innerHTML),this.main.config.showOptionTooltips&&i.textContent&&i.setAttribute("title",i.textContent);var a=this;i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var i=this,s=i.dataset.id;if(!0===e.selected&&a.main.config.allowDeselectOption){var l=!1;if(a.main.beforeOnChange&&a.main.config.isMultiple||(l=!0),a.main.beforeOnChange&&a.main.config.isMultiple){for(var o=a.main.data.getSelected(),r=JSON.parse(JSON.stringify(o)),c=0;c<r.length;c++)r[c].id===s&&r.splice(c,1);var d=a.main.beforeOnChange(r);!1!==d&&(l=!0)}l&&(a.main.config.isMultiple?(a.main.data.removeFromSelected(s,"id"),a.main.render(),a.main.select.setValue(),a.main.data.onDataChange()):a.main.set(""))}else{if(e.disabled||e.selected)return;if(a.main.config.limit&&Array.isArray(n)&&a.main.config.limit<=n.length)return;if(a.main.beforeOnChange){var h,u=JSON.parse(JSON.stringify(a.main.data.getObjectFromData(s)));u.selected=!0,a.main.config.isMultiple?(h=JSON.parse(JSON.stringify(n)),h.push(u)):h=JSON.parse(JSON.stringify(u));var f=a.main.beforeOnChange(h);!1!==f&&a.main.set(s,"id",a.main.config.closeOnSelect)}else a.main.set(s,"id",a.main.config.closeOnSelect)}}));var s=n&&u(n,"id",e.id);return(e.disabled||s)&&(i.onclick=null,a.main.config.allowDeselectOption||i.classList.add(this.main.config.disabled),a.main.config.hideSelectedOption&&i.classList.add(this.main.config.hide)),s?i.classList.add(this.main.config.optionSelected):i.classList.remove(this.main.config.optionSelected),i}}]),e}(),S=function(){function e(t){var i=this;Object(a["a"])(this,e),this.ajax=null,this.addable=null,this.beforeOnChange=null,this.onChange=null,this.beforeOpen=null,this.afterOpen=null,this.beforeClose=null,this.afterClose=null,this.windowScroll=h((function(e){i.data.contentOpen&&("above"===d(i.slim.content,i.data.contentPosition,i.data.contentOpen)?i.moveContentAbove():i.moveContentBelow())})),this.documentClick=function(e){e.target&&!r(e.target,i.config.id)&&i.close()};var n=this.validate(t);n.dataset.ssid&&this.destroy(n.dataset.ssid),t.ajax&&(this.ajax=t.ajax),t.addable&&(this.addable=t.addable),this.config=new l({select:n,isAjax:!!t.ajax,showSearch:t.showSearch,searchPlaceholder:t.searchPlaceholder,searchText:t.searchText,searchingText:t.searchingText,searchFocus:t.searchFocus,searchHighlight:t.searchHighlight,searchFilter:t.searchFilter,closeOnSelect:t.closeOnSelect,showContent:t.showContent,placeholderText:t.placeholder,allowDeselect:t.allowDeselect,allowDeselectOption:t.allowDeselectOption,hideSelectedOption:t.hideSelectedOption,deselectLabel:t.deselectLabel,isEnabled:t.isEnabled,valuesUseText:t.valuesUseText,showOptionTooltips:t.showOptionTooltips,selectByGroup:t.selectByGroup,limit:t.limit,timeoutDelay:t.timeoutDelay,addToBody:t.addToBody}),this.select=new v({select:n,main:this}),this.data=new p({main:this}),this.slim=new y({main:this}),this.select.element.parentNode&&this.select.element.parentNode.insertBefore(this.slim.container,this.select.element.nextSibling),t.data?this.setData(t.data):this.render(),document.addEventListener("click",this.documentClick),"auto"===this.config.showContent&&window.addEventListener("scroll",this.windowScroll,!1),t.beforeOnChange&&(this.beforeOnChange=t.beforeOnChange),t.onChange&&(this.onChange=t.onChange),t.beforeOpen&&(this.beforeOpen=t.beforeOpen),t.afterOpen&&(this.afterOpen=t.afterOpen),t.beforeClose&&(this.beforeClose=t.beforeClose),t.afterClose&&(this.afterClose=t.afterClose),this.config.isEnabled||this.disable()}return Object(s["a"])(e,[{key:"validate",value:function(e){var t="string"===typeof e.select?document.querySelector(e.select):e.select;if(!t)throw new Error("Could not find select element");if("SELECT"!==t.tagName)throw new Error("Element isnt of type select");return t}},{key:"selected",value:function(){if(this.config.isMultiple){var e,t=this.data.getSelected(),i=[],a=Object(n["a"])(t);try{for(a.s();!(e=a.n()).done;){var s=e.value;i.push(s.value)}}catch(o){a.e(o)}finally{a.f()}return i}var l=this.data.getSelected();return l?l.value:""}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.config.isMultiple&&!Array.isArray(e)?this.data.addToSelected(e,t):this.data.setSelected(e,t),this.select.setValue(),this.data.onDataChange(),this.render(),i&&this.close()}},{key:"setSelected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.set(e,t,i,n)}},{key:"setData",value:function(e){var t=g(e);if(t){for(var i=JSON.parse(JSON.stringify(e)),a=this.data.getSelected(),s=0;s<i.length;s++)i[s].value||i[s].placeholder||(i[s].value=i[s].text);if(this.config.isAjax&&a)if(this.config.isMultiple){var l,o=a.reverse(),r=Object(n["a"])(o);try{for(r.s();!(l=r.n()).done;){var c=l.value;i.unshift(c)}}catch(f){r.e(f)}finally{r.f()}}else{i.unshift(a);for(var d=0;d<i.length;d++)i[d].placeholder||i[d].value!==a.value||i[d].text!==a.text||delete i[d];for(var h=!1,u=0;u<i.length;u++)i[u].placeholder&&(h=!0);h||i.unshift({text:"",placeholder:!0})}this.select.create(i),this.data.parseSelectData(),this.data.setSelectedFromSelect()}else console.error("Validation problem on: #"+this.select.element.id)}},{key:"addData",value:function(e){var t=g([e]);t?(this.data.add(this.data.newOption(e)),this.select.create(this.data.data),this.data.parseSelectData(),this.data.setSelectedFromSelect(),this.render()):console.error("Validation problem on: #"+this.select.element.id)}},{key:"open",value:function(){var e=this;if(this.config.isEnabled&&!this.data.contentOpen){if(this.beforeOpen&&this.beforeOpen(),this.config.isMultiple&&this.slim.multiSelected?this.slim.multiSelected.plus.classList.add("ss-cross"):this.slim.singleSelected&&(this.slim.singleSelected.arrowIcon.arrow.classList.remove("arrow-down"),this.slim.singleSelected.arrowIcon.arrow.classList.add("arrow-up")),this.slim[this.config.isMultiple?"multiSelected":"singleSelected"].container.classList.add("above"===this.data.contentPosition?this.config.openAbove:this.config.openBelow),this.config.addToBody){var t=this.slim.container.getBoundingClientRect();this.slim.content.style.top=t.top+t.height+window.scrollY+"px",this.slim.content.style.left=t.left+window.scrollX+"px",this.slim.content.style.width=t.width+"px"}if(this.slim.content.classList.add(this.config.open),"up"===this.config.showContent.toLowerCase()?this.moveContentAbove():"down"===this.config.showContent.toLowerCase()?this.moveContentBelow():"above"===d(this.slim.content,this.data.contentPosition,this.data.contentOpen)?this.moveContentAbove():this.moveContentBelow(),!this.config.isMultiple){var i=this.data.getSelected();if(i){var n=i.id,a=this.slim.list.querySelector('[data-id="'+n+'"]');a&&c(this.slim.list,a)}}setTimeout((function(){e.data.contentOpen=!0,e.config.searchFocus&&e.slim.search.input.focus(),e.afterOpen&&e.afterOpen()}),this.config.timeoutDelay)}}},{key:"close",value:function(){var e=this;this.data.contentOpen&&(this.beforeClose&&this.beforeClose(),this.config.isMultiple&&this.slim.multiSelected?(this.slim.multiSelected.container.classList.remove(this.config.openAbove),this.slim.multiSelected.container.classList.remove(this.config.openBelow),this.slim.multiSelected.plus.classList.remove("ss-cross")):this.slim.singleSelected&&(this.slim.singleSelected.container.classList.remove(this.config.openAbove),this.slim.singleSelected.container.classList.remove(this.config.openBelow),this.slim.singleSelected.arrowIcon.arrow.classList.add("arrow-down"),this.slim.singleSelected.arrowIcon.arrow.classList.remove("arrow-up")),this.slim.content.classList.remove(this.config.open),this.data.contentOpen=!1,this.search(""),setTimeout((function(){e.slim.content.removeAttribute("style"),e.data.contentPosition="below",e.config.isMultiple&&e.slim.multiSelected?(e.slim.multiSelected.container.classList.remove(e.config.openAbove),e.slim.multiSelected.container.classList.remove(e.config.openBelow)):e.slim.singleSelected&&(e.slim.singleSelected.container.classList.remove(e.config.openAbove),e.slim.singleSelected.container.classList.remove(e.config.openBelow)),e.slim.search.input.blur(),e.afterClose&&e.afterClose()}),this.config.timeoutDelay))}},{key:"moveContentAbove",value:function(){var e=0;this.config.isMultiple&&this.slim.multiSelected?e=this.slim.multiSelected.container.offsetHeight:this.slim.singleSelected&&(e=this.slim.singleSelected.container.offsetHeight);var t=this.slim.content.offsetHeight,i=e+t-1;this.slim.content.style.margin="-"+i+"px 0 0 0",this.slim.content.style.height=i-e+1+"px",this.slim.content.style.transformOrigin="center bottom",this.data.contentPosition="above",this.config.isMultiple&&this.slim.multiSelected?(this.slim.multiSelected.container.classList.remove(this.config.openBelow),this.slim.multiSelected.container.classList.add(this.config.openAbove)):this.slim.singleSelected&&(this.slim.singleSelected.container.classList.remove(this.config.openBelow),this.slim.singleSelected.container.classList.add(this.config.openAbove))}},{key:"moveContentBelow",value:function(){this.data.contentPosition="below",this.config.isMultiple&&this.slim.multiSelected?(this.slim.multiSelected.container.classList.remove(this.config.openAbove),this.slim.multiSelected.container.classList.add(this.config.openBelow)):this.slim.singleSelected&&(this.slim.singleSelected.container.classList.remove(this.config.openAbove),this.slim.singleSelected.container.classList.add(this.config.openBelow))}},{key:"enable",value:function(){this.config.isEnabled=!0,this.config.isMultiple&&this.slim.multiSelected?this.slim.multiSelected.container.classList.remove(this.config.disabled):this.slim.singleSelected&&this.slim.singleSelected.container.classList.remove(this.config.disabled),this.select.triggerMutationObserver=!1,this.select.element.disabled=!1,this.slim.search.input.disabled=!1,this.select.triggerMutationObserver=!0}},{key:"disable",value:function(){this.config.isEnabled=!1,this.config.isMultiple&&this.slim.multiSelected?this.slim.multiSelected.container.classList.add(this.config.disabled):this.slim.singleSelected&&this.slim.singleSelected.container.classList.add(this.config.disabled),this.select.triggerMutationObserver=!1,this.select.element.disabled=!0,this.slim.search.input.disabled=!0,this.select.triggerMutationObserver=!0}},{key:"search",value:function(e){if(this.data.searchValue!==e)if(this.slim.search.input.value=e,this.config.isAjax){var t=this;this.config.isSearching=!0,this.render(),this.ajax&&this.ajax(e,(function(i){t.config.isSearching=!1,Array.isArray(i)?(i.unshift({text:"",placeholder:!0}),t.setData(i),t.data.search(e),t.render()):"string"===typeof i?t.slim.options(i):t.render()}))}else this.data.search(e),this.render()}},{key:"setSearchText",value:function(e){this.config.searchText=e}},{key:"render",value:function(){this.config.isMultiple?this.slim.values():(this.slim.placeholder(),this.slim.deselect()),this.slim.options()}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e?document.querySelector("."+e+".ss-main"):this.slim.container,i=e?document.querySelector("[data-ssid=".concat(e,"]")):this.select.element;if(t&&i){document.removeEventListener("click",this.documentClick),"auto"===this.config.showContent&&window.removeEventListener("scroll",this.windowScroll,!1),i.style.display="",delete i.dataset.ssid;var n=i;if(n.slim=null,t.parentElement&&t.parentElement.removeChild(t),this.config.addToBody){var a=e?document.querySelector("."+e+".ss-content"):this.slim.content;if(!a)return;document.body.removeChild(a)}}}}]),e}()},cd49:function(e,t,i){"use strict";i.r(t);i("e260"),i("e6cf"),i("cca6"),i("a79d");var n=i("2b0e"),a=(i("d3b7"),i("8c4f"));n["a"].use(a["a"]);var s=new a["a"]({mode:"history",base:"/",linkActiveClass:"active",routes:[{path:"/",component:function(){return i.e("home").then(i.bind(null,"badb"))}},{path:"/install",component:function(){return i.e("install").then(i.bind(null,"b467"))}},{path:"/selects",component:function(){return i.e("selects").then(i.bind(null,"60e0"))}},{path:"/options",component:function(){return i.e("options").then(i.bind(null,"832f"))}},{path:"/methods",component:function(){return i.e("methods").then(i.bind(null,"cded"))}}]}),l=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"app"}},[e._m(0),i("div",{staticClass:"main"},[i("transition",{attrs:{name:"fade",mode:"out-in",appear:""}},[i("router-view")],1)],1),i("div",{staticClass:"footer"},[e._v(" © "+e._s(e.year)+" "),i("a",{staticStyle:{color:"#ffffff"},attrs:{href:"http://webiswhatido.com",target:"_blank"}},[e._v("Brian Voelker")]),e._v(". Slim Select is under the MIT license. ")])])},o=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"header"},[i("div",{staticClass:"text"},[i("div",{staticClass:"logo"},[e._v(" Slim Select ")]),i("div",{staticClass:"tagline"},[e._v(" Slim advanced select dropdown ")])]),i("div",{staticClass:"select-nav"},[i("a",{attrs:{href:"https://github.com/brianvoe/slim-select",target:"_blank"}},[i("img",{attrs:{src:"images/github.png"}})]),i("a",{attrs:{href:"https://www.npmjs.com/package/slim-select",target:"_blank"}},[i("img",{attrs:{src:"images/npm.png"}})]),i("select",{attrs:{id:"select-nav"}})])])}],r=(i("caad"),i("ac1f"),i("2532"),i("5319"),i("ba4b")),c={data:function(){var e=this.$route.path;return{year:(new Date).getFullYear(),navData:[{text:"Home",value:"/",selected:"/"===e},{text:"Installation",value:"install",selected:"/install"===e},{text:"Select Types",value:"selects",selected:"/selects"===e},{text:"Options",value:"options",selected:"/options"===e},{text:"Methods",value:"methods",selected:"/methods"===e}]}},mounted:function(){var e=this;this.$route.query.p&&this.$router.push({path:this.$route.query.p});var t=new r["a"]({select:"#select-nav",showSearch:!1,onChange:function(t){e.$route.path.includes(t.value)||e.$router.push({path:t.value})}});t.setData(this.navData),this.$router.onReady((function(){var i=e.$route.path.replace("/","");""!==i&&t.setSelected(i)}))}},d=c,h=(i("517e"),i("2877")),u=Object(h["a"])(d,l,o,!1,null,null,null),f=u.exports,m=i("c197"),v=i.n(m),p=i("6f35"),g=i.n(p);i("e391"),i("7362"),i("dc22"),i("9d16");new g.a({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),n["a"].mixin({updated:function(){v.a.highlightAll()}}),new n["a"]({router:s,render:function(e){return e(f)}}).$mount("#app")},dc22:function(e,t,i){}});
|
|
2
|
-
//# sourceMappingURL=app.db13c724.js.map
|