All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.util.getFastNavigationGroups.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../../src/util/getFastNavigationGroups.ts"],
  "sourcesContent": ["let groups: Array = [];\n\nconst isFastNavGroupElemenet = (el: HTMLElement) => {\n\treturn el.getAttribute(\"data-sap-ui-fastnavgroup\") === \"true\";\n};\n\nconst isElementVisible = (el: HTMLElement) => {\n\tconst style = window.getComputedStyle(el);\n\n\treturn style.width !== \"0px\"\n\t\t&& style.height !== \"0px\"\n\t\t&& style.opacity !== \"0\"\n\t\t&& style.display !== \"none\"\n\t\t&& style.visibility !== \"hidden\";\n};\n\nconst findFastNavigationGroups = (container: HTMLElement, startFromContainer?: boolean) => {\n\tlet child,\n\t\tassignedElements,\n\t\tindex = 0;\n\n\tif (!isElementVisible(container)) {\n\t\treturn;\n\t}\n\n\tif (isFastNavGroupElemenet(container)) {\n\t\tgroups.push(container);\n\t}\n\n\tif (container.shadowRoot) {\n\t\tchild = container.shadowRoot.firstChild;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tchild = assignedElements[0];\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = container.firstElementChild;\n\t}\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement = child as HTMLElement;\n\t\tif (!child) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (child.nodeType === 1) {\n\t\t\tfindFastNavigationGroups(child as HTMLElement, false);\n\t\t}\n\n\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : originalChild.nextElementSibling;\n\t}\n};\n\nconst getFastNavigationGroups = (container: HTMLElement) => {\n\tgroups = [];\n\n\tfindFastNavigationGroups(container, true);\n\n\treturn groups;\n};\n\nexport default getFastNavigationGroups;\n"],
  "mappings": "aAAA,IAAIA,EAA6B,CAAC,EAElC,MAAMC,EAA0BC,GACxBA,EAAG,aAAa,0BAA0B,IAAM,OAGlDC,EAAoBD,GAAoB,CAC7C,MAAME,EAAQ,OAAO,iBAAiBF,CAAE,EAExC,OAAOE,EAAM,QAAU,OACnBA,EAAM,SAAW,OACjBA,EAAM,UAAY,KAClBA,EAAM,UAAY,QAClBA,EAAM,aAAe,QAC1B,EAEMC,EAA2B,CAACC,EAAwBC,IAAiC,CAC1F,IAAIC,EACHC,EACAC,EAAQ,EAET,GAAKP,EAAiBG,CAAS,EAmB/B,IAfIL,EAAuBK,CAAS,GACnCN,EAAO,KAAKM,CAAS,EAGlBA,EAAU,WACbE,EAAQF,EAAU,WAAW,WACnBA,aAAqB,iBAAmBA,EAAU,cAAc,GAC1EG,EAAmBH,EAAU,cAAc,EAC3CE,EAAQC,EAAiB,CAAC,GAChBF,EACVC,EAAQF,EAERE,EAAQF,EAAU,kBAGZE,GAAO,CACb,MAAMG,EAA6BH,EACnC,GAAI,CAACA,EACJ,OAGGA,EAAM,WAAa,GACtBH,EAAyBG,EAAsB,EAAK,EAGrDA,EAAQC,GAAoBA,EAAiB,OAASA,EAAiB,EAAEC,CAAK,EAAIC,EAAc,kBACjG,CACD,EAEMC,EAA2BN,IAChCN,EAAS,CAAC,EAEVK,EAAyBC,EAAW,EAAI,EAEjCN,GAGR,eAAeY",
  "names": ["groups", "isFastNavGroupElemenet", "el", "isElementVisible", "style", "findFastNavigationGroups", "container", "startFromContainer", "child", "assignedElements", "index", "originalChild", "getFastNavigationGroups"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy