@mgdis/mg-components 6.15.0 → 6.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/events.utils-D5SAtkpQ.js +25 -0
- package/dist/cjs/{index-BGxkpQwi.js → index-DCZEYvlH.js} +48 -29
- package/dist/cjs/{index-iUZvsp-F.js → index-TUElr4Wv.js} +18 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +100 -365
- package/dist/cjs/mg-alert.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +78 -140
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +4 -4
- package/dist/cjs/{mg-input.conf-CwjEAih3.js → mg-input.conf-WTsvDfpC.js} +0 -7
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +5 -5
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +7 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -6
- package/dist/collection/components/atoms/mg-button/mg-button.js +13 -13
- package/dist/collection/components/atoms/mg-card/mg-card.js +2 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +32 -26
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +37 -108
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +6 -8
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +42 -99
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +82 -167
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +27 -44
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +40 -55
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +26 -26
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +32 -86
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +26 -27
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +33 -82
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +33 -34
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +32 -32
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +27 -161
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +2 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +4 -5
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +7 -7
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -4
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +4 -4
- package/dist/collection/components/molecules/mg-details/mg-details.js +6 -6
- package/dist/collection/components/molecules/mg-form/mg-form.js +13 -13
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -2
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +3 -3
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +13 -13
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -6
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +6 -6
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +0 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js +2 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +6 -7
- package/dist/collection/locales/en/messages.json +8 -13
- package/dist/collection/locales/fr/messages.json +8 -13
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +18 -30
- package/dist/components/mg-action-more.js +4 -2
- package/dist/components/mg-alert.js +4 -2
- package/dist/components/mg-badge2.js +4 -2
- package/dist/components/mg-button2.js +4 -2
- package/dist/components/mg-card2.js +4 -2
- package/dist/components/mg-character-left2.js +4 -2
- package/dist/components/mg-details.js +99 -1
- package/dist/components/mg-divider2.js +4 -2
- package/dist/components/mg-form.js +4 -2
- package/dist/components/mg-icon2.js +29 -21
- package/dist/components/mg-illustrated-message.js +4 -2
- package/dist/components/mg-input-checkbox-paginated2.js +6 -7
- package/dist/components/mg-input-checkbox.js +23 -65
- package/dist/components/mg-input-combobox.js +64 -132
- package/dist/components/mg-input-date.js +8 -29
- package/dist/components/mg-input-numeric.js +8 -27
- package/dist/components/mg-input-password.js +6 -10
- package/dist/components/mg-input-radio.js +16 -55
- package/dist/components/mg-input-rich-text-editor.js +6 -10
- package/dist/components/mg-input-select2.js +12 -46
- package/dist/components/mg-input-text2.js +6 -10
- package/dist/components/mg-input-textarea.js +6 -10
- package/dist/components/mg-input-title2.js +4 -2
- package/dist/components/mg-input-toggle.js +15 -98
- package/dist/components/mg-input2.js +26 -101
- package/dist/components/mg-item-more2.js +8 -4
- package/dist/components/mg-loader2.js +4 -2
- package/dist/components/mg-menu-item2.js +4 -2
- package/dist/components/mg-message2.js +4 -2
- package/dist/components/mg-modal.js +4 -2
- package/dist/components/mg-pagination.js +6 -10
- package/dist/components/mg-panel.js +11 -15
- package/dist/components/mg-popover-content2.js +4 -2
- package/dist/components/mg-popover2.js +4 -2
- package/dist/components/mg-progress.js +4 -2
- package/dist/components/mg-skip-links.js +4 -2
- package/dist/components/mg-table.js +4 -2
- package/dist/components/mg-tabs2.js +4 -2
- package/dist/components/mg-tag.js +4 -2
- package/dist/components/mg-tooltip-content2.js +4 -2
- package/dist/components/mg-tooltip2.js +4 -2
- package/dist/esm/events.utils-yMGqY8YG.js +23 -0
- package/dist/esm/{index-CKB-AnCZ.js → index-CNX6lq0x.js} +18 -30
- package/dist/esm/{index-DhAOnZJn.js → index-T6kOJXP1.js} +48 -29
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +96 -361
- package/dist/esm/mg-alert.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-input-combobox.entry.js +59 -121
- package/dist/esm/mg-input-rich-text-editor.entry.js +4 -4
- package/dist/esm/{mg-input.conf-BAUTlb6r.js → mg-input.conf-CNgv8hc5.js} +1 -7
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +1 -1
- package/dist/mg-components/locales/en/messages.json +8 -13
- package/dist/mg-components/locales/fr/messages.json +8 -13
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-47e19783.entry.js → p-0e6b40d6.entry.js} +1 -1
- package/dist/mg-components/{p-67af6274.entry.js → p-397bf67b.entry.js} +1 -1
- package/dist/mg-components/{p-a0fa44cf.entry.js → p-5dc3a1fb.entry.js} +1 -1
- package/dist/mg-components/p-8a69175b.entry.js +1 -0
- package/dist/mg-components/p-CNX6lq0x.js +1 -0
- package/dist/mg-components/p-CNgv8hc5.js +1 -0
- package/dist/mg-components/p-T6kOJXP1.js +2 -0
- package/dist/mg-components/{p-420daa1e.entry.js → p-c5da335e.entry.js} +1 -1
- package/dist/mg-components/p-d84d87ea.entry.js +1 -0
- package/dist/mg-components/p-yMGqY8YG.js +1 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +0 -13
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +4 -15
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +3 -21
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +2 -16
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -40
- package/dist/types/components.d.ts +7 -63
- package/dist/types/stencil-public-runtime.d.ts +39 -2
- package/dist/types/types/index.d.ts +1 -1
- package/ide/intellij/web-types.json +23 -304
- package/ide/vscode/html-custom-data.json +18 -113
- package/package.json +22 -22
- package/dist/cjs/mg-input.utils-D-ASK4ua.js +0 -49
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.utils.js +0 -21
- package/dist/components/mg-details2.js +0 -99
- package/dist/components/mg-input.utils.js +0 -24
- package/dist/esm/mg-input.utils-BYI03zSi.js +0 -46
- package/dist/mg-components/p-31856cff.entry.js +0 -1
- package/dist/mg-components/p-698dfc6c.entry.js +0 -1
- package/dist/mg-components/p-BAUTlb6r.js +0 -1
- package/dist/mg-components/p-CKB-AnCZ.js +0 -1
- package/dist/mg-components/p-DhAOnZJn.js +0 -2
- package/dist/mg-components/p-PuX-pdL4.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input/mg-input.utils.d.ts +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,t=e=>{const t={value:"2023",pattern:"yyyy"},a={value:"12",pattern:"mm"},l={value:"24",pattern:"dd"};return n([t.value,a.value,l.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(a.value,a.pattern).replace(l.value,l.pattern)},a=(e,t,a)=>new Intl.NumberFormat(t,{style:"currency",currency:a}).format(e),l=(e,t,a=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:a}).format(Number(e)),s=(e,t,a=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a}).format(e),r=(e,t,a,l="short",s=0)=>new Intl.NumberFormat(t,{style:"unit",unit:a,unitDisplay:l,minimumFractionDigits:s,maximumFractionDigits:s}).format(e),n=(t,a,l)=>"string"==typeof t&&""!==t&&e.test(t)?new Intl.DateTimeFormat(a,l).format(new Date(t)):"",o=(i={en:{errors:{required:"This field is required."},nbCharLeft:"{counter} characters left.",input:{showMore:"Show more",select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",sections:{label:'Values grouped by: "Selected" or "Available"',badge:{label:"value(s)"},search:{label:"Enter a value",values:"{count} value(s) found",noValue:"No values found"},selected:{title:"Selected",action:"Unselect all",tooltip:"Unselect all current values",values:"{count} value(s) selected",noValue:"No value selected"},notSelected:{title:"Available",action:"Select all",tooltip:"Select all current values",values:"{count} value(s) available",noValue:"All values are selected"}}},date:{pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"},helpText:{expectedFormat:"Expected format: {pattern} (ex: {date})"},error:{badInput:"The date is inexistent or incorrect, the expected format is {pattern} (ex: {date})",min:"The date must be after or equal to {min}",max:"The date must be before or equal to {max}",minMax:"The date must be between {min} and {max}"}},numeric:{error:{min:"The value must be greater than or equal to {min}",max:"The value must be less than or equal to {max}",minMax:"The value must be between {min} and {max}"}},password:{display:"Display password value",hide:"Hide password value"},combobox:{notFound:"No value matches your input",notAvailable:"No value available",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"}}}},form:{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"},alert:{closeButton:"Close message"},modal:{closeButton:"Close modal"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Next page",previousLabel:"Previous page",selectPage:"Select the page to display."},panel:{editLabel:"Edit section title."},skipLinks:{navLabel:"Quick access"},general:{confirm:"Confirm",cancel:"Cancel",close:"Close",next:"Next",previous:"Previous",reset:"reset"},menuItem:{badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"},itemMore:{menuLabel:"Additional menu"},actionMore:{label:"Actions"},loader:{inProgress:"Loading in progress…"},table:{sortableCaption:"(column headers with buttons are sortable)"}},fr:{errors:{required:"Ce champ est obligatoire."},nbCharLeft:"{counter} caractères disponibles.",input:{showMore:"Afficher plus",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",sections:{label:'Valeurs regroupées par: "Sélectionnées" ou "Disponibles"',badge:{label:"valeur(s)"},search:{label:"Saisissez une valeur",values:"{count} résultat(s)",noValue:"Aucune valeur n'a été trouvée."},selected:{title:"Sélectionnées",action:"Tout désélectionner",tooltip:"Désélectionne toutes les valeurs de la section",values:"{count} valeur(s) sélectionnée(s)",noValue:"Aucune valeur sélectionnée"},notSelected:{title:"Disponibles",action:"Tout sélectionner",tooltip:"Sélectionne toutes les valeurs de la section",values:"{count} valeur(s) disponible(s)",noValue:"Toutes les valeurs sont sélectionnées"}}},date:{pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"},helpText:{expectedFormat:"Format attendu : {pattern} (ex : {date})"},error:{badInput:"La date est inexistante ou incorrecte, le format attendu est {pattern} (ex : {date})",min:"La date doit être postérieure ou égale au {min}",max:"La date doit être antérieure ou égale au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"}},numeric:{error:{min:"La valeur doit être supérieure ou égale à {min}",max:"La valeur doit être inférieure ou égale à {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:"Aucune valeur ne correspondont à votre saisie",notAvailable:"Aucune valeur disponible",search:"Recherche…"},text:{helpText:{email:"Format attendu : nom@exemple.fr",emails:"Format attendu : premier@exemple.fr, second@exemple.fr",url:"Format attendu : 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"}}}},form:{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"},alert:{closeButton:"Fermer le message"},modal:{closeButton:"Fermer la modale"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Page suivante",previousLabel:"Page précédente",selectPage:"Sélectionner la page à afficher."},panel:{editLabel:"Modifier le titre de la section."},skipLinks:{navLabel:"Accès rapide"},general:{confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"Suivant",previous:"Précédent",reset:"réinitialiser"},menuItem:{badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"},itemMore:{menuLabel:"Menu complémentaire"},actionMore:{label:"Actions"},loader:{inProgress:"Chargement en cours…"},table:{sortableCaption:"(les en-têtes de colonnes avec des boutons peuvent être triés)"}}},e=>((e,t,a)=>{const l=e.closest("[lang]"),s=Intl.NumberFormat.supportedLocalesOf(l?.lang),r=s.length>0&&"string"==typeof s[0]?s[0]:navigator.language||a,n=r.split("-").shift();return 0===Object.keys(t).length?{locale:r,messages:{lang:a}}:{locale:r,messages:t[n]??t[a]??{lang:a}}})(e,i,"en"));var i;export{t as a,l as b,r as c,s as d,a as e,o as i,n as l}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=[2,4,16,"full"],t=["input","label"],s="mg-c-input--fieldset",i="mg-c-input--disabled",l="mg-c-input--readonly",c="mg-c-input--vertical-list";export{i as a,s as b,l as c,c as d,t,a as w}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const o=()=>{};var r=Object.defineProperty,e=o=>{if(o.__stencil__getHostRef)return o.__stencil__getHostRef()},t=(o,r)=>{r&&(o.__stencil__getHostRef=()=>r,r.o=o)},n=(o,r)=>r in o,l=(o,r)=>(0,console.error)(o,r),c=new Map,i=new Map,s="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="http://www.w3.org/1999/xlink",g="undefined"!=typeof window?window:{},b={t:0,l:"",jmp:o=>o(),raf:o=>requestAnimationFrame(o),ael:(o,r,e,t)=>o.addEventListener(r,e,t),rel:(o,r,e,t)=>o.removeEventListener(r,e,t),ce:(o,r)=>new CustomEvent(o,r)},m=o=>Promise.resolve(o),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(o){}return!1})(),d=!!u&&(()=>!!g.document&&Object.getOwnPropertyDescriptor(g.document.adoptedStyleSheets,"length").writable)(),f=!1,v=[],p=[],h=(o,r)=>e=>{o.push(e),f||(f=!0,r&&4&b.t?z(w):b.raf(w))},y=o=>{for(let r=0;r<o.length;r++)try{o[r](performance.now())}catch(o){l(o)}o.length=0},w=()=>{y(v),y(p),(f=v.length>0)&&b.raf(w)},z=o=>m().then(o),$=h(p,!0),k=o=>"object"==(o=typeof o)||"function"===o;function x(o){var r,e,t;return null!=(t=null==(e=null==(r=o.head)?void 0:r.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?t:void 0}((o,e)=>{for(var t in e)r(o,t,{get:e[t],enumerable:!0})})({},{err:()=>j,map:()=>O,ok:()=>S,unwrap:()=>C,unwrapErr:()=>M});var S=o=>({isOk:!0,isErr:!1,value:o}),j=o=>({isOk:!1,isErr:!0,value:o});function O(o,r){if(o.isOk){const e=r(o.value);return e instanceof Promise?e.then((o=>S(o))):S(e)}if(o.isErr)return j(o.value);throw"should never get here"}var E,C=o=>{if(o.isOk)return o.value;throw o.value},M=o=>{if(o.isErr)return o.value;throw o.value};function N(){var o;const r=this.attachShadow({mode:"open"});void 0===E&&(E=null!=(o=function(){if(!u)return;const o=new CSSStyleSheet;return o.replaceSync(':root{--mg-b-size-4:0.4rem;--mg-b-size-8:0.8rem;--mg-b-size-12:1.2rem;--mg-b-size-16:1.6rem;--mg-b-size-20:2rem;--mg-b-size-24:2.4rem;--mg-b-size-32:3.2rem;--mg-b-size-40:4rem;--mg-b-size-48:4.8rem;--mg-b-size-56:5.6rem;--mg-b-size-64:6.4rem;--mg-b-size-72:7.2rem;--mg-b-size-120:12rem;--mg-b-size-border:0.1rem;--mg-b-size-radius:var(--mg-b-size-4);--mg-b-size-floating-element-max-width:40rem;--mg-b-size-min-height:3.5rem;--mg-b-spacing-actions:var(--mg-b-size-8);--mg-b-color-blue-10:rgb(227, 244, 255);--mg-b-color-blue-20:rgb(209, 237, 255);--mg-b-color-blue-30:rgb(166, 219, 255);--mg-b-color-blue-40:rgb(106, 195, 255);--mg-b-color-blue-50:rgb(64, 179, 255);--mg-b-color-blue-60:rgb(22, 162, 255);--mg-b-color-blue-70:rgb(0, 132, 220);--mg-b-color-blue-80:rgb(0, 94, 156);--mg-b-color-blue-90:rgb(0, 67, 111);--mg-b-color-blue-100:rgb(0, 39, 66);--mg-b-color-green-10:rgb(234, 251, 244);--mg-b-color-green-20:rgb(212, 247, 234);--mg-b-color-green-30:rgb(181, 240, 219);--mg-b-color-green-40:rgb(144, 232, 202);--mg-b-color-green-50:rgb(97, 223, 179);--mg-b-color-green-60:rgb(50, 213, 156);--mg-b-color-green-70:rgb(46, 194, 142);--mg-b-color-green-80:rgb(36, 151, 111);--mg-b-color-green-90:rgb(21, 89, 66);--mg-b-color-green-100:rgb(13, 54, 40);--mg-b-color-red-10:rgb(251, 233, 234);--mg-b-color-red-20:rgb(248, 216, 217);--mg-b-color-red-30:rgb(242, 174, 178);--mg-b-color-red-40:rgb(236, 134, 139);--mg-b-color-red-50:rgb(229, 96, 103);--mg-b-color-red-60:rgb(221, 42, 52);--mg-b-color-red-70:rgb(219, 31, 41);--mg-b-color-red-80:rgb(152, 21, 28);--mg-b-color-red-90:rgb(120, 17, 23);--mg-b-color-red-100:rgb(92, 13, 13);--mg-b-color-yellow-10:rgb(255, 247, 230);--mg-b-color-yellow-20:rgb(255, 240, 207);--mg-b-color-yellow-30:rgb(255, 226, 162);--mg-b-color-yellow-40:rgb(255, 212, 118);--mg-b-color-yellow-50:rgb(255, 195, 62);--mg-b-color-yellow-60:rgb(232, 177, 56);--mg-b-color-yellow-70:rgb(181, 138, 44);--mg-b-color-yellow-80:rgb(140, 107, 34);--mg-b-color-yellow-90:rgb(86, 66, 21);--mg-b-color-yellow-100:rgb(53, 41, 13);--mg-b-color-neutral-0:rgb(255, 255, 255);--mg-b-color-neutral-10:rgb(250, 251, 251);--mg-b-color-neutral-20:rgb(236, 238, 238);--mg-b-color-neutral-30:rgb(225, 227, 228);--mg-b-color-neutral-40:rgb(197, 201, 203);--mg-b-color-neutral-50:rgb(182, 188, 190);--mg-b-color-neutral-60:rgb(157, 165, 167);--mg-b-color-neutral-70:rgb(129, 139, 142);--mg-b-color-neutral-80:rgb(101, 113, 117);--mg-b-color-neutral-90:rgb(75, 89, 94);--mg-b-color-neutral-100:rgb(47, 64, 69);--mg-b-color-neutral-110:rgb(21, 40, 46);--mg-b-color-neutral-120:rgb(5, 9, 11);--mg-b-color-dark:var(--mg-b-color-neutral-110);--mg-b-color-light:var(--mg-b-color-neutral-0);--mg-b-color-danger:var(--mg-b-color-red-70);--mg-b-color-text-on-danger:var(--mg-b-color-light);--mg-b-color-info:var(--mg-b-color-blue-80);--mg-b-color-text-on-info:var(--mg-b-color-light);--mg-b-color-success:var(--mg-b-color-green-60);--mg-b-color-text-on-success:var(--mg-b-color-dark);--mg-b-color-warning:var(--mg-b-color-yellow-50);--mg-b-color-text-on-warning:var(--mg-b-color-dark);--mg-b-color-app:var(--mg-b-color-blue-80);--mg-b-color-primary:var(--mg-b-color-neutral-110);--mg-b-color-text-on-primary:var(--mg-b-color-light);--mg-b-color-secondary:var(--mg-b-color-neutral-10);--mg-b-color-text-on-secondary:var(--mg-b-color-dark);--mg-b-font-size:1.3rem;--mg-b-font-size-small:1.17rem;--mg-b-font-size-h1:calc(var(--mg-b-font-size) * 1.85);--mg-b-font-size-h2:calc(var(--mg-b-font-size) * 1.65);--mg-b-font-size-h3:calc(var(--mg-b-font-size) * 1.35);--mg-b-font-size-h4:calc(var(--mg-b-font-size) * 1.2);--mg-b-font-size-h5:calc(var(--mg-b-font-size) * 1.1);--mg-b-font-size-h6:calc(var(--mg-b-font-size) * 0.8);--mg-b-small-font-size:0.9em;--mg-b-font-family:"Open Sans", sans-serif;--mg-b-font-family-heading:var(--mg-b-font-family);--mg-b-line-height:1.4;--mg-b-box-shadow:0 0.3rem 0.8rem 0 color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-b-opacity-element-disabled:0.4}:root{--mg-c-badge-size:var(--mg-b-size-16);--mg-c-badge-font-size:var(--mg-b-font-size-small);--mg-c-button-border-radius:var(--mg-b-size-radius);--mg-c-button-icon-border-radius:var(--mg-b-size-min-height);--mg-c-button-color-background-danger:var(--mg-b-color-danger);--mg-c-button-color-border-danger:var(--mg-b-color-red-80);--mg-c-button-color-gradient-danger:var(--mg-b-color-red-80);--mg-c-button-color-text-danger:var(--mg-b-color-text-on-danger);--mg-c-button-color-background-info:var(--mg-b-color-info);--mg-c-button-color-border-info:var(--mg-b-color-blue-90);--mg-c-button-color-gradient-info:var(--mg-b-color-blue-90);--mg-c-button-color-text-info:var(--mg-b-color-text-on-info);--mg-c-button-color-background-success:var(--mg-b-color-success);--mg-c-button-color-border-success:var(--mg-b-color-green-70);--mg-c-button-color-gradient-success:var(--mg-b-color-green-70);--mg-c-button-color-text-success:var(--mg-b-color-text-on-success);--mg-c-button-color-background-warning:var(--mg-b-color-warning);--mg-c-button-color-border-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-gradient-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-text-warning:var(--mg-b-color-text-on-warning);--mg-c-button-color-background-primary:var(--mg-b-color-primary);--mg-c-button-color-border-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-gradient-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-text-primary:var(--mg-b-color-text-on-primary);--mg-c-button-color-background-secondary:var(--mg-b-color-secondary);--mg-c-button-color-border-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-text-secondary:var(--mg-b-color-text-on-secondary);--mg-c-button-color-background-danger-alt:var(--mg-b-color-neutral-10);--mg-c-button-color-border-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-text-danger-alt:var(--mg-b-color-danger);--mg-c-card-spacing-default:var(--mg-b-size-16);--mg-c-card-border-radius-default:var(--mg-b-size-12);--mg-c-card-color-background-default:var(--mg-b-color-light);--mg-c-card-border-default:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);--mg-c-card-box-shadow-default:var(--mg-b-box-shadow);--mg-c-divider-color-background:color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-c-divider-thickness:var(--mg-b-size-border);--mg-c-divider-spacing-vertical:var(--mg-b-size-40);--mg-c-icon-border-radius:50%;--mg-c-tag-height:var(--mg-b-size-24);--mg-c-tag-border-radius:var(--mg-b-size-radius);--mg-c-tag-font-size:var(--mg-b-font-size-small);--mg-c-tooltip-border-radius:var(--mg-b-size-radius);--mg-c-tooltip-color-background:var(--mg-b-color-dark);--mg-c-tooltip-color-text:var(--mg-b-color-light);--mg-c-details-spacing:var(--mg-b-size-8);--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-40);--mg-c-input-border-width:var(--mg-b-size-border);--mg-c-input-border-radius:var(--mg-b-size-radius);--mg-c-input-color-border:rgb(181 194 201);--mg-c-input-placeholder-color-text:rgb(181 194 201);--mg-c-input-color-icon:rgb(181 194 201);--mg-c-input-color-box-shadow-focus:rgb(0 221 255 / 50%);--mg-c-input-error-color-background:color-mix(in srgb, var(--mg-b-color-danger), white 95%);--mg-c-input-toggle-border-radius-ratio:2;--mg-c-input-check-size:var(--mg-b-size-16);--mg-c-menu-item-color:var(--mg-b-color-app);--mg-c-message-border-radius:var(--mg-b-size-radius);--mg-c-modal-border-radius:var(--mg-b-size-radius);--mg-c-modal-title-font-size:var(--mg-b-font-size-h3);--mg-c-panel-border-radius:var(--mg-b-size-radius);--mg-c-panel-box-shadow:var(--mg-b-box-shadow);--mg-c-panel-content-spacing:var(--mg-b-size-16);--mg-c-popover-color-background:var(--mg-b-color-light);--mg-c-popover-color-text:var(--mg-b-color-dark);--mg-c-popover-title-font-size:var(--mg-b-font-size-h5);--mg-c-popover-max-width:var(--mg-b-size-floating-element-max-width);--mg-c-progress-size:var(--mg-b-size-8);--mg-c-progress-border-color:var(--mg-b-color-neutral-80);--mg-c-progress-bar-color-background:var(--mg-b-color-neutral-30);--mg-c-progress-fill-color-background:var(--mg-b-color-app);--mg-c-tabs-color:var(--mg-b-color-app)}html{font-size:62.5%}body{font-family:var(--mg-b-font-family);font-size:var(--mg-b-font-size);-webkit-font-smoothing:antialiased;line-height:var(--mg-b-line-height)}:root{--mg-b-font-family:system-ui, sans-serif}'),o}())?o:null),E&&(d?r.adoptedStyleSheets.push(E):r.adoptedStyleSheets=[...r.adoptedStyleSheets,E])}var R=o=>{const r=A(o,"childNodes");o.tagName&&o.tagName.includes("-")&&o["s-cr"]&&"SLOT-FB"!==o.tagName&&P(r,o.tagName).forEach((o=>{1===o.nodeType&&"SLOT-FB"===o.tagName&&(o.hidden=!!T(o,L(o),!1).length)}));let e=0;for(e=0;e<r.length;e++){const o=r[e];1===o.nodeType&&A(o,"childNodes").length&&R(o)}};function P(o,r,e){let t,n=0,l=[];for(;n<o.length;n++)t=o[n],!t["s-sr"]||r&&t["s-hn"]!==r||void 0!==e||l.push(t),l=[...l,...P(t.childNodes,r,e)];return l}var T=(o,r,e=!0)=>{const t=[];(e&&o["s-sr"]||!o["s-sr"])&&t.push(o);let n=o;for(;n=n.nextSibling;)L(n)!==r||!e&&n["s-sr"]||t.push(n);return t},F=(o,r)=>1===o.nodeType?null===o.getAttribute("slot")&&""===r||o.getAttribute("slot")===r:o["s-sn"]===r||""===r,L=o=>"string"==typeof o["s-sn"]?o["s-sn"]:1===o.nodeType&&o.getAttribute("slot")||void 0;function A(o,r){if("__"+r in o){const e=o["__"+r];return"function"!=typeof e?e:e.bind(o)}return"function"!=typeof o[r]?o[r]:o[r].bind(o)}var D=new WeakMap,U=o=>"sc-"+o.i,W=(o,r,...e)=>{let t=null,n=null,l=null,c=!1,i=!1;const s=[],a=r=>{for(let e=0;e<r.length;e++)t=r[e],Array.isArray(t)?a(t):null!=t&&"boolean"!=typeof t&&((c="function"!=typeof o&&!k(t))&&(t+=""),c&&i?s[s.length-1].m+=t:s.push(c?_(null,t):t),i=c)};if(a(e),r){r.key&&(n=r.key),r.name&&(l=r.name);{const o=r.className||r.class;o&&(r.class="object"!=typeof o?o:Object.keys(o).filter((r=>o[r])).join(" "))}}if("function"==typeof o)return o(null===r?{}:r,s,B);const g=_(o,null);return g.u=r,s.length>0&&(g.v=s),g.p=n,g.h=l,g},_=(o,r)=>({t:0,$:o,m:r,k:null,v:null,u:null,p:null,h:null}),H={},B={forEach:(o,r)=>o.map(V).forEach(r),map:(o,r)=>o.map(V).map(r).map(q)},V=o=>({vattrs:o.u,vchildren:o.v,vkey:o.p,vname:o.h,vtag:o.$,vtext:o.m}),q=o=>{if("function"==typeof o.vtag){const r={...o.vattrs};return o.vkey&&(r.key=o.vkey),o.vname&&(r.name=o.vname),W(o.vtag,r,...o.vchildren||[])}const r=_(o.vtag,o.vtext);return r.u=o.vattrs,r.v=o.vchildren,r.p=o.vkey,r.h=o.vname,r},I=o=>{const r=(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(o);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${r}))(${r}\\b)`,"g")};I("::slotted"),I(":host"),I(":host-context");var Y,G,J,K=(o,r)=>null==o||k(o)?o:4&r?"false"!==o&&(""===o||!!o):2&r?"string"==typeof o?parseFloat(o):"number"==typeof o?o:NaN:1&r?o+"":o,Q=o=>{var r;return null==(r=e(o))?void 0:r.$hostElement$},X=(o,r,e)=>{const t=Q(o);return{emit:o=>Z(t,r,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:o})}},Z=(o,r,e)=>{const t=b.ce(r,e);return o.dispatchEvent(t),t},oo=(o,r,e,t,l,c)=>{if(e===t)return;let i=n(o,r),s=r.toLowerCase();if("class"===r){const r=o.classList,n=eo(e);let l=eo(t);r.remove(...n.filter((o=>o&&!l.includes(o)))),r.add(...l.filter((o=>o&&!n.includes(o))))}else if("style"===r){for(const r in e)t&&null!=t[r]||(r.includes("-")?o.style.removeProperty(r):o.style[r]="");for(const r in t)e&&t[r]===e[r]||(r.includes("-")?o.style.setProperty(r,t[r]):o.style[r]=t[r])}else if("key"===r);else if("ref"===r)t&&t(o);else if(i||"o"!==r[0]||"n"!==r[1]){const n=k(t);if(i||n&&null!==t)try{if(o.tagName.includes("-"))o[r]!==t&&(o[r]=t);else{const n=null==t?"":t;"list"===r?i=!1:null!=e&&o[r]==n||("function"==typeof o.__lookupSetter__(r)?o[r]=n:o.setAttribute(r,n))}}catch(o){}let g=!1;s!==(s=s.replace(/^xlink\:?/,""))&&(r=s,g=!0),null==t||!1===t?!1===t&&""!==o.getAttribute(r)||(g?o.removeAttributeNS(a,r):o.removeAttribute(r)):(!i||4&c||l)&&!n&&1===o.nodeType&&(t=!0===t?"":t,g?o.setAttributeNS(a,r,t):o.setAttribute(r,t))}else if(r="-"===r[2]?r.slice(3):n(g,s)?s.slice(2):s[2]+r.slice(3),e||t){const n=r.endsWith(to);r=r.replace(no,""),e&&b.rel(o,r,e,n),t&&b.ael(o,r,t,n)}},ro=/\s/,eo=o=>("object"==typeof o&&o&&"baseVal"in o&&(o=o.baseVal),o&&"string"==typeof o?o.split(ro):[]),to="Capture",no=RegExp(to+"$"),lo=(o,r,e)=>{const t=11===r.k.nodeType&&r.k.host?r.k.host:r.k,n=o&&o.u||{},l=r.u||{};for(const o of co(Object.keys(n)))o in l||oo(t,o,n[o],void 0,e,r.t);for(const o of co(Object.keys(l)))oo(t,o,n[o],l[o],e,r.t)};function co(o){return o.includes("ref")?[...o.filter((o=>"ref"!==o)),"ref"]:o}var io=!1,so=!1,ao=!1,go=!1,bo=(o,r,e)=>{var t;const n=r.v[e];let l,c,i,s=0;if(io||(ao=!0,"slot"===n.$&&(n.t|=n.v?2:1)),null!==n.m)l=n.k=g.document.createTextNode(n.m);else if(1&n.t)l=n.k=g.document.createTextNode(""),lo(null,n,go);else{if(!g.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=n.k=g.document.createElement(!io&&2&n.t?"slot-fb":n.$),lo(null,n,go),null!=Y&&void 0!==Y&&l["s-si"]!==Y&&l.classList.add(l["s-si"]=Y),n.v)for(s=0;s<n.v.length;++s)c=bo(o,n,s),c&&l.appendChild(c)}return l["s-hn"]=J,3&n.t&&(l["s-sr"]=!0,l["s-cr"]=G,l["s-sn"]=n.h||"",l["s-rf"]=null==(t=n.u)?void 0:t.ref,function(o){if(o.assignedElements||o.assignedNodes||!o["s-sr"])return;const r=r=>function(o){const e=[],t=this["s-sn"];(null==o?void 0:o.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const n=this["s-cr"].parentElement;return(n.__childNodes?n.childNodes:(o=>{const r=[];for(let e=0;e<o.length;e++){const t=o[e]["s-nr"]||void 0;t&&t.isConnected&&r.push(t)}return r})(n.childNodes)).forEach((o=>{t===L(o)&&e.push(o)})),r?e.filter((o=>1===o.nodeType)):e}.bind(o);o.assignedElements=r(!0),o.assignedNodes=r(!1)}(l),i=o&&o.v&&o.v[e],i&&i.$===n.$&&o.k&&mo(o.k,!1),ko(G,l,r.k,null==o?void 0:o.k)),l},mo=(o,r)=>{b.t|=1;const e=Array.from(o.__childNodes||o.childNodes);for(let o=e.length-1;o>=0;o--){const t=e[o];t["s-hn"]!==J&&t["s-ol"]&&($o(po(t).parentNode,t,po(t)),t["s-ol"].remove(),t["s-ol"]=void 0,t["s-sh"]=void 0,ao=!0),r&&mo(t,r)}b.t&=-2},uo=(o,r,e,t,n,l)=>{let c,i=o["s-cr"]&&o["s-cr"].parentNode||o;for(i.shadowRoot&&i.tagName===J&&(i=i.shadowRoot);n<=l;++n)t[n]&&(c=bo(null,e,n),c&&(t[n].k=c,$o(i,c,po(r))))},fo=(o,r,e)=>{for(let t=r;t<=e;++t){const r=o[t];if(r){const o=r.k;zo(r),o&&(so=!0,o["s-ol"]?o["s-ol"].remove():mo(o,!0),o.remove())}}},vo=(o,r,e=!1)=>o.$===r.$&&("slot"===o.$?o.h===r.h:e?(e&&!o.p&&r.p&&(o.p=r.p),!0):o.p===r.p),po=o=>o&&o["s-ol"]||o,ho=(o,r,e=!1)=>{const t=r.k=o.k,n=o.v,l=r.v,c=r.m;let i;null===c?(lo(o,r,go),null!==n&&null!==l?((o,r,e,t,n=!1)=>{let l,c,i=0,s=0,a=0,g=0,b=r.length-1,m=r[0],u=r[b],d=t.length-1,f=t[0],v=t[d];for(;i<=b&&s<=d;)if(null==m)m=r[++i];else if(null==u)u=r[--b];else if(null==f)f=t[++s];else if(null==v)v=t[--d];else if(vo(m,f,n))ho(m,f,n),m=r[++i],f=t[++s];else if(vo(u,v,n))ho(u,v,n),u=r[--b],v=t[--d];else if(vo(m,v,n))"slot"!==m.$&&"slot"!==v.$||mo(m.k.parentNode,!1),ho(m,v,n),$o(o,m.k,u.k.nextSibling),m=r[++i],v=t[--d];else if(vo(u,f,n))"slot"!==m.$&&"slot"!==v.$||mo(u.k.parentNode,!1),ho(u,f,n),$o(o,u.k,m.k),u=r[--b],f=t[++s];else{for(a=-1,g=i;g<=b;++g)if(r[g]&&null!==r[g].p&&r[g].p===f.p){a=g;break}a>=0?(c=r[a],c.$!==f.$?l=bo(r&&r[s],e,a):(ho(c,f,n),r[a]=void 0,l=c.k),f=t[++s]):(l=bo(r&&r[s],e,s),f=t[++s]),l&&$o(po(m.k).parentNode,l,po(m.k))}i>b?uo(o,null==t[d+1]?null:t[d+1].k,e,t,s,d):s>d&&fo(r,i,b)})(t,n,r,l,e):null!==l?(null!==o.m&&(t.textContent=""),uo(t,null,r,l,0,l.length-1)):!e&&null!==n&&fo(n,0,n.length-1)):(i=t["s-cr"])?i.parentNode.textContent=c:o.m!==c&&(t.data=c)},yo=[],wo=o=>{let r,e,t;const n=o.__childNodes||o.childNodes;for(const o of n){if(o["s-sr"]&&(r=o["s-cr"])&&r.parentNode){e=r.parentNode.__childNodes||r.parentNode.childNodes;const n=o["s-sn"];for(t=e.length-1;t>=0;t--)if(r=e[t],!r["s-cn"]&&!r["s-nr"]&&r["s-hn"]!==o["s-hn"])if(F(r,n)){let e=yo.find((o=>o.S===r));so=!0,r["s-sn"]=r["s-sn"]||n,e?(e.S["s-sh"]=o["s-hn"],e.j=o):(r["s-sh"]=o["s-hn"],yo.push({j:o,S:r})),r["s-sr"]&&yo.map((o=>{F(o.S,r["s-sn"])&&(e=yo.find((o=>o.S===r)),e&&!o.j&&(o.j=e.j))}))}else yo.some((o=>o.S===r))||yo.push({S:r})}1===o.nodeType&&wo(o)}},zo=o=>{o.u&&o.u.ref&&o.u.ref(null),o.v&&o.v.map(zo)},$o=(o,r,e)=>("string"==typeof r["s-sn"]&&r["s-sr"]&&r["s-cr"]&&ko(r["s-cr"],r,o,r.parentElement),null==o?void 0:o.insertBefore(r,e));function ko(o,r,e,t){var n,l;let c;if(o&&"string"==typeof r["s-sn"]&&r["s-sr"]&&o.parentNode&&o.parentNode["s-sc"]&&(c=r["s-si"]||o.parentNode["s-sc"])){const o=r["s-sn"],i=r["s-hn"];if(null==(n=e.classList)||n.add(c+"-s"),t&&(null==(l=t.classList)?void 0:l.contains(c+"-s"))){let r=(t.__childNodes||t.childNodes)[0],e=!1;for(;r;){if(r["s-sn"]!==o&&r["s-hn"]===i&&r["s-sr"]){e=!0;break}r=r.nextSibling}e||t.classList.remove(c+"-s")}}}var xo=(o,r)=>{if(r&&!o.O&&r["s-p"]){const e=r["s-p"].push(new Promise((t=>o.O=()=>{r["s-p"].splice(e-1,1),t()})))}},So=(o,r)=>{if(o.t|=16,4&o.t)return void(o.t|=512);xo(o,o.C);const e=()=>jo(o,r);if(!r)return $(e);queueMicrotask((()=>{e()}))},jo=(o,r)=>{const e=o.$hostElement$,t=o.o;if(!t)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return r?(o.t|=256,o.M&&(o.M.map((([o,r])=>To(t,o,r,e))),o.M=void 0),o.N.length&&o.N.forEach((o=>o(e))),n=To(t,"componentWillLoad",void 0,e)):n=To(t,"componentWillUpdate",void 0,e),n=Oo(n,(()=>To(t,"componentWillRender",void 0,e))),Oo(n,(()=>Co(o,t,r)))},Oo=(o,r)=>Eo(o)?o.then(r).catch((o=>{console.error(o),r()})):r(),Eo=o=>o instanceof Promise||o&&o.then&&"function"==typeof o.then,Co=async(o,r,e)=>{var t;const n=o.$hostElement$,l=n["s-rc"];e&&(o=>{const r=o.R,e=o.$hostElement$,t=r.t,n=((o,r)=>{var e;const t=U(r),n=i.get(t);if(!g.document)return t;if(o=11===o.nodeType?o:g.document,n)if("string"==typeof n){let l,c=D.get(o=o.head||o);if(c||D.set(o,c=new Set),!c.has(t)){{l=g.document.createElement("style"),l.innerHTML=n;const t=null!=(e=b.P)?e:x(g.document);if(null!=t&&l.setAttribute("nonce",t),!(1&r.t))if("HEAD"===o.nodeName){const r=o.querySelectorAll("link[rel=preconnect]"),e=r.length>0?r[r.length-1].nextSibling:o.querySelector("style");o.insertBefore(l,(null==e?void 0:e.parentNode)===o?e:null)}else if("host"in o)if(u){const r=new CSSStyleSheet;r.replaceSync(n),d?o.adoptedStyleSheets.unshift(r):o.adoptedStyleSheets=[r,...o.adoptedStyleSheets]}else{const r=o.querySelector("style");r?r.innerHTML=n+r.innerHTML:o.prepend(l)}else o.append(l);1&r.t&&o.insertBefore(l,null)}4&r.t&&(l.innerHTML+=s),c&&c.add(t)}}else o.adoptedStyleSheets.includes(n)||(d?o.adoptedStyleSheets.push(n):o.adoptedStyleSheets=[...o.adoptedStyleSheets,n]);return t})(e.shadowRoot?e.shadowRoot:e.getRootNode(),r);10&t&&(e["s-sc"]=n,e.classList.add(n+"-h"))})(o);Mo(o,r,n,e),l&&(l.map((o=>o())),n["s-rc"]=void 0);{const r=null!=(t=n["s-p"])?t:[],e=()=>No(o);0===r.length?e():(Promise.all(r).then(e),o.t|=4,r.length=0)}},Mo=(o,r,e,t)=>{try{r=r.render&&r.render(),o.t&=-17,o.t|=2,((o,r,e=!1)=>{var t,n,l,c;const i=o.$hostElement$,s=o.R,a=o.T||_(null,null),m=(o=>o&&o.$===H)(r)?r:W(null,null,r);if(J=i.tagName,s.F&&(m.u=m.u||{},s.F.forEach((([o,r])=>{m.u[r]=i[o]}))),e&&m.u)for(const o of Object.keys(m.u))i.hasAttribute(o)&&!["key","ref","style","class"].includes(o)&&(m.u[o]=i[o]);if(m.$=null,m.t|=4,o.T=m,m.k=a.k=i.shadowRoot||i,Y=i["s-sc"],io=!(!(1&s.t)||128&s.t),G=i["s-cr"],so=!1,ho(a,m,e),b.t|=1,ao){wo(m.k);for(const o of yo){const r=o.S;if(!r["s-ol"]&&g.document){const o=g.document.createTextNode("");o["s-nr"]=r,$o(r.parentNode,r["s-ol"]=o,r)}}for(const o of yo){const r=o.S,i=o.j;if(i){const o=i.parentNode;let e=i.nextSibling;{let l=null==(t=r["s-ol"])?void 0:t.previousSibling;for(;l;){let t=null!=(n=l["s-nr"])?n:null;if(t&&t["s-sn"]===r["s-sn"]&&o===(t.__parentNode||t.parentNode)){for(t=t.nextSibling;t===r||(null==t?void 0:t["s-sr"]);)t=null==t?void 0:t.nextSibling;if(!t||!t["s-nr"]){e=t;break}}l=l.previousSibling}}(!e&&o!==(r.__parentNode||r.parentNode)||(r.__nextSibling||r.nextSibling)!==e)&&r!==e&&(!r["s-hn"]&&r["s-ol"]&&(r["s-hn"]=r["s-ol"].parentNode.nodeName),$o(o,r,e),1===r.nodeType&&"SLOT-FB"!==r.tagName&&(r.hidden=null!=(l=r["s-ih"])&&l)),r&&"function"==typeof i["s-rf"]&&i["s-rf"](i)}else 1===r.nodeType&&(e&&(r["s-ih"]=null!=(c=r.hidden)&&c),r.hidden=!0)}}so&&R(m.k),b.t&=-2,yo.length=0,G=void 0})(o,r,t)}catch(r){l(r,o.$hostElement$)}return null},No=o=>{const r=o.$hostElement$,e=o.o,t=o.C;To(e,"componentDidRender",void 0,r),64&o.t?To(e,"componentDidUpdate",void 0,r):(o.t|=64,Fo(r),To(e,"componentDidLoad",void 0,r),o.L(r),t||Po()),o.A(r),o.O&&(o.O(),o.O=void 0),512&o.t&&z((()=>So(o,!1))),o.t&=-517},Ro=o=>{var r;{const t=e(o),n=null==(r=null==t?void 0:t.$hostElement$)?void 0:r.isConnected;return n&&2==(18&t.t)&&So(t,!1),n}},Po=()=>{z((()=>Z(g,"appload",{detail:{namespace:"mg-components"}})))},To=(o,r,e,t)=>{if(o&&o[r])try{return o[r](e)}catch(o){l(o,t)}},Fo=o=>o.classList.add("hydrated"),Lo=(o,r,t,n)=>{const c=e(o);if(!c)return;if(!c)throw Error(`Couldn't find host element for "${n.i}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const i=c.$hostElement$,s=c.D.get(r),a=c.t,g=c.o;if(t=K(t,n.U[r][0]),(!(8&a)||void 0===s)&&t!==s&&(!Number.isNaN(s)||!Number.isNaN(t))&&(c.D.set(r,t),g)){if(n.W&&128&a){const o=n.W[r];o&&o.map((o=>{try{g[o](t,s,r)}catch(o){l(o,i)}}))}if(2==(18&a)){if(g.componentShouldUpdate&&!1===g.componentShouldUpdate(t,s,r))return;So(c,!1)}}},Ao=(o,r,t)=>{var n,l;const c=o.prototype;{o.watchers&&!r.W&&(r.W=o.watchers),o.deserializers&&!r._&&(r._=o.deserializers),o.serializers&&!r.H&&(r.H=o.serializers);const i=Object.entries(null!=(n=r.U)?n:{});if(i.map((([o,[n]])=>{if(31&n||2&t&&32&n){const{get:l,set:i}=Object.getOwnPropertyDescriptor(c,o)||{};l&&(r.U[o][0]|=2048),i&&(r.U[o][0]|=4096),(1&t||!l)&&Object.defineProperty(c,o,{get(){{if(!(2048&r.U[o][0]))return((o,r)=>e(this).D.get(r))(0,o);const t=e(this),n=t?t.o:c;if(!n)return;return n[o]}},configurable:!0,enumerable:!0}),Object.defineProperty(c,o,{set(l){const c=e(this);if(c){if(i)return void 0===(32&n?this[o]:c.$hostElement$[o])&&c.D.get(o)&&(l=c.D.get(o)),i.call(this,K(l,n)),void Lo(this,o,l=32&n?this[o]:c.$hostElement$[o],r);{if(!(1&t&&4096&r.U[o][0]))return Lo(this,o,l,r),void(1&t&&!c.o&&c.N.push((()=>{4096&r.U[o][0]&&c.o[o]!==c.D.get(o)&&(c.o[o]=l)})));const e=()=>{const e=c.o[o];!c.D.get(o)&&e&&c.D.set(o,e),c.o[o]=K(l,n),Lo(this,o,c.o[o],r)};c.o?e():c.N.push((()=>{e()}))}}}})}else 1&t&&64&n&&Object.defineProperty(c,o,{value(...r){var t;const n=e(this);return null==(t=null==n?void 0:n.B)?void 0:t.then((()=>{var e;return null==(e=n.o)?void 0:e[o](...r)}))}})})),1&t){const t=new Map;c.attributeChangedCallback=function(o,n,l){b.jmp((()=>{var i;const s=t.get(o),a=e(this);if(this.hasOwnProperty(s)&&(l=this[s],delete this[s]),c.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==l)return;if(null==s){const e=null==a?void 0:a.t;if(a&&e&&!(8&e)&&128&e&&l!==n){const e=a.o,t=null==(i=r.W)?void 0:i[o];null==t||t.forEach((r=>{null!=e[r]&&e[r].call(e,l,n,o)}))}return}const g=Object.getOwnPropertyDescriptor(c,s);(l=(null!==l||"boolean"!=typeof this[s])&&l)==this[s]||g.get&&!g.set||(this[s]=l)}))},o.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=r.W)?l:{}),...i.filter((([o,r])=>31&r[0])).map((([o,e])=>{var n;const l=e[1]||o;return t.set(l,o),512&e[0]&&(null==(n=r.F)||n.push([o,l])),l}))]))}}return o},Do=(o,r)=>{To(o,"connectedCallback",void 0,r)},Uo=(o,r)=>{To(o,"disconnectedCallback",void 0,r||o)},Wo=(o,r={})=>{var t;if(!g.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const n=[],a=r.exclude||[],m=g.customElements,d=g.document.head,f=d.querySelector("meta[charset]"),v=g.document.createElement("style"),p=[];let h,y=!0;Object.assign(b,r),b.l=new URL(r.resourcesUrl||"./",g.document.baseURI).href;let w=!1;if(o.map((o=>{o[1].map((r=>{var t,s,d;const f={t:r[0],i:r[1],U:r[2],V:r[3]};4&f.t&&(w=!0),f.U=r[2],f.V=r[3],f.F=[],f.W=null!=(t=r[4])?t:{},f.H=null!=(s=r[5])?s:{},f._=null!=(d=r[6])?d:{};const v=f.i,z=class extends HTMLElement{constructor(o){if(super(o),this.hasRegisteredEventListeners=!1,((o,r)=>{const e={t:0,$hostElement$:o,R:r,D:new Map,q:new Map};e.B=new Promise((o=>e.A=o)),e.I=new Promise((o=>e.L=o)),o["s-p"]=[],o["s-rc"]=[],e.N=[];const t=e;o.__stencil__getHostRef=()=>t})(o=this,f),1&f.t)if(o.shadowRoot){if("open"!==o.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${f.i}! Mode is set to ${o.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else N.call(o,f)}connectedCallback(){const o=e(this);o&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,_o(this,o,f.V)),h&&(clearTimeout(h),h=null),y?p.push(this):b.jmp((()=>(o=>{if(!(1&b.t)){const r=e(o);if(!r)return;const t=r.R,n=()=>{};if(1&r.t)_o(o,r,t.V),(null==r?void 0:r.o)?Do(r.o,o):(null==r?void 0:r.I)&&r.I.then((()=>Do(r.o,o)));else{r.t|=1,12&t.t&&(o=>{if(!g.document)return;const r=o["s-cr"]=g.document.createComment("");r["s-cn"]=!0,$o(o,r,o.firstChild)})(o);{let e=o;for(;e=e.parentNode||e.host;)if(e["s-p"]){xo(r,r.C=e);break}}t.U&&Object.entries(t.U).map((([r,[e]])=>{if(31&e&&r in o&&o[r]!==Object.prototype[r]){const e=o[r];delete o[r],o[r]=e}})),(async(o,r,e)=>{let t;if(!(32&r.t)){if(r.t|=32,e.Y){const n=((o,r)=>{const e=o.i.replace(/-/g,"_"),t=o.Y;if(!t)return;const n=c.get(t);return n?n[e]:import(`./${t}.entry.js`).then((o=>(c.set(t,o),o[e])),(o=>{l(o,r.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,r);if(n&&"then"in n){const o=()=>{};t=await n,o()}else t=n;if(!t)throw Error(`Constructor for "${e.i}#${r.G}" was not found`);t.isProxied||(e.W=t.watchers,e.H=t.serializers,e._=t.deserializers,Ao(t,e,2),t.isProxied=!0);const i=()=>{};r.t|=8;try{new t(r)}catch(r){l(r,o)}r.t&=-9,r.t|=128,i(),Do(r.o,o)}else t=o.constructor,customElements.whenDefined(o.localName).then((()=>r.t|=128));if(t&&t.style){let o;"string"==typeof t.style&&(o=t.style);const r=U(e);if(!i.has(r)){const t=()=>{};((o,r,e)=>{let t=i.get(o);u&&e?(t=t||new CSSStyleSheet,"string"==typeof t?t=r:t.replaceSync(r)):t=r,i.set(o,t)})(r,o,!!(1&e.t)),t()}}}const n=r.C,s=()=>So(r,!0);n&&n["s-rc"]?n["s-rc"].push(s):s()})(o,r,t)}n()}})(this))))}disconnectedCallback(){b.jmp((()=>(async o=>{if(!(1&b.t)){const r=e(o);(null==r?void 0:r.J)&&(r.J.map((o=>o())),r.J=void 0),(null==r?void 0:r.o)?Uo(r.o,o):(null==r?void 0:r.I)&&r.I.then((()=>Uo(r.o,o)))}D.has(o)&&D.delete(o),o.shadowRoot&&D.has(o.shadowRoot)&&D.delete(o.shadowRoot)})(this))),b.raf((()=>{var o;const r=e(this);if(!r)return;const t=p.findIndex((o=>o===this));t>-1&&p.splice(t,1),(null==(o=null==r?void 0:r.T)?void 0:o.k)instanceof Node&&!r.T.k.isConnected&&delete r.T.k}))}componentOnReady(){var o;return null==(o=e(this))?void 0:o.I}};f.Y=o[0],a.includes(v)||m.get(v)||(n.push(v),m.define(v,Ao(z,f,1)))}))})),n.length>0&&(w&&(v.textContent+=s),v.textContent+=n.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const o=null!=(t=b.P)?t:x(g.document);null!=o&&v.setAttribute("nonce",o),d.insertBefore(v,f?f.nextSibling:d.firstChild)}y=!1,p.length?p.map((o=>o.connectedCallback())):b.jmp((()=>h=setTimeout(Po,30)))},_o=(o,r,e)=>{e&&g.document&&e.map((([e,t,n])=>{const l=o,c=Ho(r,n),i=Bo(e);b.ael(l,t,c,i),(r.J=r.J||[]).push((()=>b.rel(l,t,c,i)))}))},Ho=(o,r)=>e=>{var t;try{256&o.t?null==(t=o.o)||t[r](e):(o.M=o.M||[]).push([r,e])}catch(r){l(r,o.$hostElement$)}},Bo=o=>({passive:!!(1&o),capture:!!(2&o)}),Vo=o=>b.P=o;export{H,Q as a,Wo as b,X as c,Ro as f,o as g,W as h,m as p,t as r,Vo as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,f as i,h as e,a}from"./p-
|
|
1
|
+
import{r as t,c as s,f as i,h as e,a}from"./p-T6kOJXP1.js";import{C as h,t as o}from"./p-WtiuOkLj.js";import{i as r}from"./p-CNX6lq0x.js";const n=["info","warning","success","danger"],c=["bar-left","background"],l=class{constructor(i){t(this,i),this.componentShow=s(this,"component-show",3),this.componentHide=s(this,"component-hide",3),this.componentClose=s(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new h(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&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){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),i(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=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return e("mg-message",{key:"626afcfe4c86dacff9860d2515827ae5aa6b7234",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},e("slot",{key:"bc7d72c21dcf36c9012e144253ce2b3c6ebc14ed"}),this.hasActions?e("span",{slot:"actions"},e("slot",{name:"actions"})):e("span",{class:"mg-c-alert__close-button"},e("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},e("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};l.style=".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}";export{l as mg_alert}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,a as e}from"./p-T6kOJXP1.js";import{P as o,C as n,f as a,a as h,n as r,g as c,t as p,b as m,i as l,c as u,d as g}from"./p-WtiuOkLj.js";import{c as d,a as b,w as v}from"./p-CNgv8hc5.js";import{i as f}from"./p-CNX6lq0x.js";import{K as w}from"./p-yMGqY8YG.js";const _=t=>t&&"object"==typeof t&&"string"==typeof t.title&&void 0!==t.value,x=class{constructor(s){t(this,s),this.valueChange=i(this,"value-change",7),this.filterChange=i(this,"filter-change",7),this.showMore=i(this,"load-more",7),this.inputValid=i(this,"input-valid",7),this.fetchError=i(this,"fetch-error",7),this.classFocus="mg-u-is-focused",this.hasDisplayedError=!1,this.name=this.identifier,this.labelOnTop=!1,this.labelHide=!1,this.required=!1,this.readonly=!1,this.disabled=!1,this.mgWidth="full",this.tooltipPosition="input",this.options=new o([]),this.filter="",this.classCollection=new n(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]),this.popoverDisplay=!1,this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>a(i.value)===t.target.id))),this.popoverDisplay=!1},this.handleResetButton=t=>{t.stopPropagation(),this.reset().then((()=>{this.input.focus()}))},this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail},this.handleFilterInput=()=>{this.checkValidity(),this.hasDisplayedError&&this.setErrorMessage(),this.popoverDisplay||(this.popoverDisplay=!0),this.debounce||(this.debounce=!0,setTimeout((()=>{this.filter=this.input.value,this.debounce=!1}),250))},this.handleFilterBlur=()=>{this.popoverDisplay||(this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))},this.handleFilterFocus=()=>{this.isLoading||(this.option=null)},this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:h.NEXT}).then((()=>{this.input.focus()}))},this.handleFilterKeydown=t=>{var i;if(this.disabled||t.ctrlKey||t.shiftKey)return;let s=!1;switch(t.key){case w.TAB:case w.ENTER:s=t.key===w.ENTER;const e=null!==(i=this.option)&&void 0!==i?i:this.options.items.find(this.isCurrentOption);this.popoverDisplay&&this.setValue(e),this.popoverDisplay=!1;break;case w.DOWN:case w.ARROWDOWN:case w.UP:case w.ARROWUP:if(s=!0,this.isLoading||!(this.page.total>0)){this.popoverDisplay=!0;break}if(Boolean(t.altKey)&&[w.DOWN,w.ARROWDOWN].includes(t.key)){this.popoverDisplay=!0;break}let o;const n=this.popoverDisplay&&_(this.option);[w.DOWN,w.ARROWDOWN].includes(t.key)?o=n?h.NEXT:h.FIRST:[w.UP,w.ARROWUP].includes(t.key)&&(o=n?h.PREVIOUS:h.LAST),this.loadingWrapper({name:"scroll",cursor:o}),this.popoverDisplay=!0;break;case w.LEFT:case w.ARROWLEFT:case w.HOME:case w.RIGHT:case w.ARROWRIGHT:case w.END:if(!_(this.option))break;let a;s=!0,this.option=null,w.HOME===t.key?a=0:w.END===t.key&&(a=this.filter.length),"number"==typeof a&&this.input.setSelectionRange(a,a);break;case w.ESC:case w.ESCAPE:s=!0,this.popoverDisplay?this.popoverDisplay=!1:(this.setValue(null),this.filter="",this.option=null);break;default:this.option=null}s&&(t.stopPropagation(),t.preventDefault())},this.scrollToIndex=t=>{requestAnimationFrame((()=>{var i;this.popoverDisplay&&(null===(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))||void 0===i||i.scrollIntoView({block:"nearest"}))}))},this.isCurrentOption=t=>(_(this.value)?this.value.value:this.value)===t.value,this.getValueTitle=()=>this.value&&_(this.value)?this.value.title:"string"==typeof this.value?this.value:"",this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||this.input.checkValidity())},this.setErrorMessage=t=>{this.errorMessage=void 0,this.valid||void 0===t?!this.valid&&this.input.validity.valueMissing&&(this.errorMessage=this.messages.errors.required):this.errorMessage=t},this.optionsFilter=t=>""===this.filter||t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()),this.loadingWrapper=t=>{let i,s;if(Boolean(this.loadingAction)||(this.loadingAction=t.name),Boolean(this.option)&&"load-more"!==this.loadingAction?s=this.page.items.findIndex((t=>t.value.toString()===this.option.value.toString())):"load-more"===this.loadingAction&&(s=this.page.items.length-this.page.baseIndex),"load-more"===t.name)this.isLoading=!0,i=this.goToNextPage;else{if(t.cursor===h.NEXT&&this.page.items.length<=this.page.total&&s+this.page.baseIndex===this.page.items.length&&s+this.page.baseIndex<this.page.total)return void this.loadMoreElement.click();i="scroll"===t.name?r:this.updatePage}return i().then((()=>{const i=this.options.items.filter(this.optionsFilter);"load-data"!==t.name&&(s=this.page.getIndexFromCursor(t.cursor,"load-more"===this.loadingAction&&s>=0?i[s]:this.option)),this.option=i[s],this.scrollToIndex(s)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=!1,this.loadingAction=void 0}))}))},this.goToNextPage=()=>(this.showMore.emit(),Boolean(this.fetchurl)?this.getOptions("string"==typeof this.page.next?this.page.next:void 0).then((t=>{if(!Boolean(t))return;const i=[...this.page.items,...t.items];this.options=new o(i,{total:t.total,next:t.next,top:i.length})})):r((()=>{if("function"==typeof this.page.next){const t=this.page.next();this.page=new g(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items]}))}}))),this.updatePage=async()=>{if(Boolean(this.fetchurl))return this.getOptions().then((t=>{Boolean(t)&&(this.options=new o(t.items,{total:t.total,next:t.next,top:t.top}))}));this.page=this.options.getPage(0,this.optionsFilter)},this.getOptions=async(t=this.fetchurl)=>{const i=("string"==typeof t?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(this.filter));try{const t=await fetch(i,this.fetchoptions);if(!t.ok)return void this.fetchError.emit(new Error(`${t.status} - ${t.statusText}`));const s=await t.json(),e=c(s,this.fetchmappings.response.items).map((t=>({title:c(t,this.fetchmappings.response.itemTitle),value:void 0!==this.fetchmappings.response.itemValue?c(t,this.fetchmappings.response.itemValue):t}))),o=Number(c(s,this.fetchmappings.response.total,0));let n=c(s,this.fetchmappings.response.next);if(URL.canParse(i)&&Boolean(n)&&!URL.canParse(n)){const t=new URL(i);t.pathname.endsWith(n.split("?")[0])&&(n=new URL(n,t).toString())}return{items:e,total:o,next:n,top:e.length}}catch(t){this.fetchError.emit(t)}}}watchValue(t){this.filter=this.getValueTitle(),this.valueChange.emit(t)}watchItems(t){if(!Boolean(this.fetchurl)||Boolean(t)){if(Boolean(this.fetchurl)&&Boolean(t))throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${p(t)}.`);if(Array.isArray(t)&&0===t.length)this.options=new o([]);else if(m(t))this.options=new o(t.map((t=>({title:t,value:t}))),{total:t.length});else{if(i=t,!Array.isArray(i)||!i.every(_))throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${p(t)}.`);this.options=new o(t,{total:t.length})}var i}}watchIdentifier(t){Boolean(t)&&(this.popoverId=`${t}-popover`,this.element.dataset.mgPopoverGuard=this.popoverId)}watchReadonly(t){t?this.classCollection.add(d):this.classCollection.delete(d)}watchValidityChange(t,i,s){void 0!==this.input&&(this.input[s]=t,this.checkValidity(),this.hasDisplayedError&&(this.setErrorMessage(),this.hasDisplayedError=!1))}watchDisabled(t){t?this.classCollection.add(b):this.classCollection.delete(b)}watchMgWidth(t){v.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)})),void 0!==t&&this.classCollection.add(`mg-c-input--width-${this.mgWidth}`),this.classCollection=new n(this.classCollection.classes)}watchFetchUrl(t){Boolean(t)&&this.loadingWrapper({name:"load-data"})}watchFetchOptions(t){if(this.fetchurl&&t&&!l(t))throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${p(t)}.`);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.');if(Boolean(t)&&!(t=>{const i=l(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:s}=t;return![i,s].some((t=>!l(t)))&&"string"==typeof i.filter&&"object"==typeof s&&"string"==typeof s.total&&"string"==typeof s.items&&"string"==typeof s.next&&"string"==typeof s.itemTitle&&("string"==typeof s.itemValue||void 0===s.itemValue)}return i})(t))throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${p(t)}.`)}watchOptions(t){this.page=t.getPage(0,Boolean(this.filter)?this.optionsFilter:void 0)}watchFilter(t){this.loadingWrapper({name:"load-data"}),this.filterChange.emit(t)}watchPopoverDisplay(t){t?(this.classCollection.add(this.classFocus),this.input.focus()):(this.option=null,this.filter=this.getValueTitle(),this.classCollection.delete(this.classFocus),this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))}async setFocus(){var t;null===(t=this.input)||void 0===t||t.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity(),this.setErrorMessage(),this.hasDisplayedError=this.invalid,t()}))}))}async setError(t,i){if("boolean"!=typeof t)throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.');if(!u(i))throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.');this.setValidity(t),this.setErrorMessage(t?void 0:i),this.hasDisplayedError=this.invalid}async reset(){if(!this.readonly)return this.setValue(null),this.option=null,this.filter="",new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity(),this.errorMessage=void 0,this.hasDisplayedError=!1,t()}))}))}setValue(t){this.value=_(t)?m(this.items||this.options.items)?t.title:Object.assign({},t):""}setValidity(t){const i=this.valid;this.valid=t,this.invalid=!this.valid,(void 0===this.handlerInProgress||"blur"===this.handlerInProgress&&this.valid!==i)&&this.inputValid.emit(this.valid)}componentWillLoad(){return this.messages=f(this.element).messages,this.watchIdentifier(this.identifier),this.watchItems(this.items),Boolean(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),setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,e,o,n,h;const r=`${this.identifier}-list`,c=this.getValueTitle(),p=this.value&&!this.disabled;let m,l;return(null===(t=this.page)||void 0===t?void 0:t.items.length)>0?m="list":0===(null===(i=this.page)||void 0===i?void 0:i.items.length)&&Boolean(this.filter)?m="notfound":0===(null===(e=this.page)||void 0===e?void 0:e.items.length)&&(m="notavailable"),l=Boolean(null===(o=this.option)||void 0===o?void 0:o.value)?this.option.value:"string"==typeof this.value?this.value:null===(n=this.value)||void 0===n?void 0:n.value,s("mg-input",{key:"79e5263cd3b1c0fa0b3f386a547f2bdd48a33b28",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:m&&"list"!==m?m:void 0,labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&void 0===this.value?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?c&&s("b",{class:"mg-c-input__readonly-value"},c):s("mg-popover",{identifier:this.popoverId,placement:"bottom-start",display:this.popoverDisplay,"arrow-hide":!0,style:{"--mg-c-input-list-width":Boolean(null===(h=this.input)||void 0===h?void 0:h.offsetWidth)?`${this.input.offsetWidth}px`:void 0},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},s("div",{class:"mg-c-input__input-group-container"},s("mg-icon",{icon:"magnifying-glass"}),s("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":(!0===this.invalid).toString(),"aria-activedescendant":a(l),onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{null!==t&&(this.input=t)}}),p?s("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":!0,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton},s("mg-icon",{icon:"cross"})):s("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":!0,label:this.itemsLabel,tabindex:"-1",disabled:this.disabled},s("mg-icon",{icon:"chevron-"+(this.popoverDisplay?"up":"down")}))),s("div",{slot:"content",class:"mg-c-input__popover-container"},"list"===m&&[s("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=>{var i;return s("li",{role:"option",class:{"mg-c-input__input-list-item":!0,"mg-c-input__input-list-item--focus-visible":JSON.stringify(null===(i=this.option)||void 0===i?void 0:i.value)===JSON.stringify(t.value),"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:a(t.value),"aria-selected":this.isCurrentOption(t).toString(),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&s("mg-icon",{icon:"check"}))}))),this.isLoading&&s("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&s("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":!0,"disable-on-click":!0,onClick:this.handleLoadMoreButton,"aria-controls":r,ref:t=>{null!==t&&(this.loadMoreElement=t)}},s("mg-icon",{icon:"chevron-down"}),this.messages.input.showMore)],"notfound"===m&&s("p",{id:m,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),"notavailable"===m&&s("p",{id:m,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return e(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"]}}};x.style=".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__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.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);overflow-wrap:anywhere}.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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-card-overflow:hidden;--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__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}";export{x as mg_input_combobox}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E={TAB:"Tab",ENTER:"Enter",DOWN:"Down",UP:"Up",LEFT:"Left",RIGHT:"Right",ARROWDOWN:"ArrowDown",ARROWUP:"ArrowUp",ARROWRIGHT:"ArrowRight",ARROWLEFT:"ArrowLeft",HOME:"Home",END:"End",ESC:"Esc",ESCAPE:"Escape",NUMPADENTER:"NumpadEnter",SPACE:"Space"};export{E as K}
|
|
@@ -15,7 +15,7 @@ export type IconSizeType = Size & (typeof sizes)[number];
|
|
|
15
15
|
/**
|
|
16
16
|
* List of all possibles variants
|
|
17
17
|
*/
|
|
18
|
-
export declare const variants: readonly ["success", "warning", "danger", "info", "app"];
|
|
18
|
+
export declare const variants: readonly ["success", "warning", "danger", "info", "app", "neutral"];
|
|
19
19
|
/**
|
|
20
20
|
* Variant type from variants
|
|
21
21
|
*/
|
|
@@ -39,11 +39,6 @@ export declare class MgIcon {
|
|
|
39
39
|
* Component classes
|
|
40
40
|
*/
|
|
41
41
|
classCollection: ClassList;
|
|
42
|
-
/**
|
|
43
|
-
* Method to set default varianStyle props
|
|
44
|
-
* needeed has stencil doesn't know that props is mutated when updated in prop watcher
|
|
45
|
-
*/
|
|
46
|
-
private setDefaultVariantStyle;
|
|
47
42
|
/**
|
|
48
43
|
* Render icon in shadowroot
|
|
49
44
|
* @param icon - icon to render
|
|
@@ -31,17 +31,4 @@ export declare const classFieldset = "mg-c-input--fieldset";
|
|
|
31
31
|
export declare const classDisabled = "mg-c-input--disabled";
|
|
32
32
|
export declare const classReadonly = "mg-c-input--readonly";
|
|
33
33
|
export declare const classVerticalList = "mg-c-input--vertical-list";
|
|
34
|
-
/**
|
|
35
|
-
* Define MgInput['errorMessage'] Details type
|
|
36
|
-
*/
|
|
37
|
-
export type ErrorMessageDetailsType = {
|
|
38
|
-
summary: string;
|
|
39
|
-
details: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Define cutom errors
|
|
43
|
-
*/
|
|
44
|
-
export declare const CustomError: {
|
|
45
|
-
readonly NoValue: "noValue";
|
|
46
|
-
};
|
|
47
34
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TooltipPosition
|
|
1
|
+
import { type TooltipPosition } from './mg-input.conf';
|
|
2
2
|
/**
|
|
3
3
|
* @slot - Input content
|
|
4
4
|
*/
|
|
@@ -6,13 +6,10 @@ export declare class MgInput {
|
|
|
6
6
|
/************
|
|
7
7
|
* Internal *
|
|
8
8
|
************/
|
|
9
|
-
private messages;
|
|
10
9
|
private helpTextId;
|
|
11
10
|
private helpTextErrorId;
|
|
12
11
|
private readonly slotLabel;
|
|
13
12
|
private readonly slotError;
|
|
14
|
-
private readonly slotSummary;
|
|
15
|
-
private readonly slotDetails;
|
|
16
13
|
private readonly slotHelpText;
|
|
17
14
|
private errorMessageSlotElement;
|
|
18
15
|
private helptextMessageSlotElement;
|
|
@@ -61,7 +58,7 @@ export declare class MgInput {
|
|
|
61
58
|
/**
|
|
62
59
|
* Define error message to display
|
|
63
60
|
*/
|
|
64
|
-
errorMessage?: string
|
|
61
|
+
errorMessage?: string;
|
|
65
62
|
watchErrorMessage(newValue: MgInput['errorMessage']): void;
|
|
66
63
|
/**
|
|
67
64
|
* Define help text to display
|
|
@@ -105,17 +102,9 @@ export declare class MgInput {
|
|
|
105
102
|
*/
|
|
106
103
|
private renderLabel;
|
|
107
104
|
/**
|
|
108
|
-
* Render error message
|
|
105
|
+
* Render error message
|
|
109
106
|
*/
|
|
110
|
-
private
|
|
111
|
-
/**
|
|
112
|
-
* Render error message element
|
|
113
|
-
*/
|
|
114
|
-
private renderErrorStringMessage;
|
|
115
|
-
/**
|
|
116
|
-
* Render error message slot element
|
|
117
|
-
*/
|
|
118
|
-
private renderErrorMessageSlot;
|
|
107
|
+
private renderErrorMessage;
|
|
119
108
|
/**
|
|
120
109
|
* Render help text message
|
|
121
110
|
*/
|
|
@@ -112,19 +112,15 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
112
112
|
/**
|
|
113
113
|
* Overwrite default "edit" button message
|
|
114
114
|
*/
|
|
115
|
-
editButtonMessage
|
|
115
|
+
editButtonMessage: string;
|
|
116
116
|
/**
|
|
117
117
|
* Overwrite default "show" button message
|
|
118
118
|
*/
|
|
119
|
-
showButtonMessage
|
|
119
|
+
showButtonMessage: string;
|
|
120
120
|
/**
|
|
121
121
|
* Overwrite default "select" button message
|
|
122
122
|
*/
|
|
123
|
-
selectButtonMessage
|
|
124
|
-
/**
|
|
125
|
-
* Define no value error detail
|
|
126
|
-
*/
|
|
127
|
-
noValueErrorDetail?: string;
|
|
123
|
+
selectButtonMessage: string;
|
|
128
124
|
/**
|
|
129
125
|
* Component classes
|
|
130
126
|
*/
|
|
@@ -252,16 +248,6 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
252
248
|
* Check if input is valid
|
|
253
249
|
*/
|
|
254
250
|
private checkValidity;
|
|
255
|
-
/**
|
|
256
|
-
* Test if component has items
|
|
257
|
-
* @returns truthy if component has items
|
|
258
|
-
*/
|
|
259
|
-
private hasInputValue;
|
|
260
|
-
/**
|
|
261
|
-
* Test if component has no value error message displayed
|
|
262
|
-
* @returns truthy if compent display no value error message
|
|
263
|
-
*/
|
|
264
|
-
private hasNoValueErrorMessageDisplay;
|
|
265
251
|
/**
|
|
266
252
|
* Set button text locale key
|
|
267
253
|
*/
|
|
@@ -277,10 +263,6 @@ export declare class MgInputCheckbox implements Omit<MgInputCheckboxListProps, '
|
|
|
277
263
|
* @param errorMessage - errorMessage override
|
|
278
264
|
*/
|
|
279
265
|
private setErrorMessage;
|
|
280
|
-
/**
|
|
281
|
-
* Reset error message
|
|
282
|
-
*/
|
|
283
|
-
private resetErrorMessage;
|
|
284
266
|
/**
|
|
285
267
|
* Method to get mg-popover identifier
|
|
286
268
|
* @returns MgPopover identifier
|
|
@@ -13,7 +13,6 @@ export declare class MgInputCombobox {
|
|
|
13
13
|
private popoverId;
|
|
14
14
|
private messages;
|
|
15
15
|
private hasDisplayedError;
|
|
16
|
-
private customError;
|
|
17
16
|
private handlerInProgress;
|
|
18
17
|
private loadingAction;
|
|
19
18
|
private debounce;
|
|
@@ -153,10 +152,6 @@ export declare class MgInputCombobox {
|
|
|
153
152
|
response: ResponseMappingType;
|
|
154
153
|
};
|
|
155
154
|
watchFetchMappings(newValue: MgInputCombobox['fetchmappings']): void;
|
|
156
|
-
/**
|
|
157
|
-
* Define no value error detail
|
|
158
|
-
*/
|
|
159
|
-
noValueErrorDetail?: string;
|
|
160
155
|
/**
|
|
161
156
|
* Define input valid state
|
|
162
157
|
*/
|
|
@@ -293,15 +288,9 @@ export declare class MgInputCombobox {
|
|
|
293
288
|
* @returns value title
|
|
294
289
|
*/
|
|
295
290
|
private getValueTitle;
|
|
296
|
-
/**
|
|
297
|
-
* Test if component has no value error message displayed
|
|
298
|
-
* @returns truthy if compent display no value error message
|
|
299
|
-
*/
|
|
300
|
-
private hasNoValueError;
|
|
301
291
|
/**
|
|
302
292
|
* Method to set validity values
|
|
303
|
-
* @param
|
|
304
|
-
* @param customErrorMessage - custom error message
|
|
293
|
+
* @param newValue - valid new value
|
|
305
294
|
*/
|
|
306
295
|
private setValidity;
|
|
307
296
|
/**
|
|
@@ -310,12 +299,9 @@ export declare class MgInputCombobox {
|
|
|
310
299
|
private checkValidity;
|
|
311
300
|
/**
|
|
312
301
|
* Set input error message
|
|
302
|
+
* @param errorMessage - errorMessage override
|
|
313
303
|
*/
|
|
314
304
|
private setErrorMessage;
|
|
315
|
-
/**
|
|
316
|
-
* Reset error message
|
|
317
|
-
*/
|
|
318
|
-
private resetErrorMessage;
|
|
319
305
|
/**
|
|
320
306
|
* Get filtered options from `filter` input value
|
|
321
307
|
* @returns filtered options
|
|
@@ -81,10 +81,6 @@ export declare class MgInputRadio {
|
|
|
81
81
|
* Add a help text under the input, usually expected data format and example
|
|
82
82
|
*/
|
|
83
83
|
helpText?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Define no value error detail
|
|
86
|
-
*/
|
|
87
|
-
noValueErrorDetail?: string;
|
|
88
84
|
/**
|
|
89
85
|
* Define input valid state
|
|
90
86
|
*/
|
|
@@ -152,16 +148,6 @@ export declare class MgInputRadio {
|
|
|
152
148
|
* Handle blur event
|
|
153
149
|
*/
|
|
154
150
|
private handleBlur;
|
|
155
|
-
/**
|
|
156
|
-
* Test if component has items
|
|
157
|
-
* @returns truthy if component has items
|
|
158
|
-
*/
|
|
159
|
-
private hasInputValue;
|
|
160
|
-
/**
|
|
161
|
-
* Test if component has no value error message displayed
|
|
162
|
-
* @returns truthy if compent display no value error message
|
|
163
|
-
*/
|
|
164
|
-
private hasNoValueErrorMessageDisplay;
|
|
165
151
|
/**
|
|
166
152
|
* Check if input is valid
|
|
167
153
|
*/
|
|
@@ -171,10 +157,6 @@ export declare class MgInputRadio {
|
|
|
171
157
|
* @param errorMessage - errorMessage override
|
|
172
158
|
*/
|
|
173
159
|
private setErrorMessage;
|
|
174
|
-
/**
|
|
175
|
-
* Reset error message
|
|
176
|
-
*/
|
|
177
|
-
private resetErrorMessage;
|
|
178
160
|
/**
|
|
179
161
|
* get invalid element
|
|
180
162
|
* @returns element
|
|
@@ -93,10 +93,6 @@ export declare class MgInputSelect {
|
|
|
93
93
|
* Add a help text under the input, usually expected data format and example
|
|
94
94
|
*/
|
|
95
95
|
helpText?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Define no value error detail
|
|
98
|
-
*/
|
|
99
|
-
noValueErrorDetail?: string;
|
|
100
96
|
/**
|
|
101
97
|
* Define input valid state
|
|
102
98
|
*/
|
|
@@ -170,16 +166,6 @@ export declare class MgInputSelect {
|
|
|
170
166
|
* @returns truthy if input.value is an item
|
|
171
167
|
*/
|
|
172
168
|
private isInputValue;
|
|
173
|
-
/**
|
|
174
|
-
* Test if component has items
|
|
175
|
-
* @returns truthy if component has items
|
|
176
|
-
*/
|
|
177
|
-
private hasInputValue;
|
|
178
|
-
/**
|
|
179
|
-
* Test if component has no value error message displayed
|
|
180
|
-
* @returns truthy if compent display no value error message
|
|
181
|
-
*/
|
|
182
|
-
private hasNoValueErrorMessageDisplay;
|
|
183
169
|
/**
|
|
184
170
|
* Handle blur event
|
|
185
171
|
*/
|
|
@@ -198,10 +184,6 @@ export declare class MgInputSelect {
|
|
|
198
184
|
* @param errorMessage - errorMessage override
|
|
199
185
|
*/
|
|
200
186
|
private setErrorMessage;
|
|
201
|
-
/**
|
|
202
|
-
* Reset error message
|
|
203
|
-
*/
|
|
204
|
-
private resetErrorMessage;
|
|
205
187
|
/*************
|
|
206
188
|
* Lifecycle *
|
|
207
189
|
*************/
|
|
@@ -11,7 +11,6 @@ export declare class MgInputToggle {
|
|
|
11
11
|
* Internal *
|
|
12
12
|
************/
|
|
13
13
|
private button;
|
|
14
|
-
private messages;
|
|
15
14
|
private readonly classIsActive;
|
|
16
15
|
private readonly classOnOff;
|
|
17
16
|
private readonly classIcon;
|
|
@@ -85,18 +84,6 @@ export declare class MgInputToggle {
|
|
|
85
84
|
* Add a help text under the input, usually expected data format and example
|
|
86
85
|
*/
|
|
87
86
|
helpText?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Define no value error detail
|
|
90
|
-
*/
|
|
91
|
-
noValueErrorDetail?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Define input valid state
|
|
94
|
-
*/
|
|
95
|
-
valid: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Define input invalid state
|
|
98
|
-
*/
|
|
99
|
-
invalid: boolean;
|
|
100
87
|
/**
|
|
101
88
|
* Component classes
|
|
102
89
|
*/
|
|
@@ -109,6 +96,10 @@ export declare class MgInputToggle {
|
|
|
109
96
|
* Error message to display
|
|
110
97
|
*/
|
|
111
98
|
errorMessage: string;
|
|
99
|
+
/**
|
|
100
|
+
* Define input valid state
|
|
101
|
+
*/
|
|
102
|
+
valid: boolean;
|
|
112
103
|
/**
|
|
113
104
|
* Checked internal value
|
|
114
105
|
*/
|
|
@@ -139,33 +130,6 @@ export declare class MgInputToggle {
|
|
|
139
130
|
* Reset value, validity, error and visual state
|
|
140
131
|
*/
|
|
141
132
|
reset(): Promise<void>;
|
|
142
|
-
/**
|
|
143
|
-
* Display input error if it exists.
|
|
144
|
-
*/
|
|
145
|
-
private displayError;
|
|
146
|
-
/**
|
|
147
|
-
* Check if input is valid
|
|
148
|
-
*/
|
|
149
|
-
private checkValidity;
|
|
150
|
-
/**
|
|
151
|
-
* Method to set validity values
|
|
152
|
-
* @param newValue - valid new value
|
|
153
|
-
*/
|
|
154
|
-
private setValidity;
|
|
155
|
-
/**
|
|
156
|
-
* Reset error message
|
|
157
|
-
*/
|
|
158
|
-
private resetErrorMessage;
|
|
159
|
-
/**
|
|
160
|
-
* Test if component has items
|
|
161
|
-
* @returns truthy if component has items
|
|
162
|
-
*/
|
|
163
|
-
private hasInputItems;
|
|
164
|
-
/**
|
|
165
|
-
* Test if component has no value error message displayed
|
|
166
|
-
* @returns truthy if compent display no value error message
|
|
167
|
-
*/
|
|
168
|
-
private hasNoValueErrorMessageDisplay;
|
|
169
133
|
/**
|
|
170
134
|
* Set input error message
|
|
171
135
|
* @param errorMessage - errorMessage override
|