@mgdis/mg-components 5.19.0 → 5.19.2

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 (157) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_34.cjs.entry.js +84 -40
  3. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  4. package/dist/cjs/mg-components.cjs.js +1 -1
  5. package/dist/cjs/mg-item-more.cjs.entry.js +2 -1
  6. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  8. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  9. package/dist/collection/components/atoms/mg-button/mg-button.js +2 -1
  10. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  11. package/dist/collection/components/atoms/mg-card/mg-card.js +4 -4
  12. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.js +2 -2
  14. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  15. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +19 -1
  16. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
  17. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js +12 -0
  18. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js.map +1 -0
  19. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +1 -5
  20. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +1 -1
  21. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -1
  22. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  23. package/dist/collection/components/molecules/inputs/MgInput.js +3 -3
  24. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +4 -1
  26. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +19 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +6 -5
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +5 -2
  33. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +1 -1
  34. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  36. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +5 -4
  37. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  40. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +3 -3
  41. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js +3 -2
  43. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +4 -10
  45. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +1 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  50. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +78 -2
  51. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  52. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js +108 -0
  53. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js.map +1 -0
  54. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +44 -0
  55. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +1 -1
  56. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -1
  57. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  58. package/dist/collection/components/molecules/menu/mg-menu/test/{mg-menu.e2e.js → mg-menu.e2e.playwright.js} +67 -96
  59. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js.map +1 -0
  60. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js +100 -0
  61. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js.map +1 -0
  62. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -1
  63. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  64. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  65. package/dist/collection/components/molecules/mg-form/mg-form.js +2 -1
  66. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  67. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +1 -1
  68. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  69. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  70. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  71. package/dist/collection/utils/behaviors.utils.js +2 -1
  72. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  73. package/dist/collection/utils/playwright.e2e.test.utils.js +3 -3
  74. package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -1
  75. package/dist/collection/utils/unit.test.utils.js +0 -3
  76. package/dist/collection/utils/unit.test.utils.js.map +1 -1
  77. package/dist/components/MgInput.js +3 -3
  78. package/dist/components/MgInput.js.map +1 -1
  79. package/dist/components/mg-action-more.js +1 -1
  80. package/dist/components/mg-action-more.js.map +1 -1
  81. package/dist/components/mg-badge2.js +1 -1
  82. package/dist/components/mg-badge2.js.map +1 -1
  83. package/dist/components/mg-button2.js +2 -1
  84. package/dist/components/mg-button2.js.map +1 -1
  85. package/dist/components/mg-card2.js +4 -4
  86. package/dist/components/mg-card2.js.map +1 -1
  87. package/dist/components/mg-form.js +2 -1
  88. package/dist/components/mg-form.js.map +1 -1
  89. package/dist/components/mg-icon2.js +2 -2
  90. package/dist/components/mg-icon2.js.map +1 -1
  91. package/dist/components/mg-input-checkbox-paginated2.js +9 -4
  92. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  93. package/dist/components/mg-input-checkbox.js +6 -5
  94. package/dist/components/mg-input-checkbox.js.map +1 -1
  95. package/dist/components/mg-input-date.js +1 -1
  96. package/dist/components/mg-input-date.js.map +1 -1
  97. package/dist/components/mg-input-numeric.js +5 -4
  98. package/dist/components/mg-input-numeric.js.map +1 -1
  99. package/dist/components/mg-input-password.js +1 -1
  100. package/dist/components/mg-input-password.js.map +1 -1
  101. package/dist/components/mg-input-select2.js +3 -3
  102. package/dist/components/mg-input-select2.js.map +1 -1
  103. package/dist/components/mg-input-text2.js +2 -2
  104. package/dist/components/mg-input-text2.js.map +1 -1
  105. package/dist/components/mg-input-textarea.js +1 -1
  106. package/dist/components/mg-input-textarea.js.map +1 -1
  107. package/dist/components/mg-input-title2.js +3 -1
  108. package/dist/components/mg-input-title2.js.map +1 -1
  109. package/dist/components/mg-input-toggle.js +41 -3
  110. package/dist/components/mg-input-toggle.js.map +1 -1
  111. package/dist/components/mg-item-more.js +2 -1
  112. package/dist/components/mg-item-more.js.map +1 -1
  113. package/dist/components/mg-menu2.js +1 -1
  114. package/dist/components/mg-menu2.js.map +1 -1
  115. package/dist/components/mg-pagination2.js +1 -1
  116. package/dist/components/mg-pagination2.js.map +1 -1
  117. package/dist/components/mg-panel.js +1 -1
  118. package/dist/components/mg-panel.js.map +1 -1
  119. package/dist/components/mg-tooltip2.js +1 -1
  120. package/dist/components/mg-tooltip2.js.map +1 -1
  121. package/dist/esm/loader.js +1 -1
  122. package/dist/esm/mg-action-more_34.entry.js +84 -40
  123. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  124. package/dist/esm/mg-components.js +1 -1
  125. package/dist/esm/mg-item-more.entry.js +2 -1
  126. package/dist/esm/mg-item-more.entry.js.map +1 -1
  127. package/dist/mg-components/mg-components.esm.js +1 -1
  128. package/dist/mg-components/mg-components.esm.js.map +1 -1
  129. package/dist/mg-components/p-01ebc95a.entry.js +2 -0
  130. package/dist/mg-components/p-01ebc95a.entry.js.map +1 -0
  131. package/dist/mg-components/p-71a5a848.entry.js +2 -0
  132. package/dist/mg-components/p-71a5a848.entry.js.map +1 -0
  133. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +4 -0
  134. package/dist/types/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.d.ts +1 -0
  135. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +4 -0
  136. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -4
  137. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +2 -2
  138. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.conf.d.ts +3 -6
  139. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +2 -2
  140. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +22 -0
  141. package/dist/types/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.d.ts +1 -0
  142. package/dist/types/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.d.ts +1 -0
  143. package/dist/types/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.d.ts +1 -0
  144. package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +1 -3
  145. package/dist/types/components.d.ts +26 -4
  146. package/package.json +6 -6
  147. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js +0 -18
  148. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.js.map +0 -1
  149. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js +0 -125
  150. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.js.map +0 -1
  151. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.js.map +0 -1
  152. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js +0 -119
  153. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.js.map +0 -1
  154. package/dist/mg-components/p-768fc594.entry.js +0 -2
  155. package/dist/mg-components/p-768fc594.entry.js.map +0 -1
  156. package/dist/mg-components/p-d2d6afec.entry.js +0 -2
  157. package/dist/mg-components/p-d2d6afec.entry.js.map +0 -1
