- md5
- 17aa5d3c245275b826f6884ba86cf47f
- sha1
- 0255ebe4640a15003c1ab29e0396952051fbb613
- sha256
- 08fbe0309fb7b647599881a9215e72058364636ab5de5bb6ff038afaddeed219
!function t(e,i,n){function o(u,s){if(!i[u]){if(!e[u]){var l="function"==typeof require&&require;if(!s&&l)return l(u,!0);if(r)return r(u,!0);var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}var c=i[u]={exports:{}};e[u][0].call(c.exports,function(t){var i=e[u][1][t];return o(i||t)},c,c.exports,t,e,i,n)}return i[u].exports}for(var r="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(t,e,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var i,n=0;n<e.length;n++)(i=e[n]).enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),r=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"!=(void 0===e?"undefined":n(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 "+(void 0===e?"undefined":n(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),o(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,e=this.input.getAttribute("data-onchange");e&&(t=new Function(e),this.input.addEventListener("change",t.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}();customElements.define("joomla-field-user",r)},{}]},{},[1]);
No other release has this exact content. See every version of this file.