@mgdis/mg-components 5.17.0 → 5.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist/cjs/{mg-menu.conf-43aacf30.js → components.utils-dc9c8a53.js} +160 -7
  2. package/dist/cjs/components.utils-dc9c8a53.js.map +1 -0
  3. package/dist/cjs/index-c042e24b.js +18 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/mg-action-more_34.cjs.entry.js +761 -582
  6. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  7. package/dist/cjs/mg-components.cjs.js +1 -1
  8. package/dist/cjs/mg-item-more.cjs.entry.js +5 -5
  9. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/atoms/mg-badge/mg-badge.js +9 -9
  11. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  12. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +5 -5
  13. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +1 -1
  14. package/dist/collection/components/atoms/mg-button/mg-button.js +12 -12
  15. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  16. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +4 -4
  17. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +1 -1
  18. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +3 -3
  19. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +1 -1
  20. package/dist/collection/components/atoms/mg-card/mg-card.js +9 -9
  21. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
  22. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +3 -3
  23. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -1
  24. package/dist/collection/components/atoms/mg-divider/mg-divider.js +4 -4
  25. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
  26. package/dist/collection/components/atoms/mg-icon/mg-icon.js +13 -15
  27. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  28. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +4 -4
  29. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +1 -1
  30. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +5 -4
  31. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
  32. package/dist/collection/components/atoms/mg-tag/mg-tag.js +9 -9
  33. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  34. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js +23 -0
  35. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js.map +1 -0
  36. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +5 -5
  37. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +1 -1
  38. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
  39. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
  40. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +37 -17
  41. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  42. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +7 -1
  43. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +1 -1
  44. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +9 -1
  45. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +1 -1
  46. package/dist/collection/components/molecules/inputs/MgInput.js +12 -11
  47. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +4 -4
  49. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
  50. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +2 -2
  51. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  52. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  53. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +111 -38
  54. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  55. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +21 -27
  56. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +1 -1
  57. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +62 -6
  58. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +1 -1
  59. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +84 -13
  60. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  61. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +55 -0
  62. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +1 -1
  63. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +115 -44
  64. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  65. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +55 -0
  66. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +1 -1
  67. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +88 -15
  68. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  69. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +55 -0
  70. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +1 -1
  71. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +87 -14
  72. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  73. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +1 -1
  74. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +1 -1
  75. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +60 -0
  76. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +1 -1
  77. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +87 -14
  78. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  79. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +55 -0
  80. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +1 -1
  81. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +5 -0
  82. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +1 -0
  83. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +151 -34
  84. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  85. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js +147 -0
  86. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js.map +1 -0
  87. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +80 -7
  88. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +1 -1
  89. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +110 -36
  90. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  91. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +69 -6
  92. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +1 -1
  93. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -9
  94. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  95. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +2 -2
  96. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +1 -1
  97. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +2 -2
  98. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  99. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +8 -9
  100. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  101. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +6 -6
  102. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  103. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -4
  104. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  105. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +1 -1
  106. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +1 -1
  107. package/dist/collection/components/molecules/mg-form/mg-form.js +6 -6
  108. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  109. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +4 -4
  110. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +1 -1
  111. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +7 -7
  112. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  113. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +5 -4
  114. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  115. package/dist/collection/components/molecules/mg-message/mg-message.js +8 -8
  116. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  117. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +11 -11
  118. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +1 -1
  119. package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -8
  120. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  121. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +7 -7
  122. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +1 -1
  123. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +3 -3
  124. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +1 -1
  125. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +1 -1
  126. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +1 -1
  127. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
  128. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  129. package/dist/collection/components/molecules/mg-panel/mg-panel.js +17 -15
  130. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  131. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +3 -3
  132. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +1 -1
  133. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +11 -21
  134. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +1 -1
  135. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +4 -4
  136. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  137. package/dist/collection/components/molecules/mg-popover/mg-popover.js +36 -16
  138. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  139. package/dist/collection/components/molecules/mg-popover/test/{mg-popover.e2e.js → mg-popover.e2e.playwright.js} +54 -62
  140. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js.map +1 -0
  141. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +12 -0
  142. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +1 -1
  143. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -6
  144. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  145. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +34 -34
  146. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  147. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +13 -13
  148. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +1 -1
  149. package/dist/collection/locales/en/messages.json +3 -3
  150. package/dist/collection/locales/fr/messages.json +3 -3
  151. package/dist/collection/utils/components.utils.js +16 -0
  152. package/dist/collection/utils/components.utils.js.map +1 -1
  153. package/dist/collection/utils/components.utils.spec.js +22 -1
  154. package/dist/collection/utils/components.utils.spec.js.map +1 -1
  155. package/dist/collection/variables.css +1 -275
  156. package/dist/components/MgInput.js +17 -16
  157. package/dist/components/MgInput.js.map +1 -1
  158. package/dist/components/components.utils.js +17 -1
  159. package/dist/components/components.utils.js.map +1 -1
  160. package/dist/components/index2.js +6 -6
  161. package/dist/components/mg-action-more.js +5 -5
  162. package/dist/components/mg-action-more.js.map +1 -1
  163. package/dist/components/mg-badge2.js +8 -8
  164. package/dist/components/mg-badge2.js.map +1 -1
  165. package/dist/components/mg-button2.js +11 -11
  166. package/dist/components/mg-button2.js.map +1 -1
  167. package/dist/components/mg-card2.js +8 -8
  168. package/dist/components/mg-card2.js.map +1 -1
  169. package/dist/components/mg-character-left2.js +1 -1
  170. package/dist/components/mg-character-left2.js.map +1 -1
  171. package/dist/components/mg-details.js +4 -3
  172. package/dist/components/mg-details.js.map +1 -1
  173. package/dist/components/mg-divider.js +3 -3
  174. package/dist/components/mg-divider.js.map +1 -1
  175. package/dist/components/mg-form.js +4 -4
  176. package/dist/components/mg-form.js.map +1 -1
  177. package/dist/components/mg-icon2.js +12 -14
  178. package/dist/components/mg-icon2.js.map +1 -1
  179. package/dist/components/mg-illustrated-message.js +7 -7
  180. package/dist/components/mg-illustrated-message.js.map +1 -1
  181. package/dist/components/mg-input-checkbox-paginated2.js +8 -8
  182. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  183. package/dist/components/mg-input-checkbox.js +70 -34
  184. package/dist/components/mg-input-checkbox.js.map +1 -1
  185. package/dist/components/mg-input-date.js +45 -12
  186. package/dist/components/mg-input-date.js.map +1 -1
  187. package/dist/components/mg-input-numeric.js +76 -43
  188. package/dist/components/mg-input-numeric.js.map +1 -1
  189. package/dist/components/mg-input-password.js +49 -14
  190. package/dist/components/mg-input-password.js.map +1 -1
  191. package/dist/components/mg-input-radio.js +48 -13
  192. package/dist/components/mg-input-radio.js.map +1 -1
  193. package/dist/components/mg-input-select2.js +48 -13
  194. package/dist/components/mg-input-select2.js.map +1 -1
  195. package/dist/components/mg-input-text2.js +83 -33
  196. package/dist/components/mg-input-text2.js.map +1 -1
  197. package/dist/components/mg-input-textarea.js +69 -35
  198. package/dist/components/mg-input-textarea.js.map +1 -1
  199. package/dist/components/mg-input-title2.js +4 -3
  200. package/dist/components/mg-input-title2.js.map +1 -1
  201. package/dist/components/mg-input-toggle.js +9 -9
  202. package/dist/components/mg-input-toggle.js.map +1 -1
  203. package/dist/components/mg-item-more.js +4 -3
  204. package/dist/components/mg-item-more.js.map +1 -1
  205. package/dist/components/mg-menu-item2.js +7 -8
  206. package/dist/components/mg-menu-item2.js.map +1 -1
  207. package/dist/components/mg-menu2.js +1 -1
  208. package/dist/components/mg-menu2.js.map +1 -1
  209. package/dist/components/mg-message.js +7 -7
  210. package/dist/components/mg-message.js.map +1 -1
  211. package/dist/components/mg-modal.js +7 -7
  212. package/dist/components/mg-modal.js.map +1 -1
  213. package/dist/components/mg-pagination2.js +2 -2
  214. package/dist/components/mg-pagination2.js.map +1 -1
  215. package/dist/components/mg-panel.js +16 -15
  216. package/dist/components/mg-panel.js.map +1 -1
  217. package/dist/components/mg-popover-content2.js +4 -4
  218. package/dist/components/mg-popover-content2.js.map +1 -1
  219. package/dist/components/mg-popover2.js +33 -14
  220. package/dist/components/mg-popover2.js.map +1 -1
  221. package/dist/components/mg-skip-links.js +4 -5
  222. package/dist/components/mg-skip-links.js.map +1 -1
  223. package/dist/components/mg-tabs.js +33 -33
  224. package/dist/components/mg-tabs.js.map +1 -1
  225. package/dist/components/mg-tag.js +8 -8
  226. package/dist/components/mg-tag.js.map +1 -1
  227. package/dist/components/mg-tooltip-content2.js +1 -1
  228. package/dist/components/mg-tooltip-content2.js.map +1 -1
  229. package/dist/components/mg-tooltip2.js +34 -15
  230. package/dist/components/mg-tooltip2.js.map +1 -1
  231. package/dist/esm/{mg-menu.conf-012fc9b4.js → components.utils-0f76010d.js} +153 -8
  232. package/dist/esm/components.utils-0f76010d.js.map +1 -0
  233. package/dist/esm/index-ce01e63b.js +18 -1
  234. package/dist/esm/loader.js +1 -1
  235. package/dist/esm/mg-action-more_34.entry.js +697 -518
  236. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  237. package/dist/esm/mg-components.js +1 -1
  238. package/dist/esm/mg-item-more.entry.js +4 -4
  239. package/dist/esm/mg-item-more.entry.js.map +1 -1
  240. package/dist/mg-components/locales/en/messages.json +3 -3
  241. package/dist/mg-components/locales/fr/messages.json +3 -3
  242. package/dist/mg-components/mg-components.css +1 -1
  243. package/dist/mg-components/mg-components.esm.js +1 -1
  244. package/dist/mg-components/mg-components.esm.js.map +1 -1
  245. package/dist/mg-components/p-768fc594.entry.js +2 -0
  246. package/dist/mg-components/p-768fc594.entry.js.map +1 -0
  247. package/dist/mg-components/p-c9e2c669.js +2 -0
  248. package/dist/mg-components/p-c9e2c669.js.map +1 -0
  249. package/dist/mg-components/p-d2d6afec.entry.js +2 -0
  250. package/dist/mg-components/p-d2d6afec.entry.js.map +1 -0
  251. package/dist/mg-components/variables.css +1 -275
  252. package/dist/types/components/atoms/mg-card/mg-card.d.ts +1 -1
  253. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -1
  254. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +4 -3
  255. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +1 -1
  256. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +4 -4
  257. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +22 -1
  258. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +17 -2
  259. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +35 -20
  260. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +16 -1
  261. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +16 -1
  262. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +16 -1
  263. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.conf.d.ts +12 -0
  264. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +30 -6
  265. package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts +1 -0
  266. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +17 -5
  267. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +2 -1
  268. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  269. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +3 -3
  270. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +2 -1
  271. package/dist/types/components/molecules/mg-popover/test/mg-popover.e2e.playwright.d.ts +1 -0
  272. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +6 -5
  273. package/dist/types/components.d.ts +71 -13
  274. package/dist/types/utils/components.utils.d.ts +12 -0
  275. package/package.json +17 -18
  276. package/readme.md +0 -31
  277. package/dist/cjs/mg-menu.conf-43aacf30.js.map +0 -1
  278. package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -116
  279. package/dist/collection/components/atoms/mg-button/mg-button.css +0 -182
  280. package/dist/collection/components/atoms/mg-card/mg-card.css +0 -75
  281. package/dist/collection/components/atoms/mg-character-left/mg-character-left.css +0 -3
  282. package/dist/collection/components/atoms/mg-divider/mg-divider.css +0 -9
  283. package/dist/collection/components/atoms/mg-icon/mg-icon.css +0 -138
  284. package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +0 -12
  285. package/dist/collection/components/atoms/mg-tag/mg-tag.css +0 -131
  286. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js +0 -37
  287. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.js.map +0 -1
  288. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.css +0 -43
  289. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +0 -3
  290. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +0 -268
  291. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +0 -211
  292. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +0 -257
  293. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +0 -254
  294. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +0 -179
  295. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +0 -264
  296. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +0 -304
  297. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js +0 -171
  298. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.js.map +0 -1
  299. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +0 -303
  300. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +0 -233
  301. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +0 -37
  302. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +0 -377
  303. package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +0 -39
  304. package/dist/collection/components/molecules/mg-details/mg-details.css +0 -64
  305. package/dist/collection/components/molecules/mg-form/mg-form.css +0 -19
  306. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +0 -45
  307. package/dist/collection/components/molecules/mg-item-more/mg-item-more.css +0 -30
  308. package/dist/collection/components/molecules/mg-message/mg-message.css +0 -82
  309. package/dist/collection/components/molecules/mg-modal/mg-modal.css +0 -67
  310. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +0 -47
  311. package/dist/collection/components/molecules/mg-panel/mg-panel.css +0 -64
  312. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.css +0 -135
  313. package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -11
  314. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.js.map +0 -1
  315. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.css +0 -28
  316. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +0 -99
  317. package/dist/collection/styles/a11y.scss +0 -36
  318. package/dist/collection/styles/fonts.scss +0 -21
  319. package/dist/collection/styles/form.scss +0 -3
  320. package/dist/collection/styles/global.scss +0 -80
  321. package/dist/collection/styles/layout.scss +0 -29
  322. package/dist/collection/styles/main.scss +0 -23
  323. package/dist/collection/styles/mg-icon-animation.scss +0 -6
  324. package/dist/collection/styles/navigation-button.scss +0 -77
  325. package/dist/collection/styles/reset-mg-card-slotted-variables.scss +0 -11
  326. package/dist/collection/styles/typography.scss +0 -82
  327. package/dist/collection/styles/utilities.scss +0 -21
  328. package/dist/collection/test/typography.e2e.playwright.js +0 -12
  329. package/dist/collection/test/typography.e2e.playwright.js.map +0 -1
  330. package/dist/esm/mg-menu.conf-012fc9b4.js.map +0 -1
  331. package/dist/mg-components/p-1d7d6fa0.js +0 -2
  332. package/dist/mg-components/p-1d7d6fa0.js.map +0 -1
  333. package/dist/mg-components/p-9257e8f1.entry.js +0 -2
  334. package/dist/mg-components/p-9257e8f1.entry.js.map +0 -1
  335. package/dist/mg-components/p-caafc9cf.entry.js +0 -2
  336. package/dist/mg-components/p-caafc9cf.entry.js.map +0 -1
  337. package/dist/mg-components/styles/a11y.scss +0 -36
  338. package/dist/mg-components/styles/fonts.scss +0 -21
  339. package/dist/mg-components/styles/form.scss +0 -3
  340. package/dist/mg-components/styles/global.scss +0 -80
  341. package/dist/mg-components/styles/layout.scss +0 -29
  342. package/dist/mg-components/styles/main.scss +0 -23
  343. package/dist/mg-components/styles/mg-icon-animation.scss +0 -6
  344. package/dist/mg-components/styles/navigation-button.scss +0 -77
  345. package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +0 -11
  346. package/dist/mg-components/styles/typography.scss +0 -82
  347. package/dist/mg-components/styles/utilities.scss +0 -21
  348. /package/dist/types/{test/typography.e2e.playwright.d.ts → components/atoms/mg-tag/test/mg-tag.e2e.playwright.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"mg-input-numeric.spec.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.tsx"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,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,CAAC;IACpB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;IACrB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC;IACzB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { MgInputNumeric } from '../mg-input-numeric';\nimport { MgButton } from '../../../../atoms/mg-button/mg-button';\nimport { MgIcon } from '../../../../atoms/mg-icon/mg-icon';\nimport messages from '../../../../../locales/en/messages.json';\nimport { localeCurrency, localeNumber } from '../../../../../utils/locale.utils';\nimport { types } from '../mg-input-numeric.conf';\n\nconst getPage = (args, slot?) => {\n const page = newSpecPage({\n components: [MgInputNumeric, MgButton, MgIcon],\n template: () => <mg-input-numeric {...args}>{slot}</mg-input-numeric>,\n });\n jest.runAllTimers();\n return page;\n};\n\ndescribe('mg-input-numeric', () => {\n beforeEach(() => jest.useFakeTimers());\n afterEach(() => jest.runOnlyPendingTimers());\n describe.each(types)('type %s', type => {\n test.each([\n { label: 'label', identifier: 'identifier', type },\n { label: 'label', identifier: 'identifier', type, labelHide: true },\n { label: 'label', identifier: 'identifier', type, labelOnTop: true },\n { label: 'label', identifier: 'identifier', type, readonly: true },\n { label: 'label', identifier: 'identifier', type, readonly: true, labelOnTop: true, tooltip: 'Tooltip message' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890' },\n { label: 'label', identifier: 'identifier', type, disabled: true, value: '1234567890' },\n { label: 'label', identifier: 'identifier', type, required: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, required: true, readonly: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, required: true, disabled: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, tooltip: 'My Tooltip Message' },\n { label: 'label', identifier: 'identifier', type, tooltip: 'My Tooltip Message', labelOnTop: true },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', currency: 'EUR' },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', lang: 'fr' },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', lang: 'xx' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890', lang: 'fr' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890', lang: 'xx' },\n ])('Should render with args %s:', async args => {\n const { root } = await getPage(args);\n expect(root).toMatchSnapshot();\n });\n\n test('Should update display value when value props change', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', type });\n const element = page.doc.querySelector('mg-input-numeric');\n\n expect(page.root).toMatchSnapshot();\n\n element.value = '10';\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each([\n <mg-button slot=\"append-input\" label=\"search\" identifier=\"button-identifier\">\n <mg-icon icon=\"calculator\"></mg-icon> Calculate\n </mg-button>,\n <span slot=\"append-input\">km</span>,\n ])('Should render with slot.', async slot => {\n const args = { label: 'label', identifier: 'identifier', type };\n const { root } = await getPage(args, slot);\n expect(root).toMatchSnapshot();\n });\n\n test.each(['', ' ', undefined])('Should not render with invalid identifier property: %s', async identifier => {\n expect.assertions(1);\n try {\n await getPage({ identifier });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"identifier\" is required.');\n }\n });\n test.each(['', ' ', undefined])('Should throw error with invalid label property: %s', async label => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label, type });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"label\" is required.');\n }\n });\n\n test('Should throw an error with labelOnTop & labelHide set to true', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'batman', labelOnTop: true, labelHide: true });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"labelOnTop\" must not be paired with the prop \"labelHide\"');\n }\n });\n\n test('Should throw an error with non positive integer length value', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'label', integerLength: 0 });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"integer-length\" must be a positive number.');\n }\n });\n\n test('Should throw an error with non positive decimal length value', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'label', decimalLength: 0 });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.');\n }\n });\n\n test('Should trigger events', async () => {\n const inputValue = '1234567890';\n const args = { label: 'label', identifier: 'identifier', type, helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: false,\n })),\n });\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.dispatchEvent(new CustomEvent('focus', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot(); //Snapshot on focus\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n });\n\n describe.each(['readonly', 'disabled'])('validity, case next state is %s', nextState => {\n test.each([\n { validity: true, valueMissing: false },\n { validity: false, valueMissing: true },\n ])('validity (%s), valueMissing (%s)', async ({ validity, valueMissing }) => {\n const args = { label: 'label', identifier: 'identifier', type };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => validity);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing,\n })),\n });\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (validity) {\n expect(page.rootInstance.errorMessage).toBeUndefined();\n } else if (valueMissing) {\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n }\n expect(page.rootInstance.valid).toEqual(validity);\n expect(page.rootInstance.invalid).toEqual(!validity);\n if (valueMissing) {\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled FALSE\n element[nextState] = true;\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled TRUE\n }\n });\n });\n\n test.each([\n { label: 'label', identifier: 'identifier', type, min: 10, max: undefined, value: 5 },\n { label: 'label', identifier: 'identifier', type, min: undefined, max: 10, value: 20 },\n { label: 'label', identifier: 'identifier', type, min: 10, max: 20, value: 5 },\n { label: 'label', identifier: 'identifier', type, min: 10, max: 20, value: 25 },\n ])('Should return error when value does not match min and max setting (%s)', async args => {\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n input.checkValidity = jest.fn(() => true);\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (args.min !== undefined && args.max === undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.min\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n } else if (args.min === undefined && args.max !== undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.max\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n } else if (args.min !== undefined && args.max !== undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.minMax\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n }\n\n expect(page.rootInstance.valid).toEqual(false);\n expect(page.rootInstance.invalid).toEqual(true);\n\n // as nullish value is a '' we set a null value with ''\n input.value = '';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.valid).toEqual(true);\n expect(page.rootInstance.invalid).toEqual(false);\n });\n\n test('Should filter entered value', async () => {\n const inputValue = '1';\n const args = { label: 'label', identifier: 'identifier', type, helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.value = 'a';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(null);\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n\n input.value = `${inputValue}a`;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n });\n\n test(\"display error with displayError component's public method\", async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n });\n\n test.each(['', 'blu'])('Should throw error with invalid type property: %s', async type => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'Blu', type });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"type\" must be one of:');\n }\n });\n\n test.each(['fr', 'xx'])('display error message with locale: %s', async lang => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true, lang });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test('Should remove error on input', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n input.value = 'blu';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n });\n\n test('Should remove error on input when required change dynamically', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n element.required = false;\n await page.waitForChanges();\n\n // Error message should disapear and change the hasDisplayedError status\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n element.required = true;\n await page.waitForChanges();\n\n // If back on required the message is still not displayed\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n });\n\n it('should manage negative number', async () => {\n const args = { label: 'label', identifier: 'identifier' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n input.checkValidity = jest.fn(() => true);\n\n /**\n * update input value\n * @param value - to update input with\n */\n const updateInputValue = async (value: string): Promise<void> => {\n input.value = value;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n };\n\n for await (const newValue of ['-', '-5']) {\n await updateInputValue(newValue);\n expect(input.value).toEqual(newValue === '-' ? '' : '-5');\n expect(page.rootInstance.valid).toEqual(true);\n expect(page.rootInstance.invalid).toEqual(false);\n }\n });\n\n test('Should update mg-width', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier' });\n const element = page.doc.querySelector('mg-input-numeric');\n\n element.mgWidth = 2;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 4;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 16;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 'full';\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}
