{"size": 2080, "ext": "js", "max_stars_repo_path": "dist/resources/sap/f/GridContainerRenderer.js", "max_stars_repo_name": "fleischr/sapui5-metamask-shoppingcart", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/resources/sap/f/GridContainerRenderer.js", "max_issues_repo_name": "fleischr/sapui5-metamask-shoppingcart", "max_issues_repo_issues_event_min_datetime": "2022-02-23T17:30:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-23T02:24:32.000Z", "max_forks_repo_path": "dist/resources/sap/f/GridContainerRenderer.js", "max_forks_repo_name": "fleischr/sapui5-metamask-shoppingcart", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 15, "max_forks_count": null, "avg_line_length": 346.6666666667, "max_line_length": 1929, "alphanum_fraction": 0.73125}
/*!
 * OpenUI5
 * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
 * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
 */
sap.ui.define([],function(){"use strict";var e={apiVersion:2};e.render=function(e,t){var i=t.getId(),r=t.getItems(),s=t.getTooltip_AsString();e.openStart("div",t).class("sapFGridContainer");this.setGridStyles(e,t._getActiveGridStyles());e.accessibilityState(t,{role:"list",roledescription:t._oRb.getText("GRIDCONTAINER_ROLEDESCRIPTION")});if(t.getSnapToRow()){e.class("sapFGridContainerSnapToRow")}if(t.getAllowDenseFill()){e.class("sapFGridContainerDenseFill")}if(t.getWidth()){e.style("width",t.getWidth())}if(t.getMinHeight()){e.style("min-height",t.getMinHeight())}if(s){e.attr("title",s)}e.openEnd();this.renderDummyArea(e,i,"before");r.forEach(function(i,r){this.renderItem(e,i,t,r)}.bind(this));this.renderDummyArea(e,i,"after");e.close("div")};e.setGridStyles=function(e,t){for(var i in t){e.style(i,t[i])}};e.renderItem=function(e,t,i,r){var s=this.getStylesForItemWrapper(t,i),n=s.styles,a=s.classes,o={role:"listitem",labelledby:t.getId()};if(t.getAriaRoleDescription){o.roledescription=t.getAriaRoleDescription()}e.openStart("div",i.getId()+"-item-"+r).attr("tabindex","0").accessibilityState(i,o);n.forEach(function(t,i){e.style(i,t)});a.forEach(function(t){e.class(t)});e.openEnd();e.renderControl(t);e.close("div")};e.getStylesForItemWrapper=function(e,t){var i=new Map,r=["sapFGridContainerItemWrapper"],s=e.getLayoutData(),n,a;if(s){n=s.getColumns();a=t.getActiveLayoutSettings().getColumns();if(n&&a){n=Math.min(n,a)}if(n){i.set("grid-column","span "+n)}if(t.getInlineBlockLayout()){i.set("grid-row","span 1")}else if(s.getRows()||s.getMinRows()){i.set("grid-row","span "+s.getActualRows())}if(!s.hasAutoHeight()){r.push("sapFGridContainerItemFixedRows")}}if(!e.getVisible()){r.push("sapFGridContainerInvisiblePlaceholder")}return{styles:i,classes:r}};e.renderDummyArea=function(e,t,i){e.openStart("div",t+"-"+i).class("sapFGridContainerDummyArea").attr("tabindex","-1").openEnd().close("div")};return e},true);