@mgdis/mg-components 5.9.1 → 5.10.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 (126) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_31.cjs.entry.js +31 -225
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
  5. package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
  6. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
  7. package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
  8. package/dist/collection/components/atoms/mg-card/mg-card.js +13 -4
  9. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
  10. package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
  11. package/dist/collection/components/atoms/mg-icon/mg-icon.js +10 -5
  12. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
  13. package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
  14. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -13
  15. package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
  16. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
  17. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
  18. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +0 -12
  19. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
  20. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
  21. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
  22. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
  23. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
  24. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
  25. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +0 -11
  26. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +0 -18
  27. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
  28. package/dist/collection/components/molecules/mg-details/mg-details.js +0 -3
  29. package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
  30. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
  31. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
  32. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -7
  33. package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
  34. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
  35. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
  36. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
  37. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
  38. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
  39. package/dist/collection/locales/index.js +0 -1
  40. package/dist/collection/utils/behaviors.utils.js +0 -10
  41. package/dist/collection/utils/components.utils.js +1 -10
  42. package/dist/collection/utils/locale.utils.js +0 -4
  43. package/dist/collection/utils/unit.test.utils.js +0 -5
  44. package/dist/components/MgInput.js +0 -6
  45. package/dist/components/components.utils.js +1 -10
  46. package/dist/components/index2.js +0 -5
  47. package/dist/components/mg-action-more.js +0 -8
  48. package/dist/components/mg-badge2.js +1 -3
  49. package/dist/components/mg-button2.js +2 -7
  50. package/dist/components/mg-card2.js +13 -4
  51. package/dist/components/mg-character-left2.js +0 -2
  52. package/dist/components/mg-details.js +0 -3
  53. package/dist/components/mg-divider.js +0 -1
  54. package/dist/components/mg-form.js +0 -8
  55. package/dist/components/mg-icon2.js +10 -5
  56. package/dist/components/mg-illustrated-message.js +0 -2
  57. package/dist/components/mg-input-checkbox.js +0 -6
  58. package/dist/components/mg-input-date.js +0 -5
  59. package/dist/components/mg-input-numeric.js +0 -12
  60. package/dist/components/mg-input-password.js +0 -3
  61. package/dist/components/mg-input-radio.js +0 -9
  62. package/dist/components/mg-input-select2.js +0 -13
  63. package/dist/components/mg-input-text2.js +1 -12
  64. package/dist/components/mg-input-textarea.js +1 -5
  65. package/dist/components/mg-input-title2.js +0 -2
  66. package/dist/components/mg-input-toggle.js +0 -5
  67. package/dist/components/mg-item-more.js +0 -15
  68. package/dist/components/mg-menu-item2.js +0 -18
  69. package/dist/components/mg-menu2.js +0 -11
  70. package/dist/components/mg-message.js +2 -7
  71. package/dist/components/mg-modal.js +1 -6
  72. package/dist/components/mg-pagination.js +0 -6
  73. package/dist/components/mg-panel.js +5 -15
  74. package/dist/components/mg-popover2.js +1 -8
  75. package/dist/components/mg-skip-links.js +1 -4
  76. package/dist/components/mg-tabs.js +0 -12
  77. package/dist/components/mg-tag.js +0 -3
  78. package/dist/components/mg-tooltip2.js +1 -13
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/mg-action-more_31.entry.js +31 -225
  81. package/dist/esm/mg-components.js +1 -1
  82. package/dist/esm/mg-item-more.entry.js +1 -16
  83. package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
  84. package/dist/mg-components/mg-components.esm.js +1 -1
  85. package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
  86. package/dist/mg-components/{p-9a93b7af.entry.js → p-eb32bb18.entry.js} +1 -1
  87. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
  88. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
  89. package/dist/types/components/atoms/mg-card/mg-card.d.ts +10 -3
  90. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
  91. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
  92. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +6 -3
  93. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
  94. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
  95. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +0 -12
  96. package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
  97. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
  98. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
  99. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -12
  100. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
  101. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
  102. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  103. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
  104. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
  105. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
  106. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
  107. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
  108. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
  109. package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
  110. package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
  111. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
  112. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
  113. package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -6
  114. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
  115. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
  116. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
  117. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
  118. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
  119. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
  120. package/dist/types/locales/index.d.ts +0 -1
  121. package/dist/types/utils/behaviors.utils.d.ts +0 -9
  122. package/dist/types/utils/components.utils.d.ts +1 -9
  123. package/dist/types/utils/locale.utils.d.ts +0 -4
  124. package/dist/types/utils/unit.test.utils.d.ts +0 -7
  125. package/package.json +11 -12
  126. /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