@@ -14,7 +14,7 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy(JSON.parse("[[\"mg-action-more_34\",[[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"checkboxItems\":[32],\"displaySearchInput\":[32],\"searchValue\":[32],\"searchResults\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"type\":[\"validateType\"],\"displaySelectedValues\":[\"validateDisplaySelectedValues\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"checkboxItems\":[\"validateCheckboxItems\"],\"searchValue\":[\"validateSearchValue\"]}],[1,\"mg-action-more\",{\"icon\":[1040],\"button\":[16],\"items\":[16],\"displayChevron\":[4,\"display-chevron\"],\"expanded\":[32]},null,{\"icon\":[\"validateIcon\"],\"button\":[\"validateButton\"],\"items\":[\"validateItems\"],\"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-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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"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],\"disabled\":[4],\"tooltip\":[1],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"min\":[1],\"max\":[1],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"min\":[\"validateMinMax\"],\"max\":[\"validateMinMax\"]}],[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],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"helpText\":[1,\"help-text\"],\"type\":[1],\"currency\":[1],\"max\":[2],\"min\":[2],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"type\":[\"validateType\"],\"integerLength\":[\"validateIntegerLength\"],\"decimalLength\":[\"validateDecimalLength\"]}],[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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],\"helpText\":[1,\"help-text\"],\"classCollection\":[32],\"options\":[32],\"checked\":[32]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"isOnOff\":[\"handleIsOnOff\"],\"isIcon\":[\"handleIsIcon\"],\"readonly\":[\"handleReadonly\"],\"disabled\":[\"handleDisabled\"],\"checked\":[\"handleChecked\"]}],[1,\"mg-message\",{\"identifier\":[1],\"delay\":[2],\"variant\":[1],\"closeButton\":[1028,\"close-button\"],\"hide\":[1028],\"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],\"disabled\":[4],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"requiredMessage\":[32],\"displayError\":[64]},null,{\"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],\"checkboxes\":[16],\"sectionKind\":[1,\"section-kind\"],\"messages\":[16],\"titleKind\":[32],\"currentPage\":[32],\"expanded\":[32]},null,{\"checkboxes\":[\"validateCheckboxes\"],\"sectionKind\":[\"validateSectionKind\"]}],[1,\"mg-menu-item\",{\"identifier\":[1],\"href\":[1],\"status\":[1537],\"expanded\":[1028],\"size\":[32],\"navigationButtonClassList\":[32],\"direction\":[32],\"isInMainMenu\":[32],\"isItemMore\":[32],\"hasChildren\":[32],\"displayNotificationBadge\":[32]},null,{\"status\":[\"validateStatus\"],\"expanded\":[\"validateExpanded\"],\"size\":[\"validateSize\"],\"direction\":[\"validateDirection\"],\"hasChildren\":[\"validateHasChildren\"]}],[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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"]}],[1,\"mg-menu\",{\"label\":[1],\"direction\":[513],\"itemmore\":[16],\"size\":[1],\"isChildMenu\":[32]},null,{\"label\":[\"validateLabel\"],\"direction\":[\"validateDirection\"],\"itemmore\":[\"validateItemMore\"],\"size\":[\"validateSize\"]}],[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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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\"]}],[2,\"mg-character-left\",{\"identifier\":[1],\"characters\":[1],\"maxlength\":[2]},null,{\"maxlength\":[\"validateMaxlength\"]}],[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-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\":[\"validateIdentifier\"],\"message\":[\"validateMessage\"],\"display\":[\"handleDisplay\"],\"disabled\":[\"validateDisabled\"]}],[6,\"mg-input-title\",{\"identifier\":[1],\"required\":[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-item-more\",[[1,\"mg-item-more\",{\"icon\":[16],\"slotlabel\":[16],\"size\":[1],\"parentMenu\":[32]},null,{\"icon\":[\"validateIcon\"],\"slotlabel\":[\"validateSlotLabel\"],\"size\":[\"validateSize\"]}]]]]"), options);
17
+ return bootstrapLazy(JSON.parse("[[\"mg-action-more_34\",[[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"checkboxItems\":[32],\"displaySearchInput\":[32],\"searchValue\":[32],\"searchResults\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"type\":[\"validateType\"],\"displaySelectedValues\":[\"validateDisplaySelectedValues\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\",\"validateDisabled\"],\"checkboxItems\":[\"validateCheckboxItems\"],\"searchValue\":[\"validateSearchValue\"]}],[1,\"mg-action-more\",{\"icon\":[1040],\"button\":[16],\"items\":[16],\"displayChevron\":[4,\"display-chevron\"],\"expanded\":[32]},null,{\"icon\":[\"validateIcon\"],\"button\":[\"validateButton\"],\"items\":[\"validateItems\"],\"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-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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"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],\"disabled\":[4],\"tooltip\":[1],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"min\":[1],\"max\":[1],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"validateValue\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"min\":[\"validateMinMax\"],\"max\":[\"validateMinMax\"]}],[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],\"disabled\":[4],\"mgWidth\":[8,\"mg-width\"],\"tooltip\":[1],\"helpText\":[1,\"help-text\"],\"type\":[1],\"currency\":[1],\"max\":[2],\"min\":[2],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"type\":[\"validateType\"],\"integerLength\":[\"validateIntegerLength\"],\"decimalLength\":[\"validateDecimalLength\"]}],[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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],\"helpText\":[1,\"help-text\"],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"errorMessage\":[32],\"options\":[32],\"displayError\":[64],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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],\"helpText\":[1,\"help-text\"],\"classCollection\":[32],\"options\":[32],\"errorMessage\":[32],\"valid\":[32],\"checked\":[32],\"setError\":[64]},null,{\"value\":[\"handleValue\"],\"items\":[\"validateItems\"],\"isOnOff\":[\"handleIsOnOff\"],\"isIcon\":[\"handleIsIcon\"],\"readonly\":[\"handleReadonly\"],\"disabled\":[\"handleDisabled\"],\"checked\":[\"handleChecked\"]}],[1,\"mg-message\",{\"identifier\":[1],\"delay\":[2],\"variant\":[1],\"closeButton\":[1028,\"close-button\"],\"hide\":[1028],\"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],\"disabled\":[4],\"valid\":[1028],\"invalid\":[1028],\"classCollection\":[32],\"requiredMessage\":[32],\"displayError\":[64]},null,{\"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],\"checkboxes\":[16],\"sectionKind\":[1,\"section-kind\"],\"messages\":[16],\"titleKind\":[32],\"currentPage\":[32],\"expanded\":[32]},null,{\"checkboxes\":[\"validateCheckboxes\"],\"sectionKind\":[\"validateSectionKind\"]}],[1,\"mg-menu-item\",{\"identifier\":[1],\"href\":[1],\"status\":[1537],\"expanded\":[1028],\"size\":[32],\"navigationButtonClassList\":[32],\"direction\":[32],\"isInMainMenu\":[32],\"isItemMore\":[32],\"hasChildren\":[32],\"displayNotificationBadge\":[32]},null,{\"status\":[\"validateStatus\"],\"expanded\":[\"validateExpanded\"],\"size\":[\"validateSize\"],\"direction\":[\"validateDirection\"],\"hasChildren\":[\"validateHasChildren\"]}],[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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"],\"pattern\":[\"validatePattern\"],\"patternErrorMessage\":[\"validatePattern\"]}],[1,\"mg-menu\",{\"label\":[1],\"direction\":[513],\"itemmore\":[16],\"size\":[1],\"isChildMenu\":[32]},null,{\"label\":[\"validateLabel\"],\"direction\":[\"validateDirection\"],\"itemmore\":[\"validateItemMore\"],\"size\":[\"validateSize\"]}],[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],\"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\"],\"required\":[\"handleValidityChange\"],\"readonly\":[\"handleValidityChange\"],\"disabled\":[\"handleValidityChange\"]}],[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\"]}],[2,\"mg-character-left\",{\"identifier\":[1],\"characters\":[1],\"maxlength\":[2]},null,{\"maxlength\":[\"validateMaxlength\"]}],[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-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\":[\"validateIdentifier\"],\"message\":[\"validateMessage\"],\"display\":[\"handleDisplay\"],\"disabled\":[\"validateDisabled\"]}],[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-item-more\",[[1,\"mg-item-more\",{\"icon\":[16],\"slotlabel\":[16],\"size\":[1],\"parentMenu\":[32]},null,{\"icon\":[\"validateIcon\"],\"slotlabel\":[\"validateSlotLabel\"],\"size\":[\"validateSize\"]}]]]]"), options);
18
18
  });
