- md5
- b2822d609a4d3efbf03ff47db10982da
- sha1
- 85560b279695df823bba195cd955bee2d1470657
- sha256
- b95af4952799c732a66b9adc32ae475841a0538d71a8417d0fbf08e0829870a7
"use strict";function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){return b&&("object"===_typeof(b)||"function"==typeof b)?b:_assertThisInitialized(a)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&_setPrototypeOf(a,b)}function _wrapNativeSuper(a){var b="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(a){function c(){return _construct(a,arguments,_getPrototypeOf(this).constructor)}if(null===a||!_isNativeFunction(a))return a;if("function"!=typeof a)throw new TypeError("Super expression must either be null or a function");if("undefined"!=typeof b){if(b.has(a))return b.get(a);b.set(a,c)}return c.prototype=Object.create(a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(c,a)},_wrapNativeSuper(a)}function isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}function _construct(){return _construct=isNativeReflectConstruct()?Reflect.construct:function(b,c,d){var e=[null];e.push.apply(e,c);var a=Function.bind.apply(b,e),f=new a;return d&&_setPrototypeOf(f,d.prototype),f},_construct.apply(null,arguments)}function _isNativeFunction(a){return-1!==Function.toString.call(a).indexOf("[native code]")}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(a)}(function(a){"use strict";var b=function(a){function b(){var a;return _classCallCheck(this,b),a=_possibleConstructorReturn(this,_getPrototypeOf(b).call(this)),a.buttonElement=a.querySelector("button, a"),a.disabled=!1,a.listSelection&&a.setDisabled(!0),a.addEventListener("click",function(b){return a.executeTask(b)}),a}return _inherits(b,a),_createClass(b,[{key:"task",get:function a(){return this.getAttribute("task")}},{key:"listSelection",get:function a(){return this.hasAttribute("list-selection")}},{key:"form",get:function a(){return this.getAttribute("form")}},{key:"formValidation",get:function a(){return this.hasAttribute("form-validation")}},{key:"confirmMessage",get:function a(){return this.getAttribute("confirm-message")}}]),_createClass(b,[{key:"connectedCallback",value:function c(){var a=this,b=this.form||"adminForm";if(this.formElement=document.getElementById(b),this.listSelection){if(!this.formElement)throw new Error("The form \"".concat(b,"\" is required to perform the task, but the form not found on the page."));this.formElement.boxchecked.addEventListener("change",function(b){a.setDisabled(1>b.target.value)})}}},{key:"setDisabled",value:function b(a){this.disabled=!!a,this.disabled?this.setAttribute("disabled",!0):this.removeAttribute("disabled"),this.buttonElement&&(this.disabled?"BUTTON"===this.buttonElement.nodeName?this.buttonElement.setAttribute("disabled",!0):this.buttonElement.classList.add("disabled"):"BUTTON"===this.buttonElement.nodeName?this.buttonElement.removeAttribute("disabled"):this.buttonElement.classList.remove("disabled"))}},{key:"executeTask",value:function a(){return!this.disabled&&(!this.confirmMessage||confirm(this.confirmMessage))&&(this.task&&Joomla.submitbutton(this.task,this.form,this.formValidation),!0)}}]),b}(_wrapNativeSuper(HTMLElement));a.define("joomla-toolbar-button",b)})(customElements);
No other release has this exact content. See every version of this file.