From c61674c44f8a14283d3e617e4a03535543ca8d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Gu=CC=88nther?= Date: Mon, 2 Dec 2024 15:56:02 +0100 Subject: [PATCH] FEATURE: Provide events to initialize backend module JS The backend module vanilla JS was only initialized on DOMContentLoaded event. When you replace the markup in the backend module you probably need to reinitialze the vanilla JS components for the menu or drop down for instance. --- .../Resources/Public/JavaScript/Main.min.js | 2 +- .../Public/JavaScript/Main.min.js.map | 2 +- .../Resources/Public/JavaScript/index.js | 135 +++++++++++++----- .../Resources/Public/Styles/Error.css.map | 2 +- .../Resources/Public/Styles/Lite.css.map | 2 +- .../Resources/Public/Styles/Login.css.map | 2 +- .../Resources/Public/Styles/Main.css.map | 2 +- .../Resources/Public/Styles/Minimal.css.map | 2 +- .../Public/Styles/RawContentMode.css.map | 2 +- .../Resources/Public/Styles/Shortcut.css.map | 2 +- .../Resources/Public/Styles/Welcome.css.map | 2 +- 11 files changed, 111 insertions(+), 44 deletions(-) diff --git a/Neos.Neos/Resources/Public/JavaScript/Main.min.js b/Neos.Neos/Resources/Public/JavaScript/Main.min.js index 2735924e3d8..4c2c1ec7847 100644 --- a/Neos.Neos/Resources/Public/JavaScript/Main.min.js +++ b/Neos.Neos/Resources/Public/JavaScript/Main.min.js @@ -1,3 +1,3 @@ /*! For license information please see Main.min.js.LICENSE.txt */ -(()=>{var e={856:function(e){e.exports=function(){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _setPrototypeOf(e,n){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,n){return e.__proto__=n,e},_setPrototypeOf(e,n)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,n,r){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&_setPrototypeOf(i,r.prototype),i},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,n){if(e){if("string"==typeof e)return _arrayLikeToArray(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,n):void 0}}function _arrayLikeToArray(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r1?r-1:0),i=1;i/gm),I=s(/\${[\w\W]*}/gm),F=s(/^data-[\-\w.\u00B7-\uFFFF]/),H=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=s(/^(?:\w+script|data):/i),U=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),z=s(/^html$/i),W=function getGlobal(){return"undefined"==typeof window?null:window},$=function _createTrustedTypesPolicy(e,n){if("object"!==_typeof(e)||"function"!=typeof e.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:function createHTML(e){return e},createScriptURL:function createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function createDOMPurify(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(),n=function DOMPurify(e){return createDOMPurify(e)};if(n.version="2.4.7",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,o=e.document,i=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,d=e.NamedNodeMap,V=void 0===d?e.NamedNodeMap||e.MozNamedAttrMap:d,G=e.HTMLFormElement,K=e.DOMParser,X=e.trustedTypes,Y=c.prototype,J=lookupGetter(Y,"cloneNode"),Q=lookupGetter(Y,"nextSibling"),Z=lookupGetter(Y,"childNodes"),ee=lookupGetter(Y,"parentNode");if("function"==typeof s){var te=o.createElement("template");te.content&&te.content.ownerDocument&&(o=te.content.ownerDocument)}var ne=$(X,r),re=ne?ne.createHTML(""):"",oe=o,ie=oe.implementation,ae=oe.createNodeIterator,se=oe.createDocumentFragment,le=oe.getElementsByTagName,ce=r.importNode,ue={};try{ue=clone(o).documentMode?o.documentMode:{}}catch(e){}var de={};n.isSupported="function"==typeof ee&&ie&&void 0!==ie.createHTMLDocument&&9!==ue;var pe,fe,he=M,ge=R,me=I,ye=F,ve=H,be=B,xe=U,we=q,Se=null,Te=addToSet({},[].concat(_toConsumableArray(T),_toConsumableArray(k),_toConsumableArray(C),_toConsumableArray(A),_toConsumableArray(L))),ke=null,Ce=addToSet({},[].concat(_toConsumableArray(O),_toConsumableArray(P),_toConsumableArray(D),_toConsumableArray(j))),Ee=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,Ne=null,_e=!0,Le=!0,Oe=!1,Pe=!0,De=!1,je=!1,Me=!1,Re=!1,Ie=!1,Fe=!1,He=!1,qe=!0,Be=!1,Ue="user-content-",ze=!0,We=!1,$e={},Ve=null,Ge=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,Xe=addToSet({},["audio","video","img","source","image","track"]),Ye=null,Je=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=null,ot=addToSet({},[Qe,Ze,et],m),it=["application/xhtml+xml","text/html"],at="text/html",st=null,lt=o.createElement("form"),ct=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},ut=function _parseConfig(e){st&&st===e||(e&&"object"===_typeof(e)||(e={}),e=clone(e),pe=pe=-1===it.indexOf(e.PARSER_MEDIA_TYPE)?at:e.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===pe?m:g,Se="ALLOWED_TAGS"in e?addToSet({},e.ALLOWED_TAGS,fe):Te,ke="ALLOWED_ATTR"in e?addToSet({},e.ALLOWED_ATTR,fe):Ce,rt="ALLOWED_NAMESPACES"in e?addToSet({},e.ALLOWED_NAMESPACES,m):ot,Ye="ADD_URI_SAFE_ATTR"in e?addToSet(clone(Je),e.ADD_URI_SAFE_ATTR,fe):Je,Ke="ADD_DATA_URI_TAGS"in e?addToSet(clone(Xe),e.ADD_DATA_URI_TAGS,fe):Xe,Ve="FORBID_CONTENTS"in e?addToSet({},e.FORBID_CONTENTS,fe):Ge,Ae="FORBID_TAGS"in e?addToSet({},e.FORBID_TAGS,fe):{},Ne="FORBID_ATTR"in e?addToSet({},e.FORBID_ATTR,fe):{},$e="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,je=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,He=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,qe=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,ze=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,tt=e.NAMESPACE||et,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Le=!1),Fe&&(Ie=!0),$e&&(Se=addToSet({},_toConsumableArray(L)),ke=[],!0===$e.html&&(addToSet(Se,T),addToSet(ke,O)),!0===$e.svg&&(addToSet(Se,k),addToSet(ke,P),addToSet(ke,j)),!0===$e.svgFilters&&(addToSet(Se,C),addToSet(ke,P),addToSet(ke,j)),!0===$e.mathMl&&(addToSet(Se,A),addToSet(ke,D),addToSet(ke,j))),e.ADD_TAGS&&(Se===Te&&(Se=clone(Se)),addToSet(Se,e.ADD_TAGS,fe)),e.ADD_ATTR&&(ke===Ce&&(ke=clone(ke)),addToSet(ke,e.ADD_ATTR,fe)),e.ADD_URI_SAFE_ATTR&&addToSet(Ye,e.ADD_URI_SAFE_ATTR,fe),e.FORBID_CONTENTS&&(Ve===Ge&&(Ve=clone(Ve)),addToSet(Ve,e.FORBID_CONTENTS,fe)),ze&&(Se["#text"]=!0),je&&addToSet(Se,["html","head","body"]),Se.table&&(addToSet(Se,["tbody"]),delete Ae.tbody),a&&a(e),st=e)},dt=addToSet({},["mi","mo","mn","ms","mtext"]),pt=addToSet({},["foreignobject","desc","title","annotation-xml"]),ft=addToSet({},["title","style","font","a","script"]),ht=addToSet({},k);addToSet(ht,C),addToSet(ht,E);var gt=addToSet({},A);addToSet(gt,N);var mt=function _checkValidNamespace(e){var n=ee(e);n&&n.tagName||(n={namespaceURI:tt,tagName:"template"});var r=g(e.tagName),o=g(n.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===Ze?n.namespaceURI===et?"svg"===r:n.namespaceURI===Qe?"svg"===r&&("annotation-xml"===o||dt[o]):Boolean(ht[r]):e.namespaceURI===Qe?n.namespaceURI===et?"math"===r:n.namespaceURI===Ze?"math"===r&&pt[o]:Boolean(gt[r]):e.namespaceURI===et?!(n.namespaceURI===Ze&&!pt[o])&&!(n.namespaceURI===Qe&&!dt[o])&&!gt[r]&&(ft[r]||!ht[r]):!("application/xhtml+xml"!==pe||!rt[e.namespaceURI]))},yt=function _forceRemove(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(n){try{e.outerHTML=re}catch(n){e.remove()}}},vt=function _removeAttribute(e,r){try{h(n.removed,{attribute:r.getAttributeNode(e),from:r})}catch(e){h(n.removed,{attribute:null,from:r})}if(r.removeAttribute(e),"is"===e&&!ke[e])if(Ie||Fe)try{yt(r)}catch(e){}else try{r.setAttribute(e,"")}catch(e){}},bt=function _initDocument(e){var n,r;if(Re)e=""+e;else{var i=y(e,/^[\r\n\t ]+/);r=i&&i[0]}"application/xhtml+xml"===pe&&tt===et&&(e=''+e+"");var a=ne?ne.createHTML(e):e;if(tt===et)try{n=(new K).parseFromString(a,pe)}catch(e){}if(!n||!n.documentElement){n=ie.createDocument(tt,"template",null);try{n.documentElement.innerHTML=nt?re:a}catch(e){}}var s=n.body||n.documentElement;return e&&r&&s.insertBefore(o.createTextNode(r),s.childNodes[0]||null),tt===et?le.call(n,je?"html":"body")[0]:je?n.documentElement:s},xt=function _createIterator(e){return ae.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},wt=function _isClobbered(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof V)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function _isNode(e){return"object"===_typeof(l)?e instanceof l:e&&"object"===_typeof(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function _executeHook(e,r,o){de[e]&&p(de[e],(function(e){e.call(n,r,o,st)}))},kt=function _sanitizeElements(e){var r;if(Tt("beforeSanitizeElements",e,null),wt(e))return yt(e),!0;if(w(/[\u0080-\uFFFF]/,e.nodeName))return yt(e),!0;var o=fe(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:o,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&(!St(e.content)||!St(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return yt(e),!0;if("select"===o&&w(/