@mgdis/mg-components 5.22.0 → 5.23.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 (238) hide show
  1. package/dist/cjs/{index-28bf9033.js → index-0cf3e6d5.js} +22 -13
  2. package/dist/cjs/index-0cf3e6d5.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/mg-action-more_34.cjs.entry.js +225 -158
  5. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  6. package/dist/cjs/mg-components.cjs.js +2 -2
  7. package/dist/cjs/mg-components.cjs.js.map +1 -1
  8. package/dist/cjs/mg-item-more.cjs.entry.js +7 -6
  9. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-menu.conf-0229bb75.js +333 -0
  11. package/dist/cjs/mg-menu.conf-0229bb75.js.map +1 -0
  12. package/dist/collection/collection-manifest.json +2 -2
  13. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  14. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  15. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  16. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  17. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  18. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
  19. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -1
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  22. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +1 -1
  23. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
  24. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  25. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  26. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -1
  27. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  28. package/dist/collection/components/molecules/inputs/MgInput.js +1 -1
  29. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +10 -7
  32. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +35 -6
  34. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -2
  36. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  40. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  43. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  45. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  49. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  50. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
  51. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  52. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  53. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  54. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  55. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  56. package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
  57. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  58. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  59. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  60. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +1 -1
  61. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  62. package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
  63. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  64. package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -5
  65. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  66. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +1 -1
  67. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  68. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  69. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  70. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  71. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  72. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
  73. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  74. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  75. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  76. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  77. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  78. package/dist/collection/locales/en/messages.json +9 -1
  79. package/dist/collection/locales/fr/messages.json +9 -1
  80. package/dist/collection/locales/index.js +2 -2
  81. package/dist/collection/locales/index.js.map +1 -1
  82. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  83. package/dist/collection/utils/behaviors.utils.spec.js +1 -1
  84. package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
  85. package/dist/collection/utils/unit.test.utils.js +0 -104
  86. package/dist/collection/utils/unit.test.utils.js.map +1 -1
  87. package/dist/components/MgInput.js +3 -3
  88. package/dist/components/MgInput.js.map +1 -1
  89. package/dist/components/index.es.js +75 -0
  90. package/dist/components/index.es.js.map +1 -0
  91. package/dist/components/index2.js +22 -61
  92. package/dist/components/index2.js.map +1 -1
  93. package/dist/components/mg-action-more.js +5 -4
  94. package/dist/components/mg-action-more.js.map +1 -1
  95. package/dist/components/mg-badge2.js +5 -4
  96. package/dist/components/mg-badge2.js.map +1 -1
  97. package/dist/components/mg-button2.js +6 -5
  98. package/dist/components/mg-button2.js.map +1 -1
  99. package/dist/components/mg-card2.js +4 -3
  100. package/dist/components/mg-card2.js.map +1 -1
  101. package/dist/components/mg-character-left2.js +2 -1
  102. package/dist/components/mg-character-left2.js.map +1 -1
  103. package/dist/components/mg-details.js +4 -3
  104. package/dist/components/mg-details.js.map +1 -1
  105. package/dist/components/mg-divider.js +2 -1
  106. package/dist/components/mg-divider.js.map +1 -1
  107. package/dist/components/mg-form.js +5 -4
  108. package/dist/components/mg-form.js.map +1 -1
  109. package/dist/components/mg-icon2.js +4 -3
  110. package/dist/components/mg-icon2.js.map +1 -1
  111. package/dist/components/mg-illustrated-message.js +4 -3
  112. package/dist/components/mg-illustrated-message.js.map +1 -1
  113. package/dist/components/mg-input-checkbox.js +16 -12
  114. package/dist/components/mg-input-checkbox.js.map +1 -1
  115. package/dist/components/mg-input-date.js +41 -10
  116. package/dist/components/mg-input-date.js.map +1 -1
  117. package/dist/components/mg-input-numeric.js +7 -6
  118. package/dist/components/mg-input-numeric.js.map +1 -1
  119. package/dist/components/mg-input-password.js +5 -4
  120. package/dist/components/mg-input-password.js.map +1 -1
  121. package/dist/components/mg-input-radio.js +6 -5
  122. package/dist/components/mg-input-radio.js.map +1 -1
  123. package/dist/components/mg-input-select2.js +8 -7
  124. package/dist/components/mg-input-select2.js.map +1 -1
  125. package/dist/components/mg-input-text2.js +8 -7
  126. package/dist/components/mg-input-text2.js.map +1 -1
  127. package/dist/components/mg-input-textarea.js +8 -7
  128. package/dist/components/mg-input-textarea.js.map +1 -1
  129. package/dist/components/mg-input-title2.js +4 -3
  130. package/dist/components/mg-input-title2.js.map +1 -1
  131. package/dist/components/mg-input-toggle.js +6 -5
  132. package/dist/components/mg-input-toggle.js.map +1 -1
  133. package/dist/components/mg-item-more.js +4 -3
  134. package/dist/components/mg-item-more.js.map +1 -1
  135. package/dist/components/mg-menu-item2.js +6 -5
  136. package/dist/components/mg-menu-item2.js.map +1 -1
  137. package/dist/components/mg-menu2.js +2 -1
  138. package/dist/components/mg-menu2.js.map +1 -1
  139. package/dist/components/mg-message.js +5 -4
  140. package/dist/components/mg-message.js.map +1 -1
  141. package/dist/components/mg-modal.js +12 -10
  142. package/dist/components/mg-modal.js.map +1 -1
  143. package/dist/components/mg-pagination2.js +4 -3
  144. package/dist/components/mg-pagination2.js.map +1 -1
  145. package/dist/components/mg-panel.js +6 -5
  146. package/dist/components/mg-panel.js.map +1 -1
  147. package/dist/components/mg-popover-content2.js +5 -4
  148. package/dist/components/mg-popover-content2.js.map +1 -1
  149. package/dist/components/mg-popover2.js +5 -4
  150. package/dist/components/mg-popover2.js.map +1 -1
  151. package/dist/components/mg-skip-links.js +4 -3
  152. package/dist/components/mg-skip-links.js.map +1 -1
  153. package/dist/components/mg-tabs.js +8 -7
  154. package/dist/components/mg-tabs.js.map +1 -1
  155. package/dist/components/mg-tag.js +5 -4
  156. package/dist/components/mg-tag.js.map +1 -1
  157. package/dist/components/mg-tooltip-content2.js +2 -1
  158. package/dist/components/mg-tooltip-content2.js.map +1 -1
  159. package/dist/components/mg-tooltip2.js +8 -7
  160. package/dist/components/mg-tooltip2.js.map +1 -1
  161. package/dist/esm/{index-93dafb06.js → index-91977c3d.js} +22 -13
  162. package/dist/esm/index-91977c3d.js.map +1 -0
  163. package/dist/esm/loader.js +2 -2
  164. package/dist/esm/mg-action-more_34.entry.js +193 -126
  165. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  166. package/dist/esm/mg-components.js +3 -3
  167. package/dist/esm/mg-components.js.map +1 -1
  168. package/dist/esm/mg-item-more.entry.js +5 -4
  169. package/dist/esm/mg-item-more.entry.js.map +1 -1
  170. package/dist/esm/mg-menu.conf-4b2d2eab.js +315 -0
  171. package/dist/esm/mg-menu.conf-4b2d2eab.js.map +1 -0
  172. package/dist/mg-components/locales/en/messages.json +9 -1
  173. package/dist/mg-components/locales/fr/messages.json +9 -1
  174. package/dist/mg-components/mg-components.esm.js +1 -1
  175. package/dist/mg-components/mg-components.esm.js.map +1 -1
  176. package/dist/mg-components/p-1564df7a.js +2 -0
  177. package/dist/mg-components/p-1564df7a.js.map +1 -0
  178. package/dist/mg-components/p-49e1ffcb.js +3 -0
  179. package/dist/mg-components/p-49e1ffcb.js.map +1 -0
  180. package/dist/mg-components/p-6c68c7eb.entry.js +2 -0
  181. package/dist/mg-components/p-6c68c7eb.entry.js.map +1 -0
  182. package/dist/mg-components/p-d6d71404.entry.js +2 -0
  183. package/dist/mg-components/p-d6d71404.entry.js.map +1 -0
  184. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
  185. package/dist/types/components/atoms/mg-button/mg-button.d.ts +1 -1
  186. package/dist/types/components/atoms/mg-card/mg-card.d.ts +1 -1
  187. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +1 -1
  188. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +1 -1
  189. package/dist/types/components/molecules/inputs/MgInput.d.ts +1 -1
  190. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +1 -1
  191. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +18 -1
  192. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +1 -1
  193. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +1 -1
  194. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +1 -1
  195. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
  196. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +1 -1
  197. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +1 -1
  198. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +1 -1
  199. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +1 -1
  200. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  201. package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -1
  202. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -1
  203. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
  204. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +1 -1
  205. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -1
  206. package/dist/types/components.d.ts +2 -2
  207. package/dist/types/locales/index.d.ts +1 -180
  208. package/dist/types/utils/unit.test.utils.d.ts +0 -82
  209. package/package.json +33 -32
  210. package/dist/cjs/components.utils-637c479d.js +0 -447
  211. package/dist/cjs/components.utils-637c479d.js.map +0 -1
  212. package/dist/cjs/index-28bf9033.js.map +0 -1
  213. package/dist/collection/utils/components.utils.js +0 -147
  214. package/dist/collection/utils/components.utils.js.map +0 -1
  215. package/dist/collection/utils/components.utils.spec.js +0 -156
  216. package/dist/collection/utils/components.utils.spec.js.map +0 -1
  217. package/dist/collection/utils/e2e.test.utils.js +0 -46
  218. package/dist/collection/utils/e2e.test.utils.js.map +0 -1
  219. package/dist/collection/utils/locale.utils.js +0 -57
  220. package/dist/collection/utils/locale.utils.js.map +0 -1
  221. package/dist/collection/utils/locale.utils.spec.js +0 -52
  222. package/dist/collection/utils/locale.utils.spec.js.map +0 -1
  223. package/dist/components/components.utils.js +0 -150
  224. package/dist/components/components.utils.js.map +0 -1
  225. package/dist/esm/components.utils-f7c073a0.js +0 -431
  226. package/dist/esm/components.utils-f7c073a0.js.map +0 -1
  227. package/dist/esm/index-93dafb06.js.map +0 -1
  228. package/dist/mg-components/p-457dd62a.entry.js +0 -2
  229. package/dist/mg-components/p-457dd62a.entry.js.map +0 -1
  230. package/dist/mg-components/p-4fa40a8f.entry.js +0 -2
  231. package/dist/mg-components/p-4fa40a8f.entry.js.map +0 -1
  232. package/dist/mg-components/p-721c4571.js +0 -2
  233. package/dist/mg-components/p-721c4571.js.map +0 -1
  234. package/dist/mg-components/p-8155d0e2.js +0 -3
  235. package/dist/mg-components/p-8155d0e2.js.map +0 -1
  236. package/dist/types/utils/components.utils.d.ts +0 -87
  237. package/dist/types/utils/e2e.test.utils.d.ts +0 -22
  238. package/dist/types/utils/locale.utils.d.ts +0 -38
