@mgdis/mg-components 6.10.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/cjs/{index-CfIlskRh.js → index-B_WwxtkQ.js} +4 -4
  2. package/dist/cjs/{index-CfIlskRh.js.map → index-B_WwxtkQ.js.map} +1 -1
  3. package/dist/cjs/{index.es-BCLy9yYb.js → index.es-C-3Gv8Eu.js} +85 -81
  4. package/dist/cjs/index.es-C-3Gv8Eu.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mg-action-more_37.cjs.entry.js +1915 -1909
  7. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  8. package/dist/cjs/mg-alert.cjs.entry.js +6 -6
  9. package/dist/cjs/mg-components.cjs.js +1 -1
  10. package/dist/cjs/mg-input-combobox.cjs.entry.js +75 -72
  11. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
  12. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
  13. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +12 -12
  14. package/dist/cjs/mg-loader.cjs.entry.js +4 -4
  15. package/dist/cjs/mg-progress.cjs.entry.js +10 -10
  16. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  17. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  18. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -1
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
  20. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +43 -63
  21. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  22. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +1 -1
  23. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +67 -45
  24. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +25 -30
  26. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  27. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  28. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  29. package/dist/collection/components/molecules/mg-popover/mg-popover.js +47 -97
  30. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  31. package/dist/components/index.es.js +71 -68
  32. package/dist/components/index.es.js.map +1 -1
  33. package/dist/components/index2.js +2 -2
  34. package/dist/components/mg-action-more.js +6 -6
  35. package/dist/components/mg-alert.js +5 -5
  36. package/dist/components/mg-badge2.js +6 -6
  37. package/dist/components/mg-button2.js +7 -7
  38. package/dist/components/mg-button2.js.map +1 -1
  39. package/dist/components/mg-character-left2.js +4 -4
  40. package/dist/components/mg-details.js +8 -4
  41. package/dist/components/mg-details.js.map +1 -1
  42. package/dist/components/mg-form.js +7 -7
  43. package/dist/components/mg-icon2.js +6 -6
  44. package/dist/components/mg-illustrated-message.js +5 -5
  45. package/dist/components/mg-input-checkbox.js +9 -9
  46. package/dist/components/mg-input-combobox.js +74 -71
  47. package/dist/components/mg-input-combobox.js.map +1 -1
  48. package/dist/components/mg-input-date.js +17 -17
  49. package/dist/components/mg-input-numeric.js +13 -13
  50. package/dist/components/mg-input-password.js +3 -3
  51. package/dist/components/mg-input-radio.js +7 -7
  52. package/dist/components/mg-input-rich-text-editor.js +11 -11
  53. package/dist/components/mg-input-select2.js +32 -37
  54. package/dist/components/mg-input-select2.js.map +1 -1
  55. package/dist/components/mg-input-text2.js +9 -9
  56. package/dist/components/mg-input-textarea.js +7 -7
  57. package/dist/components/mg-input-title2.js +4 -4
  58. package/dist/components/mg-input-toggle.js +6 -6
  59. package/dist/components/mg-input2.js +8 -8
  60. package/dist/components/mg-item-more2.js +7 -7
  61. package/dist/components/mg-loader2.js +3 -3
  62. package/dist/components/mg-menu-item2.js +11 -11
  63. package/dist/components/mg-message2.js +4 -4
  64. package/dist/components/mg-modal.js +8 -8
  65. package/dist/components/mg-pagination2.js +6 -6
  66. package/dist/components/mg-panel.js +9 -9
  67. package/dist/components/mg-popover-content2.js +4 -4
  68. package/dist/components/mg-popover-content2.js.map +1 -1
  69. package/dist/components/mg-popover2.js +48 -96
  70. package/dist/components/mg-popover2.js.map +1 -1
  71. package/dist/components/mg-progress.js +10 -10
  72. package/dist/components/mg-skip-links.js +2 -2
  73. package/dist/components/mg-table.js +6 -6
  74. package/dist/components/mg-tabs.js +12 -12
  75. package/dist/components/mg-tag.js +4 -4
  76. package/dist/components/mg-tooltip-content2.js +1 -1
  77. package/dist/components/mg-tooltip-content2.js.map +1 -1
  78. package/dist/components/mg-tooltip2.js +47 -66
  79. package/dist/components/mg-tooltip2.js.map +1 -1
  80. package/dist/components/popper.js +1793 -0
  81. package/dist/components/popper.js.map +1 -0
  82. package/dist/esm/{index-DmsGewMC.js → index-DHpyFawS.js} +4 -4
  83. package/dist/esm/{index-DmsGewMC.js.map → index-DHpyFawS.js.map} +1 -1
  84. package/dist/esm/{index.es-rLV3KFPd.js → index.es-lyrZ9KRh.js} +73 -70
  85. package/dist/esm/index.es-lyrZ9KRh.js.map +1 -0
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/esm/mg-action-more_37.entry.js +1915 -1909
  88. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  89. package/dist/esm/mg-alert.entry.js +6 -6
  90. package/dist/esm/mg-components.js +1 -1
  91. package/dist/esm/mg-input-combobox.entry.js +75 -72
  92. package/dist/esm/mg-input-combobox.entry.js.map +1 -1
  93. package/dist/esm/mg-input-rich-text-editor.entry.js +12 -12
  94. package/dist/esm/mg-loader.entry.js +4 -4
  95. package/dist/esm/mg-progress.entry.js +10 -10
  96. package/dist/mg-components/mg-components.esm.js +1 -1
  97. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
  98. package/dist/mg-components/{p-ad66e7b3.entry.js → p-596c0e08.entry.js} +2 -2
  99. package/dist/mg-components/p-8a3bd8ad.entry.js +2 -0
  100. package/dist/mg-components/p-8a3bd8ad.entry.js.map +1 -0
  101. package/dist/mg-components/p-98a74b62.entry.js +2 -0
  102. package/dist/mg-components/{p-cdbe689e.entry.js.map → p-98a74b62.entry.js.map} +1 -1
  103. package/dist/mg-components/{p-DK9teKTo.js → p-C-vIqOyI.js} +2 -2
  104. package/dist/mg-components/{p-DK9teKTo.js.map → p-C-vIqOyI.js.map} +1 -1
  105. package/dist/mg-components/{p-73099ed7.entry.js → p-d4ed3aad.entry.js} +2 -2
  106. package/dist/mg-components/p-e822bd96.entry.js +2 -0
  107. package/dist/mg-components/{p-88f77de2.entry.js.map → p-e822bd96.entry.js.map} +1 -1
  108. package/dist/mg-components/p-fc7b96e6.entry.js +2 -0
  109. package/dist/mg-components/p-fc7b96e6.entry.js.map +1 -0
  110. package/dist/mg-components/p-lyrZ9KRh.js +2 -0
  111. package/dist/mg-components/p-lyrZ9KRh.js.map +1 -0
  112. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +0 -6
  113. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +6 -8
  114. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -1
  115. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +5 -0
  116. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  117. package/dist/types/components/molecules/mg-details/mg-details.d.ts +1 -0
  118. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +8 -22
  119. package/dist/types/components.d.ts +11 -8
  120. package/ide/intellij/web-types.json +6 -2
  121. package/ide/vscode/html-custom-data.json +1 -1
  122. package/package.json +12 -12
  123. package/dist/cjs/index.es-BCLy9yYb.js.map +0 -1
  124. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +0 -2
  125. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js.map +0 -1
  126. package/dist/collection/utils/floating-ui.utils.js +0 -74
  127. package/dist/collection/utils/floating-ui.utils.js.map +0 -1
  128. package/dist/components/floating-ui.utils.js +0 -1721
  129. package/dist/components/floating-ui.utils.js.map +0 -1
  130. package/dist/esm/index.es-rLV3KFPd.js.map +0 -1
  131. package/dist/mg-components/p-0f761c6c.entry.js +0 -2
  132. package/dist/mg-components/p-0f761c6c.entry.js.map +0 -1
  133. package/dist/mg-components/p-88f77de2.entry.js +0 -2
  134. package/dist/mg-components/p-cdbe689e.entry.js +0 -2
  135. package/dist/mg-components/p-d3a868f0.entry.js +0 -2
  136. package/dist/mg-components/p-d3a868f0.entry.js.map +0 -1
  137. package/dist/mg-components/p-rLV3KFPd.js +0 -2
  138. package/dist/mg-components/p-rLV3KFPd.js.map +0 -1
  139. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +0 -6
  140. package/dist/types/utils/floating-ui.utils.d.ts +0 -28
  141. /package/dist/mg-components/{p-ad66e7b3.entry.js.map → p-596c0e08.entry.js.map} +0 -0
  142. /package/dist/mg-components/{p-73099ed7.entry.js.map → p-d4ed3aad.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"mg-input-combobox.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,wgPAAwgP;;ACQniP;;;;AAIG;AACH,MAAM,MAAM,GAAG,CAAC,IAAa,KAAqB,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAQ,IAAe,CAAC,KAAK,KAAK,QAAQ,IAAK,IAAe,CAAC,KAAK,KAAK,SAAS;AAExK;;;;AAIG;AACH,MAAM,OAAO,GAAG,CAAC,KAAgB,KAAwB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;AAEpG;;;;AAIG;AACH,MAAM,eAAe,GAAG,CAAC,KAAc,KAA+C;IACpF,MAAM,WAAW,GAAGA,EAAQ,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,cAAc,KAAK,UAAU,KAC5B,SAAG,EAAE,EAAE,cAAc,EAAE,KAAK,EAAC,0BAA0B,EACpD,EAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CACpC,CACL,EACA,cAAc,KAAK,cAAc,KAChC,CAAG,CAAA,GAAA,EAAA,EAAA,EAAE,EAAE,cAAc,EAAE,KAAK,EAAC,0BAA0B,EACpD,EAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CACxC,CACL,CACG,CACK,CACd,CACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isObject","MgInputCombobox","__stencil_proxyCustomElement","Paginate","ClassList","Cursor","nextTick","Page","getObjectValueFromKey","toString","allItemsAreString","isValidString"],"sources":["../styles/dist/components/mg-input-combobox.css?tag=mg-input-combobox&encapsulation=shadow","src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.tsx"],"sourcesContent":[".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left: 0;--mg-c-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right: 0;--mg-c-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right: var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right: var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.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}}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical: 0;--mg-c-popover-padding-horizontal: 0}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__reset{padding-right:var(--mg-b-size-min-height)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width: var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height)*var(--mg-c-input-append-x) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}/*# sourceMappingURL=mg-input-combobox.css.map */\n","import { Component, Event, h, Prop, EventEmitter, State, Element, Method, Watch } from '@stencil/core';\nimport { allItemsAreString, ClassList, getObjectValueFromKey, isValidString, nextTick, Page, Paginate, Cursor, type CursorType, toString, isObject } from '@mgdis/stencil-helpers';\nimport { type ActionType, type RequestMappingType, type ResponseMappingType } from './mg-input-combobox.conf';\nimport { type TooltipPosition, type Width, type EventType, widths, classReadonly, classDisabled } from '../mg-input/mg-input.conf';\nimport type { Option } from '../../../../types';\nimport { initLocales } from '../../../../locales';\nimport { Keys } from '../../../../utils/events.utils';\n\n/**\n * Check if object is an item\n * @param item - object to check\n * @returns True if object is an item\n */\nconst isItem = (item: unknown): item is Option => item && typeof item === 'object' && typeof (item as Option).title === 'string' && (item as Option).value !== undefined;\n\n/**\n * Check if objects are items\n * @param items - items to check\n * @returns True if objects are items\n */\nconst isItems = (items: unknown[]): items is Option[] => Array.isArray(items) && items.every(isItem);\n\n/**\n * Check if object is valid combobox fetchmappings\n * @param value - to validate\n * @returns truthy if mapping is valid\n */\nconst isFetchmappings = (value: unknown): value is MgInputCombobox['fetchmappings'] => {\n const isValidRoot = isObject<Record<string, unknown>>(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');\n if (isValidRoot) {\n const { request, response } = value as MgInputCombobox['fetchmappings'];\n if ([request, response].some(property => !isObject(property))) return false;\n const isValidRequest = typeof request.filter === 'string';\n const isValidResponse =\n typeof response === 'object' &&\n typeof response.total === 'string' &&\n typeof response.items === 'string' &&\n typeof response.next === 'string' &&\n typeof response.itemTitle === 'string' &&\n typeof response.itemValue === 'string';\n return isValidRequest && isValidResponse;\n } else {\n return isValidRoot;\n }\n};\n\n/**\n * Map new URL from old url\n * @param newValue - new URL value\n * @param oldValue - previous URL value\n * @returns updated url\n */\nconst mapUrl = (newValue: string, oldValue: string): string => {\n if (!Boolean(newValue)) return;\n else if (URL.canParse(newValue)) {\n return newValue;\n }\n\n // build new URL\n const params = newValue.includes('?') && newValue.split('?').pop();\n if (Boolean(params)) {\n const { origin, pathname } = new URL(oldValue);\n return `${origin}${pathname}?${params}`;\n } else {\n return newValue;\n }\n};\n\n@Component({\n tag: 'mg-input-combobox',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-combobox.css',\n shadow: true,\n})\nexport class MgInputCombobox {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classFocus = 'mg-u-is-focused';\n\n // HTML selector\n private input: HTMLInputElement;\n private loadMoreElement: HTMLMgButtonElement;\n private popoverId: string;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n private handlerInProgress: EventType;\n private loadingAction: ActionType['name'];\n\n private page: Page<Option>;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputComboboxElement;\n\n /**\n * Define component value\n */\n @Prop({ mutable: true, reflect: true }) value: string | Option;\n @Watch('value')\n watchValue(newValue: MgInputCombobox['value']): void {\n this.filter = this.getValueTitle();\n this.valueChange.emit(newValue);\n }\n\n /**\n * Define components items\n */\n @Prop() items: (string | Option)[];\n @Watch('items')\n watchItems(newValue: MgInputCombobox['items']) {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n // skip newValue check\n return;\n } else if (Boolean(this.fetchurl) && Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"items\" values cannot be use with \"fetchurl\" prop defined. Passed value: ${toString(newValue)}.`);\n }\n // Empty options\n else if (Array.isArray(newValue) && newValue.length === 0) {\n this.options = new Paginate([]);\n }\n // String array\n else if (allItemsAreString(newValue)) {\n this.options = new Paginate(\n newValue.map(item => ({ title: item, value: item })),\n { total: newValue.length },\n );\n }\n // Object array\n else if (isItems(newValue)) {\n this.options = new Paginate(newValue, { total: newValue.length });\n } else {\n throw new Error(`<mg-input-combobox> prop \"items\" values must be the same type, string or Option. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define items label\n * Include short description. Required for accessibility.\n * @example\n * ```\n * Countries\n * ```\n */\n @Prop() itemsLabel!: string;\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n watchIdentifier(newValue: MgInputCombobox['identifier']): void {\n if (Boolean(newValue)) {\n this.popoverId = `${newValue}-popover`;\n this.element.dataset.mgPopoverGuard = this.popoverId;\n }\n }\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Define input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help combobox.\n */\n @Prop() placeholder?: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputCombobox['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n watchValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input === undefined) return;\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputCombobox['disabled']): void {\n if (newValue) {\n this.classCollection.add(classDisabled);\n } else {\n this.classCollection.delete(classDisabled);\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputCombobox['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n this.classCollection = new ClassList(this.classCollection.classes);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define API url to fetch\n * @example\n * ```\n * {\n * url: \"http://myapi.com?$select='href,name'&my-custom-param='my-custom-value'\", // url to fetch\n * }\n * ```\n */\n @Prop() fetchurl?: string | URL;\n @Watch('fetchurl')\n watchFetchUrl(newValue: MgInputCombobox['fetchurl']): void {\n if (newValue && !URL.canParse(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchurl\" value must be URL or string. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define fetch options object\n * Require `fetchurl` prop to be defined otherwith it will be ignored if defined\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/RequestInit}\n * @example JSON headers:\n * ```json\n * {\n * \"headers\": {\n * \"authorization\": \"my-token\"\n * }\n * }\n * ```\n */\n @Prop() fetchoptions?: RequestInit;\n @Watch('fetchoptions')\n watchFetchOptions(newValue: MgInputCombobox['fetchoptions']): void {\n if (this.fetchurl && newValue && !isObject(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchoptions\" value must be a valid RequestInit. Passed value: ${toString(newValue)}.`);\n } else {\n new Request(this.fetchurl, newValue);\n }\n }\n\n /**\n * Define fetch request mappings.\n * Required with `fetchurl`\n * @example\n * ```\n * {\n * request: {\n * filter: 'name', // `filter` key\n * },\n * response: {\n * total: 'body.data.total', // response object mapping to get `total` value\n * items: 'body.data.results' // response object mapping to get `items` value\n * next: 'body.next' // response object mapping to get `next` items\n * itemTitle: 'name', // item property to map on item['title']\n * itemValue: 'href', // item property to map on item['value']\n * }\n * }\n * ```\n */\n @Prop() fetchmappings?: { request: RequestMappingType; response: ResponseMappingType };\n @Watch('fetchmappings')\n watchFetchMappings(newValue: MgInputCombobox['fetchmappings']): void {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchmappings\" is required with \"fetchurl\" prop.`);\n } else if (Boolean(newValue) && !isFetchmappings(newValue)) {\n throw new Error(\n `<mg-input-combobox> prop \"fetchmappings\" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${toString(newValue)}.`,\n );\n }\n }\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Define if items are loading\n */\n @State() isLoading: boolean;\n\n /**\n * Formated items for display\n */\n @State() options: Paginate<Option> = new Paginate([]);\n @Watch('options')\n watchOptions(newValue: Paginate<Option>): void {\n this.page = newValue.getPage(0, Boolean(this.filter) ? this.optionsFilter : undefined);\n }\n\n /**\n * Active option\n */\n @State() option: Option;\n\n /**\n * Option filter\n */\n @State() filter: string = '';\n @Watch('filter')\n watchFilter(newValue: MgInputCombobox['filter']): void {\n this.loadingWrapper({ name: 'load-data' });\n this.filterChange.emit(newValue);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Popover display state\n */\n @State() popoverDisplay = false;\n @Watch('popoverDisplay')\n watchPopoverDisplay(newValue: MgInputCombobox['popoverDisplay']): void {\n if (newValue) {\n this.classCollection.add(this.classFocus);\n this.input.focus();\n this.scrollToIndex(0);\n } else {\n // remove visual focus\n this.option = null;\n // reset filter with value\n this.filter = this.getValueTitle();\n this.classCollection.delete(this.classFocus);\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n }\n }\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputComboboxElement['value']>;\n\n /**\n * Emited event when filter change\n */\n @Event({ eventName: 'filter-change' }) filterChange: EventEmitter<string>;\n\n /**\n * Emited event when `load-more` is called\n */\n @Event({ eventName: 'load-more' }) loadMore: EventEmitter<void>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputComboboxElement['valid']>;\n\n /**\n * Public method to play input focus\n */\n @Method()\n async setFocus(): Promise<void> {\n this.input.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its concombobox by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given concombobox.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputCombobox['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (this.readonly) return;\n this.setValue(null);\n this.option = null;\n this.filter = '';\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n }\n\n /**\n * Handle `click` event on option\n * @param event - option element click event\n */\n private handleOptionClick = (event: MouseEvent & { target: HTMLLIElement }) => {\n this.setValue(this.options.items.find(option => option.value === event.target.id));\n this.popoverDisplay = false;\n };\n\n /**\n * Handle `click` event on reset button\n * @param event - click event\n */\n private handleResetButton = (event: MouseEvent): void => {\n event.stopPropagation();\n this.reset().then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `display-change` event on mg-popover\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.popoverDisplay = event.detail;\n };\n\n /**\n * Handle input event\n */\n private handleFilterInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) this.setErrorMessage();\n if (!this.popoverDisplay) this.popoverDisplay = true;\n this.filter = this.input.value;\n };\n\n /**\n * Handle `blur` event\n */\n private handleFilterBlur = (): void => {\n // skip process if popover is displayed\n if (this.popoverDisplay) return;\n\n // Display Error\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Handle `focus` event\n */\n private handleFilterFocus = (): void => {\n // ensure visual focus is always clear on focus when component isn't in loading state\n if (!this.isLoading) {\n this.option = null;\n }\n };\n\n /**\n * Handle load-more <mg-button> `click`\n */\n private handleLoadMoreButton = (): void => {\n this.loadingWrapper({ name: 'load-more', cursor: Cursor.NEXT }).then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `keypress` event\n * @param event - keyboard event\n */\n private handleFilterKeydown = (event: KeyboardEvent): void => {\n if (this.disabled || event.ctrlKey || event.shiftKey) return;\n\n let guard = false;\n\n // override keys actions\n switch (event.key) {\n case Keys.TAB:\n case Keys.ENTER:\n guard = event.key === Keys.ENTER;\n const option = this.option || this.options.items.find(this.isCurrentOption);\n // Sets the value to the content of the focused option in the listbox.\n if (this.popoverDisplay) this.setValue(this.page.total > 0 ? option : null);\n // Closes the popover.\n this.popoverDisplay = false;\n break;\n\n case Keys.DOWN:\n case Keys.ARROWDOWN:\n case Keys.UP:\n case Keys.ARROWUP:\n guard = true;\n if (this.isLoading || !(this.page.total > 0)) {\n this.popoverDisplay = true;\n break;\n }\n\n if (Boolean(event.altKey) && [Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // Opens the popover without moving focus or changing selection.\n this.popoverDisplay = true;\n break;\n }\n\n // define cursor\n let cursor: CursorType;\n const isNavigationStart = this.popoverDisplay && isItem(this.option);\n if ([Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the first suggested value.\n // If the filter is empty and the popover is not displayed, opens the popover and moves visual focus to the first option.\n // Moves visual focus to the next option.\n // If visual focus is on the last option, moves visual focus to the first option.\n cursor = isNavigationStart ? Cursor.NEXT : Cursor.FIRST;\n } else if ([Keys.UP, Keys.ARROWUP].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the last suggested value.\n // If the filter is empty, first opens the popover if it is not already displayed and then moves visual focus to the last option.\n // Moves visual focus to the previous option.\n // If visual focus is on the first option, moves visual focus to the last option.\n cursor = isNavigationStart ? Cursor.PREVIOUS : Cursor.LAST;\n }\n\n // update scroll and visual focused option in wrapper\n this.loadingWrapper({ name: 'scroll', cursor });\n\n // open popover\n this.popoverDisplay = true;\n break;\n\n case Keys.LEFT:\n case Keys.ARROWLEFT:\n case Keys.HOME:\n case Keys.RIGHT:\n case Keys.ARROWRIGHT:\n case Keys.END:\n // skip process if visual focus is not in popover\n if (!isItem(this.option)) break;\n guard = true;\n\n // Remove visual focus from popover options\n this.option = null;\n\n let index;\n if (Keys.HOME === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the beginning of the field.\n index = 0;\n } else if (Keys.END === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the end of the field.\n index = this.filter.length;\n }\n if (typeof index === 'number') {\n this.input.setSelectionRange(index, index);\n }\n break;\n\n case Keys.ESC:\n case Keys.ESCAPE:\n guard = true;\n\n if (this.popoverDisplay) {\n // If the popover is displayed, closes it.\n this.popoverDisplay = false;\n } else {\n // If the popover is not displayed, clears the filter.\n this.setValue(null);\n this.filter = '';\n // Sets visual focus on the textbox.\n this.option = null;\n }\n break;\n\n default:\n // Remove visual focus from popover options\n this.option = null;\n break;\n }\n\n if (guard) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n\n /**\n * Scroll to next option from cursor\n * @param index - targeted option index to scroll into\n */\n private scrollToIndex = (index: number): void => {\n this.element.shadowRoot.querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)?.scrollIntoView();\n };\n\n /**\n * Is option the current value\n * @param option - option to match with\n * @returns true if option is the current value\n */\n private isCurrentOption = (option: Option) => (isItem(this.value) ? this.value.value : this.value) === option.value;\n\n /**\n * Set value prop\n * @param newValue - slected option item\n */\n private setValue(newValue: MgInputCombobox['option'] | null): void {\n if (!isItem(newValue)) {\n this.value = '';\n } else {\n this.value = allItemsAreString(this.items || this.options.items) ? newValue.title : { ...newValue };\n }\n }\n\n /**\n * get value prop title\n * @returns value title\n */\n private getValueTitle = (): Option['title'] => {\n if (this.value && isItem(this.value)) return this.value.title;\n else if (typeof this.value === 'string') return this.value;\n else return '';\n };\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputCombobox['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n // Does have a custom error message\n if (!this.valid && errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (!this.valid && this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n };\n\n /**\n * Get filtered options from `filter` input value\n * @returns filtered options\n */\n private optionsFilter = (option): boolean => (this.filter === '' ? true : option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));\n\n /**\n * Loading wrapper with a given action\n * @param action - wrapped loading action\n * @returns promisified action\n */\n private loadingWrapper = (action: ActionType): Promise<void> => {\n let promise;\n let index: number;\n\n // cache initial loading action if not defined\n if (!Boolean(this.loadingAction)) {\n this.loadingAction = action.name;\n }\n\n // update index\n if (Boolean(this.option) && this.loadingAction !== 'load-more') {\n index = this.page.items.findIndex(option => option.value.toString() === this.option.value.toString());\n } else if (this.loadingAction === 'load-more') {\n index = this.page.items.length - this.page.baseIndex;\n }\n // when action require a loadMore we fetch the API else we report action to next tick\n // Set \"load more\" if action match OR if next item not available in the current page\n if (action.name === 'load-more') {\n // wait for new element render and update scroll position\n // set component loading\n this.isLoading = true;\n promise = this.goToNextPage;\n } else if (\n action.cursor === Cursor.NEXT &&\n this.page.items.length <= this.page.total &&\n index + this.page.baseIndex === this.page.items.length &&\n index + this.page.baseIndex < this.page.total\n ) {\n // trigger load-more from button to benefit from `disabled-on-click`\n this.loadMoreElement.click();\n return;\n } else if (action.name === 'scroll') {\n promise = nextTick;\n } else {\n promise = this.updatePage;\n }\n\n return promise()\n .then(() => {\n // parse full items list from options\n const options = this.options.items.filter(this.optionsFilter);\n\n // update visual focus\n if (action.name !== 'load-data') {\n index = this.page.getIndexFromCursor(action.cursor, this.loadingAction === 'load-more' && index >= 0 ? options[index] : this.option);\n }\n this.option = options[index];\n\n // update scroll position\n this.scrollToIndex(index);\n })\n .finally(() => {\n // reset loading after next render\n requestAnimationFrame(() => {\n this.isLoading = false;\n this.loadingAction = undefined;\n });\n });\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private goToNextPage = (): Promise<void> => {\n this.loadMore.emit();\n if (Boolean(this.fetchurl)) {\n return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then(nextPage => {\n if (!Boolean(nextPage)) return;\n // merge items from current page and next page\n const items = [...this.page.items, ...nextPage.items];\n // create new options pagination withe merged items\n this.options = new Paginate(items, { total: nextPage.total, next: nextPage.next, top: items.length });\n });\n } else {\n return nextTick(() => {\n if (typeof this.page.next === 'function') {\n const nextPage = this.page.next();\n this.page = new Page({\n ...nextPage,\n items: [...this.page.items, ...nextPage.items],\n });\n }\n });\n }\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private updatePage = async (): Promise<void> => {\n if (Boolean(this.fetchurl)) {\n return this.getOptions().then(page => {\n if (!Boolean(page)) return;\n // reset current options pagination from API response\n this.options = new Paginate(page.items, { total: page.total, next: page.next, top: page.top });\n });\n } else {\n this.page = this.options.getPage(0, this.optionsFilter);\n }\n };\n\n /**\n * Fetch request\n * @param url - to fetch\n * @returns new page from url\n */\n private getOptions = async (url = this.fetchurl): Promise<Pick<Page<Option>, 'items' | 'top'> & Partial<Page<Option>>> => {\n // add text filter\n const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(this.filter));\n\n try {\n const response = await fetch(updateUrl, this.fetchoptions).then(response => response.json());\n if (!response) return null;\n const items = getObjectValueFromKey<Response, Option[]>(response, this.fetchmappings.response.items).map(\n (item): Option => ({\n title: getObjectValueFromKey<unknown, Option['title']>(item, this.fetchmappings.response.itemTitle),\n value: getObjectValueFromKey<unknown, Option['value']>(item, this.fetchmappings.response.itemValue),\n }),\n );\n const total = Number(getObjectValueFromKey<Response, number>(response, this.fetchmappings.response.total, 0));\n const next = mapUrl(getObjectValueFromKey<Response, string>(response, this.fetchmappings.response.next), this.fetchurl.toString());\n return { items, total, next, top: items.length };\n } catch {}\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchIdentifier(this.identifier);\n this.watchItems(this.items);\n if (Boolean(this.fetchurl)) {\n this.watchFetchUrl(this.fetchurl);\n this.watchFetchOptions(this.fetchoptions);\n this.watchFetchMappings(this.fetchmappings);\n this.loadingWrapper({ name: 'load-data' });\n }\n this.watchValue(this.value);\n this.watchOptions(this.options);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const listId = `${this.identifier}-list`;\n const readonlyValue = this.getValueTitle();\n const withResetButton = this.value && !this.disabled;\n\n let popoverContent: 'list' | 'notfound' | 'notavailable';\n if (this.page?.items.length > 0) popoverContent = 'list';\n else if (this.page?.items.length === 0 && Boolean(this.filter)) popoverContent = 'notfound';\n else if (this.page?.items.length === 0) popoverContent = 'notavailable';\n\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.classes.join(' ')}\n ariaDescribedbyIDs={popoverContent && popoverContent !== 'list' ? [popoverContent] : []}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.value === undefined ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n readonlyValue && <b class=\"mg-c-input__readonly-value\">{readonlyValue}</b>\n ) : (\n <mg-popover\n identifier={this.popoverId}\n placement=\"bottom-start\"\n display={this.popoverDisplay}\n arrow-hide\n style={{\n '--mg-c-input-list-width': Boolean(this.input?.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,\n '--mg-c-input-append-x': withResetButton ? '2' : '1',\n }}\n data-fallback-placement=\"bottom-end\"\n onDisplay-change={this.handlePopoverDisplay}\n >\n <div class=\"mg-c-input__input-group-container\">\n <mg-icon icon=\"magnifying-glass\"></mg-icon>\n <input\n type=\"text\"\n role=\"combobox\"\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.filter}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n aria-expanded={this.popoverDisplay.toString()}\n aria-controls={listId}\n aria-invalid={(this.invalid === true).toString()}\n aria-activedescendant={Boolean(this.option?.value) ? this.option.value : typeof this.value === 'string' ? this.value : this.value?.value}\n onInput={this.handleFilterInput}\n onBlur={this.handleFilterBlur}\n onFocus={this.handleFilterFocus}\n onKeyDown={this.handleFilterKeydown}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n {withResetButton && (\n <mg-button\n class=\"mg-c-input__box-append mg-c-input__reset\"\n variant=\"flat\"\n is-icon\n label={this.messages.general.reset}\n aria-controls={this.identifier}\n tabindex=\"-1\"\n onClick={this.handleResetButton}\n >\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n )}\n <mg-button class=\"mg-c-input__box-append\" variant=\"flat\" is-icon label={this.itemsLabel} tabindex=\"-1\" disabled={this.disabled}>\n <mg-icon icon={`chevron-${this.popoverDisplay ? 'up' : 'down'}`}></mg-icon>\n </mg-button>\n </div>\n <div slot=\"content\" class=\"mg-c-input__popover-container\">\n {popoverContent === 'list' && [\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <ul key=\"list\" class=\"mg-c-input__input-list\" role=\"listbox\" id={listId} aria-label={this.itemsLabel} aria-setsize={this.page.total}>\n {this.page.items.map(option => {\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <li\n role=\"option\"\n class={{\n 'mg-c-input__input-list-item': true,\n 'mg-c-input__input-list-item--focus-visible': this.option === option,\n 'mg-c-input__input-list-item--selected': this.isCurrentOption(option),\n }}\n key={option.title}\n id={option.value.toString()}\n aria-selected={this.isCurrentOption(option).toString()}\n onClick={this.handleOptionClick}\n >\n {option.title}\n {this.isCurrentOption(option) && <mg-icon icon=\"check\"></mg-icon>}\n </li>\n );\n })}\n </ul>,\n this.isLoading && <mg-loader key=\"loader\" message={this.messages.input.combobox.search} class={{ 'mg-u-visually-hidden': Boolean(this.page.next) }}></mg-loader>,\n this.page.next && (\n <mg-button\n key=\"load-more\"\n variant=\"flat\"\n class=\"mg-c-input__load-more\"\n tabIndex={-1}\n disabled={this.isLoading}\n full-width\n disable-on-click\n onClick={this.handleLoadMoreButton}\n aria-controls={listId}\n ref={(el: HTMLMgButtonElement) => {\n if (el !== null) this.loadMoreElement = el;\n }}\n >\n <mg-icon icon=\"chevron-down\"></mg-icon>\n {this.messages.input.combobox.loadMore}\n </mg-button>\n ),\n ]}\n {popoverContent === 'notfound' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notFound}\n </p>\n )}\n {popoverContent === 'notavailable' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notAvailable}\n </p>\n )}\n </div>\n </mg-popover>\n )}\n </mg-input>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-combobox.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,y4OAAy4O;;ACqBp6O;;;;AAIG;AACH,MAAM,MAAM,GAAG,CAAC,IAAa,KAAqB,IAAI,IAAI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,EAAE,EAAE,EACZ,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,kBAAA,EAAA,IAAA,EAGxB,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAA,eAAA,EACnB,MAAM,EACrB,GAAG,EAAE,CAAC,EAAuB,KAAI;oBAC/B,IAAI,EAAE,KAAK,IAAI;AAAE,wBAAA,IAAI,CAAC,eAAe,GAAG,EAAE;iBAC3C,EAAA,EAED,CAAS,CAAA,SAAA,EAAA,EAAA,IAAI,EAAC,cAAc,EAAW,CAAA,EACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAC5B,CACb;AACF,SAAA,EACA,cAAc,KAAK,UAAU,KAC5B,SAAG,EAAE,EAAE,cAAc,EAAE,KAAK,EAAC,0BAA0B,EACpD,EAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CACpC,CACL,EACA,cAAc,KAAK,cAAc,KAChC,CAAG,CAAA,GAAA,EAAA,EAAA,EAAE,EAAE,cAAc,EAAE,KAAK,EAAC,0BAA0B,EACpD,EAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CACxC,CACL,CACG,CACK,CACd,CACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isObject","MgInputCombobox","__stencil_proxyCustomElement","Paginate","ClassList","formatID","Cursor","nextTick","Page","getObjectValueFromKey","toString","allItemsAreString","isValidString"],"sources":["../styles/dist/components/mg-input-combobox.css?tag=mg-input-combobox&encapsulation=shadow","src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.tsx"],"sourcesContent":[".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left: 0;--mg-c-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right: 0;--mg-c-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right: var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right: var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.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}}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical: 0;--mg-c-popover-padding-horizontal: 0}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width: var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}/*# sourceMappingURL=mg-input-combobox.css.map */\n","import { Component, Event, h, Prop, EventEmitter, State, Element, Method, Watch } from '@stencil/core';\nimport {\n allItemsAreString,\n ClassList,\n getObjectValueFromKey,\n isValidString,\n nextTick,\n Page,\n Paginate,\n Cursor,\n type CursorType,\n toString,\n isObject,\n formatID,\n} from '@mgdis/stencil-helpers';\nimport { type ActionType, type RequestMappingType, type ResponseMappingType } from './mg-input-combobox.conf';\nimport { type TooltipPosition, type Width, type EventType, widths, classReadonly, classDisabled } from '../mg-input/mg-input.conf';\nimport type { Option } from '../../../../types';\nimport { initLocales } from '../../../../locales';\nimport { Keys } from '../../../../utils/events.utils';\n\n/**\n * Check if object is an item\n * @param item - object to check\n * @returns True if object is an item\n */\nconst isItem = (item: unknown): item is Option => item && typeof item === 'object' && typeof (item as Option).title === 'string' && (item as Option).value !== undefined;\n\n/**\n * Check if objects are items\n * @param items - items to check\n * @returns True if objects are items\n */\nconst isItems = (items: unknown[]): items is Option[] => Array.isArray(items) && items.every(isItem);\n\n/**\n * Check if object is valid combobox fetchmappings\n * @param value - to validate\n * @returns truthy if mapping is valid\n */\nconst isFetchmappings = (value: unknown): value is MgInputCombobox['fetchmappings'] => {\n const isValidRoot = isObject<Record<string, unknown>>(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');\n if (isValidRoot) {\n const { request, response } = value as MgInputCombobox['fetchmappings'];\n if ([request, response].some(property => !isObject(property))) return false;\n const isValidRequest = typeof request.filter === 'string';\n const isValidResponse =\n typeof response === 'object' &&\n typeof response.total === 'string' &&\n typeof response.items === 'string' &&\n typeof response.next === 'string' &&\n typeof response.itemTitle === 'string' &&\n (typeof response.itemValue === 'string' || response.itemValue === undefined);\n return isValidRequest && isValidResponse;\n } else {\n return isValidRoot;\n }\n};\n\n@Component({\n tag: 'mg-input-combobox',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-combobox.css',\n shadow: true,\n})\nexport class MgInputCombobox {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classFocus = 'mg-u-is-focused';\n\n // HTML selector\n private input: HTMLInputElement;\n private loadMoreElement: HTMLMgButtonElement;\n private popoverId: string;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n private handlerInProgress: EventType;\n private loadingAction: ActionType['name'];\n private debounce: boolean;\n\n private page: Page<Option>;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputComboboxElement;\n\n /**\n * Define component value\n */\n @Prop({ mutable: true, reflect: true }) value: string | Option;\n @Watch('value')\n watchValue(newValue: MgInputCombobox['value']): void {\n this.filter = this.getValueTitle();\n this.valueChange.emit(newValue);\n }\n\n /**\n * Define components items\n */\n @Prop() items: (string | Option)[];\n @Watch('items')\n watchItems(newValue: MgInputCombobox['items']) {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n // skip newValue check\n return;\n } else if (Boolean(this.fetchurl) && Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"items\" values cannot be use with \"fetchurl\" prop defined. Passed value: ${toString(newValue)}.`);\n }\n // Empty options\n else if (Array.isArray(newValue) && newValue.length === 0) {\n this.options = new Paginate([]);\n }\n // String array\n else if (allItemsAreString(newValue)) {\n this.options = new Paginate(\n newValue.map(item => ({ title: item, value: item })),\n { total: newValue.length },\n );\n }\n // Object array\n else if (isItems(newValue)) {\n this.options = new Paginate(newValue, { total: newValue.length });\n } else {\n throw new Error(`<mg-input-combobox> prop \"items\" values must be the same type, string or Option. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define items label\n * Include short description. Required for accessibility.\n * @example\n * ```\n * Countries\n * ```\n */\n @Prop() itemsLabel!: string;\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n watchIdentifier(newValue: MgInputCombobox['identifier']): void {\n if (Boolean(newValue)) {\n this.popoverId = `${newValue}-popover`;\n this.element.dataset.mgPopoverGuard = this.popoverId;\n }\n }\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Define input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help combobox.\n */\n @Prop() placeholder?: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputCombobox['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n watchValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input === undefined) return;\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputCombobox['disabled']): void {\n if (newValue) {\n this.classCollection.add(classDisabled);\n } else {\n this.classCollection.delete(classDisabled);\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputCombobox['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n this.classCollection = new ClassList(this.classCollection.classes);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define API url to fetch\n * @example\n * ```\n * {\n * url: \"http://myapi.com?$select='href,name'&my-custom-param='my-custom-value'\", // url to fetch\n * }\n * ```\n */\n @Prop() fetchurl?: string | URL;\n @Watch('fetchurl')\n watchFetchUrl(newValue: MgInputCombobox['fetchurl']): void {\n if (Boolean(newValue)) {\n this.loadingWrapper({ name: 'load-data' });\n }\n }\n\n /**\n * Define fetch options object\n * Require `fetchurl` prop to be defined otherwith it will be ignored if defined\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/RequestInit}\n * @example JSON headers:\n * ```json\n * {\n * \"headers\": {\n * \"authorization\": \"my-token\"\n * }\n * }\n * ```\n */\n @Prop() fetchoptions?: RequestInit;\n @Watch('fetchoptions')\n watchFetchOptions(newValue: MgInputCombobox['fetchoptions']): void {\n if (this.fetchurl && newValue && !isObject(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchoptions\" value must be a valid RequestInit. Passed value: ${toString(newValue)}.`);\n } else {\n new Request(this.fetchurl, newValue);\n }\n }\n\n /**\n * Define fetch request mappings.\n * Required with `fetchurl`\n * @example\n * ```\n * {\n * request: {\n * filter: 'name', // `filter` key\n * },\n * response: {\n * total: 'body.data.total', // response object mapping to get `total` value\n * items: 'body.data.results' // response object mapping to get `items` value\n * next: 'body.next' // response object mapping to get `next` items\n * itemTitle: 'name', // item property to map on item['title']\n * itemValue: 'href', // item property to map on item['value']\n * }\n * }\n * ```\n */\n @Prop() fetchmappings?: { request: RequestMappingType; response: ResponseMappingType };\n @Watch('fetchmappings')\n watchFetchMappings(newValue: MgInputCombobox['fetchmappings']): void {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchmappings\" is required with \"fetchurl\" prop.`);\n } else if (Boolean(newValue) && !isFetchmappings(newValue)) {\n throw new Error(\n `<mg-input-combobox> prop \"fetchmappings\" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${toString(newValue)}.`,\n );\n }\n }\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Define if items are loading\n */\n @State() isLoading: boolean;\n\n /**\n * Formated items for display\n */\n @State() options: Paginate<Option> = new Paginate([]);\n @Watch('options')\n watchOptions(newValue: Paginate<Option>): void {\n this.page = newValue.getPage(0, Boolean(this.filter) ? this.optionsFilter : undefined);\n }\n\n /**\n * Active option\n */\n @State() option: Option;\n\n /**\n * Option filter\n */\n @State() filter: string = '';\n @Watch('filter')\n watchFilter(newValue: MgInputCombobox['filter']): void {\n this.loadingWrapper({ name: 'load-data' });\n this.filterChange.emit(newValue);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Popover display state\n */\n @State() popoverDisplay = false;\n @Watch('popoverDisplay')\n watchPopoverDisplay(newValue: MgInputCombobox['popoverDisplay']): void {\n if (newValue) {\n this.classCollection.add(this.classFocus);\n this.input.focus();\n this.scrollToIndex(0);\n } else {\n // remove visual focus\n this.option = null;\n // reset filter with value\n this.filter = this.getValueTitle();\n this.classCollection.delete(this.classFocus);\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n }\n }\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputComboboxElement['value']>;\n\n /**\n * Emited event when filter change\n */\n @Event({ eventName: 'filter-change' }) filterChange: EventEmitter<string>;\n\n /**\n * Emited event when `load-more` is called\n */\n @Event({ eventName: 'load-more' }) loadMore: EventEmitter<void>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputComboboxElement['valid']>;\n\n /**\n * Emited event when fetch API throw an error\n */\n @Event({ eventName: 'fetch-error' }) fetchError: EventEmitter<Error>;\n\n /**\n * Public method to play input focus\n */\n @Method()\n async setFocus(): Promise<void> {\n this.input.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its concombobox by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given concombobox.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputCombobox['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (this.readonly) return;\n this.setValue(null);\n this.option = null;\n this.filter = '';\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n }\n\n /**\n * Handle `click` event on option\n * @param event - option element click event\n */\n private handleOptionClick = (event: MouseEvent & { target: HTMLLIElement }) => {\n this.setValue(this.options.items.find(option => formatID(option.value) === event.target.id));\n this.popoverDisplay = false;\n };\n\n /**\n * Handle `click` event on reset button\n * @param event - click event\n */\n private handleResetButton = (event: MouseEvent): void => {\n event.stopPropagation();\n this.reset().then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `display-change` event on mg-popover\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.popoverDisplay = event.detail;\n };\n\n /**\n * Handle input event\n */\n private handleFilterInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) this.setErrorMessage();\n if (!this.popoverDisplay) this.popoverDisplay = true;\n\n // update filter with debounce to prevent filter update overload\n if (!this.debounce) {\n this.debounce = true;\n setTimeout(() => {\n this.filter = this.input.value;\n this.debounce = false;\n }, 250);\n }\n };\n\n /**\n * Handle `blur` event\n */\n private handleFilterBlur = (): void => {\n // skip process if popover is displayed\n if (this.popoverDisplay) return;\n\n // Display Error\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Handle `focus` event\n */\n private handleFilterFocus = (): void => {\n // ensure visual focus is always clear on focus when component isn't in loading state\n if (!this.isLoading) {\n this.option = null;\n }\n };\n\n /**\n * Handle load-more <mg-button> `click`\n */\n private handleLoadMoreButton = (): void => {\n this.loadingWrapper({ name: 'load-more', cursor: Cursor.NEXT }).then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `keypress` event\n * @param event - keyboard event\n */\n private handleFilterKeydown = (event: KeyboardEvent): void => {\n if (this.disabled || event.ctrlKey || event.shiftKey) return;\n\n let guard = false;\n\n // override keys actions\n switch (event.key) {\n case Keys.TAB:\n case Keys.ENTER:\n guard = event.key === Keys.ENTER;\n const option = this.option || this.options.items.find(this.isCurrentOption);\n // Sets the value to the content of the focused option in the listbox.\n if (this.popoverDisplay) this.setValue(this.page.total > 0 ? option : null);\n // Closes the popover.\n this.popoverDisplay = false;\n break;\n\n case Keys.DOWN:\n case Keys.ARROWDOWN:\n case Keys.UP:\n case Keys.ARROWUP:\n guard = true;\n if (this.isLoading || !(this.page.total > 0)) {\n this.popoverDisplay = true;\n break;\n }\n\n if (Boolean(event.altKey) && [Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // Opens the popover without moving focus or changing selection.\n this.popoverDisplay = true;\n break;\n }\n\n // define cursor\n let cursor: CursorType;\n const isNavigationStart = this.popoverDisplay && isItem(this.option);\n if ([Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the first suggested value.\n // If the filter is empty and the popover is not displayed, opens the popover and moves visual focus to the first option.\n // Moves visual focus to the next option.\n // If visual focus is on the last option, moves visual focus to the first option.\n cursor = isNavigationStart ? Cursor.NEXT : Cursor.FIRST;\n } else if ([Keys.UP, Keys.ARROWUP].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the last suggested value.\n // If the filter is empty, first opens the popover if it is not already displayed and then moves visual focus to the last option.\n // Moves visual focus to the previous option.\n // If visual focus is on the first option, moves visual focus to the last option.\n cursor = isNavigationStart ? Cursor.PREVIOUS : Cursor.LAST;\n }\n\n // update scroll and visual focused option in wrapper\n this.loadingWrapper({ name: 'scroll', cursor });\n\n // open popover\n this.popoverDisplay = true;\n break;\n\n case Keys.LEFT:\n case Keys.ARROWLEFT:\n case Keys.HOME:\n case Keys.RIGHT:\n case Keys.ARROWRIGHT:\n case Keys.END:\n // skip process if visual focus is not in popover\n if (!isItem(this.option)) break;\n guard = true;\n\n // Remove visual focus from popover options\n this.option = null;\n\n let index;\n if (Keys.HOME === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the beginning of the field.\n index = 0;\n } else if (Keys.END === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the end of the field.\n index = this.filter.length;\n }\n if (typeof index === 'number') {\n this.input.setSelectionRange(index, index);\n }\n break;\n\n case Keys.ESC:\n case Keys.ESCAPE:\n guard = true;\n\n if (this.popoverDisplay) {\n // If the popover is displayed, closes it.\n this.popoverDisplay = false;\n } else {\n // If the popover is not displayed, clears the filter.\n this.setValue(null);\n this.filter = '';\n // Sets visual focus on the textbox.\n this.option = null;\n }\n break;\n\n default:\n // Remove visual focus from popover options\n this.option = null;\n break;\n }\n\n if (guard) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n\n /**\n * Scroll to next option from cursor\n * @param index - targeted option index to scroll into\n */\n private scrollToIndex = (index: number): void => {\n this.element.shadowRoot.querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)?.scrollIntoView();\n };\n\n /**\n * Is option the current value\n * @param option - option to match with\n * @returns true if option is the current value\n */\n private isCurrentOption = (option: Option) => (isItem(this.value) ? this.value.value : this.value) === option.value;\n\n /**\n * Set value prop\n * @param newValue - slected option item\n */\n private setValue(newValue: MgInputCombobox['option'] | null): void {\n if (!isItem(newValue)) {\n this.value = '';\n } else if (allItemsAreString(this.items || this.options.items)) {\n this.value = newValue.title;\n } else {\n this.value = { ...newValue };\n }\n }\n\n /**\n * get value prop title\n * @returns value title\n */\n private getValueTitle = (): Option['title'] => {\n if (this.value && isItem(this.value)) return this.value.title;\n else if (typeof this.value === 'string') return this.value;\n else return '';\n };\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputCombobox['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n // Does have a custom error message\n if (!this.valid && errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (!this.valid && this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n };\n\n /**\n * Get filtered options from `filter` input value\n * @returns filtered options\n */\n private optionsFilter = (option): boolean => (this.filter === '' ? true : option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));\n\n /**\n * Loading wrapper with a given action\n * @param action - wrapped loading action\n * @returns promisified action\n */\n private loadingWrapper = (action: ActionType): Promise<void> => {\n let promise;\n let index: number;\n\n // cache initial loading action if not defined\n if (!Boolean(this.loadingAction)) {\n this.loadingAction = action.name;\n }\n\n // update index\n if (Boolean(this.option) && this.loadingAction !== 'load-more') {\n index = this.page.items.findIndex(option => option.value.toString() === this.option.value.toString());\n } else if (this.loadingAction === 'load-more') {\n index = this.page.items.length - this.page.baseIndex;\n }\n // when action require a loadMore we fetch the API else we report action to next tick\n // Set \"load more\" if action match OR if next item not available in the current page\n if (action.name === 'load-more') {\n // wait for new element render and update scroll position\n // set component loading\n this.isLoading = true;\n promise = this.goToNextPage;\n } else if (\n action.cursor === Cursor.NEXT &&\n this.page.items.length <= this.page.total &&\n index + this.page.baseIndex === this.page.items.length &&\n index + this.page.baseIndex < this.page.total\n ) {\n // trigger load-more from button to benefit from `disabled-on-click`\n this.loadMoreElement.click();\n return;\n } else if (action.name === 'scroll') {\n promise = nextTick;\n } else {\n promise = this.updatePage;\n }\n\n return promise()\n .then(() => {\n // parse full items list from options\n const options = this.options.items.filter(this.optionsFilter);\n\n // update visual focus\n if (action.name !== 'load-data') {\n index = this.page.getIndexFromCursor(action.cursor, this.loadingAction === 'load-more' && index >= 0 ? options[index] : this.option);\n }\n this.option = options[index];\n\n // update scroll position\n this.scrollToIndex(index);\n })\n .finally(() => {\n // reset loading after next render\n requestAnimationFrame(() => {\n this.isLoading = false;\n this.loadingAction = undefined;\n });\n });\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private goToNextPage = (): Promise<void> => {\n this.loadMore.emit();\n if (Boolean(this.fetchurl)) {\n return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then(nextPage => {\n if (!Boolean(nextPage)) return;\n // merge items from current page and next page\n const items = [...this.page.items, ...nextPage.items];\n // create new options pagination withe merged items\n this.options = new Paginate(items, { total: nextPage.total, next: nextPage.next, top: items.length });\n });\n } else {\n return nextTick(() => {\n if (typeof this.page.next === 'function') {\n const nextPage = this.page.next();\n this.page = new Page({\n ...nextPage,\n items: [...this.page.items, ...nextPage.items],\n });\n }\n });\n }\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private updatePage = async (): Promise<void> => {\n if (Boolean(this.fetchurl)) {\n return this.getOptions().then(page => {\n if (!Boolean(page)) return;\n // reset current options pagination from API response\n this.options = new Paginate(page.items, { total: page.total, next: page.next, top: page.top });\n });\n } else {\n this.page = this.options.getPage(0, this.optionsFilter);\n }\n };\n\n /**\n * Fetch request\n * @param url - to fetch\n * @returns new page from url\n */\n private getOptions = async (url = this.fetchurl): Promise<Pick<Page<Option>, 'items' | 'top'> & Partial<Page<Option>>> => {\n // add text filter\n const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(this.filter));\n\n try {\n const response = await fetch(updateUrl, this.fetchoptions);\n if (!response.ok) {\n this.fetchError.emit(new Error(`${response.status} - ${response.statusText}`));\n return;\n }\n const json = await response.json();\n const items = getObjectValueFromKey<Response, Option[]>(json, this.fetchmappings.response.items).map(\n (item): Option => ({\n title: getObjectValueFromKey<unknown, Option['title']>(item, this.fetchmappings.response.itemTitle),\n value: this.fetchmappings.response.itemValue ? getObjectValueFromKey<unknown, Option['value']>(item, this.fetchmappings.response.itemValue) : item,\n }),\n );\n const total = Number(getObjectValueFromKey<Response, number>(json, this.fetchmappings.response.total, 0));\n const next = getObjectValueFromKey<Response, string>(json, this.fetchmappings.response.next);\n return { items, total, next, top: items.length };\n } catch (error) {\n this.fetchError.emit(error);\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchIdentifier(this.identifier);\n this.watchItems(this.items);\n if (Boolean(this.fetchurl)) {\n this.watchFetchOptions(this.fetchoptions);\n this.watchFetchMappings(this.fetchmappings);\n this.loadingWrapper({ name: 'load-data' });\n }\n this.watchValue(this.value);\n this.watchOptions(this.options);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const listId = `${this.identifier}-list`;\n const readonlyValue = this.getValueTitle();\n const withResetButton = this.value && !this.disabled;\n\n let popoverContent: 'list' | 'notfound' | 'notavailable';\n if (this.page?.items.length > 0) popoverContent = 'list';\n else if (this.page?.items.length === 0 && Boolean(this.filter)) popoverContent = 'notfound';\n else if (this.page?.items.length === 0) popoverContent = 'notavailable';\n\n let activeDescendant;\n if (Boolean(this.option?.value)) {\n activeDescendant = this.option.value;\n } else if (typeof this.value === 'string') {\n activeDescendant = this.value;\n } else {\n activeDescendant = this.value?.value;\n }\n\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.classes.join(' ')}\n ariaDescribedbyIDs={popoverContent && popoverContent !== 'list' ? [popoverContent] : []}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.value === undefined ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n readonlyValue && <b class=\"mg-c-input__readonly-value\">{readonlyValue}</b>\n ) : (\n <mg-popover\n identifier={this.popoverId}\n placement=\"bottom-start\"\n display={this.popoverDisplay}\n arrow-hide\n style={{\n '--mg-c-input-list-width': Boolean(this.input?.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,\n }}\n data-fallback-placement=\"bottom-end\"\n onDisplay-change={this.handlePopoverDisplay}\n >\n <div class=\"mg-c-input__input-group-container\">\n <mg-icon icon=\"magnifying-glass\"></mg-icon>\n <input\n type=\"text\"\n role=\"combobox\"\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.filter}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n aria-expanded={this.popoverDisplay.toString()}\n aria-controls={listId}\n aria-invalid={(this.invalid === true).toString()}\n aria-activedescendant={formatID(activeDescendant)}\n onInput={this.handleFilterInput}\n onBlur={this.handleFilterBlur}\n onFocus={this.handleFilterFocus}\n onKeyDown={this.handleFilterKeydown}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n {withResetButton ? (\n <mg-button\n class=\"mg-c-input__box-append mg-c-input__reset\"\n variant=\"flat\"\n is-icon\n label={this.messages.general.reset}\n aria-controls={this.identifier}\n tabindex=\"-1\"\n onClick={this.handleResetButton}\n >\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n ) : (\n <mg-button class=\"mg-c-input__box-append\" variant=\"flat\" is-icon label={this.itemsLabel} tabindex=\"-1\" disabled={this.disabled}>\n <mg-icon icon={`chevron-${this.popoverDisplay ? 'up' : 'down'}`}></mg-icon>\n </mg-button>\n )}\n </div>\n <div slot=\"content\" class=\"mg-c-input__popover-container\">\n {popoverContent === 'list' && [\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <ul key=\"list\" class=\"mg-c-input__input-list\" role=\"listbox\" id={listId} aria-label={this.itemsLabel} aria-setsize={this.page.total}>\n {this.page.items.map(option => {\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <li\n role=\"option\"\n class={{\n 'mg-c-input__input-list-item': true,\n 'mg-c-input__input-list-item--focus-visible': JSON.stringify(this.option?.value) === JSON.stringify(option.value),\n 'mg-c-input__input-list-item--selected': this.isCurrentOption(option),\n }}\n key={option.title}\n id={formatID(option.value)}\n aria-selected={this.isCurrentOption(option).toString()}\n onClick={this.handleOptionClick}\n >\n {option.title}\n {this.isCurrentOption(option) && <mg-icon icon=\"check\"></mg-icon>}\n </li>\n );\n })}\n </ul>,\n this.isLoading && <mg-loader key=\"loader\" message={this.messages.input.combobox.search} class={{ 'mg-u-visually-hidden': Boolean(this.page.next) }}></mg-loader>,\n this.page.next && (\n <mg-button\n key=\"load-more\"\n variant=\"flat\"\n class=\"mg-c-input__load-more\"\n tabIndex={-1}\n disabled={this.isLoading}\n full-width\n disable-on-click\n onClick={this.handleLoadMoreButton}\n aria-controls={listId}\n ref={(el: HTMLMgButtonElement) => {\n if (el !== null) this.loadMoreElement = el;\n }}\n >\n <mg-icon icon=\"chevron-down\"></mg-icon>\n {this.messages.input.combobox.loadMore}\n </mg-button>\n ),\n ]}\n {popoverContent === 'notfound' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notFound}\n </p>\n )}\n {popoverContent === 'notavailable' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notAvailable}\n </p>\n )}\n </div>\n </mg-popover>\n )}\n </mg-input>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { Z as Zt, D as De, L as Lt, F as Ft, d as ar, e as ir, G as Gt } from './index.es.js';
2
+ import { a as qt, q as qe, P as Pt, Z as Zt, u as ur, f as fr, Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-icon2.js';
@@ -57,13 +57,13 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
57
57
  /**
58
58
  * Component classes
59
59
  */
60
- this.classCollection = new Zt(['mg-c-input--date']);
60
+ this.classCollection = new qt(['mg-c-input--date']);
61
61
  /**
62
62
  * Method to validate date pattern string
63
63
  * @param value - value to test
64
64
  * @returns truthy when value match the pattern
65
65
  */
66
- this.isValidPattern = (value) => De(value) && Lt.test(value);
66
+ this.isValidPattern = (value) => qe(value) && Pt.test(value);
67
67
  /**
68
68
  * Format help text to display
69
69
  * @param helpText - help text format
@@ -77,23 +77,23 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
77
77
  }
78
78
  const defaultHelpTextVariable = '{defaultHelpText}';
79
79
  // If a custom helpText is provided, store it but don't return it directly
80
- let text = De(helpText) ? helpText : this.messages.input.date.helpText.expectedFormat;
80
+ let text = qe(helpText) ? helpText : this.messages.input.date.helpText.expectedFormat;
81
81
  // Handle defaultHelpText
82
82
  if (text.includes(defaultHelpTextVariable)) {
83
83
  text = text.replace(defaultHelpTextVariable, this.formatHelpText(this.messages.input.date.helpText.expectedFormat));
84
84
  }
85
85
  // Replace pattern and date variables
86
- text = text.replace('{pattern}', this.renderPattern()).replace('{date}', Ft(ar(new Date('2025-12-24')), this.systemLocale));
86
+ text = text.replace('{pattern}', this.renderPattern()).replace('{date}', Zt(ur(new Date('2025-12-24')), this.systemLocale));
87
87
  // Add additional message for min/max if necessary
88
88
  let rangeMessage;
89
89
  if (((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.max !== DEFAULT_MAX_DATE) {
90
- rangeMessage = this.messages.input.date.helpText.minMax.replace('{min}', Ft(this.min, this.systemLocale)).replace('{max}', Ft(this.max, this.systemLocale));
90
+ rangeMessage = this.messages.input.date.helpText.minMax.replace('{min}', Zt(this.min, this.systemLocale)).replace('{max}', Zt(this.max, this.systemLocale));
91
91
  }
92
92
  else if (((_b = this.min) === null || _b === void 0 ? void 0 : _b.length) > 0) {
93
- rangeMessage = this.messages.input.date.helpText.min.replace('{min}', Ft(this.min, this.systemLocale));
93
+ rangeMessage = this.messages.input.date.helpText.min.replace('{min}', Zt(this.min, this.systemLocale));
94
94
  }
95
95
  else if (this.max !== DEFAULT_MAX_DATE) {
96
- rangeMessage = this.messages.input.date.helpText.max.replace('{max}', Ft(this.max, this.systemLocale));
96
+ rangeMessage = this.messages.input.date.helpText.max.replace('{max}', Zt(this.max, this.systemLocale));
97
97
  }
98
98
  // Combine custom helpText with range message if both exist
99
99
  if (text !== undefined && rangeMessage !== undefined) {
@@ -190,15 +190,15 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
190
190
  // min, max & minMax
191
191
  else if (['min', 'max', 'minMax'].includes(inputError)) {
192
192
  this.errorMessage = this.messages.input.date.helpText[inputError]
193
- .replace('{min}', Ft(this.min, this.systemLocale))
194
- .replace('{max}', Ft(this.max, this.systemLocale));
193
+ .replace('{min}', Zt(this.min, this.systemLocale))
194
+ .replace('{max}', Zt(this.max, this.systemLocale));
195
195
  }
196
196
  // wrong date format
197
197
  // element.validity.badInput is default error message
198
198
  else {
199
199
  this.errorMessage = this.messages.input.date.error.badInput
200
200
  .replace('{pattern}', this.renderPattern())
201
- .replace('{date}', Ft(ar(new Date('2025-12-24')), this.systemLocale));
201
+ .replace('{date}', Zt(ur(new Date('2025-12-24')), this.systemLocale));
202
202
  }
203
203
  }
204
204
  };
@@ -207,7 +207,7 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
207
207
  * @returns translated html pattern
208
208
  */
209
209
  this.renderPattern = () => {
210
- let patternLocal = ir(this.systemLocale);
210
+ let patternLocal = fr(this.systemLocale);
211
211
  for (const key in this.messages.input.date.pattern) {
212
212
  patternLocal = patternLocal.replace(key, this.messages.input.date.pattern[key]);
213
213
  }
@@ -222,9 +222,9 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
222
222
  // - `undefined` is not allowed in CustomEvent['detail']
223
223
  this.value = null;
224
224
  }
225
- else if (newValue && !De(newValue)) {
225
+ else if (newValue && !qe(newValue)) {
226
226
  // check value validity
227
- throw new Error(`<mg-input-date> props 'value' must be a valid string. Passed value: ${Gt(newValue)}.`);
227
+ throw new Error(`<mg-input-date> props 'value' must be a valid string. Passed value: ${Yt(newValue)}.`);
228
228
  }
229
229
  else if (newValue === null || this.isValidPattern(newValue)) {
230
230
  this.valueChange.emit(newValue);
@@ -241,7 +241,7 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
241
241
  }
242
242
  validateMinMax(newValue) {
243
243
  if (newValue && !this.isValidPattern(newValue)) {
244
- throw new Error(`<mg-input-date> props 'min/max' doesn't match pattern: 'yyyy-mm-dd'. Passed value: ${Gt(newValue)}.`);
244
+ throw new Error(`<mg-input-date> props 'min/max' doesn't match pattern: 'yyyy-mm-dd'. Passed value: ${Yt(newValue)}.`);
245
245
  }
246
246
  }
247
247
  handleValidityChange(newValue, _oldValue, prop) {
@@ -291,7 +291,7 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
291
291
  if (typeof valid !== 'boolean') {
292
292
  throw new Error('<mg-input-date> method "setError()" param "valid" must be a boolean.');
293
293
  }
294
- else if (!De(errorMessage)) {
294
+ else if (!qe(errorMessage)) {
295
295
  throw new Error('<mg-input-date> method "setError()" param "errorMessage" must be a string.');
296
296
  }
297
297
  else {
@@ -357,7 +357,7 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class MgInputDate extends
357
357
  * @returns HTML Element
358
358
  */
359
359
  render() {
360
- return (h("mg-input", { key: '504777cb807b9747a6c854d7056cb5420eb2cdcf', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, Ft(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
360
+ return (h("mg-input", { key: '504777cb807b9747a6c854d7056cb5420eb2cdcf', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, Zt(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
361
361
  if (el !== null)
362
362
  this.input = el;
363
363
  } }))));
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { Z as Zt, l as lr, f as fr, g as cr, o as or, D as De, G as Gt } from './index.es.js';
2
+ import { a as qt, g as gr, i as dr, $ as $r, p as pr, q as qe, Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-icon2.js';
@@ -83,7 +83,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
83
83
  /**
84
84
  * Component classes
85
85
  */
86
- this.classCollection = new Zt(['mg-c-input--numeric']);
86
+ this.classCollection = new qt(['mg-c-input--numeric']);
87
87
  /**
88
88
  * Handle input event
89
89
  */
@@ -126,7 +126,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
126
126
  * @param value - value to format
127
127
  * @returns formatted value according to locale
128
128
  */
129
- this.formatErrorValue = (value) => lr(value, this.locale, !Number.isInteger(value) && this.type === 'decimal' ? this.decimalLength : 0);
129
+ this.formatErrorValue = (value) => gr(value, this.locale, !Number.isInteger(value) && this.type === 'decimal' ? this.decimalLength : 0);
130
130
  /**
131
131
  * Set input error message
132
132
  * @param errorMessage - errorMessage override
@@ -181,13 +181,13 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
181
181
  this.formatValue = (value) => {
182
182
  switch (this.format) {
183
183
  case 'number':
184
- return lr(value, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
184
+ return gr(value, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
185
185
  case 'currency':
186
- return or(value, this.locale, this.currency);
186
+ return pr(value, this.locale, this.currency);
187
187
  case 'percent':
188
- return cr(value / 100, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
188
+ return $r(value / 100, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
189
189
  case 'unit':
190
- return fr(value, this.locale, this.unit, this.unitDisplay, this.type === 'decimal' ? this.decimalLength : undefined);
190
+ return dr(value, this.locale, this.unit, this.unitDisplay, this.type === 'decimal' ? this.decimalLength : undefined);
191
191
  case 'none':
192
192
  return value.toString();
193
193
  }
@@ -218,7 +218,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
218
218
  return undefined;
219
219
  }
220
220
  // If a custom helpText is provided, store it but don't return it directly
221
- const text = De(helpText) ? helpText : undefined;
221
+ const text = qe(helpText) ? helpText : undefined;
222
222
  // If neither min nor max are defined, and there's no custom helpText,
223
223
  // we can return undefined as there's no message to display
224
224
  if (this.min === undefined && this.max === undefined && text === undefined) {
@@ -302,22 +302,22 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
302
302
  }
303
303
  validateType(newValue) {
304
304
  if (!types.includes(newValue)) {
305
- throw new Error(`<mg-input-numeric> prop "type" must be one of: ${types.join(', ')}. Passed value: ${Gt(newValue)}.`);
305
+ throw new Error(`<mg-input-numeric> prop "type" must be one of: ${types.join(', ')}. Passed value: ${Yt(newValue)}.`);
306
306
  }
307
307
  }
308
308
  watchFormat(newValue) {
309
309
  if (!formats.includes(newValue)) {
310
- throw new Error(`<mg-input-numeric> prop "format" must be one of: ${formats.join(', ')}. Passed value: ${Gt(newValue)}.`);
310
+ throw new Error(`<mg-input-numeric> prop "format" must be one of: ${formats.join(', ')}. Passed value: ${Yt(newValue)}.`);
311
311
  }
312
312
  }
313
313
  validateIntegerLength(newValue) {
314
314
  if (newValue < 1) {
315
- throw new Error(`<mg-input-numeric> prop "integer-length" must be a positive number. Passed value: ${Gt(newValue)}.`);
315
+ throw new Error(`<mg-input-numeric> prop "integer-length" must be a positive number. Passed value: ${Yt(newValue)}.`);
316
316
  }
317
317
  }
318
318
  validateDecimalLength(newValue) {
319
319
  if (newValue < 1) {
320
- throw new Error(`<mg-input-numeric> prop "decimal-length" must be a positive number, consider using prop "type" to "integer" instead. Passed value: ${Gt(newValue)}.`);
320
+ throw new Error(`<mg-input-numeric> prop "decimal-length" must be a positive number, consider using prop "type" to "integer" instead. Passed value: ${Yt(newValue)}.`);
321
321
  }
322
322
  }
323
323
  /**
@@ -351,7 +351,7 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class MgInputNumeric e
351
351
  if (typeof valid !== 'boolean') {
352
352
  throw new Error('<mg-input-numeric> method "setError()" param "valid" must be a boolean.');
353
353
  }
354
- else if (!De(errorMessage)) {
354
+ else if (!qe(errorMessage)) {
355
355
  throw new Error('<mg-input-numeric> method "setError()" param "errorMessage" must be a string.');
356
356
  }
357
357
  else {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { Z as Zt, D as De } from './index.es.js';
2
+ import { a as qt, q as qe } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$7 } from './mg-button2.js';
@@ -55,7 +55,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class MgInputPassword
55
55
  /**
56
56
  * Component classes
57
57
  */
58
- this.classCollection = new Zt(['mg-c-input--password']);
58
+ this.classCollection = new qt(['mg-c-input--password']);
59
59
  /**
60
60
  * Indicates if password is displayed or not
61
61
  */
@@ -175,7 +175,7 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class MgInputPassword
175
175
  if (typeof valid !== 'boolean') {
176
176
  throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean.');
177
177
  }
178
- else if (!De(errorMessage)) {
178
+ else if (!qe(errorMessage)) {
179
179
  throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string.');
180
180
  }
181
181
  else {