@mgdis/mg-components 6.2.0 → 6.4.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/{index-52d5f3d4.js → index-911898e4.js} +410 -266
- package/dist/cjs/index-911898e4.js.map +1 -0
- package/dist/cjs/{index-cc11af95.js → index-a3269bfc.js} +3 -3
- package/dist/cjs/{index-cc11af95.js.map → index-a3269bfc.js.map} +1 -1
- package/dist/cjs/{index.es-ac7c22e3.js → index.es-325100d7.js} +47 -47
- package/dist/cjs/index.es-325100d7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_36.cjs.entry.js +1414 -983
- package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-alert.cjs.entry.js +17 -12
- package/dist/cjs/mg-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-components.cjs.js.map +1 -1
- package/dist/cjs/mg-loader.cjs.entry.js +6 -8
- package/dist/cjs/mg-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-progress.cjs.entry.js +27 -12
- package/dist/cjs/mg-progress.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +10 -3
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js.map +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +15 -4
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js.map +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +15 -4
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +112 -12
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +9 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +22 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +14 -4
- package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +3 -4
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +28 -6
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +50 -13
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +29 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +106 -33
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +99 -36
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +130 -35
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +87 -25
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +86 -26
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +92 -30
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +109 -32
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +109 -29
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +67 -21
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +16 -70
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +101 -89
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +194 -157
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +19 -8
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +31 -6
- package/dist/collection/components/molecules/mg-alert/mg-alert.js.map +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +17 -5
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +48 -16
- package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +13 -3
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +5 -5
- package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +22 -6
- package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +54 -11
- package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +28 -9
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +48 -13
- package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +10 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +61 -7
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +26 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js.map +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +28 -8
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
- package/dist/collection/utils/behaviors.utils.js +44 -107
- package/dist/collection/utils/behaviors.utils.js.map +1 -1
- package/dist/components/index.es.js +42 -42
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/mg-action-more.js +15 -12
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-alert.js +15 -10
- package/dist/components/mg-alert.js.map +1 -1
- package/dist/components/mg-badge2.js +13 -10
- package/dist/components/mg-badge2.js.map +1 -1
- package/dist/components/mg-button2.js +77 -16
- package/dist/components/mg-button2.js.map +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +8 -7
- package/dist/components/mg-character-left2.js.map +1 -1
- package/dist/components/mg-details.js +11 -7
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-divider2.js +7 -1
- package/dist/components/mg-divider2.js.map +1 -1
- package/dist/components/mg-form.js +35 -21
- package/dist/components/mg-form.js.map +1 -1
- package/dist/components/mg-icon2.js +17 -11
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-illustrated-message.js +10 -4
- package/dist/components/mg-illustrated-message.js.map +1 -1
- package/dist/components/mg-input-checkbox-paginated2.js +14 -10
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
- package/dist/components/mg-input-checkbox.js +73 -40
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-input-date.js +77 -46
- package/dist/components/mg-input-date.js.map +1 -1
- package/dist/components/mg-input-numeric.js +90 -45
- package/dist/components/mg-input-numeric.js.map +1 -1
- package/dist/components/mg-input-password.js +56 -28
- package/dist/components/mg-input-password.js.map +1 -1
- package/dist/components/mg-input-radio.js +59 -31
- package/dist/components/mg-input-radio.js.map +1 -1
- package/dist/components/mg-input-select2.js +60 -36
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text2.js +71 -40
- package/dist/components/mg-input-text2.js.map +1 -1
- package/dist/components/mg-input-textarea.js +72 -36
- package/dist/components/mg-input-textarea.js.map +1 -1
- package/dist/components/mg-input-title2.js +11 -8
- package/dist/components/mg-input-title2.js.map +1 -1
- package/dist/components/mg-input-toggle.js +43 -25
- package/dist/components/mg-input-toggle.js.map +1 -1
- package/dist/components/mg-input2.js +37 -20
- package/dist/components/mg-input2.js.map +1 -1
- package/dist/components/mg-item-more2.js +146 -270
- package/dist/components/mg-item-more2.js.map +1 -1
- package/dist/components/mg-loader.js +4 -6
- package/dist/components/mg-loader.js.map +1 -1
- package/dist/components/mg-menu-item2.js +193 -149
- package/dist/components/mg-menu-item2.js.map +1 -1
- package/dist/components/mg-message2.js +21 -9
- package/dist/components/mg-message2.js.map +1 -1
- package/dist/components/mg-modal.js +36 -17
- package/dist/components/mg-modal.js.map +1 -1
- package/dist/components/mg-pagination2.js +21 -14
- package/dist/components/mg-pagination2.js.map +1 -1
- package/dist/components/mg-panel.js +37 -20
- package/dist/components/mg-panel.js.map +1 -1
- package/dist/components/mg-popover-content2.js +9 -3
- package/dist/components/mg-popover-content2.js.map +1 -1
- package/dist/components/mg-popover2.js +38 -10
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-progress.js +26 -11
- package/dist/components/mg-progress.js.map +1 -1
- package/dist/components/mg-skip-links.js +2 -3
- package/dist/components/mg-skip-links.js.map +1 -1
- package/dist/components/mg-tabs.js +27 -17
- package/dist/components/mg-tabs.js.map +1 -1
- package/dist/components/mg-tag.js +12 -8
- package/dist/components/mg-tag.js.map +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -2
- package/dist/components/mg-tooltip-content2.js.map +1 -1
- package/dist/components/mg-tooltip2.js +24 -12
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/esm/{index-81752ffe.js → index-1f32332a.js} +410 -266
- package/dist/esm/index-1f32332a.js.map +1 -0
- package/dist/esm/{index-f3d3fb70.js → index-9bd10f5d.js} +3 -3
- package/dist/esm/{index-f3d3fb70.js.map → index-9bd10f5d.js.map} +1 -1
- package/dist/esm/{index.es-940821a9.js → index.es-a2587b72.js} +43 -43
- package/dist/esm/index.es-a2587b72.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_36.entry.js +1414 -983
- package/dist/esm/mg-action-more_36.entry.js.map +1 -1
- package/dist/esm/mg-alert.entry.js +17 -12
- package/dist/esm/mg-alert.entry.js.map +1 -1
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-components.js.map +1 -1
- package/dist/esm/mg-loader.entry.js +6 -8
- package/dist/esm/mg-loader.entry.js.map +1 -1
- package/dist/esm/mg-progress.entry.js +27 -12
- package/dist/esm/mg-progress.entry.js.map +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/p-0ead5317.entry.js +2 -0
- package/dist/mg-components/{p-31e6c1a7.entry.js.map → p-0ead5317.entry.js.map} +1 -1
- package/dist/mg-components/p-35898742.js +3 -0
- package/dist/mg-components/p-35898742.js.map +1 -0
- package/dist/mg-components/p-3b052ac0.entry.js +2 -0
- package/dist/mg-components/p-3b052ac0.entry.js.map +1 -0
- package/dist/mg-components/p-6810a565.entry.js +2 -0
- package/dist/mg-components/p-6810a565.entry.js.map +1 -0
- package/dist/mg-components/{p-ee51ec5e.js → p-b986c107.js} +2 -2
- package/dist/mg-components/p-b986c107.js.map +1 -0
- package/dist/mg-components/{p-a49e2b74.js → p-dc436f3c.js} +2 -2
- package/dist/mg-components/p-f48d964f.entry.js +2 -0
- package/dist/mg-components/p-f48d964f.entry.js.map +1 -0
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +9 -1
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +11 -1
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +6 -0
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -15
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +14 -30
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +46 -37
- package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +4 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +4 -0
- package/dist/types/components.d.ts +33 -15
- package/dist/types/utils/behaviors.utils.d.ts +15 -44
- package/ide/intellij/web-types.json +39 -11
- package/ide/vscode/html-custom-data.json +28 -6
- package/package.json +27 -37
- package/dist/cjs/index-52d5f3d4.js.map +0 -1
- package/dist/cjs/index.es-ac7c22e3.js.map +0 -1
- package/dist/esm/index-81752ffe.js.map +0 -1
- package/dist/esm/index.es-940821a9.js.map +0 -1
- package/dist/mg-components/p-2298352f.js +0 -3
- package/dist/mg-components/p-2298352f.js.map +0 -1
- package/dist/mg-components/p-31e6c1a7.entry.js +0 -2
- package/dist/mg-components/p-67c9be27.entry.js +0 -2
- package/dist/mg-components/p-67c9be27.entry.js.map +0 -1
- package/dist/mg-components/p-95895169.entry.js +0 -2
- package/dist/mg-components/p-95895169.entry.js.map +0 -1
- package/dist/mg-components/p-abddacc2.entry.js +0 -2
- package/dist/mg-components/p-abddacc2.entry.js.map +0 -1
- package/dist/mg-components/p-ee51ec5e.js.map +0 -1
- /package/dist/mg-components/{p-a49e2b74.js.map → p-dc436f3c.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=Object.defineProperty;var e=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var n=(t,n,r)=>e(t,typeof n!="symbol"?n+"":n,r);const r=(t="",e=10)=>{const n=new Uint8Array(e);crypto.getRandomValues(n);const r=Array.from(n).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,e);return t!==""?`${t}-${r}`:r},s=t=>f(t)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t)!==null;class a{constructor(t=[]){n(this,"classes");n(this,"add",(t=>{this.has(t)||this.classes.push(t)}));n(this,"delete",(t=>{const e=this.classes.indexOf(t);e>-1&&this.classes.splice(e,1)}));n(this,"has",(t=>this.classes.includes(t)));n(this,"join",(()=>this.classes.join(" ")));this.classes=t}}const i=t=>Array.isArray(t)&&t.every((t=>typeof t=="string")),o=(t,e)=>e.includes(t==null?void 0:t.tagName.toLowerCase()),u='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',c=t=>{const e=l(t),n=m(t);return[t,...e,...n]},l=(t,e=[])=>{if(t.self!==t.top)try{const n=t.parent;return n?(e.push(n),l(n,e)):e}catch(t){return console.error("Different hosts between iframes:",t),e}return e},m=(t,e=[])=>{if(t.frames.length>0)for(const n of Array.from(t.frames))e.push(n),m(n,e);return e},f=t=>typeof t=="string"&&t.trim()!=="",y=t=>typeof t=="object"?JSON.stringify(t):`${t}`,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var t=Object.defineProperty;var e=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var n=(t,n,r)=>e(t,typeof n!="symbol"?n+"":n,r);const r=(t="",e=10)=>{const n=new Uint8Array(e);crypto.getRandomValues(n);const r=Array.from(n).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,e);return t!==""?`${t}-${r}`:r},s=t=>f(t)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t)!==null;class a{constructor(t=[]){n(this,"classes");n(this,"add",(t=>{this.has(t)||this.classes.push(t)}));n(this,"delete",(t=>{const e=this.classes.indexOf(t);e>-1&&this.classes.splice(e,1)}));n(this,"has",(t=>this.classes.includes(t)));n(this,"join",(()=>this.classes.join(" ")));this.classes=t}}const i=t=>Array.isArray(t)&&t.every((t=>typeof t=="string")),o=(t,e)=>e.includes(t==null?void 0:t.tagName.toLowerCase()),u='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',c=t=>{const e=l(t),n=m(t);return[t,...e,...n]},l=(t,e=[])=>{if(t.self!==t.top)try{const n=t.parent;return n?(e.push(n),l(n,e)):e}catch(t){return console.error("Different hosts between iframes:",t),e}return e},m=(t,e=[])=>{if(t.frames.length>0)for(const n of Array.from(t.frames))e.push(n),m(n,e);return e},f=t=>typeof t=="string"&&t.trim()!=="",y=t=>typeof t=="object"?JSON.stringify(t):`${t}`,h=t=>typeof t=="number"&&!Number.isNaN(t),g=t=>typeof t=="string"?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,p=async t=>t();var v=Object.defineProperty,b=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})};var d={};b(d,{err:()=>D,map:()=>I,ok:()=>w,unwrap:()=>x,unwrapErr:()=>F});var w=t=>({isOk:!0,isErr:!1,value:t}),D=t=>({isOk:!1,isErr:!0,value:t});function I(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>w(t))):w(n)}if(t.isErr){const e=t.value;return D(e)}throw"should never get here"}var x=t=>{if(t.isOk)return t.value;throw t.value},F=t=>{if(t.isErr)return t.value;throw t.value};const O=t=>{const e={value:"2023",pattern:"yyyy"},n={value:"12",pattern:"mm"},r={value:"24",pattern:"dd"};return J([e.value,n.value,r.value].join("-"),t,{timeZone:"UTC"}).replace(e.value,e.pattern).replace(n.value,n.pattern).replace(r.value,r.pattern)},$=t=>t.toISOString().split("T")[0],j=(t,e,n)=>{const r=t.closest("[lang]"),s=Intl.NumberFormat.supportedLocalesOf(r==null?void 0:r.lang),a=s.length>0&&typeof s[0]=="string"?s[0]:navigator.language||n,i=a.split("-").shift();return Object.keys(e).length===0?{locale:a,messages:{lang:n}}:{locale:a,messages:e[i]||e[n]||{lang:n}}},z=(t,e,n)=>new Intl.NumberFormat(e,{style:"currency",currency:n}).format(t),A=(t,e,n=0)=>new Intl.NumberFormat(e,{minimumFractionDigits:n}).format(n>0?Number(t==null?void 0:t.toFixed(n)):t),N=(t,e,n=0)=>new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(t),k=(t,e,n,r="short",s=0)=>new Intl.NumberFormat(e,{style:"unit",unit:n,unitDisplay:r,minimumFractionDigits:s,maximumFractionDigits:s}).format(t),E=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,J=(t,e,n)=>typeof t!="string"||t===""||!E.test(t)?"":new Intl.DateTimeFormat(e,n).format(new Date(t)),P=(t,e)=>n=>j(n,t,e);export{k as $,E as B,a as G,s as I,y as J,o as K,J as P,u as Q,g as V,i as X,h as Y,c as Z,O as a,$ as c,N as d,p as e,z as f,P as p,A as u,f as y,r as z};
|
|
2
|
+
//# sourceMappingURL=p-b986c107.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["pe","Object","defineProperty","ge","e","t","s","enumerable","configurable","writable","value","g","ze","Uint8Array","crypto","getRandomValues","r","Array","from","map","n","toString","padStart","join","slice","Ie","ye","exec","Ge","constructor","this","has","classes","push","indexOf","splice","includes","Xe","isArray","every","Ke","tagName","toLowerCase","Qe","Ze","V","ee","self","top","parent","console","error","frames","length","trim","Je","JSON","stringify","Ye","Number","isNaN","Ve","toLocaleLowerCase","normalize","replaceAll","et","async","ve","me","get","Te","err","se","xe","ok","P","unwrap","Ae","unwrapErr","Ee","isOk","isErr","Promise","then","at","pattern","Pe","timeZone","replace","ct","toISOString","split","He","closest","Intl","NumberFormat","supportedLocalesOf","lang","o","navigator","language","i","shift","keys","locale","messages","ft","style","currency","format","ut","minimumFractionDigits","toFixed","dt","maximumFractionDigits","$t","unit","unitDisplay","Be","test","DateTimeFormat","Date","pt"],"sources":["../stencil-helpers/dist/index.es.js"],"sourcesContent":["var pe = Object.defineProperty;\nvar G = (e) => {\n throw TypeError(e);\n};\nvar ge = (e, t, s) => t in e ? pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;\nvar g = (e, t, s) => ge(e, typeof t != \"symbol\" ? t + \"\" : t, s), he = (e, t, s) => t.has(e) || G(\"Cannot \" + s);\nvar T = (e, t, s) => (he(e, t, \"read from private field\"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? G(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, s);\nconst ze = (e = \"\", t = 10) => {\n const s = new Uint8Array(t);\n crypto.getRandomValues(s);\n const r = Array.from(s).map((n) => n.toString(16).padStart(2, \"0\")).join(\"\").slice(0, t);\n return e !== \"\" ? `${e}-${r}` : r;\n}, Ie = (e) => ye(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;\nclass Ge {\n constructor(t = []) {\n /**\n * Available classes\n */\n g(this, \"classes\");\n /**\n * Add class\n * @param className - class name to add\n */\n g(this, \"add\", (t) => {\n this.has(t) || this.classes.push(t);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n g(this, \"delete\", (t) => {\n const s = this.classes.indexOf(t);\n s > -1 && this.classes.splice(s, 1);\n });\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n g(this, \"has\", (t) => this.classes.includes(t));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n g(this, \"join\", () => this.classes.join(\" \"));\n this.classes = t;\n }\n}\nconst Xe = (e) => Array.isArray(e) && e.every((t) => typeof t == \"string\"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Ze = (e) => {\n const t = V(e), s = ee(e);\n return [e, ...t, ...s];\n}, V = (e, t = []) => {\n if (e.self !== e.top)\n try {\n const s = e.parent;\n return s ? (t.push(s), V(s, t)) : t;\n } catch (s) {\n return console.error(\"Different hosts between iframes:\", s), t;\n }\n return t;\n}, ee = (e, t = []) => {\n if (e.frames.length > 0)\n for (const s of Array.from(e.frames))\n t.push(s), ee(s, t);\n return t;\n}, ye = (e) => typeof e == \"string\" && e.trim() !== \"\", Je = (e) => typeof e == \"object\" ? JSON.stringify(e) : `${e}`, Ye = (e) => typeof e == \"number\" && !Number.isNaN(e), Ve = (e) => typeof e == \"string\" ? e.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : e, et = async (e) => e();\nvar H = {\n allRenderFn: !1,\n cmpDidLoad: !0,\n cmpDidUnload: !1,\n cmpDidUpdate: !0,\n cmpDidRender: !0,\n cmpWillLoad: !0,\n cmpWillUpdate: !0,\n cmpWillRender: !0,\n connectedCallback: !0,\n disconnectedCallback: !0,\n element: !0,\n event: !0,\n hasRenderFn: !0,\n lifecycle: !0,\n hostListener: !0,\n hostListenerTargetWindow: !0,\n hostListenerTargetDocument: !0,\n hostListenerTargetBody: !0,\n hostListenerTargetParent: !1,\n hostListenerTarget: !0,\n member: !0,\n method: !0,\n mode: !0,\n observeAttribute: !0,\n prop: !0,\n propMutable: !0,\n reflect: !0,\n scoped: !0,\n shadowDom: !0,\n slot: !0,\n cssAnnotations: !0,\n state: !0,\n style: !0,\n formAssociated: !1,\n svg: !0,\n updatable: !0,\n vdomAttribute: !0,\n vdomXlink: !0,\n vdomClass: !0,\n vdomFunctional: !0,\n vdomKey: !0,\n vdomListener: !0,\n vdomRef: !0,\n vdomPropOrAttr: !0,\n vdomRender: !0,\n vdomStyle: !0,\n vdomText: !0,\n watchCallback: !0,\n taskQueue: !0,\n hotModuleReplacement: !1,\n isDebug: !1,\n isDev: !1,\n isTesting: !1,\n hydrateServerSide: !1,\n hydrateClientSide: !1,\n lifecycleDOMEvents: !1,\n lazyLoad: !1,\n profile: !1,\n slotRelocation: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n appendChildSlotFix: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n cloneNodeFix: !1,\n hydratedAttribute: !1,\n hydratedClass: !0,\n // TODO(STENCIL-1305): remove this option\n scriptDataOpts: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n scopedSlotTextContentFix: !1,\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n shadowDomShim: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n slotChildNodesFix: !1,\n invisiblePrehydration: !0,\n propBoolean: !0,\n propNumber: !0,\n propString: !0,\n constructableCSS: !0,\n cmpShouldUpdate: !0,\n devTools: !1,\n shadowDelegatesFocus: !0,\n initializeNextTick: !1,\n asyncLoading: !0,\n asyncQueue: !1,\n transformTagName: !1,\n attachStyles: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n experimentalSlotFixes: !1\n}, ve = Object.defineProperty, me = (e, t) => {\n for (var s in t)\n ve(e, s, { get: t[s], enumerable: !0 });\n}, be = \"http://www.w3.org/2000/svg\", Se = \"http://www.w3.org/1999/xhtml\", X = (e, t) => t in e, K = \"http://www.w3.org/1999/xlink\", z = typeof window < \"u\" ? window : {}, R = z.document || { head: {} };\nz.HTMLElement;\nvar A = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (e) => e(),\n raf: (e) => requestAnimationFrame(e),\n ael: (e, t, s, r) => e.addEventListener(t, s, r),\n rel: (e, t, s, r) => e.removeEventListener(t, s, r),\n ce: (e, t) => new CustomEvent(e, t)\n}, ke = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === \"object\" || e === \"function\"), Te = {};\nme(Te, {\n err: () => se,\n map: () => xe,\n ok: () => P,\n unwrap: () => Ae,\n unwrapErr: () => Ee\n});\nvar P = (e) => ({\n isOk: !0,\n isErr: !1,\n value: e\n}), se = (e) => ({\n isOk: !1,\n isErr: !0,\n value: e\n});\nfunction xe(e, t) {\n if (e.isOk) {\n const s = t(e.value);\n return s instanceof Promise ? s.then((r) => P(r)) : P(s);\n }\n if (e.isErr) {\n const s = e.value;\n return se(s);\n }\n throw \"should never get here\";\n}\nvar Ae = (e) => {\n if (e.isOk)\n return e.value;\n throw e.value;\n}, Ee = (e) => {\n if (e.isErr)\n return e.value;\n throw e.value;\n}, re = (e) => {\n const t = e.__childNodes || e.childNodes;\n e.tagName && e.tagName.includes(\"-\") && e[\"s-cr\"] && e.tagName !== \"SLOT-FB\" && ne(t, e.tagName).forEach((s) => {\n var r;\n s.nodeType === 1 && s.tagName === \"SLOT-FB\" && ((r = je(s, s[\"s-sn\"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);\n });\n for (const s of t)\n s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);\n}, ne = (e, t, s) => {\n let r = 0, n = [], o;\n for (; r < e.length; r++)\n o = e[r], o[\"s-sr\"] && o[\"s-hn\"] === t && n.push(o), n = [...n, ...ne(o.childNodes, t)];\n return n;\n}, je = (e, t, s = !0) => {\n const r = [];\n for ((s && e[\"s-sr\"] || !e[\"s-sr\"]) && r.push(e); (e = e.nextSibling) && e[\"s-sn\"] === t; )\n r.push(e);\n return r;\n}, Q = (e, t) => e.nodeType === 1 ? e.getAttribute(\"slot\") === null && t === \"\" || e.getAttribute(\"slot\") === t : e[\"s-sn\"] === t ? !0 : t === \"\", _e = (e, t, ...s) => {\n let r = null, n = null, o = null, i = !1, u = !1;\n const a = [], $ = (l) => {\n for (let d = 0; d < l.length; d++)\n r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != \"boolean\" && ((i = !te(r)) && (r = String(r)), i && u ? a[a.length - 1].$text$ += r : a.push(i ? W(null, r) : r), u = i);\n };\n $(s);\n const f = W(e, null);\n return f.$attrs$ = t, a.length > 0 && (f.$children$ = a), f.$key$ = n, f.$name$ = o, f;\n}, W = (e, t) => {\n const s = {\n $flags$: 0,\n $tag$: e,\n $text$: t,\n $elm$: null,\n $children$: null\n };\n return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;\n}, Le = {}, Oe = (e) => e && e.$tag$ === Le, Z = (e, t, s, r, n, o) => {\n if (s !== r) {\n let i = X(e, t), u = t.toLowerCase();\n if (t === \"class\") {\n const a = e.classList, $ = J(s);\n let f = J(r);\n e[\"s-si\"] ? (f.push(e[\"s-si\"]), $.forEach((l) => {\n l.startsWith(e[\"s-si\"]) && f.push(l);\n }), f = [...new Set(f)], a.add(...f), delete e[\"s-si\"]) : (a.remove(...$.filter((l) => l && !f.includes(l))), a.add(...f.filter((l) => l && !$.includes(l))));\n } else if (t === \"style\") {\n for (const a in s)\n (!r || r[a] == null) && (a.includes(\"-\") ? e.style.removeProperty(a) : e.style[a] = \"\");\n for (const a in r)\n (!s || r[a] !== s[a]) && (a.includes(\"-\") ? e.style.setProperty(a, r[a]) : e.style[a] = r[a]);\n } else if (t !== \"key\") if (t === \"ref\")\n r && r(e);\n else if (!e.__lookupSetter__(t) && t[0] === \"o\" && t[1] === \"n\") {\n if (t[2] === \"-\" ? t = t.slice(3) : X(z, u) ? t = u.slice(2) : t = u[2] + t.slice(3), s || r) {\n const a = t.endsWith(ie);\n t = t.replace(Fe, \"\"), s && A.rel(e, t, s, a), r && A.ael(e, t, r, a);\n }\n } else {\n const a = te(r);\n if ((i || a && r !== null) && !n)\n try {\n if (e.tagName.includes(\"-\"))\n e[t] = r;\n else {\n const f = r ?? \"\";\n t === \"list\" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == \"function\" ? e[t] = f : e.setAttribute(t, f));\n }\n } catch {\n }\n let $ = !1;\n u !== (u = u.replace(/^xlink\\:?/, \"\")) && (t = u, $ = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === \"\") && ($ ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || o & 4 || n) && !a && (r = r === !0 ? \"\" : r, $ ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));\n }\n }\n}, Re = /\\s/, J = (e) => (typeof e == \"object\" && \"baseVal\" in e && (e = e.baseVal), e ? e.split(Re) : []), ie = \"Capture\", Fe = new RegExp(ie + \"$\"), oe = (e, t, s) => {\n const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, n = e && e.$attrs$ || {}, o = t.$attrs$ || {};\n for (const i of Y(Object.keys(n)))\n i in o || Z(r, i, n[i], void 0, s, t.$flags$);\n for (const i of Y(Object.keys(o)))\n Z(r, i, n[i], o[i], s, t.$flags$);\n};\nfunction Y(e) {\n return e.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...e.filter((t) => t !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n e\n );\n}\nvar F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {\n var r;\n const n = t.$children$[s];\n let o = 0, i, u, a;\n if (M || (I = !0, n.$tag$ === \"slot\" && (n.$flags$ |= n.$children$ ? (\n // slot element has fallback content\n // still create an element that \"mocks\" the slot element\n 2\n ) : (\n // slot element does not have fallback content\n // create an html comment we'll use to always reference\n // where actual slot content should sit next to\n 1\n ))), n.$text$ !== null)\n i = n.$elm$ = R.createTextNode(n.$text$);\n else if (n.$flags$ & 1)\n i = n.$elm$ = R.createTextNode(\"\");\n else {\n if (y || (y = n.$tag$ === \"svg\"), i = n.$elm$ = R.createElementNS(\n y ? be : Se,\n !M && H.slotRelocation && n.$flags$ & 2 ? \"slot-fb\" : n.$tag$\n ), y && n.$tag$ === \"foreignObject\" && (y = !1), oe(null, n, y), ke(F) && i[\"s-si\"] !== F && i.classList.add(i[\"s-si\"] = F), n.$children$)\n for (o = 0; o < n.$children$.length; ++o)\n u = C(e, n, o), u && i.appendChild(u);\n n.$tag$ === \"svg\" ? y = !1 : i.tagName === \"foreignObject\" && (y = !0);\n }\n return i[\"s-hn\"] = E, n.$flags$ & 3 && (i[\"s-sr\"] = !0, i[\"s-cr\"] = N, i[\"s-sn\"] = n.$name$ || \"\", i[\"s-rf\"] = (r = n.$attrs$) == null ? void 0 : r.ref, a = e && e.$children$ && e.$children$[s], a && a.$tag$ === n.$tag$ && e.$elm$ && j(e.$elm$, !1), ue(N, i, t.$elm$, e == null ? void 0 : e.$elm$)), i;\n}, j = (e, t) => {\n A.$flags$ |= 1;\n const s = Array.from(e.__childNodes || e.childNodes);\n e[\"s-sr\"] && H.experimentalSlotFixes;\n for (let r = s.length - 1; r >= 0; r--) {\n const n = s[r];\n n[\"s-hn\"] !== E && n[\"s-ol\"] && (k(_(n).parentNode, n, _(n)), n[\"s-ol\"].remove(), n[\"s-ol\"] = void 0, n[\"s-sh\"] = void 0, I = !0), t && j(n, t);\n }\n A.$flags$ &= -2;\n}, le = (e, t, s, r, n, o) => {\n let i = e[\"s-cr\"] && e[\"s-cr\"].parentNode || e, u;\n for (i.shadowRoot && i.tagName === E && (i = i.shadowRoot); n <= o; ++n)\n r[n] && (u = C(null, s, n), u && (r[n].$elm$ = u, k(i, u, _(t))));\n}, ae = (e, t, s) => {\n for (let r = t; r <= s; ++r) {\n const n = e[r];\n if (n) {\n const o = n.$elm$;\n fe(n), o && (D = !0, o[\"s-ol\"] ? o[\"s-ol\"].remove() : j(o, !0), o.remove());\n }\n }\n}, Ne = (e, t, s, r, n = !1) => {\n let o = 0, i = 0, u = 0, a = 0, $ = t.length - 1, f = t[0], l = t[$], d = r.length - 1, c = r[0], p = r[d], m, v;\n for (; o <= $ && i <= d; )\n if (f == null)\n f = t[++o];\n else if (l == null)\n l = t[--$];\n else if (c == null)\n c = r[++i];\n else if (p == null)\n p = r[--d];\n else if (O(f, c, n))\n x(f, c, n), f = t[++o], c = r[++i];\n else if (O(l, p, n))\n x(l, p, n), l = t[--$], p = r[--d];\n else if (O(f, p, n))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && j(f.$elm$.parentNode, !1), x(f, p, n), k(e, f.$elm$, l.$elm$.nextSibling), f = t[++o], p = r[--d];\n else if (O(l, c, n))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && j(l.$elm$.parentNode, !1), x(l, c, n), k(e, l.$elm$, f.$elm$), l = t[--$], c = r[++i];\n else {\n for (u = -1, a = o; a <= $; ++a)\n if (t[a] && t[a].$key$ !== null && t[a].$key$ === c.$key$) {\n u = a;\n break;\n }\n u >= 0 ? (v = t[u], v.$tag$ !== c.$tag$ ? m = C(t && t[i], s, u) : (x(v, c, n), t[u] = void 0, m = v.$elm$), c = r[++i]) : (m = C(t && t[i], s, i), c = r[++i]), m && k(\n _(f.$elm$).parentNode,\n m,\n _(f.$elm$)\n );\n }\n o > $ ? le(\n e,\n r[d + 1] == null ? null : r[d + 1].$elm$,\n s,\n r,\n i,\n d\n ) : i > d && ae(t, o, $);\n}, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === \"slot\" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, _ = (e) => e && e[\"s-ol\"] || e, x = (e, t, s = !1) => {\n const r = t.$elm$ = e.$elm$, n = e.$children$, o = t.$children$, i = t.$tag$, u = t.$text$;\n let a;\n u === null ? (y = i === \"svg\" ? !0 : i === \"foreignObject\" ? !1 : y, i === \"slot\" && !M || oe(e, t, y), n !== null && o !== null ? Ne(r, n, t, o, s) : o !== null ? (e.$text$ !== null && (r.textContent = \"\"), le(r, null, t, o, 0, o.length - 1)) : (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !s && H.updatable && n !== null && ae(n, 0, n.length - 1)\n ), y && i === \"svg\" && (y = !1)) : (a = r[\"s-cr\"]) ? a.parentNode.textContent = u : e.$text$ !== u && (r.data = u);\n}, b = [], ce = (e) => {\n let t, s, r;\n const n = e.__childNodes || e.childNodes;\n for (const o of n) {\n if (o[\"s-sr\"] && (t = o[\"s-cr\"]) && t.parentNode) {\n s = t.parentNode.__childNodes || t.parentNode.childNodes;\n const i = o[\"s-sn\"];\n for (r = s.length - 1; r >= 0; r--)\n if (t = s[r], !t[\"s-cn\"] && !t[\"s-nr\"] && t[\"s-hn\"] !== o[\"s-hn\"])\n if (Q(t, i)) {\n let u = b.find((a) => a.$nodeToRelocate$ === t);\n D = !0, t[\"s-sn\"] = t[\"s-sn\"] || i, u ? (u.$nodeToRelocate$[\"s-sh\"] = o[\"s-hn\"], u.$slotRefNode$ = o) : (t[\"s-sh\"] = o[\"s-hn\"], b.push({\n $slotRefNode$: o,\n $nodeToRelocate$: t\n })), t[\"s-sr\"] && b.map((a) => {\n Q(a.$nodeToRelocate$, t[\"s-sn\"]) && (u = b.find(($) => $.$nodeToRelocate$ === t), u && !a.$slotRefNode$ && (a.$slotRefNode$ = u.$slotRefNode$));\n });\n } else b.some((u) => u.$nodeToRelocate$ === t) || b.push({\n $nodeToRelocate$: t\n });\n }\n o.nodeType === 1 && ce(o);\n }\n}, fe = (e) => {\n e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);\n}, k = (e, t, s) => (typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && t[\"s-cr\"] && ue(t[\"s-cr\"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));\nfunction ue(e, t, s, r) {\n var n;\n let o;\n if (e && typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && e.parentNode && e.parentNode[\"s-sc\"] && (o = t[\"s-si\"] || e.parentNode[\"s-sc\"])) {\n const i = t[\"s-sn\"], u = t[\"s-hn\"];\n if ((n = s.classList) == null || n.add(o + \"-s\"), r && r.classList.contains(o + \"-s\")) {\n let a = (r.__childNodes || r.childNodes)[0], $ = !1;\n for (; a; ) {\n if (a[\"s-sn\"] !== i && a[\"s-hn\"] === u && a[\"s-sr\"]) {\n $ = !0;\n break;\n }\n a = a.nextSibling;\n }\n $ || r.classList.remove(o + \"-s\");\n }\n }\n}\nvar Me = (e, t, s = !1) => {\n var r, n, o, i, u;\n const a = e.$hostElement$, $ = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Oe(t) ? t : _e(null, null, t);\n if (E = a.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(\n ([d, c]) => l.$attrs$[c] = a[d]\n )), s && l.$attrs$)\n for (const d of Object.keys(l.$attrs$))\n a.hasAttribute(d) && ![\"key\", \"ref\", \"style\", \"class\"].includes(d) && (l.$attrs$[d] = a[d]);\n l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = a.shadowRoot || a, F = a[\"s-sc\"], M = ($.$flags$ & 1) !== 0, N = a[\"s-cr\"], D = !1, x(f, l, s);\n {\n if (A.$flags$ |= 1, I) {\n ce(l.$elm$);\n for (const d of b) {\n const c = d.$nodeToRelocate$;\n if (!c[\"s-ol\"]) {\n const p = R.createTextNode(\"\");\n p[\"s-nr\"] = c, k(c.parentNode, c[\"s-ol\"] = p, c);\n }\n }\n for (const d of b) {\n const c = d.$nodeToRelocate$, p = d.$slotRefNode$;\n if (p) {\n const m = p.parentNode;\n let v = p.nextSibling;\n {\n let L = (r = c[\"s-ol\"]) == null ? void 0 : r.previousSibling;\n for (; L; ) {\n let h = (n = L[\"s-nr\"]) != null ? n : null;\n if (h && h[\"s-sn\"] === c[\"s-sn\"] && m === h.parentNode) {\n for (h = h.nextSibling; h === c || h != null && h[\"s-sr\"]; )\n h = h == null ? void 0 : h.nextSibling;\n if (!h || !h[\"s-nr\"]) {\n v = h;\n break;\n }\n }\n L = L.previousSibling;\n }\n }\n (!v && m !== c.parentNode || c.nextSibling !== v) && c !== v && (!c[\"s-hn\"] && c[\"s-ol\"] && (c[\"s-hn\"] = c[\"s-ol\"].parentNode.nodeName), k(m, c, v), c.nodeType === 1 && c.tagName !== \"SLOT-FB\" && (c.hidden = (o = c[\"s-ih\"]) != null ? o : !1)), c && typeof p[\"s-rf\"] == \"function\" && p[\"s-rf\"](c);\n } else\n c.nodeType === 1 && (s && (c[\"s-ih\"] = (i = c.hidden) != null ? i : !1), c.hidden = !0);\n }\n }\n D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;\n }\n if (H.experimentalScopedSlotChanges && $.$flags$ & 2) {\n const d = l.$elm$.__childNodes || l.$elm$.childNodes;\n for (const c of d)\n c[\"s-hn\"] !== E && !c[\"s-sh\"] && (s && c[\"s-ih\"] == null && (c[\"s-ih\"] = (u = c.hidden) != null ? u : !1), c.hidden = !0);\n }\n N = void 0;\n};\nconst De = (e, t, s) => {\n [null, void 0, \"\", !1].includes(s) || [\"innerHTML\", \"style\"].includes(t) || e.setAttribute(t, [\"object\", \"function\"].includes(typeof s) ? \"/!\\\\ Object props are not rendered in the code example\" : s);\n}, de = (e, t, s, r, n) => {\n if (t && typeof t == \"string\") {\n const o = document.createElement(t);\n Object.keys(s || {}).forEach((i) => {\n De(o, i, s[i]);\n }), r == null || r.forEach((i) => {\n de(o, i.$tag$, i.$attrs$, i.$children$, i.$text$);\n }), s != null && s.innerHTML && (o.innerHTML = s.innerHTML), e.appendChild(o);\n }\n n && (e.innerHTML = n);\n}, tt = (e, t) => {\n const s = {};\n if (typeof e != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const r in e)\n if (!r.startsWith(\"slot\")) {\n const n = e[r], o = r.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[o] = n);\n }\n return s;\n}, st = (e, t) => {\n var r, n;\n const s = document.getElementById(\"storybook-root\");\n if (s !== null)\n return (n = document.querySelector(\"[lang]\")) == null || n.setAttribute(\"lang\", ((r = t.globals) == null ? void 0 : r.locale) || \"en\"), Me(\n {\n $ancestorComponent$: void 0,\n $flags$: 0,\n $modeName$: void 0,\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: s.tagName\n },\n $hostElement$: s\n },\n e(t)\n ), s.children[s.children.length - 1];\n}, rt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {\n const n = document.createElement(\"div\");\n return de(n, e, t, s, r), n.innerHTML;\n}, U = (e, t) => {\n if (!t)\n return;\n const s = t.split(\"/\");\n return `${e}${s.slice(2, s.length - 1).join(\"-\")}--docs`;\n};\nvar S, w;\nclass nt {\n constructor(t) {\n /**\n * JsonDocs\n */\n g(this, \"jsonDoc\");\n /**\n * Get component data from the jsonDoc\n * @param tagName - tag name we want to get the data from\n * @returns component data\n */\n B(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));\n /**\n * Get the control for the given prop\n * Based on https://storybook.js.org/docs/api/arg-types#controltype\n * @param prop - prop to get control for\n * @returns control type and options if applicable\n */\n B(this, w, (t) => {\n const s = t.type.replace(/\"([^\"]+)\"/g, \"$1\").replace(/\\s/g, \"\").replace(/\\(.*?\\)/g, (r) => r.replace(/\\|/g, \" OR \")).split(\"|\").map((r) => r.trim().replace(/ OR /g, \"|\"));\n return t.type === \"string\" ? { control: { type: \"text\" } } : t.type === \"number\" ? { control: { type: \"number\" } } : t.type === \"boolean\" ? { control: { type: \"boolean\" } } : t.type.startsWith(\"{\") && t.type.endsWith(\"}\") ? { control: { type: \"object\" } } : s.length > 1 ? s.includes(\"string\") ? { control: { type: \"text\" } } : s.every((r) => r == null ? void 0 : r.includes(\"[]\")) ? { control: { type: \"object\" } } : (s.unshift(void 0), { control: { type: \"select\" }, options: s }) : { control: { type: \"object\" } };\n });\n /**\n * Extract component arg types from the component data\n * @param tagName - tag name we want to extract the arg types from\n * @returns component arg types\n */\n g(this, \"extractArgTypes\", (t) => {\n const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {\n const { control: d, options: c } = T(this, w).call(this, l);\n return {\n ...f,\n [l.name]: {\n name: l.attr || l.name,\n description: l.docs,\n type: { required: l.required },\n table: {\n category: \"props\",\n type: { summary: l.type },\n defaultValue: { summary: l.default }\n },\n control: d,\n options: c\n }\n };\n }, {}), n = s == null ? void 0 : s.events.reduce(\n (f, l) => ({\n ...f,\n [l.event]: {\n name: l.event,\n description: l.docs,\n table: {\n category: \"events\",\n type: { summary: l.detail }\n }\n }\n }),\n {}\n ), o = s == null ? void 0 : s.methods.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"methods\",\n type: { summary: l.signature }\n }\n }\n }),\n {}\n ), i = s == null ? void 0 : s.slots.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name !== \"\" ? l.name : \"default\",\n // default slot are unnamed\n description: l.docs,\n table: {\n category: \"slots\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), u = s == null ? void 0 : s.styles.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"custom properties\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), a = s == null ? void 0 : s.dependencies.reduce((f, l) => {\n const d = T(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${U(\"\", d == null ? void 0 : d.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"depends on\",\n type: { summary: void 0 }\n }\n }\n };\n }, {}), $ = s == null ? void 0 : s.dependents.reduce((f, l) => {\n const d = T(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${U(\"\", d == null ? void 0 : d.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"used by\",\n type: { summary: void 0 }\n }\n }\n };\n }, {});\n return {\n ...r,\n ...n,\n ...o,\n ...i,\n ...u,\n ...a,\n ...$\n };\n });\n /**\n * Extract component description from the component data\n * @param tagName - tag name we want to extract the description from\n * @returns component description\n */\n g(this, \"extractComponentDescription\", (t) => {\n const s = T(this, S).call(this, t);\n return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);\n });\n this.jsonDoc = t;\n }\n}\nS = new WeakMap(), w = new WeakMap();\nconst Ce = (e, t) => {\n if (t)\n return `${e}${t}`;\n}, $e = (e) => {\n let t = e.overview ? `${e.overview}\n\n` : \"\";\n const s = e.props.filter(({ attr: n }) => n !== void 0);\n s.length && (t += `Attributes:\n`, t += s.map(({ attr: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`);\n const r = e.props.filter(({ attr: n }) => n === void 0);\n return r.length && (t += `Properties:\n`, t += r.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.methods.length && (t += `Methods:\n`, t += e.methods.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.events.length && (t += `Events:\n`, t += e.events.map(({ event: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), e.listeners.length && (t += `Listeners:\n`, t += e.listeners.map(({ event: n }) => `- \\`${n}\\`\n`).join(\"\"), t += `\n`), e.slots.length && (t += `Slots:\n`, t += e.slots.map(({ name: n, docs: o }) => `- \\`${n}\\`: ${o}\n`).join(\"\"), t += `\n`), t;\n}, q = (e) => `${e.docs}\n\nType: \\`${e.type}\\``, it = (e, t, s, r) => ({\n $schema: \"https://json.schemastore.org/web-types\",\n name: e,\n version: t,\n \"description-markup\": \"markdown\",\n contributions: {\n html: {\n elements: s.components.map((n) => {\n const o = U(r, n.filePath);\n return {\n name: n.tag,\n description: $e(n),\n \"doc-url\": o,\n attributes: n.props.filter((i) => i.attr).map((i) => ({\n name: i.attr,\n description: q(i),\n \"doc-url\": o,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n js: {\n properties: n.props.map((i) => ({\n name: i.name,\n description: q(i),\n \"doc-url\": o,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n events: n.events.map((i) => ({\n name: i.event,\n description: i.docs\n }))\n },\n css: {\n properties: n.styles.map((i) => ({\n name: i.name,\n description: i.docs\n }))\n }\n };\n })\n }\n }\n}), Ue = (e, t, s) => [\n { name: \"Storybook\", url: U(e, s) },\n { name: \"Sources\", url: Ce(t, s) }\n], we = (e) => {\n if (!e.values.some(({ value: t }) => t === void 0))\n return e.values.map(({ value: t }) => ({ name: t }));\n}, ot = (e, t, s) => ({\n version: 1.1,\n tags: e.components.map((r) => {\n const n = Ue(t, s, r.filePath);\n return {\n name: r.tag,\n description: $e(r),\n attributes: r.props.map((o) => ({\n name: o.attr || o.name,\n description: q(o),\n values: we(o),\n references: n\n })),\n references: n\n };\n }),\n globalAttributes: [],\n valueSets: []\n}), lt = (e) => ({\n version: 1.1,\n properties: e.components.flatMap(\n (t) => t.styles.map((s) => ({\n name: s.name,\n description: s.docs\n }))\n )\n}), at = (e) => {\n const t = { value: \"2023\", pattern: \"yyyy\" }, s = { value: \"12\", pattern: \"mm\" }, r = { value: \"24\", pattern: \"dd\" };\n return Pe([t.value, s.value, r.value].join(\"-\"), e, { timeZone: \"UTC\" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);\n}, ct = (e) => e.toISOString().split(\"T\")[0], He = (e, t, s) => {\n const r = e.closest(\"[lang]\"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), o = n.length > 0 && typeof n[0] == \"string\" ? n[0] : navigator.language || s, i = o.split(\"-\").shift();\n return Object.keys(t).length === 0 ? {\n locale: o,\n messages: { lang: s }\n } : {\n locale: o,\n messages: t[i] || t[s] || { lang: s }\n };\n}, ft = (e, t, s) => new Intl.NumberFormat(t, { style: \"currency\", currency: s }).format(e), ut = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {\n style: \"percent\",\n minimumFractionDigits: s,\n maximumFractionDigits: s\n}).format(e), $t = (e, t, s, r = \"short\", n = 0) => new Intl.NumberFormat(t, {\n style: \"unit\",\n unit: s,\n unitDisplay: r,\n minimumFractionDigits: n,\n maximumFractionDigits: n\n}).format(e), Be = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, Pe = (e, t, s) => typeof e != \"string\" || e === \"\" || !Be.test(e) ? \"\" : new Intl.DateTimeFormat(t, s).format(new Date(e)), pt = (e, t) => (s) => He(s, e, t), gt = ({ disconnect: e, observe: t, takeRecords: s }) => {\n class r {\n constructor(o) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"takeRecords\", s);\n /**\n *\n */\n g(this, \"cb\");\n this.cb = o;\n }\n }\n return [window, global].forEach((n) => {\n Object.defineProperty(n, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: r\n });\n }), r;\n}, ht = ({ disconnect: e, observe: t }) => {\n class s {\n constructor(n) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"unobserve\");\n /**\n *\n */\n g(this, \"cb\");\n this.cb = n;\n }\n }\n return [window, global].forEach((r) => {\n Object.defineProperty(r, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n};\nclass We extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n g(this, \"detail\");\n }\n // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nconst yt = () => {\n class e extends We {\n }\n return [window, global].forEach((t) => {\n Object.defineProperty(t, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: e\n });\n }), e;\n}, vt = (e) => {\n const t = (s) => (setTimeout(s, 1), e(), 0);\n return [window, global].forEach((s) => {\n Object.defineProperty(s, \"requestAnimationFrame\", {\n writable: !0,\n configurable: !0,\n value: t\n });\n }), t;\n};\nexport {\n Ge as ClassList,\n nt as StorybookPreview,\n Xe as allItemsAreString,\n Ve as cleanString,\n ze as createID,\n Be as dateRegExp,\n ct as dateToString,\n pt as defineLocales,\n tt as filterArgs,\n Qe as focusableElements,\n at as getLocaleDatePattern,\n V as getParentWindows,\n rt as getStoryHTML,\n U as getStorybookUrl,\n Ze as getWindows,\n Ke as isTagName,\n Ye as isValidNumber,\n ye as isValidString,\n Ie as isValideID,\n ft as localeCurrency,\n Pe as localeDate,\n ut as localeNumber,\n dt as localePercent,\n $t as localeUnit,\n et as nextTick,\n vt as setUpRequestAnimationFrameMock,\n gt as setupMutationObserverMock,\n ht as setupResizeObserverMock,\n yt as setupSubmitEventMock,\n st as stencilWrapper,\n Je as toString,\n lt as vsCodeCssGenerator,\n ot as vsCodeGenerator,\n it as webTypesGenerator\n};\n//# sourceMappingURL=index.es.js.map\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e}from"./p-b986c107.js";const t={required:"This field is required.",date:{badInput:"The date format must be {pattern}",min:"The date cannot be earlier than {min}",max:"The date cannot be later than {max}",minMax:"The date must be between {min} and {max}"},numeric:{min:"The value cannot be less than {min}",max:"The value cannot be greater than {max}",minMax:"The value must be between {min} and {max}"}};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",titlePlurial:"Selected",action:"Unselect all",tooltip:"Unselect all current search results"},notSelected:{title:"Not selected",titlePlurial:"Not selected",action:"Select all",tooltip:"Select all current search results"}}},date:{helpText:"Expected format: {pattern} (ex: {date})",pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"}},password:{display:"Display password value",hide:"Hide password value"}};const n={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 r={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"};const d={badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"};const m={menuLabel:"Additional menu"};const p={label:"Actions"};const g={inProgess:"Loading in progress…"};const h={errors:t,nbCharLeft:a,input:s,form:n,alert:l,modal:r,pagination:o,panel:i,skipLinks:c,general:u,menuItem:d,itemMore:m,actionMore:p,loader:g};const b={required:"Ce champ est obligatoire.",date:{badInput:"Le format de la date doit être du type {pattern}",min:"La date ne peut pas être antérieure au {min}",max:"La date ne peut pas être postérieure au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"},numeric:{min:"La valeur ne peut pas être inférieure à {min}",max:"La valeur ne peut pas être supérieure à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}};const v="{counter} caractères disponibles.";const x={select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs selectionnées",selectedValue:"{nb} valeur selectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",label:"Saisissez une valeur",result:"résultat",results:"résultats",searchResults:"List de résultat(s) de la recherche.",noResult:"Aucun résultat.",sections:{selected:{title:"Sélectionné",titlePlurial:"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é",titlePlurial:"Non sélectionnés",action:"Tout sélectionner",tooltip:"Sélectionne tous les résultats de la recherche en cours"}}},date:{helpText:"Format attendu : {pattern} (ex : {date})",pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"}},password:{display:"Afficher le mot de passe",hide:"Masquer le mot de passe"}};const f={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 L={closeButton:"Fermer le message"};const S={closeButton:"Fermer la modale"};const q={label:"Pagination",page:"page",pages:"pages",nextPage:"Page suivante",previousPage:"Page précédente",selectPage:"Sélectionner la page à afficher."};const y={editLabel:"Modifier le titre de la section."};const P={navLabel:"Accès rapide"};const T={confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"suivant",previous:"précédent"};const w={badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"};const k={menuLabel:"Menu complémentaire"};const M={label:"Actions"};const B={inProgess:"Chargement en cours…"};const C={errors:b,nbCharLeft:v,input:x,form:f,alert:L,modal:S,pagination:q,panel:y,skipLinks:P,general:T,menuItem:w,itemMore:k,actionMore:M,loader:B};const N="en";const A={en:h,fr:C};const R=e(A,N);export{R as i};
|
|
2
|
+
//# sourceMappingURL=p-dc436f3c.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,f as e,h as i,g as a}from"./p-35898742.js";import{G as h,J as o}from"./p-b986c107.js";import{i as r}from"./p-dc436f3c.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=l;const m=class{constructor(e){t(this,e);this.componentShow=s(this,"component-show",7);this.componentHide=s(this,"component-hide",7);this.componentClose=s(this,"component-close",7);this.classCloseButton="mg-c-alert--close-button";this.storedTimer=null;this.isFocused=false;this.isHovered=false;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:"8d1f797913bb86518d005f377ba2cbe6a3237a19",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},i("slot",{key:"df2a42ab678a9844a64198e8610a3cab5e3a3271"}),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"]}}};m.style=u;export{m as mg_alert};
|
|
2
|
+
//# sourceMappingURL=p-f48d964f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["variants","variantStyles","mgAlertCss","MgAlertStyle0","MgAlert","constructor","hostRef","this","classCloseButton","storedTimer","isFocused","isHovered","classCollection","ClassList","hasActions","setTimer","setTimeout","element","hidden","delay","clearTimer","clearTimeout","timerEvents","event","isMouseEvent","type","addEventListener","eventOut","once","handleClose","componentClose","emit","watchDelay","newValue","undefined","Error","toString","watchVariant","includes","join","watchVariantStyle","watchHidden","componentHide","forEach","removeEventListener","componentShow","forceUpdate","componentWillLoad","messages","initLocales","variant","variantStyle","querySelector","add","render","h","key","class","role","slot","name","label","alert","closeButton","onClick","icon"],"sources":["src/components/molecules/mg-alert/mg-alert.conf.ts","../styles/dist/components/mg-alert.css?tag=mg-alert&encapsulation=shadow","src/components/molecules/mg-alert/mg-alert.tsx"],"sourcesContent":["import type { Variant, VariantStyle } from '../../../types';\n\n/**\n * List available variants\n */\nexport const variants = ['info', 'warning', 'success', 'danger'] as const;\n\n/**\n * Variant type\n */\nexport type VariantType = Variant & (typeof variants)[number];\n\n/**\n * List available variant styles\n */\nexport const variantStyles = ['bar-left', 'background'] as const;\n\n/**\n * VariantStyle type\n */\nexport type VariantStyleType = VariantStyle & (typeof variantStyles)[number];\n",".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}/*# sourceMappingURL=mg-alert.css.map */\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch, forceUpdate } from '@stencil/core';\nimport { ClassList, toString } from '@mgdis/stencil-helpers';\nimport { variants, variantStyles, VariantStyleType, VariantType } from './mg-alert.conf';\nimport { initLocales } from '../../../locales';\n\n/**\n * @slot - Alert content\n * @slot actions - Actions content\n */\n@Component({\n tag: 'mg-alert',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-alert.css',\n shadow: true,\n})\nexport class MgAlert {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classCloseButton = 'mg-c-alert--close-button';\n\n // Stored timer setted when hide action is run from setTimeOut\n private storedTimer: ReturnType<typeof setTimeout> = null;\n\n // Manage hover\n private isFocused = false;\n private isHovered = false;\n\n // Locales\n private messages;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgAlertElement;\n\n /**\n * Add a delay to hide/close message when it passed\n * Value is defined in seconds and must greater than 2 seconds\n */\n @Prop() delay?: number;\n @Watch('delay')\n watchDelay(newValue: MgAlert['delay']): void {\n if (newValue !== undefined && newValue < 2) {\n throw new Error(`<mg-alert> prop \"delay\" must be greater than 2 seconds. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant\n */\n @Prop() variant?: VariantType;\n @Watch('variant')\n watchVariant(newValue: MgAlert['variant']): void {\n if (newValue && !variants.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variant\" must be one of: ${variants.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant style\n */\n @Prop() variantStyle?: VariantStyleType;\n @Watch('variantStyle')\n watchVariantStyle(newValue: MgAlert['variantStyle']): void {\n if (newValue && !variantStyles.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variantStyle\" must be one of: ${variantStyles.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Watch hidden prop\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('hidden')\n watchHidden(newValue: boolean): void {\n if (typeof newValue === 'string' && newValue === '') {\n newValue = true;\n }\n if (newValue) {\n this.componentHide.emit();\n // Remove event Listener\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.removeEventListener(event, this.timerEvents);\n });\n // Clear Timer\n this.clearTimer();\n } else {\n this.componentShow.emit();\n // If delay is set\n if (this.delay > 1) {\n // Start timer\n this.setTimer();\n // Stop timer when get focus or mouse enter\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.addEventListener(event, this.timerEvents);\n });\n }\n }\n forceUpdate(this);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-alert']);\n\n /**\n * Define if component is using actions slot\n */\n @State() hasActions = false;\n\n /**\n * Emited event when alert is diplayed\n */\n @Event({ eventName: 'component-show' }) componentShow: EventEmitter<void>;\n\n /**\n * Emited event when alert is hidden\n */\n @Event({ eventName: 'component-hide' }) componentHide: EventEmitter<void>;\n\n /**\n * Emmited event when alert is closed\n */\n @Event({ eventName: 'component-close' }) componentClose: EventEmitter<void>;\n\n /**\n * Set timer\n */\n private setTimer = (): void => {\n this.storedTimer = setTimeout(() => (this.element.hidden = true), this.delay * 1000);\n };\n\n /**\n * Clear timer\n */\n private clearTimer = (): void => {\n clearTimeout(this.storedTimer);\n };\n\n /**\n * Event to add on element\n * @param event - event\n */\n private timerEvents = (event: MouseEvent | FocusEvent): void => {\n this.clearTimer();\n const isMouseEvent: boolean = event.type === 'mouseenter';\n // Needed to ensure we don't start the timer\n this[isMouseEvent ? 'isHovered' : 'isFocused'] = true;\n\n // Restart timer when loose focus AND mouse leave\n this.element.addEventListener(\n isMouseEvent ? 'mouseleave' : 'focusout',\n eventOut => {\n this[eventOut.type === 'mouseleave' ? 'isHovered' : 'isFocused'] = false;\n // Start timer if needed\n if (!this.isFocused && !this.isHovered) this.setTimer();\n },\n { once: true },\n );\n };\n\n /**\n * Handle close button\n */\n private handleClose = (): void => {\n this.element.hidden = true;\n this.componentClose.emit();\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchVariant(this.variant);\n this.watchVariantStyle(this.variantStyle);\n this.watchDelay(this.delay);\n this.watchHidden(this.element.hidden);\n // Check if component has actions slot\n this.hasActions = this.element.querySelector('[slot=\"actions\"]') !== null;\n if (!this.hasActions) {\n this.classCollection.add(this.classCloseButton);\n }\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-message\n class={this.classCollection.join()}\n role={['info', 'success'].includes(this.variant) ? 'status' : 'alert'}\n variant={this.variant}\n variantStyle={this.variantStyle}\n >\n <slot></slot>\n {this.hasActions ? (\n <span slot=\"actions\">\n <slot name=\"actions\"></slot>\n </span>\n ) : (\n <span class=\"mg-c-alert__close-button\">\n <mg-button is-icon variant=\"flat\" label={this.messages.alert.closeButton} onClick={this.handleClose}>\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n </span>\n )}\n </mg-message>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type { Variant } from '../../../types';
|
|
1
|
+
import type { Variant, Size } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all possibles sizes
|
|
4
|
+
*/
|
|
5
|
+
export declare const sizes: readonly ["medium", "large"];
|
|
6
|
+
/**
|
|
7
|
+
* SizeType type from button sizes
|
|
8
|
+
*/
|
|
9
|
+
export type SizeType = Size & (typeof sizes)[number];
|
|
2
10
|
/**
|
|
3
11
|
* List of all possibles variants
|
|
4
12
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { VariantType, ButtonType } from './mg-button.conf';
|
|
2
|
+
import { VariantType, ButtonType, SizeType } from './mg-button.conf';
|
|
3
3
|
import { ClassList } from '@mgdis/stencil-helpers';
|
|
4
4
|
/**
|
|
5
5
|
* @slot - Button content
|
|
@@ -33,6 +33,11 @@ export declare class MgButton {
|
|
|
33
33
|
* Define button type
|
|
34
34
|
*/
|
|
35
35
|
type?: ButtonType;
|
|
36
|
+
/**
|
|
37
|
+
* Define button size
|
|
38
|
+
*/
|
|
39
|
+
size: SizeType;
|
|
40
|
+
validateSize(newValue: MgButton['size'], oldValue?: MgButton['size']): void;
|
|
36
41
|
/**
|
|
37
42
|
* Set button to full-width
|
|
38
43
|
*/
|
|
@@ -53,6 +58,7 @@ export declare class MgButton {
|
|
|
53
58
|
* Used for icon button.
|
|
54
59
|
*/
|
|
55
60
|
isIcon: boolean;
|
|
61
|
+
watchIsIcon(): void;
|
|
56
62
|
/**
|
|
57
63
|
* Option to set input disable on click, in order to prevent multi-click.
|
|
58
64
|
* Parent component have to remove the attribute 'disabled' when the process ends.
|
|
@@ -88,6 +94,10 @@ export declare class MgButton {
|
|
|
88
94
|
* @param event - keyboard event
|
|
89
95
|
*/
|
|
90
96
|
private handleKeyup;
|
|
97
|
+
/**
|
|
98
|
+
* Set child `<mg-icon>` element `size` prop to follow the current `size` prop
|
|
99
|
+
*/
|
|
100
|
+
private setIconSize;
|
|
91
101
|
/**
|
|
92
102
|
* Check if props are well configured on init
|
|
93
103
|
*/
|
|
@@ -222,6 +222,12 @@ export declare class MgInputNumeric {
|
|
|
222
222
|
* Check if input is valid
|
|
223
223
|
*/
|
|
224
224
|
private checkValidity;
|
|
225
|
+
/**
|
|
226
|
+
* Format min/max value for error message
|
|
227
|
+
* @param value - value to format
|
|
228
|
+
* @returns formatted value according to locale
|
|
229
|
+
*/
|
|
230
|
+
private formatErrorValue;
|
|
225
231
|
/**
|
|
226
232
|
* Set input error message
|
|
227
233
|
* @param errorMessage - errorMessage override
|
|
@@ -8,9 +8,8 @@ export declare class MgItemMore {
|
|
|
8
8
|
************/
|
|
9
9
|
private readonly name;
|
|
10
10
|
private messages;
|
|
11
|
-
private parentMenuItems;
|
|
12
|
-
private moreElementMenuItem;
|
|
13
11
|
private overflowBehavior;
|
|
12
|
+
private itemMoreContainer;
|
|
14
13
|
/**************
|
|
15
14
|
* Decorators *
|
|
16
15
|
**************/
|
|
@@ -37,19 +36,6 @@ export declare class MgItemMore {
|
|
|
37
36
|
* Define component parent menu.
|
|
38
37
|
*/
|
|
39
38
|
parentMenu: HTMLMgMenuElement;
|
|
40
|
-
/**
|
|
41
|
-
* Set proxy element properties and listeners
|
|
42
|
-
* @param proxified - element to proxify from
|
|
43
|
-
*/
|
|
44
|
-
private setProxyElement;
|
|
45
|
-
/***********
|
|
46
|
-
* Methods *
|
|
47
|
-
***********/
|
|
48
|
-
/**
|
|
49
|
-
* render mg-item-more overflow element
|
|
50
|
-
* @returns mg-item-more element
|
|
51
|
-
*/
|
|
52
|
-
private renderMgMenuItemOverflowElement;
|
|
53
39
|
/*************
|
|
54
40
|
* Lifecycle *
|
|
55
41
|
*************/
|
|
@@ -7,9 +7,6 @@ export declare class MgMenu {
|
|
|
7
7
|
* Internal *
|
|
8
8
|
************/
|
|
9
9
|
private readonly name;
|
|
10
|
-
private menuItems;
|
|
11
|
-
private focusedMenuItem;
|
|
12
|
-
private itemMoreElement;
|
|
13
10
|
/**************
|
|
14
11
|
* Decorators *
|
|
15
12
|
**************/
|
|
@@ -40,37 +37,29 @@ export declare class MgMenu {
|
|
|
40
37
|
size: MenuSizeType;
|
|
41
38
|
validateSize(newValue: MgMenu['size']): void;
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
40
|
+
* Define mg-menu-item listener when they are loaded
|
|
41
|
+
* @param event - mg-item-loaded "item-loaded" custom event
|
|
44
42
|
*/
|
|
45
|
-
|
|
43
|
+
updateItemListener(event: CustomEvent & {
|
|
44
|
+
target: HTMLMgMenuItemElement;
|
|
45
|
+
}): void;
|
|
46
46
|
/*************
|
|
47
47
|
* Methods *
|
|
48
48
|
*************/
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
* @
|
|
52
|
-
* @param condition - addionnal condition
|
|
50
|
+
* Test if menu is a child menu
|
|
51
|
+
* @returns truthy if menu is a child menu
|
|
53
52
|
*/
|
|
54
|
-
private
|
|
53
|
+
private isChildMenu;
|
|
55
54
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @returns mg-menu-item
|
|
55
|
+
* Get menu children items
|
|
56
|
+
* @returns menu children mg-menu-item
|
|
58
57
|
*/
|
|
59
|
-
private
|
|
58
|
+
private getMenuItems;
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @param item - mg-menu-item element
|
|
63
|
-
* @param index - number
|
|
60
|
+
* Update menu items
|
|
64
61
|
*/
|
|
65
|
-
private
|
|
66
|
-
/**
|
|
67
|
-
* Store menu-items on component init and add listeners
|
|
68
|
-
*/
|
|
69
|
-
private initMenuItemsListeners;
|
|
70
|
-
/**
|
|
71
|
-
* Handle item-loaded event on mg-item-more element
|
|
72
|
-
*/
|
|
73
|
-
private handleItemLoaded;
|
|
62
|
+
private updateMenuItems;
|
|
74
63
|
/**
|
|
75
64
|
* render mg-item-more
|
|
76
65
|
*/
|
|
@@ -84,13 +73,8 @@ export declare class MgMenu {
|
|
|
84
73
|
componentWillLoad(): void;
|
|
85
74
|
/**
|
|
86
75
|
* Check if component slots configuration
|
|
87
|
-
* @returns timeout
|
|
88
|
-
*/
|
|
89
|
-
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
90
|
-
/**
|
|
91
|
-
* Add listeners to items
|
|
92
76
|
*/
|
|
93
|
-
|
|
77
|
+
componentDidLoad(): void;
|
|
94
78
|
/**
|
|
95
79
|
* Render
|
|
96
80
|
* @returns HTML Element
|
|
@@ -16,6 +16,7 @@ export declare class MgMenuItem {
|
|
|
16
16
|
private readonly name;
|
|
17
17
|
private readonly navigationButton;
|
|
18
18
|
private messages;
|
|
19
|
+
private popoverIdentifier;
|
|
19
20
|
/**************
|
|
20
21
|
* Decorators *
|
|
21
22
|
**************/
|
|
@@ -45,19 +46,15 @@ export declare class MgMenuItem {
|
|
|
45
46
|
* Define menu-item status.
|
|
46
47
|
*/
|
|
47
48
|
status?: MgMenuStatusType;
|
|
48
|
-
|
|
49
|
+
watchStatus(newValue: MgMenuItem['status'], oldValue?: MgMenuItem['status']): void;
|
|
49
50
|
/**
|
|
50
51
|
* Define menu-item content expanded.
|
|
51
52
|
*/
|
|
52
53
|
expanded?: boolean;
|
|
53
|
-
|
|
54
|
+
watchExpanded(newValue: MgMenuItem['expanded']): void;
|
|
54
55
|
/**********
|
|
55
56
|
* Events *
|
|
56
57
|
*********/
|
|
57
|
-
/**
|
|
58
|
-
* Emited event when status change
|
|
59
|
-
*/
|
|
60
|
-
statusChange: EventEmitter<HTMLMgMenuItemElement['status']>;
|
|
61
58
|
/**
|
|
62
59
|
* Emited event when item is loaded
|
|
63
60
|
*/
|
|
@@ -73,7 +70,7 @@ export declare class MgMenuItem {
|
|
|
73
70
|
* Define menu-item size.
|
|
74
71
|
*/
|
|
75
72
|
size: MenuSizeType;
|
|
76
|
-
|
|
73
|
+
watchSize(newValue: MgMenuItem['size'], oldValue?: MgMenuItem['size']): void;
|
|
77
74
|
/**
|
|
78
75
|
* Component button classes
|
|
79
76
|
*/
|
|
@@ -82,7 +79,7 @@ export declare class MgMenuItem {
|
|
|
82
79
|
* Parent menu direction
|
|
83
80
|
*/
|
|
84
81
|
direction: DirectionType;
|
|
85
|
-
validateDirection(newValue: MgMenuItem['direction']): void;
|
|
82
|
+
validateDirection(newValue: MgMenuItem['direction'], oldValue: MgMenuItem['direction']): void;
|
|
86
83
|
/**
|
|
87
84
|
* Does component is in main menu
|
|
88
85
|
*/
|
|
@@ -100,13 +97,19 @@ export declare class MgMenuItem {
|
|
|
100
97
|
* Does component should display notification badge.
|
|
101
98
|
*/
|
|
102
99
|
displayNotificationBadge: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* direction value in dataset
|
|
102
|
+
* @param newValue - new direction value
|
|
103
|
+
*/
|
|
104
|
+
watchDataStyleDirection(newValue: DirectionType): void;
|
|
105
|
+
/**
|
|
106
|
+
* has focus value in dataset
|
|
107
|
+
* @param newValue - new direction value
|
|
108
|
+
*/
|
|
109
|
+
watchDataHasFocus(newValue: string): void;
|
|
103
110
|
/***********
|
|
104
111
|
* Methods *
|
|
105
112
|
**********/
|
|
106
|
-
/**
|
|
107
|
-
* Toggle expanded prop value
|
|
108
|
-
*/
|
|
109
|
-
private toggleExpanded;
|
|
110
113
|
/**
|
|
111
114
|
* Does an Element have given Status
|
|
112
115
|
* @param mgMenuItemElement - to parse
|
|
@@ -114,6 +117,21 @@ export declare class MgMenuItem {
|
|
|
114
117
|
* @returns true if element with status is found
|
|
115
118
|
*/
|
|
116
119
|
private hasStatus;
|
|
120
|
+
/**
|
|
121
|
+
* Condition to know if component should display a mg-popover
|
|
122
|
+
* @returns truthy if component display popover
|
|
123
|
+
*/
|
|
124
|
+
private hasPopover;
|
|
125
|
+
/**
|
|
126
|
+
* Method to control if one of component children have active status
|
|
127
|
+
* @returns truthy if component has active child
|
|
128
|
+
*/
|
|
129
|
+
private hasActiveChild;
|
|
130
|
+
/**
|
|
131
|
+
* Is component an interactive item
|
|
132
|
+
* @returns truthy if element is clickable
|
|
133
|
+
*/
|
|
134
|
+
private isInteractiveItem;
|
|
117
135
|
/**
|
|
118
136
|
* Is component contextual direction match the given direction
|
|
119
137
|
* @param direction - in parent menu
|
|
@@ -127,38 +145,29 @@ export declare class MgMenuItem {
|
|
|
127
145
|
*/
|
|
128
146
|
private updateDisplayNotificationBadge;
|
|
129
147
|
/**
|
|
130
|
-
*
|
|
131
|
-
* @
|
|
132
|
-
*/
|
|
133
|
-
private hasActiveChild;
|
|
134
|
-
/**
|
|
135
|
-
* Validate slots
|
|
136
|
-
* @param guard - prevent action with guard. Default: false.
|
|
148
|
+
* Update expanded prop
|
|
149
|
+
* @param newValue - expanded new value
|
|
137
150
|
*/
|
|
138
|
-
private
|
|
151
|
+
private updateExpanded;
|
|
139
152
|
/**
|
|
140
153
|
* Update status
|
|
141
154
|
* @param guard - status to exclude from process in addition to [Status.HIDDEN, Status.DISABLED] . Default: [].
|
|
142
155
|
*/
|
|
143
156
|
private updateStatus;
|
|
144
|
-
/**
|
|
145
|
-
* Init event-listeners
|
|
146
|
-
*/
|
|
147
|
-
private initListeners;
|
|
148
|
-
/**
|
|
149
|
-
* Get mg-popover identifier
|
|
150
|
-
* @returns generated mg-popover identifier
|
|
151
|
-
*/
|
|
152
|
-
private getPopoverIdentifier;
|
|
153
157
|
/**
|
|
154
158
|
* Render popover clickoutside guard for content slot
|
|
155
159
|
*/
|
|
156
160
|
private updatePopoverGuard;
|
|
157
161
|
/**
|
|
158
|
-
*
|
|
159
|
-
* @
|
|
162
|
+
* Update slots
|
|
163
|
+
* @param guard - prevent action with guard. Default: false.
|
|
164
|
+
*/
|
|
165
|
+
private updateSlot;
|
|
166
|
+
/**
|
|
167
|
+
* Update menu item
|
|
168
|
+
* @param guard - prevent action with guard
|
|
160
169
|
*/
|
|
161
|
-
private
|
|
170
|
+
private updateItem;
|
|
162
171
|
/************
|
|
163
172
|
* Handlers *
|
|
164
173
|
************/
|
|
@@ -184,6 +193,11 @@ export declare class MgMenuItem {
|
|
|
184
193
|
* @returns timeout
|
|
185
194
|
*/
|
|
186
195
|
componentDidLoad(): ReturnType<typeof setTimeout>;
|
|
196
|
+
/**
|
|
197
|
+
* Emit event when component is updated
|
|
198
|
+
* @returns promise process wich emit the 'item-updated' event
|
|
199
|
+
*/
|
|
200
|
+
componentShouldUpdate(): Promise<void>;
|
|
187
201
|
/**
|
|
188
202
|
* Render ineractive element
|
|
189
203
|
* @returns HTML Element
|
|
@@ -194,11 +208,6 @@ export declare class MgMenuItem {
|
|
|
194
208
|
* @returns HTML Element
|
|
195
209
|
*/
|
|
196
210
|
private renderSlot;
|
|
197
|
-
/**
|
|
198
|
-
* Emit event when component is updated
|
|
199
|
-
* @returns promise process wich emit the 'item-updated' event
|
|
200
|
-
*/
|
|
201
|
-
componentShouldUpdate(): Promise<void>;
|
|
202
211
|
/**
|
|
203
212
|
* Render
|
|
204
213
|
* @returns HTML Element
|
|
@@ -52,6 +52,10 @@ export declare class MgPopover {
|
|
|
52
52
|
* Emited event when display value change
|
|
53
53
|
*/
|
|
54
54
|
displayChange: EventEmitter<HTMLMgPopoverElement['display']>;
|
|
55
|
+
/**
|
|
56
|
+
* Emmited event when popover is closed
|
|
57
|
+
*/
|
|
58
|
+
componentClose: EventEmitter<void>;
|
|
55
59
|
/**
|
|
56
60
|
* Check if clicked outside of component
|
|
57
61
|
* @param event - mouse event
|