Commit 8cbd504f authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Christian Kuhn
Browse files

[TASK] Drop unneeded renderElement from lit-helper

renderElement() was added in patchset 2 of #93446.
The code was then refactored to use renderHTML, but the method was
forgotten to be removed in the final patchset.

Now, the intention of the mentioned patchset 2 was to render nodes
directly to the DOM in PageTreeDragHandler, instead of rendering to
a temporary element, just to export and re-import as HTML string
with jQuery/innerHTML.

Therefore PageTreeDragHandler is now refactored to a new,
(internal) method renderNodes() which allows the returned
nodes to be directly attached to the document.

Also, while at it, all other lit-helper methods are marked as
internal as well, as they are still subject to change:
 * `renderHTML()` is only needed when mixing traditional jQuery
   rendering and lit-html (same as for the new `renderNodes()`.)
 * The `icon()` method could likely be replaced by a custom
   <typo3-backend-icon> component
 * `lll()` is only of use for globally available language identifiers
   (which are added via inline JS)  So this is also likely to change
   when more backend modules start to use lit-html/LitElement.

Resolves: #93464
Related: #93446
Releases: master
Change-Id: I61ab778e28e32b75b6e7965b75259beedbb10ae3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67663


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent f4f7bdda
......@@ -14,7 +14,7 @@
/** @ts-ignore */
import $ from 'jquery';
import {html, TemplateResult} from 'lit-element';
import {renderHTML} from 'TYPO3/CMS/Core/lit-helper';
import {renderNodes} from 'TYPO3/CMS/Core/lit-helper';
import {D3DragEvent} from 'd3-drag';
import Modal = require('../Modal');
import Severity = require('../Severity');
......@@ -97,7 +97,7 @@ export class ToolbarDragHandler implements DragDropHandler {
if (this.isDragged === false) {
this.isDragged = true;
let $svg = $(this.tree.svg.node());
$svg.after(renderHTML(DraggableTemplate.get('#icon-' + this.icon, this.name)));
$svg.after($(renderNodes(DraggableTemplate.get('#icon-' + this.icon, this.name))));
$svg.find('.nodes-wrapper').addClass('nodes-wrapper--dragging');
}
......@@ -245,7 +245,7 @@ export class PageTreeNodeDragHandler implements DragDropHandler {
this.tree.settings.dragging = true;
this.isDragged = true;
$svg.after(renderHTML(DraggableTemplate.get(this.tree.getIconId(node), node.name)));
$svg.after($(renderNodes(DraggableTemplate.get(this.tree.getIconId(node), node.name))));
$nodeBg.addClass('node-bg--dragging');
$svg.find('.nodes-wrapper').addClass('nodes-wrapper--dragging');
}
......
......@@ -19,14 +19,27 @@ import Icons = require('TYPO3/CMS/Backend/Icons');
import 'TYPO3/CMS/Backend/Element/SpinnerElement';
export const renderElement = (result: TemplateResult): HTMLElement => {
/**
* @internal
*/
export const renderNodes = (result: TemplateResult): NodeList => {
const anvil = document.createElement('div');
render(result, anvil);
return anvil;
}
export const renderHTML = (result: TemplateResult): string => {
return renderElement(result).innerHTML;
return anvil.childNodes;
};
/**
* @internal
*/
export const renderHTML = (result: TemplateResult): string => {
const anvil = document.createElement('div');
render(result, anvil);
return anvil.innerHTML;
}
/**
* @internal
*/
export const lll = (key: string): string => {
if (!window.TYPO3 || !window.TYPO3.lang || typeof window.TYPO3.lang[key] !== 'string') {
return '';
......@@ -34,11 +47,11 @@ export const lll = (key: string): string => {
return window.TYPO3.lang[key];
};
/**
* @internal
*/
export const icon = (identifier: string, size: any = 'small') => {
// @todo Fetched and resolved icons should be stored in a session repository in `Icons`
const icon = Icons.getIcon(identifier, size).then((markup: string) => html`${unsafeHTML(markup)}`);
return html`${until(icon, html`<typo3-backend-spinner size="${size}"></typo3-backend-spinner>`)}`;
};
......@@ -20,4 +20,4 @@ var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModu
</span>
<span class="node-dd__name">${t}</span>
</div>
</div>`}}t.ToolbarDragHandler=class{constructor(e,t,s){this.startDrag=!1,this.startPageX=0,this.startPageY=0,this.id="",this.name="",this.tooltip="",this.icon="",this.isDragged=!1,this.id=e.nodeType,this.name=e.title,this.tooltip=e.tooltip,this.icon=e.icon,this.tree=t,this.dragDrop=s}dragStart(e){return this.isDragged=!1,this.startDrag=!1,this.startPageX=e.sourceEvent.pageX,this.startPageY=e.sourceEvent.pageY,!0}dragDragged(e){if(!this.dragDrop.isDragNodeDistanceMore(e,this))return!1;if(this.startDrag=!0,!1===this.isDragged){this.isDragged=!0;let e=s.default(this.tree.svg.node());e.after(r.renderHTML(i.get("#icon-"+this.icon,this.name))),e.find(".nodes-wrapper").addClass("nodes-wrapper--dragging")}let t=18,n=15;return e.sourceEvent&&e.sourceEvent.pageX&&(t+=e.sourceEvent.pageX),e.sourceEvent&&e.sourceEvent.pageY&&(n+=e.sourceEvent.pageY),this.dragDrop.openNodeTimeout(),s.default(document).find(".node-dd").css({left:t,top:n,display:"block"}),this.dragDrop.changeNodeClasses(e),!0}dragEnd(e){if(!this.startDrag)return!1;let t=s.default(this.tree.svg.node()),n=t.find(".nodes-bg"),r=t.find(".nodes-wrapper");return this.isDragged=!1,this.dragDrop.addNodeDdClass(r,null,"",!0),n.find(".node-bg.node-bg--dragging").removeClass("node-bg--dragging"),t.siblings(".node-dd").remove(),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),!(!0!==this.tree.settings.isDragAnDrop||!this.tree.settings.nodeOver.node||!this.tree.isOverSvg)&&(this.tree.settings.canNodeDrag&&this.tree.addNewNode({type:this.id,name:this.name,tooltip:this.tooltip,icon:this.icon,position:this.tree.settings.nodeDragPosition,target:this.tree.settings.nodeOver.node}),!0)}};t.PageTreeNodeDragHandler=class{constructor(e,t){this.startDrag=!1,this.startPageX=0,this.startPageY=0,this.isDragged=!1,this.tree=e,this.dragDrop=t}dragStart(e){let t=e.subject;return!0===this.tree.settings.isDragAnDrop&&0!==t.depth&&(this.dropZoneDelete=null,t.allowDelete&&(this.dropZoneDelete=this.tree.nodesContainer.select('.node[data-state-id="'+t.stateIdentifier+'"]').append("g").attr("class","nodes-drop-zone").attr("height",this.tree.settings.nodeHeight),this.tree.nodeIsOverDelete=!1,this.dropZoneDelete.append("rect").attr("height",this.tree.settings.nodeHeight).attr("width","50px").attr("x",0).attr("y",0).on("mouseover",()=>{this.tree.nodeIsOverDelete=!0}).on("mouseout",()=>{this.tree.nodeIsOverDelete=!1}),this.dropZoneDelete.append("text").text(TYPO3.lang.deleteItem).attr("dx",5).attr("dy",15),this.dropZoneDelete.node().dataset.open="false",this.dropZoneDelete.node().style.transform=this.getDropZoneCloseTransform(t)),this.startPageX=e.sourceEvent.pageX,this.startPageY=e.sourceEvent.pageY,this.startDrag=!1,!0)}dragDragged(e){let t=e.subject;if(!this.dragDrop.isDragNodeDistanceMore(e,this))return!1;if(this.startDrag=!0,!0!==this.tree.settings.isDragAnDrop||0===t.depth)return!1;this.tree.settings.nodeDrag=t;let n=s.default(e.sourceEvent.target).closest("svg"),a=n.find(".nodes-bg"),o=n.find(".nodes-wrapper"),d=a.find(".node-bg[data-state-id="+t.stateIdentifier+"]"),g=n.siblings(".node-dd");d.length&&!this.isDragged&&(this.tree.settings.dragging=!0,this.isDragged=!0,n.after(r.renderHTML(i.get(this.tree.getIconId(t),t.name))),d.addClass("node-bg--dragging"),n.find(".nodes-wrapper").addClass("nodes-wrapper--dragging"));let l=18,h=15;return e.sourceEvent&&e.sourceEvent.pageX&&(l+=e.sourceEvent.pageX),e.sourceEvent&&e.sourceEvent.pageY&&(h+=e.sourceEvent.pageY),this.tree.settings.nodeDragPosition=!1,this.dragDrop.openNodeTimeout(),s.default(document).find(".node-dd").css({left:l,top:h,display:"block"}),t.isOver||this.tree.settings.nodeOver.node&&-1!==this.tree.settings.nodeOver.node.parentsStateIdentifier.indexOf(t.stateIdentifier)||!this.tree.isOverSvg?(this.dragDrop.addNodeDdClass(o,g,"nodrop"),this.tree.isOverSvg||this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),this.dropZoneDelete&&"true"!==this.dropZoneDelete.node().dataset.open&&this.tree.isOverSvg&&this.animateDropZone("show",this.dropZoneDelete.node(),t)):this.tree.settings.nodeOver.node?(this.dropZoneDelete&&"false"!==this.dropZoneDelete.node().dataset.open&&this.animateDropZone("hide",this.dropZoneDelete.node(),t),this.dragDrop.changeNodeClasses(e)):(this.dragDrop.addNodeDdClass(o,g,"nodrop"),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none")),!0}dragEnd(e){let t=e.subject;if(this.dropZoneDelete&&"true"===this.dropZoneDelete.node().dataset.open){let e=this.dropZoneDelete;this.animateDropZone("hide",this.dropZoneDelete.node(),t,()=>{e.remove(),this.dropZoneDelete=null})}else this.dropZoneDelete=null;if(!this.startDrag||!0!==this.tree.settings.isDragAnDrop||0===t.depth)return!1;let n=s.default(e.sourceEvent.target).closest("svg"),r=n.find(".nodes-bg"),i=this.tree.settings.nodeOver.node;if(this.isDragged=!1,this.dragDrop.addNodeDdClass(n.find(".nodes-wrapper"),null,"",!0),r.find(".node-bg.node-bg--dragging").removeClass("node-bg--dragging"),n.siblings(".node-dd").remove(),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),t.isOver||this.tree.settings.nodeOver.node&&-1!==this.tree.settings.nodeOver.node.parentsStateIdentifier.indexOf(t.stateIdentifier)||!this.tree.settings.canNodeDrag||!this.tree.isOverSvg){if(this.tree.nodeIsOverDelete){let e=this.dragDrop.changeNodePosition(i,"delete");if(this.tree.settings.displayDeleteConfirmation){a.confirm(TYPO3.lang.deleteItem,TYPO3.lang["mess.delete"].replace("%s",e.node.name),o.warning,[{text:s.default(this).data("button-close-text")||TYPO3.lang["labels.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["cm.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",t=>{"delete"===t.target.name&&this.tree.sendChangeCommand(e),a.dismiss()})}else this.tree.sendChangeCommand(e)}}else{let e=this.dragDrop.changeNodePosition(i,""),t="in"===e.position?TYPO3.lang["mess.move_into"]:TYPO3.lang["mess.move_after"];t=t.replace("%s",e.node.name).replace("%s",e.target.name),a.confirm(TYPO3.lang.move_page,t,o.warning,[{text:s.default(this).data("button-close-text")||TYPO3.lang["labels.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["cm.copy"]||"Copy",btnClass:"btn-warning",name:"copy"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["labels.move"]||"Move",btnClass:"btn-warning",name:"move"}]).on("button.clicked",t=>{const s=t.target;"move"===s.name?(e.command="move",this.tree.sendChangeCommand(e)):"copy"===s.name&&(e.command="copy",this.tree.sendChangeCommand(e)),a.dismiss()})}return!0}getDropZoneOpenTransform(e){return"translate("+((parseFloat(this.tree.svg.style("width"))||300)-58-e.x)+"px, -10px)"}getDropZoneCloseTransform(e){return"translate("+((parseFloat(this.tree.svg.style("width"))||300)-e.x)+"px, -10px)"}animateDropZone(e,t,s,n=null){t.classList.add("animating"),t.dataset.open="show"===e?"true":"false";let r=[{transform:this.getDropZoneCloseTransform(s)},{transform:this.getDropZoneOpenTransform(s)}];"show"!==e&&(r=r.reverse());const a=function(){t.style.transform=r[1].transform,t.classList.remove("animating"),n&&n()};"animate"in t?t.animate(r,{duration:300,easing:"cubic-bezier(.02, .01, .47, 1)"}).onfinish=a:a()}}}));
\ No newline at end of file
</div>`}}t.ToolbarDragHandler=class{constructor(e,t,s){this.startDrag=!1,this.startPageX=0,this.startPageY=0,this.id="",this.name="",this.tooltip="",this.icon="",this.isDragged=!1,this.id=e.nodeType,this.name=e.title,this.tooltip=e.tooltip,this.icon=e.icon,this.tree=t,this.dragDrop=s}dragStart(e){return this.isDragged=!1,this.startDrag=!1,this.startPageX=e.sourceEvent.pageX,this.startPageY=e.sourceEvent.pageY,!0}dragDragged(e){if(!this.dragDrop.isDragNodeDistanceMore(e,this))return!1;if(this.startDrag=!0,!1===this.isDragged){this.isDragged=!0;let e=s.default(this.tree.svg.node());e.after(s.default(r.renderNodes(i.get("#icon-"+this.icon,this.name)))),e.find(".nodes-wrapper").addClass("nodes-wrapper--dragging")}let t=18,n=15;return e.sourceEvent&&e.sourceEvent.pageX&&(t+=e.sourceEvent.pageX),e.sourceEvent&&e.sourceEvent.pageY&&(n+=e.sourceEvent.pageY),this.dragDrop.openNodeTimeout(),s.default(document).find(".node-dd").css({left:t,top:n,display:"block"}),this.dragDrop.changeNodeClasses(e),!0}dragEnd(e){if(!this.startDrag)return!1;let t=s.default(this.tree.svg.node()),n=t.find(".nodes-bg"),r=t.find(".nodes-wrapper");return this.isDragged=!1,this.dragDrop.addNodeDdClass(r,null,"",!0),n.find(".node-bg.node-bg--dragging").removeClass("node-bg--dragging"),t.siblings(".node-dd").remove(),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),!(!0!==this.tree.settings.isDragAnDrop||!this.tree.settings.nodeOver.node||!this.tree.isOverSvg)&&(this.tree.settings.canNodeDrag&&this.tree.addNewNode({type:this.id,name:this.name,tooltip:this.tooltip,icon:this.icon,position:this.tree.settings.nodeDragPosition,target:this.tree.settings.nodeOver.node}),!0)}};t.PageTreeNodeDragHandler=class{constructor(e,t){this.startDrag=!1,this.startPageX=0,this.startPageY=0,this.isDragged=!1,this.tree=e,this.dragDrop=t}dragStart(e){let t=e.subject;return!0===this.tree.settings.isDragAnDrop&&0!==t.depth&&(this.dropZoneDelete=null,t.allowDelete&&(this.dropZoneDelete=this.tree.nodesContainer.select('.node[data-state-id="'+t.stateIdentifier+'"]').append("g").attr("class","nodes-drop-zone").attr("height",this.tree.settings.nodeHeight),this.tree.nodeIsOverDelete=!1,this.dropZoneDelete.append("rect").attr("height",this.tree.settings.nodeHeight).attr("width","50px").attr("x",0).attr("y",0).on("mouseover",()=>{this.tree.nodeIsOverDelete=!0}).on("mouseout",()=>{this.tree.nodeIsOverDelete=!1}),this.dropZoneDelete.append("text").text(TYPO3.lang.deleteItem).attr("dx",5).attr("dy",15),this.dropZoneDelete.node().dataset.open="false",this.dropZoneDelete.node().style.transform=this.getDropZoneCloseTransform(t)),this.startPageX=e.sourceEvent.pageX,this.startPageY=e.sourceEvent.pageY,this.startDrag=!1,!0)}dragDragged(e){let t=e.subject;if(!this.dragDrop.isDragNodeDistanceMore(e,this))return!1;if(this.startDrag=!0,!0!==this.tree.settings.isDragAnDrop||0===t.depth)return!1;this.tree.settings.nodeDrag=t;let n=s.default(e.sourceEvent.target).closest("svg"),a=n.find(".nodes-bg"),o=n.find(".nodes-wrapper"),d=a.find(".node-bg[data-state-id="+t.stateIdentifier+"]"),g=n.siblings(".node-dd");d.length&&!this.isDragged&&(this.tree.settings.dragging=!0,this.isDragged=!0,n.after(s.default(r.renderNodes(i.get(this.tree.getIconId(t),t.name)))),d.addClass("node-bg--dragging"),n.find(".nodes-wrapper").addClass("nodes-wrapper--dragging"));let l=18,h=15;return e.sourceEvent&&e.sourceEvent.pageX&&(l+=e.sourceEvent.pageX),e.sourceEvent&&e.sourceEvent.pageY&&(h+=e.sourceEvent.pageY),this.tree.settings.nodeDragPosition=!1,this.dragDrop.openNodeTimeout(),s.default(document).find(".node-dd").css({left:l,top:h,display:"block"}),t.isOver||this.tree.settings.nodeOver.node&&-1!==this.tree.settings.nodeOver.node.parentsStateIdentifier.indexOf(t.stateIdentifier)||!this.tree.isOverSvg?(this.dragDrop.addNodeDdClass(o,g,"nodrop"),this.tree.isOverSvg||this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),this.dropZoneDelete&&"true"!==this.dropZoneDelete.node().dataset.open&&this.tree.isOverSvg&&this.animateDropZone("show",this.dropZoneDelete.node(),t)):this.tree.settings.nodeOver.node?(this.dropZoneDelete&&"false"!==this.dropZoneDelete.node().dataset.open&&this.animateDropZone("hide",this.dropZoneDelete.node(),t),this.dragDrop.changeNodeClasses(e)):(this.dragDrop.addNodeDdClass(o,g,"nodrop"),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none")),!0}dragEnd(e){let t=e.subject;if(this.dropZoneDelete&&"true"===this.dropZoneDelete.node().dataset.open){let e=this.dropZoneDelete;this.animateDropZone("hide",this.dropZoneDelete.node(),t,()=>{e.remove(),this.dropZoneDelete=null})}else this.dropZoneDelete=null;if(!this.startDrag||!0!==this.tree.settings.isDragAnDrop||0===t.depth)return!1;let n=s.default(e.sourceEvent.target).closest("svg"),r=n.find(".nodes-bg"),i=this.tree.settings.nodeOver.node;if(this.isDragged=!1,this.dragDrop.addNodeDdClass(n.find(".nodes-wrapper"),null,"",!0),r.find(".node-bg.node-bg--dragging").removeClass("node-bg--dragging"),n.siblings(".node-dd").remove(),this.tree.nodesBgContainer.selectAll(".node-bg__border").style("display","none"),t.isOver||this.tree.settings.nodeOver.node&&-1!==this.tree.settings.nodeOver.node.parentsStateIdentifier.indexOf(t.stateIdentifier)||!this.tree.settings.canNodeDrag||!this.tree.isOverSvg){if(this.tree.nodeIsOverDelete){let e=this.dragDrop.changeNodePosition(i,"delete");if(this.tree.settings.displayDeleteConfirmation){a.confirm(TYPO3.lang.deleteItem,TYPO3.lang["mess.delete"].replace("%s",e.node.name),o.warning,[{text:s.default(this).data("button-close-text")||TYPO3.lang["labels.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["cm.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",t=>{"delete"===t.target.name&&this.tree.sendChangeCommand(e),a.dismiss()})}else this.tree.sendChangeCommand(e)}}else{let e=this.dragDrop.changeNodePosition(i,""),t="in"===e.position?TYPO3.lang["mess.move_into"]:TYPO3.lang["mess.move_after"];t=t.replace("%s",e.node.name).replace("%s",e.target.name),a.confirm(TYPO3.lang.move_page,t,o.warning,[{text:s.default(this).data("button-close-text")||TYPO3.lang["labels.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["cm.copy"]||"Copy",btnClass:"btn-warning",name:"copy"},{text:s.default(this).data("button-ok-text")||TYPO3.lang["labels.move"]||"Move",btnClass:"btn-warning",name:"move"}]).on("button.clicked",t=>{const s=t.target;"move"===s.name?(e.command="move",this.tree.sendChangeCommand(e)):"copy"===s.name&&(e.command="copy",this.tree.sendChangeCommand(e)),a.dismiss()})}return!0}getDropZoneOpenTransform(e){return"translate("+((parseFloat(this.tree.svg.style("width"))||300)-58-e.x)+"px, -10px)"}getDropZoneCloseTransform(e){return"translate("+((parseFloat(this.tree.svg.style("width"))||300)-e.x)+"px, -10px)"}animateDropZone(e,t,s,n=null){t.classList.add("animating"),t.dataset.open="show"===e?"true":"false";let r=[{transform:this.getDropZoneCloseTransform(s)},{transform:this.getDropZoneOpenTransform(s)}];"show"!==e&&(r=r.reverse());const a=function(){t.style.transform=r[1].transform,t.classList.remove("animating"),n&&n()};"animate"in t?t.animate(r,{duration:300,easing:"cubic-bezier(.02, .01, .47, 1)"}).onfinish=a:a()}}}));
\ No newline at end of file
......@@ -10,4 +10,4 @@
*
* The TYPO3 project - inspiring people to share!
*/
define(["require","exports","lit-html","lit-html/directives/unsafe-html","lit-html/directives/until","TYPO3/CMS/Backend/Icons","TYPO3/CMS/Backend/Element/SpinnerElement"],(function(e,n,t,l,r,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.icon=n.lll=n.renderHTML=n.renderElement=void 0,n.renderElement=e=>{const n=document.createElement("div");return t.render(e,n),n},n.renderHTML=e=>n.renderElement(e).innerHTML,n.lll=e=>window.TYPO3&&window.TYPO3.lang&&"string"==typeof window.TYPO3.lang[e]?window.TYPO3.lang[e]:"",n.icon=(e,n="small")=>{const d=i.getIcon(e,n).then(e=>t.html`${l.unsafeHTML(e)}`);return t.html`${r.until(d,t.html`<typo3-backend-spinner size="${n}"></typo3-backend-spinner>`)}`}}));
\ No newline at end of file
define(["require","exports","lit-html","lit-html/directives/unsafe-html","lit-html/directives/until","TYPO3/CMS/Backend/Icons","TYPO3/CMS/Backend/Element/SpinnerElement"],(function(e,n,t,r,i,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.icon=n.lll=n.renderHTML=n.renderNodes=void 0,n.renderNodes=e=>{const n=document.createElement("div");return t.render(e,n),n.childNodes},n.renderHTML=e=>{const n=document.createElement("div");return t.render(e,n),n.innerHTML},n.lll=e=>window.TYPO3&&window.TYPO3.lang&&"string"==typeof window.TYPO3.lang[e]?window.TYPO3.lang[e]:"",n.icon=(e,n="small")=>{const d=l.getIcon(e,n).then(e=>t.html`${r.unsafeHTML(e)}`);return t.html`${i.until(d,t.html`<typo3-backend-spinner size="${n}"></typo3-backend-spinner>`)}`}}));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment