@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,338 @@
|
|
1
|
+
/**
|
2
|
+
* @title WET-BOEW Datepicker
|
3
|
+
* @overview Polyfills for the HTML5 input type="date" in browsers without built in calendar style date pickers.
|
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
|
+
|
8
|
+
( function( $, window, document, wb ) {
|
9
|
+
"use strict";
|
10
|
+
|
11
|
+
/*
|
12
|
+
* Variable and function definitions.
|
13
|
+
* These are global to the polyfill - meaning that they will be initialized once per page.
|
14
|
+
*/
|
15
|
+
var componentName = "wb-date",
|
16
|
+
selector = "input[type=date]",
|
17
|
+
initEvent = "wb-init." + componentName,
|
18
|
+
setFocusEvent = "setfocus.wb",
|
19
|
+
containerName = "wb-picker",
|
20
|
+
toggleSuffix = "-picker-toggle",
|
21
|
+
today = new Date(),
|
22
|
+
$document = wb.doc,
|
23
|
+
fromDateISO = wb.date.fromDateISO,
|
24
|
+
defaults = {
|
25
|
+
minDate: new Date( 1800, 0, 1 ),
|
26
|
+
maxDate: new Date( 2100, 0, 1 ),
|
27
|
+
year: today.getFullYear(),
|
28
|
+
month: today.getMonth(),
|
29
|
+
daysCallback: function( year, month, $days, range ) {
|
30
|
+
var $inRange = $days,
|
31
|
+
selectedDate = this.date,
|
32
|
+
linkFocus;
|
33
|
+
|
34
|
+
if ( range ) {
|
35
|
+
if ( range.max ) {
|
36
|
+
$inRange = $inRange.filter( ":lt(" + ( range.max + 1 ) + ")" );
|
37
|
+
}
|
38
|
+
|
39
|
+
if ( range.min ) {
|
40
|
+
$inRange = $inRange.filter( ":gt(" + ( range.min - 1 ) + ")" );
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
$inRange.wrap( "<a href='javascript:;' tabindex='-1'></a>" );
|
45
|
+
|
46
|
+
if ( selectedDate && year === selectedDate.getFullYear() && month === selectedDate.getMonth() ) {
|
47
|
+
linkFocus = $days.eq( selectedDate.getDate() - 1 );
|
48
|
+
|
49
|
+
linkFocus.parent().attr( "aria-selected", true );
|
50
|
+
} else if ( year === today.getFullYear() && month === today.getMonth() ) {
|
51
|
+
linkFocus = $days.eq( today.getDate() - 1 );
|
52
|
+
} else {
|
53
|
+
linkFocus = $inRange.eq( 0 );
|
54
|
+
}
|
55
|
+
|
56
|
+
linkFocus.parent().removeAttr( "tabindex" );
|
57
|
+
}
|
58
|
+
},
|
59
|
+
i18n, i18nText, $container, calendar, focusOutTimer,
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @method init
|
63
|
+
* @param {jQuery Event} event Event that triggered the function call
|
64
|
+
*/
|
65
|
+
init = function( event ) {
|
66
|
+
|
67
|
+
// Start initialization
|
68
|
+
// returns DOM object = proceed with init
|
69
|
+
// returns undefined = do not proceed with init (e.g., already initialized)
|
70
|
+
var elm = wb.init( event, componentName, selector ),
|
71
|
+
state = {},
|
72
|
+
elmId, space, settings, minDate, maxDate, initDate;
|
73
|
+
|
74
|
+
if ( elm ) {
|
75
|
+
elmId = elm.id;
|
76
|
+
|
77
|
+
if ( elm.className.indexOf( "picker-field" ) !== -1 ) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
// Only initialize the i18nText once
|
82
|
+
if ( !i18nText ) {
|
83
|
+
i18n = wb.i18n;
|
84
|
+
space = i18n( "space" ).replace( " ", " " ).replace( "²", "" );
|
85
|
+
i18nText = {
|
86
|
+
show: i18n( "date-show" ).replace( "\\'", "'" ) + space,
|
87
|
+
hide: i18n( "date-hide" ).replace( "\\'", "'" ) + space +
|
88
|
+
space + i18n( "esc-key" ).replace( "\\'", "'" ),
|
89
|
+
selected: i18n( "date-sel" ).replace( "\\'", "'" )
|
90
|
+
};
|
91
|
+
}
|
92
|
+
|
93
|
+
elm.className += " picker-field";
|
94
|
+
|
95
|
+
//Build the calendar state
|
96
|
+
settings = {
|
97
|
+
field: this,
|
98
|
+
$field: $( this ),
|
99
|
+
labelText: $( "label[for=" + wb.jqEscape( elm.id ) + "]" )
|
100
|
+
.clone()
|
101
|
+
.find( ".datepicker-format, .error" )
|
102
|
+
.remove()
|
103
|
+
.end()
|
104
|
+
.text()
|
105
|
+
};
|
106
|
+
|
107
|
+
minDate = fromDateISO( elm.getAttribute( "min" ) );
|
108
|
+
maxDate = fromDateISO( elm.getAttribute( "max" ) );
|
109
|
+
|
110
|
+
if ( minDate ) {
|
111
|
+
settings.minDate = minDate;
|
112
|
+
}
|
113
|
+
|
114
|
+
if ( maxDate ) {
|
115
|
+
settings.maxDate = maxDate;
|
116
|
+
}
|
117
|
+
|
118
|
+
elm.state = $.extend( state, defaults, settings );
|
119
|
+
|
120
|
+
if ( today >= state.minDate && today <= state.maxDate ) {
|
121
|
+
initDate = today;
|
122
|
+
} else if ( state.minDate > today ) {
|
123
|
+
initDate = state.minDate;
|
124
|
+
} else {
|
125
|
+
initDate = state.maxDate;
|
126
|
+
}
|
127
|
+
|
128
|
+
if ( initDate ) {
|
129
|
+
state.year = initDate.getFullYear();
|
130
|
+
state.month = initDate.getMonth();
|
131
|
+
}
|
132
|
+
|
133
|
+
updateState.call( elm );
|
134
|
+
|
135
|
+
if ( !calendar ) {
|
136
|
+
createCalendar( elm );
|
137
|
+
}
|
138
|
+
|
139
|
+
if ( elmId ) {
|
140
|
+
createToggleIcon( elm );
|
141
|
+
}
|
142
|
+
|
143
|
+
// Identify that initialization has completed
|
144
|
+
wb.ready( $( elm ), componentName );
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
createCalendar = function( elm ) {
|
149
|
+
var closeText = i18nText.hide;
|
150
|
+
|
151
|
+
$container = $( "<div id='" + containerName + "' class='picker-overlay' role='dialog' tabindex='-1' aria-hidden='true'></div>" );
|
152
|
+
|
153
|
+
// Disable the tabbing of all the links when calendar is hidden
|
154
|
+
$container.find( "a" ).attr( "tabindex", "-1" );
|
155
|
+
|
156
|
+
$( "main" ).after( $container );
|
157
|
+
|
158
|
+
calendar = wb.calendar.create( $container, elm.state );
|
159
|
+
|
160
|
+
// Close button
|
161
|
+
$( "<button type='button' class='picker-close mfp-close overlay-close' title=\"" +
|
162
|
+
closeText + "\">×<span class='wb-inv'> " + closeText + "</span></button>" )
|
163
|
+
.appendTo( $container );
|
164
|
+
},
|
165
|
+
|
166
|
+
createToggleIcon = function( elm ) {
|
167
|
+
var fieldId = elm.id,
|
168
|
+
fieldLabelText = elm.state.labelText,
|
169
|
+
showFieldLabelText = i18nText.show + fieldLabelText,
|
170
|
+
objToggle = "<span class='input-group-btn'><a href='javascript:;' button id='" + fieldId + "-picker-toggle' class='btn btn-default picker-toggle' href='javascript:;' title=\"" +
|
171
|
+
showFieldLabelText + "\"><span class='glyphicon glyphicon-calendar'></span><span class='wb-inv'>" +
|
172
|
+
showFieldLabelText + "</span></a></span>";
|
173
|
+
|
174
|
+
$( "#" + wb.jqEscape( fieldId ) )
|
175
|
+
.wrap( "<span class='wb-date-wrap input-group'></span>" )
|
176
|
+
.after( objToggle );
|
177
|
+
$container.slideUp( 0 );
|
178
|
+
},
|
179
|
+
|
180
|
+
updateState = function() {
|
181
|
+
var state = this.state,
|
182
|
+
minDate = fromDateISO( this.getAttribute( "min" ) ) || state.minDate,
|
183
|
+
maxDate = fromDateISO( this.getAttribute( "max" ) ) || state.maxDate,
|
184
|
+
date = fromDateISO( this.value );
|
185
|
+
|
186
|
+
this.state.minDate = minDate;
|
187
|
+
this.state.maxDate = maxDate;
|
188
|
+
|
189
|
+
if ( date && date >= minDate && date <= maxDate ) {
|
190
|
+
state.date = date;
|
191
|
+
state.year = date.getFullYear();
|
192
|
+
state.month = date.getMonth();
|
193
|
+
} else {
|
194
|
+
state.date = null;
|
195
|
+
}
|
196
|
+
},
|
197
|
+
|
198
|
+
toggle = function( field ) {
|
199
|
+
if ( $container.attr( "aria-hidden" ) !== "false" ) {
|
200
|
+
show( field );
|
201
|
+
} else {
|
202
|
+
hide();
|
203
|
+
}
|
204
|
+
},
|
205
|
+
|
206
|
+
hide = function() {
|
207
|
+
var field = calendar.field,
|
208
|
+
$field = calendar.$field,
|
209
|
+
labelText = i18nText.show + calendar.labelText;
|
210
|
+
|
211
|
+
$( "#" + wb.jqEscape( field.id + toggleSuffix ) )
|
212
|
+
.attr( "title", labelText.replace( " ", " " ) )
|
213
|
+
.children( ".wb-inv" )
|
214
|
+
.html( labelText );
|
215
|
+
|
216
|
+
$container
|
217
|
+
.removeClass( "open" )
|
218
|
+
.attr( "aria-hidden", "true" );
|
219
|
+
|
220
|
+
$field.trigger( setFocusEvent );
|
221
|
+
},
|
222
|
+
|
223
|
+
show = function( field ) {
|
224
|
+
var fieldId = field.id,
|
225
|
+
closeText = i18nText.hide;
|
226
|
+
|
227
|
+
updateState.call( field );
|
228
|
+
calendar.reInit( field.state );
|
229
|
+
|
230
|
+
position();
|
231
|
+
|
232
|
+
$container
|
233
|
+
.addClass( "open" )
|
234
|
+
.attr( {
|
235
|
+
"aria-controls": fieldId,
|
236
|
+
"aria-labelledby": fieldId + toggleSuffix,
|
237
|
+
"aria-hidden": "false"
|
238
|
+
} )
|
239
|
+
.get( 0 ).focus();
|
240
|
+
|
241
|
+
$( "#" + wb.jqEscape( fieldId + toggleSuffix ) )
|
242
|
+
.attr( "title", closeText )
|
243
|
+
.children( ".wb-inv" )
|
244
|
+
.text( closeText );
|
245
|
+
},
|
246
|
+
|
247
|
+
position = function() {
|
248
|
+
var field = calendar.field,
|
249
|
+
position = calendar.$field.offset();
|
250
|
+
|
251
|
+
$container
|
252
|
+
.attr( "style", "top:" + ( position.top + field.offsetHeight ) + "px;left:" + position.left + "px" );
|
253
|
+
};
|
254
|
+
|
255
|
+
// Bind the init event of the plugin
|
256
|
+
$document.on( "timerpoke.wb " + initEvent, selector, init );
|
257
|
+
|
258
|
+
$document.on( "focusout focusin", "#" + containerName + " .wb-clndr", function( event ) {
|
259
|
+
|
260
|
+
// Hide the calendar when the focus leaves the calendar
|
261
|
+
switch ( event.type ) {
|
262
|
+
case "focusout":
|
263
|
+
focusOutTimer = setTimeout( hide, 10 );
|
264
|
+
break;
|
265
|
+
case "focusin":
|
266
|
+
clearTimeout( focusOutTimer );
|
267
|
+
}
|
268
|
+
} );
|
269
|
+
|
270
|
+
$document.on( "keydown", "#" + containerName, function( event ) {
|
271
|
+
|
272
|
+
// Escape key to close overlay
|
273
|
+
if ( event.which === 27 ) {
|
274
|
+
hide();
|
275
|
+
}
|
276
|
+
|
277
|
+
} );
|
278
|
+
|
279
|
+
$document.on( "click", ".picker-overlay .cal-days a", function( event ) {
|
280
|
+
var which = event.which,
|
281
|
+
field = calendar.field;
|
282
|
+
|
283
|
+
// Ignore middle/right mouse buttons
|
284
|
+
if ( ( !which || which === 1 ) && !field.disabled && !field.readOnly ) {
|
285
|
+
field.value = $( event.currentTarget ).find( "time" ).attr( "datetime" );
|
286
|
+
$( field ).trigger( "change" );
|
287
|
+
|
288
|
+
// Hide the calendar on selection
|
289
|
+
hide();
|
290
|
+
|
291
|
+
return false;
|
292
|
+
}
|
293
|
+
} );
|
294
|
+
|
295
|
+
$document.on( "click", ".picker-toggle", function( event ) {
|
296
|
+
event.preventDefault();
|
297
|
+
|
298
|
+
var which = event.which,
|
299
|
+
pickerId, field;
|
300
|
+
|
301
|
+
// Ignore middle/right mouse buttons
|
302
|
+
if ( ( !which || which === 1 ) ) {
|
303
|
+
pickerId = event.currentTarget.id;
|
304
|
+
field = $( "#" + wb.jqEscape( pickerId.substring( 0, pickerId.indexOf( toggleSuffix ) ) ) ).get( 0 );
|
305
|
+
if ( !field.disabled && !field.readOnly ) {
|
306
|
+
toggle( field );
|
307
|
+
return false;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
} );
|
311
|
+
|
312
|
+
$document.on( "click", ".picker-close", function( event ) {
|
313
|
+
var which = event.which;
|
314
|
+
|
315
|
+
// Ignore middle/right mouse buttons
|
316
|
+
if ( !which || which === 1 ) {
|
317
|
+
|
318
|
+
// Stop propagation of the click event
|
319
|
+
if ( event.stopPropagation ) {
|
320
|
+
event.stopImmediatePropagation();
|
321
|
+
} else {
|
322
|
+
event.cancelBubble = true;
|
323
|
+
}
|
324
|
+
|
325
|
+
hide();
|
326
|
+
}
|
327
|
+
} );
|
328
|
+
|
329
|
+
$document.on( "txt-rsz.wb win-rsz-width.wb win-rsz-height.wb", function() {
|
330
|
+
if ( $container && $container.hasClass( "open" ) ) {
|
331
|
+
position();
|
332
|
+
}
|
333
|
+
} );
|
334
|
+
|
335
|
+
// Add the timer poke to initialize the plugin
|
336
|
+
wb.add( selector );
|
337
|
+
|
338
|
+
} )( 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(l,s){"use strict";var c,o,i,d,t,p="wb-date",u="input[type=date]",a="wb-picker",n="-picker-toggle",f=new Date,e=s.doc,h=s.date.fromDateISO,b={minDate:new Date(1800,0,1),maxDate:new Date(2100,0,1),year:f.getFullYear(),month:f.getMonth(),daysCallback:function(e,t,a,i){var n,r=a,l=this.date;i&&(i.max&&(r=r.filter(":lt("+(i.max+1)+")")),i.min&&(r=r.filter(":gt("+(i.min-1)+")"))),r.wrap("<a href='javascript:;' tabindex='-1'></a>"),l&&e===l.getFullYear()&&t===l.getMonth()?(n=a.eq(l.getDate()-1)).parent().attr("aria-selected",!0):n=e===f.getFullYear()&&t===f.getMonth()?a.eq(f.getDate()-1):r.eq(0),n.parent().removeAttr("tabindex")}},g=function(e){var t=o.hide;(i=l("<div id='"+a+"' class='picker-overlay' role='dialog' tabindex='-1' aria-hidden='true'></div>")).find("a").attr("tabindex","-1"),l("main").after(i),d=s.calendar.create(i,e.state),l("<button type='button' class='picker-close mfp-close overlay-close' title=\""+t+"\">×<span class='wb-inv'> "+t+"</span></button>").appendTo(i)},m=function(e){var t=e.id,e=e.state.labelText,e=o.show+e,e="<span class='input-group-btn'><a href='javascript:;' button id='"+t+"-picker-toggle' class='btn btn-default picker-toggle' href='javascript:;' title=\""+e+"\"><span class='glyphicon glyphicon-calendar'></span><span class='wb-inv'>"+e+"</span></a></span>";l("#"+s.jqEscape(t)).wrap("<span class='wb-date-wrap input-group'></span>").after(e),i.slideUp(0)},w=function(){var e=this.state,t=h(this.getAttribute("min"))||e.minDate,a=h(this.getAttribute("max"))||e.maxDate,i=h(this.value);this.state.minDate=t,this.state.maxDate=a,i&&t<=i&&i<=a?(e.date=i,e.year=i.getFullYear(),e.month=i.getMonth()):e.date=null},r=function(){var e=d.field,t=d.$field,a=o.show+d.labelText;l("#"+s.jqEscape(e.id+n)).attr("title",a.replace(" "," ")).children(".wb-inv").html(a),i.removeClass("open").attr("aria-hidden","true"),t.trigger("setfocus.wb")},v=function(e){var t=e.id,a=o.hide;w.call(e),d.reInit(e.state),x(),i.addClass("open").attr({"aria-controls":t,"aria-labelledby":t+n,"aria-hidden":"false"}).get(0).focus(),l("#"+s.jqEscape(t+n)).attr("title",a).children(".wb-inv").text(a)},x=function(){var e=d.field,t=d.$field.offset();i.attr("style","top:"+(t.top+e.offsetHeight)+"px;left:"+t.left+"px")};e.on("timerpoke.wb wb-init.wb-date",u,function(e){var t,a,i,n=s.init(e,p,u),r={};n&&(t=n.id,-1===n.className.indexOf("picker-field")&&(o||(a=(c=s.i18n)("space").replace(" "," ").replace("²",""),o={show:c("date-show").replace("\\'","'")+a,hide:c("date-hide").replace("\\'","'")+a+a+c("esc-key").replace("\\'","'"),selected:c("date-sel").replace("\\'","'")}),n.className+=" picker-field",i={field:this,$field:l(this),labelText:l("label[for="+s.jqEscape(n.id)+"]").clone().find(".datepicker-format, .error").remove().end().text()},e=h(n.getAttribute("min")),a=h(n.getAttribute("max")),e&&(i.minDate=e),a&&(i.maxDate=a),n.state=l.extend(r,b,i),(i=f>=r.minDate&&f<=r.maxDate?f:r.minDate>f?r.minDate:r.maxDate)&&(r.year=i.getFullYear(),r.month=i.getMonth()),w.call(n),d||g(n),t&&m(n),s.ready(l(n),p)))}),e.on("focusout focusin","#"+a+" .wb-clndr",function(e){switch(e.type){case"focusout":t=setTimeout(r,10);break;case"focusin":clearTimeout(t)}}),e.on("keydown","#"+a,function(e){27===e.which&&r()}),e.on("click",".picker-overlay .cal-days a",function(e){var t=e.which,a=d.field;if(!(t&&1!==t||a.disabled||a.readOnly))return a.value=l(e.currentTarget).find("time").attr("datetime"),l(a).trigger("change"),r(),!1}),e.on("click",".picker-toggle",function(e){e.preventDefault();var t,a=e.which;if(!(a&&1!==a||(t=e.currentTarget.id,(t=l("#"+s.jqEscape(t.substring(0,t.indexOf(n)))).get(0)).disabled||t.readOnly)))return t=t,"false"!==i.attr("aria-hidden")?v(t):r(),!1}),e.on("click",".picker-close",function(e){var t=e.which;t&&1!==t||(e.stopPropagation?e.stopImmediatePropagation():e.cancelBubble=!0,r())}),e.on("txt-rsz.wb win-rsz-width.wb win-rsz-height.wb",function(){i&&i.hasClass("open")&&x()}),s.add(u)}(jQuery,(window,document,wb));
|
8
|
+
//# sourceMappingURL=datepicker.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datepicker.min.js","sources":["datepicker.js"],"names":["$","wb","i18n","i18nText","$container","calendar","focusOutTimer","componentName","selector","containerName","toggleSuffix","today","Date","$document","doc","fromDateISO","date","defaults","minDate","maxDate","year","getFullYear","month","getMonth","daysCallback","$days","range","linkFocus","$inRange","selectedDate","this","max","filter","min","wrap","eq","getDate","parent","attr","removeAttr","createCalendar","elm","closeText","hide","find","after","create","state","appendTo","createToggleIcon","fieldId","id","fieldLabelText","labelText","showFieldLabelText","show","objToggle","jqEscape","slideUp","updateState","getAttribute","value","field","$field","replace","children","html","removeClass","trigger","call","reInit","position","addClass","aria-controls","aria-labelledby","aria-hidden","get","focus","text","offset","top","offsetHeight","left","on","event","elmId","initDate","init","className","indexOf","space","selected","settings","clone","remove","end","extend","ready","type","setTimeout","clearTimeout","which","disabled","readOnly","currentTarget","preventDefault","pickerId","substring","stopPropagation","stopImmediatePropagation","cancelBubble","hasClass","add","jQuery","window","document"],"mappings":";;;;;;CAOA,SAAYA,EAAqBC,gBAOjC,IA4CCC,EAAMC,EAAUC,EAAYC,EAAUC,EA5CnCC,EAAgB,UACnBC,EAAW,mBAGXC,EAAgB,YAChBC,EAAe,iBACfC,EAAQ,IAAIC,KACZC,EAAYZ,EAAGa,IACfC,EAAcd,EAAGe,KAAKD,YACtBE,EAAW,CACVC,QAAS,IAAIN,KAAM,KAAM,EAAG,GAC5BO,QAAS,IAAIP,KAAM,KAAM,EAAG,GAC5BQ,KAAMT,EAAMU,cACZC,MAAOX,EAAMY,WACbC,aAAc,SAAUJ,EAAME,EAAOG,EAAOC,GAC3C,IAECC,EAFGC,EAAWH,EACdI,EAAeC,KAAKd,KAGhBU,IACCA,EAAMK,MACVH,EAAWA,EAASI,OAAQ,QAAWN,EAAMK,IAAM,GAAM,MAGrDL,EAAMO,MACVL,EAAWA,EAASI,OAAQ,QAAWN,EAAMO,IAAM,GAAM,OAI3DL,EAASM,KAAM,6CAEVL,GAAgBT,IAASS,EAAaR,eAAiBC,IAAUO,EAAaN,YAClFI,EAAYF,EAAMU,GAAIN,EAAaO,UAAY,IAErCC,SAASC,KAAM,iBAAiB,GAE1CX,EADWP,IAAST,EAAMU,eAAiBC,IAAUX,EAAMY,WAC/CE,EAAMU,GAAIxB,EAAMyB,UAAY,GAE5BR,EAASO,GAAI,GAG1BR,EAAUU,SAASE,WAAY,cA4FjCC,EAAiB,SAAUC,GAC1B,IAAIC,EAAYvC,EAASwC,MAEzBvC,EAAaJ,EAAG,YAAcS,EAAgB,mFAGnCmC,KAAM,KAAMN,KAAM,WAAY,MAEzCtC,EAAG,QAAS6C,MAAOzC,G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I,QAAS,gBAAiB,SAAUC,GACjD,IAAIiB,EAAQjB,EAAMiB,MAGZA,GAAmB,IAAVA,IAGTjB,EAAMwB,gBACVxB,EAAMyB,2BAENzB,EAAM0B,cAAe,EAGtBnE,OAIF9B,EAAUsE,GAAI,gDAAiD,WACzD/E,GAAcA,EAAW2G,SAAU,SACvCxC,MAKFtE,EAAG+G,IAAKxG,GAxUR,CA0UKyG,QAAQC,OAAQC,SAAUlH"}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
/**
|
2
|
+
* @title WET-BOEW Details/summary polyfill
|
3
|
+
* @overview The <details> and <summary> elements allows content to be expanded and collapsed.
|
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, 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-details",
|
15
|
+
selector = "summary",
|
16
|
+
initEvent = "wb-init." + componentName,
|
17
|
+
$document = wb.doc,
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @method init
|
21
|
+
* @param {jQuery Event} event Event that triggered the function call
|
22
|
+
*/
|
23
|
+
init = function( event ) {
|
24
|
+
|
25
|
+
// Start initialization
|
26
|
+
// returns DOM object = proceed with init
|
27
|
+
// returns undefined = do not proceed with init (e.g., already initialized)
|
28
|
+
var summary = wb.init( event, componentName, selector ),
|
29
|
+
details;
|
30
|
+
|
31
|
+
if ( summary ) {
|
32
|
+
details = summary.parentNode;
|
33
|
+
Object.defineProperty( details, "open", {
|
34
|
+
get: isOpen,
|
35
|
+
set: setOpen
|
36
|
+
} );
|
37
|
+
details.summary = summary;
|
38
|
+
summary.setAttribute( "aria-expanded", ( details.getAttribute( "open" ) !== null ) );
|
39
|
+
|
40
|
+
if ( !summary.getAttribute( "role" ) ) {
|
41
|
+
summary.setAttribute( "role", "button" );
|
42
|
+
}
|
43
|
+
if ( !summary.getAttribute( "tabindex" ) ) {
|
44
|
+
summary.setAttribute( "tabindex", "0" );
|
45
|
+
}
|
46
|
+
|
47
|
+
// Identify that initialization has completed
|
48
|
+
wb.ready( $( summary ), componentName );
|
49
|
+
}
|
50
|
+
},
|
51
|
+
|
52
|
+
isOpen = function() {
|
53
|
+
return this.getAttribute( "open" ) !== null;
|
54
|
+
},
|
55
|
+
|
56
|
+
open = function() {
|
57
|
+
this.setAttribute( "open", "open" );
|
58
|
+
this.className += " open";
|
59
|
+
saveState.call( this );
|
60
|
+
},
|
61
|
+
|
62
|
+
close = function() {
|
63
|
+
this.removeAttribute( "open" );
|
64
|
+
this.className = this.className.replace( " open", "" );
|
65
|
+
saveState.call( this );
|
66
|
+
},
|
67
|
+
|
68
|
+
setOpen = function( isOpen ) {
|
69
|
+
if ( typeof isOpen === "boolean" ) {
|
70
|
+
if ( isOpen ) {
|
71
|
+
open.call( this );
|
72
|
+
} else {
|
73
|
+
close.call( this );
|
74
|
+
}
|
75
|
+
}
|
76
|
+
this.summary.setAttribute( "aria-expanded", isOpen );
|
77
|
+
$( this ).trigger( "toggle" );
|
78
|
+
},
|
79
|
+
|
80
|
+
//TODO: Move to the alerts plugin
|
81
|
+
saveState = function() {
|
82
|
+
var key;
|
83
|
+
|
84
|
+
if ( this.className.indexOf( "alert" ) !== -1 ) {
|
85
|
+
key = "alert-collapsible-state-" + this.getAttribute( "id" );
|
86
|
+
}
|
87
|
+
|
88
|
+
if ( key ) {
|
89
|
+
try {
|
90
|
+
localStorage.setItem( key, this.open ? "open" : "closed" );
|
91
|
+
} catch ( e ) {
|
92
|
+
/* swallow error */}
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
// Bind the init event of the plugin
|
97
|
+
$document.on( "timerpoke.wb " + initEvent, selector, init );
|
98
|
+
|
99
|
+
// Bind the the event handlers of the plugin
|
100
|
+
$document.on( "click keydown toggle." + componentName, selector, function( event ) {
|
101
|
+
var which = event.which,
|
102
|
+
currentTarget = event.currentTarget,
|
103
|
+
details;
|
104
|
+
|
105
|
+
// Ignore middle/right mouse buttons and wb-toggle enhanced summary elements (except for toggle)
|
106
|
+
if ( ( !which || which === 1 ) &&
|
107
|
+
( currentTarget.className.indexOf( "wb-toggle" ) === -1 ||
|
108
|
+
( event.type === "toggle" && event.namespace === componentName ) ) ) {
|
109
|
+
details = currentTarget.parentNode;
|
110
|
+
details.open = !details.open;
|
111
|
+
} else if ( which === 13 || which === 32 ) {
|
112
|
+
event.preventDefault();
|
113
|
+
$( currentTarget ).trigger( "click" );
|
114
|
+
}
|
115
|
+
|
116
|
+
/*
|
117
|
+
* Since we are working with events we want to ensure that we are being passive about our control,
|
118
|
+
* so returning true allows for events to always continue
|
119
|
+
*/
|
120
|
+
return true;
|
121
|
+
} );
|
122
|
+
|
123
|
+
// Add the timer poke to initialize the plugin
|
124
|
+
wb.add( selector );
|
125
|
+
|
126
|
+
} )( jQuery, window, 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,i){"use strict";var r="wb-details",a="summary",t=i.doc,o=function(){return null!==this.getAttribute("open")},s=function(t){"boolean"==typeof t&&(t?function(){this.setAttribute("open","open"),this.className+=" open",e.call(this)}:function(){this.removeAttribute("open"),this.className=this.className.replace(" open",""),e.call(this)}).call(this),this.summary.setAttribute("aria-expanded",t),n(this).trigger("toggle")},e=function(){var t;if(-1!==this.className.indexOf("alert")&&(t="alert-collapsible-state-"+this.getAttribute("id")),t)try{localStorage.setItem(t,this.open?"open":"closed")}catch(t){}};t.on("timerpoke.wb wb-init.wb-details",a,function(t){var e=i.init(t,r,a);e&&(t=e.parentNode,Object.defineProperty(t,"open",{get:o,set:s}),(t.summary=e).setAttribute("aria-expanded",null!==t.getAttribute("open")),e.getAttribute("role")||e.setAttribute("role","button"),e.getAttribute("tabindex")||e.setAttribute("tabindex","0"),i.ready(n(e),r))}),t.on("click keydown toggle."+r,a,function(t){var e=t.which,i=t.currentTarget;return e&&1!==e||-1!==i.className.indexOf("wb-toggle")&&("toggle"!==t.type||t.namespace!==r)?13!==e&&32!==e||(t.preventDefault(),n(i).trigger("click")):(i=i.parentNode).open=!i.open,!0}),i.add(a)}(jQuery,(window,wb));
|
8
|
+
//# sourceMappingURL=details.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"details.min.js","sources":["details.js"],"names":["$","wb","componentName","selector","$document","doc","isOpen","this","getAttribute","setOpen","setAttribute","className","saveState","call","removeAttribute","replace","summary","trigger","key","indexOf","localStorage","setItem","open","e","on","event","init","details","parentNode","Object","defineProperty","get","set","ready","which","currentTarget","type","namespace","preventDefault","add","jQuery","window"],"mappings":";;;;;;CAMA,SAAYA,EAAWC,gBAOvB,IAAIC,EAAgB,aACnBC,EAAW,UAEXC,EAAYH,EAAGI,IAmCfC,EAAS,WACR,OAAuC,OAAhCC,KAAKC,aAAc,SAe3BC,EAAU,SAAUH,GACI,kBAAXA,IACNA,EAdA,WACNC,KAAKG,aAAc,OAAQ,QAC3BH,KAAKI,WAAa,QAClBC,EAAUC,KAAMN,OAGT,WACPA,KAAKO,gBAAiB,QACtBP,KAAKI,UAAYJ,KAAKI,UAAUI,QAAS,QAAS,IAClDH,EAAUC,KAAMN,QAMTM,KAAMN,MAKbA,KAAKS,QAAQN,aAAc,gBAAiBJ,GAC5CN,EAAGO,MAAOU,QAAS,WAIpBL,EAAY,WACX,IAAIM,EAMJ,IAJ4C,IAAvCX,KAAKI,UAAUQ,QAAS,WAC5BD,EAAM,2BAA6BX,KAAKC,aAAc,OAGlDU,EACJ,IACCE,aAAaC,QAASH,EAAKX,KAAKe,KAAO,OAAS,UAC/C,MAAQC,MAMbnB,EAAUoB,GAAI,kCAA6BrB,EA1EnC,SAAUsB,GAKhB,IAAIT,EAAUf,EAAGyB,KAAMD,EAAOvB,EAAeC,GAGxCa,IACJW,EAAUX,EAAQY,WAClBC,OAAOC,eAAgBH,EAAS,OAAQ,CACvCI,IAAKzB,EACL0B,IAAKvB,KAENkB,EAAQX,QAAUA,GACVN,aAAc,gBAAsD,OAAnCiB,EAAQnB,aAAc,SAEzDQ,EAAQR,aAAc,SAC3BQ,EAAQN,aAAc,OAAQ,UAEzBM,EAAQR,aAAc,aAC3BQ,EAAQN,aAAc,WAAY,KAInCT,EAAGgC,MAAOjC,EAAGgB,GAAWd,MAoD3BE,EAAUoB,GAAI,wBAA0BtB,EAAeC,EAAU,SAAUsB,GAC1E,IAAIS,EAAQT,EAAMS,MACjBC,EAAgBV,EAAMU,cAkBvB,OAdQD,GAAmB,IAAVA,IACsC,IAApDC,EAAcxB,UAAUQ,QAAS,eAClB,WAAfM,EAAMW,MAAqBX,EAAMY,YAAcnC,GAG5B,KAAVgC,GAA0B,KAAVA,IAC3BT,EAAMa,iBACNtC,EAAGmC,GAAgBlB,QAAS,WAJ5BU,EAAUQ,EAAcP,YAChBN,MAAQK,EAAQL,MAUlB,IAIRrB,EAAGsC,IAAKpC,GArHR,CAuHKqC,QAAQC,OAAQxC"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/*!
|
2
|
+
*
|
3
|
+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
|
4
|
+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
5
|
+
*
|
6
|
+
* Version: @wet-boew-build.version@
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
/*
|
10
|
+
* Jaws WAI-ARIA fixes
|
11
|
+
*/
|
12
|
+
|
13
|
+
( function( $ ) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
var heading, i, id, node,
|
17
|
+
headings = $( "h1, h2, h3, h4, h5, h6" ).get(),
|
18
|
+
nodes = $( "nav, section, article, aside, main" ).get(),
|
19
|
+
len = nodes.length,
|
20
|
+
idPrefix = "wb-h-aria-";
|
21
|
+
|
22
|
+
// Use aria-labelledby to fix the Jaws sectioning element/heading element association bug
|
23
|
+
for ( i = 0; i !== len; i += 1 ) {
|
24
|
+
node = nodes[ i ];
|
25
|
+
heading = node;
|
26
|
+
while ( ( heading = ( heading.firstElementChild || heading.firstChild ) ) !== null ) {
|
27
|
+
if ( heading.nodeName.match( /h[1-6]/i ) !== null ) {
|
28
|
+
id = heading.id;
|
29
|
+
if ( id.length === 0 ) {
|
30
|
+
id = idPrefix + i;
|
31
|
+
heading.id = id;
|
32
|
+
}
|
33
|
+
node.setAttribute( "aria-labelledby", id );
|
34
|
+
break;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
// Use role="heading" and aria-level to fix the Jaws sectioning element/heading level bug
|
40
|
+
len = headings.length;
|
41
|
+
for ( i = 0; i !== len; i += 1 ) {
|
42
|
+
heading = headings[ i ];
|
43
|
+
heading.setAttribute( "role", "heading" );
|
44
|
+
heading.setAttribute( "aria-level", heading.nodeName.substring( 1 ) );
|
45
|
+
}
|
46
|
+
|
47
|
+
} )( jQuery );
|
@@ -0,0 +1,16 @@
|
|
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
|
+
/*!
|
8
|
+
*
|
9
|
+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
|
10
|
+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
|
11
|
+
*
|
12
|
+
* Version: @wet-boew-build.version@
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
!function(e){"use strict";for(var t,i,r,a=e("h1, h2, h3, h4, h5, h6").get(),l=e("nav, section, article, aside, main").get(),h=l.length,n=0;n!==h;n+=1)for(t=r=l[n];null!==(t=t.firstElementChild||t.firstChild);)if(null!==t.nodeName.match(/h[1-6]/i)){0===(i=t.id).length&&(i="wb-h-aria-"+n,t.id=i),r.setAttribute("aria-labelledby",i);break}for(h=a.length,n=0;n!==h;n+=1)(t=a[n]).setAttribute("role","heading"),t.setAttribute("aria-level",t.nodeName.substring(1))}(jQuery);
|
16
|
+
//# sourceMappingURL=jawsariafixes.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jawsariafixes.min.js","sources":["jawsariafixes.js"],"names":["$","heading","id","node","headings","get","nodes","len","length","i","firstElementChild","firstChild","nodeName","match","setAttribute","substring","jQuery"],"mappings":";;;;;;;;;;;;;;CAYA,SAAYA,gBAUZ,IAPA,IAAIC,EAAYC,EAAIC,EACnBC,EAAWJ,EAAG,0BAA2BK,MACzCC,EAAQN,EAAG,sCAAuCK,MAClDE,EAAMD,EAAME,OAIPC,EAAI,EAAGA,IAAMF,EAAKE,GAAK,EAG5B,IADAR,EADAE,EAAOG,EAAOG,GAEgE,QAApER,EAAYA,EAAQS,mBAAqBT,EAAQU,aAC1D,GAA6C,OAAxCV,EAAQW,SAASC,MAAO,WAAuB,CAEhC,KADnBX,EAAKD,EAAQC,IACLM,SACPN,EAVQ,aAUQO,EAChBR,EAAQC,GAAKA,GAEdC,EAAKW,aAAc,kBAAmBZ,GACtC,MAOH,IADAK,EAAMH,EAASI,OACTC,EAAI,EAAGA,IAAMF,EAAKE,GAAK,GAC5BR,EAAUG,EAAUK,IACZK,aAAc,OAAQ,WAC9Bb,EAAQa,aAAc,aAAcb,EAAQW,SAASG,UAAW,IA/BjE,CAkCKC"}
|