@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.
Files changed (292) hide show
  1. package/dist/WetButton.d.ts +9 -0
  2. package/dist/WetModal.d.ts +6 -0
  3. package/dist/first-test-wet.cjs.development.js +26 -0
  4. package/dist/first-test-wet.cjs.development.js.map +1 -1
  5. package/dist/first-test-wet.cjs.production.min.js +1 -1
  6. package/dist/first-test-wet.cjs.production.min.js.map +1 -1
  7. package/dist/first-test-wet.esm.js +26 -1
  8. package/dist/first-test-wet.esm.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/package.json +1 -1
  11. package/src/WetButton.tsx +19 -0
  12. package/src/WetModal.tsx +26 -0
  13. package/src/index.tsx +2 -2
  14. package/src/theme-wet-boew/assets/favicon-mobile.png +0 -0
  15. package/src/theme-wet-boew/assets/favicon.ico +0 -0
  16. package/src/theme-wet-boew/assets/logo.png +0 -0
  17. package/src/theme-wet-boew/assets/logo.svg +14 -0
  18. package/src/theme-wet-boew/css/ie8-theme.css +17370 -0
  19. package/src/theme-wet-boew/css/ie8-theme.min.css +193 -0
  20. package/src/theme-wet-boew/css/ie8-wet-boew.css +12 -0
  21. package/src/theme-wet-boew/css/ie8-wet-boew.min.css +7 -0
  22. package/src/theme-wet-boew/css/theme.css +11357 -0
  23. package/src/theme-wet-boew/css/theme.min.css +6 -0
  24. package/src/theme-wet-boew/css/wet-boew.css +12 -0
  25. package/src/theme-wet-boew/css/wet-boew.min.css +6 -0
  26. package/src/theme-wet-boew/payload.json +66 -0
  27. package/src/wet-boew/assets/cloud-popup-relative.png +0 -0
  28. package/src/wet-boew/assets/fd-slider-sprite.png +0 -0
  29. package/src/wet-boew/assets/loading.png +0 -0
  30. package/src/wet-boew/assets/mediacontrols.html +32 -0
  31. package/src/wet-boew/assets/sprites_share.png +0 -0
  32. package/src/wet-boew/assets/zoom-minus-mini.png +0 -0
  33. package/src/wet-boew/assets/zoom-plus-mini.png +0 -0
  34. package/src/wet-boew/assets/zoom-world-mini.png +0 -0
  35. package/src/wet-boew/css/noscript.css +112 -0
  36. package/src/wet-boew/css/noscript.min.css +6 -0
  37. package/src/wet-boew/css/polyfills/datalist.css +32 -0
  38. package/src/wet-boew/css/polyfills/datalist.min.css +1 -0
  39. package/src/wet-boew/css/polyfills/datepicker.css +47 -0
  40. package/src/wet-boew/css/polyfills/datepicker.min.css +1 -0
  41. package/src/wet-boew/css/polyfills/details.css +28 -0
  42. package/src/wet-boew/css/polyfills/details.min.css +1 -0
  43. package/src/wet-boew/css/polyfills/mathml.css +16 -0
  44. package/src/wet-boew/css/polyfills/mathml.min.css +1 -0
  45. package/src/wet-boew/css/polyfills/meter.css +24 -0
  46. package/src/wet-boew/css/polyfills/meter.min.css +1 -0
  47. package/src/wet-boew/css/polyfills/progress.css +8 -0
  48. package/src/wet-boew/css/polyfills/progress.min.css +1 -0
  49. package/src/wet-boew/css/polyfills/slider.css +229 -0
  50. package/src/wet-boew/css/polyfills/slider.min.css +1 -0
  51. package/src/wet-boew/fonts/glyphicons-halflings-regular.eot +0 -0
  52. package/src/wet-boew/fonts/glyphicons-halflings-regular.svg +288 -0
  53. package/src/wet-boew/fonts/glyphicons-halflings-regular.ttf +0 -0
  54. package/src/wet-boew/fonts/glyphicons-halflings-regular.woff +0 -0
  55. package/src/wet-boew/fonts/glyphicons-halflings-regular.woff2 +0 -0
  56. package/src/wet-boew/js/MathJax/mml-chtml.js +1 -0
  57. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  58. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  59. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  60. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  61. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  62. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  63. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  64. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  65. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  66. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  67. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  68. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  69. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  70. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  71. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  72. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  73. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  74. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  75. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  76. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  77. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  78. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  79. package/src/wet-boew/js/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  80. package/src/wet-boew/js/deps/additional-methods.js +1512 -0
  81. package/src/wet-boew/js/deps/additional-methods.min.js +9 -0
  82. package/src/wet-boew/js/deps/geomap-lib.js +3758 -0
  83. package/src/wet-boew/js/deps/geomap-lib.min.js +1 -0
  84. package/src/wet-boew/js/deps/jquery.dataTables.js +15345 -0
  85. package/src/wet-boew/js/deps/jquery.dataTables.min.js +4 -0
  86. package/src/wet-boew/js/deps/jquery.flot.canvas.js +345 -0
  87. package/src/wet-boew/js/deps/jquery.flot.canvas.min.js +1 -0
  88. package/src/wet-boew/js/deps/jquery.flot.js +3168 -0
  89. package/src/wet-boew/js/deps/jquery.flot.min.js +1 -0
  90. package/src/wet-boew/js/deps/jquery.flot.orderBars.js +282 -0
  91. package/src/wet-boew/js/deps/jquery.flot.orderBars.min.js +1 -0
  92. package/src/wet-boew/js/deps/jquery.flot.pie.js +820 -0
  93. package/src/wet-boew/js/deps/jquery.flot.pie.min.js +1 -0
  94. package/src/wet-boew/js/deps/jquery.magnific-popup.js +2061 -0
  95. package/src/wet-boew/js/deps/jquery.magnific-popup.min.js +4 -0
  96. package/src/wet-boew/js/deps/jquery.validate.js +1661 -0
  97. package/src/wet-boew/js/deps/jquery.validate.min.js +9 -0
  98. package/src/wet-boew/js/deps/json-patch.js +315 -0
  99. package/src/wet-boew/js/deps/json-patch.min.js +1 -0
  100. package/src/wet-boew/js/deps/jsonpointer.js +349 -0
  101. package/src/wet-boew/js/deps/jsonpointer.min.js +1 -0
  102. package/src/wet-boew/js/deps/lang-apollo.js +53 -0
  103. package/src/wet-boew/js/deps/lang-apollo.min.js +1 -0
  104. package/src/wet-boew/js/deps/lang-basic.js +49 -0
  105. package/src/wet-boew/js/deps/lang-basic.min.js +1 -0
  106. package/src/wet-boew/js/deps/lang-clj.js +64 -0
  107. package/src/wet-boew/js/deps/lang-clj.min.js +1 -0
  108. package/src/wet-boew/js/deps/lang-css.js +160 -0
  109. package/src/wet-boew/js/deps/lang-css.min.js +1 -0
  110. package/src/wet-boew/js/deps/lang-dart.js +92 -0
  111. package/src/wet-boew/js/deps/lang-dart.min.js +1 -0
  112. package/src/wet-boew/js/deps/lang-erlang.js +94 -0
  113. package/src/wet-boew/js/deps/lang-erlang.min.js +1 -0
  114. package/src/wet-boew/js/deps/lang-go.js +59 -0
  115. package/src/wet-boew/js/deps/lang-go.min.js +1 -0
  116. package/src/wet-boew/js/deps/lang-hs.js +102 -0
  117. package/src/wet-boew/js/deps/lang-hs.min.js +1 -0
  118. package/src/wet-boew/js/deps/lang-lasso.js +67 -0
  119. package/src/wet-boew/js/deps/lang-lasso.min.js +1 -0
  120. package/src/wet-boew/js/deps/lang-lisp.js +95 -0
  121. package/src/wet-boew/js/deps/lang-lisp.min.js +1 -0
  122. package/src/wet-boew/js/deps/lang-llvm.js +63 -0
  123. package/src/wet-boew/js/deps/lang-llvm.min.js +1 -0
  124. package/src/wet-boew/js/deps/lang-logtalk.js +50 -0
  125. package/src/wet-boew/js/deps/lang-logtalk.min.js +1 -0
  126. package/src/wet-boew/js/deps/lang-lua.js +60 -0
  127. package/src/wet-boew/js/deps/lang-lua.min.js +1 -0
  128. package/src/wet-boew/js/deps/lang-matlab.js +183 -0
  129. package/src/wet-boew/js/deps/lang-matlab.min.js +1 -0
  130. package/src/wet-boew/js/deps/lang-ml.js +57 -0
  131. package/src/wet-boew/js/deps/lang-ml.min.js +1 -0
  132. package/src/wet-boew/js/deps/lang-mumps.js +140 -0
  133. package/src/wet-boew/js/deps/lang-mumps.min.js +1 -0
  134. package/src/wet-boew/js/deps/lang-n.js +67 -0
  135. package/src/wet-boew/js/deps/lang-n.min.js +1 -0
  136. package/src/wet-boew/js/deps/lang-pascal.js +49 -0
  137. package/src/wet-boew/js/deps/lang-pascal.min.js +1 -0
  138. package/src/wet-boew/js/deps/lang-proto.js +37 -0
  139. package/src/wet-boew/js/deps/lang-proto.min.js +1 -0
  140. package/src/wet-boew/js/deps/lang-r.js +59 -0
  141. package/src/wet-boew/js/deps/lang-r.min.js +1 -0
  142. package/src/wet-boew/js/deps/lang-rd.js +50 -0
  143. package/src/wet-boew/js/deps/lang-rd.min.js +1 -0
  144. package/src/wet-boew/js/deps/lang-rust.js +81 -0
  145. package/src/wet-boew/js/deps/lang-rust.min.js +1 -0
  146. package/src/wet-boew/js/deps/lang-scala.js +56 -0
  147. package/src/wet-boew/js/deps/lang-scala.min.js +1 -0
  148. package/src/wet-boew/js/deps/lang-sql.js +59 -0
  149. package/src/wet-boew/js/deps/lang-sql.min.js +1 -0
  150. package/src/wet-boew/js/deps/lang-swift.js +60 -0
  151. package/src/wet-boew/js/deps/lang-swift.min.js +1 -0
  152. package/src/wet-boew/js/deps/lang-tcl.js +63 -0
  153. package/src/wet-boew/js/deps/lang-tcl.min.js +1 -0
  154. package/src/wet-boew/js/deps/lang-tex.js +49 -0
  155. package/src/wet-boew/js/deps/lang-tex.min.js +1 -0
  156. package/src/wet-boew/js/deps/lang-vb.js +67 -0
  157. package/src/wet-boew/js/deps/lang-vb.min.js +1 -0
  158. package/src/wet-boew/js/deps/lang-vhdl.js +51 -0
  159. package/src/wet-boew/js/deps/lang-vhdl.min.js +1 -0
  160. package/src/wet-boew/js/deps/lang-wiki.js +55 -0
  161. package/src/wet-boew/js/deps/lang-wiki.min.js +1 -0
  162. package/src/wet-boew/js/deps/lang-xq.js +71 -0
  163. package/src/wet-boew/js/deps/lang-xq.min.js +1 -0
  164. package/src/wet-boew/js/deps/lang-yaml.js +45 -0
  165. package/src/wet-boew/js/deps/lang-yaml.min.js +1 -0
  166. package/src/wet-boew/js/deps/ol.js +1008 -0
  167. package/src/wet-boew/js/deps/ol.min.js +1 -0
  168. package/src/wet-boew/js/deps/prettify.js +1742 -0
  169. package/src/wet-boew/js/deps/prettify.min.js +1 -0
  170. package/src/wet-boew/js/deps/proj4.js +3 -0
  171. package/src/wet-boew/js/deps/proj4.min.js +1 -0
  172. package/src/wet-boew/js/deps/run_prettify.js +1998 -0
  173. package/src/wet-boew/js/deps/run_prettify.min.js +1 -0
  174. package/src/wet-boew/js/deps/tableparser.js +2216 -0
  175. package/src/wet-boew/js/deps/tableparser.min.js +1 -0
  176. package/src/wet-boew/js/deps/unorm.js +452 -0
  177. package/src/wet-boew/js/deps/unorm.min.js +1 -0
  178. package/src/wet-boew/js/i18n/af.js +246 -0
  179. package/src/wet-boew/js/i18n/af.min.js +7 -0
  180. package/src/wet-boew/js/i18n/ar.js +285 -0
  181. package/src/wet-boew/js/i18n/ar.min.js +7 -0
  182. package/src/wet-boew/js/i18n/bg.js +285 -0
  183. package/src/wet-boew/js/i18n/bg.min.js +7 -0
  184. package/src/wet-boew/js/i18n/cs.js +286 -0
  185. package/src/wet-boew/js/i18n/cs.min.js +7 -0
  186. package/src/wet-boew/js/i18n/de.js +355 -0
  187. package/src/wet-boew/js/i18n/de.min.js +7 -0
  188. package/src/wet-boew/js/i18n/el.js +285 -0
  189. package/src/wet-boew/js/i18n/el.min.js +7 -0
  190. package/src/wet-boew/js/i18n/en.js +246 -0
  191. package/src/wet-boew/js/i18n/en.min.js +7 -0
  192. package/src/wet-boew/js/i18n/es.js +288 -0
  193. package/src/wet-boew/js/i18n/es.min.js +7 -0
  194. package/src/wet-boew/js/i18n/et.js +283 -0
  195. package/src/wet-boew/js/i18n/et.min.js +7 -0
  196. package/src/wet-boew/js/i18n/fr.js +314 -0
  197. package/src/wet-boew/js/i18n/fr.min.js +7 -0
  198. package/src/wet-boew/js/i18n/hi.js +246 -0
  199. package/src/wet-boew/js/i18n/hi.min.js +7 -0
  200. package/src/wet-boew/js/i18n/hu.js +285 -0
  201. package/src/wet-boew/js/i18n/hu.min.js +7 -0
  202. package/src/wet-boew/js/i18n/hy.js +246 -0
  203. package/src/wet-boew/js/i18n/hy.min.js +7 -0
  204. package/src/wet-boew/js/i18n/id.js +284 -0
  205. package/src/wet-boew/js/i18n/id.min.js +7 -0
  206. package/src/wet-boew/js/i18n/is.js +283 -0
  207. package/src/wet-boew/js/i18n/is.min.js +7 -0
  208. package/src/wet-boew/js/i18n/it.js +312 -0
  209. package/src/wet-boew/js/i18n/it.min.js +7 -0
  210. package/src/wet-boew/js/i18n/iu.js +246 -0
  211. package/src/wet-boew/js/i18n/iu.min.js +7 -0
  212. package/src/wet-boew/js/i18n/ja.js +286 -0
  213. package/src/wet-boew/js/i18n/ja.min.js +7 -0
  214. package/src/wet-boew/js/i18n/ko.js +285 -0
  215. package/src/wet-boew/js/i18n/ko.min.js +7 -0
  216. package/src/wet-boew/js/i18n/lt.js +285 -0
  217. package/src/wet-boew/js/i18n/lt.min.js +7 -0
  218. package/src/wet-boew/js/i18n/lv.js +285 -0
  219. package/src/wet-boew/js/i18n/lv.min.js +7 -0
  220. package/src/wet-boew/js/i18n/nl.js +319 -0
  221. package/src/wet-boew/js/i18n/nl.min.js +7 -0
  222. package/src/wet-boew/js/i18n/pl.js +288 -0
  223. package/src/wet-boew/js/i18n/pl.min.js +7 -0
  224. package/src/wet-boew/js/i18n/pt-BR.js +246 -0
  225. package/src/wet-boew/js/i18n/pt-BR.min.js +7 -0
  226. package/src/wet-boew/js/i18n/pt.js +271 -0
  227. package/src/wet-boew/js/i18n/pt.min.js +7 -0
  228. package/src/wet-boew/js/i18n/ru.js +285 -0
  229. package/src/wet-boew/js/i18n/ru.min.js +7 -0
  230. package/src/wet-boew/js/i18n/sk.js +283 -0
  231. package/src/wet-boew/js/i18n/sk.min.js +7 -0
  232. package/src/wet-boew/js/i18n/sq.js +246 -0
  233. package/src/wet-boew/js/i18n/sq.min.js +7 -0
  234. package/src/wet-boew/js/i18n/th.js +285 -0
  235. package/src/wet-boew/js/i18n/th.min.js +7 -0
  236. package/src/wet-boew/js/i18n/tr.js +287 -0
  237. package/src/wet-boew/js/i18n/tr.min.js +7 -0
  238. package/src/wet-boew/js/i18n/uk.js +285 -0
  239. package/src/wet-boew/js/i18n/uk.min.js +7 -0
  240. package/src/wet-boew/js/i18n/vi.js +285 -0
  241. package/src/wet-boew/js/i18n/vi.min.js +7 -0
  242. package/src/wet-boew/js/i18n/zh-Hans.js +246 -0
  243. package/src/wet-boew/js/i18n/zh-Hans.min.js +7 -0
  244. package/src/wet-boew/js/i18n/zh.js +286 -0
  245. package/src/wet-boew/js/i18n/zh.min.js +7 -0
  246. package/src/wet-boew/js/ie8-wet-boew.js +3992 -0
  247. package/src/wet-boew/js/ie8-wet-boew.min.js +7 -0
  248. package/src/wet-boew/js/ie8-wet-boew2.js +15294 -0
  249. package/src/wet-boew/js/ie8-wet-boew2.min.js +7 -0
  250. package/src/wet-boew/js/jquery/2.2.4/jquery.js +9814 -0
  251. package/src/wet-boew/js/jquery/2.2.4/jquery.min.js +4 -0
  252. package/src/wet-boew/js/jquery/2.2.4/jquery.min.map +1 -0
  253. package/src/wet-boew/js/polyfills/datalist.js +423 -0
  254. package/src/wet-boew/js/polyfills/datalist.min.js +8 -0
  255. package/src/wet-boew/js/polyfills/datalist.min.js.map +1 -0
  256. package/src/wet-boew/js/polyfills/datalist_dynamic.js +50 -0
  257. package/src/wet-boew/js/polyfills/datalist_dynamic.min.js +8 -0
  258. package/src/wet-boew/js/polyfills/datalist_dynamic.min.js.map +1 -0
  259. package/src/wet-boew/js/polyfills/datepicker.js +338 -0
  260. package/src/wet-boew/js/polyfills/datepicker.min.js +8 -0
  261. package/src/wet-boew/js/polyfills/datepicker.min.js.map +1 -0
  262. package/src/wet-boew/js/polyfills/details.js +126 -0
  263. package/src/wet-boew/js/polyfills/details.min.js +8 -0
  264. package/src/wet-boew/js/polyfills/details.min.js.map +1 -0
  265. package/src/wet-boew/js/polyfills/jawsariafixes.js +47 -0
  266. package/src/wet-boew/js/polyfills/jawsariafixes.min.js +16 -0
  267. package/src/wet-boew/js/polyfills/jawsariafixes.min.js.map +1 -0
  268. package/src/wet-boew/js/polyfills/meter.js +140 -0
  269. package/src/wet-boew/js/polyfills/meter.min.js +8 -0
  270. package/src/wet-boew/js/polyfills/meter.min.js.map +1 -0
  271. package/src/wet-boew/js/polyfills/mobile.js +783 -0
  272. package/src/wet-boew/js/polyfills/mobile.min.js +8 -0
  273. package/src/wet-boew/js/polyfills/mobile.min.js.map +1 -0
  274. package/src/wet-boew/js/polyfills/progress.js +107 -0
  275. package/src/wet-boew/js/polyfills/progress.min.js +8 -0
  276. package/src/wet-boew/js/polyfills/progress.min.js.map +1 -0
  277. package/src/wet-boew/js/polyfills/slider.js +1343 -0
  278. package/src/wet-boew/js/polyfills/slider.min.js +9 -0
  279. package/src/wet-boew/js/polyfills/slider.min.js.map +1 -0
  280. package/src/wet-boew/js/polyfills/slider_wrapper.js +73 -0
  281. package/src/wet-boew/js/polyfills/slider_wrapper.min.js +8 -0
  282. package/src/wet-boew/js/polyfills/slider_wrapper.min.js.map +1 -0
  283. package/src/wet-boew/js/polyfills/svg.js +29 -0
  284. package/src/wet-boew/js/polyfills/svg.min.js +8 -0
  285. package/src/wet-boew/js/polyfills/svg.min.js.map +1 -0
  286. package/src/wet-boew/js/polyfills/test.js +603 -0
  287. package/src/wet-boew/js/polyfills/test.min.js +8 -0
  288. package/src/wet-boew/js/polyfills/test.min.js.map +1 -0
  289. package/src/wet-boew/js/wet-boew.js +17714 -0
  290. package/src/wet-boew/js/wet-boew.min.js +9 -0
  291. package/src/wet-boew/js/wet-boew.min.js.map +1 -0
  292. package/src/wet-boew/payload.json +1722 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @title WET-BOEW Meter polyfill
