@mgdis/mg-components 6.13.0 → 6.14.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 (419) hide show
  1. package/dist/cjs/events.utils-D5SAtkpQ.js +0 -3
  2. package/dist/cjs/{index-DyUB3KmT.js → index-CwjAofQ1.js} +1 -4
  3. package/dist/cjs/index-DUJwxnoi.js +0 -3
  4. package/dist/cjs/{index-CATFkm3O.js → index-DzBkSgSK.js} +224 -122
  5. package/dist/cjs/index.cjs.js +0 -3
  6. package/dist/cjs/loader.cjs.js +3 -7
  7. package/dist/cjs/mg-action-more_37.cjs.entry.js +160 -88
  8. package/dist/cjs/mg-alert.cjs.entry.js +6 -9
  9. package/dist/cjs/mg-components.cjs.js +4 -8
  10. package/dist/cjs/mg-input-combobox.cjs.entry.js +9 -12
  11. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +5 -8
  12. package/dist/cjs/mg-input.conf-WTsvDfpC.js +0 -3
  13. package/dist/cjs/mg-loader.cjs.entry.js +2 -5
  14. package/dist/cjs/mg-progress.cjs.entry.js +1 -4
  15. package/dist/collection/assets/icons/index.js +0 -1
  16. package/dist/collection/collection-manifest.json +1 -1
  17. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +3 -4
  18. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +4 -5
  19. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +0 -1
  20. package/dist/collection/components/atoms/mg-badge/mg-badge.js +4 -5
  21. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +0 -1
  22. package/dist/collection/components/atoms/mg-button/mg-button.js +9 -10
  23. package/dist/collection/components/atoms/mg-card/mg-card.conf.js +4 -0
  24. package/dist/collection/components/atoms/mg-card/mg-card.js +104 -2
  25. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -2
  26. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +0 -1
  27. package/dist/collection/components/atoms/mg-icon/mg-icon.js +6 -7
  28. package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +0 -1
  29. package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -4
  30. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -2
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -1
  32. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +5 -6
  33. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +0 -1
  34. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +33 -18
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +0 -1
  36. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +7 -6
  37. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +0 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +28 -22
  39. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js +0 -1
  40. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +22 -20
  41. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +0 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +17 -18
  43. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +0 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +26 -27
  45. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +18 -19
  46. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +0 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +17 -17
  48. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +0 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +18 -18
  50. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +0 -1
  51. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +38 -32
  52. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +0 -1
  53. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +25 -25
  54. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +23 -24
  55. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +0 -1
  56. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +15 -15
  57. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.conf.js +0 -1
  58. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +4 -3
  59. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -1
  60. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +4 -4
  61. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.conf.js +0 -1
  62. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +5 -6
  63. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +0 -1
  64. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +5 -3
  65. package/dist/collection/components/molecules/mg-alert/mg-alert.conf.js +0 -1
  66. package/dist/collection/components/molecules/mg-alert/mg-alert.js +7 -8
  67. package/dist/collection/components/molecules/mg-details/mg-details.js +4 -5
  68. package/dist/collection/components/molecules/mg-form/mg-form.conf.js +0 -1
  69. package/dist/collection/components/molecules/mg-form/mg-form.js +9 -10
  70. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +0 -1
  71. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -3
  72. package/dist/collection/components/molecules/mg-loader/mg-loader.js +2 -3
  73. package/dist/collection/components/molecules/mg-message/mg-message.conf.js +0 -1
  74. package/dist/collection/components/molecules/mg-message/mg-message.js +4 -5
  75. package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js +0 -1
  76. package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -7
  77. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +0 -1
  78. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -7
  79. package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +0 -1
  80. package/dist/collection/components/molecules/mg-panel/mg-panel.js +34 -11
  81. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -3
  82. package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -7
  83. package/dist/collection/components/molecules/mg-progress/mg-progress.conf.js +0 -1
  84. package/dist/collection/components/molecules/mg-progress/mg-progress.js +5 -6
  85. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +0 -1
  86. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -4
  87. package/dist/collection/components/molecules/mg-table/mg-table.conf.js +0 -1
  88. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -4
  89. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -1
  90. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +6 -6
  91. package/dist/collection/index.js +0 -1
  92. package/dist/collection/locales/index.conf.js +0 -1
  93. package/dist/collection/locales/index.js +0 -1
  94. package/dist/collection/types/index.js +0 -1
  95. package/dist/collection/utils/behaviors.utils.js +0 -1
  96. package/dist/collection/utils/events.utils.js +0 -1
  97. package/dist/collection/utils/playwright.fixture.js +0 -1
  98. package/dist/collection/utils/unit.test.utils.js +0 -1
  99. package/dist/components/events.utils.js +0 -3
  100. package/dist/components/index.js +1 -4
  101. package/dist/components/index2.js +0 -3
  102. package/dist/components/index3.js +1 -4
  103. package/dist/components/mg-action-more.js +0 -3
  104. package/dist/components/mg-alert.js +4 -7
  105. package/dist/components/mg-badge.js +0 -3
  106. package/dist/components/mg-badge2.js +0 -3
  107. package/dist/components/mg-button.js +0 -3
  108. package/dist/components/mg-button2.js +0 -3
  109. package/dist/components/mg-card.js +0 -3
  110. package/dist/components/mg-card2.js +55 -6
  111. package/dist/components/mg-character-left.js +0 -3
  112. package/dist/components/mg-character-left2.js +0 -3
  113. package/dist/components/mg-details.js +0 -3
  114. package/dist/components/mg-divider.js +0 -3
  115. package/dist/components/mg-divider2.js +0 -3
  116. package/dist/components/mg-form.js +0 -3
  117. package/dist/components/mg-icon.js +0 -3
  118. package/dist/components/mg-icon2.js +0 -3
  119. package/dist/components/mg-illustrated-message.js +0 -3
  120. package/dist/components/mg-input-checkbox-paginated.js +0 -3
  121. package/dist/components/mg-input-checkbox-paginated2.js +0 -3
  122. package/dist/components/mg-input-checkbox.js +9 -6
  123. package/dist/components/mg-input-combobox.js +2 -5
  124. package/dist/components/mg-input-date.js +2 -5
  125. package/dist/components/mg-input-numeric.js +2 -5
  126. package/dist/components/mg-input-password.js +2 -5
  127. package/dist/components/mg-input-radio.js +2 -5
  128. package/dist/components/mg-input-rich-text-editor.js +1 -4
  129. package/dist/components/mg-input-select.js +0 -3
  130. package/dist/components/mg-input-select2.js +19 -16
  131. package/dist/components/mg-input-text.js +0 -3
  132. package/dist/components/mg-input-text2.js +2 -5
  133. package/dist/components/mg-input-textarea.js +2 -5
  134. package/dist/components/mg-input-title.js +0 -3
  135. package/dist/components/mg-input-title2.js +0 -3
  136. package/dist/components/mg-input-toggle.js +2 -5
  137. package/dist/components/mg-input.js +0 -3
  138. package/dist/components/mg-input2.js +16 -6
  139. package/dist/components/mg-item-more.js +0 -3
  140. package/dist/components/mg-item-more2.js +0 -3
  141. package/dist/components/mg-loader.js +0 -3
  142. package/dist/components/mg-loader2.js +0 -3
  143. package/dist/components/mg-menu-item.js +0 -3
  144. package/dist/components/mg-menu-item2.js +0 -3
  145. package/dist/components/mg-menu.js +0 -3
  146. package/dist/components/mg-message.js +0 -3
  147. package/dist/components/mg-message2.js +2 -5
  148. package/dist/components/mg-modal.js +1 -4
  149. package/dist/components/mg-pagination.js +0 -3
  150. package/dist/components/mg-pagination2.js +0 -3
  151. package/dist/components/mg-panel.js +7 -5
  152. package/dist/components/mg-popover-content.js +0 -3
  153. package/dist/components/mg-popover-content2.js +2 -5
  154. package/dist/components/mg-popover.js +0 -3
  155. package/dist/components/mg-popover2.js +0 -3
  156. package/dist/components/mg-progress.js +0 -3
  157. package/dist/components/mg-skip-links.js +4 -6
  158. package/dist/components/mg-table.js +2 -5
  159. package/dist/components/mg-tabs.js +1 -4
  160. package/dist/components/mg-tag.js +0 -3
  161. package/dist/components/mg-tooltip-content.js +0 -3
  162. package/dist/components/mg-tooltip-content2.js +0 -3
  163. package/dist/components/mg-tooltip.js +0 -3
  164. package/dist/components/mg-tooltip2.js +0 -3
  165. package/dist/components/popper.js +0 -3
  166. package/dist/esm/events.utils-yMGqY8YG.js +0 -3
  167. package/dist/esm/{index-CwZ2wzxw.js → index-Bv7NHR-W.js} +1 -4
  168. package/dist/esm/{index-CAuxALt5.js → index-Degtjvph.js} +205 -122
  169. package/dist/esm/index-Dr7GYvIz.js +0 -3
  170. package/dist/esm/index.js +0 -3
  171. package/dist/esm/loader.js +3 -7
  172. package/dist/esm/mg-action-more_37.entry.js +160 -88
  173. package/dist/esm/mg-alert.entry.js +6 -9
  174. package/dist/esm/mg-components.js +4 -8
  175. package/dist/esm/mg-input-combobox.entry.js +9 -12
  176. package/dist/esm/mg-input-rich-text-editor.entry.js +5 -8
  177. package/dist/esm/mg-input.conf-CNgv8hc5.js +0 -3
  178. package/dist/esm/mg-loader.entry.js +2 -5
  179. package/dist/esm/mg-progress.entry.js +1 -4
  180. package/dist/mg-components/index.esm.js +0 -2
  181. package/dist/mg-components/mg-components.css +1 -1
  182. package/dist/mg-components/mg-components.esm.js +1 -2
  183. package/dist/mg-components/p-056ba467.entry.js +1 -0
  184. package/dist/mg-components/p-625c463c.entry.js +1 -0
  185. package/dist/mg-components/p-Bv7NHR-W.js +1 -0
  186. package/dist/mg-components/p-CNgv8hc5.js +1 -2
  187. package/dist/mg-components/p-Degtjvph.js +2 -0
  188. package/dist/mg-components/p-Dr7GYvIz.js +1 -2
  189. package/dist/mg-components/p-c522f3c1.entry.js +1 -0
  190. package/dist/mg-components/p-cac23bd7.entry.js +1 -0
  191. package/dist/mg-components/p-d13a6fdc.entry.js +1 -0
  192. package/dist/mg-components/p-e75f5383.entry.js +10 -0
  193. package/dist/mg-components/p-yMGqY8YG.js +1 -2
  194. package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +9 -0
  195. package/dist/types/components/atoms/mg-card/mg-card.d.ts +20 -0
  196. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +1 -1
  197. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +5 -4
  198. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +4 -0
  199. package/dist/types/components.d.ts +406 -3
  200. package/dist/types/stencil-public-runtime.d.ts +34 -6
  201. package/ide/intellij/web-types.json +263 -35
  202. package/ide/vscode/css-custom-data.json +3 -3
  203. package/ide/vscode/html-custom-data.json +88 -34
  204. package/package.json +17 -22
  205. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -8
  206. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  207. package/dist/cjs/events.utils-D5SAtkpQ.js.map +0 -1
  208. package/dist/cjs/index-CATFkm3O.js.map +0 -1
  209. package/dist/cjs/index-DUJwxnoi.js.map +0 -1
  210. package/dist/cjs/index-DyUB3KmT.js.map +0 -1
  211. package/dist/cjs/index.cjs.js.map +0 -1
  212. package/dist/cjs/loader.cjs.js.map +0 -1
  213. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +0 -1
  214. package/dist/cjs/mg-alert.cjs.entry.js.map +0 -1
  215. package/dist/cjs/mg-alert.entry.cjs.js.map +0 -1
  216. package/dist/cjs/mg-components.cjs.js.map +0 -1
  217. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +0 -1
  218. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +0 -1
  219. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +0 -1
  220. package/dist/cjs/mg-input-rich-text-editor.entry.cjs.js.map +0 -1
  221. package/dist/cjs/mg-input.conf-WTsvDfpC.js.map +0 -1
  222. package/dist/cjs/mg-loader.cjs.entry.js.map +0 -1
  223. package/dist/cjs/mg-loader.entry.cjs.js.map +0 -1
  224. package/dist/cjs/mg-progress.cjs.entry.js.map +0 -1
  225. package/dist/cjs/mg-progress.entry.cjs.js.map +0 -1
  226. package/dist/collection/assets/icons/index.js.map +0 -1
  227. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js.map +0 -1
  228. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js.map +0 -1
  229. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js.map +0 -1
  230. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +0 -1
  231. package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +0 -1
  232. package/dist/collection/components/atoms/mg-button/mg-button.js.map +0 -1
  233. package/dist/collection/components/atoms/mg-card/mg-card.js.map +0 -1
  234. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +0 -1
  235. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js.map +0 -1
  236. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +0 -1
  237. package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js.map +0 -1
  238. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +0 -1
  239. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +0 -1
  240. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +0 -1
  241. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +0 -1
  242. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js.map +0 -1
  243. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +0 -1
  244. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +0 -1
  245. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +0 -1
  246. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +0 -1
  247. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +0 -1
  248. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +0 -1
  249. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +0 -1
  250. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +0 -1
  251. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +0 -1
  252. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +0 -1
  253. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +0 -1
  254. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +0 -1
  255. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js.map +0 -1
  256. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +0 -1
  257. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js.map +0 -1
  258. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +0 -1
  259. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js.map +0 -1
  260. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +0 -1
  261. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +0 -1
  262. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +0 -1
  263. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +0 -1
  264. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js.map +0 -1
  265. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +0 -1
  266. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.conf.js.map +0 -1
  267. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +0 -1
  268. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js.map +0 -1
  269. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js.map +0 -1
  270. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.conf.js.map +0 -1
  271. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js.map +0 -1
  272. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +0 -1
  273. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +0 -1
  274. package/dist/collection/components/molecules/mg-alert/mg-alert.conf.js.map +0 -1
  275. package/dist/collection/components/molecules/mg-alert/mg-alert.js.map +0 -1
  276. package/dist/collection/components/molecules/mg-details/mg-details.js.map +0 -1
  277. package/dist/collection/components/molecules/mg-form/mg-form.conf.js.map +0 -1
  278. package/dist/collection/components/molecules/mg-form/mg-form.js.map +0 -1
  279. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js.map +0 -1
  280. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +0 -1
  281. package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +0 -1
  282. package/dist/collection/components/molecules/mg-message/mg-message.conf.js.map +0 -1
  283. package/dist/collection/components/molecules/mg-message/mg-message.js.map +0 -1
  284. package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js.map +0 -1
  285. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +0 -1
  286. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +0 -1
  287. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +0 -1
  288. package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js.map +0 -1
  289. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +0 -1
  290. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +0 -1
  291. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +0 -1
  292. package/dist/collection/components/molecules/mg-progress/mg-progress.conf.js.map +0 -1
  293. package/dist/collection/components/molecules/mg-progress/mg-progress.js.map +0 -1
  294. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js.map +0 -1
  295. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +0 -1
  296. package/dist/collection/components/molecules/mg-table/mg-table.conf.js.map +0 -1
  297. package/dist/collection/components/molecules/mg-table/mg-table.js.map +0 -1
  298. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +0 -1
  299. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +0 -1
  300. package/dist/collection/index.js.map +0 -1
  301. package/dist/collection/locales/index.conf.js.map +0 -1
  302. package/dist/collection/locales/index.js.map +0 -1
  303. package/dist/collection/types/index.js.map +0 -1
  304. package/dist/collection/utils/behaviors.utils.js.map +0 -1
  305. package/dist/collection/utils/events.utils.js.map +0 -1
  306. package/dist/collection/utils/playwright.fixture.js.map +0 -1
  307. package/dist/collection/utils/unit.test.utils.js.map +0 -1
  308. package/dist/components/events.utils.js.map +0 -1
  309. package/dist/components/index.js.map +0 -1
  310. package/dist/components/index2.js.map +0 -1
  311. package/dist/components/index3.js.map +0 -1
  312. package/dist/components/mg-action-more.js.map +0 -1
  313. package/dist/components/mg-alert.js.map +0 -1
  314. package/dist/components/mg-badge.js.map +0 -1
  315. package/dist/components/mg-badge2.js.map +0 -1
  316. package/dist/components/mg-button.js.map +0 -1
  317. package/dist/components/mg-button2.js.map +0 -1
  318. package/dist/components/mg-card.js.map +0 -1
  319. package/dist/components/mg-card2.js.map +0 -1
  320. package/dist/components/mg-character-left.js.map +0 -1
  321. package/dist/components/mg-character-left2.js.map +0 -1
  322. package/dist/components/mg-details.js.map +0 -1
  323. package/dist/components/mg-divider.js.map +0 -1
  324. package/dist/components/mg-divider2.js.map +0 -1
  325. package/dist/components/mg-form.js.map +0 -1
  326. package/dist/components/mg-icon.js.map +0 -1
  327. package/dist/components/mg-icon2.js.map +0 -1
  328. package/dist/components/mg-illustrated-message.js.map +0 -1
  329. package/dist/components/mg-input-checkbox-paginated.js.map +0 -1
  330. package/dist/components/mg-input-checkbox-paginated2.js.map +0 -1
  331. package/dist/components/mg-input-checkbox.js.map +0 -1
  332. package/dist/components/mg-input-combobox.js.map +0 -1
  333. package/dist/components/mg-input-date.js.map +0 -1
  334. package/dist/components/mg-input-numeric.js.map +0 -1
  335. package/dist/components/mg-input-password.js.map +0 -1
  336. package/dist/components/mg-input-radio.js.map +0 -1
  337. package/dist/components/mg-input-rich-text-editor.js.map +0 -1
  338. package/dist/components/mg-input-select.js.map +0 -1
  339. package/dist/components/mg-input-select2.js.map +0 -1
  340. package/dist/components/mg-input-text.js.map +0 -1
  341. package/dist/components/mg-input-text2.js.map +0 -1
  342. package/dist/components/mg-input-textarea.js.map +0 -1
  343. package/dist/components/mg-input-title.js.map +0 -1
  344. package/dist/components/mg-input-title2.js.map +0 -1
  345. package/dist/components/mg-input-toggle.js.map +0 -1
  346. package/dist/components/mg-input.js.map +0 -1
  347. package/dist/components/mg-input2.js.map +0 -1
  348. package/dist/components/mg-item-more.js.map +0 -1
  349. package/dist/components/mg-item-more2.js.map +0 -1
  350. package/dist/components/mg-loader.js.map +0 -1
  351. package/dist/components/mg-loader2.js.map +0 -1
  352. package/dist/components/mg-menu-item.js.map +0 -1
  353. package/dist/components/mg-menu-item2.js.map +0 -1
  354. package/dist/components/mg-menu.js.map +0 -1
  355. package/dist/components/mg-message.js.map +0 -1
  356. package/dist/components/mg-message2.js.map +0 -1
  357. package/dist/components/mg-modal.js.map +0 -1
  358. package/dist/components/mg-pagination.js.map +0 -1
  359. package/dist/components/mg-pagination2.js.map +0 -1
  360. package/dist/components/mg-panel.js.map +0 -1
  361. package/dist/components/mg-popover-content.js.map +0 -1
  362. package/dist/components/mg-popover-content2.js.map +0 -1
  363. package/dist/components/mg-popover.js.map +0 -1
  364. package/dist/components/mg-popover2.js.map +0 -1
  365. package/dist/components/mg-progress.js.map +0 -1
  366. package/dist/components/mg-skip-links.js.map +0 -1
  367. package/dist/components/mg-table.js.map +0 -1
  368. package/dist/components/mg-tabs.js.map +0 -1
  369. package/dist/components/mg-tag.js.map +0 -1
  370. package/dist/components/mg-tooltip-content.js.map +0 -1
  371. package/dist/components/mg-tooltip-content2.js.map +0 -1
  372. package/dist/components/mg-tooltip.js.map +0 -1
  373. package/dist/components/mg-tooltip2.js.map +0 -1
  374. package/dist/components/popper.js.map +0 -1
  375. package/dist/esm/app-globals-DQuL1Twl.js +0 -6
  376. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  377. package/dist/esm/events.utils-yMGqY8YG.js.map +0 -1
  378. package/dist/esm/index-CAuxALt5.js.map +0 -1
  379. package/dist/esm/index-CwZ2wzxw.js.map +0 -1
  380. package/dist/esm/index-Dr7GYvIz.js.map +0 -1
  381. package/dist/esm/index.js.map +0 -1
  382. package/dist/esm/loader.js.map +0 -1
  383. package/dist/esm/mg-action-more_37.entry.js.map +0 -1
  384. package/dist/esm/mg-alert.entry.js.map +0 -1
  385. package/dist/esm/mg-components.js.map +0 -1
  386. package/dist/esm/mg-input-combobox.entry.js.map +0 -1
  387. package/dist/esm/mg-input-rich-text-editor.entry.js.map +0 -1
  388. package/dist/esm/mg-input.conf-CNgv8hc5.js.map +0 -1
  389. package/dist/esm/mg-loader.entry.js.map +0 -1
  390. package/dist/esm/mg-progress.entry.js.map +0 -1
  391. package/dist/mg-components/index.esm.js.map +0 -1
  392. package/dist/mg-components/loader.esm.js.map +0 -1
  393. package/dist/mg-components/mg-alert.entry.esm.js.map +0 -1
  394. package/dist/mg-components/mg-components.esm.js.map +0 -1
  395. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +0 -1
  396. package/dist/mg-components/mg-input-rich-text-editor.entry.esm.js.map +0 -1
  397. package/dist/mg-components/mg-loader.entry.esm.js.map +0 -1
  398. package/dist/mg-components/mg-progress.entry.esm.js.map +0 -1
  399. package/dist/mg-components/p-3e92299a.entry.js +0 -2
  400. package/dist/mg-components/p-3e92299a.entry.js.map +0 -1
  401. package/dist/mg-components/p-CAuxALt5.js +0 -3
  402. package/dist/mg-components/p-CAuxALt5.js.map +0 -1
  403. package/dist/mg-components/p-CNgv8hc5.js.map +0 -1
  404. package/dist/mg-components/p-CwZ2wzxw.js +0 -2
  405. package/dist/mg-components/p-CwZ2wzxw.js.map +0 -1
  406. package/dist/mg-components/p-DQuL1Twl.js +0 -2
  407. package/dist/mg-components/p-DQuL1Twl.js.map +0 -1
  408. package/dist/mg-components/p-Dr7GYvIz.js.map +0 -1
  409. package/dist/mg-components/p-c907ddac.entry.js +0 -2
  410. package/dist/mg-components/p-c907ddac.entry.js.map +0 -1
  411. package/dist/mg-components/p-d711941b.entry.js +0 -2
  412. package/dist/mg-components/p-d711941b.entry.js.map +0 -1
  413. package/dist/mg-components/p-da1e7950.entry.js +0 -2
  414. package/dist/mg-components/p-da1e7950.entry.js.map +0 -1
  415. package/dist/mg-components/p-e7a7c651.entry.js +0 -11
  416. package/dist/mg-components/p-e7a7c651.entry.js.map +0 -1
  417. package/dist/mg-components/p-fea46548.entry.js +0 -2
  418. package/dist/mg-components/p-fea46548.entry.js.map +0 -1
  419. package/dist/mg-components/p-yMGqY8YG.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-tooltip.js","sourceRoot":"","sources":["../../../../src/components/atoms/mg-tooltip/mg-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC3I,OAAO,EA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AAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAEnF,gCAAgC;QAChC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAE7D,cAAc;QACd,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,oBAAoB;;QAClB,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAChE,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,CAAC,CAAC,WAAmB,EAAE,EAAE;YAC5C,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;YACzE,WAAW,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa;YACb,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACvB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\nimport { createID, focusableElements, getWindows, isValideID, isValidString, nextTick, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { Instance as PopperInstance, createPopper, Placement, PositioningStrategy } from '@popperjs/core';\nimport { type GuardType, Guard } from './mg-tooltip.conf';\n\n/**\n * HTMLMgButtonElement type guard\n * @param element - element to check\n * @returns return true if type is HTMLMgButtonElement\n */\nconst isButton = (element: unknown): element is HTMLMgButtonElement => typeof element === 'object' && ['MG-BUTTON', 'BUTTON'].includes((element as Element).tagName);\n\n/**\n * @slot - Element that will display the tooltip\n */\n@Component({\n tag: 'mg-tooltip',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-tooltip.css',\n shadow: true,\n})\nexport class MgTooltip {\n /************\n * Internal *\n ************/\n\n private popper: PopperInstance;\n private mgTooltipContent: HTMLMgTooltipContentElement;\n private tooltipedElement: HTMLElement;\n private windows: Window[];\n private hasCustomTabIndex: boolean;\n\n // tooltip actions guards\n private guard: GuardType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgTooltipElement;\n\n /**\n * Sets an `id` attribute.\n * Needed by the input for accessibility `aria-decribedby`.\n */\n @Prop() identifier: string = createID('mg-tooltip');\n @Watch('identifier')\n watchIdentifier(newValue: MgTooltip['identifier']): void {\n if (!isValideID(newValue)) {\n throw new Error(`<mg-tooltip> prop \"identifier\" value is invalid. Passed value: ${toString(newValue)}.`);\n }\n // use renderTooltipContent to update tooltip-content id\n this.renderTooltipContent();\n }\n\n /**\n * Displayed message in the tooltip\n */\n @Prop() message!: string;\n @Watch('message')\n watchMessage(newValue: MgTooltip['message']): void {\n if (!isValidString(newValue)) {\n throw new Error(`<mg-tooltip> prop \"message\" is required and must be a string. Passed value: ${toString(newValue)}.`);\n }\n if (this.mgTooltipContent !== undefined) this.mgTooltipContent.message = newValue;\n }\n\n /**\n * Tooltip placement\n */\n @Prop() placement: Placement = 'bottom';\n\n /**\n * Display tooltip\n */\n @Prop({ mutable: true }) display = false;\n @Watch('display')\n watchDisplay(newValue: MgTooltip['display']): void {\n if (newValue) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Disable tooltip\n */\n @Prop() disabled = false;\n @Watch('disabled')\n watchDisabled(newValue: MgTooltip['disabled']): void {\n if (this.hasCustomTabIndex) {\n if (newValue) this.tooltipedElement.removeAttribute('tabindex');\n else if (!this.tooltipedElement.hasAttribute('tabindex')) this.tooltipedElement.setAttribute('tabindex', '0');\n }\n }\n\n /**\n * Show tooltip\n */\n private show = (): void => {\n // Make the tooltip visible\n this.mgTooltipContent.dataset.show = '';\n // Enable the event listeners\n this.popper.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }],\n }));\n // hide when click outside on nextTick to prevent event to trigger after creation\n nextTick(() => {\n this.windows.forEach((localWindow: Window) => {\n localWindow.addEventListener('click', this.handleClickOutside, false);\n localWindow.addEventListener('keydown', this.handlePressEscape, false);\n });\n });\n };\n\n /**\n * Hide tooltip\n */\n private hide = (): void => {\n // Hide the tooltip\n this.mgTooltipContent.removeAttribute('data-show');\n // Disable the event listeners\n this.popper.setOptions(options => ({\n ...options,\n modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }],\n }));\n // Remove event listener\n this.windows.forEach((localWindow: Window) => {\n localWindow.removeEventListener('click', this.handleClickOutside, false);\n localWindow.removeEventListener('keyboard', this.handlePressEscape, false);\n });\n };\n\n /**\n * Check if clicked outside of component and hide tooltip\n * @param event - mouse event\n */\n private handleClickOutside = (event: MouseEvent & { target: HTMLElement }): void => {\n if (event.target.closest('mg-tooltip') !== this.element) this.setDisplay(false);\n };\n\n /**\n * Check if 'Escape' key is pressed of component and hide tooltip\n * @param event - keyboard event\n */\n private handlePressEscape = (event: KeyboardEvent): void => {\n if (event.code === 'Escape') {\n this.setDisplay(false);\n this.resetGuard();\n }\n };\n\n /**\n * Method to set display prop\n * @param newValue - display prop new value\n * @param condition - additionnal condition to apply display prop newValue\n */\n private setDisplay = (newValue: MgTooltip['display'], condition = true): void => {\n if (!this.disabled && condition) this.display = newValue;\n };\n\n /**\n * Action for tooltip element and tooltiped element mouse listener\n * @param elementGuard - tooltip element guard\n * @param eventName - event name\n * @param conditionalGuard - guard condition\n */\n private tooltipMouseListenerAction = (elementGuard: GuardType, eventName: 'mouseenter' | 'mouseleave', conditionalGuard: GuardType): void => {\n // active FOCUS guard cancel process\n if ([Guard.FOCUS, Guard.DISABLE_ON_CLICK].includes(this.guard)) {\n return;\n }\n\n // Update guard by element guard\n this.guard = elementGuard;\n\n if (eventName !== 'mouseenter') {\n // process action in the next event loop macro task\n setTimeout(() => {\n this.setDisplay(false, this.guard !== conditionalGuard);\n this.resetGuard();\n }, 100);\n } else if (this.guard === Guard.HOVER_TOOLTIPED_ELEMENT) {\n this.setDisplay(true);\n }\n };\n\n /**\n * Method to reset guard value\n */\n private resetGuard = (): void => {\n this.guard = undefined;\n };\n\n /**\n * Update slot content when it is a mg-button\n * @param mgButton - slotted mg-button\n */\n private setMgButtonWrapper = (mgButton: HTMLMgButtonElement): void => {\n const buttonWrapperClass = 'mg-c-tooltip__mg-button-wrapper';\n const hasButtonWrapper = mgButton.parentElement.classList.contains(buttonWrapperClass);\n // For disabled mg-button, we need to wrap it in a new element\n // We bind handlers to this new element to keep listener features as workaround to disabled mg-button `pointer-events: none`\n // AND to prevent multiple nested wrappers from rendering when a new render is called with a disabled mg-button\n if (mgButton.disabled && !hasButtonWrapper) {\n // wrap mg-button in a div\n const div = document.createElement('div');\n div.classList.add(buttonWrapperClass);\n mgButton.parentNode.insertBefore(div, mgButton);\n div.appendChild(mgButton);\n\n // update tooltipElement\n this.setTooltipedElement(div);\n } else if (!mgButton.disabled && hasButtonWrapper) {\n this.element.firstElementChild.replaceWith(mgButton);\n\n // update tooltipElement\n this.setTooltipedElement(mgButton);\n }\n };\n\n /**\n * Set popper instance\n * @param strategy - popper strategy to apply on instance\n */\n private setPopper = (strategy: PositioningStrategy): void => {\n // Create popperjs tooltip\n this.popper = createPopper(this.tooltipedElement, this.mgTooltipContent, {\n placement: this.placement,\n strategy,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n {\n name: 'flip',\n options: {\n fallbackPlacements: ['auto'],\n },\n },\n ],\n });\n };\n\n /**\n * Define selected element to become tooltip selector and init listeners\n * @param element - tooltiped element\n */\n private setTooltipedElement = (element: HTMLElement): void => {\n this.tooltipedElement = element;\n\n // Manage tooltipedElement focus events\n this.tooltipedElement.addEventListener('focus', () => {\n this.guard = Guard.FOCUS;\n this.setDisplay(true);\n });\n\n // as `click` event is the composition of `mousedown` and `mouseup` event,\n // and `click` event trigger `focus` event after a success `mousedown` wich set the `guard` to `Guard.FOCUS`\n // we reset the guard on `mouseup` event to unlock tooltip\n this.tooltipedElement.addEventListener('mouseup', () => {\n this.resetGuard();\n });\n\n this.tooltipedElement.addEventListener('blur', () => {\n this.resetGuard();\n this.setDisplay(false);\n });\n\n // manage tooltipElement & tooltipedElement mouseenter/mouseleave events\n this.tooltipedElement.addEventListener('mouseenter', () => {\n this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, 'mouseenter', Guard.HOVER_TOOLTIP_ELEMENT);\n });\n\n this.tooltipedElement.addEventListener('mouseleave', () => {\n this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, 'mouseleave', Guard.HOVER_TOOLTIP_ELEMENT);\n });\n };\n\n /**\n * Set button mutation observer\n * @param mgButton - mg-button to observe\n */\n private setMgButtonMutationObserver = (mgButton: HTMLMgButtonElement): void => {\n new MutationObserver(mutationList => {\n // stop process when none of mutations attributed is disabled\n if (!mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName))) return;\n\n // set guard when one of mutations is for a disabled with disabled-on-click\n if (mutationList.some((mutation: MutationRecord & { target: HTMLMgButtonElement }) => mutation.target.disabled && mutation.target.disableOnClick)) {\n this.guard = Guard.DISABLE_ON_CLICK;\n }\n\n // when the disabled-on-click guard is running we stop process\n if (this.guard === Guard.DISABLE_ON_CLICK) return;\n\n // update button wrapper\n this.setMgButtonWrapper(mgButton);\n\n // Since Firefox doesn't trigger a \"blur\" event when the \"disabled\" attribute is added or removed from a button\n // we have to manually unlock the guard because the \"blur\" handler of the tooltipedElement won't do it.\n this.resetGuard();\n\n // update popper instance\n this.popper.update();\n }).observe(mgButton, { attributes: true });\n };\n\n /**\n * Set tooltiped element aria-describedby\n * @param element - element to update\n */\n private setAriaDescribedby = (element: HTMLElement): void => {\n // Set aria-describedby\n if (!element.hasAttribute('aria-describedby')) {\n this.tooltipedElement.setAttribute('aria-describedby', this.identifier);\n } else {\n // We ensure to have uniq ids\n element.setAttribute('aria-describedby', `${[...new Set([...element.getAttribute('aria-describedby').split(' '), this.identifier])].join(' ')}`);\n }\n };\n\n /**\n * Render tooltip content element and init listeners\n */\n private renderTooltipContent(): void {\n if (this.mgTooltipContent !== undefined) {\n this.mgTooltipContent.setAttribute('id', this.identifier);\n } else {\n this.mgTooltipContent = document.createElement('mg-tooltip-content');\n this.mgTooltipContent.setAttribute('slot', 'content');\n this.mgTooltipContent.setAttribute('id', this.identifier);\n\n const arrow = document.createElement('div');\n arrow.setAttribute('slot', 'arrow');\n arrow.dataset.popperArrow = '';\n this.mgTooltipContent.appendChild(arrow);\n\n // manage tooltipElement & tooltipedElement mouseenter/mouseleave events\n this.mgTooltipContent.addEventListener('mouseenter', () => {\n this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, 'mouseenter', Guard.HOVER_TOOLTIPED_ELEMENT);\n });\n this.mgTooltipContent.addEventListener('mouseleave', () => {\n this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, 'mouseleave', Guard.HOVER_TOOLTIPED_ELEMENT);\n });\n\n // append tooltip element to component\n this.element.appendChild(this.mgTooltipContent);\n }\n }\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * set variables\n */\n componentWillLoad(): void {\n // Get windows to attach events\n this.windows = getWindows(window);\n\n // Get tooltip element\n this.renderTooltipContent();\n\n //validate properties\n this.watchDisabled(this.disabled);\n this.watchMessage(this.message);\n this.watchIdentifier(this.identifier);\n }\n\n /**\n * Get slotted element\n * Check if it already contain an interactive element, if not we need to add a tabIndex attribute\n * We need to attach the focused element to the tooltip (aria-describedby)\n */\n componentDidLoad(): void {\n // get slotted element wich is not the tooltip\n const slotElement: HTMLElement = this.element.querySelector(`*:not(#${this.identifier})`);\n\n // Get interactive element\n const interactiveElement: HTMLElement = slotElement.matches(focusableElements) ? slotElement : slotElement.shadowRoot?.querySelector(focusableElements);\n\n this.setTooltipedElement(interactiveElement || slotElement);\n\n // Check if slotted element is a disabled mg-button\n // In this case we wrap the mg-button into a div to enable the tooltip\n if (isButton(slotElement)) {\n this.setMgButtonMutationObserver(slotElement);\n this.setMgButtonWrapper(slotElement);\n }\n\n // Add tabindex to slotted element if we can't find any interactive element\n if (!this.disabled && [undefined, null].includes(interactiveElement)) {\n this.hasCustomTabIndex = true;\n slotElement.tabIndex = 0;\n // Add role on non-interactive element to work with \"aria-describedby\" for screen readers\n slotElement.setAttribute('role', 'button');\n }\n\n // apply a11y aria\n this.setAriaDescribedby(slotElement);\n\n // set Tooltip\n this.setPopper(this.element.closest('mg-popover') !== null ? 'absolute' : 'fixed');\n\n // add document keyboard handler\n document.addEventListener('keydown', this.handlePressEscape);\n\n // check props\n this.watchDisplay(this.display);\n }\n\n /**\n * update popper position after props change on component did update hook to benefit from render ended\n */\n componentDidUpdate(): void {\n this.popper.update();\n }\n\n /**\n * remove listeners\n */\n disconnectedCallback(): void {\n document.removeEventListener('keydown', this.handlePressEscape);\n this.windows?.forEach((localWindow: Window) => {\n localWindow.removeEventListener('click', this.handleClickOutside, false);\n localWindow.removeEventListener('keydown', this.handlePressEscape, false);\n });\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host>\n <slot></slot>\n <slot name=\"content\"></slot>\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input.conf.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input/mg-input.conf.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAU,CAAC;AAIlD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAC;AAoC5D,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AACpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,2BAA2B,CAAC","sourcesContent":["/**\n * Possible input width\n */\nexport const widths = [2, 4, 16, 'full'] as const;\n\nexport type Width = (typeof widths)[number];\n\n/**\n * Possible tootltip postions\n */\nexport const tooltipPositions = ['input', 'label'] as const;\n\nexport type TooltipPosition = (typeof tooltipPositions)[number];\n\n/**\n * Base interface for common methods\n */\ninterface InputBaseMethods {\n required: boolean;\n invalid: boolean;\n labelOnTop: boolean;\n readonly: boolean;\n displayError: () => Promise<void>;\n reset: () => Promise<void>;\n}\n\n/**\n * Possible Input types\n */\nexport type HTMLMgInputsElement =\n | (HTMLMgInputElement & InputBaseMethods)\n | HTMLMgInputCheckboxElement\n | HTMLMgInputDateElement\n | HTMLMgInputNumericElement\n | HTMLMgInputPasswordElement\n | HTMLMgInputRadioElement\n | HTMLMgInputSelectElement\n | HTMLMgInputTextElement\n | HTMLMgInputTextareaElement\n | (HTMLMgInputToggleElement & InputBaseMethods);\n\n/**\n * Available WindowEvent types\n */\nexport type EventType = keyof WindowEventMap & 'blur';\n\nexport const classFieldset = 'mg-c-input--fieldset';\nexport const classDisabled = 'mg-c-input--disabled';\nexport const classReadonly = 'mg-c-input--readonly';\nexport const classVerticalList = 'mg-c-input--vertical-list';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input/mg-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,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E,IAAI,CAAC,SAAS,GAAS;gBAClC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,KAAK,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,aAAa,EAAE,CAC7G;YACN,4DAAK,KAAK,EAAC,6BAA6B;gBACtC,4DAAK,KAAK,EAAC,mBAAmB;oBAC5B,8DAAa;oBACZ,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,eAAe,KAAK,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,aAAa,EAAE,CAC7G;gBACL,IAAI,CAAC,0BAA0B,IAAI,CAClC,4DAAK,KAAK,EAAC,uBAAuB;oBAChC,6DAAM,IAAI,EAAE,IAAI,CAAC,YAAY,GAAS,CAClC,CACP;gBACA,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,IAAI,CACxC,4DAAK,KAAK,EAAC,mBAAmB,eAAW,WAAW;oBAClD,6DAAM,IAAI,EAAE,IAAI,CAAC,SAAS,GAAS,CAC/B,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, Watch, Host, State } from '@stencil/core';\nimport { isValideID, isValidString, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { tooltipPositions, type TooltipPosition, classFieldset, classReadonly, classDisabled, classVerticalList } from './mg-input.conf';\n\n/**\n * @slot - Input content\n */\n@Component({\n tag: 'mg-input',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input.css',\n shadow: true,\n})\nexport class MgInput {\n /************\n * Internal *\n ************/\n\n // HTML selectors\n private helpTextId: string;\n private helpTextErrorId: string;\n private readonly slotLabel = 'label';\n private readonly slotError = 'error';\n private readonly slotHelpText = 'help-text';\n\n // slots elements\n private errorMessageSlotElement: HTMLElement;\n private helptextMessageSlotElement: HTMLElement;\n\n // style\n private readonly classInput = 'mg-c-input';\n private readonly classHasError = 'mg-c-input--has-error';\n private readonly classLabelOnTop = 'mg-c-input--label-on-top';\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputElement;\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n watchIdentifier(newValue: MgInput['identifier']): void {\n if (!isValidString(newValue)) {\n throw new Error(`<mg-input> prop \"identifier\" is required and must be a string. Passed value: ${toString(newValue)}.`);\n } else if (!isValideID(newValue)) {\n console.error(`<mg-input> prop \"identifier\" value is invalid. Passed value: ${toString(newValue)}.`);\n } else {\n this.helpTextId = `${this.identifier}-help-text`;\n this.helpTextErrorId = `${this.identifier}-error`;\n }\n }\n\n /**\n * Define input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n @Watch('labelOnTop')\n watchLabelOnTop(newValue: MgInput['labelOnTop']): void {\n if (newValue) {\n this.element.classList.add(this.classLabelOnTop);\n } else {\n this.element.classList.remove(this.classLabelOnTop);\n }\n }\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide: boolean = false;\n @Watch('labelHide')\n @Watch('labelOnTop')\n watchLabelConfig(): void {\n if (this.labelHide && this.labelOnTop) {\n throw new Error('<mg-input> prop \"labelOnTop\" must not be paired with the prop \"labelHide\".');\n }\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n @Watch('tooltipPosition')\n watchTooltipPosition(newValue: MgInput['tooltipPosition']) {\n if (!tooltipPositions.includes(newValue)) {\n throw new Error(`<mg-input> prop \"tooltipPosition\" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define if input is required\n */\n @Prop() required: boolean = false;\n\n /**\n * Define error message to display\n */\n @Prop() errorMessage?: string;\n @Watch('errorMessage')\n watchErrorMessage(newValue: MgInput['errorMessage']): void {\n if (newValue !== undefined) {\n this.element.classList.add(this.classHasError);\n this.renderErrorMessage();\n } else {\n this.element.classList.remove(this.classHasError);\n this.errorMessageSlotElement?.remove();\n this.errorMessageSlotElement = undefined;\n }\n }\n\n /**\n * Define help text to display\n */\n @Prop() helpText?: string;\n @Watch('helpText')\n watchHelpText(newValue: MgInput['helpText']): void {\n if (newValue && !this.isReadonly) {\n this.renderHelpText();\n } else {\n this.helptextMessageSlotElement?.remove();\n this.helptextMessageSlotElement = undefined;\n }\n }\n\n /**\n * Define aria-describedby ids to link with\n */\n @Prop() ariaDescribedbyIDs: string[];\n @Watch('identifier')\n @Watch('errorMessage')\n @Watch('helpText')\n @Watch('ariaDescribedbyIDs')\n watchAriaDescribedbyIDs(): void {\n if (this.isReadonly) return;\n // a11y IDs\n const ariaDescribedbyIDs = new Set(this.ariaDescribedbyIDs);\n // Help text\n if (this.helpText !== undefined) {\n this.renderHelpText();\n if (!ariaDescribedbyIDs.has(this.helpTextId)) ariaDescribedbyIDs.add(this.helpTextId);\n }\n\n // Error Message\n if (this.errorMessage !== undefined) {\n this.renderErrorMessage();\n if (!ariaDescribedbyIDs.has(this.helpTextErrorId)) ariaDescribedbyIDs.add(this.helpTextErrorId);\n }\n\n this.element.querySelectorAll('input,select,textarea,[role=\"switch\"]').forEach(element => {\n if (ariaDescribedbyIDs.size > 0) {\n element.setAttribute('aria-describedby', Array.from(ariaDescribedbyIDs).join(' '));\n } else {\n element.removeAttribute('aria-describedby');\n }\n });\n }\n\n /**\n * Component classes\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('class')\n watchClass(): void {\n if (!this.element.classList.contains(this.classInput)) {\n this.element.classList.add(this.classInput);\n }\n this.isFieldset = this.element.classList.contains(classFieldset);\n this.isReadonly = this.element.classList.contains(classReadonly);\n this.isDisabled = this.element.classList.contains(classDisabled);\n this.isVerticalList = this.element.classList.contains(classVerticalList);\n }\n\n /**\n * Element is fieldset\n */\n @State() isFieldset: boolean = false;\n\n /**\n * Element is readonly\n */\n @State() isReadonly: boolean = false;\n\n /**\n * Element is disabled\n */\n @State() isDisabled: boolean = false;\n\n /**\n * Element is disabled\n */\n @State() isVerticalList: boolean = false;\n\n /**\n * Trigger label update\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('class')\n @Watch('label')\n @Watch('required')\n @Watch('isReadonly')\n @Watch('isFieldset')\n watchLabel(): void {\n if (!isValidString(this.label)) {\n throw new Error(`<mg-input> prop \"label\" is required and must be a string. Passed value: ${toString(this.label)}.`);\n } else {\n this.watchAriaDescribedbyIDs();\n this.renderLabel();\n }\n }\n\n /************\n * Methods *\n ************/\n\n /**\n * Render input label\n */\n private renderLabel(): void {\n let labelSlotElement: HTMLMgInputTitleElement = this.element.querySelector(`[slot=${this.slotLabel}]`);\n\n // first remove previous labelslot if exist\n labelSlotElement?.remove();\n\n // create title element\n labelSlotElement = document.createElement('mg-input-title');\n [\n ['slot', this.slotLabel],\n ['identifier', this.identifier],\n ['readonly', this.isReadonly.toString()],\n ['required', ((this.required && !this.isDisabled) || false).toString()],\n ['is-legend', this.isFieldset.toString()],\n ].forEach(([attr, val]) => {\n labelSlotElement.setAttribute(attr, val);\n });\n\n // create label element\n const label = document.createElement('span');\n label.classList.add('mg-c-input-title__text');\n label.textContent = this.label;\n\n labelSlotElement.appendChild(label);\n this.element.appendChild(labelSlotElement);\n }\n\n /**\n * Render error message\n */\n private renderErrorMessage(): void {\n this.errorMessageSlotElement = this.element.querySelector(`[slot=${this.slotError}]`);\n if (this.errorMessageSlotElement === null) {\n this.errorMessageSlotElement = document.createElement('div');\n this.errorMessageSlotElement.setAttribute('slot', this.slotError);\n this.element.appendChild(this.errorMessageSlotElement);\n }\n this.errorMessageSlotElement.setAttribute('id', this.helpTextErrorId);\n this.errorMessageSlotElement.innerHTML = this.errorMessage;\n }\n\n /**\n * Render help text message\n */\n private renderHelpText(): void {\n this.helptextMessageSlotElement = this.element.querySelector(`[slot=${this.slotHelpText}]`);\n if (this.helptextMessageSlotElement === null) {\n this.helptextMessageSlotElement = document.createElement('div');\n this.helptextMessageSlotElement.setAttribute('slot', this.slotHelpText);\n this.element.appendChild(this.helptextMessageSlotElement);\n }\n this.helptextMessageSlotElement.setAttribute('id', this.helpTextId);\n this.helptextMessageSlotElement.innerHTML = this.helpText;\n }\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n this.watchIdentifier(this.identifier);\n this.watchLabel();\n this.watchClass();\n this.watchLabelOnTop(this.labelOnTop);\n this.watchLabelConfig();\n this.watchTooltipPosition(this.tooltipPosition);\n this.watchHelpText(this.helpText);\n this.watchErrorMessage(this.errorMessage);\n }\n\n /**\n * Validate slots\n */\n componentDidLoad(): void {\n this.watchAriaDescribedbyIDs();\n if (!this.isReadonly && !this.isFieldset && this.element.querySelector(`#${this.identifier}`) === null) {\n throw new Error(`<mg-input> \"identifier\" prop has no target for id: ${this.identifier}. Add an id to the targeted input.`);\n }\n }\n\n /**\n * Get tooltip node\n * @returns mg-tooltip\n */\n private renderTooltip = (): HTMLMgTooltipElement => (\n <mg-tooltip identifier={`${this.identifier}-tooltip`} message={this.tooltip}>\n <mg-icon icon=\"info-circle\"></mg-icon>\n </mg-tooltip>\n );\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const isGroup = this.isFieldset && !this.isReadonly;\n return (\n <Host class={this.element.classList.toString()} role={isGroup ? 'group' : undefined} aria-labelledby={isGroup ? `${this.identifier}-title` : undefined}>\n <div class={{ 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide }}>\n <slot name={this.slotLabel}></slot>\n {this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()}\n </div>\n <div class=\"mg-c-input__input-container\">\n <div class=\"mg-c-input__input\">\n <slot></slot>\n {this.tooltip && !this.labelOnTop && (this.tooltipPosition === 'input' || this.labelHide) && this.renderTooltip()}\n </div>\n {this.helptextMessageSlotElement && (\n <div class=\"mg-c-input__help-text\">\n <slot name={this.slotHelpText}></slot>\n </div>\n )}\n {!this.isDisabled && this.errorMessage && (\n <div class=\"mg-c-input__error\" aria-live=\"assertive\">\n <slot name={this.slotError}></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MgInputCheckboxList.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAS,MAAM,eAAe,CAAC;AAG9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkD,CAAC,KAA+B,EAAW,EAAE,CAAC,CAC9H,UACE,KAAK,EAAC,mCAAmC,EACzC,IAAI,EAAC,MAAM,sBACO,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,gBAC7D,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,eACpE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC1D,EAAE,EAAE,KAAK,CAAC,EAAE,IAEX,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;;IAAC,OAAA,CAC7B,UAAI,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,mCAAmC,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,EAAE;QACnI,aACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,KAAK,CAAC,GAAG,EACb,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,0CAAE,QAAQ,EAAE,EAC9B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,kBACV,CAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,QAAQ,EAAE,KAAI,OAAO,EAClD,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,EAC1C,aAAa,EAAE,KAAK,CAAC,KAAK,KAAK,IAAI,EACnC,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,MAAM,EAAE,KAAK,CAAC,WAAW,EACzB,SAAS,EAAE,KAAK,CAAC,cAAc,GAC/B;QACF,aAAO,OAAO,EAAE,KAAK,CAAC,GAAG,IAAG,KAAK,CAAC,KAAK,CAAS,CAC7C,CACN,CAAA;CAAA,CAAC,CACC,CACN,CAAC","sourcesContent":["import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { MgInputCheckboxListProps } from './mg-input-checkbox.conf';\n\n/**\n * Get checkboxes list template\n * @param props - MgInputCheckboxList Interface Props\n * @returns input template\n */\nexport const MgInputCheckboxList: FunctionalComponent<MgInputCheckboxListProps> = (props: MgInputCheckboxListProps): VNode[] => (\n <ul\n class=\"mg-c-input__input-group-container\"\n role=\"list\"\n aria-describedby={props.displaySearchInput ? 'search-results' : undefined}\n aria-label={props.displaySearchInput ? props.messages.searchResults : undefined}\n aria-live={props.displaySearchInput ? 'polite' : undefined}\n id={props.id}\n >\n {props.checkboxes.map(input => (\n <li key={input._id} class={{ 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled }}>\n <input\n type=\"checkbox\"\n id={input._id}\n name={props.name}\n value={input.value?.toString()}\n checked={Boolean(input.value)}\n required={input.required}\n aria-invalid={props.invalid?.toString() || 'false'}\n disabled={props.disabled || input.disabled}\n indeterminate={input.value === null}\n onInput={input._handleInput}\n onBlur={input._handleBlur}\n onKeyDown={input._handleKeydown}\n />\n <label htmlFor={input._id}>{input.title}</label>\n </li>\n ))}\n </ul>\n);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-checkbox-paginated.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAA4D,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;GAGG;AAMH,MAAM,OAAO,wBAAwB;IALrC;QAME;;uBAEe;QACE,WAAM,GAAG,EAAE,CAAC;QAG7B;;uBAEe;QAEf;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAYzB;;WAEG;QACsB,gBAAW,GAAG,CAAC,CAAC;QAEzC;;WAEG;QACK,eAAU,GAAmB,EAAE,CAAC;QA4BxC;;WAEG;QACM,aAAQ,GAAG,IAAI,CAAC;QAEzB;;qBAEa;QAEb;;WAEG;QACK,sBAAiB,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC,CAA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IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAC1D,qBACE,GAAG,EAAC,mBAAmB,EACvB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,EAC9C,WAAW,EAAE,IAAI,CAAC,WAAW,2BACN,IAAI,CAAC,uBAAuB,EACnD,oBAAoB,EAAE,IAAI,EAC1B,aAAa,EAAE,IAAI,EACnB,UAAU,EAAE,6BAA6B,IAAI,CAAC,WAAW,EAAE,GAC5C,CAClB,CACG;YACN,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAC,6BAA6B;gBACpF,EAAC,mBAAmB,qDAClB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,EACzD,kBAAkB,EAAE,IAAI,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,SAAS,IAAI,CAAC,WAAW,EAAE,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,GACA,CACnB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Event, EventEmitter, Watch, Host } from '@stencil/core';\nimport { CheckboxItem, IMgInputCheckboxBase, type SectionKindType, SectionKind } from '../mg-input-checkbox.conf';\nimport { MgInputCheckboxList } from '../MgInputCheckboxList';\n\n/**\n * Internal component use to manage sections instances\n * @internal\n */\n@Component({\n tag: 'mg-input-checkbox-paginated',\n shadow: false,\n scoped: true,\n})\nexport class MgInputCheckboxPaginated implements IMgInputCheckboxBase {\n /*************\n * Constantes *\n *************/\n private readonly offset = 10;\n private sectionKind: SectionKindType;\n\n /*************\n * Decorators *\n *************/\n\n /**\n * Define if mg-input-checkbox-list is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if mg-input-checkbox-list is disabled\n */\n @Prop() disabled = false;\n\n /**\n * Define mg-input-checkbox input name\n */\n @Prop() name?: string;\n\n /**\n * Define mg-input-checkbox input invalid\n */\n @Prop() invalid?: boolean;\n\n /**\n * Current page\n */\n @Prop({ mutable: true }) currentPage = 1;\n\n /**\n * Define checkboxes to paginate\n */\n @Prop() checkboxes: CheckboxItem[] = [];\n @Watch('checkboxes')\n watchCheckboxes(newValue: MgInputCheckboxPaginated['checkboxes'], oldValue?: MgInputCheckboxPaginated['checkboxes']): void {\n const pageCountNewValue = this.getPageCount(newValue);\n const pageCountOldValue = this.getPageCount(oldValue);\n // after each array.length update we reset pagination\n // when items fill on page, we set current page to 1\n if (pageCountNewValue === 1 || (pageCountNewValue !== 0 && this.currentPage === 0)) {\n this.currentPage = 1;\n }\n // when old items page numbers match the current page AND new items page number is lower than current page, we set the new last page\n else if (pageCountOldValue === this.currentPage && pageCountNewValue < this.currentPage) {\n this.currentPage--;\n }\n this.sectionKind = newValue[0].value ? SectionKind.SELECTED : SectionKind.NOT_SELECTED;\n }\n\n /**\n * Define component message\n */\n @Prop() messages: Record<string, string>;\n\n /**\n * Emit 'mass-action' event\n * used to informe that select-all/unselect-all button listner is triggered\n */\n @Event({ eventName: 'mass-action' }) massAction: EventEmitter<SectionKindType>;\n\n /**\n * Is checked items values expanded\n */\n @State() expanded = true;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * Mass action handler\n */\n private massActionHandler = (): void => {\n this.massAction.emit(this.sectionKind);\n };\n\n /**\n * Toggle items button handler\n */\n private handleToggleClick = (): void => {\n this.expanded = !this.expanded;\n };\n\n /**\n * Method to get a array range\n * @param from - array start index\n * @param to - array end index\n * @returns array's range\n */\n private getArrayRange = <ItemType,>(array: ItemType[], from: number, to: number): ItemType[] => array.slice(from, to);\n\n /**\n * Get from and to index\n * @returns [from,to] index\n */\n private getFromToIndexes(): number[] {\n const isFirstPage = this.currentPage === 1;\n const from = isFirstPage ? 0 : (this.currentPage - 1) * this.offset;\n const to = isFirstPage ? this.offset : this.currentPage * this.offset;\n return [from, to];\n }\n\n /**\n * Method to get page count from items\n * @param items - items to count\n * @returns page count from items\n */\n private getPageCount = (items: unknown[]): number => (items?.length > 0 ? Math.ceil(items.length / this.offset) : 0);\n\n /**\n * Handle mg-pagination current page change event\n * @param event - pagination current page change event\n */\n private handleCurrentPageChange = (event: CustomEvent): void => {\n this.currentPage = Number(event.detail);\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Validate props\n */\n componentWillLoad(): void {\n this.watchCheckboxes(this.checkboxes);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const getText = (checkboxes: CheckboxItem[]): HTMLElement => (\n <em class=\"mg-c-input__section-header-title-label\">{`${this.messages[checkboxes.length > 1 ? 'titlePlural' : 'title']} (${checkboxes.length})`}</em>\n );\n const [from, to] = this.getFromToIndexes();\n const itemsContainerId = `items-${this.sectionKind}-container`;\n\n return (\n <Host hidden={this.checkboxes.length < 1}>\n <div class=\"mg-c-input__section-header\">\n {this.sectionKind === SectionKind.SELECTED ? (\n <mg-button variant=\"flat\" onClick={this.handleToggleClick} aria-controls={itemsContainerId} aria-expanded={this.expanded.toString()}>\n <mg-icon icon={this.expanded ? 'chevron-up' : 'chevron-down'}></mg-icon>\n <span class=\"mg-c-input__section-header-title\">{getText(this.checkboxes)}</span>\n </mg-button>\n ) : (\n <p class=\"mg-c-input__section-header-title mg-c-input__section-header-title--static\">{getText(this.checkboxes)}</p>\n )}\n {((this.sectionKind === SectionKind.SELECTED && this.expanded && this.checkboxes.some(checkbox => checkbox.value === true && checkbox.disabled !== true)) ||\n (this.sectionKind === SectionKind.NOT_SELECTED && this.checkboxes.some(checkbox => checkbox.value === false && checkbox.disabled !== true))) && (\n <mg-tooltip class=\"mg-c-input__section-header-tootlip\" message={this.messages.tooltip}>\n <mg-button variant=\"link\" onClick={this.massActionHandler}>\n {this.messages.action}\n </mg-button>\n </mg-tooltip>\n )}\n {this.expanded && this.getPageCount(this.checkboxes) > 1 && (\n <mg-pagination\n key=\"search-pagination\"\n totalPages={this.getPageCount(this.checkboxes)}\n currentPage={this.currentPage}\n onCurrent-page-change={this.handleCurrentPageChange}\n hideNavigationLabels={true}\n hidePageCount={true}\n identifier={`input-checkbox-pagination-${this.sectionKind}`}\n ></mg-pagination>\n )}\n </div>\n <div hidden={!this.expanded} id={itemsContainerId} class=\"mg-c-input__section-content\">\n <MgInputCheckboxList\n checkboxes={this.getArrayRange(this.checkboxes, from, to)}\n displaySearchInput={true}\n messages={this.messages}\n id={`items-${this.sectionKind}`}\n disabled={this.disabled}\n name={this.name}\n invalid={this.invalid}\n ></MgInputCheckboxList>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-checkbox.conf.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,OAAO,CAAU,CAAC;AAY5D;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAoC;IAC1D,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;CAC7B,CAAC","sourcesContent":["/**\n * interface CheckboxValue\n * use to match returned value\n */\nexport interface CheckboxValue {\n title: string;\n value: boolean | null;\n disabled?: boolean;\n required?: boolean;\n}\n\n/**\n * interface CheckboxItem\n * use to match checkbox attributes\n */\nexport interface CheckboxItem extends CheckboxValue {\n _id: string;\n _handleInput: (event: InputEvent & { target: HTMLInputElement }) => void;\n _handleBlur: () => void;\n _handleKeydown: (event: KeyboardEvent & { target: HTMLElement }) => void;\n}\n\n/**\n * List of all availables checkbox type\n */\nexport const checkboxTypes = ['checkbox', 'multi'] as const;\n\n/**\n * ChecboxType from checkbox types\n */\nexport type CheckboxType = (typeof checkboxTypes)[number];\n\n/**\n * mg-input-checkbox-paginated section kind type\n */\nexport type SectionKindType = 'selected' | 'not-selected';\n\n/**\n * mg-input-checkbox-paginated section kind value\n */\nexport const SectionKind: Record<string, SectionKindType> = {\n SELECTED: 'selected',\n NOT_SELECTED: 'not-selected',\n};\n\n/**\n * Base mg-input-checkbox interface\n */\nexport interface IMgInputCheckboxBase {\n disabled?: boolean;\n name?: string;\n invalid?: boolean;\n}\n\n/**\n * mg-input-checkbox-list interface\n */\nexport interface MgInputCheckboxListProps extends IMgInputCheckboxBase {\n displaySearchInput: boolean;\n messages: Record<string, unknown>;\n checkboxes: CheckboxItem[];\n id: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-checkbox.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAA6C,aAAa,EAAE,WAAW,EAA6C,MAAM,0BAA0B,CAAC;AAC5J,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAwB,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjI,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;GAIG;AACH,MAAM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AAE,IAAI,CAAC,OAAO,EACrB,eAAe,EAAE,IAAI,CAAC,QAAQ,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAC7F,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EACpD,YAAY,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,IAE3D,YAAY,CACJ,CACZ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, h, Prop, EventEmitter, State, Watch, Method } from '@stencil/core';\nimport { ClassList, cleanString, isValidString, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { CheckboxItem, CheckboxType, CheckboxValue, checkboxTypes, SectionKind, MgInputCheckboxListProps, SectionKindType } from './mg-input-checkbox.conf';\nimport { MgInputCheckboxList } from './MgInputCheckboxList';\nimport { classDisabled, type TooltipPosition, classReadonly, classFieldset, classVerticalList } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n/**\n * type CheckboxItem validation function\n * @param items - Checkbox item\n * @returns match item type\n */\nconst isCheckboxItems = (items: unknown): items is CheckboxItem[] =>\n Array.isArray(items) &&\n items.every(item => typeof item === 'object' && typeof item.title === 'string' && (item.value === null || typeof item.value === 'boolean') && item.value !== undefined);\n\n@Component({\n tag: 'mg-input-checkbox',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-checkbox.css',\n shadow: true,\n})\nexport class MgInputCheckbox implements Omit<MgInputCheckboxListProps, 'id' | 'checkboxes' | 'messages'> {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private mgPopover: HTMLMgPopoverElement;\n private searchInput: HTMLInputElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n private mode: 'custom' | 'auto' = 'custom';\n\n // style\n private readonly baseClassName = 'mg-c-input--checkbox';\n private readonly classTypeMulti = 'mg-c-input--checkbox-multi';\n private readonly classWithValues = 'mg-c-input--with-values';\n private readonly classSearchMode = 'mg-c-input--search-mode';\n\n // \"multi\" setup\n private readonly multiStart = 5;\n private readonly searchStart = 10;\n\n // popover variables\n private hasOpenedPopover = false;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputCheckboxElement;\n\n /**\n * Component value\n * If item.value is `null`, checkbox will be indeterminate by default\n */\n @Prop({ mutable: true }) value!: CheckboxValue[];\n @Watch('value')\n validateValue(newValue: MgInputCheckbox['value']): void {\n if (isCheckboxItems(newValue)) {\n this.checkboxItems = newValue.map((item, index) => ({\n ...item,\n _id: `${this.identifier}_${index}`,\n _handleInput: this.handleInput.bind(this),\n _handleBlur: this.handleBlur.bind(this),\n _handleKeydown: this.handleKeydown.bind(this),\n }));\n this.valueChange.emit(newValue);\n } else {\n throw new Error(`<mg-input-checkbox> prop \"value\" is required and all values must be the same type, CheckboxItem. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define checkbox type\n * When it's undefined the type is dynamic:\n * - With 0-5 items type is 'checkbox'\n * - With 5-10 items type is 'multi'\n * When it set the type is locked to the defined value.\n * When type is dynamic OR with 'multi' type AND Over 10 items \"search\" feature is enabled\n */\n @Prop({ mutable: true }) type: CheckboxType;\n @Watch('type')\n validateType(newValue: MgInputCheckbox['type']): void {\n if (newValue !== undefined && !checkboxTypes.includes(newValue)) {\n throw new Error(`<mg-input-checkbox> prop \"type\" must be a CheckboxType. Passed value: ${toString(newValue)}.`);\n } else if (newValue === undefined) {\n this.mode = 'auto';\n this.type = checkboxTypes[0];\n } else if (newValue === 'multi') {\n this.classCollection.add(this.classTypeMulti);\n this.element.dataset.mgPopoverGuard = this.getMgPopoverIdentifier();\n } else {\n this.classCollection.delete(this.classTypeMulti);\n }\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 * Define input name\n * If not set the value equals the identifier\n */\n @Prop() name = this.identifier;\n\n /**\n * Define input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Define if inputs are display verticaly\n */\n @Prop() inputVerticalList = false;\n @Watch('inputVerticalList')\n watchInputVerticalList(newValue: MgInputCheckbox['inputVerticalList']): void {\n if (newValue) this.classCollection.add(classVerticalList);\n else this.classCollection.delete(classVerticalList);\n }\n\n /**\n * Define if mg-input-checkbox is required\n */\n @Prop() required = false;\n\n /**\n * Define if mg-input-checkbox is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputCheckbox['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Display selected values list in \"multi\" type\n * This prop is only applied with prop type \"multi\" or when an \"unset\" mode render a \"multi\" type.\n */\n @Prop() displaySelectedValues = false;\n @Watch('displaySelectedValues')\n watchDisplaySelectedValues(newValue: MgInputCheckbox['displaySelectedValues']): void {\n if (newValue) this.classCollection.add(this.classWithValues);\n else this.classCollection.delete(this.classWithValues);\n }\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 (prop !== 'readonly') this.updateCheckboxItems(prop, newValue);\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.hasDisplayedError = prop !== 'required';\n this.setErrorMessage(this.hasDisplayedError);\n }\n this.setButtonTextKey();\n }\n\n @Watch('disabled')\n validateDisabled(newValue: MgInputCheckbox['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\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 * Overwrite default \"edit\" button message\n */\n @Prop() editButtonMessage: string;\n /**\n * Overwrite default \"show\" button message\n */\n @Prop() showButtonMessage: string;\n\n /**\n * Overwrite default \"select\" button message\n */\n @Prop() selectButtonMessage: string;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList([this.baseClassName, classFieldset]);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Formated value to display in list\n */\n @State() checkboxItems: CheckboxItem[] = [];\n @Watch('checkboxItems')\n validateCheckboxItems(newValue: MgInputCheckbox['checkboxItems']): void {\n // For the 'auto' mode we update the type depending on the new value's length.\n if (this.mode === 'auto') this.type = newValue.length > this.multiStart ? 'multi' : 'checkbox';\n // If the type is multi and the new value's length is greater than the search gauge, display the search input.\n this.displaySearchInput = this.type === 'multi' && newValue.length > this.searchStart;\n // refresh search values\n if (this.displaySearchInput) this.updateSearchResults();\n this.setButtonTextKey();\n }\n\n /**\n * Display search input\n */\n @State() displaySearchInput: boolean;\n @Watch('displaySearchInput')\n watchDisplaySearchInput(newValue: MgInputCheckbox['displaySearchInput']): void {\n if (newValue) this.classCollection.add(this.classSearchMode);\n else this.classCollection.delete(this.classSearchMode);\n }\n\n /**\n * Search value query\n */\n @State() searchValue = '';\n @Watch('searchValue')\n validateSearchValue(): void {\n // refresh search values\n this.updateSearchResults();\n }\n\n /**\n * Search current page\n */\n @State() searchResults: CheckboxItem[] = [];\n\n /**\n * Select values button text local key\n */\n @State() selectValuesButtonKey: 'editButton' | 'showButton' | 'selectButton' = 'editButton';\n\n /**\n * Emitted event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputCheckboxElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputCheckboxElement['valid']>;\n\n /**\n * Set focus on input.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.element.shadowRoot.querySelector('input')?.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\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: MgInputCheckbox['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-checkbox> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-checkbox> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(undefined, valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (!this.readonly) {\n this.value = this.value.map(item => ({ ...item, value: false }));\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n resolve();\n });\n });\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputCheckbox['valid']) {\n const oldValidValue = this.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 if (this.valid !== oldValidValue) this.inputValid.emit(this.valid);\n }\n\n /**\n * Handle input event\n * @param event - input event\n */\n private handleInput = (event: InputEvent & { target: HTMLInputElement }): void => {\n this.updateCheckboxItems('value', Boolean(event.target.checked), item => item._id === event.target.id);\n this.updateValues();\n this.checkValidity();\n this.setErrorMessage();\n };\n\n /**\n * Keyboard handler\n * @param event - to track \"tab\" key\n */\n private handleKeydown = (event: KeyboardEvent & { target: HTMLElement }): void => {\n // track \"Tab\" key event when popover display (is \"multi\" type selected)\n if (event.key === 'Tab' && this.mgPopover?.display) {\n // when search input and do a back tab we close the popover\n if (Boolean(this.searchInput) && event.shiftKey && this.searchInput.id === event.target.id) {\n this.mgPopover.display = false;\n return;\n }\n\n const enableInputs = Array.from(this.element.shadowRoot.querySelectorAll('input'))\n .filter(input => !input.hasAttribute('disabled'))\n .map(({ id }) => id);\n const originInputIndex = enableInputs.findIndex(id => id === event.target.id);\n\n // close popover when tab trigger focus outside its DOM\n if ((originInputIndex + 1 >= enableInputs.length && !event.shiftKey) || (originInputIndex === 0 && event.shiftKey && this.searchInput === undefined))\n this.mgPopover.display = false;\n }\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n // Check validity\n this.checkValidity();\n this.setErrorMessage();\n };\n\n /**\n * Handle input search value-change event\n * @param event - input value-change event\n */\n private handleSearchChange = (event: CustomEvent): void => {\n this.searchValue = event.detail;\n event.stopPropagation();\n };\n\n /**\n * popover display-change handler\n * @param event - mg-popover display-change custom event\n */\n private handleMgPopoverDisplayChange = (event: CustomEvent): void => {\n // 1. update hasOpenedPopover guard with event value\n this.hasOpenedPopover = event.detail;\n\n // 2. update selected valued button text\n this.setButtonTextKey();\n\n // 3. when popover display change to hide, update reset needeed props and run checkValidity\n if (!event.detail) {\n // reset search value\n this.searchValue = '';\n // reset pagintated section current page\n Array.from(this.element.shadowRoot.querySelectorAll('mg-input-checkbox-paginated')).forEach(element => {\n element.currentPage = 1;\n });\n this.checkValidity();\n }\n };\n\n /**\n * Handle select all button\n * @param event - mass action event trigger a global select/unselect on values\n */\n private handleMassAction = (event: CustomEvent<SectionKindType>): void => {\n const displayItems = this.getDisplayItems();\n\n // update only displayed items\n displayItems.forEach(item => {\n if (item.disabled !== true) {\n item.value = event.detail !== SectionKind.SELECTED;\n }\n });\n this.updateValues();\n };\n\n /**\n * Update values\n */\n private updateValues = (): void => {\n this.value = this.checkboxItems.map(o => {\n delete o._handleBlur;\n delete o._handleInput;\n delete o._handleKeydown;\n delete o._id;\n return o;\n });\n };\n\n /**\n * Update ckecboxes item\n * @param key - property to update\n * @param newValue - value to update with\n * @param condition - condtion to applu change on item\n */\n private updateCheckboxItems(key: string, newValue: unknown, condition?: (item: CheckboxItem) => boolean): void {\n this.checkboxItems = this.checkboxItems.map(item => {\n if ((typeof condition === 'function' && condition(item)) || condition === undefined) item[key] = newValue;\n return item;\n });\n }\n\n /**\n * has invalid input\n * @returns true if at least one input is invalid\n */\n private hasInvalidInput = (): boolean =>\n Array.from(this.element.shadowRoot.querySelectorAll('input[type=\"checkbox\"]')).some((input: HTMLInputElement) => !input.disabled && !input.checkValidity());\n\n /**\n * Method to update searchResults\n */\n private updateSearchResults = (): void => {\n this.searchResults = this.checkboxItems.filter(item => cleanString(item.title).includes(cleanString(this.searchValue)));\n };\n\n /**\n * Method to validate if one of inputs value is checked id required\n * @returns truthy if condition is valid\n */\n private validateRequired = (): boolean => !this.required || this.checkboxItems.some(({ value }) => value);\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || (!this.hasInvalidInput() && this.validateRequired()));\n };\n\n /**\n * Set button text locale key\n */\n private setButtonTextKey = (): void => {\n // prevent key update while popover is openned\n if (this.hasOpenedPopover) return;\n let messageKey: MgInputCheckbox['selectValuesButtonKey'] = 'editButton';\n if (this.disabled) messageKey = 'showButton';\n else if (this.getSelectedItems().length < 1) messageKey = 'selectButton';\n\n this.selectValuesButtonKey = messageKey;\n };\n\n /**\n * Get select values button message\n * @returns message to display\n */\n private getSelectValuesButtonMessage = (): string => {\n if (this.selectValuesButtonKey === 'editButton' && isValidString(this.editButtonMessage)) {\n return this.editButtonMessage;\n } else if (this.selectValuesButtonKey === 'showButton' && isValidString(this.showButtonMessage)) {\n return this.showButtonMessage;\n } else if (this.selectValuesButtonKey === 'selectButton' && isValidString(this.selectButtonMessage)) {\n return this.selectButtonMessage;\n } else {\n return this.messages.input.checkbox[this.selectValuesButtonKey];\n }\n };\n\n /**\n * Set input error message\n * @param displayError - dispay error condition\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (displayError = true, errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (displayError && !this.valid) {\n if (errorMessage !== undefined) this.errorMessage = errorMessage;\n else if (!this.validateRequired()) this.errorMessage = this.messages.errors.required;\n }\n };\n\n /**\n * Method to get mg-popover identifier\n * @returns MgPopover identifier\n */\n private getMgPopoverIdentifier = (): string => `${this.identifier}-input-mg-popover`;\n\n /**\n * Manage items to display depending on the search state\n * @returns items to display\n */\n private getDisplayItems = (): CheckboxItem[] => (this.searchValue.length > 0 ? this.searchResults : this.checkboxItems);\n\n /**\n * get list of selected checkboxItems\n * @returns selected checkboxItems\n */\n private getSelectedItems = (): CheckboxItem[] => this.checkboxItems.filter(({ value }) => value);\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\n // Validate\n // `validateType` must be done before `validateValue` because we need to set mode['auto'|'custom'] from type\n // and `validateValue` updates `this.checkboxItems` watcher which requires a defined `this.type`.\n this.validateType(this.type);\n this.validateValue(this.value);\n this.validateDisabled(this.disabled);\n this.watchReadonly(this.readonly);\n this.watchInputVerticalList(this.inputVerticalList);\n this.watchDisplaySelectedValues(this.displaySelectedValues);\n this.watchDisplaySearchInput(this.displaySearchInput);\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 * add listeners and DOM attributed\n */\n componentDidLoad(): void {\n if (!this.readonly) {\n this.searchInput = this.element.shadowRoot.querySelector('mg-input-text')?.shadowRoot.querySelector('input');\n this.searchInput?.addEventListener('keydown', this.handleKeydown);\n }\n }\n\n /**\n * Render checkboxes by section\n * @param checkboxes - checkboxes to render\n * @returns render sections of checkboxes\n */\n private renderCheckboxBySection(checkboxes: CheckboxItem[]): HTMLElement[] {\n const [checkedValues, notCheckedValues] = checkboxes.reduce(\n (acc, curr) => {\n acc[curr.value ? 0 : 1].push(curr);\n return acc;\n },\n [[], []],\n );\n\n const baseSection = {\n readonly: this.readonly,\n disabled: this.disabled,\n identifier: this.identifier,\n };\n\n const sections = [\n {\n ...baseSection,\n checkboxes: checkedValues,\n messages: this.messages.input.checkbox.sections.selected,\n },\n {\n ...baseSection,\n checkboxes: notCheckedValues,\n messages: this.messages.input.checkbox.sections.notSelected,\n },\n ];\n\n return sections\n .filter(section => section.checkboxes.length)\n .map(section => <mg-input-checkbox-paginated {...section} onMass-action={this.handleMassAction} key={section.messages}></mg-input-checkbox-paginated>);\n }\n\n /**\n * render checkbox multi element\n * @returns html element\n */\n private renderCheckboxMulti(): HTMLElement {\n const selectedValuesNb = this.getSelectedItems().length;\n const checkboxes = this.getDisplayItems();\n\n return (\n <div class=\"mg-c-input__input-container\">\n <mg-popover\n arrowHide={true}\n identifier={this.getMgPopoverIdentifier()}\n display={this.hasOpenedPopover}\n onDisplay-change={this.handleMgPopoverDisplayChange}\n ref={(el: HTMLMgPopoverElement) => {\n if (el !== null) this.mgPopover = el;\n }}\n >\n <mg-button variant=\"secondary\" aria-describedby={`${this.identifier}-title`}>\n <mg-icon icon=\"list\"></mg-icon>\n {this.getSelectValuesButtonMessage()}\n </mg-button>\n <div slot=\"content\" class=\"mg-c-input__content\">\n {this.displaySearchInput ? (\n [\n <mg-input-text\n key=\"input-search\"\n identifier={`${this.identifier}-input-search`}\n icon=\"magnifying-glass\"\n type=\"search\"\n placeholder={this.messages.input.checkbox.label}\n label={this.messages.input.checkbox.label}\n mgWidth=\"full\"\n value={this.searchValue}\n labelHide={true}\n characterLeftHide={true}\n name=\"q\"\n onValue-change={this.handleSearchChange}\n aria-controls=\"search-results items-list\"\n ></mg-input-text>,\n <p key=\"search-results\" role=\"status\" class=\"mg-u-visually-hidden\" id=\"search-results\">\n {`${checkboxes.length} ${this.messages.input.checkbox[checkboxes.length > 0 ? 'results' : 'result']}`}\n </p>,\n <div key=\"sections-container\" class=\"mg-c-input__sections\">\n {this.renderCheckboxBySection(checkboxes)}\n </div>,\n ]\n ) : (\n <MgInputCheckboxList\n checkboxes={checkboxes}\n displaySearchInput={this.displaySearchInput}\n messages={this.messages.input.checkbox}\n id=\"checkboxes-list\"\n disabled={this.disabled}\n name={this.name}\n invalid={this.invalid}\n ></MgInputCheckboxList>\n )}\n {this.displaySearchInput && checkboxes.length === 0 && <p class=\"mg-c-input__input-no-result\">{this.messages.input.checkbox.noResult}</p>}\n </div>\n </mg-popover>\n {this.displaySelectedValues ? (\n selectedValuesNb > 0 && (\n <ul role=\"list\" class=\"mg-c-input__input-container-list\">\n {this.getSelectedItems().map(({ title }) => (\n <li class=\"mg-c-input__input-value\" key={title}>\n {title}\n </li>\n ))}\n </ul>\n )\n ) : (\n <b>{this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)}</b>\n )}\n </div>\n );\n }\n\n /**\n * Renders the readonly value of the input.\n * @returns The rendered readonly value.\n */\n private renderReadonly = (readonlyValue: string[]): HTMLElement => {\n return this.inputVerticalList ? (\n <ul class=\"mg-c-input__readonly-value\">\n {readonlyValue.map(value => (\n <li key={value}>\n <b>{value}</b>\n </li>\n ))}\n </ul>\n ) : (\n <b class=\"mg-c-input__readonly-value\">{readonlyValue.join(', ')}</b>\n );\n };\n\n /**\n * Renders the MgInputCheckboxList component.\n * @returns The rendered MgInputCheckboxList component.\n */\n private renderMgInputCheckboxList = () => (\n <MgInputCheckboxList\n checkboxes={this.checkboxItems}\n displaySearchInput={this.displaySearchInput}\n messages={this.messages.input.checkbox}\n id=\"checkboxes-list\"\n disabled={this.disabled}\n name={this.name}\n invalid={this.invalid}\n ></MgInputCheckboxList>\n );\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n let inputContent: HTMLElement;\n const readonlyValue = this.value.filter(({ value }) => value).map(({ title }) => title);\n\n if (this.readonly) {\n inputContent = this.renderReadonly(readonlyValue);\n } else if (this.type === 'checkbox') {\n inputContent = this.renderMgInputCheckboxList();\n } else {\n inputContent = this.renderCheckboxMulti();\n }\n\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={!this.readonly ? this.required : undefined} // required is only used display asterisk\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition}\n helpText={!this.readonly ? this.helpText : undefined}\n errorMessage={!this.readonly ? this.errorMessage : undefined}\n >\n {inputContent}\n </mg-input>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-combobox.conf.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts"],"names":[],"mappings":"","sourcesContent":["import type { CursorType } from '@mgdis/core-ui-helpers/dist/utils';\n\n/**\n * Define action type\n */\nexport type ActionType = { name: 'scroll' | 'load-data' | 'load-more'; cursor?: CursorType };\n\n/**\n * Define request mapping type\n */\nexport type RequestMappingType = { filter: string };\n\n/**\n * Define response mapping type\n */\nexport type ResponseMappingType = { total: string; items: string; next: string; itemTitle: string; itemValue?: string };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-combobox.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,qBAAqB,EACrB,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EAEN,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,mCAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, h, Prop, EventEmitter, State, Element, Method, Watch } from '@stencil/core';\nimport {\n allItemsAreString,\n ClassList,\n getObjectValueFromKey,\n isValidString,\n nextTick,\n Page,\n Paginate,\n Cursor,\n type CursorType,\n toString,\n isObject,\n formatID,\n} from '@mgdis/core-ui-helpers/dist/utils';\nimport { type ActionType, type RequestMappingType, type ResponseMappingType } from './mg-input-combobox.conf';\nimport { type TooltipPosition, type Width, type EventType, widths, classReadonly, classDisabled } from '../mg-input/mg-input.conf';\nimport type { Option } from '../../../../types';\nimport { initLocales } from '../../../../locales';\nimport { Keys } from '../../../../utils/events.utils';\n\n/**\n * Check if object is an item\n * @param item - object to check\n * @returns True if object is an item\n */\nconst isItem = (item: unknown): item is Option => item && typeof item === 'object' && typeof (item as Option).title === 'string' && (item as Option).value !== undefined;\n\n/**\n * Check if objects are items\n * @param items - items to check\n * @returns True if objects are items\n */\nconst isItems = (items: unknown[]): items is Option[] => Array.isArray(items) && items.every(isItem);\n\n/**\n * Check if object is valid combobox fetchmappings\n * @param value - to validate\n * @returns truthy if mapping is valid\n */\nconst isFetchmappings = (value: unknown): value is MgInputCombobox['fetchmappings'] => {\n const isValidRoot = isObject<Record<string, unknown>>(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');\n if (isValidRoot) {\n const { request, response } = value as MgInputCombobox['fetchmappings'];\n if ([request, response].some(property => !isObject(property))) return false;\n const isValidRequest = typeof request.filter === 'string';\n const isValidResponse =\n typeof response === 'object' &&\n typeof response.total === 'string' &&\n typeof response.items === 'string' &&\n typeof response.next === 'string' &&\n typeof response.itemTitle === 'string' &&\n (typeof response.itemValue === 'string' || response.itemValue === undefined);\n return isValidRequest && isValidResponse;\n } else {\n return isValidRoot;\n }\n};\n\n@Component({\n tag: 'mg-input-combobox',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-combobox.css',\n shadow: true,\n})\nexport class MgInputCombobox {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classFocus = 'mg-u-is-focused';\n\n // HTML selector\n private input: HTMLInputElement;\n private loadMoreElement: HTMLMgButtonElement;\n private popoverId: string;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n private handlerInProgress: EventType;\n private loadingAction: ActionType['name'];\n private debounce: boolean;\n\n private page: Page<Option>;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputComboboxElement;\n\n /**\n * Define component value\n */\n @Prop({ mutable: true, reflect: true }) value: string | Option;\n @Watch('value')\n watchValue(newValue: MgInputCombobox['value']): void {\n this.filter = this.getValueTitle();\n this.valueChange.emit(newValue);\n }\n\n /**\n * Define components items\n */\n @Prop() items: (string | Option)[];\n @Watch('items')\n watchItems(newValue: MgInputCombobox['items']) {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n // skip newValue check\n return;\n } else if (Boolean(this.fetchurl) && Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"items\" values cannot be use with \"fetchurl\" prop defined. Passed value: ${toString(newValue)}.`);\n }\n // Empty options\n else if (Array.isArray(newValue) && newValue.length === 0) {\n this.options = new Paginate([]);\n }\n // String array\n else if (allItemsAreString(newValue)) {\n this.options = new Paginate(\n newValue.map(item => ({ title: item, value: item })),\n { total: newValue.length },\n );\n }\n // Object array\n else if (isItems(newValue)) {\n this.options = new Paginate(newValue, { total: newValue.length });\n } else {\n throw new Error(`<mg-input-combobox> prop \"items\" values must be the same type, string or Option. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define items label\n * Include short description. Required for accessibility.\n * @example\n * ```\n * Countries\n * ```\n */\n @Prop() itemsLabel!: string;\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n watchIdentifier(newValue: MgInputCombobox['identifier']): void {\n if (Boolean(newValue)) {\n this.popoverId = `${newValue}-popover`;\n this.element.dataset.mgPopoverGuard = this.popoverId;\n }\n }\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 = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Define 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 combobox.\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 @Watch('readonly')\n watchReadonly(newValue: MgInputCombobox['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n watchValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input === undefined) return;\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputCombobox['disabled']): void {\n if (newValue) {\n this.classCollection.add(classDisabled);\n } else {\n this.classCollection.delete(classDisabled);\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputCombobox['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n this.classCollection = new ClassList(this.classCollection.classes);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\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 API url to fetch\n * @example\n * ```\n * {\n * url: \"http://myapi.com?$select='href,name'&my-custom-param='my-custom-value'\", // url to fetch\n * }\n * ```\n */\n @Prop() fetchurl?: string | URL;\n @Watch('fetchurl')\n watchFetchUrl(newValue: MgInputCombobox['fetchurl']): void {\n if (Boolean(newValue)) {\n this.loadingWrapper({ name: 'load-data' });\n }\n }\n\n /**\n * Define fetch options object\n * Require `fetchurl` prop to be defined otherwith it will be ignored if defined\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/RequestInit}\n * @example JSON headers:\n * ```json\n * {\n * \"headers\": {\n * \"authorization\": \"my-token\"\n * }\n * }\n * ```\n */\n @Prop() fetchoptions?: RequestInit;\n @Watch('fetchoptions')\n watchFetchOptions(newValue: MgInputCombobox['fetchoptions']): void {\n if (this.fetchurl && newValue && !isObject(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchoptions\" value must be a valid RequestInit. Passed value: ${toString(newValue)}.`);\n } else {\n new Request(this.fetchurl, newValue);\n }\n }\n\n /**\n * Define fetch request mappings.\n * Required with `fetchurl`\n * @example\n * ```\n * {\n * request: {\n * filter: 'name', // `filter` key\n * },\n * response: {\n * total: 'body.data.total', // response object mapping to get `total` value\n * items: 'body.data.results' // response object mapping to get `items` value\n * next: 'body.next' // response object mapping to get `next` items\n * itemTitle: 'name', // item property to map on item['title']\n * itemValue: 'href', // item property to map on item['value']\n * }\n * }\n * ```\n */\n @Prop() fetchmappings?: { request: RequestMappingType; response: ResponseMappingType };\n @Watch('fetchmappings')\n watchFetchMappings(newValue: MgInputCombobox['fetchmappings']): void {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchmappings\" is required with \"fetchurl\" prop.`);\n } else if (Boolean(newValue) && !isFetchmappings(newValue)) {\n throw new Error(\n `<mg-input-combobox> prop \"fetchmappings\" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${toString(newValue)}.`,\n );\n }\n }\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 * Define if items are loading\n */\n @State() isLoading: boolean;\n\n /**\n * Formated items for display\n */\n @State() options: Paginate<Option> = new Paginate([]);\n @Watch('options')\n watchOptions(newValue: Paginate<Option>): void {\n this.page = newValue.getPage(0, Boolean(this.filter) ? this.optionsFilter : undefined);\n }\n\n /**\n * Active option\n */\n @State() option: Option;\n\n /**\n * Option filter\n */\n @State() filter: string = '';\n @Watch('filter')\n watchFilter(newValue: MgInputCombobox['filter']): void {\n this.loadingWrapper({ name: 'load-data' });\n this.filterChange.emit(newValue);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Popover display state\n */\n @State() popoverDisplay = false;\n @Watch('popoverDisplay')\n watchPopoverDisplay(newValue: MgInputCombobox['popoverDisplay']): void {\n if (newValue) {\n this.classCollection.add(this.classFocus);\n this.input.focus();\n } else {\n // remove visual focus\n this.option = null;\n // reset filter with value\n this.filter = this.getValueTitle();\n this.classCollection.delete(this.classFocus);\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n }\n }\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputComboboxElement['value']>;\n\n /**\n * Emited event when filter change\n */\n @Event({ eventName: 'filter-change' }) filterChange: EventEmitter<string>;\n\n /**\n * Emited event when `load-more` is called\n */\n @Event({ eventName: 'load-more' }) loadMore: EventEmitter<void>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputComboboxElement['valid']>;\n\n /**\n * Emited event when fetch API throw an error\n */\n @Event({ eventName: 'fetch-error' }) fetchError: EventEmitter<Error>;\n\n /**\n * Set focus on input.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.input?.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\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 concombobox by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given concombobox.\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: MgInputCombobox['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-combobox> 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 * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (!this.readonly) {\n this.setValue(null);\n this.option = null;\n this.filter = '';\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n resolve();\n });\n });\n }\n }\n\n /**\n * Handle `click` event on option\n * @param event - option element click event\n */\n private handleOptionClick = (event: MouseEvent & { target: HTMLLIElement }) => {\n this.setValue(this.options.items.find(option => formatID(option.value) === event.target.id));\n this.popoverDisplay = false;\n };\n\n /**\n * Handle `click` event on reset button\n * @param event - click event\n */\n private handleResetButton = (event: MouseEvent): void => {\n event.stopPropagation();\n this.reset().then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `display-change` event on mg-popover\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.popoverDisplay = event.detail;\n };\n\n /**\n * Handle input event\n */\n private handleFilterInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) this.setErrorMessage();\n if (!this.popoverDisplay) this.popoverDisplay = true;\n\n // update filter with debounce to prevent filter update overload\n if (!this.debounce) {\n this.debounce = true;\n setTimeout(() => {\n this.filter = this.input.value;\n this.debounce = false;\n }, 250);\n }\n };\n\n /**\n * Handle `blur` event\n */\n private handleFilterBlur = (): void => {\n // skip process if popover is displayed\n if (this.popoverDisplay) return;\n\n // Display Error\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Handle `focus` event\n */\n private handleFilterFocus = (): void => {\n // ensure visual focus is always clear on focus when component isn't in loading state\n if (!this.isLoading) {\n this.option = null;\n }\n };\n\n /**\n * Handle load-more <mg-button> `click`\n */\n private handleLoadMoreButton = (): void => {\n this.loadingWrapper({ name: 'load-more', cursor: Cursor.NEXT }).then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `keypress` event\n * @param event - keyboard event\n */\n private handleFilterKeydown = (event: KeyboardEvent): void => {\n if (this.disabled || event.ctrlKey || event.shiftKey) return;\n\n let guard = false;\n\n // override keys actions\n switch (event.key) {\n case Keys.TAB:\n case Keys.ENTER:\n guard = event.key === Keys.ENTER;\n const option = this.option || this.options.items.find(this.isCurrentOption);\n // Sets the value to the content of the focused option in the listbox.\n if (this.popoverDisplay) this.setValue(this.page.total > 0 ? option : null);\n // Closes the popover.\n this.popoverDisplay = false;\n break;\n\n case Keys.DOWN:\n case Keys.ARROWDOWN:\n case Keys.UP:\n case Keys.ARROWUP:\n guard = true;\n if (this.isLoading || !(this.page.total > 0)) {\n this.popoverDisplay = true;\n break;\n }\n\n if (Boolean(event.altKey) && [Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // Opens the popover without moving focus or changing selection.\n this.popoverDisplay = true;\n break;\n }\n\n // define cursor\n let cursor: CursorType;\n const isNavigationStart = this.popoverDisplay && isItem(this.option);\n if ([Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the first suggested value.\n // If the filter is empty and the popover is not displayed, opens the popover and moves visual focus to the first option.\n // Moves visual focus to the next option.\n // If visual focus is on the last option, moves visual focus to the first option.\n cursor = isNavigationStart ? Cursor.NEXT : Cursor.FIRST;\n } else if ([Keys.UP, Keys.ARROWUP].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the last suggested value.\n // If the filter is empty, first opens the popover if it is not already displayed and then moves visual focus to the last option.\n // Moves visual focus to the previous option.\n // If visual focus is on the first option, moves visual focus to the last option.\n cursor = isNavigationStart ? Cursor.PREVIOUS : Cursor.LAST;\n }\n\n // update scroll and visual focused option in wrapper\n this.loadingWrapper({ name: 'scroll', cursor });\n\n // open popover\n this.popoverDisplay = true;\n break;\n\n case Keys.LEFT:\n case Keys.ARROWLEFT:\n case Keys.HOME:\n case Keys.RIGHT:\n case Keys.ARROWRIGHT:\n case Keys.END:\n // skip process if visual focus is not in popover\n if (!isItem(this.option)) break;\n guard = true;\n\n // Remove visual focus from popover options\n this.option = null;\n\n let index;\n if (Keys.HOME === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the beginning of the field.\n index = 0;\n } else if (Keys.END === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the end of the field.\n index = this.filter.length;\n }\n if (typeof index === 'number') {\n this.input.setSelectionRange(index, index);\n }\n break;\n\n case Keys.ESC:\n case Keys.ESCAPE:\n guard = true;\n\n if (this.popoverDisplay) {\n // If the popover is displayed, closes it.\n this.popoverDisplay = false;\n } else {\n // If the popover is not displayed, clears the filter.\n this.setValue(null);\n this.filter = '';\n // Sets visual focus on the textbox.\n this.option = null;\n }\n break;\n\n default:\n // Remove visual focus from popover options\n this.option = null;\n break;\n }\n\n if (guard) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n\n /**\n * Scroll to next option from cursor\n * @param index - targeted option index to scroll into\n */\n private scrollToIndex = (index: number): void => {\n // ensure we have an opened popover element on screen when the scrollIntiView is called\n requestAnimationFrame(() => {\n if (!this.popoverDisplay) return;\n this.element.shadowRoot.querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)?.scrollIntoView({ block: 'nearest' });\n });\n };\n\n /**\n * Is option the current value\n * @param option - option to match with\n * @returns true if option is the current value\n */\n private isCurrentOption = (option: Option) => (isItem(this.value) ? this.value.value : this.value) === option.value;\n\n /**\n * Set value prop\n * @param newValue - slected option item\n */\n private setValue(newValue: MgInputCombobox['option'] | null): void {\n if (!isItem(newValue)) {\n this.value = '';\n } else if (allItemsAreString(this.items || this.options.items)) {\n this.value = newValue.title;\n } else {\n this.value = { ...newValue };\n }\n }\n\n /**\n * get value prop title\n * @returns value title\n */\n private getValueTitle = (): Option['title'] => {\n if (this.value && isItem(this.value)) return this.value.title;\n else if (typeof this.value === 'string') return this.value;\n else return '';\n };\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputCombobox['valid']) {\n const oldValidValue = this.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 if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\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 // Does have a custom error message\n if (!this.valid && errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (!this.valid && this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n };\n\n /**\n * Get filtered options from `filter` input value\n * @returns filtered options\n */\n private optionsFilter = (option): boolean => (this.filter === '' ? true : option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));\n\n /**\n * Loading wrapper with a given action\n * @param action - wrapped loading action\n * @returns promisified action\n */\n private loadingWrapper = (action: ActionType): Promise<void> => {\n let promise;\n let index: number;\n\n // cache initial loading action if not defined\n if (!Boolean(this.loadingAction)) {\n this.loadingAction = action.name;\n }\n\n // update index\n if (Boolean(this.option) && this.loadingAction !== 'load-more') {\n index = this.page.items.findIndex(option => option.value.toString() === this.option.value.toString());\n } else if (this.loadingAction === 'load-more') {\n index = this.page.items.length - this.page.baseIndex;\n }\n // when action require a loadMore we fetch the API else we report action to next tick\n // Set \"load more\" if action match OR if next item not available in the current page\n if (action.name === 'load-more') {\n // wait for new element render and update scroll position\n // set component loading\n this.isLoading = true;\n promise = this.goToNextPage;\n } else if (\n action.cursor === Cursor.NEXT &&\n this.page.items.length <= this.page.total &&\n index + this.page.baseIndex === this.page.items.length &&\n index + this.page.baseIndex < this.page.total\n ) {\n // trigger load-more from button to benefit from `disabled-on-click`\n this.loadMoreElement.click();\n return;\n } else if (action.name === 'scroll') {\n promise = nextTick;\n } else {\n promise = this.updatePage;\n }\n\n return promise()\n .then(() => {\n // parse full items list from options\n const options = this.options.items.filter(this.optionsFilter);\n\n // update visual focus\n if (action.name !== 'load-data') {\n index = this.page.getIndexFromCursor(action.cursor, this.loadingAction === 'load-more' && index >= 0 ? options[index] : this.option);\n }\n this.option = options[index];\n\n // update scroll position\n this.scrollToIndex(index);\n })\n .finally(() => {\n // reset loading after next render\n requestAnimationFrame(() => {\n this.isLoading = false;\n this.loadingAction = undefined;\n });\n });\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private goToNextPage = (): Promise<void> => {\n this.loadMore.emit();\n if (Boolean(this.fetchurl)) {\n return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then(nextPage => {\n if (!Boolean(nextPage)) return;\n // merge items from current page and next page\n const items = [...this.page.items, ...nextPage.items];\n // create new options pagination withe merged items\n this.options = new Paginate(items, { total: nextPage.total, next: nextPage.next, top: items.length });\n });\n } else {\n return nextTick(() => {\n if (typeof this.page.next === 'function') {\n const nextPage = this.page.next();\n this.page = new Page({\n ...nextPage,\n items: [...this.page.items, ...nextPage.items],\n });\n }\n });\n }\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private updatePage = async (): Promise<void> => {\n if (Boolean(this.fetchurl)) {\n return this.getOptions().then(page => {\n if (!Boolean(page)) return;\n // reset current options pagination from API response\n this.options = new Paginate(page.items, { total: page.total, next: page.next, top: page.top });\n });\n } else {\n this.page = this.options.getPage(0, this.optionsFilter);\n }\n };\n\n /**\n * Fetch request\n * @param url - to fetch\n * @returns new page from url\n */\n private getOptions = async (url = this.fetchurl): Promise<Pick<Page<Option>, 'items' | 'top'> & Partial<Page<Option>>> => {\n // add text filter\n const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(this.filter));\n\n try {\n const response = await fetch(updateUrl, this.fetchoptions);\n if (!response.ok) {\n this.fetchError.emit(new Error(`${response.status} - ${response.statusText}`));\n return;\n }\n const json = await response.json();\n const items = getObjectValueFromKey<Response, Option[]>(json, this.fetchmappings.response.items).map(\n (item): Option => ({\n title: getObjectValueFromKey<unknown, Option['title']>(item, this.fetchmappings.response.itemTitle),\n value: this.fetchmappings.response.itemValue !== undefined ? getObjectValueFromKey<unknown, Option['value']>(item, this.fetchmappings.response.itemValue) : item,\n }),\n );\n const total = Number(getObjectValueFromKey<Response, number>(json, this.fetchmappings.response.total, 0));\n let next = getObjectValueFromKey<Response, string>(json, this.fetchmappings.response.next);\n if (URL.canParse(updateUrl) && Boolean(next) && !URL.canParse(next)) {\n const previousUrl = new URL(updateUrl);\n if (previousUrl.pathname.endsWith(next.split('?')[0])) {\n next = new URL(next, previousUrl).toString();\n }\n }\n return { items, total, next, top: items.length };\n } catch (error) {\n this.fetchError.emit(error);\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 // Validate\n this.watchIdentifier(this.identifier);\n this.watchItems(this.items);\n if (Boolean(this.fetchurl)) {\n this.watchFetchOptions(this.fetchoptions);\n this.watchFetchMappings(this.fetchmappings);\n this.loadingWrapper({ name: 'load-data' });\n }\n this.watchValue(this.value);\n this.watchOptions(this.options);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\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 const listId = `${this.identifier}-list`;\n const readonlyValue = this.getValueTitle();\n const withResetButton = this.value && !this.disabled;\n\n let popoverContent: 'list' | 'notfound' | 'notavailable';\n if (this.page?.items.length > 0) popoverContent = 'list';\n else if (this.page?.items.length === 0 && Boolean(this.filter)) popoverContent = 'notfound';\n else if (this.page?.items.length === 0) popoverContent = 'notavailable';\n\n let activeDescendant;\n if (Boolean(this.option?.value)) {\n activeDescendant = this.option.value;\n } else if (typeof this.value === 'string') {\n activeDescendant = this.value;\n } else {\n activeDescendant = this.value?.value;\n }\n\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.classes.join(' ')}\n ariaDescribedbyIDs={popoverContent && popoverContent !== 'list' ? [popoverContent] : []}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.value === undefined ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n readonlyValue && <b class=\"mg-c-input__readonly-value\">{readonlyValue}</b>\n ) : (\n <mg-popover\n identifier={this.popoverId}\n placement=\"bottom-start\"\n display={this.popoverDisplay}\n arrow-hide\n style={{\n '--mg-c-input-list-width': Boolean(this.input?.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,\n }}\n data-fallback-placement=\"bottom-end\"\n onDisplay-change={this.handlePopoverDisplay}\n >\n <div class=\"mg-c-input__input-group-container\">\n <mg-icon icon=\"magnifying-glass\"></mg-icon>\n <input\n type=\"text\"\n role=\"combobox\"\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.filter}\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 autocomplete=\"off\"\n aria-autocomplete=\"list\"\n aria-expanded={this.popoverDisplay.toString()}\n aria-controls={listId}\n aria-invalid={(this.invalid === true).toString()}\n aria-activedescendant={formatID(activeDescendant)}\n onInput={this.handleFilterInput}\n onBlur={this.handleFilterBlur}\n onFocus={this.handleFilterFocus}\n onKeyDown={this.handleFilterKeydown}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n {withResetButton ? (\n <mg-button\n class=\"mg-c-input__box-append mg-c-input__reset\"\n variant=\"flat\"\n is-icon\n label={this.messages.general.reset}\n aria-controls={this.identifier}\n tabindex=\"-1\"\n onClick={this.handleResetButton}\n >\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n ) : (\n <mg-button class=\"mg-c-input__box-append\" variant=\"flat\" is-icon label={this.itemsLabel} tabindex=\"-1\" disabled={this.disabled}>\n <mg-icon icon={`chevron-${this.popoverDisplay ? 'up' : 'down'}`}></mg-icon>\n </mg-button>\n )}\n </div>\n <div slot=\"content\" class=\"mg-c-input__popover-container\">\n {popoverContent === 'list' && [\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <ul key=\"list\" class=\"mg-c-input__input-list\" role=\"listbox\" id={listId} aria-label={this.itemsLabel} aria-setsize={this.page.total}>\n {this.page.items.map(option => {\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <li\n role=\"option\"\n class={{\n 'mg-c-input__input-list-item': true,\n 'mg-c-input__input-list-item--focus-visible': JSON.stringify(this.option?.value) === JSON.stringify(option.value),\n 'mg-c-input__input-list-item--selected': this.isCurrentOption(option),\n }}\n key={option.title}\n id={formatID(option.value)}\n aria-selected={this.isCurrentOption(option).toString()}\n onClick={this.handleOptionClick}\n >\n {option.title}\n {this.isCurrentOption(option) && <mg-icon icon=\"check\"></mg-icon>}\n </li>\n );\n })}\n </ul>,\n this.isLoading && <mg-loader key=\"loader\" message={this.messages.input.combobox.search} class={{ 'mg-u-visually-hidden': Boolean(this.page.next) }}></mg-loader>,\n this.page.next && (\n <mg-button\n key=\"load-more\"\n variant=\"flat\"\n class=\"mg-c-input__load-more\"\n tabIndex={-1}\n disabled={this.isLoading}\n full-width\n disable-on-click\n onClick={this.handleLoadMoreButton}\n aria-controls={listId}\n ref={(el: HTMLMgButtonElement) => {\n if (el !== null) this.loadMoreElement = el;\n }}\n >\n <mg-icon icon=\"chevron-down\"></mg-icon>\n {this.messages.input.combobox.loadMore}\n </mg-button>\n ),\n ]}\n {popoverContent === 'notfound' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notFound}\n </p>\n )}\n {popoverContent === 'notavailable' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notAvailable}\n </p>\n )}\n </div>\n </mg-popover>\n )}\n </mg-input>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-date.conf.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-date/mg-input-date.conf.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC","sourcesContent":["import type { InputError } from '../../../../types';\n\nexport const DEFAULT_MAX_DATE = '9999-12-31';\n\nexport type InputDateError = InputError & ('min' | 'max' | 'minMax' | 'required' | 'badInput');\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-date.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-date/mg-input-date.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAuB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAkB,aAAa,EAAwB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,OAAO,WAAW;IALxB;QAkBE,8CAA8C;QACtC,sBAAiB,GAAG,KAAK,CAAC;QAuClC;;;WAGG;QACK,SAAI,GAAW,IAAI,CAAC,UAAU,CAAC;QAOvC;;WAEG;QACK,eAAU,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAazB;;;WAGG;QACK,QAAG,GAAY,YAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Watch, Method } from '@stencil/core';\nimport { ClassList, isValidString, dateRegExp, dateToString, toString } from '@mgdis/core-ui-helpers/dist/utils';\nimport { localeDate, localeDatePattern } from '@mgdis/core-ui-helpers/dist/locale';\nimport { type InputDateError, DEFAULT_MAX_DATE } from './mg-input-date.conf';\nimport { type EventType, classReadonly, type TooltipPosition, classDisabled } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-date',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-date.css',\n shadow: true,\n})\nexport class MgInputDate {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private messages;\n private locale: string;\n private systemLocale: string;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: EventType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputDateElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n validateValue(newValue: MgInputDate['value']): void {\n // When the input is not fully completed or has been cleared, the value becomes an empty string.\n if (['', undefined].includes(newValue)) {\n // need to force value update to `null` to prevent extra render\n // - `''` is not a valide value\n // - `undefined` is not allowed in CustomEvent['detail']\n this.value = null;\n } else if (newValue && !isValidString(newValue)) {\n // check value validity\n throw new Error(`<mg-input-date> props 'value' must be a valid string. Passed value: ${toString(newValue)}.`);\n } else if (newValue === null || this.isValidPattern(newValue)) {\n this.valueChange.emit(newValue);\n } else {\n console.error(\"<mg-input-date> props 'value' doesn't match pattern: 'yyyy-mm-dd'.\");\n }\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 = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\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 @Watch('readonly')\n watchReadonly(newValue: MgInputDate['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define input minimum date\n * format: yyyy-mm-dd\n */\n @Prop() min?: string;\n\n /**\n * Define input maximum date\n * format: yyyy-mm-dd\n */\n @Prop() max?: string = '9999-12-31'; // Hardcoded value matching DEFAULT_MAX_DATE for documentation\n @Watch('min')\n @Watch('max')\n validateMinMax(newValue: string): void {\n if (newValue && !this.isValidPattern(newValue)) {\n throw new Error(`<mg-input-date> props 'min/max' doesn't match pattern: 'yyyy-mm-dd'. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\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 @Watch('disabled')\n watchDisabled(newValue: MgInputDate['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n * Available string variables:\n * - `{pattern}`: render innerHTML pattern based on system\n * - `{date}`: render innerText date with a pattern base format.\n * - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text.\n * ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`\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--date']);\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<HTMLMgInputDateElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputDateElement['valid']>;\n\n /**\n * Set focus on input.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.input?.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\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: MgInputDate['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-date> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-date> 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 * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (!this.readonly) {\n this.value = null;\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n resolve();\n });\n });\n }\n }\n\n /**\n * Method to validate date pattern string\n * @param value - value to test\n * @returns truthy when value match the pattern\n */\n private isValidPattern = (value: string): boolean => isValidString(value) && dateRegExp.test(value);\n\n /**\n * Format help text to display\n * @param helpText - help text format\n * @returns formated pattern help text. Ex: Format attendu : jj/mm/aaaa (ex : 20/12/2020)\n */\n private formatHelpText = (helpText: string): string => {\n // If the component is in readonly mode, return directly because the message will not be rendered\n if (this.readonly) {\n return undefined;\n }\n\n const defaultHelpTextVariable = '{defaultHelpText}';\n\n // If a custom helpText is provided, store it but don't return it directly\n let text = isValidString(helpText) ? helpText : this.messages.input.date.helpText.expectedFormat;\n\n // Handle defaultHelpText\n if (text.includes(defaultHelpTextVariable)) {\n text = text.replace(defaultHelpTextVariable, this.formatHelpText(this.messages.input.date.helpText.expectedFormat));\n }\n\n // Replace pattern and date variables\n text = text.replace('{pattern}', this.renderPattern()).replace('{date}', localeDate(dateToString(new Date('2025-12-24')), this.systemLocale));\n\n // Add additional message for min/max if necessary\n let rangeMessage: string;\n\n if (this.min?.length > 0 && this.max !== DEFAULT_MAX_DATE) {\n rangeMessage = this.messages.input.date.helpText.minMax.replace('{min}', localeDate(this.min, this.systemLocale)).replace('{max}', localeDate(this.max, this.systemLocale));\n } else if (this.min?.length > 0) {\n rangeMessage = this.messages.input.date.helpText.min.replace('{min}', localeDate(this.min, this.systemLocale));\n } else if (this.max !== DEFAULT_MAX_DATE) {\n rangeMessage = this.messages.input.date.helpText.max.replace('{max}', localeDate(this.max, this.systemLocale));\n }\n\n // Combine custom helpText with range message if both exist\n if (text !== undefined && rangeMessage !== undefined) {\n return `${text}<br>${rangeMessage}`;\n }\n\n return text;\n };\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputDate['valid']) {\n const oldValidValue = this.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 if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) 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.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Handle keydown event\n * @param event - input keydown event\n */\n private handleKeyDown = (event: KeyboardEvent): void => {\n // bypass the native \"Delete\" action wich trigger an \"input\" event with \"checkValidty() => false\" with a falsy badInput = true,\n // when we reset the field we need to test a blank value.\n if (['Delete', 'Backspace'].includes(event.key)) {\n event.preventDefault();\n this.value = null;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n }\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || (this.input.checkValidity() && (this.value === null || this.isValidPattern(this.value))));\n };\n\n /**\n * get input error code\n * @returns error code\n */\n private getInputError = (): null | InputDateError => {\n // bad input or pattern\n if (this.input.validity.badInput || (this.value && !this.isValidPattern(this.value))) {\n return 'badInput';\n }\n\n // required\n if (this.input.validity.valueMissing) {\n return 'required';\n }\n\n // min & max\n if ((this.input.validity.rangeUnderflow || this.input.validity.rangeOverflow) && this.min?.length > 0 && this.max !== DEFAULT_MAX_DATE) {\n return 'minMax';\n }\n\n // min\n if (this.input.validity.rangeUnderflow) {\n return 'min';\n }\n\n // max\n if (this.input.validity.rangeOverflow) {\n return 'max';\n }\n\n return null;\n };\n\n /**\n * Check input errors\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 const inputError = this.getInputError();\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (inputError === 'required') {\n this.errorMessage = this.messages.errors[inputError];\n }\n // min, max & minMax\n else if (['min', 'max', 'minMax'].includes(inputError)) {\n this.errorMessage = this.messages.input.date.helpText[inputError]\n .replace('{min}', localeDate(this.min, this.systemLocale))\n .replace('{max}', localeDate(this.max, this.systemLocale));\n }\n // wrong date format\n // element.validity.badInput is default error message\n else {\n this.errorMessage = this.messages.input.date.error.badInput\n .replace('{pattern}', this.renderPattern())\n .replace('{date}', localeDate(dateToString(new Date('2025-12-24')), this.systemLocale));\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 const locales = initLocales(this.element);\n this.locale = locales.locale;\n this.messages = locales.messages;\n\n // as a native input use the OS locale to define the date pattern\n // we need to get this locale to define the displayed pattern\n this.systemLocale = Intl.DateTimeFormat().resolvedOptions().locale;\n\n // Validate\n this.validateValue(this.value);\n this.validateMinMax(this.min);\n this.validateMinMax(this.max);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\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 pattern\n * @returns translated html pattern\n */\n private renderPattern = (): string => {\n let patternLocal = localeDatePattern(this.systemLocale);\n for (const key in this.messages.input.date.pattern) {\n patternLocal = patternLocal.replace(key, this.messages.input.date.pattern[key]);\n }\n\n return `<span aria-hidden=\"true\">${patternLocal}</span><span class=\"mg-u-visually-hidden\">${[...patternLocal].join(' ')}</span>`;\n };\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.value === null ? 'label' : this.tooltipPosition}\n helpText={this.formatHelpText(this.helpText)}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n this.value && <b class=\"mg-c-input__readonly-value\">{localeDate(this.value, this.locale)}</b>\n ) : (\n <input\n type=\"date\"\n class=\"mg-c-input__box\"\n min={this.min}\n max={this.max}\n value={this.value}\n id={this.identifier}\n name={this.name}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n )}\n </mg-input>\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mg-input-numeric.conf.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAIrD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC","sourcesContent":["import type { InputError } from '../../../../types';\n\n/**\n * List of all possibles types\n */\nexport const types = ['decimal', 'integer'] as const;\n\nexport type NumericType = (typeof types)[number];\n\nexport const formats = ['none', 'number', 'currency', 'percent', 'unit'] as const;\n\nexport type Format = (typeof formats)[number];\n\nexport type InputNumericError = InputError & ('min' | 'max' | 'minMax' | 'required');\n"]}