@@ -10,7 +10,6 @@ export class MgInputNumeric {
10
10
  this.hasDisplayedError = false;
11
11
  /**
12
12
  * Handle input event
13
- *
14
13
  * @returns {void}
15
14
  */
16
15
  this.handleInput = () => {
@@ -23,7 +22,6 @@ export class MgInputNumeric {
23
22
  };
24
23
  /**
25
24
  * Handle focus event
26
- *
27
25
  * @returns {void}
28
26
  */
29
27
  this.handleFocus = () => {
@@ -31,7 +29,6 @@ export class MgInputNumeric {
31
29
  };
32
30
  /**
33
31
  * Handle blur event
34
- *
35
32
  * @returns {void}
36
33
  */
37
34
  this.handleBlur = () => {
@@ -41,7 +38,6 @@ export class MgInputNumeric {
41
38
  };
42
39
  /**
43
40
  * Check if input is valid
44
- *
45
41
  * @returns {void}
46
42
  */
47
43
  this.checkValidity = () => {
@@ -52,7 +48,6 @@ export class MgInputNumeric {
52
48
  };
53
49
  /**
54
50
  * Set input error message
55
- *
56
51
  * @returns {void}
57
52
  */
58
53
  this.setErrorMessage = () => {
@@ -70,7 +65,6 @@ export class MgInputNumeric {
70
65
  };
71
66
  /**
72
67
  * Get input error code
73
- *
74
68
  * @returns {null | InputError} error code
75
69
  */
76
70
  this.getInputError = () => {
@@ -99,14 +93,12 @@ export class MgInputNumeric {
99
93
  };
100
94
  /**
101
95
  * Format value based on type
102
- *
103
96
  * @param {number} value value to format
104
97
  * @returns {string} formated local value
105
98
  */
106
99
  this.formatValue = (value) => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));
107
100
  /**
108
101
  * Validate append slot
109
- *
110
102
  * @returns {void}
111
103
  */
112
104
  this.validateAppendSlot = () => {
@@ -195,7 +187,6 @@ export class MgInputNumeric {
195
187
  }
196
188
  /**
197
189
  * Public method to display errors
198
- *
199
190
  * @returns {Promise<void>}
200
191
  */
201
192
  async displayError() {
@@ -206,7 +197,6 @@ export class MgInputNumeric {
206
197
  /**
207
198
  * Displayed value in input
208
199
  * Change on focus/blur
209
- *
210
200
  * @returns {MgInputNumeric['value'] | MgInputNumeric['readonlyValue']} display value
211
201
  */
212
202
  displayValue() {
@@ -217,7 +207,6 @@ export class MgInputNumeric {
217
207
  *************/
218
208
  /**
219
209
  * Check if component props are well configured on init
220
- *
221
210
  * @returns {ReturnType<typeof setTimeout>} timeout
222
211
  */
223
212
  componentWillLoad() {
@@ -241,7 +230,6 @@ export class MgInputNumeric {
241
230
  }
242
231
  /**
243
232
  * Render
244
- *
245
233
  * @returns {HTMLElement} HTML Element
246
234
  */
247
235
  render() {
@@ -76,7 +76,6 @@ export class MgInputPassword {
76
76
  }
77
77
  /**
78
78
  * Public method to display errors
79
- *
80
79
  * @returns {Promise<void>}
81
80
  */
82
81
  async displayError() {
@@ -89,7 +88,6 @@ export class MgInputPassword {
89
88
  *************/
90
89
  /**
91
90
  * Check if component props are well configured on init
92
- *
93
91
  * @returns {ReturnType<typeof setTimeout>} timeout
94
92
  */
95
93
  componentWillLoad() {
@@ -104,7 +102,6 @@ export class MgInputPassword {
104
102
  }
105
103
  /**
106
104
  * Render
107
- *
108
105
  * @returns {HTMLElement} HTML Element
109
106
  */
110
107
  render() {
@@ -7,7 +7,6 @@ import { ClassList, allItemsAreString } from '../../../../utils/components.utils
7
7
  import { initLocales } from '../../../../locales';
8
8
  /**
9
9
  * type Option validation function
10
- *
11
10
  * @param {RadioOption} option radio option
12
11
  * @returns {boolean} radio option type is valid
13
12
  */
@@ -23,7 +22,6 @@ export class MgInputRadio {
23
22
  this.hasDisplayedError = false;
24
23
  /**
25
24
  * Handle input event
26
- *
27
25
  * @param {event} event input event
28
26
  * @returns {void}
29
27
  */
@@ -33,7 +31,6 @@ export class MgInputRadio {
33
31
  };
34
32
  /**
35
33
  * Handle blur event
36
- *
37
34
  * @returns {void}
38
35
  */
39
36
  this.handleBlur = () => {
@@ -42,7 +39,6 @@ export class MgInputRadio {
42
39
  };
43
40
  /**
44
41
  * Check if input is valid
45
- *
46
42
  * @returns {void}
47
43
  */
48
44
  this.checkValidity = () => {
@@ -53,7 +49,6 @@ export class MgInputRadio {
53
49
  };
54
50
  /**
55
51
  * Set input error message
56
- *
57
52
  * @returns {void}
58
53
  */
59
54
  this.setErrorMessage = () => {
@@ -66,7 +61,6 @@ export class MgInputRadio {
66
61
  };
67
62
  /**
68
63
  * get invalid element
69
- *
70
64
  * @returns {HTMLInputElement} element
71
65
  */
72
66
  this.getInvalidElement = () => this.inputs.find((input) => !input.disabled && !input.readOnly && !input.checkValidity());
@@ -121,7 +115,6 @@ export class MgInputRadio {
121
115
  }
122
116
  /**
123
117
  * Public method to display errors
124
- *
125
118
  * @returns {Promise<void>}
126
119
  */
127
120
  async displayError() {
@@ -134,7 +127,6 @@ export class MgInputRadio {
134
127
  *************/
135
128
  /**
136
129
  * Check if component props are well configured on init
137
- *
138
130
  * @returns {ReturnType<typeof setTimeout>} timeout
139
131
  */
140
132
  componentWillLoad() {
@@ -151,7 +143,6 @@ export class MgInputRadio {
151
143
  }
152
144
  /**
153
145
  * Render
154
- *
155
146
  * @returns {HTMLElement} HTML Element
156
147
  */
157
148
  render() {
@@ -6,28 +6,24 @@ import { ClassList, allItemsAreString } from '../../../../utils/components.utils
6
6
  import { initLocales } from '../../../../locales';
7
7
  /**
8
8
  * Check if item is a well configured option
9
- *
10
9
  * @param {unknown} option select option
11
10
  * @returns {boolean} select option type is valid
12
11
  */
13
12
  const isOption = (option) => typeof option === 'object' && typeof option.title === 'string';
14
13
  /**
15
14
  * Check if items[] is SelectOption
16
- *
17
15
  * @param {unknown[]} items select option
18
16
  * @returns {boolean} select option array type is valid
19
17
  */
20
18
  const allItemsAreOptions = (items) => Array.isArray(items) && items.every(item => isOption(item));
21
19
  /**
22
20
  * Check if item is a well configured optgroup
23
- *
24
21
  * @param {unknown} optgroup select option
25
22
  * @returns {boolean} select optgroup type is valid
26
23
  */
27
24
  const isOptGroup = (optgroup) => typeof optgroup === 'object' && typeof optgroup.group === 'string' && allItemsAreOptions(optgroup.options);
28
25
  /**
29
26
  * Group options
30
- *
31
27
  * @param {(SelectOption | OptGroup)[]} acc reduce accumulator
32
28
  * @param {SelectOption} item item to add
33
29
  * @param {string} item.group item group
@@ -60,7 +56,6 @@ export class MgInputSelect {
60
56
  this.hasDisplayedError = false;
61
57
  /**
62
58
  * Handle input event
63
- *
64
59
  * @returns {void}
65
60
  */
66
61
  this.handleInput = () => {
@@ -70,14 +65,12 @@ export class MgInputSelect {
70
65
  };
71
66
  /**
72
67
  * Method to compare item.title with input.value
73
- *
74
68
  * @param {SelectOption} item item to compare with
75
69
  * @returns {boolean} truthy if input.value is an item
76
70
  */
77
71
  this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
78
72
  /**
79
73
  * value props setter
80
- *
81
74
  * @param {MgInputSelect['value']} newValue value to update with
82
75
  * @returns {void}
83
76
  */
@@ -87,7 +80,6 @@ export class MgInputSelect {
87
80
  };
88
81
  /**
89
82
  * Update value from input.value
90
- *
91
83
  * @returns {void}
92
84
  */
93
85
  this.updateValue = () => {
@@ -114,7 +106,6 @@ export class MgInputSelect {
114
106
  };
115
107
  /**
116
108
  * Input value is disabled
117
- *
118
109
  * @returns {boolean} truthy if input value is disabled
119
110
  */
120
111
  this.isDisabledValue = () => { var _a; return allItemsAreOptions(this.options) && ((_a = this.options.find(this.isInputValue)) === null || _a === void 0 ? void 0 : _a.disabled) === true; };
@@ -140,7 +131,6 @@ export class MgInputSelect {
140
131
  };
141
132
  /**
142
133
  * Render option
143
- *
144
134
  * @param {SelectOption} option to render
145
135
  * @returns {HTMLElement} render option
146
136
  */
@@ -221,7 +211,6 @@ export class MgInputSelect {
221
211
  }
222
212
  /**
223
213
  * Public method to display errors
224
- *
225
214
  * @returns {Promise<void>}
226
215
  */
227
216
  async displayError() {
@@ -234,7 +223,6 @@ export class MgInputSelect {
234
223
  *************/
235
224
  /**
236
225
  * Check if component props are well configured on init
237
- *
238
226
  * @returns {ReturnType<typeof setTimeout>} timeout
239
227
  */
240
228
  componentWillLoad() {
@@ -256,7 +244,6 @@ export class MgInputSelect {
256
244
  }
257
245
  /**
258
246
  * Render
259
- *
260
247
  * @returns {HTMLElement} HTML Element
261
248
  */
262
249
  render() {
@@ -15,7 +15,6 @@ export class MgInputText {
15
15
  this.hasDisplayedError = false;
16
16
  /**
17
17
  * Handle input event
18
- *
19
18
  * @returns {void}
20
19
  */
21
20
  this.handleInput = () => {
@@ -27,7 +26,6 @@ export class MgInputText {
27
26
  };
28
27
  /**
29
28
  * Handle focus event
30
- *
31
29
  * @returns {void}
32
30
  */
33
31
  this.handleFocus = () => {
@@ -36,7 +34,6 @@ export class MgInputText {
36
34
  };
37
35
  /**
38
36
  * Handle blur event
39
- *
40
37
  * @returns {void}
41
38
  */
42
39
  this.handleBlur = () => {
@@ -48,7 +45,6 @@ export class MgInputText {
48
45
  };
49
46
  /**
50
47
  * Check if input is valid
51
- *
52
48
  * @returns {void}
53
49
  */
54
50
  this.checkValidity = () => {
@@ -60,7 +56,6 @@ export class MgInputText {
60
56
  };
61
57
  /**
62
58
  * Set input error message
63
- *
64
59
  * @returns {void}
65
60
  */
66
61
  this.setErrorMessage = () => {
@@ -77,11 +72,10 @@ export class MgInputText {
77
72
  };
78
73
  /**
79
74
  * Validate pattern configuration
80
- *
81
75
  * @returns {void}
82
76
  */
83
77
  this.validatePattern = () => {
84
- if (this.pattern &&
78
+ if (this.pattern !== undefined &&
85
79
  typeof this.pattern === 'string' &&
86
80
  this.pattern !== '' &&
87
81
  (this.patternErrorMessage === undefined || typeof this.patternErrorMessage !== 'string' || this.patternErrorMessage === '')) {
@@ -90,7 +84,6 @@ export class MgInputText {
90
84
  };
91
85
  /**
92
86
  * Validate append slot
93
- *
94
87
  * @returns {void}
95
88
  */
96
89
  this.validateAppendSlot = () => {
@@ -150,7 +143,6 @@ export class MgInputText {
150
143
  }
151
144
  /**
152
145
  * Public method to play input focus
153
- *
154
146
  * @returns {Promise<void>}
155
147
  */
156
148
  async setFocus() {
@@ -158,7 +150,6 @@ export class MgInputText {
158
150
  }
159
151
  /**
160
152
  * Public method to display errors
161
- *
162
153
  * @returns {Promise<void>}
163
154
  */
164
155
  async displayError() {
@@ -171,7 +162,6 @@ export class MgInputText {
171
162
  *************/
172
163
  /**
173
164
  * Check if component props are well configured on init
174
- *
175
165
  * @returns {ReturnType<typeof setTimeout>} timeout
176
166
  */
177
167
  componentWillLoad() {
@@ -191,7 +181,6 @@ export class MgInputText {
191
181
  }
192
182
  /**
193
183
  * Render
194
- *
195
184
  * @returns {HTMLElement} HTML Element
196
185
  */
197
186
  render() {
@@ -42,7 +42,6 @@ export class MgInputTextarea {
42
42
  /**
43
43
  * Get pattern validity
44
44
  * Pattern is not defined on textarea field: https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
45
- *
46
45
  * @returns {boolean} is pattern valid
47
46
  */
48
47
  this.getPatternValidity = () => this.pattern === undefined || new RegExp(`^${this.pattern}$`, 'u').test(this.value);
@@ -75,7 +74,7 @@ export class MgInputTextarea {
75
74
  * Validate pattern configuration
76
75
  */
77
76
  this.validatePattern = () => {
78
- if (this.pattern &&
77
+ if (this.pattern !== undefined &&
79
78
  typeof this.pattern === 'string' &&
80
79
  this.pattern !== '' &&
81
80
  (this.patternErrorMessage === undefined || typeof this.patternErrorMessage !== 'string' || this.patternErrorMessage === '')) {
@@ -130,7 +129,6 @@ export class MgInputTextarea {
130
129
  }
131
130
  /**
132
131
  * Public method to display errors
133
- *
134
132
  * @returns {Promise<void>}
135
133
  */
136
134
  async displayError() {
@@ -143,7 +141,6 @@ export class MgInputTextarea {
143
141
  *************/
144
142
  /**
145
143
  * Check if component props are well configured on init
146
- *
147
144
  * @returns {ReturnType<typeof setTimeout>} timeout
148
145
  */
149
146
  componentWillLoad() {
@@ -162,7 +159,6 @@ export class MgInputTextarea {
162
159
  }
163
160
  /**
164
161
  * Render
165
- *
166
162
  * @returns {HTMLElement} HTML Element
167
163
  */
168
164
  render() {
@@ -5,7 +5,6 @@ import { MgInput } from '../MgInput';
5
5
  import { ClassList, allItemsAreString } from '../../../../utils/components.utils';
6
6
  /**
7
7
  * type Option validation function
8
- *
9
8
  * @param {ToggleValue} option radio option
10
9
  * @returns {boolean} toggle option type is valid
11
10
  */
@@ -23,7 +22,6 @@ export class MgInputToggle {
23
22
  this.classIcon = 'mg-input--toggle-icon';
24
23
  /**
25
24
  * Change checked value
26
- *
27
25
  * @returns {void}
28
26
  */
29
27
  this.toggleChecked = () => {
@@ -31,7 +29,6 @@ export class MgInputToggle {
31
29
  };
32
30
  /**
33
31
  * Slots validation
34
- *
35
32
  * @returns {void}
36
33
  */
37
34
  this.validateSlots = () => {
@@ -119,7 +116,6 @@ export class MgInputToggle {
119
116
  }
120
117
  /**
121
118
  * set checked state
122
- *
123
119
  * @returns {void}
124
120
  */
125
121
  setChecked() {
@@ -162,7 +158,6 @@ export class MgInputToggle {
162
158
  }
163
159
  /**
164
160
  * Render
165
- *
166
161
  * @returns {HTMLElement} HTML Element
167
162
  */
168
163
  render() {
@@ -13,7 +13,6 @@ export class MgMenu {
13
13
  *************/
14
14
  /**
15
15
  * Close matching menu-item
16
- *
17
16
  * @param {HTMLElement} item menu-item to close
18
17
  * @param {boolean} condition addionnal condition
19
18
  * @returns {void}
@@ -25,19 +24,16 @@ export class MgMenu {
25
24
  };
26
25
  /**
27
26
  * get mg-item-more element
28
- *
29
27
  * @returns {HTMLMgItemMoreElement} mg-item-more element
30
28
  */
31
29
  this.getItemMore = () => this.element.querySelector('mg-item-more');
32
30
  /**
33
31
  * get mg-item-more >>> mg-menu-item element
34
- *
35
32
  * @returns {HTMLMgMenuItemElement} mg-item-more >>> mg-menu-item element
36
33
  */
37
34
  this.getItemMoreMenuItem = () => { var _a, _b; return (_b = (_a = this.getItemMore()) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('mg-menu-item'); };
38
35
  /**
39
36
  * Set item listend
40
- *
41
37
  * @param {HTMLMgMenuItemElement} item mg-menu-item element
42
38
  * @param {MgMenu['focusedMenuItem']} index number
43
39
  * @returns {void}
@@ -55,7 +51,6 @@ export class MgMenu {
55
51
  };
56
52
  /**
57
53
  * Store menu-items on component init and add listeners
58
- *
59
54
  * @returns {void}
60
55
  */
61
56
  this.initMenuItemsListeners = () => {
@@ -66,7 +61,6 @@ export class MgMenu {
66
61
  };
67
62
  /**
68
63
  * Handle item-loaded event on mg-item-more element
69
- *
70
64
  * @returns {void}
71
65
  */
72
66
  this.handleItemLoaded = () => {
@@ -74,7 +68,6 @@ export class MgMenu {
74
68
  };
75
69
  /**
76
70
  * render mg-item-more
77
- *
78
71
  * @returns {void}
79
72
  */
80
73
  this.renderMgItemMore = () => {
@@ -117,7 +110,6 @@ export class MgMenu {
117
110
  *************/
118
111
  /**
119
112
  * Validate props
120
- *
121
113
  * @returns {void}
122
114
  */
123
115
  componentWillLoad() {
@@ -128,7 +120,6 @@ export class MgMenu {
128
120
  }
129
121
  /**
130
122
  * Check if component slots configuration
131
- *
132
123
  * @returns {ReturnType<typeof setTimeout>} timeout
133
124
  */
134
125
  componentDidLoad() {
@@ -159,7 +150,6 @@ export class MgMenu {
159
150
  }
160
151
  /**
161
152
  * Add listeners to items
162
- *
163
153
  * @returns {void}
164
154
  */
165
155
  componentDidRender() {
@@ -167,7 +157,6 @@ export class MgMenu {
167
157
  }
168
158
  /**
169
159
  * Render
170
- *
171
160
  * @returns {HTMLElement} HTML Element
172
161
  */
173
162
  render() {
@@ -15,7 +15,6 @@ export class MgMenuItem {
15
15
  **********/
16
16
  /**
17
17
  * Toggle expanded prop value
18
- *
19
18
  * @returns {void}
20
19
  */
21
20
  this.toggleExpanded = () => {
@@ -23,7 +22,6 @@ export class MgMenuItem {
23
22
  };
24
23
  /**
25
24
  * Does an Element have given Status
26
- *
27
25
  * @param {HTMLMgMenuItemElement} mgMenuItemElement to parse
28
26
  * @param {MgMenuItem['status']} status to check
29
27
  * @returns {boolean} true if element with status is found
@@ -31,7 +29,6 @@ export class MgMenuItem {
31
29
  this.hasStatus = (mgMenuItemElement, status) => mgMenuItemElement.status === status;
32
30
  /**
33
31
  * Is component contextual direction match the given direction
34
- *
35
32
  * @param {MgMenuItem['direction']} direction in parent menu
36
33
  * @param {MgMenuItem['direction']} compareWith direction to compare with. Default: `this.direction`
37
34
  * @returns {boolean} true is direction match the direction propertie
@@ -40,7 +37,6 @@ export class MgMenuItem {
40
37
  /**
41
38
  * Update displayNotificationBadge
42
39
  * current component notification badge have priority over the slot badge when submenu contain badge
43
- *
44
40
  * @returns {void} update displayNotificationBadge value
45
41
  */
46
42
  this.updateDisplayNotificationBadge = () => {
@@ -51,7 +47,6 @@ export class MgMenuItem {
51
47
  };
52
48
  /**
53
49
  * Method to control if one of component children have active status
54
- *
55
50
  * @returns {boolean} truthy if component has active child
56
51
  */
57
52
  this.hasActiveChild = () => {
@@ -60,7 +55,6 @@ export class MgMenuItem {
60
55
  };
61
56
  /**
62
57
  * Validate slots
63
- *
64
58
  * @param {boolean} guard prevent action whith guard. Default: false.
65
59
  * @returns {void}
66
60
  */
@@ -80,7 +74,6 @@ export class MgMenuItem {
80
74
  };
81
75
  /**
82
76
  * Update status
83
- *
84
77
  * @param {Status[]} guard status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
85
78
  * @returns {void}
86
79
  */
@@ -91,7 +84,6 @@ export class MgMenuItem {
91
84
  };
92
85
  /**
93
86
  * Init event-listeners
94
- *
95
87
  * @returns {void}
96
88
  */
97
89
  this.initListeners = () => {
@@ -108,13 +100,11 @@ export class MgMenuItem {
108
100
  };
109
101
  /**
110
102
  * Get mg-popover identifier
111
- *
112
103
  * @returns {MgPopover['identifier']} generated mg-popover identifier
113
104
  */
114
105
  this.getPopoverIdentifier = () => `${this.identifier}-popover`;
115
106
  /**
116
107
  * Condition to know if component should display a mg-popover
117
- *
118
108
  * @returns {boolean} truthy if component display popover
119
109
  */
120
110
  this.displayPopover = () => this.isDirection(Direction.HORIZONTAL) && this.hasChildren && this.href === undefined;
@@ -123,7 +113,6 @@ export class MgMenuItem {
123
113
  ************/
124
114
  /**
125
115
  * Handle interacrtive element click
126
- *
127
116
  * @param {MouseEvent} event click on element
128
117
  * @returns {void}
129
118
  */
@@ -138,7 +127,6 @@ export class MgMenuItem {
138
127
  };
139
128
  /**
140
129
  * Handle popover element display-change event
141
- *
142
130
  * @param {CustomEvent} event popover display event
143
131
  * @returns {void}
144
132
  */
@@ -147,7 +135,6 @@ export class MgMenuItem {
147
135
  };
148
136
  /**
149
137
  * Render slot
150
- *
151
138
  * @returns {HTMLElement} HTML Element
152
139
  */
153
140
  this.renderSlot = () => h("slot", null);
@@ -214,7 +201,6 @@ export class MgMenuItem {
214
201
  }
215
202
  /**
216
203
  * Render popover clickoutside guard for content slot
217
- *
218
204
  * @returns {void}
219
205
  */
220
206
  updatePopoverGuard() {
@@ -228,7 +214,6 @@ export class MgMenuItem {
228
214
  *************/
229
215
  /**
230
216
  * Validate props
231
- *
232
217
  * @returns {void}
233
218
  */
234
219
  componentWillLoad() {
@@ -245,7 +230,6 @@ export class MgMenuItem {
245
230
  }
246
231
  /**
247
232
  * Check if component slots configuration
248
- *
249
233
  * @returns {ReturnType<typeof setTimeout>} timeout
250
234
  */
251
235
  componentDidLoad() {
@@ -285,7 +269,6 @@ export class MgMenuItem {
285
269
  }
286
270
  /**
287
271
  * Render ineractive element
288
- *
289
272
  * @returns {HTMLElement} HTML Element
290
273
  */
291
274
  renderInteractiveElement() {
@@ -298,7 +281,6 @@ export class MgMenuItem {
298
281
  }
299
282
  /**
300
283
  * Render
301
- *
302
284
  * @returns {HTMLElement} HTML Element
303
285
  */
304
286
  render() {