3
+ * @overview The <meter> element displays a gauge. Based on code from https://gist.github.com/667320
4
+ * @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5
+ * @author @nschonni
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-meter",
15
+ selector = "meter",
16
+ initEvent = "wb-init." + componentName,
17
+ updateEvent = "wb-update." + componentName,
18
+ $document = wb.doc,
19
+
20
+ /**
21
+ * @method init
22
+ * @param {jQuery Event} event Event that triggered the function call
23
+ */
24
+ init = function( event ) {
25
+
26
+ // Start initialization
27
+ // returns DOM object = proceed with init
28
+ // returns undefined = do not proceed with init (e.g., already initialized)
29
+ var elm = wb.init( event, componentName, selector );
30
+
31
+ if ( elm ) {
32
+ meter( elm );
33
+
34
+ // Identify that initialization has completed
35
+ wb.ready( $( elm ), componentName );
36
+ }
37
+ },
38
+
39
+ /**
40
+ * Create and update the meter visuals
41
+ * @method meter
42
+ * @param {DOM element} elm Element to be polyfilled
43
+ */
44
+ meter = function( elm ) {
45
+ var $elm = $( elm ),
46
+ min = parseFloat( $elm.attr( "min" ) || 0 ),
47
+ max = parseFloat( $elm.attr( "max" ) || 1 ),
48
+ high = parseFloat( $elm.attr( "high" ) ),
49
+ low = parseFloat( $elm.attr( "low" ) ),
50
+ optimum = parseFloat( $elm.attr( "optimum" ) ),
51
+ value = $elm.attr( "value" ) !== null ? parseFloat( $elm.attr( "value" ) ) : ( elm.textContent ? elm.textContent : elm.innerText ),
52
+ children = elm.children,
53
+ indicator, width;
54
+
55
+ if ( elm.textContent ) {
56
+ elm.textContent = "";
57
+ } else if ( elm.innerText ) {
58
+ elm.innerText = "";
59
+ }
60
+
61
+ /*
62
+ * The following inequalities must hold, as applicable:
63
+ * minimum ≤ value ≤ maximum
64
+ * minimum ≤ low ≤ maximum (if low is specified)
65
+ * minimum ≤ high ≤ maximum (if high is specified)
66
+ * minimum ≤ optimum ≤ maximum (if optimum is specified)
67
+ * low ≤ high (if both low and high are specified)
68
+ */
69
+
70
+ if ( value < min ) {
71
+ value = min;
72
+ } else if ( value > max ) {
73
+ value = max;
74
+ }
75
+
76
+ if ( low !== null && low < min ) {
77
+ low = min;
78
+ $elm.attr( "low", low );
79
+ }
80
+
81
+ if ( optimum !== null && ( optimum < min || optimum > max ) ) {
82
+ optimum = ( max - min ) / 2;
83
+ }
84
+
85
+ if ( high !== null && high > max ) {
86
+ high = max;
87
+ $elm.attr( "high", high );
88
+ }
89
+
90
+ width = elm.offsetWidth * ( ( value - min ) / ( max - min ) );
91
+
92
+ indicator = children.length === 0 ? document.createElement( "div" ) : children[ 0 ];
93
+ indicator.style.width = Math.ceil( width ) + "px";
94
+
95
+ if ( children.length === 0 ) {
96
+ elm.appendChild( indicator );
97
+ }
98
+
99
+ if ( high && value >= high ) {
100
+ $elm.addClass( "meterValueTooHigh" );
101
+ } else if ( low && value <= low ) {
102
+ $elm.addClass( "meterValueTooLow" );
103
+ } else {
104
+ $elm.removeClass( "meterValueTooHigh meterValueTooLow" );
105
+ }
106
+
107
+ if ( value >= max ) {
108
+ $elm.addClass( "meterIsMaxed" );
109
+ } else {
110
+ $elm.removeClass( "meterIsMaxed" );
111
+ }
112
+
113
+ // Set defaults as per HTML5 spec
114
+ $elm.attr( {
115
+ min: min,
116
+ max: max,
117
+ value: value,
118
+ title: $elm.attr( "title" ) || value
119
+ } ).trigger( "wb-updated." + componentName );
120
+ };
121
+
122
+ // Bind the events of the polyfill
123
+ $document.on( "timerpoke.wb " + initEvent + " " + updateEvent, selector, function( event ) {
124
+ var eventTarget = event.target;
125
+
126
+ if ( event.type === "wb-update" ) {
127
+ if ( event.namespace === componentName &&
128
+ event.currentTarget === eventTarget ) {
129
+
130
+ meter( eventTarget );
131
+ }
132
+ } else {
133
+ init( event );
134
+ }
135
+ } );
136
+
137
+ // Add the timer poke to initialize the polyfill
138
+ wb.add( selector );
139
+
140
+ } )( 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(u,a){"use strict";var m="wb-meter",r="meter",t=a.doc,n=function(t){var e,a=u(t),r=parseFloat(a.attr("min")||0),n=parseFloat(a.attr("max")||1),l=parseFloat(a.attr("high")),o=parseFloat(a.attr("low")),i=parseFloat(a.attr("optimum")),d=null!==a.attr("value")?parseFloat(a.attr("value")):t.textContent||t.innerText,s=t.children;t.textContent?t.textContent="":t.innerText&&(t.innerText=""),d<r?d=r:n<d&&(d=n),null!==o&&o<r&&(o=r,a.attr("low",o)),null!==i&&(i<r||n<i)&&(i=(n-r)/2),null!==l&&n<l&&(l=n,a.attr("high",l)),e=t.offsetWidth*((d-r)/(n-r)),(i=0===s.length?document.createElement("div"):s[0]).style.width=Math.ceil(e)+"px",0===s.length&&t.appendChild(i),l&&l<=d?a.addClass("meterValueTooHigh"):o&&d<=o?a.addClass("meterValueTooLow"):a.removeClass("meterValueTooHigh meterValueTooLow"),n<=d?a.addClass("meterIsMaxed"):a.removeClass("meterIsMaxed"),a.attr({min:r,max:n,value:d,title:a.attr("title")||d}).trigger("wb-updated."+m)};t.on("timerpoke.wb wb-init.wb-meter wb-update.wb-meter",r,function(t){var e=t.target;"wb-update"===t.type?t.namespace===m&&t.currentTarget===e&&n(e):function(t){t=a.init(t,m,r);t&&(n(t),a.ready(u(t),m))}(t)}),a.add(r)}(jQuery,(window,wb));
8
+ //# sourceMappingURL=meter.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter.min.js","sources":["meter.js"],"names":["$","wb","componentName","selector","$document","doc","meter","elm","width","$elm","min","parseFloat","attr","max","high","low","optimum","value","textContent","innerText","children","offsetWidth","indicator","length","document","createElement","style","Math","ceil","appendChild","addClass","removeClass","title","trigger","on","event","eventTarget","target","type","namespace","currentTarget","init","ready","add","jQuery","window"],"mappings":";;;;;;CAMA,SAAYA,EAAWC,gBAOvB,IAAIC,EAAgB,WACnBC,EAAW,QAGXC,EAAYH,EAAGI,IA0BfC,EAAQ,SAAUC,GACjB,IAQYC,EARRC,EAAOT,EAAGO,GACbG,EAAMC,WAAYF,EAAKG,KAAM,QAAW,GACxCC,EAAMF,WAAYF,EAAKG,KAAM,QAAW,GACxCE,EAAOH,WAAYF,EAAKG,KAAM,SAC9BG,EAAMJ,WAAYF,EAAKG,KAAM,QAC7BI,EAAUL,WAAYF,EAAKG,KAAM,YACjCK,EAAiC,OAAzBR,EAAKG,KAAM,SAAqBD,WAAYF,EAAKG,KAAM,UAAgBL,EAAIW,aAAgCX,EAAIY,UACvHC,EAAWb,EAAIa,SAGXb,EAAIW,YACRX,EAAIW,YAAc,GACPX,EAAIY,YACfZ,EAAIY,UAAY,IAYZF,EAAQP,EACZO,EAAQP,EACWG,EAARI,IACXA,EAAQJ,GAGI,OAARE,GAAgBA,EAAML,IAC1BK,EAAML,EACND,EAAKG,KAAM,MAAOG,IAGF,OAAZC,IAAsBA,EAAUN,GAAiBG,EAAVG,KAC3CA,GAAYH,EAAMH,GAAQ,GAGb,OAATI,GAAwBD,EAAPC,IACrBA,EAAOD,EACPJ,EAAKG,KAAM,OAAQE,IAGpBN,EAAQD,EAAIc,cAAkBJ,EAAQP,IAAUG,EAAMH,KAEtDY,EAAgC,IAApBF,EAASG,OAAeC,SAASC,cAAe,OAAUL,EAAU,IACtEM,MAAMlB,MAAQmB,KAAKC,KAAMpB,GAAU,KAEpB,IAApBY,EAASG,QACbhB,EAAIsB,YAAaP,GAGbR,GAAiBA,GAATG,EACZR,EAAKqB,SAAU,qBACJf,GAAOE,GAASF,EAC3BN,EAAKqB,SAAU,oBAEfrB,EAAKsB,YAAa,sCAGLlB,GAATI,EACJR,EAAKqB,SAAU,gBAEfrB,EAAKsB,YAAa,gBAInBtB,EAAKG,KAAM,CACVF,IAAKA,EACLG,IAAKA,EACLI,MAAOA,EACPe,MAAOvB,EAAKG,KAAM,UAAaK,IAC5BgB,QAAS,cAAgB/B,IAI/BE,EAAU8B,GAAI,mDAAkD/B,EAAU,SAAUgC,GACnF,IAAIC,EAAcD,EAAME,OAEJ,cAAfF,EAAMG,KACLH,EAAMI,YAAcrC,GACxBiC,EAAMK,gBAAkBJ,GAExB9B,EAAO8B,GA1GF,SAAUD,GAKZ5B,EAAMN,EAAGwC,KAAMN,EAAOjC,EAAeC,GAEpCI,IACJD,EAAOC,GAGPN,EAAGyC,MAAO1C,EAAGO,GAAOL,IAkGrBuC,CAAMN,KAKRlC,EAAG0C,IAAKxC,GAnIR,CAqIKyC,QAAQC,OAAQ5C"}