1
+ {"version":3,"file":"mg-input-numeric.spec.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.tsx"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAK,EAAE,EAAE;EAC9B,MAAM,IAAI,GAAG,WAAW,CAAC;IACvB,UAAU,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC;IAC9C,QAAQ,EAAE,GAAG,EAAE,CAAC,wCAAsB,IAAI,GAAG,IAAI,CA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;;EACH,CAAC,CAAC,CAAC;EAEH,IAAI,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;IACxC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAE3D,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;IACrB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC;IACzB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { MgInputNumeric } from '../mg-input-numeric';\nimport { MgButton } from '../../../../atoms/mg-button/mg-button';\nimport { MgIcon } from '../../../../atoms/mg-icon/mg-icon';\nimport messages from '../../../../../locales/en/messages.json';\nimport { localeCurrency, localeNumber } from '../../../../../utils/locale.utils';\nimport { types } from '../mg-input-numeric.conf';\n\nconst getPage = (args, slot?) => {\n const page = newSpecPage({\n components: [MgInputNumeric, MgButton, MgIcon],\n template: () => <mg-input-numeric {...args}>{slot}</mg-input-numeric>,\n });\n jest.runAllTimers();\n return page;\n};\n\ndescribe('mg-input-numeric', () => {\n beforeEach(() => jest.useFakeTimers());\n afterEach(() => jest.runOnlyPendingTimers());\n describe.each(types)('type %s', type => {\n test.each([\n { label: 'label', identifier: 'identifier', type },\n { label: 'label', identifier: 'identifier', type, labelHide: true },\n { label: 'label', identifier: 'identifier', type, labelOnTop: true },\n { label: 'label', identifier: 'identifier', type, readonly: true },\n { label: 'label', identifier: 'identifier', type, readonly: true, labelOnTop: true, tooltip: 'Tooltip message' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890' },\n { label: 'label', identifier: 'identifier', type, disabled: true, value: '1234567890' },\n { label: 'label', identifier: 'identifier', type, required: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, required: true, readonly: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, required: true, disabled: true, value: '1234567890', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', type, tooltip: 'My Tooltip Message' },\n { label: 'label', identifier: 'identifier', type, tooltip: 'My Tooltip Message', labelOnTop: true },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', currency: 'EUR' },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', lang: 'fr' },\n { label: 'label', identifier: 'identifier', type, value: '1234567890', lang: 'xx' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890', lang: 'fr' },\n { label: 'label', identifier: 'identifier', type, readonly: true, value: '1234567890', lang: 'xx' },\n ])('Should render with args %s:', async args => {\n const { root } = await getPage(args);\n expect(root).toMatchSnapshot();\n });\n\n test('Should update display value when value props change', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', type });\n const element = page.doc.querySelector('mg-input-numeric');\n\n expect(page.root).toMatchSnapshot();\n\n element.value = '10';\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each([\n <mg-button slot=\"append-input\" label=\"search\" identifier=\"button-identifier\">\n <mg-icon icon=\"calculator\"></mg-icon> Calculate\n </mg-button>,\n <span slot=\"append-input\">km</span>,\n ])('Should render with slot.', async slot => {\n const args = { label: 'label', identifier: 'identifier', type };\n const { root } = await getPage(args, slot);\n expect(root).toMatchSnapshot();\n });\n\n test.each(['', ' ', undefined])('Should not render with invalid identifier property: %s', async identifier => {\n expect.assertions(1);\n try {\n await getPage({ identifier });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"identifier\" is required.');\n }\n });\n test.each(['', ' ', undefined])('Should throw error with invalid label property: %s', async label => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label, type });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"label\" is required.');\n }\n });\n\n test('Should throw an error with labelOnTop & labelHide set to true', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'batman', labelOnTop: true, labelHide: true });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"labelOnTop\" must not be paired with the prop \"labelHide\"');\n }\n });\n\n test('Should throw an error with non positive integer length value', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'label', integerLength: 0 });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"integer-length\" must be a positive number.');\n }\n });\n\n test('Should throw an error with non positive decimal length value', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'label', decimalLength: 0 });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.');\n }\n });\n\n test('Should trigger events', async () => {\n const inputValue = '1234567890';\n const args = { label: 'label', identifier: 'identifier', type, helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: false,\n })),\n });\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.dispatchEvent(new CustomEvent('focus', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot(); //Snapshot on focus\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n });\n\n describe.each(['readonly', 'disabled'])('validity, case next state is %s', nextState => {\n test.each([\n { validity: true, valueMissing: false },\n { validity: false, valueMissing: true },\n ])('validity (%s), valueMissing (%s)', async ({ validity, valueMissing }) => {\n const args = { label: 'label', identifier: 'identifier', type };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => validity);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing,\n })),\n });\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (validity) {\n expect(page.rootInstance.errorMessage).toBeUndefined();\n } else if (valueMissing) {\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n }\n expect(page.rootInstance.valid).toEqual(validity);\n expect(page.rootInstance.invalid).toEqual(!validity);\n if (valueMissing) {\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled FALSE\n element[nextState] = true;\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled TRUE\n }\n });\n });\n\n test.each([\n { label: 'label', identifier: 'identifier', type, min: 10, max: undefined, value: 5 },\n { label: 'label', identifier: 'identifier', type, min: undefined, max: 10, value: 20 },\n { label: 'label', identifier: 'identifier', type, min: 10, max: 20, value: 5 },\n { label: 'label', identifier: 'identifier', type, min: 10, max: 20, value: 25 },\n ])('Should return error when value does not match min and max setting (%s)', async args => {\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n input.checkValidity = jest.fn(() => true);\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (args.min !== undefined && args.max === undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.min\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n } else if (args.min === undefined && args.max !== undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.max\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n } else if (args.min !== undefined && args.max !== undefined) {\n expect(page.rootInstance.errorMessage).toEqual(\n messages.errors.numeric.minMax\n .replace('{min}', `${type === 'currency' ? localeCurrency(args.min, 'en', 'USD') : localeNumber(args.min, 'en')}`)\n .replace('{max}', `${type === 'currency' ? localeCurrency(args.max, 'en', 'USD') : localeNumber(args.max, 'en')}`),\n );\n }\n\n expect(page.rootInstance.valid).toEqual(false);\n expect(page.rootInstance.invalid).toEqual(true);\n\n // as nullish value is a '' we set a null value with ''\n input.value = '';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.valid).toEqual(true);\n expect(page.rootInstance.invalid).toEqual(false);\n });\n\n test('Should filter entered value', async () => {\n const inputValue = '1';\n const args = { label: 'label', identifier: 'identifier', type, helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.value = 'a';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(null);\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n\n input.value = `${inputValue}a`;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(parseFloat(inputValue));\n });\n\n test(\"display error with displayError component's public method\", async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n });\n\n test.each([\n {\n valid: true,\n errorMessage: 'Override error',\n },\n {\n valid: false,\n errorMessage: 'Override error',\n },\n ])(\"should display override error with setError component's public method\", async params => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n Object.defineProperty(input, 'validity', {\n get: () => ({}),\n });\n\n await element.setError(params.valid, params.errorMessage);\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each([\n {\n valid: '',\n errorMessage: 'Override error',\n error: '<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean',\n },\n {\n valid: undefined,\n errorMessage: 'Override error',\n error: '<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean',\n },\n {\n valid: true,\n errorMessage: ' ',\n error: '<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string',\n },\n {\n valid: true,\n errorMessage: true,\n error: '<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string',\n },\n ])(\"shloud throw error with setError component's public method invalid params\", async params => {\n expect.assertions(1);\n try {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-numeric');\n\n await element.setError(params.valid as unknown as boolean, params.errorMessage as unknown as string);\n await page.waitForChanges();\n } catch (err) {\n expect(err.message).toMatch(params.error);\n }\n });\n\n test.each(['', 'blu'])('Should throw error with invalid type property: %s', async type => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'Blu', type });\n } catch (err) {\n expect(err.message).toMatch('<mg-input-numeric> prop \"type\" must be one of:');\n }\n });\n\n test.each(['fr', 'xx'])('display error message with locale: %s', async lang => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true, lang });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test('Should remove error on input', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n input.value = 'blu';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n });\n\n test('Should remove error on input when required change dynamically', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n element.required = false;\n await page.waitForChanges();\n\n // Error message should disapear and change the hasDisplayedError status\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n element.required = true;\n await page.waitForChanges();\n\n // If back on required the message is still not displayed\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n });\n\n it('should manage negative number', async () => {\n const args = { label: 'label', identifier: 'identifier' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-numeric');\n const input = element.shadowRoot.querySelector('input');\n\n input.checkValidity = jest.fn(() => true);\n\n /**\n * update input value\n * @param value - to update input with\n */\n const updateInputValue = async (value: string): Promise<void> => {\n input.value = value;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n };\n\n for await (const newValue of ['-', '-5']) {\n await updateInputValue(newValue);\n expect(input.value).toEqual(newValue === '-' ? '' : '-5');\n expect(page.rootInstance.valid).toEqual(true);\n expect(page.rootInstance.invalid).toEqual(false);\n }\n });\n\n test('Should update mg-width', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier' });\n const element = page.doc.querySelector('mg-input-numeric');\n\n element.mgWidth = 2;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 4;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 16;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 'full';\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { MgInput } from "../MgInput";
3
- import { ClassList } from "../../../../utils/components.utils";
3
+ import { ClassList, isValidString } from "../../../../utils/components.utils";
4
4
  import { initLocales } from "../../../../locales";
5
5
  export class MgInputPassword {
6
6
  constructor() {
@@ -27,20 +27,23 @@ export class MgInputPassword {
27
27
  */
28
28
  this.checkValidity = () => {
29
29
  var _a;
30
- this.valid = this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true);
31
- this.invalid = !this.valid;
32
- // We need to send valid event even if it is the same value
33
- this.inputValid.emit(this.valid);
30
+ this.setValidity(this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true));
34
31
  };
35
32
  /**
36
33
  * Set input error message
34
+ * @param errorMessage - errorMessage override
37
35
  */
38
- this.setErrorMessage = () => {
36
+ this.setErrorMessage = (errorMessage) => {
39
37
  // Set error message
40
38
  this.errorMessage = undefined;
41
- // required
42
- if (!this.valid && this.input.validity.valueMissing) {
43
- this.errorMessage = this.messages.errors.required;
39
+ if (!this.valid) {
40
+ if (errorMessage !== undefined) {
41
+ this.errorMessage = errorMessage;
42
+ }
43
+ // required
44
+ else if (this.input.validity.valueMissing) {
45
+ this.errorMessage = this.messages.errors.required;
46
+ }
44
47
  }
45
48
  };
46
49
  this.value = undefined;
@@ -58,7 +61,7 @@ export class MgInputPassword {
58
61
  this.helpText = undefined;
59
62
  this.valid = undefined;
60
63
  this.invalid = undefined;
61
- this.classCollection = new ClassList(['mg-input--password']);
64
+ this.classCollection = new ClassList(['mg-c-input--password']);
62
65
  this.errorMessage = undefined;
63
66
  }
64
67
  handleValue(newValue) {
@@ -75,13 +78,44 @@ export class MgInputPassword {
75
78
  }
76
79
  }
77
80
  /**
78
- * Public method to display errors
81
+ * Display input error if it exists.
79
82
  */
80
83
  async displayError() {
81
84
  this.checkValidity();
82
85
  this.setErrorMessage();
83
86
  this.hasDisplayedError = this.invalid;
84
87
  }
88
+ /**
89
+ * Set an error and display a custom error message.
90
+ * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
91
+ * It must be paired with an error message to display for the given context.
92
+ * When used to set validity to `false`, you should use this method again to reset the validity to `true`.
93
+ * @param valid - value indicating the validity
94
+ * @param errorMessage - the error message to display
95
+ */
96
+ async setError(valid, errorMessage) {
97
+ if (typeof valid !== 'boolean') {
98
+ throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
99
+ }
100
+ else if (!isValidString(errorMessage)) {
101
+ throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
102
+ }
103
+ else {
104
+ this.setValidity(valid);
105
+ this.setErrorMessage(valid ? undefined : errorMessage);
106
+ this.hasDisplayedError = this.invalid;
107
+ }
108
+ }
109
+ /**
110
+ * Method to set validity values
111
+ * @param newValue - valid new value
112
+ */
113
+ setValidity(newValue) {
114
+ this.valid = newValue;
115
+ this.invalid = !this.valid;
116
+ // We need to send valid event even if it is the same value
117
+ this.inputValid.emit(this.valid);
118
+ }
85
119
  /*************
86
120
  * Lifecycle *
87
121
  *************/
@@ -104,7 +138,7 @@ export class MgInputPassword {
104
138
  * @returns HTML Element
105
139
  */
106
140
  render() {
107
- return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "password", class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
141
+ return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "password", class: "mg-c-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
108
142
  if (el !== null)
109
143
  this.input = el;
110
144
  } })));
@@ -113,12 +147,12 @@ export class MgInputPassword {
113
147
  static get encapsulation() { return "shadow"; }
114
148
  static get originalStyleUrls() {
115
149
  return {
116
- "$": ["mg-input-password.scss"]
150
+ "$": ["../../../../../node_modules/@mgdis/styles/dist/components/mg-input-password.css"]
117
151
  };
118
152
  }
119
153
  static get styleUrls() {
120
154
  return {
121
- "$": ["mg-input-password.css"]
155
+ "$": ["../../../../../node_modules/@mgdis/styles/dist/components/mg-input-password.css"]
122
156
  };
123
157
  }
124
158
  static get properties() {
@@ -446,9 +480,48 @@ export class MgInputPassword {
446
480
  "return": "Promise<void>"
447
481
  },
448
482
  "docs": {
449
- "text": "Public method to display errors",
483
+ "text": "Display input error if it exists.",
450
484
  "tags": []
451
485
  }
486
+ },
487
+ "setError": {
488
+ "complexType": {
489
+ "signature": "(valid: MgInputPassword['valid'], errorMessage: string) => Promise<void>",
490
+ "parameters": [{
491
+ "tags": [{
492
+ "name": "param",
493
+ "text": "valid - value indicating the validity"
494
+ }],
495
+ "text": "- value indicating the validity"
496
+ }, {
497
+ "tags": [{
498
+ "name": "param",
499
+ "text": "errorMessage - the error message to display"
500
+ }],
501
+ "text": "- the error message to display"
502
+ }],
503
+ "references": {
504
+ "Promise": {
505
+ "location": "global",
506
+ "id": "global::Promise"
507
+ },
508
+ "MgInputPassword": {
509
+ "location": "global",
510
+ "id": "global::MgInputPassword"
511
+ }
512
+ },
513
+ "return": "Promise<void>"
514
+ },
515
+ "docs": {
516
+ "text": "Set an error and display a custom error message.\nThis method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\nIt must be paired with an error message to display for the given context.\nWhen used to set validity to `false`, you should use this method again to reset the validity to `true`.",
517
+ "tags": [{
518
+ "name": "param",
519
+ "text": "valid - value indicating the validity"
520
+ }, {
521
+ "name": "param",
522
+ "text": "errorMessage - the error message to display"
523
+ }]
524
+ }
452
525
  }
453
526
  };
454
527
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mg-input-password.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-password/mg-input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, h, Prop, EventEmitter, State, Method, Watch } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Width } from '../MgInput.conf';\nimport { ClassList } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-password',\n styleUrl: 'mg-input-password.scss',\n shadow: true,\n})\nexport class MgInputPassword {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputPasswordElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.valueChange.emit(newValue);\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-input--password']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<string>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<boolean>;\n\n /**\n * Public method to display errors\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.displayError();\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.valid = this.readonly || this.disabled || (this.input?.checkValidity !== undefined ? this.input.checkValidity() : true);\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n this.inputValid.emit(this.valid);\n };\n\n /**\n * Set input error message\n */\n private setErrorMessage = (): void => {\n // Set error message\n this.errorMessage = undefined;\n // required\n if (!this.valid && this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.value !== undefined ? '•'.repeat(this.value.length) : undefined}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"password\"\n class=\"mg-input__box\"\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n </MgInput>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"mg-input-password.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-password/mg-input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,C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AU,EAAE,KAAK;MAEjB,aACE,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,EAAE,EAAE,IAAI,CAAC,UAAU,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,CAAC,WAAW,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,GAAG,EAAE,CAAC,EAAoB,EAAE,EAAE;UAC5B,IAAI,EAAE,KAAK,IAAI;YAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QACnC,CAAC,GACD,CACM,CACX,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, h, Prop, EventEmitter, State, Method, Watch } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Width } from '../MgInput.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-password',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-password.css',\n shadow: true,\n})\nexport class MgInputPassword {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputPasswordElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.valueChange.emit(newValue);\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--password']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<string>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<boolean>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputPassword['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-password> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-password> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputPassword['valid']) {\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n this.inputValid.emit(this.valid);\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.displayError();\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || (this.input?.checkValidity !== undefined ? this.input.checkValidity() : true));\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.value !== undefined ? '•'.repeat(this.value.length) : undefined}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"password\"\n class=\"mg-c-input__box\"\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n </MgInput>\n );\n }\n}\n"]}
@@ -130,6 +130,61 @@ describe('mg-input-password', () => {
130
130
  await page.waitForChanges();
131
131
  expect(page.root).toMatchSnapshot();
132
132
  });
133
+ test.each([
134
+ {
135
+ valid: true,
136
+ errorMessage: 'Override error',
137
+ },
138
+ {
139
+ valid: false,
140
+ errorMessage: 'Override error',
141
+ },
142
+ ])("should display override error with setError component's public method", async (params) => {
143
+ const page = await getPage({ label: 'label', identifier: 'identifier', required: true });
144
+ expect(page.root).toMatchSnapshot();
145
+ const element = page.doc.querySelector('mg-input-password');
146
+ const input = element.shadowRoot.querySelector('input');
147
+ //mock validity
148
+ Object.defineProperty(input, 'validity', {
149
+ get: () => ({}),
150
+ });
151
+ await element.setError(params.valid, params.errorMessage);
152
+ await page.waitForChanges();
153
+ expect(page.root).toMatchSnapshot();
154
+ });
155
+ test.each([
156
+ {
157
+ valid: '',
158
+ errorMessage: 'Override error',
159
+ error: '<mg-input-password> method "setError()" param "valid" must be a boolean',
160
+ },
161
+ {
162
+ valid: undefined,
163
+ errorMessage: 'Override error',
164
+ error: '<mg-input-password> method "setError()" param "valid" must be a boolean',
165
+ },
166
+ {
167
+ valid: true,
168
+ errorMessage: ' ',
169
+ error: '<mg-input-password> method "setError()" param "errorMessage" must be a string',
170
+ },
171
+ {
172
+ valid: true,
173
+ errorMessage: true,
174
+ error: '<mg-input-password> method "setError()" param "errorMessage" must be a string',
175
+ },
176
+ ])("shloud throw error with setError component's public method invalid params", async (params) => {
177
+ expect.assertions(1);
178
+ try {
179
+ const page = await getPage({ label: 'label', identifier: 'identifier', required: true });
180
+ const element = page.doc.querySelector('mg-input-password');
181
+ await element.setError(params.valid, params.errorMessage);
182
+ await page.waitForChanges();
183
+ }
184
+ catch (err) {
185
+ expect(err.message).toMatch(params.error);
186
+ }
187
+ });
133
188
  test.each(['fr', 'xx'])('display error message with locale: %s', async (lang) => {
134
189
  const page = await getPage({ label: 'label', identifier: 'identifier', required: true, lang });
135
190
  const element = page.doc.querySelector('mg-input-password');
@@ -1 +1 @@
1
- {"version":3,"file":"mg-input-password.spec.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,QAAQ,MAAM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IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { MgInputPassword } from '../mg-input-password';\nimport messages from '../../../../../locales/en/messages.json';\n\nconst getPage = args => {\n const page = newSpecPage({\n components: [MgInputPassword],\n template: () => <mg-input-password {...args}></mg-input-password>,\n });\n jest.runAllTimers();\n return page;\n};\n\ndescribe('mg-input-password', () => {\n beforeEach(() => jest.useFakeTimers());\n afterEach(() => jest.runOnlyPendingTimers());\n test.each([\n { label: 'label', identifier: 'identifier' },\n { label: 'label', identifier: 'identifier', labelHide: true },\n { label: 'label', identifier: 'identifier', labelOnTop: true },\n { label: 'label', identifier: 'identifier', readonly: true },\n { label: 'label', identifier: 'identifier', readonly: true, labelOnTop: true, tooltip: 'Tooltip message' },\n { label: 'label', identifier: 'identifier', readonly: true, value: 'blu' },\n { label: 'label', identifier: 'identifier', required: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', required: true, readonly: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', required: true, disabled: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', tooltip: 'My Tooltip Message' },\n { label: 'label', identifier: 'identifier', tooltip: 'My Tooltip Message', labelOnTop: true },\n ])('Should render with args %s:', async args => {\n const { root } = await getPage(args);\n expect(root).toMatchSnapshot();\n });\n\n test.each(['', ' ', undefined])('Should not render with invalid identifier property: %s', async identifier => {\n expect.assertions(1);\n try {\n await getPage({ identifier });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"identifier\" is required.');\n }\n });\n\n test.each(['', ' ', undefined])('Should throw error with invalid label property: %s', async label => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"label\" is required.');\n }\n });\n\n test('Should throw an error with labelOnTop & labelHide set to true', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'batman', labelOnTop: true, labelHide: true });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"labelOnTop\" must not be paired with the prop \"labelHide\"');\n }\n });\n\n test('Should trigger events', async () => {\n const inputValue = 'Blu';\n const args = { label: 'label', identifier: 'identifier', helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: false,\n patternMismatch: false,\n })),\n });\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.dispatchEvent(new CustomEvent('focus', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot(); //Snapshot on focus\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(inputValue);\n });\n\n describe.each(['readonly', 'disabled'])('validity, case next state is %s', nextState => {\n test.each([\n { validity: true, valueMissing: false },\n { validity: false, valueMissing: true },\n { validity: false, valueMissing: false },\n ])('validity (%s), valueMissing (%s)', async ({ validity, valueMissing }) => {\n const args = { label: 'label', identifier: 'identifier', patternErrorMessage: 'Non' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => validity);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing,\n })),\n });\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (validity) {\n expect(page.rootInstance.errorMessage).toBeUndefined();\n } else if (valueMissing) {\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n }\n expect(page.rootInstance.valid).toEqual(validity);\n expect(page.rootInstance.invalid).toEqual(!validity);\n if (valueMissing) {\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled FALSE\n element[nextState] = true;\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled TRUE\n }\n });\n });\n\n test(\"display error with displayError component's public method\", async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each(['fr', 'xx'])('display error message with locale: %s', async lang => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true, lang });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test('Should remove error on input', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n input.value = 'blu';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n });\n\n test('Should remove error on input when required change dynamically', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n element.required = false;\n await page.waitForChanges();\n\n // Error message should disapear and change the hasDisplayedError status\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n element.required = true;\n await page.waitForChanges();\n\n // If back on required the message is still not displayed\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n });\n\n test('Should update mg-width', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier' });\n const element = page.doc.querySelector('mg-input-password');\n\n element.mgWidth = 2;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 4;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 16;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}
1
+ {"version":3,"file":"mg-input-password.spec.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAE/D,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE;EACrB,MAAM,IAAI,GAAG,WAAW,CAAC;IACvB,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,QAAQ,EAAE,GAAG,EAAE,CAAC,yCAAuB,IAAI,EAAsB;GAClE,CAAC,CAAC;EACH,IAAI,CAAC,YAAY,EAAE,CAAC;EACpB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;EACjC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;EACvC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;EAC7C,IAAI,CAAC,IAAI,CAAC;IACR,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE;IAC5C,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE;IAC9D,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5D,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE;IAC1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,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;IAEvD,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IACxB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,yDAAyD;IACzD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;EACzD,CAAC,CAAC,CAAC;EAEH,IAAI,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;IACxC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAE5D,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEpC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;IACrB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;EACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { MgInputPassword } from '../mg-input-password';\nimport messages from '../../../../../locales/en/messages.json';\n\nconst getPage = args => {\n const page = newSpecPage({\n components: [MgInputPassword],\n template: () => <mg-input-password {...args}></mg-input-password>,\n });\n jest.runAllTimers();\n return page;\n};\n\ndescribe('mg-input-password', () => {\n beforeEach(() => jest.useFakeTimers());\n afterEach(() => jest.runOnlyPendingTimers());\n test.each([\n { label: 'label', identifier: 'identifier' },\n { label: 'label', identifier: 'identifier', labelHide: true },\n { label: 'label', identifier: 'identifier', labelOnTop: true },\n { label: 'label', identifier: 'identifier', readonly: true },\n { label: 'label', identifier: 'identifier', readonly: true, labelOnTop: true, tooltip: 'Tooltip message' },\n { label: 'label', identifier: 'identifier', readonly: true, value: 'blu' },\n { label: 'label', identifier: 'identifier', required: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', required: true, readonly: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', required: true, disabled: true, value: 'blu', helpText: 'My help text' },\n { label: 'label', identifier: 'identifier', tooltip: 'My Tooltip Message' },\n { label: 'label', identifier: 'identifier', tooltip: 'My Tooltip Message', labelOnTop: true },\n ])('Should render with args %s:', async args => {\n const { root } = await getPage(args);\n expect(root).toMatchSnapshot();\n });\n\n test.each(['', ' ', undefined])('Should not render with invalid identifier property: %s', async identifier => {\n expect.assertions(1);\n try {\n await getPage({ identifier });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"identifier\" is required.');\n }\n });\n\n test.each(['', ' ', undefined])('Should throw error with invalid label property: %s', async label => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"label\" is required.');\n }\n });\n\n test('Should throw an error with labelOnTop & labelHide set to true', async () => {\n expect.assertions(1);\n try {\n await getPage({ identifier: 'identifier', label: 'batman', labelOnTop: true, labelHide: true });\n } catch (err) {\n expect(err.message).toMatch('<mg-input> prop \"labelOnTop\" must not be paired with the prop \"labelHide\"');\n }\n });\n\n test('Should trigger events', async () => {\n const inputValue = 'Blu';\n const args = { label: 'label', identifier: 'identifier', helpText: 'My help text' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => true);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: false,\n patternMismatch: false,\n })),\n });\n\n jest.spyOn(page.rootInstance.valueChange, 'emit');\n\n input.dispatchEvent(new CustomEvent('focus', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot(); //Snapshot on focus\n\n input.value = inputValue;\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n expect(page.rootInstance.valueChange.emit).toHaveBeenCalledWith(inputValue);\n });\n\n describe.each(['readonly', 'disabled'])('validity, case next state is %s', nextState => {\n test.each([\n { validity: true, valueMissing: false },\n { validity: false, valueMissing: true },\n { validity: false, valueMissing: false },\n ])('validity (%s), valueMissing (%s)', async ({ validity, valueMissing }) => {\n const args = { label: 'label', identifier: 'identifier', patternErrorMessage: 'Non' };\n const page = await getPage(args);\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => validity);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing,\n })),\n });\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n if (validity) {\n expect(page.rootInstance.errorMessage).toBeUndefined();\n } else if (valueMissing) {\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n }\n expect(page.rootInstance.valid).toEqual(validity);\n expect(page.rootInstance.invalid).toEqual(!validity);\n if (valueMissing) {\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled FALSE\n element[nextState] = true;\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot(); //Snapshot with readonly/disabled TRUE\n }\n });\n });\n\n test(\"display error with displayError component's public method\", async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each([\n {\n valid: true,\n errorMessage: 'Override error',\n },\n {\n valid: false,\n errorMessage: 'Override error',\n },\n ])(\"should display override error with setError component's public method\", async params => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n\n expect(page.root).toMatchSnapshot();\n\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n Object.defineProperty(input, 'validity', {\n get: () => ({}),\n });\n\n await element.setError(params.valid, params.errorMessage);\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test.each([\n {\n valid: '',\n errorMessage: 'Override error',\n error: '<mg-input-password> method \"setError()\" param \"valid\" must be a boolean',\n },\n {\n valid: undefined,\n errorMessage: 'Override error',\n error: '<mg-input-password> method \"setError()\" param \"valid\" must be a boolean',\n },\n {\n valid: true,\n errorMessage: ' ',\n error: '<mg-input-password> method \"setError()\" param \"errorMessage\" must be a string',\n },\n {\n valid: true,\n errorMessage: true,\n error: '<mg-input-password> method \"setError()\" param \"errorMessage\" must be a string',\n },\n ])(\"shloud throw error with setError component's public method invalid params\", async params => {\n expect.assertions(1);\n try {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-password');\n\n await element.setError(params.valid as unknown as boolean, params.errorMessage as unknown as string);\n await page.waitForChanges();\n } catch (err) {\n expect(err.message).toMatch(params.error);\n }\n });\n\n test.each(['fr', 'xx'])('display error message with locale: %s', async lang => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true, lang });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn(() => false);\n Object.defineProperty(input, 'validity', {\n get: jest.fn(() => ({\n valueMissing: true,\n })),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n\n test('Should remove error on input', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n input.value = 'blu';\n input.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n input.dispatchEvent(new CustomEvent('blur', { bubbles: true }));\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n });\n\n test('Should remove error on input when required change dynamically', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier', required: true });\n const element = page.doc.querySelector('mg-input-password');\n const input = element.shadowRoot.querySelector('input');\n\n //mock validity\n input.checkValidity = jest.fn().mockReturnValueOnce(false).mockReturnValueOnce(true).mockReturnValueOnce(true);\n Object.defineProperty(input, 'validity', {\n get: jest\n .fn()\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: true,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n })\n .mockReturnValueOnce({\n valueMissing: false,\n }),\n });\n\n await element.displayError();\n await page.waitForChanges();\n\n expect(page.rootInstance.hasDisplayedError).toEqual(true);\n expect(page.rootInstance.errorMessage).toEqual(messages.errors.required);\n\n element.required = false;\n await page.waitForChanges();\n\n // Error message should disapear and change the hasDisplayedError status\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n\n element.required = true;\n await page.waitForChanges();\n\n // If back on required the message is still not displayed\n expect(page.rootInstance.hasDisplayedError).toEqual(false);\n expect(page.rootInstance.errorMessage).toBeUndefined();\n });\n\n test('Should update mg-width', async () => {\n const page = await getPage({ label: 'label', identifier: 'identifier' });\n const element = page.doc.querySelector('mg-input-password');\n\n element.mgWidth = 2;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 4;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n\n element.mgWidth = 16;\n await page.waitForChanges();\n\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}