packages/ag-grid-docs/src/dist/aui/js/aui.js
/**
   * Dims the screen using a blanket div
   * @param useShim deprecated, it is calculated by dim() now
   */
Dims the screen using a blanket div
@param useShim deprecated, it is calculated by dim() now
Dims the screen using a blanket div @param useShim deprecated it is calculated by dim () now
function dim(useShim, zIndex) {
      function hasAriaHidden(element) {
          return element.getAttribute('aria-hidden') ? true : false;
      }
      function isAuiLayer(element) {
          return element.className.match(/\baui-layer\b/) ? true : false;
      }
      Array.prototype.forEach.call(document.body.children, function (element) {
          if (!hasAriaHidden(element) && !isAuiLayer(element)) {
              element.setAttribute('aria-hidden', 'true');
              _hiddenByAui.push(element);
          }
      });
      if (!overflowEl) {
          overflowEl = document.body;
      }
      if (useShim === true) {
          useShimDeprecationLogger();
      }
      var isBlanketShowing = !!dim.$dim && dim.$dim.attr('aria-hidden') === 'false';
      if (!!dim.$dim) {
          dim.$dim.remove();
          dim.$dim = null;
      }
      dim.$dim = (0, _createElement2.default)('div').addClass('aui-blanket');
      dim.$dim.attr('tabindex', '0'); 
      dim.$dim.appendTo(document.body);
      if (!isBlanketShowing) {
          (0, _animation.recomputeStyle)(dim.$dim);
          AJS.dim.cachedOverflow = {
              overflow: overflowEl.style.overflow,
              overflowX: overflowEl.style.overflowX,
              overflowY: overflowEl.style.overflowY
          };
          overflowEl.style.overflowX = 'hidden';
          overflowEl.style.overflowY = 'hidden';
          overflowEl.style.overflow = 'hidden';
      }
      dim.$dim.attr('aria-hidden', 'false');
      if (zIndex) {
          dim.$dim.css({ zIndex: zIndex });
      }
      return dim.$dim;
  }
function dim ( useShim , zIndex ) { function hasAriaHidden ( element ) { return element . getAttribute ( 'aria-hidden' ) ? true : false ; } function isAuiLayer ( element ) { return element . className . match ( / \baui-layer\b / ) ? true : false ; } Array . prototype . forEach . call ( document . body . children , function ( element ) { if ( ! hasAriaHidden ( element ) && ! isAuiLayer ( element ) ) { element . setAttribute ( 'aria-hidden' , 'true' ) ; _hiddenByAui . push ( element ) ; } } ) ; if ( ! overflowEl ) { overflowEl = document . body ; } if ( useShim === true ) { useShimDeprecationLogger ( ) ; } var isBlanketShowing = ! ! dim . $dim && dim . $dim . attr ( 'aria-hidden' ) === 'false' ; if ( ! ! dim . $dim ) { dim . $dim . remove ( ) ; dim . $dim = null ; } dim . $dim = ( 0 , _createElement2 . default ) ( 'div' ) . addClass ( 'aui-blanket' ) ; dim . $dim . attr ( 'tabindex' , '0' ) ; dim . $dim . appendTo ( document . body ) ; if ( ! isBlanketShowing ) { ( 0 , _animation . recomputeStyle ) ( dim . $dim ) ; AJS . dim . cachedOverflow = { overflow : overflowEl . style . overflow , overflowX : overflowEl . style . overflowX , overflowY : overflowEl . style . overflowY } ; overflowEl . style . overflowX = 'hidden' ; overflowEl . style . overflowY = 'hidden' ; overflowEl . style . overflow = 'hidden' ; } dim . $dim . attr ( 'aria-hidden' , 'false' ) ; if ( zIndex ) { dim . $dim . css ( { zIndex : zIndex } ) ; } return dim . $dim ; }
Dims the screen using a blanket div
 @param useShim deprecated, it is calculated by dim() now
Dims the screen using a blanket div @param useShim deprecated it is calculated by dim () now
//if we're blanketing the page it means we want to hide the whatever is under the blanket from the screen readers as well //required, or the last element's focusout event will go to the browser //recompute after insertion and before setting aria-hidden=false to ensure we calculate a difference in //computed styles