@mgdis/mg-components 6.10.0 → 6.10.1

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 (114) hide show
  1. package/dist/cjs/{index-CfIlskRh.js → index-CL_COdxv.js} +4 -4
  2. package/dist/cjs/{index-CfIlskRh.js.map → index-CL_COdxv.js.map} +1 -1
  3. package/dist/cjs/{index.es-BCLy9yYb.js → index.es-DaPqByCe.js} +82 -82
  4. package/dist/cjs/index.es-DaPqByCe.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mg-action-more_37.cjs.entry.js +1881 -1874
  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 +33 -33
  11. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +12 -12
  12. package/dist/cjs/mg-loader.cjs.entry.js +4 -4
  13. package/dist/cjs/mg-progress.cjs.entry.js +10 -10
  14. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +0 -1
  15. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
  16. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +43 -63
  17. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  18. package/dist/collection/components/molecules/mg-popover/mg-popover.js +47 -97
  19. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  20. package/dist/components/index.es.js +71 -71
  21. package/dist/components/index.es.js.map +1 -1
  22. package/dist/components/index2.js +2 -2
  23. package/dist/components/mg-action-more.js +6 -6
  24. package/dist/components/mg-alert.js +5 -5
  25. package/dist/components/mg-badge2.js +6 -6
  26. package/dist/components/mg-button2.js +6 -6
  27. package/dist/components/mg-character-left2.js +4 -4
  28. package/dist/components/mg-details.js +2 -2
  29. package/dist/components/mg-form.js +7 -7
  30. package/dist/components/mg-icon2.js +6 -6
  31. package/dist/components/mg-illustrated-message.js +5 -5
  32. package/dist/components/mg-input-checkbox.js +9 -9
  33. package/dist/components/mg-input-combobox.js +32 -32
  34. package/dist/components/mg-input-date.js +17 -17
  35. package/dist/components/mg-input-numeric.js +13 -13
  36. package/dist/components/mg-input-password.js +3 -3
  37. package/dist/components/mg-input-radio.js +7 -7
  38. package/dist/components/mg-input-rich-text-editor.js +11 -11
  39. package/dist/components/mg-input-select2.js +7 -7
  40. package/dist/components/mg-input-text2.js +9 -9
  41. package/dist/components/mg-input-textarea.js +7 -7
  42. package/dist/components/mg-input-title2.js +4 -4
  43. package/dist/components/mg-input-toggle.js +6 -6
  44. package/dist/components/mg-input2.js +8 -8
  45. package/dist/components/mg-item-more2.js +7 -7
  46. package/dist/components/mg-loader2.js +3 -3
  47. package/dist/components/mg-menu-item2.js +11 -11
  48. package/dist/components/mg-message2.js +4 -4
  49. package/dist/components/mg-modal.js +8 -8
  50. package/dist/components/mg-pagination2.js +6 -6
  51. package/dist/components/mg-panel.js +9 -9
  52. package/dist/components/mg-popover-content2.js +4 -4
  53. package/dist/components/mg-popover-content2.js.map +1 -1
  54. package/dist/components/mg-popover2.js +48 -96
  55. package/dist/components/mg-popover2.js.map +1 -1
  56. package/dist/components/mg-progress.js +10 -10
  57. package/dist/components/mg-skip-links.js +2 -2
  58. package/dist/components/mg-table.js +6 -6
  59. package/dist/components/mg-tabs.js +12 -12
  60. package/dist/components/mg-tag.js +4 -4
  61. package/dist/components/mg-tooltip-content2.js +1 -1
  62. package/dist/components/mg-tooltip-content2.js.map +1 -1
  63. package/dist/components/mg-tooltip2.js +47 -66
  64. package/dist/components/mg-tooltip2.js.map +1 -1
  65. package/dist/components/popper.js +1793 -0
  66. package/dist/components/popper.js.map +1 -0
  67. package/dist/esm/{index-DmsGewMC.js → index-DALWFL9i.js} +4 -4
  68. package/dist/esm/{index-DmsGewMC.js.map → index-DALWFL9i.js.map} +1 -1
  69. package/dist/esm/{index.es-rLV3KFPd.js → index.es-hNwGkhG6.js} +73 -73
  70. package/dist/esm/index.es-hNwGkhG6.js.map +1 -0
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/mg-action-more_37.entry.js +1881 -1874
  73. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  74. package/dist/esm/mg-alert.entry.js +6 -6
  75. package/dist/esm/mg-components.js +1 -1
  76. package/dist/esm/mg-input-combobox.entry.js +33 -33
  77. package/dist/esm/mg-input-rich-text-editor.entry.js +12 -12
  78. package/dist/esm/mg-loader.entry.js +4 -4
  79. package/dist/esm/mg-progress.entry.js +10 -10
  80. package/dist/mg-components/mg-components.esm.js +1 -1
  81. package/dist/mg-components/{p-88f77de2.entry.js → p-352cfc01.entry.js} +2 -2
  82. package/dist/mg-components/{p-0f761c6c.entry.js → p-68f7de47.entry.js} +2 -2
  83. package/dist/mg-components/{p-DK9teKTo.js → p-Cg3R_y_o.js} +2 -2
  84. package/dist/mg-components/{p-DK9teKTo.js.map → p-Cg3R_y_o.js.map} +1 -1
  85. package/dist/mg-components/{p-cdbe689e.entry.js → p-a52a168c.entry.js} +2 -2
  86. package/dist/mg-components/{p-ad66e7b3.entry.js → p-bf5de898.entry.js} +2 -2
  87. package/dist/mg-components/{p-d3a868f0.entry.js → p-dcefa0b0.entry.js} +2 -2
  88. package/dist/mg-components/p-dcefa0b0.entry.js.map +1 -0
  89. package/dist/mg-components/{p-73099ed7.entry.js → p-e33557f9.entry.js} +2 -2
  90. package/dist/mg-components/{p-rLV3KFPd.js → p-hNwGkhG6.js} +2 -2
  91. package/dist/mg-components/p-hNwGkhG6.js.map +1 -0
  92. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +0 -6
  93. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +6 -8
  94. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +8 -22
  95. package/dist/types/components.d.ts +6 -8
  96. package/ide/intellij/web-types.json +1 -1
  97. package/package.json +9 -9
  98. package/dist/cjs/index.es-BCLy9yYb.js.map +0 -1
  99. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +0 -2
  100. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js.map +0 -1
  101. package/dist/collection/utils/floating-ui.utils.js +0 -74
  102. package/dist/collection/utils/floating-ui.utils.js.map +0 -1
  103. package/dist/components/floating-ui.utils.js +0 -1721
  104. package/dist/components/floating-ui.utils.js.map +0 -1
  105. package/dist/esm/index.es-rLV3KFPd.js.map +0 -1
  106. package/dist/mg-components/p-d3a868f0.entry.js.map +0 -1
  107. package/dist/mg-components/p-rLV3KFPd.js.map +0 -1
  108. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +0 -6
  109. package/dist/types/utils/floating-ui.utils.d.ts +0 -28
  110. /package/dist/mg-components/{p-88f77de2.entry.js.map → p-352cfc01.entry.js.map} +0 -0
  111. /package/dist/mg-components/{p-0f761c6c.entry.js.map → p-68f7de47.entry.js.map} +0 -0
  112. /package/dist/mg-components/{p-cdbe689e.entry.js.map → p-a52a168c.entry.js.map} +0 -0
  113. /package/dist/mg-components/{p-ad66e7b3.entry.js.map → p-bf5de898.entry.js.map} +0 -0
  114. /package/dist/mg-components/{p-73099ed7.entry.js.map → p-e33557f9.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-CAuxALt5.js";export{s as setNonce}from"./p-CAuxALt5.js";import{g as t}from"./p-DQuL1Twl.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-ad66e7b3",[[1,"mg-alert",{"delay":[2],"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"delay":["watchDelay"],"variant":["watchVariant"],"variantStyle":["watchVariantStyle"],"hidden":["watchHidden"]}]]],["p-88f77de2",[[1,"mg-progress",{"label":[1],"ariaRole":[1,"aria-role"],"value":[2],"min":[2],"max":[2]},null,{"label":["watchLabel"],"ariaRole":["watchAriaRole"],"value":["watchValue"],"min":["watchMin"],"max":["watchMax"]}]]],["p-d3a868f0",[[1,"mg-input-checkbox",{"value":[1040],"type":[1025],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"displaySelectedValues":[4,"display-selected-values"],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"editButtonMessage":[1,"edit-button-message"],"showButtonMessage":[1,"show-button-message"],"selectButtonMessage":[1,"select-button-message"],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"selectValuesButtonKey":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"type":["validateType"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"displaySelectedValues":["watchDisplaySelectedValues"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"displaySearchInput":["watchDisplaySearchInput"],"searchValue":["validateSearchValue"]}],[1,"mg-action-more",{"items":[16],"icon":[1040],"button":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"items":["validateItems"],"icon":["validateIcon"],"button":["validateButton"],"displayChevron":["validateDisplayChevron"]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1,"title-pattern"],"titlePatternErrorMessage":[1,"title-pattern-error-message"],"titleEditable":[1028,"title-editable"],"titlePosition":[1,"title-position"],"expanded":[1028],"expandToggleDisplay":[1,"expand-toggle-display"],"expandToggleDisabled":[4,"expand-toggle-disabled"],"classCollection":[32],"isEditing":[32],"updatedPanelTitle":[32]},null,{"identifier":["watchIdentifier"],"panelTitle":["validatePanelTitle"],"titlePattern":["validateTitlePattern"],"titlePatternErrorMessage":["validateTitlePattern"],"titlePosition":["validateTitlePosition"],"expanded":["handleExpanded"],"expandToggleDisplay":["validateExpandToggleDisplay"]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayPassword":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1,"help-text"],"resizable":[1],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"mgWidth":["watchMgWidth"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"],"characterLeftHide":["validatecharacterLeftHide"]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"min":[1],"max":[1],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"min":["validateMinMax","handleValidityChange"],"max":["validateMinMax","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"max":[2],"min":[2],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"type":[1],"format":[1],"currency":[1],"unit":[1],"unitDisplay":[1,"unit-display"],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"min":["handleValidityChange"],"max":["handleValidityChange"],"mgWidth":["watchMgWidth"],"type":["validateType"],"format":["watchFormat"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"readonlyValue":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["validateItems"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"classCollection":[32],"options":[32],"errorMessage":[32],"valid":[32],"checked":[32],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["watchIsOnOff"],"isIcon":["watchIsIcon"],"readonly":["watchReadonly"],"disabled":["watchDisabled"],"checked":["handleChecked"]}],[1,"mg-modal",{"identifier":[1],"dialogRole":[1,"dialog-role"],"modalTitle":[1,"modal-title"],"closeButton":[4,"close-button"],"open":[1028],"hasActions":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"dialogRole":["validateDialogRole"],"modalTitle":["validateModalTitle"],"open":["watchOpen"]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"label":["validateLabel"],"size":["validateSize"],"items":["validateItems"],"activeTab":["validateActiveTab"]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]},null,{"toggleClosed":["validateTitles"],"toggleOpened":["validateTitles"],"expanded":["handleExpanded"]}],[1,"mg-table",{"size":[1],"fullWidth":[4,"full-width"],"columns":[16],"classCollection":[32]},null,{"size":["watchSize"],"fullWidth":["watchFullWidth"],"columns":["watchColumns"]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"requiredMessage":[1,"required-message"],"ariaRole":[1,"aria-role"],"labelOnTop":[4,"label-on-top"],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessageText":[32],"displayError":[64],"reset":[64]},null,{"identifier":["watchIdentifier"],"requiredMessage":["validateRequiredMessage","handleAttributeChange"],"ariaRole":["validateAriaRole"],"labelOnTop":["handlelabelOnTop"],"readonly":["handleAttributeChange"],"disabled":["handleAttributeChange"]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1],"classCollection":[32]},null,{"size":["watchSize"],"direction":["watchDirection"]}],[1,"mg-skip-links",{"links":[16]},null,{"links":["validateLinks"]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classCollection":[32]},null,{"variant":["validateVariant"],"outline":["validateOutline"],"soft":["validateSoft"]}],[2,"mg-input-checkbox-paginated",{"readonly":[4],"disabled":[4],"name":[1],"invalid":[4],"currentPage":[1026,"current-page"],"checkboxes":[16],"messages":[16],"expanded":[32]},null,{"checkboxes":["watchCheckboxes"]}],[1,"mg-message",{"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"variant":["watchVariant"],"variantStyle":["watchVariantStyle"]}],[1,"mg-divider",{"fullWidth":[4,"full-width"]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"hidePageCount":[4,"hide-page-count"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]},null,{"identifier":["watchIdentifier"],"totalPages":["validateTotalPages"],"currentPage":["validateCurrentPage"]}],[1,"mg-input-text",{"value":[1544],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"type":[1],"icon":[1],"placeholder":[1],"datalistoptions":[16],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1025,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"type":["validateType"],"icon":["validateIcon"],"datalistoptions":["validateDatalistoptions"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"pattern":["watchPattern"],"patternErrorMessage":["watchPattern"],"helpText":["watchHelpText"]}],[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1]},[[0,"item-loaded","updateItemListener"]],{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[1,"mg-menu-item",{"identifier":[513],"href":[1],"target":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"identifier":["watchIdentifier"],"target":["watchTarget"],"status":["watchStatus"],"expanded":["watchExpanded"],"size":["watchSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"],"data-style-direction":["watchDataStyleDirection"],"data-has-focus":["watchDataHasFocus"]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[520,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"items":["validateItems"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"identifier":["watchIdentifier"],"maxlength":["validateMaxlength"]}],[1,"mg-badge",{"value":[8],"label":[1],"variant":[1],"outline":[4],"classCollection":[32]},null,{"value":["validateValue"],"label":["validateLabel"],"variant":["validateVariant"],"outline":["validateOutline"]}],[1,"mg-popover",{"identifier":[1],"placement":[1025],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[4]},null,{"identifier":["validateIdentifier"],"placement":["watchPlacement"],"arrowHide":["validateArrowHide"],"closeButton":["validateCloseButton"],"display":["handleDisplay"]}],[1,"mg-popover-content",{"closeButton":[4,"close-button"],"classCollection":[32]}],[1,"mg-card"],[1,"mg-input",{"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"required":[4],"errorMessage":[1,"error-message"],"helpText":[1,"help-text"],"ariaDescribedbyIDs":[16],"isFieldset":[32],"isReadonly":[32],"isDisabled":[32],"isVerticalList":[32]},null,{"identifier":["watchIdentifier","watchAriaDescribedbyIDs"],"labelOnTop":["watchLabelOnTop","watchLabelConfig"],"labelHide":["watchLabelConfig"],"tooltipPosition":["watchTooltipPosition"],"errorMessage":["watchErrorMessage","watchAriaDescribedbyIDs"],"helpText":["watchHelpText","watchAriaDescribedbyIDs"],"ariaDescribedbyIDs":["watchAriaDescribedbyIDs"],"class":["watchClass","watchLabel"],"label":["watchLabel"],"required":["watchLabel"],"isReadonly":["watchLabel"],"isFieldset":["watchLabel"]}],[1,"mg-button",{"variant":[1025],"label":[1],"type":[1],"size":[1],"fullWidth":[4,"full-width"],"form":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classCollection":[32]},null,{"variant":["validateVariant"],"size":["validateSize"],"fullWidth":["validateFullWidth"],"disabled":["disabledHandler"],"isIcon":["watchIsIcon"],"loading":["loadingHandler"]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1025],"display":[1028],"disabled":[4]},null,{"identifier":["watchIdentifier"],"message":["watchMessage"],"placement":["watchPlacement"],"display":["watchDisplay"],"disabled":["watchDisabled"]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"readonly":[4],"isLegend":[4,"is-legend"],"tagName":[32]},null,{"identifier":["validateIdentifier"],"isLegend":["validateIsLegend"]}],[1,"mg-tooltip-content",{"message":[1]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classCollection":[32]},null,{"icon":["validateIcon"],"size":["validateSize"],"variant":["validateVariant"],"variantStyle":["validateVariantStyle"],"spin":["handleSpin"]}]]],["p-cdbe689e",[[1,"mg-loader",{"message":[1],"messageHide":[4,"message-hide"]},null,{"message":["watchMessage"]}]]],["p-0f761c6c",[[1,"mg-input-combobox",{"value":[1537],"items":[16],"itemsLabel":[1,"items-label"],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"fetchurl":[1],"fetchoptions":[16],"fetchmappings":[16],"valid":[1028],"invalid":[1028],"isLoading":[32],"options":[32],"option":[32],"filter":[32],"classCollection":[32],"errorMessage":[32],"popoverDisplay":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["watchItems"],"identifier":["watchIdentifier"],"readonly":["watchReadonly","watchValidityChange"],"required":["watchValidityChange"],"disabled":["watchValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"fetchurl":["watchFetchUrl"],"fetchoptions":["watchFetchOptions"],"fetchmappings":["watchFetchMappings"],"options":["watchOptions"],"filter":["watchFilter"],"popoverDisplay":["watchPopoverDisplay"]}]]],["p-73099ed7",[[1,"mg-input-rich-text-editor",{"value":[1025],"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"rows":[2],"required":[4],"readonly":[4],"disabled":[4],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"modules":[16],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"getHTML":[64],"getText":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"readonly":["watchReadonly","handleValidityChange"],"disabled":["watchDisabled","handleValidityChange"],"required":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}]]]]'),e)}));
1
+ import{p as e,b as a}from"./p-CAuxALt5.js";export{s as setNonce}from"./p-CAuxALt5.js";import{g as t}from"./p-DQuL1Twl.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-bf5de898",[[1,"mg-alert",{"delay":[2],"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"delay":["watchDelay"],"variant":["watchVariant"],"variantStyle":["watchVariantStyle"],"hidden":["watchHidden"]}]]],["p-352cfc01",[[1,"mg-progress",{"label":[1],"ariaRole":[1,"aria-role"],"value":[2],"min":[2],"max":[2]},null,{"label":["watchLabel"],"ariaRole":["watchAriaRole"],"value":["watchValue"],"min":["watchMin"],"max":["watchMax"]}]]],["p-dcefa0b0",[[1,"mg-input-checkbox",{"value":[1040],"type":[1025],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"displaySelectedValues":[4,"display-selected-values"],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"editButtonMessage":[1,"edit-button-message"],"showButtonMessage":[1,"show-button-message"],"selectButtonMessage":[1,"select-button-message"],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"selectValuesButtonKey":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"type":["validateType"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"displaySelectedValues":["watchDisplaySelectedValues"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"displaySearchInput":["watchDisplaySearchInput"],"searchValue":["validateSearchValue"]}],[1,"mg-action-more",{"items":[16],"icon":[1040],"button":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"items":["validateItems"],"icon":["validateIcon"],"button":["validateButton"],"displayChevron":["validateDisplayChevron"]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1,"title-pattern"],"titlePatternErrorMessage":[1,"title-pattern-error-message"],"titleEditable":[1028,"title-editable"],"titlePosition":[1,"title-position"],"expanded":[1028],"expandToggleDisplay":[1,"expand-toggle-display"],"expandToggleDisabled":[4,"expand-toggle-disabled"],"classCollection":[32],"isEditing":[32],"updatedPanelTitle":[32]},null,{"identifier":["watchIdentifier"],"panelTitle":["validatePanelTitle"],"titlePattern":["validateTitlePattern"],"titlePatternErrorMessage":["validateTitlePattern"],"titlePosition":["validateTitlePosition"],"expanded":["handleExpanded"],"expandToggleDisplay":["validateExpandToggleDisplay"]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayPassword":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1,"help-text"],"resizable":[1],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"mgWidth":["watchMgWidth"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"],"characterLeftHide":["validatecharacterLeftHide"]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"min":[1],"max":[1],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"min":["validateMinMax","handleValidityChange"],"max":["validateMinMax","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"max":[2],"min":[2],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"type":[1],"format":[1],"currency":[1],"unit":[1],"unitDisplay":[1,"unit-display"],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"min":["handleValidityChange"],"max":["handleValidityChange"],"mgWidth":["watchMgWidth"],"type":["validateType"],"format":["watchFormat"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"readonlyValue":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["validateItems"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"classCollection":[32],"options":[32],"errorMessage":[32],"valid":[32],"checked":[32],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["watchIsOnOff"],"isIcon":["watchIsIcon"],"readonly":["watchReadonly"],"disabled":["watchDisabled"],"checked":["handleChecked"]}],[1,"mg-modal",{"identifier":[1],"dialogRole":[1,"dialog-role"],"modalTitle":[1,"modal-title"],"closeButton":[4,"close-button"],"open":[1028],"hasActions":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"dialogRole":["validateDialogRole"],"modalTitle":["validateModalTitle"],"open":["watchOpen"]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"label":["validateLabel"],"size":["validateSize"],"items":["validateItems"],"activeTab":["validateActiveTab"]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]},null,{"toggleClosed":["validateTitles"],"toggleOpened":["validateTitles"],"expanded":["handleExpanded"]}],[1,"mg-table",{"size":[1],"fullWidth":[4,"full-width"],"columns":[16],"classCollection":[32]},null,{"size":["watchSize"],"fullWidth":["watchFullWidth"],"columns":["watchColumns"]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"requiredMessage":[1,"required-message"],"ariaRole":[1,"aria-role"],"labelOnTop":[4,"label-on-top"],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessageText":[32],"displayError":[64],"reset":[64]},null,{"identifier":["watchIdentifier"],"requiredMessage":["validateRequiredMessage","handleAttributeChange"],"ariaRole":["validateAriaRole"],"labelOnTop":["handlelabelOnTop"],"readonly":["handleAttributeChange"],"disabled":["handleAttributeChange"]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1],"classCollection":[32]},null,{"size":["watchSize"],"direction":["watchDirection"]}],[1,"mg-skip-links",{"links":[16]},null,{"links":["validateLinks"]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classCollection":[32]},null,{"variant":["validateVariant"],"outline":["validateOutline"],"soft":["validateSoft"]}],[2,"mg-input-checkbox-paginated",{"readonly":[4],"disabled":[4],"name":[1],"invalid":[4],"currentPage":[1026,"current-page"],"checkboxes":[16],"messages":[16],"expanded":[32]},null,{"checkboxes":["watchCheckboxes"]}],[1,"mg-message",{"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"variant":["watchVariant"],"variantStyle":["watchVariantStyle"]}],[1,"mg-divider",{"fullWidth":[4,"full-width"]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"hidePageCount":[4,"hide-page-count"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]},null,{"identifier":["watchIdentifier"],"totalPages":["validateTotalPages"],"currentPage":["validateCurrentPage"]}],[1,"mg-input-text",{"value":[1544],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"type":[1],"icon":[1],"placeholder":[1],"datalistoptions":[16],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1025,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"type":["validateType"],"icon":["validateIcon"],"datalistoptions":["validateDatalistoptions"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"pattern":["watchPattern"],"patternErrorMessage":["watchPattern"],"helpText":["watchHelpText"]}],[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1]},[[0,"item-loaded","updateItemListener"]],{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[1,"mg-menu-item",{"identifier":[513],"href":[1],"target":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"identifier":["watchIdentifier"],"target":["watchTarget"],"status":["watchStatus"],"expanded":["watchExpanded"],"size":["watchSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"],"data-style-direction":["watchDataStyleDirection"],"data-has-focus":["watchDataHasFocus"]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[520,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"items":["validateItems"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"identifier":["watchIdentifier"],"maxlength":["validateMaxlength"]}],[1,"mg-badge",{"value":[8],"label":[1],"variant":[1],"outline":[4],"classCollection":[32]},null,{"value":["validateValue"],"label":["validateLabel"],"variant":["validateVariant"],"outline":["validateOutline"]}],[1,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[4]},null,{"identifier":["validateIdentifier"],"arrowHide":["validateArrowHide"],"closeButton":["validateCloseButton"],"display":["handleDisplay"]}],[1,"mg-popover-content",{"closeButton":[4,"close-button"],"classCollection":[32]}],[1,"mg-card"],[1,"mg-input",{"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"required":[4],"errorMessage":[1,"error-message"],"helpText":[1,"help-text"],"ariaDescribedbyIDs":[16],"isFieldset":[32],"isReadonly":[32],"isDisabled":[32],"isVerticalList":[32]},null,{"identifier":["watchIdentifier","watchAriaDescribedbyIDs"],"labelOnTop":["watchLabelOnTop","watchLabelConfig"],"labelHide":["watchLabelConfig"],"tooltipPosition":["watchTooltipPosition"],"errorMessage":["watchErrorMessage","watchAriaDescribedbyIDs"],"helpText":["watchHelpText","watchAriaDescribedbyIDs"],"ariaDescribedbyIDs":["watchAriaDescribedbyIDs"],"class":["watchClass","watchLabel"],"label":["watchLabel"],"required":["watchLabel"],"isReadonly":["watchLabel"],"isFieldset":["watchLabel"]}],[1,"mg-button",{"variant":[1025],"label":[1],"type":[1],"size":[1],"fullWidth":[4,"full-width"],"form":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classCollection":[32]},null,{"variant":["validateVariant"],"size":["validateSize"],"fullWidth":["validateFullWidth"],"disabled":["disabledHandler"],"isIcon":["watchIsIcon"],"loading":["loadingHandler"]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[4]},null,{"identifier":["watchIdentifier"],"message":["watchMessage"],"display":["watchDisplay"],"disabled":["watchDisabled"]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"readonly":[4],"isLegend":[4,"is-legend"],"tagName":[32]},null,{"identifier":["validateIdentifier"],"isLegend":["validateIsLegend"]}],[1,"mg-tooltip-content",{"message":[1]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classCollection":[32]},null,{"icon":["validateIcon"],"size":["validateSize"],"variant":["validateVariant"],"variantStyle":["validateVariantStyle"],"spin":["handleSpin"]}]]],["p-a52a168c",[[1,"mg-loader",{"message":[1],"messageHide":[4,"message-hide"]},null,{"message":["watchMessage"]}]]],["p-68f7de47",[[1,"mg-input-combobox",{"value":[1537],"items":[16],"itemsLabel":[1,"items-label"],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"fetchurl":[1],"fetchoptions":[16],"fetchmappings":[16],"valid":[1028],"invalid":[1028],"isLoading":[32],"options":[32],"option":[32],"filter":[32],"classCollection":[32],"errorMessage":[32],"popoverDisplay":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["watchItems"],"identifier":["watchIdentifier"],"readonly":["watchReadonly","watchValidityChange"],"required":["watchValidityChange"],"disabled":["watchValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"fetchurl":["watchFetchUrl"],"fetchoptions":["watchFetchOptions"],"fetchmappings":["watchFetchMappings"],"options":["watchOptions"],"filter":["watchFilter"],"popoverDisplay":["watchPopoverDisplay"]}]]],["p-e33557f9",[[1,"mg-input-rich-text-editor",{"value":[1025],"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"rows":[2],"required":[4],"readonly":[4],"disabled":[4],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"modules":[16],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"getHTML":[64],"getText":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"readonly":["watchReadonly","handleValidityChange"],"disabled":["watchDisabled","handleValidityChange"],"required":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}]]]]'),e)}));
2
2
  //# sourceMappingURL=mg-components.esm.js.map
@@ -1,2 +1,2 @@
1
- import{r,h as s,H as e}from"./p-CAuxALt5.js";import{a,G as o,W as i}from"./p-rLV3KFPd.js";const t=["progressbar","meter"];const c="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";const g=class{constructor(s){r(this,s);this.ariaRole="progressbar";this.value=0;this.min=0;this.max=100}watchLabel(r){if(!a(r)){throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}}watchAriaRole(r){if(r&&!t.includes(r)){throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${o(r)}.`)}}watchValue(r){if(r!==undefined&&(!i(r)||!(r>=this.min&&r<=this.max)))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(r!==0&&r!==undefined&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(r!==100&&r!==undefined&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label);this.watchAriaRole(this.ariaRole);this.watchMin(this.min);this.watchMax(this.max);this.watchValue(this.value)}render(){return s(e,{key:"c2a8b5264af27dab4f81981a6d20d04d572321db",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"1ab08ca9582182c7c2e9cf1041e68cfd38390e3b",class:"mg-c-progress"},s("div",{key:"95044f35b5fcc1b5eb380828acc3935ff30c6c1f",class:{"mg-c-progress__bar":true,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"4d3588379c0b1a135dd9118fd2cb3c00c9dd31cb",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};g.style=c;export{g as mg_progress};
2
- //# sourceMappingURL=p-88f77de2.entry.js.map
1
+ import{r,h as s,H as e}from"./p-CAuxALt5.js";import{a,X as o,K as i}from"./p-hNwGkhG6.js";const t=["progressbar","meter"];const c="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";const g=class{constructor(s){r(this,s);this.ariaRole="progressbar";this.value=0;this.min=0;this.max=100}watchLabel(r){if(!a(r)){throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}}watchAriaRole(r){if(r&&!t.includes(r)){throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${o(r)}.`)}}watchValue(r){if(r!==undefined&&(!i(r)||!(r>=this.min&&r<=this.max)))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(r!==0&&r!==undefined&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(r!==100&&r!==undefined&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label);this.watchAriaRole(this.ariaRole);this.watchMin(this.min);this.watchMax(this.max);this.watchValue(this.value)}render(){return s(e,{key:"c2a8b5264af27dab4f81981a6d20d04d572321db",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"1ab08ca9582182c7c2e9cf1041e68cfd38390e3b",class:"mg-c-progress"},s("div",{key:"95044f35b5fcc1b5eb380828acc3935ff30c6c1f",class:{"mg-c-progress__bar":true,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"4d3588379c0b1a135dd9118fd2cb3c00c9dd31cb",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};g.style=c;export{g as mg_progress};
2
+ //# sourceMappingURL=p-352cfc01.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-CAuxALt5.js";import{Y as n,Z as o,K as a,X as r,q as h,G as c,D as p,i as u,a as m,H as l}from"./p-rLV3KFPd.js";import{c as g,a as d,w as b}from"./p-CNgv8hc5.js";import{i as f}from"./p-DK9teKTo.js";import{K as v}from"./p-yMGqY8YG.js";const w=".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}";const _=t=>t&&typeof t==="object"&&typeof t.title==="string"&&t.value!==undefined;const x=t=>Array.isArray(t)&&t.every(_);const y=t=>{const i=u(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:e}=t;if([i,e].some((t=>!u(t))))return false;const s=typeof i.filter==="string";const n=typeof e==="object"&&typeof e.total==="string"&&typeof e.items==="string"&&typeof e.next==="string"&&typeof e.itemTitle==="string"&&typeof e.itemValue==="string";return s&&n}else{return i}};const z=(t,i)=>{if(!Boolean(t))return;else if(URL.canParse(t)){return t}const e=t.includes("?")&&t.split("?").pop();if(Boolean(e)){const{origin:t,pathname:s}=new URL(i);return`${t}${s}?${e}`}else{return t}};const k=class{constructor(e){t(this,e);this.valueChange=i(this,"value-change");this.filterChange=i(this,"filter-change");this.loadMore=i(this,"load-more");this.inputValid=i(this,"input-valid");this.classFocus="mg-u-is-focused";this.hasDisplayedError=false;this.name=this.identifier;this.labelOnTop=false;this.labelHide=false;this.required=false;this.readonly=false;this.disabled=false;this.mgWidth="full";this.tooltipPosition="input";this.options=new n([]);this.filter="";this.classCollection=new o(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]);this.popoverDisplay=false;this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>i.value===t.target.id)));this.popoverDisplay=false};this.handleResetButton=t=>{t.stopPropagation();this.reset().then((()=>{this.input.focus()}))};this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail};this.handleFilterInput=()=>{this.checkValidity();if(this.hasDisplayedError)this.setErrorMessage();if(!this.popoverDisplay)this.popoverDisplay=true;this.filter=this.input.value};this.handleFilterBlur=()=>{if(this.popoverDisplay)return;this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))};this.handleFilterFocus=()=>{if(!this.isLoading){this.option=null}};this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:a.NEXT}).then((()=>{this.input.focus()}))};this.handleFilterKeydown=t=>{if(this.disabled||t.ctrlKey||t.shiftKey)return;let i=false;switch(t.key){case v.TAB:case v.ENTER:i=t.key===v.ENTER;const e=this.option||this.options.items.find(this.isCurrentOption);if(this.popoverDisplay)this.setValue(this.page.total>0?e:null);this.popoverDisplay=false;break;case v.DOWN:case v.ARROWDOWN:case v.UP:case v.ARROWUP:i=true;if(this.isLoading||!(this.page.total>0)){this.popoverDisplay=true;break}if(Boolean(t.altKey)&&[v.DOWN,v.ARROWDOWN].includes(t.key)){this.popoverDisplay=true;break}let s;const n=this.popoverDisplay&&_(this.option);if([v.DOWN,v.ARROWDOWN].includes(t.key)){s=n?a.NEXT:a.FIRST}else if([v.UP,v.ARROWUP].includes(t.key)){s=n?a.PREVIOUS:a.LAST}this.loadingWrapper({name:"scroll",cursor:s});this.popoverDisplay=true;break;case v.LEFT:case v.ARROWLEFT:case v.HOME:case v.RIGHT:case v.ARROWRIGHT:case v.END:if(!_(this.option))break;i=true;this.option=null;let o;if(v.HOME===t.key){o=0}else if(v.END===t.key){o=this.filter.length}if(typeof o==="number"){this.input.setSelectionRange(o,o)}break;case v.ESC:case v.ESCAPE:i=true;if(this.popoverDisplay){this.popoverDisplay=false}else{this.setValue(null);this.filter="";this.option=null}break;default:this.option=null;break}if(i){t.stopPropagation();t.preventDefault()}};this.scrollToIndex=t=>{var i;(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))===null||i===void 0?void 0:i.scrollIntoView()};this.isCurrentOption=t=>(_(this.value)?this.value.value:this.value)===t.value;this.getValueTitle=()=>{if(this.value&&_(this.value))return this.value.title;else if(typeof this.value==="string")return this.value;else return""};this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||this.input.checkValidity())};this.setErrorMessage=t=>{this.errorMessage=undefined;if(!this.valid&&t!==undefined){this.errorMessage=t}else if(!this.valid&&this.input.validity.valueMissing){this.errorMessage=this.messages.errors.required}};this.optionsFilter=t=>this.filter===""?true:t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase());this.loadingWrapper=t=>{let i;let e;if(!Boolean(this.loadingAction)){this.loadingAction=t.name}if(Boolean(this.option)&&this.loadingAction!=="load-more"){e=this.page.items.findIndex((t=>t.value.toString()===this.option.value.toString()))}else if(this.loadingAction==="load-more"){e=this.page.items.length-this.page.baseIndex}if(t.name==="load-more"){this.isLoading=true;i=this.goToNextPage}else if(t.cursor===a.NEXT&&this.page.items.length<=this.page.total&&e+this.page.baseIndex===this.page.items.length&&e+this.page.baseIndex<this.page.total){this.loadMoreElement.click();return}else if(t.name==="scroll"){i=r}else{i=this.updatePage}return i().then((()=>{const i=this.options.items.filter(this.optionsFilter);if(t.name!=="load-data"){e=this.page.getIndexFromCursor(t.cursor,this.loadingAction==="load-more"&&e>=0?i[e]:this.option)}this.option=i[e];this.scrollToIndex(e)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=false;this.loadingAction=undefined}))}))};this.goToNextPage=()=>{this.loadMore.emit();if(Boolean(this.fetchurl)){return this.getOptions(typeof this.page.next==="string"?this.page.next:undefined).then((t=>{if(!Boolean(t))return;const i=[...this.page.items,...t.items];this.options=new n(i,{total:t.total,next:t.next,top:i.length})}))}else{return r((()=>{if(typeof this.page.next==="function"){const t=this.page.next();this.page=new l(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items]}))}}))}};this.updatePage=async()=>{if(Boolean(this.fetchurl)){return this.getOptions().then((t=>{if(!Boolean(t))return;this.options=new n(t.items,{total:t.total,next:t.next,top:t.top})}))}else{this.page=this.options.getPage(0,this.optionsFilter)}};this.getOptions=async(t=this.fetchurl)=>{const i=(typeof t==="string"?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(this.filter));try{const t=await fetch(i,this.fetchoptions).then((t=>t.json()));if(!t)return null;const e=h(t,this.fetchmappings.response.items).map((t=>({title:h(t,this.fetchmappings.response.itemTitle),value:h(t,this.fetchmappings.response.itemValue)})));const s=Number(h(t,this.fetchmappings.response.total,0));const n=z(h(t,this.fetchmappings.response.next),this.fetchurl.toString());return{items:e,total:s,next:n,top:e.length}}catch(t){}}}watchValue(t){this.filter=this.getValueTitle();this.valueChange.emit(t)}watchItems(t){if(Boolean(this.fetchurl)&&!Boolean(t)){return}else if(Boolean(this.fetchurl)&&Boolean(t)){throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${c(t)}.`)}else if(Array.isArray(t)&&t.length===0){this.options=new n([])}else if(p(t)){this.options=new n(t.map((t=>({title:t,value:t}))),{total:t.length})}else if(x(t)){this.options=new n(t,{total:t.length})}else{throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${c(t)}.`)}}watchIdentifier(t){if(Boolean(t)){this.popoverId=`${t}-popover`;this.element.dataset.mgPopoverGuard=this.popoverId}}watchReadonly(t){if(t)this.classCollection.add(g);else this.classCollection.delete(g)}watchValidityChange(t,i,e){if(this.input===undefined)return;this.input[e]=t;this.checkValidity();if(this.hasDisplayedError){this.setErrorMessage();this.hasDisplayedError=false}}watchDisabled(t){if(t){this.classCollection.add(d)}else{this.classCollection.delete(d)}}watchMgWidth(t){b.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)}));if(t!==undefined)this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);this.classCollection=new o(this.classCollection.classes)}watchFetchUrl(t){if(t&&!URL.canParse(t)){throw new Error(`<mg-input-combobox> prop "fetchurl" value must be URL or string. Passed value: ${c(t)}.`)}}watchFetchOptions(t){if(this.fetchurl&&t&&!u(t)){throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${c(t)}.`)}else{new Request(this.fetchurl,t)}}watchFetchMappings(t){if(Boolean(this.fetchurl)&&!Boolean(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.`)}else if(Boolean(t)&&!y(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${c(t)}.`)}}watchOptions(t){this.page=t.getPage(0,Boolean(this.filter)?this.optionsFilter:undefined)}watchFilter(t){this.loadingWrapper({name:"load-data"});this.filterChange.emit(t)}watchPopoverDisplay(t){if(t){this.classCollection.add(this.classFocus);this.input.focus();this.scrollToIndex(0)}else{this.option=null;this.filter=this.getValueTitle();this.classCollection.delete(this.classFocus);this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))}}async setFocus(){this.input.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity();this.setErrorMessage();this.hasDisplayedError=this.invalid;t()}))}))}async setError(t,i){if(typeof t!=="boolean"){throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.')}else if(!m(i)){throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.')}else{this.setValidity(t);this.setErrorMessage(t?undefined:i);this.hasDisplayedError=this.invalid}}async reset(){if(this.readonly)return;this.setValue(null);this.option=null;this.filter="";this.checkValidity();this.errorMessage=undefined;this.hasDisplayedError=false}setValue(t){if(!_(t)){this.value=""}else{this.value=p(this.items||this.options.items)?t.title:Object.assign({},t)}}setValidity(t){const i=this.valid;this.valid=t;this.invalid=!this.valid;if(this.handlerInProgress===undefined||this.handlerInProgress==="blur"&&this.valid!==i)this.inputValid.emit(this.valid)}componentWillLoad(){this.messages=f(this.element).messages;this.watchIdentifier(this.identifier);this.watchItems(this.items);if(Boolean(this.fetchurl)){this.watchFetchUrl(this.fetchurl);this.watchFetchOptions(this.fetchoptions);this.watchFetchMappings(this.fetchmappings);this.loadingWrapper({name:"load-data"})}this.watchValue(this.value);this.watchOptions(this.options);this.watchMgWidth(this.mgWidth);this.watchReadonly(this.readonly);this.watchDisabled(this.disabled);return setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,s,n,o,a;const r=`${this.identifier}-list`;const h=this.getValueTitle();const c=this.value&&!this.disabled;let p;if(((t=this.page)===null||t===void 0?void 0:t.items.length)>0)p="list";else if(((i=this.page)===null||i===void 0?void 0:i.items.length)===0&&Boolean(this.filter))p="notfound";else if(((s=this.page)===null||s===void 0?void 0:s.items.length)===0)p="notavailable";return e("mg-input",{key:"b8c4c6d18bb1d16ff0a8494ddb698cb4e0198e43",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:p&&p!=="list"?[p]:[],labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&this.value===undefined?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?h&&e("b",{class:"mg-c-input__readonly-value"},h):e("mg-popover",{identifier:this.popoverId,placement:"bottom-start",display:this.popoverDisplay,"arrow-hide":true,style:{"--mg-c-input-list-width":Boolean((n=this.input)===null||n===void 0?void 0:n.offsetWidth)?`${this.input.offsetWidth}px`:undefined,"--mg-c-input-append-x":c?"2":"1"},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},e("div",{class:"mg-c-input__input-group-container"},e("mg-icon",{icon:"magnifying-glass"}),e("input",{type:"text",role:"combobox",class:"mg-c-input__box mg-c-input__box--width",value:this.filter,id:this.identifier,name:this.name,placeholder:this.placeholder,title:this.placeholder,disabled:this.disabled,required:this.required,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.popoverDisplay.toString(),"aria-controls":r,"aria-invalid":(this.invalid===true).toString(),"aria-activedescendant":Boolean((o=this.option)===null||o===void 0?void 0:o.value)?this.option.value:typeof this.value==="string"?this.value:(a=this.value)===null||a===void 0?void 0:a.value,onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{if(t!==null)this.input=t}}),c&&e("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":true,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton},e("mg-icon",{icon:"cross"})),e("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":true,label:this.itemsLabel,tabindex:"-1",disabled:this.disabled},e("mg-icon",{icon:`chevron-${this.popoverDisplay?"up":"down"}`}))),e("div",{slot:"content",class:"mg-c-input__popover-container"},p==="list"&&[e("ul",{key:"list",class:"mg-c-input__input-list",role:"listbox",id:r,"aria-label":this.itemsLabel,"aria-setsize":this.page.total},this.page.items.map((t=>e("li",{role:"option",class:{"mg-c-input__input-list-item":true,"mg-c-input__input-list-item--focus-visible":this.option===t,"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:t.value.toString(),"aria-selected":this.isCurrentOption(t).toString(),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&e("mg-icon",{icon:"check"}))))),this.isLoading&&e("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&e("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":true,"disable-on-click":true,onClick:this.handleLoadMoreButton,"aria-controls":r,ref:t=>{if(t!==null)this.loadMoreElement=t}},e("mg-icon",{icon:"chevron-down"}),this.messages.input.combobox.loadMore)],p==="notfound"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),p==="notavailable"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return s(this)}static get watchers(){return{value:["watchValue"],items:["watchItems"],identifier:["watchIdentifier"],readonly:["watchReadonly","watchValidityChange"],required:["watchValidityChange"],disabled:["watchValidityChange","watchDisabled"],mgWidth:["watchMgWidth"],fetchurl:["watchFetchUrl"],fetchoptions:["watchFetchOptions"],fetchmappings:["watchFetchMappings"],options:["watchOptions"],filter:["watchFilter"],popoverDisplay:["watchPopoverDisplay"]}}};k.style=w;export{k as mg_input_combobox};
2
- //# sourceMappingURL=p-0f761c6c.entry.js.map
1
+ import{r as t,c as i,h as e,g as s}from"./p-CAuxALt5.js";import{e as n,H as o,V as a,Q as h,B as r,X as c,q as p,n as u,a as m,G as l}from"./p-hNwGkhG6.js";import{c as g,a as d,w as b}from"./p-CNgv8hc5.js";import{i as f}from"./p-Cg3R_y_o.js";import{K as v}from"./p-yMGqY8YG.js";const w=".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}";const _=t=>t&&typeof t==="object"&&typeof t.title==="string"&&t.value!==undefined;const x=t=>Array.isArray(t)&&t.every(_);const y=t=>{const i=u(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:e}=t;if([i,e].some((t=>!u(t))))return false;const s=typeof i.filter==="string";const n=typeof e==="object"&&typeof e.total==="string"&&typeof e.items==="string"&&typeof e.next==="string"&&typeof e.itemTitle==="string"&&typeof e.itemValue==="string";return s&&n}else{return i}};const z=(t,i)=>{if(!Boolean(t))return;else if(URL.canParse(t)){return t}const e=t.includes("?")&&t.split("?").pop();if(Boolean(e)){const{origin:t,pathname:s}=new URL(i);return`${t}${s}?${e}`}else{return t}};const k=class{constructor(e){t(this,e);this.valueChange=i(this,"value-change");this.filterChange=i(this,"filter-change");this.loadMore=i(this,"load-more");this.inputValid=i(this,"input-valid");this.classFocus="mg-u-is-focused";this.hasDisplayedError=false;this.name=this.identifier;this.labelOnTop=false;this.labelHide=false;this.required=false;this.readonly=false;this.disabled=false;this.mgWidth="full";this.tooltipPosition="input";this.options=new n([]);this.filter="";this.classCollection=new o(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]);this.popoverDisplay=false;this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>i.value===t.target.id)));this.popoverDisplay=false};this.handleResetButton=t=>{t.stopPropagation();this.reset().then((()=>{this.input.focus()}))};this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail};this.handleFilterInput=()=>{this.checkValidity();if(this.hasDisplayedError)this.setErrorMessage();if(!this.popoverDisplay)this.popoverDisplay=true;this.filter=this.input.value};this.handleFilterBlur=()=>{if(this.popoverDisplay)return;this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))};this.handleFilterFocus=()=>{if(!this.isLoading){this.option=null}};this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:a.NEXT}).then((()=>{this.input.focus()}))};this.handleFilterKeydown=t=>{if(this.disabled||t.ctrlKey||t.shiftKey)return;let i=false;switch(t.key){case v.TAB:case v.ENTER:i=t.key===v.ENTER;const e=this.option||this.options.items.find(this.isCurrentOption);if(this.popoverDisplay)this.setValue(this.page.total>0?e:null);this.popoverDisplay=false;break;case v.DOWN:case v.ARROWDOWN:case v.UP:case v.ARROWUP:i=true;if(this.isLoading||!(this.page.total>0)){this.popoverDisplay=true;break}if(Boolean(t.altKey)&&[v.DOWN,v.ARROWDOWN].includes(t.key)){this.popoverDisplay=true;break}let s;const n=this.popoverDisplay&&_(this.option);if([v.DOWN,v.ARROWDOWN].includes(t.key)){s=n?a.NEXT:a.FIRST}else if([v.UP,v.ARROWUP].includes(t.key)){s=n?a.PREVIOUS:a.LAST}this.loadingWrapper({name:"scroll",cursor:s});this.popoverDisplay=true;break;case v.LEFT:case v.ARROWLEFT:case v.HOME:case v.RIGHT:case v.ARROWRIGHT:case v.END:if(!_(this.option))break;i=true;this.option=null;let o;if(v.HOME===t.key){o=0}else if(v.END===t.key){o=this.filter.length}if(typeof o==="number"){this.input.setSelectionRange(o,o)}break;case v.ESC:case v.ESCAPE:i=true;if(this.popoverDisplay){this.popoverDisplay=false}else{this.setValue(null);this.filter="";this.option=null}break;default:this.option=null;break}if(i){t.stopPropagation();t.preventDefault()}};this.scrollToIndex=t=>{var i;(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))===null||i===void 0?void 0:i.scrollIntoView()};this.isCurrentOption=t=>(_(this.value)?this.value.value:this.value)===t.value;this.getValueTitle=()=>{if(this.value&&_(this.value))return this.value.title;else if(typeof this.value==="string")return this.value;else return""};this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||this.input.checkValidity())};this.setErrorMessage=t=>{this.errorMessage=undefined;if(!this.valid&&t!==undefined){this.errorMessage=t}else if(!this.valid&&this.input.validity.valueMissing){this.errorMessage=this.messages.errors.required}};this.optionsFilter=t=>this.filter===""?true:t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase());this.loadingWrapper=t=>{let i;let e;if(!Boolean(this.loadingAction)){this.loadingAction=t.name}if(Boolean(this.option)&&this.loadingAction!=="load-more"){e=this.page.items.findIndex((t=>t.value.toString()===this.option.value.toString()))}else if(this.loadingAction==="load-more"){e=this.page.items.length-this.page.baseIndex}if(t.name==="load-more"){this.isLoading=true;i=this.goToNextPage}else if(t.cursor===a.NEXT&&this.page.items.length<=this.page.total&&e+this.page.baseIndex===this.page.items.length&&e+this.page.baseIndex<this.page.total){this.loadMoreElement.click();return}else if(t.name==="scroll"){i=h}else{i=this.updatePage}return i().then((()=>{const i=this.options.items.filter(this.optionsFilter);if(t.name!=="load-data"){e=this.page.getIndexFromCursor(t.cursor,this.loadingAction==="load-more"&&e>=0?i[e]:this.option)}this.option=i[e];this.scrollToIndex(e)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=false;this.loadingAction=undefined}))}))};this.goToNextPage=()=>{this.loadMore.emit();if(Boolean(this.fetchurl)){return this.getOptions(typeof this.page.next==="string"?this.page.next:undefined).then((t=>{if(!Boolean(t))return;const i=[...this.page.items,...t.items];this.options=new n(i,{total:t.total,next:t.next,top:i.length})}))}else{return h((()=>{if(typeof this.page.next==="function"){const t=this.page.next();this.page=new l(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items]}))}}))}};this.updatePage=async()=>{if(Boolean(this.fetchurl)){return this.getOptions().then((t=>{if(!Boolean(t))return;this.options=new n(t.items,{total:t.total,next:t.next,top:t.top})}))}else{this.page=this.options.getPage(0,this.optionsFilter)}};this.getOptions=async(t=this.fetchurl)=>{const i=(typeof t==="string"?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(this.filter));try{const t=await fetch(i,this.fetchoptions).then((t=>t.json()));if(!t)return null;const e=r(t,this.fetchmappings.response.items).map((t=>({title:r(t,this.fetchmappings.response.itemTitle),value:r(t,this.fetchmappings.response.itemValue)})));const s=Number(r(t,this.fetchmappings.response.total,0));const n=z(r(t,this.fetchmappings.response.next),this.fetchurl.toString());return{items:e,total:s,next:n,top:e.length}}catch(t){}}}watchValue(t){this.filter=this.getValueTitle();this.valueChange.emit(t)}watchItems(t){if(Boolean(this.fetchurl)&&!Boolean(t)){return}else if(Boolean(this.fetchurl)&&Boolean(t)){throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${c(t)}.`)}else if(Array.isArray(t)&&t.length===0){this.options=new n([])}else if(p(t)){this.options=new n(t.map((t=>({title:t,value:t}))),{total:t.length})}else if(x(t)){this.options=new n(t,{total:t.length})}else{throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${c(t)}.`)}}watchIdentifier(t){if(Boolean(t)){this.popoverId=`${t}-popover`;this.element.dataset.mgPopoverGuard=this.popoverId}}watchReadonly(t){if(t)this.classCollection.add(g);else this.classCollection.delete(g)}watchValidityChange(t,i,e){if(this.input===undefined)return;this.input[e]=t;this.checkValidity();if(this.hasDisplayedError){this.setErrorMessage();this.hasDisplayedError=false}}watchDisabled(t){if(t){this.classCollection.add(d)}else{this.classCollection.delete(d)}}watchMgWidth(t){b.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)}));if(t!==undefined)this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);this.classCollection=new o(this.classCollection.classes)}watchFetchUrl(t){if(t&&!URL.canParse(t)){throw new Error(`<mg-input-combobox> prop "fetchurl" value must be URL or string. Passed value: ${c(t)}.`)}}watchFetchOptions(t){if(this.fetchurl&&t&&!u(t)){throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${c(t)}.`)}else{new Request(this.fetchurl,t)}}watchFetchMappings(t){if(Boolean(this.fetchurl)&&!Boolean(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.`)}else if(Boolean(t)&&!y(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${c(t)}.`)}}watchOptions(t){this.page=t.getPage(0,Boolean(this.filter)?this.optionsFilter:undefined)}watchFilter(t){this.loadingWrapper({name:"load-data"});this.filterChange.emit(t)}watchPopoverDisplay(t){if(t){this.classCollection.add(this.classFocus);this.input.focus();this.scrollToIndex(0)}else{this.option=null;this.filter=this.getValueTitle();this.classCollection.delete(this.classFocus);this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))}}async setFocus(){this.input.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity();this.setErrorMessage();this.hasDisplayedError=this.invalid;t()}))}))}async setError(t,i){if(typeof t!=="boolean"){throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.')}else if(!m(i)){throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.')}else{this.setValidity(t);this.setErrorMessage(t?undefined:i);this.hasDisplayedError=this.invalid}}async reset(){if(this.readonly)return;this.setValue(null);this.option=null;this.filter="";this.checkValidity();this.errorMessage=undefined;this.hasDisplayedError=false}setValue(t){if(!_(t)){this.value=""}else{this.value=p(this.items||this.options.items)?t.title:Object.assign({},t)}}setValidity(t){const i=this.valid;this.valid=t;this.invalid=!this.valid;if(this.handlerInProgress===undefined||this.handlerInProgress==="blur"&&this.valid!==i)this.inputValid.emit(this.valid)}componentWillLoad(){this.messages=f(this.element).messages;this.watchIdentifier(this.identifier);this.watchItems(this.items);if(Boolean(this.fetchurl)){this.watchFetchUrl(this.fetchurl);this.watchFetchOptions(this.fetchoptions);this.watchFetchMappings(this.fetchmappings);this.loadingWrapper({name:"load-data"})}this.watchValue(this.value);this.watchOptions(this.options);this.watchMgWidth(this.mgWidth);this.watchReadonly(this.readonly);this.watchDisabled(this.disabled);return setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,s,n,o,a;const h=`${this.identifier}-list`;const r=this.getValueTitle();const c=this.value&&!this.disabled;let p;if(((t=this.page)===null||t===void 0?void 0:t.items.length)>0)p="list";else if(((i=this.page)===null||i===void 0?void 0:i.items.length)===0&&Boolean(this.filter))p="notfound";else if(((s=this.page)===null||s===void 0?void 0:s.items.length)===0)p="notavailable";return e("mg-input",{key:"b8c4c6d18bb1d16ff0a8494ddb698cb4e0198e43",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:p&&p!=="list"?[p]:[],labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&this.value===undefined?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?r&&e("b",{class:"mg-c-input__readonly-value"},r):e("mg-popover",{identifier:this.popoverId,placement:"bottom-start",display:this.popoverDisplay,"arrow-hide":true,style:{"--mg-c-input-list-width":Boolean((n=this.input)===null||n===void 0?void 0:n.offsetWidth)?`${this.input.offsetWidth}px`:undefined,"--mg-c-input-append-x":c?"2":"1"},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},e("div",{class:"mg-c-input__input-group-container"},e("mg-icon",{icon:"magnifying-glass"}),e("input",{type:"text",role:"combobox",class:"mg-c-input__box mg-c-input__box--width",value:this.filter,id:this.identifier,name:this.name,placeholder:this.placeholder,title:this.placeholder,disabled:this.disabled,required:this.required,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.popoverDisplay.toString(),"aria-controls":h,"aria-invalid":(this.invalid===true).toString(),"aria-activedescendant":Boolean((o=this.option)===null||o===void 0?void 0:o.value)?this.option.value:typeof this.value==="string"?this.value:(a=this.value)===null||a===void 0?void 0:a.value,onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{if(t!==null)this.input=t}}),c&&e("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":true,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton},e("mg-icon",{icon:"cross"})),e("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":true,label:this.itemsLabel,tabindex:"-1",disabled:this.disabled},e("mg-icon",{icon:`chevron-${this.popoverDisplay?"up":"down"}`}))),e("div",{slot:"content",class:"mg-c-input__popover-container"},p==="list"&&[e("ul",{key:"list",class:"mg-c-input__input-list",role:"listbox",id:h,"aria-label":this.itemsLabel,"aria-setsize":this.page.total},this.page.items.map((t=>e("li",{role:"option",class:{"mg-c-input__input-list-item":true,"mg-c-input__input-list-item--focus-visible":this.option===t,"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:t.value.toString(),"aria-selected":this.isCurrentOption(t).toString(),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&e("mg-icon",{icon:"check"}))))),this.isLoading&&e("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&e("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":true,"disable-on-click":true,onClick:this.handleLoadMoreButton,"aria-controls":h,ref:t=>{if(t!==null)this.loadMoreElement=t}},e("mg-icon",{icon:"chevron-down"}),this.messages.input.combobox.loadMore)],p==="notfound"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),p==="notavailable"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return s(this)}static get watchers(){return{value:["watchValue"],items:["watchItems"],identifier:["watchIdentifier"],readonly:["watchReadonly","watchValidityChange"],required:["watchValidityChange"],disabled:["watchValidityChange","watchDisabled"],mgWidth:["watchMgWidth"],fetchurl:["watchFetchUrl"],fetchoptions:["watchFetchOptions"],fetchmappings:["watchFetchMappings"],options:["watchOptions"],filter:["watchFilter"],popoverDisplay:["watchPopoverDisplay"]}}};k.style=w;export{k as mg_input_combobox};
2
+ //# sourceMappingURL=p-68f7de47.entry.js.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./p-rLV3KFPd.js";const t={required:"This field is required."};const a="{counter} characters left.";const s={select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",label:"Enter a value",result:"result",results:"results",searchResults:"Search result(s) list.",noResult:"No result.",sections:{selected:{title:"Selected",titlePlural:"Selected",action:"Unselect all",tooltip:"Unselect all current search results"},notSelected:{title:"Not selected",titlePlural:"Not selected",action:"Select all",tooltip:"Select all current search results"}}},date:{pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"},helpText:{expectedFormat:"Expected format: {pattern} (ex: {date})",min:"The date must be after {min}",max:"The date must be before {max}",minMax:"The date must be between {min} and {max}"},error:{badInput:"The date is inexistent or incorrect, the expected format is {pattern} (ex: {date})"}},numeric:{helpText:{min:"The value must be greater than {min}",max:"The value must be less than {max}",minMax:"The value must be between {min} and {max}"}},password:{display:"Display password value",hide:"Hide password value"},combobox:{notFound:"No elements match your input",notAvailable:"No elements available",loadMore:"Load more",search:"Search…"},text:{helpText:{email:"Expected format: name@example.com",emails:"Expected format: first@example.com, second@example.com",url:"Expected format: https://example.com"},errors:{typeMismatch:{email:"The value is incorrect, the expected format is name@example.com",emails:"The value is incorrect, the expected format is first@example.com, second@example.com",url:"The value is incorrect, the expected format is https://example.com"}}}};const r={required:'Fields with a <strong class="mg-u-is-asterisk">*</strong> are required',requiredSingle:'Field with a <strong class="mg-u-is-asterisk">*</strong> is required',allRequired:"All fields are required",allRequiredSingle:"The field is required"};const l={closeButton:"Close message"};const n={closeButton:"Close modal"};const o={label:"Pagination",page:"page",pages:"pages",nextPage:"Next page",previousPage:"Previous page",selectPage:"Select the page to display."};const i={editLabel:"Edit section title."};const c={navLabel:"Quick access"};const u={confirm:"Confirm",cancel:"Cancel",close:"Close",next:"next",previous:"previous",reset:"reset"};const m={badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"};const d={menuLabel:"Additional menu"};const p={label:"Actions"};const h={inProgress:"Loading in progress…"};const x={sortableCaption:"(column headers with buttons are sortable)"};var b={errors:t,nbCharLeft:a,input:s,form:r,alert:l,modal:n,pagination:o,panel:i,skipLinks:c,general:u,menuItem:m,itemMore:d,actionMore:p,loader:h,table:x};const g={required:"Ce champ est obligatoire."};const f="{counter} caractères disponibles.";const v={select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs sélectionnées",selectedValue:"{nb} valeur sélectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",label:"Saisissez une valeur",result:"résultat",results:"résultats",searchResults:"Liste de résultat(s) de la recherche.",noResult:"Aucun résultat.",sections:{selected:{title:"Sélectionné",titlePlural:"Sélectionnés",action:"Tout désélectionner",tooltip:"Désélectionne tous les résultats de la recherche en cours"},notSelected:{title:"Non sélectionné",titlePlural:"Non sélectionnés",action:"Tout sélectionner",tooltip:"Sélectionne tous les résultats de la recherche en cours"}}},date:{pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"},helpText:{expectedFormat:"Format attendu&nbsp;: {pattern} (ex&nbsp;: {date})",min:"La date doit être postérieure au {min}",max:"La date doit être antérieure au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"},error:{badInput:"La date est inexistante ou incorrecte, le format attendu est {pattern} (ex&nbsp;: {date})"}},numeric:{helpText:{min:"La valeur doit être supérieure à {min}",max:"La valeur doit être inférieure à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}},password:{display:"Afficher le mot de passe",hide:"Masquer le mot de passe"},combobox:{notFound:"Aucun élément ne correspondont a votre saisie",notAvailable:"Aucun élément disponible",loadMore:"Afficher plus",search:"Recherche…"},text:{helpText:{email:"Format attendu&nbsp;: nom@exemple.fr",emails:"Format attendu&nbsp;: premier@exemple.fr, second@exemple.fr",url:"Format attendu&nbsp;: https://exemple.fr"},errors:{typeMismatch:{email:"La valeur est incorrecte, le format attendu est nom@exemple.fr",emails:"La valeur est incorrecte, le format attendu est premier@exemple.fr, second@exemple.fr",url:"La valeur est incorrecte, le format attendu est https://exemple.fr"}}}};const L={required:'Les champs marqués d\'un <strong class="mg-u-is-asterisk">*</strong> sont obligatoires',requiredSingle:'Le champ marqué d\'un <strong class="mg-u-is-asterisk">*</strong> est obligatoire',allRequired:"Tous les champs sont obligatoires",allRequiredSingle:"Le champ est obligatoire"};const S={closeButton:"Fermer le message"};const T={closeButton:"Fermer la modale"};const y={label:"Pagination",page:"page",pages:"pages",nextPage:"Page suivante",previousPage:"Page précédente",selectPage:"Sélectionner la page à afficher."};const q={editLabel:"Modifier le titre de la section."};const P={navLabel:"Accès rapide"};const M={confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"suivant",previous:"précédent",reset:"réinitialiser"};const w={badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"};const F={menuLabel:"Menu complémentaire"};const A={label:"Actions"};const k={inProgress:"Chargement en cours…"};const C={sortableCaption:"(les en-têtes de colonnes avec des boutons peuvent être triés)"};var N={errors:g,nbCharLeft:f,input:v,form:L,alert:S,modal:T,pagination:y,panel:q,skipLinks:P,general:M,menuItem:w,itemMore:F,actionMore:A,loader:k,table:C};const B="en";const R={en:b,fr:N};const E=e(R,B);export{E as i};
2
- //# sourceMappingURL=p-DK9teKTo.js.map
1
+ import{$ as e}from"./p-hNwGkhG6.js";const t={required:"This field is required."};const a="{counter} characters left.";const s={select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",label:"Enter a value",result:"result",results:"results",searchResults:"Search result(s) list.",noResult:"No result.",sections:{selected:{title:"Selected",titlePlural:"Selected",action:"Unselect all",tooltip:"Unselect all current search results"},notSelected:{title:"Not selected",titlePlural:"Not selected",action:"Select all",tooltip:"Select all current search results"}}},date:{pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"},helpText:{expectedFormat:"Expected format: {pattern} (ex: {date})",min:"The date must be after {min}",max:"The date must be before {max}",minMax:"The date must be between {min} and {max}"},error:{badInput:"The date is inexistent or incorrect, the expected format is {pattern} (ex: {date})"}},numeric:{helpText:{min:"The value must be greater than {min}",max:"The value must be less than {max}",minMax:"The value must be between {min} and {max}"}},password:{display:"Display password value",hide:"Hide password value"},combobox:{notFound:"No elements match your input",notAvailable:"No elements available",loadMore:"Load more",search:"Search…"},text:{helpText:{email:"Expected format: name@example.com",emails:"Expected format: first@example.com, second@example.com",url:"Expected format: https://example.com"},errors:{typeMismatch:{email:"The value is incorrect, the expected format is name@example.com",emails:"The value is incorrect, the expected format is first@example.com, second@example.com",url:"The value is incorrect, the expected format is https://example.com"}}}};const r={required:'Fields with a <strong class="mg-u-is-asterisk">*</strong> are required',requiredSingle:'Field with a <strong class="mg-u-is-asterisk">*</strong> is required',allRequired:"All fields are required",allRequiredSingle:"The field is required"};const l={closeButton:"Close message"};const n={closeButton:"Close modal"};const o={label:"Pagination",page:"page",pages:"pages",nextPage:"Next page",previousPage:"Previous page",selectPage:"Select the page to display."};const i={editLabel:"Edit section title."};const c={navLabel:"Quick access"};const u={confirm:"Confirm",cancel:"Cancel",close:"Close",next:"next",previous:"previous",reset:"reset"};const m={badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"};const d={menuLabel:"Additional menu"};const p={label:"Actions"};const h={inProgress:"Loading in progress…"};const x={sortableCaption:"(column headers with buttons are sortable)"};var b={errors:t,nbCharLeft:a,input:s,form:r,alert:l,modal:n,pagination:o,panel:i,skipLinks:c,general:u,menuItem:m,itemMore:d,actionMore:p,loader:h,table:x};const g={required:"Ce champ est obligatoire."};const f="{counter} caractères disponibles.";const v={select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs sélectionnées",selectedValue:"{nb} valeur sélectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",label:"Saisissez une valeur",result:"résultat",results:"résultats",searchResults:"Liste de résultat(s) de la recherche.",noResult:"Aucun résultat.",sections:{selected:{title:"Sélectionné",titlePlural:"Sélectionnés",action:"Tout désélectionner",tooltip:"Désélectionne tous les résultats de la recherche en cours"},notSelected:{title:"Non sélectionné",titlePlural:"Non sélectionnés",action:"Tout sélectionner",tooltip:"Sélectionne tous les résultats de la recherche en cours"}}},date:{pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"},helpText:{expectedFormat:"Format attendu&nbsp;: {pattern} (ex&nbsp;: {date})",min:"La date doit être postérieure au {min}",max:"La date doit être antérieure au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"},error:{badInput:"La date est inexistante ou incorrecte, le format attendu est {pattern} (ex&nbsp;: {date})"}},numeric:{helpText:{min:"La valeur doit être supérieure à {min}",max:"La valeur doit être inférieure à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}},password:{display:"Afficher le mot de passe",hide:"Masquer le mot de passe"},combobox:{notFound:"Aucun élément ne correspondont a votre saisie",notAvailable:"Aucun élément disponible",loadMore:"Afficher plus",search:"Recherche…"},text:{helpText:{email:"Format attendu&nbsp;: nom@exemple.fr",emails:"Format attendu&nbsp;: premier@exemple.fr, second@exemple.fr",url:"Format attendu&nbsp;: https://exemple.fr"},errors:{typeMismatch:{email:"La valeur est incorrecte, le format attendu est nom@exemple.fr",emails:"La valeur est incorrecte, le format attendu est premier@exemple.fr, second@exemple.fr",url:"La valeur est incorrecte, le format attendu est https://exemple.fr"}}}};const L={required:'Les champs marqués d\'un <strong class="mg-u-is-asterisk">*</strong> sont obligatoires',requiredSingle:'Le champ marqué d\'un <strong class="mg-u-is-asterisk">*</strong> est obligatoire',allRequired:"Tous les champs sont obligatoires",allRequiredSingle:"Le champ est obligatoire"};const S={closeButton:"Fermer le message"};const T={closeButton:"Fermer la modale"};const y={label:"Pagination",page:"page",pages:"pages",nextPage:"Page suivante",previousPage:"Page précédente",selectPage:"Sélectionner la page à afficher."};const q={editLabel:"Modifier le titre de la section."};const P={navLabel:"Accès rapide"};const w={confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"suivant",previous:"précédent",reset:"réinitialiser"};const M={badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"};const k={menuLabel:"Menu complémentaire"};const A={label:"Actions"};const F={inProgress:"Chargement en cours…"};const N={sortableCaption:"(les en-têtes de colonnes avec des boutons peuvent être triés)"};var C={errors:g,nbCharLeft:f,input:v,form:L,alert:S,modal:T,pagination:y,panel:q,skipLinks:P,general:w,menuItem:M,itemMore:k,actionMore:A,loader:F,table:N};const B="en";const R={en:b,fr:C};const E=e(R,B);export{E as i};
2
+ //# sourceMappingURL=p-Cg3R_y_o.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-DK9teKTo.js","sources":["src/locales/index.ts"],"sourcesContent":["import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { defineLocales } from '@mgdis/stencil-helpers';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = defineLocales(messages, defaultLocale);\n"],"names":["defineLocales"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,aAAa,GAAG,IAAI;AAC1B,MAAM,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE;AAE3B;;;;AAIG;AACU,MAAA,WAAW,GAAGA,EAAa,CAAC,QAAQ,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"p-Cg3R_y_o.js","sources":["src/locales/index.ts"],"sourcesContent":["import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { defineLocales } from '@mgdis/stencil-helpers';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = defineLocales(messages, defaultLocale);\n"],"names":["defineLocales"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,aAAa,GAAG,IAAI;AAC1B,MAAM,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE;AAE3B;;;;AAIG;AACU,MAAA,WAAW,GAAGA,EAAa,CAAC,QAAQ,EAAE,aAAa;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,g as a}from"./p-CAuxALt5.js";import{i}from"./p-DK9teKTo.js";import{a as r,G as s}from"./p-rLV3KFPd.js";const o=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";const n=class{constructor(e){t(this,e);this.messageHide=false}watchMessage(t){if(t&&!r(t))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(t)}.`)}componentWillLoad(){this.messages=i(this.element).messages;this.watchMessage(this.message)}render(){return e("div",{key:"cd791f239c0ca655ed2470d606068dd361d9f019",class:"mg-c-loader","aria-live":"polite"},e("mg-icon",{key:"450b1d79e33bb1f67a3e5243c3fb5f7855165848",icon:"loader",spin:true}),e("span",{key:"e0f3e296fa631b1a2d44a7067b52dd0991cb43c6",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgress))}get element(){return a(this)}static get watchers(){return{message:["watchMessage"]}}};n.style=o;export{n as mg_loader};
2
- //# sourceMappingURL=p-cdbe689e.entry.js.map
1
+ import{r as t,h as e,g as a}from"./p-CAuxALt5.js";import{i}from"./p-Cg3R_y_o.js";import{a as r,X as s}from"./p-hNwGkhG6.js";const o=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";const n=class{constructor(e){t(this,e);this.messageHide=false}watchMessage(t){if(t&&!r(t))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(t)}.`)}componentWillLoad(){this.messages=i(this.element).messages;this.watchMessage(this.message)}render(){return e("div",{key:"cd791f239c0ca655ed2470d606068dd361d9f019",class:"mg-c-loader","aria-live":"polite"},e("mg-icon",{key:"450b1d79e33bb1f67a3e5243c3fb5f7855165848",icon:"loader",spin:true}),e("span",{key:"e0f3e296fa631b1a2d44a7067b52dd0991cb43c6",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgress))}get element(){return a(this)}static get watchers(){return{message:["watchMessage"]}}};n.style=o;export{n as mg_loader};
2
+ //# sourceMappingURL=p-a52a168c.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,f as e,h as i,g as a}from"./p-CAuxALt5.js";import{Z as h,G as o}from"./p-rLV3KFPd.js";import{i as r}from"./p-DK9teKTo.js";const n=["info","warning","success","danger"];const c=["bar-left","background"];const l=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";const u=class{constructor(e){t(this,e);this.componentShow=s(this,"component-show");this.componentHide=s(this,"component-hide");this.componentClose=s(this,"component-close");this.classCloseButton="mg-c-alert--close-button";this.storedTimer=null;this.isFocused=false;this.isHovered=false;this.variant="info";this.variantStyle="bar-left";this.classCollection=new h(["mg-c-alert"]);this.hasActions=false;this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=true),this.delay*1e3)};this.clearTimer=()=>{clearTimeout(this.storedTimer)};this.timerEvents=t=>{this.clearTimer();const s=t.type==="mouseenter";this[s?"isHovered":"isFocused"]=true;this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this[t.type==="mouseleave"?"isHovered":"isFocused"]=false;if(!this.isFocused&&!this.isHovered)this.setTimer()}),{once:true})};this.handleClose=()=>{this.element.hidden=true;this.componentClose.emit()}}watchDelay(t){if(t!==undefined&&t<2){throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}}watchVariant(t){if(t&&!n.includes(t)){throw new Error(`<mg-alert> prop "variant" must be one of: ${n.join(", ")}. Passed value: ${o(t)}.`)}}watchVariantStyle(t){if(t&&!c.includes(t)){throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}}watchHidden(t){if(typeof t==="string"&&t===""){t=true}if(t){this.componentHide.emit();["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)}));this.clearTimer()}else{this.componentShow.emit();if(this.delay>1){this.setTimer();["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)}))}}e(this)}componentWillLoad(){this.messages=r(this.element).messages;this.watchVariant(this.variant);this.watchVariantStyle(this.variantStyle);this.watchDelay(this.delay);this.watchHidden(this.element.hidden);this.hasActions=this.element.querySelector('[slot="actions"]')!==null;if(!this.hasActions){this.classCollection.add(this.classCloseButton)}}render(){return i("mg-message",{key:"25a886be17d690dfcbffea51dca06a8a102a4926",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},i("slot",{key:"ddf8c61b96ee376384c28b81b0a16ff72c0e6dd1"}),this.hasActions?i("span",{slot:"actions"},i("slot",{name:"actions"})):i("span",{class:"mg-c-alert__close-button"},i("mg-button",{"is-icon":true,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},i("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};u.style=l;export{u as mg_alert};
2
- //# sourceMappingURL=p-ad66e7b3.entry.js.map
1
+ import{r as t,c as s,f as e,h as i,g as a}from"./p-CAuxALt5.js";import{H as h,X as o}from"./p-hNwGkhG6.js";import{i as r}from"./p-Cg3R_y_o.js";const n=["info","warning","success","danger"];const c=["bar-left","background"];const l=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";const u=class{constructor(e){t(this,e);this.componentShow=s(this,"component-show");this.componentHide=s(this,"component-hide");this.componentClose=s(this,"component-close");this.classCloseButton="mg-c-alert--close-button";this.storedTimer=null;this.isFocused=false;this.isHovered=false;this.variant="info";this.variantStyle="bar-left";this.classCollection=new h(["mg-c-alert"]);this.hasActions=false;this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=true),this.delay*1e3)};this.clearTimer=()=>{clearTimeout(this.storedTimer)};this.timerEvents=t=>{this.clearTimer();const s=t.type==="mouseenter";this[s?"isHovered":"isFocused"]=true;this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this[t.type==="mouseleave"?"isHovered":"isFocused"]=false;if(!this.isFocused&&!this.isHovered)this.setTimer()}),{once:true})};this.handleClose=()=>{this.element.hidden=true;this.componentClose.emit()}}watchDelay(t){if(t!==undefined&&t<2){throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}}watchVariant(t){if(t&&!n.includes(t)){throw new Error(`<mg-alert> prop "variant" must be one of: ${n.join(", ")}. Passed value: ${o(t)}.`)}}watchVariantStyle(t){if(t&&!c.includes(t)){throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}}watchHidden(t){if(typeof t==="string"&&t===""){t=true}if(t){this.componentHide.emit();["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)}));this.clearTimer()}else{this.componentShow.emit();if(this.delay>1){this.setTimer();["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)}))}}e(this)}componentWillLoad(){this.messages=r(this.element).messages;this.watchVariant(this.variant);this.watchVariantStyle(this.variantStyle);this.watchDelay(this.delay);this.watchHidden(this.element.hidden);this.hasActions=this.element.querySelector('[slot="actions"]')!==null;if(!this.hasActions){this.classCollection.add(this.classCloseButton)}}render(){return i("mg-message",{key:"25a886be17d690dfcbffea51dca06a8a102a4926",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},i("slot",{key:"ddf8c61b96ee376384c28b81b0a16ff72c0e6dd1"}),this.hasActions?i("span",{slot:"actions"},i("slot",{name:"actions"})):i("span",{class:"mg-c-alert__close-button"},i("mg-button",{"is-icon":true,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},i("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};u.style=l;export{u as mg_alert};
2
+ //# sourceMappingURL=p-bf5de898.entry.js.map