Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/ |
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/drawer.min.js |
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("core/drawer",["exports","jquery","core/pubsub","core/drawer_events"],function(a,b,c,d){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=g(b);c=f(c);d=g(d);function e(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;e=function(){return a};return a}function f(a){if(a&&a.__esModule){return a}if(null===a||"object"!==_typeof(a)&&"function"!=typeof a){return{default:a}}var b=e();if(b&&b.has(a)){return b.get(a)}var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a){if(Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;if(g&&(g.get||g.set)){Object.defineProperty(c,f,g)}else{c[f]=a[f]}}}c.default=a;if(b){b.set(a,c)}return c}function g(a){return a&&a.__esModule?a:{default:a}}var h=function(a){a.removeClass("hidden");a.attr("aria-expanded",!0);a.removeAttr("aria-hidden");a.focus();c.publish(d.default.DRAWER_SHOWN,a)},i=function(a){a.addClass("hidden");a.attr("aria-expanded",!1);a.attr("aria-hidden",!0);c.publish(d.default.DRAWER_HIDDEN,a)},j=function(a){var b=a.hasClass("hidden");return!b},k=function(a){if(j(a)){i(a)}else{h(a)}},l=function(a){a=(0,b.default)(a);return a.closest("[data-region=\"right-hand-drawer\"]")};a.default={hide:i,show:h,isVisible:j,toggle:k,registerToggles:function registerToggles(a,b){var c=null;b.attr("aria-expanded",j(a));b.on("click",function(d){d.preventDefault();var e=j(a);k(a);b.attr("aria-expanded",!e);if(!e){c=b.filter(function(a,b){return b==d.target||b.contains(d.target)})}else if(c){c.focus();c=null}})},getDrawerRoot:l};return a.default}); //# sourceMappingURL=drawer.min.js.map