@mgdis/mg-components 5.23.2 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/{index-775fad7b.js → index-3d4f1cfd.js} +29 -22
  4. package/dist/cjs/index-3d4f1cfd.js.map +1 -0
  5. package/dist/cjs/{mg-menu.conf-0229bb75.js → index-f699ee11.js} +14 -20
  6. package/dist/cjs/index-f699ee11.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +5 -3
  8. package/dist/cjs/loader.cjs.js.map +1 -1
  9. package/dist/cjs/mg-action-more_34.cjs.entry.js +260 -201
  10. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  11. package/dist/cjs/mg-components.cjs.js +6 -4
  12. package/dist/cjs/mg-components.cjs.js.map +1 -1
  13. package/dist/cjs/mg-item-more.cjs.entry.js +5 -4
  14. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  15. package/dist/cjs/mg-loader.cjs.entry.js +49 -0
  16. package/dist/cjs/mg-loader.cjs.entry.js.map +1 -0
  17. package/dist/cjs/mg-menu.conf-c291eee6.js +18 -0
  18. package/dist/cjs/mg-menu.conf-c291eee6.js.map +1 -0
  19. package/dist/collection/collection-manifest.json +3 -2
  20. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  21. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +1 -1
  22. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
  23. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +1 -1
  24. package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -0
  25. package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +1 -1
  26. package/dist/collection/components/molecules/inputs/MgInput.js +34 -27
  27. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +4 -6
  29. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +42 -5
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +27 -5
  36. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +1 -0
  38. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +86 -9
  40. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +26 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  43. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +26 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  45. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +26 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +29 -4
  48. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +27 -2
  50. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  51. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +28 -13
  52. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  53. package/dist/collection/components/molecules/mg-form/mg-form.js +45 -6
  54. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  55. package/dist/collection/components/molecules/mg-loader/mg-loader.js +90 -0
  56. package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +1 -0
  57. package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
  58. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  59. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -2
  60. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  61. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  62. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  63. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  64. package/dist/collection/locales/en/messages.json +5 -2
  65. package/dist/collection/locales/fr/messages.json +4 -1
  66. package/dist/collection/styles/global.css +1 -1
  67. package/dist/components/MgInput.js +39 -30
  68. package/dist/components/MgInput.js.map +1 -1
  69. package/dist/components/index.es.js.map +1 -1
  70. package/dist/components/index2.js +13 -5
  71. package/dist/components/index2.js.map +1 -1
  72. package/dist/components/mg-card2.js +1 -1
  73. package/dist/components/mg-character-left2.js +1 -1
  74. package/dist/components/mg-divider.js +1 -1
  75. package/dist/components/mg-form.js +29 -7
  76. package/dist/components/mg-form.js.map +1 -1
  77. package/dist/components/mg-input-checkbox-paginated2.js +5 -7
  78. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  79. package/dist/components/mg-input-checkbox.js +20 -6
  80. package/dist/components/mg-input-checkbox.js.map +1 -1
  81. package/dist/components/mg-input-date.js +5 -6
  82. package/dist/components/mg-input-date.js.map +1 -1
  83. package/dist/components/mg-input-numeric.js +30 -5
  84. package/dist/components/mg-input-numeric.js.map +1 -1
  85. package/dist/components/mg-input-password.js +4 -2
  86. package/dist/components/mg-input-password.js.map +1 -1
  87. package/dist/components/mg-input-radio.js +4 -2
  88. package/dist/components/mg-input-radio.js.map +1 -1
  89. package/dist/components/mg-input-select2.js +4 -2
  90. package/dist/components/mg-input-select2.js.map +1 -1
  91. package/dist/components/mg-input-text2.js +6 -4
  92. package/dist/components/mg-input-text2.js.map +1 -1
  93. package/dist/components/mg-input-textarea.js +4 -2
  94. package/dist/components/mg-input-textarea.js.map +1 -1
  95. package/dist/components/mg-input-title2.js +2 -2
  96. package/dist/components/mg-input-title2.js.map +1 -1
  97. package/dist/components/mg-input-toggle.js +6 -13
  98. package/dist/components/mg-input-toggle.js.map +1 -1
  99. package/dist/components/mg-loader.d.ts +11 -0
  100. package/dist/components/mg-loader.js +76 -0
  101. package/dist/components/mg-loader.js.map +1 -0
  102. package/dist/components/mg-message.js +1 -1
  103. package/dist/components/mg-modal.js +2 -2
  104. package/dist/components/mg-pagination2.js +2 -2
  105. package/dist/components/mg-panel.js +1 -1
  106. package/dist/components/mg-popover-content2.js +1 -1
  107. package/dist/components/mg-skip-links.js +1 -1
  108. package/dist/components/mg-tabs.js +1 -1
  109. package/dist/components/mg-tooltip2.js +1 -1
  110. package/dist/components/mg-tooltip2.js.map +1 -1
  111. package/dist/esm/app-globals-0f993ce5.js +5 -0
  112. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  113. package/dist/esm/{index-9aa447a7.js → index-bcefebe3.js} +29 -22
  114. package/dist/esm/index-bcefebe3.js.map +1 -0
  115. package/dist/esm/{mg-menu.conf-4b2d2eab.js → index-d2fc6ec0.js} +15 -20
  116. package/dist/esm/index-d2fc6ec0.js.map +1 -0
  117. package/dist/esm/loader.js +6 -4
  118. package/dist/esm/loader.js.map +1 -1
  119. package/dist/esm/mg-action-more_34.entry.js +161 -102
  120. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  121. package/dist/esm/mg-components.js +7 -5
  122. package/dist/esm/mg-components.js.map +1 -1
  123. package/dist/esm/mg-item-more.entry.js +3 -2
  124. package/dist/esm/mg-item-more.entry.js.map +1 -1
  125. package/dist/esm/mg-loader.entry.js +45 -0
  126. package/dist/esm/mg-loader.entry.js.map +1 -0
  127. package/dist/esm/mg-menu.conf-9609bcb2.js +16 -0
  128. package/dist/esm/mg-menu.conf-9609bcb2.js.map +1 -0
  129. package/dist/mg-components/locales/en/messages.json +5 -2
  130. package/dist/mg-components/locales/fr/messages.json +4 -1
  131. package/dist/mg-components/mg-components.css +1 -1
  132. package/dist/mg-components/mg-components.esm.js +1 -1
  133. package/dist/mg-components/mg-components.esm.js.map +1 -1
  134. package/dist/mg-components/p-20a56a75.entry.js +2 -0
  135. package/dist/mg-components/{p-06715c36.entry.js.map → p-20a56a75.entry.js.map} +1 -1
  136. package/dist/mg-components/p-29b5a514.js +2 -0
  137. package/dist/mg-components/p-29b5a514.js.map +1 -0
  138. package/dist/mg-components/{p-4e7a7f68.js → p-878f8f0a.js} +2 -2
  139. package/dist/mg-components/p-878f8f0a.js.map +1 -0
  140. package/dist/mg-components/p-b3f35142.entry.js +2 -0
  141. package/dist/mg-components/p-b3f35142.entry.js.map +1 -0
  142. package/dist/mg-components/p-e1255160.js +2 -0
  143. package/dist/mg-components/p-e1255160.js.map +1 -0
  144. package/dist/mg-components/p-f85b5d14.entry.js +2 -0
  145. package/dist/mg-components/p-f85b5d14.entry.js.map +1 -0
  146. package/dist/mg-components/p-fe935e54.js +2 -0
  147. package/dist/mg-components/p-fe935e54.js.map +1 -0
  148. package/dist/mg-components/styles/global.css +1 -1
  149. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +26 -0
  150. package/dist/types/components/molecules/inputs/MgInput.d.ts +1 -22
  151. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +0 -1
  152. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +10 -0
  153. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +5 -0
  154. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +4 -1
  155. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +14 -2
  156. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +5 -1
  157. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +5 -0
  158. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +5 -1
  159. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +6 -1
  160. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +6 -1
  161. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +10 -7
  162. package/dist/types/components/molecules/mg-form/mg-form.d.ts +6 -0
  163. package/dist/types/components/molecules/mg-loader/mg-loader.d.ts +34 -0
  164. package/dist/types/components.d.ts +127 -8
  165. package/package.json +23 -23
  166. package/dist/cjs/index-775fad7b.js.map +0 -1
  167. package/dist/cjs/mg-menu.conf-0229bb75.js.map +0 -1
  168. package/dist/collection/locales/index.spec.js +0 -27
  169. package/dist/collection/locales/index.spec.js.map +0 -1
  170. package/dist/collection/stories/icon-gallery.js +0 -10
  171. package/dist/collection/stories/icon-gallery.js.map +0 -1
  172. package/dist/collection/utils/behaviors.utils.spec.js +0 -61
  173. package/dist/collection/utils/behaviors.utils.spec.js.map +0 -1
  174. package/dist/esm/index-9aa447a7.js.map +0 -1
  175. package/dist/esm/mg-menu.conf-4b2d2eab.js.map +0 -1
  176. package/dist/mg-components/p-06715c36.entry.js +0 -2
  177. package/dist/mg-components/p-1564df7a.js +0 -2
  178. package/dist/mg-components/p-1564df7a.js.map +0 -1
  179. package/dist/mg-components/p-4e7a7f68.js.map +0 -1
  180. package/dist/mg-components/p-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C;AACX,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,kBAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE;;ACvc/L,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE5B;;;;;MAKa,WAAW,GAAGA,EAAa,CAAC,QAAQ,EAAE,aAAa;;ACVhE;;;AAGYC;AAAZ,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,sCAAyB,CAAA;AAC3B,CAAC,EAHWA,iBAAS,KAATA,iBAAS,QAGpB;AAOD;;;MAGa,KAAK,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;","names":["defineLocales","Direction"],"sources":["../stencil-helpers/dist/index.es.js","src/locales/index.ts","src/components/molecules/menu/mg-menu/mg-menu.conf.ts"],"sourcesContent":["var le = Object.defineProperty;\nvar oe = (t, e, n) => e in t ? le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;\nvar g = (t, e, n) => (oe(t, typeof e != \"symbol\" ? e + \"\" : e, n), n);\nconst I = {\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 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: !1,\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};\nlet T, F, m, X = !1, M = !1, D = !1, h = !1;\nconst N = \"http://www.w3.org/1999/xlink\", H = {}, re = \"http://www.w3.org/2000/svg\", ie = \"http://www.w3.org/1999/xhtml\", ce = (t) => t != null, q = (t) => (t = typeof t, t === \"object\" || t === \"function\"), G = (t, e, ...n) => {\n let s = null, l = null, r = null, o = !1, c = !1;\n const i = [], d = (f) => {\n for (let $ = 0; $ < f.length; $++)\n s = f[$], Array.isArray(s) ? d(s) : s != null && typeof s != \"boolean\" && ((o = typeof t != \"function\" && !q(s)) && (s = String(s)), o && c ? i[i.length - 1].$text$ += s : i.push(o ? O(null, s) : s), c = o);\n };\n if (d(n), e) {\n e.key && (l = e.key), e.name && (r = e.name);\n {\n const f = e.className || e.class;\n f && (e.class = typeof f != \"object\" ? f : Object.keys(f).filter(($) => f[$]).join(\" \"));\n }\n }\n if (typeof t == \"function\")\n return t(e === null ? {} : e, i, $e);\n const u = O(t, null);\n return u.$attrs$ = e, i.length > 0 && (u.$children$ = i), u.$key$ = l, u.$name$ = r, u;\n}, O = (t, e) => {\n const n = {\n $flags$: 0,\n $tag$: t,\n $text$: e,\n $elm$: null,\n $children$: null\n };\n return n.$attrs$ = null, n.$key$ = null, n.$name$ = null, n;\n}, fe = {}, ae = (t) => t && t.$tag$ === fe, $e = {\n forEach: (t, e) => t.map(C).forEach(e),\n map: (t, e) => t.map(C).map(e).map(ue)\n}, C = (t) => ({\n vattrs: t.$attrs$,\n vchildren: t.$children$,\n vkey: t.$key$,\n vname: t.$name$,\n vtag: t.$tag$,\n vtext: t.$text$\n}), ue = (t) => {\n if (typeof t.vtag == \"function\") {\n const n = Object.assign({}, t.vattrs);\n return t.vkey && (n.key = t.vkey), t.vname && (n.name = t.vname), G(t.vtag, n, ...t.vchildren || []);\n }\n const e = O(t.vtag, t.vtext);\n return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;\n}, P = (t, e, n, s, l, r) => {\n if (n !== s) {\n let o = z(t, e), c = e.toLowerCase();\n if (e === \"class\") {\n const i = t.classList, d = U(n), u = U(s);\n i.remove(...d.filter((f) => f && !u.includes(f))), i.add(...u.filter((f) => f && !d.includes(f)));\n } else if (e === \"style\") {\n for (const i in n)\n (!s || s[i] == null) && (i.includes(\"-\") ? t.style.removeProperty(i) : t.style[i] = \"\");\n for (const i in s)\n (!n || s[i] !== n[i]) && (i.includes(\"-\") ? t.style.setProperty(i, s[i]) : t.style[i] = s[i]);\n } else if (e !== \"key\")\n if (e === \"ref\")\n s && s(t);\n else if (!t.__lookupSetter__(e) && e[0] === \"o\" && e[1] === \"n\") {\n if (e[2] === \"-\" ? e = e.slice(3) : z(B, c) ? e = c.slice(2) : e = c[2] + e.slice(3), n || s) {\n const i = e.endsWith(K);\n e = e.replace(pe, \"\"), n && x.rel(t, e, n, i), s && x.ael(t, e, s, i);\n }\n } else {\n const i = q(s);\n if ((o || i && s !== null) && !l)\n try {\n if (t.tagName.includes(\"-\"))\n t[e] = s;\n else {\n const u = s ?? \"\";\n e === \"list\" ? o = !1 : (n == null || t[e] != u) && (t[e] = u);\n }\n } catch {\n }\n let d = !1;\n c !== (c = c.replace(/^xlink\\:?/, \"\")) && (e = c, d = !0), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === \"\") && (d ? t.removeAttributeNS(N, e) : t.removeAttribute(e)) : (!o || r & 4 || l) && !i && (s = s === !0 ? \"\" : s, d ? t.setAttributeNS(N, e, s) : t.setAttribute(e, s));\n }\n }\n}, de = /\\s/, U = (t) => t ? t.split(de) : [], K = \"Capture\", pe = new RegExp(K + \"$\"), Q = (t, e, n, s) => {\n const l = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, r = t && t.$attrs$ || H, o = e.$attrs$ || H;\n for (s in r)\n s in o || P(l, s, r[s], void 0, n, e.$flags$);\n for (s in o)\n P(l, s, r[s], o[s], n, e.$flags$);\n}, j = (t, e, n, s) => {\n const l = e.$children$[n];\n let r = 0, o, c, i;\n if (X || (D = !0, l.$tag$ === \"slot\" && (T && s.classList.add(T + \"-s\"), l.$flags$ |= l.$children$ ? (\n // slot element has fallback content\n 2\n ) : (\n // slot element does not have fallback content\n 1\n ))), l.$text$ !== null)\n o = l.$elm$ = R.createTextNode(l.$text$);\n else if (l.$flags$ & 1)\n o = l.$elm$ = R.createTextNode(\"\");\n else {\n if (h || (h = l.$tag$ === \"svg\"), o = l.$elm$ = R.createElementNS(h ? re : ie, l.$flags$ & 2 ? \"slot-fb\" : l.$tag$), h && l.$tag$ === \"foreignObject\" && (h = !1), Q(null, l, h), ce(T) && o[\"s-si\"] !== T && o.classList.add(o[\"s-si\"] = T), l.$children$)\n for (r = 0; r < l.$children$.length; ++r)\n c = j(t, l, r, o), c && o.appendChild(c);\n l.$tag$ === \"svg\" ? h = !1 : o.tagName === \"foreignObject\" && (h = !0);\n }\n return o[\"s-hn\"] = m, l.$flags$ & 3 && (o[\"s-sr\"] = !0, o[\"s-cr\"] = F, o[\"s-sn\"] = l.$name$ || \"\", i = t && t.$children$ && t.$children$[n], i && i.$tag$ === l.$tag$ && t.$elm$ && L(t.$elm$, !1)), o;\n}, L = (t, e) => {\n x.$flags$ |= 1;\n const n = t.childNodes;\n for (let s = n.length - 1; s >= 0; s--) {\n const l = n[s];\n l[\"s-hn\"] !== m && l[\"s-ol\"] && (Z(l).insertBefore(l, _(l)), l[\"s-ol\"].remove(), l[\"s-ol\"] = void 0, l[\"s-sh\"] = void 0, D = !0), e && L(l, e);\n }\n x.$flags$ &= -2;\n}, J = (t, e, n, s, l, r) => {\n let o = t[\"s-cr\"] && t[\"s-cr\"].parentNode || t, c;\n for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot); l <= r; ++l)\n s[l] && (c = j(null, n, l, t), c && (s[l].$elm$ = c, o.insertBefore(c, _(e))));\n}, Y = (t, e, n) => {\n for (let s = e; s <= n; ++s) {\n const l = t[s];\n if (l) {\n const r = l.$elm$;\n ee(l), r && (M = !0, r[\"s-ol\"] ? r[\"s-ol\"].remove() : L(r, !0), r.remove());\n }\n }\n}, ge = (t, e, n, s, l = !1) => {\n let r = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], f = e[d], $ = s.length - 1, a = s[0], p = s[$], v, y;\n for (; r <= d && o <= $; )\n if (u == null)\n u = e[++r];\n else if (f == null)\n f = e[--d];\n else if (a == null)\n a = s[++o];\n else if (p == null)\n p = s[--$];\n else if (A(u, a, l))\n k(u, a, l), u = e[++r], a = s[++o];\n else if (A(f, p, l))\n k(f, p, l), f = e[--d], p = s[--$];\n else if (A(u, p, l))\n (u.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(u.$elm$.parentNode, !1), k(u, p, l), t.insertBefore(u.$elm$, f.$elm$.nextSibling), u = e[++r], p = s[--$];\n else if (A(f, a, l))\n (u.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(f.$elm$.parentNode, !1), k(f, a, l), t.insertBefore(f.$elm$, u.$elm$), f = e[--d], a = s[++o];\n else {\n for (c = -1, i = r; i <= d; ++i)\n if (e[i] && e[i].$key$ !== null && e[i].$key$ === a.$key$) {\n c = i;\n break;\n }\n c >= 0 ? (y = e[c], y.$tag$ !== a.$tag$ ? v = j(e && e[o], n, c, t) : (k(y, a, l), e[c] = void 0, v = y.$elm$), a = s[++o]) : (v = j(e && e[o], n, o, t), a = s[++o]), v && Z(u.$elm$).insertBefore(v, _(u.$elm$));\n }\n r > d ? J(t, s[$ + 1] == null ? null : s[$ + 1].$elm$, n, s, o, $) : o > $ && Y(e, r, d);\n}, A = (t, e, n = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === \"slot\" ? t.$name$ === e.$name$ : n ? !0 : t.$key$ === e.$key$ : !1, _ = (t) => t && t[\"s-ol\"] || t, Z = (t) => (t[\"s-ol\"] ? t[\"s-ol\"] : t).parentNode, k = (t, e, n = !1) => {\n const s = e.$elm$ = t.$elm$, l = t.$children$, r = e.$children$, o = e.$tag$, c = e.$text$;\n let i;\n c === null ? (h = o === \"svg\" ? !0 : o === \"foreignObject\" ? !1 : h, o === \"slot\" || Q(t, e, h), l !== null && r !== null ? ge(s, l, e, r, n) : r !== null ? (t.$text$ !== null && (s.textContent = \"\"), J(s, null, e, r, 0, r.length - 1)) : l !== null && Y(l, 0, l.length - 1), h && o === \"svg\" && (h = !1)) : (i = s[\"s-cr\"]) ? i.parentNode.textContent = c : t.$text$ !== c && (s.data = c);\n}, w = (t) => {\n const e = t.childNodes;\n for (const n of e)\n if (n.nodeType === 1) {\n if (n[\"s-sr\"]) {\n const s = n[\"s-sn\"];\n n.hidden = !1;\n for (const l of e)\n if (l !== n) {\n if (l[\"s-hn\"] !== n[\"s-hn\"] || s !== \"\") {\n if (l.nodeType === 1 && (s === l.getAttribute(\"slot\") || s === l[\"s-sn\"])) {\n n.hidden = !0;\n break;\n }\n } else if (l.nodeType === 1 || l.nodeType === 3 && l.textContent.trim() !== \"\") {\n n.hidden = !0;\n break;\n }\n }\n }\n w(n);\n }\n}, S = [], V = (t) => {\n let e, n, s;\n for (const l of t.childNodes) {\n if (l[\"s-sr\"] && (e = l[\"s-cr\"]) && e.parentNode) {\n n = e.parentNode.childNodes;\n const r = l[\"s-sn\"];\n for (s = n.length - 1; s >= 0; s--)\n if (e = n[s], !e[\"s-cn\"] && !e[\"s-nr\"] && e[\"s-hn\"] !== l[\"s-hn\"] && !I.experimentalSlotFixes)\n if (W(e, r)) {\n let o = S.find((c) => c.$nodeToRelocate$ === e);\n M = !0, e[\"s-sn\"] = e[\"s-sn\"] || r, o ? (o.$nodeToRelocate$[\"s-sh\"] = l[\"s-hn\"], o.$slotRefNode$ = l) : (e[\"s-sh\"] = l[\"s-hn\"], S.push({\n $slotRefNode$: l,\n $nodeToRelocate$: e\n })), e[\"s-sr\"] && S.map((c) => {\n W(c.$nodeToRelocate$, e[\"s-sn\"]) && (o = S.find((i) => i.$nodeToRelocate$ === e), o && !c.$slotRefNode$ && (c.$slotRefNode$ = o.$slotRefNode$));\n });\n } else\n S.some((o) => o.$nodeToRelocate$ === e) || S.push({\n $nodeToRelocate$: e\n });\n }\n l.nodeType === 1 && V(l);\n }\n}, W = (t, e) => t.nodeType === 1 ? t.getAttribute(\"slot\") === null && e === \"\" || t.getAttribute(\"slot\") === e : t[\"s-sn\"] === e ? !0 : e === \"\", ee = (t) => {\n t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(ee);\n}, he = (t, e, n = !1) => {\n var s, l, r, o, c;\n const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || O(null, null), f = ae(e) ? e : G(null, null, e);\n if (m = i.tagName, d.$attrsToReflect$ && (f.$attrs$ = f.$attrs$ || {}, d.$attrsToReflect$.map(([$, a]) => f.$attrs$[a] = i[$])), n && f.$attrs$)\n for (const $ of Object.keys(f.$attrs$))\n i.hasAttribute($) && ![\"key\", \"ref\", \"style\", \"class\"].includes($) && (f.$attrs$[$] = i[$]);\n f.$tag$ = null, f.$flags$ |= 4, t.$vnode$ = f, f.$elm$ = u.$elm$ = i.shadowRoot || i, T = i[\"s-sc\"], F = i[\"s-cr\"], X = (d.$flags$ & 1) !== 0, M = !1, k(u, f, n);\n {\n if (x.$flags$ |= 1, D) {\n V(f.$elm$);\n for (const $ of S) {\n const a = $.$nodeToRelocate$;\n if (!a[\"s-ol\"]) {\n const p = R.createTextNode(\"\");\n p[\"s-nr\"] = a, a.parentNode.insertBefore(a[\"s-ol\"] = p, a);\n }\n }\n for (const $ of S) {\n const a = $.$nodeToRelocate$, p = $.$slotRefNode$;\n if (p) {\n const v = p.parentNode;\n let y = p.nextSibling;\n {\n let E = (s = a[\"s-ol\"]) === null || s === void 0 ? void 0 : s.previousSibling;\n for (; E; ) {\n let b = (l = E[\"s-nr\"]) !== null && l !== void 0 ? l : null;\n if (b && b[\"s-sn\"] === a[\"s-sn\"] && v === b.parentNode && (b = b.nextSibling, !b || !b[\"s-nr\"])) {\n y = b;\n break;\n }\n E = E.previousSibling;\n }\n }\n (!y && v !== a.parentNode || a.nextSibling !== y) && a !== y && (!a[\"s-hn\"] && a[\"s-ol\"] && (a[\"s-hn\"] = a[\"s-ol\"].parentNode.nodeName), v.insertBefore(a, y), a.nodeType === 1 && (a.hidden = (r = a[\"s-ih\"]) !== null && r !== void 0 ? r : !1));\n } else\n a.nodeType === 1 && (n && (a[\"s-ih\"] = (o = a.hidden) !== null && o !== void 0 ? o : !1), a.hidden = !0);\n }\n }\n M && w(f.$elm$), x.$flags$ &= -2, S.length = 0;\n }\n if (I.experimentalScopedSlotChanges && d.$flags$ & 2)\n for (const $ of f.$elm$.childNodes)\n $[\"s-hn\"] !== m && !$[\"s-sh\"] && (n && $[\"s-ih\"] == null && ($[\"s-ih\"] = (c = $.hidden) !== null && c !== void 0 ? c : !1), $.hidden = !0);\n F = void 0;\n}, z = (t, e) => e in t, B = typeof window < \"u\" ? window : {}, R = B.document || { head: {} };\nB.HTMLElement;\nconst x = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (t) => t(),\n raf: (t) => requestAnimationFrame(t),\n ael: (t, e, n, s) => t.addEventListener(e, n, s),\n rel: (t, e, n, s) => t.removeEventListener(e, n, s),\n ce: (t, e) => new CustomEvent(t, e)\n}, ye = (t, e, n) => {\n [null, void 0, \"\", !1].includes(n) || [\"innerHTML\", \"style\"].includes(e) || t.setAttribute(e, [\"object\", \"function\"].includes(typeof n) ? \"/!\\\\ Object props are not rendered in the code example\" : n);\n}, te = (t, e, n, s, l) => {\n if (e && typeof e == \"string\") {\n const r = document.createElement(e);\n Object.keys(n || {}).forEach((o) => {\n ye(r, o, n[o]);\n }), s == null || s.forEach((o) => {\n te(r, o.$tag$, o.$attrs$, o.$children$, o.$text$);\n }), n != null && n.innerHTML && (r.innerHTML = n.innerHTML), t.appendChild(r);\n }\n l && (t.innerHTML = l);\n}, xe = (t, e) => {\n const n = {};\n if (typeof t != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const s in t)\n if (!s.startsWith(\"slot\")) {\n const l = t[s], r = s.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!e || !Object.keys(e).includes(s) || e[s] !== l) && (n[r] = l);\n }\n return n;\n}, me = (t, e) => {\n var s, l;\n const n = document.getElementById(\"storybook-root\");\n if (n)\n return (l = document.querySelector(\"[lang]\")) == null || l.setAttribute(\"lang\", ((s = e.globals) == null ? void 0 : s.locale) || \"en\"), he(\n {\n $ancestorComponent$: void 0,\n $flags$: 0,\n $modeName$: void 0,\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: n.tagName\n },\n $hostElement$: n\n },\n t(e)\n ), n.children[n.children.length - 1];\n}, Le = ({ $tag$: t, $attrs$: e, $children$: n, $text$: s }) => {\n const l = document.createElement(\"div\");\n return te(l, t, e, n, s), l.innerHTML;\n}, Ee = (t) => {\n const e = { value: \"2023\", pattern: \"yyyy\" }, n = { value: \"12\", pattern: \"mm\" }, s = { value: \"24\", pattern: \"dd\" };\n return be([e.value, n.value, s.value].join(\"-\"), t).replace(e.value, e.pattern).replace(n.value, n.pattern).replace(s.value, s.pattern);\n}, Ae = (t) => t.toISOString().split(\"T\")[0], ve = (t, e, n) => {\n const s = t.closest(\"[lang]\"), l = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), r = l.length > 0 && typeof l[0] == \"string\" ? l[0] : navigator.language || n, o = r.split(\"-\").shift();\n return {\n locale: r,\n messages: e[o] || e[n]\n };\n}, Re = (t, e, n) => new Intl.NumberFormat(e, { style: \"currency\", currency: n }).format(t), Me = (t, e) => new Intl.NumberFormat(e).format(t), Se = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, be = (t, e) => typeof t != \"string\" || t === \"\" || !Se.test(t) ? \"\" : new Intl.DateTimeFormat(e).format(new Date(t)), Oe = (t, e) => (n) => ve(n, t, e), je = (t = \"\", e = 10) => {\n const n = new Uint8Array(e);\n crypto.getRandomValues(n);\n const s = Array.from(n).map((l) => l.toString(16).padStart(2, \"0\")).join(\"\").slice(0, e);\n return t !== \"\" ? `${t}-${s}` : s;\n};\nclass Fe {\n constructor(e = []) {\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\", (e) => {\n this.has(e) || this.classes.push(e);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n g(this, \"delete\", (e) => {\n const n = this.classes.indexOf(e);\n n > -1 && this.classes.splice(n, 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\", (e) => this.classes.includes(e));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n g(this, \"join\", () => this.classes.join(\" \"));\n this.classes = e;\n }\n}\nconst De = (t) => Array.isArray(t) && t.every((e) => typeof e == \"string\"), _e = (t, e) => e.includes(t == null ? void 0 : t.tagName.toLowerCase()), Be = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Ne = (t) => {\n const e = se(t), n = ne(t);\n return [t, ...e, ...n];\n}, se = (t, e = []) => {\n if (t.self !== t.top)\n try {\n const n = t.parent;\n return n ? (e.push(n), se(n, e)) : e;\n } catch (n) {\n return console.error(\"Different hosts between iframes:\", n), e;\n }\n return e;\n}, ne = (t, e = []) => {\n if (t.frames.length > 0)\n for (const n of Array.from(t.frames))\n e.push(n), ne(n, e);\n return e;\n}, He = (t) => typeof t == \"string\" && t.trim() !== \"\", Ce = (t) => typeof t == \"string\" ? t.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : t, Pe = async (t) => t(), Ue = ({ disconnect: t, observe: e, takeRecords: n }) => {\n class s {\n constructor(r) {\n /**\n *\n */\n g(this, \"disconnect\", t);\n /**\n *\n */\n g(this, \"observe\", e);\n /**\n *\n */\n g(this, \"takeRecords\", n);\n /**\n *\n */\n g(this, \"cb\");\n this.cb = r;\n }\n }\n return [window, global].forEach((l) => {\n Object.defineProperty(l, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n}, We = ({ disconnect: t, observe: e }) => {\n class n {\n constructor(l) {\n /**\n *\n */\n g(this, \"disconnect\", t);\n /**\n *\n */\n g(this, \"observe\", e);\n /**\n *\n */\n g(this, \"unobserve\");\n /**\n *\n */\n g(this, \"cb\");\n this.cb = l;\n }\n }\n return [window, global].forEach((s) => {\n Object.defineProperty(s, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: n\n });\n }), n;\n};\nclass Te extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n g(this, \"detail\");\n }\n}\nconst ze = () => {\n class t extends Te {\n }\n return [window, global].forEach((e) => {\n Object.defineProperty(e, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: t\n });\n }), t;\n};\nexport {\n Fe as ClassList,\n De as allItemsAreString,\n Ce as cleanString,\n je as createID,\n Se as dateRegExp,\n Ae as dateToString,\n Oe as defineLocales,\n xe as filterArgs,\n Be as focusableElements,\n Ee as getLocaleDatePattern,\n se as getParentWindows,\n Le as getStoryHTML,\n Ne as getWindows,\n _e as isTagName,\n He as isValidString,\n Re as localeCurrency,\n be as localeDate,\n Me as localeNumber,\n Pe as nextTick,\n Ue as setupMutationObserverMock,\n We as setupResizeObserverMock,\n ze as setupSubmitEventMock,\n me as stencilWrapper\n};\n//# sourceMappingURL=index.es.js.map\n","import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { defineLocales } from '@mgdis/stencil-helpers';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = defineLocales(messages, defaultLocale);\n","import { MgItemMore } from '../../mg-item-more/mg-item-more';\n\n/**\n * Menu direction type\n */\nexport enum Direction {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * ItemMore prop type\n */\nexport type ItemMoreType = Pick<MgItemMore, 'icon' | 'slotlabel' | 'size'>;\n\n/**\n * List of all possibles sizes\n */\nexport const sizes = ['regular', 'medium', 'large'] as const;\n\n/**\n * item Size from sizes\n */\nexport type MenuSizeType = (typeof sizes)[number];\n"],"version":3}
