@mgdis/mg-components 6.22.0 → 6.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 (158) hide show
  1. package/dist/cjs/{index-C2viYwrR.js → index-BEF-cqV9.js} +325 -1789
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +242 -172
  4. package/dist/cjs/mg-alert.cjs.entry.js +6 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -3
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7491 -6367
  11. package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.js +12 -3
  18. package/dist/collection/components/atoms/mg-button/mg-button.js +9 -4
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +16 -7
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +16 -9
  21. package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
  22. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -3
  23. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +15 -13
  24. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  25. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +49 -26
  27. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +16 -8
  28. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -3
  29. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +7 -4
  30. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -5
  31. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -3
  32. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +7 -3
  33. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +9 -4
  34. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +61 -19
  35. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +15 -8
  36. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -3
  37. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -4
  38. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
  39. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
  40. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +8 -4
  41. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  42. package/dist/collection/components/molecules/mg-alert/mg-alert.js +29 -3
  43. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
  44. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
  45. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +5 -2
  46. package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  48. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  49. package/dist/collection/components/molecules/mg-message/mg-message.js +43 -4
  50. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  51. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +20 -6
  53. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  55. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  56. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  57. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
  58. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
  59. package/dist/components/index2.js +1 -1
  60. package/dist/components/index3.js +1 -1
  61. package/dist/components/index4.js +1 -0
  62. package/dist/components/mg-action-more.js +1 -1
  63. package/dist/components/mg-alert.js +1 -1
  64. package/dist/components/mg-badge2.js +1 -1
  65. package/dist/components/mg-breadcrumb.js +1 -1
  66. package/dist/components/mg-button2.js +1 -1
  67. package/dist/components/mg-card2.js +1 -1
  68. package/dist/components/mg-character-left2.js +1 -1
  69. package/dist/components/mg-details.js +1 -1
  70. package/dist/components/mg-divider2.js +1 -1
  71. package/dist/components/mg-fieldset.js +1 -1
  72. package/dist/components/mg-form.js +1 -1
  73. package/dist/components/mg-icon2.js +1 -1
  74. package/dist/components/mg-illustrated-message.js +1 -1
  75. package/dist/components/mg-input-checkbox.js +1 -1
  76. package/dist/components/mg-input-combobox.js +1 -1
  77. package/dist/components/mg-input-date.js +1 -1
  78. package/dist/components/mg-input-file.js +1 -1
  79. package/dist/components/mg-input-numeric.js +1 -1
  80. package/dist/components/mg-input-password.js +1 -1
  81. package/dist/components/mg-input-radio.js +1 -1
  82. package/dist/components/mg-input-rich-text-editor.js +284 -284
  83. package/dist/components/mg-input-select2.js +1 -1
  84. package/dist/components/mg-input-text2.js +1 -1
  85. package/dist/components/mg-input-textarea.js +1 -1
  86. package/dist/components/mg-input-title2.js +1 -1
  87. package/dist/components/mg-input-toggle.js +1 -1
  88. package/dist/components/mg-input2.js +1 -1
  89. package/dist/components/mg-item-more2.js +1 -1
  90. package/dist/components/mg-loader2.js +1 -1
  91. package/dist/components/mg-menu-item2.js +1 -1
  92. package/dist/components/mg-message2.js +1 -1
  93. package/dist/components/mg-modal.js +1 -1
  94. package/dist/components/mg-pagination.js +1 -1
  95. package/dist/components/mg-panel.js +1 -1
  96. package/dist/components/mg-popover-content2.js +1 -1
  97. package/dist/components/mg-popover2.js +1 -1
  98. package/dist/components/mg-progress.js +1 -1
  99. package/dist/components/mg-skip-links.js +1 -1
  100. package/dist/components/mg-table.js +1 -1
  101. package/dist/components/mg-tabs2.js +1 -1
  102. package/dist/components/mg-tooltip2.js +1 -1
  103. package/dist/custom-elements.json +8828 -0
  104. package/dist/esm/{index-DFwaH2hS.js → index-DshvCiTL.js} +325 -1789
  105. package/dist/esm/loader.js +3 -3
  106. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +244 -173
  107. package/dist/esm/mg-alert.entry.js +6 -2
  108. package/dist/esm/mg-breadcrumb.entry.js +2 -2
  109. package/dist/esm/mg-components.js +4 -4
  110. package/dist/esm/mg-fieldset.entry.js +4 -3
  111. package/dist/esm/mg-input-combobox.entry.js +4 -3
  112. package/dist/esm/mg-input-file.entry.js +5 -4
  113. package/dist/esm/mg-input-rich-text-editor.entry.js +7491 -6367
  114. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  115. package/dist/esm/mg-loader.entry.js +2 -2
  116. package/dist/esm/mg-progress.entry.js +2 -2
  117. package/dist/mg-components/mg-components.esm.js +1 -1
  118. package/dist/mg-components/{p-d5e69c95.entry.js → p-13feb37a.entry.js} +1 -1
  119. package/dist/mg-components/{p-c8c8cfc1.entry.js → p-236bb1d2.entry.js} +1 -1
  120. package/dist/mg-components/p-79265ad3.entry.js +1 -0
  121. package/dist/mg-components/{p-adec7fcc.entry.js → p-7c63e469.entry.js} +1 -1
  122. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  123. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  124. package/dist/mg-components/p-DshvCiTL.js +2 -0
  125. package/dist/mg-components/p-a0e2c886.entry.js +1 -0
  126. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  127. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  128. package/dist/mg-components/{p-c63f97f0.entry.js → p-d698fa67.entry.js} +283 -283
  129. package/dist/types/assets/icons/index.d.ts +2 -0
  130. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  131. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  132. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  133. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  134. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  135. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  136. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  137. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  138. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  139. package/dist/types/components.d.ts +547 -170
  140. package/dist/types/stencil-public-runtime.d.ts +53 -2
  141. package/ide/intellij/web-types.json +211 -3476
  142. package/ide/vscode/css-custom-data.json +1 -1
  143. package/ide/vscode/html-custom-data.json +58 -314
  144. package/package.json +30 -25
  145. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  146. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  147. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  148. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  149. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  150. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  151. package/dist/mg-components/p-0482eb9f.entry.js +0 -1
  152. package/dist/mg-components/p-2ee92f38.entry.js +0 -1
  153. package/dist/mg-components/p-3b653226.entry.js +0 -1
  154. package/dist/mg-components/p-5745fbea.entry.js +0 -1
  155. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  156. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  157. package/dist/mg-components/p-cc793586.entry.js +0 -1
  158. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, allItemsAreString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled, widths } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  /**
@@ -20,6 +21,25 @@ const allItemsAreOptions = (items) => Array.isArray(items) && items.every(item =
20
21
  * @returns select optgroup type is valid
21
22
  */
