@mgdis/mg-components 5.27.4 → 5.28.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 (84) hide show
  1. package/dist/cjs/{index-3198e64e.js → index-ce4f7698.js} +176 -159
  2. package/dist/cjs/index-ce4f7698.js.map +1 -0
  3. package/dist/cjs/{index-11b35234.js → index-d8721674.js} +9 -8
  4. package/dist/cjs/index-d8721674.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_36.cjs.entry.js +73 -47
  7. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  8. package/dist/cjs/mg-components.cjs.js +3 -3
  9. package/dist/cjs/mg-components.cjs.js.map +1 -1
  10. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +20 -2
  13. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  14. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +3 -3
  15. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  16. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +4 -4
  17. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  18. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +54 -29
  19. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  20. package/dist/components/index.es.js +8 -7
  21. package/dist/components/index.es.js.map +1 -1
  22. package/dist/components/mg-input-checkbox.js +1 -1
  23. package/dist/components/mg-input-checkbox.js.map +1 -1
  24. package/dist/components/mg-input-date.js +1 -1
  25. package/dist/components/mg-input-date.js.map +1 -1
  26. package/dist/components/mg-input-numeric.js +1 -1
  27. package/dist/components/mg-input-numeric.js.map +1 -1
  28. package/dist/components/mg-input-password.js +5 -3
  29. package/dist/components/mg-input-password.js.map +1 -1
  30. package/dist/components/mg-input-radio.js +1 -1
  31. package/dist/components/mg-input-radio.js.map +1 -1
  32. package/dist/components/mg-input-select2.js +1 -1
  33. package/dist/components/mg-input-select2.js.map +1 -1
  34. package/dist/components/mg-input-text2.js +1 -1
  35. package/dist/components/mg-input-text2.js.map +1 -1
  36. package/dist/components/mg-input-textarea.js +1 -1
  37. package/dist/components/mg-input-textarea.js.map +1 -1
  38. package/dist/components/mg-input-toggle.js +1 -1
  39. package/dist/components/mg-input-toggle.js.map +1 -1
  40. package/dist/components/mg-input2.js +1 -1
  41. package/dist/components/mg-input2.js.map +1 -1
  42. package/dist/components/mg-item-more2.js +56 -31
  43. package/dist/components/mg-item-more2.js.map +1 -1
  44. package/dist/components/mg-menu-item2.js +4 -4
  45. package/dist/components/mg-menu-item2.js.map +1 -1
  46. package/dist/esm/{index-00abd8c1.js → index-817d7645.js} +9 -8
  47. package/dist/esm/index-817d7645.js.map +1 -0
  48. package/dist/esm/{index-99317ec3.js → index-9ed65b6d.js} +176 -159
  49. package/dist/esm/index-9ed65b6d.js.map +1 -0
  50. package/dist/esm/loader.js +3 -3
  51. package/dist/esm/mg-action-more_36.entry.js +73 -47
  52. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  53. package/dist/esm/mg-components.js +4 -4
  54. package/dist/esm/mg-components.js.map +1 -1
  55. package/dist/esm/mg-loader.entry.js +2 -2
  56. package/dist/mg-components/mg-components.esm.js +1 -1
  57. package/dist/mg-components/mg-components.esm.js.map +1 -1
  58. package/dist/mg-components/p-06a9d801.js +3 -0
  59. package/dist/mg-components/p-06a9d801.js.map +1 -0
  60. package/dist/mg-components/{p-d3e15dd7.entry.js → p-c4207303.entry.js} +2 -2
  61. package/dist/mg-components/p-eb6ec303.js +2 -0
  62. package/dist/mg-components/p-eb6ec303.js.map +1 -0
  63. package/dist/mg-components/p-ef541188.entry.js +2 -0
  64. package/dist/mg-components/p-ef541188.entry.js.map +1 -0
  65. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -0
  66. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +1 -1
  67. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +5 -1
  68. package/dist/types/components.d.ts +10 -2
  69. package/dist/types/stencil-public-runtime.d.ts +0 -2
  70. package/ide/intellij/web-types.json +23 -5
  71. package/ide/vscode/html-custom-data.json +18 -4
  72. package/loader/index.d.ts +3 -0
  73. package/package.json +23 -22
  74. package/dist/cjs/index-11b35234.js.map +0 -1
  75. package/dist/cjs/index-3198e64e.js.map +0 -1
  76. package/dist/esm/index-00abd8c1.js.map +0 -1
  77. package/dist/esm/index-99317ec3.js.map +0 -1
  78. package/dist/mg-components/p-48c0a0bf.entry.js +0 -2
  79. package/dist/mg-components/p-48c0a0bf.entry.js.map +0 -1
  80. package/dist/mg-components/p-4cfcbdc2.js +0 -2
  81. package/dist/mg-components/p-4cfcbdc2.js.map +0 -1
  82. package/dist/mg-components/p-815362e4.js +0 -3
  83. package/dist/mg-components/p-815362e4.js.map +0 -1
  84. /package/dist/mg-components/{p-d3e15dd7.entry.js.map → p-c4207303.entry.js.map} +0 -0
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3198e64e.js');
5
+ const index = require('./index-ce4f7698.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.18.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mg-components.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy(JSON.parse("[[\"mg-action-more_36.cjs\",[[1,\"mg-input-checkbox\",{\"value\":[1040],\"type\":[1025],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"inputVerticalList\":[4,\"input-vertical-list\"],\"required\":[4],\"readonly\":[4],\"displaySelectedValues\":[4,\"display-selected-values\"],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"checkboxItems\":[32],\"displaySearchInput\":[32],\"searchValue\":[32],\"searchResults\":[32],\"selectValuesButtonKey\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"type\":[\"validateType\"],\"inputVerticalList\":[\"watchInputVerticalList\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"displaySelectedValues\":[\"watchDisplaySelectedValues\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"checkboxItems\":[\"validateCheckboxItems\"],\"displaySearchInput\":[\"watchDisplaySearchInput\"],\"searchValue\":[\"validateSearchValue\"]}],[1,\"mg-action-more\",{\"items\":[16],\"icon\":[1040],\"button\":[16],\"displayChevron\":[4,\"display-chevron\"],\"expanded\":[32]},null,{\"items\":[\"validateItems\"],\"icon\":[\"validateIcon\"],\"button\":[\"validateButton\"],\"displayChevron\":[\"validateDisplayChevron\"]}],[1,\"mg-panel\",{\"identifier\":[1],\"panelTitle\":[1025,\"panel-title\"],\"titlePattern\":[1,\"title-pattern\"],\"titlePatternErrorMessage\":[1,\"title-pattern-error-message\"],\"titleEditable\":[1028,\"title-editable\"],\"titlePosition\":[1,\"title-position\"],\"expanded\":[1028],\"expandToggleDisplay\":[1,\"expand-toggle-display\"],\"expandToggleDisabled\":[4,\"expand-toggle-disabled\"],\"classCollection\":[32],\"isEditing\":[32],\"updatedPanelTitle\":[32]},null,{\"panelTitle\":[\"validatePanelTitle\"],\"titlePattern\":[\"validateTitlePattern\"],\"titlePatternErrorMessage\":[\"validateTitlePattern\"],\"titlePosition\":[\"validateTitlePosition\"],\"expanded\":[\"handleExpanded\"],\"expandToggleDisplay\":[\"validateExpandToggleDisplay\"]}],[1,\"mg-input-password\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayPassword\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"]}],[1,\"mg-input-textarea\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"maxlength\":[2],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"pattern\":[1],\"patternErrorMessage\":[1,\"pattern-error-message\"],\"rows\":[2],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"displayCharacterLeft\":[4,\"display-character-left\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"resizable\":[1],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"mgWidth\":[\"watchMgWidth\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"],\"displayCharacterLeft\":[\"validateDisplayCharacterLeft\"]}],[1,\"mg-input-date\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"required\":[4],\"readonly\":[4],\"min\":[1],\"max\":[1],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"min\":[\"validateMinMax\",\"handleValidityChange\"],\"max\":[\"validateMinMax\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"]}],[1,\"mg-input-numeric\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"required\":[4],\"readonly\":[4],\"max\":[2],\"min\":[2],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"type\":[1],\"format\":[1025],\"currency\":[1],\"integerLength\":[2,\"integer-length\"],\"decimalLength\":[2,\"decimal-length\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"hasFocus\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"min\":[\"handleValidityChange\"],\"max\":[\"handleValidityChange\"],\"mgWidth\":[\"watchMgWidth\"],\"type\":[\"validateType\"],\"format\":[\"watchFormat\"],\"integerLength\":[\"validateIntegerLength\"],\"decimalLength\":[\"validateDecimalLength\"]}],[1,\"mg-input-radio\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"inputVerticalList\":[4,\"input-vertical-list\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"inputVerticalList\":[\"watchInputVerticalList\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"]}],[1,\"mg-input-toggle\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"isOnOff\":[4,\"is-on-off\"],\"isIcon\":[4,\"is-icon\"],\"readonly\":[4],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"classCollection\":[32],\"options\":[32],\"errorMessage\":[32],\"valid\":[32],\"checked\":[32],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"isOnOff\":[\"watchIsOnOff\"],\"isIcon\":[\"watchIsIcon\"],\"readonly\":[\"watchReadonly\"],\"disabled\":[\"watchDisabled\"],\"checked\":[\"handleChecked\"]}],[1,\"mg-message\",{\"identifier\":[1],\"delay\":[2],\"variant\":[1],\"closeButton\":[1028,\"close-button\"],\"hide\":[1028],\"noAriaRole\":[4,\"no-aria-role\"],\"classCollection\":[32],\"hasActions\":[32]},null,{\"delay\":[\"validateDelay\"],\"variant\":[\"validateVariant\"],\"closeButton\":[\"validateCloseButton\"],\"hide\":[\"validateHide\"]}],[1,\"mg-modal\",{\"identifier\":[1],\"dialogRole\":[1,\"dialog-role\"],\"modalTitle\":[1,\"modal-title\"],\"closeButton\":[4,\"close-button\"],\"hide\":[1028],\"hasActions\":[32],\"hasContent\":[32],\"classCollection\":[32]},[[8,\"keydown\",\"handleKeyDown\"]],{\"dialogRole\":[\"validateDialogRole\"],\"modalTitle\":[\"validateModalTitle\"],\"hide\":[\"validateHide\"]}],[1,\"mg-tabs\",{\"identifier\":[1],\"label\":[1],\"size\":[1],\"items\":[16],\"activeTab\":[1538,\"active-tab\"],\"tabs\":[32],\"classCollection\":[32]},null,{\"label\":[\"validateLabel\"],\"size\":[\"validateSize\"],\"items\":[\"validateItems\"],\"activeTab\":[\"validateActiveTab\"]}],[1,\"mg-details\",{\"toggleClosed\":[1,\"toggle-closed\"],\"toggleOpened\":[1,\"toggle-opened\"],\"hideSummary\":[4,\"hide-summary\"],\"expanded\":[1028]},null,{\"toggleClosed\":[\"validateTitles\"],\"toggleOpened\":[\"validateTitles\"],\"expanded\":[\"handleExpanded\"]}],[1,\"mg-divider\",{\"size\":[1]}],[1,\"mg-form\",{\"identifier\":[1],\"name\":[1],\"readonly\":[4],\"requiredMessage\":[1,\"required-message\"],\"ariaRole\":[1,\"aria-role\"],\"labelOnTop\":[4,\"label-on-top\"],\"disabled\":[4],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"requiredMessageText\":[32],\"displayError\":[64]},null,{\"requiredMessage\":[\"validateRequiredMessage\",\"handleAttributeChange\"],\"ariaRole\":[\"validateAriaRole\"],\"labelOnTop\":[\"handlelabelOnTop\"],\"readonly\":[\"handleAttributeChange\"],\"disabled\":[\"handleAttributeChange\"]}],[1,\"mg-illustrated-message\",{\"size\":[1],\"direction\":[1]}],[1,\"mg-skip-links\",{\"links\":[16]},null,{\"links\":[\"validateLinks\"]}],[1,\"mg-tag\",{\"variant\":[1],\"outline\":[4],\"soft\":[4],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"outline\":[\"validateOutline\"],\"soft\":[\"validateSoft\"]}],[2,\"mg-input-checkbox-paginated\",{\"readonly\":[4],\"disabled\":[4],\"name\":[1],\"invalid\":[4],\"currentPage\":[1026,\"current-page\"],\"checkboxes\":[16],\"sectionKind\":[1,\"section-kind\"],\"messages\":[16],\"titleKind\":[32],\"expanded\":[32]},null,{\"checkboxes\":[\"validateCheckboxes\"],\"sectionKind\":[\"validateSectionKind\"]}],[1,\"mg-pagination\",{\"identifier\":[1],\"label\":[1025],\"hideNavigationLabels\":[4,\"hide-navigation-labels\"],\"hidePageCount\":[4,\"hide-page-count\"],\"totalPages\":[2,\"total-pages\"],\"currentPage\":[1538,\"current-page\"]},null,{\"totalPages\":[\"validateTotalPages\"],\"currentPage\":[\"validateCurrentPage\"]}],[1,\"mg-input-text\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"type\":[1],\"icon\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"datalistoptions\":[16],\"maxlength\":[2],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"pattern\":[1],\"patternErrorMessage\":[1,\"pattern-error-message\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"displayCharacterLeft\":[4,\"display-character-left\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"setFocus\":[64],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"icon\":[\"validateIcon\"],\"datalistoptions\":[\"validateDatalistoptions\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"]}],[1,\"mg-item-more\",{\"icon\":[16],\"slotlabel\":[16],\"size\":[1],\"parentMenu\":[32]},null,{\"icon\":[\"validateIcon\"],\"slotlabel\":[\"validateSlotLabel\"],\"size\":[\"validateSize\"]}],[1,\"mg-menu\",{\"label\":[1],\"direction\":[513],\"itemmore\":[16],\"size\":[1],\"isChildMenu\":[32]},null,{\"label\":[\"validateLabel\"],\"direction\":[\"validateDirection\"],\"itemmore\":[\"validateItemMore\"],\"size\":[\"validateSize\"]}],[1,\"mg-menu-item\",{\"identifier\":[1],\"href\":[1],\"target\":[1],\"status\":[1537],\"expanded\":[1028],\"size\":[32],\"navigationButtonClassList\":[32],\"direction\":[32],\"isInMainMenu\":[32],\"isItemMore\":[32],\"hasChildren\":[32],\"displayNotificationBadge\":[32]},null,{\"target\":[\"watchTarget\"],\"status\":[\"validateStatus\"],\"expanded\":[\"validateExpanded\"],\"size\":[\"validateSize\"],\"direction\":[\"validateDirection\"],\"hasChildren\":[\"validateHasChildren\"]}],[1,\"mg-input-select\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1025],\"placeholderHide\":[4,\"placeholder-hide\"],\"placeholderDisabled\":[4,\"placeholder-disabled\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[520,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"valueExist\":[32],\"readonlyValue\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"items\":[\"validateItems\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"]}],[2,\"mg-character-left\",{\"identifier\":[1],\"characters\":[1],\"maxlength\":[2]},null,{\"maxlength\":[\"validateMaxlength\"]}],[1,\"mg-popover\",{\"identifier\":[1],\"placement\":[1],\"arrowHide\":[4,\"arrow-hide\"],\"closeButton\":[4,\"close-button\"],\"display\":[1028],\"disabled\":[4]},null,{\"identifier\":[\"validateIdentifier\"],\"arrowHide\":[\"validateArrowHide\"],\"closeButton\":[\"validateCloseButton\"],\"display\":[\"handleDisplay\"]}],[1,\"mg-badge\",{\"value\":[8],\"label\":[1],\"variant\":[1],\"outline\":[4],\"classCollection\":[32]},null,{\"value\":[\"validateValue\"],\"label\":[\"validateLabel\"],\"variant\":[\"validateVariant\"],\"outline\":[\"validateOutline\"]}],[1,\"mg-popover-content\",{\"closeButton\":[4,\"close-button\"],\"classCollection\":[32]}],[1,\"mg-card\",{\"variant\":[1],\"variantStyle\":[1025,\"variant-style\"],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"variantStyle\":[\"validateVariantStyle\"]}],[1,\"mg-input\",{\"identifier\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"required\":[4],\"readonlyValue\":[1,\"readonly-value\"],\"errorMessage\":[1,\"error-message\"],\"helpText\":[1,\"help-text\"],\"ariaDescribedbyIDs\":[16],\"isFieldset\":[32],\"isReadonly\":[32],\"isDisabled\":[32],\"isVerticalList\":[32]},null,{\"identifier\":[\"watchIdentifier\",\"watchAriaDescribedbyIDs\"],\"labelOnTop\":[\"watchLabelOnTop\",\"watchLabelConfig\"],\"labelHide\":[\"watchLabelConfig\"],\"tooltipPosition\":[\"watchTooltipPosition\"],\"errorMessage\":[\"watchErrorMessage\",\"watchAriaDescribedbyIDs\"],\"helpText\":[\"watchHelpText\",\"watchAriaDescribedbyIDs\"],\"ariaDescribedbyIDs\":[\"watchAriaDescribedbyIDs\"],\"class\":[\"watchClass\",\"watchLabel\"],\"label\":[\"watchLabel\"]}],[1,\"mg-button\",{\"variant\":[1],\"identifier\":[1],\"label\":[1],\"type\":[1],\"fullWidth\":[4,\"full-width\"],\"form\":[1],\"disabled\":[1028],\"isIcon\":[4,\"is-icon\"],\"disableOnClick\":[4,\"disable-on-click\"],\"loading\":[32],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"fullWidth\":[\"validateFullWidth\"],\"disabled\":[\"disabledHandler\"],\"loading\":[\"loadingHandler\"]}],[1,\"mg-tooltip\",{\"identifier\":[1],\"message\":[1],\"placement\":[1],\"display\":[1028],\"disabled\":[4]},null,{\"identifier\":[\"watchIdentifier\"],\"message\":[\"watchMessage\"],\"display\":[\"watchDisplay\"],\"disabled\":[\"watchDisabled\"]}],[6,\"mg-input-title\",{\"identifier\":[1],\"required\":[4],\"readonly\":[4],\"isLegend\":[4,\"is-legend\"],\"tagName\":[32]},null,{\"identifier\":[\"validateIdentifier\"],\"isLegend\":[\"validateIsLegend\"]}],[1,\"mg-tooltip-content\",{\"message\":[1]}],[1,\"mg-icon\",{\"icon\":[1],\"size\":[1],\"variant\":[1],\"variantStyle\":[1025,\"variant-style\"],\"spin\":[4],\"classCollection\":[32]},null,{\"icon\":[\"validateIcon\"],\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"],\"variantStyle\":[\"validateVariantStyle\"],\"spin\":[\"handleSpin\"]}]]],[\"mg-loader.cjs\",[[1,\"mg-loader\",{\"message\":[1],\"messageHide\":[4,\"message-hide\"]},null,{\"message\":[\"watchMessage\"]}]]]]"), options);
22
+ return index.bootstrapLazy(JSON.parse("[[\"mg-action-more_36.cjs\",[[1,\"mg-input-checkbox\",{\"value\":[1040],\"type\":[1025],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"inputVerticalList\":[4,\"input-vertical-list\"],\"required\":[4],\"readonly\":[4],\"displaySelectedValues\":[4,\"display-selected-values\"],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"checkboxItems\":[32],\"displaySearchInput\":[32],\"searchValue\":[32],\"searchResults\":[32],\"selectValuesButtonKey\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"type\":[\"validateType\"],\"inputVerticalList\":[\"watchInputVerticalList\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"displaySelectedValues\":[\"watchDisplaySelectedValues\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"checkboxItems\":[\"validateCheckboxItems\"],\"displaySearchInput\":[\"watchDisplaySearchInput\"],\"searchValue\":[\"validateSearchValue\"]}],[1,\"mg-action-more\",{\"items\":[16],\"icon\":[1040],\"button\":[16],\"displayChevron\":[4,\"display-chevron\"],\"expanded\":[32]},null,{\"items\":[\"validateItems\"],\"icon\":[\"validateIcon\"],\"button\":[\"validateButton\"],\"displayChevron\":[\"validateDisplayChevron\"]}],[1,\"mg-panel\",{\"identifier\":[1],\"panelTitle\":[1025,\"panel-title\"],\"titlePattern\":[1,\"title-pattern\"],\"titlePatternErrorMessage\":[1,\"title-pattern-error-message\"],\"titleEditable\":[1028,\"title-editable\"],\"titlePosition\":[1,\"title-position\"],\"expanded\":[1028],\"expandToggleDisplay\":[1,\"expand-toggle-display\"],\"expandToggleDisabled\":[4,\"expand-toggle-disabled\"],\"classCollection\":[32],\"isEditing\":[32],\"updatedPanelTitle\":[32]},null,{\"panelTitle\":[\"validatePanelTitle\"],\"titlePattern\":[\"validateTitlePattern\"],\"titlePatternErrorMessage\":[\"validateTitlePattern\"],\"titlePosition\":[\"validateTitlePosition\"],\"expanded\":[\"handleExpanded\"],\"expandToggleDisplay\":[\"validateExpandToggleDisplay\"]}],[1,\"mg-input-password\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"maxlength\":[8],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayPassword\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"]}],[1,\"mg-input-textarea\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"maxlength\":[2],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"pattern\":[1],\"patternErrorMessage\":[1,\"pattern-error-message\"],\"rows\":[2],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"displayCharacterLeft\":[4,\"display-character-left\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"resizable\":[1],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"mgWidth\":[\"watchMgWidth\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"],\"displayCharacterLeft\":[\"validateDisplayCharacterLeft\"]}],[1,\"mg-input-date\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"required\":[4],\"readonly\":[4],\"min\":[1],\"max\":[1],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"min\":[\"validateMinMax\",\"handleValidityChange\"],\"max\":[\"validateMinMax\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"]}],[1,\"mg-input-numeric\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"required\":[4],\"readonly\":[4],\"max\":[2],\"min\":[2],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"type\":[1],\"format\":[1025],\"currency\":[1],\"integerLength\":[2,\"integer-length\"],\"decimalLength\":[2,\"decimal-length\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"hasFocus\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"min\":[\"handleValidityChange\"],\"max\":[\"handleValidityChange\"],\"mgWidth\":[\"watchMgWidth\"],\"type\":[\"validateType\"],\"format\":[\"watchFormat\"],\"integerLength\":[\"validateIntegerLength\"],\"decimalLength\":[\"validateDecimalLength\"]}],[1,\"mg-input-radio\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"inputVerticalList\":[4,\"input-vertical-list\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"inputVerticalList\":[\"watchInputVerticalList\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"]}],[1,\"mg-input-toggle\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"isOnOff\":[4,\"is-on-off\"],\"isIcon\":[4,\"is-icon\"],\"readonly\":[4],\"disabled\":[4],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"classCollection\":[32],\"options\":[32],\"errorMessage\":[32],\"valid\":[32],\"checked\":[32],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"isOnOff\":[\"watchIsOnOff\"],\"isIcon\":[\"watchIsIcon\"],\"readonly\":[\"watchReadonly\"],\"disabled\":[\"watchDisabled\"],\"checked\":[\"handleChecked\"]}],[1,\"mg-message\",{\"identifier\":[1],\"delay\":[2],\"variant\":[1],\"closeButton\":[1028,\"close-button\"],\"hide\":[1028],\"noAriaRole\":[4,\"no-aria-role\"],\"classCollection\":[32],\"hasActions\":[32]},null,{\"delay\":[\"validateDelay\"],\"variant\":[\"validateVariant\"],\"closeButton\":[\"validateCloseButton\"],\"hide\":[\"validateHide\"]}],[1,\"mg-modal\",{\"identifier\":[1],\"dialogRole\":[1,\"dialog-role\"],\"modalTitle\":[1,\"modal-title\"],\"closeButton\":[4,\"close-button\"],\"hide\":[1028],\"hasActions\":[32],\"hasContent\":[32],\"classCollection\":[32]},[[8,\"keydown\",\"handleKeyDown\"]],{\"dialogRole\":[\"validateDialogRole\"],\"modalTitle\":[\"validateModalTitle\"],\"hide\":[\"validateHide\"]}],[1,\"mg-tabs\",{\"identifier\":[1],\"label\":[1],\"size\":[1],\"items\":[16],\"activeTab\":[1538,\"active-tab\"],\"tabs\":[32],\"classCollection\":[32]},null,{\"label\":[\"validateLabel\"],\"size\":[\"validateSize\"],\"items\":[\"validateItems\"],\"activeTab\":[\"validateActiveTab\"]}],[1,\"mg-details\",{\"toggleClosed\":[1,\"toggle-closed\"],\"toggleOpened\":[1,\"toggle-opened\"],\"hideSummary\":[4,\"hide-summary\"],\"expanded\":[1028]},null,{\"toggleClosed\":[\"validateTitles\"],\"toggleOpened\":[\"validateTitles\"],\"expanded\":[\"handleExpanded\"]}],[1,\"mg-divider\",{\"size\":[1]}],[1,\"mg-form\",{\"identifier\":[1],\"name\":[1],\"readonly\":[4],\"requiredMessage\":[1,\"required-message\"],\"ariaRole\":[1,\"aria-role\"],\"labelOnTop\":[4,\"label-on-top\"],\"disabled\":[4],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"requiredMessageText\":[32],\"displayError\":[64]},null,{\"requiredMessage\":[\"validateRequiredMessage\",\"handleAttributeChange\"],\"ariaRole\":[\"validateAriaRole\"],\"labelOnTop\":[\"handlelabelOnTop\"],\"readonly\":[\"handleAttributeChange\"],\"disabled\":[\"handleAttributeChange\"]}],[1,\"mg-illustrated-message\",{\"size\":[1],\"direction\":[1]}],[1,\"mg-skip-links\",{\"links\":[16]},null,{\"links\":[\"validateLinks\"]}],[1,\"mg-tag\",{\"variant\":[1],\"outline\":[4],\"soft\":[4],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"outline\":[\"validateOutline\"],\"soft\":[\"validateSoft\"]}],[2,\"mg-input-checkbox-paginated\",{\"readonly\":[4],\"disabled\":[4],\"name\":[1],\"invalid\":[4],\"currentPage\":[1026,\"current-page\"],\"checkboxes\":[16],\"sectionKind\":[1,\"section-kind\"],\"messages\":[16],\"titleKind\":[32],\"expanded\":[32]},null,{\"checkboxes\":[\"validateCheckboxes\"],\"sectionKind\":[\"validateSectionKind\"]}],[1,\"mg-pagination\",{\"identifier\":[1],\"label\":[1025],\"hideNavigationLabels\":[4,\"hide-navigation-labels\"],\"hidePageCount\":[4,\"hide-page-count\"],\"totalPages\":[2,\"total-pages\"],\"currentPage\":[1538,\"current-page\"]},null,{\"totalPages\":[\"validateTotalPages\"],\"currentPage\":[\"validateCurrentPage\"]}],[1,\"mg-input-text\",{\"value\":[1537],\"identifier\":[1],\"name\":[1],\"label\":[1],\"type\":[1],\"icon\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1],\"datalistoptions\":[16],\"maxlength\":[2],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"pattern\":[1],\"patternErrorMessage\":[1,\"pattern-error-message\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"displayCharacterLeft\":[4,\"display-character-left\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"setFocus\":[64],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"icon\":[\"validateIcon\"],\"datalistoptions\":[\"validateDatalistoptions\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"]}],[1,\"mg-item-more\",{\"icon\":[16],\"slotlabel\":[16],\"size\":[1],\"parentMenu\":[32]},null,{\"icon\":[\"validateIcon\"],\"slotlabel\":[\"validateSlotLabel\"],\"size\":[\"validateSize\"]}],[1,\"mg-menu\",{\"label\":[1],\"direction\":[513],\"itemmore\":[16],\"size\":[1],\"isChildMenu\":[32]},null,{\"label\":[\"validateLabel\"],\"direction\":[\"validateDirection\"],\"itemmore\":[\"validateItemMore\"],\"size\":[\"validateSize\"]}],[1,\"mg-menu-item\",{\"identifier\":[513],\"href\":[1],\"target\":[1],\"status\":[1537],\"expanded\":[1028],\"size\":[32],\"navigationButtonClassList\":[32],\"direction\":[32],\"isInMainMenu\":[32],\"isItemMore\":[32],\"hasChildren\":[32],\"displayNotificationBadge\":[32]},null,{\"target\":[\"watchTarget\"],\"status\":[\"validateStatus\"],\"expanded\":[\"validateExpanded\"],\"size\":[\"validateSize\"],\"direction\":[\"validateDirection\"],\"hasChildren\":[\"validateHasChildren\"]}],[1,\"mg-input-select\",{\"value\":[1032],\"items\":[16],\"identifier\":[1],\"name\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"placeholder\":[1025],\"placeholderHide\":[4,\"placeholder-hide\"],\"placeholderDisabled\":[4,\"placeholder-disabled\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"mgWidth\":[520,\"mg-width\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"valueExist\":[32],\"readonlyValue\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"items\":[\"validateItems\"],\"readonly\":[\"watchReadonly\",\"handleValidityChange\"],\"required\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"watchDisabled\"],\"mgWidth\":[\"watchMgWidth\"]}],[2,\"mg-character-left\",{\"identifier\":[1],\"characters\":[1],\"maxlength\":[2]},null,{\"maxlength\":[\"validateMaxlength\"]}],[1,\"mg-popover\",{\"identifier\":[1],\"placement\":[1],\"arrowHide\":[4,\"arrow-hide\"],\"closeButton\":[4,\"close-button\"],\"display\":[1028],\"disabled\":[4]},null,{\"identifier\":[\"validateIdentifier\"],\"arrowHide\":[\"validateArrowHide\"],\"closeButton\":[\"validateCloseButton\"],\"display\":[\"handleDisplay\"]}],[1,\"mg-badge\",{\"value\":[8],\"label\":[1],\"variant\":[1],\"outline\":[4],\"classCollection\":[32]},null,{\"value\":[\"validateValue\"],\"label\":[\"validateLabel\"],\"variant\":[\"validateVariant\"],\"outline\":[\"validateOutline\"]}],[1,\"mg-popover-content\",{\"closeButton\":[4,\"close-button\"],\"classCollection\":[32]}],[1,\"mg-card\",{\"variant\":[1],\"variantStyle\":[1025,\"variant-style\"],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"variantStyle\":[\"validateVariantStyle\"]}],[1,\"mg-input\",{\"identifier\":[1],\"label\":[1],\"labelOnTop\":[4,\"label-on-top\"],\"labelHide\":[4,\"label-hide\"],\"tooltip\":[1],\"tooltipPosition\":[1,\"tooltip-position\"],\"required\":[4],\"readonlyValue\":[1,\"readonly-value\"],\"errorMessage\":[1,\"error-message\"],\"helpText\":[1,\"help-text\"],\"ariaDescribedbyIDs\":[16],\"isFieldset\":[32],\"isReadonly\":[32],\"isDisabled\":[32],\"isVerticalList\":[32]},null,{\"identifier\":[\"watchIdentifier\",\"watchAriaDescribedbyIDs\"],\"labelOnTop\":[\"watchLabelOnTop\",\"watchLabelConfig\"],\"labelHide\":[\"watchLabelConfig\"],\"tooltipPosition\":[\"watchTooltipPosition\"],\"errorMessage\":[\"watchErrorMessage\",\"watchAriaDescribedbyIDs\"],\"helpText\":[\"watchHelpText\",\"watchAriaDescribedbyIDs\"],\"ariaDescribedbyIDs\":[\"watchAriaDescribedbyIDs\"],\"class\":[\"watchClass\",\"watchLabel\"],\"label\":[\"watchLabel\"]}],[1,\"mg-button\",{\"variant\":[1],\"identifier\":[1],\"label\":[1],\"type\":[1],\"fullWidth\":[4,\"full-width\"],\"form\":[1],\"disabled\":[1028],\"isIcon\":[4,\"is-icon\"],\"disableOnClick\":[4,\"disable-on-click\"],\"loading\":[32],\"classCollection\":[32]},null,{\"variant\":[\"validateVariant\"],\"fullWidth\":[\"validateFullWidth\"],\"disabled\":[\"disabledHandler\"],\"loading\":[\"loadingHandler\"]}],[1,\"mg-tooltip\",{\"identifier\":[1],\"message\":[1],\"placement\":[1],\"display\":[1028],\"disabled\":[4]},null,{\"identifier\":[\"watchIdentifier\"],\"message\":[\"watchMessage\"],\"display\":[\"watchDisplay\"],\"disabled\":[\"watchDisabled\"]}],[6,\"mg-input-title\",{\"identifier\":[1],\"required\":[4],\"readonly\":[4],\"isLegend\":[4,\"is-legend\"],\"tagName\":[32]},null,{\"identifier\":[\"validateIdentifier\"],\"isLegend\":[\"validateIsLegend\"]}],[1,\"mg-tooltip-content\",{\"message\":[1]}],[1,\"mg-icon\",{\"icon\":[1],\"size\":[1],\"variant\":[1],\"variantStyle\":[1025,\"variant-style\"],\"spin\":[4],\"classCollection\":[32]},null,{\"icon\":[\"validateIcon\"],\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"],\"variantStyle\":[\"validateVariantStyle\"],\"spin\":[\"handleSpin\"]}]]],[\"mg-loader.cjs\",[[1,\"mg-loader\",{\"message\":[1],\"messageHide\":[4,\"message-hide\"]},null,{\"message\":[\"watchMessage\"]}]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1 +1 @@
1
- {"file":"mg-components.cjs.js","mappings":";;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,+MAAe,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,wBAAa,EAAE,CAAC;AACxB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","globalScripts","bootstrapLazy"],"sources":["../../node_modules/.pnpm/@stencil+core@4.18.3/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
1
+ {"file":"mg-components.cjs.js","mappings":";;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,+MAAe,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,wBAAa,EAAE,CAAC;AACxB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","globalScripts","bootstrapLazy"],"sources":["../../node_modules/.pnpm/@stencil+core@4.19.2/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3198e64e.js');
6
- const index$1 = require('./index-11b35234.js');
5
+ const index = require('./index-ce4f7698.js');
6
+ const index$1 = require('./index-d8721674.js');
7
7
 
8
8
  const mgLoaderCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.4rem;text-align:center}";
9
9
  const MgLoaderStyle0 = mgLoaderCss;
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "compiler": {
42
42
  "name": "@stencil/core",
43
- "version": "4.18.3",
43
+ "version": "4.19.2",
44
44
  "typescriptVersion": "5.4.5"
45
45
  },
46
46
  "collections": [],
@@ -62,6 +62,7 @@ export class MgInputPassword {
62
62
  this.labelOnTop = undefined;
63
63
  this.labelHide = false;
64
64
  this.placeholder = undefined;
65
+ this.maxlength = undefined;
65
66
  this.required = false;
66
67
  this.readonly = false;
67
68
  this.disabled = false;
@@ -175,10 +176,10 @@ export class MgInputPassword {
175
176
  * @returns HTML Element
176
177
  */
177
178
  render() {
178
- return (h("mg-input", { key: '39c2a1a17b4b64cb79ed6ca7036dd304ed01a8e6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("span", { key: 'd85a4240b6d178cde418ee72164f337c4986aeff', class: "mg-c-input__input-group" }, h("input", { key: '2caccd24026632f5e65dd4cf12914bf71ca656d3', type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
179
+ return (h("mg-input", { key: 'eb5020082d312b486dd2ee8d27859ab09e668aa5', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("span", { key: 'b4982f4a4df480cbff50d66a84109391bebdeb95', class: "mg-c-input__input-group" }, h("input", { key: '6e3bde917b60fb77a2c95052a9c57165048db537', type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
179
180
  if (el !== null)
180
181
  this.input = el;
181
- } }), h("mg-button", { key: '59bd6c94c412eb8bcd5ece82e569e7df6fadaf9a', label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { key: '22db9c43220335f258b8fa5978cb66a5d4c14c61', icon: this.displayPassword ? 'eye-slash' : 'eye' })))));
182
+ } }), h("mg-button", { key: 'eb744199338d710f36f0dc515ce19d5c5ffa638f', label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { key: '778bcf8c970796b6fad2015bf4cf2a7acacc556f', class: "mg-c-input__input-icon", icon: this.displayPassword ? 'eye-slash' : 'eye' })))));
182
183
  }