@@ -1,27 +0,0 @@
1
- import { initLocales } from ".";
2
- import messagesEn from "./en/messages.json";
3
- import messagesFr from "./fr/messages.json";
4
- describe('locales', () => {
5
- describe('initLocales', () => {
6
- test('Should return default locale', () => {
7
- const locales = initLocales(document.createElement('div'));
8
- expect(locales.locale).toEqual('en');
9
- expect(locales.messages).toMatchObject(messagesEn);
10
- });
11
- test('Should return matching locale', () => {
12
- const div = document.createElement('div');
13
- div.lang = 'fr-FR';
14
- const locales = initLocales(div);
15
- expect(locales.locale).toEqual(div.lang);
16
- expect(locales.messages).toMatchObject(messagesFr);
17
- });
18
- test('Should return default locale messages when requested does not exist', () => {
19
- const div = document.createElement('div');
20
- div.lang = 'ca';
21
- const locales = initLocales(div);
22
- expect(locales.locale).toEqual(div.lang);
23
- expect(locales.messages).toMatchObject(messagesEn);
24
- });
25
- });
26
- });
27
- //# sourceMappingURL=index.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../src/locales/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAChC,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAE5C,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACxC,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACzC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC1C,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC;YACnB,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC/E,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC1C,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;YAChB,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { initLocales } from '.';\nimport messagesEn from './en/messages.json';\nimport messagesFr from './fr/messages.json';\n\ndescribe('locales', () => {\n describe('initLocales', () => {\n test('Should return default locale', () => {\n const locales = initLocales(document.createElement('div'));\n expect(locales.locale).toEqual('en');\n expect(locales.messages).toMatchObject(messagesEn);\n });\n\n test('Should return matching locale', () => {\n const div = document.createElement('div');\n div.lang = 'fr-FR';\n const locales = initLocales(div);\n expect(locales.locale).toEqual(div.lang);\n expect(locales.messages).toMatchObject(messagesFr);\n });\n\n test('Should return default locale messages when requested does not exist', () => {\n const div = document.createElement('div');\n div.lang = 'ca';\n const locales = initLocales(div);\n expect(locales.locale).toEqual(div.lang);\n expect(locales.messages).toMatchObject(messagesEn);\n });\n });\n});\n"]}
@@ -1,10 +0,0 @@
1
- import iconList from "@mgdis/img/dist/icons/index.json";
2
- import { IconGallery, IconItem } from "@storybook/blocks";
3
- import React from "react";
4
- /**
5
- * Template
6
- * @returns HTMLElement
7
- */
8
- const Template = () => React.createElement(IconGallery, null, iconList.map(icon => React.createElement(IconItem, { name: icon, key: icon }, React.createElement('mg-icon', { icon: icon }))));
9
- export default Template;
10
- //# sourceMappingURL=icon-gallery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-gallery.js","sourceRoot":"","sources":["../../src/stories/icon-gallery.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;GAGG;AACH,MAAM,QAAQ,GAAG,GAAgB,EAAE,CACjC,KAAK,CAAC,aAAa,CACjB,WAAW,EACX,IAAI,EACJ,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAC/H,CAAC;AAEJ,eAAe,QAAQ,CAAC","sourcesContent":["import iconList from '@mgdis/img/dist/icons/index.json';\nimport { IconGallery, IconItem } from '@storybook/blocks';\nimport React from 'react';\n\n/**\n * Template\n * @returns HTMLElement\n */\nconst Template = (): HTMLElement =>\n React.createElement(\n IconGallery,\n null,\n iconList.map(icon => React.createElement(IconItem, { name: icon, key: icon }, React.createElement('mg-icon', { icon: icon }))),\n );\n\nexport default Template;\n"]}
@@ -1,61 +0,0 @@
1
- import { h } from "@stencil/core/internal";
2
- import { newSpecPage } from "@stencil/core/testing";
3
- import { MgItemMore } from "../components/molecules/mg-item-more/mg-item-more";
4
- import { MgMenuItem } from "../components/molecules/menu/mg-menu-item/mg-menu-item";
5
- import { MgMenu } from "../components/molecules/menu/mg-menu/mg-menu";
6
- import { OverflowBehavior } from "./behaviors.utils";
7
- import { setupMutationObserverMock, setupResizeObserverMock } from "@mgdis/stencil-helpers";
8
- const getPage = render => newSpecPage({
9
- components: [MgMenu, MgMenuItem, MgItemMore],
10
- template: () => render,
11
- });
12
- describe('behavior.utils', () => {
13
- describe('OverflowBehavior', () => {
14
- let fireRo;
15
- beforeEach(() => {
16
- jest.useFakeTimers({ legacyFakeTimers: true });
17
- setupResizeObserverMock({
18
- observe: function () {
19
- fireRo = this.cb;
20
- },
21
- disconnect: () => null,
22
- });
23
- setupMutationObserverMock({
24
- disconnect: () => null,
25
- observe: () => null,
26
- takeRecords: () => null,
27
- });
28
- });
29
- afterEach(() => jest.runOnlyPendingTimers());
30
- describe('render menu', () => {
31
- test.each([50, 80, 100, 250])('should manage resize with observer, case %s', async (width) => {
32
- const args = { label: 'batman' };
33
- const page = await getPage(h("mg-menu", Object.assign({}, args), h("mg-menu-item", null, h("span", { slot: "label" }, "Batman")), h("mg-menu-item", null, h("span", { slot: "label" }, "Joker")), h("mg-menu-item", null, h("span", { slot: "label" }, "Bane"))));
34
- // initial menu render
35
- jest.runAllTimers();
36
- await page.waitForChanges();
37
- // more-item render
38
- jest.runAllTimers();
39
- await page.waitForChanges();
40
- const items = Array.from(page.doc.querySelectorAll('mg-menu-item'));
41
- items.forEach(item => {
42
- Object.defineProperty(item, 'offsetWidth', {
43
- get: jest.fn(() => 80),
44
- });
45
- });
46
- Object.defineProperty(page.doc.querySelector('mg-item-more'), 'offsetWidth', {
47
- get: jest.fn(() => 50),
48
- });
49
- fireRo([{ contentRect: { width } }]);
50
- expect(page.root).toMatchSnapshot();
51
- });
52
- });
53
- test('Should fire disconnect callback', () => {
54
- const behavior = new OverflowBehavior(h("div", null), () => h("span", null));
55
- const spy = jest.spyOn(behavior._resizeObserver, 'disconnect');
56
- behavior.disconnect();
57
- expect(spy).toHaveBeenCalled();
58
- });
59
- });
60
- });
61
- //# sourceMappingURL=behaviors.utils.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"behaviors.utils.spec.js","sourceRoot":"","sources":["../../src/utils/behaviors.utils.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CACvB,WAAW,CAAC;IACV,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;IAC5C,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;CACvB,CAAC,CAAC;AAEL,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,IAAI,MAAM,CAAC;QACX,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,aAAa,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/C,uBAAuB,CAAC;gBACtB,OAAO,EAAE;oBACP,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC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E,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;qBACvB,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,aAAa,EAAE;oBAC3E,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;iBACvB,CAAC,CAAC;gBAEH,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;gBAErC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE;YAC3C,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,cAAW,EAAE,GAAG,EAAE,CAAC,eAAa,CAAC,CAAC;YACxE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAE,QAAkD,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;YAC1G,QAAQ,CAAC,UAAU,EAAE,CAAC;YAEtB,MAAM,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core/internal';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { MgItemMore } from '../components/molecules/mg-item-more/mg-item-more';\nimport { MgMenuItem } from '../components/molecules/menu/mg-menu-item/mg-menu-item';\nimport { MgMenu } from '../components/molecules/menu/mg-menu/mg-menu';\nimport { OverflowBehavior } from './behaviors.utils';\nimport { setupMutationObserverMock, setupResizeObserverMock } from '@mgdis/stencil-helpers';\n\nconst getPage = render =>\n newSpecPage({\n components: [MgMenu, MgMenuItem, MgItemMore],\n template: () => render,\n });\n\ndescribe('behavior.utils', () => {\n describe('OverflowBehavior', () => {\n let fireRo;\n beforeEach(() => {\n jest.useFakeTimers({ legacyFakeTimers: true });\n setupResizeObserverMock({\n observe: function () {\n fireRo = this.cb;\n },\n disconnect: () => null,\n });\n setupMutationObserverMock({\n disconnect: () => null,\n observe: () => null,\n takeRecords: () => null,\n });\n });\n afterEach(() => jest.runOnlyPendingTimers());\n\n describe('render menu', () => {\n test.each([50, 80, 100, 250])('should manage resize with observer, case %s', async width => {\n const args = { label: 'batman' };\n const page = await getPage(\n <mg-menu {...args}>\n <mg-menu-item>\n <span slot=\"label\">Batman</span>\n </mg-menu-item>\n <mg-menu-item>\n <span slot=\"label\">Joker</span>\n </mg-menu-item>\n <mg-menu-item>\n <span slot=\"label\">Bane</span>\n </mg-menu-item>\n </mg-menu>,\n );\n\n // initial menu render\n jest.runAllTimers();\n await page.waitForChanges();\n\n // more-item render\n jest.runAllTimers();\n await page.waitForChanges();\n\n const items = Array.from(page.doc.querySelectorAll('mg-menu-item'));\n items.forEach(item => {\n Object.defineProperty(item, 'offsetWidth', {\n get: jest.fn(() => 80),\n });\n });\n\n Object.defineProperty(page.doc.querySelector('mg-item-more'), 'offsetWidth', {\n get: jest.fn(() => 50),\n });\n\n fireRo([{ contentRect: { width } }]);\n\n expect(page.root).toMatchSnapshot();\n });\n });\n\n test('Should fire disconnect callback', () => {\n const behavior = new OverflowBehavior(<div></div>, () => <span></span>);\n const spy = jest.spyOn((behavior as unknown as { _resizeObserver: never })._resizeObserver, 'disconnect');\n behavior.disconnect();\n\n expect(spy).toHaveBeenCalled();\n });\n });\n});\n"]}