22
23
  const isOptGroup = (optgroup) => typeof optgroup === 'object' && typeof optgroup.group === 'string' && allItemsAreOptions(optgroup.options);
24
+ /**
25
+ * Ensure options can be unambiguously differentiated by their title
26
+ * Two options can share the same title only when they belong to different groups
27
+ * @param items - select options to validate
28
+ */
29
+ const validateUniqueTitles = (items) => {
30
+ const titlesByGroup = new Map();
31
+ items.forEach(({ title, group }) => {
32
+ if (!titlesByGroup.has(group)) {
33
+ titlesByGroup.set(group, new Set());
34
+ }
35
+ const titles = titlesByGroup.get(group);
36
+ if (titles.has(title)) {
37
+ const groupContext = group === undefined ? 'outside of a group' : `within the group "${group}"`;
38
+ throw new Error(`<mg-input-select> prop "items" must not contain options with the same "title" ${groupContext}. Duplicated title: "${title}".`);
39
+ }
40
+ titles.add(title);
41
+ });
42
+ };
23
43
  /**
24
44
  * Group options
25
45
  * @param acc - reduce accumulator
@@ -106,18 +126,37 @@ export class MgInputSelect {
106
126
  return null;
107
127
  }
108
128
  };
129
+ /**
130
+ * Get the rendered options as a flat list, in render order
131
+ * The select value is the position of an option in this list, so it uniquely identifies an option even when several share the same title
132
+ * @returns flat select options
133
+ */
134
+ this.getOptions = () => this.options.flatMap(option => (isOptGroup(option) ? option.options : [option]));
135
+ /**
136
+ * Get the option matching the current select value
137
+ * @returns matching option or undefined
138
+ */
139
+ this.getSelectedOption = () => {
140
+ var _a;
141
+ if (((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) === undefined || this.input.value === '') {
142
+ return undefined;
143
+ }
144
+ const options = this.getOptions();
145
+ // The select value is normally the render index of the selected option
146
+ const optionByIndex = options[Number(this.input.value)];
147
+ // Fallback for an unknown value injected programmatically (stored as a disabled option keyed by its own value)
148
+ return optionByIndex !== null && optionByIndex !== void 0 ? optionByIndex : options.find(option => option.value === this.input.value);
149
+ };
109
150
  /**
110
151
  * Handle input event
111
152
  */
112
153
  this.handleInput = () => {
154
+ const selectedOption = this.getSelectedOption();
113
155
  if (this.input.value === '') {
114
156
  this.value = null;
115
157
  }
116
- else if (allItemsAreString(this.items) && this.items.includes(this.input.value)) {
117
- this.value = this.input.value;
118
- }
119
- else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {
120
- this.value = this.items.find(this.isInputValue).value;
158
+ else if (selectedOption !== undefined) {
159
+ this.value = selectedOption.value;
121
160
  }
122
161
  else {
123
162
  // Add the unknown input.value to the options array as a disabled option before setting it as the new value
@@ -128,12 +167,6 @@ export class MgInputSelect {
128
167
  this.setErrorMessage();
129
168
  }
130
169
  };
131
- /**
132
- * Method to compare item.title with input.value
133
- * @param item - item to compare with
134
- * @returns truthy if input.value is an item
135
- */
136
- this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
137
170
  /**
138
171
  * Handle blur event
139
172
  */
@@ -148,7 +181,7 @@ export class MgInputSelect {
148
181
  * Input value is disabled
149
182
  * @returns truthy if input value is disabled
150
183
  */
151
- this.isDisabledValue = () => { var _a; return allItemsAreOptions(this.options) && ((_a = this.options.find(this.isInputValue)) === null || _a === void 0 ? void 0 : _a.disabled) === true; };
184
+ this.isDisabledValue = () => { var _a; return ((_a = this.getSelectedOption()) === null || _a === void 0 ? void 0 : _a.disabled) === true; };
152
185
  /**
153
186
  * Check if input is valid
154
187
  */
@@ -176,9 +209,10 @@ export class MgInputSelect {
176
209
  /**
177
210
  * Render option
178
211
  * @param option - to render
212
+ * @param index - option position in the flat list of rendered options, used as the option value
179
213
  * @returns render option
180
214
  */
181
- this.renderOption = (option) => (h("option", { key: option.title, value: option.title, selected: JSON.stringify(this.value) === JSON.stringify(option.value), disabled: option.disabled }, option.title));
215
+ this.renderOption = (option, index) => (h("option", { key: index, value: `${index}`, selected: JSON.stringify(this.value) === JSON.stringify(option.value), disabled: option.disabled }, option.title));
182
216
  }
183
217
  validateValue(newValue) {
184
218
  setTimeout(() => {
@@ -196,6 +230,7 @@ export class MgInputSelect {
196
230
  }
197
231
  // String array
198
232
  else if (allItemsAreString(newValue)) {
233
+ validateUniqueTitles(newValue.map(item => ({ title: item })));
199
234
  if (typeof this.value === 'string') {
200
235
  this.valueExist = newValue.includes(this.value);
201
236
  }
@@ -203,6 +238,7 @@ export class MgInputSelect {
203
238
  }
204
239
  // Object array
205
240
  else if (allItemsAreOptions(newValue)) {
241
+ validateUniqueTitles(newValue);
206
242
  this.valueExist = newValue.map(item => item.value).includes(this.value);
207
243
  // Grouped object options
208
244
  if (newValue.some(item => Boolean(item.group))) {
@@ -349,6 +385,7 @@ export class MgInputSelect {
349
385
  componentWillLoad() {
350
386
  // Get locales
351
387
  this.messages = initLocales(this.element).messages;
388
+ normalizeBooleanAttributes(this);
352
389
  // Validate
353
390
  this.validateItems(this.items);
354
391
  this.validateValue(this.value);
@@ -372,11 +409,13 @@ export class MgInputSelect {
372
409
  */
373
410
  render() {
374
411
  const readonlyValue = this.getReadonlyValue();
375
- return (h("mg-input", { key: 'ad948f6ed1a8e749ab7b62a198814a40ef99e884', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
412
+ // Running index shared across groups, so each option gets a unique value matching its position in getOptions()
413
+ let optionIndex = 0;
414
+ return (h("mg-input", { key: '9e51eff6ef7158aa1786a893985e4d1d202e94ed', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
376
415
  if (el !== null)
377
416
  this.input = el;
378
417
  } }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
379
- h("option", { value: "", disabled: this.placeholderDisabled && this.valueExist }, this.placeholder)), this.options.map(option => isOptGroup(option) ? (h("optgroup", { label: option.group, key: option.group }, option.options.map(this.renderOption))) : (isOption(option) && this.renderOption(option)))))));
418
+ h("option", { value: "", disabled: this.placeholderDisabled && this.valueExist }, this.placeholder)), this.options.map(option => isOptGroup(option) ? (h("optgroup", { label: option.group, key: option.group }, option.options.map(groupedOption => this.renderOption(groupedOption, optionIndex++)))) : (isOption(option) && this.renderOption(option, optionIndex++)))))));
380
419
  }
381
420
  static get is() { return "mg-input-select"; }
382
421
  static get encapsulation() { return "shadow"; }
@@ -421,7 +460,8 @@ export class MgInputSelect {
421
460
  "SelectOption": {
422
461
  "location": "import",
423
462
  "path": "./mg-input-select.conf",
424
- "id": "src/components/molecules/inputs/mg-input-select/mg-input-select.conf.ts::SelectOption"
463
+ "id": "src/components/molecules/inputs/mg-input-select/mg-input-select.conf.ts::SelectOption",
464
+ "referenceLocation": "SelectOption"
425
465
  }
426
466
  }
427
467
  },
@@ -661,7 +701,8 @@ export class MgInputSelect {
661
701
  "Width": {
662
702
  "location": "import",
663
703
  "path": "../mg-input/mg-input.conf",
664
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
704
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
705
+ "referenceLocation": "Width"
665
706
  }
666
707
  }
667
708
  },
@@ -705,7 +746,8 @@ export class MgInputSelect {
705
746
  "TooltipPosition": {
706
747
  "location": "import",
707
748
  "path": "../mg-input/mg-input.conf",
708
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
749
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
750
+ "referenceLocation": "TooltipPosition"
709
751
  }
710
752
  }
711
753
  },
@@ -801,7 +843,7 @@ export class MgInputSelect {
801
843
  },
802
844
  "complexType": {
803
845
  "original": "HTMLMgInputCheckboxElement['value']",
804
- "resolved": "CheckboxValue[]",
846
+ "resolved": "ICheckboxValue[]",
805
847
  "references": {
806
848
  "HTMLMgInputCheckboxElement": {
807
849
  "location": "global",
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { allItemsAreString, ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, allItemsAreString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { helpTextTypes, textTypes } from "./mg-input-text.conf";
4
5
  import { widths, classReadonly, classDisabled, classDisplayCharacterLeft } from "../mg-input/mg-input.conf";
5
6
  import { initLocales } from "../../../../locales";
@@ -352,6 +353,7 @@ export class MgInputText {
352
353
  this.messages = initLocales(this.element).messages;
353
354
  this.characterLeftId = `${this.identifier}-character-left`;
354
355
  this.datalistId = `${this.identifier}-datalist`;
356
+ normalizeBooleanAttributes(this);
355
357
  // Validate
356
358
  this.validateIcon(this.icon);
357
359
  this.validateDatalistoptions(this.datalistoptions);
@@ -375,7 +377,7 @@ export class MgInputText {
375
377
  * @returns HTML Element
376
378
  */
377
379
  render() {
378
- return (h("mg-input", { key: 'aa227eef42e7cfcb1ad0c6c2664498674b5cdd47', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly
380
+ return (h("mg-input", { key: '5758548bc9e5b1319e5d2f4832339d2f95d9d436', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly
379
381
  ? this.value && this.renderReadonly()
380
382
  : [
381
383
  h("div", { key: "input", class: "mg-c-input__input-group-container", style: {
@@ -528,7 +530,8 @@ export class MgInputText {
528
530
  "TextType": {
529
531
  "location": "import",
530
532
  "path": "./mg-input-text.conf",
531
- "id": "src/components/molecules/inputs/mg-input-text/mg-input-text.conf.ts::TextType"
533
+ "id": "src/components/molecules/inputs/mg-input-text/mg-input-text.conf.ts::TextType",
534
+ "referenceLocation": "TextType"
532
535
  }
533
536
  }
534
537
  },
@@ -549,12 +552,13 @@ export class MgInputText {
549
552
  "mutable": false,
550
553
  "complexType": {
551
554
  "original": "IconType",
552
- "resolved": "\"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"download\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"history\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"key\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"link\" | \"list\" | \"loader\" | \"location\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"table\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"",
555
+ "resolved": "\"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"download\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"glitters\" | \"glitters-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"history\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"key\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"link\" | \"list\" | \"loader\" | \"location\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"table\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"",
553
556
  "references": {
554
557
  "IconType": {
555
558
  "location": "import",
556
559
  "path": "../../../../components",
557
- "id": "src/components.d.ts::IconType"
560
+ "id": "src/components.d.ts::IconType",
561
+ "referenceLocation": "IconType"
558
562
  }
559
563
  }
560
564
  },
@@ -598,7 +602,8 @@ export class MgInputText {
598
602
  "OptionType": {
599
603
  "location": "import",
600
604
  "path": "./mg-input-text.conf",
601
- "id": "src/components/molecules/inputs/mg-input-text/mg-input-text.conf.ts::OptionType"
605
+ "id": "src/components/molecules/inputs/mg-input-text/mg-input-text.conf.ts::OptionType",
606
+ "referenceLocation": "OptionType"
602
607
  }
603
608
  }
604
609
  },
@@ -701,7 +706,8 @@ export class MgInputText {
701
706
  "Width": {
702
707
  "location": "import",
703
708
  "path": "../mg-input/mg-input.conf",
704
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
709
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
710
+ "referenceLocation": "Width"
705
711
  }
706
712
  }
707
713
  },
@@ -784,7 +790,8 @@ export class MgInputText {
784
790
  "TooltipPosition": {
785
791
  "location": "import",
786
792
  "path": "../mg-input/mg-input.conf",
787
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
793
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
794
+ "referenceLocation": "TooltipPosition"
788
795
  }
789
796
  }
790
797
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { widths, classReadonly, classDisabled, classDisplayCharacterLeft } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  export class MgInputTextarea {
@@ -265,6 +266,7 @@ export class MgInputTextarea {
265
266
  // Get locales
266
267
  this.messages = initLocales(this.element).messages;
267
268
  this.characterLeftId = `${this.identifier}-character-left`;
269
+ normalizeBooleanAttributes(this);
268
270
  // Validate
269
271
  this.validatecharacterLeftHide(this.characterLeftHide);
270
272
  this.validatePattern(this.pattern);
@@ -284,7 +286,7 @@ export class MgInputTextarea {
284
286
  * @returns HTML Element
285
287
  */
286
288
  render() {
287
- return (h("mg-input", { key: '68f259138df7207d7ba16a8f36f3b45e8fb143d0', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__input-group-container" }, h("textarea", { class: {
289
+ return (h("mg-input", { key: '5a6d89809f5e842cf5a0cda0e3c692cc4c0f667f', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__input-group-container" }, h("textarea", { class: {
288
290
  'mg-c-input__box': true,
289
291
  'mg-c-input__box--width': true,
290
292
  'mg-c-input__box--resizable': this.resizable === 'both',
@@ -535,7 +537,8 @@ export class MgInputTextarea {
535
537
  "Width": {
536
538
  "location": "import",
537
539
  "path": "../mg-input/mg-input.conf",
538
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
540
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
541
+ "referenceLocation": "Width"
539
542
  }
540
543
  }
541
544
  },
@@ -638,7 +641,8 @@ export class MgInputTextarea {
638
641
  "TooltipPosition": {
639
642
  "location": "import",
640
643
  "path": "../mg-input/mg-input.conf",
641
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
644
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
645
+ "referenceLocation": "TooltipPosition"
642
646
  }
643
647
  }
644
648
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, allItemsAreString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classDisabled, classReadonly } from "../mg-input/mg-input.conf";
4
5
  /**
5
6
  * type Option validation function
@@ -256,6 +257,7 @@ export class MgInputToggle {
256
257
  * Check if component props are well configured on init
257
258
  */
258
259
  componentWillLoad() {
260
+ normalizeBooleanAttributes(this);
259
261
  this.watchItems(this.items);
260
262
  this.validateSlots();
261
263
  this.watchValue(this.value);
@@ -270,7 +272,7 @@ export class MgInputToggle {
270
272
  */
271
273
  render() {
272
274
  const currentOption = this.options[this.getCurrentOptionIndex(this.value)];
273
- return (h("mg-input", { key: '834a0b0713019490b91d799ac9688661f930de43', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (currentOption && h("b", { class: "mg-c-input__readonly-value" }, currentOption.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.isChecked(this.value).toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.handleSwitchButton, ref: el => {
275
+ return (h("mg-input", { key: '09f0a48057d2c2a19b1f01e8e769592824afdd23', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (currentOption && h("b", { class: "mg-c-input__readonly-value" }, currentOption.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.isChecked(this.value).toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.handleSwitchButton, ref: el => {
274
276
  if (el !== null)
275
277
  this.button = el;
276
278
  } }, h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-2" }))))));
@@ -299,7 +301,8 @@ export class MgInputToggle {
299
301
  "ToggleOption": {
300
302
  "location": "import",
301
303
  "path": "../../../../types",
302
- "id": "src/types/index.ts::Option"
304
+ "id": "src/types/index.ts::Option",
305
+ "referenceLocation": "Option"
303
306
  }
304
307
  }
305
308
  },
@@ -322,7 +325,8 @@ export class MgInputToggle {
322
325
  "ToggleOption": {
323
326
  "location": "import",
324
327
  "path": "../../../../types",
325
- "id": "src/types/index.ts::Option"
328
+ "id": "src/types/index.ts::Option",
329
+ "referenceLocation": "Option"
326
330
  }
327
331
  }
328
332
  },
@@ -542,7 +546,8 @@ export class MgInputToggle {
542
546
  "TooltipPosition": {
543
547
  "location": "import",
544
548
  "path": "../mg-input/mg-input.conf",
545
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
549
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
550
+ "referenceLocation": "TooltipPosition"
546
551
  }
547
552
  }
548
553
  },
@@ -99,12 +99,13 @@ export class MgItemMore {
99
99
  "mutable": false,
100
100
  "complexType": {
101
101
  "original": "IconType",
102
- "resolved": "{ icon: \"filter\" | \"link\" | \"picture\" | \"table\" | \"circle\" | \"download\" | \"key\" | \"list\" | \"copy\" | \"history\" | \"location\" | \"pause\" | \"loader\" | \"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"; }",
102
+ "resolved": "{ icon: \"filter\" | \"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"download\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"glitters\" | \"glitters-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"history\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"key\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"link\" | \"list\" | \"loader\" | \"location\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"table\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"; }",
103
103
  "references": {
104
104
  "IconType": {
105
105
  "location": "import",
106
106
  "path": "./mg-item-more.conf",
107
- "id": "src/components/molecules/internals/mg-item-more/mg-item-more.conf.ts::IconType"
107
+ "id": "src/components/molecules/internals/mg-item-more/mg-item-more.conf.ts::IconType",
108
+ "referenceLocation": "IconType"
108
109
  }
109
110
  }
110
111
  },
@@ -128,7 +129,8 @@ export class MgItemMore {
128
129
  "SlotLabelType": {
129
130
  "location": "import",
130
131
  "path": "./mg-item-more.conf",
131
- "id": "src/components/molecules/internals/mg-item-more/mg-item-more.conf.ts::SlotLabelType"
132
+ "id": "src/components/molecules/internals/mg-item-more/mg-item-more.conf.ts::SlotLabelType",
133
+ "referenceLocation": "SlotLabelType"
132
134
  }
133
135
  }
134
136
  },
@@ -153,7 +153,7 @@ export class MgMenu {
153
153
  * @returns HTML Element
154
154
  */
155
155
  render() {
156
- return (h(Host, { key: '17b5111014e866939f58170452ca74ee40c8454c', role: "list", "aria-label": this.label }, h("slot", { key: '7c2a9aafccbc7526c74acaf7a505d7a33befc5ad' })));
156
+ return (h(Host, { key: 'c16a69485fabb9a7a91efe032501fafa98862882', role: "list", "aria-label": this.label }, h("slot", { key: 'f5bca6fdb93d9273e5fcc753d2c58c0a0504c0d0' })));
157
157
  }
158
158
  static get is() { return "mg-menu"; }
159
159
  static get encapsulation() { return "shadow"; }
@@ -198,7 +198,8 @@ export class MgMenu {
198
198
  "Direction": {
199
199
  "location": "import",
200
200
  "path": "../../../../types",
201
- "id": "src/types/index.ts::Direction"
201
+ "id": "src/types/index.ts::Direction",
202
+ "referenceLocation": "Direction"
202
203
  }
203
204
  }
204
205
  },
@@ -244,7 +245,8 @@ export class MgMenu {
244
245
  "ItemMoreType": {
245
246
  "location": "import",
246
247
  "path": "./mg-menu.conf",
247
- "id": "src/components/molecules/menus/mg-menu/mg-menu.conf.ts::ItemMoreType"
248
+ "id": "src/components/molecules/menus/mg-menu/mg-menu.conf.ts::ItemMoreType",
249
+ "referenceLocation": "ItemMoreType"
248
250
  }
249
251
  }
250
252
  },
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { ClassList, createID, isValideID, isValidString, nextTick, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, createID, isValidString, isValideID, nextTick, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { initLocales } from "../../../../locales";
4
5
  import { directions } from "../mg-menu/mg-menu.conf";
5
6
  import { Status, targets } from "./mg-menu-item.conf";
@@ -293,6 +294,7 @@ export class MgMenuItem {
293
294
  * Validate props
294
295
  */
295
296
  componentWillLoad() {
297
+ normalizeBooleanAttributes(this);
296
298
  // has children items that is NOT [slot='image' | 'information' | 'label' | 'metadata'] element
297
299
  // we store only matching elements
298
300
  this.hasChildren = Array.from(this.element.children).some(child => !['image', 'information', 'label', 'metadata'].includes(child.getAttribute('slot')));
@@ -370,7 +372,7 @@ export class MgMenuItem {
370
372
  ['mg-c-menu-item__collapse-container']: true,
371
373
  ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu() || this.isItemMore) && this.isDirection(directions.HORIZONTAL),
372
374
  });
373
- return (h(Host, { key: '374bf5cb625380973d15163b1088e7e743da5dd4', role: this.isItemMore ? 'presentation' : 'listitem' }, this.hasPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.popoverIdentifier, "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
375
+ return (h(Host, { key: 'c96763db4eeaa4a70213f39f13600aacbbed02b4', role: this.isItemMore ? 'presentation' : 'listitem' }, this.hasPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.popoverIdentifier, "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
374
376
  }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
375
377
  this.renderInteractiveElement(),
376
378
  h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
@@ -439,7 +441,8 @@ export class MgMenuItem {
439
441
  "TargetType": {
440
442
  "location": "import",
441
443
  "path": "./mg-menu-item.conf",
442
- "id": "src/components/molecules/menus/mg-menu-item/mg-menu-item.conf.ts::TargetType"
444
+ "id": "src/components/molecules/menus/mg-menu-item/mg-menu-item.conf.ts::TargetType",
445
+ "referenceLocation": "TargetType"
443
446
  }
444
447
  }
445
448
  },
@@ -464,7 +467,8 @@ export class MgMenuItem {
464
467
  "MgMenuStatusType": {
465
468
  "location": "import",
466
469
  "path": "./mg-menu-item.conf",
467
- "id": "src/components/molecules/menus/mg-menu-item/mg-menu-item.conf.ts::MgMenuStatusType"
470
+ "id": "src/components/molecules/menus/mg-menu-item/mg-menu-item.conf.ts::MgMenuStatusType",
471
+ "referenceLocation": "MgMenuStatusType"
468
472
  }
469
473
  }
470
474
  },