19
19
 
20
20
  //# sourceMappingURL=mg-components.js.map
@@ -66,7 +66,8 @@ class OverflowBehavior {
66
66
  const acc = { accWidth: 0, previousItem: null };
67
67
  [...this._baseChildren, this._moreElement].forEach((child) => {
68
68
  acc.accWidth += child.offsetWidth;
69
- const isPreviousItemHidden = acc.previousItem !== null && acc.previousItem.getAttribute('hidden') !== null;
69
+ const hasPreviuosItem = acc.previousItem !== null;
70
+ const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.getAttribute('hidden') !== null;
70
71
  // if previous item is hidden AND is NOT more element we hidde current
71
72
  // OR if item has an overflow we hidde current
72
73
  // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item
@@ -1 +1 @@
1
- {"file":"mg-item-more.entry.js","mappings":";;;AAAA;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;;;;;;;","names":[],"sources":["src/utils/behaviors.utils.ts","../styles/dist/components/mg-item-more.css?tag=mg-item-more&encapsulation=shadow","src/components/molecules/mg-item-more/mg-item-more.tsx"],"sourcesContent":["/**\n * MgItemMore type guard\n * @param element - element to control type\n * @returns truthy if element is mg-item-more\n */\nconst isMgItemMore = (element: HTMLElement): element is HTMLMgItemMoreElement => element.nodeName === 'MG-ITEM-MORE';\n\nexport enum OverflowBehaviorElements {\n BASE_INDEX = 'data-overflow-base-index',\n PROXY_INDEX = 'data-overflow-proxy-index',\n}\n\nexport class OverflowBehavior {\n // variables\n private _resizeObserver: ResizeObserver;\n private _moreElement: HTMLElement;\n private _baseChildren: Element[];\n private _proxyChildren: Element[];\n\n constructor(private element: Element, private render: () => HTMLElement) {\n if (this._resizeObserver === undefined) {\n // add resize observer\n this._resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n this.run(entry.contentRect.width);\n });\n });\n this._resizeObserver.observe(this.element);\n }\n this.run();\n }\n\n /**********\n * Public *\n **********/\n\n /**\n * Disconnect ResizeObserver\n */\n public disconnect = (): void => {\n this._resizeObserver.disconnect();\n };\n\n /************\n * Internal *\n ************/\n\n /**\n * run overflow behavior\n * @param width - width of the container. Optional.\n */\n private run = (width?: number): void => {\n if (this._moreElement === undefined) {\n // set moreElement\n this._moreElement = this.render();\n\n // set children\n this._baseChildren = this.getInteractiveItems(this.element);\n if (isMgItemMore(this._moreElement)) {\n this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));\n }\n\n // update children\n this._baseChildren.forEach((child, index) => {\n child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);\n // set moreElement children\n this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);\n });\n }\n\n if (width !== undefined) this.updateDisplayedItems(width);\n };\n\n /**\n * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']\n * @param element - element to parse\n * @returns children\n */\n private getInteractiveItems = (element: Element) =>\n (element.children?.length > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName));\n\n /**\n * Update displayed items in container from a given available space\n * @param availableWidth - available width in container to display child items\n */\n private updateDisplayedItems = (availableWidth: number): void => {\n this.restoreItems();\n const acc = { accWidth: 0, previousItem: null };\n [...this._baseChildren, this._moreElement].forEach((child: HTMLMgMenuItemElement | HTMLMgItemMoreElement) => {\n acc.accWidth += child.offsetWidth;\n const isPreviousItemHidden = acc.previousItem !== null && acc.previousItem.getAttribute('hidden') !== null;\n // if previous item is hidden AND is NOT more element we hidde current\n // OR if item has an overflow we hidde current\n // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item\n // ELSE current is a display item\n this.toggleItem(\n child,\n (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden),\n );\n\n // update previous item with current item\n acc.previousItem = child;\n });\n };\n\n /**\n * Utility method to know if item overflow partialy or totaly in the container\n * @param cumulateWidth - previous sibling elements cumulate width + item width\n * @param item - item HTML element\n * @param availableWidth - container available width\n * @returns truthy if element is overflow\n */\n private isOverflowElement = (cumulateWidth: number, item: HTMLElement, availableWidth: number): boolean => {\n if (item.previousElementSibling === null || this.isMoreElement(item)) return false;\n else if (!this.isMoreElement(item.nextElementSibling)) return cumulateWidth + this._moreElement.offsetWidth > availableWidth;\n else return cumulateWidth > availableWidth;\n };\n\n /**\n * Utility method to know if a given element is the 'MORE' element\n * @param element - element to match with 'MORE' element\n * @returns truthy if element is the 'MORE' element\n */\n private isMoreElement = (element: Element): boolean => element.nodeName === 'MG-ITEM-MORE';\n\n /**\n * Toggle display item element\n * @param item - item to control\n * @param isHidden - is item hidden\n */\n private toggleItem = (item: HTMLElement, isHidden: boolean): void => {\n const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));\n if (this.isMoreElement(item)) this.toggleElement(this._moreElement, isHidden);\n else if (mgActionMenuindex >= 0) {\n this.toggleElement(item, isHidden);\n this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);\n }\n };\n\n /**\n * Toggle element's hidde attribute\n * @param element - element to toggle\n * @param isHidden - element is hidden\n */\n private toggleElement = (element: Element, isHidden: boolean): void => {\n if (isHidden) element.setAttribute('hidden', '');\n else element.removeAttribute('hidden');\n };\n\n /**\n * Remove hidden attributes on all items\n */\n private restoreItems = (): void => {\n [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));\n };\n}\n",".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:not([hidden]){display:flex}/*# sourceMappingURL=mg-item-more.css.map */\n","import { Component, h, Prop, Element, Host, Watch, State } from '@stencil/core';\nimport { initLocales } from '../../../locales';\nimport { OverflowBehavior } from '../../../utils/behaviors.utils';\nimport { Direction } from '../menu/mg-menu/mg-menu.conf';\nimport type { IconType, MessageType, SizeType, SlotLabelType } from './mg-item-more.conf';\nimport { isValidString } from '../../../utils/components.utils';\n\n@Component({\n tag: 'mg-item-more',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-item-more.css',\n shadow: true,\n})\nexport class MgItemMore {\n /************\n * Internal *\n ************/\n private readonly name = 'mg-item-more';\n private messages: MessageType;\n private menuItems: HTMLMgMenuItemElement[];\n private overflowBehavior: OverflowBehavior;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgItemMoreElement;\n\n /**\n * Define icon\n */\n @Prop() icon: IconType = { icon: 'ellipsis-vertical' };\n @Watch('icon')\n validateIcon(newValue: MgItemMore['icon']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))\n throw new Error(`<${this.name}> prop \"icon\" must match MgItemMore['icon'] type.`);\n }\n\n /**\n * Define slot label element\n */\n @Prop() slotlabel: SlotLabelType = { display: false };\n @Watch('slotlabel')\n validateSlotLabel(newValue: MgItemMore['slotlabel']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))\n throw new Error(`<${this.name}> prop \"slotlabel\" must match MgItemMore['slotlabel'] type.`);\n else if (typeof newValue.label !== 'string') this.slotlabel.label = this.messages.moreLabel;\n }\n\n /**\n * Define component child menu size.\n */\n @Prop() size: SizeType;\n @Watch('size')\n validateSize(newValue: MgItemMore['size']): void {\n if (newValue && typeof newValue !== 'string') throw new Error(`<${this.name}> prop \"size\" must match MgItemMore['size'] type.`);\n }\n\n /**\n * Define component parent menu.\n */\n @State() parentMenu: HTMLMgMenuElement;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * render mg-item-more overflow element\n * @returns mg-item-more element\n */\n private renderMgMenuItemOverflowElement = (): HTMLMgItemMoreElement => {\n // create menu items proxy element from item clones\n const moreElementMenuItem = this.element.shadowRoot.querySelector('mg-menu-item');\n this.menuItems.forEach((child: HTMLMgMenuItemElement) => {\n moreElementMenuItem.querySelector('mg-menu').appendChild(child.cloneNode(true));\n });\n\n const allMenuItem = Array.from(this.parentMenu.querySelectorAll('mg-menu-item:not([data-overflow-more])'));\n\n Array.from(moreElementMenuItem.querySelectorAll('mg-menu-item:not([data-overflow-more])')).forEach((proxy, index) => {\n // manage click on proxy to mirror it on initial element\n proxy.addEventListener('click', () => {\n // be carefull to use element.click() method instead of dispatchEvent to ensure bubbles outside shadowDom\n const navElement = allMenuItem[index].shadowRoot.querySelector('a, button');\n if (navElement instanceof HTMLButtonElement || navElement instanceof HTMLAnchorElement) navElement.click();\n });\n\n // add id suffix to prevent duplicate key. default html id is: '';\n if (isValidString(proxy.id)) proxy.id = `${proxy.id}-proxy`;\n\n // manage status change miror in proxy\n allMenuItem[index].addEventListener('status-change', (event: CustomEvent) => {\n proxy.setAttribute('status', event.detail);\n });\n });\n\n return this.element;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Disconnect overflow ResizeObserver\n */\n disconnectedCallback(): void {\n this.overflowBehavior.disconnect();\n }\n\n /**\n * Set variables and validate props\n */\n componentWillLoad(): void {\n // init variables\n this.messages = (initLocales(this.element).messages as { plusMenu: MessageType }).plusMenu;\n this.parentMenu = this.element.closest('mg-menu');\n this.menuItems = Array.from(this.parentMenu.children).filter(item => item.nodeName === 'MG-MENU-ITEM') as HTMLMgMenuItemElement[];\n\n // validate props\n this.validateIcon(this.icon);\n this.validateSlotLabel(this.slotlabel);\n this.validateSize(this.size);\n }\n\n /**\n * Add overflow behavior\n */\n componentDidLoad(): void {\n this.overflowBehavior = new OverflowBehavior(this.parentMenu, this.renderMgMenuItemOverflowElement);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role=\"listitem\">\n <mg-menu-item data-overflow-more data-size={this.parentMenu.size}>\n <mg-icon icon={this.icon.icon} slot=\"image\"></mg-icon>\n <span class={{ 'mg-u-visually-hidden': !this.slotlabel.display }} slot=\"label\">\n {this.slotlabel.label}\n </span>\n <mg-menu direction={Direction.VERTICAL} label={this.messages.moreLabel} size={this.size}></mg-menu>\n </mg-menu-item>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-item-more.entry.js","mappings":";;;AAAA;;;;;AAKA,MAAM,YAAY,GAAG,CAAC,OAAoB,KAAuC,OAAO,CAAC,QAAQ,KAAK,cAAc,CAAC;AAErH,IAAY,wBAGX;AAHD,WAAY,wBAAwB;EAClC,mEAAuC,CAAA;EACvC,qEAAyC,CAAA;AAC3C,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC;MAEY,gBAAgB;EAO3B,YAAoB,OAAgB,EAAU,MAAyB;IAAnD,YAAO,GAAP,OAAO,CAAS;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,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,cAAc,CAA4B,CAAC;;IAGlI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC9B;;;;EAKD,gBAAgB;IACd,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,+BAA+B,CAAC,CAAC;GACrG;;;;;EAMD,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,UAAU,IACnB,6DAA4C,IAAI,CAAC,UAAU,CAAC,IAAI,IAC9D,eAAS,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,OAAO,GAAW,EACtD,YAAM,KAAK,EAAE,EAAE,sBAAsB,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAC,OAAO,IAC3E,IAAI,CAAC,SAAS,CAAC,KAAK,CAChB,EACP,eAAS,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAY,CACtF,CACV,EACP;GACH;;;;;;;;;;;;","names":[],"sources":["src/utils/behaviors.utils.ts","../styles/dist/components/mg-item-more.css?tag=mg-item-more&encapsulation=shadow","src/components/molecules/mg-item-more/mg-item-more.tsx"],"sourcesContent":["/**\n * MgItemMore type guard\n * @param element - element to control type\n * @returns truthy if element is mg-item-more\n */\nconst isMgItemMore = (element: HTMLElement): element is HTMLMgItemMoreElement => element.nodeName === 'MG-ITEM-MORE';\n\nexport enum OverflowBehaviorElements {\n BASE_INDEX = 'data-overflow-base-index',\n PROXY_INDEX = 'data-overflow-proxy-index',\n}\n\nexport class OverflowBehavior {\n // variables\n private _resizeObserver: ResizeObserver;\n private _moreElement: HTMLElement;\n private _baseChildren: Element[];\n private _proxyChildren: Element[];\n\n constructor(private element: Element, private render: () => HTMLElement) {\n if (this._resizeObserver === undefined) {\n // add resize observer\n this._resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n this.run(entry.contentRect.width);\n });\n });\n this._resizeObserver.observe(this.element);\n }\n this.run();\n }\n\n /**********\n * Public *\n **********/\n\n /**\n * Disconnect ResizeObserver\n */\n public disconnect = (): void => {\n this._resizeObserver.disconnect();\n };\n\n /************\n * Internal *\n ************/\n\n /**\n * run overflow behavior\n * @param width - width of the container. Optional.\n */\n private run = (width?: number): void => {\n if (this._moreElement === undefined) {\n // set moreElement\n this._moreElement = this.render();\n\n // set children\n this._baseChildren = this.getInteractiveItems(this.element);\n if (isMgItemMore(this._moreElement)) {\n this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));\n }\n\n // update children\n this._baseChildren.forEach((child, index) => {\n child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);\n // set moreElement children\n this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);\n });\n }\n\n if (width !== undefined) this.updateDisplayedItems(width);\n };\n\n /**\n * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']\n * @param element - element to parse\n * @returns children\n */\n private getInteractiveItems = (element: Element) =>\n (element.children?.length > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName));\n\n /**\n * Update displayed items in container from a given available space\n * @param availableWidth - available width in container to display child items\n */\n private updateDisplayedItems = (availableWidth: number): void => {\n this.restoreItems();\n const acc = { accWidth: 0, previousItem: null };\n [...this._baseChildren, this._moreElement].forEach((child: HTMLMgMenuItemElement | HTMLMgItemMoreElement) => {\n acc.accWidth += child.offsetWidth;\n const hasPreviuosItem = acc.previousItem !== null;\n const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.getAttribute('hidden') !== null;\n // if previous item is hidden AND is NOT more element we hidde current\n // OR if item has an overflow we hidde current\n // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item\n // ELSE current is a display item\n this.toggleItem(\n child,\n (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden),\n );\n\n // update previous item with current item\n acc.previousItem = child;\n });\n };\n\n /**\n * Utility method to know if item overflow partialy or totaly in the container\n * @param cumulateWidth - previous sibling elements cumulate width + item width\n * @param item - item HTML element\n * @param availableWidth - container available width\n * @returns truthy if element is overflow\n */\n private isOverflowElement = (cumulateWidth: number, item: HTMLElement, availableWidth: number): boolean => {\n if (item.previousElementSibling === null || this.isMoreElement(item)) return false;\n else if (!this.isMoreElement(item.nextElementSibling)) return cumulateWidth + this._moreElement.offsetWidth > availableWidth;\n else return cumulateWidth > availableWidth;\n };\n\n /**\n * Utility method to know if a given element is the 'MORE' element\n * @param element - element to match with 'MORE' element\n * @returns truthy if element is the 'MORE' element\n */\n private isMoreElement = (element: Element): boolean => element.nodeName === 'MG-ITEM-MORE';\n\n /**\n * Toggle display item element\n * @param item - item to control\n * @param isHidden - is item hidden\n */\n private toggleItem = (item: HTMLElement, isHidden: boolean): void => {\n const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));\n if (this.isMoreElement(item)) this.toggleElement(this._moreElement, isHidden);\n else if (mgActionMenuindex >= 0) {\n this.toggleElement(item, isHidden);\n this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);\n }\n };\n\n /**\n * Toggle element's hidde attribute\n * @param element - element to toggle\n * @param isHidden - element is hidden\n */\n private toggleElement = (element: Element, isHidden: boolean): void => {\n if (isHidden) element.setAttribute('hidden', '');\n else element.removeAttribute('hidden');\n };\n\n /**\n * Remove hidden attributes on all items\n */\n private restoreItems = (): void => {\n [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));\n };\n}\n",".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:not([hidden]){display:flex}/*# sourceMappingURL=mg-item-more.css.map */\n","import { Component, h, Prop, Element, Host, Watch, State } from '@stencil/core';\nimport { initLocales } from '../../../locales';\nimport { OverflowBehavior } from '../../../utils/behaviors.utils';\nimport { Direction } from '../menu/mg-menu/mg-menu.conf';\nimport type { IconType, MessageType, SizeType, SlotLabelType } from './mg-item-more.conf';\nimport { isValidString } from '../../../utils/components.utils';\n\n@Component({\n tag: 'mg-item-more',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-item-more.css',\n shadow: true,\n})\nexport class MgItemMore {\n /************\n * Internal *\n ************/\n private readonly name = 'mg-item-more';\n private messages: MessageType;\n private menuItems: HTMLMgMenuItemElement[];\n private overflowBehavior: OverflowBehavior;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgItemMoreElement;\n\n /**\n * Define icon\n */\n @Prop() icon: IconType = { icon: 'ellipsis-vertical' };\n @Watch('icon')\n validateIcon(newValue: MgItemMore['icon']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))\n throw new Error(`<${this.name}> prop \"icon\" must match MgItemMore['icon'] type.`);\n }\n\n /**\n * Define slot label element\n */\n @Prop() slotlabel: SlotLabelType = { display: false };\n @Watch('slotlabel')\n validateSlotLabel(newValue: MgItemMore['slotlabel']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))\n throw new Error(`<${this.name}> prop \"slotlabel\" must match MgItemMore['slotlabel'] type.`);\n else if (typeof newValue.label !== 'string') this.slotlabel.label = this.messages.moreLabel;\n }\n\n /**\n * Define component child menu size.\n */\n @Prop() size: SizeType;\n @Watch('size')\n validateSize(newValue: MgItemMore['size']): void {\n if (newValue && typeof newValue !== 'string') throw new Error(`<${this.name}> prop \"size\" must match MgItemMore['size'] type.`);\n }\n\n /**\n * Define component parent menu.\n */\n @State() parentMenu: HTMLMgMenuElement;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * render mg-item-more overflow element\n * @returns mg-item-more element\n */\n private renderMgMenuItemOverflowElement = (): HTMLMgItemMoreElement => {\n // create menu items proxy element from item clones\n const moreElementMenuItem = this.element.shadowRoot.querySelector('mg-menu-item');\n this.menuItems.forEach((child: HTMLMgMenuItemElement) => {\n moreElementMenuItem.querySelector('mg-menu').appendChild(child.cloneNode(true));\n });\n\n const allMenuItem = Array.from(this.parentMenu.querySelectorAll('mg-menu-item:not([data-overflow-more])'));\n\n Array.from(moreElementMenuItem.querySelectorAll('mg-menu-item:not([data-overflow-more])')).forEach((proxy, index) => {\n // manage click on proxy to mirror it on initial element\n proxy.addEventListener('click', () => {\n // be carefull to use element.click() method instead of dispatchEvent to ensure bubbles outside shadowDom\n const navElement = allMenuItem[index].shadowRoot.querySelector('a, button');\n if (navElement instanceof HTMLButtonElement || navElement instanceof HTMLAnchorElement) navElement.click();\n });\n\n // add id suffix to prevent duplicate key. default html id is: '';\n if (isValidString(proxy.id)) proxy.id = `${proxy.id}-proxy`;\n\n // manage status change miror in proxy\n allMenuItem[index].addEventListener('status-change', (event: CustomEvent) => {\n proxy.setAttribute('status', event.detail);\n });\n });\n\n return this.element;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Disconnect overflow ResizeObserver\n */\n disconnectedCallback(): void {\n this.overflowBehavior.disconnect();\n }\n\n /**\n * Set variables and validate props\n */\n componentWillLoad(): void {\n // init variables\n this.messages = (initLocales(this.element).messages as { plusMenu: MessageType }).plusMenu;\n this.parentMenu = this.element.closest('mg-menu');\n this.menuItems = Array.from(this.parentMenu.children).filter(item => item.nodeName === 'MG-MENU-ITEM') as HTMLMgMenuItemElement[];\n\n // validate props\n this.validateIcon(this.icon);\n this.validateSlotLabel(this.slotlabel);\n this.validateSize(this.size);\n }\n\n /**\n * Add overflow behavior\n */\n componentDidLoad(): void {\n this.overflowBehavior = new OverflowBehavior(this.parentMenu, this.renderMgMenuItemOverflowElement);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role=\"listitem\">\n <mg-menu-item data-overflow-more data-size={this.parentMenu.size}>\n <mg-icon icon={this.icon.icon} slot=\"image\"></mg-icon>\n <span class={{ 'mg-u-visually-hidden': !this.slotlabel.display }} slot=\"label\">\n {this.slotlabel.label}\n </span>\n <mg-menu direction={Direction.VERTICAL} label={this.messages.moreLabel} size={this.size}></mg-menu>\n </mg-menu-item>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-1aa89acf.js";export{s as setNonce}from"./p-1aa89acf.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-d2d6afec",[[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"displayError":[64],"setError":[64]},null,{"value":["validateValue"],"type":["validateType"],"displaySelectedValues":["validateDisplaySelectedValues"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"searchValue":["validateSearchValue"]}],[1,"mg-action-more",{"icon":[1040],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"icon":["validateIcon"],"button":["validateButton"],"items":["validateItems"],"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-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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"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],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64]},null,{"value":["validateValue"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"min":["validateMinMax"],"max":["validateMinMax"]}],[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],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"type":["validateType"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64]},null,{"value":["handleValue"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"displayError":[64],"setError":[64]},null,{"value":["handleValue"],"items":["validateItems"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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],"helpText":[1,"help-text"],"classCollection":[32],"options":[32],"checked":[32]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["handleIsOnOff"],"isIcon":["handleIsIcon"],"readonly":["handleReadonly"],"disabled":["handleDisabled"],"checked":["handleChecked"]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"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],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessage":[32],"displayError":[64]},null,{"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],"checkboxes":[16],"sectionKind":[1,"section-kind"],"messages":[16],"titleKind":[32],"currentPage":[32],"expanded":[32]},null,{"checkboxes":["validateCheckboxes"],"sectionKind":["validateSectionKind"]}],[1,"mg-menu-item",{"identifier":[1],"href":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"status":["validateStatus"],"expanded":["validateExpanded"],"size":["validateSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"]}],[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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1],"isChildMenu":[32]},null,{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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"]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"maxlength":["validateMaxlength"]}],[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-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":["validateIdentifier"],"message":["validateMessage"],"display":["handleDisplay"],"disabled":["validateDisabled"]}],[6,"mg-input-title",{"identifier":[1],"required":[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"]}]]],["p-768fc594",[[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-1aa89acf.js";export{s as setNonce}from"./p-1aa89acf.js";const l=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};l().then((e=>a(JSON.parse('[["p-71a5a848",[[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"displayError":[64],"setError":[64]},null,{"value":["validateValue"],"type":["validateType"],"displaySelectedValues":["validateDisplaySelectedValues"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"searchValue":["validateSearchValue"]}],[1,"mg-action-more",{"icon":[1040],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"icon":["validateIcon"],"button":["validateButton"],"items":["validateItems"],"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-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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"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],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64]},null,{"value":["validateValue"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"min":["validateMinMax"],"max":["validateMinMax"]}],[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],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"type":["validateType"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64]},null,{"value":["handleValue"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"displayError":[64],"setError":[64]},null,{"value":["handleValue"],"items":["validateItems"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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],"helpText":[1,"help-text"],"classCollection":[32],"options":[32],"errorMessage":[32],"valid":[32],"checked":[32],"setError":[64]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["handleIsOnOff"],"isIcon":["handleIsIcon"],"readonly":["handleReadonly"],"disabled":["handleDisabled"],"checked":["handleChecked"]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"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],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessage":[32],"displayError":[64]},null,{"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],"checkboxes":[16],"sectionKind":[1,"section-kind"],"messages":[16],"titleKind":[32],"currentPage":[32],"expanded":[32]},null,{"checkboxes":["validateCheckboxes"],"sectionKind":["validateSectionKind"]}],[1,"mg-menu-item",{"identifier":[1],"href":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"status":["validateStatus"],"expanded":["validateExpanded"],"size":["validateSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"]}],[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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1],"isChildMenu":[32]},null,{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[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],"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"],"required":["handleValidityChange"],"readonly":["handleValidityChange"],"disabled":["handleValidityChange"]}],[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"]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"maxlength":["validateMaxlength"]}],[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-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":["validateIdentifier"],"message":["validateMessage"],"display":["handleDisplay"],"disabled":["validateDisabled"]}],[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"]}]]],["p-01ebc95a",[[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}]]]]'),e)));
2
2
  //# sourceMappingURL=mg-components.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"sources":["../../node_modules/.pnpm/@stencil+core@4.3.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n 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};\nconst 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 // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\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(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAyBjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,EC/B/BH,IAAeQ,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,q1XAAuCH"}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","JSON","parse"],"sources":["../../node_modules/.pnpm/@stencil+core@4.3.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n 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};\nconst 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 // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\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(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAyBjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,EC/B/BH,IAAeQ,MAAKC,GAEXC,EAAcC,KAAAC,MAAA,m6XAAuCH"}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i,H as e,g as s}from"./p-1aa89acf.js";import{a as o,i as n,D as h}from"./p-c9e2c669.js";const r=t=>t.nodeName==="MG-ITEM-MORE";var a;(function(t){t["BASE_INDEX"]="data-overflow-base-index";t["PROXY_INDEX"]="data-overflow-proxy-index"})(a||(a={}));class l{constructor(t,i){this.element=t;this.render=i;this.disconnect=()=>{this._resizeObserver.disconnect()};this.run=t=>{if(this._moreElement===undefined){this._moreElement=this.render();this._baseChildren=this.getInteractiveItems(this.element);if(r(this._moreElement)){this._proxyChildren=this.getInteractiveItems(this._moreElement.shadowRoot.querySelector("mg-menu"))}this._baseChildren.forEach(((t,i)=>{t.setAttribute(a.BASE_INDEX,`${i}`);this._proxyChildren[i].setAttribute(a.PROXY_INDEX,`${i}`)}))}if(t!==undefined)this.updateDisplayedItems(t)};this.getInteractiveItems=t=>{var i;return(((i=t.children)===null||i===void 0?void 0:i.length)>0?Array.from(t.children):[]).filter((t=>["MG-MENU-ITEM","MG-BUTTON"].includes(t.nodeName)))};this.updateDisplayedItems=t=>{this.restoreItems();const i={accWidth:0,previousItem:null};[...this._baseChildren,this._moreElement].forEach((e=>{i.accWidth+=e.offsetWidth;const s=i.previousItem!==null;const o=s&&i.previousItem.getAttribute("hidden")!==null;this.toggleItem(e,o&&!this.isMoreElement(e)||this.isOverflowElement(i.accWidth,e,t)||this.isMoreElement(e)&&!o);i.previousItem=e}))};this.isOverflowElement=(t,i,e)=>{if(i.previousElementSibling===null||this.isMoreElement(i))return false;else if(!this.isMoreElement(i.nextElementSibling))return t+this._moreElement.offsetWidth>e;else return t>e};this.isMoreElement=t=>t.nodeName==="MG-ITEM-MORE";this.toggleItem=(t,i)=>{const e=Number(t.getAttribute(a.BASE_INDEX));if(this.isMoreElement(t))this.toggleElement(this._moreElement,i);else if(e>=0){this.toggleElement(t,i);this.toggleElement(this._proxyChildren[e],!i)}};this.toggleElement=(t,i)=>{if(i)t.setAttribute("hidden","");else t.removeAttribute("hidden")};this.restoreItems=()=>{[...this._baseChildren,this._moreElement].forEach((t=>t.removeAttribute("hidden")))};if(this._resizeObserver===undefined){this._resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.run(t.contentRect.width)}))}));this._resizeObserver.observe(this.element)}this.run()}}const m=".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:not([hidden]){display:flex}";const c=class{constructor(i){t(this,i);this.name="mg-item-more";this.renderMgMenuItemOverflowElement=()=>{const t=this.element.shadowRoot.querySelector("mg-menu-item");this.menuItems.forEach((i=>{t.querySelector("mg-menu").appendChild(i.cloneNode(true))}));const i=Array.from(this.parentMenu.querySelectorAll("mg-menu-item:not([data-overflow-more])"));Array.from(t.querySelectorAll("mg-menu-item:not([data-overflow-more])")).forEach(((t,e)=>{t.addEventListener("click",(()=>{const t=i[e].shadowRoot.querySelector("a, button");if(t instanceof HTMLButtonElement||t instanceof HTMLAnchorElement)t.click()}));if(o(t.id))t.id=`${t.id}-proxy`;i[e].addEventListener("status-change",(i=>{t.setAttribute("status",i.detail)}))}));return this.element};this.icon={icon:"ellipsis-vertical"};this.slotlabel={display:false};this.size=undefined;this.parentMenu=undefined}validateIcon(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.icon!=="string")throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type.`)}validateSlotLabel(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.display!=="boolean")throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type.`);else if(typeof t.label!=="string")this.slotlabel.label=this.messages.moreLabel}validateSize(t){if(t&&typeof t!=="string")throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type.`)}disconnectedCallback(){this.overflowBehavior.disconnect()}componentWillLoad(){this.messages=n(this.element).messages.plusMenu;this.parentMenu=this.element.closest("mg-menu");this.menuItems=Array.from(this.parentMenu.children).filter((t=>t.nodeName==="MG-MENU-ITEM"));this.validateIcon(this.icon);this.validateSlotLabel(this.slotlabel);this.validateSize(this.size)}componentDidLoad(){this.overflowBehavior=new l(this.parentMenu,this.renderMgMenuItemOverflowElement)}render(){return i(e,{role:"listitem"},i("mg-menu-item",{"data-overflow-more":true,"data-size":this.parentMenu.size},i("mg-icon",{icon:this.icon.icon,slot:"image"}),i("span",{class:{"mg-u-visually-hidden":!this.slotlabel.display},slot:"label"},this.slotlabel.label),i("mg-menu",{direction:h.VERTICAL,label:this.messages.moreLabel,size:this.size})))}get element(){return s(this)}static get watchers(){return{icon:["validateIcon"],slotlabel:["validateSlotLabel"],size:["validateSize"]}}};c.style=m;export{c as mg_item_more};
2
+ //# sourceMappingURL=p-01ebc95a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isMgItemMore","element","nodeName","OverflowBehaviorElements","OverflowBehavior","constructor","render","this","disconnect","_resizeObserver","run","width","_moreElement","undefined","_baseChildren","getInteractiveItems","_proxyChildren","shadowRoot","querySelector","forEach","child","index","setAttribute","BASE_INDEX","PROXY_INDEX","updateDisplayedItems","_a","children","length","Array","from","filter","includes","availableWidth","restoreItems","acc","accWidth","previousItem","offsetWidth","hasPreviuosItem","isPreviousItemHidden","getAttribute","toggleItem","isMoreElement","isOverflowElement","cumulateWidth","item","previousElementSibling","nextElementSibling","isHidden","mgActionMenuindex","Number","toggleElement","removeAttribute","ResizeObserver","entries","entry","contentRect","observe","mgItemMoreCss","MgItemMore","name","renderMgMenuItemOverflowElement","moreElementMenuItem","menuItems","appendChild","cloneNode","allMenuItem","parentMenu","querySelectorAll","proxy","addEventListener","navElement","HTMLButtonElement","HTMLAnchorElement","click","isValidString","id","event","detail","icon","display","validateIcon","newValue","Error","validateSlotLabel","label","slotlabel","messages","moreLabel","validateSize","disconnectedCallback","overflowBehavior","componentWillLoad","initLocales","plusMenu","closest","size","componentDidLoad","h","Host","role","slot","class","direction","Direction","VERTICAL"],"sources":["src/utils/behaviors.utils.ts","../styles/dist/components/mg-item-more.css?tag=mg-item-more&encapsulation=shadow","src/components/molecules/mg-item-more/mg-item-more.tsx"],"sourcesContent":["/**\n * MgItemMore type guard\n * @param element - element to control type\n * @returns truthy if element is mg-item-more\n */\nconst isMgItemMore = (element: HTMLElement): element is HTMLMgItemMoreElement => element.nodeName === 'MG-ITEM-MORE';\n\nexport enum OverflowBehaviorElements {\n BASE_INDEX = 'data-overflow-base-index',\n PROXY_INDEX = 'data-overflow-proxy-index',\n}\n\nexport class OverflowBehavior {\n // variables\n private _resizeObserver: ResizeObserver;\n private _moreElement: HTMLElement;\n private _baseChildren: Element[];\n private _proxyChildren: Element[];\n\n constructor(private element: Element, private render: () => HTMLElement) {\n if (this._resizeObserver === undefined) {\n // add resize observer\n this._resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n this.run(entry.contentRect.width);\n });\n });\n this._resizeObserver.observe(this.element);\n }\n this.run();\n }\n\n /**********\n * Public *\n **********/\n\n /**\n * Disconnect ResizeObserver\n */\n public disconnect = (): void => {\n this._resizeObserver.disconnect();\n };\n\n /************\n * Internal *\n ************/\n\n /**\n * run overflow behavior\n * @param width - width of the container. Optional.\n */\n private run = (width?: number): void => {\n if (this._moreElement === undefined) {\n // set moreElement\n this._moreElement = this.render();\n\n // set children\n this._baseChildren = this.getInteractiveItems(this.element);\n if (isMgItemMore(this._moreElement)) {\n this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));\n }\n\n // update children\n this._baseChildren.forEach((child, index) => {\n child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);\n // set moreElement children\n this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);\n });\n }\n\n if (width !== undefined) this.updateDisplayedItems(width);\n };\n\n /**\n * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']\n * @param element - element to parse\n * @returns children\n */\n private getInteractiveItems = (element: Element) =>\n (element.children?.length > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName));\n\n /**\n * Update displayed items in container from a given available space\n * @param availableWidth - available width in container to display child items\n */\n private updateDisplayedItems = (availableWidth: number): void => {\n this.restoreItems();\n const acc = { accWidth: 0, previousItem: null };\n [...this._baseChildren, this._moreElement].forEach((child: HTMLMgMenuItemElement | HTMLMgItemMoreElement) => {\n acc.accWidth += child.offsetWidth;\n const hasPreviuosItem = acc.previousItem !== null;\n const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.getAttribute('hidden') !== null;\n // if previous item is hidden AND is NOT more element we hidde current\n // OR if item has an overflow we hidde current\n // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item\n // ELSE current is a display item\n this.toggleItem(\n child,\n (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden),\n );\n\n // update previous item with current item\n acc.previousItem = child;\n });\n };\n\n /**\n * Utility method to know if item overflow partialy or totaly in the container\n * @param cumulateWidth - previous sibling elements cumulate width + item width\n * @param item - item HTML element\n * @param availableWidth - container available width\n * @returns truthy if element is overflow\n */\n private isOverflowElement = (cumulateWidth: number, item: HTMLElement, availableWidth: number): boolean => {\n if (item.previousElementSibling === null || this.isMoreElement(item)) return false;\n else if (!this.isMoreElement(item.nextElementSibling)) return cumulateWidth + this._moreElement.offsetWidth > availableWidth;\n else return cumulateWidth > availableWidth;\n };\n\n /**\n * Utility method to know if a given element is the 'MORE' element\n * @param element - element to match with 'MORE' element\n * @returns truthy if element is the 'MORE' element\n */\n private isMoreElement = (element: Element): boolean => element.nodeName === 'MG-ITEM-MORE';\n\n /**\n * Toggle display item element\n * @param item - item to control\n * @param isHidden - is item hidden\n */\n private toggleItem = (item: HTMLElement, isHidden: boolean): void => {\n const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));\n if (this.isMoreElement(item)) this.toggleElement(this._moreElement, isHidden);\n else if (mgActionMenuindex >= 0) {\n this.toggleElement(item, isHidden);\n this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);\n }\n };\n\n /**\n * Toggle element's hidde attribute\n * @param element - element to toggle\n * @param isHidden - element is hidden\n */\n private toggleElement = (element: Element, isHidden: boolean): void => {\n if (isHidden) element.setAttribute('hidden', '');\n else element.removeAttribute('hidden');\n };\n\n /**\n * Remove hidden attributes on all items\n */\n private restoreItems = (): void => {\n [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));\n };\n}\n",".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:not([hidden]){display:flex}/*# sourceMappingURL=mg-item-more.css.map */\n","import { Component, h, Prop, Element, Host, Watch, State } from '@stencil/core';\nimport { initLocales } from '../../../locales';\nimport { OverflowBehavior } from '../../../utils/behaviors.utils';\nimport { Direction } from '../menu/mg-menu/mg-menu.conf';\nimport type { IconType, MessageType, SizeType, SlotLabelType } from './mg-item-more.conf';\nimport { isValidString } from '../../../utils/components.utils';\n\n@Component({\n tag: 'mg-item-more',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-item-more.css',\n shadow: true,\n})\nexport class MgItemMore {\n /************\n * Internal *\n ************/\n private readonly name = 'mg-item-more';\n private messages: MessageType;\n private menuItems: HTMLMgMenuItemElement[];\n private overflowBehavior: OverflowBehavior;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgItemMoreElement;\n\n /**\n * Define icon\n */\n @Prop() icon: IconType = { icon: 'ellipsis-vertical' };\n @Watch('icon')\n validateIcon(newValue: MgItemMore['icon']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))\n throw new Error(`<${this.name}> prop \"icon\" must match MgItemMore['icon'] type.`);\n }\n\n /**\n * Define slot label element\n */\n @Prop() slotlabel: SlotLabelType = { display: false };\n @Watch('slotlabel')\n validateSlotLabel(newValue: MgItemMore['slotlabel']): void {\n if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))\n throw new Error(`<${this.name}> prop \"slotlabel\" must match MgItemMore['slotlabel'] type.`);\n else if (typeof newValue.label !== 'string') this.slotlabel.label = this.messages.moreLabel;\n }\n\n /**\n * Define component child menu size.\n */\n @Prop() size: SizeType;\n @Watch('size')\n validateSize(newValue: MgItemMore['size']): void {\n if (newValue && typeof newValue !== 'string') throw new Error(`<${this.name}> prop \"size\" must match MgItemMore['size'] type.`);\n }\n\n /**\n * Define component parent menu.\n */\n @State() parentMenu: HTMLMgMenuElement;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * render mg-item-more overflow element\n * @returns mg-item-more element\n */\n private renderMgMenuItemOverflowElement = (): HTMLMgItemMoreElement => {\n // create menu items proxy element from item clones\n const moreElementMenuItem = this.element.shadowRoot.querySelector('mg-menu-item');\n this.menuItems.forEach((child: HTMLMgMenuItemElement) => {\n moreElementMenuItem.querySelector('mg-menu').appendChild(child.cloneNode(true));\n });\n\n const allMenuItem = Array.from(this.parentMenu.querySelectorAll('mg-menu-item:not([data-overflow-more])'));\n\n Array.from(moreElementMenuItem.querySelectorAll('mg-menu-item:not([data-overflow-more])')).forEach((proxy, index) => {\n // manage click on proxy to mirror it on initial element\n proxy.addEventListener('click', () => {\n // be carefull to use element.click() method instead of dispatchEvent to ensure bubbles outside shadowDom\n const navElement = allMenuItem[index].shadowRoot.querySelector('a, button');\n if (navElement instanceof HTMLButtonElement || navElement instanceof HTMLAnchorElement) navElement.click();\n });\n\n // add id suffix to prevent duplicate key. default html id is: '';\n if (isValidString(proxy.id)) proxy.id = `${proxy.id}-proxy`;\n\n // manage status change miror in proxy\n allMenuItem[index].addEventListener('status-change', (event: CustomEvent) => {\n proxy.setAttribute('status', event.detail);\n });\n });\n\n return this.element;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Disconnect overflow ResizeObserver\n */\n disconnectedCallback(): void {\n this.overflowBehavior.disconnect();\n }\n\n /**\n * Set variables and validate props\n */\n componentWillLoad(): void {\n // init variables\n this.messages = (initLocales(this.element).messages as { plusMenu: MessageType }).plusMenu;\n this.parentMenu = this.element.closest('mg-menu');\n this.menuItems = Array.from(this.parentMenu.children).filter(item => item.nodeName === 'MG-MENU-ITEM') as HTMLMgMenuItemElement[];\n\n // validate props\n this.validateIcon(this.icon);\n this.validateSlotLabel(this.slotlabel);\n this.validateSize(this.size);\n }\n\n /**\n * Add overflow behavior\n */\n componentDidLoad(): void {\n this.overflowBehavior = new OverflowBehavior(this.parentMenu, this.renderMgMenuItemOverflowElement);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role=\"listitem\">\n <mg-menu-item data-overflow-more data-size={this.parentMenu.size}>\n <mg-icon icon={this.icon.icon} slot=\"image\"></mg-icon>\n <span class={{ 'mg-u-visually-hidden': !this.slotlabel.display }} slot=\"label\">\n {this.slotlabel.label}\n </span>\n <mg-menu direction={Direction.VERTICAL} label={this.messages.moreLabel} size={this.size}></mg-menu>\n </mg-menu-item>\n </Host>\n );\n }\n}\n"],"mappings":"2GAKA,MAAMA,EAAgBC,GAA2DA,EAAQC,WAAa,eAEtG,IAAYC,GAAZ,SAAYA,GACVA,EAAA,yCACAA,EAAA,0CACD,EAHD,CAAYA,MAAwB,K,MAKvBC,EAOX,WAAAC,CAAoBJ,EAA0BK,GAA1BC,KAAAN,UAA0BM,KAAAD,SAoBvCC,KAAAC,WAAa,KAClBD,KAAKE,gBAAgBD,YAAY,EAW3BD,KAAAG,IAAOC,IACb,GAAIJ,KAAKK,eAAiBC,UAAW,CAEnCN,KAAKK,aAAeL,KAAKD,SAGzBC,KAAKO,cAAgBP,KAAKQ,oBAAoBR,KAAKN,SACnD,GAAID,EAAaO,KAAKK,cAAe,CACnCL,KAAKS,eAAiBT,KAAKQ,oBAAoBR,KAAKK,aAAaK,WAAWC,cAAc,W,CAI5FX,KAAKO,cAAcK,SAAQ,CAACC,EAAOC,KACjCD,EAAME,aAAanB,EAAyBoB,WAAY,GAAGF,KAE3Dd,KAAKS,eAAeK,GAAOC,aAAanB,EAAyBqB,YAAa,GAAGH,IAAQ,G,CAI7F,GAAIV,IAAUE,UAAWN,KAAKkB,qBAAqBd,EAAM,EAQnDJ,KAAAQ,oBAAuBd,IAAgB,IAAAyB,EAC7C,SAACA,EAAAzB,EAAQ0B,YAAQ,MAAAD,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