- md5
- fad9808b41bc9cc2b711ce22726432f4
- sha1
- dcbd8896dca1c0003bef4f0e3b646fd5fbbc4257
- sha256
- 4551338f83c0f0a6699626920b6fd70626b54577b9944a1cbf5457f1e759c397
!function(){return function t(e,i,n){function r(u,s){if(!i[u]){if(!e[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[u]={exports:{}};e[u][0].call(c.exports,function(t){return r(e[u][1][t]||t)},c,c.exports,t,e,i,n)}return i[u].exports}for(var o="function"==typeof require&&require,u=0;u<n.length;u++)r(n[u]);return r}}()({1:[function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var e=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,HTMLElement),n(e,[{key:"connectedCallback",value:function(){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 t=this.input.getAttribute("data-onchange"),e=void 0;t&&(e=new Function(t),this.input.addEventListener("change",e.bind(this.input)))}}},{key:"disconnectedCallback",value:function(){this.buttonSelect.removeEventListener("click",this),this.modal.removeEventListener("hide",this)}},{key:"modalOpen",value:function(){var t=this;this.removeIframe();var e=document.createElement("iframe");e.setAttribute("name","field-user-modal"),e.src=this.url.replace("{field-user-id}",this.input.getAttribute("id")),e.setAttribute("width",this.modalWidth),e.setAttribute("height",this.modalHeight),this.modalBody.appendChild(e),window.jQuery(this.modal).modal("show");var i=this.modalBody.querySelector("iframe");i.addEventListener("load",function(){var e=i.contentWindow.document;[].slice.call(e.querySelectorAll(".button-select")).forEach(function(e){e.addEventListener("click",function(e){t.setValue(e.target.getAttribute("data-user-value"),e.target.getAttribute("data-user-name")),t.modalClose()})})})}},{key:"modalClose",value:function(){window.jQuery(this.modal).modal("hide"),this.modalBody.innerHTML=""}},{key:"removeIframe",value:function(){this.modalBody.innerHTML=""}},{key:"setValue",value:function(t,e){this.input.setAttribute("value",t),this.inputName.setAttribute("value",e||t)}},{key:"url",get:function(){return this.getAttribute("url")},set:function(t){this.setAttribute("url",t)}},{key:"modalClass",get:function(){return this.getAttribute("modal")},set:function(t){this.setAttribute("modal",t)}},{key:"modalWidth",get:function(){return this.getAttribute("modal-width")},set:function(t){this.setAttribute("modal-width",t)}},{key:"modalHeight",get:function(){return this.getAttribute("modal-height")},set:function(t){this.setAttribute("modal-height",t)}},{key:"inputId",get:function(){return this.getAttribute("input")},set:function(t){this.setAttribute("input",t)}},{key:"inputNameClass",get:function(){return this.getAttribute("input-name")},set:function(t){this.setAttribute("input-name",t)}},{key:"buttonSelectClass",get:function(){return this.getAttribute("button-select")},set:function(t){this.setAttribute("button-select",t)}}],[{key:"observedAttributes",get:function(){return["url","modal-class","modal-width","modal-height","input","input-name","button-select"]}}]),e}();t.define("joomla-field-user",e)}(customElements)},{}]},{},[1]);
No other release has this exact content. See every version of this file.