@@ -1,5 +1,5 @@
1
1
  import { BadgeVariantType } from './mg-badge.conf';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  export declare class MgBadge {
4
4
  /************
5
5
  * Internal *
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  import { VariantType, ButtonType } from './mg-button.conf';
3
- import { ClassList } from '../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  export declare class MgButton {
5
5
  /************
6
6
  * Internal *
@@ -1,4 +1,4 @@
1
- import { ClassList } from '../../../utils/components.utils';
1
+ import { ClassList } from '@mgdis/stencil-helpers';
2
2
  import { type VariantStyleType, type VariantType } from './mg-card.conf';
3
3
  export declare class MgCard {
4
4
  /*************
@@ -1,5 +1,5 @@
1
1
  import { IconVariantType, IconSizeType, IconVariantStyleType } from './mg-icon.conf';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  export declare class MgIcon {
4
4
  private svg;
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { TagVariantType } from './mg-tag.conf';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  export declare class MgTag {
4
4
  /************
5
5
  * Internal *
@@ -1,6 +1,6 @@
1
1
  import { FunctionalComponent } from '../../../stencil-public-runtime';
2
2
  import { Width } from './MgInput.conf';
3
- import { ClassList } from '../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  import { MgInputTitle } from '../../atoms/mg-input-title/mg-input-title';
5
5
  /**
6
6
  * MgInput Interface
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { CheckboxItem, CheckboxType, CheckboxValue, MgInputCheckboxListProps, SelectValuesButtonKey } from './mg-input-checkbox.conf';
4
4
  export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, 'id' | 'checkboxes' | 'messages'> {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  export declare class MgInputDate {
4
4
  /************
5
5
  * Internal *
@@ -7,6 +7,7 @@ export declare class MgInputDate {
7
7
  private input;
8
8
  private messages;
9
9
  private locale;
10
+ private systemLocale;
10
11
  private hasDisplayedError;
11
12
  private handlerInProgress;
12
13
  /**************
@@ -61,6 +62,11 @@ export declare class MgInputDate {
61
62
  tooltip: string;
62
63
  /**
63
64
  * Add a help text under the input, usually expected data format and example
65
+ * Available string variables:
66
+ * - `{pattern}`: render innerHTML pattern based on system
67
+ * - `{date}`: render innerText date with a pattern base format.
68
+ * - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text.
69
+ * ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
64
70
  */
65
71
  helpText: string;
66
72
  /**
@@ -111,6 +117,12 @@ export declare class MgInputDate {
111
117
  * @param errorMessage - the error message to display
112
118
  */
113
119
  setError(valid: MgInputDate['valid'], errorMessage: string): Promise<void>;
120
+ /**
121
+ * Format help text to display
122
+ * @param helpText - help text format
123
+ * @returns formated pattern help text. Ex: Format attendu : jj/mm/aaaa (ex : 20/12/2020)
124
+ */
125
+ private formatHelpText;
114
126
  /**
115
127
  * Method to set validity values
116
128
  * @param newValue - valid new value
@@ -146,6 +158,11 @@ export declare class MgInputDate {
146
158
  * @returns timeout
147
159
  */
148
160
  componentWillLoad(): ReturnType<typeof setTimeout>;
161
+ /**
162
+ * Render pattern
163
+ * @returns translated html pattern
164
+ */
165
+ private renderPattern;
149
166
  /**
150
167
  * Render
151
168
  * @returns HTML Element
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { Width } from '../MgInput.conf';
3
- import { ClassList } from '../../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  export declare class MgInputNumeric {
5
5
  /************
6
6
  * Internal *
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { Width } from '../MgInput.conf';
3
- import { ClassList } from '../../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  export declare class MgInputPassword {
5
5
  /************
6
6
  * Internal *
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { RadioOption } from './mg-input-radio.conf';
4
4
  export declare class MgInputRadio {
5
5
  /************
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { Width } from '../MgInput.conf';
3
- import { ClassList } from '../../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  import { SelectOption, OptGroup } from './mg-input-select.conf';
5
5
  export declare class MgInputSelect {
6
6
  /************
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { Width } from '../MgInput.conf';
3
- import { ClassList } from '../../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  import { TextType } from './mg-input-text.conf';
5
5
  export declare class MgInputText {
6
6
  /************
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
2
  import { Width } from '../MgInput.conf';
3
- import { ClassList } from '../../../../utils/components.utils';
3
+ import { ClassList } from '@mgdis/stencil-helpers';
4
4
  export declare class MgInputTextarea {
5
5
  /************
6
6
  * Internal *
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { ToggleValue } from './mg-input-toggle.conf';
4
4
  export declare class MgInputToggle {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { Status } from './mg-menu-item.conf';
4
4
  import type { MenuSizeType } from '../mg-menu/mg-menu.conf';
5
5
  import type { DirectionType } from './mg-menu-item.conf';
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { AriaRoleType, RequiredMessageStatusType } from './mg-form.conf';
4
4
  export declare class MgForm {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { VariantType } from './mg-message.conf';
4
4
  export declare class MgMessage {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { DialogRoleType } from './mg-modal.conf';
4
4
  export declare class MgModal {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { type ExpandToggleDisplayType, type TitlePositionType } from './mg-panel.conf';
4
4
  export declare class MgPanel {
5
5
  /************
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../../stencil-public-runtime';
2
- import { ClassList } from '../../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  export declare class MgPopoverContent {
4
4
  /************
5
5
  * Internal *
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { ClassList } from '../../../utils/components.utils';
2
+ import { ClassList } from '@mgdis/stencil-helpers';
3
3
  import { TabItem, SizeType } from './mg-tabs.conf';
4
4
  export declare class MgTabs {
5
5
  /************
@@ -365,7 +365,7 @@ export namespace Components {
365
365
  */
366
366
  "displayError": () => Promise<void>;
367
367
  /**
368
- * Add a help text under the input, usually expected data format and example
368
+ * Add a help text under the input, usually expected data format and example Available string variables: - `{pattern}`: render innerHTML pattern based on system - `{date}`: render innerText date with a pattern base format. - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text. ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
369
369
  */
370
370
  "helpText": string;
371
371
  /**
@@ -2216,7 +2216,7 @@ declare namespace LocalJSX {
2216
2216
  */
2217
2217
  "disabled"?: boolean;
2218
2218
  /**
2219
- * Add a help text under the input, usually expected data format and example
2219
+ * Add a help text under the input, usually expected data format and example Available string variables: - `{pattern}`: render innerHTML pattern based on system - `{date}`: render innerText date with a pattern base format. - `{defaultHelpText}`: render default `helpText` usefull to concat helpText local with your custom text. ex: `Input use {pattern} pattern` as `helpText` prop value will be render as `Input use mm/dd/yyyy pattern`
2220
2220
  */
2221
2221
  "helpText"?: string;
2222
2222
  /**
@@ -1,181 +1,3 @@
1
- declare const messages: {
2
- en: {
3
- errors: {
4
- required: string;
5
- date: {
6
- badInput: string;
7
- min: string;
8
- max: string;
9
- minMax: string;
10
- };
11
- numeric: {
12
- min: string;
13
- max: string;
14
- minMax: string;
15
- };
16
- };
17
- nbCharLeft: string;
18
- input: {
19
- select: {
20
- placeholder: string;
21
- };
22
- checkbox: {
23
- selectedValues: string;
24
- selectedValue: string;
25
- editButton: string;
26
- selectButton: string;
27
- showButton: string;
28
- label: string;
29
- result: string;
30
- results: string;
31
- searchResults: string;
32
- noResult: string;
33
- sections: {
34
- selected: {
35
- title: string;
36
- titlePlurial: string;
37
- action: string;
38
- tooltip: string;
39
- };
40
- notSelected: {
41
- title: string;
42
- titlePlurial: string;
43
- action: string;
44
- tooltip: string;
45
- };
46
- };
47
- };
48
- };
49
- form: {
50
- required: string;
51
- requiredSingle: string;
52
- allRequired: string;
53
- allRequiredSingle: string;
54
- };
55
- message: {
56
- closeButton: string;
57
- };
58
- modal: {
59
- closeButton: string;
60
- };
61
- pagination: {
62
- label: string;
63
- page: string;
64
- pages: string;
65
- nextPage: string;
66
- previousPage: string;
67
- selectPage: string;
68
- };
69
- panel: {
70
- editLabel: string;
71
- };
72
- skipLinks: {
73
- navLabel: string;
74
- };
75
- general: {
76
- confirm: string;
77
- cancel: string;
78
- close: string;
79
- next: string;
80
- previous: string;
81
- };
82
- plusMenu: {
83
- moreLabel: string;
84
- badgeLabel: string;
85
- };
86
- actionMore: {
87
- label: string;
88
- };
89
- };
90
- fr: {
91
- errors: {
92
- required: string;
93
- date: {
94
- badInput: string;
95
- min: string;
96
- max: string;
97
- minMax: string;
98
- };
99
- numeric: {
100
- min: string;
101
- max: string;
102
- minMax: string;
103
- };
104
- };
105
- nbCharLeft: string;
106
- input: {
107
- select: {
108
- placeholder: string;
109
- };
110
- checkbox: {
111
- selectedValues: string;
112
- selectedValue: string;
113
- editButton: string;
114
- selectButton: string;
115
- showButton: string;
116
- label: string;
117
- result: string;
118
- results: string;
119
- searchResults: string;
120
- noResult: string;
121
- sections: {
122
- selected: {
123
- title: string;
124
- titlePlurial: string;
125
- action: string;
126
- tooltip: string;
127
- };
128
- notSelected: {
129
- title: string;
130
- titlePlurial: string;
131
- action: string;
132
- tooltip: string;
133
- };
134
- };
135
- };
136
- };
137
- form: {
138
- required: string;
139
- requiredSingle: string;
140
- allRequired: string;
141
- allRequiredSingle: string;
142
- };
143
- message: {
144
- closeButton: string;
145
- };
146
- modal: {
147
- closeButton: string;
148
- };
149
- pagination: {
150
- label: string;
151
- page: string;
152
- pages: string;
153
- nextPage: string;
154
- previousPage: string;
155
- selectPage: string;
156
- };
157
- panel: {
158
- editLabel: string;
159
- };
160
- skipLinks: {
161
- navLabel: string;
162
- };
163
- general: {
164
- confirm: string;
165
- cancel: string;
166
- close: string;
167
- next: string;
168
- previous: string;
169
- };
170
- plusMenu: {
171
- moreLabel: string;
172
- badgeLabel: string;
173
- };
174
- actionMore: {
175
- label: string;
176
- };
177
- };
178
- };
179
1
  /**
180
2
  * Get Intl object
181
3
  * @param element - element we need to get the language
@@ -183,6 +5,5 @@ declare const messages: {
183
5
  */
184
6
  export declare const initLocales: (element: HTMLElement) => {
185
7
  locale: string;
186
- messages: Record<string, unknown>;
8
+ messages: import("@mgdis/stencil-helpers/dist/locale/index.conf").ObjectType;
187
9
  };
188
- export {};
@@ -1,76 +1,3 @@
1
- import { MockCustomEvent } from '@stencil/core/mock-doc';
2
- /**
3
- * Clone Deep function
4
- * @param obj - object to clone
5
- * @returns cloned json
6
- */
7
- export declare const cloneDeep: (obj: unknown) => unknown;
8
- /**
9
- * Utility function that mocks the `MutationObserver` API. Recommended to execute inside `beforeEach`.
10
- * @param mutationObserverMock - Parameter that is sent to the `Object.defineProperty`
11
- * overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
12
- * mock the mutation observer, but its methods.
13
- * You can manually fire an intersection entry:
14
- * @param mutationObserverMock - configuration object
15
- * @returns Mocked MutationObserver
16
- * @example
17
- * ```
18
- * let fireMo;
19
- * setupMutationObserverMock({
20
- * observe: function () {
21
- * fireMo = this.cb;
22
- * },
23
- * });
24
- * ...
25
- * fireMo([{ type: 'childList', addedNodes: [AMockElemenet, AnotherMockElemenet], target: yourMockElemenet }]);;
26
- * ```
27
- */
28
- type SetupMutationObserverMockParams = {
29
- disconnect: MutationObserver['disconnect'];
30
- observe: MutationObserver['observe'];
31
- takeRecords: MutationObserver['takeRecords'];
32
- };
33
- export declare const setupMutationObserverMock: ({ disconnect, observe, takeRecords }: SetupMutationObserverMockParams) => typeof MutationObserver;
34
- type setupResizeObserverMockParams = {
35
- disconnect: ResizeObserver['disconnect'];
36
- observe: ResizeObserver['observe'];
37
- };
38
- /**
39
- * Utility function that mocks the `ResizeObserver` API. Recommended to execute inside `beforeEach`.
40
- * @param resizeObserverMock - Parameter that is sent to the `Object.defineProperty`
41
- * overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
42
- * mock the resize observer, but its methods.
43
- * You can manually fire an intersection entry:
44
- * @param resizeObserverMock - configuration object
45
- * @returns Mocked ResizeObserver
46
- * @example
47
- * ```
48
- * let fireRo;
49
- * setupResizeObserverMock({
50
- * observe: function () {
51
- * fireRo = this.cb;
52
- * },
53
- * });
54
- * ...
55
- * fireRo([{
56
- * borderBoxSize: ResizeObserverSize[],
57
- * contentBoxSize: ResizeObserverSize[],
58
- * contentRect: DOMRectReadOnly,
59
- * devicePixelContentBoxSize: ResizeObserverSize[],
60
- * target: yourMockElemenet
61
- * }]);;
62
- * ```
63
- */
64
- export declare const setupResizeObserverMock: ({ disconnect, observe }: setupResizeObserverMockParams) => typeof ResizeObserver;
65
- /**
66
- * Utility function that mocks the `SubmitEvent` API. Recommended to execute inside `beforeEach`.
67
- * @example
68
- * ```
69
- * setupSubmitEventMock();
70
- * ```
71
- * @returns custom event mock
72
- */
73
- export declare const setupSubmitEventMock: () => typeof MockCustomEvent;
74
1
  /**
75
2
  * force popover id when component use randomed identifier
76
3
  * @param component - element wich include mg-popover
@@ -78,17 +5,8 @@ export declare const setupSubmitEventMock: () => typeof MockCustomEvent;
78
5
  * @param interactiveElement - element where attribute 'aria-controls' is set
79
6
  */
80
7
  export declare const forcePopoverId: (component: Element, id: string, interactiveElement?: string) => void;
81
- /**
82
- * fix popper console.error in test
83
- * it is generated in `@popperjs/core/dist/cjs/popper.js l.1859`
84
- * this is due to internal function isHTMLElement(), so we can not mock it directly.
85
- * this function check if test DOM element mockHTMLElement instance is 'instanceof HTMLElement'
86
- * so we only override the console.error side effect for this error
87
- */
88
- export declare const mockConsoleError: () => void;
89
8
  /**
90
9
  * Add missing window.frames property to test context
91
10
  * usefull for component with iframe listeners, ex: mg-popover
92
11
  */
93
12
  export declare const mockWindowFrames: () => void;
94
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgdis/mg-components",
3
- "version": "5.22.0",
3
+ "version": "5.23.0",
4
4
  "description": "MG Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -23,41 +23,42 @@
23
23
  "outputName": "junit.xml"
24
24
  },