183
184
  static get is() { return "mg-input-password"; }
184
185
  static get encapsulation() { return "shadow"; }
@@ -315,6 +316,23 @@ export class MgInputPassword {
315
316
  "attribute": "placeholder",
316
317
  "reflect": false
317
318
  },
319
+ "maxlength": {
320
+ "type": "any",
321
+ "mutable": false,
322
+ "complexType": {
323
+ "original": "any",
324
+ "resolved": "any",
325
+ "references": {}
326
+ },
327
+ "required": false,
328
+ "optional": false,
329
+ "docs": {
330
+ "tags": [],
331
+ "text": "Input max length"
332
+ },
333
+ "attribute": "maxlength",
334
+ "reflect": false
335
+ },
318
336
  "required": {
319
337
  "type": "boolean",
320
338
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"mg-input-password.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-password/mg-input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAoC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAC5H,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,OAAO,eAAe;;QAW1B,8CAA8C;QACtC,sBAAiB,GAAG,KAAK,CAAC;QAwMlC;;WAEG;QACK,gBAAW,GAAG,GAAS,EAAE;YAC/B,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC3B,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAChC,CAAC,CAAC;QAEF;;WAEG;QACK,eAAU,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;YACtC,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;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stencil/core';\nimport { ClassList, isValidString } from '@mgdis/stencil-helpers';\nimport { type TooltipPosition, type Width, Handler, classReadonly, classDisabled, widths } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-password',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-password.css',\n shadow: true,\n})\nexport class MgInputPassword {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: Handler;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputPasswordElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.valueChange.emit(newValue);\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop?: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder?: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputPassword['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputPassword['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputPassword['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--password']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Indicates if password is displayed or not\n */\n @State() displayPassword = false;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputPasswordElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputPasswordElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputPassword['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-password> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-password> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputPassword['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Toggle display-pasword value\n */\n private toggleDisplayPassword = (): void => {\n this.displayPassword = !this.displayPassword;\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n this.watchMgWidth(this.mgWidth);\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonlyValue={this.value !== undefined ? '•'.repeat(this.value.length) : undefined}\n tooltip={this.tooltip}\n tooltipPosition={this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n <span class=\"mg-c-input__input-group\">\n <input\n type={this.displayPassword ? 'text' : 'password'}\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <mg-button\n label={this.messages.input.password[this.displayPassword ? 'hide' : 'display']}\n disabled={this.disabled}\n variant=\"flat\"\n class=\"mg-c-input__append-button\"\n is-icon\n onClick={this.toggleDisplayPassword}\n aria-controls={this.identifier}\n >\n <mg-icon icon={this.displayPassword ? 'eye-slash' : 'eye'}></mg-icon>\n </mg-button>\n </span>\n </mg-input>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"mg-input-password.js","sourceRoot":"","sources":["../../../../../src/components/molecules/inputs/mg-input-password/mg-input-password.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,O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AAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,GAAY,CAC1F,CACP,CACE,CACZ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, h, Prop, EventEmitter, State, Method, Watch } from '@stencil/core';\nimport { ClassList, isValidString } from '@mgdis/stencil-helpers';\nimport { type TooltipPosition, type Width, Handler, classReadonly, classDisabled, widths } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-password',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-password.css',\n shadow: true,\n})\nexport class MgInputPassword {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: Handler;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputPasswordElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.valueChange.emit(newValue);\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop?: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder?: string;\n\n /**\n * Input max length\n */\n @Prop() maxlength;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputPassword['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputPassword['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputPassword['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--password']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Indicates if password is displayed or not\n */\n @State() displayPassword = false;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputPasswordElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputPasswordElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputPassword['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-password> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-password> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputPassword['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Toggle display-pasword value\n */\n private toggleDisplayPassword = (): void => {\n this.displayPassword = !this.displayPassword;\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n this.watchMgWidth(this.mgWidth);\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonlyValue={this.value !== undefined ? '•'.repeat(this.value.length) : undefined}\n tooltip={this.tooltip}\n tooltipPosition={this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n <span class=\"mg-c-input__input-group\">\n <input\n type={this.displayPassword ? 'text' : 'password'}\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n maxlength={this.maxlength}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <mg-button\n label={this.messages.input.password[this.displayPassword ? 'hide' : 'display']}\n disabled={this.disabled}\n variant=\"flat\"\n class=\"mg-c-input__append-button\"\n is-icon\n onClick={this.toggleDisplayPassword}\n aria-controls={this.identifier}\n >\n <mg-icon class=\"mg-c-input__input-icon\" icon={this.displayPassword ? 'eye-slash' : 'eye'}></mg-icon>\n </mg-button>\n </span>\n </mg-input>\n );\n }\n}\n"]}
@@ -92,7 +92,7 @@ export class MgMenu {
92
92
  this.isChildMenu = undefined;
93
93
  }
94
94
  validateLabel(newValue) {
95
- if (newValue === undefined) {
95
+ if (newValue === undefined && !this.element.getAttribute('aria-label')) {
96
96
  throw new Error(`<${this.name}> prop "label" is required.`);
97
97
  }
98
98
  }
@@ -158,7 +158,7 @@ export class MgMenu {
158
158
  * @returns HTML Element
159
159
  */
160
160
  render() {
161
- return (h(Host, { key: 'a29897d754b7cbb34cc8d63b5ecb025c0d252e12', role: "list", "aria-label": this.label }, h("slot", { key: '7fc9dbd765f529e17f0c7ca2012d1b6bf86a05d9' })));
161
+ return (h(Host, { key: '6c8e16630693e660ad5065b92ca682843d628e01', role: "list", "aria-label": this.label }, h("slot", { key: 'dc53a12c2e6dfbe4246668697908372b83440fc7' })));
162
162
  }
163
163
  static get is() { return "mg-menu"; }
164
164
  static get encapsulation() { return "shadow"; }
@@ -186,7 +186,7 @@ export class MgMenu {
186
186
  "optional": false,
187
187
  "docs": {
188
188
  "tags": [],
189
- "text": "Menu label. Include short menu description.\nRequired for accessibility"
189
+ "text": "Menu label. Include short menu description.\nRequired to define accessibility required attribute `aria-label`"
190
190
  },
191
191
  "attribute": "label",
192
192
  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AE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM,gBAAa,IAAI,CAAC,KAAK;YACtC,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Element, Watch, Host } from '@stencil/core';\nimport { Direction, sizes } from './mg-menu.conf';\nimport type { MenuSizeType, ItemMoreType } from './mg-menu.conf';\n\n/**\n * @slot - Menu content\n */\n@Component({\n tag: 'mg-menu',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-menu.css',\n shadow: true,\n})\nexport class MgMenu {\n /************\n * Internal *\n ************/\n\n private readonly name = 'mg-menu';\n private menuItems: HTMLMgMenuItemElement[] = [];\n private focusedMenuItem = 0;\n private itemMoreElement: HTMLMgItemMoreElement;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgMenuElement;\n\n /**\n * Menu label. Include short menu description.\n * Required for accessibility\n */\n @Prop() label!: string;\n @Watch('label')\n validateLabel(newValue: MgMenu['label']): void {\n if (newValue === undefined) {\n throw new Error(`<${this.name}> prop \"label\" is required.`);\n }\n }\n\n /**\n * Component display direction.\n */\n @Prop({ reflect: true }) direction: Direction = Direction.HORIZONTAL;\n @Watch('direction')\n validateDirection(newValue: MgMenu['direction']): void {\n if (![Direction.VERTICAL, Direction.HORIZONTAL].includes(newValue)) {\n throw new Error(`<${this.name}> prop \"direction\" must be one of: ${Direction.HORIZONTAL}, ${Direction.VERTICAL}.`);\n }\n }\n\n /**\n * Customize \"mg-item-more\" element\n * Used with direction: 'vertical' to manage overflow\n */\n @Prop() itemmore?: ItemMoreType;\n @Watch('itemmore')\n validateItemMore(newValue: MgMenu['itemmore']): void {\n if (newValue !== undefined && this.direction !== Direction.HORIZONTAL) {\n throw new Error(`<${this.name}> prop \"itemmore\" must be paired with direction ${Direction.HORIZONTAL}.`);\n } else if (newValue) {\n this.renderMgItemMore();\n }\n }\n\n /**\n * Define mg-menu size\n */\n @Prop() size: MenuSizeType = 'regular';\n @Watch('size')\n validateSize(newValue: MgMenu['size']): void {\n if (!sizes.includes(newValue)) {\n throw new Error(`<${this.name}> prop \"size\" must be one of: ${sizes.join(', ')}.`);\n }\n }\n\n /**\n * is this menu a child menu. Used for conditional render.\n */\n @State() isChildMenu: boolean;\n\n /*************\n * Methods *\n *************/\n\n /**\n * Close matching menu-item\n * @param item - menu-item to close\n * @param condition - addionnal condition\n */\n private closeMenuItem = (item: HTMLMgMenuItemElement, condition: boolean): void => {\n if (!this.isChildMenu && condition) {\n item.expanded = false;\n }\n };\n\n /**\n * get mg-item-more child mg-menu-item element\n * @returns mg-menu-item element\n */\n private getItemMoreMenuItem = (): HTMLMgMenuItemElement => this.itemMoreElement?.shadowRoot?.querySelector('mg-menu-item');\n\n /**\n * Set item listend\n * @param item - mg-menu-item element\n * @param index - number\n */\n private setItemListener = (item: HTMLMgMenuItemElement, index: MgMenu['focusedMenuItem']): void => {\n ['click', 'focus'].forEach(trigger => {\n item.shadowRoot.querySelector('button,a').addEventListener(trigger, () => {\n this.focusedMenuItem = index;\n // reset expanded on previous active menu item\n (this.getItemMoreMenuItem() ? [...this.menuItems, this.getItemMoreMenuItem()] : this.menuItems).forEach((item, index) => {\n this.closeMenuItem(item, index !== this.focusedMenuItem);\n });\n });\n });\n };\n\n /**\n * Store menu-items on component init and add listeners\n */\n private initMenuItemsListeners = (): void => {\n // add listeners on menu item and edit index\n this.menuItems.forEach((item, index) => {\n this.setItemListener(item, index);\n });\n };\n\n /**\n * Handle item-loaded event on mg-item-more element\n */\n private handleItemLoaded = (): void => {\n this.setItemListener(this.getItemMoreMenuItem(), this.menuItems.length);\n };\n\n /**\n * render mg-item-more\n */\n private renderMgItemMore = (): void => {\n if (this.direction !== Direction.HORIZONTAL || this.isChildMenu || this.element.children.length <= 1) {\n return;\n }\n\n // Insert mg-item-more outside the mg-menu shadowdom\n if (!this.itemMoreElement) {\n this.itemMoreElement = document.createElement('mg-item-more');\n this.itemMoreElement.addEventListener('item-loaded', this.handleItemLoaded);\n this.element.appendChild(this.itemMoreElement);\n }\n\n // update mg-item-more props\n for (const attribute in this.itemmore) {\n const newValue = this.itemmore[attribute];\n // to improve rendering we use HTML attributes as much as possible\n if (['string', 'number'].includes(typeof newValue)) {\n this.itemMoreElement.setAttribute(attribute, newValue);\n } else {\n this.itemMoreElement[attribute] = newValue;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Validate props\n */\n componentWillLoad(): void {\n this.validateDirection(this.direction);\n this.validateLabel(this.label);\n this.validateItemMore(this.itemmore);\n this.validateSize(this.size);\n }\n\n /**\n * Check if component slots configuration\n * @returns timeout\n */\n componentDidLoad(): ReturnType<typeof setTimeout> {\n // update props and states after componentDidLoad hook\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n // store all menu-items\n this.menuItems = Array.from(this.element.children).filter(child => child.nodeName === 'MG-MENU-ITEM') as HTMLMgMenuItemElement[];\n this.isChildMenu = this.element.closest('mg-menu-item') !== null;\n\n // add mg-item-more to manage OverflowBehavior\n // when all props, states and DOM are already rendered we can render the mg-item-more\n this.renderMgItemMore();\n // then use mutation observer on children to improve reactivity\n new MutationObserver(() => {\n this.renderMgItemMore();\n }).observe(this.element, { childList: true });\n });\n }\n\n /**\n * Add listeners to items\n */\n componentDidRender(): void {\n this.initMenuItemsListeners();\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role=\"list\" aria-label={this.label}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"mg-menu.js","sourceRoot":"","sources":["../../../../../src/components/molecules/menu/mg-menu/mg-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AAMH,MAAM,OAAO,MAAM;;QACjB;;sBAEc;QAEG,SAAI,GAAG,SAAS,CAAC;QAC1B,cAAS,GAA4B,EAAE,CAAC;QACxC,oBAAe,GAAG,CAAC,CAAC;QAiE5B;;uBAEe;QAEf;;;;WAIG;QACK,kBAAa,GAAG,CAAC,IAA2B,EAAE,SAAkB,EAAQ,EAAE;YAChF,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,SAAS,EAAE,CAAC;gBACnC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACxB,CAAC;QACH,CAAC,CAAC;QAEF;;;WAGG;QACK,wBAAmB,GAAG,GAA0B,EAAE,eAAC,OAAA,MAAA,MAAA,IAAI,CAAC,eAAe,0CAAE,UAAU,0CAAE,aAAa,CAAC,cAAc,CAAC,CAAA,EAAA,CAAC;QAE3H;;;;WAIG;QACK,oBAAe,GAAG,CAAC,IAA2B,EAAE,KAAgC,EAAQ,EAAE;YAChG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;gBACnC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;oBACvE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;oBAC7B,8CAA8C;oBAC9C,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC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CAAC,GAAG,EAAE;gBACxB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM,gBAAa,IAAI,CAAC,KAAK;YACtC,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Element, Watch, Host } from '@stencil/core';\nimport { Direction, sizes } from './mg-menu.conf';\nimport type { MenuSizeType, ItemMoreType } from './mg-menu.conf';\n\n/**\n * @slot - Menu content\n */\n@Component({\n tag: 'mg-menu',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-menu.css',\n shadow: true,\n})\nexport class MgMenu {\n /************\n * Internal *\n ************/\n\n private readonly name = 'mg-menu';\n private menuItems: HTMLMgMenuItemElement[] = [];\n private focusedMenuItem = 0;\n private itemMoreElement: HTMLMgItemMoreElement;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgMenuElement;\n\n /**\n * Menu label. Include short menu description.\n * Required to define accessibility required attribute `aria-label`\n */\n @Prop() label!: string;\n @Watch('label')\n validateLabel(newValue: MgMenu['label']): void {\n if (newValue === undefined && !this.element.getAttribute('aria-label')) {\n throw new Error(`<${this.name}> prop \"label\" is required.`);\n }\n }\n\n /**\n * Component display direction.\n */\n @Prop({ reflect: true }) direction: Direction = Direction.HORIZONTAL;\n @Watch('direction')\n validateDirection(newValue: MgMenu['direction']): void {\n if (![Direction.VERTICAL, Direction.HORIZONTAL].includes(newValue)) {\n throw new Error(`<${this.name}> prop \"direction\" must be one of: ${Direction.HORIZONTAL}, ${Direction.VERTICAL}.`);\n }\n }\n\n /**\n * Customize \"mg-item-more\" element\n * Used with direction: 'vertical' to manage overflow\n */\n @Prop() itemmore?: ItemMoreType;\n @Watch('itemmore')\n validateItemMore(newValue: MgMenu['itemmore']): void {\n if (newValue !== undefined && this.direction !== Direction.HORIZONTAL) {\n throw new Error(`<${this.name}> prop \"itemmore\" must be paired with direction ${Direction.HORIZONTAL}.`);\n } else if (newValue) {\n this.renderMgItemMore();\n }\n }\n\n /**\n * Define mg-menu size\n */\n @Prop() size: MenuSizeType = 'regular';\n @Watch('size')\n validateSize(newValue: MgMenu['size']): void {\n if (!sizes.includes(newValue)) {\n throw new Error(`<${this.name}> prop \"size\" must be one of: ${sizes.join(', ')}.`);\n }\n }\n\n /**\n * is this menu a child menu. Used for conditional render.\n */\n @State() isChildMenu: boolean;\n\n /*************\n * Methods *\n *************/\n\n /**\n * Close matching menu-item\n * @param item - menu-item to close\n * @param condition - addionnal condition\n */\n private closeMenuItem = (item: HTMLMgMenuItemElement, condition: boolean): void => {\n if (!this.isChildMenu && condition) {\n item.expanded = false;\n }\n };\n\n /**\n * get mg-item-more child mg-menu-item element\n * @returns mg-menu-item element\n */\n private getItemMoreMenuItem = (): HTMLMgMenuItemElement => this.itemMoreElement?.shadowRoot?.querySelector('mg-menu-item');\n\n /**\n * Set item listend\n * @param item - mg-menu-item element\n * @param index - number\n */\n private setItemListener = (item: HTMLMgMenuItemElement, index: MgMenu['focusedMenuItem']): void => {\n ['click', 'focus'].forEach(trigger => {\n item.shadowRoot.querySelector('button,a').addEventListener(trigger, () => {\n this.focusedMenuItem = index;\n // reset expanded on previous active menu item\n (this.getItemMoreMenuItem() ? [...this.menuItems, this.getItemMoreMenuItem()] : this.menuItems).forEach((item, index) => {\n this.closeMenuItem(item, index !== this.focusedMenuItem);\n });\n });\n });\n };\n\n /**\n * Store menu-items on component init and add listeners\n */\n private initMenuItemsListeners = (): void => {\n // add listeners on menu item and edit index\n this.menuItems.forEach((item, index) => {\n this.setItemListener(item, index);\n });\n };\n\n /**\n * Handle item-loaded event on mg-item-more element\n */\n private handleItemLoaded = (): void => {\n this.setItemListener(this.getItemMoreMenuItem(), this.menuItems.length);\n };\n\n /**\n * render mg-item-more\n */\n private renderMgItemMore = (): void => {\n if (this.direction !== Direction.HORIZONTAL || this.isChildMenu || this.element.children.length <= 1) {\n return;\n }\n\n // Insert mg-item-more outside the mg-menu shadowdom\n if (!this.itemMoreElement) {\n this.itemMoreElement = document.createElement('mg-item-more');\n this.itemMoreElement.addEventListener('item-loaded', this.handleItemLoaded);\n this.element.appendChild(this.itemMoreElement);\n }\n\n // update mg-item-more props\n for (const attribute in this.itemmore) {\n const newValue = this.itemmore[attribute];\n // to improve rendering we use HTML attributes as much as possible\n if (['string', 'number'].includes(typeof newValue)) {\n this.itemMoreElement.setAttribute(attribute, newValue);\n } else {\n this.itemMoreElement[attribute] = newValue;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Validate props\n */\n componentWillLoad(): void {\n this.validateDirection(this.direction);\n this.validateLabel(this.label);\n this.validateItemMore(this.itemmore);\n this.validateSize(this.size);\n }\n\n /**\n * Check if component slots configuration\n * @returns timeout\n */\n componentDidLoad(): ReturnType<typeof setTimeout> {\n // update props and states after componentDidLoad hook\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n // store all menu-items\n this.menuItems = Array.from(this.element.children).filter(child => child.nodeName === 'MG-MENU-ITEM') as HTMLMgMenuItemElement[];\n this.isChildMenu = this.element.closest('mg-menu-item') !== null;\n\n // add mg-item-more to manage OverflowBehavior\n // when all props, states and DOM are already rendered we can render the mg-item-more\n this.renderMgItemMore();\n // then use mutation observer on children to improve reactivity\n new MutationObserver(() => {\n this.renderMgItemMore();\n }).observe(this.element, { childList: true });\n });\n }\n\n /**\n * Add listeners to items\n */\n componentDidRender(): void {\n this.initMenuItemsListeners();\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role=\"list\" aria-label={this.label}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
@@ -259,13 +259,13 @@ export class MgMenuItem {
259
259
  this.updateStatus([Status.ACTIVE]);
260
260
  this.updateDisplayNotificationBadge();
261
261
  this.updatePopoverGuard();
262
- // manage child dom changes with mutationObserver and listzners
262
+ // manage child dom changes with mutationObserver and listners
263
263
  this.initListeners();
264
264
  // emit loaded event when component is fully loaded
265
265
  this.itemLoaded.emit();
266
266
  new MutationObserver(mutationsList => {
267
267
  if (mutationsList.some(mutation => mutation.attributeName === 'hidden'))
268
- this.updateStatus([Status.ACTIVE]);
268
+ this.updateStatus(this.hasChildren ? undefined : [Status.ACTIVE]);
269
269
  if (mutationsList.some(mutation => mutation.type === 'characterData'))
270
270
  this.validateSlot();
271
271
  this.updateDisplayNotificationBadge();
@@ -304,7 +304,7 @@ export class MgMenuItem {
304
304
  ['mg-c-menu-item__collapse-container']: true,
305
305
  ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),
306
306
  });
307
- return (h(Host, { key: '10b41e1b90d01a0f0df082cd9fc50884e87c2e59', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier(), "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
307
+ return (h(Host, { key: '60370b187c28dfd2f0a070b3d21ff4447f6bd1c6', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier(), "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
308
308
  }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
309
309
  this.renderInteractiveElement(),
310
310
  h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
@@ -339,7 +339,7 @@ export class MgMenuItem {
339
339
  "text": "Identifier is used to control mg-popover"
340
340
  },
341
341
  "attribute": "identifier",
342
- "reflect": false,
342
+ "reflect": true,
343
343
  "defaultValue": "createID('mg-menu-item')"
344
344
  },
345
345
  "href": {
@@ -1 +1 @@
1
- {"version":3,"file":"mg-menu-item.js","sourceRoot":"","sources":["../../../../../src/components/molecules/menu/mg-menu-item/mg-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAMtD;;;;;;GAMG;AAMH,MAAM,OAAO,UAAU;;QACrB;;sBAEc;QAEG,SAAI,GAAG,cAAc,CAAC;QACtB,qBAAgB,GAAG,mCAAmC,CAAC;QA+JxE;;oBAEY;QAEZ;;WAEG;QACK,mBAAc,GAAG,GAAS,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC,CAAC;QAEF;;;;;WAKG;QACK,cAAS,GAAG,CAAC,iBAAwC,EAAE,MAA4B,EAAW,EAA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ACxB,SAAS,EAAE,IAAI,sBACG,IAAI,CAAC,oBAAoB,EAC3C,UAAU,EAAE,IAAI,CAAC,oBAAoB,EAAE,6BACf,YAAY,CAAC,yEAAyE;;YAE7G,IAAI,CAAC,wBAAwB,EAAE;YAChC,WAAK,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAC,SAAS,IAC9C,IAAI,CAAC,UAAU,EAAE,CACd,CACK,CACd,CAAC,CAAC,CAAC,CACF;YACE,IAAI,CAAC,wBAAwB,EAAE;YAC/B,WAAK,GAAG,EAAC,oBAAoB,EAAC,KAAK,EAAE,mBAAmB,EAAE,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,IAC/E,IAAI,CAAC,UAAU,EAAE,CACd;SACP,CACF,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Host, Watch, Element, Event, EventEmitter } from '@stencil/core';\nimport { ClassList, createID, isValidString, nextTick } from '@mgdis/stencil-helpers';\nimport { initLocales } from '../../../../locales';\nimport { Direction } from '../mg-menu/mg-menu.conf';\nimport { Status, targets } from './mg-menu-item.conf';\nimport type { MenuSizeType } from '../mg-menu/mg-menu.conf';\nimport type { DirectionType, TargetType } from './mg-menu-item.conf';\nimport type { MgPopover } from '../../mg-popover/mg-popover';\nimport type { MessageType } from '../../../../locales/index.conf';\n\n/**\n * @slot - Menu item content\n * @slot image - Menu item image content\n * @slot label - Menu item label content\n * @slot information - Menu item information content\n * @slot metadata - Menu item metadata content\n */\n@Component({\n tag: 'mg-menu-item',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-menu-item.css',\n shadow: true,\n})\nexport class MgMenuItem {\n /************\n * Internal *\n ************/\n\n private readonly name = 'mg-menu-item';\n private readonly navigationButton = 'mg-c-menu-item__navigation-button';\n private messages: MessageType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgMenuItemElement;\n\n /************\n * Props *\n ************/\n\n /**\n * Identifier is used to control mg-popover\n */\n @Prop() identifier = createID('mg-menu-item');\n\n /**\n * Define menu-item href\n * when defined menu-item contain an anchor instead of button\n */\n @Prop() href?: string;\n\n /**\n * Define target type\n */\n @Prop() target?: TargetType;\n @Watch('target')\n watchTarget(newValue: MgMenuItem['target']): void {\n if (newValue && !targets.includes(newValue)) {\n throw new Error(`<mg-link> prop \"target\" must be one of: ${targets.join(', ')}`);\n }\n }\n\n /**\n * Define menu-item status.\n */\n @Prop({ reflect: true, mutable: true }) status?: Status = Status.VISIBLE;\n @Watch('status')\n validateStatus(newValue: MgMenuItem['status'], oldValue?: MgMenuItem['status']): void {\n if (oldValue !== undefined) {\n this.navigationButtonClassList.delete(`${this.navigationButton}--${oldValue}`);\n }\n this.navigationButtonClassList.add(`${this.navigationButton}--${newValue}`);\n this.statusChange.emit(newValue);\n }\n\n /**\n * Define menu-item content expanded.\n */\n @Prop({ mutable: true }) expanded? = false;\n @Watch('expanded')\n validateExpanded(newValue: MgMenuItem['expanded']): void {\n if (typeof newValue !== 'boolean') throw new Error(`<${this.name}> prop \"expanded\" must be a boolean.`);\n\n // if menu-item has sub-menu we have to apply some updates:\n if (this.hasChildren) {\n const subItems = Array.from(this.element.querySelectorAll(this.name));\n if (!newValue) {\n // - when main menu item is NOT expanded we need NOT expanded sub-items and NOT expanded sub-content\n subItems.forEach(item => {\n item.expanded = false;\n });\n } else if (this.element.querySelector(`${this.name}[status=\"${Status.ACTIVE}\"]`) !== null) {\n // - when expanded and contain an active item parents are expended too\n subItems.forEach(item => {\n if (this.hasStatus(item, Status.ACTIVE)) {\n item.expanded = true;\n }\n });\n }\n }\n }\n\n /**********\n * Events *\n *********/\n\n /**\n * Emited event when status change\n */\n @Event({ eventName: 'status-change' }) statusChange: EventEmitter<HTMLMgMenuItemElement['status']>;\n\n /**\n * Emited event when item is loaded\n */\n @Event({ eventName: 'item-loaded' }) itemLoaded: EventEmitter<void>;\n\n /**\n * Emited event when item is updated\n */\n @Event({ eventName: 'item-updated' }) itemUpdated: EventEmitter<void>;\n\n /**********\n * States *\n *********/\n\n /**\n * Define menu-item size.\n */\n @State() size: MenuSizeType = 'regular';\n @Watch('size')\n validateSize(newValue: MgMenuItem['size'], oldValue?: MgMenuItem['size']): void {\n this.navigationButtonClassList.delete(`${this.navigationButton}--size-${oldValue}`);\n this.navigationButtonClassList.add(`${this.navigationButton}--size-${newValue}`);\n }\n\n /**\n * Component button classes\n */\n @State() navigationButtonClassList: ClassList = new ClassList([this.navigationButton]);\n\n /**\n * Parent menu direction\n */\n @State() direction: DirectionType;\n @Watch('direction')\n validateDirection(newValue: MgMenuItem['direction']): void {\n // manage menu items style depending to parent menu horientation\n this.element.setAttribute('data-style-direction', newValue);\n this.navigationButtonClassList.add(`${this.navigationButton}--${newValue}`);\n // manage all sub levels child menu-items level with data-level attribut\n if (this.isDirection(Direction.VERTICAL, newValue)) {\n Array.from(this.element.querySelectorAll('mg-menu-item')).forEach(item => {\n item.dataset.level = `${(Number(item.dataset.level) || 1) + 1}`;\n });\n }\n }\n\n /**\n * Does component is in main menu\n */\n @State() isInMainMenu: boolean;\n\n /**\n * Does element is item-more\n */\n @State() isItemMore: boolean;\n\n /**\n * Does component have children.\n */\n @State() hasChildren = false;\n @Watch('hasChildren')\n validateHasChildren(newValue: boolean): void {\n if (newValue && this.element.href !== undefined) {\n throw new Error(`<${this.name}> prop \"href\" is unauthorizied when element is a parent.`);\n }\n }\n\n /**\n * Does component should display notification badge.\n */\n @State() displayNotificationBadge: boolean;\n\n /***********\n * Methods *\n **********/\n\n /**\n * Toggle expanded prop value\n */\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n };\n\n /**\n * Does an Element have given Status\n * @param mgMenuItemElement - to parse\n * @param status - to check\n * @returns true if element with status is found\n */\n private hasStatus = (mgMenuItemElement: HTMLMgMenuItemElement, status: MgMenuItem['status']): boolean => mgMenuItemElement.status === status;\n\n /**\n * Is component contextual direction match the given direction\n * @param direction - in parent menu\n * @param compareWith - direction to compare with. Default: `this.direction`\n * @returns true is direction match the direction propertie\n */\n private isDirection = (direction: MgMenuItem['direction'], compareWith = this.direction): boolean => direction === compareWith;\n\n /**\n * Update displayNotificationBadge\n * current component notification badge have priority over the slot badge when submenu contain badge\n */\n private updateDisplayNotificationBadge = (): void => {\n const childMenu = this.element.querySelector('mg-menu');\n this.displayNotificationBadge =\n childMenu !== null &&\n Array.from(childMenu.children).some((subItem: HTMLMgMenuItemElement) => subItem.querySelector('mg-badge') !== null && subItem.getAttribute('hidden') === null);\n };\n\n /**\n * Method to control if one of component children have active status\n * @returns truthy if component has active child\n */\n private hasActiveChild = (): boolean =>\n Array.from(this.element.querySelector('mg-menu')?.children || []).some(\n (element: HTMLMgMenuItemElement) => element.nodeName === 'MG-MENU-ITEM' && this.hasStatus(element, Status.ACTIVE) && element.getAttribute('hidden') === null,\n );\n\n /**\n * Validate slots\n * @param guard - prevent action with guard. Default: false.\n */\n private validateSlot = (guard = false): void => {\n // slot title AND metadata validation\n // add title on label AND metada slots due to text-overflow on these element\n if (Array.from(this.element.children).find(child => child.getAttribute('slot') === 'label') === undefined) throw new Error(`<${this.name}> slot \"label\" is required.`);\n ['label', 'metadata'].forEach(slot => {\n Array.from(this.element.querySelectorAll(`[slot=\"${slot}\"]`)).forEach(element => {\n if (!isValidString(element.textContent)) throw new Error(`<${this.name}> slot \"${slot}\" must have text content.`);\n if ((guard && element.getAttribute('title') === null) || !guard) element.setAttribute('title', element.textContent);\n });\n });\n };\n\n /**\n * Update status\n * @param guard - status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].\n */\n private updateStatus = (guard = []): void => {\n if (![Status.HIDDEN, Status.DISABLED, ...guard].includes(this.status)) {\n this.status = this.hasActiveChild() ? Status.ACTIVE : Status.VISIBLE;\n }\n };\n\n /**\n * Init event-listeners\n */\n private initListeners = (): void => {\n // manage first sub-level menu-items\n Array.from(this.element.querySelector('mg-menu')?.children || []).forEach(item => {\n if (item.nodeName === 'MG-MENU-ITEM') {\n // manage child menu listener\n item.addEventListener('status-change', () => {\n this.updateStatus();\n });\n }\n });\n };\n\n /**\n * Get mg-popover identifier\n * @returns generated mg-popover identifier\n */\n private getPopoverIdentifier = (): MgPopover['identifier'] => `${this.identifier}-popover`;\n\n /**\n * Render popover clickoutside guard for content slot\n */\n private updatePopoverGuard(): void {\n if (this.displayPopover())\n Array.from(this.element.children)\n .filter((child: HTMLElement) => child.getAttribute('slot') === null && child.nodeName !== 'MG-MENU' && Boolean(child.dataset))\n .forEach((slot: HTMLElement) => (slot.dataset.mgPopoverGuard = this.getPopoverIdentifier()));\n }\n\n /**\n * Condition to know if component should display a mg-popover\n * @returns truthy if component display popover\n */\n private displayPopover = (): boolean => this.isDirection(Direction.HORIZONTAL) && this.hasChildren && this.href === undefined;\n\n /************\n * Handlers *\n ************/\n\n /**\n * Handle interacrtive element click\n * @param event - click on element\n */\n private handleElementCLick = (event: MouseEvent): void => {\n if ((this.hasChildren && !this.isInMainMenu) || this.status === Status.DISABLED) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // toggle expanded when mg-menu-item has child items\n if (this.hasChildren) this.toggleExpanded();\n };\n\n /**\n * Handle popover element display-change event\n * @param event - popover display event\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.expanded = event.detail;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Validate props\n */\n componentWillLoad(): void {\n // has children items that is NOT [slot='image' | 'information' | 'label' | 'metadata'] element\n // we store only matching elements\n this.hasChildren = Array.from(this.element.children).some(child => !['image', 'information', 'label', 'metadata'].includes(child.getAttribute('slot')));\n this.messages = initLocales(this.element).messages.menuItem as MessageType;\n this.isItemMore = this.element.dataset.overflowMore !== undefined;\n\n // Validate props\n this.validateStatus(this.status);\n this.validateExpanded(this.expanded);\n this.watchTarget(this.target);\n\n // Validate states\n this.validateSize(this.size);\n }\n\n /**\n * Check if component slots configuration\n * @returns timeout\n */\n componentDidLoad(): ReturnType<typeof setTimeout> {\n // validation\n this.validateSlot(true);\n\n // update props and states after componentDidLoad hook\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n // define menu-item context states\n const menu = this.element.closest('mg-menu');\n this.direction = this.isItemMore || menu === null ? Direction.HORIZONTAL : menu.direction;\n this.isInMainMenu = menu !== null && this.element.parentElement.closest('mg-menu-item') === null;\n if (menu?.size !== undefined) this.size = menu.size;\n\n if (this.isItemMore) this.size = this.element.dataset.size as MgMenuItem['size'];\n\n // when main menu item contain an active item it will get the active style\n // AND if item is in vertical menu it will be expanded\n if (this.hasActiveChild() && this.isInMainMenu) this.expanded = this.isDirection(Direction.VERTICAL);\n\n this.updateStatus([Status.ACTIVE]);\n this.updateDisplayNotificationBadge();\n this.updatePopoverGuard();\n\n // manage child dom changes with mutationObserver and listzners\n this.initListeners();\n\n // emit loaded event when component is fully loaded\n this.itemLoaded.emit();\n\n new MutationObserver(mutationsList => {\n if (mutationsList.some(mutation => mutation.attributeName === 'hidden')) this.updateStatus([Status.ACTIVE]);\n if (mutationsList.some(mutation => mutation.type === 'characterData')) this.validateSlot();\n this.updateDisplayNotificationBadge();\n this.itemUpdated.emit();\n }).observe(this.element, { attributes: true, childList: true, characterData: true, subtree: true });\n }, 0);\n }\n\n /**\n * Render ineractive element\n * @returns HTML Element\n */\n private renderInteractiveElement(): HTMLElement {\n const TagName: string = this.href !== undefined ? 'a' : 'button';\n return (\n <TagName\n href={this.href}\n class={this.navigationButtonClassList.join()}\n tabindex={[Status.DISABLED, Status.HIDDEN].includes(this.status) ? -1 : undefined}\n disabled={this.status === Status.DISABLED}\n hidden={this.status === Status.HIDDEN}\n target={this.href && this.target ? this.target : undefined}\n aria-expanded={this.hasChildren && this.expanded.toString()}\n aria-current={this.status === Status.ACTIVE && 'page'}\n onClick={this.handleElementCLick}\n >\n <slot name=\"image\"></slot>\n <div class={`${this.navigationButton}-center`}>\n <div class={`${this.navigationButton}-text-content`}>\n <slot name=\"label\"></slot>\n {!this.displayNotificationBadge && <slot name=\"information\"></slot>}\n {this.displayNotificationBadge && (\n <span class={`${this.navigationButton}-text-content-notification`}>\n <mg-badge label={this.messages.badgeLabel} value=\"!\" variant=\"text-color\" slot=\"information\"></mg-badge>\n </span>\n )}\n {this.target === '_blank' && [\n <mg-icon key=\"icon-new-tab\" class={`${this.navigationButton}-new-tab`} icon=\"arrow-up-right-square\"></mg-icon>,\n <span key=\"a11y-new-tab\" class=\"mg-u-visually-hidden\">\n {this.messages.openNewTab}\n </span>,\n ]}\n </div>\n {this.size !== 'regular' && <slot name=\"metadata\"></slot>}\n </div>\n {this.hasChildren && this.href === undefined && (\n <span\n class={{\n [`${this.navigationButton}-chevron`]: true,\n [`${this.navigationButton}-chevron--rotate`]: this.expanded === true,\n }}\n >\n <mg-icon icon=\"chevron-down\" size=\"small\"></mg-icon>\n </span>\n )}\n </TagName>\n );\n }\n\n /**\n * Render slot\n * @returns HTML Element\n */\n private renderSlot = (): HTMLElement => <slot></slot>;\n\n /**\n * Emit event when component is updated\n */\n componentShouldUpdate(): Promise<void> {\n return nextTick(() => {\n this.itemUpdated.emit();\n });\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const getContainerClasses = () => ({\n ['mg-c-menu-item__collapse-container']: true,\n ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),\n });\n\n return (\n <Host role={this.isItemMore ? 'presentation' : 'listitem'}>\n {this.displayPopover() ? (\n <mg-popover\n display={this.expanded}\n placement=\"bottom-start\"\n arrowHide={true}\n onDisplay-change={this.handlePopoverDisplay}\n identifier={this.getPopoverIdentifier()}\n data-fallback-placement=\"bottom-end\" // use for the last element of the menu if it is placed on the right side\n >\n {this.renderInteractiveElement()}\n <div class={getContainerClasses()} slot=\"content\">\n {this.renderSlot()}\n </div>\n </mg-popover>\n ) : (\n [\n this.renderInteractiveElement(),\n <div key=\"vertical-container\" class={getContainerClasses()} hidden={!this.expanded}>\n {this.renderSlot()}\n </div>,\n ]\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"mg-menu-item.js","sourceRoot":"","sources":["../../../../../src/components/molecules/menu/mg-menu-item/mg-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAMtD;;;;;;GAMG;AAMH,MAAM,OAAO,UAAU;;QACrB;;sBAEc;QAEG,SAAI,GAAG,cAAc,CAAC;QACtB,qBAAgB,GAAG,mCAAmC,CAAC;QA+JxE;;oBAEY;QAEZ;;WAEG;QACK,mBAAc,GAAG,GAAS,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC,CAAC;QAEF;;;;;WAKG;QACK,cAAS,GAAG,CAAC,iBAAwC,EAAE,MAA4B,EAAW,EAAE,CAAC,iBAAiB,CAAC,MAAM,KAAK,MAAM,CAAC;QAE7I;;;;;WAKG;QACK,gBAAW,GAAG,CAAC,SAAkC,EAAE,WAAW,G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,EAC3C,UAAU,EAAE,IAAI,CAAC,oBAAoB,EAAE,6BACf,YAAY,CAAC,yEAAyE;;YAE7G,IAAI,CAAC,wBAAwB,EAAE;YAChC,WAAK,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAC,SAAS,IAC9C,IAAI,CAAC,UAAU,EAAE,CACd,CACK,CACd,CAAC,CAAC,CAAC,CACF;YACE,IAAI,CAAC,wBAAwB,EAAE;YAC/B,WAAK,GAAG,EAAC,oBAAoB,EAAC,KAAK,EAAE,mBAAmB,EAAE,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,IAC/E,IAAI,CAAC,UAAU,EAAE,CACd;SACP,CACF,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Host, Watch, Element, Event, EventEmitter } from '@stencil/core';\nimport { ClassList, createID, isValidString, nextTick } from '@mgdis/stencil-helpers';\nimport { initLocales } from '../../../../locales';\nimport { Direction } from '../mg-menu/mg-menu.conf';\nimport { Status, targets } from './mg-menu-item.conf';\nimport type { MenuSizeType } from '../mg-menu/mg-menu.conf';\nimport type { DirectionType, TargetType } from './mg-menu-item.conf';\nimport type { MgPopover } from '../../mg-popover/mg-popover';\nimport type { MessageType } from '../../../../locales/index.conf';\n\n/**\n * @slot - Menu item content\n * @slot image - Menu item image content\n * @slot label - Menu item label content\n * @slot information - Menu item information content\n * @slot metadata - Menu item metadata content\n */\n@Component({\n tag: 'mg-menu-item',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-menu-item.css',\n shadow: true,\n})\nexport class MgMenuItem {\n /************\n * Internal *\n ************/\n\n private readonly name = 'mg-menu-item';\n private readonly navigationButton = 'mg-c-menu-item__navigation-button';\n private messages: MessageType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgMenuItemElement;\n\n /************\n * Props *\n ************/\n\n /**\n * Identifier is used to control mg-popover\n */\n @Prop({ reflect: true }) identifier = createID('mg-menu-item');\n\n /**\n * Define menu-item href\n * when defined menu-item contain an anchor instead of button\n */\n @Prop() href?: string;\n\n /**\n * Define target type\n */\n @Prop() target?: TargetType;\n @Watch('target')\n watchTarget(newValue: MgMenuItem['target']): void {\n if (newValue && !targets.includes(newValue)) {\n throw new Error(`<mg-link> prop \"target\" must be one of: ${targets.join(', ')}`);\n }\n }\n\n /**\n * Define menu-item status.\n */\n @Prop({ reflect: true, mutable: true }) status?: Status = Status.VISIBLE;\n @Watch('status')\n validateStatus(newValue: MgMenuItem['status'], oldValue?: MgMenuItem['status']): void {\n if (oldValue !== undefined) {\n this.navigationButtonClassList.delete(`${this.navigationButton}--${oldValue}`);\n }\n this.navigationButtonClassList.add(`${this.navigationButton}--${newValue}`);\n this.statusChange.emit(newValue);\n }\n\n /**\n * Define menu-item content expanded.\n */\n @Prop({ mutable: true }) expanded? = false;\n @Watch('expanded')\n validateExpanded(newValue: MgMenuItem['expanded']): void {\n if (typeof newValue !== 'boolean') throw new Error(`<${this.name}> prop \"expanded\" must be a boolean.`);\n\n // if menu-item has sub-menu we have to apply some updates:\n if (this.hasChildren) {\n const subItems = Array.from(this.element.querySelectorAll(this.name));\n if (!newValue) {\n // - when main menu item is NOT expanded we need NOT expanded sub-items and NOT expanded sub-content\n subItems.forEach(item => {\n item.expanded = false;\n });\n } else if (this.element.querySelector(`${this.name}[status=\"${Status.ACTIVE}\"]`) !== null) {\n // - when expanded and contain an active item parents are expended too\n subItems.forEach(item => {\n if (this.hasStatus(item, Status.ACTIVE)) {\n item.expanded = true;\n }\n });\n }\n }\n }\n\n /**********\n * Events *\n *********/\n\n /**\n * Emited event when status change\n */\n @Event({ eventName: 'status-change' }) statusChange: EventEmitter<HTMLMgMenuItemElement['status']>;\n\n /**\n * Emited event when item is loaded\n */\n @Event({ eventName: 'item-loaded' }) itemLoaded: EventEmitter<void>;\n\n /**\n * Emited event when item is updated\n */\n @Event({ eventName: 'item-updated' }) itemUpdated: EventEmitter<void>;\n\n /**********\n * States *\n *********/\n\n /**\n * Define menu-item size.\n */\n @State() size: MenuSizeType = 'regular';\n @Watch('size')\n validateSize(newValue: MgMenuItem['size'], oldValue?: MgMenuItem['size']): void {\n this.navigationButtonClassList.delete(`${this.navigationButton}--size-${oldValue}`);\n this.navigationButtonClassList.add(`${this.navigationButton}--size-${newValue}`);\n }\n\n /**\n * Component button classes\n */\n @State() navigationButtonClassList: ClassList = new ClassList([this.navigationButton]);\n\n /**\n * Parent menu direction\n */\n @State() direction: DirectionType;\n @Watch('direction')\n validateDirection(newValue: MgMenuItem['direction']): void {\n // manage menu items style depending to parent menu horientation\n this.element.setAttribute('data-style-direction', newValue);\n this.navigationButtonClassList.add(`${this.navigationButton}--${newValue}`);\n // manage all sub levels child menu-items level with data-level attribut\n if (this.isDirection(Direction.VERTICAL, newValue)) {\n Array.from(this.element.querySelectorAll('mg-menu-item')).forEach(item => {\n item.dataset.level = `${(Number(item.dataset.level) || 1) + 1}`;\n });\n }\n }\n\n /**\n * Does component is in main menu\n */\n @State() isInMainMenu: boolean;\n\n /**\n * Does element is item-more\n */\n @State() isItemMore: boolean;\n\n /**\n * Does component have children.\n */\n @State() hasChildren = false;\n @Watch('hasChildren')\n validateHasChildren(newValue: boolean): void {\n if (newValue && this.element.href !== undefined) {\n throw new Error(`<${this.name}> prop \"href\" is unauthorizied when element is a parent.`);\n }\n }\n\n /**\n * Does component should display notification badge.\n */\n @State() displayNotificationBadge: boolean;\n\n /***********\n * Methods *\n **********/\n\n /**\n * Toggle expanded prop value\n */\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n };\n\n /**\n * Does an Element have given Status\n * @param mgMenuItemElement - to parse\n * @param status - to check\n * @returns true if element with status is found\n */\n private hasStatus = (mgMenuItemElement: HTMLMgMenuItemElement, status: MgMenuItem['status']): boolean => mgMenuItemElement.status === status;\n\n /**\n * Is component contextual direction match the given direction\n * @param direction - in parent menu\n * @param compareWith - direction to compare with. Default: `this.direction`\n * @returns true is direction match the direction propertie\n */\n private isDirection = (direction: MgMenuItem['direction'], compareWith = this.direction): boolean => direction === compareWith;\n\n /**\n * Update displayNotificationBadge\n * current component notification badge have priority over the slot badge when submenu contain badge\n */\n private updateDisplayNotificationBadge = (): void => {\n const childMenu = this.element.querySelector('mg-menu');\n this.displayNotificationBadge =\n childMenu !== null &&\n Array.from(childMenu.children).some((subItem: HTMLMgMenuItemElement) => subItem.querySelector('mg-badge') !== null && subItem.getAttribute('hidden') === null);\n };\n\n /**\n * Method to control if one of component children have active status\n * @returns truthy if component has active child\n */\n private hasActiveChild = (): boolean =>\n Array.from(this.element.querySelector('mg-menu')?.children || []).some(\n (element: HTMLMgMenuItemElement) => element.nodeName === 'MG-MENU-ITEM' && this.hasStatus(element, Status.ACTIVE) && element.getAttribute('hidden') === null,\n );\n\n /**\n * Validate slots\n * @param guard - prevent action with guard. Default: false.\n */\n private validateSlot = (guard = false): void => {\n // slot title AND metadata validation\n // add title on label AND metada slots due to text-overflow on these element\n if (Array.from(this.element.children).find(child => child.getAttribute('slot') === 'label') === undefined) throw new Error(`<${this.name}> slot \"label\" is required.`);\n ['label', 'metadata'].forEach(slot => {\n Array.from(this.element.querySelectorAll(`[slot=\"${slot}\"]`)).forEach(element => {\n if (!isValidString(element.textContent)) throw new Error(`<${this.name}> slot \"${slot}\" must have text content.`);\n if ((guard && element.getAttribute('title') === null) || !guard) element.setAttribute('title', element.textContent);\n });\n });\n };\n\n /**\n * Update status\n * @param guard - status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].\n */\n private updateStatus = (guard = []): void => {\n if (![Status.HIDDEN, Status.DISABLED, ...guard].includes(this.status)) {\n this.status = this.hasActiveChild() ? Status.ACTIVE : Status.VISIBLE;\n }\n };\n\n /**\n * Init event-listeners\n */\n private initListeners = (): void => {\n // manage first sub-level menu-items\n Array.from(this.element.querySelector('mg-menu')?.children || []).forEach(item => {\n if (item.nodeName === 'MG-MENU-ITEM') {\n // manage child menu listener\n item.addEventListener('status-change', () => {\n this.updateStatus();\n });\n }\n });\n };\n\n /**\n * Get mg-popover identifier\n * @returns generated mg-popover identifier\n */\n private getPopoverIdentifier = (): MgPopover['identifier'] => `${this.identifier}-popover`;\n\n /**\n * Render popover clickoutside guard for content slot\n */\n private updatePopoverGuard(): void {\n if (this.displayPopover())\n Array.from(this.element.children)\n .filter((child: HTMLElement) => child.getAttribute('slot') === null && child.nodeName !== 'MG-MENU' && Boolean(child.dataset))\n .forEach((slot: HTMLElement) => (slot.dataset.mgPopoverGuard = this.getPopoverIdentifier()));\n }\n\n /**\n * Condition to know if component should display a mg-popover\n * @returns truthy if component display popover\n */\n private displayPopover = (): boolean => this.isDirection(Direction.HORIZONTAL) && this.hasChildren && this.href === undefined;\n\n /************\n * Handlers *\n ************/\n\n /**\n * Handle interacrtive element click\n * @param event - click on element\n */\n private handleElementCLick = (event: MouseEvent): void => {\n if ((this.hasChildren && !this.isInMainMenu) || this.status === Status.DISABLED) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // toggle expanded when mg-menu-item has child items\n if (this.hasChildren) this.toggleExpanded();\n };\n\n /**\n * Handle popover element display-change event\n * @param event - popover display event\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.expanded = event.detail;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Validate props\n */\n componentWillLoad(): void {\n // has children items that is NOT [slot='image' | 'information' | 'label' | 'metadata'] element\n // we store only matching elements\n this.hasChildren = Array.from(this.element.children).some(child => !['image', 'information', 'label', 'metadata'].includes(child.getAttribute('slot')));\n this.messages = initLocales(this.element).messages.menuItem as MessageType;\n this.isItemMore = this.element.dataset.overflowMore !== undefined;\n\n // Validate props\n this.validateStatus(this.status);\n this.validateExpanded(this.expanded);\n this.watchTarget(this.target);\n\n // Validate states\n this.validateSize(this.size);\n }\n\n /**\n * Check if component slots configuration\n * @returns timeout\n */\n componentDidLoad(): ReturnType<typeof setTimeout> {\n // validation\n this.validateSlot(true);\n\n // update props and states after componentDidLoad hook\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n // define menu-item context states\n const menu = this.element.closest('mg-menu');\n this.direction = this.isItemMore || menu === null ? Direction.HORIZONTAL : menu.direction;\n this.isInMainMenu = menu !== null && this.element.parentElement.closest('mg-menu-item') === null;\n if (menu?.size !== undefined) this.size = menu.size;\n\n if (this.isItemMore) this.size = this.element.dataset.size as MgMenuItem['size'];\n\n // when main menu item contain an active item it will get the active style\n // AND if item is in vertical menu it will be expanded\n if (this.hasActiveChild() && this.isInMainMenu) this.expanded = this.isDirection(Direction.VERTICAL);\n\n this.updateStatus([Status.ACTIVE]);\n this.updateDisplayNotificationBadge();\n this.updatePopoverGuard();\n\n // manage child dom changes with mutationObserver and listners\n this.initListeners();\n\n // emit loaded event when component is fully loaded\n this.itemLoaded.emit();\n\n new MutationObserver(mutationsList => {\n if (mutationsList.some(mutation => mutation.attributeName === 'hidden')) this.updateStatus(this.hasChildren ? undefined : [Status.ACTIVE]);\n if (mutationsList.some(mutation => mutation.type === 'characterData')) this.validateSlot();\n this.updateDisplayNotificationBadge();\n this.itemUpdated.emit();\n }).observe(this.element, { attributes: true, childList: true, characterData: true, subtree: true });\n }, 0);\n }\n\n /**\n * Render ineractive element\n * @returns HTML Element\n */\n private renderInteractiveElement(): HTMLElement {\n const TagName: string = this.href !== undefined ? 'a' : 'button';\n return (\n <TagName\n href={this.href}\n class={this.navigationButtonClassList.join()}\n tabindex={[Status.DISABLED, Status.HIDDEN].includes(this.status) ? -1 : undefined}\n disabled={this.status === Status.DISABLED}\n hidden={this.status === Status.HIDDEN}\n target={this.href && this.target ? this.target : undefined}\n aria-expanded={this.hasChildren && this.expanded.toString()}\n aria-current={this.status === Status.ACTIVE && 'page'}\n onClick={this.handleElementCLick}\n >\n <slot name=\"image\"></slot>\n <div class={`${this.navigationButton}-center`}>\n <div class={`${this.navigationButton}-text-content`}>\n <slot name=\"label\"></slot>\n {!this.displayNotificationBadge && <slot name=\"information\"></slot>}\n {this.displayNotificationBadge && (\n <span class={`${this.navigationButton}-text-content-notification`}>\n <mg-badge label={this.messages.badgeLabel} value=\"!\" variant=\"text-color\" slot=\"information\"></mg-badge>\n </span>\n )}\n {this.target === '_blank' && [\n <mg-icon key=\"icon-new-tab\" class={`${this.navigationButton}-new-tab`} icon=\"arrow-up-right-square\"></mg-icon>,\n <span key=\"a11y-new-tab\" class=\"mg-u-visually-hidden\">\n {this.messages.openNewTab}\n </span>,\n ]}\n </div>\n {this.size !== 'regular' && <slot name=\"metadata\"></slot>}\n </div>\n {this.hasChildren && this.href === undefined && (\n <span\n class={{\n [`${this.navigationButton}-chevron`]: true,\n [`${this.navigationButton}-chevron--rotate`]: this.expanded === true,\n }}\n >\n <mg-icon icon=\"chevron-down\" size=\"small\"></mg-icon>\n </span>\n )}\n </TagName>\n );\n }\n\n /**\n * Render slot\n * @returns HTML Element\n */\n private renderSlot = (): HTMLElement => <slot></slot>;\n\n /**\n * Emit event when component is updated\n */\n componentShouldUpdate(): Promise<void> {\n return nextTick(() => {\n this.itemUpdated.emit();\n });\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const getContainerClasses = () => ({\n ['mg-c-menu-item__collapse-container']: true,\n ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),\n });\n\n return (\n <Host role={this.isItemMore ? 'presentation' : 'listitem'}>\n {this.displayPopover() ? (\n <mg-popover\n display={this.expanded}\n placement=\"bottom-start\"\n arrowHide={true}\n onDisplay-change={this.handlePopoverDisplay}\n identifier={this.getPopoverIdentifier()}\n data-fallback-placement=\"bottom-end\" // use for the last element of the menu if it is placed on the right side\n >\n {this.renderInteractiveElement()}\n <div class={getContainerClasses()} slot=\"content\">\n {this.renderSlot()}\n </div>\n </mg-popover>\n ) : (\n [\n this.renderInteractiveElement(),\n <div key=\"vertical-container\" class={getContainerClasses()} hidden={!this.expanded}>\n {this.renderSlot()}\n </div>,\n ]\n )}\n </Host>\n );\n }\n}\n"]}