CoreFiles by mySites.guru
joomla-editor-none-es5.min.js1 lines, 4,944 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
9445e6a7538c88d12fb4b06d3463ca66
sha1
06c4175ff2a84eeefe341a9f53feb8f6a7b6705f
sha256
8bc75b0c077aec9c560eba6ca84a6ba467fe14b4e1a333f47e2006feff9bbfb0
"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 _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 _possibleConstructorReturn(a,b){return b&&("object"===_typeof(b)||"function"==typeof b)?b:_assertThisInitialized(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 _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}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)}window.customElements.define("joomla-editor-none",function(a){function b(){var a;return _classCallCheck(this,b),a=_possibleConstructorReturn(this,_getPrototypeOf(b).call(this)),a.editor="",a.unregisterEditor=a.unregisterEditor.bind(_assertThisInitialized(_assertThisInitialized(a))),a.registerEditor=a.registerEditor.bind(_assertThisInitialized(_assertThisInitialized(a))),a.childrenChange=a.childrenChange.bind(_assertThisInitialized(_assertThisInitialized(a))),a.getSelection=a.getSelection.bind(_assertThisInitialized(_assertThisInitialized(a))),new MutationObserver(function(){return a.childrenChange()}).observe(_assertThisInitialized(_assertThisInitialized(a)),{childList:!0}),a}return _inherits(b,a),_createClass(b,[{key:"connectedCallback",value:function a(){this.childrenChange()}},{key:"disconnectedCallback",value:function a(){this.unregisterEditor()}},{key:"getSelection",value:function a(){return document.selection?(this.editor.focus(),document.selection.createRange()):this.editor.selectionStart||0===this.editor.selectionStart?this.editor.value.substring(this.editor.selectionStart,this.editor.selectionEnd):this.editor.value}},{key:"registerEditor",value:function b(){var a=this;if(!window.Joomla||!window.Joomla.editors||"object"!==_typeof(window.Joomla.editors))throw new Error("The Joomla API is not correctly registered.");window.Joomla.editors.instances[this.editor.id]={id:function b(){return a.editor.id},element:function b(){return a.editor},getValue:function b(){return a.editor.value},setValue:function c(b){return a.editor.value=b},getSelection:function b(){return a.getSelection()},replaceSelection:function c(b){a.editor.selectionStart||0===a.editor.selectionStart?a.editor.value=a.editor.value.substring(0,a.editor.selectionStart)+b+a.editor.value.substring(a.editor.selectionEnd,a.editor.value.length):a.editor.value+=b},onSave:function a(){}}}},{key:"unregisterEditor",value:function a(){this.editor&&delete window.Joomla.editors.instances[this.editor.id]}},{key:"childrenChange",value:function a(){this.firstElementChild&&this.firstElementChild.tagName&&"textarea"===this.firstElementChild.tagName.toLowerCase()&&this.firstElementChild.getAttribute("id")&&(this.editor=this.firstElementChild,this.unregisterEditor(),this.registerEditor())}}]),b}(_wrapNativeSuper(HTMLElement)));

No other release has this exact content. See every version of this file.