25
25
  "dependencies": {
26
- "@popperjs/core": "^2.11.8",
27
- "@stencil/core": "4.9.1",
26
+ "@popperjs/core": "2.11.8",
27
+ "@stencil/core": "4.11.0",
28
28
  "@mgdis/img": "1.6.0",
29
+ "@mgdis/stencil-helpers": "1.0.0",
29
30
  "@mgdis/styles": "1.1.0"
30
31
  },
31
32
  "devDependencies": {
32
- "@playwright/test": "1.40.1",
33
- "@pxtrn/storybook-addon-docs-stencil": "^6.4.1",
34
- "@storybook/addon-a11y": "^7.5.3",
35
- "@storybook/addon-actions": "^7.5.3",
36
- "@storybook/addon-essentials": "^7.5.3",
37
- "@storybook/addon-interactions": "^7.5.3",
38
- "@storybook/addon-links": "^7.5.3",
39
- "@storybook/addon-mdx-gfm": "^7.5.3",
40
- "@storybook/blocks": "^7.5.3",
41
- "@storybook/html": "^7.5.3",
42
- "@storybook/html-vite": "^7.5.3",
43
- "@storybook/testing-library": "^0.2.2",
44
- "@types/jest": "^29.5.8",
45
- "@types/node": "^20.9.0",
46
- "chromatic": "^10.0.0",
47
- "eslint": "^8.53.0",
48
- "eslint-plugin-storybook": "^0.6.15",
49
- "jest": "^29.7.0",
50
- "jest-cli": "^29.7.0",
51
- "jest-junit": "^16.0.0",
52
- "jest-transform-stub": "^2.0.0",
53
- "prettier": "^3.0.0",
54
- "puppeteer": "^21.0.0",
55
- "react": "^18.2.0",
56
- "react-dom": "^18.2.0",
57
- "react-textarea-autosize": "^8.5.3",
58
- "sass": "^1.69.5",
59
- "storybook": "^7.5.3",
60
- "ts-node": "^10.9.1",
33
+ "@playwright/test": "1.41.1",
34
+ "@pxtrn/storybook-addon-docs-stencil": "6.4.1",
35
+ "@storybook/addon-a11y": "7.6.10",
36
+ "@storybook/addon-actions": "7.6.10",
37
+ "@storybook/addon-essentials": "7.6.10",
38
+ "@storybook/addon-interactions": "7.6.10",
39
+ "@storybook/addon-links": "7.6.10",
40
+ "@storybook/addon-mdx-gfm": "7.6.10",
41
+ "@storybook/blocks": "7.6.10",
42
+ "@storybook/html": "7.6.10",
43
+ "@storybook/html-vite": "7.6.10",
44
+ "@storybook/testing-library": "0.2.2",
45
+ "@types/jest": "29.5.11",
46
+ "@types/node": "20.11.6",
47
+ "chromatic": "10.5.0",
48
+ "eslint": "8.56.0",
49
+ "eslint-plugin-storybook": "0.6.15",
50
+ "jest": "29.7.0",
51
+ "jest-cli": "29.7.0",
52
+ "jest-junit": "16.0.0",
53
+ "jest-transform-stub": "2.0.0",
54
+ "prettier": "3.2.4",
55
+ "puppeteer": "21.9.0",
56
+ "react": "18.2.0",
57
+ "react-dom": "18.2.0",
58
+ "react-textarea-autosize": "8.5.3",
59
+ "sass": "1.70.0",
60
+ "storybook": "7.6.10",
61
+ "ts-node": "10.9.2",
61
62
  "typescript": "5.3.3",
62
63
  "@mgdis/linting-stencil": "1.1.0",
63
64
  "@mgdis/playwright-helpers": "1.0.0",