@macallumharvey/first-test-wet 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/first-test-wet.cjs.development.js.map +1 -1
- package/dist/first-test-wet.cjs.production.min.js.map +1 -1
- package/dist/first-test-wet.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/WetModal.tsx +1 -0
- 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/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.js → theme-wet-boew/css/ie8-wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js → theme-wet-boew/css/ie8-wet-boew.min.css} +7 -7
- package/src/theme-wet-boew/css/theme.css +11357 -0
- package/src/theme-wet-boew/css/theme.min.css +6 -0
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.js → theme-wet-boew/css/wet-boew.css} +12 -10
- package/src/{wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js → theme-wet-boew/css/wet-boew.min.css} +6 -7
- package/src/theme-wet-boew/payload.json +66 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/mediacontrols.html +32 -33
- package/src/wet-boew/assets/sprites_share.png +0 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.css +112 -112
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/noscript.min.css +5 -5
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.css +32 -32
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.css +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.css +28 -28
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.css +16 -16
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.css +24 -24
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.css +8 -8
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.css +229 -229
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/additional-methods.js +1511 -1511
- package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/geomap-lib.js +3758 -3770
- package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.dataTables.js +15345 -15733
- package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.canvas.js +345 -345
- package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.js +3168 -3168
- package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.orderBars.js +282 -282
- package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.flot.pie.js +820 -820
- package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.magnific-popup.js +2060 -2060
- package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jquery.validate.js +1660 -1660
- package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/json-patch.js +314 -314
- package/src/wet-boew/js/deps/json-patch.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/jsonpointer.js +349 -349
- package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.js +53 -53
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.js +64 -64
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.js +160 -160
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.js +92 -92
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.js +94 -94
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.js +102 -102
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.js +95 -95
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.js +183 -183
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-matlab.min.js +1 -1
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.js +57 -57
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.js +140 -140
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.js +37 -37
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.js +81 -81
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.js +56 -56
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.js +59 -59
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.js +60 -60
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.js +63 -63
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.js +49 -49
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.js +67 -67
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.js +51 -51
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.js +55 -55
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.js +71 -71
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.js +45 -45
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/ol.js +1008 -1008
- package/src/wet-boew/js/deps/ol.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/prettify.js +1742 -1742
- package/src/wet-boew/js/deps/prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/proj4.js +2 -2
- package/src/wet-boew/js/deps/proj4.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/run_prettify.js +1998 -1998
- package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/tableparser.js +2216 -2216
- package/src/wet-boew/js/deps/tableparser.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/unorm.js +452 -452
- package/src/wet-boew/js/deps/unorm.min.js +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/af.js +246 -254
- package/src/wet-boew/js/i18n/af.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ar.js +284 -292
- package/src/wet-boew/js/i18n/ar.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/bg.js +284 -292
- package/src/wet-boew/js/i18n/bg.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/cs.js +285 -293
- package/src/wet-boew/js/i18n/cs.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/de.js +354 -362
- package/src/wet-boew/js/i18n/de.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/el.js +284 -292
- package/src/wet-boew/js/i18n/el.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/en.js +246 -254
- package/src/wet-boew/js/i18n/en.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/es.js +287 -295
- package/src/wet-boew/js/i18n/es.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/et.js +282 -290
- package/src/wet-boew/js/i18n/et.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/fr.js +313 -321
- package/src/wet-boew/js/i18n/fr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hi.js +246 -254
- package/src/wet-boew/js/i18n/hi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hu.js +284 -292
- package/src/wet-boew/js/i18n/hu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/hy.js +246 -254
- package/src/wet-boew/js/i18n/hy.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/id.js +283 -291
- package/src/wet-boew/js/i18n/id.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/is.js +282 -290
- package/src/wet-boew/js/i18n/is.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/it.js +311 -319
- package/src/wet-boew/js/i18n/it.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/iu.js +246 -254
- package/src/wet-boew/js/i18n/iu.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ja.js +285 -293
- package/src/wet-boew/js/i18n/ja.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ko.js +284 -292
- package/src/wet-boew/js/i18n/ko.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lt.js +284 -292
- package/src/wet-boew/js/i18n/lt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/lv.js +284 -292
- package/src/wet-boew/js/i18n/lv.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/nl.js +318 -326
- package/src/wet-boew/js/i18n/nl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pl.js +287 -295
- package/src/wet-boew/js/i18n/pl.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt-BR.js +246 -254
- package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/pt.js +270 -278
- package/src/wet-boew/js/i18n/pt.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/ru.js +284 -292
- package/src/wet-boew/js/i18n/ru.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sk.js +282 -290
- package/src/wet-boew/js/i18n/sk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/sq.js +246 -254
- package/src/wet-boew/js/i18n/sq.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/th.js +284 -292
- package/src/wet-boew/js/i18n/th.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/tr.js +286 -294
- package/src/wet-boew/js/i18n/tr.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/uk.js +284 -292
- package/src/wet-boew/js/i18n/uk.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/vi.js +284 -292
- package/src/wet-boew/js/i18n/vi.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh-Hans.js +246 -254
- package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/i18n/zh.js +285 -293
- 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-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.js +9814 -9814
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.js +4 -4
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist.js +423 -419
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.js +50 -50
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datalist_dynamic.min.js +7 -7
- package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/datepicker.js +338 -338
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/details.js +126 -126
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.js +47 -47
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/jawsariafixes.min.js +15 -15
- package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/meter.js +140 -140
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/mobile.js +783 -784
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/progress.js +107 -107
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider.js +1343 -1343
- 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-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.js +73 -73
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/slider_wrapper.min.js +7 -7
- package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.js +29 -29
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/svg.min.js +7 -7
- package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.js +603 -603
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/polyfills/test.min.js +7 -7
- package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
- package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/wet-boew.js +17714 -20264
- 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-cdn-4.0.81.1 → wet-boew}/payload.json +1721 -1721
- package/src/wet-boew-cdn-4.0.81.1/Licence-fr.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/License-en.txt +0 -1
- package/src/wet-boew-cdn-4.0.81.1/assets/sprites_share.png +0 -0
- package/src/wet-boew-cdn-4.0.81.1/js/deps/additional-methods.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/geomap-lib.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.dataTables.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.canvas.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.orderBars.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.flot.pie.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.magnific-popup.min.js +0 -4
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jquery.validate.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/deps/json-patch.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/jsonpointer.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/ol.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/proj4.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/run_prettify.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/tableparser.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/deps/unorm.min.js +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/af.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ar.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/bg.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/cs.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/de.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/el.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/en.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/es.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/et.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/fr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/hy.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/id.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/is.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/it.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/iu.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ja.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ko.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/lv.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/nl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pl.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt-BR.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/pt.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/ru.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/sq.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/th.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/tr.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/uk.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/vi.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh-Hans.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/i18n/zh.min.js +0 -7
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/ie8-wet-boew2.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datalist_dynamic.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/datepicker.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/details.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/jawsariafixes.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/meter.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/mobile.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js +0 -8
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/progress.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/slider_wrapper.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/svg.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/polyfills/test.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js +0 -9
- package/src/wet-boew-cdn-4.0.81.1/js/wet-boew.min.js.map +0 -1
- package/src/wet-boew-cdn-4.0.81.1/package.json +0 -15
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/cloud-popup-relative.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/fd-slider-sprite.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/loading.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-minus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-plus-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/assets/zoom-world-mini.png +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datalist.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/datepicker.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/details.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/mathml.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/meter.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/progress.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/css/polyfills/slider.min.css +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.eot +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/mml-chtml.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-apollo.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-basic.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-clj.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-css.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-dart.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-erlang.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-go.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-hs.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lasso.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lisp.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-llvm.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-logtalk.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-lua.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-ml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-mumps.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-n.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-pascal.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-proto.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-r.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rd.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-rust.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-scala.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-sql.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-swift.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tcl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-tex.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vb.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-vhdl.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-wiki.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-xq.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/deps/lang-yaml.min.js +0 -0
- /package/src/{wet-boew-cdn-4.0.81.1 → wet-boew}/js/jquery/2.2.4/jquery.min.map +0 -0
@@ -1,419 +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", 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
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
}
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
inputs
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
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 );
|