CoreFiles by mySites.guru
joomla-field-user-es5.min.js4 lines, 4,612 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
3bb651a88fddbe0e79c925ad7f551c4e
sha1
4db92f4cff25e34fa232c2626ba1a6ecfa5a7f56
sha256
5e101469a3e62b8a73f555ffa752da4465fecdd41176f8bbeb5e2fd63677e669
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
'use strict';var _createClass=function(){function a(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)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function _inherits(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}(function(a){var b=function(a){function b(){return _classCallCheck(this,b),_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return _inherits(b,a),_createClass(b,[{key:'connectedCallback',value:function connectedCallback(){if(this.modal=this.querySelector(this.modalClass),this.modalBody=this.querySelector('.modal-body'),this.input=this.querySelector(this.inputId),this.inputName=this.querySelector(this.inputNameClass),this.buttonSelect=this.querySelector(this.buttonSelectClass),this.modalClose=this.modalClose.bind(this),this.setValue=this.setValue.bind(this),this.buttonSelect){this.buttonSelect.addEventListener('click',this.modalOpen.bind(this)),this.modal.addEventListener('hide',this.removeIframe.bind(this));var a=this.input.getAttribute('data-onchange'),b=void 0;a&&(b=new Function(a),this.input.addEventListener('change',b.bind(this.input)))}}},{key:'disconnectedCallback',value:function disconnectedCallback(){this.buttonSelect.removeEventListener('click',this),this.modal.removeEventListener('hide',this)}},{key:'modalOpen',value:function modalOpen(){var a=this;this.removeIframe();var b=document.createElement('iframe');b.setAttribute('name','field-user-modal'),b.src=this.url.replace('{field-user-id}',this.input.getAttribute('id')),b.setAttribute('width',this.modalWidth),b.setAttribute('height',this.modalHeight),this.modalBody.appendChild(b),this.modal.open();var c=this.modalBody.querySelector('iframe');c.addEventListener('load',function(){var b=c.contentWindow.document,d=[].slice.call(b.querySelectorAll('.button-select'));d.forEach(function(b){b.addEventListener('click',function(b){a.setValue(b.target.getAttribute('data-user-value'),b.target.getAttribute('data-user-name')),a.modalClose()})})})}},{key:'modalClose',value:function modalClose(){Joomla.Modal.getCurrent().close(),this.modalBody.innerHTML=''}},{key:'removeIframe',value:function removeIframe(){this.modalBody.innerHTML=''}},{key:'setValue',value:function setValue(a,b){this.input.setAttribute('value',a),this.inputName.setAttribute('value',b||a)}},{key:'url',get:function get(){return this.getAttribute('url')},set:function set(a){this.setAttribute('url',a)}},{key:'modalClass',get:function get(){return this.getAttribute('modal')},set:function set(a){this.setAttribute('modal',a)}},{key:'modalWidth',get:function get(){return this.getAttribute('modal-width')},set:function set(a){this.setAttribute('modal-width',a)}},{key:'modalHeight',get:function get(){return this.getAttribute('modal-height')},set:function set(a){this.setAttribute('modal-height',a)}},{key:'inputId',get:function get(){return this.getAttribute('input')},set:function set(a){this.setAttribute('input',a)}},{key:'inputNameClass',get:function get(){return this.getAttribute('input-name')},set:function set(a){this.setAttribute('input-name',a)}},{key:'buttonSelectClass',get:function get(){return this.getAttribute('button-select')},set:function set(a){this.setAttribute('button-select',a)}}],[{key:'observedAttributes',get:function get(){return['url','modal-class','modal-width','modal-height','input','input-name','button-select']}}]),b}(HTMLElement);a.define('joomla-field-user',b)})(customElements);

},{}]},{},[1]);

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