diff options
-rw-r--r-- | js/bootstrap.min.js | 8 | ||||
-rw-r--r-- | lib/buildcss/package.json | 4 | ||||
-rw-r--r-- | lib/buildcss/readme.txt | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js index 04c1558..bf7fac1 100644 --- a/js/bootstrap.min.js +++ b/js/bootstrap.min.js @@ -1,6 +1,12 @@ /*! + * Bootstrap util.js v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Util=t(e.jQuery)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e){var t=this,i=!1;return n.default(this).one(a.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||a.triggerTransitionEnd(t)}),e),this}var a={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var t=n.default(e).css("transition-duration"),i=n.default(e).css("transition-delay"),a=parseFloat(t),r=parseFloat(i);return a||r?(t=t.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(t)+parseFloat(i))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){n.default(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],l=t[i],o=l&&a.isElement(l)?"element":null===(s=l)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+o+'" but expected type "'+r+'".')}var s},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?a.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if("undefined"==typeof n.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=n.default.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};return a.jQueryDetection(),n.default.fn.emulateTransitionEnd=i,n.default.event.special[a.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(n.default(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},a})), +/*! * Bootstrap collapse.js v4.6.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Collapse=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=l(e),a=l(t);function i(e,t){for(var l=0;l<t.length;l++){var n=t[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(this,arguments)}var s="collapse",o="bs.collapse",u=n.default.fn[s],f={toggle:!0,parent:""},c={toggle:"boolean",parent:"(string|element)"},d=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var l=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),n=0,i=l.length;n<i;n++){var r=l[n],s=a.default.getSelectorFromElement(r),o=[].slice.call(document.querySelectorAll(s)).filter((function(t){return t===e}));null!==s&&o.length>0&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t,l,u,d=e.prototype;return d.toggle=function(){n.default(this._element).hasClass("show")?this.hide():this.show()},d.show=function(){var t,l,i=this;if(!this._isTransitioning&&!n.default(this._element).hasClass("show")&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(e){return"string"==typeof i._config.parent?e.getAttribute("data-parent")===i._config.parent:e.classList.contains("collapse")}))).length&&(t=null),!(t&&(l=n.default(t).not(this._selector).data(o))&&l._isTransitioning))){var r=n.default.Event("show.bs.collapse");if(n.default(this._element).trigger(r),!r.isDefaultPrevented()){t&&(e._jQueryInterface.call(n.default(t).not(this._selector),"hide"),l||n.default(t).data(o,null));var s=this._getDimension();n.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&n.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var u="scroll"+(s[0].toUpperCase()+s.slice(1)),f=a.default.getTransitionDurationFromElement(this._element);n.default(this._element).one(a.default.TRANSITION_END,(function(){n.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),n.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(f),this._element.style[s]=this._element[u]+"px"}}},d.hide=function(){var e=this;if(!this._isTransitioning&&n.default(this._element).hasClass("show")){var t=n.default.Event("hide.bs.collapse");if(n.default(this._element).trigger(t),!t.isDefaultPrevented()){var l=this._getDimension();this._element.style[l]=this._element.getBoundingClientRect()[l]+"px",a.default.reflow(this._element),n.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var r=0;r<i;r++){var s=this._triggerArray[r],o=a.default.getSelectorFromElement(s);if(null!==o)n.default([].slice.call(document.querySelectorAll(o))).hasClass("show")||n.default(s).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[l]="";var u=a.default.getTransitionDurationFromElement(this._element);n.default(this._element).one(a.default.TRANSITION_END,(function(){e.setTransitioning(!1),n.default(e._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(u)}}},d.setTransitioning=function(e){this._isTransitioning=e},d.dispose=function(){n.default.removeData(this._element,o),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},d._getConfig=function(e){return(e=r({},f,e)).toggle=Boolean(e.toggle),a.default.typeCheckConfig(s,e,c),e},d._getDimension=function(){return n.default(this._element).hasClass("width")?"width":"height"},d._getParent=function(){var t,l=this;a.default.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(t.querySelectorAll(i));return n.default(r).each((function(t,n){l._addAriaAndCollapsedClass(e._getTargetFromElement(n),[n])})),t},d._addAriaAndCollapsedClass=function(e,t){var l=n.default(e).hasClass("show");t.length&&n.default(t).toggleClass("collapsed",!l).attr("aria-expanded",l)},e._getTargetFromElement=function(e){var t=a.default.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(t){return this.each((function(){var l=n.default(this),a=l.data(o),i=r({},f,l.data(),"object"==typeof t&&t?t:{});if(!a&&i.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(i.toggle=!1),a||(a=new e(this,i),l.data(o,a)),"string"==typeof t){if("undefined"==typeof a[t])throw new TypeError('No method named "'+t+'"');a[t]()}}))},t=e,u=[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return f}}],(l=null)&&i(t.prototype,l),u&&i(t,u),e}();return n.default(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var t=n.default(this),l=a.default.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(l));n.default(i).each((function(){var e=n.default(this),l=e.data(o)?"toggle":t.data();d._jQueryInterface.call(e,l)}))})),n.default.fn[s]=d._jQueryInterface,n.default.fn[s].Constructor=d,n.default.fn[s].noConflict=function(){return n.default.fn[s]=u,d._jQueryInterface},d}));
\ No newline at end of file +function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Collapse=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),a=n(t);function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var o="collapse",s="bs.collapse",u=i.default.fn[o],f={toggle:!0,parent:""},d={toggle:"boolean",parent:"(string|element)"},c=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,r=n.length;i<r;i++){var l=n[i],o=a.default.getSelectorFromElement(l),s=[].slice.call(document.querySelectorAll(o)).filter((function(t){return t===e}));null!==o&&s.length>0&&(this._selector=o,this._triggerArray.push(l))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t,n,u,c=e.prototype;return c.toggle=function(){i.default(this._element).hasClass("show")?this.hide():this.show()},c.show=function(){var t,n,r=this;if(!this._isTransitioning&&!i.default(this._element).hasClass("show")&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(e){return"string"==typeof r._config.parent?e.getAttribute("data-parent")===r._config.parent:e.classList.contains("collapse")}))).length&&(t=null),!(t&&(n=i.default(t).not(this._selector).data(s))&&n._isTransitioning))){var l=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(l),!l.isDefaultPrevented()){t&&(e._jQueryInterface.call(i.default(t).not(this._selector),"hide"),n||i.default(t).data(s,null));var o=this._getDimension();i.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[o]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var u="scroll"+(o[0].toUpperCase()+o.slice(1)),f=a.default.getTransitionDurationFromElement(this._element);i.default(this._element).one(a.default.TRANSITION_END,(function(){i.default(r._element).removeClass("collapsing").addClass("collapse show"),r._element.style[o]="",r.setTransitioning(!1),i.default(r._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(f),this._element.style[o]=this._element[u]+"px"}}},c.hide=function(){var e=this;if(!this._isTransitioning&&i.default(this._element).hasClass("show")){var t=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",a.default.reflow(this._element),i.default(this._element).addClass("collapsing").removeClass("collapse show");var r=this._triggerArray.length;if(r>0)for(var l=0;l<r;l++){var o=this._triggerArray[l],s=a.default.getSelectorFromElement(o);if(null!==s)i.default([].slice.call(document.querySelectorAll(s))).hasClass("show")||i.default(o).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var u=a.default.getTransitionDurationFromElement(this._element);i.default(this._element).one(a.default.TRANSITION_END,(function(){e.setTransitioning(!1),i.default(e._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(u)}}},c.setTransitioning=function(e){this._isTransitioning=e},c.dispose=function(){i.default.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},c._getConfig=function(e){return(e=l({},f,e)).toggle=Boolean(e.toggle),a.default.typeCheckConfig(o,e,d),e},c._getDimension=function(){return i.default(this._element).hasClass("width")?"width":"height"},c._getParent=function(){var t,n=this;a.default.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var r='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',l=[].slice.call(t.querySelectorAll(r));return i.default(l).each((function(t,i){n._addAriaAndCollapsedClass(e._getTargetFromElement(i),[i])})),t},c._addAriaAndCollapsedClass=function(e,t){var n=i.default(e).hasClass("show");t.length&&i.default(t).toggleClass("collapsed",!n).attr("aria-expanded",n)},e._getTargetFromElement=function(e){var t=a.default.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(t){return this.each((function(){var n=i.default(this),a=n.data(s),r=l({},f,n.data(),"object"==typeof t&&t?t:{});if(!a&&r.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(r.toggle=!1),a||(a=new e(this,r),n.data(s,a)),"string"==typeof t){if("undefined"==typeof a[t])throw new TypeError('No method named "'+t+'"');a[t]()}}))},t=e,u=[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return f}}],(n=null)&&r(t.prototype,n),u&&r(t,u),e}();return i.default(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var t=i.default(this),n=a.default.getSelectorFromElement(this),r=[].slice.call(document.querySelectorAll(n));i.default(r).each((function(){var e=i.default(this),n=e.data(s)?"toggle":t.data();c._jQueryInterface.call(e,n)}))})),i.default.fn[o]=c._jQueryInterface,i.default.fn[o].Constructor=c,i.default.fn[o].noConflict=function(){return i.default.fn[o]=u,c._jQueryInterface},c}));
\ No newline at end of file diff --git a/lib/buildcss/package.json b/lib/buildcss/package.json index ea498b0..79fa81e 100644 --- a/lib/buildcss/package.json +++ b/lib/buildcss/package.json @@ -22,8 +22,8 @@ "scripts": { "start": "npm-run-all --parallel watch docs-serve", "bundlewatch": "bundlewatch --config .bundlewatch.config.json", - "mga": "npm-run-all --parallel css js mga-*", - "mga-js": "terser js/dist/collapse.js --compress typeofs=false --mangle --output mga/bootstrap.min.js", + "mga": "npm-run-all css js mga-*", + "mga-js": "terser js/dist/util.js js/dist/collapse.js --compress typeofs=false --mangle --output mga/bootstrap.min.js", "mga-css": "cleancss -O1 --format breakWith=lf --output mga/bootstrap.min.css dist/css/mga-bootstrap.css", "css": "npm-run-all css-compile css-prefix css-minify", "css-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist/css/", diff --git a/lib/buildcss/readme.txt b/lib/buildcss/readme.txt index dd3466a..fab5366 100644 --- a/lib/buildcss/readme.txt +++ b/lib/buildcss/readme.txt @@ -18,8 +18,8 @@ npm install add mga-bootstrap.scss in scss/ Add on package.json: - "mga": "npm-run-all --parallel css js mga-*", - "mga-js": "terser js/dist/collapse.js --compress typeofs=false --mangle --output mga/bootstrap.min.js", + "mga": "npm-run-all css js mga-*", + "mga-js": "terser js/dist/util.js js/dist/collapse.js --compress typeofs=false --mangle --output mga/bootstrap.min.js", "mga-css": "cleancss -O1 --format breakWith=lf --output mga/bootstrap.min.css dist/css/mga-bootstrap.css", run everything: |