@macallumharvey/first-test-wet 1.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/WetButton.d.ts +9 -0
- package/dist/WetModal.d.ts +6 -0
- package/dist/first-test-wet.cjs.development.js +26 -0
- package/dist/first-test-wet.cjs.development.js.map +1 -1
- package/dist/first-test-wet.cjs.production.min.js +1 -1
- package/dist/first-test-wet.cjs.production.min.js.map +1 -1
- package/dist/first-test-wet.esm.js +26 -1
- package/dist/first-test-wet.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/WetButton.tsx +19 -0
- package/src/WetModal.tsx +26 -0
- package/src/index.tsx +2 -2
- package/src/theme-wet-boew/assets/favicon-mobile.png +0 -0
- package/src/theme-wet-boew/assets/favicon.ico +0 -0
- package/src/theme-wet-boew/assets/logo.png +0 -0
- package/src/theme-wet-boew/assets/logo.svg +14 -0
- package/src/theme-wet-boew/css/ie8-theme.css +17370 -0
- package/src/theme-wet-boew/css/ie8-theme.min.css +193 -0
- package/src/theme-wet-boew/css/ie8-wet-boew.css +12 -0
- package/src/theme-wet-boew/css/ie8-wet-boew.min.css +7 -0
- package/src/theme-wet-boew/css/theme.css +11357 -0
- package/src/theme-wet-boew/css/theme.min.css +6 -0
- package/src/theme-wet-boew/css/wet-boew.css +12 -0
- package/src/theme-wet-boew/css/wet-boew.min.css +6 -0
- package/src/theme-wet-boew/payload.json +66 -0
- package/src/wet-boew/assets/cloud-popup-relative.png +0 -0
- package/src/wet-boew/assets/fd-slider-sprite.png +0 -0
- package/src/wet-boew/assets/loading.png +0 -0
- package/src/wet-boew/assets/mediacontrols.html +32 -0
- package/src/wet-boew/assets/sprites_share.png +0 -0
- package/src/wet-boew/assets/zoom-minus-mini.png +0 -0
- package/src/wet-boew/assets/zoom-plus-mini.png +0 -0
- package/src/wet-boew/assets/zoom-world-mini.png +0 -0
- package/src/wet-boew/css/noscript.css +112 -0
- package/src/wet-boew/css/noscript.min.css +6 -0
- package/src/wet-boew/css/polyfills/datalist.css +32 -0
- package/src/wet-boew/css/polyfills/datalist.min.css +1 -0
- package/src/wet-boew/css/polyfills/datepicker.css +47 -0
- package/src/wet-boew/css/polyfills/datepicker.min.css +1 -0
- package/src/wet-boew/css/polyfills/details.css +28 -0
- package/src/wet-boew/css/polyfills/details.min.css +1 -0
- package/src/wet-boew/css/polyfills/mathml.css +16 -0
- package/src/wet-boew/css/polyfills/mathml.min.css +1 -0
- package/src/wet-boew/css/polyfills/meter.css +24 -0
- package/src/wet-boew/css/polyfills/meter.min.css +1 -0
- package/src/wet-boew/css/polyfills/progress.css +8 -0
- package/src/wet-boew/css/polyfills/progress.min.css +1 -0
- package/src/wet-boew/css/polyfills/slider.css +229 -0
- package/src/wet-boew/css/polyfills/slider.min.css +1 -0
- package/src/wet-boew/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/wet-boew/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/wet-boew/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/wet-boew/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/wet-boew/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/wet-boew/js/MathJax/mml-chtml.js +1 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- package/src/wet-boew/js/deps/additional-methods.js +1512 -0
- package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
- package/src/wet-boew/js/deps/geomap-lib.js +3758 -0
- package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
- package/src/wet-boew/js/deps/jquery.dataTables.js +15345 -0
- package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
- package/src/wet-boew/js/deps/jquery.flot.canvas.js +345 -0
- package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
- package/src/wet-boew/js/deps/jquery.flot.js +3168 -0
- package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
- package/src/wet-boew/js/deps/jquery.flot.orderBars.js +282 -0
- package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
- package/src/wet-boew/js/deps/jquery.flot.pie.js +820 -0
- package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
- package/src/wet-boew/js/deps/jquery.magnific-popup.js +2061 -0
- package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
- package/src/wet-boew/js/deps/jquery.validate.js +1661 -0
- package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
- package/src/wet-boew/js/deps/json-patch.js +315 -0
- package/src/wet-boew/js/deps/json-patch.min.js +1 -0
- package/src/wet-boew/js/deps/jsonpointer.js +349 -0
- package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
- package/src/wet-boew/js/deps/lang-apollo.js +53 -0
- package/src/wet-boew/js/deps/lang-apollo.min.js +1 -0
- package/src/wet-boew/js/deps/lang-basic.js +49 -0
- package/src/wet-boew/js/deps/lang-basic.min.js +1 -0
- package/src/wet-boew/js/deps/lang-clj.js +64 -0
- package/src/wet-boew/js/deps/lang-clj.min.js +1 -0
- package/src/wet-boew/js/deps/lang-css.js +160 -0
- package/src/wet-boew/js/deps/lang-css.min.js +1 -0
- package/src/wet-boew/js/deps/lang-dart.js +92 -0
- package/src/wet-boew/js/deps/lang-dart.min.js +1 -0
- package/src/wet-boew/js/deps/lang-erlang.js +94 -0
- package/src/wet-boew/js/deps/lang-erlang.min.js +1 -0
- package/src/wet-boew/js/deps/lang-go.js +59 -0
- package/src/wet-boew/js/deps/lang-go.min.js +1 -0
- package/src/wet-boew/js/deps/lang-hs.js +102 -0
- package/src/wet-boew/js/deps/lang-hs.min.js +1 -0
- package/src/wet-boew/js/deps/lang-lasso.js +67 -0
- package/src/wet-boew/js/deps/lang-lasso.min.js +1 -0
- package/src/wet-boew/js/deps/lang-lisp.js +95 -0
- package/src/wet-boew/js/deps/lang-lisp.min.js +1 -0
- package/src/wet-boew/js/deps/lang-llvm.js +63 -0
- package/src/wet-boew/js/deps/lang-llvm.min.js +1 -0
- package/src/wet-boew/js/deps/lang-logtalk.js +50 -0
- package/src/wet-boew/js/deps/lang-logtalk.min.js +1 -0
- package/src/wet-boew/js/deps/lang-lua.js +60 -0
- package/src/wet-boew/js/deps/lang-lua.min.js +1 -0
- package/src/wet-boew/js/deps/lang-matlab.js +183 -0
- package/src/wet-boew/js/deps/lang-matlab.min.js +1 -0
- package/src/wet-boew/js/deps/lang-ml.js +57 -0
- package/src/wet-boew/js/deps/lang-ml.min.js +1 -0
- package/src/wet-boew/js/deps/lang-mumps.js +140 -0
- package/src/wet-boew/js/deps/lang-mumps.min.js +1 -0
- package/src/wet-boew/js/deps/lang-n.js +67 -0
- package/src/wet-boew/js/deps/lang-n.min.js +1 -0
- package/src/wet-boew/js/deps/lang-pascal.js +49 -0
- package/src/wet-boew/js/deps/lang-pascal.min.js +1 -0
- package/src/wet-boew/js/deps/lang-proto.js +37 -0
- package/src/wet-boew/js/deps/lang-proto.min.js +1 -0
- package/src/wet-boew/js/deps/lang-r.js +59 -0
- package/src/wet-boew/js/deps/lang-r.min.js +1 -0
- package/src/wet-boew/js/deps/lang-rd.js +50 -0
- package/src/wet-boew/js/deps/lang-rd.min.js +1 -0
- package/src/wet-boew/js/deps/lang-rust.js +81 -0
- package/src/wet-boew/js/deps/lang-rust.min.js +1 -0
- package/src/wet-boew/js/deps/lang-scala.js +56 -0
- package/src/wet-boew/js/deps/lang-scala.min.js +1 -0
- package/src/wet-boew/js/deps/lang-sql.js +59 -0
- package/src/wet-boew/js/deps/lang-sql.min.js +1 -0
- package/src/wet-boew/js/deps/lang-swift.js +60 -0
- package/src/wet-boew/js/deps/lang-swift.min.js +1 -0
- package/src/wet-boew/js/deps/lang-tcl.js +63 -0
- package/src/wet-boew/js/deps/lang-tcl.min.js +1 -0
- package/src/wet-boew/js/deps/lang-tex.js +49 -0
- package/src/wet-boew/js/deps/lang-tex.min.js +1 -0
- package/src/wet-boew/js/deps/lang-vb.js +67 -0
- package/src/wet-boew/js/deps/lang-vb.min.js +1 -0
- package/src/wet-boew/js/deps/lang-vhdl.js +51 -0
- package/src/wet-boew/js/deps/lang-vhdl.min.js +1 -0
- package/src/wet-boew/js/deps/lang-wiki.js +55 -0
- package/src/wet-boew/js/deps/lang-wiki.min.js +1 -0
- package/src/wet-boew/js/deps/lang-xq.js +71 -0
- package/src/wet-boew/js/deps/lang-xq.min.js +1 -0
- package/src/wet-boew/js/deps/lang-yaml.js +45 -0
- package/src/wet-boew/js/deps/lang-yaml.min.js +1 -0
- package/src/wet-boew/js/deps/ol.js +1008 -0
- package/src/wet-boew/js/deps/ol.min.js +1 -0
- package/src/wet-boew/js/deps/prettify.js +1742 -0
- package/src/wet-boew/js/deps/prettify.min.js +1 -0
- package/src/wet-boew/js/deps/proj4.js +3 -0
- package/src/wet-boew/js/deps/proj4.min.js +1 -0
- package/src/wet-boew/js/deps/run_prettify.js +1998 -0
- package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
- package/src/wet-boew/js/deps/tableparser.js +2216 -0
- package/src/wet-boew/js/deps/tableparser.min.js +1 -0
- package/src/wet-boew/js/deps/unorm.js +452 -0
- package/src/wet-boew/js/deps/unorm.min.js +1 -0
- package/src/wet-boew/js/i18n/af.js +246 -0
- package/src/wet-boew/js/i18n/af.min.js +7 -0
- package/src/wet-boew/js/i18n/ar.js +285 -0
- package/src/wet-boew/js/i18n/ar.min.js +7 -0
- package/src/wet-boew/js/i18n/bg.js +285 -0
- package/src/wet-boew/js/i18n/bg.min.js +7 -0
- package/src/wet-boew/js/i18n/cs.js +286 -0
- package/src/wet-boew/js/i18n/cs.min.js +7 -0
- package/src/wet-boew/js/i18n/de.js +355 -0
- package/src/wet-boew/js/i18n/de.min.js +7 -0
- package/src/wet-boew/js/i18n/el.js +285 -0
- package/src/wet-boew/js/i18n/el.min.js +7 -0
- package/src/wet-boew/js/i18n/en.js +246 -0
- package/src/wet-boew/js/i18n/en.min.js +7 -0
- package/src/wet-boew/js/i18n/es.js +288 -0
- package/src/wet-boew/js/i18n/es.min.js +7 -0
- package/src/wet-boew/js/i18n/et.js +283 -0
- package/src/wet-boew/js/i18n/et.min.js +7 -0
- package/src/wet-boew/js/i18n/fr.js +314 -0
- package/src/wet-boew/js/i18n/fr.min.js +7 -0
- package/src/wet-boew/js/i18n/hi.js +246 -0
- package/src/wet-boew/js/i18n/hi.min.js +7 -0
- package/src/wet-boew/js/i18n/hu.js +285 -0
- package/src/wet-boew/js/i18n/hu.min.js +7 -0
- package/src/wet-boew/js/i18n/hy.js +246 -0
- package/src/wet-boew/js/i18n/hy.min.js +7 -0
- package/src/wet-boew/js/i18n/id.js +284 -0
- package/src/wet-boew/js/i18n/id.min.js +7 -0
- package/src/wet-boew/js/i18n/is.js +283 -0
- package/src/wet-boew/js/i18n/is.min.js +7 -0
- package/src/wet-boew/js/i18n/it.js +312 -0
- package/src/wet-boew/js/i18n/it.min.js +7 -0
- package/src/wet-boew/js/i18n/iu.js +246 -0
- package/src/wet-boew/js/i18n/iu.min.js +7 -0
- package/src/wet-boew/js/i18n/ja.js +286 -0
- package/src/wet-boew/js/i18n/ja.min.js +7 -0
- package/src/wet-boew/js/i18n/ko.js +285 -0
- package/src/wet-boew/js/i18n/ko.min.js +7 -0
- package/src/wet-boew/js/i18n/lt.js +285 -0
- package/src/wet-boew/js/i18n/lt.min.js +7 -0
- package/src/wet-boew/js/i18n/lv.js +285 -0
- package/src/wet-boew/js/i18n/lv.min.js +7 -0
- package/src/wet-boew/js/i18n/nl.js +319 -0
- package/src/wet-boew/js/i18n/nl.min.js +7 -0
- package/src/wet-boew/js/i18n/pl.js +288 -0
- package/src/wet-boew/js/i18n/pl.min.js +7 -0
- package/src/wet-boew/js/i18n/pt-BR.js +246 -0
- package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
- package/src/wet-boew/js/i18n/pt.js +271 -0
- package/src/wet-boew/js/i18n/pt.min.js +7 -0
- package/src/wet-boew/js/i18n/ru.js +285 -0
- package/src/wet-boew/js/i18n/ru.min.js +7 -0
- package/src/wet-boew/js/i18n/sk.js +283 -0
- package/src/wet-boew/js/i18n/sk.min.js +7 -0
- package/src/wet-boew/js/i18n/sq.js +246 -0
- package/src/wet-boew/js/i18n/sq.min.js +7 -0
- package/src/wet-boew/js/i18n/th.js +285 -0
- package/src/wet-boew/js/i18n/th.min.js +7 -0
- package/src/wet-boew/js/i18n/tr.js +287 -0
- package/src/wet-boew/js/i18n/tr.min.js +7 -0
- package/src/wet-boew/js/i18n/uk.js +285 -0
- package/src/wet-boew/js/i18n/uk.min.js +7 -0
- package/src/wet-boew/js/i18n/vi.js +285 -0
- package/src/wet-boew/js/i18n/vi.min.js +7 -0
- package/src/wet-boew/js/i18n/zh-Hans.js +246 -0
- package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
- package/src/wet-boew/js/i18n/zh.js +286 -0
- package/src/wet-boew/js/i18n/zh.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew.js +3992 -0
- package/src/wet-boew/js/ie8-wet-boew.min.js +7 -0
- package/src/wet-boew/js/ie8-wet-boew2.js +15294 -0
- package/src/wet-boew/js/ie8-wet-boew2.min.js +7 -0
- package/src/wet-boew/js/jquery/2.2.4/jquery.js +9814 -0
- package/src/wet-boew/js/jquery/2.2.4/jquery.min.js +4 -0
- package/src/wet-boew/js/jquery/2.2.4/jquery.min.map +1 -0
- package/src/wet-boew/js/polyfills/datalist.js +423 -0
- package/src/wet-boew/js/polyfills/datalist.min.js +8 -0
- package/src/wet-boew/js/polyfills/datalist.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/datalist_dynamic.js +50 -0
- package/src/wet-boew/js/polyfills/datalist_dynamic.min.js +8 -0
- package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/datepicker.js +338 -0
- package/src/wet-boew/js/polyfills/datepicker.min.js +8 -0
- package/src/wet-boew/js/polyfills/datepicker.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/details.js +126 -0
- package/src/wet-boew/js/polyfills/details.min.js +8 -0
- package/src/wet-boew/js/polyfills/details.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/jawsariafixes.js +47 -0
- package/src/wet-boew/js/polyfills/jawsariafixes.min.js +16 -0
- package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/meter.js +140 -0
- package/src/wet-boew/js/polyfills/meter.min.js +8 -0
- package/src/wet-boew/js/polyfills/meter.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/mobile.js +783 -0
- package/src/wet-boew/js/polyfills/mobile.min.js +8 -0
- package/src/wet-boew/js/polyfills/mobile.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/progress.js +107 -0
- package/src/wet-boew/js/polyfills/progress.min.js +8 -0
- package/src/wet-boew/js/polyfills/progress.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/slider.js +1343 -0
- package/src/wet-boew/js/polyfills/slider.min.js +9 -0
- package/src/wet-boew/js/polyfills/slider.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/slider_wrapper.js +73 -0
- package/src/wet-boew/js/polyfills/slider_wrapper.min.js +8 -0
- package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/svg.js +29 -0
- package/src/wet-boew/js/polyfills/svg.min.js +8 -0
- package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
- package/src/wet-boew/js/polyfills/test.js +603 -0
- package/src/wet-boew/js/polyfills/test.min.js +8 -0
- package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
- package/src/wet-boew/js/wet-boew.js +17714 -0
- package/src/wet-boew/js/wet-boew.min.js +9 -0
- package/src/wet-boew/js/wet-boew.min.js.map +1 -0
- package/src/wet-boew/payload.json +1722 -0
@@ -0,0 +1,423 @@
|
|
1
|
+
/**
|
2
|
+
* @title WET-BOEW Datalist polyfill
|
3
|
+
* @overview Adds auto-complete functionality to specific text input fields by dynamically displaying a list of words that match the user's input.
|
4
|
+
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
5
|
+
* @author @pjackson28
|
6
|
+
*/
|
7
|
+
( function( $, window, document, wb ) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
/*
|
11
|
+
* Variable and function definitions.
|
12
|
+
* These are global to the polyfill - meaning that they will be initialized once per page.
|
13
|
+
*/
|
14
|
+
var componentName = "wb-datalist",
|
15
|
+
selector = "input[list]",
|
16
|
+
initEvent = "wb-init." + componentName,
|
17
|
+
updateEvent = "wb-update." + componentName,
|
18
|
+
setFocusEvent = "setfocus.wb",
|
19
|
+
initialized = false,
|
20
|
+
$document = wb.doc,
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @method init
|
24
|
+
* @param {jQuery Event} event Event that triggered the function call
|
25
|
+
*/
|
26
|
+
init = function( event ) {
|
27
|
+
|
28
|
+
// Start initialization
|
29
|
+
// returns DOM object = proceed with init
|
30
|
+
// returns undefined = do not proceed with init (e.g., already initialized)
|
31
|
+
var input = wb.init( event, componentName, selector );
|
32
|
+
|
33
|
+
if ( input ) {
|
34
|
+
|
35
|
+
// Adds WAI-ARIA
|
36
|
+
input.setAttribute( "autocomplete", "off" );
|
37
|
+
input.setAttribute( "role", "textbox" );
|
38
|
+
input.setAttribute( "aria-haspopup", "true" );
|
39
|
+
input.setAttribute( "aria-autocomplete", "list" );
|
40
|
+
input.setAttribute( "aria-owns", "wb-al-" + input.id );
|
41
|
+
input.setAttribute( "aria-activedescendent", "" );
|
42
|
+
|
43
|
+
populateOptions( input );
|
44
|
+
|
45
|
+
// Identify that initialization has completed
|
46
|
+
wb.ready( $( input ), componentName );
|
47
|
+
initialized = true;
|
48
|
+
}
|
49
|
+
},
|
50
|
+
|
51
|
+
populateOptions = function( input ) {
|
52
|
+
var $input = $( input ),
|
53
|
+
autolist = "<div class='wb-al-cnt'><ul role='listbox' id='wb-al-" + input.id + "' class='wb-al hide' aria-hidden='true' aria-live='polite'></ul>",
|
54
|
+
datalist = document.getElementById( input.getAttribute( "list" ) ),
|
55
|
+
options = datalist.getElementsByTagName( "option" ),
|
56
|
+
len = options.length,
|
57
|
+
option, value, label, i;
|
58
|
+
|
59
|
+
autolist += "<ul class='wb-al-src hide' aria-hidden='true'>";
|
60
|
+
for ( i = 0; i !== len; i += 1 ) {
|
61
|
+
option = options[ i ];
|
62
|
+
value = option.getAttribute( "value" );
|
63
|
+
label = option.getAttribute( "label" );
|
64
|
+
if ( !value ) {
|
65
|
+
value = option.innerHTML;
|
66
|
+
}
|
67
|
+
autolist += "<li id='al-opt-" + input.id + "-" + i +
|
68
|
+
"'><a href='javascript:;' tabindex='-1'><span class='al-val'>" +
|
69
|
+
( !value ? "" : value ) + "</span><span class='al-lbl'>" +
|
70
|
+
( !label || label === value ? "" : label ) + "</span></a></li>";
|
71
|
+
}
|
72
|
+
$input.after( autolist + "</ul></div>" );
|
73
|
+
},
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Shows/hides the available options based upon the input in the polyfilled input field.
|
77
|
+
* @method showOptions
|
78
|
+
* @param {DOM element} input The polyfilled input field
|
79
|
+
*/
|
80
|
+
showOptions = function( input, value ) {
|
81
|
+
var $autolist = $( input.nextSibling.firstChild ),
|
82
|
+
$options = $autolist.next().children().clone(),
|
83
|
+
comparator;
|
84
|
+
|
85
|
+
if ( value && value.length !== 0 ) {
|
86
|
+
comparator = value.toLowerCase();
|
87
|
+
$options = $options.filter( function() {
|
88
|
+
var $this = $( this ),
|
89
|
+
value = $this.find( "span.al-val" ).html();
|
90
|
+
if ( value.length === 0 ) {
|
91
|
+
value = $this.find( "span.al-lbl" ).html();
|
92
|
+
}
|
93
|
+
return ( comparator.length === 0 || value.toLowerCase().indexOf( comparator ) === 0 );
|
94
|
+
} );
|
95
|
+
}
|
96
|
+
|
97
|
+
// Add the visible options to the autolist
|
98
|
+
$autolist.empty().append( $options );
|
99
|
+
|
100
|
+
if ( $options.length !== 0 ) {
|
101
|
+
correctWidth( input );
|
102
|
+
$autolist.removeClass( "hide" ).attr( "aria-hidden", "false" );
|
103
|
+
input.setAttribute( "aria-expanded", "true" );
|
104
|
+
} else {
|
105
|
+
$autolist.addClass( "hide" ).attr( "aria-hidden", "true" );
|
106
|
+
input.setAttribute( "aria-expanded", "false" );
|
107
|
+
}
|
108
|
+
},
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Hides all the options
|
112
|
+
* @method closeOptions
|
113
|
+
* @param {DOM element} input The polyfilled input field
|
114
|
+
*/
|
115
|
+
closeOptions = function( input ) {
|
116
|
+
var autolist = input.nextSibling.firstChild;
|
117
|
+
|
118
|
+
autolist.className += " hide";
|
119
|
+
autolist.innerHTML = "";
|
120
|
+
autolist.setAttribute( "aria-hidden", "true" );
|
121
|
+
input.setAttribute( "aria-expanded", "false" );
|
122
|
+
input.setAttribute( "aria-activedescendent", "" );
|
123
|
+
},
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Corrects the width of the autolist for the polyfilled input field
|
127
|
+
* @method correctWidth
|
128
|
+
* @param {DOM element} input The polyfilled input field
|
129
|
+
*/
|
130
|
+
correctWidth = function( input ) {
|
131
|
+
var $elm = $( input ),
|
132
|
+
$autolist = $( input.nextSibling.firstChild );
|
133
|
+
|
134
|
+
$autolist.css( {
|
135
|
+
width: $elm.outerWidth(),
|
136
|
+
left: $elm.position().left
|
137
|
+
} );
|
138
|
+
},
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Keyboard event handler for the polyfilled input field
|
142
|
+
* @method correctWidth
|
143
|
+
* @param {integer} which Value for event.which
|
144
|
+
* @param {jQuery Event} event The event that triggered this method call
|
145
|
+
*/
|
146
|
+
keyboardHandlerInput = function( which, event ) {
|
147
|
+
var input = event.target,
|
148
|
+
autolist = input.nextSibling.firstChild,
|
149
|
+
autolistHidden = ( autolist.className.indexOf( "hide" ) !== -1 ),
|
150
|
+
options, dest, value, len;
|
151
|
+
|
152
|
+
// Unmodified keystrokes only
|
153
|
+
if ( !( event.ctrlKey || event.altKey || event.metaKey ) ) {
|
154
|
+
|
155
|
+
// Spacebar, a - z keys, 0 - 9 keys punctuation, and symbols
|
156
|
+
if ( which === 32 || ( which > 47 && which < 91 ) ||
|
157
|
+
( which > 95 && which < 112 ) || ( which > 159 && which < 177 ) ||
|
158
|
+
( which > 187 && which < 223 ) ) {
|
159
|
+
if ( !event.altKey ) {
|
160
|
+
showOptions( input, input.value + String.fromCharCode( which ) );
|
161
|
+
}
|
162
|
+
|
163
|
+
// Backspace
|
164
|
+
} else if ( which === 8 && !event.altKey ) {
|
165
|
+
value = input.value;
|
166
|
+
len = value.length;
|
167
|
+
|
168
|
+
if ( len !== 0 ) {
|
169
|
+
showOptions( input, value.substring( 0, len - 1 ) );
|
170
|
+
}
|
171
|
+
|
172
|
+
// Up / down arrow
|
173
|
+
} else if ( ( which === 38 || which === 40 ) && input.getAttribute( "aria-activedescendent" ) === "" ) {
|
174
|
+
if ( autolistHidden ) {
|
175
|
+
showOptions( input );
|
176
|
+
}
|
177
|
+
|
178
|
+
options = autolist.getElementsByTagName( "a" );
|
179
|
+
dest = options[ ( which === 38 ? options.length - 1 : 0 ) ];
|
180
|
+
|
181
|
+
input.setAttribute( "aria-activedescendent", dest.parentNode.getAttribute( "id" ) );
|
182
|
+
|
183
|
+
// Assign focus to dest
|
184
|
+
$( dest ).trigger( setFocusEvent );
|
185
|
+
|
186
|
+
return false;
|
187
|
+
} else if ( !autolistHidden ) {
|
188
|
+
|
189
|
+
// Tab or Escape key
|
190
|
+
if ( ( which === 9 || which === 27 ) || ( which === 27 && !event.altKey ) ) {
|
191
|
+
closeOptions( input );
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
},
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Keyboard event handler for the autolist of the polyfilled input field
|
199
|
+
* @method correctWidth
|
200
|
+
* @param {integer} which Value for event.which
|
201
|
+
* @param {DOM element} link Link element that is the target of the event
|
202
|
+
*/
|
203
|
+
keyboardHandlerAutolist = function( which, link ) {
|
204
|
+
var autolist = link.parentNode.parentNode,
|
205
|
+
input = autolist.parentNode.previousSibling,
|
206
|
+
$input = $( input ),
|
207
|
+
span, dest, value, len, children;
|
208
|
+
|
209
|
+
// Unmodified keystrokes only
|
210
|
+
if ( !( event.ctrlKey || event.altKey || event.metaKey ) ) {
|
211
|
+
|
212
|
+
// Spacebar, a - z keys, 0 - 9 keys punctuation, and symbols
|
213
|
+
if ( which === 32 || ( which > 47 && which < 91 ) ||
|
214
|
+
( which > 95 && which < 112 ) || ( which > 159 && which < 177 ) ||
|
215
|
+
( which > 187 && which < 223 ) ) {
|
216
|
+
|
217
|
+
input.value += String.fromCharCode( which );
|
218
|
+
$input.trigger( setFocusEvent );
|
219
|
+
showOptions( input, input.value );
|
220
|
+
|
221
|
+
return false;
|
222
|
+
|
223
|
+
// Backspace
|
224
|
+
} else if ( which === 8 ) {
|
225
|
+
value = input.value;
|
226
|
+
len = value.length;
|
227
|
+
|
228
|
+
if ( len !== 0 ) {
|
229
|
+
input.value = value.substring( 0, len - 1 );
|
230
|
+
showOptions( input, input.value );
|
231
|
+
}
|
232
|
+
|
233
|
+
$input.trigger( setFocusEvent );
|
234
|
+
|
235
|
+
return false;
|
236
|
+
|
237
|
+
// Enter key
|
238
|
+
} else if ( which === 13 ) {
|
239
|
+
span = link.getElementsByTagName( "span" );
|
240
|
+
|
241
|
+
// .al-val
|
242
|
+
value = span[ 0 ].innerHTML;
|
243
|
+
|
244
|
+
if ( value.length === 0 ) {
|
245
|
+
|
246
|
+
// .al-lbl
|
247
|
+
value = span[ 1 ].innerHTML;
|
248
|
+
}
|
249
|
+
|
250
|
+
input.value = value;
|
251
|
+
$input.trigger( setFocusEvent );
|
252
|
+
closeOptions( input );
|
253
|
+
|
254
|
+
return false;
|
255
|
+
|
256
|
+
// Tab or Escape key
|
257
|
+
} else if ( which === 9 || which === 27 ) {
|
258
|
+
$input.trigger( setFocusEvent );
|
259
|
+
closeOptions( input );
|
260
|
+
|
261
|
+
return false;
|
262
|
+
|
263
|
+
// Up or down arrow
|
264
|
+
} else if ( which === 38 || which === 40 ) {
|
265
|
+
|
266
|
+
// Up arrow
|
267
|
+
if ( which === 38 ) {
|
268
|
+
dest = link.parentNode.previousSibling;
|
269
|
+
if ( !dest ) {
|
270
|
+
children = autolist.getElementsByTagName( "li" );
|
271
|
+
dest = children[ children.length - 1 ];
|
272
|
+
}
|
273
|
+
|
274
|
+
// Down arrow
|
275
|
+
} else {
|
276
|
+
dest = link.parentNode.nextSibling;
|
277
|
+
if ( !dest ) {
|
278
|
+
dest = autolist.getElementsByTagName( "li" )[ 0 ];
|
279
|
+
}
|
280
|
+
}
|
281
|
+
dest = dest.getElementsByTagName( "a" )[ 0 ];
|
282
|
+
|
283
|
+
input.setAttribute( "aria-activedescendent", dest.parentNode.getAttribute( "id" ) );
|
284
|
+
$( dest ).trigger( setFocusEvent );
|
285
|
+
|
286
|
+
return false;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
},
|
290
|
+
|
291
|
+
/**
|
292
|
+
* Click / Touch event handler for the autolist of the polyfilled input field
|
293
|
+
* @method correctWidth
|
294
|
+
* @param {integer} eventTarget Value for event.target
|
295
|
+
*/
|
296
|
+
clickHandlerAutolist = function( eventTarget ) {
|
297
|
+
var nodeName = eventTarget.nodeName.toLowerCase(),
|
298
|
+
link = nodeName === "a" ? eventTarget : eventTarget.parentNode,
|
299
|
+
autolist = link.parentNode.parentNode,
|
300
|
+
input = autolist.parentNode.previousSibling,
|
301
|
+
$input = $( input ),
|
302
|
+
span = link.getElementsByTagName( "span" ),
|
303
|
+
|
304
|
+
// .al-val
|
305
|
+
value = span[ 0 ].innerHTML;
|
306
|
+
|
307
|
+
if ( value.length === 0 ) {
|
308
|
+
|
309
|
+
// .al-lbl
|
310
|
+
value = span[ 1 ].innerHTML;
|
311
|
+
}
|
312
|
+
|
313
|
+
input.value = value;
|
314
|
+
$input.trigger( setFocusEvent );
|
315
|
+
closeOptions( input );
|
316
|
+
|
317
|
+
return false;
|
318
|
+
};
|
319
|
+
|
320
|
+
// Bind the init event of the plugin
|
321
|
+
$document.on( "timerpoke.wb " + initEvent + " " + updateEvent + " keydown click vclick touchstart", selector, function( event ) {
|
322
|
+
var input = event.target,
|
323
|
+
eventType = event.type,
|
324
|
+
which = event.which,
|
325
|
+
autolist;
|
326
|
+
|
327
|
+
switch ( eventType ) {
|
328
|
+
case "timerpoke":
|
329
|
+
case "wb-init":
|
330
|
+
init( event );
|
331
|
+
break;
|
332
|
+
|
333
|
+
case "wb-update":
|
334
|
+
if ( event.namespace === componentName ) {
|
335
|
+
populateOptions( event.target );
|
336
|
+
}
|
337
|
+
break;
|
338
|
+
|
339
|
+
case "keydown":
|
340
|
+
if ( !( event.ctrlKey || event.metaKey ) ) {
|
341
|
+
return keyboardHandlerInput( which, event );
|
342
|
+
}
|
343
|
+
break;
|
344
|
+
|
345
|
+
case "click":
|
346
|
+
case "vclick":
|
347
|
+
case "touchstart":
|
348
|
+
|
349
|
+
if ( initialized ) {
|
350
|
+
|
351
|
+
// Ignore middle/right mouse buttons
|
352
|
+
if ( !which || which === 1 ) {
|
353
|
+
autolist = input.nextSibling.firstChild;
|
354
|
+
if ( autolist.className.indexOf( "hide" ) === -1 ) {
|
355
|
+
closeOptions( input );
|
356
|
+
} else {
|
357
|
+
showOptions( input, input.value );
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
363
|
+
/*
|
364
|
+
* Since we are working with events we want to ensure that we are being passive about our control,
|
365
|
+
* so returning true allows for events to always continue
|
366
|
+
*/
|
367
|
+
return true;
|
368
|
+
} );
|
369
|
+
|
370
|
+
$document.on( "keydown click vclick touchstart", ".wb-al a, .wb-al span", function( event ) {
|
371
|
+
var link = event.target,
|
372
|
+
eventType = event.type,
|
373
|
+
which = event.which;
|
374
|
+
|
375
|
+
switch ( eventType ) {
|
376
|
+
case "keydown":
|
377
|
+
if ( !( event.ctrlKey || event.metaKey ) ) {
|
378
|
+
return keyboardHandlerAutolist( which, link );
|
379
|
+
}
|
380
|
+
break;
|
381
|
+
case "click":
|
382
|
+
case "vclick":
|
383
|
+
case "touchstart":
|
384
|
+
|
385
|
+
// Ignore middle/right mouse buttons
|
386
|
+
if ( !which || which === 1 ) {
|
387
|
+
return clickHandlerAutolist( link );
|
388
|
+
}
|
389
|
+
break;
|
390
|
+
}
|
391
|
+
} );
|
392
|
+
|
393
|
+
// Handle focus and resize events
|
394
|
+
$document.on( "focusin txt-rsz.wb win-rsz-width.wb win-rsz-height.wb", function( event ) {
|
395
|
+
var focusEvent = ( event.type === "focusin" ),
|
396
|
+
eventTarget = event.target,
|
397
|
+
inputs, input, autolistContainer, i, len;
|
398
|
+
|
399
|
+
// Only correct width if the polyfill has been initialized
|
400
|
+
if ( initialized ) {
|
401
|
+
inputs = $document.find( selector ).get();
|
402
|
+
len = inputs.length;
|
403
|
+
for ( i = 0; i !== len; i += 1 ) {
|
404
|
+
input = inputs[ i ];
|
405
|
+
if ( focusEvent ) {
|
406
|
+
autolistContainer = input.nextElementSibling || $( input ).next().get( 0 );
|
407
|
+
if ( autolistContainer.firstChild.className.indexOf( "hide" ) === -1 &&
|
408
|
+
eventTarget !== autolistContainer &&
|
409
|
+
!$.contains( autolistContainer, eventTarget ) ) {
|
410
|
+
|
411
|
+
closeOptions( input );
|
412
|
+
}
|
413
|
+
} else {
|
414
|
+
correctWidth( input );
|
415
|
+
}
|
416
|
+
}
|
417
|
+
}
|
418
|
+
} );
|
419
|
+
|
420
|
+
// Add the timer poke to initialize the plugin
|
421
|
+
wb.add( selector );
|
422
|
+
|
423
|
+
} )( jQuery, window, document, wb );
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
|
3
|
+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
4
|
+
* v4.0.53 - 2022-09-29
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
!function(c,u,n){"use strict";function d(e,t){var a,i=c(e.nextSibling.firstChild),n=i.next().children().clone();t&&0!==t.length&&(a=t.toLowerCase(),n=n.filter(function(){var e=c(this),t=e.find("span.al-val").html();return 0===t.length&&(t=e.find("span.al-lbl").html()),0===a.length||0===t.toLowerCase().indexOf(a)})),i.empty().append(n),0!==n.length?(p(e),i.removeClass("hide").attr("aria-hidden","false"),e.setAttribute("aria-expanded","true")):(i.addClass("hide").attr("aria-hidden","true"),e.setAttribute("aria-expanded","false"))}function o(e){var t=e.nextSibling.firstChild;t.className+=" hide",t.innerHTML="",t.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-activedescendent","")}var r="wb-datalist",g="input[list]",b="setfocus.wb",h=!1,f=n.doc,l=function(e){var t,a,i,n,r=c(e),l="<div class='wb-al-cnt'><ul role='listbox' id='wb-al-"+e.id+"' class='wb-al hide' aria-hidden='true' aria-live='polite'></ul>",s=u.getElementById(e.getAttribute("list")).getElementsByTagName("option"),d=s.length;for(l+="<ul class='wb-al-src hide' aria-hidden='true'>",n=0;n!==d;n+=1)a=(t=s[n]).getAttribute("value"),i=t.getAttribute("label"),a=a||t.innerHTML,l+="<li id='al-opt-"+e.id+"-"+n+"'><a href='javascript:;' tabindex='-1'><span class='al-val'>"+(a||"")+"</span><span class='al-lbl'>"+(i&&i!==a?i:"")+"</span></a></li>";r.after(l+"</ul></div>")},p=function(e){var t=c(e);c(e.nextSibling.firstChild).css({width:t.outerWidth(),left:t.position().left})};f.on("timerpoke.wb wb-init.wb-datalist wb-update.wb-datalist keydown click vclick touchstart",g,function(e){var t=e.target,a=e.type,i=e.which;switch(a){case"timerpoke":case"wb-init":!function(e){e=n.init(e,r,g);e&&(e.setAttribute("autocomplete","off"),e.setAttribute("role","textbox"),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-owns","wb-al-"+e.id),e.setAttribute("aria-activedescendent",""),l(e),n.ready(c(e),r),h=!0)}(e);break;case"wb-update":e.namespace===r&&l(e.target);break;case"keydown":if(!e.ctrlKey&&!e.metaKey)return function(e,t){var a=t.target,i=a.nextSibling.firstChild,n=-1!==i.className.indexOf("hide");if(!(t.ctrlKey||t.altKey||t.metaKey))if(32===e||47<e&&e<91||95<e&&e<112||159<e&&e<177||187<e&&e<223)t.altKey||d(a,a.value+String.fromCharCode(e));else if(8!==e||t.altKey){if((38===e||40===e)&&""===a.getAttribute("aria-activedescendent"))return n&&d(a),i=(i=i.getElementsByTagName("a"))[38===e?i.length-1:0],a.setAttribute("aria-activedescendent",i.parentNode.getAttribute("id")),c(i).trigger(b),!1;n||9!==e&&27!==e&&(27!==e||t.altKey)||o(a)}else 0!==(t=(e=a.value).length)&&d(a,e.substring(0,t-1))}(i,e);break;case"click":case"vclick":case"touchstart":h&&(i&&1!==i||(-1===t.nextSibling.firstChild.className.indexOf("hide")?o(t):d(t,t.value)))}return!0}),f.on("keydown click vclick touchstart",".wb-al a, .wb-al span",function(e){var t,a,i,n,r=e.target,l=e.type,s=e.which;switch(l){case"keydown":if(!e.ctrlKey&&!e.metaKey)return function(e,t){var a,i,n,r=t.parentNode.parentNode,l=r.parentNode.previousSibling,s=c(l);if(!(event.ctrlKey||event.altKey||event.metaKey))return 32===e||47<e&&e<91||95<e&&e<112||159<e&&e<177||187<e&&e<223?(l.value+=String.fromCharCode(e),s.trigger(b),d(l,l.value),!1):8===e?(0!==(n=(i=l.value).length)&&(l.value=i.substring(0,n-1),d(l,l.value)),s.trigger(b),!1):13===e?(0===(i=(n=t.getElementsByTagName("span"))[0].innerHTML).length&&(i=n[1].innerHTML),l.value=i,s.trigger(b),o(l),!1):9===e||27===e?(s.trigger(b),o(l),!1):38===e||40===e?(a=(a=38===e?(a=t.parentNode.previousSibling)||(e=r.getElementsByTagName("li"))[e.length-1]:(a=t.parentNode.nextSibling)||r.getElementsByTagName("li")[0]).getElementsByTagName("a")[0],l.setAttribute("aria-activedescendent",a.parentNode.getAttribute("id")),c(a).trigger(b),!1):void 0}(s,r);break;case"click":case"vclick":case"touchstart":if(!s||1===s)return a="a"===(t=r).nodeName.toLowerCase()?t:t.parentNode,i=a.parentNode.parentNode.parentNode.previousSibling,n=c(i),0===(a=(t=a.getElementsByTagName("span"))[0].innerHTML).length&&(a=t[1].innerHTML),i.value=a,n.trigger(b),o(i),!1}}),f.on("focusin txt-rsz.wb win-rsz-width.wb win-rsz-height.wb",function(e){var t,a,i,n,r,l="focusin"===e.type,s=e.target;if(h)for(r=(t=f.find(g).get()).length,n=0;n!==r;n+=1)a=t[n],l?-1!==(i=a.nextElementSibling||c(a).next().get(0)).firstChild.className.indexOf("hide")||s===i||c.contains(i,s)||o(a):p(a)}),n.add(g)}(jQuery,(window,document),wb);
|
8
|
+
//# sourceMappingURL=datalist.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datalist.min.js","sources":["datalist.js"],"names":["$","document","wb","showOptions","input","value","comparator","$autolist","nextSibling","firstChild","$options","next","children","clone","length","toLowerCase","filter","$this","this","find","html","indexOf","empty","append","correctWidth","removeClass","attr","setAttribute","addClass","closeOptions","autolist","className","innerHTML","componentName","selector","setFocusEvent","initialized","$document","doc","populateOptions","option","label","i","$input","id","options","getElementById","getAttribute","getElementsByTagName","len","after","$elm","css","width","outerWidth","left","position","on","event","target","eventType","type","which","init","ready","namespace","ctrlKey","metaKey","autolistHidden","altKey","String","fromCharCode","dest","parentNode","trigger","substring","keyboardHandlerInput","eventTarget","link","previousSibling","span","keyboardHandlerAutolist","nodeName","inputs","autolistContainer","focusEvent","get","nextElementSibling","contains","add","jQuery","window"],"mappings":";;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AAGI,GAMS,KAFrBC,GAHA2E,EAAOF,EAAK9B,qBAAsB,SAGpB,GAAIhB,WAERlB,SAGVT,EAAQ2E,EAAM,GAAIhD,WAGnB5B,EAAMC,MAAQA,EACdsC,EAAO+B,QAASvC,GAChBN,EAAczB,IAEP,KA6ETiC,EAAUoB,GAAI,wDAAyD,SAAUC,GAChF,IAECyB,EAAQ/E,EAAOgF,EAAmB1C,EAAGO,EAFlCoC,EAA8B,YAAf3B,EAAMG,KACxBgB,EAAcnB,EAAMC,OAIrB,GAAKvB,EAGJ,IADAa,GADAkC,EAAS9C,EAAUlB,KAAMe,GAAWoD,OACvBxE,OACP4B,EAAI,EAAGA,IAAMO,EAAKP,GAAK,EAC5BtC,EAAQ+E,EAAQzC,GACX2C,GAE+D,KADnED,EAAoBhF,EAAMmF,oBAAsBvF,EAAGI,GAAQO,OAAO2E,IAAK,IAChD7E,WAAWsB,UAAUV,QAAS,SACpDwD,IAAgBO,GACfpF,EAAEwF,SAAUJ,EAAmBP,IAEhChD,EAAczB,GAGfoB,EAAcpB,KAOlBF,EAAGuF,IAAKvD,GA9ZR,CAgaKwD,QAAQC,OAAQ1F,UAAUC"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/*
|
2
|
+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
|
3
|
+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
4
|
+
*/
|
5
|
+
( function( $, wb ) {
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
var $document = wb.doc,
|
9
|
+
pluginSelector = "#plugin",
|
10
|
+
issueInput = $( "#issue" );
|
11
|
+
|
12
|
+
$document.on( "change", pluginSelector, function( event ) {
|
13
|
+
var componentName = event.target.value;
|
14
|
+
|
15
|
+
$( this ).trigger( {
|
16
|
+
type: "ajax-fetch.wb",
|
17
|
+
fetch: {
|
18
|
+
url: encodeURI( "https://api.github.com/repos/wet-boew/wet-boew/issues?labels=Feature: " + componentName ),
|
19
|
+
dataType: "json"
|
20
|
+
}
|
21
|
+
} );
|
22
|
+
|
23
|
+
issueInput.get( 0 ).value = "";
|
24
|
+
} );
|
25
|
+
|
26
|
+
$document.on( "ajax-fetched.wb", pluginSelector, function( event ) {
|
27
|
+
var dataList = $( "#" + issueInput.attr( "list" ) ),
|
28
|
+
issues = wb.ielt10 ? event.fetch.response.data : event.fetch.response,
|
29
|
+
lenIssues = issues.length,
|
30
|
+
options = "",
|
31
|
+
indIssue, issue;
|
32
|
+
|
33
|
+
dataList.empty();
|
34
|
+
|
35
|
+
for ( indIssue = 0; indIssue !== lenIssues; indIssue += 1 ) {
|
36
|
+
issue = issues[ indIssue ];
|
37
|
+
|
38
|
+
options += "<option label=\"" + issue.title + "\" value=\"" + issue.title + "\"></option>";
|
39
|
+
}
|
40
|
+
|
41
|
+
if ( wb.ielt10 ) {
|
42
|
+
options = "<select>" + options + "</select>";
|
43
|
+
}
|
44
|
+
|
45
|
+
dataList.append( options );
|
46
|
+
|
47
|
+
issueInput.trigger( "wb-update.wb-datalist" );
|
48
|
+
} );
|
49
|
+
|
50
|
+
} )( jQuery, wb );
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
|
3
|
+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
4
|
+
* v4.0.53 - 2022-09-29
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
!function(n,r){"use strict";var e=r.doc,t="#plugin",c=n("#issue");e.on("change",t,function(e){e=e.target.value;n(this).trigger({type:"ajax-fetch.wb",fetch:{url:encodeURI("https://api.github.com/repos/wet-boew/wet-boew/issues?labels=Feature: "+e),dataType:"json"}}),c.get(0).value=""}),e.on("ajax-fetched.wb",t,function(e){var t,a,i=n("#"+c.attr("list")),s=r.ielt10?e.fetch.response.data:e.fetch.response,o=s.length,l="";for(i.empty(),t=0;t!==o;t+=1)l+='<option label="'+(a=s[t]).title+'" value="'+a.title+'"></option>';r.ielt10&&(l="<select>"+l+"</select>"),i.append(l),c.trigger("wb-update.wb-datalist")})}(jQuery,wb);
|
8
|
+
//# sourceMappingURL=datalist_dynamic.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datalist_dynamic.min.js","sources":["datalist_dynamic.js"],"names":["$","wb","$document","doc","pluginSelector","issueInput","on","event","componentName","target","value","this","trigger","type","fetch","url","encodeURI","dataType","get","indIssue","issue","dataList","attr","issues","ielt10","response","data","lenIssues","length","options","empty","title","append","jQuery"],"mappings":";;;;;;CAIA,SAAYA,EAAGC,gBAGf,IAAIC,EAAYD,EAAGE,IAClBC,EAAiB,UACjBC,EAAaL,EAAG,UAEjBE,EAAUI,GAAI,SAAUF,EAAgB,SAAUG,GAC7CC,EAAgBD,EAAME,OAAOC,MAEjCV,EAAGW,MAAOC,QAAS,CAClBC,KAAM,gBACNC,MAAO,CACNC,IAAKC,UAAW,yEAA2ER,GAC3FS,SAAU,UAIZZ,EAAWa,IAAK,GAAIR,MAAQ,KAG7BR,EAAUI,GAAI,kBAAmBF,EAAgB,SAAUG,GAC1D,IAICY,EAAUC,EAJPC,EAAWrB,EAAG,IAAMK,EAAWiB,KAAM,SACxCC,EAAStB,EAAGuB,OAASjB,EAAMO,MAAMW,SAASC,KAAOnB,EAAMO,MAAMW,SAC7DE,EAAYJ,EAAOK,OACnBC,EAAU,GAKX,IAFAR,EAASS,QAEHX,EAAW,EAAGA,IAAaQ,EAAWR,GAAY,EAGvDU,GAAW,mBAFXT,EAAQG,EAAQJ,IAEsBY,MAAQ,YAAgBX,EAAMW,MAAQ,cAGxE9B,EAAGuB,SACPK,EAAU,WAAaA,EAAU,aAGlCR,EAASW,OAAQH,GAEjBxB,EAAWO,QAAS,2BA1CrB,CA6CKqB,OAAQhC"}
|