@aofl/drawer
Advanced tools
Comparing version 3.0.0-beta.47 to 3.0.0-beta.48
{ | ||
"plugins": ["node_modules/jsdoc-babel"], | ||
"plugins": ["../node_modules/jsdoc-babel"], | ||
"source": { | ||
@@ -8,3 +8,3 @@ "includePattern": ".*\\.js$", | ||
"opts": { | ||
"template": "./node_modules/tsd-jsdoc/dist", | ||
"template": "../node_modules/tsd-jsdoc/dist", | ||
"encoding": "utf8", | ||
@@ -11,0 +11,0 @@ "destination": ".", |
@@ -1,2 +0,2 @@ | ||
module.exports=function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s="QfWi")}({"7W2i":function(t,n,e){var o=e("SksO");t.exports=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&o(t,n)}},JPst:function(t,n,e){"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",o=t[3];if(!o)return e;if(n&&"function"==typeof btoa){var i=(s=o,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),r=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot).concat(t," */")}));return[e].concat(r).concat([i]).join("\n")}var s,a,c;return[e].join("\n")}(n,t);return n[2]?"@media ".concat(n[2],"{").concat(e,"}"):e})).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];null!=r&&(o[r]=!0)}for(var s=0;s<t.length;s++){var a=t[s];null!=a[0]&&o[a[0]]||(e&&!a[2]?a[2]=e:e&&(a[2]="(".concat(a[2],") and (").concat(e,")")),n.push(a))}},n}},Nsbk:function(t,n){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e},PJYZ:function(t,n){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},QfWi:function(t,n,e){"use strict";e.r(n);var o=e("VkAN"),i=e.n(o),r=e("lwsE"),s=e.n(r),a=e("W8MJ"),c=e.n(a),u=e("a1gu"),l=e.n(u),f=e("Nsbk"),p=e.n(f),h=e("iWIM"),d=e.n(h),y=e("7W2i"),g=e.n(y),b=e("ymFR"),m=e("WhZO"),v=e.n(m);function O(){var t=i()(["<slot></slot>"]);return O=function(){return t},t}var w=function(t){function n(){var t;return s()(this,n),(t=l()(this,p()(n).call(this))).open=null,t.transitionEndCount=0,t["transition-count"]=1,t}return g()(n,t),c()(n,[{key:"connectedCallback",value:function(){for(var t,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];(t=d()(p()(n.prototype),"connectedCallback",this)).call.apply(t,[this].concat(o)),this.cancelOpen=null,this.trigger=this.trigger||"animate",this.animated=void 0!==this.opening&&void 0!==this.closing,this.animated&&(this.open?(this.classList.remove(this.opening),this.classList.add(this.closing)):(this.classList.remove(this.closing),this.classList.add(this.opening)),this.addEventListener("animationend",this.animationEndHandler),this.addEventListener("transitionend",this.animationEndHandler))}},{key:"render",value:function(){return d()(p()(n.prototype),"render",this).call(this,(function(t,n){return n(O())}),[v.a])}},{key:"attributeChangedCallback",value:function(t,e,o){d()(p()(n.prototype),"attributeChangedCallback",this).call(this,t,e,o),"open"===t&&(this.animated?this.openChanged(this.open):this.dispatchEvent(new CustomEvent("drawer-toggle",{composed:!0,bubbles:!0})))}},{key:"openChanged",value:function(t){var n=this;!0===t?this.cancelOpen=this.startOpeningAnimation((function(){n.transitionEndCount=0,n.classList.remove(n.closing),n.classList.add(n.opening),n.classList.add(n.trigger)})):(this.classList.contains(this.closing)||this.classList.contains(this.trigger))&&("function"==typeof this.cancelOpen&&(this.cancelOpen(),this.cancelOpen=null),this.classList.remove(this.opening),this.classList.add(this.closing),this.classList.add(this.trigger),this.classList.add("closing"))}},{key:"startOpeningAnimation",value:function(t){var n=this,e=!1,o=100;return function i(){"block"===window.getComputedStyle(n).getPropertyValue("display")?t():!e&&o-- >0&&window.requestAnimationFrame(i)}(),function(){e=!0}}},{key:"animationEndHandler",value:function(t){var n=this;t.target===this&&(this.transitionEndCount+=1,this.transitionEndCount===this["transition-count"]&&(this.transitionEndCount=0,this.classList.remove(this.trigger),this.classList.contains(this.opening)?(this.classList.remove(this.opening),this.classList.add(this.closing),this.cancelOpen=null):(this.classList.add(this.opening),this.classList.remove(this.closing),this.classList.remove("closing")),setTimeout((function(){n.dispatchEvent(new CustomEvent("drawer-toggle",{composed:!0,bubbles:!0}))}))))}},{key:"disconnectedCallback",value:function(){for(var t,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];(t=d()(p()(n.prototype),"disconnectedCallback",this)).call.apply(t,[this].concat(o)),this.animated&&(this.removeEventListener("animationend",this.animationEndHandler),this.removeEventListener("transitionend",this.animationEndHandler))}}],[{key:"is",get:function(){return"aofl-drawer"}},{key:"properties",get:function(){return{open:{type:Boolean},trigger:{type:String},opening:{type:String},closing:{type:String},"transition-count":{type:Number}}}}]),n}(b.AoflElement);void 0===window.customElements.get(w.is)&&window.customElements.define(w.is,w);var x=w;e.d(n,"Drawer",(function(){return x}))},SksO:function(t,n){function e(n,o){return t.exports=e=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},e(n,o)}t.exports=e},VkAN:function(t,n){t.exports=function(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}},W8MJ:function(t,n){function e(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}},WhZO:function(t,n,e){(t.exports=e("JPst")(!1)).push([t.i,":host{display:none}:host(.closing),:host([open]){display:block}",""])},a1gu:function(t,n,e){var o=e("cDf5"),i=e("PJYZ");t.exports=function(t,n){return!n||"object"!==o(n)&&"function"!=typeof n?i(t):n}},cDf5:function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=o=function(t){return e(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},o(n)}t.exports=o},iWIM:function(t,n,e){var o=e("n3AX");function i(n,e,r){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,n,e){var i=o(t,n);if(i){var r=Object.getOwnPropertyDescriptor(i,n);return r.get?r.get.call(e):r.value}},i(n,e,r||n)}t.exports=i},lwsE:function(t,n){t.exports=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},n3AX:function(t,n,e){var o=e("Nsbk");t.exports=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=o(t)););return t}},ymFR:function(t,n){t.exports=require("@aofl/element")}}); | ||
module.exports=function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s="QfWi")}({"+IV6":function(t,n){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e},AQPL:function(t,n,e){var o=e("+IV6");t.exports=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=o(t)););return t}},Ai0b:function(t,n,e){"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",o=t[3];if(!o)return e;if(n&&"function"==typeof btoa){var i=(s=o,c=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(a," */")),r=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot).concat(t," */")}));return[e].concat(r).concat([i]).join("\n")}var s,c,a;return[e].join("\n")}(n,t);return n[2]?"@media ".concat(n[2],"{").concat(e,"}"):e})).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];null!=r&&(o[r]=!0)}for(var s=0;s<t.length;s++){var c=t[s];null!=c[0]&&o[c[0]]||(e&&!c[2]?c[2]=e:e&&(c[2]="(".concat(c[2],") and (").concat(e,")")),n.push(c))}},n}},K4DB:function(t,n,e){var o=e("e+GP"),i=e("T1e2");t.exports=function(t,n){return!n||"object"!==o(n)&&"function"!=typeof n?i(t):n}},NToG:function(t,n){function e(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}},QfWi:function(t,n,e){"use strict";e.r(n);var o=e("hc4W"),i=e.n(o),r=e("SDJZ"),s=e.n(r),c=e("NToG"),a=e.n(c),u=e("K4DB"),l=e.n(u),f=e("+IV6"),p=e.n(f),h=e("kxHp"),d=e.n(h),y=e("eef+"),g=e.n(y),b=e("ymFR"),m=e("WhZO"),v=e.n(m);function O(){var t=i()(["<slot></slot>"]);return O=function(){return t},t}var x=function(t){function n(){var t;return s()(this,n),(t=l()(this,p()(n).call(this))).open=null,t.transitionEndCount=0,t["transition-count"]=1,t}return g()(n,t),a()(n,[{key:"connectedCallback",value:function(){for(var t,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];(t=d()(p()(n.prototype),"connectedCallback",this)).call.apply(t,[this].concat(o)),this.cancelOpen=null,this.trigger=this.trigger||"animate",this.animated=void 0!==this.opening&&void 0!==this.closing,this.animated&&(this.open?(this.classList.remove(this.opening),this.classList.add(this.closing)):(this.classList.remove(this.closing),this.classList.add(this.opening)),this.addEventListener("animationend",this.animationEndHandler),this.addEventListener("transitionend",this.animationEndHandler))}},{key:"render",value:function(){return d()(p()(n.prototype),"render",this).call(this,(function(t,n){return n(O())}),[v.a])}},{key:"attributeChangedCallback",value:function(t,e,o){d()(p()(n.prototype),"attributeChangedCallback",this).call(this,t,e,o),"open"===t&&(this.animated?this.openChanged(this.open):this.dispatchEvent(new CustomEvent("drawer-toggle",{composed:!0,bubbles:!0})))}},{key:"openChanged",value:function(t){var n=this;!0===t?this.cancelOpen=this.startOpeningAnimation((function(){n.transitionEndCount=0,n.classList.remove(n.closing),n.classList.add(n.opening),n.classList.add(n.trigger)})):(this.classList.contains(this.closing)||this.classList.contains(this.trigger))&&("function"==typeof this.cancelOpen&&(this.cancelOpen(),this.cancelOpen=null),this.classList.remove(this.opening),this.classList.add(this.closing),this.classList.add(this.trigger),this.classList.add("closing"))}},{key:"startOpeningAnimation",value:function(t){var n=this,e=!1,o=100;return function i(){"block"===window.getComputedStyle(n).getPropertyValue("display")?t():!e&&o-- >0&&window.requestAnimationFrame(i)}(),function(){e=!0}}},{key:"animationEndHandler",value:function(t){var n=this;t.target===this&&(this.transitionEndCount+=1,this.transitionEndCount===this["transition-count"]&&(this.transitionEndCount=0,this.classList.remove(this.trigger),this.classList.contains(this.opening)?(this.classList.remove(this.opening),this.classList.add(this.closing),this.cancelOpen=null):(this.classList.add(this.opening),this.classList.remove(this.closing),this.classList.remove("closing")),setTimeout((function(){n.dispatchEvent(new CustomEvent("drawer-toggle",{composed:!0,bubbles:!0}))}))))}},{key:"disconnectedCallback",value:function(){for(var t,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];(t=d()(p()(n.prototype),"disconnectedCallback",this)).call.apply(t,[this].concat(o)),this.animated&&(this.removeEventListener("animationend",this.animationEndHandler),this.removeEventListener("transitionend",this.animationEndHandler))}}],[{key:"is",get:function(){return"aofl-drawer"}},{key:"properties",get:function(){return{open:{type:Boolean},trigger:{type:String},opening:{type:String},closing:{type:String},"transition-count":{type:Number}}}}]),n}(b.AoflElement);void 0===window.customElements.get(x.is)&&window.customElements.define(x.is,x);var w=x;e.d(n,"Drawer",(function(){return w}))},SDJZ:function(t,n){t.exports=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},T1e2:function(t,n){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},WI9V:function(t,n){function e(n,o){return t.exports=e=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},e(n,o)}t.exports=e},WhZO:function(t,n,e){(t.exports=e("Ai0b")(!1)).push([t.i,":host{display:none}:host(.closing),:host([open]){display:block}",""])},"e+GP":function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=o=function(t){return e(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},o(n)}t.exports=o},"eef+":function(t,n,e){var o=e("WI9V");t.exports=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&o(t,n)}},hc4W:function(t,n){t.exports=function(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}},kxHp:function(t,n,e){var o=e("AQPL");function i(n,e,r){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,n,e){var i=o(t,n);if(i){var r=Object.getOwnPropertyDescriptor(i,n);return r.get?r.get.call(e):r.value}},i(n,e,r||n)}t.exports=i},ymFR:function(t,n){t.exports=require("@aofl/element")}}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@aofl/drawer", | ||
"version": "3.0.0-beta.47", | ||
"version": "3.0.0-beta.48", | ||
"description": "The <aofl-drawer> element toggles content between an open and closed state. Opening and closing animations are provided as classes to allow for any possible method of toggling content.", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"prepublishOnly": "npm run build-ci && npm run docs", | ||
"docs": "jsdoc -c .jsdocrc.json ." | ||
"docs": "npx jsdoc -c .jsdocrc.json ." | ||
}, | ||
@@ -38,4 +38,4 @@ "repository": { | ||
"devDependencies": { | ||
"@aofl/cli": "^3.0.0-beta.46", | ||
"@aofl/element": "^3.0.0-beta.47", | ||
"@aofl/cli": "^3.0.0-beta.48", | ||
"@aofl/element": "^3.0.0-beta.48", | ||
"cross-env": "^6.0.3", | ||
@@ -47,3 +47,3 @@ "jsdoc": "^3.6.3", | ||
}, | ||
"gitHead": "11344382e361206a6f67f05f4904149ead37c1ed" | ||
"gitHead": "d77a51a21b591d1ac0032de47395878116e8566a" | ||
} |
Sorry, the diff of this file is not supported yet
30528